@agent-native/core 0.165.4 → 0.167.1
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/templates/analytics/.agents/skills/secrets/SKILL.md +5 -1
- package/corpus/templates/analytics/.agents/skills/workspace-conventions/SKILL.md +4 -1
- package/corpus/templates/analytics/app/components/layout/Sidebar.tsx +93 -56
- package/corpus/templates/analytics/app/i18n-data.ts +23 -20
- package/corpus/templates/analytics/app/pages/Settings.tsx +0 -1
- package/corpus/templates/analytics/app/pages/adhoc/explorer/index.tsx +0 -1
- package/corpus/templates/analytics/app/pages/adhoc/explorer-dashboard/index.tsx +1 -1
- package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/SqlChartCard.tsx +2 -1
- package/corpus/templates/analytics/app/pages/sessions/SessionsPage.tsx +0 -1
- package/corpus/templates/analytics/server/lib/first-party-analytics-backend.ts +0 -32
- package/corpus/templates/analytics/server/lib/session-replay.ts +1 -5
- package/corpus/templates/assets/.agents/skills/secrets/SKILL.md +5 -1
- package/corpus/templates/assets/.agents/skills/workspace-conventions/SKILL.md +4 -1
- package/corpus/templates/assets/actions/navigate.ts +2 -2
- package/corpus/templates/assets/actions/save-generated-image.ts +0 -5
- package/corpus/templates/assets/app/routes/brand-kits.$id.tsx +2 -262
- package/corpus/templates/assets/app/routes/library.tsx +1 -1
- package/corpus/templates/assets/app/routes/settings.tsx +0 -3
- package/corpus/templates/brain/.agents/skills/secrets/SKILL.md +5 -1
- package/corpus/templates/brain/.agents/skills/workspace-conventions/SKILL.md +4 -1
- package/corpus/templates/brain/actions/ask-brain.ts +0 -1
- package/corpus/templates/brain/actions/navigate.ts +2 -2
- package/corpus/templates/brain/app/routes/sources.tsx +0 -4
- package/corpus/templates/brain/server/lib/capture-sanitization.ts +0 -11
- package/corpus/templates/calendar/.agents/skills/secrets/SKILL.md +5 -1
- package/corpus/templates/calendar/.agents/skills/workspace-conventions/SKILL.md +4 -1
- package/corpus/templates/calendar/app/components/calendar/EventDetailPopover.tsx +0 -20
- package/corpus/templates/calendar/app/pages/CalendarView.tsx +0 -1
- package/corpus/templates/chat/.agents/skills/secrets/SKILL.md +5 -1
- package/corpus/templates/chat/.agents/skills/workspace-conventions/SKILL.md +4 -1
- package/corpus/templates/chat/actions/navigate.ts +2 -2
- package/corpus/templates/clips/.agents/skills/secrets/SKILL.md +5 -1
- package/corpus/templates/clips/.agents/skills/workspace-conventions/SKILL.md +4 -1
- package/corpus/templates/clips/CHANGELOG.md +2 -0
- package/corpus/templates/clips/actions/import-loom-recording.ts +16 -4
- package/corpus/templates/clips/actions/navigate.ts +2 -2
- package/corpus/templates/clips/app/components/editor/stitch-manager.tsx +0 -1
- package/corpus/templates/clips/app/components/library/space-dialogs.tsx +0 -1
- package/corpus/templates/clips/app/components/meetings/share-meeting-dialog.tsx +0 -1
- package/corpus/templates/clips/app/components/player/clips-share-trigger.tsx +17 -0
- package/corpus/templates/clips/app/components/player/delete-recording-menu.tsx +3 -3
- package/corpus/templates/clips/app/components/player/video-player.tsx +2 -2
- package/corpus/templates/clips/app/components/recorder/recorder-engine.ts +0 -1
- package/corpus/templates/clips/app/components/settings/ai-setup-section.tsx +0 -1
- package/corpus/templates/clips/app/global.css +31 -0
- package/corpus/templates/clips/app/hooks/use-playback-position.ts +0 -2
- package/corpus/templates/clips/app/lib/download-release-channel.ts +10 -0
- package/corpus/templates/clips/app/routes/_app.meetings.$meetingId.tsx +1 -3
- package/corpus/templates/clips/app/routes/download.tsx +67 -44
- package/corpus/templates/clips/app/routes/r.$recordingId.tsx +7 -12
- package/corpus/templates/clips/app/routes/record.tsx +6 -6
- package/corpus/templates/clips/app/routes/share.$shareId.tsx +26 -29
- package/corpus/templates/clips/changelog/2026-08-20-clip-viewer-share-actions.md +6 -0
- package/corpus/templates/clips/changelog/2026-08-20-preparing-recording-countdown-overlay.md +1 -0
- package/corpus/templates/clips/chrome-extension/src/background.ts +0 -13
- package/corpus/templates/clips/chrome-extension/src/overlay.ts +0 -1
- package/corpus/templates/clips/chrome-extension/src/popup.ts +0 -20
- package/corpus/templates/clips/desktop/src/app.tsx +6 -18
- package/corpus/templates/clips/desktop/src/hooks/useMediaDevices.ts +0 -1
- package/corpus/templates/clips/desktop/src/lib/recorder.ts +0 -8
- package/corpus/templates/content/.agents/skills/secrets/SKILL.md +5 -1
- package/corpus/templates/content/.agents/skills/workspace-conventions/SKILL.md +4 -1
- package/corpus/templates/content/actions/_database-source-utils.ts +0 -3
- package/corpus/templates/content/actions/attach-content-database-source.ts +1 -4
- package/corpus/templates/content/actions/navigate.ts +2 -2
- package/corpus/templates/content/actions/prepare-builder-source-execution.ts +1 -1
- package/corpus/templates/content/app/components/editor/DocumentProperties.tsx +0 -6
- package/corpus/templates/content/app/components/editor/database/DatabaseView.tsx +0 -580
- package/corpus/templates/content/app/components/editor/database/FormView.tsx +2 -2
- package/corpus/templates/content/app/components/editor/database/filter-sort.ts +1 -1
- package/corpus/templates/content/app/components/editor/database/settings.tsx +0 -23
- package/corpus/templates/content/app/components/editor/database/sidebar.tsx +0 -1
- package/corpus/templates/content/app/components/sidebar/DocumentSidebar.tsx +8 -304
- package/corpus/templates/content/app/hooks/use-documents.ts +0 -1
- package/corpus/templates/content/shared/api.ts +0 -1
- package/corpus/templates/content/shared/builder-mdx.ts +0 -1
- package/corpus/templates/content/shared/nfm.ts +1 -7
- package/corpus/templates/crm/.agents/skills/secrets/SKILL.md +5 -1
- package/corpus/templates/crm/.agents/skills/workspace-conventions/SKILL.md +4 -1
- package/corpus/templates/crm/actions/merge-crm-records.ts +0 -4
- package/corpus/templates/crm/app/components/crm/record/RecordLists.tsx +0 -1
- package/corpus/templates/crm/server/crm/hubspot-adapter.ts +0 -1
- package/corpus/templates/crm/server/crm/salesforce-adapter.ts +0 -1
- package/corpus/templates/crm/server/db/crm-store.ts +1 -1
- package/corpus/templates/design/.agents/skills/secrets/SKILL.md +5 -1
- package/corpus/templates/design/.agents/skills/workspace-conventions/SKILL.md +4 -1
- package/corpus/templates/design/.generated/bridge/editor-chrome.generated.ts +1 -14
- package/corpus/templates/design/AGENTS.md +2 -1
- package/corpus/templates/design/actions/apply-component-prop-edit.ts +1 -5
- package/corpus/templates/design/actions/generate-design.ts +0 -1
- package/corpus/templates/design/actions/generate-screens.ts +5 -2
- package/corpus/templates/design/actions/go-to-main-component.ts +2 -2
- package/corpus/templates/design/actions/list-design-systems.ts +10 -0
- package/corpus/templates/design/actions/navigate.ts +2 -2
- package/corpus/templates/design/actions/open-component-source.ts +4 -4
- package/corpus/templates/design/actions/present-design-variants.ts +1 -2
- package/corpus/templates/design/actions/run-design-audit.ts +0 -22
- package/corpus/templates/design/actions/show-design-questions.ts +5 -2
- package/corpus/templates/design/app/components/design/DesignCanvas.tsx +19 -8
- package/corpus/templates/design/app/components/design/EditPanel.tsx +11 -183
- package/corpus/templates/design/app/components/design/MultiScreenCanvas.tsx +21 -4
- package/corpus/templates/design/app/components/design/QuestionFlow.tsx +1 -5
- package/corpus/templates/design/app/components/design/bridge/codegen.ts +1 -1
- package/corpus/templates/design/app/components/design/bridge/editor-chrome.bridge.ts +10 -19
- package/corpus/templates/design/app/components/design/edit-panel/appearance-properties.tsx +1 -1
- package/corpus/templates/design/app/components/design/edit-panel/layout-properties.tsx +13 -3
- package/corpus/templates/design/app/components/design/edit-panel/panel-primitives.tsx +38 -32
- package/corpus/templates/design/app/components/design/edit-panel/position-layout-properties.tsx +1 -4
- package/corpus/templates/design/app/components/design/inspector/AlignmentMatrix.tsx +0 -4
- package/corpus/templates/design/app/components/design/inspector/AutoLayoutMatrix.tsx +15 -6
- package/corpus/templates/design/app/components/design/inspector/DesignColorPicker.tsx +2 -2
- package/corpus/templates/design/app/components/visual-editor/NodeRewriteProposal.tsx +0 -1
- package/corpus/templates/design/app/components/visual-editor/ReviewCanvasPins.tsx +1 -1
- package/corpus/templates/design/app/i18n-data.ts +122 -0
- package/corpus/templates/design/app/lib/clipboard-content-lineage.ts +11 -1
- package/corpus/templates/design/app/pages/DesignEditor.tsx +50 -254
- package/corpus/templates/design/app/pages/DesignSystemSetup.tsx +163 -8
- package/corpus/templates/design/app/pages/Index.tsx +17 -0
- package/corpus/templates/design/app/pages/design-editor/canvas-primitive-insert.ts +44 -32
- package/corpus/templates/design/app/pages/design-editor/canvas-primitives.ts +10 -0
- package/corpus/templates/design/app/pages/design-editor/clone-and-pen-edit.ts +49 -3
- package/corpus/templates/design/app/pages/design-editor/clone-idrefs.ts +31 -0
- package/corpus/templates/design/app/pages/design-editor/code-layer-state.ts +28 -0
- package/corpus/templates/design/app/pages/design-editor/commands/add-auto-layout.ts +3 -3
- package/corpus/templates/design/app/pages/design-editor/commands/align-selection.ts +44 -14
- package/corpus/templates/design/app/pages/design-editor/commands/apply-local-content-update.ts +16 -5
- package/corpus/templates/design/app/pages/design-editor/commands/change-selected-z-index.ts +1 -1
- package/corpus/templates/design/app/pages/design-editor/commands/frame-selection.ts +1 -1
- package/corpus/templates/design/app/pages/design-editor/commands/group-selection.ts +1 -1
- package/corpus/templates/design/app/pages/design-editor/commands/nudge-selection.ts +1 -1
- package/corpus/templates/design/app/pages/design-editor/commands/paste-selection.ts +142 -17
- package/corpus/templates/design/app/pages/design-editor/commands/screen-visual-duplicate-change.ts +1 -0
- package/corpus/templates/design/app/pages/design-editor/commands/ungroup-selection.ts +1 -1
- package/corpus/templates/design/app/pages/design-editor/commands/visual-duplicate-change.ts +1 -0
- package/corpus/templates/design/app/pages/design-editor/cross-screen-text-color.ts +25 -9
- package/corpus/templates/design/app/pages/design-editor/editor-state.ts +1 -0
- package/corpus/templates/design/app/pages/design-editor/measure-child-rects.ts +83 -0
- package/corpus/templates/design/app/pages/design-editor/paste-placement.ts +66 -0
- package/corpus/templates/design/server/routes/[...page].get.ts +0 -1
- package/corpus/templates/design/shared/code-layer.ts +120 -70
- package/corpus/templates/design/shared/design-surface-index.ts +0 -1
- package/corpus/templates/design/shared/pen-path.ts +0 -4
- package/corpus/templates/dispatch/.agents/skills/secrets/SKILL.md +5 -1
- package/corpus/templates/dispatch/.agents/skills/workspace-conventions/SKILL.md +4 -1
- package/corpus/templates/dispatch/app/routes/integrations.tsx +0 -109
- package/corpus/templates/factory/.agents/skills/secrets/SKILL.md +5 -1
- package/corpus/templates/factory/.agents/skills/workspace-conventions/SKILL.md +4 -1
- package/corpus/templates/factory/actions/navigate.ts +2 -2
- package/corpus/templates/factory/app/components/factory/FactoryAuditView.tsx +0 -13
- package/corpus/templates/factory/app/routes/factory.tsx +0 -1
- package/corpus/templates/factory/server/factory-graph/store.ts +0 -1
- package/corpus/templates/forms/.agents/skills/secrets/SKILL.md +5 -1
- package/corpus/templates/forms/.agents/skills/workspace-conventions/SKILL.md +4 -1
- package/corpus/templates/macros/.agents/skills/secrets/SKILL.md +5 -1
- package/corpus/templates/macros/.agents/skills/workspace-conventions/SKILL.md +4 -1
- package/corpus/templates/macros/app/components/layout/AppLayout.tsx +0 -1
- package/corpus/templates/mail/.agents/skills/secrets/SKILL.md +5 -1
- package/corpus/templates/mail/.agents/skills/workspace-conventions/SKILL.md +4 -1
- package/corpus/templates/mail/app/components/email/EmailList.tsx +0 -1
- package/corpus/templates/mail/app/components/layout/AppLayout.tsx +2 -2
- package/corpus/templates/mail/shared/markdown.ts +3 -0
- package/corpus/templates/plan/.agents/skills/secrets/SKILL.md +5 -1
- package/corpus/templates/plan/.agents/skills/workspace-conventions/SKILL.md +4 -1
- package/corpus/templates/slides/.agents/skills/secrets/SKILL.md +5 -1
- package/corpus/templates/slides/.agents/skills/workspace-conventions/SKILL.md +4 -1
- package/corpus/templates/slides/actions/add-slide.ts +0 -1
- package/corpus/templates/slides/actions/list-decks.ts +1 -1
- package/corpus/templates/slides/app/components/editor/EditorSidebar.tsx +1 -4
- package/corpus/templates/slides/app/components/editor/SlideContextToolbar.tsx +0 -1
- package/corpus/templates/slides/app/components/editor/SlideEditor.tsx +1 -1
- package/corpus/templates/slides/app/pages/DeckEditor.tsx +1 -6
- package/corpus/templates/tasks/.agents/skills/secrets/SKILL.md +5 -1
- package/corpus/templates/tasks/.agents/skills/workspace-conventions/SKILL.md +4 -1
- package/corpus/templates/tasks/app/components/layout/Layout.tsx +0 -1
- package/corpus/templates/tasks/app/hooks/use-visible-task-fields.ts +1 -4
- package/corpus/templates/tasks/server/custom-fields/store.ts +1 -6
- package/corpus/templates/tasks/shared/list-screen-snapshot.ts +2 -2
- package/dist/agent/engine/registry.js +27 -14
- package/dist/agent/index.d.ts +1 -1
- package/dist/agent/production-agent.d.ts +19 -6
- package/dist/agent/production-agent.js +57 -16
- package/dist/agent/types.d.ts +3 -0
- package/dist/changelog/parse.js +219 -8
- package/dist/client/EnvironmentBadge.d.ts +1 -0
- package/dist/client/EnvironmentBadge.js +7 -0
- package/dist/collab/routes.d.ts +1 -1
- package/dist/collab/struct-routes.d.ts +1 -1
- package/dist/config.d.ts +11 -0
- package/dist/config.js +248 -0
- package/dist/deploy/build.js +12 -1
- package/dist/index.d.ts +1 -1
- package/dist/observability/routes.d.ts +3 -3
- package/dist/progress/routes.d.ts +1 -1
- package/dist/resources/handlers.d.ts +2 -2
- package/dist/secrets/routes.d.ts +9 -9
- package/dist/server/agent-chat/plugin-options.d.ts +3 -2
- package/dist/server/agent-chat-plugin.js +5 -2
- package/dist/server/index.d.ts +1 -1
- package/dist/templates/chat/.agents/skills/secrets/SKILL.md +5 -1
- package/dist/templates/chat/.agents/skills/workspace-conventions/SKILL.md +4 -1
- package/dist/templates/chat/actions/navigate.ts +2 -2
- package/dist/templates/default/.agents/skills/secrets/SKILL.md +5 -1
- package/dist/templates/default/.agents/skills/workspace-conventions/SKILL.md +4 -1
- package/dist/templates/headless/.agents/skills/secrets/SKILL.md +5 -1
- package/dist/templates/workspace-core/.agents/skills/secrets/SKILL.md +5 -1
- package/dist/templates/workspace-core/.agents/skills/workspace-conventions/SKILL.md +4 -1
- package/dist/vite/agent-native-config-loader.d.ts +1 -0
- package/dist/vite/agent-native-config-loader.js +3 -3
- package/dist/vite/agents-bundle-plugin.d.ts +1 -1
- package/dist/vite/agents-bundle-plugin.js +13 -1
- package/dist/vite/client.js +14 -14
- package/docs/content/agent-native-config.mdx +62 -11
- package/docs/content/agent-surfaces.mdx +6 -0
- package/docs/content/environment-variables.mdx +5 -2
- package/package.json +3 -3
- package/src/templates/chat/.agents/skills/secrets/SKILL.md +5 -1
- package/src/templates/chat/.agents/skills/workspace-conventions/SKILL.md +4 -1
- package/src/templates/chat/actions/navigate.ts +2 -2
- package/src/templates/default/.agents/skills/secrets/SKILL.md +5 -1
- package/src/templates/default/.agents/skills/workspace-conventions/SKILL.md +4 -1
- package/src/templates/headless/.agents/skills/secrets/SKILL.md +5 -1
- package/src/templates/workspace-core/.agents/skills/secrets/SKILL.md +5 -1
- package/src/templates/workspace-core/.agents/skills/workspace-conventions/SKILL.md +4 -1
|
@@ -51,12 +51,8 @@ import {
|
|
|
51
51
|
type ReviewThread,
|
|
52
52
|
} from "@agent-native/core/client/review";
|
|
53
53
|
import { ShareButton } from "@agent-native/core/client/sharing";
|
|
54
|
-
import { buildSignInReturnHref } from "@agent-native/core/client/ui";
|
|
55
54
|
import type { ReviewComment } from "@agent-native/core/review";
|
|
56
|
-
import {
|
|
57
|
-
normalizeDocumentTitle,
|
|
58
|
-
withBuilderUtmTrackingParams,
|
|
59
|
-
} from "@agent-native/core/shared";
|
|
55
|
+
import { normalizeDocumentTitle } from "@agent-native/core/shared";
|
|
60
56
|
import {
|
|
61
57
|
CreativeContextShareTab,
|
|
62
58
|
parseCreativeContexts,
|
|
@@ -70,10 +66,8 @@ import {
|
|
|
70
66
|
RecentEditHighlights,
|
|
71
67
|
} from "@agent-native/toolkit/collab-ui";
|
|
72
68
|
import {
|
|
73
|
-
computeReparentedChildPosition,
|
|
74
69
|
isBoardFile,
|
|
75
70
|
normalizePoisonedBoardNestedCoords,
|
|
76
|
-
stripBoardSurfaceOffsetFromCoord,
|
|
77
71
|
} from "@shared/board-file";
|
|
78
72
|
import {
|
|
79
73
|
getBreakpointOverrideState,
|
|
@@ -84,7 +78,6 @@ import {
|
|
|
84
78
|
isBuilderPreviewUrl,
|
|
85
79
|
} from "@shared/builder-preview-url";
|
|
86
80
|
import {
|
|
87
|
-
parseCanvasFrameGeometryById,
|
|
88
81
|
type CanvasFrameGeometry,
|
|
89
82
|
type CanvasFrameGeometryById,
|
|
90
83
|
} from "@shared/canvas-frames";
|
|
@@ -95,12 +88,10 @@ import {
|
|
|
95
88
|
buildCodeLayerProjection,
|
|
96
89
|
buildCodeLayerTree,
|
|
97
90
|
ensureCodeLayerNodeIdsInHtml,
|
|
98
|
-
moveNodeBetweenDocuments,
|
|
99
91
|
removeCodeLayerNodeFromHtml,
|
|
100
92
|
type CodeLayerNode,
|
|
101
93
|
type CodeLayerProjection,
|
|
102
94
|
type CodeLayerTreeNode,
|
|
103
|
-
type MoveNodeEditIntent,
|
|
104
95
|
} from "@shared/code-layer";
|
|
105
96
|
import { isComponentInstance } from "@shared/component-model";
|
|
106
97
|
import type { A11yFinding } from "@shared/design-review";
|
|
@@ -109,22 +100,13 @@ import {
|
|
|
109
100
|
hasCapability,
|
|
110
101
|
} from "@shared/design-source-capabilities";
|
|
111
102
|
import { FULL_APP_BUILDING, readFusionApp } from "@shared/full-app";
|
|
112
|
-
import { shouldUseLiveFileContent } from "@shared/html-content";
|
|
113
103
|
import { assertDesignHtmlEditIntegrity } from "@shared/html-integrity";
|
|
114
104
|
import type { InteractionState } from "@shared/interaction-states";
|
|
115
105
|
import { countLockedLayersAcrossFiles } from "@shared/locked-layers";
|
|
116
|
-
import {
|
|
117
|
-
compile as compileMotionTimeline,
|
|
118
|
-
injectManagedMotionCss,
|
|
119
|
-
} from "@shared/motion-compiler";
|
|
120
106
|
import type { MotionAnimationClip, MotionEase } from "@shared/motion-timeline";
|
|
121
107
|
import {
|
|
122
108
|
copyLayerAnimation,
|
|
123
|
-
createMotionTrackFromPreset,
|
|
124
|
-
MOTION_PROPERTY_PRESETS,
|
|
125
109
|
pasteLayerAnimation,
|
|
126
|
-
sortMotionKeyframes,
|
|
127
|
-
upsertMotionKeyframeAtTime,
|
|
128
110
|
} from "@shared/motion-timeline";
|
|
129
111
|
import {
|
|
130
112
|
designRepromptPendingStateKey,
|
|
@@ -168,7 +150,6 @@ import {
|
|
|
168
150
|
IconDeviceFloppy,
|
|
169
151
|
IconRocket,
|
|
170
152
|
IconExternalLink,
|
|
171
|
-
IconCircleCheck,
|
|
172
153
|
IconTerminal2,
|
|
173
154
|
IconLink,
|
|
174
155
|
IconKeyboard,
|
|
@@ -211,7 +192,6 @@ import {
|
|
|
211
192
|
import { type CodeWorkbenchActiveFile } from "@/components/design/code-workbench/CodeWorkbench";
|
|
212
193
|
import { CodeWorkbenchLoader } from "@/components/design/code-workbench/CodeWorkbenchLoader";
|
|
213
194
|
import type { CreatePrimitiveSpec } from "@/components/design/design-canvas/creation";
|
|
214
|
-
import { sanitizeLocalhostSourceSnapshotHtml } from "@/components/design/design-canvas/external-preview";
|
|
215
195
|
import type {
|
|
216
196
|
IframeContextMenuPayload,
|
|
217
197
|
IframeHotkeyPayload,
|
|
@@ -227,7 +207,6 @@ import {
|
|
|
227
207
|
type DesignExtensionSlotContext,
|
|
228
208
|
} from "@/components/design/DesignExtensionsPanel";
|
|
229
209
|
import { DesignImportPanel } from "@/components/design/DesignImportPanel";
|
|
230
|
-
import { dndHostLog } from "@/components/design/dnd-debug";
|
|
231
210
|
import { inspectCodeDataForElement } from "@/components/design/edit-panel/inspect-code-source";
|
|
232
211
|
import {
|
|
233
212
|
mergeRotationValue,
|
|
@@ -264,10 +243,6 @@ import {
|
|
|
264
243
|
hasEyeDropperSupport,
|
|
265
244
|
type ExportSettingsValue,
|
|
266
245
|
} from "@/components/design/inspector";
|
|
267
|
-
import {
|
|
268
|
-
isShaderWriteInFlight,
|
|
269
|
-
waitForShaderWriteToSettle,
|
|
270
|
-
} from "@/components/design/inspector/GlslShaderPanel";
|
|
271
246
|
import { KeyboardShortcutsPanel } from "@/components/design/KeyboardShortcutsPanel";
|
|
272
247
|
import {
|
|
273
248
|
LayersPanel,
|
|
@@ -285,19 +260,13 @@ import {
|
|
|
285
260
|
type MotionDockTrack,
|
|
286
261
|
} from "@/components/design/MotionDock";
|
|
287
262
|
import { getBoardSurfaceContentBounds } from "@/components/design/multi-screen/board-surface-html";
|
|
288
|
-
import { validateCrossScreenSourceHtmlSnapshot } from "@/components/design/multi-screen/cross-screen-drop";
|
|
289
263
|
import {
|
|
290
264
|
getCanonicalScreenStack,
|
|
291
265
|
getInitialFrameGeometry,
|
|
292
266
|
getResponsiveScreenCullGeometry,
|
|
293
|
-
getScreenPreviewViewport,
|
|
294
267
|
reorderCanonicalScreenStack,
|
|
295
268
|
} from "@/components/design/multi-screen/frame-geometry";
|
|
296
|
-
import {
|
|
297
|
-
findCanvasIframeForScreen,
|
|
298
|
-
getBreakpointIframeId,
|
|
299
|
-
getPrimaryIframeId,
|
|
300
|
-
} from "@/components/design/multi-screen/iframe-targeting";
|
|
269
|
+
import { getBreakpointIframeId } from "@/components/design/multi-screen/iframe-targeting";
|
|
301
270
|
import type {
|
|
302
271
|
CanvasLayerMarqueeSelection,
|
|
303
272
|
CanvasPrimitiveInsert,
|
|
@@ -331,25 +300,7 @@ import {
|
|
|
331
300
|
} from "@/components/editor/FigmaLinkComposerBubble";
|
|
332
301
|
import PromptPopover from "@/components/editor/PromptDialog";
|
|
333
302
|
import type { UploadedFile } from "@/components/editor/PromptDialog";
|
|
334
|
-
import {
|
|
335
|
-
AlertDialog,
|
|
336
|
-
AlertDialogAction,
|
|
337
|
-
AlertDialogCancel,
|
|
338
|
-
AlertDialogContent,
|
|
339
|
-
AlertDialogDescription,
|
|
340
|
-
AlertDialogFooter,
|
|
341
|
-
AlertDialogHeader,
|
|
342
|
-
AlertDialogTitle,
|
|
343
|
-
} from "@/components/ui/alert-dialog";
|
|
344
303
|
import { Button } from "@/components/ui/button";
|
|
345
|
-
import {
|
|
346
|
-
Dialog,
|
|
347
|
-
DialogContent,
|
|
348
|
-
DialogDescription,
|
|
349
|
-
DialogFooter,
|
|
350
|
-
DialogHeader,
|
|
351
|
-
DialogTitle,
|
|
352
|
-
} from "@/components/ui/dialog";
|
|
353
304
|
import {
|
|
354
305
|
DropdownMenu,
|
|
355
306
|
DropdownMenuContent,
|
|
@@ -399,7 +350,6 @@ import { useDesignSystems } from "@/hooks/use-design-systems";
|
|
|
399
350
|
import { useEditorPreferences } from "@/hooks/use-editor-preferences";
|
|
400
351
|
import {
|
|
401
352
|
designEditorCommandKey,
|
|
402
|
-
designSelectionStateKeysForTab,
|
|
403
353
|
type DesignEditorCommand,
|
|
404
354
|
} from "@/hooks/use-navigation-state";
|
|
405
355
|
import { useQuestionFlow } from "@/hooks/use-question-flow";
|
|
@@ -412,9 +362,7 @@ import {
|
|
|
412
362
|
} from "@/hooks/useDesignHotkeys";
|
|
413
363
|
import {
|
|
414
364
|
DESIGN_CHAT_STORAGE_KEY,
|
|
415
|
-
sendDesignSourceHandoffAndConfirm,
|
|
416
365
|
sendToDesignAgentChat,
|
|
417
|
-
sendToDesignAgentChatAndConfirm,
|
|
418
366
|
} from "@/lib/agent-chat";
|
|
419
367
|
import {
|
|
420
368
|
builderSelectionChip,
|
|
@@ -431,24 +379,10 @@ import {
|
|
|
431
379
|
type ClipboardContentMutationOrigin,
|
|
432
380
|
type ClipboardContentMutationPublication,
|
|
433
381
|
} from "@/lib/clipboard-content-lineage";
|
|
434
|
-
import {
|
|
435
|
-
plainTextFromDesignHtml,
|
|
436
|
-
getDesignClipboardTrustToken,
|
|
437
|
-
readDesignClipboardPayloadFromDataTransfer,
|
|
438
|
-
readDesignClipboardPayloadFromSystem,
|
|
439
|
-
writeDesignClipboard,
|
|
440
|
-
} from "@/lib/design-clipboard";
|
|
441
|
-
import {
|
|
442
|
-
extractDesignClipboardManagedStyles,
|
|
443
|
-
type DesignClipboardManagedStyleSnapshot,
|
|
444
|
-
} from "@/lib/design-clipboard-managed-styles";
|
|
382
|
+
import { readDesignClipboardPayloadFromSystem } from "@/lib/design-clipboard";
|
|
445
383
|
import {
|
|
446
384
|
type DesignClipboardPayload,
|
|
447
385
|
type DesignClipboardScreenEntry,
|
|
448
|
-
getFigmaClipboardContent,
|
|
449
|
-
importResultSummary,
|
|
450
|
-
type ImportResult,
|
|
451
|
-
serializeDesignClipboardPayload,
|
|
452
386
|
} from "@/lib/design-import";
|
|
453
387
|
import {
|
|
454
388
|
acknowledgeDesignSaveOutboxEntry,
|
|
@@ -461,16 +395,11 @@ import {
|
|
|
461
395
|
} from "@/lib/design-save-outbox";
|
|
462
396
|
import { DESIGN_UI_TOGGLE_EVENT } from "@/lib/design-ui-events";
|
|
463
397
|
import { isEmbedChromeRequested } from "@/lib/embed-chrome";
|
|
464
|
-
import { resolveFigmaPasteImportCall } from "@/lib/figma-clipboard";
|
|
465
398
|
import {
|
|
466
|
-
canCopyFigmaSvgToClipboard,
|
|
467
|
-
copyDesignAsFigmaSvg,
|
|
468
399
|
exportDesignAsFigmaSvg,
|
|
469
|
-
FigmaSvgCopyError,
|
|
470
400
|
type LiveFigmaSvgSnapshot,
|
|
471
401
|
type LiveFigmaSvgSource,
|
|
472
402
|
} from "@/lib/figma-svg-copy";
|
|
473
|
-
import { nodeRepromptSubtreeExcerpt } from "@/lib/node-reprompt";
|
|
474
403
|
import {
|
|
475
404
|
clearPendingGeneration,
|
|
476
405
|
hasPendingGenerationOutput,
|
|
@@ -498,37 +427,18 @@ import {
|
|
|
498
427
|
fullPreviewHtml,
|
|
499
428
|
} from "@/pages/design-editor/preview-html";
|
|
500
429
|
|
|
501
|
-
import { actionErrorDetail } from "./design-editor/action-error";
|
|
502
430
|
import {
|
|
503
431
|
applyAutoLayoutSuggestion,
|
|
504
|
-
hasMeaningfulCssTransform,
|
|
505
|
-
inferAutoLayoutSuggestion,
|
|
506
432
|
isExistingFlowLayout,
|
|
507
433
|
type AutoLayoutSuggestion,
|
|
508
434
|
} from "./design-editor/auto-layout-suggestion";
|
|
509
435
|
import {
|
|
510
|
-
appendCanvasPrimitiveToHtml,
|
|
511
|
-
blankScreenHtml,
|
|
512
|
-
extractCanvasPrimitiveHtml,
|
|
513
|
-
nextBlankScreenFilename,
|
|
514
|
-
nextDuplicatedFilename,
|
|
515
436
|
normalizedDesignFileType,
|
|
516
|
-
reassignDuplicatedNodeIds,
|
|
517
437
|
uniqueLayerId,
|
|
518
438
|
} from "./design-editor/canvas-primitive-insert";
|
|
439
|
+
import { createPrimitiveInsertFromSpec } from "./design-editor/canvas-primitives";
|
|
519
440
|
import {
|
|
520
|
-
createPrimitiveInsertFromSpec,
|
|
521
|
-
parsePenPathFromSerializedD,
|
|
522
|
-
} from "./design-editor/canvas-primitives";
|
|
523
|
-
import { resolveClipboardLayerSourceHtml } from "./design-editor/clipboard-layer-source";
|
|
524
|
-
import {
|
|
525
|
-
cloneHtmlLayerAtPosition,
|
|
526
|
-
extractLayerPosition,
|
|
527
441
|
getElementOuterHtml,
|
|
528
|
-
insertClonedHtmlLayer,
|
|
529
|
-
prepareClonedHtmlLayersForLiveInsert,
|
|
530
|
-
preserveClipboardLayerName,
|
|
531
|
-
setPenNodesAttributeOnElement,
|
|
532
442
|
writeBackVectorEditedPenPath,
|
|
533
443
|
} from "./design-editor/clone-and-pen-edit";
|
|
534
444
|
import {
|
|
@@ -537,43 +447,19 @@ import {
|
|
|
537
447
|
canonicalizeElementInfoFromProjection,
|
|
538
448
|
codeLayerNodeLooksLikeComponent,
|
|
539
449
|
codeLayerNodeMatchesBridgeTarget,
|
|
540
|
-
codeLayerPatchMessage,
|
|
541
450
|
codeLayerSelectorAliases,
|
|
542
|
-
codeLayerSelectorMatches,
|
|
543
451
|
codeLayerTreeToPanelNodes,
|
|
544
452
|
collectCodeLayerAncestors,
|
|
545
|
-
collectCodeLayerSubtreeDataNodeIds,
|
|
546
453
|
collectEffectiveCodeLayerState,
|
|
547
|
-
resolveCodeLayerTargetFromBridge,
|
|
548
|
-
resolveCodeLayerTargetFromElementInfo,
|
|
549
454
|
type EffectiveCodeLayerState,
|
|
550
455
|
elementInfoFromCodeLayerNode,
|
|
551
|
-
elementInfoIsRuntimeOnly,
|
|
552
|
-
ensureGoogleFontLinkInHtml,
|
|
553
456
|
findCodeLayerSiblingOrder,
|
|
554
|
-
findMovedCodeLayerNodeInProjection,
|
|
555
|
-
isClientRenderedMountShell,
|
|
556
457
|
isCodeLayerNodeRuntimeOnly,
|
|
557
|
-
liveDeleteSelectorGroups,
|
|
558
|
-
liveNudgeReorderHandoff,
|
|
559
|
-
nudgeBaseContentForScreen,
|
|
560
|
-
preferredCodeLayerSelector,
|
|
561
|
-
refreshElementInfoFromContent,
|
|
562
|
-
refreshSelectedLayerIdsFromContent,
|
|
563
|
-
removeEmptyGeneratedGroupWrappers,
|
|
564
|
-
renameFilenamePreservingExtension,
|
|
565
458
|
resolveCodeLayerNodeFromBridge,
|
|
566
459
|
resolveCodeLayerNodeFromElementInfo,
|
|
567
460
|
resolveSelectedCodeLayerNode,
|
|
568
|
-
runtimeLayerStateHandoffMode,
|
|
569
461
|
type SelectedLayerTarget,
|
|
570
|
-
shouldDeleteThroughLiveScreen,
|
|
571
462
|
} from "./design-editor/code-layer-state";
|
|
572
|
-
import {
|
|
573
|
-
resolveScreenCollabSyncTarget,
|
|
574
|
-
shouldApplyRemotePreviewContent,
|
|
575
|
-
shouldRebaseCollabDocFromStoredContent,
|
|
576
|
-
} from "./design-editor/collab-sync";
|
|
577
463
|
import type {
|
|
578
464
|
ResponsiveEditScope,
|
|
579
465
|
RetryablePrompt,
|
|
@@ -582,13 +468,10 @@ import type {
|
|
|
582
468
|
DesignCanvasEmbeddedFrame,
|
|
583
469
|
LiveScreenSnapshot,
|
|
584
470
|
PatchProofState,
|
|
585
|
-
PatchProofStatus,
|
|
586
471
|
PendingStructureVerificationSession,
|
|
587
|
-
PendingStructureVerificationSource,
|
|
588
472
|
PendingStructureVerificationStatus,
|
|
589
473
|
PostAuthDesignIntent,
|
|
590
474
|
RuntimeLayerSnapshot,
|
|
591
|
-
SelectedCanvasLayerSnapshot,
|
|
592
475
|
ShareExportFormat,
|
|
593
476
|
} from "./design-editor/command-types";
|
|
594
477
|
import { runAddAutoLayout } from "./design-editor/commands/add-auto-layout";
|
|
@@ -684,10 +567,6 @@ import {
|
|
|
684
567
|
designPrecedentDirectives,
|
|
685
568
|
loadCreativeContextPrecedent,
|
|
686
569
|
} from "./design-editor/creative-context-precedent";
|
|
687
|
-
import {
|
|
688
|
-
adaptAutoTextColorForCrossScreenNode,
|
|
689
|
-
clearAutoTextColorMarkerOnExplicitColorCommit,
|
|
690
|
-
} from "./design-editor/cross-screen-text-color";
|
|
691
570
|
import {
|
|
692
571
|
applyDesignDataOperations,
|
|
693
572
|
buildFrameGeometryDataOperations,
|
|
@@ -710,37 +589,25 @@ import {
|
|
|
710
589
|
isDesignData,
|
|
711
590
|
nextLocalhostScreenPosition,
|
|
712
591
|
parseDesignDataJson,
|
|
713
|
-
staleGeometryFrameIds,
|
|
714
|
-
viewportChangedFrameIds,
|
|
715
592
|
} from "./design-editor/design-data-geometry-utils";
|
|
716
593
|
import { isRadixOverlayOpen } from "./design-editor/dom-guards";
|
|
717
|
-
import { escapeHtmlAttributeValue } from "./design-editor/dom-utils";
|
|
718
594
|
import { useTweaks } from "./design-editor/domains/use-tweaks";
|
|
719
595
|
import {
|
|
720
596
|
AUTO_RETRY_DELAY_MS,
|
|
721
597
|
BOARD_SURFACE_SIZE,
|
|
722
598
|
DESIGN_EDITOR_DEBUG_LOGS,
|
|
723
|
-
DESIGN_SELECTION_ZOOM_SAVE_DELAY_MS,
|
|
724
599
|
EMPTY_TEXT_CLEANUP_RETRY_MS,
|
|
725
600
|
HOST_CHAT_SLOT_MESSAGE,
|
|
726
601
|
LOCALHOST_COMPILED_SOURCE_EXTENSIONS,
|
|
727
602
|
LOCALHOST_WRITE_EXTENSIONS,
|
|
728
603
|
MAX_GENERATION_ATTEMPTS,
|
|
729
604
|
MIN_FRAME_SIZE_PX,
|
|
730
|
-
MOTION_AUTOSAVE_DELAY_MS,
|
|
731
605
|
MOTION_DOCK_EXIT_FALLBACK_MS,
|
|
732
606
|
MOTION_DOCK_EXIT_SETTLE_MS,
|
|
733
|
-
MOTION_DOCK_TRANSITION_MS,
|
|
734
607
|
NO_LOCALHOST_CONNECTION_MESSAGE,
|
|
735
608
|
NO_LOCALHOST_WRITE_CONTENT_MESSAGE,
|
|
736
|
-
NO_LOCALHOST_WRITE_PATH_MESSAGE,
|
|
737
609
|
OVERVIEW_ZOOM_THRESHOLD,
|
|
738
|
-
PENDING_STRUCTURE_RUNTIME_POLL_MS,
|
|
739
|
-
PENDING_STRUCTURE_RUNTIME_TIMEOUT_MS,
|
|
740
|
-
PENDING_STRUCTURE_SOURCE_POLL_MS,
|
|
741
|
-
PENDING_STRUCTURE_VERIFICATION_TIMEOUT_MS,
|
|
742
610
|
STORED_RUN_LIVENESS_GRACE_MS,
|
|
743
|
-
TWEAK_CONTROLS_EDIT_ACCESS_MESSAGE,
|
|
744
611
|
} from "./design-editor/editor-constants";
|
|
745
612
|
import {
|
|
746
613
|
buildSignInHrefForComment,
|
|
@@ -749,18 +616,14 @@ import {
|
|
|
749
616
|
designSelectionStateKeys,
|
|
750
617
|
isSupersededSelectionEcho,
|
|
751
618
|
reloadRunningAppPreviewFrames,
|
|
752
|
-
runtimeMultiplicityForElementProvenance,
|
|
753
619
|
withMeasuredGeometry,
|
|
754
620
|
} from "./design-editor/editor-helpers";
|
|
755
621
|
import {
|
|
756
622
|
createEditorSaveOperationSource,
|
|
757
623
|
LOCAL_EDIT_ORIGIN,
|
|
758
|
-
shouldAdoptExternalReconcileContent,
|
|
759
|
-
shouldCheckpointAgentContent,
|
|
760
624
|
TAB_ID,
|
|
761
625
|
} from "./design-editor/editor-session";
|
|
762
626
|
import {
|
|
763
|
-
applyRelativeDeltaToStyleValue,
|
|
764
627
|
type FileContentSaveRequest,
|
|
765
628
|
flushFileContentSavesOnBackground,
|
|
766
629
|
flushPendingFileContentSavesOnCleanup,
|
|
@@ -768,8 +631,6 @@ import {
|
|
|
768
631
|
getDesignEditorStateUrlSearch,
|
|
769
632
|
getFreshActiveFileContent,
|
|
770
633
|
getFreshScreenContent,
|
|
771
|
-
getLayerMoveIterationOrder,
|
|
772
|
-
getLayerMoveSourceContent,
|
|
773
634
|
getLocalhostRouteSourceFile,
|
|
774
635
|
getPersistedContentHostSyncOptions,
|
|
775
636
|
isStandaloneHttpUrl,
|
|
@@ -778,11 +639,8 @@ import {
|
|
|
778
639
|
resolveLocalhostSourceWriteContent,
|
|
779
640
|
resolveOptimisticTextDecorationLine,
|
|
780
641
|
resolveServerFiles,
|
|
781
|
-
shouldClearLatestUnloadSave,
|
|
782
|
-
shouldReplacePreviewAfterVisualStyleCommit,
|
|
783
642
|
shouldRetirePendingLocalFileContent,
|
|
784
643
|
shouldSendKeepalive,
|
|
785
|
-
shouldSkipVisualStyleCommitForPreview,
|
|
786
644
|
type OptimisticTextDecorationLineEntry,
|
|
787
645
|
type PreviewContentReplaceResult,
|
|
788
646
|
type UndoRedoOrderKind,
|
|
@@ -794,102 +652,59 @@ import { runObserveCollabText } from "./design-editor/effects/observe-collab-tex
|
|
|
794
652
|
import { runPublishAgentSelectionContext } from "./design-editor/effects/publish-agent-selection-context";
|
|
795
653
|
import { runResumePendingGeneration } from "./design-editor/effects/resume-pending-generation";
|
|
796
654
|
import { runSeedCollabContent } from "./design-editor/effects/seed-collab-content";
|
|
797
|
-
import {
|
|
798
|
-
buildStaticForeignObjectSvg,
|
|
799
|
-
createMultiPageRasterPdf,
|
|
800
|
-
createSinglePageRasterPdf,
|
|
801
|
-
getExportCompositeBounds,
|
|
802
|
-
PDF_MIN_PRINT_RASTER_SCALE,
|
|
803
|
-
type RasterPdfPage,
|
|
804
|
-
resolveRasterExportScale,
|
|
805
|
-
stripNonStaticXmlAttributes,
|
|
806
|
-
waitForExportReady,
|
|
807
|
-
} from "./design-editor/export-capture";
|
|
808
655
|
import {
|
|
809
656
|
designGenerationDirectives,
|
|
810
657
|
designIntakeQuestionDirectives,
|
|
811
|
-
designTemplateRefinementDirectives,
|
|
812
658
|
designVariantGenerationDirectives,
|
|
813
|
-
formatTweakDefinitionsContext,
|
|
814
659
|
formatUploadedFileContext,
|
|
815
660
|
imageAttachmentsFromUploadedFiles,
|
|
816
661
|
loadDesignSystemGenerationContext,
|
|
817
662
|
promptRequestsVariantExploration,
|
|
818
663
|
} from "./design-editor/generation-prompt-directives";
|
|
664
|
+
import { sanitizeCanvasFrameGeometryForPersist } from "./design-editor/geometry-persistence";
|
|
819
665
|
import {
|
|
820
|
-
geometrySnapshotsEqual,
|
|
821
|
-
sanitizeCanvasFrameGeometryForPersist,
|
|
822
|
-
} from "./design-editor/geometry-persistence";
|
|
823
|
-
import {
|
|
824
|
-
applyGeometryHistoryDiff,
|
|
825
666
|
type ContentHistoryChange,
|
|
826
667
|
type ContentHistoryEntry,
|
|
827
668
|
type FileCreationHistoryEntry,
|
|
828
669
|
type FileDeletionHistoryEntry,
|
|
829
|
-
filterFileDeletionHistoryEntry,
|
|
830
670
|
finalizeTextCreationHistory,
|
|
831
671
|
findLastContentHistoryChangeIndex,
|
|
832
672
|
contentHistoryScopeForViewMode,
|
|
833
|
-
getAvailableContentHistoryChanges,
|
|
834
673
|
getContentHistoryChanges,
|
|
835
674
|
type GeometryHistoryEntry,
|
|
836
675
|
type GeometryHistorySelection,
|
|
837
676
|
type PendingTextCreationHistory,
|
|
838
677
|
MAX_DESIGN_UNDO_STACK,
|
|
839
678
|
mergeLocalContentHistoryFallback,
|
|
840
|
-
pruneFileCreationHistoryStack,
|
|
841
|
-
pruneGeometryHistoryEntryForDeletedFiles,
|
|
842
|
-
remapFileDeletionHistoryEntryIds,
|
|
843
679
|
removeRecentUndoRedoOrderKinds,
|
|
844
680
|
} from "./design-editor/history";
|
|
845
681
|
import {
|
|
846
|
-
getAbsolutePositioningForNodeInHtml,
|
|
847
682
|
getBodyInlineStyles,
|
|
848
683
|
isAbsoluteCodeLayerNode,
|
|
849
|
-
removeAbsolutePositioningFromNodeInHtml,
|
|
850
|
-
setAbsolutePositioningForNodeInHtml,
|
|
851
|
-
setCodeLayerAttributeInHtml,
|
|
852
|
-
setFlowPositioningOverrideForNodeInHtml,
|
|
853
684
|
warnIfPoisonedBoardCoordsNormalized,
|
|
854
685
|
} from "./design-editor/html-layer-positioning";
|
|
855
686
|
import { createLatestWriteQueue } from "./design-editor/latest-write-queue";
|
|
856
687
|
import {
|
|
857
|
-
hasScopedLayerState,
|
|
858
688
|
layerStateIdsForScreen,
|
|
859
689
|
scopedLayerStateId,
|
|
860
690
|
} from "./design-editor/layer-state-scope";
|
|
861
691
|
import {
|
|
862
692
|
type AlignableRect,
|
|
863
|
-
computeAlignedPositions,
|
|
864
|
-
computeDistributedPositions,
|
|
865
693
|
computeOverlapReflowGeometry,
|
|
866
|
-
computeTidyPositions,
|
|
867
|
-
inferAutoLayoutFromChildren,
|
|
868
694
|
mergeAuthoredAndLiveRect,
|
|
869
695
|
type ReflowCandidate,
|
|
870
696
|
} from "./design-editor/layout-operations";
|
|
871
|
-
import {
|
|
697
|
+
import { measureFreeformGeometry } from "./design-editor/measure-child-rects";
|
|
872
698
|
import {
|
|
873
699
|
applyMotionAutoKeyframesForStyles,
|
|
874
|
-
computedMotionStyleValue,
|
|
875
700
|
hydrateMotionDockTracks,
|
|
876
|
-
MOTION_KEYFRAME_TIME_EPSILON,
|
|
877
701
|
type MotionTimelineQueryResult,
|
|
878
702
|
motionTimelineFingerprint,
|
|
879
703
|
} from "./design-editor/motion-state";
|
|
880
|
-
import {
|
|
881
|
-
resolveElementNudgeIntent,
|
|
882
|
-
resolveNudgeIntent,
|
|
883
|
-
} from "./design-editor/nudge-intent";
|
|
884
|
-
import {
|
|
885
|
-
collectOverviewAnnotationViewportMap,
|
|
886
|
-
formatOverviewAnnotationMessage,
|
|
887
|
-
} from "./design-editor/overview-annotation-context";
|
|
888
704
|
import {
|
|
889
705
|
clampOverviewDisplayZoom,
|
|
890
706
|
clampZoom,
|
|
891
707
|
computeIframeLocalCanvasPoint,
|
|
892
|
-
findScreenFrameAtCanvasPoint,
|
|
893
708
|
getAllScreenFrameEntries,
|
|
894
709
|
getDefaultOverviewCanvasZoom,
|
|
895
710
|
getNextZoomStepDown,
|
|
@@ -899,88 +714,51 @@ import {
|
|
|
899
714
|
getOverviewZoomScale,
|
|
900
715
|
getScreenFrameOriginCanvas,
|
|
901
716
|
resolveOverviewZoomBasisScreenId,
|
|
902
|
-
resolveScreenEntryZoom,
|
|
903
717
|
resolveZoomUpdate,
|
|
904
718
|
readOverviewZoomPercentFromTransform,
|
|
905
719
|
resolveScreenDropPoint,
|
|
906
|
-
shouldDeferOverviewZoomCommand,
|
|
907
720
|
shouldPopToOverviewOnZoomChange,
|
|
908
721
|
shouldResetExplicitOverviewZoomOnBasisChange,
|
|
909
722
|
} from "./design-editor/overview-camera";
|
|
910
|
-
import { resolvePastePlacementForSelection } from "./design-editor/paste-placement";
|
|
911
723
|
import {
|
|
912
724
|
applyInteractionStateStyleCommit,
|
|
913
|
-
applyScopedVisualStyleEdit,
|
|
914
725
|
buildPendingVisualStyleRevertPatches,
|
|
915
726
|
deriveStatePreviewTarget,
|
|
916
727
|
formatPendingVisualStylePrompt,
|
|
917
728
|
getPendingVisualEditCount,
|
|
918
|
-
mergePendingLiveNonStyleEdits,
|
|
919
|
-
mergePendingVisualStyleEdits,
|
|
920
|
-
originalStylesForPendingVisualEdit,
|
|
921
729
|
type PendingLiveLayerStateEdit,
|
|
922
|
-
pendingLiveStructureEditsMatch,
|
|
923
|
-
pendingLiveLayerStateUndoRevertValue,
|
|
924
|
-
projectRelativeSourcePath,
|
|
925
|
-
reactSourceAnchorForPendingEdit,
|
|
926
|
-
reactSourceAnchorUnavailableReason,
|
|
927
730
|
type PendingLiveNonStyleEdit,
|
|
928
731
|
type PendingLiveNonStyleUndoEntry,
|
|
929
732
|
type PendingLiveStructureEdit,
|
|
930
733
|
type PendingLiveStructureUndoEntry,
|
|
931
734
|
type PendingLiveTextEdit,
|
|
932
|
-
pendingLiveTextUndoRevertValue,
|
|
933
|
-
pendingStructureEditSourcePaths,
|
|
934
|
-
pendingStructureRedoCommand,
|
|
935
735
|
type PendingVisualStyleEdit,
|
|
936
736
|
replayPendingVisualStyleRuntimePatch,
|
|
937
737
|
type PendingVisualStyleUndoEntry,
|
|
938
|
-
pendingVisualStyleUndoRevertStyles,
|
|
939
738
|
resolveOverviewScreenSourceType,
|
|
940
739
|
shouldPreferRuntimeLayerProjection,
|
|
941
740
|
shouldUseRuntimeLayerProjection,
|
|
942
|
-
resolveVisualStyleCommitContent,
|
|
943
741
|
shouldBlockPendingVisualStyleNavigation,
|
|
944
|
-
shouldRedoPendingLiveNonStyleBeforeStyle,
|
|
945
742
|
shouldShowPendingVisualStyleApply,
|
|
946
743
|
} from "./design-editor/pending-edits";
|
|
947
744
|
import { usePendingLiveEditUnloadGuard } from "./design-editor/pending-live-edit-unload-guard";
|
|
948
|
-
import { verifyPendingStructuresRuntime } from "./design-editor/pending-structure-verification";
|
|
949
745
|
import { usePerformanceBufferGuard } from "./design-editor/performance-buffer-guard";
|
|
950
746
|
import {
|
|
951
747
|
blurActiveDesignEditableTarget,
|
|
952
|
-
cropCanvasToRect,
|
|
953
748
|
PngCaptureError,
|
|
954
|
-
removeEditorChromeOverlays,
|
|
955
|
-
renderExportDocumentCanvas,
|
|
956
|
-
resolveExportCropRect,
|
|
957
|
-
sanitizeSerializedXmlForSvg,
|
|
958
749
|
type PngCaptureScope,
|
|
959
750
|
} from "./design-editor/png-export-render";
|
|
960
|
-
import { applyPortableStyleSnapshotToHtml } from "./design-editor/portable-style";
|
|
961
|
-
import {
|
|
962
|
-
buildReactSemanticHandoff,
|
|
963
|
-
buildRuntimeReactLayerStateHandoff,
|
|
964
|
-
buildRuntimeReactStructureMoveHandoff,
|
|
965
|
-
resolveRuntimeStructureMoveExecutionMode,
|
|
966
|
-
} from "./design-editor/react-semantic-handoff";
|
|
967
751
|
import {
|
|
968
752
|
computeInteractZoomToFit,
|
|
969
753
|
DEFAULT_INTERACT_DEVICE_PRESET,
|
|
970
754
|
findInteractDevicePreset,
|
|
971
755
|
INTERACT_CUSTOM_DEVICE_NAME,
|
|
972
|
-
resolveInteractDeviceForScreen,
|
|
973
756
|
} from "./design-editor/responsive-interact";
|
|
974
757
|
import {
|
|
975
758
|
classifyDesignSaveFailure,
|
|
976
759
|
designSaveErrorMessage,
|
|
977
760
|
} from "./design-editor/save-failure";
|
|
978
761
|
import {
|
|
979
|
-
enableInlineScreenAutoLayout,
|
|
980
|
-
getRuntimeScreenAutoLayoutSubjectIds,
|
|
981
|
-
} from "./design-editor/screen-auto-layout";
|
|
982
|
-
import {
|
|
983
|
-
applyInlineStylesToHtml,
|
|
984
762
|
DEFAULT_STATES_PANEL_BREAKPOINTS,
|
|
985
763
|
designEditorCommandFromSearchParams,
|
|
986
764
|
designStatePreviewHtml,
|
|
@@ -990,46 +768,24 @@ import {
|
|
|
990
768
|
import {
|
|
991
769
|
buildActiveFileNodeIdSet,
|
|
992
770
|
computeOverviewScreenPickSelectionIds,
|
|
993
|
-
dedupeStringIds,
|
|
994
|
-
getOverviewEnterTarget,
|
|
995
|
-
getOverviewScreenIdsFromLayerSelection,
|
|
996
771
|
getOverviewScreenContentKey,
|
|
997
772
|
getOverviewScreenRuntimeReplacementKey,
|
|
998
773
|
getSelectedScreenGeometryForInspector,
|
|
999
774
|
getSelectedScreenIdsForEditorState,
|
|
1000
|
-
getSidebarCodeLayerSelectionState,
|
|
1001
775
|
hasSelectableCodeLayerParent,
|
|
1002
776
|
isScreenRootElementInfo,
|
|
1003
777
|
overviewSelectionTargetsElement,
|
|
1004
|
-
pendingEditTargetsSelectedElement,
|
|
1005
778
|
resolveAvailableActiveFileId,
|
|
1006
|
-
resolveEscapePopSelectionAction,
|
|
1007
779
|
sameStringIds,
|
|
1008
|
-
shouldClearBridgeSelectionOnEmptyMarquee,
|
|
1009
780
|
shouldClearSelectionForReviewThreadTarget,
|
|
1010
|
-
shouldEscapeToOverview,
|
|
1011
781
|
shouldIgnoreOverviewLayerCreationEcho,
|
|
1012
782
|
shouldLimitEditorChromeUntilContentReady,
|
|
1013
|
-
shouldMirrorSelectedElementToAgentChat,
|
|
1014
|
-
shouldIncludeScreenRenameContentOverride,
|
|
1015
783
|
shouldUseOverviewRuntimeReplacement,
|
|
1016
784
|
} from "./design-editor/selection-state";
|
|
785
|
+
import { postShaderFillPreviewClearToPreviewIframes } from "./design-editor/text-edit-utils";
|
|
1017
786
|
import {
|
|
1018
|
-
isTextEditSessionOutcome,
|
|
1019
|
-
postShaderFillPreviewClearToPreviewIframes,
|
|
1020
|
-
removeElementFromHtml,
|
|
1021
|
-
scheduleBeginTextEditForScreen,
|
|
1022
|
-
updateElementContentInHtml,
|
|
1023
|
-
} from "./design-editor/text-edit-utils";
|
|
1024
|
-
import {
|
|
1025
|
-
getDesignToolActivationState,
|
|
1026
787
|
getDesignBottomToolbarMode,
|
|
1027
788
|
getSingleScreenCreationTool,
|
|
1028
|
-
isSingleScreenAnnotationTool,
|
|
1029
|
-
normalizeDesignLeftPanel,
|
|
1030
|
-
normalizeDesignMode,
|
|
1031
|
-
normalizeDesignTool,
|
|
1032
|
-
resolveModeChangeView,
|
|
1033
789
|
shouldAutoEnableDrawOverlay,
|
|
1034
790
|
} from "./design-editor/tool-state";
|
|
1035
791
|
import {
|
|
@@ -1237,7 +993,7 @@ function DesignEditor() {
|
|
|
1237
993
|
const [explicitOverviewCanvasZoom, setExplicitOverviewCanvasZoom] = useState<
|
|
1238
994
|
number | null
|
|
1239
995
|
>(null);
|
|
1240
|
-
const [deviceFrame
|
|
996
|
+
const [deviceFrame] = useState<DeviceFrameType>("none");
|
|
1241
997
|
// Responsive Interact device box. Kept separate from `zoom` (the canvas
|
|
1242
998
|
// camera) because this scales a literal device viewport, not the canvas.
|
|
1243
999
|
const [interactDeviceName, setInteractDeviceName] = useState(
|
|
@@ -7560,6 +7316,7 @@ function DesignEditor() {
|
|
|
7560
7316
|
baseContent: string;
|
|
7561
7317
|
nextContent: string;
|
|
7562
7318
|
origin: ClipboardContentMutationOrigin;
|
|
7319
|
+
baseSource?: "lineage" | "document";
|
|
7563
7320
|
}): ClipboardContentMutationPublication | null => {
|
|
7564
7321
|
const current = latestClipboardMutationContentRef.current.get(
|
|
7565
7322
|
args.fileId,
|
|
@@ -7570,6 +7327,7 @@ function DesignEditor() {
|
|
|
7570
7327
|
nextContent: args.nextContent,
|
|
7571
7328
|
nextContentHash: sourceContentHash(args.nextContent),
|
|
7572
7329
|
origin: args.origin,
|
|
7330
|
+
baseSource: args.baseSource,
|
|
7573
7331
|
});
|
|
7574
7332
|
if (!nextLineage) return null;
|
|
7575
7333
|
latestClipboardMutationContentRef.current.set(args.fileId, nextLineage);
|
|
@@ -11501,12 +11259,47 @@ function DesignEditor() {
|
|
|
11501
11259
|
appliedAny = true;
|
|
11502
11260
|
}
|
|
11503
11261
|
if (!appliedAny) return false;
|
|
11504
|
-
applyLocalContentUpdate(content, {
|
|
11262
|
+
applyLocalContentUpdate(content, { forcePreviewFullDocument: true });
|
|
11505
11263
|
return true;
|
|
11506
11264
|
},
|
|
11507
11265
|
[applyLocalContentUpdate],
|
|
11508
11266
|
);
|
|
11509
11267
|
|
|
11268
|
+
// Figma parity: turning auto layout off must leave a freeform container.
|
|
11269
|
+
// display:block alone re-stacks the children and they stop being draggable.
|
|
11270
|
+
const handleDisableAutoLayout = useCallback(
|
|
11271
|
+
(nodeId: string) => {
|
|
11272
|
+
if (!canEditDesign) return;
|
|
11273
|
+
const baseContent = getFreshActiveContent();
|
|
11274
|
+
if (!baseContent) {
|
|
11275
|
+
trace("structure", "freeform-abandoned", {
|
|
11276
|
+
reason: "no active content",
|
|
11277
|
+
nodeId,
|
|
11278
|
+
});
|
|
11279
|
+
return;
|
|
11280
|
+
}
|
|
11281
|
+
const geometry = measureFreeformGeometry(nodeId);
|
|
11282
|
+
const patch = applyVisualEdit(baseContent, {
|
|
11283
|
+
kind: "autoLayout",
|
|
11284
|
+
targetId: nodeId,
|
|
11285
|
+
enabled: false,
|
|
11286
|
+
childRects: geometry.children,
|
|
11287
|
+
...(geometry.container ? { containerRect: geometry.container } : {}),
|
|
11288
|
+
});
|
|
11289
|
+
trace("structure", "freeform", {
|
|
11290
|
+
nodeId,
|
|
11291
|
+
measuredChildren: Object.keys(geometry.children).length,
|
|
11292
|
+
measuredContainer: geometry.container !== null,
|
|
11293
|
+
status: patch.result.status,
|
|
11294
|
+
});
|
|
11295
|
+
if (patch.result.status !== "applied") return;
|
|
11296
|
+
applyLocalContentUpdate(patch.content, {
|
|
11297
|
+
forcePreviewFullDocument: true,
|
|
11298
|
+
});
|
|
11299
|
+
},
|
|
11300
|
+
[applyLocalContentUpdate, canEditDesign, getFreshActiveContent],
|
|
11301
|
+
);
|
|
11302
|
+
|
|
11510
11303
|
// Item 3: Figma's Alignment row — moves the selection itself. Wired to
|
|
11511
11304
|
// EditPanel's onAlignSelection prop (its 6 alignment buttons) and to
|
|
11512
11305
|
// useDesignHotkeys' Alt+A/D/W/S/H/V bindings.
|
|
@@ -11830,7 +11623,9 @@ function DesignEditor() {
|
|
|
11830
11623
|
}
|
|
11831
11624
|
// One persistence call = one content-history entry, even though the pure
|
|
11832
11625
|
// proposal compiler performed ordering + layout + sizing internally.
|
|
11833
|
-
applyLocalContentUpdate(result.content, {
|
|
11626
|
+
applyLocalContentUpdate(result.content, {
|
|
11627
|
+
forcePreviewFullDocument: true,
|
|
11628
|
+
});
|
|
11834
11629
|
setAutoLayoutSuggestionPreview(null);
|
|
11835
11630
|
}, [
|
|
11836
11631
|
applyLocalContentUpdate,
|
|
@@ -19235,6 +19030,7 @@ function DesignEditor() {
|
|
|
19235
19030
|
reviewCommentsPanelProps,
|
|
19236
19031
|
reviewCommentsCount: reviewOpenCount,
|
|
19237
19032
|
onAlignSelection: canEditDesign ? handleAlignSelection : undefined,
|
|
19033
|
+
onDisableAutoLayout: canEditDesign ? handleDisableAutoLayout : undefined,
|
|
19238
19034
|
onInteractionStateChange: handleInteractionStateChange,
|
|
19239
19035
|
onEditCode: handleShaderEditCode,
|
|
19240
19036
|
};
|