@agent-native/core 0.80.4 → 0.80.6
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 +28 -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 +21 -0
- package/corpus/core/src/agent/durable-background.ts +32 -11
- package/corpus/core/src/agent/production-agent.ts +11 -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/create.ts +1 -0
- 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/skills.ts +18 -3
- 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/agent-chat-plugin.ts +20 -0
- package/corpus/core/src/sharing/registry.ts +17 -0
- package/corpus/core/src/templates/default/pnpm-workspace.yaml +1 -0
- package/corpus/core/src/templates/workspace-root/pnpm-workspace.yaml +1 -0
- 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/recorder/recorder-engine.ts +1 -1
- package/corpus/templates/content/AGENTS.md +57 -44
- package/corpus/templates/content/README.md +16 -0
- package/corpus/templates/content/actions/_builder-cms-read-client.ts +125 -0
- package/corpus/templates/content/actions/_builder-cms-source-adapter.ts +28 -6
- package/corpus/templates/content/actions/_builder-cms-write-adapter.ts +238 -69
- package/corpus/templates/content/actions/_builder-cms-write-settings.ts +125 -43
- package/corpus/templates/content/actions/_database-source-utils.ts +746 -97
- package/corpus/templates/content/actions/_database-utils.ts +17 -14
- package/corpus/templates/content/actions/_federation-join.ts +14 -2
- package/corpus/templates/content/actions/_join-suggestion.ts +89 -14
- package/corpus/templates/content/actions/_local-file-documents.ts +2 -1
- package/corpus/templates/content/actions/attach-content-database-source.ts +124 -5
- package/corpus/templates/content/actions/bind-content-database-source-field.ts +256 -0
- package/corpus/templates/content/actions/change-content-database-source-role.ts +420 -0
- package/corpus/templates/content/actions/create-document.ts +8 -0
- package/corpus/templates/content/actions/execute-builder-source-batch.ts +282 -0
- package/corpus/templates/content/actions/execute-builder-source-execution.ts +220 -8
- package/corpus/templates/content/actions/get-content-database.ts +10 -2
- package/corpus/templates/content/actions/prepare-builder-source-execution.ts +19 -2
- package/corpus/templates/content/actions/prepare-builder-source-review.ts +47 -15
- package/corpus/templates/content/actions/refresh-content-database-source.ts +11 -4
- package/corpus/templates/content/actions/review-content-database-source-change-set.ts +6 -2
- package/corpus/templates/content/actions/set-content-database-source-write-mode.ts +32 -12
- package/corpus/templates/content/actions/stage-builder-revision.ts +14 -10
- package/corpus/templates/content/actions/validate-builder-source-execution.ts +25 -3
- 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/DocumentDatabase.tsx +1520 -553
- package/corpus/templates/content/app/components/editor/DocumentEditor.tsx +3 -0
- package/corpus/templates/content/app/components/editor/DocumentProperties.tsx +150 -1
- package/corpus/templates/content/app/components/editor/VisualEditor.tsx +19 -0
- package/corpus/templates/content/app/components/editor/database/DatabaseView.tsx +647 -66
- package/corpus/templates/content/app/components/editor/database-sources/BuilderSourceReviewDialog.tsx +543 -204
- 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/hooks/use-content-database.ts +62 -0
- package/corpus/templates/content/app/i18n/zh-TW.ts +76 -0
- package/corpus/templates/content/app/i18n-data.ts +924 -0
- package/corpus/templates/content/changelog/2026-06-29-builder-review-checks-now-preserve-publish-and-unpublish-cho.md +6 -0
- package/corpus/templates/content/changelog/2026-06-29-database-sources-can-now-be-added-as-more-rows-or-matched.md +6 -0
- package/corpus/templates/content/changelog/2026-06-29-fixed-loading-the-final-rows-in-larger-databases-without-bre.md +6 -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/api.ts +91 -1
- 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/content/vite.config.ts +14 -7
- 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.md +1 -1
- package/corpus/templates/plan/actions/create-plan-design.ts +1 -1
- package/corpus/templates/plan/actions/validate-local-plan-source.ts +2 -10
- 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/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 +15 -0
- package/dist/action.d.ts.map +1 -1
- package/dist/action.js +6 -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 +7 -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/create.d.ts.map +1 -1
- package/dist/cli/create.js +1 -0
- package/dist/cli/create.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/skills.d.ts +1 -1
- package/dist/cli/skills.d.ts.map +1 -1
- package/dist/cli/skills.js +18 -3
- 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/notifications/routes.d.ts +2 -2
- package/dist/observability/routes.d.ts +8 -8
- 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/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/server/agent-engine-api-key-route.d.ts +1 -1
- package/dist/sharing/registry.d.ts.map +1 -1
- package/dist/sharing/registry.js +11 -0
- package/dist/sharing/registry.js.map +1 -1
- package/dist/templates/default/pnpm-workspace.yaml +1 -0
- package/dist/templates/workspace-root/pnpm-workspace.yaml +1 -0
- 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/src/templates/default/pnpm-workspace.yaml +1 -0
- package/src/templates/workspace-root/pnpm-workspace.yaml +1 -0
- 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
|
@@ -1162,6 +1162,9 @@ function DocumentEditorBody({ documentId, document }: DocumentEditorBodyProps) {
|
|
|
1162
1162
|
user={currentUser}
|
|
1163
1163
|
editable={canEdit}
|
|
1164
1164
|
localFileMode={isLocalFileDocument}
|
|
1165
|
+
localFilePath={
|
|
1166
|
+
isLocalFileDocument ? document.source?.path : null
|
|
1167
|
+
}
|
|
1165
1168
|
onComment={
|
|
1166
1169
|
canEdit && !isLocalFileDocument
|
|
1167
1170
|
? handleComment
|
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
} from "@agent-native/core/client";
|
|
7
7
|
import type {
|
|
8
8
|
AddContentDatabaseSourceFieldPropertyRequest,
|
|
9
|
+
BindContentDatabaseSourceFieldRequest,
|
|
9
10
|
ContentDatabaseResponse,
|
|
10
11
|
ContentDatabaseSourceFieldPropertyResponse,
|
|
11
12
|
ContentDatabaseSource,
|
|
@@ -848,6 +849,22 @@ function PropertyRow({
|
|
|
848
849
|
);
|
|
849
850
|
}
|
|
850
851
|
|
|
852
|
+
// Mirror of the server's propertyTypeForSourceField — keep in sync. Used to
|
|
853
|
+
// gate which source fields can bind into a column (type compatibility).
|
|
854
|
+
function propertyTypeForSourceFieldType(
|
|
855
|
+
sourceFieldType: string,
|
|
856
|
+
): DocumentPropertyType {
|
|
857
|
+
if (sourceFieldType === "number") return "number";
|
|
858
|
+
if (sourceFieldType === "datetime" || sourceFieldType === "date") {
|
|
859
|
+
return "date";
|
|
860
|
+
}
|
|
861
|
+
if (sourceFieldType === "url") return "url";
|
|
862
|
+
if (sourceFieldType === "boolean" || sourceFieldType === "checkbox") {
|
|
863
|
+
return "checkbox";
|
|
864
|
+
}
|
|
865
|
+
return "text";
|
|
866
|
+
}
|
|
867
|
+
|
|
851
868
|
export function PropertyManagementPopover({
|
|
852
869
|
property,
|
|
853
870
|
documentId,
|
|
@@ -857,6 +874,7 @@ export function PropertyManagementPopover({
|
|
|
857
874
|
triggerTrailing,
|
|
858
875
|
sourceField,
|
|
859
876
|
sourceAttached = false,
|
|
877
|
+
sources,
|
|
860
878
|
}: {
|
|
861
879
|
property: DocumentProperty;
|
|
862
880
|
documentId: string;
|
|
@@ -866,12 +884,65 @@ export function PropertyManagementPopover({
|
|
|
866
884
|
triggerTrailing?: ReactNode;
|
|
867
885
|
sourceField?: ContentDatabaseSource["fields"][number] | null;
|
|
868
886
|
sourceAttached?: boolean;
|
|
887
|
+
sources?: ContentDatabaseSource[];
|
|
869
888
|
}) {
|
|
870
889
|
const t = useT();
|
|
871
890
|
const configure = useConfigureDocumentProperty(documentId);
|
|
872
891
|
const duplicate = useDuplicateDocumentProperty(documentId);
|
|
873
892
|
const remove = useDeleteDocumentProperty(documentId);
|
|
874
893
|
const { data: propertiesData } = useDocumentProperties(documentId);
|
|
894
|
+
const bindQueryClient = useQueryClient();
|
|
895
|
+
const bindSourceField = useActionMutation<
|
|
896
|
+
ContentDatabaseResponse,
|
|
897
|
+
BindContentDatabaseSourceFieldRequest
|
|
898
|
+
>("bind-content-database-source-field", {
|
|
899
|
+
onSuccess: () => {
|
|
900
|
+
bindQueryClient.invalidateQueries({
|
|
901
|
+
queryKey: ["action", "get-content-database"],
|
|
902
|
+
});
|
|
903
|
+
bindQueryClient.invalidateQueries({
|
|
904
|
+
queryKey: ["action", "list-document-properties", { documentId }],
|
|
905
|
+
});
|
|
906
|
+
},
|
|
907
|
+
});
|
|
908
|
+
// Per-source field bindings for THIS column (row-union): which source fields
|
|
909
|
+
// feed it, and which unmapped, type-compatible fields could be bound into it
|
|
910
|
+
// (at most one field per source per column).
|
|
911
|
+
const allSourceFieldEntries = (sources ?? []).flatMap((src) =>
|
|
912
|
+
src.fields.map((field) => ({ source: src, field })),
|
|
913
|
+
);
|
|
914
|
+
const boundSourceFields = allSourceFieldEntries.filter(
|
|
915
|
+
(entry) => entry.field.propertyId === property.definition.id,
|
|
916
|
+
);
|
|
917
|
+
const boundSourceIds = new Set(boundSourceFields.map((b) => b.source.id));
|
|
918
|
+
const columnType = property.definition.type;
|
|
919
|
+
const bindableSourceFields = allSourceFieldEntries.filter((entry) => {
|
|
920
|
+
if (
|
|
921
|
+
entry.field.propertyId ||
|
|
922
|
+
entry.field.mappingType === "title" ||
|
|
923
|
+
entry.field.mappingType === "system" ||
|
|
924
|
+
entry.field.writeOwner === "derived" ||
|
|
925
|
+
boundSourceIds.has(entry.source.id)
|
|
926
|
+
) {
|
|
927
|
+
return false;
|
|
928
|
+
}
|
|
929
|
+
const fieldIsMultiValue = [
|
|
930
|
+
"list",
|
|
931
|
+
"array",
|
|
932
|
+
"tags",
|
|
933
|
+
"multi_select",
|
|
934
|
+
].includes(entry.field.sourceFieldType.trim().toLowerCase());
|
|
935
|
+
// text columns accept any SCALAR field but not multi-value ones (lossy);
|
|
936
|
+
// otherwise the derived type must match the column type.
|
|
937
|
+
return columnType === "text"
|
|
938
|
+
? !fieldIsMultiValue
|
|
939
|
+
: columnType ===
|
|
940
|
+
propertyTypeForSourceFieldType(entry.field.sourceFieldType);
|
|
941
|
+
});
|
|
942
|
+
const showBindingEditor =
|
|
943
|
+
!isComputedPropertyType(columnType) &&
|
|
944
|
+
columnType !== "blocks" &&
|
|
945
|
+
(boundSourceFields.length > 0 || bindableSourceFields.length > 0);
|
|
875
946
|
// Whether deleting THIS property removes the last Blocks field of the type —
|
|
876
947
|
// i.e. the body. Drives the yellow warning in the delete dialog.
|
|
877
948
|
const blocksFieldCount = (propertiesData?.properties ?? []).filter(
|
|
@@ -1169,7 +1240,85 @@ export function PropertyManagementPopover({
|
|
|
1169
1240
|
</div>
|
|
1170
1241
|
) : null}
|
|
1171
1242
|
|
|
1172
|
-
{
|
|
1243
|
+
{showBindingEditor ? (
|
|
1244
|
+
<>
|
|
1245
|
+
<DropdownMenuSeparator />
|
|
1246
|
+
<div className="grid gap-1.5 px-2 py-1.5 text-xs">
|
|
1247
|
+
<div className="font-medium text-foreground">
|
|
1248
|
+
{t("database.sourcesFeedingThisColumn")}
|
|
1249
|
+
</div>
|
|
1250
|
+
{boundSourceFields.length > 0 ? (
|
|
1251
|
+
<div className="grid gap-1">
|
|
1252
|
+
{boundSourceFields.map(({ source: src, field }) => (
|
|
1253
|
+
<div
|
|
1254
|
+
key={field.id}
|
|
1255
|
+
className="flex min-w-0 items-center gap-1.5"
|
|
1256
|
+
>
|
|
1257
|
+
<IconLink className="size-3.5 shrink-0 text-muted-foreground" />
|
|
1258
|
+
<span className="min-w-0 flex-1 truncate text-muted-foreground">
|
|
1259
|
+
<span className="text-foreground">
|
|
1260
|
+
{src.sourceName}
|
|
1261
|
+
</span>{" "}
|
|
1262
|
+
· {field.sourceFieldLabel}
|
|
1263
|
+
</span>
|
|
1264
|
+
<button
|
|
1265
|
+
type="button"
|
|
1266
|
+
aria-label={`Unbind ${field.sourceFieldLabel} from ${src.sourceName}`}
|
|
1267
|
+
disabled={bindSourceField.isPending}
|
|
1268
|
+
className="shrink-0 rounded p-0.5 text-muted-foreground hover:bg-muted hover:text-foreground disabled:opacity-50"
|
|
1269
|
+
onClick={() =>
|
|
1270
|
+
void bindSourceField.mutateAsync({
|
|
1271
|
+
documentId,
|
|
1272
|
+
sourceFieldId: field.id,
|
|
1273
|
+
propertyId: null,
|
|
1274
|
+
})
|
|
1275
|
+
}
|
|
1276
|
+
>
|
|
1277
|
+
<IconX className="size-3.5" />
|
|
1278
|
+
</button>
|
|
1279
|
+
</div>
|
|
1280
|
+
))}
|
|
1281
|
+
</div>
|
|
1282
|
+
) : (
|
|
1283
|
+
<div className="text-muted-foreground">
|
|
1284
|
+
{t("database.noSourceFieldsBoundYet")}
|
|
1285
|
+
</div>
|
|
1286
|
+
)}
|
|
1287
|
+
{bindableSourceFields.length > 0 ? (
|
|
1288
|
+
<DropdownMenuSub>
|
|
1289
|
+
<DropdownMenuSubTrigger className="mt-0.5 rounded px-1.5 py-1 text-xs">
|
|
1290
|
+
<IconPlus className="mr-1.5 size-3.5 text-muted-foreground" />
|
|
1291
|
+
{t("database.bindAFieldFromASource")}
|
|
1292
|
+
</DropdownMenuSubTrigger>
|
|
1293
|
+
<DropdownMenuSubContent className="max-h-80 w-64 overflow-auto">
|
|
1294
|
+
{bindableSourceFields.map(({ source: src, field }) => (
|
|
1295
|
+
<DropdownMenuItem
|
|
1296
|
+
key={field.id}
|
|
1297
|
+
disabled={bindSourceField.isPending}
|
|
1298
|
+
onSelect={(event) => {
|
|
1299
|
+
event.preventDefault();
|
|
1300
|
+
void bindSourceField.mutateAsync({
|
|
1301
|
+
documentId,
|
|
1302
|
+
sourceFieldId: field.id,
|
|
1303
|
+
propertyId: property.definition.id,
|
|
1304
|
+
});
|
|
1305
|
+
}}
|
|
1306
|
+
>
|
|
1307
|
+
<IconLink className="mr-2 size-3.5 shrink-0 text-muted-foreground" />
|
|
1308
|
+
<span className="min-w-0 flex-1 truncate">
|
|
1309
|
+
{field.sourceFieldLabel}
|
|
1310
|
+
</span>
|
|
1311
|
+
<span className="ml-2 shrink-0 truncate text-[11px] text-muted-foreground">
|
|
1312
|
+
{src.sourceName}
|
|
1313
|
+
</span>
|
|
1314
|
+
</DropdownMenuItem>
|
|
1315
|
+
))}
|
|
1316
|
+
</DropdownMenuSubContent>
|
|
1317
|
+
</DropdownMenuSub>
|
|
1318
|
+
) : null}
|
|
1319
|
+
</div>
|
|
1320
|
+
</>
|
|
1321
|
+
) : sourceAttached ? (
|
|
1173
1322
|
<>
|
|
1174
1323
|
<DropdownMenuSeparator />
|
|
1175
1324
|
<div className="grid gap-1 px-2 py-1.5 text-xs">
|
|
@@ -52,6 +52,7 @@ import {
|
|
|
52
52
|
commentHighlightKey,
|
|
53
53
|
type CommentHighlightSpec,
|
|
54
54
|
} from "./extensions/CommentHighlight";
|
|
55
|
+
import { ContentReferenceNode } from "./extensions/ContentReferenceNode";
|
|
55
56
|
import { DragHandle } from "./extensions/DragHandle";
|
|
56
57
|
import { ImageNode } from "./extensions/ImageNode";
|
|
57
58
|
import {
|
|
@@ -745,6 +746,10 @@ interface VisualEditorProps {
|
|
|
745
746
|
editable?: boolean;
|
|
746
747
|
/** Local-file docs should not persist mount-time/schema normalization echoes. */
|
|
747
748
|
localFileMode?: boolean;
|
|
749
|
+
/** Workspace-relative local artifact path for resolving inline references. */
|
|
750
|
+
localFilePath?: string | null;
|
|
751
|
+
/** Current nested local-file reference preview depth. */
|
|
752
|
+
referenceDepth?: number;
|
|
748
753
|
/** Called when user selects text and clicks "Comment" in bubble toolbar. */
|
|
749
754
|
onComment?: (
|
|
750
755
|
quotedText: string,
|
|
@@ -891,6 +896,8 @@ interface VisualEditorExtensionOptions {
|
|
|
891
896
|
onJoinTitle?: (text: string) => void;
|
|
892
897
|
resolveNotionPageLink?: (notionPageId: string) => NotionPageLink | null;
|
|
893
898
|
onOpenNotionPageLink?: (documentId: string) => void;
|
|
899
|
+
localFilePath?: string | null;
|
|
900
|
+
referenceDepth?: number;
|
|
894
901
|
}
|
|
895
902
|
|
|
896
903
|
function hasAncestorType(
|
|
@@ -1214,6 +1221,8 @@ export function createVisualEditorExtensions({
|
|
|
1214
1221
|
onJoinTitle,
|
|
1215
1222
|
resolveNotionPageLink,
|
|
1216
1223
|
onOpenNotionPageLink,
|
|
1224
|
+
localFilePath,
|
|
1225
|
+
referenceDepth = 0,
|
|
1217
1226
|
}: VisualEditorExtensionOptions = {}): Extensions {
|
|
1218
1227
|
// Build on the SHARED editor core (StarterKit base + the Collaboration /
|
|
1219
1228
|
// CollaborationCaret wiring + collab undo/redo gating + ordering), then inject
|
|
@@ -1298,6 +1307,10 @@ export function createVisualEditorExtensions({
|
|
|
1298
1307
|
// `VisualEditor` below. Mounted after the Notion nodes and before the
|
|
1299
1308
|
// Markdown extension so the NFM <-> doc round-trip recognizes the node.
|
|
1300
1309
|
RegistryBlockNode,
|
|
1310
|
+
ContentReferenceNode.configure({
|
|
1311
|
+
currentPath: localFilePath ?? null,
|
|
1312
|
+
referenceDepth,
|
|
1313
|
+
}),
|
|
1301
1314
|
LocalMdxComponentNode,
|
|
1302
1315
|
CommentHighlight,
|
|
1303
1316
|
DragHandle,
|
|
@@ -1568,6 +1581,8 @@ export function VisualEditor({
|
|
|
1568
1581
|
user,
|
|
1569
1582
|
editable = true,
|
|
1570
1583
|
localFileMode = false,
|
|
1584
|
+
localFilePath,
|
|
1585
|
+
referenceDepth,
|
|
1571
1586
|
onComment,
|
|
1572
1587
|
commentThreads,
|
|
1573
1588
|
activeThreadId,
|
|
@@ -1636,6 +1651,8 @@ export function VisualEditor({
|
|
|
1636
1651
|
onJoinTitle,
|
|
1637
1652
|
resolveNotionPageLink,
|
|
1638
1653
|
onOpenNotionPageLink,
|
|
1654
|
+
localFilePath,
|
|
1655
|
+
referenceDepth,
|
|
1639
1656
|
}),
|
|
1640
1657
|
[
|
|
1641
1658
|
documentId,
|
|
@@ -1648,6 +1665,8 @@ export function VisualEditor({
|
|
|
1648
1665
|
onJoinTitle,
|
|
1649
1666
|
resolveNotionPageLink,
|
|
1650
1667
|
onOpenNotionPageLink,
|
|
1668
|
+
localFilePath,
|
|
1669
|
+
referenceDepth,
|
|
1651
1670
|
],
|
|
1652
1671
|
);
|
|
1653
1672
|
|