@agent-native/core 0.41.1 → 0.43.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +17 -56
- package/dist/action.d.ts +13 -1
- package/dist/action.d.ts.map +1 -1
- package/dist/action.js.map +1 -1
- package/dist/agent/production-agent.d.ts +8 -0
- package/dist/agent/production-agent.d.ts.map +1 -1
- package/dist/agent/production-agent.js +93 -0
- package/dist/agent/production-agent.js.map +1 -1
- package/dist/cli/app-skill.d.ts +16 -0
- package/dist/cli/app-skill.d.ts.map +1 -1
- package/dist/cli/app-skill.js +33 -3
- package/dist/cli/app-skill.js.map +1 -1
- package/dist/cli/pr-visual-recap-workflow.d.ts +1 -1
- package/dist/cli/pr-visual-recap-workflow.d.ts.map +1 -1
- package/dist/cli/pr-visual-recap-workflow.js +1 -1
- package/dist/cli/pr-visual-recap-workflow.js.map +1 -1
- package/dist/cli/recap.d.ts.map +1 -1
- package/dist/cli/recap.js +38 -16
- package/dist/cli/recap.js.map +1 -1
- package/dist/cli/skills.d.ts +30 -3
- package/dist/cli/skills.d.ts.map +1 -1
- package/dist/cli/skills.js +180 -114
- package/dist/cli/skills.js.map +1 -1
- package/dist/client/AssistantChat.d.ts.map +1 -1
- package/dist/client/AssistantChat.js +2 -2
- package/dist/client/AssistantChat.js.map +1 -1
- package/dist/client/agent-chat-adapter.d.ts.map +1 -1
- package/dist/client/agent-chat-adapter.js +172 -5
- package/dist/client/agent-chat-adapter.js.map +1 -1
- package/dist/client/blocks/index.d.ts +11 -0
- package/dist/client/blocks/index.d.ts.map +1 -1
- package/dist/client/blocks/index.js +11 -0
- package/dist/client/blocks/index.js.map +1 -1
- package/dist/client/blocks/library/AnnotatedCodeBlock.d.ts +19 -0
- package/dist/client/blocks/library/AnnotatedCodeBlock.d.ts.map +1 -1
- package/dist/client/blocks/library/AnnotatedCodeBlock.js +6 -58
- package/dist/client/blocks/library/AnnotatedCodeBlock.js.map +1 -1
- package/dist/client/blocks/library/ApiEndpointBlock.d.ts.map +1 -1
- package/dist/client/blocks/library/ApiEndpointBlock.js +116 -7
- package/dist/client/blocks/library/ApiEndpointBlock.js.map +1 -1
- package/dist/client/blocks/library/DataModelBlock.d.ts.map +1 -1
- package/dist/client/blocks/library/DataModelBlock.js +75 -9
- package/dist/client/blocks/library/DataModelBlock.js.map +1 -1
- package/dist/client/blocks/library/DiffBlock.d.ts +1 -1
- package/dist/client/blocks/library/DiffBlock.d.ts.map +1 -1
- package/dist/client/blocks/library/DiffBlock.js +265 -39
- package/dist/client/blocks/library/DiffBlock.js.map +1 -1
- package/dist/client/blocks/library/FileTreeBlock.d.ts.map +1 -1
- package/dist/client/blocks/library/FileTreeBlock.js +27 -4
- package/dist/client/blocks/library/FileTreeBlock.js.map +1 -1
- package/dist/client/blocks/library/HighlightedCode.d.ts +1 -1
- package/dist/client/blocks/library/HighlightedCode.js +1 -1
- package/dist/client/blocks/library/HighlightedCode.js.map +1 -1
- package/dist/client/blocks/library/JsonExplorerBlock.js +1 -1
- package/dist/client/blocks/library/JsonExplorerBlock.js.map +1 -1
- package/dist/client/blocks/library/MermaidBlock.js +1 -1
- package/dist/client/blocks/library/MermaidBlock.js.map +1 -1
- package/dist/client/blocks/library/annotation-rail.d.ts +115 -0
- package/dist/client/blocks/library/annotation-rail.d.ts.map +1 -0
- package/dist/client/blocks/library/annotation-rail.js +139 -0
- package/dist/client/blocks/library/annotation-rail.js.map +1 -0
- package/dist/client/blocks/library/api-endpoint.config.d.ts +31 -6
- package/dist/client/blocks/library/api-endpoint.config.d.ts.map +1 -1
- package/dist/client/blocks/library/api-endpoint.config.js +30 -6
- package/dist/client/blocks/library/api-endpoint.config.js.map +1 -1
- package/dist/client/blocks/library/callout.config.d.ts +29 -0
- package/dist/client/blocks/library/callout.config.d.ts.map +1 -0
- package/dist/client/blocks/library/callout.config.js +33 -0
- package/dist/client/blocks/library/callout.config.js.map +1 -0
- package/dist/client/blocks/library/callout.d.ts +20 -0
- package/dist/client/blocks/library/callout.d.ts.map +1 -0
- package/dist/client/blocks/library/callout.js +61 -0
- package/dist/client/blocks/library/callout.js.map +1 -0
- package/dist/client/blocks/library/checklist.d.ts.map +1 -1
- package/dist/client/blocks/library/checklist.js +3 -3
- package/dist/client/blocks/library/checklist.js.map +1 -1
- package/dist/client/blocks/library/code.d.ts.map +1 -1
- package/dist/client/blocks/library/code.js +32 -15
- package/dist/client/blocks/library/code.js.map +1 -1
- package/dist/client/blocks/library/columns.d.ts.map +1 -1
- package/dist/client/blocks/library/columns.js +56 -35
- package/dist/client/blocks/library/columns.js.map +1 -1
- package/dist/client/blocks/library/data-model.config.d.ts +17 -0
- package/dist/client/blocks/library/data-model.config.d.ts.map +1 -1
- package/dist/client/blocks/library/data-model.config.js +15 -0
- package/dist/client/blocks/library/data-model.config.js.map +1 -1
- package/dist/client/blocks/library/decision.config.d.ts +37 -0
- package/dist/client/blocks/library/decision.config.d.ts.map +1 -0
- package/dist/client/blocks/library/decision.config.js +32 -0
- package/dist/client/blocks/library/decision.config.js.map +1 -0
- package/dist/client/blocks/library/decision.d.ts +19 -0
- package/dist/client/blocks/library/decision.d.ts.map +1 -0
- package/dist/client/blocks/library/decision.js +119 -0
- package/dist/client/blocks/library/decision.js.map +1 -0
- package/dist/client/blocks/library/diagram.config.d.ts +64 -0
- package/dist/client/blocks/library/diagram.config.d.ts.map +1 -0
- package/dist/client/blocks/library/diagram.config.js +111 -0
- package/dist/client/blocks/library/diagram.config.js.map +1 -0
- package/dist/client/blocks/library/diagram.d.ts +16 -0
- package/dist/client/blocks/library/diagram.d.ts.map +1 -0
- package/dist/client/blocks/library/diagram.js +261 -0
- package/dist/client/blocks/library/diagram.js.map +1 -0
- package/dist/client/blocks/library/diff.config.d.ts +28 -6
- package/dist/client/blocks/library/diff.config.d.ts.map +1 -1
- package/dist/client/blocks/library/diff.config.js +30 -6
- package/dist/client/blocks/library/diff.config.js.map +1 -1
- package/dist/client/blocks/library/question-form.config.d.ts +69 -0
- package/dist/client/blocks/library/question-form.config.d.ts.map +1 -0
- package/dist/client/blocks/library/question-form.config.js +58 -0
- package/dist/client/blocks/library/question-form.config.js.map +1 -0
- package/dist/client/blocks/library/question-form.d.ts +20 -0
- package/dist/client/blocks/library/question-form.d.ts.map +1 -0
- package/dist/client/blocks/library/question-form.js +286 -0
- package/dist/client/blocks/library/question-form.js.map +1 -0
- package/dist/client/blocks/library/sanitize-html.d.ts +5 -0
- package/dist/client/blocks/library/sanitize-html.d.ts.map +1 -0
- package/dist/client/blocks/library/sanitize-html.js +240 -0
- package/dist/client/blocks/library/sanitize-html.js.map +1 -0
- package/dist/client/blocks/library/server-specs.d.ts.map +1 -1
- package/dist/client/blocks/library/server-specs.js +59 -0
- package/dist/client/blocks/library/server-specs.js.map +1 -1
- package/dist/client/blocks/library/specs.d.ts.map +1 -1
- package/dist/client/blocks/library/specs.js +11 -0
- package/dist/client/blocks/library/specs.js.map +1 -1
- package/dist/client/blocks/library/tabs.d.ts.map +1 -1
- package/dist/client/blocks/library/tabs.js +12 -12
- package/dist/client/blocks/library/tabs.js.map +1 -1
- package/dist/client/blocks/library/wireframe-kit.d.ts +260 -0
- package/dist/client/blocks/library/wireframe-kit.d.ts.map +1 -0
- package/dist/client/blocks/library/wireframe-kit.js +920 -0
- package/dist/client/blocks/library/wireframe-kit.js.map +1 -0
- package/dist/client/blocks/library/wireframe.config.d.ts +123 -0
- package/dist/client/blocks/library/wireframe.config.d.ts.map +1 -0
- package/dist/client/blocks/library/wireframe.config.js +294 -0
- package/dist/client/blocks/library/wireframe.config.js.map +1 -0
- package/dist/client/blocks/library/wireframe.d.ts +15 -0
- package/dist/client/blocks/library/wireframe.d.ts.map +1 -0
- package/dist/client/blocks/library/wireframe.js +206 -0
- package/dist/client/blocks/library/wireframe.js.map +1 -0
- package/dist/client/blocks/registry.d.ts +9 -0
- package/dist/client/blocks/registry.d.ts.map +1 -1
- package/dist/client/blocks/registry.js +12 -5
- package/dist/client/blocks/registry.js.map +1 -1
- package/dist/client/blocks/server.d.ts +1 -0
- package/dist/client/blocks/server.d.ts.map +1 -1
- package/dist/client/blocks/server.js +1 -0
- package/dist/client/blocks/server.js.map +1 -1
- package/dist/client/blocks/types.d.ts +10 -2
- package/dist/client/blocks/types.d.ts.map +1 -1
- package/dist/client/blocks/types.js.map +1 -1
- package/dist/client/rich-markdown-editor/DragHandle.d.ts.map +1 -1
- package/dist/client/rich-markdown-editor/DragHandle.js +152 -21
- package/dist/client/rich-markdown-editor/DragHandle.js.map +1 -1
- package/dist/client/rich-markdown-editor/RegistryBlockNode.d.ts +25 -1
- package/dist/client/rich-markdown-editor/RegistryBlockNode.d.ts.map +1 -1
- package/dist/client/rich-markdown-editor/RegistryBlockNode.js +29 -6
- package/dist/client/rich-markdown-editor/RegistryBlockNode.js.map +1 -1
- package/dist/client/rich-markdown-editor/SharedRichEditor.d.ts +8 -1
- package/dist/client/rich-markdown-editor/SharedRichEditor.d.ts.map +1 -1
- package/dist/client/rich-markdown-editor/SharedRichEditor.js +5 -1
- package/dist/client/rich-markdown-editor/SharedRichEditor.js.map +1 -1
- package/dist/extensions/actions.d.ts.map +1 -1
- package/dist/extensions/actions.js +159 -12
- package/dist/extensions/actions.js.map +1 -1
- package/dist/extensions/store.d.ts +21 -0
- package/dist/extensions/store.d.ts.map +1 -1
- package/dist/extensions/store.js +33 -1
- package/dist/extensions/store.js.map +1 -1
- package/dist/server/recap-image-route.d.ts.map +1 -1
- package/dist/server/recap-image-route.js +12 -3
- package/dist/server/recap-image-route.js.map +1 -1
- package/dist/styles/agent-native.css +1 -0
- package/dist/styles/blocks.css +1380 -0
- package/dist/templates/workspace-core/.agents/skills/extensions/SKILL.md +30 -5
- package/docs/content/plan-plugin.md +107 -0
- package/docs/content/pr-visual-recap.md +2 -2
- package/docs/content/skills-guide.md +8 -0
- package/docs/content/template-plan.md +94 -17
- package/package.json +2 -1
- package/src/templates/workspace-core/.agents/skills/extensions/SKILL.md +30 -5
- package/docs/content/visual-plans.md +0 -80
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wireframe.config.js","sourceRoot":"","sources":["../../../../src/client/blocks/library/wireframe.config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,IAAI,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AA4JjD,MAAM,CAAC,MAAM,kBAAkB,GAAuB;IACpD,SAAS;IACT,QAAQ;IACR,SAAS;IACT,OAAO;IACP,SAAS;CACV,CAAC;AAEF,MAAM,CAAC,MAAM,kBAAkB,GAAsB;IACnD,QAAQ;IACR,YAAY;IACZ,WAAW;IACX,SAAS;IACT,KAAK;IACL,KAAK;IACL,SAAS;IACT,SAAS;IACT,MAAM;IACN,OAAO;IACP,MAAM;IACN,OAAO;IACP,SAAS;IACT,SAAS;IACT,OAAO;IACP,MAAM;IACN,MAAM;IACN,OAAO;IACP,OAAO;IACP,KAAK;IACL,KAAK;IACL,MAAM;IACN,QAAQ;IACR,QAAQ;IACR,YAAY;IACZ,IAAI;IACJ,WAAW;IACX,KAAK;IACL,SAAS;CACV,CAAC;AAEF,gFAAgF;AAChF,iFAAiF;AACjF,gFAAgF;AAEhF,MAAM,UAAU,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC;AACxE,MAAM,YAAY,GAAG,CAAC,CAAC,IAAI,CACzB,kBAA6D,CAC9D,CAAC;AACF,MAAM,QAAQ,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AAEnD;;;;GAIG;AACH,SAAS,kBAAkB,CAAC,KAAa;IACvC,OAAO,CAAC,iDAAiD,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AACxE,CAAC;AAED,MAAM,mBAAmB,GAA6B,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K,EAAE,KAAK,EAAE,EAAE,CACpB,kBAAkB,CAAC,KAAK,EAAE,GAAG,SAAS,WAAW,KAAK,EAAE,CAAC,CAC1D;aACA,MAAM,CAAC,OAAO,CAAoB;KACtC,CAAC;AACJ,CAAC;AAED,gFAAgF;AAChF,iFAAiF;AACjF,gFAAgF;AAEhF;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,YAAY,GAAkC;IACzD,GAAG,EAAE,gBAAgB;IACrB,OAAO,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC;IACnB,SAAS,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC;IACrD,iBAAiB,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,eAAe,CAAC,IAAI,CAAC;IAClD,aAAa,EAAE,CAAC,UAAU,EAAE,SAAS,EAAE,EAAE;QACvC,MAAM,KAAK,GAAG,UAAgC,CAAC;QAC/C,MAAM,MAAM,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,WAAW,CAAC,KAAK,CAAC,KAAK,QAAQ,CAAC,CAAC;QACtE,IAAI,CAAC,MAAM;YAAE,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC;QACvD,OAAO,WAAW,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;IACxC,CAAC;CACF,CAAC","sourcesContent":["import { z } from \"zod\";\nimport { prop, attributeValue } from \"../mdx.js\";\nimport type { BlockMdxConfig } from \"../types.js\";\n\n/**\n * Pure (React-free) part of the shared `wireframe` block: its data shape, zod\n * schema, the stable node-id helper, and the nested-MDX round-trip config. Lives\n * in core so BOTH apps' server/shared registries and the client spec\n * (`wireframe.tsx`) consume one definition; importing it into a server module\n * never pulls React into the Nitro/SSR bundle.\n *\n * The wireframe block originated in the plan template. The vocabulary\n * (`PlanWireframe*` names, the `el` set, the `--wf-*` token contract) and the\n * MDX encoding (`<WireframeBlock>…<Screen>…</Screen></WireframeBlock>` with kit\n * component names `FrameScreen`/`Row`/`Col`/…) are preserved EXACTLY so stored\n * plans round-trip byte-compatibly and existing node ids never change.\n *\n * The wireframe is NESTED MDX, not a flat-attribute or prose block: its body is\n * a `<Screen surface caption>…kit-tree…</Screen>` subtree. So the config uses\n * `serializeChildren`/`parseChildren` (the registry's nested-MDX path) rather\n * than `toAttrs`/`childrenField`.\n */\n\n/* -------------------------------------------------------------------------- */\n/* Vocabulary (decoupled copy of the plan-content wireframe types) */\n/* -------------------------------------------------------------------------- */\n\nexport type WireframeSurface =\n | \"desktop\"\n | \"mobile\"\n | \"popover\"\n | \"panel\"\n | \"browser\";\n\nexport type WireframeRenderMode = \"wireframe\" | \"design\";\n\n/** Tone keyword reused across screen primitives. The renderer maps to color. */\nexport type WireframeTone = \"default\" | \"accent\" | \"warn\" | \"ok\" | \"muted\";\n\n/**\n * Names of the kit primitives. Component-like (MDX-friendly). The renderer maps\n * each to a flex kit component. Layout is ALWAYS flex; row/col/sidebar/main set\n * the flex direction.\n */\nexport type WireframeElName =\n | \"screen\"\n | \"browserBar\"\n | \"statusBar\"\n | \"toolbar\"\n | \"row\"\n | \"col\"\n | \"sidebar\"\n | \"navItem\"\n | \"main\"\n | \"title\"\n | \"text\"\n | \"lines\"\n | \"section\"\n | \"taskRow\"\n | \"chips\"\n | \"chip\"\n | \"pill\"\n | \"check\"\n | \"field\"\n | \"btn\"\n | \"fab\"\n | \"card\"\n | \"column\"\n | \"avatar\"\n | \"iconSquare\"\n | \"kv\"\n | \"searchBar\"\n | \"box\"\n | \"divider\";\n\n/**\n * A single node in the wireframe kit tree. `el` is the primitive name; the\n * remaining props are the union of every primitive's props (kept permissive so\n * the model can compose freely). `children` nests other nodes. `id` is a stable\n * node id used by node-addressable patch ops (auto-assigned on create).\n *\n * There is intentionally NO x/y/width/height here — wireframe internals are\n * geometry-free and laid out by the renderer with flex.\n */\nexport type WireframeNode = {\n /** Stable id for node-addressable patches; auto-assigned when absent. */\n id?: string;\n el: WireframeElName;\n children?: WireframeNode[];\n\n // Generic content props\n text?: string;\n value?: string;\n label?: string;\n placeholder?: string;\n title?: string;\n\n // Styling-by-intent (semantic only; renderer owns actual color/size)\n tone?: WireframeTone;\n color?: WireframeTone;\n weight?: \"normal\" | \"medium\" | \"bold\";\n active?: boolean;\n done?: boolean;\n emphasis?: boolean;\n full?: boolean;\n solid?: boolean;\n dashed?: boolean;\n dot?: boolean;\n script?: boolean;\n area?: boolean;\n shape?: \"square\" | \"circle\";\n\n // Numeric / structured props\n count?: number;\n prio?: number;\n n?: number;\n widths?: number[];\n icon?: string;\n\n // taskRow specifics\n note?: string;\n due?: string;\n dueTone?: WireframeTone;\n\n // Collection props (chips, kv)\n items?: Array<{\n label: string;\n active?: boolean;\n count?: number;\n dot?: boolean;\n }>;\n rows?: Array<{ k: string; v: string }>;\n};\n\nexport interface WireframeData {\n surface: WireframeSurface;\n /** `design` renders full-fidelity branded HTML/CSS instead of a sketch. */\n renderMode?: WireframeRenderMode;\n caption?: string;\n /**\n * Neutral, textless loading register. The renderer drops borders, the sketch\n * outline, and color, rendering soft placeholder geometry only.\n */\n skeleton?: boolean;\n /**\n * PRIMARY content: a self-contained HTML mockup of the screen (sanitized\n * fragment — no document/script/style tags). The renderer owns the surface\n * aspect, the dark/light theme, the hand-drawn font, and the rough overlay.\n * When `html` is set, `screen` is ignored.\n */\n html?: string;\n /** Optional scoped CSS for the html mockup (sanitized fragment). */\n css?: string;\n /** Kit-tree screen. Used when `html` is absent. */\n screen?: WireframeNode[];\n}\n\nexport const WIREFRAME_SURFACES: WireframeSurface[] = [\n \"desktop\",\n \"mobile\",\n \"popover\",\n \"panel\",\n \"browser\",\n];\n\nexport const WIREFRAME_EL_NAMES: WireframeElName[] = [\n \"screen\",\n \"browserBar\",\n \"statusBar\",\n \"toolbar\",\n \"row\",\n \"col\",\n \"sidebar\",\n \"navItem\",\n \"main\",\n \"title\",\n \"text\",\n \"lines\",\n \"section\",\n \"taskRow\",\n \"chips\",\n \"chip\",\n \"pill\",\n \"check\",\n \"field\",\n \"btn\",\n \"fab\",\n \"card\",\n \"column\",\n \"avatar\",\n \"iconSquare\",\n \"kv\",\n \"searchBar\",\n \"box\",\n \"divider\",\n];\n\n/* -------------------------------------------------------------------------- */\n/* Schema (mirrors the plan-content wireframeDataSchema) */\n/* -------------------------------------------------------------------------- */\n\nconst toneSchema = z.enum([\"default\", \"accent\", \"warn\", \"ok\", \"muted\"]);\nconst elNameSchema = z.enum(\n WIREFRAME_EL_NAMES as [WireframeElName, ...WireframeElName[]],\n);\nconst idSchema = z.string().trim().min(1).max(120);\n\n/**\n * Reject full-document HTML (html/head/body/script/style tags) in the `html` /\n * `css` fields. Wireframe content must be a bounded fragment; document or script\n * tags are a stored-XSS and layout-escape hazard.\n */\nfunction noFullHtmlDocument(value: string): boolean {\n return !/<\\s*(?:!doctype|html|head|body|script|style)\\b/i.test(value);\n}\n\nconst wireframeNodeSchema: z.ZodType<WireframeNode> = z.lazy(() =>\n z\n .object({\n id: idSchema.optional(),\n el: elNameSchema,\n children: z.array(wireframeNodeSchema).max(60).optional(),\n\n text: z.string().trim().max(400).optional(),\n value: z.string().trim().max(400).optional(),\n label: z.string().trim().max(200).optional(),\n placeholder: z.string().trim().max(200).optional(),\n title: z.string().trim().max(200).optional(),\n\n tone: toneSchema.optional(),\n color: toneSchema.optional(),\n weight: z.enum([\"normal\", \"medium\", \"bold\"]).optional(),\n active: z.boolean().optional(),\n done: z.boolean().optional(),\n emphasis: z.boolean().optional(),\n full: z.boolean().optional(),\n solid: z.boolean().optional(),\n dashed: z.boolean().optional(),\n dot: z.boolean().optional(),\n script: z.boolean().optional(),\n area: z.boolean().optional(),\n shape: z.enum([\"square\", \"circle\"]).optional(),\n\n count: z.number().int().min(0).max(9_999).optional(),\n prio: z.number().int().min(0).max(9).optional(),\n n: z.number().int().min(0).max(20).optional(),\n widths: z.array(z.number().min(0).max(100)).max(20).optional(),\n icon: z.string().trim().max(40).optional(),\n\n note: z.string().trim().max(400).optional(),\n due: z.string().trim().max(120).optional(),\n dueTone: toneSchema.optional(),\n\n items: z\n .array(\n z.object({\n label: z.string().trim().min(1).max(200),\n active: z.boolean().optional(),\n count: z.number().int().min(0).max(9_999).optional(),\n dot: z.boolean().optional(),\n }),\n )\n .max(40)\n .optional(),\n rows: z\n .array(\n z.object({\n k: z.string().trim().min(1).max(200),\n v: z.string().trim().max(400),\n }),\n )\n .max(40)\n .optional(),\n })\n .passthrough(),\n) as z.ZodType<WireframeNode>;\n\nexport const wireframeSchema = z\n .object({\n surface: z.enum([\"desktop\", \"mobile\", \"popover\", \"panel\", \"browser\"]),\n renderMode: z.enum([\"wireframe\", \"design\"]).optional(),\n caption: z.string().trim().max(400).optional(),\n skeleton: z.boolean().optional(),\n html: z\n .string()\n .max(40_000)\n .refine(noFullHtmlDocument, {\n message:\n \"Wireframe html must be a bounded fragment without html/head/body/script/style tags.\",\n })\n .optional(),\n css: z\n .string()\n .max(20_000)\n .refine(noFullHtmlDocument, {\n message: \"Wireframe css must not include document or script tags.\",\n })\n .optional(),\n screen: z.array(wireframeNodeSchema).max(200).optional(),\n })\n .passthrough() as unknown as z.ZodType<WireframeData>;\n\n/* -------------------------------------------------------------------------- */\n/* Stable node-id derivation (verbatim from plan-mdx.ts) */\n/* -------------------------------------------------------------------------- */\n\n/**\n * Derive a stable node id from the element name and tree path. Re-runs identically\n * to the legacy plan derivation so stored plans round-trip without changing ids.\n */\nexport function createStableWireframeNodeId(\n el: WireframeElName,\n path: string,\n): string {\n return `node-${el}-${path}`\n .toLowerCase()\n .replace(/[^a-z0-9]+/g, \"-\")\n .replace(/^-+|-+$/g, \"\")\n .slice(0, 80);\n}\n\n/* -------------------------------------------------------------------------- */\n/* Kit node <-> MDX component name maps (mirrors plan-mdx.ts NODE_TO_COMPONENT) */\n/* -------------------------------------------------------------------------- */\n\nconst NODE_TO_COMPONENT: Record<WireframeElName, string> = {\n screen: \"FrameScreen\",\n browserBar: \"BrowserBar\",\n statusBar: \"StatusBar\",\n toolbar: \"Toolbar\",\n row: \"Row\",\n col: \"Col\",\n sidebar: \"Sidebar\",\n navItem: \"NavItem\",\n main: \"Main\",\n title: \"Title\",\n text: \"Text\",\n lines: \"Lines\",\n section: \"SectionLabel\",\n taskRow: \"TaskRow\",\n chips: \"Chips\",\n chip: \"Chip\",\n pill: \"Pill\",\n check: \"Check\",\n field: \"Field\",\n btn: \"Btn\",\n fab: \"Fab\",\n card: \"Card\",\n column: \"Column\",\n avatar: \"Avatar\",\n iconSquare: \"IconSquare\",\n kv: \"KV\",\n searchBar: \"SearchBar\",\n box: \"Box\",\n divider: \"Divider\",\n};\n\nconst COMPONENT_TO_NODE = Object.fromEntries(\n Object.entries(NODE_TO_COMPONENT).map(([el, component]) => [component, el]),\n) as Record<string, WireframeElName>;\n\n/* -------------------------------------------------------------------------- */\n/* Serialize (verbatim port of plan-mdx.ts serializeNode/serializeScreen) */\n/* -------------------------------------------------------------------------- */\n\nfunction serializeNode(node: WireframeNode, indent = \"\"): string {\n const name = NODE_TO_COMPONENT[node.el] ?? \"Box\";\n const attrs = Object.entries(node)\n .filter(([key]) => key !== \"children\" && key !== \"el\")\n .map(([key, value]) => prop(key, value))\n .join(\"\");\n if (!node.children?.length) return `${indent}<${name}${attrs} />`;\n const children = node.children\n .map((child) => serializeNode(child, `${indent} `))\n .join(\"\\n\");\n return `${indent}<${name}${attrs}>\\n${children}\\n${indent}</${name}>`;\n}\n\n/**\n * Serialize the wireframe data to its inner `<Screen>` MDX subtree. The registry\n * serializer wraps this between the `<WireframeBlock …>` open/close tags, so the\n * total output equals the legacy `serializeBlock` wireframe branch exactly.\n */\nfunction serializeScreen(data: WireframeData): string {\n const attrs = [\n prop(\"surface\", data.surface),\n prop(\"renderMode\", data.renderMode),\n prop(\"caption\", data.caption),\n prop(\"html\", data.html),\n prop(\"css\", data.css),\n prop(\"skeleton\", data.skeleton),\n ].join(\"\");\n const children = (data.screen ?? [])\n .map((node) => serializeNode(node, \" \"))\n .join(\"\\n\");\n if (!children) return `<Screen${attrs} />`;\n return `<Screen${attrs}>\\n${children}\\n</Screen>`;\n}\n\n/* -------------------------------------------------------------------------- */\n/* Parse (verbatim port of plan-mdx.ts parseScreen/parseWireframeNode) */\n/* -------------------------------------------------------------------------- */\n\n/**\n * Minimal MDX AST node shape used while walking the wireframe subtree. Declared\n * standalone (not an intersection with `MdxJsxNode`, whose `children` is\n * `unknown[]`) so recursive `children` stays narrowed to `WireframeMdxNode`.\n */\ntype WireframeMdxNode = {\n type: string;\n name?: string;\n attributes?: Array<{\n type: string;\n name?: string;\n value?: string | null | { type: string; value: string; data?: unknown };\n }>;\n children?: WireframeMdxNode[];\n};\n\nfunction elementName(node: WireframeMdxNode | undefined): string | undefined {\n return node?.type === \"mdxJsxFlowElement\" ||\n node?.type === \"mdxJsxTextElement\"\n ? node.name\n : undefined;\n}\n\nfunction findAttribute(node: WireframeMdxNode, name: string) {\n return node.attributes?.find(\n (attr) => attr.type === \"mdxJsxAttribute\" && attr.name === name,\n );\n}\n\nfunction stringAttr(node: WireframeMdxNode, name: string): string | undefined {\n const value = attributeValue(findAttribute(node, name));\n return typeof value === \"string\" ? value : undefined;\n}\n\nfunction boolAttr(node: WireframeMdxNode, name: string): boolean | undefined {\n const value = attributeValue(findAttribute(node, name));\n return typeof value === \"boolean\" ? value : undefined;\n}\n\nfunction parseWireframeNode(\n node: WireframeMdxNode,\n path = \"node\",\n): WireframeNode | null {\n const component = elementName(node);\n if (!component) return null;\n const el = COMPONENT_TO_NODE[component];\n if (!el) return null;\n const attrs = node.attributes ?? [];\n const parsed: WireframeNode = { el };\n for (const attr of attrs) {\n if (attr.type !== \"mdxJsxAttribute\") continue;\n const value = attributeValue(attr);\n if (value !== undefined)\n (parsed as Record<string, unknown>)[attr.name as string] = value;\n }\n parsed.el = el;\n parsed.id ??= createStableWireframeNodeId(el, path);\n const children = (node.children ?? [])\n .map((child, index) => parseWireframeNode(child, `${path}-${index}`))\n .filter(Boolean) as WireframeNode[];\n if (children.length > 0) parsed.children = children;\n return parsed;\n}\n\nfunction parseScreen(node: WireframeMdxNode, idContext: string): WireframeData {\n return {\n surface:\n (stringAttr(node, \"surface\") as WireframeData[\"surface\"]) ?? \"desktop\",\n renderMode: stringAttr(node, \"renderMode\") as WireframeData[\"renderMode\"],\n caption: stringAttr(node, \"caption\"),\n html: stringAttr(node, \"html\"),\n css: stringAttr(node, \"css\"),\n skeleton: boolAttr(node, \"skeleton\"),\n screen: (node.children ?? [])\n .map((child, index) =>\n parseWireframeNode(child, `${idContext}-screen-${index}`),\n )\n .filter(Boolean) as WireframeNode[],\n };\n}\n\n/* -------------------------------------------------------------------------- */\n/* MDX config */\n/* -------------------------------------------------------------------------- */\n\n/**\n * Registry MDX config for the wireframe block. `tag` matches the legacy\n * `WireframeBlock`. The block has no flat attributes (`toAttrs` → `{}`); all data\n * lives in the nested `<Screen>` subtree handled by `serializeChildren` /\n * `parseChildren`. The registry serializer wraps `serializeChildren` between the\n * `<WireframeBlock>` open/close, producing the exact legacy bytes. On parse, the\n * registry passes the already-extended `${idContext}-${blockId}` to\n * `parseChildren` — the same id base the legacy `parseScreen` receives — so node\n * ids are reproduced identically.\n */\nexport const wireframeMdx: BlockMdxConfig<WireframeData> = {\n tag: \"WireframeBlock\",\n toAttrs: () => ({}),\n fromAttrs: () => ({ surface: \"desktop\", screen: [] }),\n serializeChildren: (data) => serializeScreen(data),\n parseChildren: (childNodes, idContext) => {\n const nodes = childNodes as WireframeMdxNode[];\n const screen = nodes.find((child) => elementName(child) === \"Screen\");\n if (!screen) return { surface: \"desktop\", screen: [] };\n return parseScreen(screen, idContext);\n },\n};\n"]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { BlockReadProps, BlockEditProps } from "../types.js";
|
|
2
|
+
import { type WireframeData } from "./wireframe.config.js";
|
|
3
|
+
/** Read-only renderer for a `wireframe` block. */
|
|
4
|
+
export declare function WireframeBlock({ data, blockId, title, summary, ctx, }: BlockReadProps<WireframeData>): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
/**
|
|
6
|
+
* Editor for the `wireframe` block. The wireframe is canvas / agent-patch edited
|
|
7
|
+
* (it never calls `onChange`), so edit mode reuses the read surface — mirroring
|
|
8
|
+
* the plan `WireframeEditor`. The host document editor already wraps the registry
|
|
9
|
+
* edit path in a titled section, so this renders only the surface to avoid
|
|
10
|
+
* double-nesting.
|
|
11
|
+
*/
|
|
12
|
+
export declare function WireframeEditor({ data, ctx }: BlockEditProps<WireframeData>): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
/** Full client spec for the shared `wireframe` block (schema + MDX + Read/Edit). */
|
|
14
|
+
export declare const wireframeBlock: import("../types.js").BlockSpec<WireframeData>;
|
|
15
|
+
//# sourceMappingURL=wireframe.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wireframe.d.ts","sourceRoot":"","sources":["../../../../src/client/blocks/library/wireframe.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EACV,cAAc,EACd,cAAc,EAEf,MAAM,aAAa,CAAC;AACrB,OAAO,EAGL,KAAK,aAAa,EAEnB,MAAM,uBAAuB,CAAC;AAsY/B,kDAAkD;AAClD,wBAAgB,cAAc,CAAC,EAC7B,IAAI,EACJ,OAAO,EACP,KAAK,EACL,OAAO,EACP,GAAG,GACJ,EAAE,cAAc,CAAC,aAAa,CAAC,2CAW/B;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,EAAE,cAAc,CAAC,aAAa,CAAC,2CAE3E;AAED,oFAAoF;AACpF,eAAO,MAAM,cAAc,gDAczB,CAAC"}
|
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect, useId, useMemo, useRef, useState, } from "react";
|
|
3
|
+
import { defineBlock } from "../types.js";
|
|
4
|
+
import { wireframeSchema, wireframeMdx, } from "./wireframe.config.js";
|
|
5
|
+
import { HTML_ROUGH_SELECTOR, KitConfigContext, RoughOverlay, Screen, renderNodes, useIsDark, useWireframeStyle, } from "./wireframe-kit.js";
|
|
6
|
+
import { sanitizeWireframeCss, sanitizeWireframeHtml, scopeDesignCss, } from "./sanitize-html.js";
|
|
7
|
+
const SURFACE_PRESETS = {
|
|
8
|
+
// mobile keeps a tall floor: a phone frame reads as a phone even when short.
|
|
9
|
+
mobile: { width: 300, minHeight: 360, radius: 30 },
|
|
10
|
+
desktop: { width: 840, minHeight: 200, radius: 14 },
|
|
11
|
+
browser: { width: 900, minHeight: 200, radius: 14 },
|
|
12
|
+
popover: { width: 360, minHeight: 120, radius: 16 },
|
|
13
|
+
panel: { width: 420, minHeight: 200, radius: 16 },
|
|
14
|
+
};
|
|
15
|
+
function isHtmlData(data) {
|
|
16
|
+
return typeof data.html === "string" && data.html.trim().length > 0;
|
|
17
|
+
}
|
|
18
|
+
/* -------------------------------------------------------------------------- */
|
|
19
|
+
/* Shared frame shell: surface-locked WIDTH + auto (content-driven) height + */
|
|
20
|
+
/* theme + rough overlay. The frame keeps each surface's footprint and chrome */
|
|
21
|
+
/* but fits its content height instead of padding to a fixed aspect, so short */
|
|
22
|
+
/* content yields a short frame and tall content grows. Pass `canvasSize` to */
|
|
23
|
+
/* opt a fixed-aspect canvas artboard back into a hard pixel height. */
|
|
24
|
+
/* -------------------------------------------------------------------------- */
|
|
25
|
+
function ArtboardFrame({ surface, compact, canvasSize, canvasWidth, skeleton, renderMode, roughOverlay = true, selector, caption, render, }) {
|
|
26
|
+
const ref = useRef(null);
|
|
27
|
+
const fitRef = useRef(null);
|
|
28
|
+
const isDark = useIsDark();
|
|
29
|
+
const theme = isDark ? "dark" : "light";
|
|
30
|
+
const style = useWireframeStyle();
|
|
31
|
+
const preset = SURFACE_PRESETS[surface] ?? SURFACE_PRESETS.desktop;
|
|
32
|
+
const width = canvasWidth ?? preset.width;
|
|
33
|
+
// AUTO-HEIGHT: with no explicit `canvasSize` the artboard height is driven by
|
|
34
|
+
// its content (`height: auto`), floored at the surface's `minHeight` so a short
|
|
35
|
+
// screen produces a short frame and a tall screen grows — instead of every
|
|
36
|
+
// surface being padded to a fixed preset height that left a big empty band
|
|
37
|
+
// below short content. A `canvasSize` (fixed-aspect canvas artboard) overrides
|
|
38
|
+
// this with a hard pixel height.
|
|
39
|
+
const fixedHeight = canvasSize;
|
|
40
|
+
const minHeight = fixedHeight ?? preset.minHeight;
|
|
41
|
+
const baseScale = compact ? Math.min(1, 320 / preset.width) : 1;
|
|
42
|
+
const maxFrameWidth = compact ? preset.width * baseScale : width;
|
|
43
|
+
const [fitScale, setFitScale] = useState(baseScale);
|
|
44
|
+
// The scaled artboard is `transform: scale()`-ed, which does not change its
|
|
45
|
+
// layout box, so the wrapper that reserves vertical space must track the
|
|
46
|
+
// artboard's ACTUAL rendered height. With a fixed height that's known up front;
|
|
47
|
+
// with auto-height we measure it.
|
|
48
|
+
const [measuredHeight, setMeasuredHeight] = useState(fixedHeight ?? null);
|
|
49
|
+
const designMode = renderMode === "design";
|
|
50
|
+
const sketchy = !designMode && style === "sketchy" && !skeleton;
|
|
51
|
+
const roughEnabled = sketchy && roughOverlay;
|
|
52
|
+
const paper = designMode
|
|
53
|
+
? "hsl(var(--background))"
|
|
54
|
+
: "var(--plan-document, hsl(var(--background)))";
|
|
55
|
+
const frameBorder = skeleton
|
|
56
|
+
? "var(--plan-placeholder-line, var(--plan-line, hsl(var(--border))))"
|
|
57
|
+
: "var(--plan-line, hsl(var(--border)))";
|
|
58
|
+
useEffect(() => {
|
|
59
|
+
const element = fitRef.current;
|
|
60
|
+
if (!element)
|
|
61
|
+
return;
|
|
62
|
+
const measure = () => {
|
|
63
|
+
const availableWidth = element.clientWidth;
|
|
64
|
+
const nextScale = availableWidth > 0
|
|
65
|
+
? Math.min(baseScale, availableWidth / width)
|
|
66
|
+
: baseScale;
|
|
67
|
+
setFitScale((current) => Math.abs(current - nextScale) < 0.001 ? current : nextScale);
|
|
68
|
+
};
|
|
69
|
+
measure();
|
|
70
|
+
const observer = new ResizeObserver(measure);
|
|
71
|
+
observer.observe(element);
|
|
72
|
+
return () => observer.disconnect();
|
|
73
|
+
}, [baseScale, width]);
|
|
74
|
+
// Track the auto-height artboard's rendered height so the (un-transformed)
|
|
75
|
+
// wrapper reserves exactly the scaled space the frame occupies. Skipped when a
|
|
76
|
+
// fixed height is supplied — there's nothing to measure.
|
|
77
|
+
useEffect(() => {
|
|
78
|
+
if (fixedHeight != null)
|
|
79
|
+
return;
|
|
80
|
+
const element = ref.current;
|
|
81
|
+
if (!element)
|
|
82
|
+
return;
|
|
83
|
+
const measure = () => {
|
|
84
|
+
const next = element.offsetHeight;
|
|
85
|
+
setMeasuredHeight((current) => current != null && Math.abs(current - next) < 0.5 ? current : next);
|
|
86
|
+
};
|
|
87
|
+
measure();
|
|
88
|
+
const observer = new ResizeObserver(measure);
|
|
89
|
+
observer.observe(element);
|
|
90
|
+
return () => observer.disconnect();
|
|
91
|
+
}, [fixedHeight]);
|
|
92
|
+
// Height the wrapper reserves: the measured (or fixed) artboard height scaled
|
|
93
|
+
// by the fit factor. Falls back to the surface floor before the first measure
|
|
94
|
+
// so SSR / first paint reserves a sensible box rather than collapsing.
|
|
95
|
+
const reservedHeight = (measuredHeight ?? minHeight) * fitScale;
|
|
96
|
+
return (_jsxs("div", { ref: fitRef, className: "plan-kit-wireframe", style: {
|
|
97
|
+
width: "100%",
|
|
98
|
+
maxWidth: maxFrameWidth,
|
|
99
|
+
}, children: [_jsx("div", { style: {
|
|
100
|
+
width: "100%",
|
|
101
|
+
maxWidth: maxFrameWidth,
|
|
102
|
+
height: reservedHeight,
|
|
103
|
+
marginInline: "auto",
|
|
104
|
+
}, children: _jsxs("div", { ref: ref, className: "plan-kit-artboard relative", style: {
|
|
105
|
+
width,
|
|
106
|
+
// Auto-height by default (content-driven, floored at `minHeight`);
|
|
107
|
+
// a fixed `canvasSize` locks the height for canvas artboards.
|
|
108
|
+
...(fixedHeight != null ? { height: fixedHeight } : { minHeight }),
|
|
109
|
+
borderRadius: preset.radius,
|
|
110
|
+
background: paper,
|
|
111
|
+
boxShadow: "0 10px 34px hsl(var(--foreground) / 0.10)",
|
|
112
|
+
...(fitScale !== 1
|
|
113
|
+
? {
|
|
114
|
+
transform: `scale(${fitScale})`,
|
|
115
|
+
transformOrigin: "top left",
|
|
116
|
+
}
|
|
117
|
+
: {}),
|
|
118
|
+
}, children: [_jsx("div", { className: "overflow-hidden", style: {
|
|
119
|
+
borderRadius: preset.radius,
|
|
120
|
+
...(fixedHeight != null
|
|
121
|
+
? { position: "absolute", inset: 0 }
|
|
122
|
+
: { minHeight }),
|
|
123
|
+
}, children: render({ theme, style }) }), !roughEnabled && (_jsx("div", { className: "pointer-events-none absolute inset-0", style: {
|
|
124
|
+
borderRadius: preset.radius,
|
|
125
|
+
border: `1.5px solid ${frameBorder}`,
|
|
126
|
+
} })), _jsx(RoughOverlay, { scopeRef: ref, enabled: roughEnabled, frameRadius: preset.radius, selector: selector })] }) }), caption && (_jsx("p", { className: "mt-2 text-center text-xs text-plan-muted", children: caption }))] }));
|
|
127
|
+
}
|
|
128
|
+
/* -------------------------------------------------------------------------- */
|
|
129
|
+
/* HTML artboard — author HTML, themed + roughened by the renderer. */
|
|
130
|
+
/* -------------------------------------------------------------------------- */
|
|
131
|
+
function HtmlArtboard({ data, ctx, compact, }) {
|
|
132
|
+
const renderMode = data.renderMode ?? "wireframe";
|
|
133
|
+
// Sanitize author HTML/CSS at the render point (defense-in-depth against stored
|
|
134
|
+
// XSS). Self-contained in core via the shared block sanitizer (DOM-based in the
|
|
135
|
+
// browser, regex fallback on the server) so the HTML mockup path renders in any
|
|
136
|
+
// app without the host wiring a sanitizer hook.
|
|
137
|
+
const safeHtml = useMemo(() => sanitizeWireframeHtml(data.html), [data.html]);
|
|
138
|
+
const scopeId = useId().replace(/[^a-zA-Z0-9_-]/g, "");
|
|
139
|
+
const scopedCss = useMemo(() => {
|
|
140
|
+
const safeCss = sanitizeWireframeCss(data.css);
|
|
141
|
+
// Scope every author selector under this instance's artboard so global
|
|
142
|
+
// selectors (body, *, .app-shell, :root) can't restyle/hide the host app.
|
|
143
|
+
return safeCss
|
|
144
|
+
? scopeDesignCss(safeCss, `[data-plan-design-scope="${scopeId}"]`)
|
|
145
|
+
: "";
|
|
146
|
+
}, [data.css, scopeId]);
|
|
147
|
+
return (_jsx(ArtboardFrame, { surface: data.surface, compact: compact, skeleton: data.skeleton, renderMode: renderMode, selector: HTML_ROUGH_SELECTOR, caption: data.caption, render: ({ theme, style }) => (_jsxs("div", { className: "plan-html-frame", "data-theme": theme, "data-style": style, "data-render-mode": renderMode, "data-plan-design-scope": scopeId, "data-skeleton": data.skeleton ? "true" : undefined, children: [scopedCss && _jsx("style", { children: scopedCss }), _jsx("div", { className: "plan-html-frame-content", dangerouslySetInnerHTML: { __html: safeHtml } })] })) }));
|
|
148
|
+
}
|
|
149
|
+
/* -------------------------------------------------------------------------- */
|
|
150
|
+
/* Kit artboard — declarative kit tree. */
|
|
151
|
+
/* -------------------------------------------------------------------------- */
|
|
152
|
+
function KitArtboard({ data, compact, }) {
|
|
153
|
+
return (_jsx(ArtboardFrame, { surface: data.surface, compact: compact, skeleton: data.skeleton, selector: "[data-rough]", caption: data.caption, render: ({ theme, style }) => (_jsx(KitConfigContext.Provider, { value: { skeleton: data.skeleton, theme, style }, children: renderKitScreen(data.screen ?? []) })) }));
|
|
154
|
+
}
|
|
155
|
+
function renderKitScreen(nodes) {
|
|
156
|
+
if (nodes.length === 1 && nodes[0]?.el === "screen") {
|
|
157
|
+
return renderNodes(nodes);
|
|
158
|
+
}
|
|
159
|
+
// `minHeight` (not `height`) so the screen fills the auto-height artboard floor
|
|
160
|
+
// but grows past it when content is tall, instead of locking to a fixed box.
|
|
161
|
+
return (_jsx(Screen, { pad: "calc(var(--pad) * 1.35)", style: { minHeight: "100%" }, children: renderNodes(nodes) }));
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
* The bare wireframe surface (no block section / title). Routes to the HTML
|
|
165
|
+
* mockup when `data.html` is present and a sanitizer is wired; otherwise renders
|
|
166
|
+
* the kit tree.
|
|
167
|
+
*/
|
|
168
|
+
function WireframeSurfaceView({ data, ctx, compact, }) {
|
|
169
|
+
if (isHtmlData(data)) {
|
|
170
|
+
return _jsx(HtmlArtboard, { data: data, ctx: ctx, compact: compact });
|
|
171
|
+
}
|
|
172
|
+
return _jsx(KitArtboard, { data: data, compact: compact });
|
|
173
|
+
}
|
|
174
|
+
/* -------------------------------------------------------------------------- */
|
|
175
|
+
/* Block Read / Edit */
|
|
176
|
+
/* -------------------------------------------------------------------------- */
|
|
177
|
+
/** Read-only renderer for a `wireframe` block. */
|
|
178
|
+
export function WireframeBlock({ data, blockId, title, summary, ctx, }) {
|
|
179
|
+
return (_jsxs("section", { className: "an-block plan-block an-wireframe", "data-block-id": blockId, children: [title && _jsx("div", { className: "an-block-label plan-block-label", children: title }), _jsx(WireframeSurfaceView, { data: data, ctx: ctx }), summary && _jsx("p", { className: "mt-5 text-plan-muted", children: summary })] }));
|
|
180
|
+
}
|
|
181
|
+
/**
|
|
182
|
+
* Editor for the `wireframe` block. The wireframe is canvas / agent-patch edited
|
|
183
|
+
* (it never calls `onChange`), so edit mode reuses the read surface — mirroring
|
|
184
|
+
* the plan `WireframeEditor`. The host document editor already wraps the registry
|
|
185
|
+
* edit path in a titled section, so this renders only the surface to avoid
|
|
186
|
+
* double-nesting.
|
|
187
|
+
*/
|
|
188
|
+
export function WireframeEditor({ data, ctx }) {
|
|
189
|
+
return _jsx(WireframeSurfaceView, { data: data, ctx: ctx });
|
|
190
|
+
}
|
|
191
|
+
/** Full client spec for the shared `wireframe` block (schema + MDX + Read/Edit). */
|
|
192
|
+
export const wireframeBlock = defineBlock({
|
|
193
|
+
type: "wireframe",
|
|
194
|
+
schema: wireframeSchema,
|
|
195
|
+
mdx: wireframeMdx,
|
|
196
|
+
Read: WireframeBlock,
|
|
197
|
+
Edit: WireframeEditor,
|
|
198
|
+
placement: ["block"],
|
|
199
|
+
editSurface: "inline",
|
|
200
|
+
label: "Wireframe",
|
|
201
|
+
description: "A sketch wireframe of one screen built from kit primitives (or an HTML mockup), rendered in a chosen surface frame (desktop/mobile/popover/panel/browser).",
|
|
202
|
+
// `surface` is the only required field; `screen` defaults to []. Start on the
|
|
203
|
+
// desktop surface with an empty screen so the canvas/agent can fill it in.
|
|
204
|
+
empty: () => ({ surface: "desktop", screen: [] }),
|
|
205
|
+
});
|
|
206
|
+
//# sourceMappingURL=wireframe.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wireframe.js","sourceRoot":"","sources":["../../../../src/client/blocks/library/wireframe.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,SAAS,EACT,KAAK,EACL,OAAO,EACP,MAAM,EACN,QAAQ,GAET,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAM1C,OAAO,EACL,eAAe,EACf,YAAY,GAGb,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,mBAAmB,EACnB,gBAAgB,EAChB,YAAY,EACZ,MAAM,EACN,WAAW,EACX,SAAS,EACT,iBAAiB,GAClB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,oBAAoB,EACpB,qBAAqB,EACrB,cAAc,GACf,MAAM,oBAAoB,CAAC;AA+C5B,MAAM,eAAe,GAA4C;IAC/D,6EAA6E;IAC7E,MAAM,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,EAAE,EAAE,EAAE;IAClD,OAAO,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,EAAE,EAAE,EAAE;IACnD,OAAO,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,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AAM,cAAc,GAAG,WAAW,CAAgB;IACvD,IAAI,EAAE,WAAW;IACjB,MAAM,EAAE,eAAe;IACvB,GAAG,EAAE,YAAY;IACjB,IAAI,EAAE,cAAc;IACpB,IAAI,EAAE,eAAe;IACrB,SAAS,EAAE,CAAC,OAAO,CAAC;IACpB,WAAW,EAAE,QAAQ;IACrB,KAAK,EAAE,WAAW;IAClB,WAAW,EACT,4JAA4J;IAC9J,8EAA8E;IAC9E,2EAA2E;IAC3E,KAAK,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC;CAClD,CAAC,CAAC","sourcesContent":["import {\n useEffect,\n useId,\n useMemo,\n useRef,\n useState,\n type ReactNode,\n} from \"react\";\nimport { defineBlock } from \"../types.js\";\nimport type {\n BlockReadProps,\n BlockEditProps,\n BlockRenderContext,\n} from \"../types.js\";\nimport {\n wireframeSchema,\n wireframeMdx,\n type WireframeData,\n type WireframeSurface,\n} from \"./wireframe.config.js\";\nimport {\n HTML_ROUGH_SELECTOR,\n KitConfigContext,\n RoughOverlay,\n Screen,\n renderNodes,\n useIsDark,\n useWireframeStyle,\n} from \"./wireframe-kit.js\";\nimport {\n sanitizeWireframeCss,\n sanitizeWireframeHtml,\n scopeDesignCss,\n} from \"./sanitize-html.js\";\n\n/**\n * Shared `wireframe` block — a hand-drawn low-fi mockup of one screen, rendered\n * from either a declarative kit tree (`data.screen`) or a self-contained HTML\n * mockup (`data.html`), inside a surface-locked frame (desktop/mobile/popover/\n * panel/browser) with a rough.js sketch overlay. Lives in core so any app can\n * register it (it originated in the plan template).\n *\n * DECOUPLING from the plan original:\n * - Theme: `useIsDark()` reads `document.documentElement.classList` instead of\n * `next-themes` (the MermaidBlock precedent), so core stays dependency-light.\n * - HTML sanitize: the HTML path runs `data.html`/`data.css` through the\n * app-injected `ctx.sanitizeHtml`. If no sanitizer is wired the HTML path is\n * skipped (kit tree or an empty frame renders) — core never injects unsanitized\n * author HTML.\n * - The plan-only prototype runtime, design-element selection, and legacy region\n * fallback are intentionally NOT ported; those are plan-canvas features, not\n * part of the document-block render. The kit element vocabulary, the `--wf-*`\n * token contract, and the `.plan-wf` / `[data-rough]` classes the overlay\n * measures are preserved exactly.\n *\n * The section carries the app-neutral `an-block` class plus the legacy\n * `plan-block` class so plan renders byte-identically while any other app gets\n * the theme-token treatment from core's `blocks.css`.\n *\n * The wireframe is canvas / agent-patch edited (node-addressable content patches\n * applied server-side), NOT schema-form edited in the browser — so `Edit` reuses\n * the same static render as `Read`, mirroring the plan `WireframeEditor`.\n */\n\ntype SurfacePreset = {\n width: number;\n /**\n * Floor height for the surface. The frame is AUTO-HEIGHT (content-driven): it\n * grows past this when content is tall and shrinks toward its content height\n * when content is short, but never collapses below this floor — so an empty or\n * near-empty frame still reads as that surface instead of a thin sliver. This\n * is a `min-height`, not a fixed `height`: it is the lower bound the old fixed\n * preset height used to also be the UPPER bound, which is what left a big empty\n * vertical band below short content (e.g. a header + one dropdown padded to a\n * tall fixed aspect).\n */\n minHeight: number;\n radius: number;\n};\n\nconst SURFACE_PRESETS: Record<WireframeSurface, SurfacePreset> = {\n // mobile keeps a tall floor: a phone frame reads as a phone even when short.\n mobile: { width: 300, minHeight: 360, radius: 30 },\n desktop: { width: 840, minHeight: 200, radius: 14 },\n browser: { width: 900, minHeight: 200, radius: 14 },\n popover: { width: 360, minHeight: 120, radius: 16 },\n panel: { width: 420, minHeight: 200, radius: 16 },\n};\n\nfunction isHtmlData(data: WireframeData): boolean {\n return typeof data.html === \"string\" && data.html.trim().length > 0;\n}\n\n/* -------------------------------------------------------------------------- */\n/* Shared frame shell: surface-locked WIDTH + auto (content-driven) height + */\n/* theme + rough overlay. The frame keeps each surface's footprint and chrome */\n/* but fits its content height instead of padding to a fixed aspect, so short */\n/* content yields a short frame and tall content grows. Pass `canvasSize` to */\n/* opt a fixed-aspect canvas artboard back into a hard pixel height. */\n/* -------------------------------------------------------------------------- */\n\nfunction ArtboardFrame({\n surface,\n compact,\n canvasSize,\n canvasWidth,\n skeleton,\n renderMode,\n roughOverlay = true,\n selector,\n caption,\n render,\n}: {\n surface: WireframeSurface;\n compact?: boolean;\n /**\n * Force a FIXED pixel height instead of the auto-height (content-driven)\n * default. Reserved for fixed-aspect canvas artboards (pan/zoom). Document-flow\n * wireframes — what recaps render — leave this unset so the frame fits content.\n */\n canvasSize?: number;\n canvasWidth?: number;\n skeleton?: boolean;\n renderMode?: \"wireframe\" | \"design\";\n roughOverlay?: boolean;\n selector: string;\n caption?: string;\n render: (ctx: {\n theme: \"light\" | \"dark\";\n style: \"sketchy\" | \"clean\";\n }) => ReactNode;\n}) {\n const ref = useRef<HTMLDivElement>(null);\n const fitRef = useRef<HTMLDivElement>(null);\n const isDark = useIsDark();\n const theme: \"light\" | \"dark\" = isDark ? \"dark\" : \"light\";\n const style = useWireframeStyle();\n const preset = SURFACE_PRESETS[surface] ?? SURFACE_PRESETS.desktop;\n const width = canvasWidth ?? preset.width;\n // AUTO-HEIGHT: with no explicit `canvasSize` the artboard height is driven by\n // its content (`height: auto`), floored at the surface's `minHeight` so a short\n // screen produces a short frame and a tall screen grows — instead of every\n // surface being padded to a fixed preset height that left a big empty band\n // below short content. A `canvasSize` (fixed-aspect canvas artboard) overrides\n // this with a hard pixel height.\n const fixedHeight = canvasSize;\n const minHeight = fixedHeight ?? preset.minHeight;\n const baseScale = compact ? Math.min(1, 320 / preset.width) : 1;\n const maxFrameWidth = compact ? preset.width * baseScale : width;\n const [fitScale, setFitScale] = useState(baseScale);\n // The scaled artboard is `transform: scale()`-ed, which does not change its\n // layout box, so the wrapper that reserves vertical space must track the\n // artboard's ACTUAL rendered height. With a fixed height that's known up front;\n // with auto-height we measure it.\n const [measuredHeight, setMeasuredHeight] = useState<number | null>(\n fixedHeight ?? null,\n );\n const designMode = renderMode === \"design\";\n const sketchy = !designMode && style === \"sketchy\" && !skeleton;\n const roughEnabled = sketchy && roughOverlay;\n const paper = designMode\n ? \"hsl(var(--background))\"\n : \"var(--plan-document, hsl(var(--background)))\";\n const frameBorder = skeleton\n ? \"var(--plan-placeholder-line, var(--plan-line, hsl(var(--border))))\"\n : \"var(--plan-line, hsl(var(--border)))\";\n\n useEffect(() => {\n const element = fitRef.current;\n if (!element) return;\n const measure = () => {\n const availableWidth = element.clientWidth;\n const nextScale =\n availableWidth > 0\n ? Math.min(baseScale, availableWidth / width)\n : baseScale;\n setFitScale((current) =>\n Math.abs(current - nextScale) < 0.001 ? current : nextScale,\n );\n };\n measure();\n const observer = new ResizeObserver(measure);\n observer.observe(element);\n return () => observer.disconnect();\n }, [baseScale, width]);\n\n // Track the auto-height artboard's rendered height so the (un-transformed)\n // wrapper reserves exactly the scaled space the frame occupies. Skipped when a\n // fixed height is supplied — there's nothing to measure.\n useEffect(() => {\n if (fixedHeight != null) return;\n const element = ref.current;\n if (!element) return;\n const measure = () => {\n const next = element.offsetHeight;\n setMeasuredHeight((current) =>\n current != null && Math.abs(current - next) < 0.5 ? current : next,\n );\n };\n measure();\n const observer = new ResizeObserver(measure);\n observer.observe(element);\n return () => observer.disconnect();\n }, [fixedHeight]);\n\n // Height the wrapper reserves: the measured (or fixed) artboard height scaled\n // by the fit factor. Falls back to the surface floor before the first measure\n // so SSR / first paint reserves a sensible box rather than collapsing.\n const reservedHeight = (measuredHeight ?? minHeight) * fitScale;\n\n return (\n <div\n ref={fitRef}\n className=\"plan-kit-wireframe\"\n style={{\n width: \"100%\",\n maxWidth: maxFrameWidth,\n }}\n >\n <div\n style={{\n width: \"100%\",\n maxWidth: maxFrameWidth,\n height: reservedHeight,\n marginInline: \"auto\",\n }}\n >\n <div\n ref={ref}\n className=\"plan-kit-artboard relative\"\n style={{\n width,\n // Auto-height by default (content-driven, floored at `minHeight`);\n // a fixed `canvasSize` locks the height for canvas artboards.\n ...(fixedHeight != null ? { height: fixedHeight } : { minHeight }),\n borderRadius: preset.radius,\n background: paper,\n boxShadow: \"0 10px 34px hsl(var(--foreground) / 0.10)\",\n ...(fitScale !== 1\n ? {\n transform: `scale(${fitScale})`,\n transformOrigin: \"top left\",\n }\n : {}),\n }}\n >\n {/* Content drives the artboard height in flow when auto-height; for a\n fixed height it's pinned to the box. Rounded corners clip overflow\n either way. */}\n <div\n className=\"overflow-hidden\"\n style={{\n borderRadius: preset.radius,\n ...(fixedHeight != null\n ? { position: \"absolute\", inset: 0 }\n : { minHeight }),\n }}\n >\n {render({ theme, style })}\n </div>\n {!roughEnabled && (\n <div\n className=\"pointer-events-none absolute inset-0\"\n style={{\n borderRadius: preset.radius,\n border: `1.5px solid ${frameBorder}`,\n }}\n />\n )}\n <RoughOverlay\n scopeRef={ref}\n enabled={roughEnabled}\n frameRadius={preset.radius}\n selector={selector}\n />\n </div>\n </div>\n {caption && (\n <p className=\"mt-2 text-center text-xs text-plan-muted\">{caption}</p>\n )}\n </div>\n );\n}\n\n/* -------------------------------------------------------------------------- */\n/* HTML artboard — author HTML, themed + roughened by the renderer. */\n/* -------------------------------------------------------------------------- */\n\nfunction HtmlArtboard({\n data,\n ctx,\n compact,\n}: {\n data: WireframeData;\n ctx: BlockRenderContext;\n compact?: boolean;\n}) {\n const renderMode = data.renderMode ?? \"wireframe\";\n // Sanitize author HTML/CSS at the render point (defense-in-depth against stored\n // XSS). Self-contained in core via the shared block sanitizer (DOM-based in the\n // browser, regex fallback on the server) so the HTML mockup path renders in any\n // app without the host wiring a sanitizer hook.\n const safeHtml = useMemo(() => sanitizeWireframeHtml(data.html), [data.html]);\n const scopeId = useId().replace(/[^a-zA-Z0-9_-]/g, \"\");\n const scopedCss = useMemo(() => {\n const safeCss = sanitizeWireframeCss(data.css);\n // Scope every author selector under this instance's artboard so global\n // selectors (body, *, .app-shell, :root) can't restyle/hide the host app.\n return safeCss\n ? scopeDesignCss(safeCss, `[data-plan-design-scope=\"${scopeId}\"]`)\n : \"\";\n }, [data.css, scopeId]);\n\n return (\n <ArtboardFrame\n surface={data.surface}\n compact={compact}\n skeleton={data.skeleton}\n renderMode={renderMode}\n selector={HTML_ROUGH_SELECTOR}\n caption={data.caption}\n render={({ theme, style }) => (\n <div\n className=\"plan-html-frame\"\n data-theme={theme}\n data-style={style}\n data-render-mode={renderMode}\n data-plan-design-scope={scopeId}\n data-skeleton={data.skeleton ? \"true\" : undefined}\n >\n {scopedCss && <style>{scopedCss}</style>}\n <div\n className=\"plan-html-frame-content\"\n dangerouslySetInnerHTML={{ __html: safeHtml }}\n />\n </div>\n )}\n />\n );\n}\n\n/* -------------------------------------------------------------------------- */\n/* Kit artboard — declarative kit tree. */\n/* -------------------------------------------------------------------------- */\n\nfunction KitArtboard({\n data,\n compact,\n}: {\n data: WireframeData;\n compact?: boolean;\n}) {\n return (\n <ArtboardFrame\n surface={data.surface}\n compact={compact}\n skeleton={data.skeleton}\n selector=\"[data-rough]\"\n caption={data.caption}\n render={({ theme, style }) => (\n <KitConfigContext.Provider\n value={{ skeleton: data.skeleton, theme, style }}\n >\n {renderKitScreen(data.screen ?? [])}\n </KitConfigContext.Provider>\n )}\n />\n );\n}\n\nfunction renderKitScreen(\n nodes: NonNullable<WireframeData[\"screen\"]>,\n): ReactNode {\n if (nodes.length === 1 && nodes[0]?.el === \"screen\") {\n return renderNodes(nodes);\n }\n // `minHeight` (not `height`) so the screen fills the auto-height artboard floor\n // but grows past it when content is tall, instead of locking to a fixed box.\n return (\n <Screen pad=\"calc(var(--pad) * 1.35)\" style={{ minHeight: \"100%\" }}>\n {renderNodes(nodes)}\n </Screen>\n );\n}\n\n/**\n * The bare wireframe surface (no block section / title). Routes to the HTML\n * mockup when `data.html` is present and a sanitizer is wired; otherwise renders\n * the kit tree.\n */\nfunction WireframeSurfaceView({\n data,\n ctx,\n compact,\n}: {\n data: WireframeData;\n ctx: BlockRenderContext;\n compact?: boolean;\n}) {\n if (isHtmlData(data)) {\n return <HtmlArtboard data={data} ctx={ctx} compact={compact} />;\n }\n return <KitArtboard data={data} compact={compact} />;\n}\n\n/* -------------------------------------------------------------------------- */\n/* Block Read / Edit */\n/* -------------------------------------------------------------------------- */\n\n/** Read-only renderer for a `wireframe` block. */\nexport function WireframeBlock({\n data,\n blockId,\n title,\n summary,\n ctx,\n}: BlockReadProps<WireframeData>) {\n return (\n <section\n className=\"an-block plan-block an-wireframe\"\n data-block-id={blockId}\n >\n {title && <div className=\"an-block-label plan-block-label\">{title}</div>}\n <WireframeSurfaceView data={data} ctx={ctx} />\n {summary && <p className=\"mt-5 text-plan-muted\">{summary}</p>}\n </section>\n );\n}\n\n/**\n * Editor for the `wireframe` block. The wireframe is canvas / agent-patch edited\n * (it never calls `onChange`), so edit mode reuses the read surface — mirroring\n * the plan `WireframeEditor`. The host document editor already wraps the registry\n * edit path in a titled section, so this renders only the surface to avoid\n * double-nesting.\n */\nexport function WireframeEditor({ data, ctx }: BlockEditProps<WireframeData>) {\n return <WireframeSurfaceView data={data} ctx={ctx} />;\n}\n\n/** Full client spec for the shared `wireframe` block (schema + MDX + Read/Edit). */\nexport const wireframeBlock = defineBlock<WireframeData>({\n type: \"wireframe\",\n schema: wireframeSchema,\n mdx: wireframeMdx,\n Read: WireframeBlock,\n Edit: WireframeEditor,\n placement: [\"block\"],\n editSurface: \"inline\",\n label: \"Wireframe\",\n description:\n \"A sketch wireframe of one screen built from kit primitives (or an HTML mockup), rendered in a chosen surface frame (desktop/mobile/popover/panel/browser).\",\n // `surface` is the only required field; `screen` defaults to []. Start on the\n // desktop surface with an empty screen so the canvas/agent can fill it in.\n empty: () => ({ surface: \"desktop\", screen: [] }),\n});\n"]}
|
|
@@ -9,6 +9,15 @@ import type { BlockSpec, BlockPlacement } from "./types.js";
|
|
|
9
9
|
export declare class BlockRegistry {
|
|
10
10
|
private byType;
|
|
11
11
|
private byTag;
|
|
12
|
+
/**
|
|
13
|
+
* Register (or re-register) a block spec. Last registration wins: re-registering
|
|
14
|
+
* an existing block `type` (or MDX `tag`) OVERRIDES the previous spec rather than
|
|
15
|
+
* throwing. This lets an app intentionally override a shared library block with
|
|
16
|
+
* its own variant, and makes module-level registration idempotent under dev HMR
|
|
17
|
+
* (which can re-run a registration module against a registry that survived the
|
|
18
|
+
* reload). When a re-registered type changes its MDX tag, the stale tag mapping
|
|
19
|
+
* is dropped so `getByTag` can't return an orphaned spec.
|
|
20
|
+
*/
|
|
12
21
|
register(spec: BlockSpec<any>): void;
|
|
13
22
|
get(type: string): BlockSpec<any> | undefined;
|
|
14
23
|
getByTag(tag: string): BlockSpec<any> | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../../src/client/blocks/registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAE5D;;;;;;GAMG;AACH,qBAAa,aAAa;IACxB,OAAO,CAAC,MAAM,CAAqC;IACnD,OAAO,CAAC,KAAK,CAAqC;IAElD,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC,GAAG,CAAC,GAAG,IAAI;
|
|
1
|
+
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../../src/client/blocks/registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAE5D;;;;;;GAMG;AACH,qBAAa,aAAa;IACxB,OAAO,CAAC,MAAM,CAAqC;IACnD,OAAO,CAAC,KAAK,CAAqC;IAElD;;;;;;;;OAQG;IACH,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC,GAAG,CAAC,GAAG,IAAI;IASpC,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,CAAC,GAAG,CAAC,GAAG,SAAS;IAI7C,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,CAAC,GAAG,CAAC,GAAG,SAAS;IAIjD,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO;IAI1B,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO;IAI5B,+EAA+E;IAC/E,IAAI,IAAI,GAAG,CAAC,MAAM,CAAC;IAInB;;;;;;OAMG;IACH,qBAAqB,IAAI,GAAG,CAAC,MAAM,CAAC;IAQpC,8DAA8D;IAC9D,IAAI,CAAC,SAAS,CAAC,EAAE,cAAc,GAAG,SAAS,CAAC,GAAG,CAAC,EAAE;CAMnD;AAED,0CAA0C;AAC1C,wBAAgB,cAAc,CAC5B,QAAQ,EAAE,aAAa,EACvB,KAAK,EAAE,SAAS,CAAC,GAAG,CAAC,EAAE,GACtB,IAAI,CAEN"}
|
|
@@ -8,12 +8,19 @@
|
|
|
8
8
|
export class BlockRegistry {
|
|
9
9
|
byType = new Map();
|
|
10
10
|
byTag = new Map();
|
|
11
|
+
/**
|
|
12
|
+
* Register (or re-register) a block spec. Last registration wins: re-registering
|
|
13
|
+
* an existing block `type` (or MDX `tag`) OVERRIDES the previous spec rather than
|
|
14
|
+
* throwing. This lets an app intentionally override a shared library block with
|
|
15
|
+
* its own variant, and makes module-level registration idempotent under dev HMR
|
|
16
|
+
* (which can re-run a registration module against a registry that survived the
|
|
17
|
+
* reload). When a re-registered type changes its MDX tag, the stale tag mapping
|
|
18
|
+
* is dropped so `getByTag` can't return an orphaned spec.
|
|
19
|
+
*/
|
|
11
20
|
register(spec) {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
if (this.byTag.has(spec.mdx.tag)) {
|
|
16
|
-
throw new Error(`Block MDX tag "${spec.mdx.tag}" is already registered.`);
|
|
21
|
+
const prevForType = this.byType.get(spec.type);
|
|
22
|
+
if (prevForType && prevForType.mdx.tag !== spec.mdx.tag) {
|
|
23
|
+
this.byTag.delete(prevForType.mdx.tag);
|
|
17
24
|
}
|
|
18
25
|
this.byType.set(spec.type, spec);
|
|
19
26
|
this.byTag.set(spec.mdx.tag, spec);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../../src/client/blocks/registry.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG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AAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAC7B,CAAC;IAED,+EAA+E;IAC/E,IAAI;QACF,OAAO,IAAI,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC;IACpC,CAAC;IAED;;;;;;OAMG;IACH,qBAAqB;QACnB,MAAM,KAAK,GAAG,IAAI,GAAG,EAAU,CAAC;QAChC,KAAK,MAAM,IAAI,IAAI,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,EAAE,CAAC;YACxC,IAAI,IAAI,CAAC,gBAAgB;gBAAE,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAClD,CAAC;QACD,OAAO,KAAK,CAAC;IACf,CAAC;IAED,8DAA8D;IAC9D,IAAI,CAAC,SAA0B;QAC7B,MAAM,GAAG,GAAG,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC;QACtC,OAAO,SAAS;YACd,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;YAC1D,CAAC,CAAC,GAAG,CAAC;IACV,CAAC;CACF;AAED,0CAA0C;AAC1C,MAAM,UAAU,cAAc,CAC5B,QAAuB,EACvB,KAAuB;IAEvB,KAAK,MAAM,IAAI,IAAI,KAAK;QAAE,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;AACpD,CAAC","sourcesContent":["import type { BlockSpec, BlockPlacement } from \"./types.js\";\n\n/**\n * In-memory block registry. Holds two lookups: by runtime `type` (render +\n * serialize side) and by MDX `tag` (parse side). The registry is a plain object\n * usable both inside React (via the context provider) and outside it (the\n * server MDX serializer/parser, agent schema export) — mirroring how the legacy\n * `BLOCK_COMPONENTS` set and `serializeBlock`/`parseBlock` are plain functions.\n */\nexport class BlockRegistry {\n private byType = new Map<string, BlockSpec<any>>();\n private byTag = new Map<string, BlockSpec<any>>();\n\n /**\n * Register (or re-register) a block spec. Last registration wins: re-registering\n * an existing block `type` (or MDX `tag`) OVERRIDES the previous spec rather than\n * throwing. This lets an app intentionally override a shared library block with\n * its own variant, and makes module-level registration idempotent under dev HMR\n * (which can re-run a registration module against a registry that survived the\n * reload). When a re-registered type changes its MDX tag, the stale tag mapping\n * is dropped so `getByTag` can't return an orphaned spec.\n */\n register(spec: BlockSpec<any>): void {\n const prevForType = this.byType.get(spec.type);\n if (prevForType && prevForType.mdx.tag !== spec.mdx.tag) {\n this.byTag.delete(prevForType.mdx.tag);\n }\n this.byType.set(spec.type, spec);\n this.byTag.set(spec.mdx.tag, spec);\n }\n\n get(type: string): BlockSpec<any> | undefined {\n return this.byType.get(type);\n }\n\n getByTag(tag: string): BlockSpec<any> | undefined {\n return this.byTag.get(tag);\n }\n\n has(type: string): boolean {\n return this.byType.has(type);\n }\n\n hasTag(tag: string): boolean {\n return this.byTag.has(tag);\n }\n\n /** All registered MDX tags — replaces the hardcoded `BLOCK_COMPONENTS` set. */\n tags(): Set<string> {\n return new Set(this.byTag.keys());\n }\n\n /**\n * The set of registered block `type`s whose specs declare\n * `notionCompatible: true` — i.e. they round-trip to Notion-Flavored Markdown\n * and may sync to Notion. Apps use this as the registry-backed part of their\n * Notion gating allowlist; prose-only NFM analogs that are not registry atoms\n * (rich-text, callout) are NOT in here — apps union those in separately.\n */\n notionCompatibleTypes(): Set<string> {\n const types = new Set<string>();\n for (const spec of this.byType.values()) {\n if (spec.notionCompatible) types.add(spec.type);\n }\n return types;\n }\n\n /** All registered specs, optionally filtered by placement. */\n list(placement?: BlockPlacement): BlockSpec<any>[] {\n const all = [...this.byType.values()];\n return placement\n ? all.filter((spec) => spec.placement.includes(placement))\n : all;\n }\n}\n\n/** Register a batch of specs in order. */\nexport function registerBlocks(\n registry: BlockRegistry,\n specs: BlockSpec<any>[],\n): void {\n for (const spec of specs) registry.register(spec);\n}\n"]}
|
|
@@ -21,6 +21,7 @@ export { codeTabsSchema, codeTabsMdx, type CodeTabsData, type CodeTabsTab, } fro
|
|
|
21
21
|
export { htmlSchema, htmlMdx, type HtmlBlockData, } from "./library/html.config.js";
|
|
22
22
|
export { tabsSchema, tabsMdx, type TabsData, type TabsOrientation, type TabsTab, } from "./library/tabs.config.js";
|
|
23
23
|
export { columnsSchema, columnsMdx, type ColumnsData, type ColumnsColumn, } from "./library/columns.config.js";
|
|
24
|
+
export { calloutSchema, calloutMdx, CALLOUT_TONES, type CalloutData, type CalloutTone, } from "./library/callout.config.js";
|
|
24
25
|
export { mermaidSchema, mermaidMdx, type MermaidData, } from "./library/mermaid.config.js";
|
|
25
26
|
export { apiEndpointSchema, apiEndpointMdx, API_ENDPOINT_METHODS, API_PARAM_LOCATIONS, type ApiEndpointData, type ApiEndpointMethod, type ApiEndpointParam, type ApiEndpointRequest, type ApiEndpointResponse, type ApiParamLocation, } from "./library/api-endpoint.config.js";
|
|
26
27
|
export { dataModelSchema, dataModelMdx, DATA_MODEL_RELATION_KINDS, type DataModelData, type DataModelEntity, type DataModelField, type DataModelRelation, type DataModelRelationKind, } from "./library/data-model.config.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../../src/client/blocks/server.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EACL,WAAW,EACX,KAAK,SAAS,EACd,KAAK,cAAc,EACnB,KAAK,cAAc,EACnB,KAAK,eAAe,EACpB,KAAK,YAAY,EACjB,KAAK,WAAW,GACjB,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAE9D,OAAO,EACL,QAAQ,EACR,QAAQ,EACR,UAAU,EACV,KAAK,SAAS,EACd,KAAK,eAAe,GACrB,MAAM,6BAA6B,CAAC;AAErC,OAAO,EACL,IAAI,EACJ,UAAU,EACV,cAAc,EACd,cAAc,EACd,gBAAg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KAAK,cAAc,EACnB,KAAK,iBAAiB,EACtB,KAAK,qBAAqB,GAC3B,MAAM,gCAAgC,CAAC;AACxC,OAAO,EACL,UAAU,EACV,OAAO,EACP,KAAK,QAAQ,EACb,KAAK,QAAQ,GACd,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,cAAc,EACd,WAAW,EACX,iBAAiB,EACjB,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,cAAc,GACpB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,kBAAkB,EAClB,eAAe,EACf,KAAK,gBAAgB,GACtB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EACL,mBAAmB,EACnB,gBAAgB,EAChB,KAAK,iBAAiB,EACtB,KAAK,uBAAuB,GAC7B,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EACL,iBAAiB,EACjB,cAAc,EACd,KAAK,eAAe,GACrB,MAAM,kCAAkC,CAAC"}
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../../src/client/blocks/server.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EACL,WAAW,EACX,KAAK,SAAS,EACd,KAAK,cAAc,EACnB,KAAK,cAAc,EACnB,KAAK,eAAe,EACpB,KAAK,YAAY,EACjB,KAAK,WAAW,GACjB,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAE9D,OAAO,EACL,QAAQ,EACR,QAAQ,EACR,UAAU,EACV,KAAK,SAAS,EACd,KAAK,eAAe,GACrB,MAAM,6BAA6B,CAAC;AAErC,OAAO,EACL,IAAI,EACJ,UAAU,EACV,cAAc,EACd,cAAc,EACd,gBAAgB,EAChB,kBAAkB,EAClB,cAAc,EACd,KAAK,UAAU,EACf,KAAK,WAAW,EAChB,KAAK,iBAAiB,EACtB,KAAK,eAAe,GACrB,MAAM,UAAU,CAAC;AAElB,OAAO,EACL,sBAAsB,EACtB,8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,GAC3B,MAAM,gCAAgC,CAAC;AACxC,OAAO,EACL,UAAU,EACV,OAAO,EACP,KAAK,QAAQ,EACb,KAAK,QAAQ,GACd,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,cAAc,EACd,WAAW,EACX,iBAAiB,EACjB,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,cAAc,GACpB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,kBAAkB,EAClB,eAAe,EACf,KAAK,gBAAgB,GACtB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EACL,mBAAmB,EACnB,gBAAgB,EAChB,KAAK,iBAAiB,EACtB,KAAK,uBAAuB,GAC7B,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EACL,iBAAiB,EACjB,cAAc,EACd,KAAK,eAAe,GACrB,MAAM,kCAAkC,CAAC"}
|
|
@@ -28,6 +28,7 @@ export { codeTabsSchema, codeTabsMdx, } from "./library/code-tabs.config.js";
|
|
|
28
28
|
export { htmlSchema, htmlMdx, } from "./library/html.config.js";
|
|
29
29
|
export { tabsSchema, tabsMdx, } from "./library/tabs.config.js";
|
|
30
30
|
export { columnsSchema, columnsMdx, } from "./library/columns.config.js";
|
|
31
|
+
export { calloutSchema, calloutMdx, CALLOUT_TONES, } from "./library/callout.config.js";
|
|
31
32
|
// Dev-doc block library — React-free schema + MDX config only. The React
|
|
32
33
|
// `Read`/`Edit` live in the matching `./library/<Name>Block.tsx` (imported from
|
|
33
34
|
// the full `@agent-native/core/blocks` entry), never from here.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.js","sourceRoot":"","sources":["../../../src/client/blocks/server.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EACL,WAAW,GAOZ,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAE9D,OAAO,EACL,QAAQ,EACR,QAAQ,EACR,UAAU,GAGX,MA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mBAAmB,EACnB,gBAAgB,GAGjB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EACL,iBAAiB,EACjB,cAAc,GAEf,MAAM,kCAAkC,CAAC","sourcesContent":["/**\n * `@agent-native/core/blocks/server` — the React-free subset of the block\n * registry for server / agent code (MDX serialize/parse, the registry, schema\n * introspection, the `markdown()` helper, agent schema export). Importing this\n * entry never pulls React into the server bundle.\n *\n * A `BlockSpec` carries React (`Read`/`Edit`) and pure (`schema`/`mdx`) parts in\n * the same object; the server path only touches `spec.schema` / `spec.mdx`. The\n * app's registry module is shared by browser and server, but the server only\n * ever calls these React-free functions on it.\n */\n\nexport {\n defineBlock,\n type BlockSpec,\n type BlockPlacement,\n type BlockMdxConfig,\n type BlockAttrReader,\n type MdxAttrValue,\n type NestedBlock,\n} from \"./types.js\";\n\nexport { BlockRegistry, registerBlocks } from \"./registry.js\";\n\nexport {\n markdown,\n richtext,\n introspect,\n type FieldKind,\n type FieldDescriptor,\n} from \"./schema-form/introspect.js\";\n\nexport {\n prop,\n escapeAttr,\n jsonExpression,\n attributeValue,\n createAttrReader,\n serializeSpecBlock,\n parseSpecBlock,\n type MdxJsxNode,\n type MdxAttrNode,\n type SerializableBlock,\n type ParsedBlockBase,\n} from \"./mdx.js\";\n\nexport {\n describeBlocksForAgent,\n renderBlockVocabularyReference,\n type BlockAgentDoc,\n} from \"./agent.js\";\n\n// Standard library registration (React-free). Server / shared registries call\n// `registerLibraryBlockConfigs(registry)` to register the whole standard library\n// as `Read: () => null` config stubs in one place, then add their app-specific\n// block configs on top. `libraryBlockConfigs` is the underlying ordered array.\nexport {\n libraryBlockConfigs,\n registerLibraryBlockConfigs,\n type LibraryBlockConfigOverrides,\n} from \"./library/server-specs.js\";\n\n// Standard block library — React-free schema + MDX config only. The React\n// `Read`/`Edit` live in `./library/checklist.tsx` (imported from the full\n// `@agent-native/core/blocks` entry), never from here.\nexport {\n checklistSchema,\n checklistMdx,\n type ChecklistData,\n type ChecklistItem,\n} from \"./library/checklist.config.js\";\nexport {\n tableSchema,\n tableMdx,\n type TableData,\n} from \"./library/table.config.js\";\nexport {\n codeTabsSchema,\n codeTabsMdx,\n type CodeTabsData,\n type CodeTabsTab,\n} from \"./library/code-tabs.config.js\";\nexport {\n htmlSchema,\n htmlMdx,\n type HtmlBlockData,\n} from \"./library/html.config.js\";\nexport {\n tabsSchema,\n tabsMdx,\n type TabsData,\n type TabsOrientation,\n type TabsTab,\n} from \"./library/tabs.config.js\";\nexport {\n columnsSchema,\n columnsMdx,\n type ColumnsData,\n type ColumnsColumn,\n} from \"./library/columns.config.js\";\n\n// Dev-doc block library — React-free schema + MDX config only. The React\n// `Read`/`Edit` live in the matching `./library/<Name>Block.tsx` (imported from\n// the full `@agent-native/core/blocks` entry), never from here.\nexport {\n mermaidSchema,\n mermaidMdx,\n type MermaidData,\n} from \"./library/mermaid.config.js\";\nexport {\n apiEndpointSchema,\n apiEndpointMdx,\n API_ENDPOINT_METHODS,\n API_PARAM_LOCATIONS,\n type ApiEndpointData,\n type ApiEndpointMethod,\n type ApiEndpointParam,\n type ApiEndpointRequest,\n type ApiEndpointResponse,\n type ApiParamLocation,\n} from \"./library/api-endpoint.config.js\";\nexport {\n dataModelSchema,\n dataModelMdx,\n DATA_MODEL_RELATION_KINDS,\n type DataModelData,\n type DataModelEntity,\n type DataModelField,\n type DataModelRelation,\n type DataModelRelationKind,\n} from \"./library/data-model.config.js\";\nexport {\n diffSchema,\n diffMdx,\n type DiffData,\n type DiffMode,\n} from \"./library/diff.config.js\";\nexport {\n fileTreeSchema,\n fileTreeMdx,\n FILE_TREE_CHANGES,\n type FileTreeData,\n type FileTreeEntry,\n type FileTreeChange,\n} from \"./library/file-tree.config.js\";\nexport {\n jsonExplorerSchema,\n jsonExplorerMdx,\n type JsonExplorerData,\n} from \"./library/json-explorer.config.js\";\nexport {\n annotatedCodeSchema,\n annotatedCodeMdx,\n type AnnotatedCodeData,\n type AnnotatedCodeAnnotation,\n} from \"./library/annotated-code.config.js\";\nexport {\n openApiSpecSchema,\n openApiSpecMdx,\n type OpenApiSpecData,\n} from \"./library/openapi-spec.config.js\";\n"]}
|
|
1
|
+
{"version":3,"file":"server.js","sourceRoot":"","sources":["../../../src/client/blocks/server.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EACL,WAAW,GAOZ,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAE9D,OAAO,EACL,QAAQ,EACR,QAAQ,EACR,UAAU,GAGX,MAAM,6BAA6B,CAAC;AAErC,OAAO,EACL,IAAI,EACJ,UAAU,EACV,cAAc,EACd,cAAc,EACd,gBAAgB,EAChB,kBAAkB,EAClB,cAAc,GAKf,MAAM,UAAU,CAAC;AAElB,OAAO,EACL,sBAAsB,EACtB,8BAA8B,GAE/B,MAAM,YAAY,CAAC;AAEpB,8EAA8E;AAC9E,iFAAiF;AACjF,+EAA+E;AAC/E,+EAA+E;AAC/E,OAAO,EACL,mBAAmB,EACnB,2BAA2B,GAE5B,MAAM,2BAA2B,CAAC;AAEnC,0EAA0E;AAC1E,0EAA0E;AAC1E,uDAAuD;AACvD,OAAO,EACL,eAAe,EACf,YAAY,GAGb,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,WAAW,EACX,QAAQ,GAET,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,cAAc,EACd,WAAW,GAGZ,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,UAAU,EACV,OAAO,GAER,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,UAAU,EACV,OAAO,GAIR,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,aAAa,EACb,UAAU,GAGX,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,aAAa,EACb,UAAU,EACV,aAAa,GAGd,MAAM,6BAA6B,CAAC;AAErC,yEAAyE;AACzE,gFAAgF;AAChF,gEAAgE;AAChE,OAAO,EACL,aAAa,EACb,UAAU,GAEX,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,iBAAiB,EACjB,cAAc,EACd,oBAAoB,EACpB,mBAAmB,GAOpB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EACL,eAAe,EACf,YAAY,EACZ,yBAAyB,GAM1B,MAAM,gCAAgC,CAAC;AACxC,OAAO,EACL,UAAU,EACV,OAAO,GAGR,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,cAAc,EACd,WAAW,EACX,iBAAiB,GAIlB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,kBAAkB,EAClB,eAAe,GAEhB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EACL,mBAAmB,EACnB,gBAAgB,GAGjB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EACL,iBAAiB,EACjB,cAAc,GAEf,MAAM,kCAAkC,CAAC","sourcesContent":["/**\n * `@agent-native/core/blocks/server` — the React-free subset of the block\n * registry for server / agent code (MDX serialize/parse, the registry, schema\n * introspection, the `markdown()` helper, agent schema export). Importing this\n * entry never pulls React into the server bundle.\n *\n * A `BlockSpec` carries React (`Read`/`Edit`) and pure (`schema`/`mdx`) parts in\n * the same object; the server path only touches `spec.schema` / `spec.mdx`. The\n * app's registry module is shared by browser and server, but the server only\n * ever calls these React-free functions on it.\n */\n\nexport {\n defineBlock,\n type BlockSpec,\n type BlockPlacement,\n type BlockMdxConfig,\n type BlockAttrReader,\n type MdxAttrValue,\n type NestedBlock,\n} from \"./types.js\";\n\nexport { BlockRegistry, registerBlocks } from \"./registry.js\";\n\nexport {\n markdown,\n richtext,\n introspect,\n type FieldKind,\n type FieldDescriptor,\n} from \"./schema-form/introspect.js\";\n\nexport {\n prop,\n escapeAttr,\n jsonExpression,\n attributeValue,\n createAttrReader,\n serializeSpecBlock,\n parseSpecBlock,\n type MdxJsxNode,\n type MdxAttrNode,\n type SerializableBlock,\n type ParsedBlockBase,\n} from \"./mdx.js\";\n\nexport {\n describeBlocksForAgent,\n renderBlockVocabularyReference,\n type BlockAgentDoc,\n} from \"./agent.js\";\n\n// Standard library registration (React-free). Server / shared registries call\n// `registerLibraryBlockConfigs(registry)` to register the whole standard library\n// as `Read: () => null` config stubs in one place, then add their app-specific\n// block configs on top. `libraryBlockConfigs` is the underlying ordered array.\nexport {\n libraryBlockConfigs,\n registerLibraryBlockConfigs,\n type LibraryBlockConfigOverrides,\n} from \"./library/server-specs.js\";\n\n// Standard block library — React-free schema + MDX config only. The React\n// `Read`/`Edit` live in `./library/checklist.tsx` (imported from the full\n// `@agent-native/core/blocks` entry), never from here.\nexport {\n checklistSchema,\n checklistMdx,\n type ChecklistData,\n type ChecklistItem,\n} from \"./library/checklist.config.js\";\nexport {\n tableSchema,\n tableMdx,\n type TableData,\n} from \"./library/table.config.js\";\nexport {\n codeTabsSchema,\n codeTabsMdx,\n type CodeTabsData,\n type CodeTabsTab,\n} from \"./library/code-tabs.config.js\";\nexport {\n htmlSchema,\n htmlMdx,\n type HtmlBlockData,\n} from \"./library/html.config.js\";\nexport {\n tabsSchema,\n tabsMdx,\n type TabsData,\n type TabsOrientation,\n type TabsTab,\n} from \"./library/tabs.config.js\";\nexport {\n columnsSchema,\n columnsMdx,\n type ColumnsData,\n type ColumnsColumn,\n} from \"./library/columns.config.js\";\nexport {\n calloutSchema,\n calloutMdx,\n CALLOUT_TONES,\n type CalloutData,\n type CalloutTone,\n} from \"./library/callout.config.js\";\n\n// Dev-doc block library — React-free schema + MDX config only. The React\n// `Read`/`Edit` live in the matching `./library/<Name>Block.tsx` (imported from\n// the full `@agent-native/core/blocks` entry), never from here.\nexport {\n mermaidSchema,\n mermaidMdx,\n type MermaidData,\n} from \"./library/mermaid.config.js\";\nexport {\n apiEndpointSchema,\n apiEndpointMdx,\n API_ENDPOINT_METHODS,\n API_PARAM_LOCATIONS,\n type ApiEndpointData,\n type ApiEndpointMethod,\n type ApiEndpointParam,\n type ApiEndpointRequest,\n type ApiEndpointResponse,\n type ApiParamLocation,\n} from \"./library/api-endpoint.config.js\";\nexport {\n dataModelSchema,\n dataModelMdx,\n DATA_MODEL_RELATION_KINDS,\n type DataModelData,\n type DataModelEntity,\n type DataModelField,\n type DataModelRelation,\n type DataModelRelationKind,\n} from \"./library/data-model.config.js\";\nexport {\n diffSchema,\n diffMdx,\n type DiffData,\n type DiffMode,\n} from \"./library/diff.config.js\";\nexport {\n fileTreeSchema,\n fileTreeMdx,\n FILE_TREE_CHANGES,\n type FileTreeData,\n type FileTreeEntry,\n type FileTreeChange,\n} from \"./library/file-tree.config.js\";\nexport {\n jsonExplorerSchema,\n jsonExplorerMdx,\n type JsonExplorerData,\n} from \"./library/json-explorer.config.js\";\nexport {\n annotatedCodeSchema,\n annotatedCodeMdx,\n type AnnotatedCodeData,\n type AnnotatedCodeAnnotation,\n} from \"./library/annotated-code.config.js\";\nexport {\n openApiSpecSchema,\n openApiSpecMdx,\n type OpenApiSpecData,\n} from \"./library/openapi-spec.config.js\";\n"]}
|
|
@@ -120,7 +120,7 @@ export interface BlockRenderContext {
|
|
|
120
120
|
ariaLabel?: string;
|
|
121
121
|
}) => React.ReactNode;
|
|
122
122
|
/**
|
|
123
|
-
* Render an app-owned "
|
|
123
|
+
* Render an app-owned edit-by-prompt affordance ("Describe a change…") for a focused/editable block
|
|
124
124
|
* field. Core block editors pass the current field value and nearby companion
|
|
125
125
|
* fields; the host app decides how to collect the prompt and route it to the
|
|
126
126
|
* agent sidebar. This keeps reusable core blocks from importing app-specific
|
|
@@ -179,13 +179,21 @@ export interface BlockRenderContext {
|
|
|
179
179
|
onOpenChange?: (open: boolean) => void;
|
|
180
180
|
trigger: React.ReactNode;
|
|
181
181
|
children: React.ReactNode;
|
|
182
|
-
/** Metadata for host-provided contextual controls such as
|
|
182
|
+
/** Metadata for host-provided contextual controls such as the edit-by-prompt CTA. */
|
|
183
183
|
blockId?: string;
|
|
184
184
|
blockType?: string;
|
|
185
185
|
blockTitle?: string;
|
|
186
186
|
blockSummary?: string;
|
|
187
187
|
blockData?: unknown;
|
|
188
188
|
}) => React.ReactNode;
|
|
189
|
+
/**
|
|
190
|
+
* Submit a respondent's answers from a `question-form` / `visual-questions`
|
|
191
|
+
* block back to the host. The app decides how to route the summary (e.g. send
|
|
192
|
+
* to the inline agent, copy to clipboard). Core blocks call this through the
|
|
193
|
+
* context so they never import app-specific submit wiring; omit it and the
|
|
194
|
+
* block degrades to a no-op submit.
|
|
195
|
+
*/
|
|
196
|
+
onQuestionFormSubmit?: (summary: string) => void;
|
|
189
197
|
}
|
|
190
198
|
export interface BlockAiFieldActionProps {
|
|
191
199
|
blockId: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/client/blocks/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AAEnC;;;;;;;;;;;;;GAaG;AAEH,iDAAiD;AACjD,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,QAAQ,CAAC;AAEhD;;;GAGG;AACH,MAAM,MAAM,YAAY,GACpB,MAAM,GACN,MAAM,GACN,OAAO,GACP,OAAO,EAAE,GACT,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAE5B;;;;;GAKG;AACH,MAAM,WAAW,eAAe;IAC9B,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;IACzC,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;IACzC,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;IACxC,KAAK,CAAC,CAAC,GAAG,OAAO,EAAE,IAAI,EAAE,MAAM,GAAG,CAAC,EAAE,GAAG,SAAS,CAAC;IAClD,MAAM,CAAC,CAAC,GAAG,OAAO,EAAE,IAAI,EAAE,MAAM,GAAG,CAAC,GAAG,SAAS,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