@agent-native/core 0.49.16 → 0.49.18

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.
Files changed (50) hide show
  1. package/dist/action.d.ts +8 -0
  2. package/dist/action.d.ts.map +1 -1
  3. package/dist/action.js +3 -0
  4. package/dist/action.js.map +1 -1
  5. package/dist/agent/production-agent.d.ts +4 -0
  6. package/dist/agent/production-agent.d.ts.map +1 -1
  7. package/dist/agent/production-agent.js.map +1 -1
  8. package/dist/cli/skills.d.ts +3 -3
  9. package/dist/cli/skills.d.ts.map +1 -1
  10. package/dist/cli/skills.js +25 -12
  11. package/dist/cli/skills.js.map +1 -1
  12. package/dist/client/blocks/index.d.ts +1 -0
  13. package/dist/client/blocks/index.d.ts.map +1 -1
  14. package/dist/client/blocks/index.js +1 -0
  15. package/dist/client/blocks/index.js.map +1 -1
  16. package/dist/client/blocks/library/wireframe-icons.d.ts +2 -0
  17. package/dist/client/blocks/library/wireframe-icons.d.ts.map +1 -0
  18. package/dist/client/blocks/library/wireframe-icons.js +175 -0
  19. package/dist/client/blocks/library/wireframe-icons.js.map +1 -0
  20. package/dist/client/blocks/library/wireframe.d.ts.map +1 -1
  21. package/dist/client/blocks/library/wireframe.js +2 -1
  22. package/dist/client/blocks/library/wireframe.js.map +1 -1
  23. package/dist/extensions/web-search-tool.d.ts +28 -7
  24. package/dist/extensions/web-search-tool.d.ts.map +1 -1
  25. package/dist/extensions/web-search-tool.js +89 -6
  26. package/dist/extensions/web-search-tool.js.map +1 -1
  27. package/dist/onboarding/default-steps.js +1 -1
  28. package/dist/onboarding/default-steps.js.map +1 -1
  29. package/dist/provider-api/actions/query-staged-dataset.d.ts +1 -1
  30. package/dist/secrets/register-framework-secrets.js +4 -4
  31. package/dist/secrets/register-framework-secrets.js.map +1 -1
  32. package/dist/server/action-discovery.d.ts.map +1 -1
  33. package/dist/server/action-discovery.js +3 -0
  34. package/dist/server/action-discovery.js.map +1 -1
  35. package/dist/server/action-routes.d.ts.map +1 -1
  36. package/dist/server/action-routes.js +34 -6
  37. package/dist/server/action-routes.js.map +1 -1
  38. package/dist/server/agent-chat-plugin.d.ts.map +1 -1
  39. package/dist/server/agent-chat-plugin.js +6 -4
  40. package/dist/server/agent-chat-plugin.js.map +1 -1
  41. package/dist/server/credential-provider.d.ts +5 -0
  42. package/dist/server/credential-provider.d.ts.map +1 -1
  43. package/dist/server/credential-provider.js +8 -0
  44. package/dist/server/credential-provider.js.map +1 -1
  45. package/dist/server/index.d.ts +1 -1
  46. package/dist/server/index.d.ts.map +1 -1
  47. package/dist/server/index.js +1 -1
  48. package/dist/server/index.js.map +1 -1
  49. package/dist/styles/blocks.css +20 -0
  50. package/package.json +1 -1
@@ -45,6 +45,7 @@ export { diagramSchema, diagramMdx, type DiagramData, type DiagramNode, type Dia
45
45
  export { wireframeBlock, WireframeBlock, WireframeEditor, } from "./library/wireframe.js";
46
46
  export { wireframeSchema, wireframeMdx, createStableWireframeNodeId, WIREFRAME_SURFACES, WIREFRAME_EL_NAMES, type WireframeData, type WireframeNode, type WireframeElName, type WireframeTone, type WireframeSurface, type WireframeRenderMode, } from "./library/wireframe.config.js";
47
47
  export { Screen, renderNode, renderNodes, hasRenderer, NODE_REGISTRY, KitConfigContext, RoughOverlay, HTML_ROUGH_SELECTOR, useWireframeStyle, setWireframeStyle, toggleWireframeStyle, useIsDark, type WireframeStyle, } from "./library/wireframe-kit.js";
48
+ export { renderWireframeIconHtml } from "./library/wireframe-icons.js";
48
49
  export { MermaidRead, MermaidEdit } from "./library/MermaidBlock.js";
49
50
  export { mermaidSchema, mermaidMdx, type MermaidData, } from "./library/mermaid.config.js";
50
51
  export { ApiEndpointRead, ApiEndpointEdit, } from "./library/ApiEndpointBlock.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/client/blocks/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EACL,WAAW,EACX,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AAC1C,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC3E,OAAO,EACL,eAAe,EACf,YAAY,EACZ,yBAAyB,EACzB,KAAK,aAAa,EAClB,KAAK,eAAe,EACpB,KAAK,cAAc,EACnB,KAAK,iBAAiB,EACtB,KAAK,qBAAqB,GAC3B,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EACL,UAAU,EACV,OAAO,EACP,KAAK,QAAQ,EACb,KAAK,QAAQ,GACd,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AACxE,OAAO,EACL,cAAc,EACd,WAAW,EACX,iBAAiB,EACjB,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,cAAc,GACpB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,gBAAgB,EAChB,gBAAgB,GACjB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EACL,kBAAkB,EAClB,eAAe,EACf,KAAK,gBAAgB,GACtB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EACL,iBAAiB,EACjB,iBAAiB,GAClB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EACL,mBAAmB,EACnB,gBAAgB,EAChB,KAAK,iBAAiB,EACtB,KAAK,uBAAuB,GAC7B,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EACL,eAAe,EACf,eAAe,GAChB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,iBAAiB,EACjB,cAAc,EACd,KAAK,eAAe,GACrB,MAAM,kCAAkC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/client/blocks/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EACL,WAAW,EACX,KAAK,SAAS,EACd,KAAK,cAAc,EACnB,KAAK,cAAc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,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC3E,OAAO,EACL,eAAe,EACf,YAAY,EACZ,yBAAyB,EACzB,KAAK,aAAa,EAClB,KAAK,eAAe,EACpB,KAAK,cAAc,EACnB,KAAK,iBAAiB,EACtB,KAAK,qBAAqB,GAC3B,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EACL,UAAU,EACV,OAAO,EACP,KAAK,QAAQ,EACb,KAAK,QAAQ,GACd,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AACxE,OAAO,EACL,cAAc,EACd,WAAW,EACX,iBAAiB,EACjB,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,cAAc,GACpB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,gBAAgB,EAChB,gBAAgB,GACjB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EACL,kBAAkB,EAClB,eAAe,EACf,KAAK,gBAAgB,GACtB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EACL,iBAAiB,EACjB,iBAAiB,GAClB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EACL,mBAAmB,EACnB,gBAAgB,EAChB,KAAK,iBAAiB,EACtB,KAAK,uBAAuB,GAC7B,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EACL,eAAe,EACf,eAAe,GAChB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,iBAAiB,EACjB,cAAc,EACd,KAAK,eAAe,GACrB,MAAM,kCAAkC,CAAC"}
@@ -57,6 +57,7 @@ export { diagramSchema, diagramMdx, } from "./library/diagram.config.js";
57
57
  export { wireframeBlock, WireframeBlock, WireframeEditor, } from "./library/wireframe.js";
