@1agh/maude 2.0.8 → 2.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -1
- package/apps/hub/src/project-transactions/kernel.mjs +13 -7
- package/apps/studio/access/closure.ts +86 -10
- package/apps/studio/access/filters.ts +18 -1
- package/apps/studio/access/request.ts +8 -0
- package/apps/studio/acp/design-write-verb.ts +12 -2
- package/apps/studio/acp/env.ts +7 -2
- package/apps/studio/acp/index.ts +15 -4
- package/apps/studio/acp/login-state.ts +22 -5
- package/apps/studio/acp/may-scope.ts +38 -1
- package/apps/studio/acp/plugin-bootstrap.ts +13 -1
- package/apps/studio/acp/probe.ts +11 -4
- package/apps/studio/actions/agents.ts +110 -28
- package/apps/studio/actions/canvas-keys.ts +4 -2
- package/apps/studio/actions/ctx.ts +3 -0
- package/apps/studio/actions/defs/annotation.ts +84 -2
- package/apps/studio/actions/defs/app.ts +28 -1
- package/apps/studio/actions/defs/edit.ts +13 -0
- package/apps/studio/actions/defs/export.ts +12 -0
- package/apps/studio/actions/defs/sync.ts +18 -0
- package/apps/studio/actions/defs/video.ts +9 -0
- package/apps/studio/actions/documents.ts +6 -1
- package/apps/studio/actions/keymap.gen.ts +147 -9
- package/apps/studio/actions/menu.ts +5 -1
- package/apps/studio/actions/types.ts +4 -2
- package/apps/studio/actions/verbs.ts +9 -0
- package/apps/studio/actions.manifest.json +300 -45
- package/apps/studio/actions.parity.json +19 -1
- package/apps/studio/ai/save-hold.ts +2 -1
- package/apps/studio/ai/write-claim-scope.ts +7 -1
- package/apps/studio/ai/write-claim.ts +154 -3
- package/apps/studio/annotations/ai-read.ts +42 -6
- package/apps/studio/annotations/ai-write.ts +145 -2
- package/apps/studio/annotations/board-ops.ts +34 -3
- package/apps/studio/annotations/checklist-ops.ts +374 -0
- package/apps/studio/annotations/elements/checkitem.model.ts +129 -0
- package/apps/studio/annotations/elements/sticky.model.ts +54 -2
- package/apps/studio/annotations/ops.ts +30 -0
- package/apps/studio/annotations/registry.ts +9 -1
- package/apps/studio/annotations/templates.ts +4 -2
- package/apps/studio/annotations/text-steps.ts +114 -10
- package/apps/studio/annotations/ui/checklist-wire.ts +129 -0
- package/apps/studio/annotations/ui/checklist.tsx +429 -0
- package/apps/studio/annotations/ui/element-node.tsx +48 -2
- package/apps/studio/annotations/ui/template-place.ts +11 -1
- package/apps/studio/annotations/v1-adapter.ts +22 -3
- package/apps/studio/annotations-context-toolbar.tsx +12 -0
- package/apps/studio/annotations-layer.tsx +442 -49
- package/apps/studio/annotations-model.ts +4 -2
- package/apps/studio/api.ts +148 -21
- package/apps/studio/artboard-live-gate.tsx +54 -17
- package/apps/studio/artboard-still-persist.ts +166 -0
- package/apps/studio/artboard-still-raster.ts +6 -2
- package/apps/studio/artboard-still.ts +390 -20
- package/apps/studio/asset-added.ts +154 -0
- package/apps/studio/asset-details.ts +46 -3
- package/apps/studio/asset-origins.ts +5 -3
- package/apps/studio/asset-trash.ts +6 -1
- package/apps/studio/bin/_agent-browser-safe.mjs +3 -4
- package/apps/studio/bin/_annotate-post.mjs +14 -5
- package/apps/studio/bin/_audio-search.mjs +8 -2
- package/apps/studio/bin/_curl-local.mjs +7 -4
- package/apps/studio/bin/_desktop-locate.sh +145 -0
- package/apps/studio/bin/_ds-check-live.mjs +2 -1
- package/apps/studio/bin/_exports.mjs +38 -2
- package/apps/studio/bin/_history.mjs +79 -8
- package/apps/studio/bin/_import-asset.mjs +14 -9
- package/apps/studio/bin/_import-figma.mjs +510 -98
- package/apps/studio/bin/_index-cli.mjs +10 -21
- package/apps/studio/bin/_ingest-footage.mjs +24 -6
- package/apps/studio/bin/_media-probe.mjs +232 -0
- package/apps/studio/bin/_perf-probe-open.mjs +6 -0
- package/apps/studio/bin/_perf-probe-safari.mjs +6 -0
- package/apps/studio/bin/_perf-probe-studio.mjs +6 -1
- package/apps/studio/bin/_perf-probe.mjs +8 -3
- package/apps/studio/bin/_perf-sweep-shared.mjs +789 -0
- package/apps/studio/bin/_perf-sweep.mjs +240 -0
- package/apps/studio/bin/_record-shot.sh +33 -8
- package/apps/studio/bin/_screenshot-playwright.mjs +45 -2
- package/apps/studio/bin/_studio-verb.mjs +8 -3
- package/apps/studio/bin/_thumb-route.mjs +21 -0
- package/apps/studio/bin/_thumbs-playwright.mjs +83 -1
- package/apps/studio/bin/_transcribe.mjs +22 -6
- package/apps/studio/bin/_unsynced-refs.mjs +22 -0
- package/apps/studio/bin/_url-guard.mjs +120 -5
- package/apps/studio/bin/_url-guard.sh +29 -7
- package/apps/studio/bin/_video-limits.mjs +104 -0
- package/apps/studio/bin/_video-playwright.mjs +119 -19
- package/apps/studio/bin/_video-proxy.mjs +130 -0
- package/apps/studio/bin/_write-claim.mjs +38 -16
- package/apps/studio/bin/annotate.mjs +12 -2
- package/apps/studio/bin/canvas-rects.sh +19 -4
- package/apps/studio/bin/chat-open.sh +7 -1
- package/apps/studio/bin/draw-proof.sh +6 -2
- package/apps/studio/bin/generate.sh +32 -10
- package/apps/studio/bin/handoff.sh +2 -2
- package/apps/studio/bin/perf.sh +96 -15
- package/apps/studio/bin/photo-adjust.sh +6 -3
- package/apps/studio/bin/photo-bg-remove.sh +2 -2
- package/apps/studio/bin/prep.sh +21 -4
- package/apps/studio/bin/read-annotations.mjs +3 -0
- package/apps/studio/bin/runtime-health.sh +27 -1
- package/apps/studio/bin/screenshot.sh +152 -12
- package/apps/studio/bin/server-up.sh +64 -6
- package/apps/studio/bin/smoke.sh +43 -8
- package/apps/studio/bin/to-lottie.sh +3 -2
- package/apps/studio/bin/video-proxy.sh +27 -0
- package/apps/studio/bin/visual-sanity.sh +3 -1
- package/apps/studio/bridge/dgn-protocol.ts +157 -1
- package/apps/studio/bridge/mode-shows.ts +8 -6
- package/apps/studio/bridge/still-webp.ts +233 -0
- package/apps/studio/build.ts +18 -0
- package/apps/studio/canvas-build.ts +93 -11
- package/apps/studio/canvas-comment-mount.tsx +53 -8
- package/apps/studio/canvas-edit.ts +34 -1
- package/apps/studio/canvas-lib-module.ts +210 -0
- package/apps/studio/canvas-lib.tsx +3 -12
- package/apps/studio/canvas-pipeline.ts +111 -5
- package/apps/studio/canvas-shell.tsx +8 -11
- package/apps/studio/canvas-theme-pill.tsx +5 -3
- package/apps/studio/check/index.ts +12 -5
- package/apps/studio/check/video.ts +18 -2
- package/apps/studio/client/app.jsx +65 -7
- package/apps/studio/client/clipboard-relay.ts +193 -16
- package/apps/studio/client/comments-overlay.css +18 -0
- package/apps/studio/client/export-center.jsx +30 -0
- package/apps/studio/client/generate-dialog.jsx +49 -4
- package/apps/studio/client/github.js +7 -0
- package/apps/studio/client/home/HomeAccountsRow.jsx +221 -0
- package/apps/studio/client/home/HomeConnection.jsx +111 -0
- package/apps/studio/client/home/home-accounts-model.js +110 -1
- package/apps/studio/client/home/home-api.js +9 -2
- package/apps/studio/client/home/home-app.jsx +126 -13
- package/apps/studio/client/home/home-model.js +69 -1
- package/apps/studio/client/home/home-where-model.js +105 -0
- package/apps/studio/client/home/home.css +239 -1
- package/apps/studio/client/hooks/use-canvas-bridge.jsx +173 -98
- package/apps/studio/client/hooks/use-palette-and-panels.jsx +5 -1
- package/apps/studio/client/hooks/use-tabs.jsx +11 -4
- package/apps/studio/client/panels/DiffView.jsx +7 -1
- package/apps/studio/client/panels/TeamProjects.jsx +137 -134
- package/apps/studio/client/panels/chat-context.js +2 -0
- package/apps/studio/client/panels/slash-commands.gen.js +13 -13
- package/apps/studio/client/selection-scope.js +16 -9
- package/apps/studio/client/share-link.js +12 -0
- package/apps/studio/client/shell/viewport.jsx +11 -1
- package/apps/studio/client/shell-events.js +8 -0
- package/apps/studio/client/styles/3-kit-maude-v2.css +16 -0
- package/apps/studio/client/styles/_index.css +4 -0
- package/apps/studio/client/v2/ai/Feed.jsx +1 -1
- package/apps/studio/client/v2/ai/OfferCard.jsx +34 -0
- package/apps/studio/client/v2/ai/activity-line.js +54 -1
- package/apps/studio/client/v2/ai/ai-offer.js +21 -1
- package/apps/studio/client/v2/ai/run-model.js +3 -1
- package/apps/studio/client/v2/annotations/vote-store.js +28 -4
- package/apps/studio/client/v2/assets/asset-drop-session.js +37 -2
- package/apps/studio/client/v2/assets/canvas-drop-catcher.jsx +7 -5
- package/apps/studio/client/v2/assets/details-model.js +1 -1
- package/apps/studio/client/v2/assets/details.jsx +5 -0
- package/apps/studio/client/v2/assets/tile-drag.js +11 -7
- package/apps/studio/client/v2/comments/comments-panel.jsx +22 -3
- package/apps/studio/client/v2/create/duplicate-done.js +6 -2
- package/apps/studio/client/v2/diagnostics/diagnostics-host.jsx +1 -0
- package/apps/studio/client/v2/diagnostics/diagnostics-model.js +32 -2
- package/apps/studio/client/v2/diagnostics/diagnostics-sheet.jsx +35 -8
- package/apps/studio/client/v2/diagnostics/diagnostics.css +34 -0
- package/apps/studio/client/v2/diagnostics/sync-details/sync-details-model.js +113 -3
- package/apps/studio/client/v2/diagnostics/sync-details/sync-details.jsx +343 -6
- package/apps/studio/client/v2/diagnostics/sync-details/unsynced-refs.js +55 -0
- package/apps/studio/client/v2/ds/review.css +1 -1
- package/apps/studio/client/v2/export/exports-model.js +7 -0
- package/apps/studio/client/v2/export/exports-panel.jsx +1 -0
- package/apps/studio/client/v2/export/job-row.jsx +32 -2
- package/apps/studio/client/v2/handoff/ready-card.jsx +1 -1
- package/apps/studio/client/v2/history/compare-view.jsx +1 -0
- package/apps/studio/client/v2/inspector/css-write.js +6 -1
- package/apps/studio/client/v2/inspector/frame.jsx +28 -4
- package/apps/studio/client/v2/inspector/kinds/clip-model.js +51 -0
- package/apps/studio/client/v2/inspector/kinds/clip.jsx +75 -2
- package/apps/studio/client/v2/inspector/model.js +21 -0
- package/apps/studio/client/v2/inspector/sections/fill.jsx +12 -3
- package/apps/studio/client/v2/inspector/sections/recent-colours.js +8 -5
- package/apps/studio/client/v2/inspector/view-mode.jsx +11 -1
- package/apps/studio/client/v2/link-server/LinkServerDialog.jsx +492 -0
- package/apps/studio/client/v2/link-server/LinkServerHost.jsx +42 -0
- package/apps/studio/client/v2/link-server/link-server-api.js +142 -0
- package/apps/studio/client/v2/link-server/link-server-model.js +438 -0
- package/apps/studio/client/v2/link-server/link-server.css +109 -0
- package/apps/studio/client/v2/onboarding/AdvancedSheets.jsx +31 -86
- package/apps/studio/client/v2/onboarding/onboarding-model.js +1 -18
- package/apps/studio/client/v2/preview/link-follow.js +4 -2
- package/apps/studio/client/v2/preview/preview-chrome-host.jsx +16 -6
- package/apps/studio/client/v2/search/help-model.js +2 -0
- package/apps/studio/client/v2/search/search-keywords.js +3 -2
- package/apps/studio/client/v2/settings/account.jsx +4 -2
- package/apps/studio/client/v2/settings/advanced-section.jsx +344 -137
- package/apps/studio/client/v2/settings/connection-row.jsx +3 -59
- package/apps/studio/client/v2/settings/connections-section.jsx +118 -425
- package/apps/studio/client/v2/settings/general-section.jsx +155 -24
- package/apps/studio/client/v2/settings/project-sync-settings.jsx +4 -3
- package/apps/studio/client/v2/settings/reset-section.jsx +14 -3
- package/apps/studio/client/v2/settings/settings-card.jsx +142 -0
- package/apps/studio/client/v2/settings/settings-cards.js +220 -0
- package/apps/studio/client/v2/settings/settings-handlers.js +7 -6
- package/apps/studio/client/v2/settings/settings-model.js +100 -31
- package/apps/studio/client/v2/settings/settings-sheet.jsx +25 -6
- package/apps/studio/client/v2/settings/settings.css +374 -64
- package/apps/studio/client/v2/settings/this-project-card.jsx +730 -0
- package/apps/studio/client/v2/settings/this-project-model.js +172 -0
- package/apps/studio/client/v2/settings/use-connections.js +3 -2
- package/apps/studio/client/v2/settings/use-open-card.js +37 -0
- package/apps/studio/client/v2/share/share-sheet.jsx +28 -11
- package/apps/studio/client/v2/shell/api-session-boot.js +6 -0
- package/apps/studio/client/v2/shell/api-session.js +126 -0
- package/apps/studio/client/v2/shell/connection-state.js +197 -0
- package/apps/studio/client/v2/shell/floating-panels.css +31 -1
- package/apps/studio/client/v2/shell/image-pick.js +61 -8
- package/apps/studio/client/v2/shell/menu-aim.js +43 -0
- package/apps/studio/client/v2/shell/menu-runner.js +25 -7
- package/apps/studio/client/v2/shell/occlusion-insets.js +18 -1
- package/apps/studio/client/v2/shell/project-account-bus.js +36 -0
- package/apps/studio/client/v2/shell/project-account-card.jsx +357 -148
- package/apps/studio/client/v2/shell/project-account-model.js +272 -149
- package/apps/studio/client/v2/shell/project-account-toast.js +66 -0
- package/apps/studio/client/v2/shell/project-account.css +237 -0
- package/apps/studio/client/v2/shell/project-pill.jsx +52 -6
- package/apps/studio/client/v2/shell/share-cluster-host.jsx +166 -83
- package/apps/studio/client/v2/shell/shell-parity.js +3 -2
- package/apps/studio/client/v2/shell/shell-parity.json +71 -36
- package/apps/studio/client/v2/shell/still-bridge.js +194 -0
- package/apps/studio/client/v2/shell/still-store.js +319 -0
- package/apps/studio/client/v2/shell/use-account.js +2 -0
- package/apps/studio/client/v2/shell/use-tool-panels.js +2 -1
- package/apps/studio/client/v2/signin/use-signin.js +1 -1
- package/apps/studio/client/v2/timeline/Timeline.jsx +15 -0
- package/apps/studio/client/v2/timeline/frame-handle-model.js +142 -0
- package/apps/studio/client/v2/timeline/frame-handle.jsx +151 -0
- package/apps/studio/clip-ops.ts +126 -8
- package/apps/studio/cloud/endpoints.ts +29 -4
- package/apps/studio/collab/ai-activity.ts +10 -8
- package/apps/studio/collab/awareness-bridge.ts +34 -9
- package/apps/studio/collab/index.ts +3 -0
- package/apps/studio/collab/registry.ts +41 -10
- package/apps/studio/comment-reattach.ts +149 -0
- package/apps/studio/comments/mine-stamp.ts +15 -7
- package/apps/studio/comments/ops.ts +52 -8
- package/apps/studio/comments-overlay.tsx +146 -9
- package/apps/studio/dist/client.bundle.js +892 -885
- package/apps/studio/dist/comment-mount.js +2 -2
- package/apps/studio/dist/styles.css +1 -1
- package/apps/studio/dom-selection.ts +87 -18
- package/apps/studio/ds/board/directions.css +8 -0
- package/apps/studio/ds/board/outline.tsx +16 -0
- package/apps/studio/ds/canvas-check.ts +6 -0
- package/apps/studio/edit-ops/clip/reframe.ts +19 -3
- package/apps/studio/edit-ops/clip-carry.ts +602 -0
- package/apps/studio/edit-ops/clipboard.ts +318 -23
- package/apps/studio/edit-ops/dispatch.ts +20 -2
- package/apps/studio/edit-ops/scope-names.ts +249 -40
- package/apps/studio/edit-ops/slot-defaults.ts +3 -0
- package/apps/studio/edit-ops/types.ts +6 -0
- package/apps/studio/editing/align-bar.tsx +33 -9
- package/apps/studio/editing/artboard-actions.ts +5 -0
- package/apps/studio/editing/artboard-menu.tsx +6 -2
- package/apps/studio/editing/click-to-type.ts +1 -1
- package/apps/studio/editing/clip-words.ts +48 -0
- package/apps/studio/editing/clipboard.ts +21 -6
- package/apps/studio/editing/declared-background.ts +25 -0
- package/apps/studio/editing/index.tsx +3 -0
- package/apps/studio/editing/object-keys.ts +4 -4
- package/apps/studio/editing/object-menu.tsx +13 -3
- package/apps/studio/editing/pen/points.tsx +61 -0
- package/apps/studio/editing/text-in-place.tsx +11 -0
- package/apps/studio/editing/video-frame-handle.tsx +425 -0
- package/apps/studio/exporters/capture-prepass.ts +374 -0
- package/apps/studio/exporters/degraded.ts +148 -0
- package/apps/studio/exporters/hub-render-door.ts +28 -2
- package/apps/studio/exporters/index.ts +3 -1
- package/apps/studio/exporters/job-budget.ts +93 -0
- package/apps/studio/exporters/jobs.ts +215 -28
- package/apps/studio/exporters/parity-check.ts +254 -0
- package/apps/studio/exporters/remote.ts +209 -15
- package/apps/studio/exporters/svg-inline.ts +87 -0
- package/apps/studio/exporters/video-render-lib.ts +88 -26
- package/apps/studio/exporters/video.ts +29 -6
- package/apps/studio/figma/assets.ts +58 -43
- package/apps/studio/figma/codegen-fonts.ts +100 -0
- package/apps/studio/figma/fig-decode.ts +390 -25
- package/apps/studio/figma/fig-kiwi.ts +18 -4
- package/apps/studio/figma/fig-vector.ts +59 -3
- package/apps/studio/figma/sanitize.ts +2 -0
- package/apps/studio/figma/style-map.ts +293 -48
- package/apps/studio/figma/to-artboard.ts +455 -69
- package/apps/studio/figma/to-strokes.ts +44 -11
- package/apps/studio/figma/types.ts +13 -0
- package/apps/studio/footage/schema.ts +3 -3
- package/apps/studio/generation/adapters/elevenlabs.ts +7 -1
- package/apps/studio/generation/adapters/groq.ts +8 -1
- package/apps/studio/generation/spend.ts +312 -0
- package/apps/studio/generation/types.ts +12 -0
- package/apps/studio/handoff/run.ts +1 -1
- package/apps/studio/handoff/targets.ts +2 -2
- package/apps/studio/handoff/write-scopes.ts +1 -1
- package/apps/studio/history/describe-annotations.ts +4 -0
- package/apps/studio/home/accounts.ts +30 -11
- package/apps/studio/home/cloud.ts +6 -1
- package/apps/studio/home/create-local.ts +32 -3
- package/apps/studio/home/hub-health.ts +76 -0
- package/apps/studio/home/routes.ts +15 -4
- package/apps/studio/http.ts +438 -86
- package/apps/studio/imported-module-ids.ts +91 -0
- package/apps/studio/inspect.ts +2 -0
- package/apps/studio/migrate/hub.ts +8 -1
- package/apps/studio/notifications.tsx +47 -5
- package/apps/studio/paths.ts +10 -1
- package/apps/studio/port.ts +3 -2
- package/apps/studio/preview/preview-camera.tsx +15 -382
- package/apps/studio/readiness.ts +10 -1
- package/apps/studio/release-build.ts +51 -0
- package/apps/studio/routes/agent.ts +188 -9
- package/apps/studio/routes/ai.ts +43 -11
- package/apps/studio/routes/annotations.ts +27 -1
- package/apps/studio/routes/assets.ts +18 -1
- package/apps/studio/routes/canvas-origin.ts +12 -9
- package/apps/studio/routes/cloud-move.ts +15 -0
- package/apps/studio/routes/edit.ts +3 -0
- package/apps/studio/routes/export.ts +51 -0
- package/apps/studio/routes/generate.ts +42 -12
- package/apps/studio/routes/hub-link-folder.ts +334 -0
- package/apps/studio/routes/hub-signin.ts +78 -1
- package/apps/studio/routes/index.ts +9 -1
- package/apps/studio/routes/shell.ts +217 -5
- package/apps/studio/routes/sync.ts +136 -8
- package/apps/studio/routes/votes.ts +2 -1
- package/apps/studio/schema/annotations.v2.schema.json +143 -1
- package/apps/studio/schema/beats.v1.schema.json +1 -1
- package/apps/studio/schema/edl.v1.schema.json +1 -1
- package/apps/studio/schema/formats.ts +3 -3
- package/apps/studio/schema/transcript.v1.schema.json +1 -1
- package/apps/studio/server.ts +142 -43
- package/apps/studio/shell/api-key.ts +503 -0
- package/apps/studio/shell/attest.ts +59 -0
- package/apps/studio/shell/capture-url.ts +20 -0
- package/apps/studio/shell/cli-yield.ts +276 -0
- package/apps/studio/shell/clip-transfer.ts +302 -0
- package/apps/studio/shell/key-file.ts +108 -0
- package/apps/studio/shell/server-json.ts +75 -0
- package/apps/studio/shell/worktree.ts +19 -0
- package/apps/studio/spoof-chars.ts +9 -0
- package/apps/studio/studio-page-host.ts +1 -1
- package/apps/studio/sync/accepted-cold-start.ts +144 -8
- package/apps/studio/sync/accepted-link.ts +76 -29
- package/apps/studio/sync/action-stage.ts +575 -44
- package/apps/studio/sync/adopt-held.ts +85 -0
- package/apps/studio/sync/ctl-heal.ts +58 -0
- package/apps/studio/sync/file-ledger.ts +38 -4
- package/apps/studio/sync/file-membership.ts +16 -1
- package/apps/studio/sync/file-plane.ts +289 -22
- package/apps/studio/sync/held-deletes.ts +86 -5
- package/apps/studio/sync/hub-link.ts +8 -0
- package/apps/studio/sync/index.ts +196 -12
- package/apps/studio/sync/journal-client.ts +50 -4
- package/apps/studio/sync/link-consent.ts +22 -75
- package/apps/studio/sync/link-survey.ts +252 -0
- package/apps/studio/sync/local-kernel.ts +296 -8
- package/apps/studio/sync/projection.ts +22 -3
- package/apps/studio/sync/seed-progress.ts +12 -0
- package/apps/studio/sync/source-recovery.ts +59 -3
- package/apps/studio/sync/status.ts +19 -2
- package/apps/studio/sync/unsynced-refs.ts +397 -0
- package/apps/studio/sync/writer-registry.ts +20 -0
- package/apps/studio/thumbs/service.ts +4 -1
- package/apps/studio/tool-palette.tsx +23 -0
- package/apps/studio/ui-prefs.ts +40 -0
- package/apps/studio/use-agent-presence.tsx +2 -2
- package/apps/studio/use-canvas-keys.ts +6 -1
- package/apps/studio/video/format-ids.ts +2 -2
- package/apps/studio/video/inject.ts +31 -0
- package/apps/studio/video/media-risk.ts +58 -0
- package/apps/studio/video/object-fit.ts +137 -0
- package/apps/studio/video/provider-transcript.ts +141 -0
- package/apps/studio/whats-new.json +137 -0
- package/apps/studio/workspace-mode.ts +1 -0
- package/apps/studio/ws.ts +5 -0
- package/cli/commands/design.mjs +119 -8
- package/cli/lib/bash-guard.mjs +366 -6
- package/cli/lib/confine-read.mjs +1 -0
- package/cli/lib/design-help.gen.mjs +3 -2
- package/cli/lib/design-hook.mjs +387 -81
- package/cli/lib/design-link.mjs +16 -1
- package/cli/lib/design-open.mjs +49 -3
- package/cli/lib/desktop-locate.mjs +770 -0
- package/cli/lib/handoff.mjs +1 -1
- package/cli/lib/hook-state.mjs +291 -0
- package/cli/lib/pkg-root.mjs +65 -13
- package/cli/lib/studio-locate.mjs +59 -16
- package/package.json +15 -8
- package/plugins/design/templates/_shell.html +13 -0
- package/apps/studio/client/v2/onboarding/HubSheet.jsx +0 -212
- package/apps/studio/client/v2/shell/account-card-model.js +0 -114
- package/apps/studio/client/v2/shell/account-card.jsx +0 -189
|
@@ -80,6 +80,30 @@ export function textRevertCollides(
|
|
|
80
80
|
return false;
|
|
81
81
|
}
|
|
82
82
|
|
|
83
|
+
/**
|
|
84
|
+
* T5.2 (#165) — the kernel's half: would the annotations lane merge `base → ours` onto `theirs` drop
|
|
85
|
+
* somebody's text? Per text slot `base` and `theirs` both hold: ours ('' when ours removes the element —
|
|
86
|
+
* the text goes with it) against theirs, 3-way, the merge the board runs. Overlapping hunks → true. The
|
|
87
|
+
* hub kernel runs it while it rebases an undo through later work (project-transactions/kernel.mjs
|
|
88
|
+
* `revertLane`), so an undo from a desktop that does not ask first is refused the same way.
|
|
89
|
+
*/
|
|
90
|
+
export function textSlotsCollide(
|
|
91
|
+
base: string | null | undefined,
|
|
92
|
+
ours: string | null | undefined,
|
|
93
|
+
theirs: string | null | undefined
|
|
94
|
+
): boolean {
|
|
95
|
+
const b = boardTextSlots(base);
|
|
96
|
+
if (!b.size) return false;
|
|
97
|
+
const o = boardTextSlots(ours);
|
|
98
|
+
const t = boardTextSlots(theirs);
|
|
99
|
+
for (const [id, was] of b) {
|
|
100
|
+
const now = t.get(id);
|
|
101
|
+
if (now === undefined) continue;
|
|
102
|
+
if (textMergeCollides(was, o.get(id) ?? '', now) === true) return true;
|
|
103
|
+
}
|
|
104
|
+
return false;
|
|
105
|
+
}
|
|
106
|
+
|
|
83
107
|
/**
|
|
84
108
|
* p8-fix-d F12 — the same question for several steps undone as ONE action (Undo history, Undo this
|
|
85
109
|
* chat, an action with several effects on one board). `steps` newest first; each is reverted onto
|
|
@@ -204,18 +228,35 @@ export function createTextStepLedger(max = MAX_TEXT_STEPS, maxBytes = MAX_TEXT_S
|
|
|
204
228
|
total -= had.bytes;
|
|
205
229
|
steps.delete(actionId);
|
|
206
230
|
};
|
|
231
|
+
const keep = (actionId: string, step: TextStep): boolean => {
|
|
232
|
+
if (!step.slots.size && !step.contested.length) return false;
|
|
233
|
+
drop(actionId);
|
|
234
|
+
const bytes = stepBytes(step);
|
|
235
|
+
steps.set(actionId, { step, bytes });
|
|
236
|
+
total += bytes;
|
|
237
|
+
while (steps.size > 1 && (steps.size > max || total > maxBytes)) {
|
|
238
|
+
const oldest = steps.keys().next().value;
|
|
239
|
+
if (oldest === undefined) break;
|
|
240
|
+
drop(oldest);
|
|
241
|
+
}
|
|
242
|
+
return true;
|
|
243
|
+
};
|
|
244
|
+
let onNote: ((actionId: string, step: TextStep) => void) | null = null;
|
|
207
245
|
return {
|
|
208
246
|
note(actionId: string, step: TextStep): void {
|
|
209
|
-
if (
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
247
|
+
if (keep(actionId, step)) onNote?.(actionId, step);
|
|
248
|
+
},
|
|
249
|
+
/** T5.2 — a step read back from the log: kept under the same caps, not written again. */
|
|
250
|
+
restore(actionId: string, step: TextStep): void {
|
|
251
|
+
keep(actionId, step);
|
|
252
|
+
},
|
|
253
|
+
/** T5.2 — called with every step `note` keeps (the home appends it to its log). */
|
|
254
|
+
onNote(fn: ((actionId: string, step: TextStep) => void) | null): void {
|
|
255
|
+
onNote = fn;
|
|
256
|
+
},
|
|
257
|
+
/** The kept steps, oldest first (what a compacted log holds). */
|
|
258
|
+
entries(): Array<[string, TextStep]> {
|
|
259
|
+
return [...steps].map(([id, v]) => [id, v.step]);
|
|
219
260
|
},
|
|
220
261
|
get(actionId: string): TextStep | undefined {
|
|
221
262
|
return steps.get(actionId)?.step;
|
|
@@ -251,3 +292,66 @@ export function createTextStepLedger(max = MAX_TEXT_STEPS, maxBytes = MAX_TEXT_S
|
|
|
251
292
|
},
|
|
252
293
|
};
|
|
253
294
|
}
|
|
295
|
+
|
|
296
|
+
/* ------------------------------------------------------- T5.2 — the ledger's log */
|
|
297
|
+
|
|
298
|
+
/**
|
|
299
|
+
* T5.2 (#165) — the ledger outlives a restart, as the op log it guards does. The home appends one line per
|
|
300
|
+
* kept step to `_state/text-steps.ndjson` (runtime state — `_state/` is ignored, DDR-115) after a header
|
|
301
|
+
* naming the store's project id, and on open reads it back (`restore`, same caps) and rewrites it compacted.
|
|
302
|
+
* A log for another store (moved aside, another machine's copy) is not read. Bounded: a file past
|
|
303
|
+
* `MAX_TEXT_STEP_LOG_BYTES` is dropped whole; a line that is not a step is skipped.
|
|
304
|
+
*/
|
|
305
|
+
export const TEXT_STEP_LOG = 'text-steps.ndjson';
|
|
306
|
+
export const MAX_TEXT_STEP_LOG_BYTES = 2 * MAX_TEXT_STEP_BYTES;
|
|
307
|
+
|
|
308
|
+
const ACTION_ID = /^[A-Za-z0-9:_.-]{1,128}$/;
|
|
309
|
+
|
|
310
|
+
export function textStepLogHeader(project: string): string {
|
|
311
|
+
return JSON.stringify({ v: 1, project });
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
export function encodeTextStepLine(actionId: string, step: TextStep): string {
|
|
315
|
+
return JSON.stringify({ a: actionId, s: step.slug, t: [...step.slots], c: step.contested });
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
function decodeLine(line: string): [string, TextStep] | null {
|
|
319
|
+
let o: unknown;
|
|
320
|
+
try {
|
|
321
|
+
o = JSON.parse(line);
|
|
322
|
+
} catch {
|
|
323
|
+
return null;
|
|
324
|
+
}
|
|
325
|
+
if (!o || typeof o !== 'object') return null;
|
|
326
|
+
const { a, s, t, c } = o as { a?: unknown; s?: unknown; t?: unknown; c?: unknown };
|
|
327
|
+
if (typeof a !== 'string' || !ACTION_ID.test(a) || typeof s !== 'string' || !s) return null;
|
|
328
|
+
if (!Array.isArray(t) || !Array.isArray(c)) return null;
|
|
329
|
+
const slots = new Map<string, string | null>();
|
|
330
|
+
for (const pair of t) {
|
|
331
|
+
if (!Array.isArray(pair) || pair.length !== 2 || typeof pair[0] !== 'string') return null;
|
|
332
|
+
if (pair[1] !== null && typeof pair[1] !== 'string') return null;
|
|
333
|
+
slots.set(pair[0], pair[1]);
|
|
334
|
+
}
|
|
335
|
+
if (!c.every((x) => typeof x === 'string')) return null;
|
|
336
|
+
return [a, { slug: s, slots, contested: c as string[] }];
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
/** The steps a log holds for `project`, oldest first ([] for another store's log). */
|
|
340
|
+
export function decodeTextStepLog(text: string, project: string): Array<[string, TextStep]> {
|
|
341
|
+
if (!project || text.length > MAX_TEXT_STEP_LOG_BYTES) return [];
|
|
342
|
+
const lines = text.split('\n');
|
|
343
|
+
let head: { v?: unknown; project?: unknown } | null = null;
|
|
344
|
+
try {
|
|
345
|
+
head = JSON.parse(lines[0] ?? '');
|
|
346
|
+
} catch {
|
|
347
|
+
return [];
|
|
348
|
+
}
|
|
349
|
+
if (head?.v !== 1 || head.project !== project) return [];
|
|
350
|
+
const out: Array<[string, TextStep]> = [];
|
|
351
|
+
for (const line of lines.slice(1)) {
|
|
352
|
+
if (!line) continue;
|
|
353
|
+
const step = decodeLine(line);
|
|
354
|
+
if (step) out.push(step);
|
|
355
|
+
}
|
|
356
|
+
return out;
|
|
357
|
+
}
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file annotations/ui/checklist-wire.ts — the layer's checklist seams (#113 slice B, contract 113-checklist)
|
|
3
|
+
* @scope apps/studio/annotations/ui/checklist-wire.ts
|
|
4
|
+
* @purpose What `annotations-layer.tsx` asks before a checklist batch reaches the board, kept pure so it is
|
|
5
|
+
* tested without the 6 k-line layer:
|
|
6
|
+
* - `checklistCommitOps` — the lock net (`guardLockedLists`: a locked list still ticks, nothing
|
|
7
|
+
* else) and the sticky's growth (`fitSticky(cur, text, items)`) in the SAME batch, so a gesture
|
|
8
|
+
* stays one ⌘Z;
|
|
9
|
+
* - `itemsForCopy` / `splitPasteItems` / `itemPutsFor` — entries travel with a copied, pasted or
|
|
10
|
+
* duplicated sticky (fresh ids, `list` remapped — `cloneItems`); a stray entry is dropped;
|
|
11
|
+
* - `isChecklistTarget` — a press or key inside an interactive checklist is the checklist's.
|
|
12
|
+
* The stroke view never carries entries (they have no geometry): every entry write goes as ops.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { cloneItems, guardLockedLists } from '../checklist-ops.ts';
|
|
16
|
+
import { DEFAULT_FONT_SIZE } from '../constants.ts';
|
|
17
|
+
import { itemsOf } from '../elements/checkitem.model.ts';
|
|
18
|
+
import { fitSticky } from '../elements/sticky.model.ts';
|
|
19
|
+
import { isLocked } from '../lock.ts';
|
|
20
|
+
import { applyOps, type Op } from '../ops.ts';
|
|
21
|
+
import type { AnnotationElement } from '../types.ts';
|
|
22
|
+
|
|
23
|
+
type Board = ReadonlyMap<string, AnnotationElement>;
|
|
24
|
+
|
|
25
|
+
/** The list (sticky id) an op touches through an entry, or a sticky whose title it re-words. */
|
|
26
|
+
function listsTouched(board: Board, ops: readonly Op[]): Set<string> {
|
|
27
|
+
const out = new Set<string>();
|
|
28
|
+
for (const o of ops) {
|
|
29
|
+
if (o.op === 'put') {
|
|
30
|
+
if (o.el.type === 'checkitem' && typeof o.el.list === 'string') out.add(o.el.list);
|
|
31
|
+
continue;
|
|
32
|
+
}
|
|
33
|
+
const cur = board.get(o.id);
|
|
34
|
+
if (cur?.type === 'checkitem' && typeof cur.list === 'string') out.add(cur.list);
|
|
35
|
+
else if (cur?.type === 'sticky' && o.op === 'patch' && o.set && 'text' in o.set) out.add(o.id);
|
|
36
|
+
}
|
|
37
|
+
return out;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
const num = (v: unknown, def: number) => (typeof v === 'number' && Number.isFinite(v) ? v : def);
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* The sticky patches that make room for its entries after `ops` (grows only; a locked sticky keeps its
|
|
44
|
+
* size — the lock guards resize). Empty when nothing needs to grow.
|
|
45
|
+
*/
|
|
46
|
+
export function fitPatches(board: Board, ops: readonly Op[]): Op[] {
|
|
47
|
+
const lists = listsTouched(board, ops);
|
|
48
|
+
if (!lists.size) return [];
|
|
49
|
+
const after = applyOps(board, ops).state;
|
|
50
|
+
const out: Op[] = [];
|
|
51
|
+
for (const id of lists) {
|
|
52
|
+
const s = after.get(id);
|
|
53
|
+
if (s?.type !== 'sticky' || isLocked(s)) continue;
|
|
54
|
+
const items = itemsOf(after.values(), id);
|
|
55
|
+
if (!items.length) continue;
|
|
56
|
+
const cur = {
|
|
57
|
+
w: num(s.w, 200),
|
|
58
|
+
h: num(s.h, 200),
|
|
59
|
+
fontSize: num(s.fontSize, DEFAULT_FONT_SIZE),
|
|
60
|
+
};
|
|
61
|
+
const rows = items.map((i) => ({ text: i.text }));
|
|
62
|
+
const fit = fitSticky(cur, typeof s.text === 'string' ? s.text : '', rows);
|
|
63
|
+
const set: Record<string, unknown> = {};
|
|
64
|
+
if (fit.h > Math.abs(cur.h)) set.h = fit.h;
|
|
65
|
+
if (fit.w > Math.abs(cur.w)) set.w = fit.w;
|
|
66
|
+
if (fit.fontSize !== cur.fontSize) set.fontSize = fit.fontSize;
|
|
67
|
+
if (Object.keys(set).length) out.push({ op: 'patch', id, set });
|
|
68
|
+
}
|
|
69
|
+
return out;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* A checklist gesture's batch as it is committed: entry ops of a LOCKED list are dropped (ticks pass), and the
|
|
74
|
+
* sticky grows to fit its entries in the same batch (one action, one ⌘Z).
|
|
75
|
+
*/
|
|
76
|
+
export function checklistCommitOps(board: Board, ops: readonly Op[]): Op[] {
|
|
77
|
+
const blocked = new Set(guardLockedLists(board, ops).ids);
|
|
78
|
+
const kept = blocked.size
|
|
79
|
+
? ops.filter((o) => !blocked.has(o.op === 'put' ? o.el.id : o.id))
|
|
80
|
+
: [...ops];
|
|
81
|
+
if (!kept.length) return [];
|
|
82
|
+
return [...kept, ...fitPatches(board, kept)];
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/** The entries of the copied stickies (the `{"maudeElements":2}` payload carries them after the cards). */
|
|
86
|
+
export function itemsForCopy(board: Board, ids: Iterable<string>): AnnotationElement[] {
|
|
87
|
+
const out: AnnotationElement[] = [];
|
|
88
|
+
for (const id of ids) {
|
|
89
|
+
if (board.get(id)?.type !== 'sticky') continue;
|
|
90
|
+
for (const item of itemsOf(board.values(), id)) {
|
|
91
|
+
const { locked: _l, groups: _g, ...rest } = item;
|
|
92
|
+
out.push(rest as AnnotationElement);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
return out;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/** A pasted payload's entries apart from its drawable records (entries have no stroke form). */
|
|
99
|
+
export function splitPasteItems(elements: readonly AnnotationElement[]): {
|
|
100
|
+
drawn: AnnotationElement[];
|
|
101
|
+
items: AnnotationElement[];
|
|
102
|
+
} {
|
|
103
|
+
const drawn: AnnotationElement[] = [];
|
|
104
|
+
const items: AnnotationElement[] = [];
|
|
105
|
+
for (const e of elements) (e.type === 'checkitem' ? items : drawn).push(e);
|
|
106
|
+
return { drawn, items };
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* Puts for copies of the entries of every list in `idMap` (old sticky id → its copy). `source` must hold
|
|
111
|
+
* the old stickies and their entries (the board for a duplicate, the payload for a paste). An entry whose
|
|
112
|
+
* list is not copied is dropped.
|
|
113
|
+
*/
|
|
114
|
+
export function itemPutsFor(
|
|
115
|
+
source: Iterable<AnnotationElement>,
|
|
116
|
+
idMap: ReadonlyMap<string, string>,
|
|
117
|
+
mint?: () => string
|
|
118
|
+
): Op[] {
|
|
119
|
+
return cloneItems(source, idMap, mint).map((el) => ({ op: 'put', el }) as Op);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/** The interactive checklist (rows, entry fields, "+ Add an item") marks its root with this attribute. */
|
|
123
|
+
export const CHECKLIST_ATTR = 'data-an-checklist';
|
|
124
|
+
|
|
125
|
+
/** Does this event target sit in an interactive checklist (its keys and presses are the checklist's)? */
|
|
126
|
+
export function isChecklistTarget(t: EventTarget | null): boolean {
|
|
127
|
+
const el = t as Element | null;
|
|
128
|
+
return !!(el && typeof el.closest === 'function' && el.closest(`[${CHECKLIST_ATTR}]`));
|
|
129
|
+
}
|