@agent-native/core-corpus 0.213.1 → 0.216.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/actions/references/action-fields.md +1 -1
- package/corpus/templates/analytics/CHANGELOG.md +1 -0
- package/corpus/templates/analytics/changelog/2026-10-21-session-replay-quotas-count-the-compressed-size-analytics-st.md +6 -0
- package/corpus/templates/analytics/server/lib/session-replay.ts +40 -9
- package/corpus/templates/assets/.agents/skills/actions/references/action-fields.md +1 -1
- package/corpus/templates/brain/.agents/skills/actions/references/action-fields.md +1 -1
- package/corpus/templates/calendar/.agents/skills/actions/references/action-fields.md +1 -1
- package/corpus/templates/chat/.agents/skills/actions/references/action-fields.md +1 -1
- package/corpus/templates/clips/.agents/skills/actions/references/action-fields.md +1 -1
- package/corpus/templates/community/qr/package.json +1 -1
- package/corpus/templates/content/.agents/skills/actions/references/action-fields.md +1 -1
- package/corpus/templates/content/.agents/skills/content-product-development/references/verification.md +36 -0
- package/corpus/templates/content/.agents/skills/document-editing/SKILL.md +10 -0
- package/corpus/templates/content/.agents/skills/document-editing/references/databases.md +26 -1
- package/corpus/templates/content/.agents/skills/notion-integration/SKILL.md +4 -2
- package/corpus/templates/content/CHANGELOG.md +51 -0
- package/corpus/templates/content/acceptance/_writers.ts +604 -0
- package/corpus/templates/content/acceptance/generate-action-registry.ts +10 -0
- package/corpus/templates/content/acceptance/golden/gate-off-stored-bytes/create-document.json +75 -0
- package/corpus/templates/content/acceptance/golden/gate-off-stored-bytes/duplicate-page.json +75 -0
- package/corpus/templates/content/acceptance/golden/gate-off-stored-bytes/edit-document-find-and-replace-without-a-revision.json +75 -0
- package/corpus/templates/content/acceptance/golden/gate-off-stored-bytes/edit-document-find-and-replace.json +75 -0
- package/corpus/templates/content/acceptance/golden/gate-off-stored-bytes/edit-document-initializecontent.json +75 -0
- package/corpus/templates/content/acceptance/golden/gate-off-stored-bytes/import-content.json +75 -0
- package/corpus/templates/content/acceptance/golden/gate-off-stored-bytes/local-files-import-content-source-existing-page.json +75 -0
- package/corpus/templates/content/acceptance/golden/gate-off-stored-bytes/local-files-import-content-source-new-page.json +75 -0
- package/corpus/templates/content/acceptance/golden/gate-off-stored-bytes/local-files-sync-local-folder-source-changed-file.json +75 -0
- package/corpus/templates/content/acceptance/golden/gate-off-stored-bytes/local-files-sync-local-folder-source-new-file.json +75 -0
- package/corpus/templates/content/acceptance/golden/gate-off-stored-bytes/restore-document-version.json +75 -0
- package/corpus/templates/content/acceptance/golden/gate-off-stored-bytes/set-document-property-primary-blocks-field.json +75 -0
- package/corpus/templates/content/acceptance/golden/gate-off-stored-bytes/set-image-alt-text.json +75 -0
- package/corpus/templates/content/acceptance/golden/gate-off-stored-bytes/undo-content-import.json +75 -0
- package/corpus/templates/content/acceptance/golden/gate-off-stored-bytes/update-document-browser-full-rewrite.json +75 -0
- package/corpus/templates/content/acceptance/known-loss.ts +69 -0
- package/corpus/templates/content/acceptance/round-trip-corpus.ts +1397 -0
- package/corpus/templates/content/actions/_blocks-field-identity.ts +35 -1
- package/corpus/templates/content/actions/_content-database-lifecycle.ts +11 -11
- package/corpus/templates/content/actions/_content-database-personal-view.ts +2 -0
- package/corpus/templates/content/actions/_content-favorites.ts +37 -0
- package/corpus/templates/content/actions/_database-membership-lock.ts +39 -8
- package/corpus/templates/content/actions/_database-navigation.ts +19 -21
- package/corpus/templates/content/actions/_database-row-batch.ts +41 -18
- package/corpus/templates/content/actions/_database-row-mutation.ts +17 -28
- package/corpus/templates/content/actions/_database-source-utils.ts +18 -1
- package/corpus/templates/content/actions/_database-utils.ts +3 -0
- package/corpus/templates/content/actions/_database-view-setup.ts +321 -11
- package/corpus/templates/content/actions/_document-edit-mutation.ts +33 -32
- package/corpus/templates/content/actions/_document-flush.ts +593 -171
- package/corpus/templates/content/actions/_document-save-locks.ts +54 -0
- package/corpus/templates/content/actions/_document-save-row.ts +133 -0
- package/corpus/templates/content/actions/_github-source.ts +18 -8
- package/corpus/templates/content/actions/_move-page-to-space.ts +189 -25
- package/corpus/templates/content/actions/_nfm-syntax.ts +2 -0
- package/corpus/templates/content/actions/_property-utils.ts +3 -0
- package/corpus/templates/content/actions/_row-lock-order.ts +115 -0
- package/corpus/templates/content/actions/create-content-database.ts +11 -0
- package/corpus/templates/content/actions/create-document.ts +13 -1
- package/corpus/templates/content/actions/delete-content-database.ts +17 -14
- package/corpus/templates/content/actions/delete-document-property.ts +5 -0
- package/corpus/templates/content/actions/delete-document.ts +270 -97
- package/corpus/templates/content/actions/edit-document.ts +18 -5
- package/corpus/templates/content/actions/export-document.ts +3 -0
- package/corpus/templates/content/actions/get-blocks-field-word-count.ts +22 -5
- package/corpus/templates/content/actions/import-content-source.ts +170 -54
- package/corpus/templates/content/actions/move-document.ts +191 -73
- package/corpus/templates/content/actions/pull-document.ts +8 -2
- package/corpus/templates/content/actions/remove-database-items.ts +23 -4
- package/corpus/templates/content/actions/restore-content-database.ts +76 -55
- package/corpus/templates/content/actions/restore-document-version.ts +19 -35
- package/corpus/templates/content/actions/restore-document.ts +65 -53
- package/corpus/templates/content/actions/rollback-created-slash-document.ts +11 -16
- package/corpus/templates/content/actions/set-document-property.ts +15 -1
- package/corpus/templates/content/actions/share-local-file-document.ts +18 -14
- package/corpus/templates/content/actions/suggest-document-edit.ts +2 -3
- package/corpus/templates/content/actions/sync-local-folder-source.ts +35 -1
- package/corpus/templates/content/actions/undo-content-import.ts +16 -12
- package/corpus/templates/content/actions/update-content-database-view.ts +20 -2
- package/corpus/templates/content/actions/update-document.ts +19 -14
- package/corpus/templates/content/actions/view-screen.ts +12 -0
- package/corpus/templates/content/app/components/editor/BubbleToolbar.tsx +1 -6
- package/corpus/templates/content/app/components/editor/CommentsSidebar.tsx +49 -3
- package/corpus/templates/content/app/components/editor/ContentImportDialog.tsx +2 -0
- package/corpus/templates/content/app/components/editor/DocumentBlockFields.tsx +53 -11
- package/corpus/templates/content/app/components/editor/DocumentEditor.tsx +608 -353
- package/corpus/templates/content/app/components/editor/StaticDocumentBody.tsx +765 -0
- package/corpus/templates/content/app/components/editor/VisualEditor.tsx +233 -80
- package/corpus/templates/content/app/components/editor/blockFieldSaveController.ts +32 -3
- package/corpus/templates/content/app/components/editor/blockFieldSaveRegistry.ts +88 -23
- package/corpus/templates/content/app/components/editor/comment-anchors.ts +19 -0
- package/corpus/templates/content/app/components/editor/database/DatabaseView.tsx +296 -87
- package/corpus/templates/content/app/components/editor/database/ListItemLayout.tsx +410 -0
- package/corpus/templates/content/app/components/editor/database/ListItemRow.tsx +426 -0
- package/corpus/templates/content/app/components/editor/database/ListView.tsx +136 -18
- package/corpus/templates/content/app/components/editor/database/navigation-state.ts +3 -0
- package/corpus/templates/content/app/components/editor/database/settings.tsx +3 -3
- package/corpus/templates/content/app/components/editor/database/view-config.ts +4 -0
- package/corpus/templates/content/app/components/editor/document-flush-participant.ts +253 -0
- package/corpus/templates/content/app/components/editor/editor-transaction-meta.ts +28 -0
- package/corpus/templates/content/app/components/editor/extensions/AudioBlock.tsx +2 -1
- package/corpus/templates/content/app/components/editor/extensions/ImageBlock.tsx +27 -6
- package/corpus/templates/content/app/components/editor/extensions/LocalMdxComponentNode.tsx +0 -1
- package/corpus/templates/content/app/components/editor/extensions/NotionExtensions.tsx +4 -4
- package/corpus/templates/content/app/components/editor/extensions/SuggestionHighlight.ts +24 -2
- package/corpus/templates/content/app/components/editor/extensions/VideoBlock.tsx +25 -6
- package/corpus/templates/content/app/components/editor/pending-document-persistence.ts +59 -1
- package/corpus/templates/content/app/components/editor/stored-body-images.ts +27 -0
- package/corpus/templates/content/app/components/editor/suggestions/presentation-rebase.ts +17 -0
- package/corpus/templates/content/app/components/sidebar/DocumentSidebar.tsx +11 -4
- package/corpus/templates/content/app/components/trash/TrashBrowser.tsx +4 -1
- package/corpus/templates/content/app/global.css +34 -0
- package/corpus/templates/content/app/hooks/use-content-trash.ts +8 -0
- package/corpus/templates/content/app/i18n-data.ts +32 -0
- package/corpus/templates/content/app/import-messages.ts +25 -0
- package/corpus/templates/content/app/trash-messages.ts +16 -0
- package/corpus/templates/content/changelog/2026-10-16-a-page-open-in-a-tab-that-shows-it-s-in-the-trash-reopens-wi.md +6 -0
- package/corpus/templates/content/changelog/2026-10-16-a-page-restored-from-trash-returns-to-its-place-in-its-colle.md +6 -0
- package/corpus/templates/content/changelog/2026-10-16-agent-written-markdown-keeps-nested-lists-indented-with-spac.md +6 -0
- package/corpus/templates/content/changelog/2026-10-16-opening-a-page-you-can-edit-no-longer-rebuilds-its-editor-on.md +6 -0
- package/corpus/templates/content/changelog/2026-10-16-pages-moved-or-imported-at-the-same-time-can-no-longer-end-u.md +6 -0
- package/corpus/templates/content/changelog/2026-10-16-re-importing-a-markdown-export-of-a-page-no-longer-reports-t.md +6 -0
- package/corpus/templates/content/changelog/2026-10-16-saving-a-page-or-restoring-one-of-its-versions-no-longer-fai.md +6 -0
- package/corpus/templates/content/changelog/2026-10-17-agents-reading-a-page-you-have-open-no-longer-wait-or-fail-w.md +6 -0
- package/corpus/templates/content/changelog/2026-10-19-fresh-document-reads-require-confirmation-from-every-open-ed.md +6 -0
- package/corpus/templates/content/changelog/2026-10-19-list-rows-can-be-customized.md +6 -0
- package/corpus/templates/content/changelog/2026-10-19-list-views-fit-phone-screens.md +6 -0
- package/corpus/templates/content/changelog/2026-10-20-html-table-cells-preserve-a-trailing-backslash-when-opening-.md +6 -0
- package/corpus/templates/content/changelog/2026-10-20-preserve-empty-paragraph-colors-and-refuse-unsupported-inlin.md +6 -0
- package/corpus/templates/content/changelog/2026-10-20-the-advanced-filter-and-each-filter-group-inside-it-have-the.md +6 -0
- package/corpus/templates/content/changelog/2026-10-21-blocks-fields-keep-unconfirmed-saves-visible-and-agent-reads.md +6 -0
- package/corpus/templates/content/changelog/2026-10-21-preserve-compact-table-row-groups-and-report-invalid-block-colors.md +6 -0
- package/corpus/templates/content/changelog/2026-10-21-suggested-edits-show-an-agent-s-whole-reason-open-a-group-to.md +6 -0
- package/corpus/templates/content/changelog/2026-10-21-suggestions-keep-refusing-unmatched-emphasis-in-stored-markd.md +6 -0
- package/corpus/templates/content/changelog/2026-10-22-accept-remaining-and-reject-remaining-show-the-result-for-ev.md +6 -0
- package/corpus/templates/content/changelog/2026-10-22-accepting-a-group-of-suggested-edits-saves-faster-and-adds-o.md +6 -0
- package/corpus/templates/content/changelog/2026-10-22-agents-read-saved-page-text-after-failed-icon-change.md +6 -0
- package/corpus/templates/content/changelog/2026-10-22-changes-made-from-a-menu-or-popover-such-as-an-image-s-alt-t.md +6 -0
- package/corpus/templates/content/changelog/2026-10-22-text-an-agent-writes-inside-a-callout-column-or-synced-block.md +6 -0
- package/corpus/templates/content/e2e/auth-files.ts +28 -0
- package/corpus/templates/content/e2e/convergence-summary.ts +84 -29
- package/corpus/templates/content/e2e/gate-arm.ts +15 -0
- package/corpus/templates/content/e2e/global-setup.ts +43 -75
- package/corpus/templates/content/e2e/global-teardown.ts +34 -0
- package/corpus/templates/content/e2e/helpers.ts +598 -92
- package/corpus/templates/content/e2e/live-body-gate.ts +188 -0
- package/corpus/templates/content/e2e/playwright.config.ts +12 -3
- package/corpus/templates/content/e2e/server-identity.ts +47 -0
- package/corpus/templates/content/e2e/stored-form/collab-blocks.ts +123 -0
- package/corpus/templates/content/package.json +1 -1
- package/corpus/templates/content/scripts/_stored-form-census-kinds.ts +30 -2
- package/corpus/templates/content/scripts/historical-icon-apply.ts +9 -1
- package/corpus/templates/content/scripts/trace-startup.mjs +460 -133
- package/corpus/templates/content/server/db/exec.ts +58 -0
- package/corpus/templates/content/server/db/schema.ts +1 -0
- package/corpus/templates/content/server/lib/content-trash-purge.ts +208 -144
- package/corpus/templates/content/server/lib/document-metadata-updated-at.ts +43 -1
- package/corpus/templates/content/server/lib/document-revision.ts +23 -0
- package/corpus/templates/content/server/lib/live-body-writer.ts +199 -0
- package/corpus/templates/content/server/lib/notion-sync.ts +63 -29
- package/corpus/templates/content/server/lib/notion.ts +5 -5
- package/corpus/templates/content/server/lib/suggested-edits.ts +357 -230
- package/corpus/templates/content/server/plugins/db.ts +5 -0
- package/corpus/templates/content/server/routes/api/documents/[id]/move.patch.ts +50 -168
- package/corpus/templates/content/shared/api.ts +20 -0
- package/corpus/templates/content/shared/blocks-fields-manifest.ts +106 -0
- package/corpus/templates/content/shared/database-item-layout.ts +591 -0
- package/corpus/templates/content/shared/database-query.ts +192 -30
- package/corpus/templates/content/shared/document-export.ts +12 -14
- package/corpus/templates/content/shared/document-flush-protocol.ts +88 -0
- package/corpus/templates/content/shared/editor-save-state.ts +97 -0
- package/corpus/templates/content/shared/feature-flags.ts +10 -0
- package/corpus/templates/content/shared/import/markdown.ts +91 -7
- package/corpus/templates/content/shared/import/types.ts +2 -0
- package/corpus/templates/content/shared/inline-math.ts +6 -4
- package/corpus/templates/content/shared/nfm-fidelity.ts +247 -0
- package/corpus/templates/content/shared/nfm.ts +1933 -340
- package/corpus/templates/content/shared/suggestion-diff.ts +13 -0
- package/corpus/templates/content/shared/suggestion-formatting.ts +143 -20
- package/corpus/templates/content/shared/suggestion-text.ts +39 -0
- package/corpus/templates/content/vitest.config.ts +10 -0
- package/corpus/templates/crm/.agents/skills/actions/references/action-fields.md +1 -1
- package/corpus/templates/design/.agents/skills/actions/references/action-fields.md +1 -1
- package/corpus/templates/design/.agents/skills/native-effects/SKILL.md +9 -2
- package/corpus/templates/design/.generated/bridge/shader-fill-preview.generated.ts +3 -249
- package/corpus/templates/design/.generated/bridge/shader-runtime.generated.ts +5 -88
- package/corpus/templates/design/AGENTS.md +1 -3
- package/corpus/templates/design/CHANGELOG.md +32 -0
- package/corpus/templates/design/CODE_NATIVE_DESIGN_STUDIO_IMPLEMENTATION_PLAN.md +1 -6
- package/corpus/templates/design/DESIGN-STUDIO-PLAN.md +5 -7
- package/corpus/templates/design/actions/_native-local-export-server.ts +44 -31
- package/corpus/templates/design/actions/_native-render-contexts.ts +76 -21
- package/corpus/templates/design/actions/claim-native-local-export.ts +5 -0
- package/corpus/templates/design/actions/finish-native-local-export.ts +13 -2
- package/corpus/templates/design/actions/get-native-shader-approvals.ts +35 -0
- package/corpus/templates/design/actions/get-shader.ts +134 -219
- package/corpus/templates/design/actions/list-design-extensions.ts +3 -58
- package/corpus/templates/design/actions/request-native-local-export.ts +32 -6
- package/corpus/templates/design/actions/run-design-extension-action.ts +0 -29
- package/corpus/templates/design/app/components/design/DesignCanvas.tsx +131 -108
- package/corpus/templates/design/app/components/design/DesignExtensionsPanel.tsx +0 -218
- package/corpus/templates/design/app/components/design/DesignThumbnail.tsx +59 -3
- package/corpus/templates/design/app/components/design/EditPanel.tsx +35 -47
- package/corpus/templates/design/app/components/design/MultiScreenCanvas.tsx +242 -62
- package/corpus/templates/design/app/components/design/NativePreviewErrorBoundary.tsx +53 -0
- package/corpus/templates/design/app/components/design/bridge/codegen.ts +18 -3
- package/corpus/templates/design/app/components/design/bridge/native-composition-clock.ts +5 -4
- package/corpus/templates/design/app/components/design/bridge/native-dom.ts +37 -0
- package/corpus/templates/design/app/components/design/bridge/native-intrinsic-image.ts +2 -1
- package/corpus/templates/design/app/components/design/bridge/native-mesh-grid.ts +90 -0
- package/corpus/templates/design/app/components/design/bridge/native-opaque-public-asset.ts +363 -0
- package/corpus/templates/design/app/components/design/bridge/native-opaque-worker-lease.ts +179 -0
- package/corpus/templates/design/app/components/design/bridge/native-preview-geometry.ts +132 -7
- package/corpus/templates/design/app/components/design/bridge/native-preview-policy.ts +4 -0
- package/corpus/templates/design/app/components/design/bridge/native-preview-viewport-transport.ts +378 -0
- package/corpus/templates/design/app/components/design/bridge/native-scene-body-transform.ts +62 -0
- package/corpus/templates/design/app/components/design/bridge/native-scene-presentation-element.ts +10 -0
- package/corpus/templates/design/app/components/design/bridge/native-shader-runtime.bridge.ts +646 -167
- package/corpus/templates/design/app/components/design/bridge/native-source-provider.ts +246 -192
- package/corpus/templates/design/app/components/design/bridge/native-stateful-resource.ts +2 -2
- package/corpus/templates/design/app/components/design/bridge/native-stateless-compute.ts +5 -2
- package/corpus/templates/design/app/components/design/bridge/native-svg-source.ts +11 -1
- package/corpus/templates/design/app/components/design/bridge/native-worker-broker.ts +6 -0
- package/corpus/templates/design/app/components/design/bridge/native-worker-entry.ts +761 -303
- package/corpus/templates/design/app/components/design/bridge/native-worker-fill.ts +16 -6
- package/corpus/templates/design/app/components/design/bridge/native-worker-gpu.ts +854 -91
- package/corpus/templates/design/app/components/design/bridge/native-worker-host.ts +15 -1
- package/corpus/templates/design/app/components/design/bridge/native-worker-input-assets.ts +200 -0
- package/corpus/templates/design/app/components/design/bridge/native-worker-protocol.ts +40 -1
- package/corpus/templates/design/app/components/design/bridge/native-worker-scene-host.ts +425 -126
- package/corpus/templates/design/app/components/design/bridge/native-worker-source-snapshot.ts +21 -0
- package/corpus/templates/design/app/components/design/bridge/shader-fill-preview.bridge.ts +5 -371
- package/corpus/templates/design/app/components/design/bridge/shader-runtime.bridge.ts +4 -146
- package/corpus/templates/design/app/components/design/design-canvas/interact-document.ts +5 -9
- package/corpus/templates/design/app/components/design/design-canvas/native-preview-surface.ts +150 -0
- package/corpus/templates/design/app/components/design/design-canvas/native-public-asset-preview.ts +409 -0
- package/corpus/templates/design/app/components/design/design-canvas/native-public-worker-preview.ts +1086 -0
- package/corpus/templates/design/app/components/design/design-canvas/private-replay-screenshot-preview.ts +2 -2
- package/corpus/templates/design/app/components/design/edit-panel/effects-properties.tsx +15 -26
- package/corpus/templates/design/app/components/design/edit-panel/fill-properties.tsx +74 -67
- package/corpus/templates/design/app/components/design/edit-panel/panel-primitives.tsx +7 -19
- package/corpus/templates/design/app/components/design/inspector/DesignColorPicker.tsx +39 -30
- package/corpus/templates/design/app/components/design/inspector/GradientEditor.tsx +4 -0
- package/corpus/templates/design/app/components/design/inspector/NativeShaderColorControls.tsx +3 -7
- package/corpus/templates/design/app/components/design/inspector/NativeShaderPaintControls.tsx +12 -5
- package/corpus/templates/design/app/components/design/inspector/NativeShaderPanel.tsx +705 -190
- package/corpus/templates/design/app/components/design/inspector/fill-field-reading.ts +1 -2
- package/corpus/templates/design/app/components/design/inspector/index.ts +0 -6
- package/corpus/templates/design/app/components/design/inspector/native-catalog-display.ts +26 -5
- package/corpus/templates/design/app/components/design/inspector/native-shader-catalog-fixture.ts +42 -0
- package/corpus/templates/design/app/components/design/inspector/native-shader-catalog-preview.ts +51 -33
- package/corpus/templates/design/app/components/design/inspector/native-shader-paint.ts +1 -0
- package/corpus/templates/design/app/components/design/inspector/native-shader-property-draft.ts +89 -23
- package/corpus/templates/design/app/components/design/inspector/saved-glsl-shader.tsx +243 -0
- package/corpus/templates/design/app/components/design/multi-screen/board-surface-html.ts +54 -5
- package/corpus/templates/design/app/components/design/shader-source-coordination.ts +66 -0
- package/corpus/templates/design/app/components/design/use-native-shader-approvals.ts +36 -8
- package/corpus/templates/design/app/components/templates/TemplatePreview.tsx +60 -3
- package/corpus/templates/design/app/i18n/en-US.ts +78 -2
- package/corpus/templates/design/app/pages/Present.tsx +36 -1
- package/corpus/templates/design/app/pages/design-editor/commands/apply-file-content-update.ts +1 -1
- package/corpus/templates/design/app/pages/design-editor/commands/apply-local-content-update.ts +1 -1
- package/corpus/templates/design/app/pages/design-editor/commands/commit-visual-styles.ts +2 -3
- package/corpus/templates/design/app/pages/design-editor/commands/cross-screen-element-drop.ts +1 -1
- package/corpus/templates/design/app/pages/design-editor/commands/layer-move-to-screen.ts +1 -1
- package/corpus/templates/design/app/pages/design-editor/commands/paste-selection.ts +1 -1
- package/corpus/templates/design/app/pages/design-editor/commands/paste-svg-layer.ts +1 -1
- package/corpus/templates/design/app/pages/design-editor/commands/prepare-content-history-replay.ts +1 -1
- package/corpus/templates/design/app/pages/design-editor/commands/redo.ts +1 -1
- package/corpus/templates/design/app/pages/design-editor/commands/render-png-blob.ts +84 -41
- package/corpus/templates/design/app/pages/design-editor/commands/shader-source-edit.ts +1 -1
- package/corpus/templates/design/app/pages/design-editor/commands/undo.ts +1 -1
- package/corpus/templates/design/app/pages/design-editor/design-editor-view.tsx +0 -2
- package/corpus/templates/design/app/pages/design-editor/domains/use-editor-content-and-components.ts +4 -33
- package/corpus/templates/design/app/pages/design-editor/domains/use-editor-export-and-handoff.ts +2 -2
- package/corpus/templates/design/app/pages/design-editor/domains/use-editor-history.ts +0 -11
- package/corpus/templates/design/app/pages/design-editor/domains/use-editor-layer-models.ts +2 -55
- package/corpus/templates/design/app/pages/design-editor/domains/use-editor-screen-rendering.tsx +0 -3
- package/corpus/templates/design/app/pages/design-editor/domains/use-editor-selection-and-styles.ts +0 -24
- package/corpus/templates/design/app/pages/design-editor/text-edit-utils.ts +0 -16
- package/corpus/templates/design/app/pages/design-editor/use-native-local-export-requests.ts +70 -11
- package/corpus/templates/design/app/pages/design-editor/view/single-screen-canvas.tsx +0 -2
- package/corpus/templates/design/changelog/2026-10-20-folded-mesh-adds-an-animated-sculpted-fill-with-editable-col.md +6 -0
- package/corpus/templates/design/changelog/2026-10-20-read-only-design-views-render-native-shader-previews-in-nest.md +6 -0
- package/corpus/templates/design/changelog/2026-10-20-selected-screens-with-shader-effects-can-be-exported-togethe.md +6 -0
- package/corpus/templates/design/changelog/2026-10-20-shader-previews-reuse-validated-scene-data-while-panning-inc.md +6 -0
- package/corpus/templates/design/changelog/2026-10-20-shader-previews-stay-aligned-while-you-zoom.md +6 -0
- package/corpus/templates/design/changelog/2026-10-20-signed-out-sessions-no-longer-watch-for-private-png-export-r.md +6 -0
- package/corpus/templates/design/changelog/2026-10-21-effect-thumbnails-show-richer-previews.md +6 -0
- package/corpus/templates/design/changelog/2026-10-21-native-effects-render-across-previews.md +6 -0
- package/corpus/templates/design/changelog/2026-10-21-native-shader-previews-use-less-gpu-memory-when-many-mesh-ef.md +6 -0
- package/corpus/templates/design/changelog/2026-10-21-opening-design-no-longer-shows-png-export-errors-when-no-exp.md +6 -0
- package/corpus/templates/design/changelog/2026-10-21-pulsing-border-controls-grouped.md +6 -0
- package/corpus/templates/design/changelog/2026-10-21-pulsing-border-follows-element-outlines.md +6 -0
- package/corpus/templates/design/changelog/2026-10-21-remove-obsolete-shader-fills.md +6 -0
- package/corpus/templates/design/changelog/2026-10-21-shader-previews-recover-from-temporary-gpu-and-image-failure.md +6 -0
- package/corpus/templates/design/changelog/2026-10-22-shader-fills-and-effects-render-correctly-on-canvas-elements.md +6 -0
- package/corpus/templates/design/package.json +0 -1
- package/corpus/templates/design/playwright.config.ts +1 -1
- package/corpus/templates/design/scripts/runtime-budget-zoom.ts +9 -21
- package/corpus/templates/design/scripts/runtime-budget.ts +10 -24
- package/corpus/templates/design/server/plugins/agent-chat.ts +0 -2
- package/corpus/templates/design/shared/effect-graph.ts +46 -1
- package/corpus/templates/design/shared/generation-output-receipt.ts +0 -1
- package/corpus/templates/design/shared/native-effect-animation-capability.ts +6 -0
- package/corpus/templates/design/shared/native-effect-folded-mesh-v1.ts +268 -0
- package/corpus/templates/design/shared/native-effect-folded-mesh-v2.ts +310 -0
- package/corpus/templates/design/shared/native-effect-folded-mesh.ts +489 -0
- package/corpus/templates/design/shared/native-effect-gallery-additions.ts +2 -2
- package/corpus/templates/design/shared/native-effect-paint.ts +8 -0
- package/corpus/templates/design/shared/native-effect-parameter-constraints.ts +8 -1
- package/corpus/templates/design/shared/native-effect-presets.ts +18 -1
- package/corpus/templates/design/shared/native-effect-property-presentation.ts +81 -0
- package/corpus/templates/design/shared/native-effect-pulsing-border-v3.ts +281 -0
- package/corpus/templates/design/shared/native-effect-pulsing-border-v4.ts +284 -0
- package/corpus/templates/design/shared/native-effect-pulsing-border.ts +300 -0
- package/corpus/templates/design/shared/native-effect-trust.ts +6 -0
- package/corpus/templates/design/shared/native-effect-wgsl.ts +12 -0
- package/corpus/templates/design/shared/native-effects.ts +528 -15
- package/corpus/templates/design/shared/native-input-resources.ts +36 -0
- package/corpus/templates/design/shared/native-local-export.ts +14 -0
- package/corpus/templates/design/shared/native-parameter-animation.ts +1 -0
- package/corpus/templates/design/shared/native-pointer-input.ts +9 -11
- package/corpus/templates/design/shared/shader-fills.ts +0 -513
- package/corpus/templates/design/vitest.setup.ts +7 -1
- package/corpus/templates/dispatch/.agents/skills/actions/references/action-fields.md +1 -1
- package/corpus/templates/dispatch/.agents/skills/turn-into-app/SKILL.md +20 -18
- package/corpus/templates/factory/.agents/skills/actions/references/action-fields.md +1 -1
- package/corpus/templates/factory/.agents/skills/review-latest-feedback/SKILL.md +36 -80
- package/corpus/templates/factory/.agents/skills/review-latest-feedback/references/channel-inventory.md +54 -16
- package/corpus/templates/factory/.agents/skills/review-latest-feedback/references/slack-reaction-replies.md +50 -73
- package/corpus/templates/factory/.agents/skills/turn-into-app/SKILL.md +20 -18
- package/corpus/templates/forms/.agents/skills/actions/references/action-fields.md +1 -1
- package/corpus/templates/mail/.agents/skills/actions/references/action-fields.md +1 -1
- package/corpus/templates/plan/.agents/skills/actions/references/action-fields.md +1 -1
- package/corpus/templates/slides/.agents/skills/actions/references/action-fields.md +1 -1
- package/corpus/templates/slides-2/.agents/skills/actions/SKILL.md +199 -0
- package/corpus/templates/slides-2/.agents/skills/actions/references/action-fields.md +145 -0
- package/corpus/templates/slides-2/.agents/skills/actions/references/examples.md +96 -0
- package/corpus/templates/slides-2/.agents/skills/actions/references/provider-apis.md +95 -0
- package/corpus/templates/slides-2/.agents/skills/adding-a-feature/SKILL.md +235 -0
- package/corpus/templates/slides-2/.agents/skills/agent-native-docs/SKILL.md +161 -0
- package/corpus/templates/slides-2/.agents/skills/agent-native-toolkit/SKILL.md +314 -0
- package/corpus/templates/slides-2/.agents/skills/analytics-data-for-decks/SKILL.md +44 -0
- package/corpus/templates/slides-2/.agents/skills/apply-slide-comments/SKILL.md +63 -0
- package/corpus/templates/slides-2/.agents/skills/client-side-routing/SKILL.md +87 -0
- package/corpus/templates/slides-2/.agents/skills/context-awareness/SKILL.md +282 -0
- package/corpus/templates/slides-2/.agents/skills/create-deck/SKILL.md +263 -0
- package/corpus/templates/slides-2/.agents/skills/create-deck/references/reference-inputs.md +72 -0
- package/corpus/templates/slides-2/.agents/skills/create-deck/references/slide-templates.md +93 -0
- package/corpus/templates/slides-2/.agents/skills/create-deck/references/source-material.md +16 -0
- package/corpus/templates/slides-2/.agents/skills/creative-context/SKILL.md +134 -0
- package/corpus/templates/slides-2/.agents/skills/customizing-agent-native/SKILL.md +219 -0
- package/corpus/templates/slides-2/.agents/skills/deck-management/SKILL.md +182 -0
- package/corpus/templates/slides-2/.agents/skills/delegate-to-agent/SKILL.md +62 -0
- package/corpus/templates/slides-2/.agents/skills/design-systems/SKILL.md +233 -0
- package/corpus/templates/slides-2/.agents/skills/external-agents/SKILL.md +549 -0
- package/corpus/templates/slides-2/.agents/skills/external-agents/references/mcp-apps-embedding.md +169 -0
- package/corpus/templates/slides-2/.agents/skills/frontend-design/SKILL.md +102 -0
- package/corpus/templates/slides-2/.agents/skills/frontend-design/references/visual-direction.md +102 -0
- package/corpus/templates/slides-2/.agents/skills/image-generation-via-a2a/SKILL.md +134 -0
- package/corpus/templates/slides-2/.agents/skills/performance/SKILL.md +79 -0
- package/corpus/templates/slides-2/.agents/skills/portability/SKILL.md +108 -0
- package/corpus/templates/slides-2/.agents/skills/real-time-sync/SKILL.md +146 -0
- package/corpus/templates/slides-2/.agents/skills/reliable-mutations/SKILL.md +72 -0
- package/corpus/templates/slides-2/.agents/skills/secrets/SKILL.md +82 -0
- package/corpus/templates/slides-2/.agents/skills/security/SKILL.md +80 -0
- package/corpus/templates/slides-2/.agents/skills/self-modifying-code/SKILL.md +123 -0
- package/corpus/templates/slides-2/.agents/skills/shadcn-ui/SKILL.md +71 -0
- package/corpus/templates/slides-2/.agents/skills/sharing/SKILL.md +286 -0
- package/corpus/templates/slides-2/.agents/skills/slide-design/SKILL.md +144 -0
- package/corpus/templates/slides-2/.agents/skills/slide-editing/SKILL.md +284 -0
- package/corpus/templates/slides-2/.agents/skills/slide-editing/references/animations.md +33 -0
- package/corpus/templates/slides-2/.agents/skills/slide-editing/references/freeform-objects.md +22 -0
- package/corpus/templates/slides-2/.agents/skills/slide-editing/references/restyling.md +69 -0
- package/corpus/templates/slides-2/.agents/skills/slide-editing/references/transitions.md +26 -0
- package/corpus/templates/slides-2/.agents/skills/slide-editing/references/video.md +45 -0
- package/corpus/templates/slides-2/.agents/skills/slide-images/SKILL.md +136 -0
- package/corpus/templates/slides-2/.agents/skills/storing-data/SKILL.md +234 -0
- package/corpus/templates/slides-2/.agents/skills/turn-into-skill/SKILL.md +112 -0
- package/corpus/templates/slides-2/.agents/skills/turn-into-skill/agents/openai.yaml +4 -0
- package/corpus/templates/slides-2/.agents/skills/workspace-conventions/SKILL.md +103 -0
- package/corpus/templates/slides-2/.builder/rules/deploy-app.mdc +22 -0
- package/corpus/templates/slides-2/.builder/rules/organize-ui.mdc +9 -0
- package/corpus/templates/slides-2/.dockerignore +61 -0
- package/corpus/templates/slides-2/.env.example +23 -0
- package/corpus/templates/slides-2/.ignore +3 -0
- package/corpus/templates/slides-2/.mcp.json +8 -0
- package/corpus/templates/slides-2/.oxfmtrc.json +8 -0
- package/corpus/templates/slides-2/AGENTS.md +66 -0
- package/corpus/templates/slides-2/CHANGELOG.md +76 -0
- package/corpus/templates/slides-2/DEVELOPING.md +157 -0
- package/corpus/templates/slides-2/README.md +58 -0
- package/corpus/templates/slides-2/THIRD_PARTY_NOTICES.md +33 -0
- package/corpus/templates/slides-2/_gitignore +38 -0
- package/corpus/templates/slides-2/actions/_agent-presence.ts +29 -0
- package/corpus/templates/slides-2/actions/_app-url.ts +37 -0
- package/corpus/templates/slides-2/actions/_deck-app-scope.ts +30 -0
- package/corpus/templates/slides-2/actions/_deck-tracking.ts +260 -0
- package/corpus/templates/slides-2/actions/_deck-write.ts +206 -0
- package/corpus/templates/slides-2/actions/_imported-slide-source.ts +162 -0
- package/corpus/templates/slides-2/actions/_inline-image-storage.ts +1013 -0
- package/corpus/templates/slides-2/actions/_linked-design-system.ts +83 -0
- package/corpus/templates/slides-2/actions/_presenter-notes.ts +83 -0
- package/corpus/templates/slides-2/actions/_render-artifacts.ts +111 -0
- package/corpus/templates/slides-2/actions/_slide-source.ts +344 -0
- package/corpus/templates/slides-2/actions/_tab-state.ts +51 -0
- package/corpus/templates/slides-2/actions/_test-brandfetch.ts +31 -0
- package/corpus/templates/slides-2/actions/_uploaded-files.ts +114 -0
- package/corpus/templates/slides-2/actions/add-deck.ts +123 -0
- package/corpus/templates/slides-2/actions/add-slide-comment.ts +267 -0
- package/corpus/templates/slides-2/actions/add-slide.ts +888 -0
- package/corpus/templates/slides-2/actions/analyze-brand-assets.ts +66 -0
- package/corpus/templates/slides-2/actions/apply-design-system.ts +111 -0
- package/corpus/templates/slides-2/actions/approve-deck-access-request.ts +287 -0
- package/corpus/templates/slides-2/actions/audit-contrast.ts +143 -0
- package/corpus/templates/slides-2/actions/check-image-gen.ts +17 -0
- package/corpus/templates/slides-2/actions/clone-context-slide.ts +340 -0
- package/corpus/templates/slides-2/actions/clone-creative-context-deck.ts +143 -0
- package/corpus/templates/slides-2/actions/control-deck-history.ts +186 -0
- package/corpus/templates/slides-2/actions/control-presenter.ts +117 -0
- package/corpus/templates/slides-2/actions/control-slide-editor.ts +267 -0
- package/corpus/templates/slides-2/actions/create-deck-from-template.ts +274 -0
- package/corpus/templates/slides-2/actions/create-deck.ts +1243 -0
- package/corpus/templates/slides-2/actions/create-design-system.ts +131 -0
- package/corpus/templates/slides-2/actions/create-share-link.ts +127 -0
- package/corpus/templates/slides-2/actions/db-health.ts +22 -0
- package/corpus/templates/slides-2/actions/delete-asset.ts +154 -0
- package/corpus/templates/slides-2/actions/delete-deck.ts +427 -0
- package/corpus/templates/slides-2/actions/delete-design-system.ts +167 -0
- package/corpus/templates/slides-2/actions/delete-slide-comment.ts +143 -0
- package/corpus/templates/slides-2/actions/delete-staged-dataset.ts +30 -0
- package/corpus/templates/slides-2/actions/duplicate-deck.ts +299 -0
- package/corpus/templates/slides-2/actions/export-google-slides.ts +41 -0
- package/corpus/templates/slides-2/actions/export-html.ts +770 -0
- package/corpus/templates/slides-2/actions/export-pptx.ts +2203 -0
- package/corpus/templates/slides-2/actions/extract-pdf.ts +49 -0
- package/corpus/templates/slides-2/actions/generate-image-api.ts +671 -0
- package/corpus/templates/slides-2/actions/generate-image.ts +492 -0
- package/corpus/templates/slides-2/actions/get-agent-access-deck.ts +52 -0
- package/corpus/templates/slides-2/actions/get-deck-access-status.ts +130 -0
- package/corpus/templates/slides-2/actions/get-deck-design-tokens.ts +62 -0
- package/corpus/templates/slides-2/actions/get-deck-reference-context.ts +232 -0
- package/corpus/templates/slides-2/actions/get-deck-template.ts +38 -0
- package/corpus/templates/slides-2/actions/get-deck-version.ts +85 -0
- package/corpus/templates/slides-2/actions/get-deck.ts +562 -0
- package/corpus/templates/slides-2/actions/get-design-system-decode-job-status.ts +57 -0
- package/corpus/templates/slides-2/actions/get-design-system-tier-limit.ts +12 -0
- package/corpus/templates/slides-2/actions/get-design-system.ts +453 -0
- package/corpus/templates/slides-2/actions/get-google-docs-status.ts +106 -0
- package/corpus/templates/slides-2/actions/get-google-picker-token.ts +84 -0
- package/corpus/templates/slides-2/actions/get-home-suggestions.ts +52 -0
- package/corpus/templates/slides-2/actions/get-layout-overflows.ts +192 -0
- package/corpus/templates/slides-2/actions/get-slide-render.ts +125 -0
- package/corpus/templates/slides-2/actions/get-slide-source.ts +115 -0
- package/corpus/templates/slides-2/actions/get-slide-theme-preview.ts +64 -0
- package/corpus/templates/slides-2/actions/get-slide-theme.ts +44 -0
- package/corpus/templates/slides-2/actions/get-slides-2-upload-storage-status.ts +17 -0
- package/corpus/templates/slides-2/actions/get-slides-notification-prefs.ts +37 -0
- package/corpus/templates/slides-2/actions/get-workspace-defaults.ts +51 -0
- package/corpus/templates/slides-2/actions/image-gen-status.ts +35 -0
- package/corpus/templates/slides-2/actions/import-code.ts +26 -0
- package/corpus/templates/slides-2/actions/import-design-project.ts +49 -0
- package/corpus/templates/slides-2/actions/import-document.ts +125 -0
- package/corpus/templates/slides-2/actions/import-docx.ts +57 -0
- package/corpus/templates/slides-2/actions/import-file.ts +1273 -0
- package/corpus/templates/slides-2/actions/import-from-url.ts +25 -0
- package/corpus/templates/slides-2/actions/import-google-doc.ts +208 -0
- package/corpus/templates/slides-2/actions/import-google-font.ts +110 -0
- package/corpus/templates/slides-2/actions/import-google-slides-reference.ts +667 -0
- package/corpus/templates/slides-2/actions/import-pptx.ts +564 -0
- package/corpus/templates/slides-2/actions/import-svgl-logo.ts +115 -0
- package/corpus/templates/slides-2/actions/index-design-system-with-builder.ts +181 -0
- package/corpus/templates/slides-2/actions/index-uploaded-design-system-files.ts +77 -0
- package/corpus/templates/slides-2/actions/list-assets.ts +286 -0
- package/corpus/templates/slides-2/actions/list-deck-templates.ts +83 -0
- package/corpus/templates/slides-2/actions/list-deck-versions.ts +185 -0
- package/corpus/templates/slides-2/actions/list-decks.ts +591 -0
- package/corpus/templates/slides-2/actions/list-design-systems.ts +180 -0
- package/corpus/templates/slides-2/actions/list-slide-comments.ts +128 -0
- package/corpus/templates/slides-2/actions/list-slide-themes.ts +17 -0
- package/corpus/templates/slides-2/actions/list-staged-datasets.ts +14 -0
- package/corpus/templates/slides-2/actions/logo-config.ts +13 -0
- package/corpus/templates/slides-2/actions/navigate.ts +158 -0
- package/corpus/templates/slides-2/actions/patch-deck.ts +2378 -0
- package/corpus/templates/slides-2/actions/provider-api-catalog.ts +25 -0
- package/corpus/templates/slides-2/actions/provider-api-docs.ts +83 -0
- package/corpus/templates/slides-2/actions/provider-api-request.ts +222 -0
- package/corpus/templates/slides-2/actions/query-staged-dataset.ts +83 -0
- package/corpus/templates/slides-2/actions/read-composer-source.ts +108 -0
- package/corpus/templates/slides-2/actions/request-deck-access.ts +803 -0
- package/corpus/templates/slides-2/actions/restore-deck-version.ts +203 -0
- package/corpus/templates/slides-2/actions/run.ts +2 -0
- package/corpus/templates/slides-2/actions/save-deck.ts +313 -0
- package/corpus/templates/slides-2/actions/search-google-fonts.ts +61 -0
- package/corpus/templates/slides-2/actions/search-images.ts +30 -0
- package/corpus/templates/slides-2/actions/search-logos.ts +23 -0
- package/corpus/templates/slides-2/actions/search-svgl-logos.ts +42 -0
- package/corpus/templates/slides-2/actions/set-default-design-system.ts +88 -0
- package/corpus/templates/slides-2/actions/set-workspace-defaults.ts +61 -0
- package/corpus/templates/slides-2/actions/start-design-system-upload.ts +80 -0
- package/corpus/templates/slides-2/actions/sync-design-system-with-builder.ts +84 -0
- package/corpus/templates/slides-2/actions/toggle-slide-comment-reaction.ts +150 -0
- package/corpus/templates/slides-2/actions/transform-slide-objects.ts +1528 -0
- package/corpus/templates/slides-2/actions/update-asset.ts +499 -0
- package/corpus/templates/slides-2/actions/update-deck-aspect-ratio.ts +95 -0
- package/corpus/templates/slides-2/actions/update-deck-design-tokens.ts +175 -0
- package/corpus/templates/slides-2/actions/update-design-system.ts +95 -0
- package/corpus/templates/slides-2/actions/update-slide-comment.ts +213 -0
- package/corpus/templates/slides-2/actions/update-slide-source.ts +353 -0
- package/corpus/templates/slides-2/actions/update-slide.ts +850 -0
- package/corpus/templates/slides-2/actions/update-slides-notification-prefs.ts +55 -0
- package/corpus/templates/slides-2/actions/view-screen.ts +1098 -0
- package/corpus/templates/slides-2/agent-native.app-skill.json +165 -0
- package/corpus/templates/slides-2/agent-native.config.ts +20 -0
- package/corpus/templates/slides-2/agent-native.json +18 -0
- package/corpus/templates/slides-2/app/components/ThemeToggle.tsx +47 -0
- package/corpus/templates/slides-2/app/components/comments/SlideCommentPins.tsx +781 -0
- package/corpus/templates/slides-2/app/components/comments/SlideCommentsPanel.tsx +1075 -0
- package/corpus/templates/slides-2/app/components/deck/DeckCard.tsx +304 -0
- package/corpus/templates/slides-2/app/components/deck/DeckFilterMenu.tsx +83 -0
- package/corpus/templates/slides-2/app/components/deck/ExcalidrawSlide.tsx +183 -0
- package/corpus/templates/slides-2/app/components/deck/MermaidRenderer.tsx +126 -0
- package/corpus/templates/slides-2/app/components/deck/SlideRenderer.tsx +1553 -0
- package/corpus/templates/slides-2/app/components/design-system/DesignSystemCard.tsx +235 -0
- package/corpus/templates/slides-2/app/components/design-system/DesignSystemSetup.tsx +2021 -0
- package/corpus/templates/slides-2/app/components/design-system/builder-design-system-upload.ts +200 -0
- package/corpus/templates/slides-2/app/components/design-system/builder-index-response.ts +104 -0
- package/corpus/templates/slides-2/app/components/editor/AddSlidePopover.tsx +461 -0
- package/corpus/templates/slides-2/app/components/editor/AiEditingMarker.tsx +24 -0
- package/corpus/templates/slides-2/app/components/editor/AlignmentGuides.tsx +82 -0
- package/corpus/templates/slides-2/app/components/editor/AnimationsPanel.tsx +698 -0
- package/corpus/templates/slides-2/app/components/editor/AppMenu.tsx +356 -0
- package/corpus/templates/slides-2/app/components/editor/AssetLibraryPanel.tsx +508 -0
- package/corpus/templates/slides-2/app/components/editor/BlockBubbleMenu.tsx +548 -0
- package/corpus/templates/slides-2/app/components/editor/DeckAccessDeniedPage.tsx +173 -0
- package/corpus/templates/slides-2/app/components/editor/DeckEditorSkeleton.tsx +35 -0
- package/corpus/templates/slides-2/app/components/editor/DeferredPopoverFallback.tsx +148 -0
- package/corpus/templates/slides-2/app/components/editor/EditorActionCluster.tsx +217 -0
- package/corpus/templates/slides-2/app/components/editor/EditorSidebar.tsx +1047 -0
- package/corpus/templates/slides-2/app/components/editor/EditorToolbar.tsx +1285 -0
- package/corpus/templates/slides-2/app/components/editor/ExportMenu.tsx +579 -0
- package/corpus/templates/slides-2/app/components/editor/GeneratingOverlay.tsx +21 -0
- package/corpus/templates/slides-2/app/components/editor/GeneratingSlidePreview.tsx +73 -0
- package/corpus/templates/slides-2/app/components/editor/GoogleDocImportHint.tsx +378 -0
- package/corpus/templates/slides-2/app/components/editor/GoogleDriveConnectionCta.tsx +154 -0
- package/corpus/templates/slides-2/app/components/editor/GoogleSlidesReferenceImport.tsx +299 -0
- package/corpus/templates/slides-2/app/components/editor/HistoryPanel.tsx +354 -0
- package/corpus/templates/slides-2/app/components/editor/HomeQuickStartDialog.tsx +202 -0
- package/corpus/templates/slides-2/app/components/editor/ImageCropOverlay.tsx +820 -0
- package/corpus/templates/slides-2/app/components/editor/ImageDropPromptPopover.tsx +280 -0
- package/corpus/templates/slides-2/app/components/editor/ImageGenPanel.tsx +244 -0
- package/corpus/templates/slides-2/app/components/editor/ImageOverlay.tsx +280 -0
- package/corpus/templates/slides-2/app/components/editor/ImageSearchPanel.tsx +183 -0
- package/corpus/templates/slides-2/app/components/editor/ImportDeckButton.tsx +247 -0
- package/corpus/templates/slides-2/app/components/editor/LogoSearchPanel.tsx +366 -0
- package/corpus/templates/slides-2/app/components/editor/MermaidToExcalidrawPanel.tsx +99 -0
- package/corpus/templates/slides-2/app/components/editor/MissingDeckAccessPane.tsx +219 -0
- package/corpus/templates/slides-2/app/components/editor/NewDeckReferenceStep.tsx +812 -0
- package/corpus/templates/slides-2/app/components/editor/PromptDialog.tsx +963 -0
- package/corpus/templates/slides-2/app/components/editor/QuestionFlow.tsx +119 -0
- package/corpus/templates/slides-2/app/components/editor/RequestDeckAccessDialog.tsx +101 -0
- package/corpus/templates/slides-2/app/components/editor/ShareDialog.tsx +126 -0
- package/corpus/templates/slides-2/app/components/editor/SlideContextToolbar.tsx +1471 -0
- package/corpus/templates/slides-2/app/components/editor/SlideEditor.tsx +11183 -0
- package/corpus/templates/slides-2/app/components/editor/SlideOverflowWarning.tsx +82 -0
- package/corpus/templates/slides-2/app/components/editor/SlideScrollStack.tsx +307 -0
- package/corpus/templates/slides-2/app/components/editor/SlideSlashCommandMenu.tsx +692 -0
- package/corpus/templates/slides-2/app/components/editor/SlideThumbnailContextMenu.tsx +52 -0
- package/corpus/templates/slides-2/app/components/editor/SlideTransitionControl.tsx +184 -0
- package/corpus/templates/slides-2/app/components/editor/SlidesComposerContext.tsx +789 -0
- package/corpus/templates/slides-2/app/components/editor/SlidesComposerContextProvider.tsx +74 -0
- package/corpus/templates/slides-2/app/components/editor/SlidesLayersPanel.tsx +377 -0
- package/corpus/templates/slides-2/app/components/editor/SpeakerNotesPanel.tsx +119 -0
- package/corpus/templates/slides-2/app/components/editor/TweaksPanel.tsx +77 -0
- package/corpus/templates/slides-2/app/components/editor/UploadStorageGate.tsx +37 -0
- package/corpus/templates/slides-2/app/components/editor/bullet-editing.ts +880 -0
- package/corpus/templates/slides-2/app/components/editor/canvas-interactions/index.ts +12 -0
- package/corpus/templates/slides-2/app/components/editor/canvas-interactions/slides-canvas-adapter.ts +119 -0
- package/corpus/templates/slides-2/app/components/editor/commit-active-edit.ts +14 -0
- package/corpus/templates/slides-2/app/components/editor/editor-command-model.ts +35 -0
- package/corpus/templates/slides-2/app/components/editor/fit-text-object.ts +31 -0
- package/corpus/templates/slides-2/app/components/editor/in-place-text-session.browser-cases.json +983 -0
- package/corpus/templates/slides-2/app/components/editor/in-place-text-session.browser-host.ts +747 -0
- package/corpus/templates/slides-2/app/components/editor/in-place-text-session.ts +6891 -0
- package/corpus/templates/slides-2/app/components/editor/inline-edit-session.ts +26 -0
- package/corpus/templates/slides-2/app/components/editor/list-editing.ts +501 -0
- package/corpus/templates/slides-2/app/components/editor/rich-text-selection.ts +975 -0
- package/corpus/templates/slides-2/app/components/editor/rte-test-utils.ts +265 -0
- package/corpus/templates/slides-2/app/components/editor/selection-overlay-measurement.ts +191 -0
- package/corpus/templates/slides-2/app/components/editor/slide-escape-arbiter.ts +34 -0
- package/corpus/templates/slides-2/app/components/editor/slide-object-interactions.ts +6362 -0
- package/corpus/templates/slides-2/app/components/editor/slide-object-transform.browser-host.ts +19 -0
- package/corpus/templates/slides-2/app/components/editor/slide-pointer-target.ts +432 -0
- package/corpus/templates/slides-2/app/components/editor/slide-presence.ts +13 -0
- package/corpus/templates/slides-2/app/components/editor/slide-style.ts +243 -0
- package/corpus/templates/slides-2/app/components/editor/slide-text-targets.ts +540 -0
- package/corpus/templates/slides-2/app/components/editor/style-clipboard.ts +102 -0
- package/corpus/templates/slides-2/app/components/editor/use-prompt-import.ts +159 -0
- package/corpus/templates/slides-2/app/components/home/SlidesHomeLibrary.tsx +79 -0
- package/corpus/templates/slides-2/app/components/layout/AgentWorkIndicator.tsx +193 -0
- package/corpus/templates/slides-2/app/components/layout/Header.tsx +110 -0
- package/corpus/templates/slides-2/app/components/layout/Layout.tsx +492 -0
- package/corpus/templates/slides-2/app/components/layout/Sidebar.tsx +109 -0
- package/corpus/templates/slides-2/app/components/layout/layout-route-policy.ts +28 -0
- package/corpus/templates/slides-2/app/components/presentation/PresentationView.tsx +1116 -0
- package/corpus/templates/slides-2/app/components/presentation/PresenterView.tsx +526 -0
- package/corpus/templates/slides-2/app/components/presentation/SlideTransitionStage.tsx +297 -0
- package/corpus/templates/slides-2/app/components/presentation/present-channel.ts +31 -0
- package/corpus/templates/slides-2/app/components/presentation/slide-build-steps.ts +231 -0
- package/corpus/templates/slides-2/app/components/presentation/slide-navigation.ts +273 -0
- package/corpus/templates/slides-2/app/components/presentation/slide-transition-motion.ts +258 -0
- package/corpus/templates/slides-2/app/components/presentation/voice-navigation.ts +61 -0
- package/corpus/templates/slides-2/app/components/settings/notification-settings.tsx +93 -0
- package/corpus/templates/slides-2/app/components/slides-2-editor/Slides2AssetBrowser.tsx +726 -0
- package/corpus/templates/slides-2/app/components/slides-2-editor/Slides2CommandMenu.tsx +453 -0
- package/corpus/templates/slides-2/app/components/slides-2-editor/Slides2Comments.tsx +571 -0
- package/corpus/templates/slides-2/app/components/slides-2-editor/Slides2DesignTokens.tsx +345 -0
- package/corpus/templates/slides-2/app/components/slides-2-editor/Slides2Editor.tsx +4804 -0
- package/corpus/templates/slides-2/app/components/slides-2-editor/Slides2ExportMenu.tsx +671 -0
- package/corpus/templates/slides-2/app/components/slides-2-editor/Slides2FontBrowser.tsx +342 -0
- package/corpus/templates/slides-2/app/components/slides-2-editor/Slides2ImageCropControls.tsx +487 -0
- package/corpus/templates/slides-2/app/components/slides-2-editor/Slides2Inspector.tsx +950 -0
- package/corpus/templates/slides-2/app/components/slides-2-editor/Slides2SvglLogoSearchDialog.tsx +332 -0
- package/corpus/templates/slides-2/app/components/slides-2-editor/cross-slide-edit-history.ts +151 -0
- package/corpus/templates/slides-2/app/components/slides-2-editor/design-token-presets.ts +140 -0
- package/corpus/templates/slides-2/app/components/slides-2-editor/editor-action-errors.ts +47 -0
- package/corpus/templates/slides-2/app/components/slides-2-editor/editor-export-errors.ts +60 -0
- package/corpus/templates/slides-2/app/components/slides-2-editor/geometry.ts +275 -0
- package/corpus/templates/slides-2/app/components/slides-2-editor/image-crop-style.ts +82 -0
- package/corpus/templates/slides-2/app/components/slides-2-editor/inline-text-editor.tsx +631 -0
- package/corpus/templates/slides-2/app/components/slides-2-editor/keyboard-shortcuts.ts +104 -0
- package/corpus/templates/slides-2/app/components/slides-2-editor/object-insertion.ts +13 -0
- package/corpus/templates/slides-2/app/components/slides-2-editor/preview-patches.ts +54 -0
- package/corpus/templates/slides-2/app/components/slides-2-editor/sandbox-render-errors.ts +23 -0
- package/corpus/templates/slides-2/app/components/slides-2-editor/source-structure.ts +634 -0
- package/corpus/templates/slides-2/app/components/slides-2-editor/types.ts +85 -0
- package/corpus/templates/slides-2/app/components/slides-2-presenter/Slides2BlackoutOverlay.tsx +13 -0
- package/corpus/templates/slides-2/app/components/slides-2-presenter/Slides2ControlBar.tsx +285 -0
- package/corpus/templates/slides-2/app/components/slides-2-presenter/Slides2HelpDialog.tsx +72 -0
- package/corpus/templates/slides-2/app/components/slides-2-presenter/Slides2JumpInput.tsx +38 -0
- package/corpus/templates/slides-2/app/components/slides-2-presenter/Slides2LaserPointer.tsx +67 -0
- package/corpus/templates/slides-2/app/components/slides-2-presenter/Slides2Overview.tsx +161 -0
- package/corpus/templates/slides-2/app/components/slides-2-presenter/Slides2Player.tsx +839 -0
- package/corpus/templates/slides-2/app/components/slides-2-presenter/Slides2ProgressBar.tsx +23 -0
- package/corpus/templates/slides-2/app/components/slides-2-presenter/keyboard.ts +36 -0
- package/corpus/templates/slides-2/app/components/slides-2-presenter/presenter-channel.ts +131 -0
- package/corpus/templates/slides-2/app/components/slides-2-presenter/use-presenter-action-bridge.ts +296 -0
- package/corpus/templates/slides-2/app/components/slides-2-presenter/useSlides2TouchSwipe.ts +80 -0
- package/corpus/templates/slides-2/app/components/slides-2-runtime/SandboxedSlide.tsx +724 -0
- package/corpus/templates/slides-2/app/components/slides-2-runtime/SlideContentRenderer.tsx +137 -0
- package/corpus/templates/slides-2/app/components/slides-2-runtime/Slides2Canvas.tsx +99 -0
- package/corpus/templates/slides-2/app/components/slides-2-runtime/constants.ts +4 -0
- package/corpus/templates/slides-2/app/components/slides-2-runtime/protocol.ts +1400 -0
- package/corpus/templates/slides-2/app/components/slides-2-runtime/transition-frame.ts +439 -0
- package/corpus/templates/slides-2/app/components/templates/DeckTemplateLibrary.tsx +314 -0
- package/corpus/templates/slides-2/app/components/templates/DeckTemplatePreview.tsx +60 -0
- package/corpus/templates/slides-2/app/components/templates/DeckTemplateStage.tsx +45 -0
- package/corpus/templates/slides-2/app/components/ui/alert-dialog.tsx +1 -0
- package/corpus/templates/slides-2/app/components/ui/avatar.tsx +1 -0
- package/corpus/templates/slides-2/app/components/ui/button-group.tsx +1 -0
- package/corpus/templates/slides-2/app/components/ui/button.tsx +1 -0
- package/corpus/templates/slides-2/app/components/ui/card.tsx +1 -0
- package/corpus/templates/slides-2/app/components/ui/command.tsx +1 -0
- package/corpus/templates/slides-2/app/components/ui/context-menu.tsx +32 -0
- package/corpus/templates/slides-2/app/components/ui/dialog.tsx +1 -0
- package/corpus/templates/slides-2/app/components/ui/dropdown-menu.tsx +1 -0
- package/corpus/templates/slides-2/app/components/ui/filter-trigger.tsx +1 -0
- package/corpus/templates/slides-2/app/components/ui/input.tsx +1 -0
- package/corpus/templates/slides-2/app/components/ui/label.tsx +1 -0
- package/corpus/templates/slides-2/app/components/ui/popover.tsx +1 -0
- package/corpus/templates/slides-2/app/components/ui/progress.tsx +1 -0
- package/corpus/templates/slides-2/app/components/ui/scroll-area.tsx +1 -0
- package/corpus/templates/slides-2/app/components/ui/select.tsx +1 -0
- package/corpus/templates/slides-2/app/components/ui/separator.tsx +1 -0
- package/corpus/templates/slides-2/app/components/ui/sheet.tsx +1 -0
- package/corpus/templates/slides-2/app/components/ui/skeleton.tsx +1 -0
- package/corpus/templates/slides-2/app/components/ui/slider.tsx +1 -0
- package/corpus/templates/slides-2/app/components/ui/spinner.tsx +1 -0
- package/corpus/templates/slides-2/app/components/ui/switch.tsx +1 -0
- package/corpus/templates/slides-2/app/components/ui/tabs.tsx +59 -0
- package/corpus/templates/slides-2/app/components/ui/textarea.tsx +1 -0
- package/corpus/templates/slides-2/app/components/ui/toggle-group.tsx +1 -0
- package/corpus/templates/slides-2/app/components/ui/toolkit-provider.tsx +17 -0
- package/corpus/templates/slides-2/app/components/ui/tooltip.tsx +1 -0
- package/corpus/templates/slides-2/app/components/visual-editor/CanvasCommentPins.tsx +46 -0
- package/corpus/templates/slides-2/app/components/visual-editor/DrawOverlay.tsx +27 -0
- package/corpus/templates/slides-2/app/components/visual-editor/MultiSelectChip.tsx +97 -0
- package/corpus/templates/slides-2/app/components/visual-editor/SaveStatusIndicator.tsx +273 -0
- package/corpus/templates/slides-2/app/components/visual-editor/index.ts +4 -0
- package/corpus/templates/slides-2/app/context/DeckContext.tsx +7486 -0
- package/corpus/templates/slides-2/app/design-system.ts +3 -0
- package/corpus/templates/slides-2/app/entry.client.tsx +10 -0
- package/corpus/templates/slides-2/app/entry.server.tsx +10 -0
- package/corpus/templates/slides-2/app/global.css +1626 -0
- package/corpus/templates/slides-2/app/hooks/use-agent-generating.ts +517 -0
- package/corpus/templates/slides-2/app/hooks/use-compact-editor-layout.ts +26 -0
- package/corpus/templates/slides-2/app/hooks/use-contrast-audit-bridge.ts +49 -0
- package/corpus/templates/slides-2/app/hooks/use-deck-access-reload.ts +70 -0
- package/corpus/templates/slides-2/app/hooks/use-deck-access.ts +50 -0
- package/corpus/templates/slides-2/app/hooks/use-deck-design-system.ts +146 -0
- package/corpus/templates/slides-2/app/hooks/use-deck-history-action-bridge.ts +266 -0
- package/corpus/templates/slides-2/app/hooks/use-deck-presence.ts +89 -0
- package/corpus/templates/slides-2/app/hooks/use-deck-role.ts +46 -0
- package/corpus/templates/slides-2/app/hooks/use-deck-versions.ts +43 -0
- package/corpus/templates/slides-2/app/hooks/use-design-system-workflows.ts +11 -0
- package/corpus/templates/slides-2/app/hooks/use-design-systems.ts +31 -0
- package/corpus/templates/slides-2/app/hooks/use-generating-slide-preview.ts +115 -0
- package/corpus/templates/slides-2/app/hooks/use-navigation-state.ts +229 -0
- package/corpus/templates/slides-2/app/hooks/use-new-deck-generation-signal.ts +46 -0
- package/corpus/templates/slides-2/app/hooks/use-new-deck-generation.ts +710 -0
- package/corpus/templates/slides-2/app/hooks/use-sidebar-collapsed.ts +95 -0
- package/corpus/templates/slides-2/app/hooks/use-slide-comments.ts +202 -0
- package/corpus/templates/slides-2/app/hooks/use-slide-file-storage-status.ts +55 -0
- package/corpus/templates/slides-2/app/hooks/use-undo-selection.ts +66 -0
- package/corpus/templates/slides-2/app/hooks/use-workspace-defaults.ts +31 -0
- package/corpus/templates/slides-2/app/i18n/en-US.ts +1507 -0
- package/corpus/templates/slides-2/app/i18n/index.ts +19 -0
- package/corpus/templates/slides-2/app/lib/agent-visible-message.ts +21 -0
- package/corpus/templates/slides-2/app/lib/aspect-ratios.ts +7 -0
- package/corpus/templates/slides-2/app/lib/asset-error-copy.ts +59 -0
- package/corpus/templates/slides-2/app/lib/canvas-zoom.ts +47 -0
- package/corpus/templates/slides-2/app/lib/composer-context.ts +152 -0
- package/corpus/templates/slides-2/app/lib/composer-draft.ts +34 -0
- package/corpus/templates/slides-2/app/lib/contrast-audit.ts +390 -0
- package/corpus/templates/slides-2/app/lib/contrast-resolve.ts +240 -0
- package/corpus/templates/slides-2/app/lib/create-deck-generation.ts +938 -0
- package/corpus/templates/slides-2/app/lib/deck-access-lost.ts +4 -0
- package/corpus/templates/slides-2/app/lib/deck-backup.ts +186 -0
- package/corpus/templates/slides-2/app/lib/deck-editor-loading.ts +91 -0
- package/corpus/templates/slides-2/app/lib/deck-export-file-client.ts +77 -0
- package/corpus/templates/slides-2/app/lib/deck-filter.ts +52 -0
- package/corpus/templates/slides-2/app/lib/deck-list-loading.ts +16 -0
- package/corpus/templates/slides-2/app/lib/deck-preview-frame.ts +15 -0
- package/corpus/templates/slides-2/app/lib/deck-share-links.ts +9 -0
- package/corpus/templates/slides-2/app/lib/deck-sorting.ts +19 -0
- package/corpus/templates/slides-2/app/lib/deferred-editor-surfaces.ts +24 -0
- package/corpus/templates/slides-2/app/lib/design-system-selection.ts +11 -0
- package/corpus/templates/slides-2/app/lib/design-systems.ts +231 -0
- package/corpus/templates/slides-2/app/lib/dynamic-import.ts +50 -0
- package/corpus/templates/slides-2/app/lib/editor-agent-handoff.ts +92 -0
- package/corpus/templates/slides-2/app/lib/editor-shortcuts.ts +153 -0
- package/corpus/templates/slides-2/app/lib/export-google-slides-client.ts +168 -0
- package/corpus/templates/slides-2/app/lib/export-pdf-client.ts +684 -0
- package/corpus/templates/slides-2/app/lib/export-pptx-client.ts +2420 -0
- package/corpus/templates/slides-2/app/lib/generation-lifecycle.ts +24 -0
- package/corpus/templates/slides-2/app/lib/generation-state.ts +247 -0
- package/corpus/templates/slides-2/app/lib/google-docs-client.ts +110 -0
- package/corpus/templates/slides-2/app/lib/google-slides-export-availability-client.ts +53 -0
- package/corpus/templates/slides-2/app/lib/google-slides-reference-source.ts +18 -0
- package/corpus/templates/slides-2/app/lib/image-download.ts +85 -0
- package/corpus/templates/slides-2/app/lib/image-drop-to-agent.ts +210 -0
- package/corpus/templates/slides-2/app/lib/import-uploaded-deck.ts +132 -0
- package/corpus/templates/slides-2/app/lib/inline-edit-remote.ts +55 -0
- package/corpus/templates/slides-2/app/lib/localize-slides-changelog.ts +47 -0
- package/corpus/templates/slides-2/app/lib/mermaid-blocks.ts +18 -0
- package/corpus/templates/slides-2/app/lib/new-deck-reference-selection.ts +174 -0
- package/corpus/templates/slides-2/app/lib/normalize-slide-padding.ts +74 -0
- package/corpus/templates/slides-2/app/lib/pending-deck-changes.ts +33 -0
- package/corpus/templates/slides-2/app/lib/portaled-layer.ts +7 -0
- package/corpus/templates/slides-2/app/lib/pptx-google-slides.ts +204 -0
- package/corpus/templates/slides-2/app/lib/prompt-attachment-adapter.ts +37 -0
- package/corpus/templates/slides-2/app/lib/prompt-file-uploads.ts +557 -0
- package/corpus/templates/slides-2/app/lib/recent-references.ts +106 -0
- package/corpus/templates/slides-2/app/lib/reference-document-hydration.ts +406 -0
- package/corpus/templates/slides-2/app/lib/register-chat-renderers.tsx +645 -0
- package/corpus/templates/slides-2/app/lib/reveal-after-delete.ts +55 -0
- package/corpus/templates/slides-2/app/lib/sanitize-slide-html.ts +752 -0
- package/corpus/templates/slides-2/app/lib/slide-agent-context.ts +148 -0
- package/corpus/templates/slides-2/app/lib/slide-animation-elements.ts +900 -0
- package/corpus/templates/slides-2/app/lib/slide-clipboard.ts +534 -0
- package/corpus/templates/slides-2/app/lib/slide-comment-anchor.ts +286 -0
- package/corpus/templates/slides-2/app/lib/slide-content-merge.ts +295 -0
- package/corpus/templates/slides-2/app/lib/slide-image-replacement.ts +1919 -0
- package/corpus/templates/slides-2/app/lib/slide-live-remote.ts +215 -0
- package/corpus/templates/slides-2/app/lib/slide-scroll.ts +56 -0
- package/corpus/templates/slides-2/app/lib/slide-source-map.ts +1099 -0
- package/corpus/templates/slides-2/app/lib/slide-video.ts +390 -0
- package/corpus/templates/slides-2/app/lib/slides-relay-tracking.ts +114 -0
- package/corpus/templates/slides-2/app/lib/streaming-slide-html.ts +77 -0
- package/corpus/templates/slides-2/app/lib/tab-id.ts +3 -0
- package/corpus/templates/slides-2/app/lib/template-navigation.ts +15 -0
- package/corpus/templates/slides-2/app/lib/text-tool-shortcut.ts +75 -0
- package/corpus/templates/slides-2/app/lib/undo-reveal.ts +332 -0
- package/corpus/templates/slides-2/app/lib/upload-response.ts +107 -0
- package/corpus/templates/slides-2/app/lib/utils.ts +38 -0
- package/corpus/templates/slides-2/app/lib/validate-native-slide-html.ts +177 -0
- package/corpus/templates/slides-2/app/lib/video-upload.ts +354 -0
- package/corpus/templates/slides-2/app/pages/DeckEditor.tsx +6158 -0
- package/corpus/templates/slides-2/app/pages/DesignSystems.tsx +363 -0
- package/corpus/templates/slides-2/app/pages/Index.tsx +3254 -0
- package/corpus/templates/slides-2/app/pages/NotFound.tsx +33 -0
- package/corpus/templates/slides-2/app/pages/Presentation.tsx +120 -0
- package/corpus/templates/slides-2/app/pages/SharedPresentation.tsx +174 -0
- package/corpus/templates/slides-2/app/pages/SlideThemeDetail.tsx +227 -0
- package/corpus/templates/slides-2/app/pages/SlideThemes.tsx +155 -0
- package/corpus/templates/slides-2/app/pages/Slides2EditorPage.tsx +1618 -0
- package/corpus/templates/slides-2/app/pages/Slides2PresenterConsolePage.tsx +937 -0
- package/corpus/templates/slides-2/app/pages/Slides2PresenterPage.tsx +979 -0
- package/corpus/templates/slides-2/app/pages/Templates.tsx +32 -0
- package/corpus/templates/slides-2/app/root.tsx +391 -0
- package/corpus/templates/slides-2/app/routes/$.tsx +10 -0
- package/corpus/templates/slides-2/app/routes/_index.tsx +1 -0
- package/corpus/templates/slides-2/app/routes/access-request.approve.tsx +276 -0
- package/corpus/templates/slides-2/app/routes/agent.tsx +19 -0
- package/corpus/templates/slides-2/app/routes/chat.$threadId.tsx +1 -0
- package/corpus/templates/slides-2/app/routes/chat.tsx +190 -0
- package/corpus/templates/slides-2/app/routes/deck.$id.tsx +10 -0
- package/corpus/templates/slides-2/app/routes/deck.$id_.present.tsx +10 -0
- package/corpus/templates/slides-2/app/routes/design-systems.tsx +10 -0
- package/corpus/templates/slides-2/app/routes/extensions.$id.$slug.tsx +2 -0
- package/corpus/templates/slides-2/app/routes/extensions.$id.tsx +5 -0
- package/corpus/templates/slides-2/app/routes/extensions._index.tsx +5 -0
- package/corpus/templates/slides-2/app/routes/extensions.tsx +5 -0
- package/corpus/templates/slides-2/app/routes/home-layout.tsx +31 -0
- package/corpus/templates/slides-2/app/routes/home.tsx +22 -0
- package/corpus/templates/slides-2/app/routes/p.$id.tsx +195 -0
- package/corpus/templates/slides-2/app/routes/settings.$.tsx +1 -0
- package/corpus/templates/slides-2/app/routes/settings.tsx +131 -0
- package/corpus/templates/slides-2/app/routes/share.$token.tsx +137 -0
- package/corpus/templates/slides-2/app/routes/slide.tsx +209 -0
- package/corpus/templates/slides-2/app/routes/team.tsx +11 -0
- package/corpus/templates/slides-2/app/routes/templates.tsx +1 -0
- package/corpus/templates/slides-2/app/routes/themes.$id.tsx +1 -0
- package/corpus/templates/slides-2/app/routes/themes.tsx +1 -0
- package/corpus/templates/slides-2/app/routes.ts +24 -0
- package/corpus/templates/slides-2/app/vite-env.d.ts +24 -0
- package/corpus/templates/slides-2/changelog/2026-10-17-find-and-switch-decks-from-the-presenter-console.md +6 -0
- package/corpus/templates/slides-2/changelog/2026-10-17-meet-slides-2-create-and-refine-editable-slide-decks-with-an.md +6 -0
- package/corpus/templates/slides-2/changelog/2026-10-17-pptx-image-export.md +6 -0
- package/corpus/templates/slides-2/changelog/2026-10-17-visual-editor.md +6 -0
- package/corpus/templates/slides-2/changelog/2026-10-18-apply-an-accessible-design-system-to-an-existing-deck-before.md +6 -0
- package/corpus/templates/slides-2/changelog/2026-10-18-choose-a-template-or-start-a-new-presentation-from-the-slide.md +6 -0
- package/corpus/templates/slides-2/changelog/2026-10-18-generate-decks-from-a-prompt-then-edit-slide-elements-direct.md +6 -0
- package/corpus/templates/slides-2/changelog/2026-10-18-generate-presentation-decks-from-a-prompt-and-edit-every-sli.md +6 -0
- package/corpus/templates/slides-2/changelog/2026-10-18-new-presentation-drafts-save-before-generation-starts-so-you.md +6 -0
- package/corpus/templates/slides-2/changelog/2026-10-18-the-assistant-can-undo-redo-and-save-pending-edits-in-the-vi.md +6 -0
- package/corpus/templates/slides-2/changelog/2026-10-19-agents-can-insert-duplicate-and-delete-canvas-objects-in-sou.md +6 -0
- package/corpus/templates/slides-2/changelog/2026-10-19-browse-slide-themes.md +6 -0
- package/corpus/templates/slides-2/changelog/2026-10-19-clicking-a-slide-preview-in-overview-selects-that-slide.md +6 -0
- package/corpus/templates/slides-2/changelog/2026-10-19-create-decks-from-a-prompt-and-edit-slides-directly-on-the-c.md +6 -0
- package/corpus/templates/slides-2/changelog/2026-10-19-creating-and-editing-decks-now-starts-with-the-tools-most-re.md +6 -0
- package/corpus/templates/slides-2/changelog/2026-10-19-deleting-decks-revokes-public-links.md +7 -0
- package/corpus/templates/slides-2/changelog/2026-10-19-escape-cancels-an-in-progress-slide-drag-without-losing-earl.md +6 -0
- package/corpus/templates/slides-2/changelog/2026-10-19-import-failures-now-show-clear-localized-descriptions-instea.md +6 -0
- package/corpus/templates/slides-2/changelog/2026-10-19-presenter-controls-stay-responsive-when-moving-over-the-slid.md +6 -0
- package/corpus/templates/slides-2/changelog/2026-10-19-presenter-notes-stay-private-from-viewers-and-commenters.md +6 -0
- package/corpus/templates/slides-2/changelog/2026-10-19-preview-generated-slides-in-chat.md +6 -0
- package/corpus/templates/slides-2/changelog/2026-10-19-remote-image-previews-accept-supported-raster-formats.md +6 -0
- package/corpus/templates/slides-2/changelog/2026-10-19-search-the-svgl-catalog-and-add-svg-logos-to-a-deck-or-the-g.md +6 -0
- package/corpus/templates/slides-2/changelog/2026-10-19-slide-generation-explains-when-react-effect-hooks-cannot-run.md +6 -0
- package/corpus/templates/slides-2/changelog/2026-10-19-the-editor-highlights-hovered-objects-and-keeps-image-replac.md +6 -0
- package/corpus/templates/slides-2/changelog/2026-10-19-the-slide-editor-uses-the-shared-agent-native-controls.md +6 -0
- package/corpus/templates/slides-2/changelog/2026-10-20-deck-editing-controls-match-the-workspace.md +6 -0
- package/corpus/templates/slides-2/changelog/2026-10-20-google-slides-imports-now-report-missing-image-data-instead-.md +6 -0
- package/corpus/templates/slides-2/changelog/2026-10-20-imports-and-previews-handle-large-content-safely.md +6 -0
- package/corpus/templates/slides-2/changelog/2026-10-20-public-deck-pages-can-export-source-backed-slides-to-pdf.md +6 -0
- package/corpus/templates/slides-2/changelog/2026-10-20-saved-slide-images-stay-available.md +6 -0
- package/corpus/templates/slides-2/changelog/2026-10-20-scope-global-media-picks-to-assets-the-current-deck-can-reso.md +6 -0
- package/corpus/templates/slides-2/components.json +20 -0
- package/corpus/templates/slides-2/drizzle.config.ts +3 -0
- package/corpus/templates/slides-2/learnings.defaults.md +5 -0
- package/corpus/templates/slides-2/netlify.toml +24 -0
- package/corpus/templates/slides-2/package.json +147 -0
- package/corpus/templates/slides-2/public/agent-native-icon-dark.svg +10 -0
- package/corpus/templates/slides-2/public/agent-native-icon-light.svg +10 -0
- package/corpus/templates/slides-2/public/agent-native-logo-dark.svg +21 -0
- package/corpus/templates/slides-2/public/agent-native-logo-light.svg +21 -0
- package/corpus/templates/slides-2/public/assets/builder-logo-white.svg +15 -0
- package/corpus/templates/slides-2/public/assets/generated/preview.html +61 -0
- package/corpus/templates/slides-2/public/assets/intuit-logo-white.svg +6 -0
- package/corpus/templates/slides-2/public/assets/walmart-logo-white.svg +6 -0
- package/corpus/templates/slides-2/public/chatgpt-plugin-icon.svg +7 -0
- package/corpus/templates/slides-2/public/favicon.svg +1 -0
- package/corpus/templates/slides-2/public/icon-180.svg +1 -0
- package/corpus/templates/slides-2/public/icon-192.svg +1 -0
- package/corpus/templates/slides-2/public/icon-512.svg +1 -0
- package/corpus/templates/slides-2/public/manifest.json +20 -0
- package/corpus/templates/slides-2/public/placeholder.svg +1 -0
- package/corpus/templates/slides-2/public/robots.txt +14 -0
- package/corpus/templates/slides-2/public/visual-edit-structure-proof.html +99 -0
- package/corpus/templates/slides-2/react-router.config.ts +7 -0
- package/corpus/templates/slides-2/scripts/edit-fidelity/README.md +499 -0
- package/corpus/templates/slides-2/scripts/edit-fidelity/authoring-fuzz.ts +9517 -0
- package/corpus/templates/slides-2/scripts/edit-fidelity/baseline.json +16427 -0
- package/corpus/templates/slides-2/scripts/edit-fidelity/dev-server-url.ts +10 -0
- package/corpus/templates/slides-2/scripts/edit-fidelity/lib/in-page.ts +1975 -0
- package/corpus/templates/slides-2/scripts/edit-fidelity/lib/metrics.ts +1401 -0
- package/corpus/templates/slides-2/scripts/edit-fidelity/retry-infra.ts +7 -0
- package/corpus/templates/slides-2/scripts/edit-fidelity/run-options.ts +21 -0
- package/corpus/templates/slides-2/scripts/edit-fidelity/run-outcomes.ts +127 -0
- package/corpus/templates/slides-2/scripts/edit-fidelity/run.ts +8451 -0
- package/corpus/templates/slides-2/scripts/export-fidelity/README.md +116 -0
- package/corpus/templates/slides-2/scripts/export-fidelity/compare-layout-lib.ts +241 -0
- package/corpus/templates/slides-2/scripts/export-fidelity/compare-layout.ts +30 -0
- package/corpus/templates/slides-2/scripts/export-fidelity/diff.ts +222 -0
- package/corpus/templates/slides-2/scripts/export-fidelity/export.ts +765 -0
- package/corpus/templates/slides-2/scripts/export-fidelity/fixtures/agent-dark-deck.json +48 -0
- package/corpus/templates/slides-2/scripts/export-fidelity/generate-calibration.ts +765 -0
- package/corpus/templates/slides-2/scripts/export-fidelity/google-export.ts +137 -0
- package/corpus/templates/slides-2/scripts/export-fidelity/google-layout.ts +82 -0
- package/corpus/templates/slides-2/scripts/export-fidelity/resolve-pkg.ts +29 -0
- package/corpus/templates/slides-2/scripts/migrate-production.ts +22 -0
- package/corpus/templates/slides-2/server/db/index.ts +73 -0
- package/corpus/templates/slides-2/server/db/schema.ts +189 -0
- package/corpus/templates/slides-2/server/handlers/assets-url.ts +13 -0
- package/corpus/templates/slides-2/server/handlers/assets.ts +3217 -0
- package/corpus/templates/slides-2/server/handlers/decks.ts +185 -0
- package/corpus/templates/slides-2/server/handlers/demo.ts +9 -0
- package/corpus/templates/slides-2/server/handlers/design-systems.ts +219 -0
- package/corpus/templates/slides-2/server/handlers/google-docs-auth.ts +165 -0
- package/corpus/templates/slides-2/server/handlers/image-gen.ts +153 -0
- package/corpus/templates/slides-2/server/handlers/image-providers/gemini.ts +209 -0
- package/corpus/templates/slides-2/server/handlers/image-providers/index.ts +61 -0
- package/corpus/templates/slides-2/server/handlers/image-providers/openai.ts +288 -0
- package/corpus/templates/slides-2/server/handlers/image-providers/types.ts +35 -0
- package/corpus/templates/slides-2/server/handlers/import/docx-parser.ts +31 -0
- package/corpus/templates/slides-2/server/handlers/import/html-converter.ts +1534 -0
- package/corpus/templates/slides-2/server/handlers/import/pdf-fidelity-parser.ts +1039 -0
- package/corpus/templates/slides-2/server/handlers/import/pdf-sidecar-reader.ts +81 -0
- package/corpus/templates/slides-2/server/handlers/import/pdf-style-digest.ts +187 -0
- package/corpus/templates/slides-2/server/handlers/import/pptx-assets.ts +155 -0
- package/corpus/templates/slides-2/server/handlers/import/pptx-parser.ts +57 -0
- package/corpus/templates/slides-2/server/handlers/request-auth-context.ts +108 -0
- package/corpus/templates/slides-2/server/handlers/share.ts +52 -0
- package/corpus/templates/slides-2/server/handlers/uploads-chunked.ts +1066 -0
- package/corpus/templates/slides-2/server/handlers/uploads.ts +457 -0
- package/corpus/templates/slides-2/server/lib/access-request-email.ts +66 -0
- package/corpus/templates/slides-2/server/lib/assets-image-delegation.ts +331 -0
- package/corpus/templates/slides-2/server/lib/bounded-multipart.ts +49 -0
- package/corpus/templates/slides-2/server/lib/builder-design-system-proxy.ts +122 -0
- package/corpus/templates/slides-2/server/lib/chat-attachments.ts +425 -0
- package/corpus/templates/slides-2/server/lib/chatgpt-directory-tools.ts +246 -0
- package/corpus/templates/slides-2/server/lib/chunked-upload-session.ts +195 -0
- package/corpus/templates/slides-2/server/lib/comment-notifications.ts +184 -0
- package/corpus/templates/slides-2/server/lib/deck-access-requests.ts +102 -0
- package/corpus/templates/slides-2/server/lib/deck-asset-scope.ts +150 -0
- package/corpus/templates/slides-2/server/lib/deck-export-tracking.ts +119 -0
- package/corpus/templates/slides-2/server/lib/deck-templates/a-case-study.ts +154 -0
- package/corpus/templates/slides-2/server/lib/deck-templates/a-company.ts +160 -0
- package/corpus/templates/slides-2/server/lib/deck-templates/a-pitch.ts +151 -0
- package/corpus/templates/slides-2/server/lib/deck-templates/a-quarterly.ts +264 -0
- package/corpus/templates/slides-2/server/lib/deck-templates/a-shared.ts +35 -0
- package/corpus/templates/slides-2/server/lib/deck-templates/a-update.ts +188 -0
- package/corpus/templates/slides-2/server/lib/deck-templates/a-workshop.ts +196 -0
- package/corpus/templates/slides-2/server/lib/deck-templates/b-keynote.ts +131 -0
- package/corpus/templates/slides-2/server/lib/deck-templates/b-lesson.ts +209 -0
- package/corpus/templates/slides-2/server/lib/deck-templates/b-manifesto.ts +149 -0
- package/corpus/templates/slides-2/server/lib/deck-templates/b-portfolio.ts +144 -0
- package/corpus/templates/slides-2/server/lib/deck-templates/b-research.ts +221 -0
- package/corpus/templates/slides-2/server/lib/deck-templates/b-roadmap.ts +264 -0
- package/corpus/templates/slides-2/server/lib/deck-templates/b-shared.ts +44 -0
- package/corpus/templates/slides-2/server/lib/deck-templates/group-a.ts +16 -0
- package/corpus/templates/slides-2/server/lib/deck-templates/group-b.ts +16 -0
- package/corpus/templates/slides-2/server/lib/deck-templates/legacy.ts +567 -0
- package/corpus/templates/slides-2/server/lib/deck-templates.ts +60 -0
- package/corpus/templates/slides-2/server/lib/deck-versions.ts +233 -0
- package/corpus/templates/slides-2/server/lib/design-system-workflows.ts +22 -0
- package/corpus/templates/slides-2/server/lib/emails.ts +84 -0
- package/corpus/templates/slides-2/server/lib/env-config.ts +15 -0
- package/corpus/templates/slides-2/server/lib/fetch-remote-image.ts +245 -0
- package/corpus/templates/slides-2/server/lib/generation-completion.ts +278 -0
- package/corpus/templates/slides-2/server/lib/google-docs-access.ts +51 -0
- package/corpus/templates/slides-2/server/lib/google-docs-error.ts +54 -0
- package/corpus/templates/slides-2/server/lib/google-docs-oauth.ts +422 -0
- package/corpus/templates/slides-2/server/lib/google-fonts.ts +509 -0
- package/corpus/templates/slides-2/server/lib/google-oauth-preflight.ts +119 -0
- package/corpus/templates/slides-2/server/lib/google-slides-export-availability.ts +55 -0
- package/corpus/templates/slides-2/server/lib/image-proxy-response.ts +16 -0
- package/corpus/templates/slides-2/server/lib/image-proxy-url.ts +155 -0
- package/corpus/templates/slides-2/server/lib/import-asset-storage.ts +214 -0
- package/corpus/templates/slides-2/server/lib/imported-asset-batch.ts +218 -0
- package/corpus/templates/slides-2/server/lib/legacy-slide-source.ts +692 -0
- package/corpus/templates/slides-2/server/lib/media-search-providers.ts +216 -0
- package/corpus/templates/slides-2/server/lib/native-creative-context.ts +295 -0
- package/corpus/templates/slides-2/server/lib/pdf-parse-setup.ts +115 -0
- package/corpus/templates/slides-2/server/lib/provider-api.ts +57 -0
- package/corpus/templates/slides-2/server/lib/request-wait-until.ts +30 -0
- package/corpus/templates/slides-2/server/lib/shared-deck.ts +29 -0
- package/corpus/templates/slides-2/server/lib/slide-asset-references.ts +309 -0
- package/corpus/templates/slides-2/server/lib/slide-content-patch.ts +1004 -0
- package/corpus/templates/slides-2/server/lib/slide-hygiene.ts +731 -0
- package/corpus/templates/slides-2/server/lib/slide-image-insertion.ts +136 -0
- package/corpus/templates/slides-2/server/lib/slide-reveal-issues.ts +41 -0
- package/corpus/templates/slides-2/server/lib/slide-source-editing/babel-walk.ts +117 -0
- package/corpus/templates/slides-2/server/lib/slide-source-editing/batch-edit.ts +152 -0
- package/corpus/templates/slides-2/server/lib/slide-source-editing/edit-ops.ts +1478 -0
- package/corpus/templates/slides-2/server/lib/slide-source-editing/image-target.ts +128 -0
- package/corpus/templates/slides-2/server/lib/slide-source-editing/text-diff.ts +23 -0
- package/corpus/templates/slides-2/server/lib/slide-source-limits.ts +9 -0
- package/corpus/templates/slides-2/server/lib/slide-source.ts +1786 -0
- package/corpus/templates/slides-2/server/lib/slide-theme-demo-sources.ts +2106 -0
- package/corpus/templates/slides-2/server/lib/slide-themes.ts +2174 -0
- package/corpus/templates/slides-2/server/lib/slide-worker-runtime.ts +1995 -0
- package/corpus/templates/slides-2/server/lib/slides-tracking.ts +73 -0
- package/corpus/templates/slides-2/server/lib/source-import.ts +213 -0
- package/corpus/templates/slides-2/server/lib/svgl.ts +364 -0
- package/corpus/templates/slides-2/server/lib/tenant-files.ts +179 -0
- package/corpus/templates/slides-2/server/lib/upload-storage-status.ts +9 -0
- package/corpus/templates/slides-2/server/lib/uploaded-asset-cleanup-outbox.ts +521 -0
- package/corpus/templates/slides-2/server/lib/uploaded-asset-object-lifecycle.ts +404 -0
- package/corpus/templates/slides-2/server/lib/uploaded-fonts.ts +696 -0
- package/corpus/templates/slides-2/server/lib/uploaded-reference-storage.ts +77 -0
- package/corpus/templates/slides-2/server/lib/validate-slide-animations.ts +341 -0
- package/corpus/templates/slides-2/server/middleware/auth.ts +6 -0
- package/corpus/templates/slides-2/server/plugins/_dev-upload-stub.ts +6 -0
- package/corpus/templates/slides-2/server/plugins/agent-chat.ts +402 -0
- package/corpus/templates/slides-2/server/plugins/auth.ts +31 -0
- package/corpus/templates/slides-2/server/plugins/collab.ts +30 -0
- package/corpus/templates/slides-2/server/plugins/config.ts +6 -0
- package/corpus/templates/slides-2/server/plugins/core-routes.ts +30 -0
- package/corpus/templates/slides-2/server/plugins/creative-context.ts +187 -0
- package/corpus/templates/slides-2/server/plugins/db.ts +462 -0
- package/corpus/templates/slides-2/server/plugins/feature-flags.ts +5 -0
- package/corpus/templates/slides-2/server/plugins/labs.ts +8 -0
- package/corpus/templates/slides-2/server/plugins/orphaned-asset-cleanup.ts +17 -0
- package/corpus/templates/slides-2/server/plugins/otel.ts +6 -0
- package/corpus/templates/slides-2/server/plugins/transactional-emails.ts +5 -0
- package/corpus/templates/slides-2/server/register-secrets.ts +209 -0
- package/corpus/templates/slides-2/server/routes/[...page].get.ts +5 -0
- package/corpus/templates/slides-2/server/routes/[...page].head.ts +1 -0
- package/corpus/templates/slides-2/server/routes/[base]/_agent-native/google-docs/auth-url.get.ts +1 -0
- package/corpus/templates/slides-2/server/routes/[base]/_agent-native/google-docs/callback.get.ts +1 -0
- package/corpus/templates/slides-2/server/routes/_agent-native/google-docs/auth-url.get.ts +1 -0
- package/corpus/templates/slides-2/server/routes/_agent-native/google-docs/callback.get.ts +1 -0
- package/corpus/templates/slides-2/server/routes/api/assets/upload-video.post.ts +1 -0
- package/corpus/templates/slides-2/server/routes/api/assets/upload.post.ts +1 -0
- package/corpus/templates/slides-2/server/routes/api/assets/video-uploads.delete.ts +1 -0
- package/corpus/templates/slides-2/server/routes/api/deck-agent-context.json.get.ts +105 -0
- package/corpus/templates/slides-2/server/routes/api/decks/events.get.ts +1 -0
- package/corpus/templates/slides-2/server/routes/api/demo.get.ts +1 -0
- package/corpus/templates/slides-2/server/routes/api/exports/[filename].get.ts +221 -0
- package/corpus/templates/slides-2/server/routes/api/exports/google-slides.post.ts +240 -0
- package/corpus/templates/slides-2/server/routes/api/exports/html.post.ts +67 -0
- package/corpus/templates/slides-2/server/routes/api/exports/pptx.post.ts +100 -0
- package/corpus/templates/slides-2/server/routes/api/gen-preview/[...].get.ts +24 -0
- package/corpus/templates/slides-2/server/routes/api/generated/[...].get.ts +24 -0
- package/corpus/templates/slides-2/server/routes/api/image-proxy.get.ts +518 -0
- package/corpus/templates/slides-2/server/routes/api/import-assets/[token].get.ts +70 -0
- package/corpus/templates/slides-2/server/routes/api/preview-images.get.ts +20 -0
- package/corpus/templates/slides-2/server/routes/api/share/[token].get.ts +1 -0
- package/corpus/templates/slides-2/server/routes/api/uploads-chunked/[sessionId]/chunk.post.ts +1 -0
- package/corpus/templates/slides-2/server/routes/api/uploads-chunked/[sessionId]/status.get.ts +1 -0
- package/corpus/templates/slides-2/server/routes/api/uploads-chunked/[sessionId].delete.ts +1 -0
- package/corpus/templates/slides-2/server/routes/api/uploads-chunked/start.post.ts +1 -0
- package/corpus/templates/slides-2/server/routes/api/uploads.delete.ts +1 -0
- package/corpus/templates/slides-2/server/routes/api/uploads.post.ts +1 -0
- package/corpus/templates/slides-2/server/workspace-defaults.ts +196 -0
- package/corpus/templates/slides-2/shared/action-ui.ts +147 -0
- package/corpus/templates/slides-2/shared/agent-readable.ts +2 -0
- package/corpus/templates/slides-2/shared/api.ts +406 -0
- package/corpus/templates/slides-2/shared/app-state-tabs.ts +30 -0
- package/corpus/templates/slides-2/shared/app-storage.ts +9 -0
- package/corpus/templates/slides-2/shared/aspect-ratios.ts +49 -0
- package/corpus/templates/slides-2/shared/blank-slide.ts +179 -0
- package/corpus/templates/slides-2/shared/client-compatibility.ts +2 -0
- package/corpus/templates/slides-2/shared/contrast-audit.ts +255 -0
- package/corpus/templates/slides-2/shared/deck-access.ts +26 -0
- package/corpus/templates/slides-2/shared/deck-app-scope.ts +14 -0
- package/corpus/templates/slides-2/shared/deck-content.ts +37 -0
- package/corpus/templates/slides-2/shared/deck-history-control.ts +79 -0
- package/corpus/templates/slides-2/shared/deck-scope.ts +5 -0
- package/corpus/templates/slides-2/shared/deck-title.ts +199 -0
- package/corpus/templates/slides-2/shared/deck-write.ts +61 -0
- package/corpus/templates/slides-2/shared/design-flags.ts +7 -0
- package/corpus/templates/slides-2/shared/design-system-validation.ts +88 -0
- package/corpus/templates/slides-2/shared/editor-control.ts +120 -0
- package/corpus/templates/slides-2/shared/generation-timing.ts +19 -0
- package/corpus/templates/slides-2/shared/google-docs.ts +69 -0
- package/corpus/templates/slides-2/shared/labs.ts +10 -0
- package/corpus/templates/slides-2/shared/overview-navigation.ts +34 -0
- package/corpus/templates/slides-2/shared/ownership.ts +6 -0
- package/corpus/templates/slides-2/shared/pdf-sidecar.ts +130 -0
- package/corpus/templates/slides-2/shared/presenter-control.ts +111 -0
- package/corpus/templates/slides-2/shared/representative-slide.ts +89 -0
- package/corpus/templates/slides-2/shared/slide-background.ts +30 -0
- package/corpus/templates/slides-2/shared/slide-comment-anchor.ts +117 -0
- package/corpus/templates/slides-2/shared/slide-comment-reactions.ts +47 -0
- package/corpus/templates/slides-2/shared/slide-design-tokens.ts +92 -0
- package/corpus/templates/slides-2/shared/slide-fit.ts +78 -0
- package/corpus/templates/slides-2/shared/slide-ids.ts +133 -0
- package/corpus/templates/slides-2/shared/slide-number.ts +124 -0
- package/corpus/templates/slides-2/shared/slide-object-structure.ts +790 -0
- package/corpus/templates/slides-2/shared/slide-text-range-selection.ts +50 -0
- package/corpus/templates/slides-2/shared/slide-transitions.ts +70 -0
- package/corpus/templates/slides-2/shared/slides-2-transition.ts +194 -0
- package/corpus/templates/slides-2/shared/slides-user-prefs.ts +22 -0
- package/corpus/templates/slides-2/shared/source-import-errors.ts +12 -0
- package/corpus/templates/slides-2/shared/source-runtime-export.ts +76 -0
- package/corpus/templates/slides-2/shared/upload-types.ts +41 -0
- package/corpus/templates/slides-2/ssr-entry.ts +11 -0
- package/corpus/templates/slides-2/tsconfig.json +27 -0
- package/corpus/templates/slides-2/vite.config.ts +77 -0
- package/corpus/templates/slides-2/vitest.config.ts +28 -0
- package/corpus/templates/tasks/.agents/skills/actions/references/action-fields.md +1 -1
- package/package.json +1 -1
- package/corpus/templates/design/.agents/skills/shader-fills/SKILL.md +0 -182
- package/corpus/templates/design/actions/apply-shader-fill.ts +0 -450
- package/corpus/templates/design/actions/apply-shader.ts +0 -257
- package/corpus/templates/design/actions/preview-shader-fill.ts +0 -157
- package/corpus/templates/design/app/components/design/inspector/GlslShaderPanel.tsx +0 -1144
- package/corpus/templates/design/app/components/design/inspector/SHADER_INTEGRATION.md +0 -450
- package/corpus/templates/design/app/components/design/inspector/ShaderControls.stories.tsx +0 -71
- package/corpus/templates/design/app/components/design/inspector/ShaderControls.tsx +0 -555
- package/corpus/templates/design/app/components/design/inspector/ShaderEffectRow.tsx +0 -105
- package/corpus/templates/design/app/components/design/inspector/ShaderFillsPanel.tsx +0 -433
- package/corpus/templates/design/app/components/design/inspector/color-picker-shader-pane.tsx +0 -648
- package/corpus/templates/design/shared/shader-fill.ts +0 -174
- package/corpus/templates/design/shared/shader-presets.ts +0 -1523
|
@@ -0,0 +1,1098 @@
|
|
|
1
|
+
import { createHash } from "node:crypto";
|
|
2
|
+
|
|
3
|
+
import { defineAction } from "@agent-native/core/action";
|
|
4
|
+
import {
|
|
5
|
+
getRequestRunContext,
|
|
6
|
+
getRequestUserEmail,
|
|
7
|
+
} from "@agent-native/core/server/request-context";
|
|
8
|
+
import {
|
|
9
|
+
formatAgentDesignSystemContext,
|
|
10
|
+
loadAgentDesignSystemContext,
|
|
11
|
+
} from "@agent-native/core/shared";
|
|
12
|
+
import { accessFilter } from "@agent-native/core/sharing";
|
|
13
|
+
import { and, asc, desc, eq } from "drizzle-orm";
|
|
14
|
+
import { z } from "zod";
|
|
15
|
+
|
|
16
|
+
import { getPreset } from "../app/lib/design-systems.js";
|
|
17
|
+
import { getDb, schema } from "../server/db/index.js";
|
|
18
|
+
import { appStateKey } from "../shared/app-state-tabs.js";
|
|
19
|
+
import { isSlides2DeckData } from "../shared/deck-app-scope.js";
|
|
20
|
+
import { resolveDeckDesignSystemId } from "../shared/deck-content.js";
|
|
21
|
+
import {
|
|
22
|
+
deckHistoryCommandSchema,
|
|
23
|
+
deckHistoryStatusSchema,
|
|
24
|
+
DECK_HISTORY_COMMAND_KEY,
|
|
25
|
+
DECK_HISTORY_STATUS_KEY,
|
|
26
|
+
} from "../shared/deck-history-control.js";
|
|
27
|
+
import { slides2DeckScope } from "../shared/deck-scope.js";
|
|
28
|
+
import {
|
|
29
|
+
slideEditorCommandSchema,
|
|
30
|
+
slideEditorStatusSchema,
|
|
31
|
+
SLIDE_EDITOR_COMMAND_KEY,
|
|
32
|
+
SLIDE_EDITOR_STATUS_KEY,
|
|
33
|
+
} from "../shared/editor-control.js";
|
|
34
|
+
import { normalizeOwnerEmail } from "../shared/ownership.js";
|
|
35
|
+
import { summarizeDeckStyle } from "../shared/representative-slide.js";
|
|
36
|
+
import { parseSlideCommentAnchor } from "../shared/slide-comment-anchor.js";
|
|
37
|
+
import { summarizeSlideCommentReactions } from "../shared/slide-comment-reactions.js";
|
|
38
|
+
import {
|
|
39
|
+
hashSlideContent,
|
|
40
|
+
slideFitMeasurementMatchesSlide,
|
|
41
|
+
type DeckFitState,
|
|
42
|
+
} from "../shared/slide-fit.js";
|
|
43
|
+
import { currentSlideTextRangeSelection } from "../shared/slide-text-range-selection.js";
|
|
44
|
+
import { readAppStateForCurrentTab } from "./_tab-state.js";
|
|
45
|
+
import getDeckTemplate from "./get-deck-template.js";
|
|
46
|
+
import getDesignSystem from "./get-design-system.js";
|
|
47
|
+
import listDeckTemplates from "./list-deck-templates.js";
|
|
48
|
+
import listSlideThemes from "./list-slide-themes.js";
|
|
49
|
+
|
|
50
|
+
type CurrentSlideFitMeasurement = DeckFitState["slides"][string] & {
|
|
51
|
+
slideId: string;
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
function getSlideSourceIdentity(
|
|
55
|
+
slide: {
|
|
56
|
+
sourceTsx?: string;
|
|
57
|
+
revision?: unknown;
|
|
58
|
+
sourceHash?: unknown;
|
|
59
|
+
} | null,
|
|
60
|
+
): { revision: number; sourceHash: string } | null {
|
|
61
|
+
if (
|
|
62
|
+
!slide ||
|
|
63
|
+
typeof slide.sourceTsx !== "string" ||
|
|
64
|
+
!slide.sourceTsx.trim()
|
|
65
|
+
) {
|
|
66
|
+
return null;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
const hasRevision = Object.hasOwn(slide, "revision");
|
|
70
|
+
const hasSourceHash = Object.hasOwn(slide, "sourceHash");
|
|
71
|
+
if (hasRevision !== hasSourceHash) return null;
|
|
72
|
+
|
|
73
|
+
const revision = hasRevision ? slide.revision : 1;
|
|
74
|
+
if (
|
|
75
|
+
typeof revision !== "number" ||
|
|
76
|
+
!Number.isSafeInteger(revision) ||
|
|
77
|
+
revision < 1
|
|
78
|
+
) {
|
|
79
|
+
return null;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
const sourceHash = createHash("sha256")
|
|
83
|
+
.update(slide.sourceTsx, "utf8")
|
|
84
|
+
.digest("hex");
|
|
85
|
+
if (hasSourceHash && slide.sourceHash !== sourceHash) return null;
|
|
86
|
+
|
|
87
|
+
return { revision, sourceHash };
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
const CURRENT_SLIDE_COMMENT_LIMIT = 100;
|
|
91
|
+
const MAX_RENDERED_SLIDE_INSTANCES_PER_SOURCE_LOCATOR = 8_000;
|
|
92
|
+
|
|
93
|
+
function getRenderedInstanceIdentity(
|
|
94
|
+
item: Record<string, unknown>,
|
|
95
|
+
): { instanceIndex: number; instanceCount: number } | null {
|
|
96
|
+
const instanceIndex = item.instanceIndex;
|
|
97
|
+
const instanceCount = item.instanceCount;
|
|
98
|
+
if (
|
|
99
|
+
typeof instanceIndex !== "number" ||
|
|
100
|
+
!Number.isSafeInteger(instanceIndex) ||
|
|
101
|
+
typeof instanceCount !== "number" ||
|
|
102
|
+
!Number.isSafeInteger(instanceCount) ||
|
|
103
|
+
instanceIndex < 0 ||
|
|
104
|
+
instanceCount < 1 ||
|
|
105
|
+
instanceCount > MAX_RENDERED_SLIDE_INSTANCES_PER_SOURCE_LOCATOR ||
|
|
106
|
+
instanceIndex >= instanceCount
|
|
107
|
+
) {
|
|
108
|
+
return null;
|
|
109
|
+
}
|
|
110
|
+
return { instanceIndex, instanceCount };
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
function getCurrentSlideFitMeasurement(
|
|
114
|
+
value: unknown,
|
|
115
|
+
slide: { id: string; content?: string; layoutFitRevision?: string } | null,
|
|
116
|
+
deckId: string,
|
|
117
|
+
): CurrentSlideFitMeasurement | null {
|
|
118
|
+
if (!slide || !value || typeof value !== "object") return null;
|
|
119
|
+
|
|
120
|
+
const measurement = value as Record<string, unknown>;
|
|
121
|
+
const slideId = measurement.slideId;
|
|
122
|
+
const measurementDeckId = measurement.deckId;
|
|
123
|
+
const contentHash = measurement.contentHash;
|
|
124
|
+
const contentHeight = measurement.contentHeight;
|
|
125
|
+
const contentWidth = measurement.contentWidth;
|
|
126
|
+
const viewportHeight = measurement.viewportHeight;
|
|
127
|
+
const viewportWidth = measurement.viewportWidth;
|
|
128
|
+
const verticalOverflow = measurement.verticalOverflow;
|
|
129
|
+
const horizontalOverflow = measurement.horizontalOverflow;
|
|
130
|
+
const measuredAt = measurement.measuredAt;
|
|
131
|
+
const layoutFitRevision = measurement.layoutFitRevision;
|
|
132
|
+
|
|
133
|
+
if (
|
|
134
|
+
typeof slideId !== "string" ||
|
|
135
|
+
slideId !== slide.id ||
|
|
136
|
+
(measurementDeckId !== undefined && measurementDeckId !== deckId) ||
|
|
137
|
+
typeof contentHash !== "string" ||
|
|
138
|
+
(layoutFitRevision !== undefined &&
|
|
139
|
+
typeof layoutFitRevision !== "string") ||
|
|
140
|
+
!slideFitMeasurementMatchesSlide(
|
|
141
|
+
{
|
|
142
|
+
contentHash,
|
|
143
|
+
...(typeof layoutFitRevision === "string" ? { layoutFitRevision } : {}),
|
|
144
|
+
},
|
|
145
|
+
slide,
|
|
146
|
+
) ||
|
|
147
|
+
typeof contentHeight !== "number" ||
|
|
148
|
+
!Number.isFinite(contentHeight) ||
|
|
149
|
+
typeof contentWidth !== "number" ||
|
|
150
|
+
!Number.isFinite(contentWidth) ||
|
|
151
|
+
typeof viewportHeight !== "number" ||
|
|
152
|
+
!Number.isFinite(viewportHeight) ||
|
|
153
|
+
typeof viewportWidth !== "number" ||
|
|
154
|
+
!Number.isFinite(viewportWidth) ||
|
|
155
|
+
typeof verticalOverflow !== "number" ||
|
|
156
|
+
!Number.isFinite(verticalOverflow) ||
|
|
157
|
+
typeof horizontalOverflow !== "number" ||
|
|
158
|
+
!Number.isFinite(horizontalOverflow) ||
|
|
159
|
+
typeof measuredAt !== "number" ||
|
|
160
|
+
!Number.isFinite(measuredAt)
|
|
161
|
+
) {
|
|
162
|
+
return null;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
return {
|
|
166
|
+
slideId,
|
|
167
|
+
contentHash,
|
|
168
|
+
...(typeof layoutFitRevision === "string" ? { layoutFitRevision } : {}),
|
|
169
|
+
contentHeight,
|
|
170
|
+
contentWidth,
|
|
171
|
+
viewportHeight,
|
|
172
|
+
viewportWidth,
|
|
173
|
+
verticalOverflow,
|
|
174
|
+
horizontalOverflow,
|
|
175
|
+
measuredAt,
|
|
176
|
+
};
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
export default defineAction({
|
|
180
|
+
title: "Inspect current Slides 2 screen",
|
|
181
|
+
description:
|
|
182
|
+
"Inspect the current Slides 2 screen when the active deck, slide, selection, template, or slide theme is unknown. Returns the current deck and slide IDs, slide previews, current slide HTML, matching visual selection metadata, the template gallery, or the slide themes gallery and selected theme summary. For selectedText or objectId edits on legacy/imported HTML slides, use update-slide with the matching content hash. For React source-backed slides, never send selected text or objectId to update-slide: read get-slide-source and use update-slide-source with a unique locator grounded in the current source. Use a selection line/column only when its source identity is current; if the locator is missing or stale, remap only when the selected element maps uniquely, otherwise ask the user to reselect or clarify. Selected source objects include their rendered instance index and count; a count above one means the JSX source callsite is shared and duplicate/delete cannot target one rendered copy safely. A current selectedTextRange includes UTF-16 offsets and expectedText for update-slide-source set-text-range-style; pass expectedText as prevText. Do not load the full deck for focused edits.",
|
|
183
|
+
schema: z.object({}),
|
|
184
|
+
http: false,
|
|
185
|
+
mcpAnnotations: {
|
|
186
|
+
readOnlyHint: false,
|
|
187
|
+
destructiveHint: false,
|
|
188
|
+
openWorldHint: false,
|
|
189
|
+
},
|
|
190
|
+
run: async (_args) => {
|
|
191
|
+
const storedNavigation = await readAppStateForCurrentTab(
|
|
192
|
+
appStateKey("navigation"),
|
|
193
|
+
{ fallbackToGlobal: true },
|
|
194
|
+
);
|
|
195
|
+
const navigation = (
|
|
196
|
+
storedNavigation?.app === "slides-2" ? storedNavigation : null
|
|
197
|
+
) as {
|
|
198
|
+
app?: "slides-2";
|
|
199
|
+
view?: string;
|
|
200
|
+
deckId?: string;
|
|
201
|
+
templateId?: string;
|
|
202
|
+
themeId?: string;
|
|
203
|
+
search?: string;
|
|
204
|
+
homeTab?: "recent" | "templates";
|
|
205
|
+
deckSearch?: string;
|
|
206
|
+
deckFilter?: "all" | "created-by-me" | "shared";
|
|
207
|
+
slideId?: string | null;
|
|
208
|
+
slideNumber?: number;
|
|
209
|
+
slideIndex?: number;
|
|
210
|
+
editorMode?: "edit" | "preview";
|
|
211
|
+
} | null;
|
|
212
|
+
const chatScope = getRequestRunContext()?.chatScope;
|
|
213
|
+
const scopedDeckId =
|
|
214
|
+
chatScope?.type === "deck" && typeof chatScope.id === "string"
|
|
215
|
+
? chatScope.id
|
|
216
|
+
: null;
|
|
217
|
+
const effectiveNavigation = scopedDeckId
|
|
218
|
+
? {
|
|
219
|
+
...(navigation ?? {}),
|
|
220
|
+
view: "editor",
|
|
221
|
+
deckId: scopedDeckId,
|
|
222
|
+
slideId:
|
|
223
|
+
navigation?.deckId === scopedDeckId ? navigation.slideId : null,
|
|
224
|
+
slideNumber:
|
|
225
|
+
navigation?.deckId === scopedDeckId
|
|
226
|
+
? navigation.slideNumber
|
|
227
|
+
: undefined,
|
|
228
|
+
slideIndex:
|
|
229
|
+
navigation?.deckId === scopedDeckId ? navigation.slideIndex : 0,
|
|
230
|
+
editorMode:
|
|
231
|
+
navigation?.deckId === scopedDeckId
|
|
232
|
+
? navigation.editorMode
|
|
233
|
+
: "edit",
|
|
234
|
+
}
|
|
235
|
+
: navigation;
|
|
236
|
+
if (!scopedDeckId && navigation?.view === "themes") {
|
|
237
|
+
const result = await listSlideThemes.run({});
|
|
238
|
+
const selected = navigation.themeId
|
|
239
|
+
? result.themes.find((theme) => theme.id === navigation.themeId)
|
|
240
|
+
: undefined;
|
|
241
|
+
return [
|
|
242
|
+
"## Current Screen",
|
|
243
|
+
"view: themes",
|
|
244
|
+
...(selected
|
|
245
|
+
? [
|
|
246
|
+
`themeId: ${selected.id}`,
|
|
247
|
+
`themeName: ${selected.name}`,
|
|
248
|
+
`themeDescription: ${JSON.stringify(selected.description)}`,
|
|
249
|
+
`themeMode: ${selected.mode}`,
|
|
250
|
+
`themePalette: background=${selected.preview.background}, text=${selected.preview.text}, accent=${selected.preview.accent}`,
|
|
251
|
+
]
|
|
252
|
+
: []),
|
|
253
|
+
"### Slide themes",
|
|
254
|
+
...result.themes.map(
|
|
255
|
+
(theme) =>
|
|
256
|
+
`- id=${theme.id} name=${JSON.stringify(theme.name)} mode=${theme.mode}`,
|
|
257
|
+
),
|
|
258
|
+
"Use get-slide-theme to read a selected theme's full authoring guide.",
|
|
259
|
+
].join("\n");
|
|
260
|
+
}
|
|
261
|
+
if (
|
|
262
|
+
!scopedDeckId &&
|
|
263
|
+
(navigation?.view === "templates" || navigation?.templateId)
|
|
264
|
+
) {
|
|
265
|
+
const result = await listDeckTemplates.run({
|
|
266
|
+
search: navigation.search,
|
|
267
|
+
page: 1,
|
|
268
|
+
pageSize: 6,
|
|
269
|
+
includePreview: "false",
|
|
270
|
+
});
|
|
271
|
+
const selected = navigation.templateId
|
|
272
|
+
? await getDeckTemplate.run({ id: navigation.templateId })
|
|
273
|
+
: null;
|
|
274
|
+
return [
|
|
275
|
+
"## Current Screen",
|
|
276
|
+
`view: ${navigation.view ?? "list"}`,
|
|
277
|
+
...(navigation.view === "list"
|
|
278
|
+
? [`homeTab: ${navigation.homeTab ?? "templates"}`]
|
|
279
|
+
: []),
|
|
280
|
+
`templateSearch: ${navigation.search ?? ""}`,
|
|
281
|
+
...(selected
|
|
282
|
+
? [
|
|
283
|
+
`templateId: ${selected.id}`,
|
|
284
|
+
`templateTitle: ${selected.title}`,
|
|
285
|
+
`slideCount: ${selected.slideCount}`,
|
|
286
|
+
]
|
|
287
|
+
: []),
|
|
288
|
+
"### Templates",
|
|
289
|
+
...result.templates.map(
|
|
290
|
+
(template) =>
|
|
291
|
+
`- id=${template.id} title=${JSON.stringify(template.title)} slides=${template.slideCount}`,
|
|
292
|
+
),
|
|
293
|
+
"Use get-deck-template to inspect a template, then create-deck-from-template to save an editable copy without AI generation.",
|
|
294
|
+
].join("\n");
|
|
295
|
+
}
|
|
296
|
+
if (
|
|
297
|
+
!scopedDeckId &&
|
|
298
|
+
navigation?.view !== "templates" &&
|
|
299
|
+
navigation?.homeTab === "templates"
|
|
300
|
+
) {
|
|
301
|
+
const result = await listDeckTemplates.run({
|
|
302
|
+
page: 1,
|
|
303
|
+
pageSize: 24,
|
|
304
|
+
includePreview: "false",
|
|
305
|
+
});
|
|
306
|
+
return [
|
|
307
|
+
"## Current Screen",
|
|
308
|
+
"view: list",
|
|
309
|
+
"homeTab: templates",
|
|
310
|
+
`### Home templates (${result.templates.length} of ${result.total})`,
|
|
311
|
+
...result.templates.map(
|
|
312
|
+
(template) =>
|
|
313
|
+
`- id=${template.id} title=${JSON.stringify(template.title)} slides=${template.slideCount}`,
|
|
314
|
+
),
|
|
315
|
+
].join("\n");
|
|
316
|
+
}
|
|
317
|
+
const db = getDb();
|
|
318
|
+
|
|
319
|
+
if (effectiveNavigation?.deckId) {
|
|
320
|
+
const rows = await db
|
|
321
|
+
.select()
|
|
322
|
+
.from(schema.decks)
|
|
323
|
+
.where(
|
|
324
|
+
and(
|
|
325
|
+
eq(schema.decks.id, effectiveNavigation.deckId),
|
|
326
|
+
accessFilter(schema.decks, schema.deckShares),
|
|
327
|
+
),
|
|
328
|
+
)
|
|
329
|
+
.limit(1);
|
|
330
|
+
|
|
331
|
+
if (rows.length === 0 || !isSlides2DeckData(rows[0].data)) {
|
|
332
|
+
return [
|
|
333
|
+
`view: ${effectiveNavigation.view ?? "editor"}`,
|
|
334
|
+
`deckId: ${effectiveNavigation.deckId} (NOT FOUND in database — the deck may have just been created and not yet persisted)`,
|
|
335
|
+
"",
|
|
336
|
+
"Wait a moment and call view-screen again, or list-decks to see what's available.",
|
|
337
|
+
].join("\n");
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
const deck = JSON.parse(rows[0].data);
|
|
341
|
+
const slides: Array<{
|
|
342
|
+
id: string;
|
|
343
|
+
layout?: string;
|
|
344
|
+
content?: string;
|
|
345
|
+
sourceTsx?: string;
|
|
346
|
+
revision?: unknown;
|
|
347
|
+
sourceHash?: unknown;
|
|
348
|
+
background?: string;
|
|
349
|
+
layoutFitRevision?: string;
|
|
350
|
+
}> = Array.isArray(deck?.slides) ? deck.slides : [];
|
|
351
|
+
const navigationSlideIndex = effectiveNavigation.slideId
|
|
352
|
+
? slides.findIndex((slide) => slide.id === effectiveNavigation.slideId)
|
|
353
|
+
: -1;
|
|
354
|
+
const slideIndex =
|
|
355
|
+
navigationSlideIndex >= 0
|
|
356
|
+
? navigationSlideIndex
|
|
357
|
+
: typeof effectiveNavigation.slideIndex === "number"
|
|
358
|
+
? effectiveNavigation.slideIndex
|
|
359
|
+
: typeof effectiveNavigation.slideNumber === "number" &&
|
|
360
|
+
Number.isFinite(effectiveNavigation.slideNumber) &&
|
|
361
|
+
effectiveNavigation.slideNumber >= 1
|
|
362
|
+
? effectiveNavigation.slideNumber - 1
|
|
363
|
+
: 0;
|
|
364
|
+
const slideNumber = slideIndex + 1;
|
|
365
|
+
const currentSlide = slides[slideIndex] ?? null;
|
|
366
|
+
|
|
367
|
+
const lines: string[] = [];
|
|
368
|
+
lines.push(`## Current Screen`);
|
|
369
|
+
lines.push(``);
|
|
370
|
+
lines.push(`view: ${effectiveNavigation.view ?? "editor"}`);
|
|
371
|
+
if (
|
|
372
|
+
effectiveNavigation.view === undefined ||
|
|
373
|
+
effectiveNavigation.view === "editor"
|
|
374
|
+
) {
|
|
375
|
+
lines.push(
|
|
376
|
+
`editorMode: ${effectiveNavigation.editorMode === "preview" ? "preview" : "edit"}`,
|
|
377
|
+
);
|
|
378
|
+
}
|
|
379
|
+
lines.push(
|
|
380
|
+
`deckId: ${rows[0].id} ← use this as deckId for add-slide / update-slide / create-deck, and as id for get-deck`,
|
|
381
|
+
);
|
|
382
|
+
lines.push(`deckTitle: ${rows[0].title ?? deck?.title ?? "(untitled)"}`);
|
|
383
|
+
lines.push(`slideCount: ${slides.length}`);
|
|
384
|
+
lines.push(
|
|
385
|
+
`slideNumbering: User-visible slide numbers are 1-based and match the UI. "Slide 1" means the first slide, not internal index 1. Use slideId for edits.`,
|
|
386
|
+
);
|
|
387
|
+
lines.push(
|
|
388
|
+
`currentSlideNumber: ${slideNumber} of ${slides.length} (1-based; matches the UI)`,
|
|
389
|
+
);
|
|
390
|
+
lines.push(
|
|
391
|
+
`currentSlideIndex: ${slideIndex} (0-based internal value only; do not use this to interpret "slide N" from the user)`,
|
|
392
|
+
);
|
|
393
|
+
if (currentSlide) {
|
|
394
|
+
const sourceBacked = typeof currentSlide.sourceTsx === "string";
|
|
395
|
+
lines.push(
|
|
396
|
+
`currentSlideId: ${currentSlide.id} ← use this for ${sourceBacked ? "update-slide-source --slideId" : "update-slide --slideId"}`,
|
|
397
|
+
);
|
|
398
|
+
lines.push(`currentSlideLayout: ${currentSlide.layout ?? "(none)"}`);
|
|
399
|
+
lines.push(
|
|
400
|
+
sourceBacked
|
|
401
|
+
? `currentSlideContentHash: ${hashSlideContent(String(currentSlide.content ?? ""))} (preview hash only; read get-slide-source for the revision and sourceHash used by update-slide-source)`
|
|
402
|
+
: `currentSlideContentHash: ${hashSlideContent(String(currentSlide.content ?? ""))} ← baseContentHash for update-slide`,
|
|
403
|
+
);
|
|
404
|
+
} else {
|
|
405
|
+
lines.push(
|
|
406
|
+
`currentSlideId: (no slide for slide number ${slideNumber} / internal index ${slideIndex} — deck may be empty)`,
|
|
407
|
+
);
|
|
408
|
+
}
|
|
409
|
+
lines.push(``);
|
|
410
|
+
lines.push(`### All slides in this deck (${slides.length})`);
|
|
411
|
+
if (slides.length === 0) {
|
|
412
|
+
lines.push(`(empty — use add-slide to add slides)`);
|
|
413
|
+
} else {
|
|
414
|
+
for (let i = 0; i < slides.length; i++) {
|
|
415
|
+
const s = slides[i];
|
|
416
|
+
const marker = i === slideIndex ? " ◀ current" : "";
|
|
417
|
+
const contentPreview =
|
|
418
|
+
typeof s.content === "string"
|
|
419
|
+
? s.content
|
|
420
|
+
.replace(/<[^>]+>/g, " ")
|
|
421
|
+
.replace(/\s+/g, " ")
|
|
422
|
+
.trim()
|
|
423
|
+
.slice(0, 60)
|
|
424
|
+
: "";
|
|
425
|
+
lines.push(
|
|
426
|
+
`Slide ${i + 1}. id=${s.id} internalIndex=${i} layout=${s.layout ?? "-"} "${contentPreview}"${marker}`,
|
|
427
|
+
);
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
const { deckStyle, representativeSlideIndex } = summarizeDeckStyle(
|
|
431
|
+
slides,
|
|
432
|
+
slideIndex,
|
|
433
|
+
);
|
|
434
|
+
const designSystem = await loadAgentDesignSystemContext(
|
|
435
|
+
resolveDeckDesignSystemId(rows[0], deck),
|
|
436
|
+
getDesignSystem,
|
|
437
|
+
);
|
|
438
|
+
if (deckStyle.length > 0 || representativeSlideIndex !== null) {
|
|
439
|
+
lines.push(``);
|
|
440
|
+
lines.push(`### Deck style (shared across slides)`);
|
|
441
|
+
lines.push(...deckStyle);
|
|
442
|
+
if (representativeSlideIndex !== null) {
|
|
443
|
+
const sibling = slides[representativeSlideIndex]!;
|
|
444
|
+
lines.push(
|
|
445
|
+
`representativeSlide: id=${sibling.id} (slide ${representativeSlideIndex + 1}, layout=${sibling.layout ?? "-"}) ← before a style or layout change, read it with get-deck { id: deckId, slideId: "${sibling.id}", compact: "false" } and mirror its structure and values`,
|
|
446
|
+
);
|
|
447
|
+
}
|
|
448
|
+
}
|
|
449
|
+
if (designSystem) {
|
|
450
|
+
lines.push("", ...formatAgentDesignSystemContext(designSystem));
|
|
451
|
+
}
|
|
452
|
+
const designSystemPreset = getPreset(
|
|
453
|
+
typeof deck?.designSystemId === "string"
|
|
454
|
+
? deck.designSystemId
|
|
455
|
+
: "default",
|
|
456
|
+
);
|
|
457
|
+
const storedTweaks =
|
|
458
|
+
typeof deck?.tweaks === "object" &&
|
|
459
|
+
deck.tweaks !== null &&
|
|
460
|
+
!Array.isArray(deck.tweaks)
|
|
461
|
+
? (deck.tweaks as Record<string, string | number | boolean>)
|
|
462
|
+
: {};
|
|
463
|
+
lines.push(
|
|
464
|
+
"",
|
|
465
|
+
"### Deck style controls",
|
|
466
|
+
`designSystemPreset: ${designSystemPreset.name} (${designSystemPreset.id})`,
|
|
467
|
+
`storedTweaks: ${JSON.stringify(storedTweaks)}`,
|
|
468
|
+
);
|
|
469
|
+
for (const tweak of designSystemPreset.tweaks) {
|
|
470
|
+
const currentValue = storedTweaks[tweak.id] ?? tweak.defaultValue;
|
|
471
|
+
const choices = tweak.options?.length
|
|
472
|
+
? tweak.options
|
|
473
|
+
.map(
|
|
474
|
+
(option) => `${JSON.stringify(option.value)} (${option.label})`,
|
|
475
|
+
)
|
|
476
|
+
.join(", ")
|
|
477
|
+
: tweak.type === "toggle"
|
|
478
|
+
? "true, false"
|
|
479
|
+
: tweak.type === "slider"
|
|
480
|
+
? "finite numbers"
|
|
481
|
+
: "(none)";
|
|
482
|
+
lines.push(
|
|
483
|
+
`- ${tweak.id} (${tweak.label}): current=${JSON.stringify(currentValue)}; choices=${choices}`,
|
|
484
|
+
);
|
|
485
|
+
}
|
|
486
|
+
lines.push(
|
|
487
|
+
"Change these with patch-deck-fields.fields.tweaks; include the complete storedTweaks map and use exact listed choices.",
|
|
488
|
+
);
|
|
489
|
+
if (currentSlide?.content) {
|
|
490
|
+
lines.push(``);
|
|
491
|
+
lines.push(
|
|
492
|
+
`### Current slide HTML (slide ${slideNumber}, internal index ${slideIndex}, id ${currentSlide.id})`,
|
|
493
|
+
);
|
|
494
|
+
lines.push("```html");
|
|
495
|
+
lines.push(currentSlide.content);
|
|
496
|
+
lines.push("```");
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
const fetchedCommentRows = currentSlide
|
|
500
|
+
? await db
|
|
501
|
+
.select({
|
|
502
|
+
id: schema.slideComments.id,
|
|
503
|
+
slideId: schema.slideComments.slideId,
|
|
504
|
+
threadId: schema.slideComments.threadId,
|
|
505
|
+
parentId: schema.slideComments.parentId,
|
|
506
|
+
content: schema.slideComments.content,
|
|
507
|
+
quotedText: schema.slideComments.quotedText,
|
|
508
|
+
anchor: schema.slideComments.anchor,
|
|
509
|
+
emojiReactionsJson: schema.slideComments.emojiReactionsJson,
|
|
510
|
+
authorEmail: schema.slideComments.authorEmail,
|
|
511
|
+
resolved: schema.slideComments.resolved,
|
|
512
|
+
createdAt: schema.slideComments.createdAt,
|
|
513
|
+
})
|
|
514
|
+
.from(schema.slideComments)
|
|
515
|
+
.where(
|
|
516
|
+
and(
|
|
517
|
+
eq(schema.slideComments.deckId, rows[0].id),
|
|
518
|
+
eq(schema.slideComments.slideId, currentSlide.id),
|
|
519
|
+
),
|
|
520
|
+
)
|
|
521
|
+
.orderBy(asc(schema.slideComments.createdAt))
|
|
522
|
+
.limit(CURRENT_SLIDE_COMMENT_LIMIT + 1)
|
|
523
|
+
: [];
|
|
524
|
+
const commentsTruncated =
|
|
525
|
+
fetchedCommentRows.length > CURRENT_SLIDE_COMMENT_LIMIT;
|
|
526
|
+
const commentRows = commentsTruncated
|
|
527
|
+
? fetchedCommentRows.slice(0, CURRENT_SLIDE_COMMENT_LIMIT)
|
|
528
|
+
: fetchedCommentRows;
|
|
529
|
+
lines.push(``);
|
|
530
|
+
lines.push(
|
|
531
|
+
`### Comments on current slide (${commentRows.length}${commentsTruncated ? "; more available" : ""})`,
|
|
532
|
+
);
|
|
533
|
+
if (commentsTruncated) {
|
|
534
|
+
lines.push(
|
|
535
|
+
`commentsStatus: truncated; showing the first ${CURRENT_SLIDE_COMMENT_LIMIT}. Use list-slide-comments with { deckId: "${rows[0].id}", slideId: "${currentSlide?.id}", limit: ${CURRENT_SLIDE_COMMENT_LIMIT}, offset: ${CURRENT_SLIDE_COMMENT_LIMIT} } to continue.`,
|
|
536
|
+
);
|
|
537
|
+
}
|
|
538
|
+
if (commentRows.length === 0) {
|
|
539
|
+
lines.push(`(no comments)`);
|
|
540
|
+
} else {
|
|
541
|
+
for (const comment of commentRows) {
|
|
542
|
+
const anchor = parseSlideCommentAnchor(comment.anchor);
|
|
543
|
+
const reactions = summarizeSlideCommentReactions(
|
|
544
|
+
comment.emojiReactionsJson,
|
|
545
|
+
getRequestUserEmail(),
|
|
546
|
+
);
|
|
547
|
+
lines.push(
|
|
548
|
+
`commentId: ${comment.id} threadId: ${comment.threadId} parentId: ${comment.parentId ?? "(root)"}`,
|
|
549
|
+
);
|
|
550
|
+
lines.push(
|
|
551
|
+
`author: ${comment.authorEmail} resolved: ${comment.resolved ? "true" : "false"} createdAt: ${comment.createdAt}`,
|
|
552
|
+
);
|
|
553
|
+
lines.push(`content: ${comment.content}`);
|
|
554
|
+
if (comment.quotedText)
|
|
555
|
+
lines.push(`quotedText: ${comment.quotedText}`);
|
|
556
|
+
if (anchor) lines.push(`anchor: ${JSON.stringify(anchor)}`);
|
|
557
|
+
if (reactions.length > 0) {
|
|
558
|
+
lines.push(`reactions: ${JSON.stringify(reactions)}`);
|
|
559
|
+
}
|
|
560
|
+
}
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
const panels = (await readAppStateForCurrentTab(
|
|
564
|
+
appStateKey("slides-panels"),
|
|
565
|
+
{
|
|
566
|
+
fallbackToGlobal: false,
|
|
567
|
+
},
|
|
568
|
+
)) as { layersOpen?: boolean; animationsOpen?: boolean } | null;
|
|
569
|
+
const openPanels = [
|
|
570
|
+
panels?.layersOpen ? "layers" : null,
|
|
571
|
+
panels?.animationsOpen ? "animations" : null,
|
|
572
|
+
].filter(Boolean);
|
|
573
|
+
lines.push(``);
|
|
574
|
+
lines.push(`### Editor panels`);
|
|
575
|
+
lines.push(
|
|
576
|
+
panels
|
|
577
|
+
? `openPanels: ${openPanels.join(", ") || "none"}`
|
|
578
|
+
: `openPanels: unknown`,
|
|
579
|
+
);
|
|
580
|
+
|
|
581
|
+
const editorStatusState = await readAppStateForCurrentTab(
|
|
582
|
+
appStateKey(SLIDE_EDITOR_STATUS_KEY),
|
|
583
|
+
{ fallbackToGlobal: false },
|
|
584
|
+
);
|
|
585
|
+
const editorStatus = slideEditorStatusSchema.safeParse(editorStatusState);
|
|
586
|
+
const currentEditorSourceIdentity = getSlideSourceIdentity(currentSlide);
|
|
587
|
+
if (
|
|
588
|
+
editorStatus.success &&
|
|
589
|
+
currentSlide &&
|
|
590
|
+
currentEditorSourceIdentity &&
|
|
591
|
+
editorStatus.data.deckId === rows[0].id &&
|
|
592
|
+
editorStatus.data.slideId === currentSlide.id &&
|
|
593
|
+
editorStatus.data.sourceRevision ===
|
|
594
|
+
currentEditorSourceIdentity.revision &&
|
|
595
|
+
editorStatus.data.sourceHash === currentEditorSourceIdentity.sourceHash
|
|
596
|
+
) {
|
|
597
|
+
lines.push(``);
|
|
598
|
+
lines.push(`### Visual editor draft`);
|
|
599
|
+
lines.push(`editorSessionId: ${editorStatus.data.editorSessionId}`);
|
|
600
|
+
lines.push(`editorHistoryVersion: ${editorStatus.data.historyVersion}`);
|
|
601
|
+
lines.push(
|
|
602
|
+
`editorSavedSource: revision=${editorStatus.data.sourceRevision} hash=${editorStatus.data.sourceHash}`,
|
|
603
|
+
);
|
|
604
|
+
lines.push(
|
|
605
|
+
`editorDraft: ${editorStatus.data.hasPendingEdits ? "pending edits" : "saved"}; canSave=${editorStatus.data.canSave}`,
|
|
606
|
+
);
|
|
607
|
+
lines.push(
|
|
608
|
+
`editorHistoryControls: canUndo=${editorStatus.data.canUndo} canRedo=${editorStatus.data.canRedo}`,
|
|
609
|
+
);
|
|
610
|
+
const editorCommandState = await readAppStateForCurrentTab(
|
|
611
|
+
appStateKey(SLIDE_EDITOR_COMMAND_KEY),
|
|
612
|
+
{ fallbackToGlobal: false },
|
|
613
|
+
);
|
|
614
|
+
const editorCommand =
|
|
615
|
+
slideEditorCommandSchema.safeParse(editorCommandState);
|
|
616
|
+
if (
|
|
617
|
+
editorCommand.success &&
|
|
618
|
+
editorCommand.data.deckId === editorStatus.data.deckId &&
|
|
619
|
+
editorCommand.data.slideId === editorStatus.data.slideId &&
|
|
620
|
+
editorCommand.data.editorSessionId ===
|
|
621
|
+
editorStatus.data.editorSessionId &&
|
|
622
|
+
(editorCommand.data.status !== "pending" ||
|
|
623
|
+
(editorCommand.data.historyVersion ===
|
|
624
|
+
editorStatus.data.historyVersion &&
|
|
625
|
+
editorCommand.data.sourceRevision ===
|
|
626
|
+
editorStatus.data.sourceRevision &&
|
|
627
|
+
editorCommand.data.sourceHash === editorStatus.data.sourceHash))
|
|
628
|
+
) {
|
|
629
|
+
lines.push(
|
|
630
|
+
`lastEditorCommand: id=${editorCommand.data.commandId} operation=${editorCommand.data.operation} status=${editorCommand.data.status}` +
|
|
631
|
+
(editorCommand.data.failureCode
|
|
632
|
+
? ` failure=${editorCommand.data.failureCode}`
|
|
633
|
+
: ""),
|
|
634
|
+
);
|
|
635
|
+
}
|
|
636
|
+
}
|
|
637
|
+
|
|
638
|
+
const deckHistoryStatusState = await readAppStateForCurrentTab(
|
|
639
|
+
appStateKey(DECK_HISTORY_STATUS_KEY),
|
|
640
|
+
{ fallbackToGlobal: false },
|
|
641
|
+
);
|
|
642
|
+
const deckHistoryStatus = deckHistoryStatusSchema.safeParse(
|
|
643
|
+
deckHistoryStatusState,
|
|
644
|
+
);
|
|
645
|
+
if (
|
|
646
|
+
deckHistoryStatus.success &&
|
|
647
|
+
deckHistoryStatus.data.deckId === rows[0].id
|
|
648
|
+
) {
|
|
649
|
+
lines.push(``);
|
|
650
|
+
lines.push(`### DeckEditor history`);
|
|
651
|
+
lines.push(
|
|
652
|
+
`editorSessionId: ${deckHistoryStatus.data.editorSessionId}`,
|
|
653
|
+
);
|
|
654
|
+
lines.push(`historyVersion: ${deckHistoryStatus.data.historyVersion}`);
|
|
655
|
+
lines.push(
|
|
656
|
+
`historyControls: canUndo=${deckHistoryStatus.data.canUndo} canRedo=${deckHistoryStatus.data.canRedo}`,
|
|
657
|
+
);
|
|
658
|
+
const historyCommandState = await readAppStateForCurrentTab(
|
|
659
|
+
appStateKey(DECK_HISTORY_COMMAND_KEY),
|
|
660
|
+
{ fallbackToGlobal: false },
|
|
661
|
+
);
|
|
662
|
+
const historyCommand =
|
|
663
|
+
deckHistoryCommandSchema.safeParse(historyCommandState);
|
|
664
|
+
if (
|
|
665
|
+
historyCommand.success &&
|
|
666
|
+
historyCommand.data.deckId === deckHistoryStatus.data.deckId &&
|
|
667
|
+
historyCommand.data.editorSessionId ===
|
|
668
|
+
deckHistoryStatus.data.editorSessionId
|
|
669
|
+
) {
|
|
670
|
+
lines.push(
|
|
671
|
+
`lastDeckHistoryCommand: id=${historyCommand.data.commandId} operation=${historyCommand.data.operation} status=${historyCommand.data.status}` +
|
|
672
|
+
(historyCommand.data.failureCode
|
|
673
|
+
? ` failure=${historyCommand.data.failureCode}`
|
|
674
|
+
: ""),
|
|
675
|
+
);
|
|
676
|
+
}
|
|
677
|
+
}
|
|
678
|
+
|
|
679
|
+
const selection = (await readAppStateForCurrentTab(
|
|
680
|
+
appStateKey("slides-selection"),
|
|
681
|
+
{ fallbackToGlobal: false },
|
|
682
|
+
)) as {
|
|
683
|
+
deckId?: string;
|
|
684
|
+
slideId?: string;
|
|
685
|
+
sourceRevision?: number;
|
|
686
|
+
sourceHash?: string;
|
|
687
|
+
mode?: string;
|
|
688
|
+
activeTool?: string;
|
|
689
|
+
textRange?: unknown;
|
|
690
|
+
items?: Array<{
|
|
691
|
+
selector?: string;
|
|
692
|
+
runtimeSelector?: string;
|
|
693
|
+
objectId?: string;
|
|
694
|
+
text?: string;
|
|
695
|
+
selectedText?: string;
|
|
696
|
+
textTruncated?: boolean;
|
|
697
|
+
kind?: string;
|
|
698
|
+
tagName?: string;
|
|
699
|
+
sourceLine?: number;
|
|
700
|
+
sourceColumn?: number;
|
|
701
|
+
sourceTag?: string;
|
|
702
|
+
sourceText?: string;
|
|
703
|
+
sourceStyle?: Record<string, unknown>;
|
|
704
|
+
imageSrc?: string;
|
|
705
|
+
videoSrc?: string;
|
|
706
|
+
style?: Record<string, unknown>;
|
|
707
|
+
}>;
|
|
708
|
+
} | null;
|
|
709
|
+
const openPanel = (await readAppStateForCurrentTab(
|
|
710
|
+
appStateKey("slides-open-panel"),
|
|
711
|
+
{ fallbackToGlobal: false },
|
|
712
|
+
)) as {
|
|
713
|
+
deckId?: string;
|
|
714
|
+
slideId?: string;
|
|
715
|
+
panel?: string | null;
|
|
716
|
+
} | null;
|
|
717
|
+
if (
|
|
718
|
+
openPanel?.panel &&
|
|
719
|
+
openPanel.deckId === rows[0].id &&
|
|
720
|
+
openPanel.slideId === currentSlide?.id
|
|
721
|
+
) {
|
|
722
|
+
lines.push(``);
|
|
723
|
+
lines.push(`### Open side panel`);
|
|
724
|
+
lines.push(`openPanel: ${openPanel.panel}`);
|
|
725
|
+
}
|
|
726
|
+
const matchingSelectionSlides =
|
|
727
|
+
selection?.deckId === rows[0].id && selection.slideId
|
|
728
|
+
? slides.filter((slide) => slide.id === selection.slideId)
|
|
729
|
+
: [];
|
|
730
|
+
const selectionSlide =
|
|
731
|
+
matchingSelectionSlides.length === 1
|
|
732
|
+
? matchingSelectionSlides[0]
|
|
733
|
+
: null;
|
|
734
|
+
const selectionSourceIdentity = getSlideSourceIdentity(selectionSlide);
|
|
735
|
+
const selectionSourceMatches = Boolean(
|
|
736
|
+
selection &&
|
|
737
|
+
selectionSourceIdentity &&
|
|
738
|
+
selection.sourceRevision === selectionSourceIdentity.revision &&
|
|
739
|
+
selection.sourceHash === selectionSourceIdentity.sourceHash,
|
|
740
|
+
);
|
|
741
|
+
const rangeTarget =
|
|
742
|
+
selection?.items?.length === 1 &&
|
|
743
|
+
typeof selection.items[0]?.sourceLine === "number" &&
|
|
744
|
+
typeof selection.items[0]?.sourceColumn === "number"
|
|
745
|
+
? {
|
|
746
|
+
line: selection.items[0].sourceLine,
|
|
747
|
+
column: selection.items[0].sourceColumn,
|
|
748
|
+
}
|
|
749
|
+
: null;
|
|
750
|
+
const selectedTextRange =
|
|
751
|
+
selectionSourceMatches && selectionSlide && selectionSourceIdentity
|
|
752
|
+
? currentSlideTextRangeSelection(
|
|
753
|
+
selection?.textRange,
|
|
754
|
+
{
|
|
755
|
+
slideId: selectionSlide.id,
|
|
756
|
+
...selectionSourceIdentity,
|
|
757
|
+
},
|
|
758
|
+
rangeTarget,
|
|
759
|
+
)
|
|
760
|
+
: null;
|
|
761
|
+
if (selection && selectionSlide) {
|
|
762
|
+
const sourceBackedSelection =
|
|
763
|
+
typeof selectionSlide.sourceTsx === "string";
|
|
764
|
+
lines.push(``);
|
|
765
|
+
lines.push(`### Current visual selection`);
|
|
766
|
+
if (typeof selectionSlide.sourceTsx === "string") {
|
|
767
|
+
lines.push(
|
|
768
|
+
`sourceSelectionStatus: ${selectionSourceMatches ? "current" : selectionSourceIdentity ? "stale or unverified" : "current source integrity could not be verified"}`,
|
|
769
|
+
);
|
|
770
|
+
}
|
|
771
|
+
lines.push(
|
|
772
|
+
`editorCurrentSlideId: ${selectionSlide.id} ← authoritative slide recorded by the editor; use this for the next focused edit`,
|
|
773
|
+
);
|
|
774
|
+
lines.push(
|
|
775
|
+
`selectionSlideId: ${selection.slideId}` +
|
|
776
|
+
(selectionSlide.id === currentSlide?.id
|
|
777
|
+
? ` (matches currentSlideId)`
|
|
778
|
+
: ` (differs from currentSlideId ${currentSlide?.id ?? "(none)"} — use selectionSlideId, the slide this selection was made on)`),
|
|
779
|
+
);
|
|
780
|
+
if (selectionSlide.id !== currentSlide?.id) {
|
|
781
|
+
if (typeof selectionSlide.sourceTsx === "string") {
|
|
782
|
+
lines.push(
|
|
783
|
+
`selectionSlideSource: React source-backed; read get-slide-source for this slide before update-slide-source`,
|
|
784
|
+
);
|
|
785
|
+
} else {
|
|
786
|
+
lines.push(
|
|
787
|
+
`selectionSlideContentHash: ${hashSlideContent(String(selectionSlide.content ?? ""))} ← use as baseContentHash with selectionSlideId`,
|
|
788
|
+
);
|
|
789
|
+
}
|
|
790
|
+
}
|
|
791
|
+
lines.push(`mode: ${selection.mode ?? "unknown"}`);
|
|
792
|
+
lines.push(`activeTool: ${selection.activeTool ?? "select"}`);
|
|
793
|
+
if (selectedTextRange) {
|
|
794
|
+
lines.push(
|
|
795
|
+
`selectedTextRange: source element at ${selectedTextRange.sourceLine}:${selectedTextRange.sourceColumn}; UTF-16 offsets [${selectedTextRange.start}, ${selectedTextRange.end}); expectedText=${JSON.stringify(selectedTextRange.expectedText)}`,
|
|
796
|
+
);
|
|
797
|
+
lines.push(
|
|
798
|
+
`selectedTextRangeStatus: current; use update-slide-source with set-text-range-style at line=${selectedTextRange.sourceLine}, column=${selectedTextRange.sourceColumn}, start=${selectedTextRange.start}, end=${selectedTextRange.end}, and expectedText as prevText`,
|
|
799
|
+
);
|
|
800
|
+
}
|
|
801
|
+
if (Array.isArray(selection.items) && selection.items.length > 0) {
|
|
802
|
+
for (const [index, item] of selection.items.entries()) {
|
|
803
|
+
if (
|
|
804
|
+
typeof item.sourceLine === "number" &&
|
|
805
|
+
Number.isInteger(item.sourceLine) &&
|
|
806
|
+
item.sourceLine >= 1
|
|
807
|
+
) {
|
|
808
|
+
const sourceColumn =
|
|
809
|
+
typeof item.sourceColumn === "number" &&
|
|
810
|
+
Number.isInteger(item.sourceColumn) &&
|
|
811
|
+
item.sourceColumn >= 0
|
|
812
|
+
? item.sourceColumn
|
|
813
|
+
: 0;
|
|
814
|
+
lines.push(
|
|
815
|
+
`selected ${index + 1}: source element <${typeof item.sourceTag === "string" ? item.sourceTag : "element"}> at ${item.sourceLine}:${sourceColumn}`,
|
|
816
|
+
);
|
|
817
|
+
const renderedInstance = getRenderedInstanceIdentity(item);
|
|
818
|
+
if (renderedInstance) {
|
|
819
|
+
lines.push(
|
|
820
|
+
`renderedInstance: ${renderedInstance.instanceIndex + 1} of ${renderedInstance.instanceCount}`,
|
|
821
|
+
);
|
|
822
|
+
if (renderedInstance.instanceCount > 1) {
|
|
823
|
+
lines.push(
|
|
824
|
+
`sourceCallsiteStatus: shared across ${renderedInstance.instanceCount} visible instances; duplicate/delete cannot target one rendered copy safely and will be rejected`,
|
|
825
|
+
);
|
|
826
|
+
}
|
|
827
|
+
} else {
|
|
828
|
+
lines.push(
|
|
829
|
+
"sourceCallsiteStatus: rendered instance metadata is unavailable; duplicate/delete require a fresh editor selection",
|
|
830
|
+
);
|
|
831
|
+
}
|
|
832
|
+
if (typeof item.sourceText === "string") {
|
|
833
|
+
lines.push(
|
|
834
|
+
`sourceTextPreview: ${JSON.stringify(item.sourceText)}`,
|
|
835
|
+
);
|
|
836
|
+
}
|
|
837
|
+
lines.push(
|
|
838
|
+
selectionSourceMatches
|
|
839
|
+
? `sourceTargetStatus: use get-slide-source, then update-slide-source with line=${item.sourceLine}, column=${sourceColumn}; the selection revision and source hash match the current source, and sourceTextPreview is not an exact browser-range selection`
|
|
840
|
+
: `sourceTargetStatus: the selection source identity is stale or unavailable; do not apply this line and column directly. Reselect the element or inspect the current source with get-slide-source`,
|
|
841
|
+
);
|
|
842
|
+
if (
|
|
843
|
+
item.sourceStyle &&
|
|
844
|
+
typeof item.sourceStyle === "object" &&
|
|
845
|
+
!Array.isArray(item.sourceStyle)
|
|
846
|
+
) {
|
|
847
|
+
lines.push(`sourceStyle: ${JSON.stringify(item.sourceStyle)}`);
|
|
848
|
+
}
|
|
849
|
+
continue;
|
|
850
|
+
}
|
|
851
|
+
const isImageSelection =
|
|
852
|
+
item.kind === "image" || item.tagName?.toLowerCase() === "img";
|
|
853
|
+
const isVideoSelection =
|
|
854
|
+
item.kind === "video" || item.tagName?.toLowerCase() === "video";
|
|
855
|
+
lines.push(
|
|
856
|
+
`selected ${index + 1}: ${item.kind ?? "element"} ${item.tagName ?? ""} selector=${item.selector ?? "(none)"}`,
|
|
857
|
+
);
|
|
858
|
+
if (item.objectId && !isImageSelection) {
|
|
859
|
+
lines.push(`objectId: ${item.objectId}`);
|
|
860
|
+
lines.push(
|
|
861
|
+
sourceBackedSelection
|
|
862
|
+
? "objectIdStatus: React source-backed slide; do not use objectId with update-slide. Read get-slide-source and map the element to a unique source locator for update-slide-source, or reselect/clarify if ambiguous"
|
|
863
|
+
: "objectIdStatus: stable selected-element target on a legacy/imported HTML slide; use it with one update-slide replace edit when selectedText is unavailable",
|
|
864
|
+
);
|
|
865
|
+
}
|
|
866
|
+
if (item.runtimeSelector) {
|
|
867
|
+
lines.push(`runtimeSelector: ${item.runtimeSelector}`);
|
|
868
|
+
}
|
|
869
|
+
if (item.selectedText) {
|
|
870
|
+
lines.push(`selectedText: ${item.selectedText}`);
|
|
871
|
+
lines.push(
|
|
872
|
+
sourceBackedSelection
|
|
873
|
+
? "selectedTextStatus: React source-backed slide; read get-slide-source and map this text to a unique source locator for update-slide-source, or reselect/clarify if ambiguous"
|
|
874
|
+
: "selectedTextStatus: exact browser range on a legacy/imported HTML slide; use verbatim as edits.find with expectedMatches: 1",
|
|
875
|
+
);
|
|
876
|
+
}
|
|
877
|
+
if (isImageSelection) {
|
|
878
|
+
lines.push(
|
|
879
|
+
"imageStatus: image selection has no editable text content; use the targeted image/markup workflow",
|
|
880
|
+
);
|
|
881
|
+
} else if (isVideoSelection) {
|
|
882
|
+
lines.push(
|
|
883
|
+
sourceBackedSelection
|
|
884
|
+
? "videoStatus: React source-backed slide; read get-slide-source and edit through update-slide-source only when the source target is unique, otherwise reselect/clarify"
|
|
885
|
+
: "videoStatus: legacy/imported HTML video selection has no editable text content; use update-slide to change its source or playback attributes",
|
|
886
|
+
);
|
|
887
|
+
} else if (item.text) {
|
|
888
|
+
lines.push(`text: ${item.text}`);
|
|
889
|
+
if (!item.selectedText) {
|
|
890
|
+
lines.push(
|
|
891
|
+
sourceBackedSelection
|
|
892
|
+
? "textStatus: React source-backed element preview; read get-slide-source and map it to a unique JSX source locator for update-slide-source, or reselect/clarify if ambiguous"
|
|
893
|
+
: item.objectId
|
|
894
|
+
? "textStatus: element preview is not an exact browser-range selection; use objectId with update-slide for an element-only replacement"
|
|
895
|
+
: item.textTruncated === true
|
|
896
|
+
? `textStatus: element preview may be truncated; use get-deck with slideId=${selectionSlide.id} before editing`
|
|
897
|
+
: item.textTruncated === false
|
|
898
|
+
? `textStatus: element text is complete but is not an exact browser-range selection; use get-deck with slideId=${selectionSlide.id} before editing`
|
|
899
|
+
: `textStatus: element preview status unknown; use get-deck with slideId=${selectionSlide.id} before editing`,
|
|
900
|
+
);
|
|
901
|
+
} else {
|
|
902
|
+
lines.push(
|
|
903
|
+
sourceBackedSelection
|
|
904
|
+
? "textStatus: React source-backed selection; read get-slide-source and map the text to a unique JSX source locator for update-slide-source, or reselect/clarify if ambiguous"
|
|
905
|
+
: "textStatus: element preview; use selectedText for a literal replacement",
|
|
906
|
+
);
|
|
907
|
+
}
|
|
908
|
+
}
|
|
909
|
+
if (item.imageSrc) lines.push(`imageSrc: ${item.imageSrc}`);
|
|
910
|
+
if (item.videoSrc) lines.push(`videoSrc: ${item.videoSrc}`);
|
|
911
|
+
if (item.style) {
|
|
912
|
+
lines.push(`style: ${JSON.stringify(item.style)}`);
|
|
913
|
+
}
|
|
914
|
+
}
|
|
915
|
+
} else {
|
|
916
|
+
lines.push(`(no selected elements)`);
|
|
917
|
+
}
|
|
918
|
+
}
|
|
919
|
+
|
|
920
|
+
const currentSlideMeasurement = getCurrentSlideFitMeasurement(
|
|
921
|
+
await readAppStateForCurrentTab(appStateKey("slide-fit-check")),
|
|
922
|
+
currentSlide,
|
|
923
|
+
rows[0].id,
|
|
924
|
+
);
|
|
925
|
+
const verticalOverflow = currentSlideMeasurement?.verticalOverflow ?? 0;
|
|
926
|
+
const horizontalOverflow =
|
|
927
|
+
currentSlideMeasurement?.horizontalOverflow ?? 0;
|
|
928
|
+
if (
|
|
929
|
+
currentSlideMeasurement &&
|
|
930
|
+
(verticalOverflow > 0 || horizontalOverflow > 0)
|
|
931
|
+
) {
|
|
932
|
+
lines.push(``);
|
|
933
|
+
lines.push(`### ⚠ Layout overflows the canvas`);
|
|
934
|
+
lines.push(
|
|
935
|
+
`This slide's natural rendered content is ${currentSlideMeasurement.contentWidth}x${currentSlideMeasurement.contentHeight}px, ` +
|
|
936
|
+
`but the canvas content area is ${currentSlideMeasurement.viewportWidth}x${currentSlideMeasurement.viewportHeight}px ` +
|
|
937
|
+
`(overflow: ${verticalOverflow}px vertical, ${horizontalOverflow}px horizontal). The renderer no longer ` +
|
|
938
|
+
`auto-shrinks overflowing slides — you must rewrite the slide HTML so ` +
|
|
939
|
+
`the rendered content fits the measured content area. Options, ` +
|
|
940
|
+
`in order of preference: (1) tighten copy — shorter headings/bullets, ` +
|
|
941
|
+
`drop low-value lines; (2) reduce vertical density — fewer stacked ` +
|
|
942
|
+
`cards, smaller gaps, slightly smaller body font (not below 16px); ` +
|
|
943
|
+
`(3) reduce slide padding (e.g. 40px top/bottom); (4) split the ` +
|
|
944
|
+
`content across two slides if it genuinely cannot be compressed. ` +
|
|
945
|
+
`Do not solve this with transform: scale, overflow: scroll, or ` +
|
|
946
|
+
`absolute positioning — only the HTML shape can fix it now.`,
|
|
947
|
+
);
|
|
948
|
+
}
|
|
949
|
+
|
|
950
|
+
const deckFit = (await readAppStateForCurrentTab(
|
|
951
|
+
appStateKey("deck-fit-checks"),
|
|
952
|
+
)) as DeckFitState | null;
|
|
953
|
+
if (
|
|
954
|
+
deckFit?.deckId === rows[0].id &&
|
|
955
|
+
deckFit.aspectRatio === (deck.aspectRatio ?? "16:9") &&
|
|
956
|
+
deckFit.slides
|
|
957
|
+
) {
|
|
958
|
+
type DeckFitSummary =
|
|
959
|
+
| { kind: "unknown"; index: number }
|
|
960
|
+
| {
|
|
961
|
+
kind: "overflow";
|
|
962
|
+
index: number;
|
|
963
|
+
measurement: (typeof deckFit.slides)[string];
|
|
964
|
+
};
|
|
965
|
+
const measured: DeckFitSummary[] = slides.flatMap(
|
|
966
|
+
(slide, index): DeckFitSummary[] => {
|
|
967
|
+
const measurement =
|
|
968
|
+
slide.id === currentSlideMeasurement?.slideId
|
|
969
|
+
? currentSlideMeasurement
|
|
970
|
+
: deckFit.slides[slide.id];
|
|
971
|
+
if (
|
|
972
|
+
!measurement ||
|
|
973
|
+
!slideFitMeasurementMatchesSlide(measurement, slide) ||
|
|
974
|
+
!Number.isFinite(measurement.verticalOverflow) ||
|
|
975
|
+
!Number.isFinite(measurement.horizontalOverflow) ||
|
|
976
|
+
!Number.isFinite(measurement.contentHeight) ||
|
|
977
|
+
!Number.isFinite(measurement.contentWidth) ||
|
|
978
|
+
!Number.isFinite(measurement.viewportHeight) ||
|
|
979
|
+
!Number.isFinite(measurement.viewportWidth) ||
|
|
980
|
+
!Number.isFinite(measurement.measuredAt)
|
|
981
|
+
) {
|
|
982
|
+
return [{ kind: "unknown" as const, index }];
|
|
983
|
+
}
|
|
984
|
+
return measurement.verticalOverflow > 0 ||
|
|
985
|
+
measurement.horizontalOverflow > 0
|
|
986
|
+
? [{ kind: "overflow" as const, index, measurement }]
|
|
987
|
+
: [];
|
|
988
|
+
},
|
|
989
|
+
);
|
|
990
|
+
const unknown = measured.filter((item) => item.kind === "unknown");
|
|
991
|
+
const overflows = measured.filter((item) => item.kind === "overflow");
|
|
992
|
+
lines.push(``);
|
|
993
|
+
lines.push(`### Deck-wide layout fit`);
|
|
994
|
+
if (unknown.length > 0) {
|
|
995
|
+
lines.push(
|
|
996
|
+
`Measured ${slides.length - unknown.length} of ${slides.length} slides; ` +
|
|
997
|
+
`the remaining slides need a fresh browser measurement before claiming the deck fits.`,
|
|
998
|
+
);
|
|
999
|
+
} else if (overflows.length > 0) {
|
|
1000
|
+
lines.push(
|
|
1001
|
+
`Overflow detected on ${overflows.length} slide(s): ${overflows
|
|
1002
|
+
.map((item) => {
|
|
1003
|
+
if (item.kind !== "overflow") return "";
|
|
1004
|
+
return `slide ${item.index + 1} (${item.measurement.verticalOverflow}px vertical, ${item.measurement.horizontalOverflow}px horizontal)`;
|
|
1005
|
+
})
|
|
1006
|
+
.join(", ")}.`,
|
|
1007
|
+
);
|
|
1008
|
+
} else {
|
|
1009
|
+
lines.push(
|
|
1010
|
+
`All ${slides.length} slides fit their measured content area.`,
|
|
1011
|
+
);
|
|
1012
|
+
}
|
|
1013
|
+
}
|
|
1014
|
+
|
|
1015
|
+
return lines.join("\n");
|
|
1016
|
+
}
|
|
1017
|
+
|
|
1018
|
+
const rows = await db
|
|
1019
|
+
.select({
|
|
1020
|
+
id: schema.decks.id,
|
|
1021
|
+
title: schema.decks.title,
|
|
1022
|
+
ownerEmail: schema.decks.ownerEmail,
|
|
1023
|
+
})
|
|
1024
|
+
.from(schema.decks)
|
|
1025
|
+
.where(
|
|
1026
|
+
and(accessFilter(schema.decks, schema.deckShares), slides2DeckScope),
|
|
1027
|
+
)
|
|
1028
|
+
.orderBy(desc(schema.decks.updatedAt));
|
|
1029
|
+
|
|
1030
|
+
const normalizedUserEmail = normalizeOwnerEmail(getRequestUserEmail());
|
|
1031
|
+
const homeTab =
|
|
1032
|
+
navigation?.homeTab === "templates" ? "templates" : "recent";
|
|
1033
|
+
const deckFilter = navigation?.deckFilter ?? "all";
|
|
1034
|
+
const normalizedDeckSearch =
|
|
1035
|
+
homeTab === "recent" && typeof navigation?.deckSearch === "string"
|
|
1036
|
+
? navigation.deckSearch.trim().toLowerCase()
|
|
1037
|
+
: "";
|
|
1038
|
+
const filteredRows = rows.filter((row) => {
|
|
1039
|
+
if (deckFilter !== "all") {
|
|
1040
|
+
if (normalizedUserEmail === null) return false;
|
|
1041
|
+
const isOwnedByCurrentUser =
|
|
1042
|
+
normalizeOwnerEmail(row.ownerEmail) === normalizedUserEmail;
|
|
1043
|
+
if (
|
|
1044
|
+
(deckFilter === "created-by-me" && !isOwnedByCurrentUser) ||
|
|
1045
|
+
(deckFilter === "shared" && isOwnedByCurrentUser)
|
|
1046
|
+
) {
|
|
1047
|
+
return false;
|
|
1048
|
+
}
|
|
1049
|
+
}
|
|
1050
|
+
return (
|
|
1051
|
+
!normalizedDeckSearch ||
|
|
1052
|
+
(row.title ?? "").toLowerCase().includes(normalizedDeckSearch)
|
|
1053
|
+
);
|
|
1054
|
+
});
|
|
1055
|
+
const lines: string[] = [];
|
|
1056
|
+
lines.push(`## Current Screen`);
|
|
1057
|
+
lines.push(``);
|
|
1058
|
+
lines.push(`view: ${effectiveNavigation?.view ?? "list"}`);
|
|
1059
|
+
lines.push(`No deck currently open. User is on the deck list.`);
|
|
1060
|
+
lines.push(`homeTab: ${homeTab}`);
|
|
1061
|
+
if (normalizedDeckSearch) {
|
|
1062
|
+
lines.push(`deckSearch: ${navigation?.deckSearch ?? ""}`);
|
|
1063
|
+
}
|
|
1064
|
+
lines.push(
|
|
1065
|
+
`deckFilter: ${
|
|
1066
|
+
deckFilter === "created-by-me"
|
|
1067
|
+
? "created by me"
|
|
1068
|
+
: deckFilter === "shared"
|
|
1069
|
+
? "shared with me"
|
|
1070
|
+
: "all accessible decks"
|
|
1071
|
+
}`,
|
|
1072
|
+
);
|
|
1073
|
+
lines.push(``);
|
|
1074
|
+
lines.push(
|
|
1075
|
+
deckFilter === "created-by-me"
|
|
1076
|
+
? `### Decks created by current user (${filteredRows.length} of ${rows.length})`
|
|
1077
|
+
: deckFilter === "shared"
|
|
1078
|
+
? `### Decks shared with current user (${filteredRows.length} of ${rows.length})`
|
|
1079
|
+
: `### All decks (${filteredRows.length} of ${rows.length})`,
|
|
1080
|
+
);
|
|
1081
|
+
if (filteredRows.length === 0) {
|
|
1082
|
+
lines.push(
|
|
1083
|
+
deckFilter === "all" && !normalizedDeckSearch
|
|
1084
|
+
? `(no decks — use create-deck to make one)`
|
|
1085
|
+
: `(no decks match the current Home filters)`,
|
|
1086
|
+
);
|
|
1087
|
+
} else {
|
|
1088
|
+
for (const row of filteredRows) {
|
|
1089
|
+
lines.push(`- id=${row.id} title="${row.title ?? "(untitled)"}"`);
|
|
1090
|
+
}
|
|
1091
|
+
lines.push(``);
|
|
1092
|
+
lines.push(
|
|
1093
|
+
`(slide counts omitted here for performance — call list-decks or open a deck to see slide content)`,
|
|
1094
|
+
);
|
|
1095
|
+
}
|
|
1096
|
+
return lines.join("\n");
|
|
1097
|
+
},
|
|
1098
|
+
});
|