@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
|
@@ -17,8 +17,8 @@
|
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
19
|
import { type CSSProperties, useEffect, useMemo, useRef, useState } from 'react';
|
|
20
|
-
|
|
21
20
|
import { acceptFromShell } from './bridge/dgn-protocol.ts';
|
|
21
|
+
import { frameCaf, frameRaf } from './frame-clock.ts';
|
|
22
22
|
|
|
23
23
|
export interface OverlayRect {
|
|
24
24
|
x: number;
|
|
@@ -526,11 +526,11 @@ export function ArtboardRingsLayer() {
|
|
|
526
526
|
box.style.height = `${Math.round(b - t + 10)}px`;
|
|
527
527
|
}
|
|
528
528
|
}
|
|
529
|
-
raf =
|
|
529
|
+
raf = frameRaf(tick);
|
|
530
530
|
};
|
|
531
|
-
raf =
|
|
531
|
+
raf = frameRaf(tick);
|
|
532
532
|
return () => {
|
|
533
|
-
if (raf != null)
|
|
533
|
+
if (raf != null) frameCaf(raf);
|
|
534
534
|
};
|
|
535
535
|
}, [ids, live, groupIds]);
|
|
536
536
|
|
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
*/
|
|
15
15
|
|
|
16
16
|
import { useEffect, useRef, useState } from 'react';
|
|
17
|
-
|
|
18
17
|
import { acceptFromShell } from './bridge/dgn-protocol.ts';
|
|
18
|
+
import { frameCaf, frameRaf } from './frame-clock.ts';
|
|
19
19
|
|
|
20
20
|
export interface AiCopyPair {
|
|
21
21
|
from: string;
|
|
@@ -136,11 +136,11 @@ export function AiCopyLinks(): React.JSX.Element | null {
|
|
|
136
136
|
} else link.style.display = 'none';
|
|
137
137
|
}
|
|
138
138
|
}
|
|
139
|
-
raf =
|
|
139
|
+
raf = frameRaf(tick);
|
|
140
140
|
};
|
|
141
|
-
raf =
|
|
141
|
+
raf = frameRaf(tick);
|
|
142
142
|
return () => {
|
|
143
|
-
if (raf != null)
|
|
143
|
+
if (raf != null) frameCaf(raf);
|
|
144
144
|
};
|
|
145
145
|
}, [pairs]);
|
|
146
146
|
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file artboard-freeze.ts — 2.0.7: an awake artboard does no work of its own while the camera moves
|
|
3
|
+
* @scope apps/studio/artboard-freeze.ts (React-free; driven by artboard-live-gate.tsx on the frame freeze)
|
|
4
|
+
* @purpose Michal: "while you pan or zoom, artboards must not redraw". The frame freeze (frame-clock.ts + the
|
|
5
|
+
* shell's `maude-frame-freeze`) holds the artboards' frame callbacks; this pauses what runs without
|
|
6
|
+
* one, in the artboards that are awake and showing their body (an asleep artboard has its CSS
|
|
7
|
+
* animations and videos paused already; one under its still shows no body):
|
|
8
|
+
*
|
|
9
|
+
* - CSS animations — `data-dc-frozen` on the article, the same rule as `data-dc-asleep`;
|
|
10
|
+
* - Web Animations started by script (motion's accelerated ones, `el.animate`) — paused, and played
|
|
11
|
+
* again on the thaw. A CSS animation or transition is left to the attribute: calling `pause()` on
|
|
12
|
+
* one would detach it from `animation-play-state` for good, and the sleep rule would stop working;
|
|
13
|
+
* - `<video>` that plays SILENTLY (muted or at volume 0) and is not a VideoComp's (its Player syncs
|
|
14
|
+
* its own). A video with sound keeps playing: a pan must not cut the sound.
|
|
15
|
+
*
|
|
16
|
+
* The thaw resumes exactly what the freeze paused, and only what is still paused and connected.
|
|
17
|
+
* Timers (setTimeout / setInterval) are not held: Maude's own gesture end, settle and publish run
|
|
18
|
+
* on them, and React's scheduler and every library share them — a canvas can opt in through
|
|
19
|
+
* `useArtboardGesture()`.
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
import { STILL_ATTR } from './artboard-still.ts';
|
|
23
|
+
|
|
24
|
+
export const FROZEN_ATTR = 'data-dc-frozen';
|
|
25
|
+
|
|
26
|
+
export const ARTBOARD_FREEZE_CSS = `
|
|
27
|
+
.dc-artboard[${FROZEN_ATTR}] .dc-artboard-body *,
|
|
28
|
+
.dc-artboard[${FROZEN_ATTR}] .dc-artboard-body *::before,
|
|
29
|
+
.dc-artboard[${FROZEN_ATTR}] .dc-artboard-body *::after { animation-play-state: paused !important; }
|
|
30
|
+
`;
|
|
31
|
+
|
|
32
|
+
/** Awake and showing its body: an asleep artboard is paused already, one under its still renders no body. */
|
|
33
|
+
export function freezable(article: Element): boolean {
|
|
34
|
+
if (article.hasAttribute('data-dc-asleep')) return false;
|
|
35
|
+
const still = article.getAttribute(STILL_ATTR);
|
|
36
|
+
return still !== 'still' && still !== 'cover';
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/** A Web Animation a script started (not a CSS animation / transition — those follow the attribute). */
|
|
40
|
+
function scripted(a: Animation): boolean {
|
|
41
|
+
const g = globalThis as unknown as { CSSAnimation?: unknown; CSSTransition?: unknown };
|
|
42
|
+
if (typeof g.CSSAnimation === 'function' && a instanceof (g.CSSAnimation as typeof Animation))
|
|
43
|
+
return false;
|
|
44
|
+
if (typeof g.CSSTransition === 'function' && a instanceof (g.CSSTransition as typeof Animation))
|
|
45
|
+
return false;
|
|
46
|
+
return true;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
function silent(m: HTMLMediaElement): boolean {
|
|
50
|
+
return m.muted || m.volume === 0;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export class ArtboardFreeze {
|
|
54
|
+
private articles: Element[] = [];
|
|
55
|
+
private anims: Animation[] = [];
|
|
56
|
+
private media: HTMLMediaElement[] = [];
|
|
57
|
+
private on = false;
|
|
58
|
+
private n = { freezes: 0, articles: 0, anims: 0, media: 0 };
|
|
59
|
+
|
|
60
|
+
frozen(): boolean {
|
|
61
|
+
return this.on;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
freeze(articles: Iterable<Element>): void {
|
|
65
|
+
if (this.on) return;
|
|
66
|
+
this.on = true;
|
|
67
|
+
this.n.freezes += 1;
|
|
68
|
+
for (const a of articles) {
|
|
69
|
+
if (!a.isConnected || !freezable(a)) continue;
|
|
70
|
+
a.setAttribute(FROZEN_ATTR, '');
|
|
71
|
+
this.articles.push(a);
|
|
72
|
+
const body = a.querySelector('.dc-artboard-body');
|
|
73
|
+
if (!body) continue;
|
|
74
|
+
const list =
|
|
75
|
+
typeof (body as Element & { getAnimations?: unknown }).getAnimations === 'function'
|
|
76
|
+
? body.getAnimations({ subtree: true })
|
|
77
|
+
: [];
|
|
78
|
+
for (const an of list) {
|
|
79
|
+
if (an.playState !== 'running' || !scripted(an)) continue;
|
|
80
|
+
an.pause();
|
|
81
|
+
this.anims.push(an);
|
|
82
|
+
}
|
|
83
|
+
for (const m of body.querySelectorAll<HTMLMediaElement>('video')) {
|
|
84
|
+
if (m.paused || m.ended || !silent(m) || m.closest('.dc-video-comp')) continue;
|
|
85
|
+
m.pause();
|
|
86
|
+
this.media.push(m);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
this.n.articles += this.articles.length;
|
|
90
|
+
this.n.anims += this.anims.length;
|
|
91
|
+
this.n.media += this.media.length;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
thaw(): void {
|
|
95
|
+
if (!this.on) return;
|
|
96
|
+
this.on = false;
|
|
97
|
+
for (const a of this.articles) a.removeAttribute(FROZEN_ATTR);
|
|
98
|
+
for (const an of this.anims) if (an.playState === 'paused') an.play();
|
|
99
|
+
for (const m of this.media) if (m.isConnected && m.paused) void m.play?.()?.catch?.(() => {});
|
|
100
|
+
this.articles = [];
|
|
101
|
+
this.anims = [];
|
|
102
|
+
this.media = [];
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
stats(): { frozen: boolean; freezes: number; articles: number; anims: number; media: number } {
|
|
106
|
+
return { frozen: this.on, ...this.n };
|
|
107
|
+
}
|
|
108
|
+
}
|