@agent-native/core 0.92.9 → 0.92.11
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 +1 -1
- package/corpus/core/CHANGELOG.md +29 -0
- package/corpus/core/package.json +1 -1
- package/corpus/core/src/agent/production-agent.ts +181 -15
- package/corpus/core/src/agent/run-manager.ts +31 -4
- package/corpus/core/src/agent/run-store.ts +80 -0
- package/corpus/core/src/cli/design-connect.ts +433 -151
- package/corpus/core/src/cli/skills.ts +14 -0
- package/corpus/core/src/client/AssistantChat.tsx +25 -0
- package/corpus/core/src/client/MultiTabAssistantChat.tsx +40 -6
- package/corpus/core/src/client/agent-chat.ts +165 -1
- package/corpus/core/src/client/chat/index.ts +9 -1
- package/corpus/core/src/client/extensions/EmbeddedExtension.tsx +38 -2
- package/corpus/core/src/client/index.ts +5 -0
- package/corpus/core/src/client/rich-markdown-editor/useCollabReconcile.ts +18 -7
- package/corpus/core/src/collab/awareness-store.ts +23 -12
- package/corpus/core/src/collab/client.ts +16 -5
- package/corpus/core/src/collab/index.ts +4 -0
- package/corpus/core/src/collab/recent-edits.ts +65 -2
- package/corpus/core/src/deploy/build.ts +133 -5
- package/corpus/core/src/index.browser.ts +1 -0
- package/corpus/core/src/server/agent-chat-plugin.ts +98 -11
- package/corpus/core/src/server/builder-design-systems.ts +30 -4
- package/corpus/templates/clips/.agents/skills/ai-video-tools/SKILL.md +1 -1
- package/corpus/templates/clips/.agents/skills/video-sharing/SKILL.md +12 -6
- package/corpus/templates/clips/AGENTS.md +4 -0
- package/corpus/templates/clips/actions/create-recording.ts +2 -0
- package/corpus/templates/clips/actions/lib/create-recording-schema.ts +5 -3
- package/corpus/templates/clips/actions/request-transcript.ts +102 -33
- package/corpus/templates/clips/app/components/library/library-grid.tsx +1 -0
- package/corpus/templates/clips/app/components/player/share-dialog.tsx +59 -19
- package/corpus/templates/clips/app/components/player/transcript-panel.tsx +48 -4
- package/corpus/templates/clips/app/components/player/video-player.tsx +17 -12
- package/corpus/templates/clips/app/i18n/ar-SA.ts +1 -0
- package/corpus/templates/clips/app/i18n/de-DE.ts +1 -0
- package/corpus/templates/clips/app/i18n/en-US.ts +1 -0
- package/corpus/templates/clips/app/i18n/es-ES.ts +1 -0
- package/corpus/templates/clips/app/i18n/fr-FR.ts +1 -0
- package/corpus/templates/clips/app/i18n/hi-IN.ts +1 -0
- package/corpus/templates/clips/app/i18n/ja-JP.ts +1 -0
- package/corpus/templates/clips/app/i18n/ko-KR.ts +1 -0
- package/corpus/templates/clips/app/i18n/pt-BR.ts +1 -0
- package/corpus/templates/clips/app/i18n/zh-CN.ts +1 -0
- package/corpus/templates/clips/app/i18n/zh-TW.ts +1 -0
- package/corpus/templates/clips/app/routes/r.$recordingId.tsx +70 -37
- package/corpus/templates/clips/app/routes/record.tsx +17 -4
- package/corpus/templates/clips/app/routes/share.$shareId.tsx +2 -0
- package/corpus/templates/clips/changelog/2026-07-09-desktop-popover-sits-closer-to-the-menu-bar.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-09-desktop-recording-optimization-progress-stays-visible-until-the-clip-opens.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-09-fixed-large-video-file-uploads-failing-before-their-resumabl.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-09-fixed-new-video-uploads-defaulting-to-private.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-09-long-recordings-now-get-enough-time-to-download-their-media-.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-09-meeting-notes-no-longer-lowers-your-microphone-volume-for-ot.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-09-on-mobile-tapping-a-playing-clip-reveals-playback-controls-w.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-09-regenerate-any-clip-transcript-from-its-saved-recording-or-r.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-09-slack-previews-now-show-the-clip-length-alongside-its-descri.md +6 -0
- package/corpus/templates/clips/desktop/src/app.tsx +12 -2
- package/corpus/templates/clips/desktop/src/hooks/useMeetingTranscription.ts +8 -1
- package/corpus/templates/clips/desktop/src/lib/recorder.ts +8 -5
- package/corpus/templates/clips/desktop/src/lib/transcription-engine.ts +5 -5
- package/corpus/templates/clips/desktop/src/lib/voice-dictation.ts +3 -0
- package/corpus/templates/clips/desktop/src/styles.css +6 -3
- package/corpus/templates/clips/desktop/src-tauri/src/clips/mod.rs +29 -11
- package/corpus/templates/clips/desktop/src-tauri/src/native_screen.rs +1 -1
- package/corpus/templates/clips/desktop/src-tauri/src/system_audio.rs +103 -21
- package/corpus/templates/clips/desktop/src-tauri/src/whisper_speech.rs +117 -39
- package/corpus/templates/clips/server/lib/slack-unfurls.ts +20 -1
- package/corpus/templates/clips/server/lib/streaming-upload-mode.ts +10 -4
- package/corpus/templates/clips/shared/recording-core.ts +12 -0
- package/corpus/templates/content/AGENTS.md +7 -6
- package/corpus/templates/content/actions/_document-flush.ts +132 -17
- package/corpus/templates/content/actions/_notion-action-utils.ts +15 -0
- package/corpus/templates/content/actions/create-and-link-notion-page.ts +2 -0
- package/corpus/templates/content/actions/link-notion-page.ts +2 -0
- package/corpus/templates/content/actions/pull-document.ts +5 -7
- package/corpus/templates/content/actions/pull-notion-page.ts +2 -0
- package/corpus/templates/content/actions/push-notion-page.ts +10 -0
- package/corpus/templates/content/actions/resolve-notion-sync-conflict.ts +2 -0
- package/corpus/templates/content/app/components/editor/DocumentEditor.tsx +88 -23
- package/corpus/templates/content/app/components/editor/VisualEditor.tsx +32 -2
- package/corpus/templates/content/app/hooks/use-notion.ts +6 -6
- package/corpus/templates/content/app/i18n/zh-TW.ts +1 -0
- package/corpus/templates/content/app/i18n-data.ts +18 -0
- package/corpus/templates/content/changelog/2026-07-09-notion-conflict-choices-and-version-restores-preserve-docume.md +6 -0
- package/corpus/templates/content/server/lib/notion-sync.ts +80 -64
- package/corpus/templates/design/.agents/skills/design-generation/SKILL.md +29 -2
- package/corpus/templates/design/.agents/skills/design-systems/SKILL.md +86 -0
- package/corpus/templates/design/.agents/skills/export-handoff/SKILL.md +57 -0
- package/corpus/templates/design/.agents/skills/visual-edit/SKILL.md +11 -0
- package/corpus/templates/design/AGENTS.md +45 -10
- package/corpus/templates/design/actions/add-localhost-screens.ts +66 -13
- package/corpus/templates/design/actions/apply-component-prop-edit.ts +45 -36
- package/corpus/templates/design/actions/apply-motion-edit.ts +25 -31
- package/corpus/templates/design/actions/apply-shader-fill.ts +29 -42
- package/corpus/templates/design/actions/detach-component-instance.ts +337 -0
- package/corpus/templates/design/actions/export-design-as-figma-svg.ts +219 -0
- package/corpus/templates/design/actions/generate-design.ts +79 -12
- package/corpus/templates/design/actions/generate-screens.ts +57 -12
- package/corpus/templates/design/actions/get-figma-styles.ts +115 -0
- package/corpus/templates/design/actions/go-to-main-component.ts +254 -0
- package/corpus/templates/design/actions/grant-localhost-write-consent.ts +4 -3
- package/corpus/templates/design/actions/import-design-source.ts +4 -31
- package/corpus/templates/design/actions/import-figma-clipboard.ts +134 -0
- package/corpus/templates/design/actions/import-figma-frame.ts +95 -0
- package/corpus/templates/design/actions/index-design-system-with-builder.ts +16 -1
- package/corpus/templates/design/actions/list-design-components.ts +104 -0
- package/corpus/templates/design/actions/list-figma-library-assets.ts +1 -24
- package/corpus/templates/design/actions/open-component-source.ts +2 -4
- package/corpus/templates/design/actions/present-design-variants.ts +412 -16
- package/corpus/templates/design/actions/preview-source-edit.ts +14 -1
- package/corpus/templates/design/actions/run-design-audit.ts +25 -3
- package/corpus/templates/design/actions/show-design-questions.ts +10 -0
- package/corpus/templates/design/actions/swap-component-instance.ts +544 -0
- package/corpus/templates/design/actions/take-design-screenshot.ts +45 -60
- package/corpus/templates/design/actions/write-local-file.ts +25 -1
- package/corpus/templates/design/app/components/design/CanvasContextMenu.tsx +152 -0
- package/corpus/templates/design/app/components/design/DesignCanvas.tsx +1077 -58
- package/corpus/templates/design/app/components/design/DesignEditorSkeleton.tsx +5 -5
- package/corpus/templates/design/app/components/design/DesignExtensionsPanel.tsx +73 -21
- package/corpus/templates/design/app/components/design/EditPanel.tsx +16 -11
- package/corpus/templates/design/app/components/design/KeyboardShortcutsPanel.tsx +364 -0
- package/corpus/templates/design/app/components/design/LayersPanel.tsx +180 -53
- package/corpus/templates/design/app/components/design/LocalhostWriteConsentDialog.tsx +0 -2
- package/corpus/templates/design/app/components/design/MotionDock.tsx +144 -21
- package/corpus/templates/design/app/components/design/MultiScreenCanvas.tsx +1152 -167
- package/corpus/templates/design/app/components/design/QuestionFlow.tsx +27 -5
- package/corpus/templates/design/app/components/design/ReviewPanel.tsx +23 -2
- package/corpus/templates/design/app/components/design/TokensPanel.tsx +63 -49
- package/corpus/templates/design/app/components/design/bridge/editor-chrome.bridge.ts +1293 -54
- package/corpus/templates/design/app/components/design/bridge/embedded-wheel.bridge.ts +7 -0
- package/corpus/templates/design/app/components/design/bridge/hit-test.bridge.ts +6 -1
- package/corpus/templates/design/app/components/design/bridge/motion-preview.bridge.ts +23 -6
- package/corpus/templates/design/app/components/design/bridge/sample.bridge.ts +7 -0
- package/corpus/templates/design/app/components/design/code-workbench/CodeWorkbench.tsx +5 -0
- package/corpus/templates/design/app/components/design/code-workbench/editor/MonacoHost.tsx +14 -2
- package/corpus/templates/design/app/components/design/code-workbench/explorer/FileTree.tsx +37 -2
- package/corpus/templates/design/app/components/design/code-workbench/format/format-on-open-guard.ts +25 -0
- package/corpus/templates/design/app/components/design/code-workbench/format/format-on-open.ts +19 -1
- package/corpus/templates/design/app/components/design/code-workbench/model-registry.ts +43 -5
- package/corpus/templates/design/app/components/design/code-workbench/search/SearchView.tsx +27 -2
- package/corpus/templates/design/app/components/design/code-workbench/search/search-engine.ts +10 -1
- package/corpus/templates/design/app/components/design/code-workbench/store.tsx +19 -2
- package/corpus/templates/design/app/components/design/design-canvas/annotation-snapshot.ts +265 -0
- package/corpus/templates/design/app/components/design/design-canvas/annotation-submit.ts +16 -5
- package/corpus/templates/design/app/components/design/design-canvas/coordinate-transforms.ts +16 -2
- package/corpus/templates/design/app/components/design/design-canvas/embedded-frame.ts +7 -2
- package/corpus/templates/design/app/components/design/design-canvas/iframe-events.ts +3 -1
- package/corpus/templates/design/app/components/design/edit-panel/code-inspect-helpers.tsx +78 -8
- package/corpus/templates/design/app/components/design/edit-panel/component-section.tsx +451 -73
- package/corpus/templates/design/app/components/design/edit-panel/document-colors.ts +12 -4
- package/corpus/templates/design/app/components/design/edit-panel/effects-properties.tsx +398 -272
- package/corpus/templates/design/app/components/design/edit-panel/element-classification.ts +41 -7
- package/corpus/templates/design/app/components/design/edit-panel/element-identity.ts +16 -3
- package/corpus/templates/design/app/components/design/edit-panel/field-primitives.tsx +24 -4
- package/corpus/templates/design/app/components/design/edit-panel/fill-gradient-helpers.ts +222 -4
- package/corpus/templates/design/app/components/design/edit-panel/fill-properties.tsx +171 -78
- package/corpus/templates/design/app/components/design/edit-panel/inspector-controls.tsx +45 -5
- package/corpus/templates/design/app/components/design/edit-panel/layout-properties.tsx +299 -28
- package/corpus/templates/design/app/components/design/edit-panel/panel-primitives.tsx +120 -150
- package/corpus/templates/design/app/components/design/edit-panel/position-helpers.ts +53 -1
- package/corpus/templates/design/app/components/design/edit-panel/position-layout-properties.tsx +284 -117
- package/corpus/templates/design/app/components/design/edit-panel/selection-helpers.ts +81 -0
- package/corpus/templates/design/app/components/design/edit-panel/stroke-properties.tsx +19 -14
- package/corpus/templates/design/app/components/design/edit-panel/style-options.ts +7 -0
- package/corpus/templates/design/app/components/design/edit-panel/typography-helpers.ts +155 -0
- package/corpus/templates/design/app/components/design/edit-panel/typography-properties.tsx +268 -46
- package/corpus/templates/design/app/components/design/inspector/AutoLayoutMatrix.tsx +350 -31
- package/corpus/templates/design/app/components/design/inspector/ConstraintsWidget.tsx +13 -4
- package/corpus/templates/design/app/components/design/inspector/DesignColorPicker.tsx +233 -23
- package/corpus/templates/design/app/components/design/inspector/GradientEditor.tsx +72 -2
- package/corpus/templates/design/app/components/design/inspector/ScrubInput.tsx +51 -11
- package/corpus/templates/design/app/components/design/inspector/ShaderFillsPanel.tsx +84 -11
- package/corpus/templates/design/app/components/design/inspector/index.ts +3 -0
- package/corpus/templates/design/app/components/design/keyboard-shortcuts.ts +552 -0
- package/corpus/templates/design/app/components/design/multi-screen/board-surface-html.ts +157 -0
- package/corpus/templates/design/app/components/design/multi-screen/frame-geometry.ts +53 -0
- package/corpus/templates/design/app/components/design/multi-screen/overview-layout.ts +184 -0
- package/corpus/templates/design/app/components/design/multi-screen/primitive-drop-target.ts +403 -26
- package/corpus/templates/design/app/components/design/multi-screen/types.ts +20 -1
- package/corpus/templates/design/app/components/design/types.ts +33 -0
- package/corpus/templates/design/app/components/editor/PromptDialog.tsx +59 -7
- package/corpus/templates/design/app/components/visual-editor/CanvasCommentPins.tsx +119 -17
- package/corpus/templates/design/app/components/visual-editor/DrawOverlay.tsx +275 -63
- package/corpus/templates/design/app/hooks/use-question-flow.ts +14 -3
- package/corpus/templates/design/app/hooks/useDesignHotkeys.ts +67 -10
- package/corpus/templates/design/app/i18n/zh-TW.ts +91 -1
- package/corpus/templates/design/app/i18n-data.ts +1217 -10
- package/corpus/templates/design/app/i18n-keyboard-shortcuts.ts +577 -0
- package/corpus/templates/design/app/lib/agent-chat.ts +23 -0
- package/corpus/templates/design/app/lib/design-import.ts +24 -0
- package/corpus/templates/design/app/lib/figma-clipboard.ts +157 -0
- package/corpus/templates/design/app/lib/figma-svg-copy.ts +221 -0
- package/corpus/templates/design/app/pages/design-editor/code-layer-state.ts +143 -30
- package/corpus/templates/design/app/pages/design-editor/collab-sync.ts +15 -0
- package/corpus/templates/design/app/pages/design-editor/editor-session.ts +33 -0
- package/corpus/templates/design/app/pages/design-editor/editor-state.ts +38 -0
- package/corpus/templates/design/app/pages/design-editor/overview-annotation-context.ts +157 -0
- package/corpus/templates/design/app/pages/design-editor/overview-camera.ts +62 -6
- package/corpus/templates/design/app/pages/design-editor/pending-edits.ts +245 -0
- package/corpus/templates/design/app/pages/design-editor/react-semantic-handoff.ts +586 -0
- package/corpus/templates/design/app/pages/design-editor/screen-auto-layout.ts +169 -0
- package/corpus/templates/design/app/pages/design-editor/selection-state.ts +201 -1
- package/corpus/templates/design/changelog/2026-07-09-added-underline-strikethrough-and-text-case-uppercase-lowerc.md +6 -0
- package/corpus/templates/design/changelog/2026-07-09-annotate-now-draws-across-the-all-screens-canvas-without-swi.md +6 -0
- package/corpus/templates/design/changelog/2026-07-09-auto-layout-children-can-now-be-dragged-into-freeform-screen.md +6 -0
- package/corpus/templates/design/changelog/2026-07-09-board-shapes-now-stay-visible-and-nest-correctly-across-the-.md +6 -0
- package/corpus/templates/design/changelog/2026-07-09-component-source-navigation-now-opens-reliably-from-the-insp.md +6 -0
- package/corpus/templates/design/changelog/2026-07-09-cross-screen-local-react-layer-moves-now-hand-off-exact-sour.md +6 -0
- package/corpus/templates/design/changelog/2026-07-09-cross-screen-moves-undo-and-redo-now-keep-both-screens-stabl.md +6 -0
- package/corpus/templates/design/changelog/2026-07-09-detach-a-component-instance-into-plain-editable-eleme.md +6 -0
- package/corpus/templates/design/changelog/2026-07-09-dragging-layers-into-auto-layout-now-respects-ignore-auto-la.md +6 -0
- package/corpus/templates/design/changelog/2026-07-09-drawing-annotations-sent-to-the-agent-now-include-a-rendered.md +6 -0
- package/corpus/templates/design/changelog/2026-07-09-editor-sidebars-now-use-figma-matched-default-widths-for-a-r.md +6 -0
- package/corpus/templates/design/changelog/2026-07-09-empty-frames-and-rectangles-now-expose-full-auto-layout-cont.md +6 -0
- package/corpus/templates/design/changelog/2026-07-09-export-any-design-screen-as-a-real-vector-svg-for-figma-with.md +6 -0
- package/corpus/templates/design/changelog/2026-07-09-grid-auto-layout-now-uses-true-responsive-rows-and-columns-w.md +6 -0
- package/corpus/templates/design/changelog/2026-07-09-hidden-and-locked-screens-now-behave-consistently-between-la.md +6 -0
- package/corpus/templates/design/changelog/2026-07-09-image-fills-now-preserve-valid-urls-and-layered-fit-settings.md +6 -0
- package/corpus/templates/design/changelog/2026-07-09-import-figma-frames-as-pixel-accurate-design-screens-via-a-s.md +6 -0
- package/corpus/templates/design/changelog/2026-07-09-inspect-code-now-hides-internal-styling-metadata-and-wraps-l.md +6 -0
- package/corpus/templates/design/changelog/2026-07-09-inspector-blur-and-shadow-effects-now-preserve-other-effects.md +6 -0
- package/corpus/templates/design/changelog/2026-07-09-jump-to-a-components-other-instances-from-the-inspecto.md +6 -0
- package/corpus/templates/design/changelog/2026-07-09-keyboard-shortcuts-are-now-discoverable-in-a-figma-style-bot.md +6 -0
- package/corpus/templates/design/changelog/2026-07-09-layer-selection-now-keeps-cmd-or-ctrl-toggles-and-shift-rang.md +6 -0
- package/corpus/templates/design/changelog/2026-07-09-layers-dropped-into-auto-layout-now-participate-correctly-in.md +6 -0
- package/corpus/templates/design/changelog/2026-07-09-local-live-edit-screens-now-enter-and-leave-full-view-withou.md +6 -0
- package/corpus/templates/design/changelog/2026-07-09-local-preview-urls-now-live-in-the-inspector-instead-of-taki.md +6 -0
- package/corpus/templates/design/changelog/2026-07-09-local-react-layers-can-now-be-hidden-and-locked-from-layers-.md +6 -0
- package/corpus/templates/design/changelog/2026-07-09-local-react-layers-now-keep-exact-source-provenance-and-supp.md +6 -0
- package/corpus/templates/design/changelog/2026-07-09-local-react-visual-editing-now-loads-reliably-and-shows-live.md +6 -0
- package/corpus/templates/design/changelog/2026-07-09-paste-from-figma-cmd-v-now-imports-exact-editable-nodes-when.md +6 -0
- package/corpus/templates/design/changelog/2026-07-09-pressing-escape-after-selecting-a-screen-now-reveals-page-pr.md +6 -0
- package/corpus/templates/design/changelog/2026-07-09-right-click-overlapping-or-nested-objects-to-choose-the-exac.md +6 -0
- package/corpus/templates/design/changelog/2026-07-09-scale-edge-stretch-and-center-constraints-now-preserve-layer.md +6 -0
- package/corpus/templates/design/changelog/2026-07-09-screen-rows-can-now-be-reordered-in-layers-with-matching-can.md +6 -0
- package/corpus/templates/design/changelog/2026-07-09-screen-selection-stays-responsive-in-designs-with-hundreds-o.md +6 -0
- package/corpus/templates/design/changelog/2026-07-09-shift-a-now-enables-auto-layout-on-a-selected-screen-with-fl.md +6 -0
- package/corpus/templates/design/changelog/2026-07-09-swap-a-component-instance-for-another-from-the-libra.md +6 -0
- package/corpus/templates/design/changelog/2026-07-10-drawing-annotations-now-stay-available-to-retry-when-the.md +6 -0
- package/corpus/templates/design/e2e/global-setup.ts +3 -6
- package/corpus/templates/design/e2e/helpers.ts +27 -6
- package/corpus/templates/design/server/lib/design-to-figma-svg.ts +1412 -0
- package/corpus/templates/design/server/lib/figma-clipboard-match.ts +196 -0
- package/corpus/templates/design/server/lib/figma-node-import.ts +311 -0
- package/corpus/templates/design/server/lib/figma-node-to-html.ts +1334 -0
- package/corpus/templates/design/server/lib/figma-paste-fallback.ts +64 -0
- package/corpus/templates/design/server/lib/playwright-runtime.ts +78 -0
- package/corpus/templates/design/server/plugins/db.ts +41 -0
- package/corpus/templates/design/server/source-workspace.ts +64 -0
- package/corpus/templates/design/shared/board-file.ts +13 -2
- package/corpus/templates/design/shared/canvas-math.ts +231 -33
- package/corpus/templates/design/shared/code-layer.ts +122 -8
- package/corpus/templates/design/shared/component-library.ts +161 -0
- package/corpus/templates/design/shared/db-conflict.ts +27 -0
- package/corpus/templates/design/shared/design-source-capabilities.ts +2 -1
- package/corpus/templates/design/shared/figma-url.ts +149 -0
- package/corpus/templates/design/shared/pen-path.ts +16 -7
- package/corpus/templates/design/shared/source-mode.ts +1 -0
- package/corpus/templates/plan/app/components/plan/CanvasArea.tsx +7 -19
- package/corpus/templates/plan/changelog/2026-07-09-canvas-panning-now-keeps-zoom-fixed-even-at-the-edges.md +6 -0
- package/corpus/templates/slides/actions/index-design-system-with-builder.ts +16 -1
- package/corpus/templates/slides/app/context/DeckContext.tsx +311 -70
- package/corpus/templates/slides/changelog/2026-07-09-fixed-the-slide-rail-going-permanently-stale-during-a-long-a.md +6 -0
- package/dist/agent/production-agent.d.ts +79 -6
- package/dist/agent/production-agent.d.ts.map +1 -1
- package/dist/agent/production-agent.js +161 -14
- package/dist/agent/production-agent.js.map +1 -1
- package/dist/agent/run-manager.d.ts.map +1 -1
- package/dist/agent/run-manager.js +29 -5
- package/dist/agent/run-manager.js.map +1 -1
- package/dist/agent/run-store.d.ts +46 -0
- package/dist/agent/run-store.d.ts.map +1 -1
- package/dist/agent/run-store.js +61 -0
- package/dist/agent/run-store.js.map +1 -1
- package/dist/cli/design-connect.d.ts +6 -0
- package/dist/cli/design-connect.d.ts.map +1 -1
- package/dist/cli/design-connect.js +336 -139
- package/dist/cli/design-connect.js.map +1 -1
- package/dist/cli/skills.d.ts.map +1 -1
- package/dist/cli/skills.js +14 -0
- package/dist/cli/skills.js.map +1 -1
- package/dist/client/AssistantChat.d.ts +2 -0
- package/dist/client/AssistantChat.d.ts.map +1 -1
- package/dist/client/AssistantChat.js +19 -3
- package/dist/client/AssistantChat.js.map +1 -1
- package/dist/client/MultiTabAssistantChat.d.ts.map +1 -1
- package/dist/client/MultiTabAssistantChat.js +38 -18
- package/dist/client/MultiTabAssistantChat.js.map +1 -1
- package/dist/client/agent-chat.d.ts +60 -0
- package/dist/client/agent-chat.d.ts.map +1 -1
- package/dist/client/agent-chat.js +122 -1
- package/dist/client/agent-chat.js.map +1 -1
- package/dist/client/chat/index.d.ts +1 -1
- package/dist/client/chat/index.d.ts.map +1 -1
- package/dist/client/chat/index.js +1 -1
- package/dist/client/chat/index.js.map +1 -1
- package/dist/client/extensions/EmbeddedExtension.d.ts +12 -0
- package/dist/client/extensions/EmbeddedExtension.d.ts.map +1 -1
- package/dist/client/extensions/EmbeddedExtension.js +36 -2
- package/dist/client/extensions/EmbeddedExtension.js.map +1 -1
- package/dist/client/index.d.ts +1 -1
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +1 -1
- package/dist/client/index.js.map +1 -1
- package/dist/client/rich-markdown-editor/useCollabReconcile.d.ts.map +1 -1
- package/dist/client/rich-markdown-editor/useCollabReconcile.js +18 -6
- package/dist/client/rich-markdown-editor/useCollabReconcile.js.map +1 -1
- package/dist/collab/awareness-store.d.ts +5 -0
- package/dist/collab/awareness-store.d.ts.map +1 -1
- package/dist/collab/awareness-store.js +19 -12
- package/dist/collab/awareness-store.js.map +1 -1
- package/dist/collab/awareness.d.ts +2 -2
- package/dist/collab/awareness.d.ts.map +1 -1
- package/dist/collab/client.d.ts.map +1 -1
- package/dist/collab/client.js +13 -5
- package/dist/collab/client.js.map +1 -1
- package/dist/collab/index.d.ts +1 -0
- package/dist/collab/index.d.ts.map +1 -1
- package/dist/collab/index.js +1 -0
- package/dist/collab/index.js.map +1 -1
- package/dist/collab/recent-edits.d.ts +3 -1
- package/dist/collab/recent-edits.d.ts.map +1 -1
- package/dist/collab/recent-edits.js +57 -2
- package/dist/collab/recent-edits.js.map +1 -1
- package/dist/collab/routes.d.ts +1 -1
- package/dist/deploy/build.d.ts +24 -0
- package/dist/deploy/build.d.ts.map +1 -1
- package/dist/deploy/build.js +102 -5
- package/dist/deploy/build.js.map +1 -1
- package/dist/index.browser.d.ts +1 -1
- package/dist/index.browser.d.ts.map +1 -1
- package/dist/index.browser.js +1 -1
- package/dist/index.browser.js.map +1 -1
- package/dist/notifications/routes.d.ts +1 -1
- package/dist/observability/routes.d.ts +5 -5
- package/dist/progress/routes.d.ts +1 -1
- package/dist/server/agent-chat-plugin.d.ts.map +1 -1
- package/dist/server/agent-chat-plugin.js +87 -10
- 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/builder-design-systems.d.ts +15 -0
- package/dist/server/builder-design-systems.d.ts.map +1 -1
- package/dist/server/builder-design-systems.js +9 -4
- package/dist/server/builder-design-systems.js.map +1 -1
- package/package.json +1 -1
|
@@ -302,7 +302,7 @@ interface PromptPopoverProps {
|
|
|
302
302
|
prompt: string,
|
|
303
303
|
files: UploadedFile[],
|
|
304
304
|
options: PromptComposerSubmitOptions,
|
|
305
|
-
) => void
|
|
305
|
+
) => void | Promise<void>;
|
|
306
306
|
loading?: boolean;
|
|
307
307
|
anchorRef?: React.RefObject<HTMLElement | null>;
|
|
308
308
|
centered?: boolean;
|
|
@@ -319,6 +319,16 @@ interface PromptPopoverProps {
|
|
|
319
319
|
*/
|
|
320
320
|
creationMode?: PromptCreationMode;
|
|
321
321
|
onCreationModeChange?: (mode: PromptCreationMode) => void;
|
|
322
|
+
/**
|
|
323
|
+
* Scopes the composer's localStorage draft key so an abandoned draft in
|
|
324
|
+
* this popover never bleeds into a different popover instance (e.g. the
|
|
325
|
+
* "generate design" and "tweak" popovers both mount unscoped composers
|
|
326
|
+
* that would otherwise share the same global draft key). Defaults to a
|
|
327
|
+
* scope derived from `title`, which is already distinct across the
|
|
328
|
+
* current call sites; pass an explicit value (e.g. including a design id)
|
|
329
|
+
* for finer isolation between instances that share the same title.
|
|
330
|
+
*/
|
|
331
|
+
draftScope?: string;
|
|
322
332
|
}
|
|
323
333
|
|
|
324
334
|
export interface PromptDesignSystemOption {
|
|
@@ -372,7 +382,7 @@ export default function PromptPopover({
|
|
|
372
382
|
title,
|
|
373
383
|
placeholder,
|
|
374
384
|
onSkip,
|
|
375
|
-
skipLabel
|
|
385
|
+
skipLabel,
|
|
376
386
|
onSubmit,
|
|
377
387
|
loading = false,
|
|
378
388
|
anchorRef,
|
|
@@ -384,12 +394,28 @@ export default function PromptPopover({
|
|
|
384
394
|
onCreateDesignSystem,
|
|
385
395
|
creationMode,
|
|
386
396
|
onCreationModeChange,
|
|
397
|
+
draftScope,
|
|
387
398
|
}: PromptPopoverProps) {
|
|
388
399
|
const t = useT();
|
|
389
400
|
const [uploading, setUploading] = useState(false);
|
|
390
401
|
const [pickedAssets, setPickedAssets] = useState<UploadedFile[]>([]);
|
|
391
402
|
const [selectedUploadFiles, setSelectedUploadFiles] = useState<File[]>([]);
|
|
392
403
|
const [assetsPickerOpen, setAssetsPickerOpen] = useState(false);
|
|
404
|
+
// Restores a typed prompt into the composer after a failed submit. The
|
|
405
|
+
// composer optimistically clears its text as soon as onSubmit is invoked
|
|
406
|
+
// (see TiptapComposer.submitComposer), so without this an upload failure or
|
|
407
|
+
// a rejected onSubmit would silently erase what the user wrote. Left
|
|
408
|
+
// `undefined` in the common case so the composer's normal mount behavior
|
|
409
|
+
// (restore the last localStorage draft for this scope) still applies —
|
|
410
|
+
// passing a defined `initialText` (even `""`) would short-circuit that.
|
|
411
|
+
const [restoredPromptText, setRestoredPromptText] = useState<
|
|
412
|
+
string | undefined
|
|
413
|
+
>(undefined);
|
|
414
|
+
const [restoredPromptKey, setRestoredPromptKey] = useState(0);
|
|
415
|
+
const restorePromptText = useCallback((text: string) => {
|
|
416
|
+
setRestoredPromptText(text);
|
|
417
|
+
setRestoredPromptKey((key) => key + 1);
|
|
418
|
+
}, []);
|
|
393
419
|
// While the nested design-system Select is open, Radix disables pointer
|
|
394
420
|
// events on everything else and the click that closes the Select also
|
|
395
421
|
// moves focus back to its trigger. That focus-return is itself reported to
|
|
@@ -428,6 +454,10 @@ export default function PromptPopover({
|
|
|
428
454
|
setAssetsPickerOpen(false);
|
|
429
455
|
setPickedAssets([]);
|
|
430
456
|
setSelectedUploadFiles([]);
|
|
457
|
+
// Only sticks for the session immediately following a failed submit; a
|
|
458
|
+
// fresh open after a real close should fall back to the composer's own
|
|
459
|
+
// localStorage draft restore for this scope, not a stale failed prompt.
|
|
460
|
+
setRestoredPromptText(undefined);
|
|
431
461
|
}, [open]);
|
|
432
462
|
|
|
433
463
|
const uploadFiles = useCallback(
|
|
@@ -482,20 +512,39 @@ export default function PromptPopover({
|
|
|
482
512
|
_references: unknown,
|
|
483
513
|
options: PromptComposerSubmitOptions,
|
|
484
514
|
) => {
|
|
515
|
+
let uploaded: UploadedFile[];
|
|
485
516
|
try {
|
|
486
|
-
|
|
487
|
-
|
|
517
|
+
uploaded = await uploadFiles([...files, ...selectedUploadFiles]);
|
|
518
|
+
} catch (error) {
|
|
519
|
+
restorePromptText(text);
|
|
520
|
+
toast.error(
|
|
521
|
+
error instanceof Error
|
|
522
|
+
? error.message
|
|
523
|
+
: t("promptDialog.failedToUploadFile"),
|
|
524
|
+
);
|
|
525
|
+
return;
|
|
526
|
+
}
|
|
527
|
+
try {
|
|
528
|
+
await onSubmit(text.trim(), [...uploaded, ...pickedAssets], options);
|
|
488
529
|
setPickedAssets([]);
|
|
489
530
|
setSelectedUploadFiles([]);
|
|
490
531
|
} catch (error) {
|
|
532
|
+
restorePromptText(text);
|
|
491
533
|
toast.error(
|
|
492
534
|
error instanceof Error
|
|
493
535
|
? error.message
|
|
494
|
-
: t("promptDialog.
|
|
536
|
+
: t("promptDialog.failedToSubmitPrompt"),
|
|
495
537
|
);
|
|
496
538
|
}
|
|
497
539
|
},
|
|
498
|
-
[
|
|
540
|
+
[
|
|
541
|
+
onSubmit,
|
|
542
|
+
pickedAssets,
|
|
543
|
+
restorePromptText,
|
|
544
|
+
selectedUploadFiles,
|
|
545
|
+
t,
|
|
546
|
+
uploadFiles,
|
|
547
|
+
],
|
|
499
548
|
);
|
|
500
549
|
|
|
501
550
|
const handleAssetsPickerReady = useCallback(
|
|
@@ -667,6 +716,9 @@ export default function PromptPopover({
|
|
|
667
716
|
disabled={loading || uploading}
|
|
668
717
|
placeholder={placeholder ?? t("home.describeBuild")}
|
|
669
718
|
onSubmit={handleSubmit}
|
|
719
|
+
draftScope={draftScope ?? title}
|
|
720
|
+
initialText={restoredPromptText}
|
|
721
|
+
initialTextKey={restoredPromptKey}
|
|
670
722
|
attachButton={
|
|
671
723
|
<PromptAttachmentMenu
|
|
672
724
|
disabled={loading || uploading}
|
|
@@ -785,7 +837,7 @@ export default function PromptPopover({
|
|
|
785
837
|
}}
|
|
786
838
|
className="cursor-pointer text-xs text-[#609FF8] hover:text-[#7AB2FA]"
|
|
787
839
|
>
|
|
788
|
-
{skipLabel}
|
|
840
|
+
{skipLabel ?? t("promptDialog.skipPrompt")}
|
|
789
841
|
</button>
|
|
790
842
|
</div>
|
|
791
843
|
)}
|
|
@@ -9,6 +9,7 @@ import {
|
|
|
9
9
|
IconX,
|
|
10
10
|
} from "@tabler/icons-react";
|
|
11
11
|
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
12
|
+
import { toast } from "sonner";
|
|
12
13
|
|
|
13
14
|
import { Button } from "@/components/ui/button";
|
|
14
15
|
import { Textarea } from "@/components/ui/textarea";
|
|
@@ -141,6 +142,26 @@ function escapeCssIdentifier(value: string): string {
|
|
|
141
142
|
return value.replace(/[^a-zA-Z0-9_-]/g, "\\$&");
|
|
142
143
|
}
|
|
143
144
|
|
|
145
|
+
/**
|
|
146
|
+
* Best-effort check for whether a pin's captured anchor element still exists
|
|
147
|
+
* on the canvas. Only meaningful for parent-DOM canvases with a captured
|
|
148
|
+
* `targetSelector` — iframe canvases never capture one (see `dropPinAt`), so
|
|
149
|
+
* this naturally no-ops there rather than mislabeling every iframe pin as
|
|
150
|
+
* stale. Recomputed on each render (already triggered by scroll/resize/pins
|
|
151
|
+
* changes); this deliberately avoids adding a dedicated poll so idle canvas
|
|
152
|
+
* perf is unaffected.
|
|
153
|
+
*/
|
|
154
|
+
function pinAnchorStillPresent(canvas: HTMLElement, pin: CanvasPin): boolean {
|
|
155
|
+
if (!pin.targetSelector) return true;
|
|
156
|
+
try {
|
|
157
|
+
return canvas.querySelector(pin.targetSelector) !== null;
|
|
158
|
+
} catch {
|
|
159
|
+
// A selector that no longer parses shouldn't be reported as "stale" —
|
|
160
|
+
// that's a different failure mode than "the element was removed".
|
|
161
|
+
return true;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
|
|
144
165
|
function getTargetAnchor(target?: HTMLElement | null): {
|
|
145
166
|
targetSelector?: string;
|
|
146
167
|
targetAnchorId?: string;
|
|
@@ -207,6 +228,46 @@ function pinsLikelyOverlap(pin: CanvasPin, other: CanvasPin): boolean {
|
|
|
207
228
|
return xDelta <= 4 && yDelta <= 4;
|
|
208
229
|
}
|
|
209
230
|
|
|
231
|
+
/**
|
|
232
|
+
* Purely visual "same spot" check used to spread overlapping markers apart on
|
|
233
|
+
* screen. Unlike `pinsLikelyOverlap` (which only flags *live* conflicts and
|
|
234
|
+
* ignores already-submitted pins), this also considers submitted pins so a
|
|
235
|
+
* new pin dropped on top of an earlier confirmation marker doesn't render
|
|
236
|
+
* fully hidden/unclickable underneath it.
|
|
237
|
+
*/
|
|
238
|
+
function pinsAtSameSpot(pin: CanvasPin, other: CanvasPin): boolean {
|
|
239
|
+
if (pin.id === other.id) return false;
|
|
240
|
+
const xDelta = Math.abs(pin.xPct - other.xPct);
|
|
241
|
+
const yDelta = Math.abs(pin.yPct - other.yPct);
|
|
242
|
+
return xDelta <= 3 && yDelta <= 3;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
/**
|
|
246
|
+
* Deterministic pixel nudge for a pin whose marker would otherwise render
|
|
247
|
+
* stacked exactly on top of an earlier pin at (approximately) the same
|
|
248
|
+
* canvas position. Pins are placed in a small golden-angle spiral around
|
|
249
|
+
* their true position so every marker in a cluster stays visible and
|
|
250
|
+
* individually clickable; the stored `xPct`/`yPct` (and the position sent to
|
|
251
|
+
* the agent) are unaffected.
|
|
252
|
+
*/
|
|
253
|
+
function pinClusterOffset(
|
|
254
|
+
pin: CanvasPin,
|
|
255
|
+
indexInPins: number,
|
|
256
|
+
pins: CanvasPin[],
|
|
257
|
+
): { dx: number; dy: number } {
|
|
258
|
+
let clusterIndex = 0;
|
|
259
|
+
for (let i = 0; i < indexInPins; i++) {
|
|
260
|
+
if (pinsAtSameSpot(pin, pins[i]!)) clusterIndex += 1;
|
|
261
|
+
}
|
|
262
|
+
if (clusterIndex === 0) return { dx: 0, dy: 0 };
|
|
263
|
+
const angle = clusterIndex * 2.4; // golden angle (radians) for even spread
|
|
264
|
+
const radius = 9 + clusterIndex * 5;
|
|
265
|
+
return {
|
|
266
|
+
dx: Math.round(Math.cos(angle) * radius),
|
|
267
|
+
dy: Math.round(Math.sin(angle) * radius),
|
|
268
|
+
};
|
|
269
|
+
}
|
|
270
|
+
|
|
210
271
|
function derivePinStatus(pin: CanvasPin, pins: CanvasPin[]): PinStatusMeta {
|
|
211
272
|
const text = (pin.draft || "").toLowerCase();
|
|
212
273
|
const anchored = Boolean(pin.targetSelector || pin.targetAnchorId);
|
|
@@ -298,6 +359,11 @@ export function CanvasCommentPins({
|
|
|
298
359
|
}: CanvasCommentPinsProps) {
|
|
299
360
|
const t = useT();
|
|
300
361
|
const [pins, setPins] = useState<CanvasPin[]>([]);
|
|
362
|
+
// Mirrors `pins` so the context-change reset effect below can inspect what
|
|
363
|
+
// was on the canvas the instant `contextId` changes, without re-running on
|
|
364
|
+
// every pin edit (it should only fire once, on the context switch itself).
|
|
365
|
+
const pinsRef = useRef<CanvasPin[]>(pins);
|
|
366
|
+
pinsRef.current = pins;
|
|
301
367
|
const [activePinId, setActivePinId] = useState<string | null>(null);
|
|
302
368
|
const containerRef = useRef<HTMLElement | null>(null);
|
|
303
369
|
const lastSubmitQueuedSignalRef = useRef(submitQueuedSignal);
|
|
@@ -308,9 +374,25 @@ export function CanvasCommentPins({
|
|
|
308
374
|
|
|
309
375
|
// Reset pins when the context (slide) changes — they're scoped to one view.
|
|
310
376
|
useEffect(() => {
|
|
377
|
+
// Queued-but-unsent comment drafts don't survive a context switch (pins
|
|
378
|
+
// are intentionally scoped to one view). Losing them is unavoidable here
|
|
379
|
+
// since we don't control cross-view navigation, but it must never be
|
|
380
|
+
// silent — warn instead of quietly wiping the user's typed drafts.
|
|
381
|
+
const discardedDraftCount = pinsRef.current.filter(
|
|
382
|
+
(pin) => pin.queued && !pin.submitted && (pin.draft || "").trim(),
|
|
383
|
+
).length;
|
|
384
|
+
if (discardedDraftCount > 0) {
|
|
385
|
+
toast(
|
|
386
|
+
t("visualEditor.queuedCommentsDiscarded", {
|
|
387
|
+
count: discardedDraftCount,
|
|
388
|
+
}),
|
|
389
|
+
);
|
|
390
|
+
}
|
|
311
391
|
setPins([]);
|
|
312
392
|
setActivePinId(null);
|
|
313
393
|
setCanvasEl(null);
|
|
394
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps -- only fire on an
|
|
395
|
+
// actual context (slide/design) switch, not on every pins/t change.
|
|
314
396
|
}, [contextId]);
|
|
315
397
|
|
|
316
398
|
// Find the canvas container the pins overlay
|
|
@@ -724,12 +806,19 @@ export function CanvasCommentPins({
|
|
|
724
806
|
)}
|
|
725
807
|
|
|
726
808
|
{/* Pin overlays */}
|
|
727
|
-
{pins.map((pin) => {
|
|
728
|
-
const
|
|
729
|
-
const
|
|
809
|
+
{pins.map((pin, pinIndex) => {
|
|
810
|
+
const { dx, dy } = pinClusterOffset(pin, pinIndex, pins);
|
|
811
|
+
const left = rect.left + (pin.xPct / 100) * rect.width + dx;
|
|
812
|
+
const top = rect.top + (pin.yPct / 100) * rect.height + dy;
|
|
730
813
|
const isActive = activePinId === pin.id;
|
|
731
814
|
const PinIcon = pin.submitted ? IconMessageCheck : IconMessage;
|
|
732
815
|
const status = localizePinStatus(derivePinStatus(pin, pins), t);
|
|
816
|
+
// Not submitted yet + claims a specific anchor that's no longer on
|
|
817
|
+
// the canvas (e.g. the element was deleted or the design was edited
|
|
818
|
+
// elsewhere) — flag it instead of silently pretending the position
|
|
819
|
+
// is still meaningful.
|
|
820
|
+
const isStaleAnchor =
|
|
821
|
+
!pin.submitted && !pinAnchorStillPresent(canvas, pin);
|
|
733
822
|
return (
|
|
734
823
|
<div
|
|
735
824
|
key={pin.id}
|
|
@@ -754,22 +843,26 @@ export function CanvasCommentPins({
|
|
|
754
843
|
"absolute -mt-1 flex size-7 -translate-x-1/2 -translate-y-full cursor-pointer items-center justify-center rounded-full rounded-bl-none shadow-lg ring-2 transition-transform hover:scale-110",
|
|
755
844
|
status.markerClassName,
|
|
756
845
|
pin.submitted && "opacity-95",
|
|
846
|
+
isStaleAnchor &&
|
|
847
|
+
"outline outline-2 outline-dashed outline-offset-2 outline-muted-foreground/70",
|
|
757
848
|
)}
|
|
758
849
|
>
|
|
759
850
|
<PinIcon className="size-3.5" />
|
|
760
851
|
</button>
|
|
761
852
|
</TooltipTrigger>
|
|
762
853
|
<TooltipContent className="pointer-events-none">
|
|
763
|
-
{
|
|
764
|
-
? t("visualEditor.
|
|
765
|
-
: pin.
|
|
766
|
-
(
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
854
|
+
{isStaleAnchor
|
|
855
|
+
? t("visualEditor.staleAnchorDetail")
|
|
856
|
+
: pin.queued
|
|
857
|
+
? t("visualEditor.queuedStatus", { status: status.label })
|
|
858
|
+
: pin.draft ||
|
|
859
|
+
(pin.submitted
|
|
860
|
+
? t("visualEditor.commentSentStatus", {
|
|
861
|
+
status: status.label,
|
|
862
|
+
})
|
|
863
|
+
: t("visualEditor.commentStatus", {
|
|
864
|
+
status: status.label,
|
|
865
|
+
}))}
|
|
773
866
|
</TooltipContent>
|
|
774
867
|
</Tooltip>
|
|
775
868
|
<span
|
|
@@ -846,10 +939,19 @@ export function CanvasCommentPins({
|
|
|
846
939
|
{status.detail}
|
|
847
940
|
</p>
|
|
848
941
|
{pin.targetAnchorId && (
|
|
849
|
-
<div
|
|
850
|
-
{
|
|
851
|
-
|
|
852
|
-
|
|
942
|
+
<div
|
|
943
|
+
className={cn(
|
|
944
|
+
"mt-1 truncate rounded-md px-2 py-1 text-[10px]",
|
|
945
|
+
isStaleAnchor
|
|
946
|
+
? "bg-destructive/10 text-destructive"
|
|
947
|
+
: "bg-muted/45 text-muted-foreground",
|
|
948
|
+
)}
|
|
949
|
+
>
|
|
950
|
+
{isStaleAnchor
|
|
951
|
+
? t("visualEditor.staleAnchorDetail")
|
|
952
|
+
: t("visualEditor.anchorLabel", {
|
|
953
|
+
id: pin.targetAnchorId,
|
|
954
|
+
})}
|
|
853
955
|
</div>
|
|
854
956
|
)}
|
|
855
957
|
{pin.targetText && (
|