@agent-native/core 0.90.1 → 0.90.2
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 +14 -0
- package/corpus/core/package.json +1 -1
- package/corpus/core/src/client/AgentPanel.tsx +1 -1
- package/corpus/core/src/client/rich-markdown-editor/useCollabReconcile.ts +11 -6
- package/corpus/core/src/client/use-action.ts +39 -2
- package/corpus/core/src/client/use-db-sync.ts +44 -18
- package/corpus/core/src/db/create-get-db.ts +32 -2
- package/corpus/core/src/server/framework-request-handler.ts +52 -4
- package/corpus/templates/assets/.agents/skills/asset-generation/SKILL.md +5 -0
- package/corpus/templates/assets/.agents/skills/logo-composite/SKILL.md +34 -6
- package/corpus/templates/assets/AGENTS.md +23 -4
- package/corpus/templates/assets/actions/_generation-preset-settings.ts +48 -0
- package/corpus/templates/assets/actions/_helpers.ts +8 -1
- package/corpus/templates/assets/actions/_preset-skeleton-validation.ts +64 -0
- package/corpus/templates/assets/actions/create-generation-preset.ts +11 -3
- package/corpus/templates/assets/actions/generate-image-batch.ts +7 -2
- package/corpus/templates/assets/actions/generate-image.ts +342 -25
- package/corpus/templates/assets/actions/get-library.ts +4 -3
- package/corpus/templates/assets/actions/navigate.ts +2 -1
- package/corpus/templates/assets/actions/refresh-generation-run.ts +5 -1
- package/corpus/templates/assets/actions/update-asset.ts +1 -0
- package/corpus/templates/assets/actions/update-generation-preset.ts +8 -1
- package/corpus/templates/assets/actions/view-screen.ts +8 -1
- package/corpus/templates/assets/app/components/generation/GenerationResults.tsx +9 -1
- package/corpus/templates/assets/app/hooks/use-image-model-menu.ts +1 -0
- package/corpus/templates/assets/app/hooks/use-navigation-state.ts +11 -0
- package/corpus/templates/assets/app/i18n/zh-TW.ts +64 -0
- package/corpus/templates/assets/app/i18n-data.ts +650 -0
- package/corpus/templates/assets/app/routes/asset.$id.tsx +2 -1
- package/corpus/templates/assets/app/routes/brand-kits.$id.tsx +44 -33
- package/corpus/templates/assets/app/routes/brand-kits.$id_.presets.$presetId.tsx +1474 -0
- package/corpus/templates/assets/app/routes/library.tsx +43 -1
- package/corpus/templates/assets/server/lib/generation.ts +366 -44
- package/corpus/templates/assets/server/lib/image-processing.ts +252 -0
- package/corpus/templates/assets/server/lib/preset-skeleton.ts +137 -0
- package/corpus/templates/assets/shared/api.ts +47 -0
- package/corpus/templates/clips/app/components/library/library-layout.tsx +7 -2
- package/corpus/templates/clips/app/components/library/sort-menu.tsx +1 -1
- package/corpus/templates/clips/app/components/recorder/recorder-engine.ts +114 -33
- package/corpus/templates/clips/app/routes/_app.library._index.tsx +27 -1
- package/corpus/templates/clips/app/routes/record.tsx +157 -68
- package/corpus/templates/clips/server/routes/api/uploads/[recordingId]/abort.post.ts +5 -5
- package/corpus/templates/clips/server/routes/api/uploads/[recordingId]/chunk.post.ts +20 -3
- package/corpus/templates/clips/shared/finalize-recovery.ts +23 -3
- package/corpus/templates/content/AGENTS.md +52 -52
- package/corpus/templates/content/actions/_builder-cms-read-client.ts +188 -8
- package/corpus/templates/content/actions/_builder-docs-client.ts +41 -3
- package/corpus/templates/content/actions/_database-source-utils.ts +998 -160
- package/corpus/templates/content/actions/_database-utils.ts +44 -4
- package/corpus/templates/content/actions/_notion-action-utils.ts +6 -2
- package/corpus/templates/content/actions/add-content-database-source-field-property.ts +23 -1
- package/corpus/templates/content/actions/attach-content-database-source.ts +85 -12
- package/corpus/templates/content/actions/change-content-database-source-role.ts +9 -1
- package/corpus/templates/content/actions/delete-content-database.ts +1 -0
- package/corpus/templates/content/actions/get-document.ts +11 -2
- package/corpus/templates/content/actions/list-content-databases.ts +57 -9
- package/corpus/templates/content/actions/prepare-builder-source-review.ts +23 -6
- package/corpus/templates/content/actions/refresh-content-database-source.ts +26 -3
- package/corpus/templates/content/actions/restore-content-database.ts +1 -0
- package/corpus/templates/content/actions/update-document.ts +43 -0
- package/corpus/templates/content/app/components/editor/BuilderBodySyncingNotice.tsx +21 -0
- package/corpus/templates/content/app/components/editor/DocumentDatabase.tsx +0 -1
- package/corpus/templates/content/app/components/editor/DocumentEditor.tsx +70 -28
- package/corpus/templates/content/app/components/editor/DocumentProperties.tsx +69 -17
- package/corpus/templates/content/app/components/editor/VisualEditor.tsx +4 -4
- package/corpus/templates/content/app/components/editor/body-hydration.ts +112 -0
- package/corpus/templates/content/app/components/editor/builder-body-hydration-pump.ts +52 -0
- package/corpus/templates/content/app/components/editor/database/DatabaseView.tsx +9076 -2876
- package/corpus/templates/content/app/components/editor/database-sources/BuilderSourceReviewDialog.tsx +41 -1
- package/corpus/templates/content/app/components/editor/extensions/ImageBlock.tsx +36 -11
- package/corpus/templates/content/app/components/editor/previewDocumentSaveController.ts +21 -1
- package/corpus/templates/content/app/components/sidebar/DocumentSidebar.tsx +11 -1
- package/corpus/templates/content/app/components/sidebar/DocumentTreeItem.tsx +11 -8
- package/corpus/templates/content/app/global.css +41 -0
- package/corpus/templates/content/app/hooks/use-content-database.ts +346 -42
- package/corpus/templates/content/app/hooks/use-db-sync.ts +9 -0
- package/corpus/templates/content/app/hooks/use-documents.ts +47 -0
- package/corpus/templates/content/app/hooks/use-notion.ts +12 -10
- package/corpus/templates/content/app/i18n/zh-TW.ts +35 -0
- package/corpus/templates/content/app/i18n-data.ts +355 -0
- package/corpus/templates/content/app/root.tsx +22 -0
- package/corpus/templates/content/changelog/2026-07-01-builder-database-sources-keep-loading-rows-in-the-background.md +6 -0
- package/corpus/templates/content/changelog/2026-07-01-builder-source-attach-starts-with-usable-rows.md +6 -0
- package/corpus/templates/content/changelog/2026-07-01-builder-source-attachment-now-stays-connected-after-large.md +6 -0
- package/corpus/templates/content/changelog/2026-07-01-builder-source-refreshes-now-show-progress-for-large-docs-blog.md +6 -0
- package/corpus/templates/content/changelog/2026-07-01-database-pages-now-delete-to-trash-without-route-errors.md +6 -0
- package/corpus/templates/content/changelog/2026-07-02-builder-source-refreshes-recover-from-stalled-background-row.md +6 -0
- package/corpus/templates/content/changelog/2026-07-02-builder-sourced-rows-open-with-sync-protection.md +6 -0
- package/corpus/templates/content/changelog/2026-07-02-database-rows-and-pages-open-faster-from-recently-loaded-dat.md +6 -0
- package/corpus/templates/content/changelog/2026-07-02-preview-panels-close-reliably-narrow-sidebar-row-actions-sta.md +6 -0
- package/corpus/templates/content/changelog/2026-07-06-builder-sync-progress-no-longer-shows-continue.md +6 -0
- package/corpus/templates/content/shared/api.ts +13 -0
- package/corpus/templates/content/shared/builder-mdx.ts +16 -3
- package/corpus/templates/design/.agents/skills/design-generation/SKILL.md +23 -13
- package/corpus/templates/design/.agents/skills/responsive-breakpoints/SKILL.md +98 -0
- package/corpus/templates/design/.agents/skills/shader-fills/SKILL.md +162 -0
- package/corpus/templates/design/AGENTS.md +9 -2
- package/corpus/templates/design/actions/add-breakpoint.ts +6 -3
- package/corpus/templates/design/actions/apply-a11y-fix.ts +57 -37
- package/corpus/templates/design/actions/apply-component-prop-edit.ts +41 -20
- package/corpus/templates/design/actions/apply-motion-edit.ts +251 -38
- package/corpus/templates/design/actions/apply-shader-fill.ts +90 -66
- package/corpus/templates/design/actions/apply-visual-edit.ts +282 -55
- package/corpus/templates/design/actions/create-component.ts +29 -60
- package/corpus/templates/design/actions/create-file.ts +9 -2
- package/corpus/templates/design/actions/duplicate-design.ts +31 -2
- package/corpus/templates/design/actions/edit-design.ts +36 -38
- package/corpus/templates/design/actions/generate-design-title.ts +87 -0
- package/corpus/templates/design/actions/generate-design.ts +53 -18
- package/corpus/templates/design/actions/generate-screens.ts +108 -4
- package/corpus/templates/design/actions/get-motion-timeline.ts +35 -7
- package/corpus/templates/design/actions/insert-asset.ts +34 -29
- package/corpus/templates/design/actions/insert-design-native-asset.ts +129 -32
- package/corpus/templates/design/actions/insert-figma-library-asset.ts +35 -30
- package/corpus/templates/design/actions/present-design-variants.ts +7 -2
- package/corpus/templates/design/actions/remove-motion-timeline.ts +31 -36
- package/corpus/templates/design/actions/update-file.ts +190 -75
- package/corpus/templates/design/app/components/design/BreakpointBar.tsx +403 -0
- package/corpus/templates/design/app/components/design/CanvasContextMenu.tsx +469 -222
- package/corpus/templates/design/app/components/design/DesignCanvas.tsx +708 -53
- package/corpus/templates/design/app/components/design/DesignExtensionsPanel.tsx +83 -3
- package/corpus/templates/design/app/components/design/EditPanel.tsx +1091 -6948
- package/corpus/templates/design/app/components/design/LayersPanel.tsx +419 -85
- package/corpus/templates/design/app/components/design/MotionDock.tsx +1124 -103
- package/corpus/templates/design/app/components/design/MultiScreenCanvas.tsx +2610 -1398
- package/corpus/templates/design/app/components/design/ReadOnlyDesignBanner.tsx +22 -0
- package/corpus/templates/design/app/components/design/bridge/editor-chrome.bridge.ts +2182 -235
- package/corpus/templates/design/app/components/design/bridge/motion-preview.bridge.ts +187 -11
- package/corpus/templates/design/app/components/design/bridge/shader-fill-preview.bridge.ts +376 -1
- package/corpus/templates/design/app/components/design/bridge/shader-runtime.bridge.ts +746 -0
- package/corpus/templates/design/app/components/design/canvas-primitive-style.ts +17 -0
- package/corpus/templates/design/app/components/design/code-workbench/SideBar.tsx +1 -1
- package/corpus/templates/design/app/components/design/code-workbench/explorer/FileTree.tsx +1 -3
- package/corpus/templates/design/app/components/design/code-workbench/quickinput/QuickInput.tsx +1 -1
- package/corpus/templates/design/app/components/design/edit-panel/appearance-properties.tsx +518 -0
- package/corpus/templates/design/app/components/design/edit-panel/code-inspect-helpers.tsx +562 -0
- package/corpus/templates/design/app/components/design/edit-panel/component-section.tsx +763 -0
- package/corpus/templates/design/app/components/design/edit-panel/document-colors.ts +94 -0
- package/corpus/templates/design/app/components/design/edit-panel/effects-properties.tsx +780 -0
- package/corpus/templates/design/app/components/design/edit-panel/element-classification.ts +446 -0
- package/corpus/templates/design/app/components/design/edit-panel/element-identity.ts +79 -0
- package/corpus/templates/design/app/components/design/edit-panel/field-primitives.tsx +315 -0
- package/corpus/templates/design/app/components/design/edit-panel/fill-gradient-helpers.ts +344 -0
- package/corpus/templates/design/app/components/design/edit-panel/fill-properties.tsx +594 -0
- package/corpus/templates/design/app/components/design/edit-panel/frame-presets-panel.tsx +119 -0
- package/corpus/templates/design/app/components/design/edit-panel/inspector-controls.tsx +248 -0
- package/corpus/templates/design/app/components/design/edit-panel/interaction-state-helpers.ts +45 -0
- package/corpus/templates/design/app/components/design/edit-panel/layout-properties.tsx +693 -0
- package/corpus/templates/design/app/components/design/edit-panel/panel-primitives.tsx +724 -0
- package/corpus/templates/design/app/components/design/edit-panel/position-helpers.ts +207 -0
- package/corpus/templates/design/app/components/design/edit-panel/position-layout-properties.tsx +628 -0
- package/corpus/templates/design/app/components/design/edit-panel/selection-helpers.ts +91 -0
- package/corpus/templates/design/app/components/design/edit-panel/stroke-properties.tsx +649 -0
- package/corpus/templates/design/app/components/design/edit-panel/style-change-types.ts +118 -0
- package/corpus/templates/design/app/components/design/edit-panel/style-options.ts +88 -0
- package/corpus/templates/design/app/components/design/edit-panel/transform-helpers.ts +100 -0
- package/corpus/templates/design/app/components/design/edit-panel/typography-helpers.ts +117 -0
- package/corpus/templates/design/app/components/design/edit-panel/typography-properties.tsx +501 -0
- package/corpus/templates/design/app/components/design/inspector/AutoLayoutMatrix.tsx +91 -40
- package/corpus/templates/design/app/components/design/inspector/BreakpointOverrideIndicator.tsx +82 -0
- package/corpus/templates/design/app/components/design/inspector/DesignColorPicker.tsx +189 -87
- package/corpus/templates/design/app/components/design/inspector/GlslShaderPanel.tsx +1097 -0
- package/corpus/templates/design/app/components/design/inspector/GradientEditor.tsx +44 -0
- package/corpus/templates/design/app/components/design/inspector/InteractionStatePanel.tsx +258 -0
- package/corpus/templates/design/app/components/design/inspector/MotionKeyframeDiamond.tsx +144 -0
- package/corpus/templates/design/app/components/design/inspector/ScrubInput.tsx +99 -9
- package/corpus/templates/design/app/components/design/inspector/frame-size-presets.ts +116 -0
- package/corpus/templates/design/app/components/design/inspector/index.ts +26 -0
- package/corpus/templates/design/app/components/design/inspector/scrub-input-utils.ts +29 -0
- package/corpus/templates/design/app/components/design/multi-screen/alt-hover-measurement.ts +171 -0
- package/corpus/templates/design/app/components/design/multi-screen/board-surface-html.ts +220 -0
- package/corpus/templates/design/app/components/design/multi-screen/chrome-transitions.ts +35 -0
- package/corpus/templates/design/app/components/design/multi-screen/cross-screen-drop.ts +134 -0
- package/corpus/templates/design/app/components/design/multi-screen/culling.ts +185 -0
- package/corpus/templates/design/app/components/design/multi-screen/gradient-overlay-geometry.ts +120 -0
- package/corpus/templates/design/app/components/design/multi-screen/types.ts +892 -0
- package/corpus/templates/design/app/components/design/multi-screen/vector-edit-geometry.ts +21 -0
- package/corpus/templates/design/app/components/design/types.ts +15 -0
- package/corpus/templates/design/app/components/editor/PromptDialog.tsx +109 -5
- package/corpus/templates/design/app/global.css +8 -8
- package/corpus/templates/design/app/hooks/useDesignHotkeys.ts +259 -2
- package/corpus/templates/design/app/i18n/zh-TW.ts +163 -9
- package/corpus/templates/design/app/i18n-breakpoints.ts +205 -0
- package/corpus/templates/design/app/i18n-data.ts +1664 -152
- package/corpus/templates/design/app/i18n-motion.ts +563 -0
- package/corpus/templates/design/app/lib/design-import.ts +73 -0
- package/corpus/templates/design/app/pages/Index.tsx +41 -22
- package/corpus/templates/design/changelog/2026-06-29-design-inspector-controls-now-match-figmas-softer-dark-chrome.md +1 -1
- package/corpus/templates/design/changelog/2026-06-30-design-now-has-a-figma-style-left-rail-for-file-agent-assets.md +1 -1
- package/corpus/templates/design/changelog/2026-06-30-design-tools-now-use-a-quieter-figma-style-list-layout.md +1 -1
- package/corpus/templates/design/changelog/2026-06-30-multi-select-outlines-now-stay-consistent-across-all-screens.md +1 -1
- package/corpus/templates/design/changelog/2026-07-03-canvas-interactions-now-match-figma-rotation-aware-resizing-.md +1 -1
- package/corpus/templates/design/changelog/2026-07-03-layers-panel-matches-figma-top-layer-on-top-drag-with-auto-s.md +1 -1
- package/corpus/templates/design/changelog/2026-07-05-designs-get-ai-generated-names-from-your-prompt.md +6 -0
- package/corpus/templates/design/changelog/2026-07-05-local-code-screens-keep-their-connection-when-duplicated-and.md +6 -0
- package/corpus/templates/design/changelog/2026-07-05-press-a-to-draw-screens-on-the-canvas-inside-a-screen-it-dr.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-3d-rotation-and-perspective-controls-on-every-element.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-ai-generated-and-duplicated-screens-now-get-their-editor-sel.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-applying-shaders-and-fills-in-quick-succession-can-no-longer.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-breakpoint-frames-in-the-overview-now-support-click-to-selec.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-breakpoint-segments-in-the-inspector-now-show-a-device-icon-.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-breakpoint-targeting-now-lives-in-one-compact-control-in-the.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-canvas-edits-can-no-longer-be-overwritten-by-stale-collabora.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-canvas-edits-inside-screens-save-reliably-again.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-cleaner-inspector-removed-the-ask-ai-box-from-the-design-tab.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-clicking-empty-canvas-space-now-deselects-an-element-inside-.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-dragging-an-element-onto-a-rectangle-now-nests-it-inside-wit.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-dragging-screens-and-objects-on-the-canvas-is-now-much-smoot.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-drawing-a-shape-or-text-on-the-canvas-no-longer-flashes-away.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-dropping-an-element-between-two-others-inside-a-screen-now-s.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-duplicating-a-screen-now-places-the-copy-exactly-where-you-d.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-edit-gradients-directly-on-elements-inside-screens-scale-str.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-edits-from-collaborators-and-the-agent-now-update-the-canvas.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-fixed-a-bug-where-most-style-position-and-text-edits-briefly.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-fixed-a-confusing-raw-error-message-when-a-file-upload-fails.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-fixed-a-rare-case-where-an-edit-could-be-silently-overwritte.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-fixed-inserted-assets-sometimes-disappearing-reappearing-or-.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-fixed-inspector-value-scrubbing-producing-erratic-numbers-an.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-fixed-padding-gap-and-min-max-size-scrubbing-not-updating-th.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-fixed-text-stroke-color-turning-black-and-glyphs-disappearin.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-fixed-the-collapsed-effects-and-stroke-inspector-sections-sh.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-fixed-the-new-design-dialog-closing-unexpectedly-when-using-.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-fixed-the-typography-section-missing-when-selecting-text-nes.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-full-view-no-longer-flashes-back-to-the-overview-on-entry-no.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-keyframe-animation-timeline-per-property-keyframes-easing-cu.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-moving-restyling-and-scrubbing-values-on-elements-in-ai-gene.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-padding-and-corner-radius-value-scrubbing-now-snaps-to-whole.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-padding-handles-now-only-resize-on-the-handle-line-itself-sh.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-preview-and-edit-hover-focus-and-pressed-states-with-real-cs.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-promoting-an-element-to-a-component-now-works-correctly-for-.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-reduced-url-history-churn-and-selection-overlay-flicker-whil.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-removed-the-decorative-dot-before-screen-names-in-the-overvi.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-responsive-breakpoints-edit-at-any-width-with-cascading-over.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-screen-labels-no-longer-turn-blue-when-you-hover-inside-the-.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-scrolling-a-screen-with-an-element-selected-stays-smooth-on-.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-selecting-multiple-elements-and-dragging-now-moves-the-whole.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-selection-borders-handles-and-value-readouts-now-stay-the-sa.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-selection-handles-and-editing-chrome-now-stay-a-constant-siz.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-shader-fills-and-effects-ai-authored-or-preset-glsl-shaders-.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-text-drawn-on-the-canvas-now-defaults-to-white-and-inter-in-.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-text-dropped-into-a-shape-now-stays-readable-instead-of-disa.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-the-add-tweak-controls-prompt-no-longer-jumps-to-the-corner-.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-the-padding-value-readout-now-stays-visible-while-you-hover-.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-the-selected-element-attachment-now-clears-from-the-chat-com.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-the-zoom-menu-is-more-compact-with-tight-rows-and-right-alig.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-undo-and-redo-no-longer-flash-the-screen-changes-now-apply-i.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-zoom-presets-like-zoom-to-50-now-stay-on-the-focused-screen-.md +6 -0
- package/corpus/templates/design/server/lib/import-design-files.ts +11 -2
- package/corpus/templates/design/server/source-workspace.ts +139 -59
- package/corpus/templates/design/shared/board-file.ts +11 -2
- package/corpus/templates/design/shared/breakpoint-media.ts +543 -0
- package/corpus/templates/design/shared/canvas-math.ts +354 -35
- package/corpus/templates/design/shared/code-layer.ts +277 -8
- package/corpus/templates/design/shared/design-state.ts +11 -4
- package/corpus/templates/design/shared/interaction-states.ts +548 -0
- package/corpus/templates/design/shared/motion-compiler.ts +186 -23
- package/corpus/templates/design/shared/motion-easing.ts +294 -0
- package/corpus/templates/design/shared/motion-timeline.ts +400 -34
- package/corpus/templates/design/shared/prompt-title.ts +95 -0
- package/corpus/templates/design/shared/responsive-classes.ts +448 -10
- package/corpus/templates/design/shared/screen-annotation.ts +46 -0
- package/corpus/templates/design/shared/shader-fills.ts +1009 -0
- package/corpus/templates/design/shared/shader-presets.ts +852 -4
- package/corpus/templates/slides/app/components/editor/EditorToolbar.tsx +15 -2
- package/corpus/templates/slides/app/components/editor/ImportButton.tsx +10 -1
- package/corpus/templates/slides/app/lib/upload-response.ts +71 -0
- package/dist/client/AgentPanel.js +1 -1
- package/dist/client/AgentPanel.js.map +1 -1
- package/dist/client/rich-markdown-editor/useCollabReconcile.d.ts.map +1 -1
- package/dist/client/rich-markdown-editor/useCollabReconcile.js +11 -6
- package/dist/client/rich-markdown-editor/useCollabReconcile.js.map +1 -1
- package/dist/client/use-action.d.ts +3 -0
- package/dist/client/use-action.d.ts.map +1 -1
- package/dist/client/use-action.js +34 -3
- package/dist/client/use-action.js.map +1 -1
- package/dist/client/use-db-sync.d.ts +4 -0
- package/dist/client/use-db-sync.d.ts.map +1 -1
- package/dist/client/use-db-sync.js +37 -18
- package/dist/client/use-db-sync.js.map +1 -1
- package/dist/collab/routes.d.ts +1 -1
- package/dist/collab/struct-routes.d.ts +1 -1
- package/dist/db/create-get-db.d.ts +25 -0
- package/dist/db/create-get-db.d.ts.map +1 -1
- package/dist/db/create-get-db.js +25 -2
- package/dist/db/create-get-db.js.map +1 -1
- package/dist/observability/routes.d.ts +3 -3
- package/dist/secrets/routes.d.ts +9 -9
- package/dist/server/framework-request-handler.d.ts.map +1 -1
- package/dist/server/framework-request-handler.js +37 -1
- package/dist/server/framework-request-handler.js.map +1 -1
- package/package.json +1 -1
- package/corpus/templates/design/app/components/design/inspector/InspectorAiActions.tsx +0 -153
- package/corpus/templates/design/app/hooks/useAgentEditRequest.ts +0 -133
- package/corpus/templates/design/app/pages/DesignEditor.tsx +0 -22924
|
@@ -0,0 +1,403 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* BreakpointDeviceControl (§6.4, BP-DEEP v2) — the single, unified breakpoint
|
|
3
|
+
* targeting control for the design editor.
|
|
4
|
+
*
|
|
5
|
+
* History: breakpoint targeting used to be a floating "BreakpointBar" overlay
|
|
6
|
+
* above the canvas (and briefly a reserved chrome row above it). Both cost
|
|
7
|
+
* canvas space or covered the top of the screen being edited, and the editor
|
|
8
|
+
* ALSO had a separate device-preview dropdown in the right-inspector header —
|
|
9
|
+
* two similar-but-different width controls. BP-DEEP v2 folds all of that into
|
|
10
|
+
* this ONE segmented control that lives in the right-inspector header:
|
|
11
|
+
*
|
|
12
|
+
* [ Base ] [ 810 ] [ 390 ] [ + ]
|
|
13
|
+
*
|
|
14
|
+
* - Clicking a segment switches BOTH the editing viewport width (single-screen
|
|
15
|
+
* mode renders the iframe at that width, centered) AND the active edit
|
|
16
|
+
* scope: edits made while a narrower segment is active persist as
|
|
17
|
+
* width-scoped overrides that cascade down, while Base edits cascade to
|
|
18
|
+
* every breakpoint unless overridden.
|
|
19
|
+
* - Each breakpoint segment carries a "…" menu (shadcn DropdownMenu) with a
|
|
20
|
+
* width input (Enter commits) and a destructive "Remove breakpoint" item —
|
|
21
|
+
* replaces the old dead hover-"X".
|
|
22
|
+
* - "+" offers Framer's default widths (Desktop 1200 / Tablet 810 / Phone
|
|
23
|
+
* 390) or a custom width, plus the overview "show all breakpoints" toggle.
|
|
24
|
+
*
|
|
25
|
+
* The overview canvas keeps its own frame-attached labels (see
|
|
26
|
+
* BreakpointPreviewRow in MultiScreenCanvas) — this control is the only other
|
|
27
|
+
* breakpoint surface.
|
|
28
|
+
*/
|
|
29
|
+
|
|
30
|
+
import { useT } from "@agent-native/core/client";
|
|
31
|
+
import {
|
|
32
|
+
IconDeviceDesktop,
|
|
33
|
+
IconDeviceMobile,
|
|
34
|
+
IconDeviceTablet,
|
|
35
|
+
IconDots,
|
|
36
|
+
IconPlus,
|
|
37
|
+
IconViewportWide,
|
|
38
|
+
} from "@tabler/icons-react";
|
|
39
|
+
import { useState } from "react";
|
|
40
|
+
|
|
41
|
+
import { Button } from "@/components/ui/button";
|
|
42
|
+
import {
|
|
43
|
+
DropdownMenu,
|
|
44
|
+
DropdownMenuContent,
|
|
45
|
+
DropdownMenuItem,
|
|
46
|
+
DropdownMenuSeparator,
|
|
47
|
+
DropdownMenuTrigger,
|
|
48
|
+
} from "@/components/ui/dropdown-menu";
|
|
49
|
+
import { Input } from "@/components/ui/input";
|
|
50
|
+
import {
|
|
51
|
+
Popover,
|
|
52
|
+
PopoverContent,
|
|
53
|
+
PopoverTrigger,
|
|
54
|
+
} from "@/components/ui/popover";
|
|
55
|
+
import { Switch } from "@/components/ui/switch";
|
|
56
|
+
import { cn } from "@/lib/utils";
|
|
57
|
+
|
|
58
|
+
/** Framer's default breakpoint widths, offered by the "+" affordance. */
|
|
59
|
+
export const FRAMER_BREAKPOINT_PRESETS: ReadonlyArray<{
|
|
60
|
+
labelKey: "desktop" | "tablet" | "phone";
|
|
61
|
+
widthPx: number;
|
|
62
|
+
}> = [
|
|
63
|
+
{ labelKey: "desktop", widthPx: 1200 },
|
|
64
|
+
{ labelKey: "tablet", widthPx: 810 },
|
|
65
|
+
{ labelKey: "phone", widthPx: 390 },
|
|
66
|
+
];
|
|
67
|
+
|
|
68
|
+
/** Presets not already present in the breakpoint set (by exact width). */
|
|
69
|
+
export function availableBreakpointPresets(
|
|
70
|
+
existingWidths: readonly number[],
|
|
71
|
+
): Array<{ labelKey: "desktop" | "tablet" | "phone"; widthPx: number }> {
|
|
72
|
+
return FRAMER_BREAKPOINT_PRESETS.filter(
|
|
73
|
+
(preset) => !existingWidths.includes(preset.widthPx),
|
|
74
|
+
);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/** Default English label for a preset/custom width (used for add-breakpoint). */
|
|
78
|
+
export function breakpointLabelForWidth(widthPx: number): string {
|
|
79
|
+
if (widthPx >= 1024) return "Desktop";
|
|
80
|
+
if (widthPx >= 600) return "Tablet";
|
|
81
|
+
return "Phone";
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Validate a raw width-input string for the add/change-width flows. Returns
|
|
86
|
+
* the parsed integer width when acceptable, or null for non-numeric or
|
|
87
|
+
* out-of-range input, or a width already taken by another breakpoint.
|
|
88
|
+
* Pure/exported for unit tests.
|
|
89
|
+
*/
|
|
90
|
+
export function parseBreakpointWidthInput(
|
|
91
|
+
raw: string,
|
|
92
|
+
existingWidths: readonly number[],
|
|
93
|
+
): number | null {
|
|
94
|
+
const widthPx = Number.parseInt(raw, 10);
|
|
95
|
+
if (!Number.isFinite(widthPx) || widthPx < 320 || widthPx > 3840) return null;
|
|
96
|
+
if (existingWidths.includes(widthPx)) return null;
|
|
97
|
+
return widthPx;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
function DeviceIcon({ widthPx }: { widthPx: number }) {
|
|
101
|
+
if (widthPx >= 1024) return <IconDeviceDesktop className="size-3" />;
|
|
102
|
+
if (widthPx >= 600) return <IconDeviceTablet className="size-3" />;
|
|
103
|
+
return <IconDeviceMobile className="size-3" />;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
export interface BreakpointBarBreakpoint {
|
|
107
|
+
id: string;
|
|
108
|
+
label: string;
|
|
109
|
+
widthPx: number;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
export interface BreakpointDeviceControlProps {
|
|
113
|
+
/** The design's breakpoint definitions (any order — sorted internally). */
|
|
114
|
+
breakpoints: BreakpointBarBreakpoint[];
|
|
115
|
+
/** Active breakpoint frame width; undefined = base frame active. */
|
|
116
|
+
activeWidthPx?: number;
|
|
117
|
+
/** The primary frame's width, shown in the Base tooltip when known. */
|
|
118
|
+
baseWidthPx?: number | null;
|
|
119
|
+
/** Gates add/remove/change affordances; selection is allowed read-only. */
|
|
120
|
+
canEdit: boolean;
|
|
121
|
+
/** Linked side-by-side frames toggle (overview). Hidden when undefined. */
|
|
122
|
+
showAllFrames?: boolean;
|
|
123
|
+
onShowAllFramesChange?: (value: boolean) => void;
|
|
124
|
+
/** Segment click: switch viewport + edit scope. undefined = base. */
|
|
125
|
+
onSelect: (widthPx: number | undefined) => void;
|
|
126
|
+
/** "+" affordance: add a breakpoint at a preset or custom width. */
|
|
127
|
+
onAdd?: (widthPx: number, label: string) => void;
|
|
128
|
+
/** "…" menu: remove a breakpoint. */
|
|
129
|
+
onRemove?: (breakpointId: string) => void;
|
|
130
|
+
/** "…" menu: change a breakpoint's width (Enter in the width input). */
|
|
131
|
+
onChangeWidth?: (breakpointId: string, widthPx: number) => void;
|
|
132
|
+
className?: string;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
export function BreakpointDeviceControl({
|
|
136
|
+
breakpoints,
|
|
137
|
+
activeWidthPx,
|
|
138
|
+
baseWidthPx,
|
|
139
|
+
canEdit,
|
|
140
|
+
showAllFrames,
|
|
141
|
+
onShowAllFramesChange,
|
|
142
|
+
onSelect,
|
|
143
|
+
onAdd,
|
|
144
|
+
onRemove,
|
|
145
|
+
onChangeWidth,
|
|
146
|
+
className,
|
|
147
|
+
}: BreakpointDeviceControlProps) {
|
|
148
|
+
const t = useT();
|
|
149
|
+
const [addOpen, setAddOpen] = useState(false);
|
|
150
|
+
const [customWidth, setCustomWidth] = useState("");
|
|
151
|
+
/** Which breakpoint's "…" menu is open (id), if any. */
|
|
152
|
+
const [menuOpenFor, setMenuOpenFor] = useState<string | null>(null);
|
|
153
|
+
/** Draft value of the width input inside the open "…" menu. */
|
|
154
|
+
const [widthDraft, setWidthDraft] = useState("");
|
|
155
|
+
|
|
156
|
+
// Framer order: widest first (base segment, then breakpoints desc).
|
|
157
|
+
const ordered = [...breakpoints].sort((a, b) => b.widthPx - a.widthPx);
|
|
158
|
+
const existingWidths = ordered.map((bp) => bp.widthPx);
|
|
159
|
+
const presets = availableBreakpointPresets(existingWidths);
|
|
160
|
+
const baseActive = activeWidthPx === undefined;
|
|
161
|
+
|
|
162
|
+
const submitCustomWidth = () => {
|
|
163
|
+
const widthPx = parseBreakpointWidthInput(customWidth, existingWidths);
|
|
164
|
+
setAddOpen(false);
|
|
165
|
+
setCustomWidth("");
|
|
166
|
+
if (widthPx === null) return;
|
|
167
|
+
onAdd?.(widthPx, breakpointLabelForWidth(widthPx));
|
|
168
|
+
};
|
|
169
|
+
|
|
170
|
+
const segmentClass = (active: boolean) =>
|
|
171
|
+
cn(
|
|
172
|
+
"flex h-6 cursor-pointer select-none items-center gap-1 rounded-[5px] px-1.5 font-medium !text-[11px] tabular-nums",
|
|
173
|
+
active
|
|
174
|
+
? "bg-background text-[var(--design-editor-accent-color)] shadow-sm"
|
|
175
|
+
: "text-muted-foreground hover:text-foreground",
|
|
176
|
+
);
|
|
177
|
+
|
|
178
|
+
return (
|
|
179
|
+
<div
|
|
180
|
+
data-breakpoint-device-control
|
|
181
|
+
className={cn(
|
|
182
|
+
"flex shrink-0 items-center gap-0.5 rounded-md bg-[var(--design-editor-control-bg)] p-0.5",
|
|
183
|
+
className,
|
|
184
|
+
)}
|
|
185
|
+
>
|
|
186
|
+
{/* Base segment — the primary/widest editing context. Icon-only with
|
|
187
|
+
the label in the tooltip: this control shares one cramped
|
|
188
|
+
inspector-header row with the collaborators menu and play/share
|
|
189
|
+
actions (~300px total), so every segment stays as narrow as it
|
|
190
|
+
can. */}
|
|
191
|
+
<button
|
|
192
|
+
type="button"
|
|
193
|
+
className={segmentClass(baseActive)}
|
|
194
|
+
aria-pressed={baseActive}
|
|
195
|
+
aria-label={t("designEditor.breakpointBar.base")}
|
|
196
|
+
onClick={() => onSelect(undefined)}
|
|
197
|
+
title={
|
|
198
|
+
baseWidthPx != null
|
|
199
|
+
? `${t("designEditor.breakpointBar.base")} · ${Math.round(baseWidthPx)}px`
|
|
200
|
+
: t("designEditor.breakpointBar.base")
|
|
201
|
+
}
|
|
202
|
+
>
|
|
203
|
+
<IconViewportWide className="size-3.5" />
|
|
204
|
+
</button>
|
|
205
|
+
|
|
206
|
+
{/* One segment per breakpoint, widest → narrowest. Clicking always
|
|
207
|
+
SELECTS (never toggles off) — returning to Base is the Base
|
|
208
|
+
segment, clicking the base frame/empty canvas, or Escape (the
|
|
209
|
+
Framer click-to-target model). */}
|
|
210
|
+
{ordered.map((breakpoint) => {
|
|
211
|
+
const active = activeWidthPx === breakpoint.widthPx;
|
|
212
|
+
const menuOpen = menuOpenFor === breakpoint.id;
|
|
213
|
+
const showMenuAffordance = Boolean(
|
|
214
|
+
canEdit && (onRemove || onChangeWidth) && (active || menuOpen),
|
|
215
|
+
);
|
|
216
|
+
return (
|
|
217
|
+
<div key={breakpoint.id} className="relative flex items-center">
|
|
218
|
+
<button
|
|
219
|
+
type="button"
|
|
220
|
+
className={segmentClass(active)}
|
|
221
|
+
aria-pressed={active}
|
|
222
|
+
onClick={() => onSelect(breakpoint.widthPx)}
|
|
223
|
+
title={`${breakpoint.label} · ${breakpoint.widthPx}px`}
|
|
224
|
+
>
|
|
225
|
+
{/* ITEM 8a — device icon (by width bucket) + width number.
|
|
226
|
+
Kept compact (size-3, one notch smaller than Base's
|
|
227
|
+
size-3.5) so the segment still fits this ~300px
|
|
228
|
+
inspector-header row next to play/share; the full label
|
|
229
|
+
stays in the tooltip. */}
|
|
230
|
+
<DeviceIcon widthPx={breakpoint.widthPx} />
|
|
231
|
+
<span>{breakpoint.widthPx}</span>
|
|
232
|
+
</button>
|
|
233
|
+
{/* "…" — per-breakpoint options (Change width / Remove). Shown
|
|
234
|
+
for the ACTIVE segment (and while its menu is open) so idle
|
|
235
|
+
segments stay clean; replaces the old hover-"X" that both
|
|
236
|
+
shifted layout and, being buried in a floating bar, was easy
|
|
237
|
+
to miss entirely. */}
|
|
238
|
+
{showMenuAffordance ? (
|
|
239
|
+
<DropdownMenu
|
|
240
|
+
open={menuOpen}
|
|
241
|
+
onOpenChange={(open) => {
|
|
242
|
+
setMenuOpenFor(open ? breakpoint.id : null);
|
|
243
|
+
setWidthDraft(open ? String(breakpoint.widthPx) : "");
|
|
244
|
+
}}
|
|
245
|
+
>
|
|
246
|
+
<DropdownMenuTrigger asChild>
|
|
247
|
+
<button
|
|
248
|
+
type="button"
|
|
249
|
+
aria-label={t("designEditor.breakpointBar.options")}
|
|
250
|
+
className="flex h-6 w-4 shrink-0 cursor-pointer items-center justify-center rounded-[5px] text-muted-foreground hover:text-foreground"
|
|
251
|
+
onClick={(event) => event.stopPropagation()}
|
|
252
|
+
>
|
|
253
|
+
<IconDots className="size-3" />
|
|
254
|
+
</button>
|
|
255
|
+
</DropdownMenuTrigger>
|
|
256
|
+
<DropdownMenuContent
|
|
257
|
+
align="end"
|
|
258
|
+
className="design-editor-app-menu-content w-52 rounded-lg bg-[var(--design-editor-panel-bg)] p-1"
|
|
259
|
+
>
|
|
260
|
+
{/* Change width — inline input row; Enter commits.
|
|
261
|
+
Key events stay local (stopPropagation) so the menu's
|
|
262
|
+
typeahead/arrow navigation doesn't steal keystrokes
|
|
263
|
+
from the input. */}
|
|
264
|
+
{onChangeWidth ? (
|
|
265
|
+
<div className="flex items-center gap-1.5 px-1.5 py-1">
|
|
266
|
+
<span className="shrink-0 !text-[11px] text-muted-foreground">
|
|
267
|
+
{t("designEditor.breakpointBar.changeWidth")}
|
|
268
|
+
</span>
|
|
269
|
+
<Input
|
|
270
|
+
type="number"
|
|
271
|
+
min={320}
|
|
272
|
+
max={3840}
|
|
273
|
+
value={widthDraft}
|
|
274
|
+
autoFocus
|
|
275
|
+
onChange={(event) => setWidthDraft(event.target.value)}
|
|
276
|
+
onKeyDown={(event) => {
|
|
277
|
+
event.stopPropagation();
|
|
278
|
+
if (event.key !== "Enter") return;
|
|
279
|
+
event.preventDefault();
|
|
280
|
+
const widthPx = parseBreakpointWidthInput(
|
|
281
|
+
widthDraft,
|
|
282
|
+
existingWidths.filter(
|
|
283
|
+
(width) => width !== breakpoint.widthPx,
|
|
284
|
+
),
|
|
285
|
+
);
|
|
286
|
+
setMenuOpenFor(null);
|
|
287
|
+
if (
|
|
288
|
+
widthPx !== null &&
|
|
289
|
+
widthPx !== breakpoint.widthPx
|
|
290
|
+
) {
|
|
291
|
+
onChangeWidth(breakpoint.id, widthPx);
|
|
292
|
+
}
|
|
293
|
+
}}
|
|
294
|
+
className="h-6 px-1.5 !text-[11px] tabular-nums"
|
|
295
|
+
aria-label={t("designEditor.breakpointBar.changeWidth")}
|
|
296
|
+
/>
|
|
297
|
+
</div>
|
|
298
|
+
) : null}
|
|
299
|
+
{onChangeWidth && onRemove ? <DropdownMenuSeparator /> : null}
|
|
300
|
+
{onRemove ? (
|
|
301
|
+
<DropdownMenuItem
|
|
302
|
+
className="h-7 px-2 py-0 !text-[12px] text-destructive focus:text-destructive"
|
|
303
|
+
onSelect={() => {
|
|
304
|
+
setMenuOpenFor(null);
|
|
305
|
+
onRemove(breakpoint.id);
|
|
306
|
+
}}
|
|
307
|
+
>
|
|
308
|
+
{t("designEditor.breakpointBar.remove")}
|
|
309
|
+
</DropdownMenuItem>
|
|
310
|
+
) : null}
|
|
311
|
+
</DropdownMenuContent>
|
|
312
|
+
</DropdownMenu>
|
|
313
|
+
) : null}
|
|
314
|
+
</div>
|
|
315
|
+
);
|
|
316
|
+
})}
|
|
317
|
+
|
|
318
|
+
{/* "+" — Framer default widths or a custom width. */}
|
|
319
|
+
{canEdit && onAdd ? (
|
|
320
|
+
<Popover open={addOpen} onOpenChange={setAddOpen}>
|
|
321
|
+
<PopoverTrigger asChild>
|
|
322
|
+
<Button
|
|
323
|
+
variant="ghost"
|
|
324
|
+
size="icon"
|
|
325
|
+
className="size-6 cursor-pointer rounded-[5px] text-muted-foreground hover:text-foreground"
|
|
326
|
+
title={t("designEditor.breakpointBar.addBreakpoint")}
|
|
327
|
+
>
|
|
328
|
+
<IconPlus className="size-3.5" />
|
|
329
|
+
</Button>
|
|
330
|
+
</PopoverTrigger>
|
|
331
|
+
<PopoverContent align="end" className="w-52 p-1">
|
|
332
|
+
<div className="flex flex-col">
|
|
333
|
+
{presets.map((preset) => (
|
|
334
|
+
<button
|
|
335
|
+
key={preset.widthPx}
|
|
336
|
+
type="button"
|
|
337
|
+
className="flex cursor-pointer items-center justify-between rounded-md px-2 py-1.5 text-left !text-[12px] hover:bg-muted"
|
|
338
|
+
onClick={() => {
|
|
339
|
+
onAdd(
|
|
340
|
+
preset.widthPx,
|
|
341
|
+
t(`designEditor.breakpointBar.${preset.labelKey}`),
|
|
342
|
+
);
|
|
343
|
+
setAddOpen(false);
|
|
344
|
+
}}
|
|
345
|
+
>
|
|
346
|
+
<span className="flex items-center gap-2">
|
|
347
|
+
<DeviceIcon widthPx={preset.widthPx} />
|
|
348
|
+
{t(`designEditor.breakpointBar.${preset.labelKey}`)}
|
|
349
|
+
</span>
|
|
350
|
+
<span className="tabular-nums text-muted-foreground/60">
|
|
351
|
+
{preset.widthPx}
|
|
352
|
+
</span>
|
|
353
|
+
</button>
|
|
354
|
+
))}
|
|
355
|
+
{presets.length > 0 ? (
|
|
356
|
+
<div className="my-1 h-px bg-border" />
|
|
357
|
+
) : null}
|
|
358
|
+
<form
|
|
359
|
+
className="flex items-center gap-1 px-1 py-0.5"
|
|
360
|
+
onSubmit={(event) => {
|
|
361
|
+
event.preventDefault();
|
|
362
|
+
submitCustomWidth();
|
|
363
|
+
}}
|
|
364
|
+
>
|
|
365
|
+
<Input
|
|
366
|
+
type="number"
|
|
367
|
+
min={320}
|
|
368
|
+
max={3840}
|
|
369
|
+
value={customWidth}
|
|
370
|
+
onChange={(event) => setCustomWidth(event.target.value)}
|
|
371
|
+
placeholder={t("designEditor.breakpointBar.customWidth")}
|
|
372
|
+
className="h-7 !text-[12px]"
|
|
373
|
+
/>
|
|
374
|
+
<Button
|
|
375
|
+
type="submit"
|
|
376
|
+
size="sm"
|
|
377
|
+
variant="outline"
|
|
378
|
+
className="h-7 cursor-pointer px-2 !text-[11px]"
|
|
379
|
+
>
|
|
380
|
+
{t("designEditor.breakpointBar.add")}
|
|
381
|
+
</Button>
|
|
382
|
+
</form>
|
|
383
|
+
{onShowAllFramesChange !== undefined ? (
|
|
384
|
+
<>
|
|
385
|
+
<div className="my-1 h-px bg-border" />
|
|
386
|
+
<label className="flex cursor-pointer items-center justify-between rounded-md px-2 py-1.5 !text-[12px] hover:bg-muted">
|
|
387
|
+
<span>
|
|
388
|
+
{t("designEditor.breakpointBar.showAllBreakpoints")}
|
|
389
|
+
</span>
|
|
390
|
+
<Switch
|
|
391
|
+
checked={showAllFrames ?? true}
|
|
392
|
+
onCheckedChange={onShowAllFramesChange}
|
|
393
|
+
/>
|
|
394
|
+
</label>
|
|
395
|
+
</>
|
|
396
|
+
) : null}
|
|
397
|
+
</div>
|
|
398
|
+
</PopoverContent>
|
|
399
|
+
</Popover>
|
|
400
|
+
) : null}
|
|
401
|
+
</div>
|
|
402
|
+
);
|
|
403
|
+
}
|