@agent-native/core 0.80.8 → 0.80.10
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 +19 -0
- package/corpus/core/docs/content/locales/ar-SA/template-design.mdx +6 -0
- package/corpus/core/docs/content/locales/de-DE/template-design.mdx +8 -0
- package/corpus/core/docs/content/locales/es-ES/template-design.mdx +10 -2
- package/corpus/core/docs/content/locales/fr-FR/template-design.mdx +10 -2
- package/corpus/core/docs/content/locales/hi-IN/template-design.mdx +7 -0
- package/corpus/core/docs/content/locales/ja-JP/template-design.mdx +7 -0
- package/corpus/core/docs/content/locales/ko-KR/template-design.mdx +7 -0
- package/corpus/core/docs/content/locales/pt-BR/template-design.mdx +9 -2
- package/corpus/core/docs/content/locales/zh-CN/template-design.mdx +6 -0
- package/corpus/core/docs/content/locales/zh-TW/template-design.mdx +6 -0
- package/corpus/core/docs/content/template-design.mdx +9 -2
- package/corpus/core/package.json +1 -1
- package/corpus/core/src/cli/design-connect.ts +28 -2
- package/corpus/core/src/cli/mcp.ts +10 -0
- package/corpus/core/src/cli/skills.ts +103 -36
- package/corpus/core/src/client/error-format.ts +25 -0
- package/corpus/core/src/client/extensions/ExtensionViewer.tsx +13 -11
- package/corpus/core/src/client/guided-questions.tsx +32 -4
- package/corpus/core/src/client/onboarding/OnboardingPanel.tsx +33 -1
- package/corpus/core/src/client/resources/BuiltinCapabilityDetail.tsx +8 -0
- package/corpus/core/src/client/resources/use-builtin-capabilities.ts +4 -2
- package/corpus/core/src/client/session-replay.ts +34 -0
- package/corpus/core/src/client/sharing/ShareButton.tsx +106 -21
- package/corpus/core/src/coding-tools/index.ts +1 -1
- package/corpus/core/src/mcp/index.ts +2 -0
- package/corpus/core/src/mcp/screen-memory-stdio.ts +290 -0
- package/corpus/core/src/mcp-client/builtin-capabilities.ts +13 -1
- package/corpus/core/src/mcp-client/index.ts +9 -0
- package/corpus/core/src/mcp-client/screen-memory-local.ts +461 -0
- package/corpus/core/src/onboarding/types.ts +7 -0
- package/corpus/core/src/server/agent-chat-plugin.ts +25 -0
- package/corpus/core/src/server/agents-bundle.ts +35 -7
- package/corpus/core/src/styles/agent-native.css +5 -0
- package/corpus/core/src/templates/default/app/global.css +35 -35
- package/corpus/templates/analytics/AGENTS.md +6 -0
- package/corpus/templates/analytics/actions/github-repo-files.ts +9 -0
- package/corpus/templates/analytics/app/components/layout/Layout.tsx +4 -4
- package/corpus/templates/analytics/app/global.css +144 -40
- package/corpus/templates/analytics/app/pages/adhoc/explorer/index.tsx +1 -1
- package/corpus/templates/analytics/app/pages/adhoc/explorer-dashboard/ChartCard.tsx +1 -1
- package/corpus/templates/analytics/app/pages/adhoc/explorer-dashboard/index.tsx +1 -1
- package/corpus/templates/analytics/app/pages/sessions/SessionDetailPage.tsx +4 -4
- package/corpus/templates/analytics/app/pages/sessions/SessionsPage.tsx +9 -9
- package/corpus/templates/analytics/changelog/2026-06-29-agents-can-search-and-read-connected-github-repositories-whe.md +6 -0
- package/corpus/templates/analytics/changelog/2026-06-29-sessions-and-explorer-layouts-adapt-when-the-agent-sidebar-is.md +6 -0
- package/corpus/templates/assets/app/components/layout/Layout.tsx +3 -1
- package/corpus/templates/assets/app/components/library/LibraryPresetGrid.tsx +1 -1
- package/corpus/templates/assets/app/global.css +99 -35
- package/corpus/templates/assets/app/routes/asset.$id.tsx +2 -2
- package/corpus/templates/assets/app/routes/brand-kits.$id.tsx +4 -4
- package/corpus/templates/assets/app/routes/library.tsx +4 -4
- package/corpus/templates/assets/changelog/2026-06-29-asset-library-and-detail-layouts-adapt-when-the-agent-sidebar.md +6 -0
- package/corpus/templates/brain/app/components/layout/Layout.tsx +1 -1
- package/corpus/templates/brain/app/global.css +63 -35
- package/corpus/templates/brain/app/routes/search.tsx +1 -1
- package/corpus/templates/brain/app/routes/settings.tsx +1 -1
- package/corpus/templates/brain/app/routes/sources.tsx +2 -2
- package/corpus/templates/brain/changelog/2026-06-29-search-settings-and-source-layouts-adapt-when-the-agent-sidebar.md +6 -0
- package/corpus/templates/calendar/app/components/calendar/EventDetailPanel.tsx +4 -4
- package/corpus/templates/calendar/app/components/calendar/FindTimePanel.tsx +3 -2
- package/corpus/templates/calendar/app/components/layout/AppLayout.tsx +4 -2
- package/corpus/templates/calendar/app/global.css +69 -35
- package/corpus/templates/calendar/changelog/2026-06-29-event-and-find-time-layouts-adapt-when-the-agent-sidebar-is.md +6 -0
- package/corpus/templates/chat/app/components/layout/Layout.tsx +1 -1
- package/corpus/templates/chat/app/global.css +35 -35
- package/corpus/templates/chat/changelog/2026-06-29-chat-layouts-adapt-when-the-agent-sidebar-is-open.md +6 -0
- package/corpus/templates/clips/AGENTS.md +13 -0
- package/corpus/templates/clips/actions/get-screen-memory-status.ts +12 -0
- package/corpus/templates/clips/actions/query-screen-memory-context.ts +29 -0
- package/corpus/templates/clips/actions/view-screen.ts +2 -2
- package/corpus/templates/clips/app/components/library/library-layout.tsx +1 -1
- package/corpus/templates/clips/app/global.css +47 -35
- package/corpus/templates/clips/app/routes/_app.meetings.$meetingId.tsx +3 -3
- package/corpus/templates/clips/app/routes/r.$recordingId.tsx +45 -18
- package/corpus/templates/clips/changelog/2026-06-29-meeting-detail-layouts-adapt-when-the-agent-sidebar-is-open.md +6 -0
- package/corpus/templates/clips/changelog/2026-06-29-screen-memory-keeps-a-local-rolling-screen-buffer-for-agent-context.md +5 -0
- package/corpus/templates/clips/changelog/2026-06-29-video-chat-is-easier-to-find-on-recording-pages-and-s3-setup.md +6 -0
- package/corpus/templates/clips/chrome-extension/src/styles.css +39 -39
- package/corpus/templates/clips/desktop/src/app.tsx +290 -1
- package/corpus/templates/clips/desktop/src/shared/config.ts +83 -0
- package/corpus/templates/clips/desktop/src/styles.css +67 -52
- package/corpus/templates/clips/desktop/src-tauri/src/config.rs +50 -0
- package/corpus/templates/clips/desktop/src-tauri/src/lib.rs +17 -0
- package/corpus/templates/clips/desktop/src-tauri/src/native_screen.rs +13 -13
- package/corpus/templates/clips/desktop/src-tauri/src/screen_memory.rs +990 -0
- package/corpus/templates/clips/server/plugins/onboarding.ts +2 -0
- package/corpus/templates/content/app/components/editor/database/DatabaseView.tsx +3 -3
- package/corpus/templates/content/app/components/layout/Layout.tsx +1 -1
- package/corpus/templates/content/app/global.css +29 -15
- package/corpus/templates/content/changelog/2026-06-29-database-gallery-layouts-adapt-when-the-agent-sidebar-is-open.md +6 -0
- package/corpus/templates/design/.agents/skills/design-generation/SKILL.md +25 -20
- package/corpus/templates/design/.agents/skills/design-systems/SKILL.md +8 -0
- package/corpus/templates/design/.agents/skills/export-handoff/SKILL.md +8 -0
- package/corpus/templates/design/.agents/skills/visual-edit/SKILL.md +13 -0
- package/corpus/templates/design/AGENTS.md +20 -12
- package/corpus/templates/design/CODE_NATIVE_DESIGN_STUDIO_IMPLEMENTATION_PLAN.md +1054 -0
- package/corpus/templates/design/DESIGN-STUDIO-PLAN.md +717 -0
- package/corpus/templates/design/actions/add-breakpoint.ts +143 -0
- package/corpus/templates/design/actions/add-localhost-screens.ts +5 -0
- package/corpus/templates/design/actions/apply-a11y-fix.ts +317 -0
- package/corpus/templates/design/actions/apply-component-prop-edit.ts +433 -0
- package/corpus/templates/design/actions/apply-design-state.ts +200 -0
- package/corpus/templates/design/actions/apply-design-token-edit.ts +202 -0
- package/corpus/templates/design/actions/apply-motion-edit.ts +450 -0
- package/corpus/templates/design/actions/apply-shader-fill.ts +404 -0
- package/corpus/templates/design/actions/apply-visual-edit.ts +214 -8
- package/corpus/templates/design/actions/capture-design-state.ts +224 -0
- package/corpus/templates/design/actions/connect-builder-app.ts +162 -0
- package/corpus/templates/design/actions/create-component.ts +447 -0
- package/corpus/templates/design/actions/create-design-branch.ts +263 -0
- package/corpus/templates/design/actions/create-design-state.ts +162 -0
- package/corpus/templates/design/actions/delete-design-state.ts +55 -0
- package/corpus/templates/design/actions/deploy-design-preview.ts +275 -0
- package/corpus/templates/design/actions/export-coding-handoff.ts +12 -4
- package/corpus/templates/design/actions/generate-design.ts +6 -21
- package/corpus/templates/design/actions/generate-screens.ts +43 -2
- package/corpus/templates/design/actions/get-component-details.ts +242 -0
- package/corpus/templates/design/actions/get-design-branch-diff.ts +362 -0
- package/corpus/templates/design/actions/get-design-review.ts +314 -0
- package/corpus/templates/design/actions/get-design-surface-index.ts +582 -0
- package/corpus/templates/design/actions/get-design.ts +1 -0
- package/corpus/templates/design/actions/get-motion-timeline.ts +99 -0
- package/corpus/templates/design/actions/index-components.ts +258 -0
- package/corpus/templates/design/actions/index-design-tokens.ts +273 -0
- package/corpus/templates/design/actions/list-design-extensions.ts +309 -0
- package/corpus/templates/design/actions/list-design-source-capabilities.ts +153 -0
- package/corpus/templates/design/actions/list-design-states.ts +72 -0
- package/corpus/templates/design/actions/migrate-inline-design-to-app.ts +298 -0
- package/corpus/templates/design/actions/open-component-source.ts +237 -0
- package/corpus/templates/design/actions/present-design-variants.ts +355 -30
- package/corpus/templates/design/actions/preview-component-prop-edit.ts +254 -0
- package/corpus/templates/design/actions/preview-design-token-edit.ts +113 -0
- package/corpus/templates/design/actions/preview-shader-fill.ts +189 -0
- package/corpus/templates/design/actions/remove-breakpoint.ts +103 -0
- package/corpus/templates/design/actions/remove-motion-timeline.ts +196 -0
- package/corpus/templates/design/actions/run-design-audit.ts +421 -0
- package/corpus/templates/design/actions/run-design-extension-action.ts +284 -0
- package/corpus/templates/design/actions/set-active-breakpoint.ts +39 -0
- package/corpus/templates/design/actions/view-screen.ts +75 -31
- package/corpus/templates/design/app/components/design/DesignCanvas.tsx +1738 -135
- package/corpus/templates/design/app/components/design/DesignEditorSkeleton.tsx +1 -1
- package/corpus/templates/design/app/components/design/DesignExtensionsPanel.tsx +632 -43
- package/corpus/templates/design/app/components/design/DrawOverlay.tsx +1 -1
- package/corpus/templates/design/app/components/design/EditPanel.tsx +1873 -132
- package/corpus/templates/design/app/components/design/LayersPanel.tsx +384 -219
- package/corpus/templates/design/app/components/design/LocalSourceEditBanner.tsx +157 -0
- package/corpus/templates/design/app/components/design/MotionDock.tsx +1062 -0
- package/corpus/templates/design/app/components/design/MultiScreenCanvas.tsx +2103 -295
- package/corpus/templates/design/app/components/design/QuestionFlow.tsx +83 -206
- package/corpus/templates/design/app/components/design/ReviewPanel.tsx +759 -0
- package/corpus/templates/design/app/components/design/StatesPanel.tsx +579 -0
- package/corpus/templates/design/app/components/design/TokensPanel.tsx +573 -0
- package/corpus/templates/design/app/components/design/TweaksPanel.tsx +1 -1
- package/corpus/templates/design/app/components/design/canvas-primitive-style.ts +241 -0
- package/corpus/templates/design/app/components/design/index.ts +16 -1
- package/corpus/templates/design/app/components/design/inspector/AutoLayoutMatrix.tsx +238 -137
- package/corpus/templates/design/app/components/design/inspector/DesignColorPicker.tsx +188 -14
- package/corpus/templates/design/app/components/design/inspector/ExportSettingsPanel.tsx +24 -5
- package/corpus/templates/design/app/components/design/inspector/ImageFillControls.tsx +57 -1
- package/corpus/templates/design/app/components/design/inspector/InspectorAiActions.tsx +145 -0
- package/corpus/templates/design/app/components/design/inspector/SHADER_INTEGRATION.md +42 -12
- package/corpus/templates/design/app/components/design/inspector/ScrubInput.tsx +37 -12
- package/corpus/templates/design/app/components/design/inspector/index.ts +1 -0
- package/corpus/templates/design/app/components/design/inspector/scrub-input-utils.ts +12 -5
- package/corpus/templates/design/app/components/design/types.ts +9 -0
- package/corpus/templates/design/app/components/layout/Layout.tsx +23 -5
- package/corpus/templates/design/app/components/visual-editor/DrawOverlay.tsx +1 -1
- package/corpus/templates/design/app/global.css +77 -49
- package/corpus/templates/design/app/hooks/use-question-flow.ts +2 -2
- package/corpus/templates/design/app/hooks/useAgentEditRequest.ts +131 -0
- package/corpus/templates/design/app/hooks/useDesignHotkeys.ts +11 -2
- package/corpus/templates/design/app/i18n/zh-TW.ts +34 -0
- package/corpus/templates/design/app/i18n-data.ts +314 -3
- package/corpus/templates/design/app/pages/DesignEditor.tsx +4929 -892
- package/corpus/templates/design/app/root.tsx +1 -1
- package/corpus/templates/design/changelog/2026-06-29-added-a-review-panel-in-the-design-editor-s-inspector-with-a.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-containers-no-longer-block-selecting-nested-elements-and-nor.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-copying-and-pasting-layers-no-longer-shows-success-notificat.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-design-agents-now-generate-and-refine-variants-from-stronger.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-design-inspector-controls-now-match-figmas-softer-dark-chrome.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-design-questions-now-appear-as-a-cleaner-canvas-intake-with-.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-design-variant-directions-now-appear-as-board-screens-with-chat-buttons.md +5 -0
- package/corpus/templates/design/changelog/2026-06-29-device-presets-in-all-screens-view-resize-the-selected-previ.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-element-selection-no-longer-snaps-back-to-the-previous-layer.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-frame-resize-measurements-now-stay-beside-the-cursor-while-d.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-inspector-number-fields-have-cleaner-tooltips-and-draggable-.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-layer-and-canvas-drags-keep-the-layer-list-stable-while-chan.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-layer-locking-layer-nesting-generated-question-intake-and-im.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-layer-moves-can-be-undone-and-redone-without-flashing-the-ca.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-layer-names-in-the-sidebar-can-scroll-horizontally-instead-o.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-layer-nesting-in-the-sidebar-now-uses-tighter-spacing-so-nam.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-layers-no-longer-repeat-document-wrapper-rows-when-a-screen-.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-overview-previews-now-keep-element-hover-and-selection-tied-.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-pressing-escape-now-cancels-a-stuck-screen-drag-in-the-overv.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-screen-overview-is-easier-to-find-and-named-screens-open-dir.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-screen-overview-only-highlights-screens-when-the-frame-or-ti.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-screen-overview-previews-now-resize-to-match-the-selected-de.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-screen-overview-selection-now-uses-a-pointer-cursor-instead-.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-screen-overview-selection-outlines-now-stay-locked-to-the-se.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-screen-overview-zoom-now-reports-real-screen-scale-separatel.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-screen-overview-zooming-feels-smoother-and-selection-outline.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-screen-overview-zooming-now-stays-on-the-overview-canvas-ins.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-screen-previews-use-a-single-blue-hover-border-in-all-screen.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-selected-containers-show-draggable-padding-and-gap-guides-on.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-selecting-a-nested-layer-from-all-screens-now-keeps-you-in-a.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-share-now-groups-link-sharing-exports-and-agent-handoff.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-the-design-editor-adds-a-studio-layer-with-tokens-respon.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-the-design-editor-loading-skeleton-now-uses-a-softer-charcoa.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-the-device-preview-menu-now-sits-next-to-the-preview-button-.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-the-inspector-stays-read-only-while-an-empty-design-is-still.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-the-missing-design-view-now-matches-the-rest-of-the-editor-c.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-the-pen-tool-icon-and-tool-option-menus-better-match-the-edi.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-typography-controls-now-keep-the-font-name-visible-and-move-.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-accessibility-findings-now-offer-a-one-click-fix.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-component-instances-now-have-editable-props-in-the-inspe.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-inspect-code-now-shows-the-elements-opening-tag-at-a-gla.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-shader-fill-presets-can-now-be-applied-to-an-element.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-the-motion-timeline-can-now-add-a-track-to-any-element-a.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-visual-editor-selection-layer-paint-and-drawing-controls-are-more-reliable.md +6 -0
- package/corpus/templates/design/e2e/README.md +3 -3
- package/corpus/templates/design/e2e/global-setup.ts +11 -22
- package/corpus/templates/design/e2e/helpers.ts +128 -11
- package/corpus/templates/design/playwright.config.ts +9 -3
- package/corpus/templates/design/server/db/schema.ts +123 -0
- package/corpus/templates/design/server/lib/coding-handoff.ts +126 -2
- package/corpus/templates/design/server/plugins/core-routes.ts +1 -2
- package/corpus/templates/design/server/plugins/db.ts +90 -0
- package/corpus/templates/design/server/routes/api/design-handoff/[id].zip.get.ts +86 -0
- package/corpus/templates/design/shared/builder-app.ts +297 -0
- package/corpus/templates/design/shared/capability-resolver.ts +123 -0
- package/corpus/templates/design/shared/capture-sanitize.ts +70 -0
- package/corpus/templates/design/shared/code-layer.ts +1141 -93
- package/corpus/templates/design/shared/component-model.ts +239 -0
- package/corpus/templates/design/shared/design-review.ts +275 -0
- package/corpus/templates/design/shared/design-source-capabilities.ts +286 -0
- package/corpus/templates/design/shared/design-state.ts +112 -0
- package/corpus/templates/design/shared/design-surface-index.ts +258 -0
- package/corpus/templates/design/shared/generation-session.ts +41 -0
- package/corpus/templates/design/shared/motion-compiler.ts +278 -0
- package/corpus/templates/design/shared/motion-timeline.ts +193 -0
- package/corpus/templates/design/shared/responsive-classes.ts +452 -0
- package/corpus/templates/design/shared/shader-fill.ts +323 -0
- package/corpus/templates/design/shared/source-mode.ts +245 -0
- package/corpus/templates/dispatch/app/global.css +79 -35
- package/corpus/templates/dispatch/app/routes/integrations.tsx +8 -7
- package/corpus/templates/dispatch/changelog/2026-06-29-integration-layouts-adapt-when-the-agent-sidebar-is-open.md +6 -0
- package/corpus/templates/forms/app/components/layout/Layout.tsx +6 -2
- package/corpus/templates/forms/app/global.css +64 -35
- package/corpus/templates/forms/app/pages/FormsListPage.tsx +2 -2
- package/corpus/templates/forms/app/pages/ResponseInsightsPage.tsx +3 -3
- package/corpus/templates/forms/changelog/2026-06-29-form-list-and-insight-layouts-adapt-when-the-agent-sidebar.md +6 -0
- package/corpus/templates/macros/app/components/layout/AppLayout.tsx +3 -1
- package/corpus/templates/macros/app/global.css +25 -9
- package/corpus/templates/macros/changelog/2026-06-29-macro-layouts-adapt-when-the-agent-sidebar-is-open.md +6 -0
- package/corpus/templates/mail/app/components/layout/AppLayout.tsx +6 -2
- package/corpus/templates/mail/app/global.css +42 -36
- package/corpus/templates/mail/app/pages/InboxPage.tsx +1 -1
- package/corpus/templates/mail/changelog/2026-06-29-the-contact-panel-now-adapts-to-the-available-mail-pane-width.md +6 -0
- package/corpus/templates/plan/app/components/layout/Layout.tsx +3 -1
- package/corpus/templates/plan/app/components/plan/CanvasArea.tsx +6 -2
- package/corpus/templates/plan/app/components/plan/DocumentArea.tsx +6 -7
- package/corpus/templates/plan/app/global.css +74 -42
- package/corpus/templates/plan/changelog/2026-06-29-plan-canvases-open-without-an-initial-pan-and-zoom-flicker.md +6 -0
- package/corpus/templates/plan/changelog/2026-06-29-plan-document-blocks-adapt-to-the-available-document-width.md +6 -0
- package/corpus/templates/plan/changelog/2026-06-29-plan-titles-and-summaries-can-be-edited-inline-without-focus.md +6 -0
- package/corpus/templates/slides/app/components/layout/Layout.tsx +3 -1
- package/corpus/templates/slides/app/global.css +49 -33
- package/corpus/templates/slides/changelog/2026-06-29-slide-layouts-adapt-when-the-agent-sidebar-is-open.md +6 -0
- package/corpus/templates/videos/app/components/layout/Layout.tsx +3 -1
- package/corpus/templates/videos/app/global.css +35 -35
- package/corpus/templates/videos/changelog/2026-06-29-video-layouts-adapt-when-the-agent-sidebar-is-open.md +6 -0
- package/dist/cli/design-connect.d.ts.map +1 -1
- package/dist/cli/design-connect.js +28 -2
- package/dist/cli/design-connect.js.map +1 -1
- package/dist/cli/mcp.d.ts.map +1 -1
- package/dist/cli/mcp.js +10 -0
- package/dist/cli/mcp.js.map +1 -1
- package/dist/cli/skills.d.ts.map +1 -1
- package/dist/cli/skills.js +95 -33
- package/dist/cli/skills.js.map +1 -1
- package/dist/client/error-format.d.ts.map +1 -1
- package/dist/client/error-format.js +17 -0
- package/dist/client/error-format.js.map +1 -1
- package/dist/client/extensions/ExtensionViewer.d.ts.map +1 -1
- package/dist/client/extensions/ExtensionViewer.js +3 -4
- package/dist/client/extensions/ExtensionViewer.js.map +1 -1
- package/dist/client/guided-questions.d.ts +4 -0
- package/dist/client/guided-questions.d.ts.map +1 -1
- package/dist/client/guided-questions.js +16 -7
- package/dist/client/guided-questions.js.map +1 -1
- package/dist/client/onboarding/OnboardingPanel.js +26 -1
- package/dist/client/onboarding/OnboardingPanel.js.map +1 -1
- package/dist/client/resources/BuiltinCapabilityDetail.d.ts.map +1 -1
- package/dist/client/resources/BuiltinCapabilityDetail.js +1 -1
- package/dist/client/resources/BuiltinCapabilityDetail.js.map +1 -1
- package/dist/client/resources/use-builtin-capabilities.d.ts +1 -1
- package/dist/client/resources/use-builtin-capabilities.d.ts.map +1 -1
- package/dist/client/resources/use-builtin-capabilities.js +2 -1
- package/dist/client/resources/use-builtin-capabilities.js.map +1 -1
- package/dist/client/session-replay.d.ts.map +1 -1
- package/dist/client/session-replay.js +31 -0
- package/dist/client/session-replay.js.map +1 -1
- package/dist/client/sharing/ShareButton.d.ts +14 -0
- package/dist/client/sharing/ShareButton.d.ts.map +1 -1
- package/dist/client/sharing/ShareButton.js +36 -7
- package/dist/client/sharing/ShareButton.js.map +1 -1
- package/dist/coding-tools/index.js +1 -1
- package/dist/coding-tools/index.js.map +1 -1
- package/dist/mcp/index.d.ts +2 -0
- package/dist/mcp/index.d.ts.map +1 -1
- package/dist/mcp/index.js +1 -0
- package/dist/mcp/index.js.map +1 -1
- package/dist/mcp/screen-memory-stdio.d.ts +6 -0
- package/dist/mcp/screen-memory-stdio.d.ts.map +1 -0
- package/dist/mcp/screen-memory-stdio.js +213 -0
- package/dist/mcp/screen-memory-stdio.js.map +1 -0
- package/dist/mcp-client/builtin-capabilities.d.ts +1 -1
- package/dist/mcp-client/builtin-capabilities.d.ts.map +1 -1
- package/dist/mcp-client/builtin-capabilities.js +10 -0
- package/dist/mcp-client/builtin-capabilities.js.map +1 -1
- package/dist/mcp-client/index.d.ts +1 -0
- package/dist/mcp-client/index.d.ts.map +1 -1
- package/dist/mcp-client/index.js +1 -0
- package/dist/mcp-client/index.js.map +1 -1
- package/dist/mcp-client/screen-memory-local.d.ts +61 -0
- package/dist/mcp-client/screen-memory-local.d.ts.map +1 -0
- package/dist/mcp-client/screen-memory-local.js +336 -0
- package/dist/mcp-client/screen-memory-local.js.map +1 -0
- package/dist/observability/routes.d.ts +3 -3
- package/dist/onboarding/types.d.ts +7 -0
- package/dist/onboarding/types.d.ts.map +1 -1
- package/dist/onboarding/types.js.map +1 -1
- package/dist/server/agent-chat-plugin.d.ts.map +1 -1
- package/dist/server/agent-chat-plugin.js +26 -0
- 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/agents-bundle.d.ts.map +1 -1
- package/dist/server/agents-bundle.js +22 -7
- package/dist/server/agents-bundle.js.map +1 -1
- package/dist/styles/agent-native.css +5 -0
- package/dist/templates/default/app/global.css +35 -35
- package/docs/content/locales/ar-SA/template-design.mdx +6 -0
- package/docs/content/locales/de-DE/template-design.mdx +8 -0
- package/docs/content/locales/es-ES/template-design.mdx +10 -2
- package/docs/content/locales/fr-FR/template-design.mdx +10 -2
- package/docs/content/locales/hi-IN/template-design.mdx +7 -0
- package/docs/content/locales/ja-JP/template-design.mdx +7 -0
- package/docs/content/locales/ko-KR/template-design.mdx +7 -0
- package/docs/content/locales/pt-BR/template-design.mdx +9 -2
- package/docs/content/locales/zh-CN/template-design.mdx +6 -0
- package/docs/content/locales/zh-TW/template-design.mdx +6 -0
- package/docs/content/template-design.mdx +9 -2
- package/package.json +1 -1
- package/src/templates/default/app/global.css +35 -35
- package/corpus/templates/design/app/components/design/VariantGrid.tsx +0 -189
- package/corpus/templates/design/app/components/design/VariantHandoffCard.tsx +0 -115
- package/corpus/templates/design/app/hooks/use-variant-flow.ts +0 -342
|
@@ -147,10 +147,17 @@ export interface AutoLayoutMatrixProps {
|
|
|
147
147
|
onPaddingLinkedChange: (linked: boolean) => void;
|
|
148
148
|
onClipContentChange?: (clipContent: boolean) => void;
|
|
149
149
|
onDistribute?: (axis: DistributionAxis) => void;
|
|
150
|
+
onGapModeChange?: (mode: "fixed" | "auto", axis: DistributionAxis) => void;
|
|
150
151
|
onChildSizingChange: (
|
|
151
152
|
axis: AutoLayoutSizingAxis,
|
|
152
153
|
sizing: AutoLayoutSizing,
|
|
153
154
|
) => void;
|
|
155
|
+
/**
|
|
156
|
+
* Invoked when the user directly edits the resolved size (scrub or type) in
|
|
157
|
+
* fixed-sizing mode. `value` is the new size in CSS pixels. Optional —
|
|
158
|
+
* when omitted the resolved-size display is read-only (mode-picker only).
|
|
159
|
+
*/
|
|
160
|
+
onChildSizeChange?: (axis: AutoLayoutSizingAxis, value: number) => void;
|
|
154
161
|
/**
|
|
155
162
|
* Set or clear a min/max constraint on an axis. `value === null` clears it.
|
|
156
163
|
* Optional — when omitted the "Add min/max…" rows and constraint sub-rows are
|
|
@@ -240,10 +247,12 @@ export function AutoLayoutMatrix({
|
|
|
240
247
|
onPaddingLinkedChange,
|
|
241
248
|
onClipContentChange,
|
|
242
249
|
onDistribute,
|
|
250
|
+
onGapModeChange,
|
|
243
251
|
onChildSizingChange,
|
|
244
252
|
onChildMinMaxChange,
|
|
245
253
|
onApplyVariable,
|
|
246
254
|
onDisplayChange,
|
|
255
|
+
onChildSizeChange,
|
|
247
256
|
availableChildSizing,
|
|
248
257
|
labels,
|
|
249
258
|
disabled = false,
|
|
@@ -371,6 +380,11 @@ export function AutoLayoutMatrix({
|
|
|
371
380
|
labels={copy}
|
|
372
381
|
disabled={disabled}
|
|
373
382
|
onChange={(next) => onChildSizingChange("horizontal", next)}
|
|
383
|
+
onSizeChange={
|
|
384
|
+
onChildSizeChange
|
|
385
|
+
? (px) => onChildSizeChange("horizontal", px)
|
|
386
|
+
: undefined
|
|
387
|
+
}
|
|
374
388
|
onMinMaxChange={onChildMinMaxChange}
|
|
375
389
|
onApplyVariable={onApplyVariable}
|
|
376
390
|
/>
|
|
@@ -387,6 +401,11 @@ export function AutoLayoutMatrix({
|
|
|
387
401
|
labels={copy}
|
|
388
402
|
disabled={disabled}
|
|
389
403
|
onChange={(next) => onChildSizingChange("vertical", next)}
|
|
404
|
+
onSizeChange={
|
|
405
|
+
onChildSizeChange
|
|
406
|
+
? (px) => onChildSizeChange("vertical", px)
|
|
407
|
+
: undefined
|
|
408
|
+
}
|
|
390
409
|
onMinMaxChange={onChildMinMaxChange}
|
|
391
410
|
onApplyVariable={onApplyVariable}
|
|
392
411
|
/>
|
|
@@ -417,36 +436,36 @@ export function AutoLayoutMatrix({
|
|
|
417
436
|
</div>
|
|
418
437
|
</div>
|
|
419
438
|
|
|
420
|
-
{
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
</div>
|
|
439
|
+
{!isBlock ? (
|
|
440
|
+
<div className="grid grid-cols-[78px_1fr] items-start gap-3">
|
|
441
|
+
<div className="space-y-1.5">
|
|
442
|
+
<ControlLabel>
|
|
443
|
+
{"Alignment" /* i18n-ignore design inspector label */}
|
|
444
|
+
</ControlLabel>
|
|
445
|
+
<CompactAlignmentMatrix
|
|
446
|
+
value={value.alignment}
|
|
447
|
+
onChange={onAlignmentChange}
|
|
448
|
+
direction={value.direction}
|
|
449
|
+
disabled={disabled}
|
|
450
|
+
onDistribute={onDistribute}
|
|
451
|
+
/>
|
|
452
|
+
</div>
|
|
435
453
|
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
454
|
+
<div className="space-y-1.5">
|
|
455
|
+
<ControlLabel>{copy.gap}</ControlLabel>
|
|
456
|
+
<GapField
|
|
457
|
+
value={value.gap}
|
|
458
|
+
onGapChange={onGapChange}
|
|
459
|
+
onDistribute={onDistribute}
|
|
460
|
+
onGapModeChange={onGapModeChange}
|
|
461
|
+
label={copy.gap}
|
|
462
|
+
disabled={disabled}
|
|
463
|
+
direction={value.direction}
|
|
464
|
+
gapMode={value.spaceBetween ? "auto" : "fixed"}
|
|
465
|
+
/>
|
|
466
|
+
</div>
|
|
448
467
|
</div>
|
|
449
|
-
|
|
468
|
+
) : null}
|
|
450
469
|
|
|
451
470
|
{/* ── Padding ── */}
|
|
452
471
|
<div className="space-y-1.5">
|
|
@@ -842,6 +861,7 @@ function GapField({
|
|
|
842
861
|
value,
|
|
843
862
|
onGapChange,
|
|
844
863
|
onDistribute,
|
|
864
|
+
onGapModeChange,
|
|
845
865
|
label,
|
|
846
866
|
disabled,
|
|
847
867
|
direction,
|
|
@@ -850,6 +870,7 @@ function GapField({
|
|
|
850
870
|
value: number;
|
|
851
871
|
onGapChange: (gap: number) => void;
|
|
852
872
|
onDistribute?: (axis: DistributionAxis) => void;
|
|
873
|
+
onGapModeChange?: (mode: "fixed" | "auto", axis: DistributionAxis) => void;
|
|
853
874
|
label: string;
|
|
854
875
|
disabled: boolean;
|
|
855
876
|
direction: AutoLayoutDirection;
|
|
@@ -860,16 +881,15 @@ function GapField({
|
|
|
860
881
|
{/* [gap-icon] value [▾] in one control surface */}
|
|
861
882
|
<div
|
|
862
883
|
className={cn(
|
|
863
|
-
"flex h-7 min-w-0 flex-1 items-center rounded-md bg-[var(--design-editor-control-bg)]
|
|
884
|
+
"flex h-7 min-w-0 flex-1 items-center rounded-md bg-[var(--design-editor-control-bg)]",
|
|
864
885
|
disabled && "opacity-40",
|
|
865
886
|
)}
|
|
866
887
|
>
|
|
867
|
-
<span className="flex shrink-0 items-center text-muted-foreground">
|
|
868
|
-
<IconGap className="size-3.5" />
|
|
869
|
-
</span>
|
|
870
888
|
<ScrubInput
|
|
871
889
|
label={label}
|
|
872
890
|
ariaLabel={label}
|
|
891
|
+
tooltipLabel={label}
|
|
892
|
+
icon={IconGap}
|
|
873
893
|
value={value}
|
|
874
894
|
onChange={(next) => onGapChange(next)}
|
|
875
895
|
unit="px"
|
|
@@ -878,7 +898,7 @@ function GapField({
|
|
|
878
898
|
precision={1}
|
|
879
899
|
disabled={disabled}
|
|
880
900
|
className="min-w-0 flex-1 gap-0"
|
|
881
|
-
labelClassName="hidden"
|
|
901
|
+
labelClassName="h-7 w-6 justify-center gap-0 rounded-l-md text-muted-foreground [&>span]:hidden"
|
|
882
902
|
inputClassName="h-6 border-0 bg-transparent px-1 text-[11px] shadow-none focus-visible:ring-0"
|
|
883
903
|
/>
|
|
884
904
|
{onDistribute != null ? (
|
|
@@ -913,16 +933,20 @@ function GapField({
|
|
|
913
933
|
<DropdownMenuCheckboxItem
|
|
914
934
|
checked={gapMode !== "auto"}
|
|
915
935
|
className="text-[12px]"
|
|
916
|
-
onSelect={() =>
|
|
917
|
-
/* Fixed gap: keep current numeric value (already numeric). */
|
|
918
|
-
}}
|
|
936
|
+
onSelect={() => onGapModeChange?.("fixed", direction)}
|
|
919
937
|
>
|
|
920
938
|
{"Fixed" /* i18n-ignore design gap mode label */}
|
|
921
939
|
</DropdownMenuCheckboxItem>
|
|
922
940
|
<DropdownMenuCheckboxItem
|
|
923
941
|
checked={gapMode === "auto"}
|
|
924
942
|
className="text-[12px]"
|
|
925
|
-
onSelect={() =>
|
|
943
|
+
onSelect={() => {
|
|
944
|
+
if (onGapModeChange) {
|
|
945
|
+
onGapModeChange("auto", direction);
|
|
946
|
+
return;
|
|
947
|
+
}
|
|
948
|
+
onDistribute?.(direction);
|
|
949
|
+
}}
|
|
926
950
|
>
|
|
927
951
|
{"Auto" /* i18n-ignore design gap mode label */}
|
|
928
952
|
</DropdownMenuCheckboxItem>
|
|
@@ -972,16 +996,15 @@ function PaddingField({
|
|
|
972
996
|
return (
|
|
973
997
|
<div
|
|
974
998
|
className={cn(
|
|
975
|
-
"flex h-7 min-w-0 items-center rounded-md bg-[var(--design-editor-control-bg)]
|
|
999
|
+
"flex h-7 min-w-0 items-center rounded-md bg-[var(--design-editor-control-bg)]",
|
|
976
1000
|
disabled && "opacity-40",
|
|
977
1001
|
)}
|
|
978
1002
|
>
|
|
979
|
-
<span className="flex shrink-0 items-center text-muted-foreground">
|
|
980
|
-
<Icon className="size-3.5" />
|
|
981
|
-
</span>
|
|
982
1003
|
<ScrubInput
|
|
983
1004
|
label={ariaLabel}
|
|
984
1005
|
ariaLabel={ariaLabel}
|
|
1006
|
+
tooltipLabel={ariaLabel}
|
|
1007
|
+
icon={Icon}
|
|
985
1008
|
value={value}
|
|
986
1009
|
onChange={(next) => onChange(next)}
|
|
987
1010
|
unit="px"
|
|
@@ -990,7 +1013,7 @@ function PaddingField({
|
|
|
990
1013
|
precision={1}
|
|
991
1014
|
disabled={disabled}
|
|
992
1015
|
className="min-w-0 flex-1 gap-0"
|
|
993
|
-
labelClassName="hidden"
|
|
1016
|
+
labelClassName="h-7 w-6 justify-center gap-0 rounded-l-md text-muted-foreground [&>span]:hidden"
|
|
994
1017
|
inputClassName="h-6 border-0 bg-transparent px-1 text-[11px] shadow-none focus-visible:ring-0"
|
|
995
1018
|
/>
|
|
996
1019
|
</div>
|
|
@@ -1055,6 +1078,12 @@ export interface SizingFieldProps {
|
|
|
1055
1078
|
labels?: Partial<AutoLayoutMatrixLabels>;
|
|
1056
1079
|
disabled: boolean;
|
|
1057
1080
|
onChange: (value: AutoLayoutSizing) => void;
|
|
1081
|
+
/**
|
|
1082
|
+
* Invoked when the user directly scrubs or types a new pixel value while in
|
|
1083
|
+
* "fixed" sizing mode. When omitted the numeric display is read-only and the
|
|
1084
|
+
* entire trigger is a mode-picker dropdown (legacy behaviour).
|
|
1085
|
+
*/
|
|
1086
|
+
onSizeChange?: (px: number) => void;
|
|
1058
1087
|
onMinMaxChange?: (
|
|
1059
1088
|
axis: AutoLayoutSizingAxis,
|
|
1060
1089
|
kind: "min" | "max",
|
|
@@ -1085,6 +1114,7 @@ export function SizingField({
|
|
|
1085
1114
|
labels: labelOverrides,
|
|
1086
1115
|
disabled,
|
|
1087
1116
|
onChange,
|
|
1117
|
+
onSizeChange,
|
|
1088
1118
|
onMinMaxChange,
|
|
1089
1119
|
onApplyVariable,
|
|
1090
1120
|
}: SizingFieldProps) {
|
|
@@ -1108,6 +1138,9 @@ export function SizingField({
|
|
|
1108
1138
|
const minLabel = isWidth ? labels.minWidth : labels.minHeight;
|
|
1109
1139
|
const maxLabel = isWidth ? labels.maxWidth : labels.maxHeight;
|
|
1110
1140
|
|
|
1141
|
+
// Whether we're in editable fixed mode (ScrubInput shown for size).
|
|
1142
|
+
const isEditableFixed = value === "fixed" && onSizeChange != null;
|
|
1143
|
+
|
|
1111
1144
|
const openEditor = (kind: "min" | "max") => {
|
|
1112
1145
|
// Commit immediately so the shown row always reflects real state and
|
|
1113
1146
|
// persists across selection changes, remounts, and parent re-renders.
|
|
@@ -1116,105 +1149,173 @@ export function SizingField({
|
|
|
1116
1149
|
onMinMaxChange?.(sizingAxis, kind, seedValue);
|
|
1117
1150
|
};
|
|
1118
1151
|
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
{/* Caret */}
|
|
1150
|
-
<span className="flex shrink-0 items-center text-muted-foreground">
|
|
1151
|
-
<ChevronDownMini />
|
|
1152
|
-
</span>
|
|
1153
|
-
</button>
|
|
1154
|
-
</DropdownMenuTrigger>
|
|
1155
|
-
</TooltipTrigger>
|
|
1156
|
-
<TooltipContent>{`${axis} · ${labels[value]}`}</TooltipContent>
|
|
1157
|
-
</Tooltip>
|
|
1158
|
-
<DropdownMenuContent
|
|
1159
|
-
align="start"
|
|
1160
|
-
className="min-w-[180px] text-[12px]"
|
|
1161
|
-
sideOffset={4}
|
|
1162
|
-
>
|
|
1163
|
-
{/* ── Modes ── */}
|
|
1164
|
-
<SizingMenuItem
|
|
1165
|
-
icon={<IconSizingFixed />}
|
|
1166
|
-
label={labels.fixed}
|
|
1167
|
-
active={value === "fixed"}
|
|
1168
|
-
onSelect={() => onChange("fixed")}
|
|
1169
|
-
/>
|
|
1170
|
-
{canHug ? (
|
|
1171
|
-
<SizingMenuItem
|
|
1172
|
-
icon={<IconSizingHug />}
|
|
1173
|
-
label={labels.hugContents}
|
|
1174
|
-
active={value === "hug"}
|
|
1175
|
-
onSelect={() => onChange("hug")}
|
|
1176
|
-
/>
|
|
1177
|
-
) : null}
|
|
1178
|
-
{canFill ? (
|
|
1179
|
-
<SizingMenuItem
|
|
1180
|
-
icon={<IconSizingFill />}
|
|
1181
|
-
label={labels.fillContainer}
|
|
1182
|
-
active={value === "fill"}
|
|
1183
|
-
onSelect={() => onChange("fill")}
|
|
1184
|
-
/>
|
|
1185
|
-
) : null}
|
|
1186
|
-
|
|
1187
|
-
{/* ── Min / Max ── */}
|
|
1188
|
-
{onMinMaxChange ? (
|
|
1189
|
-
<>
|
|
1190
|
-
<DropdownMenuSeparator />
|
|
1191
|
-
<SizingMenuItem
|
|
1192
|
-
icon={<IconSizingMin />}
|
|
1193
|
-
label={addMinLabel}
|
|
1194
|
-
active={hasMin}
|
|
1195
|
-
disabled={hasMin}
|
|
1196
|
-
onSelect={() => openEditor("min")}
|
|
1197
|
-
/>
|
|
1198
|
-
<SizingMenuItem
|
|
1199
|
-
icon={<IconSizingMax />}
|
|
1200
|
-
label={addMaxLabel}
|
|
1201
|
-
active={hasMax}
|
|
1202
|
-
disabled={hasMax}
|
|
1203
|
-
onSelect={() => openEditor("max")}
|
|
1204
|
-
/>
|
|
1205
|
-
</>
|
|
1206
|
-
) : null}
|
|
1152
|
+
// Shared dropdown content (mode picker menu).
|
|
1153
|
+
const dropdownContent = (
|
|
1154
|
+
<DropdownMenuContent
|
|
1155
|
+
align="start"
|
|
1156
|
+
className="min-w-[180px] text-[12px]"
|
|
1157
|
+
sideOffset={4}
|
|
1158
|
+
>
|
|
1159
|
+
{/* ── Modes ── */}
|
|
1160
|
+
<SizingMenuItem
|
|
1161
|
+
icon={<IconSizingFixed />}
|
|
1162
|
+
label={labels.fixed}
|
|
1163
|
+
active={value === "fixed"}
|
|
1164
|
+
onSelect={() => onChange("fixed")}
|
|
1165
|
+
/>
|
|
1166
|
+
{canHug ? (
|
|
1167
|
+
<SizingMenuItem
|
|
1168
|
+
icon={<IconSizingHug />}
|
|
1169
|
+
label={labels.hugContents}
|
|
1170
|
+
active={value === "hug"}
|
|
1171
|
+
onSelect={() => onChange("hug")}
|
|
1172
|
+
/>
|
|
1173
|
+
) : null}
|
|
1174
|
+
{canFill ? (
|
|
1175
|
+
<SizingMenuItem
|
|
1176
|
+
icon={<IconSizingFill />}
|
|
1177
|
+
label={labels.fillContainer}
|
|
1178
|
+
active={value === "fill"}
|
|
1179
|
+
onSelect={() => onChange("fill")}
|
|
1180
|
+
/>
|
|
1181
|
+
) : null}
|
|
1207
1182
|
|
|
1208
|
-
|
|
1183
|
+
{/* ── Min / Max ── */}
|
|
1184
|
+
{onMinMaxChange ? (
|
|
1185
|
+
<>
|
|
1209
1186
|
<DropdownMenuSeparator />
|
|
1210
1187
|
<SizingMenuItem
|
|
1211
|
-
icon={<
|
|
1212
|
-
label={
|
|
1213
|
-
|
|
1214
|
-
|
|
1188
|
+
icon={<IconSizingMin />}
|
|
1189
|
+
label={addMinLabel}
|
|
1190
|
+
active={hasMin}
|
|
1191
|
+
disabled={hasMin}
|
|
1192
|
+
onSelect={() => openEditor("min")}
|
|
1193
|
+
/>
|
|
1194
|
+
<SizingMenuItem
|
|
1195
|
+
icon={<IconSizingMax />}
|
|
1196
|
+
label={addMaxLabel}
|
|
1197
|
+
active={hasMax}
|
|
1198
|
+
disabled={hasMax}
|
|
1199
|
+
onSelect={() => openEditor("max")}
|
|
1215
1200
|
/>
|
|
1216
|
-
|
|
1217
|
-
|
|
1201
|
+
</>
|
|
1202
|
+
) : null}
|
|
1203
|
+
|
|
1204
|
+
{/* ── Variable ── */}
|
|
1205
|
+
<DropdownMenuSeparator />
|
|
1206
|
+
<SizingMenuItem
|
|
1207
|
+
icon={<IconSizingVariable />}
|
|
1208
|
+
label={labels.applyVariable}
|
|
1209
|
+
disabled={!onApplyVariable}
|
|
1210
|
+
onSelect={() => onApplyVariable?.(sizingAxis)}
|
|
1211
|
+
/>
|
|
1212
|
+
</DropdownMenuContent>
|
|
1213
|
+
);
|
|
1214
|
+
|
|
1215
|
+
return (
|
|
1216
|
+
<div className="flex min-w-0 flex-col gap-1">
|
|
1217
|
+
{isEditableFixed ? (
|
|
1218
|
+
/*
|
|
1219
|
+
* Editable fixed mode: split the trigger into two zones —
|
|
1220
|
+
* [axis letter | ScrubInput (numeric) | ▾ mode-picker caret]
|
|
1221
|
+
* The ScrubInput occupies the center and lets the user type or
|
|
1222
|
+
* drag-to-scrub the size in px. The chevron opens the mode dropdown.
|
|
1223
|
+
*/
|
|
1224
|
+
<DropdownMenu>
|
|
1225
|
+
<div
|
|
1226
|
+
className={cn(
|
|
1227
|
+
"flex h-7 w-full items-center overflow-hidden rounded-md",
|
|
1228
|
+
"bg-[var(--design-editor-control-bg)] text-[11px]",
|
|
1229
|
+
disabled && "pointer-events-none opacity-40",
|
|
1230
|
+
)}
|
|
1231
|
+
>
|
|
1232
|
+
{/* Scrub-editable size value */}
|
|
1233
|
+
<ScrubInput
|
|
1234
|
+
label={axis}
|
|
1235
|
+
ariaLabel={`${axis} size in pixels`}
|
|
1236
|
+
tooltipLabel={`${axis} size`}
|
|
1237
|
+
icon={null}
|
|
1238
|
+
value={Math.round(resolvedSize ?? 0)}
|
|
1239
|
+
onChange={(next) => onSizeChange!(Math.max(0, Math.round(next)))}
|
|
1240
|
+
unit="px"
|
|
1241
|
+
min={0}
|
|
1242
|
+
step={1}
|
|
1243
|
+
precision={0}
|
|
1244
|
+
disabled={disabled}
|
|
1245
|
+
className="min-w-0 flex-1 gap-0"
|
|
1246
|
+
labelClassName="h-7 w-5 justify-center gap-0 rounded-l-md px-0 text-muted-foreground"
|
|
1247
|
+
inputClassName="h-6 border-0 bg-transparent px-1 text-[11px] shadow-none focus-visible:ring-0"
|
|
1248
|
+
/>
|
|
1249
|
+
{/* Caret opens the mode picker */}
|
|
1250
|
+
<Tooltip>
|
|
1251
|
+
<TooltipTrigger asChild>
|
|
1252
|
+
<DropdownMenuTrigger asChild>
|
|
1253
|
+
<button
|
|
1254
|
+
type="button"
|
|
1255
|
+
aria-label={`${axis} sizing mode — ${labels[value]}`}
|
|
1256
|
+
disabled={disabled}
|
|
1257
|
+
className={cn(
|
|
1258
|
+
"flex h-7 w-6 shrink-0 items-center justify-center rounded-r-md",
|
|
1259
|
+
"text-muted-foreground hover:text-foreground",
|
|
1260
|
+
"focus:outline-none focus-visible:ring-1 focus-visible:ring-[var(--design-editor-accent-color,hsl(var(--primary)))]",
|
|
1261
|
+
)}
|
|
1262
|
+
>
|
|
1263
|
+
<ChevronDownMini />
|
|
1264
|
+
</button>
|
|
1265
|
+
</DropdownMenuTrigger>
|
|
1266
|
+
</TooltipTrigger>
|
|
1267
|
+
<TooltipContent>
|
|
1268
|
+
{`${axis} · ${labels[value]} — click to change sizing mode`}
|
|
1269
|
+
</TooltipContent>
|
|
1270
|
+
</Tooltip>
|
|
1271
|
+
</div>
|
|
1272
|
+
{dropdownContent}
|
|
1273
|
+
</DropdownMenu>
|
|
1274
|
+
) : (
|
|
1275
|
+
/*
|
|
1276
|
+
* Non-editable / hug / fill mode: keep the original single-button
|
|
1277
|
+
* dropdown trigger showing [axis | resolved size | mode word | ▾].
|
|
1278
|
+
*/
|
|
1279
|
+
<DropdownMenu>
|
|
1280
|
+
<Tooltip>
|
|
1281
|
+
<TooltipTrigger asChild>
|
|
1282
|
+
<DropdownMenuTrigger asChild>
|
|
1283
|
+
<button
|
|
1284
|
+
type="button"
|
|
1285
|
+
aria-label={`${axis} ${Math.round(resolvedSize ?? 0)} ${labels[value]}`}
|
|
1286
|
+
disabled={disabled}
|
|
1287
|
+
className={cn(
|
|
1288
|
+
"flex h-7 w-full items-center gap-1 overflow-hidden rounded-md px-1.5",
|
|
1289
|
+
"bg-[var(--design-editor-control-bg)] text-[11px]",
|
|
1290
|
+
"hover:bg-[var(--design-editor-panel-raised-bg)]",
|
|
1291
|
+
"disabled:pointer-events-none disabled:opacity-40",
|
|
1292
|
+
"focus:outline-none focus-visible:ring-1 focus-visible:ring-[var(--design-editor-accent-color,hsl(var(--primary)))]",
|
|
1293
|
+
)}
|
|
1294
|
+
>
|
|
1295
|
+
{/* Axis letter */}
|
|
1296
|
+
<span className="shrink-0 text-muted-foreground">{axis}</span>
|
|
1297
|
+
{/* Resolved size */}
|
|
1298
|
+
<span className="min-w-0 flex-1 truncate text-left tabular-nums text-foreground">
|
|
1299
|
+
{Math.round(resolvedSize ?? 0)}
|
|
1300
|
+
</span>
|
|
1301
|
+
{/* Mode word (Hug/Fill only) */}
|
|
1302
|
+
{showWord ? (
|
|
1303
|
+
<span className="shrink-0 truncate text-muted-foreground">
|
|
1304
|
+
{labels[value]}
|
|
1305
|
+
</span>
|
|
1306
|
+
) : null}
|
|
1307
|
+
{/* Caret */}
|
|
1308
|
+
<span className="flex shrink-0 items-center text-muted-foreground">
|
|
1309
|
+
<ChevronDownMini />
|
|
1310
|
+
</span>
|
|
1311
|
+
</button>
|
|
1312
|
+
</DropdownMenuTrigger>
|
|
1313
|
+
</TooltipTrigger>
|
|
1314
|
+
<TooltipContent>{`${axis} · ${labels[value]} — click to change sizing mode`}</TooltipContent>
|
|
1315
|
+
</Tooltip>
|
|
1316
|
+
{dropdownContent}
|
|
1317
|
+
</DropdownMenu>
|
|
1318
|
+
)}
|
|
1218
1319
|
|
|
1219
1320
|
{/* ── Constraint sub-rows ── */}
|
|
1220
1321
|
{hasMin ? (
|