@agent-native/core 0.80.2 → 0.80.5
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/corpus/README.md +2 -2
- package/corpus/core/CHANGELOG.md +66 -2
- package/corpus/core/docs/content/locales/ar-SA/real-time-collaboration.mdx +2 -2
- package/corpus/core/docs/content/locales/ar-SA/template-design.mdx +1 -1
- package/corpus/core/docs/content/locales/de-DE/real-time-collaboration.mdx +3 -3
- package/corpus/core/docs/content/locales/de-DE/template-design.mdx +1 -1
- package/corpus/core/docs/content/locales/es-ES/real-time-collaboration.mdx +2 -2
- package/corpus/core/docs/content/locales/es-ES/template-design.mdx +1 -1
- package/corpus/core/docs/content/locales/fr-FR/real-time-collaboration.mdx +2 -2
- package/corpus/core/docs/content/locales/fr-FR/template-design.mdx +1 -1
- package/corpus/core/docs/content/locales/hi-IN/template-design.mdx +1 -1
- package/corpus/core/docs/content/locales/ja-JP/real-time-collaboration.mdx +2 -2
- package/corpus/core/docs/content/locales/ja-JP/template-design.mdx +1 -1
- package/corpus/core/docs/content/locales/ko-KR/real-time-collaboration.mdx +2 -2
- package/corpus/core/docs/content/locales/ko-KR/template-design.mdx +1 -1
- package/corpus/core/docs/content/locales/pt-BR/real-time-collaboration.mdx +2 -2
- package/corpus/core/docs/content/locales/pt-BR/template-design.mdx +1 -1
- package/corpus/core/docs/content/locales/zh-CN/real-time-collaboration.mdx +2 -2
- package/corpus/core/docs/content/locales/zh-CN/template-design.mdx +1 -1
- package/corpus/core/docs/content/locales/zh-TW/real-time-collaboration.mdx +2 -2
- package/corpus/core/docs/content/locales/zh-TW/template-design.mdx +1 -1
- package/corpus/core/docs/content/real-time-collaboration.mdx +2 -2
- package/corpus/core/docs/content/template-design.mdx +1 -1
- package/corpus/core/package.json +3 -7
- package/corpus/core/src/action.ts +32 -0
- package/corpus/core/src/agent/durable-background.ts +32 -11
- package/corpus/core/src/agent/production-agent.ts +14 -1
- package/corpus/core/src/agent/run-loop-with-resume.ts +3 -1
- package/corpus/core/src/brand-kit/fig/index.ts +17 -37
- package/corpus/core/src/cli/index.ts +1 -1
- package/corpus/core/src/cli/mcp-config-writers.ts +187 -51
- package/corpus/core/src/cli/plan-local.ts +445 -108
- package/corpus/core/src/cli/skills.ts +32 -8
- package/corpus/core/src/client/AssistantChat.tsx +11 -1
- package/corpus/core/src/client/agent-chat.ts +12 -1
- package/corpus/core/src/client/composer/PromptComposer.tsx +100 -41
- package/corpus/core/src/client/org/OrgSwitcher.tsx +1 -1
- package/corpus/core/src/client/sharing/ShareButton.tsx +3 -27
- package/corpus/core/src/collab/presence.ts +1 -1
- package/corpus/core/src/mcp/connect-route.ts +34 -5
- package/corpus/core/src/server/action-discovery.ts +4 -0
- package/corpus/core/src/server/action-routes.ts +14 -0
- package/corpus/core/src/server/agent-chat-plugin.ts +20 -0
- package/corpus/core/src/vite/client.ts +15 -1
- package/corpus/templates/analytics/actions/dashboard-mutation-api.ts +2 -0
- package/corpus/templates/analytics/actions/update-dashboard.ts +8 -0
- package/corpus/templates/analytics/app/components/layout/Layout.tsx +1 -1
- package/corpus/templates/analytics/app/components/layout/Sidebar.tsx +117 -33
- package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/index.tsx +4 -0
- package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/types.ts +7 -0
- package/corpus/templates/analytics/changelog/2026-06-27-dashboards-can-now-nest-under-a-parent-in-the-sidebar-via-a-.md +6 -0
- package/corpus/templates/analytics/changelog/2026-06-29-analytics-pages-now-sit-closer-under-the-header-with-tighter.md +6 -0
- package/corpus/templates/assets/actions/generate-image-batch.ts +3 -0
- package/corpus/templates/assets/actions/generate-image.ts +3 -0
- package/corpus/templates/assets/changelog/2026-06-29-longer-agent-generation-window.md +6 -0
- package/corpus/templates/assets/netlify.toml +3 -3
- package/corpus/templates/assets/server/plugins/agent-chat.ts +4 -1
- package/corpus/templates/clips/app/components/capture-install-options.tsx +7 -8
- package/corpus/templates/clips/app/components/player/timestamped-comment-button.tsx +162 -0
- package/corpus/templates/clips/app/components/recorder/recorder-engine.ts +1 -1
- package/corpus/templates/clips/app/i18n/ar-SA.ts +4 -0
- package/corpus/templates/clips/app/i18n/de-DE.ts +4 -0
- package/corpus/templates/clips/app/i18n/en-US.ts +4 -0
- package/corpus/templates/clips/app/i18n/es-ES.ts +4 -0
- package/corpus/templates/clips/app/i18n/fr-FR.ts +4 -0
- package/corpus/templates/clips/app/i18n/hi-IN.ts +4 -0
- package/corpus/templates/clips/app/i18n/ja-JP.ts +4 -0
- package/corpus/templates/clips/app/i18n/ko-KR.ts +4 -0
- package/corpus/templates/clips/app/i18n/pt-BR.ts +4 -0
- package/corpus/templates/clips/app/i18n/zh-CN.ts +4 -0
- package/corpus/templates/clips/app/i18n/zh-TW.ts +4 -0
- package/corpus/templates/clips/app/routes/r.$recordingId.tsx +42 -18
- package/corpus/templates/content/AGENTS.md +12 -0
- package/corpus/templates/content/app/blocks/BuilderDocsBlocks.tsx +10 -0
- package/corpus/templates/content/app/components/editor/BubbleToolbar.tsx +1 -0
- package/corpus/templates/content/app/components/editor/ContentReferencePreview.tsx +185 -0
- package/corpus/templates/content/app/components/editor/DocumentEditor.tsx +3 -0
- package/corpus/templates/content/app/components/editor/VisualEditor.tsx +19 -0
- package/corpus/templates/content/app/components/editor/extensions/ContentReferenceNode.tsx +82 -0
- package/corpus/templates/content/app/global.css +9 -0
- package/corpus/templates/content/app/i18n/zh-TW.ts +12 -0
- package/corpus/templates/content/app/i18n-data.ts +140 -0
- package/corpus/templates/content/changelog/2026-06-29-reusable-mdx-references-now-preview-linked-local-documents-i.md +6 -0
- package/corpus/templates/content/shared/builder-docs-blocks.ts +8 -0
- package/corpus/templates/content/shared/builder-mdx.ts +141 -4
- package/corpus/templates/content/shared/nfm.ts +62 -0
- package/corpus/templates/design/.agents/skills/design-systems/SKILL.md +10 -11
- package/corpus/templates/design/AGENTS.md +5 -0
- package/corpus/templates/design/_gitignore +7 -0
- package/corpus/templates/design/actions/apply-visual-edit.ts +22 -12
- package/corpus/templates/design/actions/create-design-system.ts +15 -4
- package/corpus/templates/design/actions/create-file.ts +20 -1
- package/corpus/templates/design/actions/delete-design-system.ts +2 -2
- package/corpus/templates/design/actions/duplicate-design.ts +35 -9
- package/corpus/templates/design/actions/generate-design.ts +146 -69
- package/corpus/templates/design/actions/generate-screens.ts +51 -19
- package/corpus/templates/design/actions/get-design-snapshot.ts +5 -1
- package/corpus/templates/design/actions/get-design.ts +2 -0
- package/corpus/templates/design/actions/import-design-project.ts +28 -9
- package/corpus/templates/design/actions/import-document.ts +22 -8
- package/corpus/templates/design/actions/index-design-system-with-builder.ts +6 -153
- package/corpus/templates/design/actions/navigate.ts +105 -54
- package/corpus/templates/design/actions/set-default-design-system.ts +17 -3
- package/corpus/templates/design/actions/show-design-questions.ts +2 -0
- package/corpus/templates/design/actions/update-design.ts +2 -1
- package/corpus/templates/design/actions/view-screen.ts +12 -6
- package/corpus/templates/design/app/components/design/CanvasContextMenu.tsx +4 -4
- package/corpus/templates/design/app/components/design/DesignCanvas.tsx +159 -41
- package/corpus/templates/design/app/components/design/DesignExtensionsPanel.tsx +8 -4
- package/corpus/templates/design/app/components/design/DrawOverlay.tsx +37 -42
- package/corpus/templates/design/app/components/design/EditPanel.tsx +336 -183
- package/corpus/templates/design/app/components/design/LayersPanel.tsx +153 -34
- package/corpus/templates/design/app/components/design/MultiScreenCanvas.tsx +135 -33
- package/corpus/templates/design/app/components/design/QuestionFlow.tsx +6 -0
- package/corpus/templates/design/app/components/design/TweaksPanel.tsx +2 -1
- package/corpus/templates/design/app/components/design/inspector/AlignmentMatrix.tsx +4 -10
- package/corpus/templates/design/app/components/design/inspector/AutoLayoutMatrix.tsx +84 -43
- package/corpus/templates/design/app/components/design/inspector/ConstraintsWidget.tsx +4 -4
- package/corpus/templates/design/app/components/design/inspector/{FigmaColorPicker.tsx → DesignColorPicker.tsx} +89 -62
- package/corpus/templates/design/app/components/design/inspector/ExportSettingsPanel.tsx +14 -26
- package/corpus/templates/design/app/components/design/inspector/GradientEditor.tsx +40 -12
- package/corpus/templates/design/app/components/design/inspector/ImageFillControls.tsx +13 -4
- package/corpus/templates/design/app/components/design/inspector/SHADER_INTEGRATION.md +13 -13
- package/corpus/templates/design/app/components/design/inspector/ScrubInput.tsx +13 -9
- package/corpus/templates/design/app/components/design/inspector/ShaderControls.tsx +13 -4
- package/corpus/templates/design/app/components/design/inspector/ShaderFillsPanel.tsx +6 -6
- package/corpus/templates/design/app/components/design/inspector/{figma-icons.tsx → design-icons.tsx} +2 -2
- package/corpus/templates/design/app/components/design/inspector/index.ts +12 -12
- package/corpus/templates/design/app/components/design/inspector/scrub-input-utils.ts +5 -2
- package/corpus/templates/design/app/components/editor/PromptDialog.tsx +3 -3
- package/corpus/templates/design/app/components/layout/Layout.tsx +5 -2
- package/corpus/templates/design/app/components/layout/Sidebar.tsx +1 -1
- package/corpus/templates/design/app/components/visual-editor/CanvasCommentPins.tsx +167 -91
- package/corpus/templates/design/app/components/visual-editor/DrawOverlay.tsx +16 -3
- package/corpus/templates/design/app/components/visual-editor/SaveStatusIndicator.tsx +15 -0
- package/corpus/templates/design/app/global.css +4 -0
- package/corpus/templates/design/app/hooks/use-design-system.ts +4 -1
- package/corpus/templates/design/app/hooks/use-navigation-state.ts +38 -3
- package/corpus/templates/design/app/hooks/useDesignHotkeys.ts +9 -2
- package/corpus/templates/design/app/i18n/zh-TW.ts +22 -0
- package/corpus/templates/design/app/i18n-data.ts +527 -0
- package/corpus/templates/design/app/lib/design-systems.ts +6 -4
- package/corpus/templates/design/app/lib/design-templates.ts +15 -3
- package/corpus/templates/design/app/pages/DesignEditor.tsx +641 -158
- package/corpus/templates/design/app/pages/DesignSystemSetup.tsx +42 -34
- package/corpus/templates/design/app/pages/VisualEdit.tsx +100 -0
- package/corpus/templates/design/app/root.tsx +42 -9
- package/corpus/templates/design/app/routes/visual-edit.tsx +7 -0
- package/corpus/templates/design/changelog/2026-06-28-live-cursors-now-keep-names-beside-a-cleaner-pointer-marker.md +1 -1
- package/corpus/templates/design/changelog/2026-06-28-mode-switching-now-lives-in-a-compact-bottom-right-icon-dock.md +1 -1
- package/corpus/templates/design/changelog/2026-06-28-visual-code-design-mode.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-design-generation-prompts-now-show-connect-ai-before-sending.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-design-mode-top-chrome-now-groups-collaborators-preview-shar.md +1 -1
- package/corpus/templates/design/changelog/2026-06-29-fixed-design-editor-exports-and-gradient-edits-so-multi-scre.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-longer-hosted-agent-turns.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-png-export-handles-modern-css-color-functions-more-reliably.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-png-export-now-ignores-duplicate-clicks-while-a-download-is-.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-public-visual-edit-and-shared-design-links-now-invite-visito.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-visual-edit-actions-now-reject-missing-design-targets-before.md +6 -0
- package/corpus/templates/design/e2e/README.md +71 -0
- package/corpus/templates/design/e2e/global-setup.ts +157 -0
- package/corpus/templates/design/e2e/helpers.ts +148 -0
- package/corpus/templates/design/netlify.toml +3 -4
- package/corpus/templates/design/package.json +5 -1
- package/corpus/templates/design/playwright.config.ts +51 -0
- package/corpus/templates/design/server/handlers/index-design-system-with-builder.ts +121 -0
- package/corpus/templates/design/server/handlers/uploads.ts +89 -38
- package/corpus/templates/design/server/lib/builder-design-system-proxy.ts +181 -0
- package/corpus/templates/design/server/lib/coding-handoff.ts +33 -4
- package/corpus/templates/design/server/lib/design-export.ts +35 -8
- package/corpus/templates/design/server/plugins/agent-chat.ts +4 -0
- package/corpus/templates/design/server/plugins/auth.ts +10 -1
- package/corpus/templates/design/server/routes/api/index-design-system-with-builder.post.ts +1 -0
- package/corpus/templates/design/shared/api.ts +2 -0
- package/corpus/templates/design/shared/apply-edits.ts +12 -8
- package/corpus/templates/design/shared/canvas-math.ts +19 -1
- package/corpus/templates/design/shared/code-layer.ts +87 -28
- package/corpus/templates/design/shared/generation-session.ts +1 -0
- package/corpus/templates/design/shared/resolve-tweaks.ts +4 -3
- package/corpus/templates/design/shared/shader-presets.ts +10 -0
- package/corpus/templates/design/shared/source-mode.ts +9 -0
- package/corpus/templates/design/vitest.config.ts +2 -1
- package/corpus/templates/mail/app/components/layout/AppLayout.tsx +1 -1
- package/corpus/templates/plan/.agents/skills/visual-plan/references/canvas.md +1 -1
- package/corpus/templates/plan/.agents/skills/visual-plan/references/local-files.md +14 -5
- package/corpus/templates/plan/.agents/skills/visual-recap/references/local-files.md +14 -5
- package/corpus/templates/plan/AGENTS.md +1 -1
- package/corpus/templates/plan/actions/create-plan-design.ts +1 -1
- package/corpus/templates/plan/actions/validate-local-plan-source.ts +110 -0
- package/corpus/templates/plan/app/pages/PlansPage.tsx +1 -0
- package/corpus/templates/plan/docs/commenting-ux-plan.md +2 -2
- package/corpus/templates/plan/server/lib/plan-connector-catalog.ts +1 -0
- package/corpus/templates/plan/server/lib/public-action-paths.ts +1 -0
- package/corpus/templates/plan/server/plan-content.ts +1 -1
- package/corpus/templates/plan/server/ui-plan-html.ts +2 -2
- package/corpus/templates/slides/actions/index-design-system-with-builder.ts +6 -153
- package/corpus/templates/slides/app/components/design-system/DesignSystemSetup.tsx +53 -38
- package/corpus/templates/slides/app/components/design-system/{fig-import-response.ts → builder-index-response.ts} +9 -6
- package/corpus/templates/slides/app/components/visual-editor/MultiSelectChip.tsx +1 -1
- package/corpus/templates/slides/changelog/2026-06-29-design-system-setup-now-indexes-uploaded-design-files-throug.md +6 -0
- package/corpus/templates/slides/changelog/2026-06-29-longer-hosted-agent-turns.md +6 -0
- package/corpus/templates/slides/netlify.toml +3 -6
- package/corpus/templates/slides/server/handlers/index-design-system-with-builder.ts +116 -0
- package/corpus/templates/slides/server/lib/builder-design-system-proxy.ts +179 -0
- package/corpus/templates/slides/server/plugins/agent-chat.ts +4 -1
- package/corpus/templates/slides/server/routes/api/index-design-system-with-builder.post.ts +1 -0
- package/dist/action.d.ts +23 -0
- package/dist/action.d.ts.map +1 -1
- package/dist/action.js +9 -0
- package/dist/action.js.map +1 -1
- package/dist/agent/durable-background.d.ts +9 -7
- package/dist/agent/durable-background.d.ts.map +1 -1
- package/dist/agent/durable-background.js +27 -11
- package/dist/agent/durable-background.js.map +1 -1
- package/dist/agent/production-agent.d.ts +10 -0
- package/dist/agent/production-agent.d.ts.map +1 -1
- package/dist/agent/production-agent.js +4 -1
- package/dist/agent/production-agent.js.map +1 -1
- package/dist/agent/run-loop-with-resume.d.ts +2 -1
- package/dist/agent/run-loop-with-resume.d.ts.map +1 -1
- package/dist/agent/run-loop-with-resume.js +2 -2
- package/dist/agent/run-loop-with-resume.js.map +1 -1
- package/dist/brand-kit/fig/index.d.ts +4 -4
- package/dist/brand-kit/fig/index.d.ts.map +1 -1
- package/dist/brand-kit/fig/index.js +14 -27
- package/dist/brand-kit/fig/index.js.map +1 -1
- package/dist/cli/index.js +1 -1
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/mcp-config-writers.d.ts +15 -7
- package/dist/cli/mcp-config-writers.d.ts.map +1 -1
- package/dist/cli/mcp-config-writers.js +198 -45
- package/dist/cli/mcp-config-writers.js.map +1 -1
- package/dist/cli/plan-local.d.ts +30 -0
- package/dist/cli/plan-local.d.ts.map +1 -1
- package/dist/cli/plan-local.js +281 -56
- package/dist/cli/plan-local.js.map +1 -1
- package/dist/cli/skills.d.ts +2 -2
- package/dist/cli/skills.d.ts.map +1 -1
- package/dist/cli/skills.js +32 -8
- package/dist/cli/skills.js.map +1 -1
- package/dist/client/AssistantChat.d.ts.map +1 -1
- package/dist/client/AssistantChat.js +11 -1
- package/dist/client/AssistantChat.js.map +1 -1
- package/dist/client/agent-chat.d.ts.map +1 -1
- package/dist/client/agent-chat.js +15 -2
- package/dist/client/agent-chat.js.map +1 -1
- package/dist/client/composer/PromptComposer.d.ts.map +1 -1
- package/dist/client/composer/PromptComposer.js +35 -1
- package/dist/client/composer/PromptComposer.js.map +1 -1
- package/dist/client/org/OrgSwitcher.js +1 -1
- package/dist/client/org/OrgSwitcher.js.map +1 -1
- package/dist/client/sharing/ShareButton.d.ts +1 -1
- package/dist/client/sharing/ShareButton.d.ts.map +1 -1
- package/dist/client/sharing/ShareButton.js +2 -15
- package/dist/client/sharing/ShareButton.js.map +1 -1
- package/dist/collab/presence.d.ts +1 -1
- package/dist/collab/presence.js +1 -1
- package/dist/collab/presence.js.map +1 -1
- package/dist/collab/routes.d.ts +1 -1
- package/dist/file-upload/actions/upload-image.d.ts +2 -2
- package/dist/mcp/connect-route.d.ts.map +1 -1
- package/dist/mcp/connect-route.js +34 -5
- package/dist/mcp/connect-route.js.map +1 -1
- package/dist/observability/routes.d.ts +2 -2
- package/dist/progress/routes.d.ts +1 -1
- package/dist/resources/handlers.d.ts +1 -1
- package/dist/server/action-discovery.d.ts.map +1 -1
- package/dist/server/action-discovery.js +5 -0
- package/dist/server/action-discovery.js.map +1 -1
- package/dist/server/action-routes.d.ts.map +1 -1
- package/dist/server/action-routes.js +14 -0
- package/dist/server/action-routes.js.map +1 -1
- package/dist/server/agent-chat-plugin.d.ts +6 -0
- package/dist/server/agent-chat-plugin.d.ts.map +1 -1
- package/dist/server/agent-chat-plugin.js +12 -3
- package/dist/server/agent-chat-plugin.js.map +1 -1
- package/dist/vite/client.d.ts.map +1 -1
- package/dist/vite/client.js +12 -1
- package/dist/vite/client.js.map +1 -1
- package/docs/content/locales/ar-SA/real-time-collaboration.mdx +2 -2
- package/docs/content/locales/ar-SA/template-design.mdx +1 -1
- package/docs/content/locales/de-DE/real-time-collaboration.mdx +3 -3
- package/docs/content/locales/de-DE/template-design.mdx +1 -1
- package/docs/content/locales/es-ES/real-time-collaboration.mdx +2 -2
- package/docs/content/locales/es-ES/template-design.mdx +1 -1
- package/docs/content/locales/fr-FR/real-time-collaboration.mdx +2 -2
- package/docs/content/locales/fr-FR/template-design.mdx +1 -1
- package/docs/content/locales/hi-IN/template-design.mdx +1 -1
- package/docs/content/locales/ja-JP/real-time-collaboration.mdx +2 -2
- package/docs/content/locales/ja-JP/template-design.mdx +1 -1
- package/docs/content/locales/ko-KR/real-time-collaboration.mdx +2 -2
- package/docs/content/locales/ko-KR/template-design.mdx +1 -1
- package/docs/content/locales/pt-BR/real-time-collaboration.mdx +2 -2
- package/docs/content/locales/pt-BR/template-design.mdx +1 -1
- package/docs/content/locales/zh-CN/real-time-collaboration.mdx +2 -2
- package/docs/content/locales/zh-CN/template-design.mdx +1 -1
- package/docs/content/locales/zh-TW/real-time-collaboration.mdx +2 -2
- package/docs/content/locales/zh-TW/template-design.mdx +1 -1
- package/docs/content/real-time-collaboration.mdx +2 -2
- package/docs/content/template-design.mdx +1 -1
- package/package.json +3 -7
- package/corpus/core/src/brand-kit/fig/decode.ts +0 -410
- package/corpus/core/src/brand-kit/fig/extract-design-system.ts +0 -947
- package/corpus/core/src/brand-kit/fig/fig-to-html.ts +0 -1906
- package/corpus/templates/design/actions/import-figma.ts +0 -55
- package/corpus/templates/design/changelog/2026-06-28-figma-style-code-design-mode.md +0 -6
- package/corpus/templates/design/server/handlers/import-figma-system.ts +0 -86
- package/corpus/templates/design/server/routes/api/import-figma-system.post.ts +0 -1
- package/corpus/templates/slides/server/handlers/import-figma-system.ts +0 -101
- package/corpus/templates/slides/server/routes/api/import-figma-system.post.ts +0 -1
- package/dist/brand-kit/fig/decode.d.ts +0 -33
- package/dist/brand-kit/fig/decode.d.ts.map +0 -1
- package/dist/brand-kit/fig/decode.js +0 -358
- package/dist/brand-kit/fig/decode.js.map +0 -1
- package/dist/brand-kit/fig/extract-design-system.d.ts +0 -44
- package/dist/brand-kit/fig/extract-design-system.d.ts.map +0 -1
- package/dist/brand-kit/fig/extract-design-system.js +0 -752
- package/dist/brand-kit/fig/extract-design-system.js.map +0 -1
- package/dist/brand-kit/fig/fig-to-html.d.ts +0 -246
- package/dist/brand-kit/fig/fig-to-html.d.ts.map +0 -1
- package/dist/brand-kit/fig/fig-to-html.js +0 -1506
- package/dist/brand-kit/fig/fig-to-html.js.map +0 -1
|
@@ -39,7 +39,7 @@ import {
|
|
|
39
39
|
IconSizingMin,
|
|
40
40
|
IconSizingRemove,
|
|
41
41
|
IconSizingVariable,
|
|
42
|
-
} from "./
|
|
42
|
+
} from "./design-icons";
|
|
43
43
|
import { ScrubInput } from "./ScrubInput";
|
|
44
44
|
|
|
45
45
|
export type AutoLayoutDirection = "horizontal" | "vertical";
|
|
@@ -78,7 +78,7 @@ export interface AutoLayoutMatrixValue {
|
|
|
78
78
|
};
|
|
79
79
|
/**
|
|
80
80
|
* Currently-set min/max constraints per axis, in px. `null` means the
|
|
81
|
-
* constraint is not set (
|
|
81
|
+
* constraint is not set (the design editor shows the "Add min/max…" menu item instead of
|
|
82
82
|
* a sub-row). Optional so existing callers are unaffected.
|
|
83
83
|
*/
|
|
84
84
|
childMinMax?: {
|
|
@@ -92,6 +92,12 @@ export interface AutoLayoutMatrixValue {
|
|
|
92
92
|
* unaffected.
|
|
93
93
|
*/
|
|
94
94
|
display?: "flex" | "block";
|
|
95
|
+
/**
|
|
96
|
+
* When true, the gap mode is "Auto" (CSS `justify-content: space-between`).
|
|
97
|
+
* When false or omitted, gap mode is "Fixed" (a numeric gap value).
|
|
98
|
+
* Drives the checked state of the Fixed/Auto items in the gap dropdown.
|
|
99
|
+
*/
|
|
100
|
+
spaceBetween?: boolean;
|
|
95
101
|
}
|
|
96
102
|
|
|
97
103
|
export interface AutoLayoutMatrixLabels {
|
|
@@ -157,7 +163,7 @@ export interface AutoLayoutMatrixProps {
|
|
|
157
163
|
) => void;
|
|
158
164
|
/**
|
|
159
165
|
* Invoked when the user picks "Apply variable…". Optional — when omitted the
|
|
160
|
-
* variable row is still shown but disabled (placeholder), matching
|
|
166
|
+
* variable row is still shown but disabled (placeholder), matching the design editor when
|
|
161
167
|
* no variable collections exist.
|
|
162
168
|
*/
|
|
163
169
|
onApplyVariable?: (axis: AutoLayoutSizingAxis) => void;
|
|
@@ -245,12 +251,14 @@ export function AutoLayoutMatrix({
|
|
|
245
251
|
}: AutoLayoutMatrixProps) {
|
|
246
252
|
const copy = { ...DEFAULT_AUTO_LAYOUT_LABELS, ...labels };
|
|
247
253
|
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
+
// Show left/top as the representative value when padding is linked.
|
|
255
|
+
// Averaging the two sides would silently destroy asymmetric padding on the
|
|
256
|
+
// next edit — the onChange handler sets both sides to the same number, so
|
|
257
|
+
// whatever is displayed becomes the new value for both sides. Using the
|
|
258
|
+
// left/top value means scrubbing up/down from the current value preserves
|
|
259
|
+
// the user's intent without a silent lossy round-trip through the average.
|
|
260
|
+
const horizontalPaddingValue = value.padding.left;
|
|
261
|
+
const verticalPaddingValue = value.padding.top;
|
|
254
262
|
|
|
255
263
|
const activeFlow = getFlowOption(value);
|
|
256
264
|
const isBlock = activeFlow === "normal";
|
|
@@ -282,13 +290,13 @@ export function AutoLayoutMatrix({
|
|
|
282
290
|
{/* ── Flow ── */}
|
|
283
291
|
<div className="space-y-1.5">
|
|
284
292
|
<ControlLabel>
|
|
285
|
-
{"Flow" /* i18n-ignore
|
|
293
|
+
{"Flow" /* i18n-ignore design inspector label */}
|
|
286
294
|
</ControlLabel>
|
|
287
295
|
<div className="flex items-center gap-1.5">
|
|
288
296
|
{/* 4-segment flow bar: normal / vertical / horizontal / grid */}
|
|
289
297
|
<div className="flex h-7 flex-1 items-center gap-0.5 rounded-md bg-[var(--design-editor-control-bg)] p-0.5">
|
|
290
298
|
<FlowButton
|
|
291
|
-
label={"Normal flow" /* i18n-ignore
|
|
299
|
+
label={"Normal flow" /* i18n-ignore design inspector label */}
|
|
292
300
|
active={activeFlow === "normal"}
|
|
293
301
|
disabled={disabled}
|
|
294
302
|
onClick={() => selectFlow("normal")}
|
|
@@ -312,7 +320,7 @@ export function AutoLayoutMatrix({
|
|
|
312
320
|
<IconFlowHorizontal className="size-3.5" />
|
|
313
321
|
</FlowButton>
|
|
314
322
|
<FlowButton
|
|
315
|
-
label={"Grid" /* i18n-ignore
|
|
323
|
+
label={"Grid" /* i18n-ignore design inspector label */}
|
|
316
324
|
active={activeFlow === "grid"}
|
|
317
325
|
disabled={disabled}
|
|
318
326
|
onClick={() => selectFlow("grid")}
|
|
@@ -347,7 +355,7 @@ export function AutoLayoutMatrix({
|
|
|
347
355
|
{/* ── Resizing ── */}
|
|
348
356
|
<div className="space-y-1.5">
|
|
349
357
|
<ControlLabel>
|
|
350
|
-
{"Resizing" /* i18n-ignore
|
|
358
|
+
{"Resizing" /* i18n-ignore design inspector label */}
|
|
351
359
|
</ControlLabel>
|
|
352
360
|
<div className="grid grid-cols-[1fr_1fr_auto] items-start gap-1.5">
|
|
353
361
|
<SizingField
|
|
@@ -414,7 +422,7 @@ export function AutoLayoutMatrix({
|
|
|
414
422
|
{/* Left: Alignment label + compact 3×3 matrix (no border box) */}
|
|
415
423
|
<div className="space-y-1.5">
|
|
416
424
|
<ControlLabel>
|
|
417
|
-
{"Alignment" /* i18n-ignore
|
|
425
|
+
{"Alignment" /* i18n-ignore design inspector label */}
|
|
418
426
|
</ControlLabel>
|
|
419
427
|
<CompactAlignmentMatrix
|
|
420
428
|
value={value.alignment}
|
|
@@ -434,6 +442,8 @@ export function AutoLayoutMatrix({
|
|
|
434
442
|
onDistribute={onDistribute}
|
|
435
443
|
label={copy.gap}
|
|
436
444
|
disabled={disabled || isBlock}
|
|
445
|
+
direction={value.direction}
|
|
446
|
+
gapMode={value.spaceBetween ? "auto" : "fixed"}
|
|
437
447
|
/>
|
|
438
448
|
</div>
|
|
439
449
|
</div>
|
|
@@ -584,9 +594,9 @@ const ALIGNMENT_CELLS: Array<{
|
|
|
584
594
|
/**
|
|
585
595
|
* Compact 3×3 alignment grid (no border box). Inactive cells show a faint dot;
|
|
586
596
|
* the active cell shows accent bars oriented by flow — horizontal bars for a
|
|
587
|
-
* vertical flow, vertical bars for a horizontal flow (
|
|
597
|
+
* vertical flow, vertical bars for a horizontal flow (editor convention).
|
|
588
598
|
* When `onDistribute` is provided, two distribute buttons (H + V) are rendered
|
|
589
|
-
* below the grid, matching
|
|
599
|
+
* below the grid, matching the design editor's inspector layout.
|
|
590
600
|
*/
|
|
591
601
|
function CompactAlignmentMatrix({
|
|
592
602
|
value,
|
|
@@ -651,7 +661,7 @@ function CompactAlignmentMatrix({
|
|
|
651
661
|
<button
|
|
652
662
|
type="button"
|
|
653
663
|
aria-label={
|
|
654
|
-
"Distribute horizontal spacing" /* i18n-ignore
|
|
664
|
+
"Distribute horizontal spacing" /* i18n-ignore design inspector tooltip */
|
|
655
665
|
}
|
|
656
666
|
disabled={disabled}
|
|
657
667
|
onClick={() => onDistribute("horizontal")}
|
|
@@ -666,7 +676,7 @@ function CompactAlignmentMatrix({
|
|
|
666
676
|
</TooltipTrigger>
|
|
667
677
|
<TooltipContent>
|
|
668
678
|
{
|
|
669
|
-
"Distribute horizontal spacing" /* i18n-ignore
|
|
679
|
+
"Distribute horizontal spacing" /* i18n-ignore design inspector tooltip */
|
|
670
680
|
}
|
|
671
681
|
</TooltipContent>
|
|
672
682
|
</Tooltip>
|
|
@@ -675,7 +685,7 @@ function CompactAlignmentMatrix({
|
|
|
675
685
|
<button
|
|
676
686
|
type="button"
|
|
677
687
|
aria-label={
|
|
678
|
-
"Distribute vertical spacing" /* i18n-ignore
|
|
688
|
+
"Distribute vertical spacing" /* i18n-ignore design inspector tooltip */
|
|
679
689
|
}
|
|
680
690
|
disabled={disabled}
|
|
681
691
|
onClick={() => onDistribute("vertical")}
|
|
@@ -690,7 +700,7 @@ function CompactAlignmentMatrix({
|
|
|
690
700
|
</TooltipTrigger>
|
|
691
701
|
<TooltipContent>
|
|
692
702
|
{
|
|
693
|
-
"Distribute vertical spacing" /* i18n-ignore
|
|
703
|
+
"Distribute vertical spacing" /* i18n-ignore design inspector tooltip */
|
|
694
704
|
}
|
|
695
705
|
</TooltipContent>
|
|
696
706
|
</Tooltip>
|
|
@@ -834,12 +844,16 @@ function GapField({
|
|
|
834
844
|
onDistribute,
|
|
835
845
|
label,
|
|
836
846
|
disabled,
|
|
847
|
+
direction,
|
|
848
|
+
gapMode = "fixed",
|
|
837
849
|
}: {
|
|
838
850
|
value: number;
|
|
839
851
|
onGapChange: (gap: number) => void;
|
|
840
852
|
onDistribute?: (axis: DistributionAxis) => void;
|
|
841
853
|
label: string;
|
|
842
854
|
disabled: boolean;
|
|
855
|
+
direction: AutoLayoutDirection;
|
|
856
|
+
gapMode?: "fixed" | "auto";
|
|
843
857
|
}) {
|
|
844
858
|
return (
|
|
845
859
|
<div className="flex items-center gap-1.5">
|
|
@@ -897,26 +911,26 @@ function GapField({
|
|
|
897
911
|
sideOffset={4}
|
|
898
912
|
>
|
|
899
913
|
<DropdownMenuCheckboxItem
|
|
900
|
-
checked
|
|
914
|
+
checked={gapMode !== "auto"}
|
|
901
915
|
className="text-[12px]"
|
|
902
916
|
onSelect={() => {
|
|
903
917
|
/* Fixed gap: keep current numeric value (already numeric). */
|
|
904
918
|
}}
|
|
905
919
|
>
|
|
906
|
-
{"Fixed" /* i18n-ignore
|
|
920
|
+
{"Fixed" /* i18n-ignore design gap mode label */}
|
|
907
921
|
</DropdownMenuCheckboxItem>
|
|
908
922
|
<DropdownMenuCheckboxItem
|
|
909
|
-
checked={
|
|
923
|
+
checked={gapMode === "auto"}
|
|
910
924
|
className="text-[12px]"
|
|
911
|
-
onSelect={() => onDistribute(
|
|
925
|
+
onSelect={() => onDistribute(direction)}
|
|
912
926
|
>
|
|
913
|
-
{"Auto" /* i18n-ignore
|
|
927
|
+
{"Auto" /* i18n-ignore design gap mode label */}
|
|
914
928
|
</DropdownMenuCheckboxItem>
|
|
915
929
|
</DropdownMenuContent>
|
|
916
930
|
</DropdownMenu>
|
|
917
931
|
) : null}
|
|
918
932
|
</div>
|
|
919
|
-
{/* Sliders / advanced spacing icon (
|
|
933
|
+
{/* Sliders / advanced spacing icon (the design editor's tune control) */}
|
|
920
934
|
<Tooltip>
|
|
921
935
|
<TooltipTrigger asChild>
|
|
922
936
|
<Button
|
|
@@ -927,7 +941,7 @@ function GapField({
|
|
|
927
941
|
aria-label={
|
|
928
942
|
"Advanced gap settings" /* i18n-ignore inspector tooltip */
|
|
929
943
|
}
|
|
930
|
-
onClick={() => onDistribute?.(
|
|
944
|
+
onClick={() => onDistribute?.(direction)}
|
|
931
945
|
className="size-7 shrink-0 rounded-md text-muted-foreground hover:bg-[var(--design-editor-control-bg)] hover:text-foreground"
|
|
932
946
|
>
|
|
933
947
|
<IconSlidersMini />
|
|
@@ -1050,8 +1064,8 @@ export interface SizingFieldProps {
|
|
|
1050
1064
|
}
|
|
1051
1065
|
|
|
1052
1066
|
/**
|
|
1053
|
-
*
|
|
1054
|
-
* is the full
|
|
1067
|
+
* design-editor sizing field. Trigger renders `[axis | value | mode ▾]`; the menu
|
|
1068
|
+
* is the full design resizing dropdown:
|
|
1055
1069
|
* Fixed · Hug contents · Fill container
|
|
1056
1070
|
* ──────────────────────
|
|
1057
1071
|
* Add min … · Add max …
|
|
@@ -1076,8 +1090,13 @@ export function SizingField({
|
|
|
1076
1090
|
}: SizingFieldProps) {
|
|
1077
1091
|
const labels = { ...DEFAULT_AUTO_LAYOUT_LABELS, ...labelOverrides };
|
|
1078
1092
|
const isWidth = sizingAxis === "horizontal";
|
|
1079
|
-
//
|
|
1080
|
-
|
|
1093
|
+
// Local pending state for a newly-opened constraint editor. Holds the kind
|
|
1094
|
+
// and seed value so the sub-row is visible before the user has confirmed a
|
|
1095
|
+
// value. We only commit to onMinMaxChange when the user types or scrubs.
|
|
1096
|
+
const [pending, setPending] = useState<{
|
|
1097
|
+
kind: "min" | "max";
|
|
1098
|
+
seed: number;
|
|
1099
|
+
} | null>(null);
|
|
1081
1100
|
|
|
1082
1101
|
const minValue = minMax?.min ?? null;
|
|
1083
1102
|
const maxValue = minMax?.max ?? null;
|
|
@@ -1087,7 +1106,7 @@ export function SizingField({
|
|
|
1087
1106
|
const canHug = options.includes("hug");
|
|
1088
1107
|
const canFill = options.includes("fill");
|
|
1089
1108
|
|
|
1090
|
-
//
|
|
1109
|
+
// design rule: when Fixed, show ONLY the numeric value + chevron (no word).
|
|
1091
1110
|
// When Hug / Fill, show value + the mode word.
|
|
1092
1111
|
const showWord = value !== "fixed";
|
|
1093
1112
|
|
|
@@ -1097,10 +1116,12 @@ export function SizingField({
|
|
|
1097
1116
|
const maxLabel = isWidth ? labels.maxWidth : labels.maxHeight;
|
|
1098
1117
|
|
|
1099
1118
|
const openEditor = (kind: "min" | "max") => {
|
|
1100
|
-
//
|
|
1119
|
+
// Compute a sensible seed but do NOT write it to the parent yet — only
|
|
1120
|
+
// show the pending sub-row. The value is committed when the user first
|
|
1121
|
+
// scrubs/types in the ConstraintSubRow.
|
|
1101
1122
|
const seed = Math.max(0, Math.round(resolvedSize ?? 0));
|
|
1102
|
-
|
|
1103
|
-
|
|
1123
|
+
const seedValue = kind === "min" ? seed : seed || 1;
|
|
1124
|
+
setPending({ kind, seed: seedValue });
|
|
1104
1125
|
};
|
|
1105
1126
|
|
|
1106
1127
|
return (
|
|
@@ -1213,9 +1234,21 @@ export function SizingField({
|
|
|
1213
1234
|
onChange={(next) => onMinMaxChange?.(sizingAxis, "min", next)}
|
|
1214
1235
|
onRemove={() => {
|
|
1215
1236
|
onMinMaxChange?.(sizingAxis, "min", null);
|
|
1216
|
-
setEditing((cur) => (cur === "min" ? null : cur));
|
|
1217
1237
|
}}
|
|
1218
1238
|
/>
|
|
1239
|
+
) : pending?.kind === "min" ? (
|
|
1240
|
+
// Pending (uncommitted) min row — shown before the user confirms a value.
|
|
1241
|
+
<ConstraintSubRow
|
|
1242
|
+
label={minLabel}
|
|
1243
|
+
value={pending.seed}
|
|
1244
|
+
disabled={disabled}
|
|
1245
|
+
removeLabel={labels.removeConstraint}
|
|
1246
|
+
onChange={(next) => {
|
|
1247
|
+
setPending(null);
|
|
1248
|
+
onMinMaxChange?.(sizingAxis, "min", next);
|
|
1249
|
+
}}
|
|
1250
|
+
onRemove={() => setPending(null)}
|
|
1251
|
+
/>
|
|
1219
1252
|
) : null}
|
|
1220
1253
|
{hasMax ? (
|
|
1221
1254
|
<ConstraintSubRow
|
|
@@ -1226,9 +1259,21 @@ export function SizingField({
|
|
|
1226
1259
|
onChange={(next) => onMinMaxChange?.(sizingAxis, "max", next)}
|
|
1227
1260
|
onRemove={() => {
|
|
1228
1261
|
onMinMaxChange?.(sizingAxis, "max", null);
|
|
1229
|
-
setEditing((cur) => (cur === "max" ? null : cur));
|
|
1230
1262
|
}}
|
|
1231
1263
|
/>
|
|
1264
|
+
) : pending?.kind === "max" ? (
|
|
1265
|
+
// Pending (uncommitted) max row — shown before the user confirms a value.
|
|
1266
|
+
<ConstraintSubRow
|
|
1267
|
+
label={maxLabel}
|
|
1268
|
+
value={pending.seed}
|
|
1269
|
+
disabled={disabled}
|
|
1270
|
+
removeLabel={labels.removeConstraint}
|
|
1271
|
+
onChange={(next) => {
|
|
1272
|
+
setPending(null);
|
|
1273
|
+
onMinMaxChange?.(sizingAxis, "max", next);
|
|
1274
|
+
}}
|
|
1275
|
+
onRemove={() => setPending(null)}
|
|
1276
|
+
/>
|
|
1232
1277
|
) : null}
|
|
1233
1278
|
</div>
|
|
1234
1279
|
);
|
|
@@ -1251,11 +1296,7 @@ function SizingMenuItem({
|
|
|
1251
1296
|
return (
|
|
1252
1297
|
<DropdownMenuItem
|
|
1253
1298
|
disabled={disabled}
|
|
1254
|
-
onSelect={
|
|
1255
|
-
// Keep the menu's selection semantics but route through our handler.
|
|
1256
|
-
event.preventDefault();
|
|
1257
|
-
onSelect();
|
|
1258
|
-
}}
|
|
1299
|
+
onSelect={onSelect}
|
|
1259
1300
|
className="gap-2 pl-2 pr-2 text-[12px]"
|
|
1260
1301
|
>
|
|
1261
1302
|
<span className="flex size-4 shrink-0 items-center justify-center text-muted-foreground">
|
|
@@ -1353,7 +1394,7 @@ function CheckMini() {
|
|
|
1353
1394
|
// Inline SVG glyphs (Tabler-weight, 24px viewBox)
|
|
1354
1395
|
// ─────────────────────────────────────────────────
|
|
1355
1396
|
|
|
1356
|
-
/** Minimal downward chevron — matches the
|
|
1397
|
+
/** Minimal downward chevron — matches the design caret weight. */
|
|
1357
1398
|
function ChevronDownMini() {
|
|
1358
1399
|
return (
|
|
1359
1400
|
<svg
|
|
@@ -66,7 +66,7 @@ const DEFAULT_LABELS: ConstraintsWidgetLabels = {
|
|
|
66
66
|
// ── pin-box geometry ────────────────────────────────────────────────────────
|
|
67
67
|
// The preview box is 40×40px (size-10). Inside it sits an 18×14px inner rect
|
|
68
68
|
// (representing a child element) centered at (20,20). The proportions match
|
|
69
|
-
//
|
|
69
|
+
// the design editor's "little box" widget — inner rect is ~45–50% of the outer box width
|
|
70
70
|
// and slightly shorter in height to resemble a real element.
|
|
71
71
|
//
|
|
72
72
|
// Edge pins: 5px long, 2px wide, placed 2px from the box edge (flush to border).
|
|
@@ -83,7 +83,7 @@ const DEFAULT_LABELS: ConstraintsWidgetLabels = {
|
|
|
83
83
|
//
|
|
84
84
|
// Center marker: for h=center or v=center, a single accent line runs through
|
|
85
85
|
// the full width/height of the box (including through the inner rect), drawn
|
|
86
|
-
// on top at the midpoint — matching
|
|
86
|
+
// on top at the midpoint — matching the design editor's solid crosshair treatment.
|
|
87
87
|
//
|
|
88
88
|
// Scale mode: all four pins on that axis render dashed, accent color.
|
|
89
89
|
|
|
@@ -93,7 +93,7 @@ const INNER_H = 14; // inner rect height (slightly shorter than wide = realistic
|
|
|
93
93
|
const INNER_X = (BOX - INNER_W) / 2; // 11
|
|
94
94
|
const INNER_Y = (BOX - INNER_H) / 2; // 13
|
|
95
95
|
const PIN_LEN = 5; // visual pin length
|
|
96
|
-
const PIN_W = 2; // pin stroke width (
|
|
96
|
+
const PIN_W = 2; // pin stroke width (design editor: 2px thick pins)
|
|
97
97
|
const MARGIN = 2; // gap between outer box edge and pin start
|
|
98
98
|
const CENTER = BOX / 2; // 20
|
|
99
99
|
|
|
@@ -264,7 +264,7 @@ function PinBox({
|
|
|
264
264
|
/>
|
|
265
265
|
|
|
266
266
|
{/* center crosshair lines — drawn THROUGH the full box width/height
|
|
267
|
-
(including through the inner rect), matching
|
|
267
|
+
(including through the inner rect), matching the design editor's solid crosshair.
|
|
268
268
|
Only rendered when the constraint is "center" on that axis. */}
|
|
269
269
|
{hCenter && (
|
|
270
270
|
<line
|