@agent-native/core 0.90.1 → 0.90.3
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 +26 -0
- package/corpus/core/docs/content/agent-native-toolkit.mdx +87 -80
- package/corpus/core/docs/content/locales/ar-SA/agent-native-toolkit.mdx +89 -80
- package/corpus/core/docs/content/locales/de-DE/agent-native-toolkit.mdx +89 -80
- package/corpus/core/docs/content/locales/es-ES/agent-native-toolkit.mdx +89 -80
- package/corpus/core/docs/content/locales/fr-FR/agent-native-toolkit.mdx +89 -80
- package/corpus/core/docs/content/locales/hi-IN/agent-native-toolkit.mdx +89 -80
- package/corpus/core/docs/content/locales/ja-JP/agent-native-toolkit.mdx +89 -80
- package/corpus/core/docs/content/locales/ko-KR/agent-native-toolkit.mdx +89 -80
- package/corpus/core/docs/content/locales/pt-BR/agent-native-toolkit.mdx +89 -80
- package/corpus/core/docs/content/locales/zh-CN/agent-native-toolkit.mdx +89 -80
- package/corpus/core/docs/content/locales/zh-TW/agent-native-toolkit.mdx +89 -80
- package/corpus/core/docs/content/toolkit-agent-ux.mdx +43 -0
- package/corpus/core/docs/content/toolkit-app-adapters.mdx +9 -0
- package/corpus/core/docs/content/toolkit-collaboration-ui.mdx +12 -0
- package/corpus/core/docs/content/toolkit-collaboration.mdx +74 -0
- package/corpus/core/docs/content/toolkit-command-navigation.mdx +106 -0
- package/corpus/core/docs/content/toolkit-comments-review.mdx +98 -0
- package/corpus/core/docs/content/toolkit-history.mdx +95 -0
- package/corpus/core/docs/content/toolkit-observability.mdx +41 -0
- package/corpus/core/docs/content/toolkit-org-team.mdx +80 -0
- package/corpus/core/docs/content/toolkit-resources.mdx +57 -0
- package/corpus/core/docs/content/toolkit-settings.mdx +65 -0
- package/corpus/core/docs/content/toolkit-setup-connections.mdx +109 -0
- package/corpus/core/docs/content/toolkit-sharing-ui.mdx +18 -6
- package/corpus/core/docs/content/toolkit-sharing.mdx +81 -0
- package/corpus/core/docs/content/toolkit-shell-hooks.mdx +9 -0
- package/corpus/core/docs/content/toolkit-ui.mdx +9 -0
- package/corpus/core/package.json +35 -1
- package/corpus/core/src/agent/engine/ai-sdk-engine.ts +19 -1
- package/corpus/core/src/agent/engine/anthropic-engine.ts +25 -1
- package/corpus/core/src/agent/engine/registry.ts +23 -16
- package/corpus/core/src/agent/production-agent.ts +37 -6
- package/corpus/core/src/client/AgentPanel.tsx +1 -1
- package/corpus/core/src/client/command-navigation/index.ts +15 -0
- package/corpus/core/src/client/comments-review/index.ts +1 -0
- package/corpus/core/src/client/history/VersionHistoryPanel.tsx +145 -0
- package/corpus/core/src/client/history/index.ts +18 -0
- package/corpus/core/src/client/history/use-history.ts +86 -0
- package/corpus/core/src/client/index.ts +76 -9
- package/corpus/core/src/client/org/OrgSwitcher.tsx +6 -6
- package/corpus/core/src/client/org/RequireActiveOrg.tsx +2 -2
- package/corpus/core/src/client/org/TeamPage.tsx +3 -3
- package/corpus/core/src/client/org/hooks.ts +32 -0
- package/corpus/core/src/client/org/index.ts +30 -1
- package/corpus/core/src/client/org-team/index.ts +1 -0
- package/corpus/core/src/client/review/ReviewStatusBadge.tsx +39 -0
- package/corpus/core/src/client/review/ReviewThreadPanel.tsx +278 -0
- package/corpus/core/src/client/review/index.ts +25 -0
- package/corpus/core/src/client/review/use-review.ts +114 -0
- package/corpus/core/src/client/rich-markdown-editor/useCollabReconcile.ts +11 -6
- package/corpus/core/src/client/settings/index.ts +11 -1
- package/corpus/core/src/client/setup-connections/BuilderConnectCard.tsx +94 -0
- package/corpus/core/src/client/setup-connections/ProviderReadinessBadge.tsx +73 -0
- package/corpus/core/src/client/setup-connections/SetupConnectionsPage.tsx +94 -0
- package/corpus/core/src/client/setup-connections/index.ts +46 -0
- package/corpus/core/src/client/sharing/ShareButton.tsx +20 -14
- package/corpus/core/src/client/sharing/ShareDialog.tsx +3 -3
- package/corpus/core/src/client/use-action.ts +39 -2
- package/corpus/core/src/client/use-db-sync.ts +44 -18
- package/corpus/core/src/command-navigation/actions.ts +100 -0
- package/corpus/core/src/command-navigation/index.ts +12 -0
- package/corpus/core/src/comments-review/index.ts +1 -0
- package/corpus/core/src/db/create-get-db.ts +32 -2
- package/corpus/core/src/file-upload/builder.ts +24 -3
- package/corpus/core/src/file-upload/types.ts +3 -1
- package/corpus/core/src/history/actions/create-resource-version.ts +89 -0
- package/corpus/core/src/history/actions/get-resource-version.ts +60 -0
- package/corpus/core/src/history/actions/list-resource-history.ts +53 -0
- package/corpus/core/src/history/actions/list-resource-versions.ts +43 -0
- package/corpus/core/src/history/actions/restore-resource-version.ts +96 -0
- package/corpus/core/src/history/index.ts +27 -0
- package/corpus/core/src/history/registry.ts +99 -0
- package/corpus/core/src/history/store.ts +348 -0
- package/corpus/core/src/history/types.ts +69 -0
- package/corpus/core/src/index.ts +10 -0
- package/corpus/core/src/navigation/index.ts +170 -0
- package/corpus/core/src/org/index.ts +8 -0
- package/corpus/core/src/org/permissions.ts +30 -0
- package/corpus/core/src/org-team/index.ts +1 -0
- package/corpus/core/src/private-blob/registry.ts +1 -0
- package/corpus/core/src/review/actions/consume-review-feedback.ts +38 -0
- package/corpus/core/src/review/actions/create-review-comment.ts +107 -0
- package/corpus/core/src/review/actions/delete-review-comment.ts +55 -0
- package/corpus/core/src/review/actions/get-review-feedback.ts +54 -0
- package/corpus/core/src/review/actions/list-review-comments.ts +53 -0
- package/corpus/core/src/review/actions/reply-review-comment.ts +107 -0
- package/corpus/core/src/review/actions/resolve-review-thread.ts +60 -0
- package/corpus/core/src/review/actions/set-review-status.ts +58 -0
- package/corpus/core/src/review/index.ts +36 -0
- package/corpus/core/src/review/mentions.ts +44 -0
- package/corpus/core/src/review/registry.ts +99 -0
- package/corpus/core/src/review/store.ts +687 -0
- package/corpus/core/src/review/types.ts +97 -0
- package/corpus/core/src/server/action-discovery.ts +54 -0
- package/corpus/core/src/server/agent-engine-api-key-route.ts +5 -0
- package/corpus/core/src/server/credential-provider.ts +108 -0
- package/corpus/core/src/server/framework-request-handler.ts +52 -4
- package/corpus/core/src/setup-connections/index.ts +89 -0
- package/corpus/core/src/setup-connections/onboarding.ts +47 -0
- package/corpus/core/src/transcription/builder-transcription.ts +9 -2
- package/corpus/core/src/vite/action-types-plugin.ts +52 -0
- package/corpus/templates/analytics/app/components/layout/Layout.tsx +2 -1
- package/corpus/templates/analytics/app/components/layout/Sidebar.tsx +2 -2
- package/corpus/templates/analytics/app/global.css +22 -10
- package/corpus/templates/analytics/app/i18n/zh-TW.ts +6 -1
- package/corpus/templates/analytics/app/i18n-data.ts +81 -13
- package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/index.tsx +2 -2
- package/corpus/templates/analytics/app/pages/analyses/AnalysisDetail.tsx +2 -2
- package/corpus/templates/analytics/app/pages/sessions/SessionDetailPage.tsx +528 -108
- package/corpus/templates/analytics/app/pages/sessions/SessionDevToolsPanel.tsx +466 -183
- package/corpus/templates/analytics/changelog/2026-07-07-session-replays-load-sooner-show-clearer-activity-timelines-.md +6 -0
- package/corpus/templates/assets/.agents/skills/asset-generation/SKILL.md +5 -0
- package/corpus/templates/assets/.agents/skills/logo-composite/SKILL.md +34 -6
- package/corpus/templates/assets/AGENTS.md +23 -4
- package/corpus/templates/assets/actions/_generation-preset-settings.ts +48 -0
- package/corpus/templates/assets/actions/_helpers.ts +8 -1
- package/corpus/templates/assets/actions/_preset-skeleton-validation.ts +64 -0
- package/corpus/templates/assets/actions/create-generation-preset.ts +11 -3
- package/corpus/templates/assets/actions/generate-image-batch.ts +7 -2
- package/corpus/templates/assets/actions/generate-image.ts +342 -25
- package/corpus/templates/assets/actions/get-library.ts +4 -3
- package/corpus/templates/assets/actions/navigate.ts +2 -1
- package/corpus/templates/assets/actions/refresh-generation-run.ts +5 -1
- package/corpus/templates/assets/actions/update-asset.ts +1 -0
- package/corpus/templates/assets/actions/update-generation-preset.ts +8 -1
- package/corpus/templates/assets/actions/view-screen.ts +8 -1
- package/corpus/templates/assets/app/components/generation/GenerationResults.tsx +9 -1
- package/corpus/templates/assets/app/hooks/use-image-model-menu.ts +1 -0
- package/corpus/templates/assets/app/hooks/use-navigation-state.ts +11 -0
- package/corpus/templates/assets/app/i18n/zh-TW.ts +64 -0
- package/corpus/templates/assets/app/i18n-data.ts +650 -0
- package/corpus/templates/assets/app/routes/asset.$id.tsx +2 -1
- package/corpus/templates/assets/app/routes/brand-kits.$id.tsx +44 -33
- package/corpus/templates/assets/app/routes/brand-kits.$id_.presets.$presetId.tsx +1474 -0
- package/corpus/templates/assets/app/routes/library.tsx +43 -1
- package/corpus/templates/assets/server/lib/generation.ts +366 -44
- package/corpus/templates/assets/server/lib/image-processing.ts +252 -0
- package/corpus/templates/assets/server/lib/preset-skeleton.ts +137 -0
- package/corpus/templates/assets/shared/api.ts +47 -0
- package/corpus/templates/brain/app/routes/settings.tsx +2 -2
- package/corpus/templates/calendar/app/components/calendar/AttendeeAutocomplete.tsx +32 -6
- package/corpus/templates/calendar/app/components/calendar/EventDetailPopover.tsx +120 -40
- package/corpus/templates/calendar/app/hooks/use-people.ts +55 -0
- package/corpus/templates/calendar/changelog/2026-07-07-guest-suggestions-now-find-coworkers-from-your-google-worksp.md +6 -0
- package/corpus/templates/calendar/changelog/2026-07-07-zoom-stays-selected-after-connecting-it-from-a-draft-event.md +6 -0
- package/corpus/templates/clips/actions/create-recording.ts +5 -1
- package/corpus/templates/clips/actions/finalize-recording.ts +140 -1
- package/corpus/templates/clips/actions/import-loom-recording.ts +1 -0
- package/corpus/templates/clips/actions/lib/ensure-seekable-video.ts +1 -0
- package/corpus/templates/clips/actions/request-transcript.ts +31 -0
- package/corpus/templates/clips/actions/set-thumbnail.ts +2 -0
- package/corpus/templates/clips/app/components/library/library-layout.tsx +7 -2
- package/corpus/templates/clips/app/components/library/organization-switcher.tsx +2 -2
- package/corpus/templates/clips/app/components/library/sort-menu.tsx +1 -1
- package/corpus/templates/clips/app/components/player/scrubber-position.ts +9 -0
- package/corpus/templates/clips/app/components/player/scrubber.tsx +5 -2
- package/corpus/templates/clips/app/components/player/share-dialog.tsx +69 -41
- package/corpus/templates/clips/app/components/player/video-player.tsx +38 -1
- package/corpus/templates/clips/app/components/recorder/recorder-engine.ts +114 -33
- package/corpus/templates/clips/app/components/sharing/share-ui.tsx +3 -3
- package/corpus/templates/clips/app/components/sharing/slack-share-hint.tsx +9 -19
- package/corpus/templates/clips/app/routes/_app.library._index.tsx +27 -1
- package/corpus/templates/clips/app/routes/r.$recordingId.tsx +9 -3
- package/corpus/templates/clips/app/routes/record.tsx +178 -80
- package/corpus/templates/clips/changelog/2026-07-02-recordings-now-wait-for-storage-media-to-serve-before-finishing.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-07-a-pending-app-update-no-longer-blocks-screen-recording-updat.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-07-chrome-extension-recordings-keep-audio-after-refreshing-tab.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-07-clip-playback-progress-now-starts-and-finishes-at-the-right-times.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-07-sharing-public-clips-now-stays-focused-on-the-normal-link-wi.md +6 -0
- package/corpus/templates/clips/chrome-extension/src/background.ts +18 -0
- package/corpus/templates/clips/chrome-extension/src/offscreen.ts +23 -8
- package/corpus/templates/clips/desktop/src/app.tsx +40 -3
- package/corpus/templates/clips/desktop/src/hooks/useMediaDevices.ts +19 -7
- package/corpus/templates/clips/desktop/src/lib/permissions.ts +2 -0
- package/corpus/templates/clips/desktop/src/lib/updater.ts +25 -2
- package/corpus/templates/clips/desktop/src-tauri/src/native_screen.rs +7 -0
- package/corpus/templates/clips/server/routes/api/recordings/[recordingId]/thumbnail.post.ts +1 -0
- package/corpus/templates/clips/server/routes/api/uploads/[recordingId]/abort.post.ts +23 -6
- package/corpus/templates/clips/server/routes/api/uploads/[recordingId]/chunk.post.ts +28 -3
- package/corpus/templates/clips/server/routes/api/video/[recordingId].get.ts +13 -6
- package/corpus/templates/clips/shared/finalize-recovery.ts +35 -3
- package/corpus/templates/content/AGENTS.md +52 -52
- package/corpus/templates/content/actions/_builder-cms-read-client.ts +188 -8
- package/corpus/templates/content/actions/_builder-docs-client.ts +41 -3
- package/corpus/templates/content/actions/_database-source-utils.ts +998 -160
- package/corpus/templates/content/actions/_database-utils.ts +44 -4
- package/corpus/templates/content/actions/_notion-action-utils.ts +6 -2
- package/corpus/templates/content/actions/add-content-database-source-field-property.ts +23 -1
- package/corpus/templates/content/actions/attach-content-database-source.ts +85 -12
- package/corpus/templates/content/actions/change-content-database-source-role.ts +9 -1
- package/corpus/templates/content/actions/delete-content-database.ts +1 -0
- package/corpus/templates/content/actions/delete-document.ts +337 -52
- package/corpus/templates/content/actions/get-document.ts +11 -2
- package/corpus/templates/content/actions/list-content-databases.ts +57 -9
- package/corpus/templates/content/actions/prepare-builder-source-review.ts +23 -6
- package/corpus/templates/content/actions/refresh-content-database-source.ts +26 -3
- package/corpus/templates/content/actions/restore-content-database.ts +1 -0
- package/corpus/templates/content/actions/update-document.ts +43 -0
- package/corpus/templates/content/app/components/editor/BuilderBodySyncingNotice.tsx +21 -0
- package/corpus/templates/content/app/components/editor/DocumentDatabase.tsx +0 -1
- package/corpus/templates/content/app/components/editor/DocumentEditor.tsx +70 -28
- package/corpus/templates/content/app/components/editor/DocumentProperties.tsx +69 -17
- package/corpus/templates/content/app/components/editor/VisualEditor.tsx +4 -4
- package/corpus/templates/content/app/components/editor/body-hydration.ts +112 -0
- package/corpus/templates/content/app/components/editor/builder-body-hydration-pump.ts +52 -0
- package/corpus/templates/content/app/components/editor/database/DatabaseView.tsx +9076 -2876
- package/corpus/templates/content/app/components/editor/database-sources/BuilderSourceReviewDialog.tsx +41 -1
- package/corpus/templates/content/app/components/editor/extensions/ImageBlock.tsx +36 -11
- package/corpus/templates/content/app/components/editor/previewDocumentSaveController.ts +21 -1
- package/corpus/templates/content/app/components/sidebar/DocumentSidebar.tsx +11 -1
- package/corpus/templates/content/app/components/sidebar/DocumentTreeItem.tsx +11 -8
- package/corpus/templates/content/app/global.css +41 -0
- package/corpus/templates/content/app/hooks/use-content-database.ts +346 -42
- package/corpus/templates/content/app/hooks/use-db-sync.ts +9 -0
- package/corpus/templates/content/app/hooks/use-documents.ts +47 -0
- package/corpus/templates/content/app/hooks/use-notion.ts +12 -10
- package/corpus/templates/content/app/i18n/zh-TW.ts +35 -0
- package/corpus/templates/content/app/i18n-data.ts +355 -0
- package/corpus/templates/content/app/root.tsx +22 -0
- package/corpus/templates/content/changelog/2026-07-01-builder-database-sources-keep-loading-rows-in-the-background.md +6 -0
- package/corpus/templates/content/changelog/2026-07-01-builder-source-attach-starts-with-usable-rows.md +6 -0
- package/corpus/templates/content/changelog/2026-07-01-builder-source-attachment-now-stays-connected-after-large.md +6 -0
- package/corpus/templates/content/changelog/2026-07-01-builder-source-refreshes-now-show-progress-for-large-docs-blog.md +6 -0
- package/corpus/templates/content/changelog/2026-07-01-database-pages-now-delete-to-trash-without-route-errors.md +6 -0
- package/corpus/templates/content/changelog/2026-07-02-builder-source-refreshes-recover-from-stalled-background-row.md +6 -0
- package/corpus/templates/content/changelog/2026-07-02-builder-sourced-rows-open-with-sync-protection.md +6 -0
- package/corpus/templates/content/changelog/2026-07-02-database-rows-and-pages-open-faster-from-recently-loaded-dat.md +6 -0
- package/corpus/templates/content/changelog/2026-07-02-preview-panels-close-reliably-narrow-sidebar-row-actions-sta.md +6 -0
- package/corpus/templates/content/changelog/2026-07-06-builder-sync-progress-no-longer-shows-continue.md +6 -0
- package/corpus/templates/content/changelog/2026-07-07-permanently-deleting-trashed-databases-now-finishes-reliably.md +6 -0
- package/corpus/templates/content/shared/api.ts +13 -0
- package/corpus/templates/content/shared/builder-mdx.ts +16 -3
- package/corpus/templates/design/.agents/skills/design-generation/SKILL.md +23 -13
- package/corpus/templates/design/.agents/skills/responsive-breakpoints/SKILL.md +98 -0
- package/corpus/templates/design/.agents/skills/shader-fills/SKILL.md +162 -0
- package/corpus/templates/design/AGENTS.md +9 -2
- package/corpus/templates/design/actions/add-breakpoint.ts +6 -3
- package/corpus/templates/design/actions/apply-a11y-fix.ts +57 -37
- package/corpus/templates/design/actions/apply-component-prop-edit.ts +41 -20
- package/corpus/templates/design/actions/apply-motion-edit.ts +251 -38
- package/corpus/templates/design/actions/apply-shader-fill.ts +90 -66
- package/corpus/templates/design/actions/apply-visual-edit.ts +282 -55
- package/corpus/templates/design/actions/create-component.ts +29 -60
- package/corpus/templates/design/actions/create-file.ts +9 -2
- package/corpus/templates/design/actions/duplicate-design.ts +31 -2
- package/corpus/templates/design/actions/edit-design.ts +36 -38
- package/corpus/templates/design/actions/generate-design-title.ts +87 -0
- package/corpus/templates/design/actions/generate-design.ts +53 -18
- package/corpus/templates/design/actions/generate-screens.ts +108 -4
- package/corpus/templates/design/actions/get-motion-timeline.ts +35 -7
- package/corpus/templates/design/actions/insert-asset.ts +34 -29
- package/corpus/templates/design/actions/insert-design-native-asset.ts +129 -32
- package/corpus/templates/design/actions/insert-figma-library-asset.ts +35 -30
- package/corpus/templates/design/actions/present-design-variants.ts +7 -2
- package/corpus/templates/design/actions/remove-motion-timeline.ts +31 -36
- package/corpus/templates/design/actions/update-file.ts +190 -75
- package/corpus/templates/design/app/components/design/BreakpointBar.tsx +403 -0
- package/corpus/templates/design/app/components/design/CanvasContextMenu.tsx +469 -222
- package/corpus/templates/design/app/components/design/DesignCanvas.tsx +708 -53
- package/corpus/templates/design/app/components/design/DesignExtensionsPanel.tsx +83 -3
- package/corpus/templates/design/app/components/design/EditPanel.tsx +1091 -6948
- package/corpus/templates/design/app/components/design/LayersPanel.tsx +419 -85
- package/corpus/templates/design/app/components/design/MotionDock.tsx +1124 -103
- package/corpus/templates/design/app/components/design/MultiScreenCanvas.tsx +2610 -1398
- package/corpus/templates/design/app/components/design/ReadOnlyDesignBanner.tsx +22 -0
- package/corpus/templates/design/app/components/design/bridge/editor-chrome.bridge.ts +2182 -235
- package/corpus/templates/design/app/components/design/bridge/motion-preview.bridge.ts +187 -11
- package/corpus/templates/design/app/components/design/bridge/shader-fill-preview.bridge.ts +376 -1
- package/corpus/templates/design/app/components/design/bridge/shader-runtime.bridge.ts +746 -0
- package/corpus/templates/design/app/components/design/canvas-primitive-style.ts +17 -0
- package/corpus/templates/design/app/components/design/code-workbench/SideBar.tsx +1 -1
- package/corpus/templates/design/app/components/design/code-workbench/explorer/FileTree.tsx +1 -3
- package/corpus/templates/design/app/components/design/code-workbench/quickinput/QuickInput.tsx +1 -1
- package/corpus/templates/design/app/components/design/edit-panel/appearance-properties.tsx +518 -0
- package/corpus/templates/design/app/components/design/edit-panel/code-inspect-helpers.tsx +562 -0
- package/corpus/templates/design/app/components/design/edit-panel/component-section.tsx +763 -0
- package/corpus/templates/design/app/components/design/edit-panel/document-colors.ts +94 -0
- package/corpus/templates/design/app/components/design/edit-panel/effects-properties.tsx +780 -0
- package/corpus/templates/design/app/components/design/edit-panel/element-classification.ts +446 -0
- package/corpus/templates/design/app/components/design/edit-panel/element-identity.ts +79 -0
- package/corpus/templates/design/app/components/design/edit-panel/field-primitives.tsx +315 -0
- package/corpus/templates/design/app/components/design/edit-panel/fill-gradient-helpers.ts +344 -0
- package/corpus/templates/design/app/components/design/edit-panel/fill-properties.tsx +594 -0
- package/corpus/templates/design/app/components/design/edit-panel/frame-presets-panel.tsx +119 -0
- package/corpus/templates/design/app/components/design/edit-panel/inspector-controls.tsx +248 -0
- package/corpus/templates/design/app/components/design/edit-panel/interaction-state-helpers.ts +45 -0
- package/corpus/templates/design/app/components/design/edit-panel/layout-properties.tsx +693 -0
- package/corpus/templates/design/app/components/design/edit-panel/panel-primitives.tsx +724 -0
- package/corpus/templates/design/app/components/design/edit-panel/position-helpers.ts +207 -0
- package/corpus/templates/design/app/components/design/edit-panel/position-layout-properties.tsx +628 -0
- package/corpus/templates/design/app/components/design/edit-panel/selection-helpers.ts +91 -0
- package/corpus/templates/design/app/components/design/edit-panel/stroke-properties.tsx +649 -0
- package/corpus/templates/design/app/components/design/edit-panel/style-change-types.ts +118 -0
- package/corpus/templates/design/app/components/design/edit-panel/style-options.ts +88 -0
- package/corpus/templates/design/app/components/design/edit-panel/transform-helpers.ts +100 -0
- package/corpus/templates/design/app/components/design/edit-panel/typography-helpers.ts +117 -0
- package/corpus/templates/design/app/components/design/edit-panel/typography-properties.tsx +501 -0
- package/corpus/templates/design/app/components/design/inspector/AutoLayoutMatrix.tsx +91 -40
- package/corpus/templates/design/app/components/design/inspector/BreakpointOverrideIndicator.tsx +82 -0
- package/corpus/templates/design/app/components/design/inspector/DesignColorPicker.tsx +189 -87
- package/corpus/templates/design/app/components/design/inspector/GlslShaderPanel.tsx +1097 -0
- package/corpus/templates/design/app/components/design/inspector/GradientEditor.tsx +44 -0
- package/corpus/templates/design/app/components/design/inspector/InteractionStatePanel.tsx +258 -0
- package/corpus/templates/design/app/components/design/inspector/MotionKeyframeDiamond.tsx +144 -0
- package/corpus/templates/design/app/components/design/inspector/ScrubInput.tsx +99 -9
- package/corpus/templates/design/app/components/design/inspector/frame-size-presets.ts +116 -0
- package/corpus/templates/design/app/components/design/inspector/index.ts +26 -0
- package/corpus/templates/design/app/components/design/inspector/scrub-input-utils.ts +29 -0
- package/corpus/templates/design/app/components/design/multi-screen/alt-hover-measurement.ts +171 -0
- package/corpus/templates/design/app/components/design/multi-screen/board-surface-html.ts +220 -0
- package/corpus/templates/design/app/components/design/multi-screen/chrome-transitions.ts +35 -0
- package/corpus/templates/design/app/components/design/multi-screen/cross-screen-drop.ts +134 -0
- package/corpus/templates/design/app/components/design/multi-screen/culling.ts +185 -0
- package/corpus/templates/design/app/components/design/multi-screen/gradient-overlay-geometry.ts +120 -0
- package/corpus/templates/design/app/components/design/multi-screen/types.ts +892 -0
- package/corpus/templates/design/app/components/design/multi-screen/vector-edit-geometry.ts +21 -0
- package/corpus/templates/design/app/components/design/types.ts +15 -0
- package/corpus/templates/design/app/components/editor/PromptDialog.tsx +109 -5
- package/corpus/templates/design/app/global.css +8 -8
- package/corpus/templates/design/app/hooks/useDesignHotkeys.ts +259 -2
- package/corpus/templates/design/app/i18n/zh-TW.ts +163 -9
- package/corpus/templates/design/app/i18n-breakpoints.ts +205 -0
- package/corpus/templates/design/app/i18n-data.ts +1664 -152
- package/corpus/templates/design/app/i18n-motion.ts +563 -0
- package/corpus/templates/design/app/lib/design-import.ts +73 -0
- package/corpus/templates/design/app/pages/Index.tsx +41 -22
- package/corpus/templates/design/changelog/2026-06-29-design-inspector-controls-now-match-figmas-softer-dark-chrome.md +1 -1
- package/corpus/templates/design/changelog/2026-06-30-design-now-has-a-figma-style-left-rail-for-file-agent-assets.md +1 -1
- package/corpus/templates/design/changelog/2026-06-30-design-tools-now-use-a-quieter-figma-style-list-layout.md +1 -1
- package/corpus/templates/design/changelog/2026-06-30-multi-select-outlines-now-stay-consistent-across-all-screens.md +1 -1
- package/corpus/templates/design/changelog/2026-07-03-canvas-interactions-now-match-figma-rotation-aware-resizing-.md +1 -1
- package/corpus/templates/design/changelog/2026-07-03-layers-panel-matches-figma-top-layer-on-top-drag-with-auto-s.md +1 -1
- package/corpus/templates/design/changelog/2026-07-05-designs-get-ai-generated-names-from-your-prompt.md +6 -0
- package/corpus/templates/design/changelog/2026-07-05-local-code-screens-keep-their-connection-when-duplicated-and.md +6 -0
- package/corpus/templates/design/changelog/2026-07-05-press-a-to-draw-screens-on-the-canvas-inside-a-screen-it-dr.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-3d-rotation-and-perspective-controls-on-every-element.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-ai-generated-and-duplicated-screens-now-get-their-editor-sel.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-applying-shaders-and-fills-in-quick-succession-can-no-longer.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-breakpoint-frames-in-the-overview-now-support-click-to-selec.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-breakpoint-segments-in-the-inspector-now-show-a-device-icon-.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-breakpoint-targeting-now-lives-in-one-compact-control-in-the.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-canvas-edits-can-no-longer-be-overwritten-by-stale-collabora.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-canvas-edits-inside-screens-save-reliably-again.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-cleaner-inspector-removed-the-ask-ai-box-from-the-design-tab.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-clicking-empty-canvas-space-now-deselects-an-element-inside-.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-dragging-an-element-onto-a-rectangle-now-nests-it-inside-wit.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-dragging-screens-and-objects-on-the-canvas-is-now-much-smoot.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-drawing-a-shape-or-text-on-the-canvas-no-longer-flashes-away.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-dropping-an-element-between-two-others-inside-a-screen-now-s.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-duplicating-a-screen-now-places-the-copy-exactly-where-you-d.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-edit-gradients-directly-on-elements-inside-screens-scale-str.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-edits-from-collaborators-and-the-agent-now-update-the-canvas.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-fixed-a-bug-where-most-style-position-and-text-edits-briefly.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-fixed-a-confusing-raw-error-message-when-a-file-upload-fails.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-fixed-a-rare-case-where-an-edit-could-be-silently-overwritte.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-fixed-inserted-assets-sometimes-disappearing-reappearing-or-.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-fixed-inspector-value-scrubbing-producing-erratic-numbers-an.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-fixed-padding-gap-and-min-max-size-scrubbing-not-updating-th.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-fixed-text-stroke-color-turning-black-and-glyphs-disappearin.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-fixed-the-collapsed-effects-and-stroke-inspector-sections-sh.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-fixed-the-new-design-dialog-closing-unexpectedly-when-using-.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-fixed-the-typography-section-missing-when-selecting-text-nes.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-full-view-no-longer-flashes-back-to-the-overview-on-entry-no.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-keyframe-animation-timeline-per-property-keyframes-easing-cu.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-moving-restyling-and-scrubbing-values-on-elements-in-ai-gene.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-padding-and-corner-radius-value-scrubbing-now-snaps-to-whole.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-padding-handles-now-only-resize-on-the-handle-line-itself-sh.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-preview-and-edit-hover-focus-and-pressed-states-with-real-cs.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-promoting-an-element-to-a-component-now-works-correctly-for-.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-reduced-url-history-churn-and-selection-overlay-flicker-whil.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-removed-the-decorative-dot-before-screen-names-in-the-overvi.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-responsive-breakpoints-edit-at-any-width-with-cascading-over.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-screen-labels-no-longer-turn-blue-when-you-hover-inside-the-.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-scrolling-a-screen-with-an-element-selected-stays-smooth-on-.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-selecting-multiple-elements-and-dragging-now-moves-the-whole.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-selection-borders-handles-and-value-readouts-now-stay-the-sa.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-selection-handles-and-editing-chrome-now-stay-a-constant-siz.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-shader-fills-and-effects-ai-authored-or-preset-glsl-shaders-.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-text-drawn-on-the-canvas-now-defaults-to-white-and-inter-in-.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-text-dropped-into-a-shape-now-stays-readable-instead-of-disa.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-the-add-tweak-controls-prompt-no-longer-jumps-to-the-corner-.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-the-padding-value-readout-now-stays-visible-while-you-hover-.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-the-selected-element-attachment-now-clears-from-the-chat-com.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-the-zoom-menu-is-more-compact-with-tight-rows-and-right-alig.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-undo-and-redo-no-longer-flash-the-screen-changes-now-apply-i.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-zoom-presets-like-zoom-to-50-now-stay-on-the-focused-screen-.md +6 -0
- package/corpus/templates/design/server/lib/import-design-files.ts +11 -2
- package/corpus/templates/design/server/source-workspace.ts +139 -59
- package/corpus/templates/design/shared/board-file.ts +11 -2
- package/corpus/templates/design/shared/breakpoint-media.ts +543 -0
- package/corpus/templates/design/shared/canvas-math.ts +354 -35
- package/corpus/templates/design/shared/code-layer.ts +277 -8
- package/corpus/templates/design/shared/design-state.ts +11 -4
- package/corpus/templates/design/shared/interaction-states.ts +548 -0
- package/corpus/templates/design/shared/motion-compiler.ts +186 -23
- package/corpus/templates/design/shared/motion-easing.ts +294 -0
- package/corpus/templates/design/shared/motion-timeline.ts +400 -34
- package/corpus/templates/design/shared/prompt-title.ts +95 -0
- package/corpus/templates/design/shared/responsive-classes.ts +448 -10
- package/corpus/templates/design/shared/screen-annotation.ts +46 -0
- package/corpus/templates/design/shared/shader-fills.ts +1009 -0
- package/corpus/templates/design/shared/shader-presets.ts +852 -4
- package/corpus/templates/slides/app/components/editor/EditorToolbar.tsx +15 -2
- package/corpus/templates/slides/app/components/editor/ImportButton.tsx +10 -1
- package/corpus/templates/slides/app/lib/upload-response.ts +71 -0
- package/corpus/templates/slides/app/pages/DeckEditor.tsx +2 -2
- package/dist/agent/engine/ai-sdk-engine.d.ts.map +1 -1
- package/dist/agent/engine/ai-sdk-engine.js +15 -1
- package/dist/agent/engine/ai-sdk-engine.js.map +1 -1
- package/dist/agent/engine/anthropic-engine.d.ts.map +1 -1
- package/dist/agent/engine/anthropic-engine.js +20 -1
- package/dist/agent/engine/anthropic-engine.js.map +1 -1
- package/dist/agent/engine/registry.d.ts.map +1 -1
- package/dist/agent/engine/registry.js +22 -14
- package/dist/agent/engine/registry.js.map +1 -1
- package/dist/agent/production-agent.d.ts.map +1 -1
- package/dist/agent/production-agent.js +27 -7
- package/dist/agent/production-agent.js.map +1 -1
- package/dist/client/AgentPanel.js +1 -1
- package/dist/client/AgentPanel.js.map +1 -1
- package/dist/client/command-navigation/index.d.ts +4 -0
- package/dist/client/command-navigation/index.d.ts.map +1 -0
- package/dist/client/command-navigation/index.js +4 -0
- package/dist/client/command-navigation/index.js.map +1 -0
- package/dist/client/comments-review/index.d.ts +2 -0
- package/dist/client/comments-review/index.d.ts.map +1 -0
- package/dist/client/comments-review/index.js +2 -0
- package/dist/client/comments-review/index.js.map +1 -0
- package/dist/client/history/VersionHistoryPanel.d.ts +18 -0
- package/dist/client/history/VersionHistoryPanel.d.ts.map +1 -0
- package/dist/client/history/VersionHistoryPanel.js +24 -0
- package/dist/client/history/VersionHistoryPanel.js.map +1 -0
- package/dist/client/history/index.d.ts +3 -0
- package/dist/client/history/index.d.ts.map +1 -0
- package/dist/client/history/index.js +3 -0
- package/dist/client/history/index.js.map +1 -0
- package/dist/client/history/use-history.d.ts +46 -0
- package/dist/client/history/use-history.d.ts.map +1 -0
- package/dist/client/history/use-history.js +18 -0
- package/dist/client/history/use-history.js.map +1 -0
- package/dist/client/index.d.ts +6 -4
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +6 -4
- package/dist/client/index.js.map +1 -1
- package/dist/client/org/OrgSwitcher.js +5 -5
- package/dist/client/org/OrgSwitcher.js.map +1 -1
- package/dist/client/org/RequireActiveOrg.js +2 -2
- package/dist/client/org/RequireActiveOrg.js.map +1 -1
- package/dist/client/org/TeamPage.js +3 -3
- package/dist/client/org/TeamPage.js.map +1 -1
- package/dist/client/org/hooks.d.ts +12 -1
- package/dist/client/org/hooks.d.ts.map +1 -1
- package/dist/client/org/hooks.js +15 -0
- package/dist/client/org/hooks.js.map +1 -1
- package/dist/client/org/index.d.ts +4 -2
- package/dist/client/org/index.d.ts.map +1 -1
- package/dist/client/org/index.js +3 -1
- package/dist/client/org/index.js.map +1 -1
- package/dist/client/org-team/index.d.ts +2 -0
- package/dist/client/org-team/index.d.ts.map +1 -0
- package/dist/client/org-team/index.js +2 -0
- package/dist/client/org-team/index.js.map +1 -0
- package/dist/client/review/ReviewStatusBadge.d.ts +7 -0
- package/dist/client/review/ReviewStatusBadge.d.ts.map +1 -0
- package/dist/client/review/ReviewStatusBadge.js +19 -0
- package/dist/client/review/ReviewStatusBadge.js.map +1 -0
- package/dist/client/review/ReviewThreadPanel.d.ts +20 -0
- package/dist/client/review/ReviewThreadPanel.d.ts.map +1 -0
- package/dist/client/review/ReviewThreadPanel.js +84 -0
- package/dist/client/review/ReviewThreadPanel.js.map +1 -0
- package/dist/client/review/index.d.ts +4 -0
- package/dist/client/review/index.d.ts.map +1 -0
- package/dist/client/review/index.js +4 -0
- package/dist/client/review/index.js.map +1 -0
- package/dist/client/review/use-review.d.ts +68 -0
- package/dist/client/review/use-review.d.ts.map +1 -0
- package/dist/client/review/use-review.js +22 -0
- package/dist/client/review/use-review.js.map +1 -0
- package/dist/client/rich-markdown-editor/useCollabReconcile.d.ts.map +1 -1
- package/dist/client/rich-markdown-editor/useCollabReconcile.js +11 -6
- package/dist/client/rich-markdown-editor/useCollabReconcile.js.map +1 -1
- package/dist/client/settings/index.d.ts +1 -1
- package/dist/client/settings/index.d.ts.map +1 -1
- package/dist/client/settings/index.js +1 -1
- package/dist/client/settings/index.js.map +1 -1
- package/dist/client/setup-connections/BuilderConnectCard.d.ts +9 -0
- package/dist/client/setup-connections/BuilderConnectCard.d.ts.map +1 -0
- package/dist/client/setup-connections/BuilderConnectCard.js +25 -0
- package/dist/client/setup-connections/BuilderConnectCard.js.map +1 -0
- package/dist/client/setup-connections/ProviderReadinessBadge.d.ts +8 -0
- package/dist/client/setup-connections/ProviderReadinessBadge.d.ts.map +1 -0
- package/dist/client/setup-connections/ProviderReadinessBadge.js +32 -0
- package/dist/client/setup-connections/ProviderReadinessBadge.js.map +1 -0
- package/dist/client/setup-connections/SetupConnectionsPage.d.ts +17 -0
- package/dist/client/setup-connections/SetupConnectionsPage.d.ts.map +1 -0
- package/dist/client/setup-connections/SetupConnectionsPage.js +10 -0
- package/dist/client/setup-connections/SetupConnectionsPage.js.map +1 -0
- package/dist/client/setup-connections/index.d.ts +7 -0
- package/dist/client/setup-connections/index.d.ts.map +1 -0
- package/dist/client/setup-connections/index.js +7 -0
- package/dist/client/setup-connections/index.js.map +1 -0
- package/dist/client/sharing/ShareButton.d.ts +4 -4
- package/dist/client/sharing/ShareButton.d.ts.map +1 -1
- package/dist/client/sharing/ShareButton.js +13 -7
- package/dist/client/sharing/ShareButton.js.map +1 -1
- package/dist/client/sharing/ShareDialog.js +3 -3
- package/dist/client/sharing/ShareDialog.js.map +1 -1
- package/dist/client/use-action.d.ts +3 -0
- package/dist/client/use-action.d.ts.map +1 -1
- package/dist/client/use-action.js +34 -3
- package/dist/client/use-action.js.map +1 -1
- package/dist/client/use-db-sync.d.ts +4 -0
- package/dist/client/use-db-sync.d.ts.map +1 -1
- package/dist/client/use-db-sync.js +37 -18
- package/dist/client/use-db-sync.js.map +1 -1
- package/dist/collab/routes.d.ts +1 -1
- package/dist/command-navigation/actions.d.ts +25 -0
- package/dist/command-navigation/actions.d.ts.map +1 -0
- package/dist/command-navigation/actions.js +64 -0
- package/dist/command-navigation/actions.js.map +1 -0
- package/dist/command-navigation/index.d.ts +4 -0
- package/dist/command-navigation/index.d.ts.map +1 -0
- package/dist/command-navigation/index.js +4 -0
- package/dist/command-navigation/index.js.map +1 -0
- package/dist/comments-review/index.d.ts +2 -0
- package/dist/comments-review/index.d.ts.map +1 -0
- package/dist/comments-review/index.js +2 -0
- package/dist/comments-review/index.js.map +1 -0
- package/dist/db/create-get-db.d.ts +25 -0
- package/dist/db/create-get-db.d.ts.map +1 -1
- package/dist/db/create-get-db.js +25 -2
- package/dist/db/create-get-db.js.map +1 -1
- package/dist/file-upload/builder.d.ts.map +1 -1
- package/dist/file-upload/builder.js +18 -2
- package/dist/file-upload/builder.js.map +1 -1
- package/dist/file-upload/types.d.ts +3 -0
- package/dist/file-upload/types.d.ts.map +1 -1
- package/dist/file-upload/types.js.map +1 -1
- package/dist/history/actions/create-resource-version.d.ts +10 -0
- package/dist/history/actions/create-resource-version.d.ts.map +1 -0
- package/dist/history/actions/create-resource-version.js +65 -0
- package/dist/history/actions/create-resource-version.js.map +1 -0
- package/dist/history/actions/get-resource-version.d.ts +10 -0
- package/dist/history/actions/get-resource-version.d.ts.map +1 -0
- package/dist/history/actions/get-resource-version.js +38 -0
- package/dist/history/actions/get-resource-version.js.map +1 -0
- package/dist/history/actions/list-resource-history.d.ts +10 -0
- package/dist/history/actions/list-resource-history.d.ts.map +1 -0
- package/dist/history/actions/list-resource-history.js +45 -0
- package/dist/history/actions/list-resource-history.js.map +1 -0
- package/dist/history/actions/list-resource-versions.d.ts +10 -0
- package/dist/history/actions/list-resource-versions.d.ts.map +1 -0
- package/dist/history/actions/list-resource-versions.js +35 -0
- package/dist/history/actions/list-resource-versions.js.map +1 -0
- package/dist/history/actions/restore-resource-version.d.ts +11 -0
- package/dist/history/actions/restore-resource-version.d.ts.map +1 -0
- package/dist/history/actions/restore-resource-version.js +59 -0
- package/dist/history/actions/restore-resource-version.js.map +1 -0
- package/dist/history/index.d.ts +4 -0
- package/dist/history/index.d.ts.map +1 -0
- package/dist/history/index.js +3 -0
- package/dist/history/index.js.map +1 -0
- package/dist/history/registry.d.ts +10 -0
- package/dist/history/registry.d.ts.map +1 -0
- package/dist/history/registry.js +61 -0
- package/dist/history/registry.js.map +1 -0
- package/dist/history/store.d.ts +34 -0
- package/dist/history/store.d.ts.map +1 -0
- package/dist/history/store.js +265 -0
- package/dist/history/store.js.map +1 -0
- package/dist/history/types.d.ts +55 -0
- package/dist/history/types.d.ts.map +1 -0
- package/dist/history/types.js +2 -0
- package/dist/history/types.js.map +1 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -1
- package/dist/navigation/index.d.ts +53 -0
- package/dist/navigation/index.d.ts.map +1 -0
- package/dist/navigation/index.js +105 -0
- package/dist/navigation/index.js.map +1 -0
- package/dist/observability/routes.d.ts +3 -3
- package/dist/org/index.d.ts +1 -0
- package/dist/org/index.d.ts.map +1 -1
- package/dist/org/index.js +1 -0
- package/dist/org/index.js.map +1 -1
- package/dist/org/permissions.d.ts +7 -0
- package/dist/org/permissions.d.ts.map +1 -0
- package/dist/org/permissions.js +21 -0
- package/dist/org/permissions.js.map +1 -0
- package/dist/org-team/index.d.ts +2 -0
- package/dist/org-team/index.d.ts.map +1 -0
- package/dist/org-team/index.js +2 -0
- package/dist/org-team/index.js.map +1 -0
- package/dist/private-blob/registry.d.ts.map +1 -1
- package/dist/private-blob/registry.js +1 -0
- package/dist/private-blob/registry.js.map +1 -1
- package/dist/resources/handlers.d.ts +2 -2
- package/dist/review/actions/consume-review-feedback.d.ts +9 -0
- package/dist/review/actions/consume-review-feedback.d.ts.map +1 -0
- package/dist/review/actions/consume-review-feedback.js +29 -0
- package/dist/review/actions/consume-review-feedback.js.map +1 -0
- package/dist/review/actions/create-review-comment.d.ts +18 -0
- package/dist/review/actions/create-review-comment.d.ts.map +1 -0
- package/dist/review/actions/create-review-comment.js +81 -0
- package/dist/review/actions/create-review-comment.js.map +1 -0
- package/dist/review/actions/delete-review-comment.d.ts +10 -0
- package/dist/review/actions/delete-review-comment.d.ts.map +1 -0
- package/dist/review/actions/delete-review-comment.js +45 -0
- package/dist/review/actions/delete-review-comment.js.map +1 -0
- package/dist/review/actions/get-review-feedback.d.ts +10 -0
- package/dist/review/actions/get-review-feedback.d.ts.map +1 -0
- package/dist/review/actions/get-review-feedback.js +45 -0
- package/dist/review/actions/get-review-feedback.js.map +1 -0
- package/dist/review/actions/list-review-comments.d.ts +13 -0
- package/dist/review/actions/list-review-comments.d.ts.map +1 -0
- package/dist/review/actions/list-review-comments.js +44 -0
- package/dist/review/actions/list-review-comments.js.map +1 -0
- package/dist/review/actions/reply-review-comment.d.ts +16 -0
- package/dist/review/actions/reply-review-comment.d.ts.map +1 -0
- package/dist/review/actions/reply-review-comment.js +84 -0
- package/dist/review/actions/reply-review-comment.js.map +1 -0
- package/dist/review/actions/resolve-review-thread.d.ts +11 -0
- package/dist/review/actions/resolve-review-thread.d.ts.map +1 -0
- package/dist/review/actions/resolve-review-thread.js +46 -0
- package/dist/review/actions/resolve-review-thread.js.map +1 -0
- package/dist/review/actions/set-review-status.d.ts +9 -0
- package/dist/review/actions/set-review-status.d.ts.map +1 -0
- package/dist/review/actions/set-review-status.js +43 -0
- package/dist/review/actions/set-review-status.js.map +1 -0
- package/dist/review/index.d.ts +5 -0
- package/dist/review/index.d.ts.map +1 -0
- package/dist/review/index.js +4 -0
- package/dist/review/index.js.map +1 -0
- package/dist/review/mentions.d.ts +4 -0
- package/dist/review/mentions.d.ts.map +1 -0
- package/dist/review/mentions.js +39 -0
- package/dist/review/mentions.js.map +1 -0
- package/dist/review/registry.d.ts +10 -0
- package/dist/review/registry.d.ts.map +1 -0
- package/dist/review/registry.js +61 -0
- package/dist/review/registry.js.map +1 -0
- package/dist/review/store.d.ts +63 -0
- package/dist/review/store.d.ts.map +1 -0
- package/dist/review/store.js +558 -0
- package/dist/review/store.js.map +1 -0
- package/dist/review/types.d.ts +77 -0
- package/dist/review/types.d.ts.map +1 -0
- package/dist/review/types.js +2 -0
- package/dist/review/types.js.map +1 -0
- package/dist/secrets/routes.d.ts +9 -9
- package/dist/server/action-discovery.d.ts.map +1 -1
- package/dist/server/action-discovery.js +54 -0
- package/dist/server/action-discovery.js.map +1 -1
- package/dist/server/agent-engine-api-key-route.d.ts +1 -1
- package/dist/server/agent-engine-api-key-route.d.ts.map +1 -1
- package/dist/server/agent-engine-api-key-route.js +5 -0
- package/dist/server/agent-engine-api-key-route.js.map +1 -1
- package/dist/server/credential-provider.d.ts +26 -0
- package/dist/server/credential-provider.d.ts.map +1 -1
- package/dist/server/credential-provider.js +82 -0
- package/dist/server/credential-provider.js.map +1 -1
- package/dist/server/framework-request-handler.d.ts.map +1 -1
- package/dist/server/framework-request-handler.js +37 -1
- package/dist/server/framework-request-handler.js.map +1 -1
- package/dist/setup-connections/index.d.ts +6 -0
- package/dist/setup-connections/index.d.ts.map +1 -0
- package/dist/setup-connections/index.js +6 -0
- package/dist/setup-connections/index.js.map +1 -0
- package/dist/setup-connections/onboarding.d.ts +14 -0
- package/dist/setup-connections/onboarding.d.ts.map +1 -0
- package/dist/setup-connections/onboarding.js +23 -0
- package/dist/setup-connections/onboarding.js.map +1 -0
- package/dist/transcription/builder-transcription.d.ts +1 -0
- package/dist/transcription/builder-transcription.d.ts.map +1 -1
- package/dist/transcription/builder-transcription.js +5 -2
- package/dist/transcription/builder-transcription.js.map +1 -1
- package/dist/vite/action-types-plugin.d.ts.map +1 -1
- package/dist/vite/action-types-plugin.js +52 -0
- package/dist/vite/action-types-plugin.js.map +1 -1
- package/docs/content/agent-native-toolkit.mdx +87 -80
- package/docs/content/locales/ar-SA/agent-native-toolkit.mdx +89 -80
- package/docs/content/locales/de-DE/agent-native-toolkit.mdx +89 -80
- package/docs/content/locales/es-ES/agent-native-toolkit.mdx +89 -80
- package/docs/content/locales/fr-FR/agent-native-toolkit.mdx +89 -80
- package/docs/content/locales/hi-IN/agent-native-toolkit.mdx +89 -80
- package/docs/content/locales/ja-JP/agent-native-toolkit.mdx +89 -80
- package/docs/content/locales/ko-KR/agent-native-toolkit.mdx +89 -80
- package/docs/content/locales/pt-BR/agent-native-toolkit.mdx +89 -80
- package/docs/content/locales/zh-CN/agent-native-toolkit.mdx +89 -80
- package/docs/content/locales/zh-TW/agent-native-toolkit.mdx +89 -80
- package/docs/content/toolkit-agent-ux.mdx +43 -0
- package/docs/content/toolkit-app-adapters.mdx +9 -0
- package/docs/content/toolkit-collaboration-ui.mdx +12 -0
- package/docs/content/toolkit-collaboration.mdx +74 -0
- package/docs/content/toolkit-command-navigation.mdx +106 -0
- package/docs/content/toolkit-comments-review.mdx +98 -0
- package/docs/content/toolkit-history.mdx +95 -0
- package/docs/content/toolkit-observability.mdx +41 -0
- package/docs/content/toolkit-org-team.mdx +80 -0
- package/docs/content/toolkit-resources.mdx +57 -0
- package/docs/content/toolkit-settings.mdx +65 -0
- package/docs/content/toolkit-setup-connections.mdx +109 -0
- package/docs/content/toolkit-sharing-ui.mdx +18 -6
- package/docs/content/toolkit-sharing.mdx +81 -0
- package/docs/content/toolkit-shell-hooks.mdx +9 -0
- package/docs/content/toolkit-ui.mdx +9 -0
- package/package.json +36 -2
- package/corpus/templates/design/app/components/design/inspector/InspectorAiActions.tsx +0 -153
- package/corpus/templates/design/app/hooks/useAgentEditRequest.ts +0 -133
- package/corpus/templates/design/app/pages/DesignEditor.tsx +0 -22924
|
@@ -0,0 +1,892 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
DistanceGuideBand,
|
|
3
|
+
EqualGapGuide,
|
|
4
|
+
FrameBounds,
|
|
5
|
+
} from "@shared/canvas-math";
|
|
6
|
+
import type { PenPath } from "@shared/pen-path";
|
|
7
|
+
import type { ReactNode } from "react";
|
|
8
|
+
|
|
9
|
+
import type {
|
|
10
|
+
IframeContextMenuPayload,
|
|
11
|
+
IframeFigmaClipboardPastePayload,
|
|
12
|
+
IframeHotkeyPayload,
|
|
13
|
+
} from "../DesignCanvas";
|
|
14
|
+
import type {
|
|
15
|
+
DeviceFrameType,
|
|
16
|
+
ElementInfo,
|
|
17
|
+
ElementSelectionIntent,
|
|
18
|
+
PortableStyleSnapshot,
|
|
19
|
+
} from "../types";
|
|
20
|
+
|
|
21
|
+
export interface ScreenFile {
|
|
22
|
+
id: string;
|
|
23
|
+
filename: string;
|
|
24
|
+
content: string;
|
|
25
|
+
source?: string;
|
|
26
|
+
sourceType?: string;
|
|
27
|
+
lod?: string;
|
|
28
|
+
previewState?: string;
|
|
29
|
+
status?: string;
|
|
30
|
+
title?: string;
|
|
31
|
+
updatedAt?: string;
|
|
32
|
+
width?: number;
|
|
33
|
+
height?: number;
|
|
34
|
+
url?: string;
|
|
35
|
+
previewUrl?: string;
|
|
36
|
+
bridgeUrl?: string;
|
|
37
|
+
/**
|
|
38
|
+
* When set, renders multiple side-by-side breakpoint frames (mobile-first,
|
|
39
|
+
* §6.4). Each entry is a pixel width; the active breakpoint determines the
|
|
40
|
+
* edit scope (Tailwind prefix: base / md: / lg: / xl:).
|
|
41
|
+
*/
|
|
42
|
+
breakpointWidths?: number[];
|
|
43
|
+
/** Id of the currently active breakpoint frame for this screen. */
|
|
44
|
+
activeBreakpointWidth?: number;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export type ScreenSourceType = "localhost" | "fusion" | "inline";
|
|
48
|
+
export type ScreenPreviewState = "live" | "snapshot" | "preview";
|
|
49
|
+
export type MultiScreenCanvasTool =
|
|
50
|
+
| "move"
|
|
51
|
+
| "frame"
|
|
52
|
+
| "rect"
|
|
53
|
+
| "rectangle"
|
|
54
|
+
| "line"
|
|
55
|
+
| "arrow"
|
|
56
|
+
| "ellipse"
|
|
57
|
+
| "polygon"
|
|
58
|
+
| "star"
|
|
59
|
+
| "text"
|
|
60
|
+
| "pen"
|
|
61
|
+
| "hand"
|
|
62
|
+
| "comment"
|
|
63
|
+
| "draw"
|
|
64
|
+
| "scale";
|
|
65
|
+
|
|
66
|
+
export interface CanvasToolProps {
|
|
67
|
+
fill?: string;
|
|
68
|
+
stroke?: string;
|
|
69
|
+
strokeWidth?: number;
|
|
70
|
+
text?: string;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export interface CanvasPrimitiveInsert {
|
|
74
|
+
kind: DraftPrimitiveKind;
|
|
75
|
+
nodeId?: string;
|
|
76
|
+
geometry: FrameGeometry;
|
|
77
|
+
points?: Point[];
|
|
78
|
+
pathData?: string;
|
|
79
|
+
text?: string;
|
|
80
|
+
fill?: string;
|
|
81
|
+
stroke?: string;
|
|
82
|
+
strokeWidth?: number;
|
|
83
|
+
autoSize?: boolean;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export interface PersistedDraftPrimitive {
|
|
87
|
+
frameId: string;
|
|
88
|
+
nodeId: string;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export interface ScreenMetadata {
|
|
92
|
+
source?: string;
|
|
93
|
+
sourceType?: string;
|
|
94
|
+
lod?: string;
|
|
95
|
+
previewState?: string;
|
|
96
|
+
title?: string;
|
|
97
|
+
width?: number;
|
|
98
|
+
height?: number;
|
|
99
|
+
url?: string;
|
|
100
|
+
previewUrl?: string;
|
|
101
|
+
bridgeUrl?: string;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
export interface DuplicateRequest {
|
|
105
|
+
mode: "alt-click" | "alt-drag";
|
|
106
|
+
screen: ScreenFile;
|
|
107
|
+
canvasPosition: { x: number; y: number };
|
|
108
|
+
canvasOffset?: { x: number; y: number };
|
|
109
|
+
dropCanvasPosition?: { x: number; y: number };
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
export interface MultiScreenCanvasProps {
|
|
113
|
+
screens: ScreenFile[];
|
|
114
|
+
zoom: number;
|
|
115
|
+
activeId?: string | null;
|
|
116
|
+
selectedScreenIds?: string[];
|
|
117
|
+
fullViewScreenIds?: string[];
|
|
118
|
+
activeScreenHasHoveredChild?: boolean;
|
|
119
|
+
hoveredChildScreenId?: string | null;
|
|
120
|
+
directlyHoveredScreenId?: string | null;
|
|
121
|
+
previewDeviceFrame?: DeviceFrameType;
|
|
122
|
+
activeTool?: MultiScreenCanvasTool;
|
|
123
|
+
toolProps?: CanvasToolProps;
|
|
124
|
+
onActiveToolChange?: (tool: MultiScreenCanvasTool) => void;
|
|
125
|
+
onPick: (id: string) => void;
|
|
126
|
+
onEdit?: (id: string) => void;
|
|
127
|
+
metadataById?: Record<string, ScreenMetadata | undefined>;
|
|
128
|
+
getScreenMetadata?: (screen: ScreenFile) => ScreenMetadata | undefined;
|
|
129
|
+
onDuplicate?: (id: string, request: DuplicateRequest) => void;
|
|
130
|
+
geometryById?: Record<string, Partial<FrameGeometry> | undefined>;
|
|
131
|
+
onGeometryChange?: (geometryById: FrameGeometryById) => void;
|
|
132
|
+
onGeometryCommit?: (
|
|
133
|
+
before: FrameGeometryById,
|
|
134
|
+
after: FrameGeometryById,
|
|
135
|
+
) => void;
|
|
136
|
+
onCreatePrimitive?: (
|
|
137
|
+
screenId: string,
|
|
138
|
+
primitive: CanvasPrimitiveInsert,
|
|
139
|
+
) => boolean | string;
|
|
140
|
+
onPrimitiveCreated?: (
|
|
141
|
+
screenId: string,
|
|
142
|
+
nodeId: string,
|
|
143
|
+
options?: { nextTool?: "move" | "pen" },
|
|
144
|
+
) => void;
|
|
145
|
+
onPrimitiveReparent?: (args: {
|
|
146
|
+
sourceNodeId: string;
|
|
147
|
+
sourceScreenId: string;
|
|
148
|
+
targetNodeId: string;
|
|
149
|
+
targetScreenId: string;
|
|
150
|
+
placement: "inside";
|
|
151
|
+
}) => void;
|
|
152
|
+
onCreateScreenFrame?: (geometry: FrameGeometry) => void;
|
|
153
|
+
onDeleteSelection?: (ids: string[]) => boolean | void;
|
|
154
|
+
onZoomChange?: (zoom: number) => void;
|
|
155
|
+
renderScreenContent?: (
|
|
156
|
+
screen: ScreenFile,
|
|
157
|
+
metadata: ResolvedScreenMetadata,
|
|
158
|
+
geometry: FrameGeometry,
|
|
159
|
+
) => ReactNode;
|
|
160
|
+
onScreenSelectionChange?: (ids: string[]) => void;
|
|
161
|
+
selectAllRequest?: number;
|
|
162
|
+
clearSelectionRequest?: number;
|
|
163
|
+
/**
|
|
164
|
+
* Called when the user clicks the + affordance on a screen's breakpoint
|
|
165
|
+
* row to add the next standard breakpoint width (390 / 768 / 1280).
|
|
166
|
+
*/
|
|
167
|
+
onAddBreakpoint?: (screenId: string, widthPx: number) => void;
|
|
168
|
+
/**
|
|
169
|
+
* Called when the user clicks a breakpoint frame header to make it the
|
|
170
|
+
* active edit scope.
|
|
171
|
+
*/
|
|
172
|
+
onActiveBreakpointChange?: (
|
|
173
|
+
screenId: string,
|
|
174
|
+
widthPx: number | undefined,
|
|
175
|
+
) => void;
|
|
176
|
+
/**
|
|
177
|
+
* STEVE TEST BATCH 3 item 8b — "…" menu on an overview breakpoint frame:
|
|
178
|
+
* remove that breakpoint. Width-first (not breakpoint-id) to match
|
|
179
|
+
* onAddBreakpoint/onActiveBreakpointChange's existing convention — the
|
|
180
|
+
* design only has one breakpoint set, so the caller (DesignEditor) can
|
|
181
|
+
* resolve widthPx back to a breakpoint id the same way
|
|
182
|
+
* handleOverviewActiveBreakpointChange already does.
|
|
183
|
+
*/
|
|
184
|
+
onRemoveBreakpoint?: (screenId: string, widthPx: number) => void;
|
|
185
|
+
/**
|
|
186
|
+
* STEVE TEST BATCH 3 item 8b — "…" menu "Change width" commit for an
|
|
187
|
+
* overview breakpoint frame. `widthPx` identifies which breakpoint (its
|
|
188
|
+
* current width); `nextWidthPx` is the new value.
|
|
189
|
+
*/
|
|
190
|
+
onChangeBreakpointWidth?: (
|
|
191
|
+
screenId: string,
|
|
192
|
+
widthPx: number,
|
|
193
|
+
nextWidthPx: number,
|
|
194
|
+
) => void;
|
|
195
|
+
/**
|
|
196
|
+
* STEVE TEST BATCH 3 item 8b — "full view" entry for one breakpoint frame
|
|
197
|
+
* in overview (double-click or its own full-view button): enter
|
|
198
|
+
* single-screen mode for the owning screen with this breakpoint width as
|
|
199
|
+
* the active edit/viewport scope. Falls back to plain `onEdit` when unset
|
|
200
|
+
* so existing callers keep working unchanged.
|
|
201
|
+
*/
|
|
202
|
+
onEditBreakpoint?: (screenId: string, widthPx: number) => void;
|
|
203
|
+
onSelectionChange?: (selectedIds: string[]) => void;
|
|
204
|
+
onLayerMarqueeSelectionChange?: (
|
|
205
|
+
selection: CanvasLayerMarqueeSelection[],
|
|
206
|
+
intent: ElementSelectionIntent,
|
|
207
|
+
) => void;
|
|
208
|
+
selectedLayerSelectorGroupsByScreen?: Record<string, string[][]>;
|
|
209
|
+
/**
|
|
210
|
+
* Called when the user drags an element out of the active screen's iframe
|
|
211
|
+
* and drops it onto a different screen. The bridge in the source iframe
|
|
212
|
+
* posts { type:"agent-native:cross-screen-drag" } messages; the host
|
|
213
|
+
* translates them to board coords, finds the target frame, runs a hit-test
|
|
214
|
+
* in the target iframe (50ms timeout), and calls this prop with the resolved
|
|
215
|
+
* ids and anchor placement.
|
|
216
|
+
*/
|
|
217
|
+
onCrossScreenElementDrop?: (args: {
|
|
218
|
+
sourceSelector: string;
|
|
219
|
+
sourceNodeId?: string;
|
|
220
|
+
sourceScreenId: string;
|
|
221
|
+
targetScreenId: string;
|
|
222
|
+
/** data-agent-native-node-id of the deepest container at the drop point
|
|
223
|
+
* inside the target screen iframe (undefined when hit-test timed out). */
|
|
224
|
+
targetAnchorNodeId?: string;
|
|
225
|
+
/** DOM insertion placement relative to the anchor node. */
|
|
226
|
+
targetAnchorPlacement?: "before" | "after" | "inside";
|
|
227
|
+
/** Whether the target should receive an in-flow insert or an absolute child. */
|
|
228
|
+
targetDropMode?: CrossScreenDropMode;
|
|
229
|
+
/** Target anchor rect in the destination iframe/content coordinate space. */
|
|
230
|
+
targetAnchorRect?: CrossScreenHitTestAnchorRect;
|
|
231
|
+
/** Final drop point in logical overview canvas coordinates. */
|
|
232
|
+
targetCanvasPoint?: Point;
|
|
233
|
+
/** Final drop point in the destination iframe/content coordinate space. */
|
|
234
|
+
targetLocalPoint?: Point;
|
|
235
|
+
/** Pointer offset from the dragged element's top-left in source iframe px. */
|
|
236
|
+
sourcePointerOffset?: Point;
|
|
237
|
+
/** Portable computed styles captured in the source iframe before the move. */
|
|
238
|
+
styleSnapshot?: PortableStyleSnapshot;
|
|
239
|
+
}) => void;
|
|
240
|
+
// ── Board file (new model) ───────────────────────────────────────────────
|
|
241
|
+
/**
|
|
242
|
+
* The id of the reserved "__board__.html" design file.
|
|
243
|
+
* When provided, a full-surface board <DesignCanvas> is rendered below
|
|
244
|
+
* the screen iframes so board elements are editable through the bridge.
|
|
245
|
+
*/
|
|
246
|
+
boardFileId?: string;
|
|
247
|
+
/**
|
|
248
|
+
* The current HTML content of the board file.
|
|
249
|
+
* Passed as `content` to the board <DesignCanvas> instance.
|
|
250
|
+
*/
|
|
251
|
+
boardFileContent?: string;
|
|
252
|
+
/**
|
|
253
|
+
* The logical geometry of the board iframe in canvas coordinates.
|
|
254
|
+
* Should be { x:0, y:0, width:totalSurfaceWidth, height:totalSurfaceHeight }.
|
|
255
|
+
* Used to translate cross-screen-drag coords when the source is the board.
|
|
256
|
+
*/
|
|
257
|
+
boardFrameGeometry?: FrameGeometry;
|
|
258
|
+
/**
|
|
259
|
+
* Called when a draft primitive is committed outside all screen frames
|
|
260
|
+
* (and there is more than one screen). The caller should append the
|
|
261
|
+
* primitive into the board file's HTML content.
|
|
262
|
+
*
|
|
263
|
+
* Replaces the legacy onCreateBoardObject.
|
|
264
|
+
*/
|
|
265
|
+
onBoardDrawPrimitive?: (primitive: CanvasPrimitiveInsert) => boolean | string;
|
|
266
|
+
// ── Board edit callbacks (active-target model) ───────────────────────────
|
|
267
|
+
/**
|
|
268
|
+
* When true the board <DesignCanvas> is in edit mode.
|
|
269
|
+
* Pass `canEditDesign` from DesignEditor. Defaults to false.
|
|
270
|
+
*/
|
|
271
|
+
boardEditMode?: boolean;
|
|
272
|
+
/**
|
|
273
|
+
* When true the board is the active surface (activeFileId === boardFileId),
|
|
274
|
+
* so the board <DesignCanvas> owns the global window runtime bridge
|
|
275
|
+
* (`registerRuntimeBridge={boardIsActive}`). This mirrors how the active
|
|
276
|
+
* screen owns the bridge in single/overview mode: at most one surface
|
|
277
|
+
* registers the global `window.__designCanvas*` helpers at a time
|
|
278
|
+
* (active screen XOR active board, since `activeFileId` is exclusive), so
|
|
279
|
+
* in-place ops — delete removal, begin-text-edit — reach the board exactly
|
|
280
|
+
* like a screen. DesignEditor passes `activeFileId === boardFileId`.
|
|
281
|
+
* Defaults to false.
|
|
282
|
+
*/
|
|
283
|
+
boardIsActive?: boolean;
|
|
284
|
+
/**
|
|
285
|
+
* Called when the user selects an element on the board surface.
|
|
286
|
+
* DesignEditor should set boardFileId as the active file and push the
|
|
287
|
+
* selection to the inspector.
|
|
288
|
+
*/
|
|
289
|
+
onBoardElementSelect?: (
|
|
290
|
+
info: ElementInfo,
|
|
291
|
+
intent?: ElementSelectionIntent,
|
|
292
|
+
) => void;
|
|
293
|
+
onBoardElementMarqueeSelect?: (
|
|
294
|
+
infos: ElementInfo[],
|
|
295
|
+
intent?: ElementSelectionIntent,
|
|
296
|
+
) => void;
|
|
297
|
+
/**
|
|
298
|
+
* Called when the user hovers an element on the board surface.
|
|
299
|
+
*/
|
|
300
|
+
onBoardElementHover?: (info: ElementInfo | null) => void;
|
|
301
|
+
onBoardElementClear?: () => void;
|
|
302
|
+
onBoardElementDblClickText?: (info: ElementInfo) => void;
|
|
303
|
+
onBoardIframeHotkey?: (event: IframeHotkeyPayload) => void;
|
|
304
|
+
onBoardFigmaClipboardPaste?: (
|
|
305
|
+
event: IframeFigmaClipboardPastePayload,
|
|
306
|
+
) => void;
|
|
307
|
+
onBoardIframeContextMenu?: (event: IframeContextMenuPayload) => void;
|
|
308
|
+
onBoardTextEditingStateChange?: (state: {
|
|
309
|
+
active: boolean;
|
|
310
|
+
selector?: string;
|
|
311
|
+
hasRange?: boolean;
|
|
312
|
+
}) => void;
|
|
313
|
+
boardClearSelectionRequest?: number;
|
|
314
|
+
boardSelectedSelector?: string | null;
|
|
315
|
+
boardSelectedSelectorCandidates?: string[];
|
|
316
|
+
boardHoveredSelector?: string | null;
|
|
317
|
+
boardHoveredSelectorCandidates?: string[];
|
|
318
|
+
boardLockedSelectors?: string[];
|
|
319
|
+
boardHiddenSelectors?: string[];
|
|
320
|
+
/**
|
|
321
|
+
* Called when a drag / reorder / reparent / drop-into-container or delete
|
|
322
|
+
* occurs on a board element. Target file is boardFileId.
|
|
323
|
+
*/
|
|
324
|
+
onBoardVisualStructureChange?: (
|
|
325
|
+
selector: string,
|
|
326
|
+
anchorSelector: string,
|
|
327
|
+
placement: "before" | "after" | "inside",
|
|
328
|
+
info?: ElementInfo,
|
|
329
|
+
details?: {
|
|
330
|
+
sourceId?: string;
|
|
331
|
+
anchorSourceId?: string;
|
|
332
|
+
requestId?: string;
|
|
333
|
+
dropMode?: "flow-insert" | "absolute-container";
|
|
334
|
+
sourceRect?: { x: number; y: number; width: number; height: number };
|
|
335
|
+
anchorRect?: { x: number; y: number; width: number; height: number };
|
|
336
|
+
},
|
|
337
|
+
) => boolean | void;
|
|
338
|
+
/**
|
|
339
|
+
* Called when a style property changes on a board element.
|
|
340
|
+
* Target file is boardFileId.
|
|
341
|
+
*/
|
|
342
|
+
onBoardVisualStyleChange?: (
|
|
343
|
+
selector: string,
|
|
344
|
+
styles: Record<string, string>,
|
|
345
|
+
info?: ElementInfo,
|
|
346
|
+
) => void;
|
|
347
|
+
/**
|
|
348
|
+
* Called when an alt-drag clone is created on the board surface.
|
|
349
|
+
* Target file is boardFileId.
|
|
350
|
+
*/
|
|
351
|
+
onBoardVisualDuplicateChange?: (
|
|
352
|
+
selector: string,
|
|
353
|
+
cloneHtml: string,
|
|
354
|
+
info?: ElementInfo,
|
|
355
|
+
details?: {
|
|
356
|
+
sourceId?: string;
|
|
357
|
+
anchorSelector?: string;
|
|
358
|
+
anchorSourceId?: string;
|
|
359
|
+
placement?: "before" | "after" | "inside";
|
|
360
|
+
},
|
|
361
|
+
) => boolean | void;
|
|
362
|
+
/**
|
|
363
|
+
* Called when inline text is edited on a board element.
|
|
364
|
+
* Target file is boardFileId.
|
|
365
|
+
*/
|
|
366
|
+
onBoardTextContentChange?: (
|
|
367
|
+
selector: string,
|
|
368
|
+
value: string,
|
|
369
|
+
info?: ElementInfo,
|
|
370
|
+
details?: { html?: string },
|
|
371
|
+
) => void;
|
|
372
|
+
/**
|
|
373
|
+
* Figma-style vector edit mode: when present, renders an interactive
|
|
374
|
+
* overlay (draggable anchors + control handles) over `path` and lets the
|
|
375
|
+
* user reshape it. When null/undefined, nothing new renders and existing
|
|
376
|
+
* pen-draw / selection / drag behavior is unaffected. The parent owns the
|
|
377
|
+
* working PenPath state, entering/exiting edit mode, and persistence.
|
|
378
|
+
*/
|
|
379
|
+
vectorEdit?: VectorEditOverlayState | null;
|
|
380
|
+
/**
|
|
381
|
+
* Figma-parity on-canvas gradient editing handles: when present and
|
|
382
|
+
* `frameOrDraftId` matches the single currently-selected screen frame or
|
|
383
|
+
* draft primitive, renders a draggable gradient line (start/end handles +
|
|
384
|
+
* per-stop markers) over that target's bounds in the selection-chrome
|
|
385
|
+
* layer. When null/undefined (the default), nothing new renders and
|
|
386
|
+
* existing selection/drag behavior is unaffected. The parent
|
|
387
|
+
* (DesignEditor) owns opening/closing the inspector's gradient tab,
|
|
388
|
+
* parsing/serializing the CSS value, and persistence — this component
|
|
389
|
+
* only draws the overlay and reports drag phases back through
|
|
390
|
+
* `onChange("preview" | "commit")`. See `GradientEditOverlayTarget` below
|
|
391
|
+
* and `GradientEditSessionTarget` in `inspector/GradientEditor.tsx` for
|
|
392
|
+
* the full contract. Linear gradients + overview-canvas board/draft/
|
|
393
|
+
* screen-frame targets only — see that type's doc for scope notes.
|
|
394
|
+
*/
|
|
395
|
+
gradientEditTarget?: GradientEditOverlayTarget | null;
|
|
396
|
+
/**
|
|
397
|
+
* OS file drag-and-drop (Figma parity): fired when the user drops native
|
|
398
|
+
* OS files (e.g. images dragged from Finder/Explorer) onto the overview
|
|
399
|
+
* canvas surface. `target.canvasPoint` is the drop point converted to
|
|
400
|
+
* canvas-world coordinates via the same math `getCanvasPoint` uses.
|
|
401
|
+
* `target.frameId` is set when the drop landed inside an existing screen
|
|
402
|
+
* frame's bounds (hit-tested via `getFrameEntryAtPoint`), so the caller can
|
|
403
|
+
* insert into that screen's local coordinate space instead of the shared
|
|
404
|
+
* board. This component only resolves the drop geometry — it does NOT read
|
|
405
|
+
* file contents, upload, or insert anything; the caller (DesignEditor) owns
|
|
406
|
+
* that side, matching the paste-image pipeline. Multiple files dropped at
|
|
407
|
+
* once are passed together in one call so the caller can stagger their
|
|
408
|
+
* placement (e.g. offsetting each by a fixed canvas delta) instead of this
|
|
409
|
+
* component guessing a stagger amount.
|
|
410
|
+
*/
|
|
411
|
+
onDropFiles?: (
|
|
412
|
+
files: File[],
|
|
413
|
+
target: { canvasPoint: Point; frameId?: string },
|
|
414
|
+
) => void;
|
|
415
|
+
/**
|
|
416
|
+
* Imperative camera command (Figma's Shift+1 "zoom to fit" / Shift+2 "zoom
|
|
417
|
+
* to selection"). MultiScreenCanvas owns pan internally (no `onPanChange`
|
|
418
|
+
* prop exists), so the only external control path for pan is this
|
|
419
|
+
* bounds-based command: pass the world-space bounds to fit and a
|
|
420
|
+
* monotonically increasing `nonce`; on each `nonce` change this component
|
|
421
|
+
* computes the fit zoom+pan itself (via the shared `getCameraForBounds`,
|
|
422
|
+
* clamped to the same MIN_ZOOM/MAX_ZOOM this canvas already uses) against
|
|
423
|
+
* its OWN current viewport size, and applies it through the exact same
|
|
424
|
+
* imperative-transform + debounced-commit path wheel/pinch zoom uses (so
|
|
425
|
+
* there is no extra re-render storm — one commit at the end, same as a
|
|
426
|
+
* settled gesture). Passing `null`/`undefined`, or repeating the same
|
|
427
|
+
* `nonce`, is a no-op. `onZoomChange` still fires once the camera settles,
|
|
428
|
+
* same as any other zoom change, so callers that mirror `zoom` into their
|
|
429
|
+
* own state stay in sync automatically.
|
|
430
|
+
*/
|
|
431
|
+
cameraCommand?: {
|
|
432
|
+
fitBounds: FrameBounds;
|
|
433
|
+
/** Screen-px padding around the bounds. Defaults to 64 (Figma-ish). */
|
|
434
|
+
paddingScreenPx?: number;
|
|
435
|
+
nonce: number;
|
|
436
|
+
} | null;
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
export interface FrameGeometry {
|
|
440
|
+
x: number;
|
|
441
|
+
y: number;
|
|
442
|
+
width: number;
|
|
443
|
+
height: number;
|
|
444
|
+
rotation?: number;
|
|
445
|
+
z?: number;
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
export type FrameGeometryById = Record<string, FrameGeometry>;
|
|
449
|
+
|
|
450
|
+
/** One entry of `canvasFrames` (PF21). Kept referentially stable across
|
|
451
|
+
* renders for a given screen.id when that screen's own screen/metadata/
|
|
452
|
+
* geometry are unchanged by value — see canvasFrameEntryCacheRef. */
|
|
453
|
+
export interface CanvasFrameEntry {
|
|
454
|
+
screen: ScreenFile;
|
|
455
|
+
metadata: ResolvedScreenMetadata;
|
|
456
|
+
geometry: FrameGeometry;
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
/** Per-screen cache entry backing screenContentById (PF21). `contentNode` is
|
|
460
|
+
* reused across renders whenever `screen`, `renderScreenContent` (the
|
|
461
|
+
* DesignEditor-provided callback identity), `metadata` (by value), and the
|
|
462
|
+
* *rounded* geometry width/height are all unchanged — notably NOT
|
|
463
|
+
* geometry.x/geometry.y, since renderScreenContent's actual implementation
|
|
464
|
+
* never reads position (position is applied by Screen's own wrapper
|
|
465
|
+
* transform/left/top, not by the cached content node). See the
|
|
466
|
+
* screenContentById useMemo for the full rationale. */
|
|
467
|
+
export interface ScreenContentCacheEntry {
|
|
468
|
+
screen: ScreenFile;
|
|
469
|
+
metadata: ResolvedScreenMetadata;
|
|
470
|
+
width: number;
|
|
471
|
+
height: number;
|
|
472
|
+
renderScreenContent: NonNullable<
|
|
473
|
+
MultiScreenCanvasProps["renderScreenContent"]
|
|
474
|
+
>;
|
|
475
|
+
contentNode: ReactNode;
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
export interface Point {
|
|
479
|
+
x: number;
|
|
480
|
+
y: number;
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
/**
|
|
484
|
+
* Interactive vector-edit overlay state, supplied by the parent
|
|
485
|
+
* (DesignEditor) whenever the user is editing an existing path's anchors and
|
|
486
|
+
* control handles on the canvas. `path` is expressed in path-local
|
|
487
|
+
* coordinates (the same space `pen-path.ts` helpers operate in); `originCanvas`
|
|
488
|
+
* is where that path's local origin (0,0) sits in canvas space, so a given
|
|
489
|
+
* local point's canvas position is simply `originCanvas + localPoint`
|
|
490
|
+
* (see `vectorEditLocalToCanvasPoint`). The parent owns the working PenPath
|
|
491
|
+
* state, entering/exiting edit mode, and persistence — this component only
|
|
492
|
+
* renders the overlay and reports pointer interaction back through
|
|
493
|
+
* `onChange`/`onExit`.
|
|
494
|
+
*/
|
|
495
|
+
export interface VectorEditOverlayState {
|
|
496
|
+
path: PenPath;
|
|
497
|
+
originCanvas: Point;
|
|
498
|
+
onChange: (nextPath: PenPath, phase: "preview" | "commit") => void;
|
|
499
|
+
onExit: () => void;
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
/**
|
|
503
|
+
* Figma-parity on-canvas gradient editing handles (follow-up to IP21's
|
|
504
|
+
* inspector-only `GradientEditor`). Supplied by the parent (DesignEditor)
|
|
505
|
+
* whenever a fill's gradient tab is open in the inspector for a selected
|
|
506
|
+
* board/draft primitive or screen frame this canvas renders chrome for; see
|
|
507
|
+
* `GradientEditSessionTarget` in `inspector/GradientEditor.tsx` for the full
|
|
508
|
+
* wiring contract both sides agree on. `frameOrDraftId` must match a
|
|
509
|
+
* currently-selected draft primitive id or screen id for the overlay to
|
|
510
|
+
* render — this component does not itself resolve "the selection", it only
|
|
511
|
+
* draws chrome for whichever single selected frame/draft's id matches.
|
|
512
|
+
*
|
|
513
|
+
* Scope note: this renders in the *parent-DOM* chrome layer (same layer as
|
|
514
|
+
* `SelectionBox`/`VectorEditOverlay`), so it only covers overview-canvas
|
|
515
|
+
* board/draft primitives and screen-frame-level selections. Gradient handles
|
|
516
|
+
* for elements *inside* a screen's iframe content are a separate follow-up
|
|
517
|
+
* (an in-iframe bridge overlay, analogous to how `boardEditMode` element
|
|
518
|
+
* selection already bridges into iframe content) — not implemented here.
|
|
519
|
+
*
|
|
520
|
+
* Linear-gradient only for now: `GradientEditor` also supports radial/
|
|
521
|
+
* angular/diamond kinds, but this overlay only draws handles when `cssValue`
|
|
522
|
+
* parses as `linear-gradient(...)`. Non-linear values (or values that fail
|
|
523
|
+
* to parse) render nothing, matching the "no behavior change" contract for
|
|
524
|
+
* every other unrecognized/absent target.
|
|
525
|
+
*/
|
|
526
|
+
export interface GradientEditOverlayTarget {
|
|
527
|
+
/** Draft primitive id or screen id this gradient CSS applies to. */
|
|
528
|
+
frameOrDraftId: string;
|
|
529
|
+
/** The live gradient CSS string, e.g. `linear-gradient(90deg, ...)`. */
|
|
530
|
+
cssValue: string;
|
|
531
|
+
/** Fired on every drag tick ("preview") and once on release ("commit"),
|
|
532
|
+
* mirroring the gesture-coalescing convention used by `vectorEdit`. */
|
|
533
|
+
onChange: (nextCss: string, meta?: { phase: "preview" | "commit" }) => void;
|
|
534
|
+
}
|
|
535
|
+
|
|
536
|
+
/** One linear-gradient stop, projected to a point on the gradient line for
|
|
537
|
+
* on-canvas rendering (see `gradientStopPoints`). */
|
|
538
|
+
export interface GradientLinePoint extends Point {
|
|
539
|
+
/** 0–100 position along the gradient line, matching `GradientStopValue`. */
|
|
540
|
+
position: number;
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
export type DraftPrimitiveKind =
|
|
544
|
+
| "frame"
|
|
545
|
+
| "rectangle"
|
|
546
|
+
| "ellipse"
|
|
547
|
+
| "polygon"
|
|
548
|
+
| "star"
|
|
549
|
+
| "line"
|
|
550
|
+
| "arrow"
|
|
551
|
+
| "text"
|
|
552
|
+
| "path";
|
|
553
|
+
export type DraftCreationTool =
|
|
554
|
+
| "frame"
|
|
555
|
+
| "rect"
|
|
556
|
+
| "line"
|
|
557
|
+
| "arrow"
|
|
558
|
+
| "ellipse"
|
|
559
|
+
| "polygon"
|
|
560
|
+
| "star"
|
|
561
|
+
| "text"
|
|
562
|
+
| "pen";
|
|
563
|
+
|
|
564
|
+
// Exported so applyDraftGeometry's K-scale math (see its own doc comment)
|
|
565
|
+
// can be unit-tested directly, matching the existing convention for the
|
|
566
|
+
// gradient-overlay math (gradientLineEndpoints etc.) exported just below.
|
|
567
|
+
export interface DraftPrimitive {
|
|
568
|
+
id: string;
|
|
569
|
+
kind: DraftPrimitiveKind;
|
|
570
|
+
geometry: FrameGeometry;
|
|
571
|
+
points?: Point[];
|
|
572
|
+
penPath?: PenPath;
|
|
573
|
+
pathData?: string;
|
|
574
|
+
text?: string;
|
|
575
|
+
fill?: string;
|
|
576
|
+
stroke?: string;
|
|
577
|
+
strokeWidth?: number;
|
|
578
|
+
autoSize?: boolean;
|
|
579
|
+
}
|
|
580
|
+
|
|
581
|
+
export type DraftPrimitiveById = Record<string, DraftPrimitive>;
|
|
582
|
+
|
|
583
|
+
/** Live keyboard modifiers for shape-drawing tools: shift constrains rect/
|
|
584
|
+
* ellipse to a square/circle (and lines/arrows to 45deg increments); alt
|
|
585
|
+
* draws outward from the start point as the shape's center. */
|
|
586
|
+
export interface DraftGeometryModifiers {
|
|
587
|
+
shiftKey?: boolean;
|
|
588
|
+
altKey?: boolean;
|
|
589
|
+
}
|
|
590
|
+
|
|
591
|
+
export interface DraftPrimitiveInput {
|
|
592
|
+
tool: DraftCreationTool;
|
|
593
|
+
start: Point;
|
|
594
|
+
end: Point;
|
|
595
|
+
moved: boolean;
|
|
596
|
+
toolProps?: CanvasToolProps;
|
|
597
|
+
modifiers?: DraftGeometryModifiers;
|
|
598
|
+
}
|
|
599
|
+
|
|
600
|
+
export interface MarqueeRect {
|
|
601
|
+
x: number;
|
|
602
|
+
y: number;
|
|
603
|
+
width: number;
|
|
604
|
+
height: number;
|
|
605
|
+
}
|
|
606
|
+
|
|
607
|
+
export type ResizeHandle = "nw" | "n" | "ne" | "e" | "se" | "s" | "sw" | "w";
|
|
608
|
+
|
|
609
|
+
export interface AlignmentGuide {
|
|
610
|
+
orientation: "vertical" | "horizontal";
|
|
611
|
+
position: number;
|
|
612
|
+
start: number;
|
|
613
|
+
end: number;
|
|
614
|
+
}
|
|
615
|
+
|
|
616
|
+
export interface MoveDragState {
|
|
617
|
+
type: "move";
|
|
618
|
+
originClient: Point;
|
|
619
|
+
originFrames: FrameGeometryById;
|
|
620
|
+
targetIds: string[];
|
|
621
|
+
primaryId: string;
|
|
622
|
+
hasMoved: boolean;
|
|
623
|
+
}
|
|
624
|
+
|
|
625
|
+
export interface ResizeDragState {
|
|
626
|
+
type: "resize";
|
|
627
|
+
originClient: Point;
|
|
628
|
+
originFrames: FrameGeometryById;
|
|
629
|
+
originBounds: FrameGeometry;
|
|
630
|
+
targetIds: string[];
|
|
631
|
+
handle: ResizeHandle;
|
|
632
|
+
hasMoved: boolean;
|
|
633
|
+
}
|
|
634
|
+
|
|
635
|
+
export interface RotateDragState {
|
|
636
|
+
type: "rotate";
|
|
637
|
+
originClient: Point;
|
|
638
|
+
originFrame: FrameGeometry;
|
|
639
|
+
frameId: string;
|
|
640
|
+
originPointerAngle: number;
|
|
641
|
+
originRotation: number;
|
|
642
|
+
hasMoved: boolean;
|
|
643
|
+
}
|
|
644
|
+
|
|
645
|
+
/** Multi-selection rotate (CV14): rotates every selected frame together
|
|
646
|
+
* around the group's own center, using rotateFrameGroupAroundCenter. Kept
|
|
647
|
+
* as a separate drag-state type from the single-frame RotateDragState above
|
|
648
|
+
* (rather than extending it to optionally hold multiple ids) so the
|
|
649
|
+
* existing, already-correct single-frame rotate path is never touched. */
|
|
650
|
+
export interface GroupRotateDragState {
|
|
651
|
+
type: "group-rotate";
|
|
652
|
+
originClient: Point;
|
|
653
|
+
originFrames: FrameGeometryById;
|
|
654
|
+
targetIds: string[];
|
|
655
|
+
groupCenter: Point;
|
|
656
|
+
originPointerAngle: number;
|
|
657
|
+
hasMoved: boolean;
|
|
658
|
+
}
|
|
659
|
+
|
|
660
|
+
export interface MarqueeDragState {
|
|
661
|
+
type: "marquee";
|
|
662
|
+
originClient: Point;
|
|
663
|
+
originCanvas: Point;
|
|
664
|
+
baseSelectedIds: string[];
|
|
665
|
+
baseSelectedDraftIds: string[];
|
|
666
|
+
additive: boolean;
|
|
667
|
+
hasMoved: boolean;
|
|
668
|
+
}
|
|
669
|
+
|
|
670
|
+
export interface PanDragState {
|
|
671
|
+
type: "pan";
|
|
672
|
+
originClient: Point;
|
|
673
|
+
originPan: Point;
|
|
674
|
+
}
|
|
675
|
+
|
|
676
|
+
export interface DraftMoveDragState {
|
|
677
|
+
type: "draft-move";
|
|
678
|
+
originClient: Point;
|
|
679
|
+
originDrafts: DraftPrimitiveById;
|
|
680
|
+
targetIds: string[];
|
|
681
|
+
primaryId: string;
|
|
682
|
+
hasMoved: boolean;
|
|
683
|
+
}
|
|
684
|
+
|
|
685
|
+
export interface DraftResizeDragState {
|
|
686
|
+
type: "draft-resize";
|
|
687
|
+
originClient: Point;
|
|
688
|
+
originDrafts: DraftPrimitiveById;
|
|
689
|
+
originBounds: FrameGeometry;
|
|
690
|
+
targetIds: string[];
|
|
691
|
+
handle: ResizeHandle;
|
|
692
|
+
hasMoved: boolean;
|
|
693
|
+
}
|
|
694
|
+
|
|
695
|
+
export interface DraftCreateDragState {
|
|
696
|
+
type: "draft-create";
|
|
697
|
+
tool: DraftCreationTool;
|
|
698
|
+
originClient: Point;
|
|
699
|
+
originCanvas: Point;
|
|
700
|
+
originFrameId?: string;
|
|
701
|
+
points: Point[];
|
|
702
|
+
hasMoved: boolean;
|
|
703
|
+
}
|
|
704
|
+
|
|
705
|
+
export interface PenNodeDragState {
|
|
706
|
+
type: "pen-node";
|
|
707
|
+
originClient: Point;
|
|
708
|
+
anchor: Point;
|
|
709
|
+
pathBefore: PenPath | null;
|
|
710
|
+
hasMoved: boolean;
|
|
711
|
+
/**
|
|
712
|
+
* True when this drag started on the close-hit-target (the path's first
|
|
713
|
+
* anchor) rather than adding a new node. Figma defers the close commit
|
|
714
|
+
* until mouseup so a drag on the closing click can shape the closing
|
|
715
|
+
* segment's curve (the first anchor's handleIn) instead of the click
|
|
716
|
+
* being an instant, undraggable straight-line close.
|
|
717
|
+
*/
|
|
718
|
+
closing?: boolean;
|
|
719
|
+
}
|
|
720
|
+
|
|
721
|
+
/** Dragging an anchor square of a `vectorEdit` overlay path (P-VE1). Anchor
|
|
722
|
+
* drags move the whole node (point + handles, via movePenAnchor's default
|
|
723
|
+
* moveHandlesWithAnchor:true) rather than reshaping a single handle. */
|
|
724
|
+
export interface VectorEditAnchorDragState {
|
|
725
|
+
type: "vector-anchor";
|
|
726
|
+
originClient: Point;
|
|
727
|
+
nodeIndex: number;
|
|
728
|
+
/** Path snapshot (local coords) from just before this drag began, restored
|
|
729
|
+
* on cancel. */
|
|
730
|
+
pathBefore: PenPath;
|
|
731
|
+
hasMoved: boolean;
|
|
732
|
+
}
|
|
733
|
+
|
|
734
|
+
/** Dragging a control-handle circle of a `vectorEdit` overlay path (P-VE1).
|
|
735
|
+
* Alt/Option held during the drag breaks handle symmetry into a cusp
|
|
736
|
+
* (movePenHandle's breakSymmetry), matching the pen tool's own alt
|
|
737
|
+
* behavior while placing a fresh anchor. */
|
|
738
|
+
export interface VectorEditHandleDragState {
|
|
739
|
+
type: "vector-handle";
|
|
740
|
+
originClient: Point;
|
|
741
|
+
nodeIndex: number;
|
|
742
|
+
which: "in" | "out";
|
|
743
|
+
pathBefore: PenPath;
|
|
744
|
+
hasMoved: boolean;
|
|
745
|
+
}
|
|
746
|
+
|
|
747
|
+
export interface DraftCreationPreview {
|
|
748
|
+
tool: DraftCreationTool;
|
|
749
|
+
geometry: FrameGeometry;
|
|
750
|
+
points?: Point[];
|
|
751
|
+
}
|
|
752
|
+
|
|
753
|
+
export type DragState =
|
|
754
|
+
| MoveDragState
|
|
755
|
+
| ResizeDragState
|
|
756
|
+
| RotateDragState
|
|
757
|
+
| GroupRotateDragState
|
|
758
|
+
| MarqueeDragState
|
|
759
|
+
| PanDragState
|
|
760
|
+
| DraftMoveDragState
|
|
761
|
+
| DraftResizeDragState
|
|
762
|
+
| DraftCreateDragState
|
|
763
|
+
| PenNodeDragState
|
|
764
|
+
| VectorEditAnchorDragState
|
|
765
|
+
| VectorEditHandleDragState;
|
|
766
|
+
|
|
767
|
+
export type PendingWheelGesture =
|
|
768
|
+
| {
|
|
769
|
+
mode: "zoom";
|
|
770
|
+
deltaY: number;
|
|
771
|
+
cursor: Point;
|
|
772
|
+
clientX: number;
|
|
773
|
+
clientY: number;
|
|
774
|
+
}
|
|
775
|
+
| {
|
|
776
|
+
mode: "pan";
|
|
777
|
+
deltaX: number;
|
|
778
|
+
deltaY: number;
|
|
779
|
+
};
|
|
780
|
+
|
|
781
|
+
// ── Cross-screen drop + layer marquee types ─────────────────────────────────
|
|
782
|
+
|
|
783
|
+
export type CrossScreenDropPlacement = "before" | "after" | "inside";
|
|
784
|
+
export type CrossScreenDropAxis = "x" | "y";
|
|
785
|
+
export type CrossScreenDropMode = "flow-insert" | "absolute-container";
|
|
786
|
+
|
|
787
|
+
export interface CrossScreenHitTestAnchorRect {
|
|
788
|
+
left: number;
|
|
789
|
+
top: number;
|
|
790
|
+
width: number;
|
|
791
|
+
height: number;
|
|
792
|
+
}
|
|
793
|
+
|
|
794
|
+
export interface CrossScreenHitTestResult {
|
|
795
|
+
anchorNodeId?: string;
|
|
796
|
+
placement?: CrossScreenDropPlacement;
|
|
797
|
+
axis?: CrossScreenDropAxis;
|
|
798
|
+
dropMode?: CrossScreenDropMode;
|
|
799
|
+
anchorRect?: CrossScreenHitTestAnchorRect;
|
|
800
|
+
}
|
|
801
|
+
|
|
802
|
+
export interface CrossScreenDragElementRect {
|
|
803
|
+
left: number;
|
|
804
|
+
top: number;
|
|
805
|
+
width: number;
|
|
806
|
+
height: number;
|
|
807
|
+
}
|
|
808
|
+
|
|
809
|
+
export interface CanvasLayerMarqueeCandidate {
|
|
810
|
+
screenId: string;
|
|
811
|
+
info: ElementInfo;
|
|
812
|
+
geometry: FrameGeometry;
|
|
813
|
+
frameGeometry: FrameGeometry;
|
|
814
|
+
}
|
|
815
|
+
|
|
816
|
+
export interface CanvasLayerMarqueeSelection {
|
|
817
|
+
screenId: string;
|
|
818
|
+
info: ElementInfo;
|
|
819
|
+
}
|
|
820
|
+
|
|
821
|
+
export interface CrossScreenDropGuide {
|
|
822
|
+
placement: CrossScreenDropPlacement;
|
|
823
|
+
axis: CrossScreenDropAxis;
|
|
824
|
+
boardRect: FrameGeometry;
|
|
825
|
+
}
|
|
826
|
+
|
|
827
|
+
// ── Alt-hover measurement types ──────────────────────────────────────────────
|
|
828
|
+
|
|
829
|
+
/** One Figma-style alt-hover distance measurement: a line spanning the empty
|
|
830
|
+
* space between the selection's bounds and the hovered object's bounds on a
|
|
831
|
+
* single axis, plus the cross-axis position the line/label should draw at.
|
|
832
|
+
* `gap` is the edge-to-edge distance in canvas units (can be negative when
|
|
833
|
+
* the two boxes overlap on this axis — callers should treat negative gaps
|
|
834
|
+
* as "no line" the same way `overlaps` signals that). */
|
|
835
|
+
export interface AltHoverMeasurementLine {
|
|
836
|
+
orientation: "horizontal" | "vertical";
|
|
837
|
+
/** Edge-to-edge distance in canvas units. */
|
|
838
|
+
gap: number;
|
|
839
|
+
/** Start/end of the line along its own axis (e.g. for a horizontal line,
|
|
840
|
+
* the x range it spans). */
|
|
841
|
+
start: number;
|
|
842
|
+
end: number;
|
|
843
|
+
/** Position along the cross axis the line is drawn at (e.g. for a
|
|
844
|
+
* horizontal line, the y coordinate). Centered on the overlapping range
|
|
845
|
+
* when the boxes overlap on the cross axis, otherwise centered between
|
|
846
|
+
* the two boxes' cross-axis midpoints. */
|
|
847
|
+
crossPosition: number;
|
|
848
|
+
/** True when the two boxes overlap on this line's own axis, meaning there
|
|
849
|
+
* is no real empty-space gap to show (Figma hides the line in that case). */
|
|
850
|
+
overlaps: boolean;
|
|
851
|
+
}
|
|
852
|
+
|
|
853
|
+
export interface AltHoverMeasurement {
|
|
854
|
+
horizontal: AltHoverMeasurementLine | null;
|
|
855
|
+
vertical: AltHoverMeasurementLine | null;
|
|
856
|
+
}
|
|
857
|
+
|
|
858
|
+
// Re-exported for callers that only need the shared guide-compare types.
|
|
859
|
+
export type { DistanceGuideBand, EqualGapGuide };
|
|
860
|
+
|
|
861
|
+
// Re-exported bridge payload types used by MultiScreenCanvasProps board
|
|
862
|
+
// callbacks, so consumers can import them from this module too.
|
|
863
|
+
export type {
|
|
864
|
+
IframeContextMenuPayload,
|
|
865
|
+
IframeFigmaClipboardPastePayload,
|
|
866
|
+
IframeHotkeyPayload,
|
|
867
|
+
};
|
|
868
|
+
|
|
869
|
+
export interface ResolvedScreenMetadata {
|
|
870
|
+
source: ScreenSourceType;
|
|
871
|
+
previewState: ScreenPreviewState;
|
|
872
|
+
title?: string;
|
|
873
|
+
width: number;
|
|
874
|
+
height: number;
|
|
875
|
+
previewUrl?: string;
|
|
876
|
+
}
|
|
877
|
+
|
|
878
|
+
export interface DuplicatePreview {
|
|
879
|
+
display: string;
|
|
880
|
+
x: number;
|
|
881
|
+
y: number;
|
|
882
|
+
width: number;
|
|
883
|
+
height: number;
|
|
884
|
+
canDuplicate: boolean;
|
|
885
|
+
moved: boolean;
|
|
886
|
+
}
|
|
887
|
+
|
|
888
|
+
export interface TransformBadge {
|
|
889
|
+
x: number;
|
|
890
|
+
y: number;
|
|
891
|
+
text: string;
|
|
892
|
+
}
|