@agent-native/core 0.165.3 → 0.167.0
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/CHANGELOG.md +740 -2
- 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/CHANGELOG.md +204 -2
- 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/CHANGELOG.md +145 -2
- 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/CHANGELOG.md +272 -2
- 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/CHANGELOG.md +89 -2
- 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 +865 -2
- 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 +6 -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/clips/desktop/src/overlays/preparing.tsx +4 -6
- package/corpus/templates/clips/desktop/src/styles.css +18 -20
- package/corpus/templates/clips/desktop/src-tauri/src/clips/mod.rs +9 -17
- 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/CHANGELOG.md +503 -2
- 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/CHANGELOG.md +31 -2
- 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/CHANGELOG.md +870 -2
- 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/CHANGELOG.md +196 -2
- 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/CHANGELOG.md +121 -2
- 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/forms/CHANGELOG.md +166 -2
- 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/CHANGELOG.md +49 -2
- 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/CHANGELOG.md +201 -2
- 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/plan/CHANGELOG.md +277 -2
- 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/CHANGELOG.md +437 -2
- 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/CHANGELOG.md +32 -2
- 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.d.ts +3 -3
- package/dist/changelog/parse.js +35 -16
- package/dist/client/EnvironmentBadge.d.ts +1 -0
- package/dist/client/EnvironmentBadge.js +7 -0
- package/dist/collab/awareness.d.ts +2 -2
- 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/notifications/routes.d.ts +3 -3
- package/dist/observability/routes.d.ts +6 -6
- 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/server/realtime-token.d.ts +1 -1
- package/dist/server/transcribe-voice.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/CHANGELOG.md +89 -2
- 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/CHANGELOG.md +89 -2
- 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
|
@@ -48,11 +48,7 @@ import {
|
|
|
48
48
|
applyVisualEdit,
|
|
49
49
|
buildCodeLayerProjection,
|
|
50
50
|
} from "../shared/code-layer.js";
|
|
51
|
-
import type {
|
|
52
|
-
CodeLayerSource,
|
|
53
|
-
ClassEditIntent,
|
|
54
|
-
StyleEditIntent,
|
|
55
|
-
} from "../shared/code-layer.js";
|
|
51
|
+
import type { CodeLayerSource, ClassEditIntent } from "../shared/code-layer.js";
|
|
56
52
|
import { agentSelectionDescriptor } from "../shared/collab-selection.js";
|
|
57
53
|
import {
|
|
58
54
|
componentNameFor,
|
|
@@ -13,7 +13,6 @@ import { buildDeepLink } from "@agent-native/core/server";
|
|
|
13
13
|
import { assertAccess } from "@agent-native/core/sharing";
|
|
14
14
|
import {
|
|
15
15
|
getGenerationCreativeContext,
|
|
16
|
-
mergeCreativeContextReuseLabels,
|
|
17
16
|
recordGenerationCreativeContext,
|
|
18
17
|
replaceCreativeContextElementProvenance,
|
|
19
18
|
resolveGenerationCreativeContext,
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { defineAction, embedApp } from "@agent-native/core";
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
writeAppState,
|
|
4
|
+
writeAppStateForCurrentTab,
|
|
5
|
+
} from "@agent-native/core/application-state";
|
|
3
6
|
import { buildDeepLink } from "@agent-native/core/server";
|
|
4
7
|
import { assertAccess } from "@agent-native/core/sharing";
|
|
5
8
|
import {
|
|
@@ -430,7 +433,7 @@ export default defineAction({
|
|
|
430
433
|
designGenerationSessionKey(designId),
|
|
431
434
|
session as unknown as Record<string, unknown>,
|
|
432
435
|
);
|
|
433
|
-
await
|
|
436
|
+
await writeAppStateForCurrentTab("navigate", {
|
|
434
437
|
view: "editor",
|
|
435
438
|
designId,
|
|
436
439
|
editorView: "overview",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
*/
|
|
29
29
|
|
|
30
30
|
import { defineAction } from "@agent-native/core/action";
|
|
31
|
-
import {
|
|
31
|
+
import { writeAppStateForCurrentTab } from "@agent-native/core/application-state";
|
|
32
32
|
import { getText, hasCollabState } from "@agent-native/core/collab";
|
|
33
33
|
import { accessFilter, resolveAccess } from "@agent-native/core/sharing";
|
|
34
34
|
import { and, eq } from "drizzle-orm";
|
|
@@ -223,7 +223,7 @@ export default defineAction({
|
|
|
223
223
|
};
|
|
224
224
|
}
|
|
225
225
|
|
|
226
|
-
await
|
|
226
|
+
await writeAppStateForCurrentTab("navigate", {
|
|
227
227
|
view: "editor",
|
|
228
228
|
designId,
|
|
229
229
|
editorView: "single",
|
|
@@ -44,6 +44,16 @@ export default defineAction({
|
|
|
44
44
|
await Promise.all(
|
|
45
45
|
rows.map(async (row) => {
|
|
46
46
|
const access = await resolveAccess("design-system", row.id);
|
|
47
|
+
if (!access) {
|
|
48
|
+
// accessFilter admitted this row but resolveAccess cannot name a
|
|
49
|
+
// role, so create-design's assertAccess will reject the same id the
|
|
50
|
+
// picker just offered.
|
|
51
|
+
console.warn(
|
|
52
|
+
`[design] list-design-systems: no resolvable access for ` +
|
|
53
|
+
`design-system ${row.id} ("${row.title}") that accessFilter ` +
|
|
54
|
+
`admitted; create-design will reject it.`,
|
|
55
|
+
);
|
|
56
|
+
}
|
|
47
57
|
const role = access?.role ?? "viewer";
|
|
48
58
|
accessById.set(row.id, { role, canManage: canManageRole(role) });
|
|
49
59
|
}),
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
*/
|
|
30
30
|
|
|
31
31
|
import { defineAction } from "@agent-native/core";
|
|
32
|
-
import {
|
|
32
|
+
import { writeAppStateForCurrentTab } from "@agent-native/core/application-state";
|
|
33
33
|
import { z } from "zod";
|
|
34
34
|
|
|
35
35
|
const designEditorToolSchema = z.enum([
|
|
@@ -176,7 +176,7 @@ export default defineAction({
|
|
|
176
176
|
if (args.designSystemId) nav.designSystemId = args.designSystemId;
|
|
177
177
|
if (args.templateId) nav.templateId = args.templateId;
|
|
178
178
|
if (args.path) nav.path = args.path;
|
|
179
|
-
await
|
|
179
|
+
await writeAppStateForCurrentTab("navigate", nav);
|
|
180
180
|
return `Navigating to ${args.view || args.path}${
|
|
181
181
|
args.designId ? ` (design: ${args.designId})` : ""
|
|
182
182
|
}${editorView ? ` (${editorView} view)` : ""}${
|
|
@@ -17,15 +17,15 @@
|
|
|
17
17
|
* gate is checked and the response includes the external file path for the IDE
|
|
18
18
|
* to open.
|
|
19
19
|
*
|
|
20
|
-
* Navigation is written via `
|
|
21
|
-
* mechanism
|
|
20
|
+
* Navigation is written via `writeAppStateForCurrentTab("navigate", ...)` —
|
|
21
|
+
* the same mechanism as the `navigate` action. Because this writes transient
|
|
22
22
|
* application state, the action uses the default POST mutation transport.
|
|
23
23
|
*
|
|
24
24
|
* See DESIGN-STUDIO-PLAN.md §6.1 (jump-to-source) and §7 (action surface).
|
|
25
25
|
*/
|
|
26
26
|
|
|
27
27
|
import { defineAction } from "@agent-native/core";
|
|
28
|
-
import {
|
|
28
|
+
import { writeAppStateForCurrentTab } from "@agent-native/core/application-state";
|
|
29
29
|
import { getText, hasCollabState } from "@agent-native/core/collab";
|
|
30
30
|
import { accessFilter, resolveAccess } from "@agent-native/core/sharing";
|
|
31
31
|
import { and, eq } from "drizzle-orm";
|
|
@@ -190,7 +190,7 @@ export default defineAction({
|
|
|
190
190
|
// ── Emit navigation command ──────────────────────────────────────────────
|
|
191
191
|
// Use the same application state key as the `navigate` action so the UI
|
|
192
192
|
// client picks it up and selects the element in the editor.
|
|
193
|
-
await
|
|
193
|
+
await writeAppStateForCurrentTab("navigate", {
|
|
194
194
|
view: "editor",
|
|
195
195
|
designId,
|
|
196
196
|
editorView: "single",
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { defineAction, embedApp } from "@agent-native/core";
|
|
2
2
|
import {
|
|
3
3
|
deleteAppState,
|
|
4
|
-
writeAppState,
|
|
5
4
|
writeAppStateForCurrentTab,
|
|
6
5
|
} from "@agent-native/core/application-state";
|
|
7
6
|
import { seedFromText } from "@agent-native/core/collab";
|
|
@@ -1169,7 +1168,7 @@ export default defineAction({
|
|
|
1169
1168
|
},
|
|
1170
1169
|
});
|
|
1171
1170
|
|
|
1172
|
-
await
|
|
1171
|
+
await writeAppStateForCurrentTab("navigate", {
|
|
1173
1172
|
view: "editor",
|
|
1174
1173
|
designId,
|
|
1175
1174
|
editorView: "overview",
|
|
@@ -34,28 +34,6 @@ import {
|
|
|
34
34
|
// HTML helpers (static analysis — no DOM runtime available server-side)
|
|
35
35
|
// ---------------------------------------------------------------------------
|
|
36
36
|
|
|
37
|
-
/** Extract all attribute values matching a simple regex over raw HTML. */
|
|
38
|
-
function extractAttrs(
|
|
39
|
-
html: string,
|
|
40
|
-
tagPattern: RegExp,
|
|
41
|
-
attrName: string,
|
|
42
|
-
): string[] {
|
|
43
|
-
const attrRegex = new RegExp(
|
|
44
|
-
`${attrName}\\s*=\\s*(?:"([^"]*?)"|'([^']*?)')`,
|
|
45
|
-
"gi",
|
|
46
|
-
);
|
|
47
|
-
const results: string[] = [];
|
|
48
|
-
let match: RegExpExecArray | null;
|
|
49
|
-
const tagMatches = [...html.matchAll(tagPattern)];
|
|
50
|
-
for (const tm of tagMatches) {
|
|
51
|
-
attrRegex.lastIndex = 0;
|
|
52
|
-
while ((match = attrRegex.exec(tm[0])) !== null) {
|
|
53
|
-
results.push(match[1] ?? match[2] ?? "");
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
return results;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
37
|
/** Pull a node id from a raw tag string (data-agent-native-node-id attr). */
|
|
60
38
|
function extractNodeId(tagHtml: string): string | undefined {
|
|
61
39
|
const m = tagHtml.match(
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { defineAction, embedApp } from "@agent-native/core";
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
writeAppState,
|
|
4
|
+
writeAppStateForCurrentTab,
|
|
5
|
+
} from "@agent-native/core/application-state";
|
|
3
6
|
import { buildDeepLink } from "@agent-native/core/server";
|
|
4
7
|
import { assertAccess } from "@agent-native/core/sharing";
|
|
5
8
|
import { z } from "zod";
|
|
@@ -131,7 +134,7 @@ export default defineAction({
|
|
|
131
134
|
submitLabel: submitLabel ?? "Continue",
|
|
132
135
|
questions: normalizedQuestions,
|
|
133
136
|
});
|
|
134
|
-
await
|
|
137
|
+
await writeAppStateForCurrentTab("navigate", {
|
|
135
138
|
view: "editor",
|
|
136
139
|
designId,
|
|
137
140
|
editorView: "overview",
|
|
@@ -1312,7 +1312,7 @@ export function DesignCanvas({
|
|
|
1312
1312
|
// twice from the same drawing.
|
|
1313
1313
|
const [annotationCaptureBusy, setAnnotationCaptureBusy] = useState(false);
|
|
1314
1314
|
const annotationCaptureBusyRef = useRef(false);
|
|
1315
|
-
const [
|
|
1315
|
+
const [, setFetchedExternalSnapshot] = useState<{
|
|
1316
1316
|
url: string;
|
|
1317
1317
|
html: string;
|
|
1318
1318
|
} | null>(null);
|
|
@@ -1433,11 +1433,7 @@ export function DesignCanvas({
|
|
|
1433
1433
|
(sourceType === "localhost" || sourceType === "fusion") &&
|
|
1434
1434
|
Boolean(rawExternalPreviewUrl) &&
|
|
1435
1435
|
Boolean(onRuntimeLayerSnapshot);
|
|
1436
|
-
|
|
1437
|
-
externalSnapshotHtml ??
|
|
1438
|
-
(fetchedExternalSnapshot?.url === rawExternalPreviewUrl
|
|
1439
|
-
? fetchedExternalSnapshot.html
|
|
1440
|
-
: undefined);
|
|
1436
|
+
|
|
1441
1437
|
// Bake a neutral scale of 1 here (not the zoom-folded scale): this script is
|
|
1442
1438
|
// registered with the localhost bridge via a large POST, so folding live zoom
|
|
1443
1439
|
// in would re-fire the registration effect on every zoom tick. Live scale is
|
|
@@ -4076,8 +4072,17 @@ export function DesignCanvas({
|
|
|
4076
4072
|
preserveTextEditingSession?: boolean;
|
|
4077
4073
|
},
|
|
4078
4074
|
) => {
|
|
4075
|
+
// Raw content here drops the injected offset/background styles, moving a
|
|
4076
|
+
// frame authored at a negative offset off screen. Both channels push the
|
|
4077
|
+
// same shape.
|
|
4079
4078
|
const replaced = replacePreviewContent(
|
|
4080
|
-
|
|
4079
|
+
getEmbeddedFrameDocumentContent({
|
|
4080
|
+
content: withLocalRuntimes(nextContent),
|
|
4081
|
+
embeddedFrameBackground,
|
|
4082
|
+
transparentBackground,
|
|
4083
|
+
contentOffsetX: embeddedFrame?.contentOffsetX ?? 0,
|
|
4084
|
+
contentOffsetY: embeddedFrame?.contentOffsetY ?? 0,
|
|
4085
|
+
}),
|
|
4081
4086
|
selector,
|
|
4082
4087
|
candidates,
|
|
4083
4088
|
options,
|
|
@@ -4091,7 +4096,13 @@ export function DesignCanvas({
|
|
|
4091
4096
|
}
|
|
4092
4097
|
return replaced;
|
|
4093
4098
|
},
|
|
4094
|
-
[
|
|
4099
|
+
[
|
|
4100
|
+
embeddedFrame?.contentOffsetX,
|
|
4101
|
+
embeddedFrame?.contentOffsetY,
|
|
4102
|
+
embeddedFrameBackground,
|
|
4103
|
+
replacePreviewContent,
|
|
4104
|
+
transparentBackground,
|
|
4105
|
+
],
|
|
4095
4106
|
);
|
|
4096
4107
|
|
|
4097
4108
|
const replaceRuntimeContentInPlace = useCallback(
|
|
@@ -1,94 +1,24 @@
|
|
|
1
|
-
import {
|
|
2
|
-
useActionMutation,
|
|
3
|
-
useActionQuery,
|
|
4
|
-
} from "@agent-native/core/client/hooks";
|
|
5
1
|
import { useT } from "@agent-native/core/client/i18n";
|
|
6
2
|
import type { TweakDefinition } from "@shared/api";
|
|
7
|
-
import {
|
|
8
|
-
getBreakpointOverrideState,
|
|
9
|
-
type BreakpointOverrideState,
|
|
10
|
-
} from "@shared/breakpoint-media";
|
|
11
|
-
import {
|
|
12
|
-
composeTransform3D,
|
|
13
|
-
isTransform3DActive,
|
|
14
|
-
parseTransform3DParts,
|
|
15
|
-
type Transform3DParts,
|
|
16
|
-
} from "@shared/canvas-math";
|
|
17
|
-
import {
|
|
18
|
-
alphaToOpacity,
|
|
19
|
-
parseCssColor,
|
|
20
|
-
rgbaToCss,
|
|
21
|
-
rgbaToHex,
|
|
22
|
-
withColorOpacity,
|
|
23
|
-
} from "@shared/color-utils";
|
|
24
|
-
import { propNameToDataAttribute } from "@shared/component-model";
|
|
3
|
+
import { alphaToOpacity, parseCssColor } from "@shared/color-utils";
|
|
25
4
|
import {
|
|
26
5
|
listInteractionStates,
|
|
27
6
|
readResolvedStateStyles,
|
|
28
7
|
type InteractionState,
|
|
29
8
|
} from "@shared/interaction-states";
|
|
30
9
|
import {
|
|
31
|
-
IconAlignCenter,
|
|
32
|
-
IconAlignJustified,
|
|
33
|
-
IconAlignLeft,
|
|
34
|
-
IconAlignRight,
|
|
35
|
-
IconAngle,
|
|
36
|
-
IconArrowAutofitHeight,
|
|
37
|
-
IconArrowAutofitWidth,
|
|
38
|
-
IconArrowRight,
|
|
39
|
-
IconAxisX,
|
|
40
|
-
IconAxisY,
|
|
41
|
-
IconBackground,
|
|
42
|
-
IconBlur,
|
|
43
|
-
IconBorderCorners,
|
|
44
|
-
IconBorderRadius,
|
|
45
|
-
IconBorderStyle,
|
|
46
|
-
IconCheck,
|
|
47
10
|
IconChevronDown,
|
|
48
11
|
IconChevronRight,
|
|
49
12
|
IconCode,
|
|
50
13
|
IconComponents,
|
|
51
14
|
IconDeviceMobile,
|
|
52
15
|
IconExternalLink,
|
|
53
|
-
IconDroplet,
|
|
54
|
-
IconEye,
|
|
55
|
-
IconEyeOff,
|
|
56
|
-
IconFlipHorizontal,
|
|
57
|
-
IconFlipVertical,
|
|
58
16
|
IconFrame,
|
|
59
|
-
IconGridDots,
|
|
60
|
-
IconGripVertical,
|
|
61
|
-
IconLayoutDistributeHorizontal,
|
|
62
|
-
IconLayoutGrid,
|
|
63
|
-
IconLoader2,
|
|
64
|
-
IconLayoutAlignBottom,
|
|
65
|
-
IconLayoutAlignCenter,
|
|
66
|
-
IconLayoutAlignLeft,
|
|
67
|
-
IconLayoutAlignMiddle,
|
|
68
|
-
IconLayoutAlignRight,
|
|
69
|
-
IconLayoutAlignTop,
|
|
70
|
-
IconLetterCase,
|
|
71
|
-
IconLetterSpacing,
|
|
72
|
-
IconLineHeight,
|
|
73
|
-
IconLink,
|
|
74
|
-
IconLinkOff,
|
|
75
|
-
IconMinus,
|
|
76
|
-
IconPerspective,
|
|
77
17
|
IconPhoto,
|
|
78
18
|
IconPlus,
|
|
79
|
-
IconRadiusBottomLeft,
|
|
80
|
-
IconRadiusBottomRight,
|
|
81
|
-
IconRadiusTopLeft,
|
|
82
|
-
IconRadiusTopRight,
|
|
83
19
|
IconRefresh,
|
|
84
|
-
IconRotate3d,
|
|
85
|
-
IconShadow,
|
|
86
|
-
IconSquare,
|
|
87
|
-
IconUnlink,
|
|
88
20
|
IconVector,
|
|
89
|
-
IconWaveSine,
|
|
90
21
|
} from "@tabler/icons-react";
|
|
91
|
-
import { useQueryClient } from "@tanstack/react-query";
|
|
92
22
|
import {
|
|
93
23
|
memo,
|
|
94
24
|
useCallback,
|
|
@@ -96,20 +26,10 @@ import {
|
|
|
96
26
|
useMemo,
|
|
97
27
|
useRef,
|
|
98
28
|
useState,
|
|
99
|
-
type DragEvent,
|
|
100
29
|
type ReactNode,
|
|
101
30
|
} from "react";
|
|
102
|
-
import { useParams } from "react-router";
|
|
103
|
-
import { toast } from "sonner";
|
|
104
31
|
|
|
105
32
|
import { Button } from "@/components/ui/button";
|
|
106
|
-
import {
|
|
107
|
-
DropdownMenu,
|
|
108
|
-
DropdownMenuContent,
|
|
109
|
-
DropdownMenuItem,
|
|
110
|
-
DropdownMenuSeparator,
|
|
111
|
-
DropdownMenuTrigger,
|
|
112
|
-
} from "@/components/ui/dropdown-menu";
|
|
113
33
|
import { Input } from "@/components/ui/input";
|
|
114
34
|
import { Label } from "@/components/ui/label";
|
|
115
35
|
import {
|
|
@@ -117,15 +37,6 @@ import {
|
|
|
117
37
|
PopoverContent,
|
|
118
38
|
PopoverTrigger,
|
|
119
39
|
} from "@/components/ui/popover";
|
|
120
|
-
import {
|
|
121
|
-
Select,
|
|
122
|
-
SelectContent,
|
|
123
|
-
SelectItem,
|
|
124
|
-
SelectTrigger,
|
|
125
|
-
SelectValue,
|
|
126
|
-
} from "@/components/ui/select";
|
|
127
|
-
import { Slider } from "@/components/ui/slider";
|
|
128
|
-
import { Switch } from "@/components/ui/switch";
|
|
129
40
|
import { Tabs, TabsList, TabsTrigger } from "@/components/ui/tabs";
|
|
130
41
|
import {
|
|
131
42
|
Tooltip,
|
|
@@ -135,11 +46,7 @@ import {
|
|
|
135
46
|
} from "@/components/ui/tooltip";
|
|
136
47
|
import { cn } from "@/lib/utils";
|
|
137
48
|
|
|
138
|
-
import {
|
|
139
|
-
AppearanceProperties,
|
|
140
|
-
AppearanceScrubField,
|
|
141
|
-
CornerRadiusControl,
|
|
142
|
-
} from "./edit-panel/appearance-properties";
|
|
49
|
+
import { AppearanceProperties } from "./edit-panel/appearance-properties";
|
|
143
50
|
import {
|
|
144
51
|
alpineDataValueLiteral,
|
|
145
52
|
canRebuildAlpineDataLosslessly,
|
|
@@ -163,54 +70,27 @@ import {
|
|
|
163
70
|
} from "./edit-panel/document-colors";
|
|
164
71
|
import { EffectsProperties } from "./edit-panel/effects-properties";
|
|
165
72
|
import {
|
|
166
|
-
autoLayoutAlignmentFromStyles,
|
|
167
|
-
availableSizingForElement,
|
|
168
|
-
commitElementMinMax,
|
|
169
|
-
commitElementSizing,
|
|
170
|
-
componentNameForElementInfo,
|
|
171
|
-
cssElementSize,
|
|
172
|
-
displayLabel,
|
|
173
73
|
elementIsComponentSelection,
|
|
174
|
-
horizontalToJustify,
|
|
175
|
-
inferElementSizing,
|
|
176
74
|
inspectorObjectTitle,
|
|
177
75
|
isContainerElement,
|
|
178
|
-
isParentFlex,
|
|
179
|
-
isParentGrid,
|
|
180
76
|
isTextElement,
|
|
181
|
-
justifyToHorizontal,
|
|
182
|
-
parentFlexDirection,
|
|
183
|
-
readElementMinMax,
|
|
184
77
|
TEXT_TAGS,
|
|
185
|
-
verticalToAlign,
|
|
186
78
|
} from "./edit-panel/element-classification";
|
|
187
79
|
import {
|
|
188
80
|
deriveLockedAspectSize,
|
|
189
81
|
interactionStateSelectionKey,
|
|
190
|
-
useAspectRatioLock,
|
|
191
82
|
} from "./edit-panel/element-identity";
|
|
192
|
-
import {
|
|
193
|
-
commitStylePatch,
|
|
194
|
-
DesignSpacingControl,
|
|
195
|
-
FieldTrailer,
|
|
196
|
-
ScrubStyleInput,
|
|
197
|
-
} from "./edit-panel/field-primitives";
|
|
83
|
+
import { commitStylePatch } from "./edit-panel/field-primitives";
|
|
198
84
|
import {
|
|
199
85
|
averageGradientOpacity,
|
|
200
86
|
buildGradientLayer,
|
|
201
87
|
DEFAULT_EXPORT_SETTINGS,
|
|
202
|
-
defaultGradientLayer,
|
|
203
88
|
defaultGradientStops,
|
|
204
|
-
clampNumber,
|
|
205
|
-
fillLayerId,
|
|
206
|
-
fillLayerIndex,
|
|
207
89
|
type FillLayerArrays,
|
|
208
|
-
gradientLabel,
|
|
209
90
|
isLayerHiddenBySize,
|
|
210
91
|
joinCssLayers,
|
|
211
92
|
parseGradientLayer,
|
|
212
93
|
removeFillLayerAtIndex,
|
|
213
|
-
SOLID_FILL_ID,
|
|
214
94
|
solidToGradientPatch,
|
|
215
95
|
splitCssLayers,
|
|
216
96
|
withLayerSizeMarker,
|
|
@@ -218,13 +98,7 @@ import {
|
|
|
218
98
|
import { FillProperties } from "./edit-panel/fill-properties";
|
|
219
99
|
import { FramePresetsPanel } from "./edit-panel/frame-presets-panel";
|
|
220
100
|
import type { InspectCodeSourceLocation } from "./edit-panel/inspect-code-source";
|
|
221
|
-
import {
|
|
222
|
-
InspectorIconButton,
|
|
223
|
-
InspectorSegment,
|
|
224
|
-
RowDragHandle,
|
|
225
|
-
SectionIconButton,
|
|
226
|
-
useRowDragReorder,
|
|
227
|
-
} from "./edit-panel/inspector-controls";
|
|
101
|
+
import { SectionIconButton } from "./edit-panel/inspector-controls";
|
|
228
102
|
import {
|
|
229
103
|
authoredStyleValue,
|
|
230
104
|
elementWithInteractionStateStyles,
|
|
@@ -236,18 +110,13 @@ import {
|
|
|
236
110
|
} from "./edit-panel/layout-properties";
|
|
237
111
|
import {
|
|
238
112
|
ColorInput,
|
|
239
|
-
FieldLabel,
|
|
240
113
|
PanelSection,
|
|
241
114
|
PropInput,
|
|
242
115
|
PropSelect,
|
|
243
|
-
PropSlider,
|
|
244
116
|
SubsectionLabel,
|
|
245
117
|
} from "./edit-panel/panel-primitives";
|
|
246
118
|
import {
|
|
247
|
-
colorHasVisibleAlpha,
|
|
248
|
-
compactCssValue,
|
|
249
119
|
cssColorOrFallback,
|
|
250
|
-
cssLengthNumber,
|
|
251
120
|
fourValuesEqual,
|
|
252
121
|
outlineOffsetForPosition,
|
|
253
122
|
readStrokeOutlinePosition,
|
|
@@ -255,86 +124,41 @@ import {
|
|
|
255
124
|
resolveTextStrokeColor,
|
|
256
125
|
roundToOneDecimal,
|
|
257
126
|
strokeHiddenByColor,
|
|
258
|
-
strokeIsVisible,
|
|
259
127
|
swatchStyle,
|
|
260
128
|
textStrokeIsVisible,
|
|
261
129
|
} from "./edit-panel/position-helpers";
|
|
262
130
|
import { PositionLayoutProperties } from "./edit-panel/position-layout-properties";
|
|
263
|
-
import {
|
|
264
|
-
isMixedValue,
|
|
265
|
-
MIXED_VALUE,
|
|
266
|
-
mixedElementFromSelection,
|
|
267
|
-
sameOrMixed,
|
|
268
|
-
} from "./edit-panel/selection-helpers";
|
|
131
|
+
import { mixedElementFromSelection } from "./edit-panel/selection-helpers";
|
|
269
132
|
import { StrokeProperties } from "./edit-panel/stroke-properties";
|
|
270
133
|
import {
|
|
271
134
|
type BreakpointOverrideFieldContext,
|
|
272
135
|
type MotionKeyframeFieldContext,
|
|
273
|
-
resolveBreakpointOverride,
|
|
274
136
|
type StyleChangeHandler,
|
|
275
137
|
type StyleChangeMeta,
|
|
276
138
|
type StylesChangeHandler,
|
|
277
139
|
} from "./edit-panel/style-change-types";
|
|
278
|
-
import {
|
|
279
|
-
ALIGN_SELF_OPTIONS,
|
|
280
|
-
BLEND_MODE_OPTIONS,
|
|
281
|
-
optionValue,
|
|
282
|
-
parseNumericValue,
|
|
283
|
-
resolveLineHeight,
|
|
284
|
-
sidesAreLinked,
|
|
285
|
-
STROKE_POSITION_OPTIONS,
|
|
286
|
-
} from "./edit-panel/style-options";
|
|
287
140
|
import {
|
|
288
141
|
mergeRotationValue,
|
|
289
|
-
mergeTranslateFunction,
|
|
290
142
|
normalizeRotationDegrees,
|
|
291
|
-
parseRotationValue,
|
|
292
|
-
parseScaleValue,
|
|
293
143
|
} from "./edit-panel/transform-helpers";
|
|
294
144
|
import {
|
|
295
145
|
displayFontFamilyName,
|
|
296
146
|
FONT_FAMILY_OPTIONS,
|
|
297
|
-
FONT_WEIGHT_OPTIONS,
|
|
298
147
|
resolveFontFamilySelectValue,
|
|
299
|
-
splitFontFamilyList,
|
|
300
|
-
type TextResizeMode,
|
|
301
148
|
} from "./edit-panel/typography-helpers";
|
|
302
149
|
import { TypographyProperties } from "./edit-panel/typography-properties";
|
|
303
150
|
import {
|
|
304
|
-
AutoLayoutMatrix,
|
|
305
|
-
BreakpointOverrideIndicator,
|
|
306
|
-
ConstraintsPreview,
|
|
307
|
-
ConstraintsWidget,
|
|
308
151
|
ExportSettingsPanel,
|
|
309
152
|
DesignColorPicker,
|
|
310
|
-
FRAME_SIZE_PRESET_CATEGORIES,
|
|
311
|
-
MotionKeyframeDiamond,
|
|
312
|
-
motionPropertyHasKeyframe,
|
|
313
153
|
ScrubInput,
|
|
314
|
-
SizingField,
|
|
315
|
-
type AlignmentMatrixValue,
|
|
316
|
-
type AutoLayoutMatrixValue,
|
|
317
|
-
type AutoLayoutSizing,
|
|
318
|
-
type AutoLayoutSizingAxis,
|
|
319
|
-
type ConstraintsValue,
|
|
320
154
|
type ExportSettingsValue,
|
|
321
155
|
type FrameSizePreset,
|
|
322
|
-
type FrameSizePresetCategoryKey,
|
|
323
156
|
InteractionStatePanel,
|
|
324
157
|
type ActiveInteractionState,
|
|
325
|
-
type DesignFillRow,
|
|
326
|
-
type DesignGradientStop,
|
|
327
|
-
type DesignGradientType,
|
|
328
|
-
type ImageFillValue,
|
|
329
158
|
type MotionKeyframeCssProperty,
|
|
330
|
-
type ScrubInputChangeMeta,
|
|
331
159
|
} from "./inspector";
|
|
332
|
-
import {
|
|
333
|
-
import type
|
|
334
|
-
import {
|
|
335
|
-
GlslShaderEffectSection,
|
|
336
|
-
type GlslShaderPanelContext,
|
|
337
|
-
} from "./inspector/GlslShaderPanel";
|
|
160
|
+
import { IconText } from "./inspector/design-icons";
|
|
161
|
+
import { type GlslShaderPanelContext } from "./inspector/GlslShaderPanel";
|
|
338
162
|
import {
|
|
339
163
|
ReviewCommentsPanel,
|
|
340
164
|
type ReviewCommentsPanelProps,
|
|
@@ -583,6 +407,8 @@ interface EditPanelProps {
|
|
|
583
407
|
* always shows this row) but no-op, since EditPanel has no selection
|
|
584
408
|
* bbox/parent geometry of its own to act on.
|
|
585
409
|
*/
|
|
410
|
+
/** Convert this container to freeform, pinning children where they render. */
|
|
411
|
+
onDisableAutoLayout?: (nodeId: string) => void;
|
|
586
412
|
onAlignSelection?: (
|
|
587
413
|
edge: "left" | "center-h" | "right" | "top" | "center-v" | "bottom",
|
|
588
414
|
) => void;
|
|
@@ -1837,6 +1663,7 @@ export const EditPanel = memo(function EditPanel({
|
|
|
1837
1663
|
activeTool,
|
|
1838
1664
|
onCreateScreenFromPreset,
|
|
1839
1665
|
onAlignSelection,
|
|
1666
|
+
onDisableAutoLayout,
|
|
1840
1667
|
onInteractionStateChange,
|
|
1841
1668
|
availableInteractionStates,
|
|
1842
1669
|
onEditCode,
|
|
@@ -2360,6 +2187,7 @@ export const EditPanel = memo(function EditPanel({
|
|
|
2360
2187
|
element={stateResolvedInspectorElement ?? inspectorElement}
|
|
2361
2188
|
onStyleChange={onStyleChange}
|
|
2362
2189
|
onStylesChange={onStylesChange}
|
|
2190
|
+
onDisableAutoLayout={onDisableAutoLayout}
|
|
2363
2191
|
motionKeyframeContext={motionKeyframeFieldContext}
|
|
2364
2192
|
breakpointOverrideContext={breakpointOverrideFieldContext}
|
|
2365
2193
|
/>
|
|
@@ -2258,7 +2258,11 @@ export const MultiScreenCanvas = memo(function MultiScreenCanvas({
|
|
|
2258
2258
|
sourceScreenId !== boardFileId &&
|
|
2259
2259
|
boardFileId &&
|
|
2260
2260
|
boardFrameGeometry &&
|
|
2261
|
-
|
|
2261
|
+
boardSurfaceRenderGeometry &&
|
|
2262
|
+
// boardFrameGeometry is a 131,072px square centred on the origin, so
|
|
2263
|
+
// testing against it makes every pointer a board hit and silently
|
|
2264
|
+
// relocates the layer into an invisible file.
|
|
2265
|
+
geometryContainsPoint(boardSurfaceRenderGeometry, boardPoint)
|
|
2262
2266
|
) {
|
|
2263
2267
|
const nextTarget = { id: boardFileId, geometry: boardFrameGeometry };
|
|
2264
2268
|
if (crossScreenTargetRef.current?.id !== boardFileId) {
|
|
@@ -2323,14 +2327,27 @@ export const MultiScreenCanvas = memo(function MultiScreenCanvas({
|
|
|
2323
2327
|
? "discarded — pointer never left the source screen"
|
|
2324
2328
|
: candidate
|
|
2325
2329
|
? "moving into candidate"
|
|
2326
|
-
: "no candidate
|
|
2330
|
+
: "no candidate — refused unless over the board surface",
|
|
2327
2331
|
});
|
|
2332
|
+
const boardSurfaceHit =
|
|
2333
|
+
!!boardFileId &&
|
|
2334
|
+
sourceScreenId !== boardFileId &&
|
|
2335
|
+
!!boardFrameGeometry &&
|
|
2336
|
+
!!boardSurfaceRenderGeometry &&
|
|
2337
|
+
geometryContainsPoint(boardSurfaceRenderGeometry, lastBoardPoint);
|
|
2328
2338
|
const targetCandidate =
|
|
2329
2339
|
candidate ??
|
|
2330
|
-
(
|
|
2340
|
+
(boardSurfaceHit && boardFileId && boardFrameGeometry
|
|
2331
2341
|
? { id: boardFileId, geometry: boardFrameGeometry }
|
|
2332
2342
|
: null);
|
|
2333
|
-
if (!targetCandidate)
|
|
2343
|
+
if (!targetCandidate) {
|
|
2344
|
+
trace("drop", "refused", {
|
|
2345
|
+
reason: "no screen under the pointer and not over the board surface",
|
|
2346
|
+
sourceScreen: sourceScreenId,
|
|
2347
|
+
lastBoardPoint,
|
|
2348
|
+
});
|
|
2349
|
+
return;
|
|
2350
|
+
}
|
|
2334
2351
|
|
|
2335
2352
|
if (targetCandidate.id === boardFileId) {
|
|
2336
2353
|
void runHitTest(targetCandidate, lastBoardPoint).then(
|
|
@@ -69,16 +69,12 @@ export function QuestionFlow({
|
|
|
69
69
|
return v.trim().length > 0;
|
|
70
70
|
return hasGuidedAnswer(v);
|
|
71
71
|
};
|
|
72
|
-
|
|
72
|
+
|
|
73
73
|
const requiredQuestions = guidedQuestions.filter(
|
|
74
74
|
(question) => question.required,
|
|
75
75
|
);
|
|
76
76
|
const requiredAnswered = requiredQuestions.filter(isAnswered).length;
|
|
77
77
|
const allRequiredAnswered = requiredAnswered === requiredQuestions.length;
|
|
78
|
-
const progress =
|
|
79
|
-
guidedQuestions.length === 0
|
|
80
|
-
? 0
|
|
81
|
-
: Math.round((answeredCount / guidedQuestions.length) * 100);
|
|
82
78
|
|
|
83
79
|
return (
|
|
84
80
|
/* `items-start` is what makes the trailing space real: stretched, this
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
*/
|
|
26
26
|
|
|
27
27
|
import { execSync } from "node:child_process";
|
|
28
|
-
import { readdirSync,
|
|
28
|
+
import { readdirSync, writeFileSync } from "node:fs";
|
|
29
29
|
import { join, resolve } from "node:path";
|
|
30
30
|
import { fileURLToPath } from "node:url";
|
|
31
31
|
|