@tangle-network/agent-app 0.45.53 → 0.45.55
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/README.md +1 -1
- package/dist/alerting/index.d.ts +5 -175
- package/dist/alerting/slack.d.ts +176 -0
- package/dist/app-auth/index.d.ts +14 -17
- package/dist/assets/index.d.ts +2 -504
- package/dist/assets/schema.d.ts +264 -0
- package/dist/assets/types.d.ts +237 -0
- package/dist/assistant/AssistantDock.d.ts +56 -0
- package/dist/assistant/AssistantHistory.d.ts +41 -0
- package/dist/assistant/AssistantPanel.d.ts +84 -0
- package/dist/assistant/ProposalCard.d.ts +41 -0
- package/dist/assistant/ResizeHandle.d.ts +19 -0
- package/dist/assistant/client-context.d.ts +20 -0
- package/dist/assistant/client.d.ts +117 -0
- package/dist/assistant/index.d.ts +19 -848
- package/dist/assistant/launcher.d.ts +23 -0
- package/dist/assistant/persistence.d.ts +26 -0
- package/dist/assistant/presentation.d.ts +99 -0
- package/dist/assistant/provider-label.d.ts +7 -0
- package/dist/assistant/reducer.d.ts +130 -0
- package/dist/assistant/sse.d.ts +24 -0
- package/dist/assistant/time-ago.d.ts +6 -0
- package/dist/assistant/transcript.d.ts +97 -0
- package/dist/assistant/types.d.ts +291 -0
- package/dist/assistant/use-stick-to-bottom.d.ts +28 -0
- package/dist/assistant/useAssistantChat.d.ts +63 -0
- package/dist/assistant/useAssistantModels.d.ts +22 -0
- package/dist/assistant/useAssistantThreads.d.ts +47 -0
- package/dist/assistant/usePanelPrefs.d.ts +55 -0
- package/dist/billing/index.d.ts +19 -21
- package/dist/brand/index.d.ts +16 -10
- package/dist/brand-extraction/extract.d.ts +34 -0
- package/dist/brand-extraction/index.d.ts +12 -214
- package/dist/brand-extraction/map.d.ts +58 -0
- package/dist/brand-extraction/types.d.ts +119 -0
- package/dist/catalog/index.d.ts +11 -101
- package/dist/chat-react/composer-mode-controls.d.ts +14 -0
- package/dist/chat-react/entry-composer.d.ts +92 -0
- package/dist/chat-react/index.d.ts +22 -118
- package/dist/chat-react/types.d.ts +11 -0
- package/dist/chat-routes/attachment-store.d.ts +84 -0
- package/dist/chat-routes/attachment-upload.d.ts +84 -0
- package/dist/chat-routes/attachment-validation.d.ts +95 -0
- package/dist/chat-routes/binary-sniff.d.ts +45 -0
- package/dist/chat-routes/completed-sandbox-turn.d.ts +25 -0
- package/dist/chat-routes/detached-turn.d.ts +197 -0
- package/dist/chat-routes/dispatch-parts.d.ts +101 -0
- package/dist/chat-routes/draft-persistence.d.ts +189 -0
- package/dist/chat-routes/durable-projection.d.ts +18 -0
- package/dist/chat-routes/file-index.d.ts +115 -0
- package/dist/chat-routes/index.d.ts +25 -1840
- package/dist/chat-routes/model-failover-stream.d.ts +206 -0
- package/dist/chat-routes/promote-file-part.d.ts +84 -0
- package/dist/chat-routes/resolve-attachments.d.ts +72 -0
- package/dist/chat-routes/sandbox-producer.d.ts +146 -0
- package/dist/chat-routes/sandbox-turn-usage.d.ts +4 -0
- package/dist/{stale-turn-lock-DucQzvXu.d.ts → chat-routes/stale-turn-lock.d.ts} +7 -9
- package/dist/chat-routes/turn-routes.d.ts +540 -0
- package/dist/chat-routes/upload.d.ts +84 -0
- package/dist/{wire-DOZ-O6hD.d.ts → chat-routes/wire.d.ts} +41 -44
- package/dist/chat-store/core.d.ts +19 -0
- package/dist/chat-store/index.d.ts +22 -322
- package/dist/{parts-BqIHMdyu.d.ts → chat-store/parts.d.ts} +49 -47
- package/dist/chat-store/schema.d.ts +157 -0
- package/dist/chat-store/store.d.ts +177 -0
- package/dist/config/index.d.ts +13 -18
- package/dist/crypto/index.d.ts +10 -12
- package/dist/crypto/web-token.d.ts +22 -0
- package/dist/design-canvas/apply.d.ts +70 -0
- package/dist/design-canvas/drizzle-store.d.ts +29 -0
- package/dist/design-canvas/drizzle.d.ts +7 -575
- package/dist/{export-presets-mgVulRaV.d.ts → design-canvas/export-presets.d.ts} +18 -22
- package/dist/design-canvas/index.d.ts +22 -268
- package/dist/design-canvas/mcp-entry.d.ts +15 -0
- package/dist/design-canvas/mcp-handler.d.ts +34 -0
- package/dist/design-canvas/mcp-tools.d.ts +30 -0
- package/dist/{model-DnfO_PdJ.d.ts → design-canvas/model.d.ts} +33 -35
- package/dist/{operations-ByJ6yXOW.d.ts → design-canvas/operations.d.ts} +21 -25
- package/dist/design-canvas/schema.d.ts +558 -0
- package/dist/{store-CqfDtnPQ.d.ts → design-canvas/store.d.ts} +8 -12
- package/dist/design-canvas/templates.d.ts +72 -0
- package/dist/design-canvas/validate.d.ts +32 -0
- package/dist/design-canvas-react/components/BleedTrimOverlay.d.ts +22 -0
- package/dist/design-canvas-react/components/BrandKnot.d.ts +11 -0
- package/dist/design-canvas-react/components/CanvasEmptyState.d.ts +32 -0
- package/dist/design-canvas-react/components/CanvasInsertPanel.d.ts +53 -0
- package/dist/{lazy-DrkVyDpe.d.ts → design-canvas-react/components/DesignCanvas.d.ts} +27 -20
- package/dist/design-canvas-react/components/DesignCanvasEditor.d.ts +23 -0
- package/dist/design-canvas-react/components/ElementNode.d.ts +51 -0
- package/dist/design-canvas-react/components/ExportControl.d.ts +21 -0
- package/dist/design-canvas-react/components/GridLayer.d.ts +47 -0
- package/dist/design-canvas-react/components/InlineTextEditor.d.ts +25 -0
- package/dist/design-canvas-react/components/LayersPanel.d.ts +20 -0
- package/dist/design-canvas-react/components/PagesStrip.d.ts +34 -0
- package/dist/design-canvas-react/components/Rulers.d.ts +31 -0
- package/dist/design-canvas-react/components/SelectionLayer.d.ts +51 -0
- package/dist/design-canvas-react/components/SnapGuidesOverlay.d.ts +25 -0
- package/dist/design-canvas-react/components/Toolbar.d.ts +64 -0
- package/dist/design-canvas-react/components/Workspace.d.ts +92 -0
- package/dist/design-canvas-react/components/ZoomControls.d.ts +14 -0
- package/dist/design-canvas-react/components/glyphs.d.ts +46 -0
- package/dist/design-canvas-react/components/icon-button.d.ts +22 -0
- package/dist/design-canvas-react/components/index.d.ts +27 -0
- package/dist/design-canvas-react/components/layer-tree.d.ts +34 -0
- package/dist/design-canvas-react/components/ruler-math.d.ts +78 -0
- package/dist/design-canvas-react/components/transform-math.d.ts +168 -0
- package/dist/{command-stack-TNPWJCzW.d.ts → design-canvas-react/contracts.d.ts} +16 -63
- package/dist/design-canvas-react/engine/command-stack.d.ts +43 -0
- package/dist/design-canvas-react/engine/commands.d.ts +154 -0
- package/dist/design-canvas-react/engine/selection.d.ts +48 -0
- package/dist/design-canvas-react/engine/snap.d.ts +24 -0
- package/dist/design-canvas-react/engine/zoom-pan.d.ts +18 -0
- package/dist/design-canvas-react/engine.d.ts +21 -399
- package/dist/design-canvas-react/export-math.d.ts +104 -0
- package/dist/design-canvas-react/export.d.ts +89 -0
- package/dist/design-canvas-react/index.d.ts +16 -586
- package/dist/design-canvas-react/insert-builders.d.ts +61 -0
- package/dist/design-canvas-react/lazy.d.ts +21 -6
- package/dist/documents/docx.d.ts +50 -0
- package/dist/documents/extract.d.ts +87 -0
- package/dist/documents/index.d.ts +26 -232
- package/dist/documents/media-type.d.ts +33 -0
- package/dist/documents/pdf-inspector.d.ts +5 -9
- package/dist/{types-DrBidf3O.d.ts → documents/types.d.ts} +13 -15
- package/dist/documents/zip.d.ts +56 -0
- package/dist/eval/calibration.d.ts +106 -0
- package/dist/eval/index.d.ts +8 -116
- package/dist/eval-campaign/index.d.ts +11 -12
- package/dist/{trust-gate-Dcm5xSva.d.ts → eval-campaign/trust-gate.d.ts} +5 -9
- package/dist/forms/blank.d.ts +48 -0
- package/dist/forms/fill.d.ts +105 -0
- package/dist/forms/index.d.ts +58 -332
- package/dist/forms/registry.d.ts +115 -0
- package/dist/forms/verify.d.ts +58 -0
- package/dist/harness/index.d.ts +21 -19
- package/dist/intakes/api.d.ts +5 -11
- package/dist/{completion-CvcNUz07.d.ts → intakes/completion.d.ts} +7 -11
- package/dist/intakes/context-sufficiency.d.ts +113 -0
- package/dist/intakes/drizzle/schema.d.ts +338 -0
- package/dist/intakes/drizzle/store.d.ts +75 -0
- package/dist/intakes/drizzle.d.ts +12 -391
- package/dist/intakes/index.d.ts +23 -113
- package/dist/{model-C8U0HZxL.d.ts → intakes/model.d.ts} +15 -17
- package/dist/intakes-react/components/BrandMark.d.ts +10 -0
- package/dist/intakes-react/components/IntakeInterview.d.ts +15 -0
- package/dist/intakes-react/components/index.d.ts +1 -0
- package/dist/intakes-react/contracts.d.ts +42 -0
- package/dist/intakes-react/index.d.ts +12 -47
- package/dist/intakes-react/lazy.d.ts +9 -8
- package/dist/integrations/index.d.ts +10 -12
- package/dist/{contract-OxG_jVMx.d.ts → interactions/contract.d.ts} +40 -42
- package/dist/interactions/index.d.ts +16 -256
- package/dist/interactions/route.d.ts +151 -0
- package/dist/interactions/sidecar.d.ts +100 -0
- package/dist/knowledge/index.d.ts +7 -11
- package/dist/knowledge-loop/index.d.ts +13 -20
- package/dist/legibility/checks/empty-state.d.ts +59 -0
- package/dist/legibility/checks/reachability.d.ts +103 -0
- package/dist/legibility/checks/silent-failure.d.ts +57 -0
- package/dist/legibility/checks/success.d.ts +38 -0
- package/dist/legibility/checks/vocabulary.d.ts +65 -0
- package/dist/legibility/cli-args.d.ts +30 -0
- package/dist/legibility/cli.d.ts +25 -0
- package/dist/legibility/index.d.ts +10 -530
- package/dist/legibility/report.d.ts +22 -0
- package/dist/legibility/scan.d.ts +29 -0
- package/dist/legibility/source.d.ts +132 -0
- package/dist/legibility/suppress.d.ts +36 -0
- package/dist/legibility/types.d.ts +168 -0
- package/dist/legibility/walk-sources.d.ts +21 -0
- package/dist/{agent-activity-C8ZG0F0M.d.ts → missions/agent-activity.d.ts} +3 -5
- package/dist/missions/engine.d.ts +251 -0
- package/dist/missions/events.d.ts +195 -0
- package/dist/missions/index.d.ts +12 -765
- package/dist/missions/plan-parse.d.ts +50 -0
- package/dist/missions/service.d.ts +265 -0
- package/dist/{failover-D-3UXXTb.d.ts → model-resolution/failover.d.ts} +10 -12
- package/dist/model-resolution/index.d.ts +15 -18
- package/dist/object-store/index.d.ts +15 -17
- package/dist/openui/action.d.ts +54 -0
- package/dist/openui/authoring.d.ts +25 -0
- package/dist/openui/index.d.ts +24 -206
- package/dist/openui/route.d.ts +124 -0
- package/dist/openui/segments.d.ts +71 -0
- package/dist/openui/values.d.ts +82 -0
- package/dist/openui-react/index.d.ts +9 -13
- package/dist/peer-floors/check.d.ts +9 -190
- package/dist/peer-floors/cli.d.ts +2 -3
- package/dist/peer-floors/dependency-source.d.ts +178 -0
- package/dist/plans/index.d.ts +13 -14
- package/dist/{billing-BuNlaKlE.d.ts → platform/billing.d.ts} +28 -32
- package/dist/platform/guards.d.ts +79 -0
- package/dist/platform/hub.d.ts +107 -0
- package/dist/platform/index.d.ts +7 -112
- package/dist/{sso-Cm00S61u.d.ts → platform/sso.d.ts} +15 -97
- package/dist/preflight/cli.d.ts +3 -6
- package/dist/preflight/index.d.ts +16 -18
- package/dist/preset-cloudflare/headers.d.ts +12 -0
- package/dist/preset-cloudflare/index.d.ts +22 -74
- package/dist/preset-cloudflare/workflow-instance.d.ts +35 -0
- package/dist/profile/budget.d.ts +72 -0
- package/dist/profile/fingerprint.d.ts +65 -0
- package/dist/profile/index.d.ts +27 -19
- package/dist/prompt/index.d.ts +3 -5
- package/dist/record/drizzle/schema.d.ts +488 -0
- package/dist/record/drizzle/store.d.ts +224 -0
- package/dist/record/drizzle.d.ts +10 -679
- package/dist/record/fold.d.ts +99 -0
- package/dist/record/index.d.ts +13 -13
- package/dist/{fold-DACU7gtf.d.ts → record/model.d.ts} +22 -124
- package/dist/record/ulid.d.ts +12 -0
- package/dist/redact/index.d.ts +14 -16
- package/dist/run/index.d.ts +11 -16
- package/dist/runtime/agent.d.ts +23 -0
- package/dist/runtime/certified-delivery.d.ts +57 -0
- package/dist/runtime/index.d.ts +17 -367
- package/dist/runtime/loop.d.ts +58 -0
- package/dist/runtime/model-catalog.d.ts +103 -0
- package/dist/{model-CdCDfBA9.d.ts → runtime/model.d.ts} +25 -27
- package/dist/runtime/openai-stream.d.ts +126 -0
- package/dist/runtime/surface-profile.d.ts +115 -0
- package/dist/sandbox/binary-read.d.ts +63 -0
- package/dist/sandbox/diagnostics.d.ts +69 -0
- package/dist/sandbox/index.d.ts +103 -1085
- package/dist/sandbox/model.d.ts +179 -0
- package/dist/sandbox/outcome.d.ts +10 -0
- package/dist/sandbox/prewarm-claim-d1.d.ts +80 -0
- package/dist/sandbox/prewarm.d.ts +193 -0
- package/dist/sandbox/recovery.d.ts +216 -0
- package/dist/sandbox/terminal-connection.d.ts +145 -0
- package/dist/sandbox/workspace-sandbox-manager.d.ts +44 -0
- package/dist/sequences/apply.d.ts +54 -0
- package/dist/sequences/captions.d.ts +91 -0
- package/dist/sequences/drizzle-store.d.ts +36 -0
- package/dist/sequences/drizzle.d.ts +7 -1252
- package/dist/sequences/exports.d.ts +138 -0
- package/dist/sequences/index.d.ts +19 -340
- package/dist/sequences/mcp-entry.d.ts +15 -0
- package/dist/sequences/mcp-handler.d.ts +39 -0
- package/dist/sequences/mcp-tools.d.ts +47 -0
- package/dist/{store-B7LLlk9p.d.ts → sequences/model.d.ts} +26 -110
- package/dist/sequences/operations.d.ts +126 -0
- package/dist/sequences/schema.d.ts +1231 -0
- package/dist/sequences/store.d.ts +81 -0
- package/dist/sequences/validate.d.ts +98 -0
- package/dist/sequences-react/components/BrandMark.d.ts +10 -0
- package/dist/sequences-react/components/PreviewCanvas.d.ts +26 -0
- package/dist/sequences-react/components/SnapIndicatorLine.d.ts +11 -0
- package/dist/sequences-react/components/TimelineClipChip.d.ts +80 -0
- package/dist/sequences-react/components/TimelineEditor.d.ts +44 -0
- package/dist/sequences-react/components/TimelineEmptyState.d.ts +21 -0
- package/dist/sequences-react/components/TimelineGhostLanes.d.ts +14 -0
- package/dist/sequences-react/components/TimelinePlayhead.d.ts +11 -0
- package/dist/sequences-react/components/TimelineRuler.d.ts +16 -0
- package/dist/sequences-react/components/TimelineSmallScreenGate.d.ts +12 -0
- package/dist/sequences-react/components/TimelineTrackRow.d.ts +51 -0
- package/dist/sequences-react/components/ZoomControl.d.ts +15 -0
- package/dist/sequences-react/components/composite-command.d.ts +8 -0
- package/dist/sequences-react/components/glyphs.d.ts +26 -0
- package/dist/sequences-react/components/index.d.ts +31 -0
- package/dist/sequences-react/components/interaction-math.d.ts +103 -0
- package/dist/sequences-react/contracts.d.ts +187 -0
- package/dist/sequences-react/engine/command-stack.d.ts +18 -0
- package/dist/sequences-react/engine/commands.d.ts +146 -0
- package/dist/sequences-react/engine/playback.d.ts +18 -0
- package/dist/sequences-react/engine/snap.d.ts +29 -0
- package/dist/sequences-react/engine/zoom.d.ts +29 -0
- package/dist/sequences-react/index.d.ts +20 -880
- package/dist/sequences-react/lazy.d.ts +8 -0
- package/dist/sequences-react/media/frame-provider.d.ts +70 -0
- package/dist/sequences-react/media/transcription.d.ts +33 -0
- package/dist/sequences-react/media/waveform.d.ts +34 -0
- package/dist/session-shell/index.d.ts +31 -204
- package/dist/session-shell/nav-guard.d.ts +170 -0
- package/dist/session-shell/path.d.ts +19 -0
- package/dist/signoff/cli.d.ts +4 -7
- package/dist/signoff/config.d.ts +12 -0
- package/dist/signoff/exec.d.ts +44 -0
- package/dist/signoff/index.d.ts +56 -14
- package/dist/signoff/invoked-as-script.d.ts +25 -0
- package/dist/signoff/node-version.d.ts +50 -0
- package/dist/signoff/proof-attach.d.ts +88 -0
- package/dist/signoff/proof-cli.d.ts +1 -0
- package/dist/signoff/proof-fixture.d.ts +13 -0
- package/dist/signoff/proof-from-report.d.ts +22 -0
- package/dist/signoff/proof-git.d.ts +57 -0
- package/dist/signoff/proof-record.d.ts +202 -0
- package/dist/signoff/proof-verify.d.ts +103 -0
- package/dist/signoff/proof.d.ts +35 -310
- package/dist/signoff/report.d.ts +7 -0
- package/dist/{run-D80hoLKh.d.ts → signoff/run.d.ts} +3 -6
- package/dist/signoff/schedule.d.ts +55 -0
- package/dist/signoff/seeds.d.ts +50 -0
- package/dist/signoff/store.d.ts +22 -0
- package/dist/{types-Bd6uW9vQ.d.ts → signoff/types.d.ts} +15 -17
- package/dist/signoff/workflow-pin.d.ts +56 -0
- package/dist/signoff/workspace.d.ts +40 -0
- package/dist/skills/index.d.ts +28 -32
- package/dist/skills-placement/index.d.ts +7 -11
- package/dist/spend/budget.d.ts +123 -0
- package/dist/spend/ceiling.d.ts +51 -0
- package/dist/spend/cli-args.d.ts +20 -0
- package/dist/spend/cli.d.ts +1 -0
- package/dist/spend/fixtures/incident-parked-time.d.ts +55 -0
- package/dist/spend/index.d.ts +38 -1144
- package/dist/spend/liveness.d.ts +131 -0
- package/dist/spend/ownership.d.ts +87 -0
- package/dist/spend/reconcile.d.ts +109 -0
- package/dist/spend/reference.d.ts +42 -0
- package/dist/spend/report.d.ts +12 -0
- package/dist/spend/store.d.ts +123 -0
- package/dist/spend/types.d.ts +466 -0
- package/dist/store/index.d.ts +10 -12
- package/dist/stories/app-shell/fixtures.d.ts +43 -0
- package/dist/stories/app-shell/shell.d.ts +81 -0
- package/dist/stories/assistant/fixtures.d.ts +73 -0
- package/dist/stories/chat/fixtures.d.ts +70 -0
- package/dist/stories/chat/markdown.d.ts +11 -0
- package/dist/stories/chat/run-drill-in.d.ts +19 -0
- package/dist/stories/chat-controls/fixtures.d.ts +116 -0
- package/dist/stories/design-canvas/fixtures.d.ts +57 -0
- package/dist/stories/fixtures/canvas.d.ts +10 -0
- package/dist/stories/fixtures/catalog.d.ts +7 -0
- package/dist/stories/fixtures/chat.d.ts +39 -0
- package/dist/stories/fixtures/index.d.ts +4 -0
- package/dist/stories/fixtures/sequences.d.ts +17 -0
- package/dist/stories/panels/fixtures.d.ts +63 -0
- package/dist/stories/sequences/fixtures.d.ts +30 -0
- package/dist/stories/studio/fixtures.d.ts +22 -0
- package/dist/stream/index.d.ts +10 -56
- package/dist/{stream-normalizer-DKRxyVlZ.d.ts → stream/stream-normalizer.d.ts} +23 -26
- package/dist/{turn-buffer-COMQUwO2.d.ts → stream/turn-buffer.d.ts} +21 -23
- package/dist/stream/turn-identity.d.ts +49 -0
- package/dist/studio/generation.d.ts +179 -0
- package/dist/studio/index.d.ts +12 -181
- package/dist/studio-react/avatar-composer.d.ts +8 -0
- package/dist/studio-react/composer-hero.d.ts +12 -0
- package/dist/studio-react/composer-shell.d.ts +18 -0
- package/dist/studio-react/generation-card.d.ts +9 -0
- package/dist/studio-react/generation-detail-modal.d.ts +11 -0
- package/dist/studio-react/generation-detail.d.ts +6 -0
- package/dist/studio-react/generation-grid.d.ts +15 -0
- package/dist/studio-react/image-composer.d.ts +8 -0
- package/dist/studio-react/index.d.ts +32 -245
- package/dist/studio-react/library-drawer.d.ts +12 -0
- package/dist/studio-react/library-panel.d.ts +15 -0
- package/dist/studio-react/publish-package-composer.d.ts +18 -0
- package/dist/studio-react/result-canvas.d.ts +6 -0
- package/dist/studio-react/speech-composer.d.ts +4 -0
- package/dist/studio-react/studio-header.d.ts +5 -0
- package/dist/studio-react/studio-sheet.d.ts +12 -0
- package/dist/studio-react/studio-workspace.d.ts +23 -0
- package/dist/studio-react/transcription-composer.d.ts +12 -0
- package/dist/studio-react/type-config.d.ts +11 -0
- package/dist/studio-react/use-studio-generations.d.ts +20 -0
- package/dist/studio-react/video-composer.d.ts +10 -0
- package/dist/tangle/index.d.ts +7 -9
- package/dist/teams/drizzle/access.d.ts +82 -0
- package/dist/{invitations-schema-_fI7HkJP.d.ts → teams/drizzle/invitations-schema.d.ts} +39 -27
- package/dist/teams/drizzle/personal-organization.d.ts +41 -0
- package/dist/{access-490O6aOU.d.ts → teams/drizzle/schema.d.ts} +57 -122
- package/dist/teams/drizzle.d.ts +12 -44
- package/dist/teams/index.d.ts +20 -44
- package/dist/teams/invitations-api.d.ts +17 -21
- package/dist/{invitations-DoYMvXea.d.ts → teams/invitations.d.ts} +14 -18
- package/dist/teams/invite.d.ts +42 -0
- package/dist/teams/members-api.d.ts +12 -16
- package/dist/teams/resend.d.ts +3 -13
- package/dist/{roles-B4nU3jDi.d.ts → teams/roles.d.ts} +18 -20
- package/dist/teams-react/components/BrandMark.d.ts +10 -0
- package/dist/teams-react/components/InvitationsPanel.d.ts +13 -0
- package/dist/teams-react/components/InviteAcceptPage.d.ts +10 -0
- package/dist/teams-react/components/MembersPanel.d.ts +14 -0
- package/dist/teams-react/components/RoleSelect.d.ts +17 -0
- package/dist/teams-react/components/index.d.ts +3 -0
- package/dist/teams-react/contracts.d.ts +134 -0
- package/dist/teams-react/index.d.ts +12 -143
- package/dist/teams-react/lazy.d.ts +11 -11
- package/dist/test-setup.d.ts +1 -0
- package/dist/theme/index.d.ts +6 -104
- package/dist/theme/tailwind-preset.d.ts +1 -2
- package/dist/theme/theme.d.ts +106 -0
- package/dist/theme-contract/cli.d.ts +21 -0
- package/dist/theme-contract/index.d.ts +4 -6
- package/dist/{auth-BYtiazA4.d.ts → tools/auth.d.ts} +8 -11
- package/dist/tools/capability.d.ts +54 -0
- package/dist/tools/dispatch.d.ts +37 -0
- package/dist/tools/errors.d.ts +8 -0
- package/dist/tools/gating.d.ts +62 -0
- package/dist/tools/http.d.ts +27 -0
- package/dist/tools/index.d.ts +12 -217
- package/dist/{mcp-rpc-DYwPlYbZ.d.ts → tools/mcp-rpc.d.ts} +7 -9
- package/dist/{mcp-xxoZZfor.d.ts → tools/mcp.d.ts} +14 -16
- package/dist/tools/openai.d.ts +28 -0
- package/dist/tools/registry.d.ts +39 -0
- package/dist/tools/runtime.d.ts +22 -0
- package/dist/{types-B25Mib1r.d.ts → tools/types.d.ts} +15 -83
- package/dist/{flow-types-CJxEmaRy.d.ts → trace/flow-types.d.ts} +2 -4
- package/dist/trace/index.d.ts +11 -148
- package/dist/trace/mission-flow.d.ts +82 -0
- package/dist/trace/mission-trace.d.ts +52 -0
- package/dist/turn-health/classify.d.ts +207 -0
- package/dist/turn-health/index.d.ts +29 -637
- package/dist/turn-health/lifecycle.d.ts +75 -0
- package/dist/turn-health/sink.d.ts +122 -0
- package/dist/turn-health/sweep.d.ts +245 -0
- package/dist/turn-stream/adapters.d.ts +257 -0
- package/dist/turn-stream/core.d.ts +293 -0
- package/dist/turn-stream/do.d.ts +144 -0
- package/dist/turn-stream/index.d.ts +62 -738
- package/dist/turn-stream/memory.d.ts +41 -0
- package/dist/vault/ConfirmDialog.d.ts +22 -0
- package/dist/vault/VaultPane.d.ts +15 -0
- package/dist/{VaultPane-BDP6SB_K.d.ts → vault/contracts.d.ts} +15 -22
- package/dist/vault/index.d.ts +15 -22
- package/dist/vault/lazy.d.ts +9 -7
- package/dist/vault/server.d.ts +8 -10
- package/dist/web/free-route-limit.d.ts +187 -0
- package/dist/web/index.d.ts +15 -207
- package/dist/{rate-limit-BOVmJRXZ.d.ts → web/rate-limit.d.ts} +3 -5
- package/dist/web-react/agent-session-controls.d.ts +105 -0
- package/dist/web-react/async/async-view.d.ts +69 -0
- package/dist/web-react/async/index.d.ts +13 -305
- package/dist/web-react/async/state.d.ts +107 -0
- package/dist/web-react/async/use-async-resource.d.ts +41 -0
- package/dist/web-react/async/use-confirmed-mutation.d.ts +90 -0
- package/dist/web-react/brand-mark.d.ts +11 -0
- package/dist/web-react/chat-attachments.d.ts +21 -0
- package/dist/web-react/chat-composer.d.ts +174 -0
- package/dist/web-react/chat-interactions.d.ts +1 -0
- package/dist/web-react/chat-mentions.d.ts +48 -0
- package/dist/web-react/chat-stream.d.ts +106 -0
- package/dist/web-react/class-names.d.ts +10 -0
- package/dist/web-react/controls.d.ts +265 -0
- package/dist/web-react/durable-chat-cards.d.ts +40 -0
- package/dist/web-react/durable-interaction-submit.d.ts +22 -0
- package/dist/web-react/durable-plan-card.d.ts +13 -0
- package/dist/web-react/durable-plan-flow.d.ts +77 -0
- package/dist/web-react/harness-glyphs.d.ts +28 -0
- package/dist/web-react/index.d.ts +80 -2347
- package/dist/web-react/inert.d.ts +39 -0
- package/dist/web-react/insight-card.d.ts +203 -0
- package/dist/web-react/interaction-card-support.d.ts +115 -0
- package/dist/web-react/interaction-plan-card.d.ts +39 -0
- package/dist/web-react/interaction-question-card.d.ts +100 -0
- package/dist/web-react/message-attachments.d.ts +56 -0
- package/dist/web-react/mission-activity.d.ts +96 -0
- package/dist/web-react/motion.d.ts +43 -0
- package/dist/web-react/provenance-model.d.ts +195 -0
- package/dist/web-react/provenance.d.ts +82 -0
- package/dist/web-react/provider-logo.d.ts +14 -0
- package/dist/web-react/record-grid-model.d.ts +257 -0
- package/dist/web-react/record-grid.d.ts +108 -0
- package/dist/web-react/sandbox-terminal.d.ts +90 -0
- package/dist/web-react/seat-paywall.d.ts +47 -0
- package/dist/web-react/session-history.d.ts +196 -0
- package/dist/web-react/smooth-text.d.ts +29 -0
- package/dist/web-react/sparkline.d.ts +150 -0
- package/dist/web-react/terminal.d.ts +1 -92
- package/dist/web-react/use-chat-interactions.d.ts +78 -0
- package/dist/web-react/use-composer-attachments.d.ts +111 -0
- package/dist/web-react/use-file-mentions.d.ts +94 -0
- package/dist/web-react/work-product.d.ts +105 -0
- package/dist/work-product/claim-support.d.ts +288 -0
- package/dist/work-product/index.d.ts +16 -849
- package/dist/work-product/provenance.d.ts +61 -0
- package/dist/{queue-VTBA5ONX.d.ts → work-product/queue.d.ts} +10 -12
- package/dist/work-product/quote.d.ts +139 -0
- package/dist/work-product/route.d.ts +88 -0
- package/dist/work-product/service.d.ts +123 -0
- package/dist/work-product/tools.d.ts +144 -0
- package/dist/{types-CCeYywdS.d.ts → work-product/types.d.ts} +29 -31
- package/dist/work-product-react/index.d.ts +19 -8
- package/dist/workspace-react/index.d.ts +8 -11
- package/package.json +5 -4
- package/dist/agent-session-controls-CmlXwp_H.d.ts +0 -384
- package/dist/apply-6wlMOLf8.d.ts +0 -280
- package/dist/attachment-validation-BfJDBU1g.d.ts +0 -261
- package/dist/budget-BOucfcb_.d.ts +0 -142
- package/dist/values-C7RidJuI.d.ts +0 -156
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Konva Stage host for the design-canvas editor. Renders the active page
|
|
3
|
+
* (background rect + element nodes), wires all interaction gestures, and
|
|
4
|
+
* delegates persistence through the command stack.
|
|
5
|
+
*
|
|
6
|
+
* COORDINATE SYSTEM:
|
|
7
|
+
* The Konva stage sits at (0,0) in screen space. The content Layer group is
|
|
8
|
+
* translated by (panX, panY) and scaled by (zoom, zoom). Document coordinates
|
|
9
|
+
* map to screen via: screenX = panX + docX * zoom.
|
|
10
|
+
*
|
|
11
|
+
* GESTURES (mutually exclusive; escape cancels any live gesture):
|
|
12
|
+
* - Wheel: zoom-to-cursor via ZoomPanMath.zoomAtPoint; setView only.
|
|
13
|
+
* - Middle-button drag / space+drag: pan; setView only.
|
|
14
|
+
* - Empty-space drag: marquee selection; setView only.
|
|
15
|
+
* - Element drag: move via onDragMove preview + onDragEnd command.
|
|
16
|
+
* - Transformer: resize/rotate; handled by SelectionLayer.
|
|
17
|
+
* - Double-click on text: opens InlineTextEditor.
|
|
18
|
+
*
|
|
19
|
+
* KEYBOARD (active when canvas wrapper div is focused):
|
|
20
|
+
* - delete/backspace → deleteElementCommand for each selected id.
|
|
21
|
+
* - arrows → nudge (shift ×10); ONE command emitted on keyup (coalescing).
|
|
22
|
+
* - mod+z / shift+mod+z → undo / redo.
|
|
23
|
+
* - mod+d → duplicate selection at +10,+10 offset.
|
|
24
|
+
* - mod+g → group selection (≥2 elements).
|
|
25
|
+
* - shift+mod+g → ungroup selected group.
|
|
26
|
+
* - mod+a → select all on current page.
|
|
27
|
+
* - escape → cancel live gesture or clear selection.
|
|
28
|
+
*
|
|
29
|
+
* POINTER CAPTURE: marquee and pan gestures call setPointerCapture on the
|
|
30
|
+
* wrapper div so drag events don't escape on fast pointer moves.
|
|
31
|
+
*
|
|
32
|
+
* DEVICEPIXELRATIO: Konva's pixelRatio prop multiplies the backing canvas
|
|
33
|
+
* resolution for crisp rendering at any DPR.
|
|
34
|
+
*
|
|
35
|
+
* Composition:
|
|
36
|
+
* - `WorkspaceView` is the injectable form: receives a pre-created stack and
|
|
37
|
+
* a guaranteed non-null activePage, commits all gestures through that shared
|
|
38
|
+
* stack. `DesignCanvasEditor` passes the chrome's stack here so undo/redo
|
|
39
|
+
* and layers-panel selection stay coherent across both surfaces.
|
|
40
|
+
* - `Workspace` is the standalone wrapper: creates its own stack and renders
|
|
41
|
+
* WorkspaceView. Existing consumers (tests, bare embeds) mount this without
|
|
42
|
+
* any chrome.
|
|
43
|
+
*/
|
|
44
|
+
import type { DesignCanvasProps, ExportTriggerOptions } from '../contracts';
|
|
45
|
+
import { createSceneCommandStack } from '../engine/command-stack';
|
|
46
|
+
import type { ScenePage } from '../../design-canvas/model';
|
|
47
|
+
import { type CanvasRenderPalette } from '../../theme/theme';
|
|
48
|
+
export interface WorkspaceViewProps {
|
|
49
|
+
/** The command stack this view commits gestures through. Must be the same
|
|
50
|
+
* instance the chrome (DesignCanvasEditor) owns so undo/redo and layers-
|
|
51
|
+
* panel selection are coherent. */
|
|
52
|
+
stack: ReturnType<typeof createSceneCommandStack>;
|
|
53
|
+
/** Active page resolved before render — WorkspaceView has no conditional
|
|
54
|
+
* hook guards; the caller ensures this is never null. */
|
|
55
|
+
activePage: ScenePage;
|
|
56
|
+
canWrite: boolean;
|
|
57
|
+
onApplyOperations: DesignCanvasProps['onApplyOperations'];
|
|
58
|
+
onSelectionChange?: DesignCanvasProps['onSelectionChange'];
|
|
59
|
+
className?: string;
|
|
60
|
+
/** Ref the chrome fills with a fit-page callback. The chrome calls it on F /
|
|
61
|
+
* Fit button; when injected via DesignCanvasEditor the ref is shared. */
|
|
62
|
+
onFitRef?: React.MutableRefObject<(() => void) | null>;
|
|
63
|
+
/** Host export hook. When set, the workspace fills `onExportRef` with a
|
|
64
|
+
* callback that renders the stage to a data URL and forwards the result. */
|
|
65
|
+
onExport?: DesignCanvasProps['onExport'];
|
|
66
|
+
/** Ref the workspace fills with an export callback `(opts) => void`. The
|
|
67
|
+
* chrome's Export control calls it; the workspace owns the Konva stage so it
|
|
68
|
+
* produces the data URL here. Filled only when `onExport` is also set. */
|
|
69
|
+
onExportRef?: React.MutableRefObject<((opts: ExportTriggerOptions) => void) | null>;
|
|
70
|
+
/** Fit the active page to the viewport once, on the first non-zero measurement. Default true. */
|
|
71
|
+
fitOnMount?: boolean;
|
|
72
|
+
/** Called once after the first real (non-zero) measurement, after the initial fit is applied (or skipped). */
|
|
73
|
+
onReady?(): void;
|
|
74
|
+
/** Konva render palette. Omitted → light defaults (byte-identical history). */
|
|
75
|
+
render?: CanvasRenderPalette;
|
|
76
|
+
/** Show the branded in-canvas empty state (three doors) while the active page
|
|
77
|
+
* has no elements and the user can write. Default true. Set false to keep a
|
|
78
|
+
* bare blank stage (e.g. when restoring a saved-but-intentionally-empty page). */
|
|
79
|
+
showEmptyState?: boolean;
|
|
80
|
+
/** Focus/open the agent from the empty state's "Ask the agent" door. When
|
|
81
|
+
* omitted that door is hidden — there is no agent surface to send them to. */
|
|
82
|
+
onAskAgent?(): void;
|
|
83
|
+
}
|
|
84
|
+
export declare function WorkspaceView({ canWrite, onApplyOperations, onSelectionChange, className, stack, activePage, onFitRef, onExport, onExportRef, fitOnMount, onReady, render, showEmptyState, onAskAgent, }: WorkspaceViewProps): import("react").JSX.Element;
|
|
85
|
+
/**
|
|
86
|
+
* Self-contained Konva workspace that creates its own command stack. Mount
|
|
87
|
+
* this when you want the canvas without the toolbar/rulers/pages-strip chrome.
|
|
88
|
+
*
|
|
89
|
+
* Products that want the full editor (chrome + workspace sharing one stack)
|
|
90
|
+
* should mount `DesignCanvasEditor` instead.
|
|
91
|
+
*/
|
|
92
|
+
export declare function Workspace(props: DesignCanvasProps): import("react").JSX.Element | null;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Canvas zoom controls: fit-to-page, 100%, zoom-out/in buttons, and a percent
|
|
3
|
+
* readout. Stateless — zoom lives in the editor's view state, updated through
|
|
4
|
+
* onZoom.
|
|
5
|
+
*/
|
|
6
|
+
export interface ZoomControlsProps {
|
|
7
|
+
zoom: number;
|
|
8
|
+
onZoom(zoom: number): void;
|
|
9
|
+
onFit(): void;
|
|
10
|
+
/** Label/aria for the fit action. Defaults to "Fit to screen" — shorter and
|
|
11
|
+
* matching every other tool's wording for the same action. */
|
|
12
|
+
fitLabel?: string;
|
|
13
|
+
}
|
|
14
|
+
export declare function ZoomControls({ zoom, onZoom, onFit, fitLabel }: ZoomControlsProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Inline SVG glyphs for the design canvas editor. No external icon dependency —
|
|
3
|
+
* same convention as sequences-react/components/glyphs.tsx.
|
|
4
|
+
*/
|
|
5
|
+
interface GlyphProps {
|
|
6
|
+
className?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare const UndoGlyph: ({ className }: GlyphProps) => import("react").JSX.Element;
|
|
9
|
+
export declare const RedoGlyph: ({ className }: GlyphProps) => import("react").JSX.Element;
|
|
10
|
+
export declare const SwapGlyph: ({ className }: GlyphProps) => import("react").JSX.Element;
|
|
11
|
+
export declare const EyeGlyph: ({ className }: GlyphProps) => import("react").JSX.Element;
|
|
12
|
+
export declare const EyeOffGlyph: ({ className }: GlyphProps) => import("react").JSX.Element;
|
|
13
|
+
export declare const LockGlyph: ({ className }: GlyphProps) => import("react").JSX.Element;
|
|
14
|
+
export declare const UnlockGlyph: ({ className }: GlyphProps) => import("react").JSX.Element;
|
|
15
|
+
export declare const TrashGlyph: ({ className }: GlyphProps) => import("react").JSX.Element;
|
|
16
|
+
export declare const GroupGlyph: ({ className }: GlyphProps) => import("react").JSX.Element;
|
|
17
|
+
export declare const UngroupGlyph: ({ className }: GlyphProps) => import("react").JSX.Element;
|
|
18
|
+
export declare const BringFrontGlyph: ({ className }: GlyphProps) => import("react").JSX.Element;
|
|
19
|
+
export declare const SendBackGlyph: ({ className }: GlyphProps) => import("react").JSX.Element;
|
|
20
|
+
export declare const AlignLeftGlyph: ({ className }: GlyphProps) => import("react").JSX.Element;
|
|
21
|
+
export declare const AlignCenterGlyph: ({ className }: GlyphProps) => import("react").JSX.Element;
|
|
22
|
+
export declare const AlignRightGlyph: ({ className }: GlyphProps) => import("react").JSX.Element;
|
|
23
|
+
export declare const BoldGlyph: ({ className }: GlyphProps) => import("react").JSX.Element;
|
|
24
|
+
export declare const ItalicGlyph: ({ className }: GlyphProps) => import("react").JSX.Element;
|
|
25
|
+
export declare const PlusGlyph: ({ className }: GlyphProps) => import("react").JSX.Element;
|
|
26
|
+
export declare const MinusGlyph: ({ className }: GlyphProps) => import("react").JSX.Element;
|
|
27
|
+
export declare const ChevronDownGlyph: ({ className }: GlyphProps) => import("react").JSX.Element;
|
|
28
|
+
export declare const RectGlyph: ({ className }: GlyphProps) => import("react").JSX.Element;
|
|
29
|
+
export declare const EllipseGlyph: ({ className }: GlyphProps) => import("react").JSX.Element;
|
|
30
|
+
export declare const LineGlyph: ({ className }: GlyphProps) => import("react").JSX.Element;
|
|
31
|
+
export declare const TextGlyph: ({ className }: GlyphProps) => import("react").JSX.Element;
|
|
32
|
+
export declare const ImageGlyph: ({ className }: GlyphProps) => import("react").JSX.Element;
|
|
33
|
+
export declare const VideoGlyph: ({ className }: GlyphProps) => import("react").JSX.Element;
|
|
34
|
+
/** A slot binding point: a socket plate with a keyhole notch — the outlet an
|
|
35
|
+
* `apply_data` payload plugs into. Reads at h-3 where the old sunburst did not. */
|
|
36
|
+
export declare const SlotGlyph: ({ className }: GlyphProps) => import("react").JSX.Element;
|
|
37
|
+
export declare const PageGlyph: ({ className }: GlyphProps) => import("react").JSX.Element;
|
|
38
|
+
export declare const GridGlyph: ({ className }: GlyphProps) => import("react").JSX.Element;
|
|
39
|
+
export declare const RulerGlyph: ({ className }: GlyphProps) => import("react").JSX.Element;
|
|
40
|
+
export declare const MagnetGlyph: ({ className }: GlyphProps) => import("react").JSX.Element;
|
|
41
|
+
export declare const BleedGlyph: ({ className }: GlyphProps) => import("react").JSX.Element;
|
|
42
|
+
export declare const DuplicateGlyph: ({ className }: GlyphProps) => import("react").JSX.Element;
|
|
43
|
+
export declare const ZoomFitGlyph: ({ className }: GlyphProps) => import("react").JSX.Element;
|
|
44
|
+
export declare const ExportGlyph: ({ className }: GlyphProps) => import("react").JSX.Element;
|
|
45
|
+
export declare const ShapesGlyph: ({ className }: GlyphProps) => import("react").JSX.Element;
|
|
46
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared icon-button contract for the canvas chrome (Toolbar, ZoomControls,
|
|
3
|
+
* PagesStrip). One definition so the focus ring, disabled affordance, and
|
|
4
|
+
* active state can never drift between surfaces.
|
|
5
|
+
*
|
|
6
|
+
* The focus ring uses the `--ring` token (defined in src/theme/tokens.css) and
|
|
7
|
+
* is keyboard-only (`focus-visible`) so mouse clicks don't draw a ring.
|
|
8
|
+
*/
|
|
9
|
+
import type { ButtonHTMLAttributes } from 'react';
|
|
10
|
+
/** 28px square (h-7) — used by the main toolbar. */
|
|
11
|
+
export declare const BTN = "flex h-7 w-7 items-center justify-center rounded border border-[var(--border-default)] text-[var(--text-secondary)] transition hover:text-[var(--text-primary)] disabled:cursor-default disabled:opacity-40";
|
|
12
|
+
export declare const BTN_ACTIVE: string;
|
|
13
|
+
/** 24px square (h-6) — used by the zoom controls and pages strip. */
|
|
14
|
+
export declare const BTN_SM = "flex h-6 w-6 items-center justify-center rounded border border-[var(--border-default)] text-[var(--text-secondary)] transition hover:text-[var(--text-primary)] disabled:cursor-default disabled:opacity-40";
|
|
15
|
+
export declare const BTN_SM_ACTIVE: string;
|
|
16
|
+
export interface IconButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
17
|
+
/** Render the active (brand-colored) variant. */
|
|
18
|
+
active?: boolean;
|
|
19
|
+
/** 'md' = 28px (toolbar), 'sm' = 24px (zoom/pages). */
|
|
20
|
+
size?: 'md' | 'sm';
|
|
21
|
+
}
|
|
22
|
+
export declare const IconButton: import("react").ForwardRefExoticComponent<IconButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Design canvas editor component surface. `DesignCanvas` is the root component
|
|
3
|
+
* products mount (see `../lazy` for the code-split entry). Leaf components are
|
|
4
|
+
* exported for products that compose a custom editor shell from the same parts.
|
|
5
|
+
*
|
|
6
|
+
* Konva is an optional peer — all Konva-dependent components use it only
|
|
7
|
+
* at render time so this index is safe to import in server bundles (tree-
|
|
8
|
+
* shaking removes the Konva paths if they are never rendered).
|
|
9
|
+
*/
|
|
10
|
+
export { DesignCanvas, type DesignCanvasFullProps } from './DesignCanvas';
|
|
11
|
+
export { DesignCanvasEditor } from './DesignCanvasEditor';
|
|
12
|
+
export { CanvasInsertPanel, type CanvasInsertPanelProps, type InsertGeneration, } from './CanvasInsertPanel';
|
|
13
|
+
export { Workspace, WorkspaceView, type WorkspaceViewProps } from './Workspace';
|
|
14
|
+
export { CanvasEmptyState, type CanvasEmptyStateProps } from './CanvasEmptyState';
|
|
15
|
+
export { SelectionLayer, type SelectionLayerProps } from './SelectionLayer';
|
|
16
|
+
export { PagesStrip, type PagesStripProps } from './PagesStrip';
|
|
17
|
+
export { LayersPanel, type LayersPanelProps } from './LayersPanel';
|
|
18
|
+
export { Toolbar, type ToolbarProps } from './Toolbar';
|
|
19
|
+
export { ZoomControls, type ZoomControlsProps } from './ZoomControls';
|
|
20
|
+
export { IconButton, type IconButtonProps, BTN, BTN_ACTIVE, BTN_SM, BTN_SM_ACTIVE, } from './icon-button';
|
|
21
|
+
export { ExportControl, type ExportControlProps } from './ExportControl';
|
|
22
|
+
export { ElementNode, type ElementNodeProps } from './ElementNode';
|
|
23
|
+
export { GridLayer, type GridLayerProps } from './GridLayer';
|
|
24
|
+
export { Rulers, type RulersProps } from './Rulers';
|
|
25
|
+
export { flattenLayerTree, LAYERS_PANEL_ROW_LIMIT, type LayerRow, } from './layer-tree';
|
|
26
|
+
export { bakeRectTransform, bakeLineTransform, bakeTextTransform, type TransformerNode, type BakedNodeAttrs, } from './transform-math';
|
|
27
|
+
export { selectTickStep, buildRulerTicks, formatRulerLabel, type TickStep, type RulerTick, } from './ruler-math';
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pure layer-tree helpers: flatten a page's element array into an ordered list
|
|
3
|
+
* for the LayersPanel, preserving group nesting. Extracted so render order,
|
|
4
|
+
* depth, and selection math can be unit-tested independently of React.
|
|
5
|
+
*/
|
|
6
|
+
import type { SceneElement, ScenePage } from '../../design-canvas/model';
|
|
7
|
+
/** Describe a layer row with its element, depth, grouping, ownership, and parent group details */
|
|
8
|
+
export interface LayerRow {
|
|
9
|
+
element: SceneElement;
|
|
10
|
+
depth: number;
|
|
11
|
+
/** True when this row is a group whose children follow it in the list. */
|
|
12
|
+
isGroup: boolean;
|
|
13
|
+
/** Index within its owner (page.elements or group.children). */
|
|
14
|
+
ownerIndex: number;
|
|
15
|
+
/** Length of the owner array — needed for z-order bound math. */
|
|
16
|
+
ownerLength: number;
|
|
17
|
+
/** Id of the containing group, or null for page-root elements. */
|
|
18
|
+
parentGroupId: string | null;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Flatten `page.elements` into display order for the layers panel.
|
|
22
|
+
*
|
|
23
|
+
* Z-order is bottom→top in the element array; the layers panel shows
|
|
24
|
+
* top→bottom (highest z-index first). A group row precedes its children
|
|
25
|
+
* (the group is "above" its children in the panel, reflecting that the group
|
|
26
|
+
* node itself paints last in Konva when empty; children paint inside it).
|
|
27
|
+
*
|
|
28
|
+
* Depth increases by 1 for each group level, starting at 0 for page-root
|
|
29
|
+
* elements. Groups are expanded; collapsed state is a view concern the caller
|
|
30
|
+
* tracks separately.
|
|
31
|
+
*/
|
|
32
|
+
export declare function flattenLayerTree(page: ScenePage): LayerRow[];
|
|
33
|
+
/** The maximum number of rows the layers panel renders before truncating. */
|
|
34
|
+
export declare const LAYERS_PANEL_ROW_LIMIT = 500;
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pure ruler tick-step and label math for the canvas rulers. Nothing here
|
|
3
|
+
* touches React or the DOM — all interaction geometry is extracted so it can
|
|
4
|
+
* be unit-tested without a browser.
|
|
5
|
+
*
|
|
6
|
+
* Canvas rulers show document-coordinate values (CSS px). Tick density adapts
|
|
7
|
+
* to the current zoom so major ticks never sit closer than `minMajorSpacingPx`
|
|
8
|
+
* screen pixels apart. The step table covers typical design zoom ranges; beyond
|
|
9
|
+
* the table the step grows by doubling the last candidate.
|
|
10
|
+
*/
|
|
11
|
+
/** Define spacing and visibility rules for major and minor ticks in a coordinate system */
|
|
12
|
+
export interface TickStep {
|
|
13
|
+
/** Document-coordinate step between major ticks. */
|
|
14
|
+
major: number;
|
|
15
|
+
/** Document-coordinate step between minor ticks (major / 5). */
|
|
16
|
+
minor: number;
|
|
17
|
+
/** True when minor ticks should be drawn (they sit ≥ minMinorSpacingPx apart). */
|
|
18
|
+
drawMinor: boolean;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Select the major tick step that keeps major ticks ≥ minMajorSpacingPx apart
|
|
22
|
+
* at the given zoom. Minor ticks are rendered when they'd clear minMinorSpacingPx.
|
|
23
|
+
*
|
|
24
|
+
* Both spacing thresholds are SCREEN pixels — the caller provides `zoom` (screen
|
|
25
|
+
* px per document px) so the result is zoom-independent.
|
|
26
|
+
*/
|
|
27
|
+
export declare function selectTickStep(input: {
|
|
28
|
+
zoom: number;
|
|
29
|
+
minMajorSpacingPx?: number;
|
|
30
|
+
minMinorSpacingPx?: number;
|
|
31
|
+
}): TickStep;
|
|
32
|
+
/** Define a ruler tick with a position and optional label for measurement markings */
|
|
33
|
+
export interface RulerTick {
|
|
34
|
+
/** Position in document coordinates. */
|
|
35
|
+
position: number;
|
|
36
|
+
/** Label text, or null for a minor tick. */
|
|
37
|
+
label: string | null;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Generate all ticks visible in a ruler of `documentLength` document-px,
|
|
41
|
+
* given the current tick step. The caller clips to the viewport; this produces
|
|
42
|
+
* all ticks for the full document extent so the ruler can be rendered
|
|
43
|
+
* declaratively without a separate clipping pass.
|
|
44
|
+
*/
|
|
45
|
+
export declare function buildRulerTicks(input: {
|
|
46
|
+
documentLength: number;
|
|
47
|
+
step: TickStep;
|
|
48
|
+
}): RulerTick[];
|
|
49
|
+
/** Format a document-px position as a compact label: integers stay whole,
|
|
50
|
+
* decimals are rounded to 1 place. Values ≥ 1000 are compacted to "1k" etc. */
|
|
51
|
+
export declare function formatRulerLabel(value: number): string;
|
|
52
|
+
/**
|
|
53
|
+
* Convert a screen-coordinate pointer position to a document-coordinate guide
|
|
54
|
+
* drop position, given the ruler's scroll offset and zoom. Used by both the
|
|
55
|
+
* horizontal and vertical ruler drag-guide creation paths.
|
|
56
|
+
*
|
|
57
|
+
* `scrollOffset` is how many document-px of the ruler are scrolled off-screen
|
|
58
|
+
* to the left/top. `pointerScreenPx` is the cursor position in screen px
|
|
59
|
+
* relative to the ruler element's origin.
|
|
60
|
+
*/
|
|
61
|
+
export declare function screenToDocumentPosition(input: {
|
|
62
|
+
pointerScreenPx: number;
|
|
63
|
+
scrollOffset: number;
|
|
64
|
+
zoom: number;
|
|
65
|
+
}): number;
|
|
66
|
+
/** Snap a guide drop position to the nearest major tick if within
|
|
67
|
+
* `snapThresholdPx` document px; otherwise returns the raw position. */
|
|
68
|
+
export declare function snapGuideToTick(position: number, step: TickStep, snapThresholdPx: number): number;
|
|
69
|
+
/** Index of the topmost element for a given owner length. */
|
|
70
|
+
export declare function topIndex(ownerLength: number): number;
|
|
71
|
+
/** Move an element one step toward the top (higher index = above in z-order).
|
|
72
|
+
* Returns the current index unchanged if already at the top. */
|
|
73
|
+
export declare function indexForward(current: number, ownerLength: number): number;
|
|
74
|
+
/** Move an element one step toward the bottom (lower index = below). Returns
|
|
75
|
+
* the current index unchanged if already at the bottom. */
|
|
76
|
+
export declare function indexBackward(current: number): number;
|
|
77
|
+
/** Clamp an arbitrary target index to valid range. */
|
|
78
|
+
export declare function clampIndex(target: number, ownerLength: number): number;
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pure geometry helpers extracted from component drag/transform logic so
|
|
3
|
+
* every interactive math path is unit-testable without Konva or a DOM.
|
|
4
|
+
*
|
|
5
|
+
* Invariants:
|
|
6
|
+
* - All inputs and outputs are in document-coordinate pixels unless noted.
|
|
7
|
+
* - Rotation angles are degrees, clockwise, matching the Konva + model convention.
|
|
8
|
+
* - "Baking" scale into width/height resets Konva's scaleX/scaleY to 1; that
|
|
9
|
+
* is required so the model's width/height always reflects true size, never a
|
|
10
|
+
* scaled-but-uncollapsed state.
|
|
11
|
+
*/
|
|
12
|
+
export interface TransformerNode {
|
|
13
|
+
x: number;
|
|
14
|
+
y: number;
|
|
15
|
+
width: number;
|
|
16
|
+
height: number;
|
|
17
|
+
/** Konva's scale after the transformer gesture; 1 when already baked. */
|
|
18
|
+
scaleX: number;
|
|
19
|
+
scaleY: number;
|
|
20
|
+
rotation: number;
|
|
21
|
+
}
|
|
22
|
+
/** Define baked node attributes including position, size, and rotation with collapsed scale */
|
|
23
|
+
export interface BakedNodeAttrs {
|
|
24
|
+
x: number;
|
|
25
|
+
y: number;
|
|
26
|
+
/** True pixel size after scale is collapsed into dimensions. */
|
|
27
|
+
width: number;
|
|
28
|
+
height: number;
|
|
29
|
+
rotation: number;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Collapse Konva scaleX/scaleY into width/height so the model always stores
|
|
33
|
+
* true pixel dimensions. The transformer mutates scale on drag; we bake it
|
|
34
|
+
* once at dragend/transformend and emit width/height — scale resets to 1
|
|
35
|
+
* implicitly (the emitted attrs do not include scale, so the next render
|
|
36
|
+
* starts from scaleX=1).
|
|
37
|
+
*
|
|
38
|
+
* Konva rotates about the top-left origin and also shifts x/y to compensate
|
|
39
|
+
* for scale — the transformer gives us the post-rotation, post-scale x/y
|
|
40
|
+
* directly, so no further rotation math is needed here.
|
|
41
|
+
*/
|
|
42
|
+
export declare function bakeRectTransform(node: TransformerNode): BakedNodeAttrs;
|
|
43
|
+
/**
|
|
44
|
+
* Lines store points as a flat [x0, y0, x1, y1, ...] array relative to the
|
|
45
|
+
* line element's (x, y). When the transformer scales the group containing the
|
|
46
|
+
* line, we bake scaleX into every x-component of points and scaleY into every
|
|
47
|
+
* y-component, then reset scale to 1. The element x/y is the Konva group
|
|
48
|
+
* origin and is taken directly from the transformer output.
|
|
49
|
+
*/
|
|
50
|
+
export declare function bakeLineTransform(node: TransformerNode & {
|
|
51
|
+
points: number[];
|
|
52
|
+
}): BakedNodeAttrs & {
|
|
53
|
+
points: number[];
|
|
54
|
+
};
|
|
55
|
+
/**
|
|
56
|
+
* Text nodes have a fixed wrap width; scaling that width is what the
|
|
57
|
+
* transformer controls. Height is content-derived and is NOT baked here —
|
|
58
|
+
* it re-derives from text content at render time via estimateTextHeight.
|
|
59
|
+
* Only scaleX is baked into width; scaleY into fontSize so text scales
|
|
60
|
+
* proportionally when the user resizes with keepRatio.
|
|
61
|
+
*/
|
|
62
|
+
export declare function bakeTextTransform(node: TransformerNode & {
|
|
63
|
+
fontSize: number;
|
|
64
|
+
}): BakedNodeAttrs & {
|
|
65
|
+
fontSize: number;
|
|
66
|
+
};
|
|
67
|
+
/**
|
|
68
|
+
* The model stores ellipse position as the top-left corner of the bounding
|
|
69
|
+
* box (matching every other element kind). Konva.Ellipse draws from its center
|
|
70
|
+
* (radiusX, radiusY). This converts model top-left to Konva center.
|
|
71
|
+
*
|
|
72
|
+
* INVARIANT: radiusX = width/2, radiusY = height/2; x/y offsets are exactly
|
|
73
|
+
* half the dimensions because there is no separate offset field.
|
|
74
|
+
*/
|
|
75
|
+
export declare function ellipseCenterFromTopLeft(topLeft: {
|
|
76
|
+
x: number;
|
|
77
|
+
y: number;
|
|
78
|
+
width: number;
|
|
79
|
+
height: number;
|
|
80
|
+
}): {
|
|
81
|
+
x: number;
|
|
82
|
+
y: number;
|
|
83
|
+
radiusX: number;
|
|
84
|
+
radiusY: number;
|
|
85
|
+
};
|
|
86
|
+
/**
|
|
87
|
+
* Inverse: Konva center + radius → model top-left. Used when reading back
|
|
88
|
+
* from a transformer node whose origin is the Konva center.
|
|
89
|
+
*/
|
|
90
|
+
export declare function ellipseTopLeftFromCenter(center: {
|
|
91
|
+
x: number;
|
|
92
|
+
y: number;
|
|
93
|
+
radiusX: number;
|
|
94
|
+
radiusY: number;
|
|
95
|
+
}): {
|
|
96
|
+
x: number;
|
|
97
|
+
y: number;
|
|
98
|
+
width: number;
|
|
99
|
+
height: number;
|
|
100
|
+
};
|
|
101
|
+
interface MarqueeRect {
|
|
102
|
+
x: number;
|
|
103
|
+
y: number;
|
|
104
|
+
width: number;
|
|
105
|
+
height: number;
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Normalize a marquee rectangle from two arbitrary corners into a canonical
|
|
109
|
+
* top-left origin with positive width/height, regardless of drag direction.
|
|
110
|
+
*/
|
|
111
|
+
export declare function normalizeMarquee(startX: number, startY: number, endX: number, endY: number): MarqueeRect;
|
|
112
|
+
interface OverlayPositionInput {
|
|
113
|
+
/** Element top-left in document coordinates. */
|
|
114
|
+
elementX: number;
|
|
115
|
+
elementY: number;
|
|
116
|
+
elementWidth: number;
|
|
117
|
+
elementHeight: number;
|
|
118
|
+
/** Current zoom and pan. */
|
|
119
|
+
zoom: number;
|
|
120
|
+
panX: number;
|
|
121
|
+
panY: number;
|
|
122
|
+
}
|
|
123
|
+
interface OverlayPosition {
|
|
124
|
+
/** CSS left/top for the overlay textarea relative to the canvas container. */
|
|
125
|
+
left: number;
|
|
126
|
+
top: number;
|
|
127
|
+
width: number;
|
|
128
|
+
/** fontSize to mirror from the element, scaled by zoom. */
|
|
129
|
+
fontSize: number;
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* Compute the screen-space position for an inline text editor overlay.
|
|
133
|
+
*
|
|
134
|
+
* V1 simplification: rotated text elements are edited in a non-rotated overlay
|
|
135
|
+
* positioned at the element's AABB. This means the overlay does not visually
|
|
136
|
+
* align with the rotated text, but keeps the textarea DOM element axis-aligned
|
|
137
|
+
* which avoids browser textarea rotation bugs. A future v2 may apply a CSS
|
|
138
|
+
* transform to the textarea to match rotation.
|
|
139
|
+
*/
|
|
140
|
+
export declare function computeTextOverlayPosition(input: OverlayPositionInput & {
|
|
141
|
+
elementFontSize: number;
|
|
142
|
+
}): OverlayPosition;
|
|
143
|
+
/**
|
|
144
|
+
* Snap a rotation angle to the nearest cardinal/diagonal if within
|
|
145
|
+
* `thresholdDeg` of it (default 5°). Returns the original value when no snap
|
|
146
|
+
* activates. Normalizes output to [0, 360).
|
|
147
|
+
*/
|
|
148
|
+
export declare function snapRotation(angleDeg: number, thresholdDeg?: number): number;
|
|
149
|
+
/**
|
|
150
|
+
* Convert a keyboard arrow event into a {dx, dy} nudge in document px.
|
|
151
|
+
* Shift multiplies by 10 (the "big nudge" convention).
|
|
152
|
+
*/
|
|
153
|
+
export declare function nudgeDelta(key: 'ArrowLeft' | 'ArrowRight' | 'ArrowUp' | 'ArrowDown', shift: boolean): {
|
|
154
|
+
dx: number;
|
|
155
|
+
dy: number;
|
|
156
|
+
};
|
|
157
|
+
/**
|
|
158
|
+
* Return true when bounds B is entirely contained within marquee A.
|
|
159
|
+
* Partial intersection does NOT select — the marquee must fully enclose.
|
|
160
|
+
*/
|
|
161
|
+
export declare function marqueeContains(marquee: MarqueeRect, bounds: MarqueeRect): boolean;
|
|
162
|
+
/**
|
|
163
|
+
* Return true when grid lines at `gridSize` document px would render at least
|
|
164
|
+
* `minScreenPx` apart at the current zoom. Used to skip grid drawing when
|
|
165
|
+
* zoomed out far enough that lines would clutter.
|
|
166
|
+
*/
|
|
167
|
+
export declare function gridVisible(gridSize: number, zoom: number, minScreenPx?: number): boolean;
|
|
168
|
+
export {};
|
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
import { c as SceneDocument, a as SceneElement, S as ScenePage, B as Bounds } from './model-DnfO_PdJ.js';
|
|
2
|
-
import { S as SceneOperation } from './operations-ByJ6yXOW.js';
|
|
3
|
-
import { CanvasRenderPalette } from './theme/index.js';
|
|
4
|
-
|
|
5
1
|
/**
|
|
6
2
|
* Seams between the design-canvas editor's engine and components, mirroring
|
|
7
3
|
* the sequences-react pattern: interface-only so layers build independently.
|
|
@@ -14,9 +10,11 @@ import { CanvasRenderPalette } from './theme/index.js';
|
|
|
14
10
|
* inverse = pre-gesture attrs) executes on release — undo is per-gesture,
|
|
15
11
|
* never per-pixel.
|
|
16
12
|
*/
|
|
17
|
-
|
|
13
|
+
import type { Bounds, SceneDocument, SceneElement, ScenePage } from '../design-canvas/model';
|
|
14
|
+
import type { SceneOperation } from '../design-canvas/operations';
|
|
15
|
+
import type { CanvasRenderPalette } from '../theme/theme';
|
|
18
16
|
/** Define the state of the editor scene including document, view settings, and selection details */
|
|
19
|
-
interface EditorSceneState {
|
|
17
|
+
export interface EditorSceneState {
|
|
20
18
|
document: SceneDocument;
|
|
21
19
|
activePageId: string;
|
|
22
20
|
selectedElementIds: string[];
|
|
@@ -32,7 +30,7 @@ interface EditorSceneState {
|
|
|
32
30
|
showBleed: boolean;
|
|
33
31
|
}
|
|
34
32
|
/** Define a command with execution, undo, and operation methods for scene editing and persistence */
|
|
35
|
-
interface SceneCommand {
|
|
33
|
+
export interface SceneCommand {
|
|
36
34
|
label: string;
|
|
37
35
|
execute(state: EditorSceneState): EditorSceneState;
|
|
38
36
|
undo(state: EditorSceneState): EditorSceneState;
|
|
@@ -46,7 +44,7 @@ interface SceneCommand {
|
|
|
46
44
|
inverseOperations(): SceneOperation[];
|
|
47
45
|
}
|
|
48
46
|
/** Manage and track scene commands with undo, redo, and state subscription capabilities */
|
|
49
|
-
interface SceneCommandStack {
|
|
47
|
+
export interface SceneCommandStack {
|
|
50
48
|
execute(command: SceneCommand): void;
|
|
51
49
|
/** Apply the top-of-done-stack inverse and return the command (callers use
|
|
52
50
|
* `command.inverseOperations()` to persist the undo to the server). */
|
|
@@ -81,20 +79,20 @@ interface SceneCommandStack {
|
|
|
81
79
|
rollback(command: SceneCommand): void;
|
|
82
80
|
}
|
|
83
81
|
/** Define snap target categories for aligning elements within a layout system */
|
|
84
|
-
type SnapTargetKind = 'grid' | 'element-edge' | 'element-center' | 'page-edge' | 'page-center' | 'guide';
|
|
82
|
+
export type SnapTargetKind = 'grid' | 'element-edge' | 'element-center' | 'page-edge' | 'page-center' | 'guide';
|
|
85
83
|
/** Define a target position and kind for snapping elements on a page */
|
|
86
|
-
interface SnapTarget {
|
|
84
|
+
export interface SnapTarget {
|
|
87
85
|
/** Page-coordinate position of the snap line. */
|
|
88
86
|
position: number;
|
|
89
87
|
kind: SnapTargetKind;
|
|
90
88
|
}
|
|
91
89
|
/** Define vertical and horizontal collections of snap targets for alignment purposes */
|
|
92
|
-
interface SnapTargets {
|
|
90
|
+
export interface SnapTargets {
|
|
93
91
|
vertical: SnapTarget[];
|
|
94
92
|
horizontal: SnapTarget[];
|
|
95
93
|
}
|
|
96
94
|
/** Define the result of a snap operation including coordinates and active snap lines */
|
|
97
|
-
interface SnapResult {
|
|
95
|
+
export interface SnapResult {
|
|
98
96
|
x: number;
|
|
99
97
|
y: number;
|
|
100
98
|
/** Lines to render while the gesture holds the snap. */
|
|
@@ -102,7 +100,7 @@ interface SnapResult {
|
|
|
102
100
|
activeHorizontal: SnapTarget | null;
|
|
103
101
|
}
|
|
104
102
|
/** Resolve snapping targets and apply snapping logic to moving elements within the editor scene */
|
|
105
|
-
interface SnapEngine {
|
|
103
|
+
export interface SnapEngine {
|
|
106
104
|
/** Collect targets for a gesture: other elements' edges/centers, page
|
|
107
105
|
* edges/center, saved guides, and grid lines when enabled. `excludeIds`
|
|
108
106
|
* removes the dragged elements' own geometry. */
|
|
@@ -111,7 +109,7 @@ interface SnapEngine {
|
|
|
111
109
|
apply(bounds: Bounds, targets: SnapTargets, thresholdPx: number, zoom: number): SnapResult;
|
|
112
110
|
}
|
|
113
111
|
/** Define methods and properties to calculate zoom and pan transformations between document and screen coordinates */
|
|
114
|
-
interface ZoomPanMath {
|
|
112
|
+
export interface ZoomPanMath {
|
|
115
113
|
minZoom: number;
|
|
116
114
|
maxZoom: number;
|
|
117
115
|
/** Zoom about a screen point so the document point under the cursor stays
|
|
@@ -155,7 +153,7 @@ interface ZoomPanMath {
|
|
|
155
153
|
};
|
|
156
154
|
}
|
|
157
155
|
/** Resolve the result of applying a scene update including revision and optional normalized document */
|
|
158
|
-
interface ApplySceneResult {
|
|
156
|
+
export interface ApplySceneResult {
|
|
159
157
|
rev: number;
|
|
160
158
|
/** Present when the server re-minted ids or normalized the document; the
|
|
161
159
|
* editor rebases onto it. */
|
|
@@ -168,7 +166,7 @@ interface ApplySceneResult {
|
|
|
168
166
|
* {@link DesignCanvasProps.onExport}. The chrome is Konva-free, so it cannot
|
|
169
167
|
* produce the data URL itself — it only chooses the format and scale.
|
|
170
168
|
*/
|
|
171
|
-
interface ExportTriggerOptions {
|
|
169
|
+
export interface ExportTriggerOptions {
|
|
172
170
|
format: 'png' | 'jpeg';
|
|
173
171
|
/** Output scale multiplier (1 = page size, 2 = retina). */
|
|
174
172
|
pixelRatio: number;
|
|
@@ -184,9 +182,9 @@ interface ExportTriggerOptions {
|
|
|
184
182
|
* select, double-click-to-edit-text, image swap, the agent panel, and
|
|
185
183
|
* gallery/thumbnail/export all stay. Additive and backward-compatible.
|
|
186
184
|
*/
|
|
187
|
-
type DesignCanvasMode = 'edit' | 'review';
|
|
185
|
+
export type DesignCanvasMode = 'edit' | 'review';
|
|
188
186
|
/** Define properties and callbacks for configuring and controlling the design canvas editor */
|
|
189
|
-
interface DesignCanvasProps {
|
|
187
|
+
export interface DesignCanvasProps {
|
|
190
188
|
document: SceneDocument;
|
|
191
189
|
/** Revision the document was loaded at; threaded through saves. */
|
|
192
190
|
rev: number;
|
|
@@ -251,48 +249,3 @@ interface DesignCanvasProps {
|
|
|
251
249
|
/** Label/aria for the zoom fit action. Defaults to "Fit to screen". */
|
|
252
250
|
fitLabel?: string;
|
|
253
251
|
}
|
|
254
|
-
|
|
255
|
-
/**
|
|
256
|
-
* Undo/redo command stack over immutable `EditorSceneState`.
|
|
257
|
-
*
|
|
258
|
-
* History entries hold COMMANDS (state transforms + durable operations
|
|
259
|
-
* captured at construction), never snapshots. Rebasing the document via
|
|
260
|
-
* `reset()` therefore cannot stale the history: a later undo re-applies the
|
|
261
|
-
* inverse transform to whatever document is current. If the rebase removed an
|
|
262
|
-
* element a historical command targets, that transform throws (fail loud)
|
|
263
|
-
* rather than silently editing the wrong element.
|
|
264
|
-
*
|
|
265
|
-
* `setView` updates volatile view state (zoom/pan/selection/toggles) without
|
|
266
|
-
* touching history — view changes are never undo steps.
|
|
267
|
-
*/
|
|
268
|
-
|
|
269
|
-
/** Oldest entries are dropped past this bound; redo stack is cleared on execute. */
|
|
270
|
-
declare const SCENE_COMMAND_HISTORY_LIMIT = 200;
|
|
271
|
-
/**
|
|
272
|
-
* The base {@link SceneCommandStack} plus the two command-specific recovery
|
|
273
|
-
* primitives the undo/redo persistence path needs. `rollback` (on the base
|
|
274
|
-
* contract) undoes a failed COMMIT; these undo a failed UNDO/REDO persist.
|
|
275
|
-
* Defined here (not on the shared contract) so consumers that take the stack as
|
|
276
|
-
* `ReturnType<typeof createSceneCommandStack>` see them without a contract bump.
|
|
277
|
-
*/
|
|
278
|
-
interface SceneCommandStackWithReapply extends SceneCommandStack {
|
|
279
|
-
/**
|
|
280
|
-
* A persisted UNDO rejected: re-apply that command's FORWARD transform (move
|
|
281
|
-
* it redo→undo). Mirrors `rollback`'s command-specific contract — it acts on
|
|
282
|
-
* the captured command, not blindly on the redo-stack top, so an interleaved
|
|
283
|
-
* edit cannot make it re-apply the wrong command. No-op if the command is not
|
|
284
|
-
* the top of the redo stack (a newer edit reshaped history — the next
|
|
285
|
-
* `reset()` reconciles).
|
|
286
|
-
*/
|
|
287
|
-
reexecute(command: SceneCommand): void;
|
|
288
|
-
/**
|
|
289
|
-
* A persisted REDO rejected: re-apply that command's INVERSE transform (move
|
|
290
|
-
* it undo→redo). The redo-side mirror of `reexecute`. No-op unless the command
|
|
291
|
-
* is the top of the undo stack.
|
|
292
|
-
*/
|
|
293
|
-
reundo(command: SceneCommand): void;
|
|
294
|
-
}
|
|
295
|
-
/** Create a command stack for scene editing with reapply capabilities based on the given document and page ID */
|
|
296
|
-
declare function createSceneCommandStack(document: SceneDocument, activePageId: string): SceneCommandStackWithReapply;
|
|
297
|
-
|
|
298
|
-
export { type ApplySceneResult as A, type DesignCanvasProps as D, type ExportTriggerOptions as E, SCENE_COMMAND_HISTORY_LIMIT as S, type ZoomPanMath as Z, type DesignCanvasMode as a, type EditorSceneState as b, createSceneCommandStack as c, type SceneCommand as d, type SceneCommandStack as e, type SceneCommandStackWithReapply as f, type SnapEngine as g, type SnapResult as h, type SnapTarget as i, type SnapTargetKind as j, type SnapTargets as k };
|