@agent-native/core-corpus 0.214.0 → 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 +11 -0
- package/corpus/templates/content/.agents/skills/notion-integration/SKILL.md +4 -2
- package/corpus/templates/content/CHANGELOG.md +46 -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 +16 -0
- 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/_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 +2 -0
- package/corpus/templates/content/actions/update-document.ts +19 -14
- 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 +205 -71
- 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 +21 -0
- package/corpus/templates/content/app/hooks/use-content-trash.ts +8 -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-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 +2 -0
- package/corpus/templates/content/shared/blocks-fields-manifest.ts +106 -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,938 @@
|
|
|
1
|
+
import {
|
|
2
|
+
callAction,
|
|
3
|
+
deleteClientAppState,
|
|
4
|
+
} from "@agent-native/core/client/hooks";
|
|
5
|
+
import type { PromptComposerSubmitOptions } from "@agent-native/toolkit/app/chat/composer/index";
|
|
6
|
+
import { appStateKey, appStateKeyForBrowserTab } from "@shared/app-state-tabs";
|
|
7
|
+
import { extractGoogleDocUrls } from "@shared/google-docs";
|
|
8
|
+
import { nanoid } from "nanoid";
|
|
9
|
+
import { flushSync } from "react-dom";
|
|
10
|
+
|
|
11
|
+
import type { NewDeckReferenceSelection } from "@/components/editor/NewDeckReferenceStep";
|
|
12
|
+
import type { UploadedFile } from "@/components/editor/PromptDialog";
|
|
13
|
+
import type { Deck, DeckPersistenceResult } from "@/context/DeckContext";
|
|
14
|
+
import { createDeckAgentMessage } from "@/lib/agent-visible-message";
|
|
15
|
+
import { canAddInlineImageToPayload } from "@/lib/image-drop-to-agent";
|
|
16
|
+
import {
|
|
17
|
+
importUploadedDeckIntoDeck,
|
|
18
|
+
validateUploadedDeckImport,
|
|
19
|
+
type ImportedSourceDeck,
|
|
20
|
+
} from "@/lib/import-uploaded-deck";
|
|
21
|
+
import {
|
|
22
|
+
hydrateReferenceDocuments,
|
|
23
|
+
referenceDocumentFormat,
|
|
24
|
+
} from "@/lib/reference-document-hydration";
|
|
25
|
+
import { TAB_ID } from "@/lib/tab-id";
|
|
26
|
+
|
|
27
|
+
export const WEBSITE_STYLE_REFERENCE_DIRECTIVE =
|
|
28
|
+
"When the user asks to use or match a website's styling or branding and provides a URL, call `import-from-url` for each URL before generating. Treat the returned design.md-style visual system as the source of truth for colors, typography, spacing, components, and imagery. If no URL is provided, ask for one instead of guessing the site's style from its name.";
|
|
29
|
+
|
|
30
|
+
export const NO_UPLOADED_FILES_CONTEXT =
|
|
31
|
+
"No uploaded files are attached to this run. Use source text already present in the user message or supplied reference context. For a supplied URL, follow its dedicated import instructions. Never invent a local file path or call `import-file` for an unattached file. If the referenced content is not present or retrievable from a supplied reference, ask the user to upload the file or paste its contents.";
|
|
32
|
+
|
|
33
|
+
export const BLANK_AND_FOLLOW_UP_SCOPE_INSTRUCTION =
|
|
34
|
+
'Scale the work to the request; this rule overrides the generation steps below. A blank or empty deck request needs no question, outline, progress run, retitle, or audit: add one empty slide with `add-slide` (layout "blank") and reply. These generation instructions govern only this generation and its guided-question answers; a later direct request in this thread, such as adding an empty slide, renaming, reordering, or deleting, is a targeted edit: make it with the one action it needs and reply.';
|
|
35
|
+
|
|
36
|
+
export const SLIDE_COUNT_COMPLETION_INSTRUCTION =
|
|
37
|
+
"For a requested slide count, compare the realSlideCount returned by every add-slide result (slideCount only if realSlideCount is absent) with the persisted target; blank placeholder slides do not count. Once it matches, stop all slide writes and return a completion summary. If add-slide returns errorCode target_slide_count_reached, re-read get-deck once; if the target is already satisfied, stop without retrying and finish the response. Only add more slides if the user explicitly asks to extend the deck and targetSlideCountOverride is set to the new total of real slides.";
|
|
38
|
+
|
|
39
|
+
interface DesignSystemGenerationContextResult {
|
|
40
|
+
agentContext?: string;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
async function loadDesignSystemGenerationContext(
|
|
44
|
+
designSystemId?: string | null,
|
|
45
|
+
): Promise<string> {
|
|
46
|
+
if (!designSystemId) return "";
|
|
47
|
+
try {
|
|
48
|
+
const result = (await callAction(
|
|
49
|
+
"get-design-system",
|
|
50
|
+
{ id: designSystemId },
|
|
51
|
+
{ method: "GET" },
|
|
52
|
+
)) as DesignSystemGenerationContextResult | undefined;
|
|
53
|
+
if (result?.agentContext?.trim()) {
|
|
54
|
+
return [
|
|
55
|
+
"",
|
|
56
|
+
result.agentContext.trim(),
|
|
57
|
+
"",
|
|
58
|
+
"The selected design system context above was hydrated before this agent run. Follow it directly; do not replace it with generic colors, fonts, spacing, imagery, or slide components.",
|
|
59
|
+
].join("\n");
|
|
60
|
+
}
|
|
61
|
+
} catch (error) {
|
|
62
|
+
const message =
|
|
63
|
+
error instanceof Error ? error.message : "unknown loading error";
|
|
64
|
+
return [
|
|
65
|
+
"",
|
|
66
|
+
"## Selected Design System Context",
|
|
67
|
+
`The selected design system id "${designSystemId}" could not be loaded before generation: ${message}`,
|
|
68
|
+
"Before adding slides, call `get-design-system` for this id. If it still fails, stop and tell the user the selected design system is unavailable instead of improvising a generic style.",
|
|
69
|
+
].join("\n");
|
|
70
|
+
}
|
|
71
|
+
return [
|
|
72
|
+
"",
|
|
73
|
+
"## Selected Design System Context",
|
|
74
|
+
`The selected design system id "${designSystemId}" returned no generation context.`,
|
|
75
|
+
"Call `get-design-system` for this id before adding slides. If it still has no usable tokens/docs, stop and ask the user to finish design-system indexing instead of improvising a generic style.",
|
|
76
|
+
].join("\n");
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
interface ReferenceDeckContextResult {
|
|
80
|
+
agentContext?: string;
|
|
81
|
+
designSystemId?: string | null;
|
|
82
|
+
linkedDesignSystemStatus?: "available" | "unavailable" | "none";
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
interface LoadedReferenceDeckContext {
|
|
86
|
+
status: "none" | "loaded" | "unavailable";
|
|
87
|
+
agentContext: string;
|
|
88
|
+
designSystemId: string | null;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
function getLinkedDesignSystemStatus(
|
|
92
|
+
result: ReferenceDeckContextResult,
|
|
93
|
+
): "available" | "unavailable" | "none" | null {
|
|
94
|
+
const { designSystemId, linkedDesignSystemStatus } = result;
|
|
95
|
+
const normalizedId =
|
|
96
|
+
typeof designSystemId === "string" && designSystemId.trim()
|
|
97
|
+
? designSystemId.trim()
|
|
98
|
+
: null;
|
|
99
|
+
|
|
100
|
+
if (linkedDesignSystemStatus === "none" && designSystemId === null) {
|
|
101
|
+
return "none";
|
|
102
|
+
}
|
|
103
|
+
if (
|
|
104
|
+
(linkedDesignSystemStatus === "available" ||
|
|
105
|
+
linkedDesignSystemStatus === "unavailable") &&
|
|
106
|
+
normalizedId
|
|
107
|
+
) {
|
|
108
|
+
return linkedDesignSystemStatus;
|
|
109
|
+
}
|
|
110
|
+
return null;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
async function loadReferenceDeckGenerationContext(
|
|
114
|
+
referenceDeckId?: string | null,
|
|
115
|
+
): Promise<LoadedReferenceDeckContext> {
|
|
116
|
+
if (!referenceDeckId) {
|
|
117
|
+
return { status: "none", agentContext: "", designSystemId: null };
|
|
118
|
+
}
|
|
119
|
+
try {
|
|
120
|
+
const result = (await callAction(
|
|
121
|
+
"get-deck-reference-context",
|
|
122
|
+
{ id: referenceDeckId },
|
|
123
|
+
{ method: "GET" },
|
|
124
|
+
)) as ReferenceDeckContextResult | undefined;
|
|
125
|
+
if (result?.agentContext?.trim()) {
|
|
126
|
+
const linkedDesignSystemStatus = getLinkedDesignSystemStatus(result);
|
|
127
|
+
if (linkedDesignSystemStatus !== null) {
|
|
128
|
+
const designSystemId =
|
|
129
|
+
typeof result.designSystemId === "string"
|
|
130
|
+
? result.designSystemId.trim()
|
|
131
|
+
: null;
|
|
132
|
+
return {
|
|
133
|
+
status: "loaded",
|
|
134
|
+
agentContext: `\n${result.agentContext.trim()}`,
|
|
135
|
+
designSystemId:
|
|
136
|
+
linkedDesignSystemStatus === "available" ? designSystemId : null,
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
return {
|
|
140
|
+
status: "unavailable",
|
|
141
|
+
agentContext: [
|
|
142
|
+
"",
|
|
143
|
+
"## Reference Deck",
|
|
144
|
+
`The user picked deck "${referenceDeckId}" as a style reference, but the reference action returned incomplete linked-system status.`,
|
|
145
|
+
"Retry `get-deck-reference-context`; if it still fails, stop instead of generating with an assumed style.",
|
|
146
|
+
].join("\n"),
|
|
147
|
+
designSystemId: null,
|
|
148
|
+
};
|
|
149
|
+
}
|
|
150
|
+
} catch (error) {
|
|
151
|
+
const message =
|
|
152
|
+
error instanceof Error ? error.message : "unknown loading error";
|
|
153
|
+
return {
|
|
154
|
+
status: "unavailable",
|
|
155
|
+
agentContext: [
|
|
156
|
+
"",
|
|
157
|
+
"## Reference Deck",
|
|
158
|
+
`The user picked deck "${referenceDeckId}" as a style reference, but it could not be loaded before generation: ${message}`,
|
|
159
|
+
"Before adding slides, call `get-deck-reference-context` for this id. If it still fails, tell the user the reference deck is unavailable instead of inventing a style.",
|
|
160
|
+
].join("\n"),
|
|
161
|
+
designSystemId: null,
|
|
162
|
+
};
|
|
163
|
+
}
|
|
164
|
+
return {
|
|
165
|
+
status: "unavailable",
|
|
166
|
+
agentContext: [
|
|
167
|
+
"",
|
|
168
|
+
"## Reference Deck",
|
|
169
|
+
`The user picked deck "${referenceDeckId}" as a style reference, but it returned no usable context.`,
|
|
170
|
+
`Call \`get-deck --id ${referenceDeckId}\` before generating. If that deck is empty, tell the user instead of silently generating without a reference.`,
|
|
171
|
+
].join("\n"),
|
|
172
|
+
designSystemId: null,
|
|
173
|
+
};
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
export function isSourceImprovementRequest(
|
|
177
|
+
prompt: string,
|
|
178
|
+
files: UploadedFile[],
|
|
179
|
+
): boolean {
|
|
180
|
+
const hasSourceDeck = files.some((file) =>
|
|
181
|
+
/\.(pptx|pdf)$/i.test(file.originalName),
|
|
182
|
+
);
|
|
183
|
+
if (!hasSourceDeck) return false;
|
|
184
|
+
|
|
185
|
+
const normalized = prompt.toLowerCase();
|
|
186
|
+
const asksToImprove =
|
|
187
|
+
/\b(restyl\w*|redesign\w*|rebrand\w*|revamp\w*|rework\w*|moderni[sz]\w*|refresh\w*|polish\w*|improv\w*|updat\w*|revis\w*|edit\w*)\b/.test(
|
|
188
|
+
normalized,
|
|
189
|
+
) ||
|
|
190
|
+
/\bmake\b[\s\S]{0,40}\b(better|modern|professional|polished|prett\w*)\b/.test(
|
|
191
|
+
normalized,
|
|
192
|
+
);
|
|
193
|
+
const asksToConvertSource =
|
|
194
|
+
/(?:\b(turn|convert|transform|make|build|create|generate)\b[^\n.!?]{0,50}\b(into|to)\b[^\n.!?]{0,30}\b(deck|presentation|slides?)\b|\b(create|build|make|generate)\b[^\n.!?]{0,80}\b(deck|presentation|slides?)\b[^\n.!?]{0,80}\bfrom\b)/.test(
|
|
195
|
+
normalized,
|
|
196
|
+
);
|
|
197
|
+
const explicitlyReferenceOnly =
|
|
198
|
+
/\b(reference material|reference only|as a reference|for reference)\b/.test(
|
|
199
|
+
normalized,
|
|
200
|
+
);
|
|
201
|
+
if (explicitlyReferenceOnly) return false;
|
|
202
|
+
|
|
203
|
+
const asksToPreserveSource =
|
|
204
|
+
asksToConvertSource &&
|
|
205
|
+
/\b(copy|slide[- ]for[- ]slide|preserv\w*|same order|before\s*\/?\s*after|placeholder\w*|out of order)\b/.test(
|
|
206
|
+
normalized,
|
|
207
|
+
);
|
|
208
|
+
return asksToImprove || asksToPreserveSource || asksToConvertSource;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
export function describeUploadedFilesForAgent(
|
|
212
|
+
files: UploadedFile[],
|
|
213
|
+
deckId: string,
|
|
214
|
+
importedSourceDeck: ImportedSourceDeck | null = null,
|
|
215
|
+
): string {
|
|
216
|
+
if (files.length === 0) {
|
|
217
|
+
return ["", NO_UPLOADED_FILES_CONTEXT].join("\n");
|
|
218
|
+
}
|
|
219
|
+
const hasDocumentReferences = files.some((file) =>
|
|
220
|
+
referenceDocumentFormat(file),
|
|
221
|
+
);
|
|
222
|
+
const fileList = files
|
|
223
|
+
.map(
|
|
224
|
+
(file) =>
|
|
225
|
+
`- ${file.originalName} (${file.type}, ${(file.size / 1024).toFixed(1)}KB) at path: ${file.path}${file.url ? `; embeddable URL: ${file.url}` : ""}`,
|
|
226
|
+
)
|
|
227
|
+
.join("\n");
|
|
228
|
+
return [
|
|
229
|
+
"",
|
|
230
|
+
importedSourceDeck
|
|
231
|
+
? `The user uploaded ${files.length} file(s). The ${importedSourceDeck.file.originalName} source deck has already been imported into target deck ${deckId} with ${importedSourceDeck.slideCount} source slide(s); do not import it again.`
|
|
232
|
+
: `The user attached ${files.length} file(s) as reference material for this new deck. Attachments are context for the agent by default; do not import or append their slides to target deck ${deckId} merely because they were attached.`,
|
|
233
|
+
fileList,
|
|
234
|
+
"",
|
|
235
|
+
"File handling rules:",
|
|
236
|
+
importedSourceDeck
|
|
237
|
+
? "- The imported source deck is canonical. Preserve its slide count, order, IDs, factual copy, notes, imagery, charts, tables, diagrams, and freeform objects while improving styling. For a deck-wide restyle, read the full deck once with get-deck compact=false; it returns sourceImport.slideIds, each slide's HTML and contentHash, and the linked design context. Call get-design-system once for full tokens, assets, and instructions, then use one patch-deck call with requireAllSourceSlides=true and the matching baseContentHash on every patch-slide. Verify once with get-deck using slideIds=sourceImport.slideIds and compact=false. Use update-slide only for a targeted one-slide edit. Do not rebuild it with add-slide."
|
|
238
|
+
: hasDocumentReferences
|
|
239
|
+
? "- PDF, PPTX, and DOCX files were already read before this run. Their content and measured visual language are in the `Attached Reference Documents` section below, or in the reference deck they were imported into. Do not call `import-file` for them again unless the `Attached Reference Documents` section says a file was omitted for space, and never generate as if a reference were missing."
|
|
240
|
+
: "- No PDF, PPTX, or DOCX reference is attached to this run; do not invent one.",
|
|
241
|
+
importedSourceDeck
|
|
242
|
+
? "- For a PDF source, keep the layers the import produced — positioned text boxes and images, or the page image where a page carried nothing else — and add restrained design-system chrome around them without obscuring source content. Never replace an imported slide with a retyped approximation of its text."
|
|
243
|
+
: "- Do not pass `importIntoDeck: true` for an attached file unless the user explicitly asks to import or preserve the source pages in the current deck. An attached reference is not an instruction to replace or seed the deck.",
|
|
244
|
+
"- Text-like files: use the uploaded-text-file blocks already included in the prompt; do not call import-file for them.",
|
|
245
|
+
'- Image files with an embeddable URL are mandatory assets: if the user specified where to use one (e.g. "on the first and last slide"), embed it there with `<img src="...">` exactly as requested. Do not omit a requested image and continue silently — if it truly cannot be placed, say why in your final chat response.',
|
|
246
|
+
'- Image files without a URL are sent as inline visual/reference assets for this run when available; on a follow-up, call `import-file --filePath "<path>" --format image` to reopen a persisted private raster before visual editing, and call `upload-image` if a durable embeddable URL is needed.',
|
|
247
|
+
"- When converting an attached image into a deck, inspect the complete visual source before adding slides. If it contains distinct source frames, represent them in order; do not repeatedly place the source image itself, stop after an arbitrary subset, or infer a fixed frame count.",
|
|
248
|
+
importedSourceDeck
|
|
249
|
+
? "- Before your final response, verify the same source slide IDs and count with get-deck after the restyle. If source fidelity is partial or images were skipped, report the exact warning instead of claiming success."
|
|
250
|
+
: "- Before your final response, verify every uploaded file above was either used as reference or placed as explicitly requested. If any file's content or requested placement is missing from the deck, say so explicitly instead of reporting success.",
|
|
251
|
+
].join("\n");
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
export interface UploadedImageAgentOptions {
|
|
255
|
+
referenceImagePaths?: string[];
|
|
256
|
+
images?: string[];
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
export function getUploadedImageAgentOptions(
|
|
260
|
+
files: UploadedFile[],
|
|
261
|
+
): UploadedImageAgentOptions {
|
|
262
|
+
const referenceImagePaths: string[] = [];
|
|
263
|
+
const images: string[] = [];
|
|
264
|
+
|
|
265
|
+
for (const file of files) {
|
|
266
|
+
if (!file.type.startsWith("image/")) continue;
|
|
267
|
+
if (file.url) referenceImagePaths.push(file.url);
|
|
268
|
+
if (file.dataUrl && canAddInlineImageToPayload(images, file.dataUrl)) {
|
|
269
|
+
images.push(file.dataUrl);
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
return {
|
|
274
|
+
...(referenceImagePaths.length > 0 ? { referenceImagePaths } : {}),
|
|
275
|
+
...(images.length > 0 ? { images } : {}),
|
|
276
|
+
};
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
function mergeUploadedFilesForRetry(
|
|
280
|
+
savedFiles: UploadedFile[],
|
|
281
|
+
newFiles: UploadedFile[],
|
|
282
|
+
): UploadedFile[] {
|
|
283
|
+
const seen = new Set<string>();
|
|
284
|
+
return [...savedFiles, ...newFiles].filter((file) => {
|
|
285
|
+
const key = file.path || file.url || file.filename;
|
|
286
|
+
if (seen.has(key)) return false;
|
|
287
|
+
seen.add(key);
|
|
288
|
+
return true;
|
|
289
|
+
});
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
type Navigate = (
|
|
293
|
+
to: string,
|
|
294
|
+
options?: { flushSync?: boolean; replace?: boolean },
|
|
295
|
+
) => void;
|
|
296
|
+
|
|
297
|
+
type CreateDeck = (
|
|
298
|
+
title?: string,
|
|
299
|
+
options?: {
|
|
300
|
+
noDefaultSlides?: boolean;
|
|
301
|
+
designSystemId?: string | null;
|
|
302
|
+
creation?: { method: "generated" };
|
|
303
|
+
},
|
|
304
|
+
) => Deck;
|
|
305
|
+
|
|
306
|
+
type SubmitAgent = (
|
|
307
|
+
message: string,
|
|
308
|
+
context: string,
|
|
309
|
+
options: {
|
|
310
|
+
newTab: boolean;
|
|
311
|
+
reuseEmptyTab: boolean;
|
|
312
|
+
openSidebar: boolean;
|
|
313
|
+
referenceImagePaths?: string[];
|
|
314
|
+
images?: string[];
|
|
315
|
+
attachments?: ReadonlyArray<unknown>;
|
|
316
|
+
model?: PromptComposerSubmitOptions["model"];
|
|
317
|
+
engine?: PromptComposerSubmitOptions["engine"];
|
|
318
|
+
effort?: PromptComposerSubmitOptions["effort"];
|
|
319
|
+
submitMessageId: string;
|
|
320
|
+
generationAttemptId: string;
|
|
321
|
+
generationOutputId: string;
|
|
322
|
+
},
|
|
323
|
+
) => Promise<{ delivered: boolean; reason?: string }>;
|
|
324
|
+
|
|
325
|
+
type PromptModelSelection = Pick<
|
|
326
|
+
PromptComposerSubmitOptions,
|
|
327
|
+
"model" | "engine" | "effort"
|
|
328
|
+
>;
|
|
329
|
+
|
|
330
|
+
export interface StartDeckGenerationOptions {
|
|
331
|
+
session: unknown;
|
|
332
|
+
prompt: string;
|
|
333
|
+
files: UploadedFile[];
|
|
334
|
+
retryFiles?: UploadedFile[];
|
|
335
|
+
attachments?: ReadonlyArray<unknown>;
|
|
336
|
+
modelSelection?: PromptModelSelection;
|
|
337
|
+
referenceSelection?: NewDeckReferenceSelection;
|
|
338
|
+
selectedDesignSystemId?: string | null;
|
|
339
|
+
selectedReferenceDeckId?: string | null;
|
|
340
|
+
designSystems: Array<{ id: string; title: string }>;
|
|
341
|
+
createDeck: CreateDeck;
|
|
342
|
+
ensureDeckPersisted: (id: string) => Promise<DeckPersistenceResult>;
|
|
343
|
+
deleteDeck: (id: string) => void;
|
|
344
|
+
navigate: Navigate;
|
|
345
|
+
agentSubmit: SubmitAgent;
|
|
346
|
+
onPromptClosed: () => void;
|
|
347
|
+
onUnauthenticated: (prompt: string, hadFiles: boolean) => void;
|
|
348
|
+
onPersistenceFailure: (
|
|
349
|
+
prompt: string,
|
|
350
|
+
files: UploadedFile[],
|
|
351
|
+
failure: DeckPersistenceResult,
|
|
352
|
+
) => void;
|
|
353
|
+
onSetupFailure?: (
|
|
354
|
+
prompt: string,
|
|
355
|
+
files: UploadedFile[],
|
|
356
|
+
failure: unknown,
|
|
357
|
+
) => void;
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
export interface DeckGenerationContext {
|
|
361
|
+
originalPrompt: string;
|
|
362
|
+
additionalContext?: string;
|
|
363
|
+
files: Array<{
|
|
364
|
+
path: string;
|
|
365
|
+
url?: string;
|
|
366
|
+
originalName: string;
|
|
367
|
+
type: string;
|
|
368
|
+
}>;
|
|
369
|
+
designSystemId: string | null;
|
|
370
|
+
referenceDeckId: string | null;
|
|
371
|
+
referenceSource?: NewDeckReferenceSelection["referenceSource"];
|
|
372
|
+
composerContext?: NewDeckReferenceSelection["composerContext"];
|
|
373
|
+
contextItems?: NewDeckReferenceSelection["contextItems"];
|
|
374
|
+
mode: "new" | "source-preserving";
|
|
375
|
+
targetSlideCount?: number;
|
|
376
|
+
generationAttemptId?: string;
|
|
377
|
+
generationStartedAt?: number;
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
export async function persistDeckGenerationContext(
|
|
381
|
+
deckId: string,
|
|
382
|
+
context: DeckGenerationContext,
|
|
383
|
+
): Promise<void> {
|
|
384
|
+
await callAction("patch-deck", {
|
|
385
|
+
deckId,
|
|
386
|
+
operations: [
|
|
387
|
+
{
|
|
388
|
+
op: "patch-deck-fields",
|
|
389
|
+
fields: {
|
|
390
|
+
generationContext: context as unknown as Record<string, unknown>,
|
|
391
|
+
},
|
|
392
|
+
},
|
|
393
|
+
],
|
|
394
|
+
});
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
const NUMBER_WORDS =
|
|
398
|
+
"one two three four five six seven eight nine ten eleven twelve thirteen fourteen fifteen sixteen seventeen eighteen nineteen twenty".split(
|
|
399
|
+
" ",
|
|
400
|
+
);
|
|
401
|
+
// Only one..twenty are counts; the larger words are matched so they can veto.
|
|
402
|
+
const NUMBER = `${NUMBER_WORDS.join("|")}|thirty|forty|fifty|sixty|seventy|eighty|ninety|hundred|dozen|couple|few|several|twice|double|triple|half|pair`;
|
|
403
|
+
const CORE = "deck|presentation|pitch|slideshow|keynote|talk|powerpoint|ppt";
|
|
404
|
+
const DECK = `${CORE}|summary|overview|explainer|proposal|report|briefing|update|demo|guide|tutorial|training|workshop|course|lesson|intro|introduction|plan|roadmap|strategy|recap|template|walkthrough|review|story|infographic|carousel|whitepaper|study|handout|primer|brief`;
|
|
405
|
+
const BOUNDS =
|
|
406
|
+
"at most|at least|up to|than|under|over|fewer|less|more|min|max|minimum|maximum|most|least|tops|limit|cap|ceiling|budget|around|approximately|roughly|nearly|almost|circa|top|first|last|next|another|additional|as many|as few|minus|excluded";
|
|
407
|
+
// A revision anywhere in the prompt withdraws the count.
|
|
408
|
+
const REVISION =
|
|
409
|
+
"actually|instead|scratch that|on second thought|never mind|correction|change (?:it )?to|cut (?:it )?(?:down )?to|let's say|let’s say|works better|is better|too long|too short|disagree|cancel|disregard|update";
|
|
410
|
+
const DRIFT = "maybe|perhaps|bump|raise|increase|reduce|trim|shrink|lower";
|
|
411
|
+
// Words that make a count provisional, flexible, or additive.
|
|
412
|
+
const SOFT =
|
|
413
|
+
"flexible|suggestion|guideline|judgment|exceed|separate|appendix|excluding|not counting|not including|besides|beyond|bonus|extra|in addition|on top|feel free|add more|more if|as needed|as necessary|if needed|if necessary|count|length|longer|shorter|then|followed|plus|later|initially|for now|starting|start|begin|now|extend|expand|revisit|iterate|revise|after|optional|stretch|backups?|hidden|if|unless|ideally|preferably|approximate|ballpark|estimate|guidelines|suggestions|give or take|aim|might|rough|tbd|open to|bigger|go over|unresolved";
|
|
414
|
+
// "N slides", "N-slide", "N more slides". Every separator is a single bounded
|
|
415
|
+
// run: a flood of whitespace has nothing to backtrack over.
|
|
416
|
+
const MENTION = new RegExp(
|
|
417
|
+
`\\b(\\d+|${NUMBER})(?:[ –-]{1,3}([a-z]+))?[ –-]{0,3}slide(s?)\\b`,
|
|
418
|
+
"gi",
|
|
419
|
+
);
|
|
420
|
+
const OTHER_NUMBER = new RegExp(`\\b(?:\\d{1,2}|${NUMBER})\\b`, "i");
|
|
421
|
+
// "Slide 3" and a "1." list marker name a slide inside the deck; only a number
|
|
422
|
+
// past the count contradicts it.
|
|
423
|
+
const SLIDE_REF =
|
|
424
|
+
/\bslides? (\d{1,2})(?: ?[-–] ?(\d{1,2}))?\b|\n ?(?:[-*•] )?(\d{1,2})[.)] /gi;
|
|
425
|
+
const VERB =
|
|
426
|
+
/\b(?:create|make|build|generate|produce|draft|design|write|prepare|put together|crie|want|need|give|compose|craft|assemble|develop)\b/i;
|
|
427
|
+
// An imperative that opens its own sentence or line is a separate ask; two of
|
|
428
|
+
// them mean the count may size something other than the deck.
|
|
429
|
+
const ASK_OPENER =
|
|
430
|
+
/^(?:(?:\d{1,2}[.)]|[-*•>]|please|also|then|now|and)\s+)*(?:create|make|build|generate|produce|draft|design|write|prepare|put together|crie|compose|craft|assemble|develop)\b/i;
|
|
431
|
+
// A question, a hypothetical, someone else's or a cancelled task, a quoted UI
|
|
432
|
+
// label, or a label/product number ("Windows 11", "Day 2") is not a deck-size ask.
|
|
433
|
+
const FRAME =
|
|
434
|
+
"how|why|what|suppose|imagine|hypothetically|cannot|unable|impossible|cancel|ignore|disregard|forget|scrap|drop|skip|remind|ask|tell|schedule|probably|likely|optionally|guess|limited|capped|restricted|confined|held|kept|close|comparable|equivalent|related|relative|compared|according|akin|proportional|alternatively|option|worst|earlier|asked|wrote|said|told|day|week|phase|chapter|module|lesson|grade|round|level|stage|tier|step|part|section|version|release|season|episode|unit|page|figure|item|track|pod|call|called|named|titled|title|rename|label|button|chip";
|
|
435
|
+
// Before the count: negation, a reference to another deck, a bound or a hedge,
|
|
436
|
+
// or a frame that scopes the request to part of the deck ("For the intro,").
|
|
437
|
+
const BEFORE = new RegExp(
|
|
438
|
+
`\\b(?:\\w+n['’]t|do not|never|avoid|except|but|not|like|similar|based|modell?ed|style of|better|shorter|half|my|our|your|their|his|her|its|this|that|these|those|existing|attached|current|source|previous|typical|competitor|per|each|every|apiece|keep|stick|restrict|confine|cut|within|try|aim|ideally|preferably|hopefully|possibly|should|whether|might|may|usually|normally|typically|often|always|generally|sometimes|yesterday|ago|already|tried|had|did|was|were|refuse|hate|stop|quit|${FRAME}|${BOUNDS}|${REVISION}|${DRIFT}|${SOFT})\\b|~|(?<!\\blet)['’]s\\b|^(?:for|in|on|under|at|during|across|inside|throughout|regarding|as|when|once|while|until|before|since|because|given)\\b`,
|
|
439
|
+
"i",
|
|
440
|
+
);
|
|
441
|
+
const REVISED = new RegExp(`\\b(?:${REVISION}|make (?:that|it))\\b`, "i");
|
|
442
|
+
// Words in the request's own paragraph that bound or extend the count: a bound
|
|
443
|
+
// or hedge word, "add a closing slide", or a sentence that continues the
|
|
444
|
+
// request ("And a Q&A.").
|
|
445
|
+
const INSTRUCTION_WORDS = new RegExp(
|
|
446
|
+
`\\b(?:${REVISION}|${DRIFT}|${BOUNDS}|${SOFT})\\b|\\badd\\b[^.!?\\n]{0,30}\\bslides?\\b|[.!?\\n] ?(?:and|also|with|along|together|as well|aside|apart|except|without|other than|bar)\\b`,
|
|
447
|
+
"i",
|
|
448
|
+
);
|
|
449
|
+
const AFTER = new RegExp(
|
|
450
|
+
`\\b(?:${REVISION}|${DRIFT}|${BOUNDS}|${SOFT}|or|though|but|rather|and|with|rest|remaining|others|per|each|every|long|total|minutes|hours|pages|words|depending|needed|necessary|possible|preferably|ideally)\\b|-ish|~`,
|
|
451
|
+
"i",
|
|
452
|
+
);
|
|
453
|
+
// "Create 10 slides": the count follows the verb directly.
|
|
454
|
+
const DIRECT =
|
|
455
|
+
/^(?: (?:me|us|it|a|an|exactly|precisely|just|only|some|new|short|quick|brief)){0,3} $/i;
|
|
456
|
+
// "Create a deck about X with 10 slides": a deck, a topic, then a connector.
|
|
457
|
+
const DECK_OBJECT = new RegExp(`^ (?:\\S+ ){0,2}(?:(?:${DECK})\\b ?)+`, "i");
|
|
458
|
+
// "of" only reaches the count from a deck: "a summary of 10 slides" is about
|
|
459
|
+
// slides that already exist.
|
|
460
|
+
const CONNECTOR =
|
|
461
|
+
/(?: (?:with|in|to)|\b(?:deck|presentation|pitch|slideshow|keynote|powerpoint|ppt) (?:of|de))(?: (?:exactly|precisely|just|only|a total of|an?))* $/i;
|
|
462
|
+
// A document named after the deck ("a deck from a PDF with 40 slides") may be
|
|
463
|
+
// the one that has the slides.
|
|
464
|
+
const DOCUMENT = new RegExp(
|
|
465
|
+
`\\b(?:${DECK}|docs?|document|pdf|file|notes|article|paper|book|site|website|page|spreadsheet|sheet|transcript|email|thread|video|recording)\\b`,
|
|
466
|
+
"i",
|
|
467
|
+
);
|
|
468
|
+
const SOURCE_WORDS =
|
|
469
|
+
/\b(?:from|out|using|based|into|via|per|following|matching|mirroring|copying|reusing|resembling)\b/i;
|
|
470
|
+
const CLEAN_TAIL = /^[ ,;:).!?]*(?:please)?[ ,;:).!?]*$/i;
|
|
471
|
+
// The app's own pt-BR chip: "Crie um pitch de 10 slides a partir deste doc".
|
|
472
|
+
const SOURCE_TAIL =
|
|
473
|
+
/^ (?:from|a partir) (?:this|these|deste|desta|este|esta) (?:doc|document|file|pdf|report|notes)$/i;
|
|
474
|
+
// "a 10-slide deck": up to two modifiers, then the noun, which must end the
|
|
475
|
+
// phrase: "a 10-slide deck review" reviews a deck. A preposition or a
|
|
476
|
+
// conjunction is never a modifier, before the count or after it.
|
|
477
|
+
const NOT_MODIFIER =
|
|
478
|
+
"the|for|about|on|of|from|with|in|to|into|at|by|as|that|who|which|and|or|so|if|when|where|plus|vs|no";
|
|
479
|
+
const PHRASE_END =
|
|
480
|
+
"(?= (?:for|about|on|of|from|to|in|at|by|that|which|who|where|using|based|aimed|designed|built|focused|targeted)\\b| \\w+ing\\b|[,;:!?()]|$)";
|
|
481
|
+
const COMPOUND = new RegExp(
|
|
482
|
+
`^(?: (?!(?:${NOT_MODIFIER}|${CORE})\\b)[^\\s,;:!?()]+){0,2} (?:${DECK})(?: (?:${CORE}))*\\b${PHRASE_END}`,
|
|
483
|
+
"i",
|
|
484
|
+
);
|
|
485
|
+
const COMPOUND_WINDOW = new RegExp(
|
|
486
|
+
`^(?: (?!(?:${NOT_MODIFIER})\\b)[\\w'’&-]+){0,3} $`,
|
|
487
|
+
"i",
|
|
488
|
+
);
|
|
489
|
+
|
|
490
|
+
// Only a short prompt is read at all: past a few sentences the ask is wrapped
|
|
491
|
+
// in context, caveats, pasted source or later revisions that no word list
|
|
492
|
+
// reads reliably, and a long brief is where the wrong counts came from.
|
|
493
|
+
const MAX_REQUEST_CHARS = 500;
|
|
494
|
+
// "a 10-slide deck": the word before the count is a plain lowercase word, not a
|
|
495
|
+
// label or product ("Windows 11 slide", "Day 2 slide", "iPhone 16 slide").
|
|
496
|
+
const PLAIN_LAST_WORD = /(?:^| )[a-z]+(?:['’-][a-z]+)* $|^ $/;
|
|
497
|
+
|
|
498
|
+
function numberValue(token: string): number {
|
|
499
|
+
const word = token.toLowerCase();
|
|
500
|
+
if (/^\d/.test(word)) return /^[1-9]\d?$/.test(word) ? Number(word) : 0;
|
|
501
|
+
return NUMBER_WORDS.indexOf(word) + 1;
|
|
502
|
+
}
|
|
503
|
+
|
|
504
|
+
// The result is persisted as the deck's enforced slide target: a wrong one ends
|
|
505
|
+
// a healthy run, while no target only skips the completion gate. So only the
|
|
506
|
+
// opening sentence can size the deck, and only as one unhedged "create ... N
|
|
507
|
+
// slides" ask. Widen what it rejects by adding words to the lists above, not
|
|
508
|
+
// branches here.
|
|
509
|
+
export function requestedSlideCount(prompt: string): number | undefined {
|
|
510
|
+
if (prompt.length > MAX_REQUEST_CHARS * 2) return undefined;
|
|
511
|
+
const text = (/[a-z]/.test(prompt) ? prompt : prompt.toLowerCase())
|
|
512
|
+
// Soft hyphens and zero-width characters from pasted PDFs split words.
|
|
513
|
+
.replace(/[\u00ad\u200b-\u200d\ufeff]/g, "")
|
|
514
|
+
.replace(/[^\S\n]+/g, " ")
|
|
515
|
+
.trim()
|
|
516
|
+
.replace(/^(?:#{1,6}|[-*•>]|\d{1,2}[.)]) /, "")
|
|
517
|
+
// "on one slide" places content; it neither sizes the deck nor clashes.
|
|
518
|
+
.replace(/ ?\b(?:on|in|onto|to|per|each) (?:1|one) slide\b/gi, "");
|
|
519
|
+
if (text.length > MAX_REQUEST_CHARS) return undefined;
|
|
520
|
+
if (
|
|
521
|
+
text.split(/[.!?\n]+/).filter((part) => ASK_OPENER.test(part.trim()))
|
|
522
|
+
.length > 1
|
|
523
|
+
) {
|
|
524
|
+
return undefined;
|
|
525
|
+
}
|
|
526
|
+
const mentions = [...text.matchAll(MENTION)];
|
|
527
|
+
if (mentions.length !== 1) return undefined;
|
|
528
|
+
const [m] = mentions;
|
|
529
|
+
const value = numberValue(m[1]);
|
|
530
|
+
const end = text.search(/[.!?](?=[ \n]|$)|\n/);
|
|
531
|
+
const sentence = end === -1 ? text : text.slice(0, end);
|
|
532
|
+
const verb = VERB.exec(sentence);
|
|
533
|
+
const countEnd = m.index + m[0].length;
|
|
534
|
+
if (
|
|
535
|
+
m[2] ||
|
|
536
|
+
value === 0 ||
|
|
537
|
+
sentence.length > 600 ||
|
|
538
|
+
countEnd > sentence.length ||
|
|
539
|
+
!verb ||
|
|
540
|
+
verb.index + verb[0].length > m.index
|
|
541
|
+
) {
|
|
542
|
+
return undefined;
|
|
543
|
+
}
|
|
544
|
+
const before = sentence.slice(0, m.index);
|
|
545
|
+
const window = before.slice(verb.index + verb[0].length);
|
|
546
|
+
const rest = sentence.slice(countEnd);
|
|
547
|
+
const later = text
|
|
548
|
+
.slice(countEnd)
|
|
549
|
+
.replace(SLIDE_REF, (_, a, b, c) =>
|
|
550
|
+
Math.max(Number(a ?? 0), Number(b ?? 0), Number(c ?? 0)) <= value
|
|
551
|
+
? " "
|
|
552
|
+
: " 99 ",
|
|
553
|
+
);
|
|
554
|
+
if (
|
|
555
|
+
window.trim().split(" ").length > 8 ||
|
|
556
|
+
OTHER_NUMBER.test(before) ||
|
|
557
|
+
SOURCE_WORDS.test(window) ||
|
|
558
|
+
BEFORE.test(before) ||
|
|
559
|
+
REVISED.test(later) ||
|
|
560
|
+
INSTRUCTION_WORDS.test(later) ||
|
|
561
|
+
OTHER_NUMBER.test(later)
|
|
562
|
+
) {
|
|
563
|
+
return undefined;
|
|
564
|
+
}
|
|
565
|
+
const object = DECK_OBJECT.exec(window);
|
|
566
|
+
const sizesDeck =
|
|
567
|
+
m[3] !== ""
|
|
568
|
+
? (DIRECT.test(window) ||
|
|
569
|
+
(object !== null &&
|
|
570
|
+
CONNECTOR.test(window) &&
|
|
571
|
+
!DOCUMENT.test(window.slice(object[0].length)))) &&
|
|
572
|
+
(CLEAN_TAIL.test(rest) || SOURCE_TAIL.test(rest))
|
|
573
|
+
: COMPOUND.test(rest) &&
|
|
574
|
+
COMPOUND_WINDOW.test(window) &&
|
|
575
|
+
PLAIN_LAST_WORD.test(window) &&
|
|
576
|
+
!AFTER.test(rest);
|
|
577
|
+
return sizesDeck ? value : undefined;
|
|
578
|
+
}
|
|
579
|
+
|
|
580
|
+
export async function startDeckGeneration({
|
|
581
|
+
session,
|
|
582
|
+
prompt,
|
|
583
|
+
files,
|
|
584
|
+
retryFiles = [],
|
|
585
|
+
attachments,
|
|
586
|
+
modelSelection,
|
|
587
|
+
referenceSelection = {},
|
|
588
|
+
selectedDesignSystemId,
|
|
589
|
+
selectedReferenceDeckId,
|
|
590
|
+
designSystems,
|
|
591
|
+
createDeck,
|
|
592
|
+
ensureDeckPersisted,
|
|
593
|
+
deleteDeck,
|
|
594
|
+
navigate,
|
|
595
|
+
agentSubmit,
|
|
596
|
+
onPromptClosed,
|
|
597
|
+
onUnauthenticated,
|
|
598
|
+
onPersistenceFailure,
|
|
599
|
+
onSetupFailure,
|
|
600
|
+
}: StartDeckGenerationOptions): Promise<
|
|
601
|
+
"started" | "failed" | "unauthenticated"
|
|
602
|
+
> {
|
|
603
|
+
if (!session) {
|
|
604
|
+
onUnauthenticated(prompt, files.length > 0);
|
|
605
|
+
return "unauthenticated";
|
|
606
|
+
}
|
|
607
|
+
const generationAttemptId = nanoid();
|
|
608
|
+
const generationStartedAt = Date.now();
|
|
609
|
+
|
|
610
|
+
const filesForGeneration = mergeUploadedFilesForRetry(retryFiles, files);
|
|
611
|
+
const designSystemId =
|
|
612
|
+
referenceSelection.designSystemId !== undefined
|
|
613
|
+
? referenceSelection.designSystemId
|
|
614
|
+
: selectedDesignSystemId && selectedDesignSystemId !== "none"
|
|
615
|
+
? selectedDesignSystemId
|
|
616
|
+
: null;
|
|
617
|
+
const referenceDeckId =
|
|
618
|
+
referenceSelection.referenceDeckId !== undefined
|
|
619
|
+
? referenceSelection.referenceDeckId
|
|
620
|
+
: selectedReferenceDeckId && selectedReferenceDeckId !== "none"
|
|
621
|
+
? selectedReferenceDeckId
|
|
622
|
+
: null;
|
|
623
|
+
const referenceFilePaths = new Set(
|
|
624
|
+
referenceSelection.referenceFilePaths ?? [],
|
|
625
|
+
);
|
|
626
|
+
const filesForSourceImprovement = filesForGeneration.filter(
|
|
627
|
+
(file) => !referenceFilePaths.has(file.path),
|
|
628
|
+
);
|
|
629
|
+
const sourceImprovementRequest = isSourceImprovementRequest(
|
|
630
|
+
prompt,
|
|
631
|
+
filesForSourceImprovement,
|
|
632
|
+
);
|
|
633
|
+
let sourceDeckPaths: string[] = [];
|
|
634
|
+
if (sourceImprovementRequest) {
|
|
635
|
+
try {
|
|
636
|
+
sourceDeckPaths = validateUploadedDeckImport(
|
|
637
|
+
filesForSourceImprovement,
|
|
638
|
+
).map((file) => file.path);
|
|
639
|
+
} catch (error) {
|
|
640
|
+
onSetupFailure?.(prompt, filesForGeneration, error);
|
|
641
|
+
return "failed";
|
|
642
|
+
}
|
|
643
|
+
}
|
|
644
|
+
|
|
645
|
+
let referenceHydration: Awaited<ReturnType<typeof hydrateReferenceDocuments>>;
|
|
646
|
+
try {
|
|
647
|
+
referenceHydration = await hydrateReferenceDocuments(filesForGeneration, {
|
|
648
|
+
excludePaths: [
|
|
649
|
+
...(referenceSelection.importedReferenceFilePath
|
|
650
|
+
? [referenceSelection.importedReferenceFilePath]
|
|
651
|
+
: []),
|
|
652
|
+
...sourceDeckPaths,
|
|
653
|
+
],
|
|
654
|
+
});
|
|
655
|
+
} catch (error) {
|
|
656
|
+
onSetupFailure?.(prompt, filesForGeneration, error);
|
|
657
|
+
return "failed";
|
|
658
|
+
}
|
|
659
|
+
if (referenceHydration.status === "unreadable") {
|
|
660
|
+
onSetupFailure?.(
|
|
661
|
+
prompt,
|
|
662
|
+
filesForGeneration,
|
|
663
|
+
new Error(referenceHydration.message),
|
|
664
|
+
);
|
|
665
|
+
return "failed";
|
|
666
|
+
}
|
|
667
|
+
const referenceDocumentContext =
|
|
668
|
+
referenceHydration.status === "hydrated" ? referenceHydration.context : "";
|
|
669
|
+
const hasHydratedReferenceDesign =
|
|
670
|
+
referenceHydration.status === "hydrated" &&
|
|
671
|
+
referenceHydration.measuredDesignCount > 0;
|
|
672
|
+
const selectedDesignSystem = designSystemId
|
|
673
|
+
? designSystems.find((designSystem) => designSystem.id === designSystemId)
|
|
674
|
+
: undefined;
|
|
675
|
+
|
|
676
|
+
let deck: Deck | undefined;
|
|
677
|
+
flushSync(() => {
|
|
678
|
+
deck = createDeck(undefined, {
|
|
679
|
+
noDefaultSlides: true,
|
|
680
|
+
designSystemId,
|
|
681
|
+
creation: { method: "generated" },
|
|
682
|
+
});
|
|
683
|
+
});
|
|
684
|
+
if (!deck) return "failed";
|
|
685
|
+
const deckId = deck.id;
|
|
686
|
+
|
|
687
|
+
const persisted = await ensureDeckPersisted(deck.id);
|
|
688
|
+
if (!persisted.persisted) {
|
|
689
|
+
onPersistenceFailure(prompt, filesForGeneration, persisted);
|
|
690
|
+
deleteDeck(deckId);
|
|
691
|
+
return "failed";
|
|
692
|
+
}
|
|
693
|
+
|
|
694
|
+
let importedSourceDeck: ImportedSourceDeck | null = null;
|
|
695
|
+
let sourceImportMayHaveWrittenSlides = false;
|
|
696
|
+
if (sourceImprovementRequest) {
|
|
697
|
+
try {
|
|
698
|
+
importedSourceDeck = await importUploadedDeckIntoDeck(
|
|
699
|
+
filesForSourceImprovement,
|
|
700
|
+
deckId,
|
|
701
|
+
{
|
|
702
|
+
onImportStarted: () => {
|
|
703
|
+
sourceImportMayHaveWrittenSlides = true;
|
|
704
|
+
},
|
|
705
|
+
onImportCleanupSafe: () => {
|
|
706
|
+
sourceImportMayHaveWrittenSlides = false;
|
|
707
|
+
},
|
|
708
|
+
},
|
|
709
|
+
);
|
|
710
|
+
} catch (error) {
|
|
711
|
+
if (!sourceImportMayHaveWrittenSlides) deleteDeck(deckId);
|
|
712
|
+
onSetupFailure?.(prompt, filesForGeneration, error);
|
|
713
|
+
return "failed";
|
|
714
|
+
}
|
|
715
|
+
}
|
|
716
|
+
|
|
717
|
+
const trimmedPrompt = prompt.trim();
|
|
718
|
+
const hasImportedGoogleDocContext = trimmedPrompt.includes("<google-doc ");
|
|
719
|
+
const googleDocUrls = hasImportedGoogleDocContext
|
|
720
|
+
? []
|
|
721
|
+
: extractGoogleDocUrls(trimmedPrompt);
|
|
722
|
+
const fileContext = describeUploadedFilesForAgent(
|
|
723
|
+
filesForGeneration,
|
|
724
|
+
deckId,
|
|
725
|
+
importedSourceDeck,
|
|
726
|
+
);
|
|
727
|
+
const googleDocContext =
|
|
728
|
+
googleDocUrls.length > 0
|
|
729
|
+
? [
|
|
730
|
+
"",
|
|
731
|
+
"The request includes Google Docs URL(s):",
|
|
732
|
+
...googleDocUrls.map((url) => `- ${url}`),
|
|
733
|
+
"Before adding slides, call `import-google-doc` for each URL and use the returned text as source material.",
|
|
734
|
+
"If the action cannot read a private document, tell the user the exact sharing step from the action error instead of generating from the URL alone.",
|
|
735
|
+
].join("\n")
|
|
736
|
+
: "";
|
|
737
|
+
const [loadedReferenceDeckContext, hydratedDesignSystemContext] =
|
|
738
|
+
await Promise.all([
|
|
739
|
+
loadReferenceDeckGenerationContext(referenceDeckId),
|
|
740
|
+
loadDesignSystemGenerationContext(designSystemId),
|
|
741
|
+
]);
|
|
742
|
+
const referenceDeckContext = loadedReferenceDeckContext.agentContext;
|
|
743
|
+
const referenceDeckStatus = loadedReferenceDeckContext.status;
|
|
744
|
+
const referenceDeckDesignSystemId = loadedReferenceDeckContext.designSystemId;
|
|
745
|
+
const designSystemContext = designSystemId
|
|
746
|
+
? [
|
|
747
|
+
"",
|
|
748
|
+
"Design system selection:",
|
|
749
|
+
`- Use "${selectedDesignSystem?.title ?? designSystemId}" (id: ${designSystemId}).`,
|
|
750
|
+
"- The deck has already been linked to this design system.",
|
|
751
|
+
"- Use the hydrated design system context below for colors, typography, spacing, imagery, and slide defaults.",
|
|
752
|
+
hydratedDesignSystemContext,
|
|
753
|
+
"- Do not choose or apply a different design system.",
|
|
754
|
+
].join("\n")
|
|
755
|
+
: [
|
|
756
|
+
"",
|
|
757
|
+
"Design system selection:",
|
|
758
|
+
"- No design system was selected in the picker.",
|
|
759
|
+
...(referenceDeckId
|
|
760
|
+
? referenceDeckStatus === "unavailable"
|
|
761
|
+
? [
|
|
762
|
+
"- The selected reference deck could not be read. Retry `get-deck-reference-context`; if it still fails, stop and report that the reference is unavailable. Do not assume it has no linked system or use measured styling as a fallback.",
|
|
763
|
+
]
|
|
764
|
+
: [
|
|
765
|
+
"- Use the reference deck's readable linked system if available; otherwise use its measured styling according to the visual-style precedence below. Do not call `get-workspace-defaults` or apply a workspace default.",
|
|
766
|
+
]
|
|
767
|
+
: hasHydratedReferenceDesign
|
|
768
|
+
? [
|
|
769
|
+
"- Use the attached reference's measured styling according to the visual-style precedence below. Do not call `get-workspace-defaults` or apply a workspace default.",
|
|
770
|
+
]
|
|
771
|
+
: [
|
|
772
|
+
"- Before generating a bare or on-brand deck, call `get-workspace-defaults`. If it returns a usable design system, patch this deck with that designSystemId, call `get-design-system`, and follow its exact tokens, assets, and custom instructions.",
|
|
773
|
+
"- If no workspace default exists, establish one deliberate deck-level visual contract before the first slide: choose a background family, readable text and surface roles, one accent, a type pairing, spacing, radius, and image treatment that fit the subject. Record those choices as semantic --deck-* values on every fmd-slide wrapper and reuse them exactly; never alternate light and dark canvases, swap fonts, or invent a new palette per slide.",
|
|
774
|
+
]),
|
|
775
|
+
].join("\n");
|
|
776
|
+
const visualStylePrecedence = designSystemId
|
|
777
|
+
? [
|
|
778
|
+
"## Visual style precedence",
|
|
779
|
+
`The design system explicitly selected for this new deck (id: ${designSystemId}) controls its tokens and slide defaults, overriding reference-deck linked systems and measured reference styling. Reference samples guide composition and markup only.`,
|
|
780
|
+
].join("\n")
|
|
781
|
+
: referenceDeckId
|
|
782
|
+
? [
|
|
783
|
+
"## Visual style precedence",
|
|
784
|
+
referenceDeckStatus === "unavailable"
|
|
785
|
+
? "The selected reference deck could not be read, so its linked-system status and measured visual language are unknown. Retry get-deck-reference-context; if it still fails, stop instead of generating with an assumed style."
|
|
786
|
+
: referenceDeckDesignSystemId
|
|
787
|
+
? "No separate system was selected for this new deck. The reference deck's readable linked design system controls tokens and slide defaults; use measured styling only where it does not conflict with that system. Reference samples guide composition and markup."
|
|
788
|
+
: "No target or readable linked design system was selected. Because the reference deck was read successfully, use its measured visual language for tokens and slide defaults; its samples guide composition and markup.",
|
|
789
|
+
"Do not call `get-workspace-defaults` or apply a workspace default.",
|
|
790
|
+
].join("\n")
|
|
791
|
+
: hasHydratedReferenceDesign
|
|
792
|
+
? [
|
|
793
|
+
"## Visual style precedence",
|
|
794
|
+
"No design system was selected. Use the attached reference's measured visual language for tokens and slide defaults.",
|
|
795
|
+
].join("\n")
|
|
796
|
+
: [
|
|
797
|
+
"## Visual style precedence",
|
|
798
|
+
"When no reference deck or hydrated design system is available, choose a subject-appropriate editorial direction and lock it before authoring: one canvas/background family, text and surface roles, type pairing, spacing scale, radius, and accent treatment. Express the contract with semantic --deck-* values on every fmd-slide wrapper.",
|
|
799
|
+
].join("\n");
|
|
800
|
+
const referenceSource = referenceSelection.referenceSource;
|
|
801
|
+
const referenceSourceContext = referenceSource
|
|
802
|
+
? [
|
|
803
|
+
"",
|
|
804
|
+
"Additional reference source selected in the reference step:",
|
|
805
|
+
`- ${referenceSource.kind}: ${referenceSource.value}`,
|
|
806
|
+
referenceSource.kind === "google-docs"
|
|
807
|
+
? "Call `import-google-doc` before generating and use the returned text as source material."
|
|
808
|
+
: referenceSource.kind === "website"
|
|
809
|
+
? "Call `import-from-url` before generating and use the returned page context as a reference."
|
|
810
|
+
: "Use the Figma source as the design reference. If Builder or Figma access is required, report the exact connection step instead of guessing.",
|
|
811
|
+
].join("\n")
|
|
812
|
+
: "";
|
|
813
|
+
const sourceDeckContext = importedSourceDeck
|
|
814
|
+
? [
|
|
815
|
+
"",
|
|
816
|
+
"Source-preserving improvement mode:",
|
|
817
|
+
`- The target deck already contains ${importedSourceDeck.slideCount} imported source slides. Treat those slides as the user's complete source, not as inspiration for a new deck.`,
|
|
818
|
+
"- Keep the exact source slide count, order, IDs, factual meaning, notes, images, charts, tables, diagrams, and freeform objects unless the user explicitly asks to change one of them.",
|
|
819
|
+
"- Read the full deck once with get-deck compact=false to get sourceImport.slideIds, every slide's HTML and contentHash, and the linked design context; call get-design-system once for its full tokens, assets, and instructions. Make the deck-wide restyle in one patch-deck call using requireAllSourceSlides=true, with each patch-slide's matching contentHash as baseContentHash. Do not split a full-deck restyle into arbitrary batches or fall back to one-by-one update-slide calls; use update-slide only for a targeted one-slide edit. Keep every original image source and enough original factual copy for each slide; for PDF slides, use restrained design-system chrome around the page without obscuring it.",
|
|
820
|
+
"- For this restyle, keep the source slide structure and do not replace source images with generic cards. If the user explicitly asks to add, delete, or reorder slides, use the corresponding operation normally; it clears source-import provenance, so verify the edited slide count and order instead of waiting for sourceCoverage.",
|
|
821
|
+
"- After a source-preserving patch that leaves sourceImport present, verify once with get-deck using slideIds=sourceImport.slideIds and compact=false. Confirm the full source reflects the request and sourceCoverage.complete is true with expectedSlideIds and actualSlideIds matching in order. If structural operations cleared sourceImport, verify the resulting slide count and order instead and do not require sourceCoverage.complete. Do not report an initial or partial pass, and do not leave any source slides for a later run.",
|
|
822
|
+
"- If get-deck reports partial source fidelity or skipped images, stop and report the exact warning instead of claiming a reliable restyle.",
|
|
823
|
+
].join("\n")
|
|
824
|
+
: "";
|
|
825
|
+
const sourceModeInstructions = importedSourceDeck
|
|
826
|
+
? [
|
|
827
|
+
"The request is an in-place visual improvement of an imported source deck. Make a coherent style pass across every existing slide while preserving all source content and media.",
|
|
828
|
+
"Do not use the new-deck add-slide workflow for this source-preserving restyle. Finish every source slide in this run; if the user explicitly requests structural changes, use the normal slide operations and verify the resulting deck instead of treating source coverage as a limit.",
|
|
829
|
+
"While sourceImport is present, the ordered source manifest and its full slide count are hard completion gates: do not declare success, switch to unrelated content, or start a different deck brief until every source slide ID has been patched and get-deck compact=true reports sourceCoverage.complete=true. After structural edits clear sourceImport, verify the resulting slide count and order instead.",
|
|
830
|
+
].join("\n")
|
|
831
|
+
: [
|
|
832
|
+
"This is a new deck. Keep it empty until generation begins; attached reference files must not seed it with imported slides.",
|
|
833
|
+
"Start a `manage-progress` run so progress appears in the app header. First make a compact outline and deck-level visual contract in working context, then add slides with `add-slide` one at a time so every generated slide preserves its per-slide Creative Context provenance.",
|
|
834
|
+
`After reading any requested or attached reference material, but before adding the first slide, choose a concise, specific deck title from the user's request and source material. Never use the deck id, run id, file id, uploaded filename, or another opaque alphanumeric token as the title. Do not reuse a generic placeholder like "Untitled scene" when the content or reference context gives you a better title. Call \`patch-deck\` with \`deckId: \"${deckId}\"\` and \`operations: [{ \"op\": \"patch-deck-fields\", \"fields\": { \"title\": \"<generated title>\" } }]\`. Include only \`title\` in \`fields\`; omit all other optional fields. Never leave a generated deck named \"Untitled Deck\" or another placeholder.`,
|
|
835
|
+
"If the user asks for a standalone visual, diagram, hero, one-pager, poster, or a couple of visuals, create only the requested one/few polished visual slides. Do not pad the result into a full presentation.",
|
|
836
|
+
"If the request is for a presentation or deck and does not explicitly ask for one slide, infer a coherent multi-slide outline from the scope and keep adding slides until that outline is complete. Do not stop after the first slide just because the prompt has few explicit instructions. Vary composition and information hierarchy while keeping the visual contract fixed across the deck.",
|
|
837
|
+
"When the user requests speaker notes, write presenter-only text into each slide's `notes` field and keep it out of the React component source.",
|
|
838
|
+
`Add every generated slide ONE AT A TIME using the add-slide action with --deckId=${deckId}; pass one self-contained default-export React component in sourceTsx for each page and wait for each result. Assign each planned page a distinct stable slideId before the first write and reuse its ID with the same sourceTsx and notes after an unclear result. If a retry returns duplicate_slide_id, call get-deck with slideIds=[slideId] and compact=false; treat it as saved only when sourceTsx and notes match, otherwise stop and report the conflict. Never content-dedupe distinct pages. After the first slide, call get-slide-source for canonical TSX and get-deck with its slideId and compact=false for the derived preview; inspect the semantic --deck-* declarations, canvas, type, spacing, and composition, then reuse that visual contract while varying composition. Do not use patch-deck to append generated slides because add-slide records per-slide Creative Context provenance; use patch-deck for deck fields, existing-slide edits, ordering, or source-preserving work. Never issue parallel writes to the same deck.`,
|
|
839
|
+
"Treat each successful write and compact readback as confirmation to continue with the next planned slides.",
|
|
840
|
+
].join("\n");
|
|
841
|
+
const context = [
|
|
842
|
+
importedSourceDeck
|
|
843
|
+
? `The user uploaded a source presentation into target deck (id: "${deckId}") and wants a reliable visual improvement.`
|
|
844
|
+
: `The user just created a new empty deck (id: "${deckId}") and wants to create a presentation or standalone visual.`,
|
|
845
|
+
"The visible user message above contains the user's request and/or pasted source material for the deck. Treat pasted memo content as source material even if the user did not explicitly say they are pasting it.",
|
|
846
|
+
BLANK_AND_FOLLOW_UP_SCOPE_INSTRUCTION,
|
|
847
|
+
googleDocContext,
|
|
848
|
+
fileContext,
|
|
849
|
+
referenceDocumentContext,
|
|
850
|
+
referenceDeckContext,
|
|
851
|
+
designSystemContext,
|
|
852
|
+
referenceSourceContext,
|
|
853
|
+
WEBSITE_STYLE_REFERENCE_DIRECTIVE,
|
|
854
|
+
sourceDeckContext,
|
|
855
|
+
"",
|
|
856
|
+
"Before generating, if the request or selected references leave a meaningful choice unresolved, use the `ask-question` tool to ask one concise, prompt-specific question in the inline guided-question flow. Generate the question wording and 2 to 4 options from the user's request and selected references; do not use a fixed generic questionnaire. Ask only a choice that materially affects the deck, such as audience, tone, structure, or length. If the prompt already makes the choice clear, do not ask it again. Wait for the user's answer or skip before adding slides.",
|
|
857
|
+
sourceModeInstructions,
|
|
858
|
+
SLIDE_COUNT_COMPLETION_INSTRUCTION,
|
|
859
|
+
"Add each generated slide through sequential add-slide calls, preserving the established deck contract and using a targeted get-deck read with slideId and compact=false after the first slide to verify it.",
|
|
860
|
+
"If no explicit count was given (including when the guided slide-count question was skipped), infer the count from the distinct topics/sections implied by the request — one slide per section plus a title and closing slide — and add slides for every section before considering the deck done. Do not stop at an arbitrary round number (e.g. 10) if sections remain uncovered.",
|
|
861
|
+
"The original brief and uploaded/reference handles are persisted on the deck as generationContext. When continuing this generation (guided-question answers, or a request to keep going or finish the deck), call get-deck first and treat that context as the canonical brief. Continue the original slide sequence from the current slide count; do not replace it with a fresh topic inferred only from the follow-up message. A targeted edit is not a continuation.",
|
|
862
|
+
"An explicit theme or brand instruction in the original brief overrides the background, palette, and styling of an uploaded/reference image or source page. Preserve source content and imagery, but do not copy a white wireframe background when the requested theme is dark.",
|
|
863
|
+
"Do not report completion until the persisted generationContext targetSlideCount is reached, or, when sourceCoverage is present for source-preserving mode, get-deck compact=true reports it complete for the ordered source manifest. If the current deck is short, finish the missing requested slides before adding unrelated content.",
|
|
864
|
+
"Every slide is rendered into a fixed 1920×1080 canvas. Keep all content within those bounds; split dense source material across more slides instead of packing it tightly. Never use zoom, transform: scale(), clipping, or scroll overflow to hide content overflow, and keep body text at least 32px at native canvas size.",
|
|
865
|
+
visualStylePrecedence,
|
|
866
|
+
"Each generated slide must use one default-export React page component in sourceTsx. The bounded React Worker runs inside an opaque-origin sandbox and derives rendered HTML from SQL source. Import only React or the named @open-slide/core primitives; static design, meta, and transition exports are allowed. Steps/Step, useSlidePageNumber(), and useIsActivePage() provide static page context and reveal state. React effects and event handlers do not run, and module transition metadata does not animate between pages. Use inline style objects or static CSS strings in local const names containing style, css, or keyframe; CSS is sanitized and scoped. Tailwind utility classes have no stylesheet in the frame. Do not use arbitrary imports, browser globals, CSS imports, remote fonts, network URLs, or scripts. Use uploaded asset:// handles for images. A static Page[] module may be submitted to create-deck for bulk generation; it is split into ordered SQL slides, with an index-aligned static notes[] export copied to presenter notes. Read the create-deck skill for exact source, CSS, size, and runtime limits.",
|
|
867
|
+
"Do NOT use create-deck (the deck already exists). Do NOT call db-schema, the resources tool, or search-files.",
|
|
868
|
+
].join("\n");
|
|
869
|
+
|
|
870
|
+
try {
|
|
871
|
+
await persistDeckGenerationContext(deckId, {
|
|
872
|
+
originalPrompt: trimmedPrompt,
|
|
873
|
+
files: filesForGeneration.map((file) => ({
|
|
874
|
+
path: file.path,
|
|
875
|
+
...(file.url ? { url: file.url } : {}),
|
|
876
|
+
originalName: file.originalName,
|
|
877
|
+
type: file.type,
|
|
878
|
+
})),
|
|
879
|
+
designSystemId,
|
|
880
|
+
referenceDeckId,
|
|
881
|
+
...(referenceSource ? { referenceSource } : {}),
|
|
882
|
+
mode: importedSourceDeck ? "source-preserving" : "new",
|
|
883
|
+
targetSlideCount:
|
|
884
|
+
importedSourceDeck?.slideCount ?? requestedSlideCount(trimmedPrompt),
|
|
885
|
+
generationAttemptId,
|
|
886
|
+
generationStartedAt,
|
|
887
|
+
});
|
|
888
|
+
} catch (error) {
|
|
889
|
+
deleteDeck(deckId);
|
|
890
|
+
onSetupFailure?.(prompt, filesForGeneration, error);
|
|
891
|
+
return "failed";
|
|
892
|
+
}
|
|
893
|
+
|
|
894
|
+
const generationSubmitMessageId = nanoid();
|
|
895
|
+
let submission: { delivered: boolean; reason?: string };
|
|
896
|
+
try {
|
|
897
|
+
submission = await agentSubmit(createDeckAgentMessage(prompt), context, {
|
|
898
|
+
newTab: true,
|
|
899
|
+
reuseEmptyTab: true,
|
|
900
|
+
openSidebar: true,
|
|
901
|
+
submitMessageId: generationSubmitMessageId,
|
|
902
|
+
generationAttemptId,
|
|
903
|
+
generationOutputId: deckId,
|
|
904
|
+
...getUploadedImageAgentOptions(filesForGeneration),
|
|
905
|
+
attachments,
|
|
906
|
+
...modelSelection,
|
|
907
|
+
});
|
|
908
|
+
} catch (error) {
|
|
909
|
+
if (!sourceImportMayHaveWrittenSlides) deleteDeck(deckId);
|
|
910
|
+
onSetupFailure?.(prompt, filesForGeneration, error);
|
|
911
|
+
return "failed";
|
|
912
|
+
}
|
|
913
|
+
if (!submission?.delivered) {
|
|
914
|
+
if (!sourceImportMayHaveWrittenSlides) deleteDeck(deckId);
|
|
915
|
+
const error = new Error("Agent chat submission was not delivered.");
|
|
916
|
+
Object.assign(error, {
|
|
917
|
+
reason: submission?.reason ?? "delivery_unconfirmed",
|
|
918
|
+
});
|
|
919
|
+
onSetupFailure?.(prompt, filesForGeneration, error);
|
|
920
|
+
return "failed";
|
|
921
|
+
}
|
|
922
|
+
|
|
923
|
+
onPromptClosed();
|
|
924
|
+
|
|
925
|
+
deleteClientAppState(
|
|
926
|
+
appStateKeyForBrowserTab("guided-questions", TAB_ID),
|
|
927
|
+
).catch(() => {});
|
|
928
|
+
deleteClientAppState(appStateKey("guided-questions")).catch(() => {});
|
|
929
|
+
|
|
930
|
+
navigate(
|
|
931
|
+
`/deck/${deck.id}?generating=1&generation_attempt_id=${encodeURIComponent(generationAttemptId)}&generationSubmitId=${encodeURIComponent(generationSubmitMessageId)}`,
|
|
932
|
+
{
|
|
933
|
+
replace: true,
|
|
934
|
+
flushSync: true,
|
|
935
|
+
},
|
|
936
|
+
);
|
|
937
|
+
return "started";
|
|
938
|
+
}
|