@agent-native/core 0.92.10 → 0.92.12
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 +214 -17
- package/corpus/core/src/agent/run-manager.ts +72 -14
- package/corpus/core/src/agent/run-store.ts +152 -27
- 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-adapter.ts +56 -12
- 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/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 +75 -9
- package/corpus/templates/clips/app/components/player/video-player.tsx +17 -12
- package/corpus/templates/clips/app/hooks/use-player-shortcuts.ts +1 -0
- 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/changelog/2026-07-10-fixed-copying-agent-responses-and-transcript-text-from-recor.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/_builder-cms-read-client.ts +82 -7
- package/corpus/templates/content/actions/_database-source-utils.ts +149 -30
- 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/add-content-database-source-field-property.ts +4 -7
- package/corpus/templates/content/actions/attach-content-database-source.ts +41 -17
- package/corpus/templates/content/actions/change-content-database-source-role.ts +46 -8
- 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/actions/suggest-source-join-key.ts +8 -1
- 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-builder-source-refreshes-now-keep-mapped-fields-such-as-topi.md +6 -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/content/shared/api.ts +1 -0
- 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 +82 -7
- package/dist/agent/production-agent.d.ts.map +1 -1
- package/dist/agent/production-agent.js +180 -17
- 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 +63 -14
- 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 +129 -22
- 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-adapter.d.ts.map +1 -1
- package/dist/client/agent-chat-adapter.js +48 -12
- package/dist/client/agent-chat-adapter.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/struct-routes.d.ts +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/observability/routes.d.ts +5 -5
- package/dist/progress/routes.d.ts +1 -1
- package/dist/resources/handlers.d.ts +3 -3
- 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
|
@@ -0,0 +1,552 @@
|
|
|
1
|
+
import type { UseDesignHotkeysProps } from "@/hooks/useDesignHotkeys";
|
|
2
|
+
|
|
3
|
+
export const DESIGN_SHORTCUT_CATEGORIES = [
|
|
4
|
+
"essential",
|
|
5
|
+
"tools",
|
|
6
|
+
"view",
|
|
7
|
+
"zoom",
|
|
8
|
+
"text",
|
|
9
|
+
"shape",
|
|
10
|
+
"selection",
|
|
11
|
+
"cursor",
|
|
12
|
+
"edit",
|
|
13
|
+
"transform",
|
|
14
|
+
"arrange",
|
|
15
|
+
"components",
|
|
16
|
+
"layout",
|
|
17
|
+
] as const;
|
|
18
|
+
|
|
19
|
+
export type DesignShortcutCategory =
|
|
20
|
+
(typeof DESIGN_SHORTCUT_CATEGORIES)[number];
|
|
21
|
+
|
|
22
|
+
type DesignHotkeyHandlerKey = Exclude<
|
|
23
|
+
{
|
|
24
|
+
[K in keyof UseDesignHotkeysProps]: K extends `on${string}` ? K : never;
|
|
25
|
+
}[keyof UseDesignHotkeysProps],
|
|
26
|
+
undefined
|
|
27
|
+
>;
|
|
28
|
+
|
|
29
|
+
export interface DesignShortcutDefinition {
|
|
30
|
+
id: string;
|
|
31
|
+
category: DesignShortcutCategory;
|
|
32
|
+
bindings: readonly string[];
|
|
33
|
+
labelKey: `designEditor.keyboardShortcuts.commands.${string}`;
|
|
34
|
+
handler: DesignHotkeyHandlerKey;
|
|
35
|
+
context?: "screen";
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
const shortcut = (
|
|
39
|
+
definition: DesignShortcutDefinition,
|
|
40
|
+
): DesignShortcutDefinition => definition;
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* The user-facing Design shortcut catalog. Every row is tied to a real
|
|
44
|
+
* UseDesignHotkeys handler so the panel cannot quietly advertise a command the
|
|
45
|
+
* canvas does not dispatch. Code-workbench bindings are appended from its own
|
|
46
|
+
* command registry by KeyboardShortcutsPanel.
|
|
47
|
+
*/
|
|
48
|
+
export const DESIGN_SHORTCUTS: readonly DesignShortcutDefinition[] = [
|
|
49
|
+
shortcut({
|
|
50
|
+
id: "show-shortcuts",
|
|
51
|
+
category: "essential",
|
|
52
|
+
bindings: ["ctrl+shift+?"],
|
|
53
|
+
labelKey: "designEditor.keyboardShortcuts.commands.showShortcuts",
|
|
54
|
+
handler: "onShowKeyboardShortcuts",
|
|
55
|
+
}),
|
|
56
|
+
shortcut({
|
|
57
|
+
id: "undo",
|
|
58
|
+
category: "essential",
|
|
59
|
+
bindings: ["$mod+z"],
|
|
60
|
+
labelKey: "designEditor.keyboardShortcuts.commands.undo",
|
|
61
|
+
handler: "onUndo",
|
|
62
|
+
}),
|
|
63
|
+
shortcut({
|
|
64
|
+
id: "redo",
|
|
65
|
+
category: "essential",
|
|
66
|
+
bindings: ["$mod+shift+z", "$mod+y"],
|
|
67
|
+
labelKey: "designEditor.keyboardShortcuts.commands.redo",
|
|
68
|
+
handler: "onRedo",
|
|
69
|
+
}),
|
|
70
|
+
|
|
71
|
+
shortcut({
|
|
72
|
+
id: "move-tool",
|
|
73
|
+
category: "tools",
|
|
74
|
+
bindings: ["v"],
|
|
75
|
+
labelKey: "designEditor.keyboardShortcuts.commands.moveTool",
|
|
76
|
+
handler: "onMoveTool",
|
|
77
|
+
}),
|
|
78
|
+
shortcut({
|
|
79
|
+
id: "frame-tool",
|
|
80
|
+
category: "tools",
|
|
81
|
+
bindings: ["f"],
|
|
82
|
+
labelKey: "designEditor.keyboardShortcuts.commands.frameTool",
|
|
83
|
+
handler: "onFrameTool",
|
|
84
|
+
}),
|
|
85
|
+
shortcut({
|
|
86
|
+
id: "text-tool",
|
|
87
|
+
category: "tools",
|
|
88
|
+
bindings: ["t"],
|
|
89
|
+
labelKey: "designEditor.keyboardShortcuts.commands.textTool",
|
|
90
|
+
handler: "onTextTool",
|
|
91
|
+
}),
|
|
92
|
+
shortcut({
|
|
93
|
+
id: "pen-tool",
|
|
94
|
+
category: "tools",
|
|
95
|
+
bindings: ["p"],
|
|
96
|
+
labelKey: "designEditor.keyboardShortcuts.commands.penTool",
|
|
97
|
+
handler: "onPenTool",
|
|
98
|
+
}),
|
|
99
|
+
shortcut({
|
|
100
|
+
id: "hand-tool",
|
|
101
|
+
category: "tools",
|
|
102
|
+
bindings: ["h"],
|
|
103
|
+
labelKey: "designEditor.keyboardShortcuts.commands.handTool",
|
|
104
|
+
handler: "onHandTool",
|
|
105
|
+
}),
|
|
106
|
+
shortcut({
|
|
107
|
+
id: "scale-tool",
|
|
108
|
+
category: "tools",
|
|
109
|
+
bindings: ["k"],
|
|
110
|
+
labelKey: "designEditor.keyboardShortcuts.commands.scaleTool",
|
|
111
|
+
handler: "onScaleTool",
|
|
112
|
+
}),
|
|
113
|
+
shortcut({
|
|
114
|
+
id: "comment-tool",
|
|
115
|
+
category: "tools",
|
|
116
|
+
bindings: ["c"],
|
|
117
|
+
labelKey: "designEditor.keyboardShortcuts.commands.commentTool",
|
|
118
|
+
handler: "onCommentTool",
|
|
119
|
+
}),
|
|
120
|
+
shortcut({
|
|
121
|
+
id: "draw-tool",
|
|
122
|
+
category: "tools",
|
|
123
|
+
bindings: ["y"],
|
|
124
|
+
labelKey: "designEditor.keyboardShortcuts.commands.drawTool",
|
|
125
|
+
handler: "onDrawTool",
|
|
126
|
+
}),
|
|
127
|
+
|
|
128
|
+
shortcut({
|
|
129
|
+
id: "show-layers",
|
|
130
|
+
category: "view",
|
|
131
|
+
bindings: ["alt+1"],
|
|
132
|
+
labelKey: "designEditor.keyboardShortcuts.commands.showLayers",
|
|
133
|
+
handler: "onShowLayersPanel",
|
|
134
|
+
}),
|
|
135
|
+
shortcut({
|
|
136
|
+
id: "show-assets",
|
|
137
|
+
category: "view",
|
|
138
|
+
bindings: ["alt+2"],
|
|
139
|
+
labelKey: "designEditor.keyboardShortcuts.commands.showAssets",
|
|
140
|
+
handler: "onShowAssetsPanel",
|
|
141
|
+
}),
|
|
142
|
+
shortcut({
|
|
143
|
+
id: "toggle-ui",
|
|
144
|
+
category: "view",
|
|
145
|
+
bindings: ["$mod+\\"],
|
|
146
|
+
labelKey: "designEditor.keyboardShortcuts.commands.toggleUi",
|
|
147
|
+
handler: "onToggleUi",
|
|
148
|
+
}),
|
|
149
|
+
shortcut({
|
|
150
|
+
id: "toggle-comments",
|
|
151
|
+
category: "view",
|
|
152
|
+
bindings: ["shift+c"],
|
|
153
|
+
labelKey: "designEditor.keyboardShortcuts.commands.toggleComments",
|
|
154
|
+
handler: "onToggleComments",
|
|
155
|
+
}),
|
|
156
|
+
|
|
157
|
+
shortcut({
|
|
158
|
+
id: "zoom-in",
|
|
159
|
+
category: "zoom",
|
|
160
|
+
bindings: ["$mod+=", "+"],
|
|
161
|
+
labelKey: "designEditor.keyboardShortcuts.commands.zoomIn",
|
|
162
|
+
handler: "onZoomIn",
|
|
163
|
+
}),
|
|
164
|
+
shortcut({
|
|
165
|
+
id: "zoom-out",
|
|
166
|
+
category: "zoom",
|
|
167
|
+
bindings: ["$mod+-", "-"],
|
|
168
|
+
labelKey: "designEditor.keyboardShortcuts.commands.zoomOut",
|
|
169
|
+
handler: "onZoomOut",
|
|
170
|
+
}),
|
|
171
|
+
shortcut({
|
|
172
|
+
id: "zoom-reset",
|
|
173
|
+
category: "zoom",
|
|
174
|
+
bindings: ["$mod+0"],
|
|
175
|
+
labelKey: "designEditor.keyboardShortcuts.commands.zoomReset",
|
|
176
|
+
handler: "onZoomReset",
|
|
177
|
+
}),
|
|
178
|
+
shortcut({
|
|
179
|
+
id: "zoom-fit",
|
|
180
|
+
category: "zoom",
|
|
181
|
+
bindings: ["shift+1"],
|
|
182
|
+
labelKey: "designEditor.keyboardShortcuts.commands.zoomFit",
|
|
183
|
+
handler: "onZoomToFit",
|
|
184
|
+
}),
|
|
185
|
+
shortcut({
|
|
186
|
+
id: "zoom-selection",
|
|
187
|
+
category: "zoom",
|
|
188
|
+
bindings: ["shift+2"],
|
|
189
|
+
labelKey: "designEditor.keyboardShortcuts.commands.zoomSelection",
|
|
190
|
+
handler: "onZoomToSelection",
|
|
191
|
+
}),
|
|
192
|
+
|
|
193
|
+
shortcut({
|
|
194
|
+
id: "underline",
|
|
195
|
+
category: "text",
|
|
196
|
+
bindings: ["$mod+u"],
|
|
197
|
+
labelKey: "designEditor.keyboardShortcuts.commands.underline",
|
|
198
|
+
handler: "onToggleUnderline",
|
|
199
|
+
}),
|
|
200
|
+
shortcut({
|
|
201
|
+
id: "strikethrough",
|
|
202
|
+
category: "text",
|
|
203
|
+
bindings: ["$mod+shift+x"],
|
|
204
|
+
labelKey: "designEditor.keyboardShortcuts.commands.strikethrough",
|
|
205
|
+
handler: "onToggleStrikethrough",
|
|
206
|
+
}),
|
|
207
|
+
|
|
208
|
+
shortcut({
|
|
209
|
+
id: "rectangle",
|
|
210
|
+
category: "shape",
|
|
211
|
+
bindings: ["r"],
|
|
212
|
+
labelKey: "designEditor.keyboardShortcuts.commands.rectangle",
|
|
213
|
+
handler: "onRectangleTool",
|
|
214
|
+
}),
|
|
215
|
+
shortcut({
|
|
216
|
+
id: "ellipse",
|
|
217
|
+
category: "shape",
|
|
218
|
+
bindings: ["o"],
|
|
219
|
+
labelKey: "designEditor.keyboardShortcuts.commands.ellipse",
|
|
220
|
+
handler: "onEllipseTool",
|
|
221
|
+
}),
|
|
222
|
+
shortcut({
|
|
223
|
+
id: "line",
|
|
224
|
+
category: "shape",
|
|
225
|
+
bindings: ["l"],
|
|
226
|
+
labelKey: "designEditor.keyboardShortcuts.commands.line",
|
|
227
|
+
handler: "onLineTool",
|
|
228
|
+
}),
|
|
229
|
+
shortcut({
|
|
230
|
+
id: "arrow",
|
|
231
|
+
category: "shape",
|
|
232
|
+
bindings: ["shift+l"],
|
|
233
|
+
labelKey: "designEditor.keyboardShortcuts.commands.arrow",
|
|
234
|
+
handler: "onArrowTool",
|
|
235
|
+
}),
|
|
236
|
+
|
|
237
|
+
shortcut({
|
|
238
|
+
id: "select-all",
|
|
239
|
+
category: "selection",
|
|
240
|
+
bindings: ["$mod+a"],
|
|
241
|
+
labelKey: "designEditor.keyboardShortcuts.commands.selectAll",
|
|
242
|
+
handler: "onSelectAll",
|
|
243
|
+
}),
|
|
244
|
+
shortcut({
|
|
245
|
+
id: "select-parent",
|
|
246
|
+
category: "selection",
|
|
247
|
+
bindings: ["\\", "shift+enter"],
|
|
248
|
+
labelKey: "designEditor.keyboardShortcuts.commands.selectParent",
|
|
249
|
+
handler: "onSelectParent",
|
|
250
|
+
}),
|
|
251
|
+
shortcut({
|
|
252
|
+
id: "enter",
|
|
253
|
+
category: "selection",
|
|
254
|
+
bindings: ["enter"],
|
|
255
|
+
labelKey: "designEditor.keyboardShortcuts.commands.enterSelection",
|
|
256
|
+
handler: "onEnter",
|
|
257
|
+
}),
|
|
258
|
+
shortcut({
|
|
259
|
+
id: "next-sibling",
|
|
260
|
+
category: "selection",
|
|
261
|
+
bindings: ["tab"],
|
|
262
|
+
labelKey: "designEditor.keyboardShortcuts.commands.nextSibling",
|
|
263
|
+
handler: "onTab",
|
|
264
|
+
}),
|
|
265
|
+
shortcut({
|
|
266
|
+
id: "previous-sibling",
|
|
267
|
+
category: "selection",
|
|
268
|
+
bindings: ["shift+tab"],
|
|
269
|
+
labelKey: "designEditor.keyboardShortcuts.commands.previousSibling",
|
|
270
|
+
handler: "onTab",
|
|
271
|
+
}),
|
|
272
|
+
shortcut({
|
|
273
|
+
id: "next-screen",
|
|
274
|
+
category: "selection",
|
|
275
|
+
bindings: ["n"],
|
|
276
|
+
labelKey: "designEditor.keyboardShortcuts.commands.nextScreen",
|
|
277
|
+
handler: "onNextFrame",
|
|
278
|
+
context: "screen",
|
|
279
|
+
}),
|
|
280
|
+
shortcut({
|
|
281
|
+
id: "previous-screen",
|
|
282
|
+
category: "selection",
|
|
283
|
+
bindings: ["shift+n"],
|
|
284
|
+
labelKey: "designEditor.keyboardShortcuts.commands.previousScreen",
|
|
285
|
+
handler: "onPreviousFrame",
|
|
286
|
+
context: "screen",
|
|
287
|
+
}),
|
|
288
|
+
|
|
289
|
+
shortcut({
|
|
290
|
+
id: "nudge",
|
|
291
|
+
category: "cursor",
|
|
292
|
+
bindings: ["arrowup", "arrowright", "arrowdown", "arrowleft"],
|
|
293
|
+
labelKey: "designEditor.keyboardShortcuts.commands.nudge",
|
|
294
|
+
handler: "onNudge",
|
|
295
|
+
}),
|
|
296
|
+
shortcut({
|
|
297
|
+
id: "nudge-large",
|
|
298
|
+
category: "cursor",
|
|
299
|
+
bindings: [
|
|
300
|
+
"shift+arrowup",
|
|
301
|
+
"shift+arrowright",
|
|
302
|
+
"shift+arrowdown",
|
|
303
|
+
"shift+arrowleft",
|
|
304
|
+
],
|
|
305
|
+
labelKey: "designEditor.keyboardShortcuts.commands.nudgeLarge",
|
|
306
|
+
handler: "onNudge",
|
|
307
|
+
}),
|
|
308
|
+
|
|
309
|
+
shortcut({
|
|
310
|
+
id: "copy",
|
|
311
|
+
category: "edit",
|
|
312
|
+
bindings: ["$mod+c"],
|
|
313
|
+
labelKey: "designEditor.keyboardShortcuts.commands.copy",
|
|
314
|
+
handler: "onCopy",
|
|
315
|
+
}),
|
|
316
|
+
shortcut({
|
|
317
|
+
id: "copy-png",
|
|
318
|
+
category: "edit",
|
|
319
|
+
bindings: ["$mod+shift+c"],
|
|
320
|
+
labelKey: "designEditor.keyboardShortcuts.commands.copyPng",
|
|
321
|
+
handler: "onCopyAsPng",
|
|
322
|
+
}),
|
|
323
|
+
shortcut({
|
|
324
|
+
id: "cut",
|
|
325
|
+
category: "edit",
|
|
326
|
+
bindings: ["$mod+x"],
|
|
327
|
+
labelKey: "designEditor.keyboardShortcuts.commands.cut",
|
|
328
|
+
handler: "onCut",
|
|
329
|
+
}),
|
|
330
|
+
shortcut({
|
|
331
|
+
id: "paste",
|
|
332
|
+
category: "edit",
|
|
333
|
+
bindings: ["$mod+v"],
|
|
334
|
+
labelKey: "designEditor.keyboardShortcuts.commands.paste",
|
|
335
|
+
handler: "onPaste",
|
|
336
|
+
}),
|
|
337
|
+
shortcut({
|
|
338
|
+
id: "paste-over",
|
|
339
|
+
category: "edit",
|
|
340
|
+
bindings: ["$mod+shift+v"],
|
|
341
|
+
labelKey: "designEditor.keyboardShortcuts.commands.pasteOver",
|
|
342
|
+
handler: "onPasteOver",
|
|
343
|
+
}),
|
|
344
|
+
shortcut({
|
|
345
|
+
id: "copy-properties",
|
|
346
|
+
category: "edit",
|
|
347
|
+
bindings: ["$mod+alt+c"],
|
|
348
|
+
labelKey: "designEditor.keyboardShortcuts.commands.copyProperties",
|
|
349
|
+
handler: "onCopyProps",
|
|
350
|
+
}),
|
|
351
|
+
shortcut({
|
|
352
|
+
id: "paste-properties",
|
|
353
|
+
category: "edit",
|
|
354
|
+
bindings: ["$mod+alt+v"],
|
|
355
|
+
labelKey: "designEditor.keyboardShortcuts.commands.pasteProperties",
|
|
356
|
+
handler: "onPasteProps",
|
|
357
|
+
}),
|
|
358
|
+
shortcut({
|
|
359
|
+
id: "paste-replace",
|
|
360
|
+
category: "edit",
|
|
361
|
+
bindings: ["$mod+shift+r"],
|
|
362
|
+
labelKey: "designEditor.keyboardShortcuts.commands.pasteReplace",
|
|
363
|
+
handler: "onPasteToReplace",
|
|
364
|
+
}),
|
|
365
|
+
shortcut({
|
|
366
|
+
id: "duplicate",
|
|
367
|
+
category: "edit",
|
|
368
|
+
bindings: ["$mod+d"],
|
|
369
|
+
labelKey: "designEditor.keyboardShortcuts.commands.duplicate",
|
|
370
|
+
handler: "onDuplicate",
|
|
371
|
+
}),
|
|
372
|
+
shortcut({
|
|
373
|
+
id: "delete",
|
|
374
|
+
category: "edit",
|
|
375
|
+
bindings: ["backspace", "delete"],
|
|
376
|
+
labelKey: "designEditor.keyboardShortcuts.commands.delete",
|
|
377
|
+
handler: "onDelete",
|
|
378
|
+
}),
|
|
379
|
+
shortcut({
|
|
380
|
+
id: "rename",
|
|
381
|
+
category: "edit",
|
|
382
|
+
bindings: ["$mod+r"],
|
|
383
|
+
labelKey: "designEditor.keyboardShortcuts.commands.rename",
|
|
384
|
+
handler: "onRename",
|
|
385
|
+
}),
|
|
386
|
+
shortcut({
|
|
387
|
+
id: "find",
|
|
388
|
+
category: "edit",
|
|
389
|
+
bindings: ["$mod+f"],
|
|
390
|
+
labelKey: "designEditor.keyboardShortcuts.commands.find",
|
|
391
|
+
handler: "onFind",
|
|
392
|
+
}),
|
|
393
|
+
|
|
394
|
+
shortcut({
|
|
395
|
+
id: "flip-horizontal",
|
|
396
|
+
category: "transform",
|
|
397
|
+
bindings: ["shift+h"],
|
|
398
|
+
labelKey: "designEditor.keyboardShortcuts.commands.flipHorizontal",
|
|
399
|
+
handler: "onFlipHorizontal",
|
|
400
|
+
}),
|
|
401
|
+
shortcut({
|
|
402
|
+
id: "flip-vertical",
|
|
403
|
+
category: "transform",
|
|
404
|
+
bindings: ["shift+v"],
|
|
405
|
+
labelKey: "designEditor.keyboardShortcuts.commands.flipVertical",
|
|
406
|
+
handler: "onFlipVertical",
|
|
407
|
+
}),
|
|
408
|
+
shortcut({
|
|
409
|
+
id: "swap-fill-stroke",
|
|
410
|
+
category: "transform",
|
|
411
|
+
bindings: ["shift+x"],
|
|
412
|
+
labelKey: "designEditor.keyboardShortcuts.commands.swapFillStroke",
|
|
413
|
+
handler: "onSwapFillStroke",
|
|
414
|
+
}),
|
|
415
|
+
|
|
416
|
+
shortcut({
|
|
417
|
+
id: "bring-forward",
|
|
418
|
+
category: "arrange",
|
|
419
|
+
bindings: ["$mod+]"],
|
|
420
|
+
labelKey: "designEditor.keyboardShortcuts.commands.bringForward",
|
|
421
|
+
handler: "onBringForward",
|
|
422
|
+
}),
|
|
423
|
+
shortcut({
|
|
424
|
+
id: "send-backward",
|
|
425
|
+
category: "arrange",
|
|
426
|
+
bindings: ["$mod+["],
|
|
427
|
+
labelKey: "designEditor.keyboardShortcuts.commands.sendBackward",
|
|
428
|
+
handler: "onSendBackward",
|
|
429
|
+
}),
|
|
430
|
+
shortcut({
|
|
431
|
+
id: "bring-front",
|
|
432
|
+
category: "arrange",
|
|
433
|
+
bindings: ["]"],
|
|
434
|
+
labelKey: "designEditor.keyboardShortcuts.commands.bringFront",
|
|
435
|
+
handler: "onBringToFront",
|
|
436
|
+
}),
|
|
437
|
+
shortcut({
|
|
438
|
+
id: "send-back",
|
|
439
|
+
category: "arrange",
|
|
440
|
+
bindings: ["["],
|
|
441
|
+
labelKey: "designEditor.keyboardShortcuts.commands.sendBack",
|
|
442
|
+
handler: "onSendToBack",
|
|
443
|
+
}),
|
|
444
|
+
shortcut({
|
|
445
|
+
id: "align-left",
|
|
446
|
+
category: "arrange",
|
|
447
|
+
bindings: ["alt+a"],
|
|
448
|
+
labelKey: "designEditor.keyboardShortcuts.commands.alignLeft",
|
|
449
|
+
handler: "onAlignSelection",
|
|
450
|
+
}),
|
|
451
|
+
shortcut({
|
|
452
|
+
id: "align-right",
|
|
453
|
+
category: "arrange",
|
|
454
|
+
bindings: ["alt+d"],
|
|
455
|
+
labelKey: "designEditor.keyboardShortcuts.commands.alignRight",
|
|
456
|
+
handler: "onAlignSelection",
|
|
457
|
+
}),
|
|
458
|
+
shortcut({
|
|
459
|
+
id: "align-top",
|
|
460
|
+
category: "arrange",
|
|
461
|
+
bindings: ["alt+w"],
|
|
462
|
+
labelKey: "designEditor.keyboardShortcuts.commands.alignTop",
|
|
463
|
+
handler: "onAlignSelection",
|
|
464
|
+
}),
|
|
465
|
+
shortcut({
|
|
466
|
+
id: "align-bottom",
|
|
467
|
+
category: "arrange",
|
|
468
|
+
bindings: ["alt+s"],
|
|
469
|
+
labelKey: "designEditor.keyboardShortcuts.commands.alignBottom",
|
|
470
|
+
handler: "onAlignSelection",
|
|
471
|
+
}),
|
|
472
|
+
shortcut({
|
|
473
|
+
id: "tidy",
|
|
474
|
+
category: "arrange",
|
|
475
|
+
bindings: ["ctrl+alt+t"],
|
|
476
|
+
labelKey: "designEditor.keyboardShortcuts.commands.tidy",
|
|
477
|
+
handler: "onTidyUp",
|
|
478
|
+
}),
|
|
479
|
+
|
|
480
|
+
shortcut({
|
|
481
|
+
id: "create-component",
|
|
482
|
+
category: "components",
|
|
483
|
+
bindings: ["$mod+alt+k"],
|
|
484
|
+
labelKey: "designEditor.keyboardShortcuts.commands.createComponent",
|
|
485
|
+
handler: "onCreateComponent",
|
|
486
|
+
}),
|
|
487
|
+
shortcut({
|
|
488
|
+
id: "detach-instance",
|
|
489
|
+
category: "components",
|
|
490
|
+
bindings: ["$mod+alt+b"],
|
|
491
|
+
labelKey: "designEditor.keyboardShortcuts.commands.detachInstance",
|
|
492
|
+
handler: "onDetachInstance",
|
|
493
|
+
}),
|
|
494
|
+
|
|
495
|
+
shortcut({
|
|
496
|
+
id: "group",
|
|
497
|
+
category: "layout",
|
|
498
|
+
bindings: ["$mod+g"],
|
|
499
|
+
labelKey: "designEditor.keyboardShortcuts.commands.group",
|
|
500
|
+
handler: "onGroup",
|
|
501
|
+
}),
|
|
502
|
+
shortcut({
|
|
503
|
+
id: "ungroup",
|
|
504
|
+
category: "layout",
|
|
505
|
+
bindings: ["$mod+backspace"],
|
|
506
|
+
labelKey: "designEditor.keyboardShortcuts.commands.ungroup",
|
|
507
|
+
handler: "onUngroup",
|
|
508
|
+
}),
|
|
509
|
+
shortcut({
|
|
510
|
+
id: "frame-selection",
|
|
511
|
+
category: "layout",
|
|
512
|
+
bindings: ["$mod+alt+g"],
|
|
513
|
+
labelKey: "designEditor.keyboardShortcuts.commands.frameSelection",
|
|
514
|
+
handler: "onFrameSelection",
|
|
515
|
+
}),
|
|
516
|
+
shortcut({
|
|
517
|
+
id: "auto-layout",
|
|
518
|
+
category: "layout",
|
|
519
|
+
bindings: ["shift+a"],
|
|
520
|
+
labelKey: "designEditor.keyboardShortcuts.commands.autoLayout",
|
|
521
|
+
handler: "onAddAutoLayout",
|
|
522
|
+
}),
|
|
523
|
+
] as const;
|
|
524
|
+
|
|
525
|
+
const KEY_LABELS: Record<string, string> = {
|
|
526
|
+
arrowleft: "←",
|
|
527
|
+
arrowright: "→",
|
|
528
|
+
arrowup: "↑",
|
|
529
|
+
arrowdown: "↓",
|
|
530
|
+
backspace: "⌫",
|
|
531
|
+
delete: "⌦",
|
|
532
|
+
enter: "↩",
|
|
533
|
+
escape: "Esc",
|
|
534
|
+
plus: "+",
|
|
535
|
+
tab: "Tab",
|
|
536
|
+
};
|
|
537
|
+
|
|
538
|
+
export function formatShortcutKeycaps(
|
|
539
|
+
binding: string,
|
|
540
|
+
applePlatform: boolean,
|
|
541
|
+
): string[] {
|
|
542
|
+
if (binding === "+") return ["+"];
|
|
543
|
+
const tokens = binding.toLowerCase().split("+");
|
|
544
|
+
const key = tokens.pop() ?? "";
|
|
545
|
+
const keycaps: string[] = [];
|
|
546
|
+
if (tokens.includes("ctrl")) keycaps.push(applePlatform ? "⌃" : "Ctrl");
|
|
547
|
+
if (tokens.includes("alt")) keycaps.push(applePlatform ? "⌥" : "Alt");
|
|
548
|
+
if (tokens.includes("shift")) keycaps.push(applePlatform ? "⇧" : "Shift");
|
|
549
|
+
if (tokens.includes("$mod")) keycaps.push(applePlatform ? "⌘" : "Ctrl");
|
|
550
|
+
keycaps.push(KEY_LABELS[key] ?? (key.length === 1 ? key.toUpperCase() : key));
|
|
551
|
+
return keycaps;
|
|
552
|
+
}
|