58
58
  export { wireframeSchema, wireframeMdx, createStableWireframeNodeId, WIREFRAME_SURFACES, WIREFRAME_EL_NAMES, } from "./library/wireframe.config.js";
59
59
  export { Screen, renderNode, renderNodes, hasRenderer, NODE_REGISTRY, KitConfigContext, RoughOverlay, HTML_ROUGH_SELECTOR, useWireframeStyle, setWireframeStyle, toggleWireframeStyle, useIsDark, } from "./library/wireframe-kit.js";
60
+ export { renderWireframeIconHtml } from "./library/wireframe-icons.js";
60
61
  // Dev-doc block library (React `Read`/`Edit` renderers + their React-free
61
62
  // schema/MDX config). Apps register these alongside their own blocks, supplying
62
63
  // app-specific spec metadata (label/description/editSurface/empty) via
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/client/blocks/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,oBAAoB;AACpB,OAAO,EACL,WAAW,GAcZ,MAAM,YAAY,CAAC;AAEpB,0BAA0B;AAC1B,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC9D,OAAO,EACL,qBAAqB,EACrB,gBAAgB,EAChB,wBAAwB,GACzB,MAAM,eAAe,CAAC;AAEvB,YAAY;AACZ,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAC7D,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAE3D,sBAAsB;AACtB,OAAO,EACL,QAAQ,EACR,QAAQ,EACR,UAAU,GAGX,MAAM,6BAA6B,CAAC;AAErC,+EAA+E;AAC/E,OAAO,EACL,IAAI,EACJ,UAAU,EACV,cAAc,EACd,cAAc,EACd,gBAAgB,EAChB,kBAAkB,EAClB,cAAc,GAKf,MAAM,UAAU,CAAC;AAElB,sBAAsB;AACtB,OAAO,EACL,sBAAsB,EACtB,8BAA8B,GAE/B,MAAM,YAAY,CAAC;AAEpB,gFAAgF;AAChF,+EAA+E;AAC/E,kEAAkE;AAClE,uDAAuD;AAC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AACxE,OAAO,EACL,cAAc,EACd,WAAW,EACX,iBAAiB,GAIlB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,gBAAgB,EAChB,gBAAgB,GACjB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EACL,kBAAkB,EAClB,eAAe,GAEhB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EACL,iBAAiB,EACjB,iBAAiB,GAClB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EACL,mBAAmB,EACnB,gBAAgB,GAGjB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EACL,eAAe,EACf,eAAe,GAChB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,iBAAiB,EACjB,cAAc,GAEf,MAAM,kCAAkC,CAAC","sourcesContent":["/**\n * `@agent-native/core/blocks` — the first-party block registry.\n *\n * A block registry unifies structured document blocks under one `defineBlock`\n * contract: a zod `schema` for the data, an `mdx` config for byte-stable MDX\n * round-trip, a `Read` renderer, an optional `Edit` (auto-generated from the\n * schema when omitted), and `placement` (top-level and/or inline). Apps create a\n * `BlockRegistry`, register the core standard library plus their own specs, and\n * render through `BlockView` inside a `BlockRegistryProvider`. The renderer\n * checks the registry first and falls back to legacy code for unregistered\n * types, so existing documents keep working unchanged.\n *\n * This entry includes the React surface. For server/agent code that must stay\n * React-free, import from `@agent-native/core/blocks/server`.\n */\n\n// Types + authoring\nexport {\n defineBlock,\n type BlockSpec,\n type BlockPlacement,\n type BlockMdxConfig,\n type BlockAttrReader,\n type BlockRenderContext,\n type BlockReadProps,\n type BlockEditProps,\n type MdxAttrValue,\n type NestedBlock,\n type BlockAiFieldActionProps,\n type BlockContainerRegion,\n type BlockContainerSpec,\n type BlockDataChangeMeta,\n} from \"./types.js\";\n\n// Registry + provisioning\nexport { BlockRegistry, registerBlocks } from \"./registry.js\";\nexport {\n BlockRegistryProvider,\n useBlockRegistry,\n useOptionalBlockRegistry,\n} from \"./provider.js\";\n\n// Rendering\nexport { BlockView, blockEditSurface } from \"./BlockView.js\";\nexport { AiEditableFieldLabel } from \"./AiEditableField.js\";\nexport { SchemaBlockEditor } from \"./SchemaBlockEditor.js\";\n\n// Schema-form helpers\nexport {\n markdown,\n richtext,\n introspect,\n type FieldKind,\n type FieldDescriptor,\n} from \"./schema-form/introspect.js\";\n\n// MDX round-trip (registry-driven serialize/parse + shared encoder primitives)\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\n// Agent schema export\nexport {\n describeBlocksForAgent,\n renderBlockVocabularyReference,\n type BlockAgentDoc,\n} from \"./agent.js\";\n\n// Standard library registration. Apps call `registerLibraryBlocks(registry)` to\n// register the whole standard library (the pre-built specs + dev-doc specs) in\n// one place, then register only their app-specific blocks on top.\n// `libraryBlockSpecs` is the underlying ordered array.\nexport {\n libraryBlockSpecs,\n registerLibraryBlocks,\n type LibraryBlockOverrides,\n} from \"./library/specs.js\";\n\n// Standard block library (React specs). Apps register these in their browser\n// registry alongside their own app-specific blocks.\nexport {\n checklistBlock,\n ChecklistBlock,\n ChecklistEditor,\n} from \"./library/checklist.js\";\nexport {\n checklistSchema,\n checklistMdx,\n type ChecklistData,\n type ChecklistItem,\n} from \"./library/checklist.config.js\";\nexport { tableBlock } from \"./library/table.js\";\nexport {\n tableSchema,\n tableMdx,\n type TableData,\n} from \"./library/table.config.js\";\nexport { codeTabsBlock } from \"./library/code-tabs.js\";\nexport {\n codeTabsSchema,\n codeTabsMdx,\n type CodeTabsData,\n type CodeTabsTab,\n} from \"./library/code-tabs.config.js\";\nexport {\n CodeSurface,\n HighlightedCode,\n prettyLanguageName,\n DEFAULT_CODE_MAX_LINES,\n} from \"./library/HighlightedCode.js\";\nexport { htmlBlock, HtmlReadBlock, HtmlEditBlock } from \"./library/html.js\";\nexport {\n htmlSchema,\n htmlMdx,\n type HtmlBlockData,\n} from \"./library/html.config.js\";\nexport { tabsBlock, TabsBlockReader, TabsBlockEditor } from \"./library/tabs.js\";\nexport {\n tabsSchema,\n tabsMdx,\n type TabsData,\n type TabsOrientation,\n type TabsTab,\n} from \"./library/tabs.config.js\";\nexport {\n columnsBlock,\n ColumnsBlockReader,\n ColumnsBlockEditor,\n} from \"./library/columns.js\";\nexport {\n columnsSchema,\n columnsMdx,\n type ColumnsData,\n type ColumnsColumn,\n} from \"./library/columns.config.js\";\nexport {\n calloutBlock,\n CalloutBlock,\n CalloutBlockEdit,\n} from \"./library/callout.js\";\nexport {\n calloutSchema,\n calloutMdx,\n CALLOUT_TONES,\n type CalloutData,\n type CalloutTone,\n} from \"./library/callout.config.js\";\nexport {\n questionFormBlock,\n visualQuestionsBlock,\n QuestionFormRead,\n VisualQuestionsRead,\n QuestionFormEdit,\n} from \"./library/question-form.js\";\nexport {\n questionFormSchema,\n questionFormMdx,\n visualQuestionsSchema,\n visualQuestionsMdx,\n type QuestionFormData,\n type QuestionFormOption,\n type QuestionFormQuestion,\n type QuestionMode,\n type VisualQuestionsData,\n} from \"./library/question-form.config.js\";\nexport { diagramBlock, DiagramRead, DiagramEdit } from \"./library/diagram.js\";\nexport {\n diagramSchema,\n diagramMdx,\n type DiagramData,\n type DiagramNode,\n type DiagramEdge,\n type DiagramNote,\n} from \"./library/diagram.config.js\";\nexport {\n wireframeBlock,\n WireframeBlock,\n WireframeEditor,\n} from \"./library/wireframe.js\";\nexport {\n wireframeSchema,\n wireframeMdx,\n createStableWireframeNodeId,\n WIREFRAME_SURFACES,\n WIREFRAME_EL_NAMES,\n type WireframeData,\n type WireframeNode,\n type WireframeElName,\n type WireframeTone,\n type WireframeSurface,\n type WireframeRenderMode,\n} from \"./library/wireframe.config.js\";\nexport {\n Screen,\n renderNode,\n renderNodes,\n hasRenderer,\n NODE_REGISTRY,\n KitConfigContext,\n RoughOverlay,\n HTML_ROUGH_SELECTOR,\n useWireframeStyle,\n setWireframeStyle,\n toggleWireframeStyle,\n useIsDark,\n type WireframeStyle,\n} from \"./library/wireframe-kit.js\";\n\n// Dev-doc block library (React `Read`/`Edit` renderers + their React-free\n// schema/MDX config). Apps register these alongside their own blocks, supplying\n// app-specific spec metadata (label/description/editSurface/empty) via\n// `defineBlock`. Mirrors the standard library above.\nexport { MermaidRead, MermaidEdit } from \"./library/MermaidBlock.js\";\nexport {\n mermaidSchema,\n mermaidMdx,\n type MermaidData,\n} from \"./library/mermaid.config.js\";\nexport {\n ApiEndpointRead,\n ApiEndpointEdit,\n} from \"./library/ApiEndpointBlock.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 { DataModelRead, DataModelEdit } from \"./library/DataModelBlock.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 { DiffRead, DiffEdit } from \"./library/DiffBlock.js\";\nexport {\n diffSchema,\n diffMdx,\n type DiffData,\n type DiffMode,\n} from \"./library/diff.config.js\";\nexport { FileTreeRead, FileTreeEdit } from \"./library/FileTreeBlock.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 JsonExplorerRead,\n JsonExplorerEdit,\n} from \"./library/JsonExplorerBlock.js\";\nexport {\n jsonExplorerSchema,\n jsonExplorerMdx,\n type JsonExplorerData,\n} from \"./library/json-explorer.config.js\";\nexport {\n AnnotatedCodeRead,\n AnnotatedCodeEdit,\n} from \"./library/AnnotatedCodeBlock.js\";\nexport {\n annotatedCodeSchema,\n annotatedCodeMdx,\n type AnnotatedCodeData,\n type AnnotatedCodeAnnotation,\n} from \"./library/annotated-code.config.js\";\nexport {\n OpenApiSpecRead,\n OpenApiSpecEdit,\n} from \"./library/OpenApiSpecBlock.js\";\nexport {\n openApiSpecSchema,\n openApiSpecMdx,\n type OpenApiSpecData,\n} from \"./library/openapi-spec.config.js\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/client/blocks/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,oBAAoB;AACpB,OAAO,EACL,WAAW,GAcZ,MAAM,YAAY,CAAC;AAEpB,0BAA0B;AAC1B,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC9D,OAAO,EACL,qBAAqB,EACrB,gBAAgB,EAChB,wBAAwB,GACzB,MAAM,eAAe,CAAC;AAEvB,YAAY;AACZ,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAC7D,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAE3D,sBAAsB;AACtB,OAAO,EACL,QAAQ,EACR,QAAQ,EACR,UAAU,GAGX,MAAM,6BAA6B,CAAC;AAErC,+EAA+E;AAC/E,OAAO,EACL,IAAI,EACJ,UAAU,EACV,cAAc,EACd,cAAc,EACd,gBAAgB,EAChB,kBAAkB,EAClB,cAAc,GAKf,MAAM,UAAU,CAAC;AAElB,sBAAsB;AACtB,OAAO,EACL,sBAAsB,EACtB,8BAA8B,GAE/B,MAAM,YAAY,CAAC;AAEpB,gFAAgF;AAChF,+EAA+E;AAC/E,kEAAkE;AAClE,uDAAuD;AACvD,OAAO,EACL,iBAAiB,EACjB,qBAAqB,GAEtB,MAAM,oBAAoB,CAAC;AAE5B,6EAA6E;AAC7E,oDAAoD;AACpD,OAAO,EACL,cAAc,EAC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CAAC;AACvC,OAAO,EACL,gBAAgB,EAChB,gBAAgB,GACjB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EACL,kBAAkB,EAClB,eAAe,GAEhB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EACL,iBAAiB,EACjB,iBAAiB,GAClB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EACL,mBAAmB,EACnB,gBAAgB,GAGjB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EACL,eAAe,EACf,eAAe,GAChB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,iBAAiB,EACjB,cAAc,GAEf,MAAM,kCAAkC,CAAC","sourcesContent":["/**\n * `@agent-native/core/blocks` — the first-party block registry.\n *\n * A block registry unifies structured document blocks under one `defineBlock`\n * contract: a zod `schema` for the data, an `mdx` config for byte-stable MDX\n * round-trip, a `Read` renderer, an optional `Edit` (auto-generated from the\n * schema when omitted), and `placement` (top-level and/or inline). Apps create a\n * `BlockRegistry`, register the core standard library plus their own specs, and\n * render through `BlockView` inside a `BlockRegistryProvider`. The renderer\n * checks the registry first and falls back to legacy code for unregistered\n * types, so existing documents keep working unchanged.\n *\n * This entry includes the React surface. For server/agent code that must stay\n * React-free, import from `@agent-native/core/blocks/server`.\n */\n\n// Types + authoring\nexport {\n defineBlock,\n type BlockSpec,\n type BlockPlacement,\n type BlockMdxConfig,\n type BlockAttrReader,\n type BlockRenderContext,\n type BlockReadProps,\n type BlockEditProps,\n type MdxAttrValue,\n type NestedBlock,\n type BlockAiFieldActionProps,\n type BlockContainerRegion,\n type BlockContainerSpec,\n type BlockDataChangeMeta,\n} from \"./types.js\";\n\n// Registry + provisioning\nexport { BlockRegistry, registerBlocks } from \"./registry.js\";\nexport {\n BlockRegistryProvider,\n useBlockRegistry,\n useOptionalBlockRegistry,\n} from \"./provider.js\";\n\n// Rendering\nexport { BlockView, blockEditSurface } from \"./BlockView.js\";\nexport { AiEditableFieldLabel } from \"./AiEditableField.js\";\nexport { SchemaBlockEditor } from \"./SchemaBlockEditor.js\";\n\n// Schema-form helpers\nexport {\n markdown,\n richtext,\n introspect,\n type FieldKind,\n type FieldDescriptor,\n} from \"./schema-form/introspect.js\";\n\n// MDX round-trip (registry-driven serialize/parse + shared encoder primitives)\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\n// Agent schema export\nexport {\n describeBlocksForAgent,\n renderBlockVocabularyReference,\n type BlockAgentDoc,\n} from \"./agent.js\";\n\n// Standard library registration. Apps call `registerLibraryBlocks(registry)` to\n// register the whole standard library (the pre-built specs + dev-doc specs) in\n// one place, then register only their app-specific blocks on top.\n// `libraryBlockSpecs` is the underlying ordered array.\nexport {\n libraryBlockSpecs,\n registerLibraryBlocks,\n type LibraryBlockOverrides,\n} from \"./library/specs.js\";\n\n// Standard block library (React specs). Apps register these in their browser\n// registry alongside their own app-specific blocks.\nexport {\n checklistBlock,\n ChecklistBlock,\n ChecklistEditor,\n} from \"./library/checklist.js\";\nexport {\n checklistSchema,\n checklistMdx,\n type ChecklistData,\n type ChecklistItem,\n} from \"./library/checklist.config.js\";\nexport { tableBlock } from \"./library/table.js\";\nexport {\n tableSchema,\n tableMdx,\n type TableData,\n} from \"./library/table.config.js\";\nexport { codeTabsBlock } from \"./library/code-tabs.js\";\nexport {\n codeTabsSchema,\n codeTabsMdx,\n type CodeTabsData,\n type CodeTabsTab,\n} from \"./library/code-tabs.config.js\";\nexport {\n CodeSurface,\n HighlightedCode,\n prettyLanguageName,\n DEFAULT_CODE_MAX_LINES,\n} from \"./library/HighlightedCode.js\";\nexport { htmlBlock, HtmlReadBlock, HtmlEditBlock } from \"./library/html.js\";\nexport {\n htmlSchema,\n htmlMdx,\n type HtmlBlockData,\n} from \"./library/html.config.js\";\nexport { tabsBlock, TabsBlockReader, TabsBlockEditor } from \"./library/tabs.js\";\nexport {\n tabsSchema,\n tabsMdx,\n type TabsData,\n type TabsOrientation,\n type TabsTab,\n} from \"./library/tabs.config.js\";\nexport {\n columnsBlock,\n ColumnsBlockReader,\n ColumnsBlockEditor,\n} from \"./library/columns.js\";\nexport {\n columnsSchema,\n columnsMdx,\n type ColumnsData,\n type ColumnsColumn,\n} from \"./library/columns.config.js\";\nexport {\n calloutBlock,\n CalloutBlock,\n CalloutBlockEdit,\n} from \"./library/callout.js\";\nexport {\n calloutSchema,\n calloutMdx,\n CALLOUT_TONES,\n type CalloutData,\n type CalloutTone,\n} from \"./library/callout.config.js\";\nexport {\n questionFormBlock,\n visualQuestionsBlock,\n QuestionFormRead,\n VisualQuestionsRead,\n QuestionFormEdit,\n} from \"./library/question-form.js\";\nexport {\n questionFormSchema,\n questionFormMdx,\n visualQuestionsSchema,\n visualQuestionsMdx,\n type QuestionFormData,\n type QuestionFormOption,\n type QuestionFormQuestion,\n type QuestionMode,\n type VisualQuestionsData,\n} from \"./library/question-form.config.js\";\nexport { diagramBlock, DiagramRead, DiagramEdit } from \"./library/diagram.js\";\nexport {\n diagramSchema,\n diagramMdx,\n type DiagramData,\n type DiagramNode,\n type DiagramEdge,\n type DiagramNote,\n} from \"./library/diagram.config.js\";\nexport {\n wireframeBlock,\n WireframeBlock,\n WireframeEditor,\n} from \"./library/wireframe.js\";\nexport {\n wireframeSchema,\n wireframeMdx,\n createStableWireframeNodeId,\n WIREFRAME_SURFACES,\n WIREFRAME_EL_NAMES,\n type WireframeData,\n type WireframeNode,\n type WireframeElName,\n type WireframeTone,\n type WireframeSurface,\n type WireframeRenderMode,\n} from \"./library/wireframe.config.js\";\nexport {\n Screen,\n renderNode,\n renderNodes,\n hasRenderer,\n NODE_REGISTRY,\n KitConfigContext,\n RoughOverlay,\n HTML_ROUGH_SELECTOR,\n useWireframeStyle,\n setWireframeStyle,\n toggleWireframeStyle,\n useIsDark,\n type WireframeStyle,\n} from \"./library/wireframe-kit.js\";\nexport { renderWireframeIconHtml } from \"./library/wireframe-icons.js\";\n\n// Dev-doc block library (React `Read`/`Edit` renderers + their React-free\n// schema/MDX config). Apps register these alongside their own blocks, supplying\n// app-specific spec metadata (label/description/editSurface/empty) via\n// `defineBlock`. Mirrors the standard library above.\nexport { MermaidRead, MermaidEdit } from \"./library/MermaidBlock.js\";\nexport {\n mermaidSchema,\n mermaidMdx,\n type MermaidData,\n} from \"./library/mermaid.config.js\";\nexport {\n ApiEndpointRead,\n ApiEndpointEdit,\n} from \"./library/ApiEndpointBlock.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 { DataModelRead, DataModelEdit } from \"./library/DataModelBlock.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 { DiffRead, DiffEdit } from \"./library/DiffBlock.js\";\nexport {\n diffSchema,\n diffMdx,\n type DiffData,\n type DiffMode,\n} from \"./library/diff.config.js\";\nexport { FileTreeRead, FileTreeEdit } from \"./library/FileTreeBlock.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 JsonExplorerRead,\n JsonExplorerEdit,\n} from \"./library/JsonExplorerBlock.js\";\nexport {\n jsonExplorerSchema,\n jsonExplorerMdx,\n type JsonExplorerData,\n} from \"./library/json-explorer.config.js\";\nexport {\n AnnotatedCodeRead,\n AnnotatedCodeEdit,\n} from \"./library/AnnotatedCodeBlock.js\";\nexport {\n annotatedCodeSchema,\n annotatedCodeMdx,\n type AnnotatedCodeData,\n type AnnotatedCodeAnnotation,\n} from \"./library/annotated-code.config.js\";\nexport {\n OpenApiSpecRead,\n OpenApiSpecEdit,\n} from \"./library/OpenApiSpecBlock.js\";\nexport {\n openApiSpecSchema,\n openApiSpecMdx,\n type OpenApiSpecData,\n} from \"./library/openapi-spec.config.js\";\n"]}
@@ -0,0 +1,2 @@
1
+ export declare function renderWireframeIconHtml(html: string): string;
2
+ //# sourceMappingURL=wireframe-icons.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wireframe-icons.d.ts","sourceRoot":"","sources":["../../../../src/client/blocks/library/wireframe-icons.ts"],"names":[],"mappings":"AA4KA,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAqC5D"}
@@ -0,0 +1,175 @@
1
+ const ICON_PATHS = {
2
+ arrowLeft: [
3
+ '<path d="M5 12l14 0" />',
4
+ '<path d="M5 12l6 6" />',
5
+ '<path d="M5 12l6 -6" />',
6
+ ],
7
+ arrowRight: [
8
+ '<path d="M5 12l14 0" />',
9
+ '<path d="M13 18l6 -6" />',
10
+ '<path d="M13 6l6 6" />',
11
+ ],
12
+ bell: [
13
+ '<path d="M10 5a2 2 0 1 1 4 0a7 7 0 0 1 4 6v3a4 4 0 0 0 2 3h-16a4 4 0 0 0 2 -3v-3a7 7 0 0 1 4 -6" />',
14
+ '<path d="M9 17v1a3 3 0 0 0 6 0v-1" />',
15
+ ],
16
+ calendar: [
17
+ '<path d="M4 7a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12z" />',
18
+ '<path d="M16 3v4" />',
19
+ '<path d="M8 3v4" />',
20
+ '<path d="M4 11h16" />',
21
+ ],
22
+ check: ['<path d="M5 12l5 5l10 -10" />'],
23
+ chevronDown: ['<path d="M6 9l6 6l6 -6" />'],
24
+ chevronLeft: ['<path d="M15 6l-6 6l6 6" />'],
25
+ chevronRight: ['<path d="M9 6l6 6l-6 6" />'],
26
+ chevronUp: ['<path d="M6 15l6 -6l6 6" />'],
27
+ dots: [
28
+ '<path d="M5 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" />',
29
+ '<path d="M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" />',
30
+ '<path d="M19 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" />',
31
+ ],
32
+ edit: [
33
+ '<path d="M4 20h4l10.5 -10.5a2.8 2.8 0 1 0 -4 -4l-10.5 10.5v4" />',
34
+ '<path d="M13.5 6.5l4 4" />',
35
+ ],
36
+ lock: [
37
+ '<path d="M5 13a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v6a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2v-6z" />',
38
+ '<path d="M8 11v-4a4 4 0 1 1 8 0v4" />',
39
+ '<path d="M12 16l0 .01" />',
40
+ ],
41
+ mail: [
42
+ '<path d="M3 7a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v10a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-10z" />',
43
+ '<path d="M3 7l9 6l9 -6" />',
44
+ ],
45
+ plus: ['<path d="M12 5l0 14" />', '<path d="M5 12l14 0" />'],
46
+ search: [
47
+ '<path d="M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0" />',
48
+ '<path d="M21 21l-6 -6" />',
49
+ ],
50
+ send: [
51
+ '<path d="M10 14l11 -11" />',
52
+ '<path d="M21 3l-6.5 18a.55 .55 0 0 1 -1 0l-3.5 -7l-7 -3.5a.55 .55 0 0 1 0 -1l18 -6.5" />',
53
+ ],
54
+ settings: [
55
+ '<path d="M10.3 4.3a1 1 0 0 1 1.4 0l.6 .6a1 1 0 0 0 1 .24l.84 -.28a1 1 0 0 1 1.25 .6l.31 .9a1 1 0 0 0 .76 .65l.95 .16a1 1 0 0 1 .84 1.08l-.08 .98a1 1 0 0 0 .48 .9l.82 .52a1 1 0 0 1 .34 1.34l-.49 .86a1 1 0 0 0 0 1l.49 .86a1 1 0 0 1 -.34 1.34l-.82 .52a1 1 0 0 0 -.48 .9l.08 .98a1 1 0 0 1 -.84 1.08l-.95 .16a1 1 0 0 0 -.76 .65l-.31 .9a1 1 0 0 1 -1.25 .6l-.84 -.28a1 1 0 0 0 -1 .24l-.6 .6a1 1 0 0 1 -1.4 0l-.6 -.6a1 1 0 0 0 -1 -.24l-.84 .28a1 1 0 0 1 -1.25 -.6l-.31 -.9a1 1 0 0 0 -.76 -.65l-.95 -.16a1 1 0 0 1 -.84 -1.08l.08 -.98a1 1 0 0 0 -.48 -.9l-.82 -.52a1 1 0 0 1 -.34 -1.34l.49 -.86a1 1 0 0 0 0 -1l-.49 -.86a1 1 0 0 1 .34 -1.34l.82 -.52a1 1 0 0 0 .48 -.9l-.08 -.98a1 1 0 0 1 .84 -1.08l.95 -.16a1 1 0 0 0 .76 -.65l.31 -.9a1 1 0 0 1 1.25 -.6l.84 .28a1 1 0 0 0 1 -.24l.6 -.6z" />',
56
+ '<path d="M9 12a3 3 0 1 0 6 0a3 3 0 0 0 -6 0" />',
57
+ ],
58
+ user: [
59
+ '<path d="M8 7a4 4 0 1 0 8 0a4 4 0 0 0 -8 0" />',
60
+ '<path d="M6 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2" />',
61
+ ],
62
+ x: ['<path d="M18 6l-12 12" />', '<path d="M6 6l12 12" />'],
63
+ };
64
+ const ICON_ALIASES = {
65
+ add: "plus",
66
+ back: "arrowLeft",
67
+ close: "x",
68
+ collapse: "chevronUp",
69
+ caret: "chevronDown",
70
+ chevron: "chevronDown",
71
+ dropdown: "chevronDown",
72
+ down: "chevronDown",
73
+ email: "mail",
74
+ expand: "chevronDown",
75
+ forward: "arrowRight",
76
+ gear: "settings",
77
+ menu: "dots",
78
+ more: "dots",
79
+ next: "chevronRight",
80
+ password: "lock",
81
+ previous: "chevronLeft",
82
+ profile: "user",
83
+ right: "chevronRight",
84
+ submit: "send",
85
+ up: "chevronUp",
86
+ };
87
+ const ICON_MARKER_RE = /<(span|i)\b([^>]*\s)?data-icon\s*=\s*("([^"]*)"|'([^']*)'|([^\s"'=<>`]+))([^>]*)>(?:\s*)<\/\1>|<(span|i)\b([^>]*\s)?data-icon\s*=\s*("([^"]*)"|'([^']*)'|([^\s"'=<>`]+))([^>]*)\/>/gi;
88
+ function normalizeIconName(value) {
89
+ const normalized = value
90
+ .trim()
91
+ .replace(/^icon/i, "")
92
+ .replace(/[^a-z0-9]+/gi, " ")
93
+ .trim()
94
+ .replace(/\s+([a-z0-9])/gi, (_match, char) => char.toUpperCase())
95
+ .replace(/^./, (char) => char.toLowerCase());
96
+ return normalized in ICON_PATHS
97
+ ? normalized
98
+ : (ICON_ALIASES[normalized] ?? null);
99
+ }
100
+ function readAttribute(attrs, name) {
101
+ const escaped = name.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
102
+ const match = attrs.match(new RegExp(`\\b${escaped}\\s*=\\s*("[^"]*"|'[^']*'|[^\\s"'=<>` + "`" + `]+)`, "i"));
103
+ if (!match)
104
+ return null;
105
+ const raw = match[1] ?? "";
106
+ return decodeAttrEntities(raw.replace(/^["']|["']$/g, ""));
107
+ }
108
+ function decodeAttrEntities(value) {
109
+ return value.replace(/&(#x[0-9a-f]+|#\d+|amp|apos|quot|lt|gt);/gi, (entity, body) => {
110
+ const normalized = body.toLowerCase();
111
+ if (normalized === "amp")
112
+ return "&";
113
+ if (normalized === "apos")
114
+ return "'";
115
+ if (normalized === "quot")
116
+ return '"';
117
+ if (normalized === "lt")
118
+ return "<";
119
+ if (normalized === "gt")
120
+ return ">";
121
+ const isHex = normalized.startsWith("#x");
122
+ const digits = normalized.slice(isHex ? 2 : 1);
123
+ const codePoint = Number.parseInt(digits, isHex ? 16 : 10);
124
+ if (!Number.isFinite(codePoint) ||
125
+ codePoint < 0 ||
126
+ codePoint > 0x10ffff) {
127
+ return entity;
128
+ }
129
+ try {
130
+ return String.fromCodePoint(codePoint);
131
+ }
132
+ catch {
133
+ return entity;
134
+ }
135
+ });
136
+ }
137
+ function escapeAttr(value) {
138
+ return value
139
+ .replace(/&/g, "&amp;")
140
+ .replace(/"/g, "&quot;")
141
+ .replace(/</g, "&lt;")
142
+ .replace(/>/g, "&gt;");
143
+ }
144
+ function iconAccessibility(label) {
145
+ const accessibleLabel = label?.trim();
146
+ return accessibleLabel
147
+ ? `role="img" aria-label="${escapeAttr(accessibleLabel)}"`
148
+ : 'aria-hidden="true"';
149
+ }
150
+ function iconSvg(name, label) {
151
+ return `<svg class="wf-icon" data-icon="${name}" xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" ${iconAccessibility(label)}>${ICON_PATHS[name].join("")}</svg>`;
152
+ }
153
+ function iconFallback(rawName, label) {
154
+ const iconName = rawName.trim() || "unknown";
155
+ const accessibleLabel = label?.trim() || `Unsupported icon: ${iconName}`;
156
+ return `<span class="wf-icon wf-icon-fallback" data-icon="unknown" data-icon-name="${escapeAttr(iconName)}" role="img" aria-label="${escapeAttr(accessibleLabel)}">?</span>`;
157
+ }
158
+ export function renderWireframeIconHtml(html) {
159
+ return html.replace(ICON_MARKER_RE, (_match, _tagA, beforeA, quotedA, doubleA, singleA, bareA, afterA, _tagB, beforeB, quotedB, doubleB, singleB, bareB, afterB) => {
160
+ const rawName = doubleA ??
161
+ singleA ??
162
+ bareA ??
163
+ doubleB ??
164
+ singleB ??
165
+ bareB ??
166
+ quotedA ??
167
+ quotedB ??
168
+ "";
169
+ const name = normalizeIconName(rawName);
170
+ const attrs = `${beforeA ?? ""}${afterA ?? ""}${beforeB ?? ""}${afterB ?? ""}`;
171
+ const label = readAttribute(attrs, "aria-label") ?? readAttribute(attrs, "title");
172
+ return name ? iconSvg(name, label) : iconFallback(rawName, label);
173
+ });
174
+ }
175
+ //# sourceMappingURL=wireframe-icons.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wireframe-icons.js","sourceRoot":"","sources":["../../../../src/client/blocks/library/wireframe-icons.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,GAAG;IACjB,SAAS,EAAE;QACT,yBAAyB;QACzB,wBAAwB;QACxB,yBAAyB;KAC1B;IACD,UAAU,EAAE;QACV,yBAAyB;QACzB,0BAA0B;QAC1B,wBAAwB;KACzB;IACD,IAAI,EAAE;QACJ,qGAAqG;QACrG,uCAAuC;KACxC;IACD,QAAQ,EAAE;QACR,8FAA8F;QAC9F,sBAAsB;QACtB,qBAAqB;QACrB,uBAAuB;KACxB;IACD,KAAK,EAAE,CAAC,+BAA+B,CAAC;IACxC,WAAW,EAAE,CAAC,4BAA4B,CAAC;IAC3C,WAAW,EAAE,CAAC,6BAA6B,CAAC;IAC5C,YAAY,EAAE,CAAC,4BAA4B,CAAC;IAC5C,SAAS,EAAE,CAAC,6BAA6B,CAAC;IAC1C,IAAI,EAAE;QACJ,sDAAsD;QACtD,uDAAuD;QACvD,uDAAuD;KACxD;IACD,IAAI,EAAE;QACJ,kEAAkE;QAClE,4BAA4B;KAC7B;IACD,IAAI,EAAE;QACJ,6FAA6F;QAC7F,uCAAuC;QACvC,2BAA2B;KAC5B;IACD,IAAI,EAAE;QACJ,8FAA8F;QAC9F,4BAA4B;KAC7B;IACD,IAAI,EAAE,CAAC,yBAAyB,EAAE,yBAAyB,CAAC;IAC5D,MAAM,EAAE;QACN,yDAAyD;QACzD,2BAA2B;KAC5B;IACD,IAAI,EAAE;QACJ,4BAA4B;QAC5B,0FAA0F;KAC3F;IACD,QAAQ,EAAE;QACR,2wBAA2wB;QAC3wB,iDAAiD;KAClD;IACD,IAAI,EAAE;QACJ,gDAAgD;QAChD,wDAAwD;KACzD;IACD,CAAC,EAAE,CAAC,2BAA2B,EAAE,yBAAyB,CAAC;CACnD,CAAC;AAEX,MAAM,YAAY,GAA4C;IAC5D,GAAG,EAAE,MAAM;IACX,IAAI,EAAE,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N,KAAK,EACL,OAAO,EACP,OAAO,EACP,OAAO,EACP,OAAO,EACP,KAAK,EACL,MAAM,EACN,EAAE;QACF,MAAM,OAAO,GACX,OAAO;YACP,OAAO;YACP,KAAK;YACL,OAAO;YACP,OAAO;YACP,KAAK;YACL,OAAO;YACP,OAAO;YACP,EAAE,CAAC;QACL,MAAM,IAAI,GAAG,iBAAiB,CAAC,OAAO,CAAC,CAAC;QACxC,MAAM,KAAK,GAAG,GAAG,OAAO,IAAI,EAAE,GAAG,MAAM,IAAI,EAAE,GAAG,OAAO,IAAI,EAAE,GAAG,MAAM,IAAI,EAAE,EAAE,CAAC;QAC/E,MAAM,KAAK,GACT,aAAa,CAAC,KAAK,EAAE,YAAY,CAAC,IAAI,aAAa,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;QACtE,OAAO,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;IACpE,CAAC,CACF,CAAC;AACJ,CAAC","sourcesContent":["const ICON_PATHS = {\n arrowLeft: [\n '<path d=\"M5 12l14 0\" />',\n '<path d=\"M5 12l6 6\" />',\n '<path d=\"M5 12l6 -6\" />',\n ],\n arrowRight: [\n '<path d=\"M5 12l14 0\" />',\n '<path d=\"M13 18l6 -6\" />',\n '<path d=\"M13 6l6 6\" />',\n ],\n bell: [\n '<path d=\"M10 5a2 2 0 1 1 4 0a7 7 0 0 1 4 6v3a4 4 0 0 0 2 3h-16a4 4 0 0 0 2 -3v-3a7 7 0 0 1 4 -6\" />',\n '<path d=\"M9 17v1a3 3 0 0 0 6 0v-1\" />',\n ],\n calendar: [\n '<path d=\"M4 7a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12z\" />',\n '<path d=\"M16 3v4\" />',\n '<path d=\"M8 3v4\" />',\n '<path d=\"M4 11h16\" />',\n ],\n check: ['<path d=\"M5 12l5 5l10 -10\" />'],\n chevronDown: ['<path d=\"M6 9l6 6l6 -6\" />'],\n chevronLeft: ['<path d=\"M15 6l-6 6l6 6\" />'],\n chevronRight: ['<path d=\"M9 6l6 6l-6 6\" />'],\n chevronUp: ['<path d=\"M6 15l6 -6l6 6\" />'],\n dots: [\n '<path d=\"M5 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0\" />',\n '<path d=\"M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0\" />',\n '<path d=\"M19 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0\" />',\n ],\n edit: [\n '<path d=\"M4 20h4l10.5 -10.5a2.8 2.8 0 1 0 -4 -4l-10.5 10.5v4\" />',\n '<path d=\"M13.5 6.5l4 4\" />',\n ],\n lock: [\n '<path d=\"M5 13a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v6a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2v-6z\" />',\n '<path d=\"M8 11v-4a4 4 0 1 1 8 0v4\" />',\n '<path d=\"M12 16l0 .01\" />',\n ],\n mail: [\n '<path d=\"M3 7a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v10a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-10z\" />',\n '<path d=\"M3 7l9 6l9 -6\" />',\n ],\n plus: ['<path d=\"M12 5l0 14\" />', '<path d=\"M5 12l14 0\" />'],\n search: [\n '<path d=\"M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0\" />',\n '<path d=\"M21 21l-6 -6\" />',\n ],\n send: [\n '<path d=\"M10 14l11 -11\" />',\n '<path d=\"M21 3l-6.5 18a.55 .55 0 0 1 -1 0l-3.5 -7l-7 -3.5a.55 .55 0 0 1 0 -1l18 -6.5\" />',\n ],\n settings: [\n '<path d=\"M10.3 4.3a1 1 0 0 1 1.4 0l.6 .6a1 1 0 0 0 1 .24l.84 -.28a1 1 0 0 1 1.25 .6l.31 .9a1 1 0 0 0 .76 .65l.95 .16a1 1 0 0 1 .84 1.08l-.08 .98a1 1 0 0 0 .48 .9l.82 .52a1 1 0 0 1 .34 1.34l-.49 .86a1 1 0 0 0 0 1l.49 .86a1 1 0 0 1 -.34 1.34l-.82 .52a1 1 0 0 0 -.48 .9l.08 .98a1 1 0 0 1 -.84 1.08l-.95 .16a1 1 0 0 0 -.76 .65l-.31 .9a1 1 0 0 1 -1.25 .6l-.84 -.28a1 1 0 0 0 -1 .24l-.6 .6a1 1 0 0 1 -1.4 0l-.6 -.6a1 1 0 0 0 -1 -.24l-.84 .28a1 1 0 0 1 -1.25 -.6l-.31 -.9a1 1 0 0 0 -.76 -.65l-.95 -.16a1 1 0 0 1 -.84 -1.08l.08 -.98a1 1 0 0 0 -.48 -.9l-.82 -.52a1 1 0 0 1 -.34 -1.34l.49 -.86a1 1 0 0 0 0 -1l-.49 -.86a1 1 0 0 1 .34 -1.34l.82 -.52a1 1 0 0 0 .48 -.9l-.08 -.98a1 1 0 0 1 .84 -1.08l.95 -.16a1 1 0 0 0 .76 -.65l.31 -.9a1 1 0 0 1 1.25 -.6l.84 .28a1 1 0 0 0 1 -.24l.6 -.6z\" />',\n '<path d=\"M9 12a3 3 0 1 0 6 0a3 3 0 0 0 -6 0\" />',\n ],\n user: [\n '<path d=\"M8 7a4 4 0 1 0 8 0a4 4 0 0 0 -8 0\" />',\n '<path d=\"M6 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2\" />',\n ],\n x: ['<path d=\"M18 6l-12 12\" />', '<path d=\"M6 6l12 12\" />'],\n} as const;\n\nconst ICON_ALIASES: Record<string, keyof typeof ICON_PATHS> = {\n add: \"plus\",\n back: \"arrowLeft\",\n close: \"x\",\n collapse: \"chevronUp\",\n caret: \"chevronDown\",\n chevron: \"chevronDown\",\n dropdown: \"chevronDown\",\n down: \"chevronDown\",\n email: \"mail\",\n expand: \"chevronDown\",\n forward: \"arrowRight\",\n gear: \"settings\",\n menu: \"dots\",\n more: \"dots\",\n next: \"chevronRight\",\n password: \"lock\",\n previous: \"chevronLeft\",\n profile: \"user\",\n right: \"chevronRight\",\n submit: \"send\",\n up: \"chevronUp\",\n};\n\nconst ICON_MARKER_RE =\n /<(span|i)\\b([^>]*\\s)?data-icon\\s*=\\s*(\"([^\"]*)\"|'([^']*)'|([^\\s\"'=<>`]+))([^>]*)>(?:\\s*)<\\/\\1>|<(span|i)\\b([^>]*\\s)?data-icon\\s*=\\s*(\"([^\"]*)\"|'([^']*)'|([^\\s\"'=<>`]+))([^>]*)\\/>/gi;\n\nfunction normalizeIconName(value: string): keyof typeof ICON_PATHS | null {\n const normalized = value\n .trim()\n .replace(/^icon/i, \"\")\n .replace(/[^a-z0-9]+/gi, \" \")\n .trim()\n .replace(/\\s+([a-z0-9])/gi, (_match, char: string) => char.toUpperCase())\n .replace(/^./, (char) => char.toLowerCase());\n return normalized in ICON_PATHS\n ? (normalized as keyof typeof ICON_PATHS)\n : (ICON_ALIASES[normalized] ?? null);\n}\n\nfunction readAttribute(attrs: string, name: string): string | null {\n const escaped = name.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\");\n const match = attrs.match(\n new RegExp(\n `\\\\b${escaped}\\\\s*=\\\\s*(\"[^\"]*\"|'[^']*'|[^\\\\s\"'=<>` + \"`\" + `]+)`,\n \"i\",\n ),\n );\n if (!match) return null;\n const raw = match[1] ?? \"\";\n return decodeAttrEntities(raw.replace(/^[\"']|[\"']$/g, \"\"));\n}\n\nfunction decodeAttrEntities(value: string): string {\n return value.replace(\n /&(#x[0-9a-f]+|#\\d+|amp|apos|quot|lt|gt);/gi,\n (entity, body: string) => {\n const normalized = body.toLowerCase();\n if (normalized === \"amp\") return \"&\";\n if (normalized === \"apos\") return \"'\";\n if (normalized === \"quot\") return '\"';\n if (normalized === \"lt\") return \"<\";\n if (normalized === \"gt\") return \">\";\n\n const isHex = normalized.startsWith(\"#x\");\n const digits = normalized.slice(isHex ? 2 : 1);\n const codePoint = Number.parseInt(digits, isHex ? 16 : 10);\n if (\n !Number.isFinite(codePoint) ||\n codePoint < 0 ||\n codePoint > 0x10ffff\n ) {\n return entity;\n }\n try {\n return String.fromCodePoint(codePoint);\n } catch {\n return entity;\n }\n },\n );\n}\n\nfunction escapeAttr(value: string): string {\n return value\n .replace(/&/g, \"&amp;\")\n .replace(/\"/g, \"&quot;\")\n .replace(/</g, \"&lt;\")\n .replace(/>/g, \"&gt;\");\n}\n\nfunction iconAccessibility(label: string | null): string {\n const accessibleLabel = label?.trim();\n return accessibleLabel\n ? `role=\"img\" aria-label=\"${escapeAttr(accessibleLabel)}\"`\n : 'aria-hidden=\"true\"';\n}\n\nfunction iconSvg(name: keyof typeof ICON_PATHS, label: string | null): string {\n return `<svg class=\"wf-icon\" data-icon=\"${name}\" xmlns=\"http://www.w3.org/2000/svg\" width=\"1em\" height=\"1em\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" ${iconAccessibility(label)}>${ICON_PATHS[name].join(\"\")}</svg>`;\n}\n\nfunction iconFallback(rawName: string, label: string | null): string {\n const iconName = rawName.trim() || \"unknown\";\n const accessibleLabel = label?.trim() || `Unsupported icon: ${iconName}`;\n return `<span class=\"wf-icon wf-icon-fallback\" data-icon=\"unknown\" data-icon-name=\"${escapeAttr(iconName)}\" role=\"img\" aria-label=\"${escapeAttr(accessibleLabel)}\">?</span>`;\n}\n\nexport function renderWireframeIconHtml(html: string): string {\n return html.replace(\n ICON_MARKER_RE,\n (\n _match,\n _tagA,\n beforeA,\n quotedA,\n doubleA,\n singleA,\n bareA,\n afterA,\n _tagB,\n beforeB,\n quotedB,\n doubleB,\n singleB,\n bareB,\n afterB,\n ) => {\n const rawName =\n doubleA ??\n singleA ??\n bareA ??\n doubleB ??\n singleB ??\n bareB ??\n quotedA ??\n quotedB ??\n \"\";\n const name = normalizeIconName(rawName);\n const attrs = `${beforeA ?? \"\"}${afterA ?? \"\"}${beforeB ?? \"\"}${afterB ?? \"\"}`;\n const label =\n readAttribute(attrs, \"aria-label\") ?? readAttribute(attrs, \"title\");\n return name ? iconSvg(name, label) : iconFallback(rawName, label);\n },\n );\n}\n"]}
@@ -1 +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"}
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;AA0Y/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"}
@@ -4,6 +4,7 @@ import { defineBlock } from "../types.js";
4
4
  import { wireframeSchema, wireframeMdx, } from "./wireframe.config.js";
5
5
  import { HTML_ROUGH_SELECTOR, KitConfigContext, RoughOverlay, Screen, renderNodes, useIsDark, useWireframeStyle, } from "./wireframe-kit.js";
6
6
  import { sanitizeWireframeCss, sanitizeWireframeHtml, scopeDesignCss, } from "./sanitize-html.js";
7
+ import { renderWireframeIconHtml } from "./wireframe-icons.js";
7
8
  const SURFACE_PRESETS = {
8
9
  // mobile keeps a tall floor: a phone frame reads as a phone even when short.
9
10
  mobile: { width: 300, minHeight: 360, radius: 30 },
@@ -134,7 +135,7 @@ function HtmlArtboard({ data, ctx: _ctx, compact, }) {
134
135
  // XSS). Self-contained in core via the shared block sanitizer (DOM-based in the
135
136
  // browser, regex fallback on the server) so the HTML mockup path renders in any
136
137
  // app without the host wiring a sanitizer hook.
137
- const safeHtml = useMemo(() => sanitizeWireframeHtml(data.html), [data.html]);
138
+ const safeHtml = useMemo(() => renderWireframeIconHtml(sanitizeWireframeHtml(data.html)), [data.html]);
138
139
  const scopeId = useId().replace(/[^a-zA-Z0-9_-]/g, "");
139
140
  const scopedCss = useMemo(() => {
140
141
  const safeCss = sanitizeWireframeCss(data.css);
@@ -1 +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,o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E,IAAI,EAAE,GAAG,EAAE,GAAG,GAAI,EAC7C,OAAO,IAAI,YAAG,SAAS,EAAC,sBAAsB,YAAE,OAAO,GAAK,IACrD,CACX,CAAC;AACJ,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,eAAe,CAAC,EAAE,IAAI,EAAE,GAAG,EAAiC;IAC1E,OAAO,KAAC,oBAAoB,IAAC,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,GAAI,CAAC;AACxD,CAAC;AAED,oFAAoF;AACpF,MAAM,CAAC,MAAM,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: _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"]}
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;AAC5B,OAAO,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AA+C/D,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,EAAE,EAAE,EAAE;IACnD,OAAO,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,EAAE,EAAE,EAAE;IACnD,KAAK,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,EAAE,EAAE,EAAE;CAClD,CAAC;AAEF,SAAS,UAAU,CAAC,IAAmB;IACrC,OAAO,OAAO,IAAI,CAAC,IAAI,KAAK,QAAQ,IAAI,IAAI,CAAC,IAAI,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3E,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\";\nimport { renderWireframeIconHtml } from \"./wireframe-icons.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: _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(\n () => renderWireframeIconHtml(sanitizeWireframeHtml(data.html)),\n [data.html],\n );\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"]}
@@ -7,12 +7,13 @@
7
7
  * 1. Brave Search API (BRAVE_SEARCH_API_KEY)
8
8
  * 2. Tavily (TAVILY_API_KEY)
9
9
  * 3. Exa (EXA_API_KEY)
10
+ * 4. Builder.io (connected Builder credentials)
10
11
  *
11
12
  * The first configured backend wins. If none is configured, the tool
12
13
  * returns a helpful message telling the user which keys to add.
13
14
  *
14
- * Register BRAVE_SEARCH_API_KEY, TAVILY_API_KEY, or EXA_API_KEY via the
15
- * app secrets settings or as environment variables.
15
+ * Connect Builder.io or register BRAVE_SEARCH_API_KEY, TAVILY_API_KEY, or
16
+ * EXA_API_KEY via app secrets settings or environment variables.
16
17
  */
17
18
  import type { ActionEntry } from "../agent/production-agent.js";
18
19
  import type { CredentialContext } from "../credentials/index.js";
@@ -23,19 +24,39 @@ export interface WebSearchResult {
23
24
  }
24
25
  export interface WebSearchToolOptions {
25
26
  /**
26
- * Resolve a credential by key. When not provided the tool falls back to
27
- * env-var lookup only.
27
+ * Resolve a request-scoped secret by key. When not provided the tool falls
28
+ * back to env-var lookup only.
29
+ */
30
+ resolveSecret?: (key: string) => Promise<string | null>;
31
+ /**
32
+ * Legacy credential resolver retained for older callers.
28
33
  */
29
34
  resolveCredential?: (key: string, ctx: CredentialContext) => Promise<string | undefined>;
30
35
  /**
31
- * Returns the current request's credential context (user email + orgId).
32
- * Required for per-user credential resolution; env-var fallback still
33
- * works without it.
36
+ * Legacy credential context callback retained for older callers.
34
37
  */
35
38
  getCredentialContext?: () => CredentialContext | null;
39
+ /**
40
+ * Resolve connected Builder credentials for managed web search.
41
+ */
42
+ resolveBuilderCredentials?: () => Promise<BuilderWebSearchCredentials>;
43
+ /**
44
+ * Base URL for Builder-managed web search.
45
+ */
46
+ getBuilderWebSearchBaseUrl?: () => string;
47
+ /**
48
+ * Stable attribution headers for Builder-managed API calls.
49
+ */
50
+ getBuilderRequestHeaders?: () => Record<string, string>;
51
+ }
52
+ interface BuilderWebSearchCredentials {
53
+ privateKey: string | null;
54
+ publicKey: string | null;
55
+ userId?: string | null;
36
56
  }
37
57
  /**
38
58
  * Create the web-search tool entry for the agent tool registry.
39
59
  */
40
60
  export declare function createWebSearchToolEntry(opts?: WebSearchToolOptions): Record<string, ActionEntry>;
61
+ export {};
41
62
  //# sourceMappingURL=web-search-tool.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"web-search-tool.d.ts","sourceRoot":"","sources":["../../src/extensions/web-search-tool.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAEjE,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,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