Loading...
Loading...
Compare original and translation side by side
get_page_info/mcpget_page_info/mcppackage.json.subframe/| Condition | Action |
|---|---|
No | Run |
Has | Proceed with the workflow below. |
Has | Ask the user (see below). |
package.json.subframe/| 条件 | 操作 |
|---|---|
无 | 先运行 |
存在 | 继续执行下方的工作流。 |
存在 | 询问用户(见下文)。 |
package.json.subframe//subframe:setupget_page_infoget_page_infoget_page_infoButtonget_page_infoButton// By URL
get_page_info({ url: "https://app.subframe.com/PROJECT_ID/design/PAGE_ID/edit" })
// By ID (e.g., from /subframe:design)
get_page_info({ id: "PAGE_ID", projectId: "PROJECT_ID" })
// By name
get_page_info({ name: "Settings Page", projectId: "PROJECT_ID" })
// List all pages first if needed
list_pages({ projectId: "PROJECT_ID" })projectId.subframe/sync.json// By URL
get_page_info({ url: "https://app.subframe.com/PROJECT_ID/design/PAGE_ID/edit" })
// By ID (e.g., from /subframe:design)
get_page_info({ id: "PAGE_ID", projectId: "PROJECT_ID" })
// By name
get_page_info({ name: "Settings Page", projectId: "PROJECT_ID" })
// List all pages first if needed
list_pages({ projectId: "PROJECT_ID" }).subframe/sync.jsonprojectIdnpx @subframe/cli@latest sync Button Alert TextFieldnpx @subframe/cli@latest sync --allnpx @subframe/cli@latest sync Button Alert TextFieldnpx @subframe/cli@latest sync --all// @subframe/sync-disable// @subframe/sync-disable
import * as React from "react"
// ... rest of componentget_component_info// @subframe/sync-disable// @subframe/sync-disable
import * as React from "react"
// ... rest of componentget_component_infoconst { data, isLoading, error } = useQuery(...)
if (isLoading) return <Skeleton />
if (error) return <Alert variant="error">{error.message}</Alert>
return <PageComponent {...data} />const handleSubmit = async (e: FormEvent) => {
e.preventDefault()
await submitForm(formData)
}<Button onClick={handleClick}>Submit</Button>
<Card actionSlot={<IconButton onClick={handleDelete} />} />const { data, isLoading, error } = useQuery(...)
if (isLoading) return <Skeleton />
if (error) return <Alert variant="error">{error.message}</Alert>
return <PageComponent {...data} />const handleSubmit = async (e: FormEvent) => {
e.preventDefault()
await submitForm(formData)
}<Button onClick={handleClick}>Submit</Button>
<Card actionSlot={<IconButton onClick={handleDelete} />} />| Tool | Purpose | Key Parameters |
|---|---|---|
| Fetch page code | |
| Fetch component code | |
| List all pages | |
| List all components | |
| Get Tailwind config | |
| 工具 | 用途 | 关键参数 |
|---|---|---|
| 获取页面代码 | |
| 获取组件代码 | |
| 列出所有页面 | |
| 列出所有组件 | |
| 获取Tailwind配置 | |