@1agh/maude 2.0.6 → 2.0.8
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/apps/studio/access/closure.ts +156 -16
- package/apps/studio/access/filters.ts +27 -0
- package/apps/studio/actions/agents.ts +54 -0
- package/apps/studio/actions/ctx.ts +3 -0
- package/apps/studio/actions/defs/sync.ts +13 -0
- package/apps/studio/actions/defs/view.ts +59 -3
- package/apps/studio/actions/keymap.gen.ts +35 -0
- package/apps/studio/actions/menu.ts +2 -0
- package/apps/studio/actions/types.ts +3 -1
- package/apps/studio/actions.manifest.json +136 -1
- package/apps/studio/actions.parity.json +25 -1
- package/apps/studio/annotations/ui/ai-seen.tsx +4 -3
- package/apps/studio/annotations/ui/ride.ts +2 -1
- package/apps/studio/annotations-context-toolbar.tsx +5 -4
- package/apps/studio/annotations-layer.tsx +4 -3
- package/apps/studio/api.ts +383 -128
- package/apps/studio/artboard-activity-overlay.tsx +4 -4
- package/apps/studio/artboard-ai-copies.tsx +4 -4
- package/apps/studio/artboard-freeze.ts +108 -0
- package/apps/studio/artboard-live-gate.tsx +414 -45
- package/apps/studio/artboard-live.ts +526 -31
- package/apps/studio/artboard-placeholder.ts +197 -0
- package/apps/studio/artboard-still-raster.ts +485 -0
- package/apps/studio/artboard-still-warmup.ts +221 -0
- package/apps/studio/artboard-still.ts +1188 -0
- package/apps/studio/artboard-webgl.ts +2 -1
- package/apps/studio/asset-placeholder.tsx +237 -132
- package/apps/studio/asset-upload-bars.tsx +4 -4
- package/apps/studio/bin/_perf-probe-open.mjs +364 -0
- package/apps/studio/bin/_perf-shared.mjs +12 -7
- package/apps/studio/bin/_pw-launch.mjs +26 -1
- package/apps/studio/bin/perf.sh +19 -0
- package/apps/studio/bridge/dgn-protocol.ts +35 -0
- package/apps/studio/canvas-build-sandbox.ts +69 -13
- package/apps/studio/canvas-camera.ts +90 -0
- package/apps/studio/canvas-comment-mount.tsx +9 -9
- package/apps/studio/canvas-lib.tsx +160 -34
- package/apps/studio/canvas-pages-view.tsx +465 -0
- package/apps/studio/canvas-pages.ts +305 -0
- package/apps/studio/canvas-rows.ts +62 -0
- package/apps/studio/canvas-shell.tsx +62 -16
- package/apps/studio/canvas-theme-icons.tsx +41 -0
- package/apps/studio/canvas-theme-pill.tsx +15 -6
- package/apps/studio/canvas-theme.ts +12 -11
- package/apps/studio/client/app.jsx +7 -0
- package/apps/studio/client/canvas-url.js +23 -1
- package/apps/studio/client/hooks/canvas-origin-probe.js +34 -0
- package/apps/studio/client/hooks/use-action-keys.jsx +3 -1
- package/apps/studio/client/hooks/use-canvas-bridge.jsx +1 -1
- package/apps/studio/client/hooks/use-palette-and-panels.jsx +23 -6
- package/apps/studio/client/hooks/use-photo-and-timeline.jsx +16 -8
- package/apps/studio/client/hooks/use-project-data.jsx +11 -2
- package/apps/studio/client/hooks/use-shell-core.jsx +19 -9
- package/apps/studio/client/index-loader.ts +41 -21
- package/apps/studio/client/inspector/inspector-panel.jsx +35 -14
- package/apps/studio/client/shell/viewport.jsx +32 -16
- package/apps/studio/client/tree/tree.jsx +17 -0
- package/apps/studio/client/v2/canvases/canvases-panel.jsx +24 -0
- package/apps/studio/client/v2/canvases/use-canvas-index.js +24 -1
- package/apps/studio/client/v2/code/canvas-error-card.jsx +14 -2
- package/apps/studio/client/v2/code/canvas-imports-card.jsx +7 -3
- package/apps/studio/client/v2/code/canvas-imports-words.js +16 -0
- package/apps/studio/client/v2/code/canvas-waiting-card.jsx +59 -5
- package/apps/studio/client/v2/code/canvas-waiting.js +18 -1
- package/apps/studio/client/v2/code/code-consent-sheet.jsx +87 -0
- package/apps/studio/client/v2/code/code-consent.js +67 -0
- package/apps/studio/client/v2/diagnostics/sync-details/sync-details-model.js +62 -10
- package/apps/studio/client/v2/diagnostics/sync-details/sync-details.jsx +314 -5
- package/apps/studio/client/v2/layers/artboard-layers.jsx +24 -5
- package/apps/studio/client/v2/layers/layers-request.js +49 -0
- package/apps/studio/client/v2/left-panel/canvases-pinned.jsx +93 -3
- package/apps/studio/client/v2/left-panel/ds-boards.js +39 -0
- package/apps/studio/client/v2/left-panel/left-panel-model.js +13 -0
- package/apps/studio/client/v2/left-panel/left-panel.css +24 -0
- package/apps/studio/client/v2/shell/canvas-crash-guard.js +40 -5
- package/apps/studio/client/v2/shell/canvas-mode.js +17 -1
- package/apps/studio/client/v2/shell/floating-panels.css +37 -1
- package/apps/studio/client/v2/shell/mode-switch.jsx +14 -3
- package/apps/studio/client/v2/shell/opening-skeleton.js +118 -0
- package/apps/studio/client/v2/shell/opening-skeleton.jsx +103 -0
- package/apps/studio/client/v2/shell/pages-pick.js +49 -0
- package/apps/studio/client/v2/shell/project-menu-model.js +3 -0
- package/apps/studio/client/v2/shell/share-cluster-host.jsx +3 -1
- package/apps/studio/client/v2/shell/shell-parity.json +8 -0
- package/apps/studio/client/v2/shell/use-canvas-mode-lane.js +30 -0
- package/apps/studio/comments-overlay.tsx +12 -11
- package/apps/studio/config-reload-wire.ts +4 -1
- package/apps/studio/config.schema.json +6 -0
- package/apps/studio/context.ts +37 -1
- package/apps/studio/dist/client.bundle.js +720 -720
- package/apps/studio/dist/comment-mount.js +2 -2
- package/apps/studio/dist/styles.css +1 -1
- package/apps/studio/ds/board/board.css +6 -0
- package/apps/studio/ds/board/ds-bar.tsx +21 -3
- package/apps/studio/ds/board/specimen.tsx +6 -3
- package/apps/studio/ds/board/template.ts +39 -19
- package/apps/studio/ds/cli.ts +7 -1
- package/apps/studio/ds/component-list.ts +2 -1
- package/apps/studio/ds/default.ts +6 -1
- package/apps/studio/ds/ds-resolver.ts +58 -8
- package/apps/studio/ds/engine.ts +3 -1
- package/apps/studio/ds/folder-systems.ts +199 -0
- package/apps/studio/ds/pairing-css.ts +2 -1
- package/apps/studio/ds/rename.ts +10 -3
- package/apps/studio/ds/shell-fallbacks.ts +2 -1
- package/apps/studio/ds/upgrade-stage.ts +6 -2
- package/apps/studio/editing/ai-point-ring.tsx +4 -4
- package/apps/studio/editing/ai-scope-outline.tsx +4 -4
- package/apps/studio/editing/align-bar.tsx +4 -4
- package/apps/studio/editing/anchor-report.ts +3 -2
- package/apps/studio/editing/artboard-handles.tsx +4 -4
- package/apps/studio/editing/corner-dots.tsx +4 -4
- package/apps/studio/editing/crop-mode.tsx +4 -4
- package/apps/studio/editing/drop-chip.tsx +4 -4
- package/apps/studio/editing/empty-report.ts +3 -2
- package/apps/studio/editing/focus-model.tsx +4 -4
- package/apps/studio/editing/gap-bands.tsx +3 -3
- package/apps/studio/editing/hold-rings.tsx +4 -4
- package/apps/studio/editing/lock-badge.tsx +3 -3
- package/apps/studio/editing/long-page.ts +23 -1
- package/apps/studio/editing/nudge.tsx +2 -2
- package/apps/studio/editing/page-activity.ts +4 -3
- package/apps/studio/editing/paste-bar.tsx +4 -4
- package/apps/studio/editing/pen/overlay.tsx +4 -3
- package/apps/studio/editing/place-freely.tsx +3 -3
- package/apps/studio/editing/reorder-slot.tsx +3 -3
- package/apps/studio/editing/selection.tsx +4 -4
- package/apps/studio/editing/size-ghost.tsx +4 -4
- package/apps/studio/editing/tab-order.tsx +4 -4
- package/apps/studio/editing/text-in-place.tsx +4 -4
- package/apps/studio/editing/undo-preview.tsx +3 -3
- package/apps/studio/equal-spacing-handles.tsx +3 -3
- package/apps/studio/frame-clock.ts +89 -0
- package/apps/studio/http.ts +66 -32
- package/apps/studio/index/ds-usage.ts +4 -1
- package/apps/studio/index-cache.ts +272 -0
- package/apps/studio/inspect-overlay.tsx +4 -3
- package/apps/studio/inspect.ts +7 -2
- package/apps/studio/link-chip-overlay.tsx +4 -3
- package/apps/studio/measure-overlay.tsx +4 -3
- package/apps/studio/present/pointer-dot.tsx +3 -2
- package/apps/studio/present/present-media.ts +6 -2
- package/apps/studio/present/present-stage.tsx +3 -2
- package/apps/studio/preview/preview-camera.tsx +3 -2
- package/apps/studio/routes/sync.ts +176 -0
- package/apps/studio/safe-zones-overlay.tsx +3 -2
- package/apps/studio/skip-dirs.ts +103 -47
- package/apps/studio/studio-page-host.ts +70 -0
- package/apps/studio/sync/code-module-consent.ts +86 -0
- package/apps/studio/sync/file-ledger.ts +24 -0
- package/apps/studio/sync/file-plane.ts +458 -53
- package/apps/studio/sync/held-deletes.ts +230 -0
- package/apps/studio/sync/hubs-config.ts +59 -2
- package/apps/studio/sync/index.ts +99 -15
- package/apps/studio/sync/seed-progress.ts +92 -2
- package/apps/studio/sync/settings.ts +36 -1
- package/apps/studio/sync/status.ts +15 -1
- package/apps/studio/sync/writer-registry.ts +5 -0
- package/apps/studio/text-caret.ts +5 -3
- package/apps/studio/toolbars/toolbar-rect.ts +3 -2
- package/apps/studio/use-annotation-resize.tsx +4 -3
- package/apps/studio/use-artboard-drag.tsx +3 -2
- package/apps/studio/use-element-resize.tsx +7 -6
- package/apps/studio/use-grid-track-handles.tsx +5 -4
- package/apps/studio/use-selection-set.tsx +64 -4
- package/apps/studio/use-spacing-handles.tsx +7 -6
- package/apps/studio/video-comp.tsx +55 -42
- package/apps/studio/video-play-overlay.tsx +4 -3
- package/apps/studio/whats-new.json +27 -0
- package/cli/commands/design.mjs +5 -2
- package/cli/commands/hub.mjs +10 -1
- package/cli/lib/bash-guard.mjs +14 -0
- package/cli/lib/design-help.gen.mjs +1 -1
- package/cli/lib/design-link.mjs +42 -17
- package/cli/lib/hub-purge.mjs +183 -0
- package/package.json +8 -8
- package/plugins/design/templates/_shell.html +164 -1
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"generated": "scripts/gen-actions.mjs — do not edit by hand",
|
|
3
3
|
"format": "maude.actions-manifest",
|
|
4
4
|
"v": 1,
|
|
5
|
-
"manifestVersion": "
|
|
5
|
+
"manifestVersion": "fb02f78da791",
|
|
6
6
|
"actions": [
|
|
7
7
|
{
|
|
8
8
|
"id": "search.open",
|
|
@@ -2540,6 +2540,39 @@
|
|
|
2540
2540
|
"verb": "maude design open <canvas>#<artboard>"
|
|
2541
2541
|
}
|
|
2542
2542
|
},
|
|
2543
|
+
{
|
|
2544
|
+
"id": "view.pages",
|
|
2545
|
+
"label": "Pages",
|
|
2546
|
+
"kind": "toggle",
|
|
2547
|
+
"exec": "canvas",
|
|
2548
|
+
"effect": "none",
|
|
2549
|
+
"agent": {
|
|
2550
|
+
"path": "human",
|
|
2551
|
+
"because": "view-pref"
|
|
2552
|
+
}
|
|
2553
|
+
},
|
|
2554
|
+
{
|
|
2555
|
+
"id": "pages.next",
|
|
2556
|
+
"label": "Next page",
|
|
2557
|
+
"kind": "command",
|
|
2558
|
+
"exec": "canvas",
|
|
2559
|
+
"effect": "none",
|
|
2560
|
+
"agent": {
|
|
2561
|
+
"path": "human",
|
|
2562
|
+
"because": "view-pref"
|
|
2563
|
+
}
|
|
2564
|
+
},
|
|
2565
|
+
{
|
|
2566
|
+
"id": "pages.prev",
|
|
2567
|
+
"label": "Previous page",
|
|
2568
|
+
"kind": "command",
|
|
2569
|
+
"exec": "canvas",
|
|
2570
|
+
"effect": "none",
|
|
2571
|
+
"agent": {
|
|
2572
|
+
"path": "human",
|
|
2573
|
+
"because": "view-pref"
|
|
2574
|
+
}
|
|
2575
|
+
},
|
|
2543
2576
|
{
|
|
2544
2577
|
"id": "view.advanced-open-all",
|
|
2545
2578
|
"label": "Open all Advanced sections",
|
|
@@ -6252,6 +6285,108 @@
|
|
|
6252
6285
|
"verb": "maude design curl-local -X POST http://127.0.0.1:<port>/_api/sync/cancel-assets"
|
|
6253
6286
|
}
|
|
6254
6287
|
},
|
|
6288
|
+
{
|
|
6289
|
+
"id": "sync.allow-code",
|
|
6290
|
+
"label": "Allow shared code…",
|
|
6291
|
+
"kind": "command",
|
|
6292
|
+
"exec": "shell",
|
|
6293
|
+
"effect": "external",
|
|
6294
|
+
"minRole": "edit",
|
|
6295
|
+
"server": {
|
|
6296
|
+
"route": "/_api/sync/code-consent/set",
|
|
6297
|
+
"method": "POST"
|
|
6298
|
+
},
|
|
6299
|
+
"agent": {
|
|
6300
|
+
"path": "human",
|
|
6301
|
+
"because": "consent",
|
|
6302
|
+
"note": "the person’s yes to shared code from this project’s hub running on their Mac"
|
|
6303
|
+
}
|
|
6304
|
+
},
|
|
6305
|
+
{
|
|
6306
|
+
"id": "sync.stop-code",
|
|
6307
|
+
"label": "Stop allowing shared code…",
|
|
6308
|
+
"kind": "command",
|
|
6309
|
+
"exec": "shell",
|
|
6310
|
+
"effect": "none",
|
|
6311
|
+
"minRole": "edit",
|
|
6312
|
+
"server": {
|
|
6313
|
+
"route": "/_api/sync/code-consent/set",
|
|
6314
|
+
"method": "POST"
|
|
6315
|
+
},
|
|
6316
|
+
"agent": {
|
|
6317
|
+
"path": "human",
|
|
6318
|
+
"because": "consent",
|
|
6319
|
+
"note": "takes back the person’s yes to shared code"
|
|
6320
|
+
}
|
|
6321
|
+
},
|
|
6322
|
+
{
|
|
6323
|
+
"id": "sync.ignore-folder",
|
|
6324
|
+
"label": "Don’t sync this folder",
|
|
6325
|
+
"kind": "command",
|
|
6326
|
+
"exec": "shell",
|
|
6327
|
+
"effect": "none",
|
|
6328
|
+
"minRole": "edit",
|
|
6329
|
+
"server": {
|
|
6330
|
+
"route": "/_api/sync/settings",
|
|
6331
|
+
"method": "POST"
|
|
6332
|
+
},
|
|
6333
|
+
"agent": {
|
|
6334
|
+
"path": "human",
|
|
6335
|
+
"because": "hub-link",
|
|
6336
|
+
"note": "which folders the project syncs is the person’s choice"
|
|
6337
|
+
}
|
|
6338
|
+
},
|
|
6339
|
+
{
|
|
6340
|
+
"id": "sync.sync-folder-again",
|
|
6341
|
+
"label": "Sync it again",
|
|
6342
|
+
"kind": "command",
|
|
6343
|
+
"exec": "shell",
|
|
6344
|
+
"effect": "none",
|
|
6345
|
+
"minRole": "edit",
|
|
6346
|
+
"server": {
|
|
6347
|
+
"route": "/_api/sync/settings",
|
|
6348
|
+
"method": "POST"
|
|
6349
|
+
},
|
|
6350
|
+
"agent": {
|
|
6351
|
+
"path": "human",
|
|
6352
|
+
"because": "hub-link",
|
|
6353
|
+
"note": "which folders the project syncs is the person’s choice"
|
|
6354
|
+
}
|
|
6355
|
+
},
|
|
6356
|
+
{
|
|
6357
|
+
"id": "sync.delete-held-on-hub",
|
|
6358
|
+
"label": "Move to the hub’s trash too…",
|
|
6359
|
+
"kind": "command",
|
|
6360
|
+
"exec": "shell",
|
|
6361
|
+
"effect": "shared",
|
|
6362
|
+
"minRole": "edit",
|
|
6363
|
+
"server": {
|
|
6364
|
+
"route": "/_api/sync/held-deletes",
|
|
6365
|
+
"method": "POST"
|
|
6366
|
+
},
|
|
6367
|
+
"agent": {
|
|
6368
|
+
"path": "human",
|
|
6369
|
+
"because": "hub-link",
|
|
6370
|
+
"note": "deleting a batch of files on the project’s hub is the person’s choice"
|
|
6371
|
+
}
|
|
6372
|
+
},
|
|
6373
|
+
{
|
|
6374
|
+
"id": "sync.keep-held-on-hub",
|
|
6375
|
+
"label": "Keep on the hub",
|
|
6376
|
+
"kind": "command",
|
|
6377
|
+
"exec": "shell",
|
|
6378
|
+
"effect": "none",
|
|
6379
|
+
"minRole": "edit",
|
|
6380
|
+
"server": {
|
|
6381
|
+
"route": "/_api/sync/held-deletes",
|
|
6382
|
+
"method": "POST"
|
|
6383
|
+
},
|
|
6384
|
+
"agent": {
|
|
6385
|
+
"path": "human",
|
|
6386
|
+
"because": "hub-link",
|
|
6387
|
+
"note": "which deleted files stay on the hub is the person’s choice"
|
|
6388
|
+
}
|
|
6389
|
+
},
|
|
6255
6390
|
{
|
|
6256
6391
|
"id": "sync.get-latest",
|
|
6257
6392
|
"label": "Get latest",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$comment": "Lead-owned (contract V2-1.11 §5.7). humanMax/pendingMax may only be lowered; raising either, or adding a humanDecisions reason, is a lead change citing a decision id.",
|
|
3
|
-
"humanMax":
|
|
3
|
+
"humanMax": 186,
|
|
4
4
|
"pendingMax": 0,
|
|
5
5
|
"pending": [],
|
|
6
6
|
"humanDecisions": {
|
|
@@ -274,6 +274,30 @@
|
|
|
274
274
|
"from": 176,
|
|
275
275
|
"by": "decision:maude/v2-205-w4-github-signin-action",
|
|
276
276
|
"why": "2.0.5 W4 registers account.github-signin (Sign in to GitHub from the account card: GitHub's device flow, the person types the code in their own browser). Human 'native-window': an agent never signs anyone in. One human row."
|
|
277
|
+
},
|
|
278
|
+
{
|
|
279
|
+
"to": 179,
|
|
280
|
+
"from": 177,
|
|
281
|
+
"by": "decision:maude/v2-207-a3-code-consent-in-app",
|
|
282
|
+
"why": "2.0.7 A3 registers sync.allow-code and sync.stop-code (Sync details / the canvas-waiting card: the person's yes or no to shared code from the project's hub, which runs on their Mac outside the canvas sandbox). Both human 'consent': an agent never says yes for the person. Two human rows."
|
|
283
|
+
},
|
|
284
|
+
{
|
|
285
|
+
"to": 182,
|
|
286
|
+
"from": 179,
|
|
287
|
+
"by": "decision:maude/v2-207-pages-view",
|
|
288
|
+
"why": "2.0.7 B2 registers view.pages (Canvas | Pages on the canvas pill) and its paging, pages.next / pages.prev. Human 'view-pref': they only change how the person looks at the canvas (the view file, per Mac); an agent reads the canvas itself. Three human rows."
|
|
289
|
+
},
|
|
290
|
+
{
|
|
291
|
+
"to": 184,
|
|
292
|
+
"from": 182,
|
|
293
|
+
"by": "decision:maude/v2-207-ignore-folders-in-linkedhub",
|
|
294
|
+
"why": "2.0.7 #7 registers sync.ignore-folder and sync.sync-folder-again (Sync details: leave a folder of pictures out of sync on this Mac, or bring it back). Human 'hub-link': they change what this project exchanges with its hub, the person's call. Two human rows."
|
|
295
|
+
},
|
|
296
|
+
{
|
|
297
|
+
"to": 186,
|
|
298
|
+
"from": 184,
|
|
299
|
+
"by": "decision:maude/v2-207-7b-held-delete-answers",
|
|
300
|
+
"why": "2.0.7 #7b registers sync.delete-held-on-hub and sync.keep-held-on-hub (Sync details › Deleted on this Mac, held: Delete on the hub too… / Keep on the hub). Human 'hub-link': deleting a batch on the project's hub reaches every teammate, and which deleted files stay on the hub is the person's choice. Two human rows."
|
|
277
301
|
}
|
|
278
302
|
],
|
|
279
303
|
"humanMaxRaisedNote": "V2-5 A1 integration: the three slice raises stack on 86 (84 -> 86 by decision:maude/v2-4-gate-github-doors, human 'accounts'). S4.1/S4.3/S4.4 and S2.2-S2.4 add no human row. 86 + 4 + 6 + 4 = 100 human actions in the merged registry. V2-5 A2 integration: S5.4 builds `maude design runs list|stop`, so ai.runs.list and ai.stop turn cli (decision:maude/v2-S5.3-run-actions-human-until-s5.4 resolved by decision:maude/v2-S5.4-runs-fallback-prompts) and the cap lowers 100 -> 98; S3.1, S4.2, S4.5, S9.4, S2.5 and S1.4 add no human row. V2-5 A4 integration: measured 107 human actions in the merged registry (98 on feat + tool.pointer from S3.2b + 7 chat.advanced.* from S5.12 + object.select-matching from S2.6); every other A4 slice adds no human row. V2-5 A5 integration: measured 113 human actions in the merged registry (107 on feat + trash.clear from S1.7b + four ai.attach-* from S5.10 + present.presenter-view from S3.6b); every other A5 slice adds no human row. V2-5 A6a integration: measured 118 human actions in the merged registry (113 on feat + artboard.ask-ai S2.10 + element.set-id S2.2b/lead + edit.undo-history S2.20 + history.filter S1.12b − view.trash S1.17 (cli) + tab.overview + tab.rename S1.22b); every other A6a slice adds no human row."
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
import { useEffect, useRef, useState } from 'react';
|
|
14
14
|
import { createPortal } from 'react-dom';
|
|
15
15
|
import { acceptFromShell } from '../../bridge/dgn-protocol.ts';
|
|
16
|
+
import { frameCaf, frameRaf } from '../../frame-clock.ts';
|
|
16
17
|
|
|
17
18
|
export interface SeenTarget {
|
|
18
19
|
ref: string;
|
|
@@ -83,11 +84,11 @@ export function AiSeenRings(): null | React.JSX.Element {
|
|
|
83
84
|
ring.style.height = `${Math.round(r.height + PAD * 2)}px`;
|
|
84
85
|
});
|
|
85
86
|
}
|
|
86
|
-
raf =
|
|
87
|
+
raf = frameRaf(tick);
|
|
87
88
|
};
|
|
88
|
-
raf =
|
|
89
|
+
raf = frameRaf(tick);
|
|
89
90
|
return () => {
|
|
90
|
-
if (raf != null)
|
|
91
|
+
if (raf != null) frameCaf(raf);
|
|
91
92
|
};
|
|
92
93
|
}, [targets]);
|
|
93
94
|
|
|
@@ -28,6 +28,7 @@
|
|
|
28
28
|
*/
|
|
29
29
|
|
|
30
30
|
import { arrowPrimitives, type SvgPrimitive } from '../../canvas-arrowheads.ts';
|
|
31
|
+
import { frameRafOn } from '../../frame-clock.ts';
|
|
31
32
|
import { artboardMembers } from '../artboard-members.ts';
|
|
32
33
|
import { DEFAULT_INK } from '../constants.ts';
|
|
33
34
|
import { parseHostRef } from '../elements/_shared.ts';
|
|
@@ -892,7 +893,7 @@ export function createDomRideSink(
|
|
|
892
893
|
g.classList.add('is-settling');
|
|
893
894
|
old.classList.add('is-leaving');
|
|
894
895
|
s.appendChild(g);
|
|
895
|
-
doc.defaultView
|
|
896
|
+
if (doc.defaultView) frameRafOn(doc.defaultView, () => g.classList.add('is-in'));
|
|
896
897
|
doc.defaultView?.setTimeout(() => old.remove(), 200);
|
|
897
898
|
} else {
|
|
898
899
|
old?.remove();
|
|
@@ -97,6 +97,7 @@ import {
|
|
|
97
97
|
IconUngroup,
|
|
98
98
|
SHAPE_KIND_ICONS,
|
|
99
99
|
} from './canvas-icons.tsx';
|
|
100
|
+
import { frameCaf, frameRaf } from './frame-clock.ts';
|
|
100
101
|
import { holdHoverFocus } from './toolbars/tool-panel.ts';
|
|
101
102
|
import { IconMore } from './toolbars/toolbar-icons.tsx';
|
|
102
103
|
import { useAnnotationSelectionOptional } from './use-annotation-selection.tsx';
|
|
@@ -627,7 +628,7 @@ export function AnnotationContextToolbar({
|
|
|
627
628
|
const u = unionRect(rects);
|
|
628
629
|
if (!u) {
|
|
629
630
|
el.style.display = 'none';
|
|
630
|
-
rafRef.current =
|
|
631
|
+
rafRef.current = frameRaf(tick);
|
|
631
632
|
return;
|
|
632
633
|
}
|
|
633
634
|
el.style.display = 'flex';
|
|
@@ -646,11 +647,11 @@ export function AnnotationContextToolbar({
|
|
|
646
647
|
if (left + tbW > winW - 8) left = winW - tbW - 8;
|
|
647
648
|
el.style.left = `${Math.round(left)}px`;
|
|
648
649
|
el.style.top = `${Math.round(top)}px`;
|
|
649
|
-
rafRef.current =
|
|
650
|
+
rafRef.current = frameRaf(tick);
|
|
650
651
|
};
|
|
651
|
-
rafRef.current =
|
|
652
|
+
rafRef.current = frameRaf(tick);
|
|
652
653
|
return () => {
|
|
653
|
-
if (rafRef.current != null)
|
|
654
|
+
if (rafRef.current != null) frameCaf(rafRef.current);
|
|
654
655
|
};
|
|
655
656
|
}, [selectedStrokes, editingId]);
|
|
656
657
|
|
|
@@ -123,6 +123,7 @@ import { VoteDots } from './annotations/ui/vote-dots.tsx';
|
|
|
123
123
|
import { projectStrokes, type StrokeCache } from './annotations/ui/world.ts';
|
|
124
124
|
import { elementsToStrokes, strokesToElementMap } from './annotations/v1-adapter.ts';
|
|
125
125
|
import { reasonProps } from './client/v2/access/disabled-reason.js';
|
|
126
|
+
import { frameCaf, frameRaf } from './frame-clock.ts';
|
|
126
127
|
import { setStickerSelected } from './toolbars/shell-panels.ts';
|
|
127
128
|
/**
|
|
128
129
|
* @file annotations-layer.tsx — FigJam-style annotation overlay
|
|
@@ -1198,7 +1199,7 @@ export function AnnotationsLayer() {
|
|
|
1198
1199
|
),
|
|
1199
1200
|
// read at every frame: the theme can flip between two drags
|
|
1200
1201
|
defaultInk: () => resolveDefaultInk(readChromeTheme()),
|
|
1201
|
-
schedule: (fn) =>
|
|
1202
|
+
schedule: (fn) => frameRaf(fn),
|
|
1202
1203
|
});
|
|
1203
1204
|
rideRef.current = ctl;
|
|
1204
1205
|
return () => {
|
|
@@ -4507,13 +4508,13 @@ export function AnnotationsLayer() {
|
|
|
4507
4508
|
const onMove = (e: PointerEvent) => {
|
|
4508
4509
|
last = { x: e.clientX, y: e.clientY };
|
|
4509
4510
|
if (raf == null && typeof requestAnimationFrame !== 'undefined') {
|
|
4510
|
-
raf =
|
|
4511
|
+
raf = frameRaf(apply);
|
|
4511
4512
|
}
|
|
4512
4513
|
};
|
|
4513
4514
|
document.addEventListener('pointermove', onMove, { passive: true });
|
|
4514
4515
|
return () => {
|
|
4515
4516
|
document.removeEventListener('pointermove', onMove);
|
|
4516
|
-
if (raf != null && typeof cancelAnimationFrame !== 'undefined')
|
|
4517
|
+
if (raf != null && typeof cancelAnimationFrame !== 'undefined') frameCaf(raf);
|
|
4517
4518
|
clear();
|
|
4518
4519
|
};
|
|
4519
4520
|
}, [tool]);
|