@agent-native/core 0.82.0 → 0.84.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/corpus/README.md +1 -1
- package/corpus/core/CHANGELOG.md +34 -0
- package/corpus/core/README.md +2 -2
- package/corpus/core/docs/content/cloneable-saas.mdx +2 -2
- package/corpus/core/docs/content/faq.mdx +1 -1
- package/corpus/core/docs/content/locales/ar-SA/cloneable-saas.mdx +2 -2
- package/corpus/core/docs/content/locales/ar-SA/faq.mdx +1 -1
- package/corpus/core/docs/content/locales/ar-SA/template-chat.mdx +1 -1
- package/corpus/core/docs/content/locales/de-DE/cloneable-saas.mdx +2 -2
- package/corpus/core/docs/content/locales/de-DE/faq.mdx +1 -1
- package/corpus/core/docs/content/locales/de-DE/template-chat.mdx +1 -1
- package/corpus/core/docs/content/locales/es-ES/cloneable-saas.mdx +2 -2
- package/corpus/core/docs/content/locales/es-ES/faq.mdx +1 -1
- package/corpus/core/docs/content/locales/es-ES/template-chat.mdx +1 -1
- package/corpus/core/docs/content/locales/fr-FR/cloneable-saas.mdx +2 -2
- package/corpus/core/docs/content/locales/fr-FR/faq.mdx +1 -1
- package/corpus/core/docs/content/locales/fr-FR/template-chat.mdx +1 -1
- package/corpus/core/docs/content/locales/hi-IN/cloneable-saas.mdx +2 -2
- package/corpus/core/docs/content/locales/hi-IN/faq.mdx +1 -1
- package/corpus/core/docs/content/locales/hi-IN/template-chat.mdx +1 -1
- package/corpus/core/docs/content/locales/ja-JP/cloneable-saas.mdx +2 -2
- package/corpus/core/docs/content/locales/ja-JP/faq.mdx +1 -1
- package/corpus/core/docs/content/locales/ja-JP/template-chat.mdx +1 -1
- package/corpus/core/docs/content/locales/ko-KR/cloneable-saas.mdx +2 -2
- package/corpus/core/docs/content/locales/ko-KR/faq.mdx +1 -1
- package/corpus/core/docs/content/locales/ko-KR/template-chat.mdx +1 -1
- package/corpus/core/docs/content/locales/pt-BR/cloneable-saas.mdx +2 -2
- package/corpus/core/docs/content/locales/pt-BR/faq.mdx +1 -1
- package/corpus/core/docs/content/locales/pt-BR/template-chat.mdx +1 -1
- package/corpus/core/docs/content/locales/zh-CN/cloneable-saas.mdx +2 -2
- package/corpus/core/docs/content/locales/zh-CN/faq.mdx +1 -1
- package/corpus/core/docs/content/locales/zh-CN/template-chat.mdx +1 -1
- package/corpus/core/docs/content/locales/zh-TW/cloneable-saas.mdx +2 -2
- package/corpus/core/docs/content/locales/zh-TW/faq.mdx +1 -1
- package/corpus/core/docs/content/locales/zh-TW/template-chat.mdx +1 -1
- package/corpus/core/docs/content/template-chat.mdx +1 -1
- package/corpus/core/package.json +1 -1
- package/corpus/core/src/agent/engine/builtin.ts +1 -1
- package/corpus/core/src/agent/engine/output-tokens.ts +1 -1
- package/corpus/core/src/agent/harness/acp-adapter.ts +28 -4
- package/corpus/core/src/agent/harness/ai-sdk-adapter.ts +3 -0
- package/corpus/core/src/agent/harness/translate.ts +3 -0
- package/corpus/core/src/agent/harness/types.ts +1 -0
- package/corpus/core/src/agent/model-config.ts +34 -13
- package/corpus/core/src/agent/production-agent.ts +87 -10
- package/corpus/core/src/agent/thread-data-builder.ts +29 -4
- package/corpus/core/src/agent/tool-call-journal.ts +109 -48
- package/corpus/core/src/agent/types.ts +6 -1
- package/corpus/core/src/cli/design-connect.ts +106 -0
- package/corpus/core/src/cli/gateway-helpers.ts +17 -0
- package/corpus/core/src/cli/recap.ts +0 -2
- package/corpus/core/src/cli/skills.ts +54 -16
- package/corpus/core/src/cli/workspace-dev.ts +29 -5
- package/corpus/core/src/client/AssistantChat.tsx +89 -42
- package/corpus/core/src/client/CommandMenu.tsx +34 -12
- package/corpus/core/src/client/DefaultSpinner.tsx +8 -1
- package/corpus/core/src/client/chat/message-components.tsx +49 -1
- package/corpus/core/src/client/chat/repo-helpers.ts +71 -0
- package/corpus/core/src/client/chat/run-recovery.tsx +15 -5
- package/corpus/core/src/client/components/ApiKeySettings.tsx +8 -8
- package/corpus/core/src/client/components/CodeRequiredDialog.tsx +26 -15
- package/corpus/core/src/client/components/MissingKeyCard.tsx +13 -6
- package/corpus/core/src/client/composer/TiptapComposer.tsx +4 -3
- package/corpus/core/src/client/extensions/ExtensionsSidebarSection.tsx +0 -1
- package/corpus/core/src/client/guided-questions.tsx +21 -27
- package/corpus/core/src/client/integrations/IntegrationCard.tsx +1 -1
- package/corpus/core/src/client/integrations/IntegrationsPanel.tsx +1 -1
- package/corpus/core/src/client/onboarding/OnboardingBanner.tsx +2 -2
- package/corpus/core/src/client/onboarding/OnboardingPanel.tsx +23 -19
- package/corpus/core/src/client/resources/ResourceEditor.tsx +18 -10
- package/corpus/core/src/client/resources/ResourcesPanel.tsx +5 -1
- package/corpus/core/src/client/settings/SettingsPanel.tsx +8 -3
- package/corpus/core/src/client/settings/useBuilderStatus.ts +8 -41
- package/corpus/core/src/client/useProductionAgent.ts +6 -2
- package/corpus/core/src/deploy/build.ts +1 -1
- package/corpus/core/src/observability/traces.ts +3 -3
- package/corpus/core/src/onboarding/default-steps.ts +1 -1
- package/corpus/core/src/scripts/agent-engines/manage-agent-engine.ts +1 -1
- package/corpus/core/src/scripts/agent-engines/set-agent-engine.ts +1 -1
- package/corpus/core/src/server/agent-chat-plugin.ts +177 -81
- package/corpus/core/src/server/core-routes-plugin.ts +7 -1
- package/corpus/core/src/server/open-route.ts +59 -40
- package/corpus/core/src/shared/reasoning-effort.ts +2 -0
- package/corpus/core/src/sharing/access.ts +22 -2
- package/corpus/core/src/sharing/registry.ts +18 -0
- package/corpus/core/src/styles/agent-native.css +104 -20
- package/corpus/core/src/styles/rich-markdown-editor.css +11 -10
- package/corpus/templates/analytics/actions/hubspot-deals.ts +64 -4
- package/corpus/templates/analytics/app/components/dashboard/CumulativeNetChart.tsx +10 -10
- package/corpus/templates/analytics/app/components/dashboard/RevenueChart.tsx +10 -10
- package/corpus/templates/analytics/app/components/dashboard/RevenueComparisonChart.tsx +6 -5
- package/corpus/templates/analytics/app/components/dashboard/TimeSeriesChart.tsx +9 -9
- package/corpus/templates/analytics/app/global.css +4 -0
- package/corpus/templates/analytics/app/lib/chart-theme.ts +13 -0
- package/corpus/templates/analytics/app/pages/adhoc/_shared/KpiChart.tsx +22 -24
- package/corpus/templates/analytics/changelog/2026-06-30-dashboard-charts-now-use-theme-aware-tooltip-and-grid-colors.md +6 -0
- package/corpus/templates/analytics/changelog/2026-06-30-fixed-ask-composer-spacing-so-the-chat-field-has-a-comfortab.md +6 -0
- package/corpus/templates/calendar/AGENTS.md +4 -0
- package/corpus/templates/calendar/actions/connect-google-calendar.ts +80 -0
- package/corpus/templates/calendar/changelog/2026-06-30-calendar-now-gives-the-agent-a-safe-google-connection-link-i.md +6 -0
- package/corpus/templates/calendar/server/plugins/agent-chat.ts +4 -0
- package/corpus/templates/content/.env.local.example +6 -0
- package/corpus/templates/content/AGENTS.md +10 -1
- package/corpus/templates/content/actions/_builder-cms-read-client.ts +14 -1
- package/corpus/templates/content/actions/_builder-cms-source-adapter.ts +43 -0
- package/corpus/templates/content/actions/_builder-cms-write-adapter.ts +79 -7
- package/corpus/templates/content/actions/_database-source-utils.ts +987 -22
- package/corpus/templates/content/actions/_database-utils.ts +41 -0
- package/corpus/templates/content/actions/_local-file-documents.ts +74 -1
- package/corpus/templates/content/actions/attach-content-database-source.ts +33 -8
- package/corpus/templates/content/actions/change-content-database-source-role.ts +14 -0
- package/corpus/templates/content/actions/disconnect-content-database-source.ts +3 -0
- package/corpus/templates/content/actions/execute-builder-source-execution.ts +71 -3
- package/corpus/templates/content/actions/list-content-databases.ts +41 -33
- package/corpus/templates/content/actions/process-builder-body-hydration.ts +47 -0
- package/corpus/templates/content/actions/update-document.ts +93 -0
- package/corpus/templates/content/app/blocks/SourceComponentBlock.tsx +277 -0
- package/corpus/templates/content/app/blocks/contentBlockRegistry.tsx +2 -0
- package/corpus/templates/content/app/components/editor/BubbleToolbar.tsx +5 -5
- package/corpus/templates/content/app/components/editor/DocumentEditor.tsx +45 -4
- package/corpus/templates/content/app/components/editor/VisualEditor.tsx +5 -1
- package/corpus/templates/content/app/components/editor/database/DatabaseView.tsx +92 -0
- package/corpus/templates/content/app/components/editor/database-sources/BuilderSourceReviewDialog.tsx +5 -3
- package/corpus/templates/content/app/components/editor/extensions/registryBlocks.ts +41 -0
- package/corpus/templates/content/app/components/editor/registrySlashItems.ts +4 -0
- package/corpus/templates/content/app/global.css +16 -8
- package/corpus/templates/content/app/hooks/use-content-database.ts +24 -0
- package/corpus/templates/content/app/i18n/zh-TW.ts +24 -0
- package/corpus/templates/content/app/i18n-data.ts +212 -0
- package/corpus/templates/content/app/lib/content-command-search.ts +64 -0
- package/corpus/templates/content/app/root.tsx +236 -8
- package/corpus/templates/content/changelog/2026-06-29-builder-cms-sources-now-sync-article-bodies-through-content.md +6 -0
- package/corpus/templates/content/changelog/2026-06-30-builder-article-media-now-render-as-images-and-embeds-when-r.md +6 -0
- package/corpus/templates/content/changelog/2026-06-30-builder-source-components-now-render-as-preserved-preview-bl.md +6 -0
- package/corpus/templates/content/changelog/2026-06-30-cmd-k-search-now-opens-from-the-editor-and-finds-real-content.md +6 -0
- package/corpus/templates/content/changelog/2026-06-30-editor-floating-toolbars-now-use-theme-aware-colors-in-light.md +6 -0
- package/corpus/templates/content/package.json +3 -1
- package/corpus/templates/content/scripts/check-native-deps.mjs +57 -0
- package/corpus/templates/content/scripts/dev-database.mjs +83 -0
- package/corpus/templates/content/scripts/seed-demo-user.mjs +107 -0
- package/corpus/templates/content/server/db/schema.ts +27 -0
- package/corpus/templates/content/server/plugins/db.ts +33 -0
- package/corpus/templates/content/shared/api.ts +45 -0
- package/corpus/templates/content/shared/builder-mdx.ts +905 -5
- package/corpus/templates/content/shared/nfm-registry.ts +2 -0
- package/corpus/templates/content/shared/source-component-block.ts +141 -0
- package/corpus/templates/design/.agents/skills/visual-edit/SKILL.md +6 -1
- package/corpus/templates/design/actions/add-localhost-screens.ts +63 -8
- package/corpus/templates/design/actions/apply-motion-edit.ts +12 -46
- package/corpus/templates/design/actions/list-design-native-assets.ts +2 -1
- package/corpus/templates/design/actions/migrate-board-objects-to-file.ts +49 -1
- package/corpus/templates/design/actions/navigate.ts +3 -12
- package/corpus/templates/design/actions/open-visual-edit.ts +341 -0
- package/corpus/templates/design/actions/view-screen.ts +1 -1
- package/corpus/templates/design/app/components/design/CanvasContextMenu.tsx +1 -1
- package/corpus/templates/design/app/components/design/DesignCanvas.tsx +350 -15
- package/corpus/templates/design/app/components/design/DesignEditorSkeleton.tsx +71 -91
- package/corpus/templates/design/app/components/design/DesignExtensionsPanel.tsx +25 -27
- package/corpus/templates/design/app/components/design/DeviceFrame.tsx +1 -1
- package/corpus/templates/design/app/components/design/DrawOverlay.tsx +2 -2
- package/corpus/templates/design/app/components/design/EditPanel.tsx +1111 -570
- package/corpus/templates/design/app/components/design/LayersPanel.tsx +162 -32
- package/corpus/templates/design/app/components/design/MotionDock.tsx +268 -240
- package/corpus/templates/design/app/components/design/MultiScreenCanvas.tsx +1193 -207
- package/corpus/templates/design/app/components/design/QuestionFlow.tsx +1 -1
- package/corpus/templates/design/app/components/design/ReviewPanel.tsx +81 -102
- package/corpus/templates/design/app/components/design/StatesPanel.tsx +6 -6
- package/corpus/templates/design/app/components/design/TokensPanel.tsx +11 -11
- package/corpus/templates/design/app/components/design/TweaksPanel.tsx +9 -7
- package/corpus/templates/design/app/components/design/bridge/editor-chrome.bridge.ts +1225 -154
- package/corpus/templates/design/app/components/design/bridge/hit-test.bridge.ts +130 -37
- package/corpus/templates/design/app/components/design/canvas-primitive-style.ts +24 -11
- package/corpus/templates/design/app/components/design/inspector/AutoLayoutMatrix.tsx +184 -162
- package/corpus/templates/design/app/components/design/inspector/ConstraintsWidget.tsx +137 -79
- package/corpus/templates/design/app/components/design/inspector/DesignColorPicker.tsx +13 -13
- package/corpus/templates/design/app/components/design/inspector/ExportSettingsPanel.tsx +8 -8
- package/corpus/templates/design/app/components/design/inspector/GradientEditor.tsx +2 -2
- package/corpus/templates/design/app/components/design/inspector/ImageFillControls.tsx +4 -4
- package/corpus/templates/design/app/components/design/inspector/InspectorAiActions.tsx +3 -3
- package/corpus/templates/design/app/components/design/inspector/ScrubInput.tsx +13 -7
- package/corpus/templates/design/app/components/design/inspector/ShaderControls.tsx +14 -11
- package/corpus/templates/design/app/components/design/inspector/ShaderFillsPanel.tsx +4 -4
- package/corpus/templates/design/app/components/design/inspector/index.ts +2 -0
- package/corpus/templates/design/app/components/design/types.ts +19 -0
- package/corpus/templates/design/app/components/editor/PromptDialog.tsx +61 -78
- package/corpus/templates/design/app/components/layout/Header.tsx +0 -1
- package/corpus/templates/design/app/components/layout/Layout.tsx +3 -2
- package/corpus/templates/design/app/components/layout/Sidebar.tsx +0 -2
- package/corpus/templates/design/app/components/visual-editor/CanvasCommentPins.tsx +5 -4
- package/corpus/templates/design/app/components/visual-editor/DrawOverlay.tsx +1 -1
- package/corpus/templates/design/app/components/visual-editor/SaveStatusIndicator.tsx +2 -2
- package/corpus/templates/design/app/global.css +56 -0
- package/corpus/templates/design/app/hooks/use-agent-generating.ts +4 -5
- package/corpus/templates/design/app/hooks/use-navigation-state.ts +6 -7
- package/corpus/templates/design/app/hooks/use-question-flow.ts +3 -2
- package/corpus/templates/design/app/hooks/useAgentEditRequest.ts +6 -4
- package/corpus/templates/design/app/hooks/useDesignHotkeys.ts +6 -3
- package/corpus/templates/design/app/i18n/zh-TW.ts +5 -14
- package/corpus/templates/design/app/i18n-data.ts +63 -188
- package/corpus/templates/design/app/lib/agent-chat.ts +13 -0
- package/corpus/templates/design/app/pages/DesignEditor.tsx +1755 -401
- package/corpus/templates/design/app/pages/DesignSystemSetup.tsx +9 -5
- package/corpus/templates/design/app/pages/DesignSystems.tsx +2 -2
- package/corpus/templates/design/app/pages/Index.tsx +49 -26
- package/corpus/templates/design/app/pages/NotFound.tsx +25 -8
- package/corpus/templates/design/app/pages/VisualEdit.tsx +17 -5
- package/corpus/templates/design/app/routes/examples.tsx +1 -7
- package/corpus/templates/design/app/routes/templates.tsx +7 -4
- package/corpus/templates/design/changelog/2026-06-30-board-shapes-and-auto-layout-controls-are-clearer.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-canvas-editing-now-keeps-undo-redo-and-cross-screen-layer-mo.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-component-selections-now-use-purple-component-chrome-and-sho.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-constraints-now-stay-tucked-into-a-compact-inspector-preview.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-creating-a-component-now-opens-in-a-compact-inspector-popove.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-design-cards-no-longer-show-legacy-project-type-badges.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-design-chat-now-keeps-new-turns-in-the-visible-design-agent-.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-design-editor-panels-now-keep-their-compact-text-sizing-cons.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-design-no-longer-shows-the-connected-local-code-warning-bann.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-design-now-opens-to-the-files-panel-unless-a-generation-is-a.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-design-opens-with-a-cleaner-empty-canvas-and-loading-preview.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-design-tools-use-simpler-less-decorative-icons.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-dragging-absolute-elements-no-longer-shows-coordinate-labels.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-fixed-all-screens-opening-too-zoomed-in-by-default.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-fixed-the-public-design-assets-sidebar-so-native-components-.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-fixed-the-screen-overview-board-so-empty-board-space-no-long.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-full-view-screens-can-now-scroll-while-remaining-editable.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-inspector-element-headers-show-the-selected-html-tag-and-the.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-inspector-inputs-stay-compact-across-desktop-breakpoints.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-layers-can-be-multi-selected-from-the-canvas-and-edited-toge.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-local-visual-edit-links-can-edit-localhost-frames-without-si.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-localhost-visual-edit-frames-can-now-be-selected-and-edited.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-marquee-selection-now-works-inside-screens-multi-selected-la.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-motion-is-now-available-from-the-persistent-left-rail-and-th.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-motion-timeline-collapse-and-reopen-animations-feel-smoother.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-multi-select-outlines-now-stay-consistent-across-all-screens.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-new-board-shapes-now-start-with-neutral-gray-styling.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-new-designs-open-into-a-steadier-loading-state-before-the-ed.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-new-designs-show-a-loading-state-during-handoff-and-keep-edi.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-public-visual-edit-design-links-now-open-directly-instead-of.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-removed-the-confusing-states-section-from-the-design-editor-.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-removed-the-templates-gallery-from-design-navigation.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-share-stays-visible-as-soon-as-editable-designs-load.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-signed-out-save-and-share-controls-use-simpler-labels-and-op.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-text-added-on-the-canvas-now-focuses-cleanly-with-the-right-.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-the-design-editor-loading-skeleton-is-simpler-and-its-bottom.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-the-design-editor-loading-skeleton-now-follows-the-current-t.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-the-design-inspector-no-longer-shows-child-layout-controls-o.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-the-design-inspector-no-longer-shows-the-ask-ai-section-abov.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-the-design-review-panel-no-longer-shows-a-separate-inline-au.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-the-empty-designs-page-now-focuses-on-a-single-primary-new-d.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-the-layers-panel-header-stays-as-layers-while-multiple-items.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-the-missing-design-screen-now-uses-a-neutral-back-button.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-the-motion-timeline-now-closes-without-squeezing-the-canvas-.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-the-new-design-connect-ai-setup-now-lines-up-with-the-compos.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-the-screen-overview-board-now-blends-into-the-canvas-and-new.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-top-level-canvas-drops-now-show-screen-guides.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-top-level-canvas-layers-now-keep-a-transparent-backdrop-and-.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-top-level-canvas-layers-now-select-reliably-from-all-screens.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-visual-edit-can-open-and-refresh-localhost-screens-in-one-au.md +6 -0
- package/corpus/templates/design/e2e/helpers.ts +15 -4
- package/corpus/templates/design/server/db/index.ts +52 -0
- package/corpus/templates/design/server/plugins/agent-chat.ts +5 -0
- package/corpus/templates/design/server/plugins/auth.ts +1 -0
- package/corpus/templates/design/server/plugins/core-routes.ts +4 -0
- package/corpus/templates/design/shared/board-file.ts +380 -5
- package/corpus/templates/design/shared/board-objects.ts +2 -2
- package/corpus/templates/design/shared/code-layer.ts +50 -6
- package/corpus/templates/design/shared/motion-compiler.ts +27 -0
- package/corpus/templates/macros/app/components/DailyProgress.tsx +41 -37
- package/corpus/templates/macros/app/components/ExerciseCard.tsx +2 -2
- package/corpus/templates/macros/app/components/MealCard.tsx +2 -2
- package/corpus/templates/macros/app/components/VoiceDictation.tsx +1 -1
- package/corpus/templates/macros/app/components/WeeklyCaloriesChart.tsx +1 -1
- package/corpus/templates/macros/app/components/WeightCard.tsx +2 -2
- package/corpus/templates/macros/app/components/WeightTracker.tsx +1 -1
- package/corpus/templates/macros/app/components/layout/AppLayout.tsx +1 -1
- package/corpus/templates/macros/app/routes/_index.tsx +5 -5
- package/corpus/templates/macros/app/routes/analytics.tsx +1 -1
- package/corpus/templates/macros/changelog/2026-06-30-dashboard-loading-and-chart-surfaces-now-use-theme-aware-col.md +6 -0
- package/corpus/templates/mail/app/components/email/ComposeBubbleToolbar.tsx +14 -11
- package/corpus/templates/mail/app/global.css +3 -2
- package/corpus/templates/mail/changelog/2026-06-30-compose-floating-toolbars-now-use-theme-aware-colors-in-ligh.md +6 -0
- package/corpus/templates/plan/app/pages/PlansPage.tsx +2 -2
- package/corpus/templates/slides/app/components/deck/DeckCard.tsx +3 -3
- package/corpus/templates/slides/app/global.css +10 -0
- package/corpus/templates/slides/app/pages/Index.tsx +55 -51
- package/corpus/templates/slides/changelog/2026-06-30-deck-thumbnails-collapse-cleanly-to-one-column-when-the-chat.md +6 -0
- package/dist/agent/engine/anthropic-engine.d.ts +2 -2
- package/dist/agent/engine/anthropic-engine.d.ts.map +1 -1
- package/dist/agent/engine/builder-engine.d.ts +2 -2
- package/dist/agent/engine/builder-engine.d.ts.map +1 -1
- package/dist/agent/engine/builtin.js +1 -1
- package/dist/agent/engine/builtin.js.map +1 -1
- package/dist/agent/engine/output-tokens.js +1 -1
- package/dist/agent/engine/output-tokens.js.map +1 -1
- package/dist/agent/harness/acp-adapter.d.ts +4 -1
- package/dist/agent/harness/acp-adapter.d.ts.map +1 -1
- package/dist/agent/harness/acp-adapter.js +19 -2
- package/dist/agent/harness/acp-adapter.js.map +1 -1
- package/dist/agent/harness/ai-sdk-adapter.d.ts.map +1 -1
- package/dist/agent/harness/ai-sdk-adapter.js +3 -0
- package/dist/agent/harness/ai-sdk-adapter.js.map +1 -1
- package/dist/agent/harness/translate.d.ts.map +1 -1
- package/dist/agent/harness/translate.js +3 -0
- package/dist/agent/harness/translate.js.map +1 -1
- package/dist/agent/harness/types.d.ts +1 -0
- package/dist/agent/harness/types.d.ts.map +1 -1
- package/dist/agent/harness/types.js.map +1 -1
- package/dist/agent/model-config.d.ts +21 -20
- package/dist/agent/model-config.d.ts.map +1 -1
- package/dist/agent/model-config.js +31 -13
- package/dist/agent/model-config.js.map +1 -1
- package/dist/agent/production-agent.d.ts.map +1 -1
- package/dist/agent/production-agent.js +85 -10
- package/dist/agent/production-agent.js.map +1 -1
- package/dist/agent/thread-data-builder.d.ts.map +1 -1
- package/dist/agent/thread-data-builder.js +27 -6
- package/dist/agent/thread-data-builder.js.map +1 -1
- package/dist/agent/tool-call-journal.d.ts +11 -9
- package/dist/agent/tool-call-journal.d.ts.map +1 -1
- package/dist/agent/tool-call-journal.js +92 -40
- package/dist/agent/tool-call-journal.js.map +1 -1
- package/dist/agent/types.d.ts +5 -1
- package/dist/agent/types.d.ts.map +1 -1
- package/dist/agent/types.js.map +1 -1
- package/dist/cli/design-connect.d.ts.map +1 -1
- package/dist/cli/design-connect.js +84 -0
- package/dist/cli/design-connect.js.map +1 -1
- package/dist/cli/gateway-helpers.d.ts +4 -0
- package/dist/cli/gateway-helpers.d.ts.map +1 -1
- package/dist/cli/gateway-helpers.js +9 -0
- package/dist/cli/gateway-helpers.js.map +1 -1
- package/dist/cli/recap.d.ts.map +1 -1
- package/dist/cli/recap.js +0 -2
- package/dist/cli/recap.js.map +1 -1
- package/dist/cli/skills.d.ts.map +1 -1
- package/dist/cli/skills.js +54 -16
- package/dist/cli/skills.js.map +1 -1
- package/dist/cli/workspace-dev.d.ts.map +1 -1
- package/dist/cli/workspace-dev.js +33 -6
- package/dist/cli/workspace-dev.js.map +1 -1
- package/dist/client/AssistantChat.d.ts.map +1 -1
- package/dist/client/AssistantChat.js +72 -26
- package/dist/client/AssistantChat.js.map +1 -1
- package/dist/client/CommandMenu.d.ts +6 -2
- package/dist/client/CommandMenu.d.ts.map +1 -1
- package/dist/client/CommandMenu.js +25 -14
- package/dist/client/CommandMenu.js.map +1 -1
- package/dist/client/DefaultSpinner.d.ts.map +1 -1
- package/dist/client/DefaultSpinner.js +8 -1
- package/dist/client/DefaultSpinner.js.map +1 -1
- package/dist/client/chat/message-components.d.ts +7 -1
- package/dist/client/chat/message-components.d.ts.map +1 -1
- package/dist/client/chat/message-components.js +37 -1
- package/dist/client/chat/message-components.js.map +1 -1
- package/dist/client/chat/repo-helpers.d.ts +1 -0
- package/dist/client/chat/repo-helpers.d.ts.map +1 -1
- package/dist/client/chat/repo-helpers.js +59 -0
- package/dist/client/chat/repo-helpers.js.map +1 -1
- package/dist/client/chat/run-recovery.d.ts.map +1 -1
- package/dist/client/chat/run-recovery.js +4 -4
- package/dist/client/chat/run-recovery.js.map +1 -1
- package/dist/client/components/ApiKeySettings.js +8 -8
- package/dist/client/components/ApiKeySettings.js.map +1 -1
- package/dist/client/components/CodeRequiredDialog.d.ts.map +1 -1
- package/dist/client/components/CodeRequiredDialog.js +24 -15
- package/dist/client/components/CodeRequiredDialog.js.map +1 -1
- package/dist/client/components/MissingKeyCard.d.ts.map +1 -1
- package/dist/client/components/MissingKeyCard.js +11 -6
- package/dist/client/components/MissingKeyCard.js.map +1 -1
- package/dist/client/composer/TiptapComposer.d.ts.map +1 -1
- package/dist/client/composer/TiptapComposer.js +4 -3
- package/dist/client/composer/TiptapComposer.js.map +1 -1
- package/dist/client/extensions/ExtensionsSidebarSection.d.ts.map +1 -1
- package/dist/client/extensions/ExtensionsSidebarSection.js +1 -1
- package/dist/client/extensions/ExtensionsSidebarSection.js.map +1 -1
- package/dist/client/guided-questions.d.ts.map +1 -1
- package/dist/client/guided-questions.js +6 -6
- package/dist/client/guided-questions.js.map +1 -1
- package/dist/client/integrations/IntegrationCard.js +1 -1
- package/dist/client/integrations/IntegrationCard.js.map +1 -1
- package/dist/client/integrations/IntegrationsPanel.js +1 -1
- package/dist/client/integrations/IntegrationsPanel.js.map +1 -1
- package/dist/client/onboarding/OnboardingBanner.js +2 -2
- package/dist/client/onboarding/OnboardingBanner.js.map +1 -1
- package/dist/client/onboarding/OnboardingPanel.js +23 -19
- package/dist/client/onboarding/OnboardingPanel.js.map +1 -1
- package/dist/client/resources/ResourceEditor.d.ts.map +1 -1
- package/dist/client/resources/ResourceEditor.js +13 -10
- package/dist/client/resources/ResourceEditor.js.map +1 -1
- package/dist/client/resources/ResourcesPanel.d.ts.map +1 -1
- package/dist/client/resources/ResourcesPanel.js +2 -1
- package/dist/client/resources/ResourcesPanel.js.map +1 -1
- package/dist/client/settings/SettingsPanel.d.ts.map +1 -1
- package/dist/client/settings/SettingsPanel.js +8 -3
- package/dist/client/settings/SettingsPanel.js.map +1 -1
- package/dist/client/settings/useBuilderStatus.d.ts.map +1 -1
- package/dist/client/settings/useBuilderStatus.js +6 -38
- package/dist/client/settings/useBuilderStatus.js.map +1 -1
- package/dist/client/useProductionAgent.d.ts +2 -1
- package/dist/client/useProductionAgent.d.ts.map +1 -1
- package/dist/client/useProductionAgent.js.map +1 -1
- package/dist/deploy/build.js +1 -1
- package/dist/deploy/build.js.map +1 -1
- package/dist/notifications/routes.d.ts +3 -3
- package/dist/observability/routes.d.ts +3 -3
- package/dist/observability/traces.d.ts.map +1 -1
- package/dist/observability/traces.js.map +1 -1
- package/dist/onboarding/default-steps.js +1 -1
- package/dist/onboarding/default-steps.js.map +1 -1
- package/dist/scripts/agent-engines/manage-agent-engine.js +1 -1
- package/dist/scripts/agent-engines/manage-agent-engine.js.map +1 -1
- package/dist/scripts/agent-engines/set-agent-engine.js +1 -1
- package/dist/scripts/agent-engines/set-agent-engine.js.map +1 -1
- package/dist/server/agent-chat-plugin.d.ts +3 -0
- package/dist/server/agent-chat-plugin.d.ts.map +1 -1
- package/dist/server/agent-chat-plugin.js +134 -72
- package/dist/server/agent-chat-plugin.js.map +1 -1
- package/dist/server/agent-engine-api-key-route.d.ts +1 -1
- package/dist/server/core-routes-plugin.d.ts +3 -0
- package/dist/server/core-routes-plugin.d.ts.map +1 -1
- package/dist/server/core-routes-plugin.js +4 -1
- package/dist/server/core-routes-plugin.js.map +1 -1
- package/dist/server/open-route.d.ts +9 -0
- package/dist/server/open-route.d.ts.map +1 -1
- package/dist/server/open-route.js +48 -38
- package/dist/server/open-route.js.map +1 -1
- package/dist/shared/reasoning-effort.js +3 -0
- package/dist/shared/reasoning-effort.js.map +1 -1
- package/dist/sharing/access.d.ts.map +1 -1
- package/dist/sharing/access.js +18 -2
- package/dist/sharing/access.js.map +1 -1
- package/dist/sharing/registry.d.ts +10 -0
- package/dist/sharing/registry.d.ts.map +1 -1
- package/dist/sharing/registry.js.map +1 -1
- package/dist/styles/agent-native.css +104 -20
- package/dist/styles/rich-markdown-editor.css +11 -10
- package/docs/content/cloneable-saas.mdx +2 -2
- package/docs/content/faq.mdx +1 -1
- package/docs/content/locales/ar-SA/cloneable-saas.mdx +2 -2
- package/docs/content/locales/ar-SA/faq.mdx +1 -1
- package/docs/content/locales/ar-SA/template-chat.mdx +1 -1
- package/docs/content/locales/de-DE/cloneable-saas.mdx +2 -2
- package/docs/content/locales/de-DE/faq.mdx +1 -1
- package/docs/content/locales/de-DE/template-chat.mdx +1 -1
- package/docs/content/locales/es-ES/cloneable-saas.mdx +2 -2
- package/docs/content/locales/es-ES/faq.mdx +1 -1
- package/docs/content/locales/es-ES/template-chat.mdx +1 -1
- package/docs/content/locales/fr-FR/cloneable-saas.mdx +2 -2
- package/docs/content/locales/fr-FR/faq.mdx +1 -1
- package/docs/content/locales/fr-FR/template-chat.mdx +1 -1
- package/docs/content/locales/hi-IN/cloneable-saas.mdx +2 -2
- package/docs/content/locales/hi-IN/faq.mdx +1 -1
- package/docs/content/locales/hi-IN/template-chat.mdx +1 -1
- package/docs/content/locales/ja-JP/cloneable-saas.mdx +2 -2
- package/docs/content/locales/ja-JP/faq.mdx +1 -1
- package/docs/content/locales/ja-JP/template-chat.mdx +1 -1
- package/docs/content/locales/ko-KR/cloneable-saas.mdx +2 -2
- package/docs/content/locales/ko-KR/faq.mdx +1 -1
- package/docs/content/locales/ko-KR/template-chat.mdx +1 -1
- package/docs/content/locales/pt-BR/cloneable-saas.mdx +2 -2
- package/docs/content/locales/pt-BR/faq.mdx +1 -1
- package/docs/content/locales/pt-BR/template-chat.mdx +1 -1
- package/docs/content/locales/zh-CN/cloneable-saas.mdx +2 -2
- package/docs/content/locales/zh-CN/faq.mdx +1 -1
- package/docs/content/locales/zh-CN/template-chat.mdx +1 -1
- package/docs/content/locales/zh-TW/cloneable-saas.mdx +2 -2
- package/docs/content/locales/zh-TW/faq.mdx +1 -1
- package/docs/content/locales/zh-TW/template-chat.mdx +1 -1
- package/docs/content/template-chat.mdx +1 -1
- package/package.json +1 -1
- package/corpus/templates/design/app/components/design/LocalSourceEditBanner.tsx +0 -157
- package/corpus/templates/design/app/lib/design-templates.ts +0 -1305
- package/corpus/templates/design/app/pages/Templates.tsx +0 -279
|
@@ -144,7 +144,7 @@ function ShaderPreview({ descriptor, animated }: ShaderPreviewProps) {
|
|
|
144
144
|
|
|
145
145
|
function ParamLabel({ children }: { children: React.ReactNode }) {
|
|
146
146
|
return (
|
|
147
|
-
<span className="w-[5.5rem] shrink-0 truncate text-[11px] text-muted-foreground">
|
|
147
|
+
<span className="w-[5.5rem] shrink-0 truncate !text-[11px] text-muted-foreground">
|
|
148
148
|
{children}
|
|
149
149
|
</span>
|
|
150
150
|
);
|
|
@@ -174,7 +174,7 @@ function ColorSwatch({ color, label, onChange }: ColorSwatchProps) {
|
|
|
174
174
|
<TooltipTrigger asChild>
|
|
175
175
|
{/* The label wraps the native color input so clicking the swatch opens the picker */}
|
|
176
176
|
<label
|
|
177
|
-
className="flex h-6 min-w-0 cursor-pointer items-center gap-1.5 rounded px-1 text-[11px] text-muted-foreground transition-colors hover:bg-[var(--design-editor-control-bg)] hover:text-foreground focus-within:bg-[var(--design-editor-control-bg)]"
|
|
177
|
+
className="flex h-6 min-w-0 cursor-pointer items-center gap-1.5 rounded px-1 !text-[11px] text-muted-foreground transition-colors hover:bg-[var(--design-editor-control-bg)] hover:text-foreground focus-within:bg-[var(--design-editor-control-bg)]"
|
|
178
178
|
title={label}
|
|
179
179
|
>
|
|
180
180
|
<span
|
|
@@ -232,12 +232,12 @@ function ParamRow({ paramDef, value, onChange }: ParamRowProps) {
|
|
|
232
232
|
<div className="flex h-6 items-center gap-1.5">
|
|
233
233
|
<ParamLabel>{label}</ParamLabel>
|
|
234
234
|
<Select value={strVal} onValueChange={(v) => onChange(key, v)}>
|
|
235
|
-
<SelectTrigger className="h-6 flex-1 text-[11px]">
|
|
235
|
+
<SelectTrigger className="h-6 flex-1 !text-[11px]">
|
|
236
236
|
<SelectValue />
|
|
237
237
|
</SelectTrigger>
|
|
238
238
|
<SelectContent>
|
|
239
239
|
{(options ?? []).map((opt: string) => (
|
|
240
|
-
<SelectItem key={opt} value={opt} className="text-[11px]">
|
|
240
|
+
<SelectItem key={opt} value={opt} className="!text-[11px]">
|
|
241
241
|
{opt}
|
|
242
242
|
</SelectItem>
|
|
243
243
|
))}
|
|
@@ -253,7 +253,10 @@ function ParamRow({ paramDef, value, onChange }: ParamRowProps) {
|
|
|
253
253
|
const switchId = `shader-param-${key}`;
|
|
254
254
|
return (
|
|
255
255
|
<div className="flex h-6 items-center justify-between gap-1.5">
|
|
256
|
-
<Label
|
|
256
|
+
<Label
|
|
257
|
+
htmlFor={switchId}
|
|
258
|
+
className="!text-[11px] text-muted-foreground"
|
|
259
|
+
>
|
|
257
260
|
{label}
|
|
258
261
|
</Label>
|
|
259
262
|
<Switch
|
|
@@ -288,7 +291,7 @@ function ParamRow({ paramDef, value, onChange }: ParamRowProps) {
|
|
|
288
291
|
return (
|
|
289
292
|
<div className="flex flex-col gap-1">
|
|
290
293
|
{/* Section label sits at the top of the stop list */}
|
|
291
|
-
<span className="text-[11px] text-muted-foreground">{label}</span>
|
|
294
|
+
<span className="!text-[11px] text-muted-foreground">{label}</span>
|
|
292
295
|
{/* Color stop rows — each a swatch + hex + remove button */}
|
|
293
296
|
<div className="flex flex-col gap-0.5">
|
|
294
297
|
{arrVal.map((color, i) => {
|
|
@@ -333,7 +336,7 @@ function ParamRow({ paramDef, value, onChange }: ParamRowProps) {
|
|
|
333
336
|
{arrVal.length < limit && (
|
|
334
337
|
<button
|
|
335
338
|
type="button"
|
|
336
|
-
className="flex h-6 items-center gap-1.5 rounded px-1 text-[11px] text-muted-foreground hover:bg-[var(--design-editor-control-bg)] hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring"
|
|
339
|
+
className="flex h-6 items-center gap-1.5 rounded px-1 !text-[11px] text-muted-foreground hover:bg-[var(--design-editor-control-bg)] hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring"
|
|
337
340
|
onClick={() => onChange(key, [...arrVal, "#ffffff"])}
|
|
338
341
|
>
|
|
339
342
|
<span className="flex size-4 shrink-0 items-center justify-center rounded-[3px] border border-dashed border-muted-foreground/50 text-[10px]">
|
|
@@ -469,7 +472,7 @@ export function ShaderControls({
|
|
|
469
472
|
<button
|
|
470
473
|
type="button"
|
|
471
474
|
onClick={onBack}
|
|
472
|
-
className="flex h-6 items-center gap-1 rounded px-1 text-[11px] text-muted-foreground hover:bg-[var(--design-editor-control-bg)] hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring"
|
|
475
|
+
className="flex h-6 items-center gap-1 rounded px-1 !text-[11px] text-muted-foreground hover:bg-[var(--design-editor-control-bg)] hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring"
|
|
473
476
|
>
|
|
474
477
|
<IconArrowLeft className="size-3" />
|
|
475
478
|
<span>{"Back to presets" /* i18n-ignore shader nav */}</span>
|
|
@@ -481,12 +484,12 @@ export function ShaderControls({
|
|
|
481
484
|
<div className="flex h-6 items-center gap-1.5 px-3">
|
|
482
485
|
<ParamLabel>{"Preset" /* i18n-ignore */}</ParamLabel>
|
|
483
486
|
<Select value={descriptor.preset} onValueChange={handlePresetChange}>
|
|
484
|
-
<SelectTrigger className="h-6 flex-1 text-[11px]">
|
|
487
|
+
<SelectTrigger className="h-6 flex-1 !text-[11px]">
|
|
485
488
|
<SelectValue />
|
|
486
489
|
</SelectTrigger>
|
|
487
490
|
<SelectContent>
|
|
488
491
|
{(SHADER_PRESETS as readonly ShaderPresetDef[]).map((p) => (
|
|
489
|
-
<SelectItem key={p.name} value={p.name} className="text-[11px]">
|
|
492
|
+
<SelectItem key={p.name} value={p.name} className="!text-[11px]">
|
|
490
493
|
{p.label}
|
|
491
494
|
</SelectItem>
|
|
492
495
|
))}
|
|
@@ -499,7 +502,7 @@ export function ShaderControls({
|
|
|
499
502
|
<Label
|
|
500
503
|
htmlFor={animateSwitchId}
|
|
501
504
|
className={cn(
|
|
502
|
-
"text-[11px] text-muted-foreground",
|
|
505
|
+
"!text-[11px] text-muted-foreground",
|
|
503
506
|
reducedMotion && "opacity-50",
|
|
504
507
|
)}
|
|
505
508
|
>
|
|
@@ -265,7 +265,7 @@ export function ShaderFillsPanel({
|
|
|
265
265
|
>
|
|
266
266
|
<IconArrowLeft className="size-3.5" />
|
|
267
267
|
</button>
|
|
268
|
-
<span className="flex-1 truncate text-[11px] font-semibold text-foreground">
|
|
268
|
+
<span className="flex-1 truncate !text-[11px] font-semibold text-foreground">
|
|
269
269
|
{preset?.label ?? active.preset}
|
|
270
270
|
</span>
|
|
271
271
|
<button
|
|
@@ -292,7 +292,7 @@ export function ShaderFillsPanel({
|
|
|
292
292
|
<div className="flex flex-col">
|
|
293
293
|
{/* Header: "Shader fills" title + + button + × button */}
|
|
294
294
|
<div className="flex h-6 items-center gap-1 px-3">
|
|
295
|
-
<span className="flex-1 truncate text-[11px] font-semibold text-foreground">
|
|
295
|
+
<span className="flex-1 truncate !text-[11px] font-semibold text-foreground">
|
|
296
296
|
{"Shader fills" /* i18n-ignore design panel title */}
|
|
297
297
|
</span>
|
|
298
298
|
<Tooltip>
|
|
@@ -330,7 +330,7 @@ export function ShaderFillsPanel({
|
|
|
330
330
|
disabled={disabled}
|
|
331
331
|
placeholder={"Search" /* i18n-ignore */}
|
|
332
332
|
aria-label={"Search shaders" /* i18n-ignore */}
|
|
333
|
-
className="h-full min-w-0 flex-1 border-0 bg-transparent p-0 text-[11px] shadow-none focus-visible:ring-0"
|
|
333
|
+
className="h-full min-w-0 flex-1 border-0 bg-transparent p-0 !text-[11px] shadow-none focus-visible:ring-0 md:!text-[11px]"
|
|
334
334
|
onChange={(event) => setSearch(event.target.value)}
|
|
335
335
|
/>
|
|
336
336
|
{search && (
|
|
@@ -387,7 +387,7 @@ export function ShaderFillsPanel({
|
|
|
387
387
|
</p>
|
|
388
388
|
)}
|
|
389
389
|
{filtered.length === 0 ? (
|
|
390
|
-
<p className="py-4 text-center text-[11px] text-muted-foreground">
|
|
390
|
+
<p className="py-4 text-center !text-[11px] text-muted-foreground">
|
|
391
391
|
{"No shaders match your search" /* i18n-ignore */}
|
|
392
392
|
</p>
|
|
393
393
|
) : (
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export interface ElementInfo {
|
|
2
2
|
tagName: string;
|
|
3
|
+
componentName?: string;
|
|
3
4
|
id?: string;
|
|
4
5
|
sourceId?: string;
|
|
5
6
|
selector?: string;
|
|
@@ -8,9 +9,18 @@ export interface ElementInfo {
|
|
|
8
9
|
boundingRect: { x: number; y: number; width: number; height: number };
|
|
9
10
|
textContent?: string;
|
|
10
11
|
htmlContent?: string;
|
|
12
|
+
/** Direct element children; text nodes are ignored. */
|
|
13
|
+
childElementCount?: number;
|
|
11
14
|
isFlexChild: boolean;
|
|
12
15
|
isFlexContainer: boolean;
|
|
16
|
+
isGridContainer?: boolean;
|
|
13
17
|
parentDisplay?: string;
|
|
18
|
+
parentAutoLayout?: {
|
|
19
|
+
display?: string;
|
|
20
|
+
selector?: string;
|
|
21
|
+
sourceId?: string;
|
|
22
|
+
boundingRect: { x: number; y: number; width: number; height: number };
|
|
23
|
+
};
|
|
14
24
|
parentLayout?: {
|
|
15
25
|
display?: string;
|
|
16
26
|
flexDirection?: string;
|
|
@@ -34,6 +44,15 @@ export interface ElementInfo {
|
|
|
34
44
|
confidence?: number;
|
|
35
45
|
}
|
|
36
46
|
|
|
47
|
+
export interface ElementSelectionIntent {
|
|
48
|
+
additive?: boolean;
|
|
49
|
+
range?: boolean;
|
|
50
|
+
source?: "pointer" | "keyboard" | "marquee";
|
|
51
|
+
shiftKey?: boolean;
|
|
52
|
+
metaKey?: boolean;
|
|
53
|
+
ctrlKey?: boolean;
|
|
54
|
+
}
|
|
55
|
+
|
|
37
56
|
export type DeviceFrameType = "none" | "desktop" | "tablet" | "mobile";
|
|
38
57
|
|
|
39
58
|
export const DEVICE_FRAME_VIEWPORTS = {
|
|
@@ -16,13 +16,13 @@ import {
|
|
|
16
16
|
IconX,
|
|
17
17
|
} from "@tabler/icons-react";
|
|
18
18
|
import { useState, useEffect, useCallback, useRef } from "react";
|
|
19
|
-
import { createPortal } from "react-dom";
|
|
20
19
|
import { toast } from "sonner";
|
|
21
20
|
|
|
22
21
|
import { Button } from "@/components/ui/button";
|
|
23
22
|
import { Dialog, DialogContent, DialogTitle } from "@/components/ui/dialog";
|
|
24
23
|
import {
|
|
25
24
|
Popover,
|
|
25
|
+
PopoverAnchor,
|
|
26
26
|
PopoverContent,
|
|
27
27
|
PopoverTrigger,
|
|
28
28
|
} from "@/components/ui/popover";
|
|
@@ -317,6 +317,17 @@ export interface PromptDesignSystemOption {
|
|
|
317
317
|
isDefault?: boolean;
|
|
318
318
|
}
|
|
319
319
|
|
|
320
|
+
function isNestedPromptPopoverTarget(target: EventTarget | null) {
|
|
321
|
+
return (
|
|
322
|
+
target instanceof Element &&
|
|
323
|
+
Boolean(
|
|
324
|
+
target.closest(
|
|
325
|
+
"[data-agent-native-composer-popover],[data-assets-picker-dialog],[data-agent-native-prompt-select]",
|
|
326
|
+
),
|
|
327
|
+
)
|
|
328
|
+
);
|
|
329
|
+
}
|
|
330
|
+
|
|
320
331
|
export default function PromptPopover({
|
|
321
332
|
open,
|
|
322
333
|
onOpenChange,
|
|
@@ -339,7 +350,6 @@ export default function PromptPopover({
|
|
|
339
350
|
const [pickedAssets, setPickedAssets] = useState<UploadedFile[]>([]);
|
|
340
351
|
const [selectedUploadFiles, setSelectedUploadFiles] = useState<File[]>([]);
|
|
341
352
|
const [assetsPickerOpen, setAssetsPickerOpen] = useState(false);
|
|
342
|
-
const panelRef = useRef<HTMLDivElement>(null);
|
|
343
353
|
|
|
344
354
|
useEffect(() => {
|
|
345
355
|
if (open) return;
|
|
@@ -348,68 +358,6 @@ export default function PromptPopover({
|
|
|
348
358
|
setSelectedUploadFiles([]);
|
|
349
359
|
}, [open]);
|
|
350
360
|
|
|
351
|
-
// Position the popover after render so we can measure its actual size
|
|
352
|
-
useEffect(() => {
|
|
353
|
-
if (!open || !panelRef.current) return;
|
|
354
|
-
const panel = panelRef.current;
|
|
355
|
-
const MARGIN = 12;
|
|
356
|
-
|
|
357
|
-
if (centered || !anchorRef?.current) {
|
|
358
|
-
panel.style.top = "50%";
|
|
359
|
-
panel.style.left = "50%";
|
|
360
|
-
panel.style.transform = "translate(-50%, -50%)";
|
|
361
|
-
return;
|
|
362
|
-
}
|
|
363
|
-
|
|
364
|
-
const anchor = anchorRef.current.getBoundingClientRect();
|
|
365
|
-
const panelRect = panel.getBoundingClientRect();
|
|
366
|
-
const vw = window.innerWidth;
|
|
367
|
-
const vh = window.innerHeight;
|
|
368
|
-
|
|
369
|
-
let top = anchor.bottom + MARGIN;
|
|
370
|
-
if (top + panelRect.height > vh - MARGIN) {
|
|
371
|
-
top = Math.max(MARGIN, anchor.top - panelRect.height - MARGIN);
|
|
372
|
-
}
|
|
373
|
-
|
|
374
|
-
const anchorCenterX = anchor.left + anchor.width / 2;
|
|
375
|
-
let left = anchorCenterX - panelRect.width / 2;
|
|
376
|
-
if (left + panelRect.width > vw - MARGIN) {
|
|
377
|
-
left = vw - panelRect.width - MARGIN;
|
|
378
|
-
}
|
|
379
|
-
if (left < MARGIN) left = MARGIN;
|
|
380
|
-
|
|
381
|
-
panel.style.top = top + "px";
|
|
382
|
-
panel.style.left = left + "px";
|
|
383
|
-
panel.style.right = "auto";
|
|
384
|
-
panel.style.transform = "none";
|
|
385
|
-
}, [open, centered, anchorRef]);
|
|
386
|
-
|
|
387
|
-
// Close on outside click / escape
|
|
388
|
-
useEffect(() => {
|
|
389
|
-
if (!open) return;
|
|
390
|
-
const handleClick = (e: MouseEvent) => {
|
|
391
|
-
const target = e.target as Element | null;
|
|
392
|
-
if (target?.closest("[data-agent-native-composer-popover]")) return;
|
|
393
|
-
if (target?.closest("[data-assets-picker-dialog]")) return;
|
|
394
|
-
if (
|
|
395
|
-
panelRef.current &&
|
|
396
|
-
!panelRef.current.contains(e.target as Node) &&
|
|
397
|
-
(!anchorRef?.current || !anchorRef.current.contains(e.target as Node))
|
|
398
|
-
) {
|
|
399
|
-
onOpenChange(false);
|
|
400
|
-
}
|
|
401
|
-
};
|
|
402
|
-
const handleKey = (e: KeyboardEvent) => {
|
|
403
|
-
if (e.key === "Escape" && !assetsPickerOpen) onOpenChange(false);
|
|
404
|
-
};
|
|
405
|
-
document.addEventListener("mousedown", handleClick);
|
|
406
|
-
document.addEventListener("keydown", handleKey);
|
|
407
|
-
return () => {
|
|
408
|
-
document.removeEventListener("mousedown", handleClick);
|
|
409
|
-
document.removeEventListener("keydown", handleKey);
|
|
410
|
-
};
|
|
411
|
-
}, [assetsPickerOpen, open, onOpenChange, anchorRef]);
|
|
412
|
-
|
|
413
361
|
const uploadFiles = useCallback(
|
|
414
362
|
async (files: File[]): Promise<UploadedFile[]> => {
|
|
415
363
|
if (files.length === 0) return [];
|
|
@@ -533,20 +481,57 @@ export default function PromptPopover({
|
|
|
533
481
|
);
|
|
534
482
|
}, []);
|
|
535
483
|
|
|
536
|
-
|
|
484
|
+
const handlePopoverOpenChange = useCallback(
|
|
485
|
+
(nextOpen: boolean) => {
|
|
486
|
+
if (!nextOpen && assetsPickerOpen) return;
|
|
487
|
+
onOpenChange(nextOpen);
|
|
488
|
+
},
|
|
489
|
+
[assetsPickerOpen, onOpenChange],
|
|
490
|
+
);
|
|
491
|
+
|
|
492
|
+
const hasVirtualAnchor = !centered && Boolean(anchorRef?.current);
|
|
493
|
+
const virtualAnchorRef = anchorRef as React.RefObject<{
|
|
494
|
+
getBoundingClientRect: () => DOMRect;
|
|
495
|
+
}>;
|
|
537
496
|
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
{centered && (
|
|
497
|
+
return (
|
|
498
|
+
<Popover open={open} onOpenChange={handlePopoverOpenChange}>
|
|
499
|
+
{open && centered && (
|
|
541
500
|
<div
|
|
542
|
-
className="fixed inset-0 bg-black/40
|
|
501
|
+
className="fixed inset-0 z-[199] bg-black/40"
|
|
543
502
|
onClick={() => onOpenChange(false)}
|
|
544
503
|
/>
|
|
545
504
|
)}
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
505
|
+
{hasVirtualAnchor ? (
|
|
506
|
+
<PopoverAnchor virtualRef={virtualAnchorRef} />
|
|
507
|
+
) : (
|
|
508
|
+
<PopoverAnchor asChild>
|
|
509
|
+
<span
|
|
510
|
+
aria-hidden="true"
|
|
511
|
+
className={
|
|
512
|
+
centered
|
|
513
|
+
? "fixed left-1/2 top-1/2 size-px"
|
|
514
|
+
: "fixed left-3 top-3 size-px"
|
|
515
|
+
}
|
|
516
|
+
/>
|
|
517
|
+
</PopoverAnchor>
|
|
518
|
+
)}
|
|
519
|
+
<PopoverContent
|
|
520
|
+
side="bottom"
|
|
521
|
+
align="center"
|
|
522
|
+
sideOffset={12}
|
|
523
|
+
collisionPadding={12}
|
|
524
|
+
onCloseAutoFocus={(event) => event.preventDefault()}
|
|
525
|
+
onEscapeKeyDown={(event) => {
|
|
526
|
+
if (assetsPickerOpen) event.preventDefault();
|
|
527
|
+
}}
|
|
528
|
+
onInteractOutside={(event) => {
|
|
529
|
+
if (isNestedPromptPopoverTarget(event.target)) {
|
|
530
|
+
event.preventDefault();
|
|
531
|
+
}
|
|
532
|
+
}}
|
|
533
|
+
data-agent-native-prompt-popover
|
|
534
|
+
className="z-[200] w-[min(420px,calc(100vw-24px))] rounded-xl border-border p-0 shadow-2xl shadow-black/60"
|
|
550
535
|
>
|
|
551
536
|
<div className="px-3.5 pt-3 pb-2">
|
|
552
537
|
<span className="text-sm font-medium text-foreground/90">
|
|
@@ -588,7 +573,7 @@ export default function PromptPopover({
|
|
|
588
573
|
<SelectTrigger className="h-8 min-w-0 flex-1 text-xs">
|
|
589
574
|
<SelectValue placeholder={t("promptDialog.designSystem")} />
|
|
590
575
|
</SelectTrigger>
|
|
591
|
-
<SelectContent>
|
|
576
|
+
<SelectContent data-agent-native-prompt-select>
|
|
592
577
|
<SelectItem value="none" className="text-xs">
|
|
593
578
|
{t("promptDialog.noDesignSystem")}
|
|
594
579
|
</SelectItem>
|
|
@@ -688,11 +673,9 @@ export default function PromptPopover({
|
|
|
688
673
|
onReady={handleAssetsPickerReady}
|
|
689
674
|
onMessage={handleAssetsPickerMessage}
|
|
690
675
|
/>
|
|
691
|
-
</
|
|
692
|
-
|
|
676
|
+
</PopoverContent>
|
|
677
|
+
</Popover>
|
|
693
678
|
);
|
|
694
|
-
|
|
695
|
-
return createPortal(popover, document.body);
|
|
696
679
|
}
|
|
697
680
|
|
|
698
681
|
function PromptAttachmentMenu({
|
|
@@ -7,7 +7,6 @@ import { useHeaderTitle, useHeaderActions } from "./HeaderActions";
|
|
|
7
7
|
|
|
8
8
|
const pageTitleKeys: Record<string, string> = {
|
|
9
9
|
"/": "navigation.designs",
|
|
10
|
-
"/templates": "navigation.templates",
|
|
11
10
|
"/design-systems": "navigation.designSystems",
|
|
12
11
|
"/design-systems/setup": "navigation.setupDesignSystem",
|
|
13
12
|
"/settings": "navigation.settings",
|
|
@@ -18,6 +18,7 @@ import {
|
|
|
18
18
|
import { useLocation } from "react-router";
|
|
19
19
|
|
|
20
20
|
import { useNavigationState } from "@/hooks/use-navigation-state";
|
|
21
|
+
import { DESIGN_CHAT_STORAGE_KEY } from "@/lib/agent-chat";
|
|
21
22
|
import { cn } from "@/lib/utils";
|
|
22
23
|
|
|
23
24
|
import { Header } from "./Header";
|
|
@@ -61,8 +62,7 @@ export function Layout({ children }: LayoutProps) {
|
|
|
61
62
|
// Bind chat to the currently-open design. Same pattern as slides — the
|
|
62
63
|
// route is `/design/:id` for the editor and `/present/:id` for preview
|
|
63
64
|
// (which we already short-circuit as BARE). Anywhere else (list,
|
|
64
|
-
// design-systems, settings
|
|
65
|
-
// chats keep working.
|
|
65
|
+
// design-systems, settings) leaves scope null so general chats keep working.
|
|
66
66
|
const designScope = useMemo(() => {
|
|
67
67
|
const match = location.pathname.match(/^\/design\/([^/]+)/);
|
|
68
68
|
const designId = match?.[1];
|
|
@@ -140,6 +140,7 @@ export function Layout({ children }: LayoutProps) {
|
|
|
140
140
|
>
|
|
141
141
|
<AgentSidebar
|
|
142
142
|
position="right"
|
|
143
|
+
storageKey={DESIGN_CHAT_STORAGE_KEY}
|
|
143
144
|
emptyStateText={t("chat.emptyState")}
|
|
144
145
|
suggestions={[
|
|
145
146
|
t("chat.suggestionLandingPage"),
|
|
@@ -12,7 +12,6 @@ import {
|
|
|
12
12
|
IconSettings,
|
|
13
13
|
IconLayoutSidebarLeftCollapse,
|
|
14
14
|
IconLayoutSidebarLeftExpand,
|
|
15
|
-
IconTemplate,
|
|
16
15
|
} from "@tabler/icons-react";
|
|
17
16
|
import { useEffect, useState } from "react";
|
|
18
17
|
import { Link, useLocation } from "react-router";
|
|
@@ -27,7 +26,6 @@ import { cn } from "@/lib/utils";
|
|
|
27
26
|
|
|
28
27
|
const navItems = [
|
|
29
28
|
{ icon: IconPencil, labelKey: "navigation.designs", href: "/" },
|
|
30
|
-
{ icon: IconTemplate, labelKey: "navigation.templates", href: "/templates" },
|
|
31
29
|
{
|
|
32
30
|
icon: IconPalette,
|
|
33
31
|
labelKey: "navigation.designSystems",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { useT } from "@agent-native/core/client";
|
|
2
2
|
import {
|
|
3
3
|
IconAlertTriangle,
|
|
4
4
|
IconBolt,
|
|
@@ -17,6 +17,7 @@ import {
|
|
|
17
17
|
TooltipContent,
|
|
18
18
|
TooltipTrigger,
|
|
19
19
|
} from "@/components/ui/tooltip";
|
|
20
|
+
import { sendToDesignAgentChat } from "@/lib/agent-chat";
|
|
20
21
|
import { cn } from "@/lib/utils";
|
|
21
22
|
|
|
22
23
|
export interface CanvasPin {
|
|
@@ -512,11 +513,11 @@ export function CanvasCommentPins({
|
|
|
512
513
|
: buildPinLines(targetPins[0]!).join("\n");
|
|
513
514
|
|
|
514
515
|
try {
|
|
515
|
-
// Use
|
|
516
|
+
// Use the client chat bridge (not the shared `agentChat.submit`) so the
|
|
516
517
|
// request routes correctly when design is embedded in Builder/Frame
|
|
517
518
|
// and so the agent sidebar is reliably opened via the `agent-panel:open`
|
|
518
519
|
// custom event even if the user has it collapsed.
|
|
519
|
-
|
|
520
|
+
sendToDesignAgentChat({
|
|
520
521
|
message,
|
|
521
522
|
submit: true,
|
|
522
523
|
openSidebar: true,
|
|
@@ -635,7 +636,7 @@ export function CanvasCommentPins({
|
|
|
635
636
|
className="fixed top-16 left-1/2 -translate-x-1/2 z-50 flex items-center gap-2 rounded-full border border-border bg-popover px-3 py-1.5 shadow-lg pointer-events-none"
|
|
636
637
|
>
|
|
637
638
|
<IconMessage className="w-3.5 h-3.5 text-[#609FF8]" />
|
|
638
|
-
<span className="text-[11px] text-foreground">
|
|
639
|
+
<span className="!text-[11px] text-foreground">
|
|
639
640
|
{t("visualEditor.clickToDropCommentPin")}
|
|
640
641
|
</span>
|
|
641
642
|
<span className="text-[10px] text-muted-foreground ml-1">
|
|
@@ -603,7 +603,7 @@ export function DrawOverlay({
|
|
|
603
603
|
<Button
|
|
604
604
|
size="sm"
|
|
605
605
|
data-testid="draw-send"
|
|
606
|
-
className="h-7 gap-1 px-3 text-[11px] cursor-pointer"
|
|
606
|
+
className="h-7 gap-1 px-3 !text-[11px] cursor-pointer"
|
|
607
607
|
onClick={send}
|
|
608
608
|
disabled={!hasContent}
|
|
609
609
|
>
|
|
@@ -29,7 +29,7 @@ export function SaveStatusIndicator({
|
|
|
29
29
|
<div
|
|
30
30
|
data-save-status="offline"
|
|
31
31
|
className={cn(
|
|
32
|
-
"flex items-center gap-1 text-[11px] text-amber-500",
|
|
32
|
+
"flex items-center gap-1 !text-[11px] text-amber-500",
|
|
33
33
|
className,
|
|
34
34
|
)}
|
|
35
35
|
>
|
|
@@ -51,7 +51,7 @@ export function SaveStatusIndicator({
|
|
|
51
51
|
<span
|
|
52
52
|
data-save-status="saving"
|
|
53
53
|
className={cn(
|
|
54
|
-
"animate-pulse text-[11px] text-muted-foreground",
|
|
54
|
+
"animate-pulse !text-[11px] text-muted-foreground",
|
|
55
55
|
className,
|
|
56
56
|
)}
|
|
57
57
|
>
|
|
@@ -42,6 +42,20 @@
|
|
|
42
42
|
hsl(213 91% 67%) 14%,
|
|
43
43
|
transparent
|
|
44
44
|
);
|
|
45
|
+
--design-editor-component-color: hsl(263 84% 64%);
|
|
46
|
+
--design-editor-component-hover-color: hsl(263 72% 56%);
|
|
47
|
+
--design-editor-component-selection-color: color-mix(
|
|
48
|
+
in srgb,
|
|
49
|
+
hsl(263 84% 64%) 16%,
|
|
50
|
+
transparent
|
|
51
|
+
);
|
|
52
|
+
--design-editor-component-selected-subtree-color: color-mix(
|
|
53
|
+
in srgb,
|
|
54
|
+
hsl(263 84% 64%) 10%,
|
|
55
|
+
transparent
|
|
56
|
+
);
|
|
57
|
+
--design-editor-component-strong-color: var(--design-editor-component-color);
|
|
58
|
+
--design-editor-component-contrast-color: #ffffff;
|
|
45
59
|
--design-editor-active-row-color: color-mix(
|
|
46
60
|
in srgb,
|
|
47
61
|
hsl(0 0% 15%) 8%,
|
|
@@ -71,6 +85,11 @@
|
|
|
71
85
|
--design-editor-control-border: hsl(var(--border));
|
|
72
86
|
--design-editor-canvas-bg: hsl(0 0% 92%);
|
|
73
87
|
--design-editor-skeleton-canvas-bg: hsl(0 0% 92%);
|
|
88
|
+
--design-editor-skeleton-panel-ghost-bg: color-mix(
|
|
89
|
+
in srgb,
|
|
90
|
+
hsl(var(--foreground)) 6%,
|
|
91
|
+
transparent
|
|
92
|
+
);
|
|
74
93
|
}
|
|
75
94
|
|
|
76
95
|
.dark {
|
|
@@ -109,6 +128,20 @@
|
|
|
109
128
|
hsl(213 91% 67%) 24%,
|
|
110
129
|
transparent
|
|
111
130
|
);
|
|
131
|
+
--design-editor-component-color: hsl(263 88% 74%);
|
|
132
|
+
--design-editor-component-hover-color: hsl(263 82% 68%);
|
|
133
|
+
--design-editor-component-selection-color: color-mix(
|
|
134
|
+
in srgb,
|
|
135
|
+
hsl(263 88% 74%) 28%,
|
|
136
|
+
transparent
|
|
137
|
+
);
|
|
138
|
+
--design-editor-component-selected-subtree-color: color-mix(
|
|
139
|
+
in srgb,
|
|
140
|
+
hsl(263 88% 74%) 18%,
|
|
141
|
+
transparent
|
|
142
|
+
);
|
|
143
|
+
--design-editor-component-strong-color: var(--design-editor-component-color);
|
|
144
|
+
--design-editor-component-contrast-color: #ffffff;
|
|
112
145
|
--design-editor-active-row-color: hsl(0 0% 20%);
|
|
113
146
|
--design-editor-layer-hover-color: color-mix(
|
|
114
147
|
in srgb,
|
|
@@ -270,6 +303,29 @@
|
|
|
270
303
|
animation: none !important;
|
|
271
304
|
}
|
|
272
305
|
|
|
306
|
+
.design-motion-dock-space {
|
|
307
|
+
--design-motion-dock-duration: 200ms;
|
|
308
|
+
--design-motion-dock-easing: ease-out;
|
|
309
|
+
transition: height var(--design-motion-dock-duration)
|
|
310
|
+
var(--design-motion-dock-easing);
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
.design-motion-dock {
|
|
314
|
+
transition:
|
|
315
|
+
border-color var(--design-motion-dock-duration)
|
|
316
|
+
var(--design-motion-dock-easing),
|
|
317
|
+
transform var(--design-motion-dock-duration)
|
|
318
|
+
var(--design-motion-dock-easing);
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
.design-motion-dock-space.design-motion-dock-resizing .design-motion-dock {
|
|
322
|
+
transition-duration: 0ms;
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
.design-motion-dock-space.design-motion-dock-resizing {
|
|
326
|
+
transition-duration: 0ms;
|
|
327
|
+
}
|
|
328
|
+
|
|
273
329
|
.dark .design-editor-app-menu-content {
|
|
274
330
|
box-shadow: 0 12px 28px rgb(0 0 0 / 0.34);
|
|
275
331
|
}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
sendToAgentChat,
|
|
3
|
-
type AgentChatMessage,
|
|
4
|
-
} from "@agent-native/core/client";
|
|
1
|
+
import type { AgentChatMessage } from "@agent-native/core/client";
|
|
5
2
|
import { useCallback, useEffect, useRef, useState } from "react";
|
|
6
3
|
|
|
4
|
+
import { sendToDesignAgentChat } from "@/lib/agent-chat";
|
|
5
|
+
|
|
7
6
|
// This is only a lost-signal recovery guard. Large design prompts can
|
|
8
7
|
// legitimately take several minutes, so avoid treating normal latency as
|
|
9
8
|
// failure.
|
|
@@ -136,7 +135,7 @@ export function useAgentGenerating(options: UseAgentGeneratingOptions = {}) {
|
|
|
136
135
|
context: string,
|
|
137
136
|
options?: Omit<AgentChatMessage, "message" | "context">,
|
|
138
137
|
) => {
|
|
139
|
-
const tabId =
|
|
138
|
+
const tabId = sendToDesignAgentChat({
|
|
140
139
|
...options,
|
|
141
140
|
message,
|
|
142
141
|
context,
|
|
@@ -18,6 +18,7 @@ export interface NavigationState {
|
|
|
18
18
|
screenId?: string;
|
|
19
19
|
filename?: string;
|
|
20
20
|
screen?: string;
|
|
21
|
+
selection?: string;
|
|
21
22
|
zoom?: number;
|
|
22
23
|
tool?: string;
|
|
23
24
|
path?: string;
|
|
@@ -52,6 +53,7 @@ export interface DesignEditorCommand {
|
|
|
52
53
|
screenId?: string;
|
|
53
54
|
filename?: string;
|
|
54
55
|
screen?: string;
|
|
56
|
+
selection?: string;
|
|
55
57
|
zoom?: number;
|
|
56
58
|
tool?: string;
|
|
57
59
|
path?: string;
|
|
@@ -117,6 +119,7 @@ export function editorPathFromCommand(cmd: NavigationState): string | null {
|
|
|
117
119
|
if (leftPanel) params.set("panel", leftPanel);
|
|
118
120
|
const screen = cmd.fileId ?? cmd.screenId ?? cmd.filename ?? cmd.screen;
|
|
119
121
|
if (screen) params.set("screen", screen);
|
|
122
|
+
if (cmd.selection) params.set("selection", cmd.selection);
|
|
120
123
|
if (typeof cmd.zoom === "number" && Number.isFinite(cmd.zoom)) {
|
|
121
124
|
params.set("zoom", String(cmd.zoom));
|
|
122
125
|
} else if (editorView === "single") {
|
|
@@ -151,6 +154,7 @@ export function editorCommandFromNavigate(
|
|
|
151
154
|
if (cmd.screenId) command.screenId = cmd.screenId;
|
|
152
155
|
if (cmd.filename) command.filename = cmd.filename;
|
|
153
156
|
if (cmd.screen) command.screen = cmd.screen;
|
|
157
|
+
if (cmd.selection) command.selection = cmd.selection;
|
|
154
158
|
if (typeof cmd.zoom === "number" && Number.isFinite(cmd.zoom)) {
|
|
155
159
|
command.zoom = cmd.zoom;
|
|
156
160
|
} else if (editorView === "single") {
|
|
@@ -186,6 +190,8 @@ export function useNavigationState(enabled = true) {
|
|
|
186
190
|
if (fileId) state.fileId = fileId;
|
|
187
191
|
const filename = searchParams.get("filename");
|
|
188
192
|
if (filename) state.filename = filename;
|
|
193
|
+
const selection = searchParams.get("selection");
|
|
194
|
+
if (selection) state.selection = selection;
|
|
189
195
|
const rawZoom = searchParams.get("zoom");
|
|
190
196
|
if (rawZoom !== null) {
|
|
191
197
|
const zoom = Number(rawZoom);
|
|
@@ -200,11 +206,6 @@ export function useNavigationState(enabled = true) {
|
|
|
200
206
|
} else if (pathname.startsWith("/present/")) {
|
|
201
207
|
state.view = "present";
|
|
202
208
|
state.designId = params.id;
|
|
203
|
-
} else if (
|
|
204
|
-
pathname.startsWith("/templates") ||
|
|
205
|
-
pathname.startsWith("/examples")
|
|
206
|
-
) {
|
|
207
|
-
state.view = "templates";
|
|
208
209
|
} else if (pathname.startsWith("/settings")) {
|
|
209
210
|
state.view = "settings";
|
|
210
211
|
}
|
|
@@ -221,8 +222,6 @@ export function useNavigationState(enabled = true) {
|
|
|
221
222
|
}
|
|
222
223
|
if (cmd.view === "present" && cmd.designId)
|
|
223
224
|
return `/present/${cmd.designId}`;
|
|
224
|
-
if (cmd.view === "templates" || cmd.view === "examples")
|
|
225
|
-
return "/templates";
|
|
226
225
|
if (cmd.view === "settings") return "/settings";
|
|
227
226
|
return "/";
|
|
228
227
|
},
|