@1agh/maude 0.29.0 → 0.31.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -6
- package/apps/studio/acp/bridge.ts +285 -0
- package/apps/studio/acp/env.ts +48 -0
- package/apps/studio/acp/index.ts +132 -0
- package/apps/studio/acp/probe.ts +112 -0
- package/apps/studio/acp/transcript.ts +149 -0
- package/apps/studio/ai-banner.tsx +0 -1
- package/apps/studio/annotations-align.ts +149 -0
- package/apps/studio/annotations-bindings.ts +197 -0
- package/apps/studio/annotations-context-toolbar.tsx +436 -186
- package/apps/studio/annotations-groups.ts +270 -0
- package/apps/studio/annotations-layer.tsx +1714 -1661
- package/apps/studio/annotations-model.ts +2077 -0
- package/apps/studio/annotations-snap.ts +125 -0
- package/apps/studio/api.ts +433 -182
- package/apps/studio/bin/_png-playwright.mjs +1 -1
- package/apps/studio/bin/annotate.mjs +732 -0
- package/apps/studio/bin/annotate.sh +17 -0
- package/apps/studio/bin/chat-open.sh +44 -0
- package/apps/studio/bin/read-annotations.mjs +152 -17
- package/apps/studio/build.ts +1 -1
- package/apps/studio/canvas-arrowheads.ts +78 -9
- package/apps/studio/canvas-cursors.ts +2 -0
- package/apps/studio/canvas-edit.ts +257 -7
- package/apps/studio/canvas-icons.tsx +105 -0
- package/apps/studio/canvas-lib.tsx +112 -19
- package/apps/studio/canvas-list-watch.ts +177 -0
- package/apps/studio/canvas-shell.tsx +326 -9
- package/apps/studio/client/app.jsx +3579 -250
- package/apps/studio/client/canvas-url.js +5 -0
- package/apps/studio/client/github.js +99 -0
- package/apps/studio/client/index.html +1 -1
- package/apps/studio/client/panels/ChatPanel.jsx +770 -0
- package/apps/studio/client/panels/CollabModelInfographic.jsx +71 -0
- package/apps/studio/client/panels/CreateProject.jsx +334 -0
- package/apps/studio/client/panels/DiffView.jsx +590 -0
- package/apps/studio/client/panels/GitPanel.jsx +767 -0
- package/apps/studio/client/panels/IdentityBar.jsx +294 -0
- package/apps/studio/client/panels/OnboardingWizard.jsx +563 -0
- package/apps/studio/client/panels/RepoBranchSwitcher.jsx +349 -0
- package/apps/studio/client/panels/acp-runtime.js +286 -0
- package/apps/studio/client/panels/chat-markdown.jsx +138 -0
- package/apps/studio/client/panels/git-grouping.js +86 -0
- package/apps/studio/client/styles/0-reset.css +4 -0
- package/apps/studio/client/styles/3-shell-maude.css +1326 -14
- package/apps/studio/client/styles/4-components.css +39 -0
- package/apps/studio/client/styles/5-maude-overrides.css +41 -2
- package/apps/studio/client/styles/6-acp-chat.css +771 -0
- package/apps/studio/client/styles/_index.css +2 -0
- package/apps/studio/client/tour/collab-tour.js +61 -0
- package/apps/studio/client/tour/overlay.jsx +116 -18
- package/apps/studio/client/tour/usage-tour.js +23 -10
- package/apps/studio/client/whats-new.jsx +25 -10
- package/apps/studio/collab/registry.ts +13 -0
- package/apps/studio/collab/room.ts +36 -0
- package/apps/studio/commands/annotation-strokes-command.ts +1 -1
- package/apps/studio/commands/move-artboards-command.ts +1 -1
- package/apps/studio/comments-overlay.tsx +7 -5
- package/apps/studio/context-menu.tsx +4 -3
- package/apps/studio/contextual-toolbar.tsx +14 -0
- package/apps/studio/cursors-overlay.tsx +37 -21
- package/apps/studio/dist/client.bundle.js +31795 -1829
- package/apps/studio/dist/comment-mount.js +97 -9
- package/apps/studio/dist/styles.css +7938 -1599
- package/apps/studio/dom-selection.ts +115 -0
- package/apps/studio/export-dialog.tsx +3 -3
- package/apps/studio/git/endpoints.ts +338 -0
- package/apps/studio/git/service.ts +1334 -0
- package/apps/studio/git/watch.ts +97 -0
- package/apps/studio/github/endpoints.ts +358 -0
- package/apps/studio/github/service.ts +231 -0
- package/apps/studio/github/token.ts +53 -0
- package/apps/studio/history.ts +20 -3
- package/apps/studio/hmr-broadcast.ts +9 -2
- package/apps/studio/http.ts +508 -6
- package/apps/studio/input-router.tsx +7 -0
- package/apps/studio/inspect.ts +37 -8
- package/apps/studio/participants-chrome.tsx +70 -16
- package/apps/studio/paths.ts +12 -0
- package/apps/studio/scaffold-design.ts +57 -0
- package/apps/studio/server.ts +70 -4
- package/apps/studio/sync/agent.ts +311 -57
- package/apps/studio/sync/codec.ts +69 -0
- package/apps/studio/sync/cold-start.ts +198 -0
- package/apps/studio/sync/connection-state.ts +58 -2
- package/apps/studio/sync/hub-link.ts +137 -0
- package/apps/studio/sync/index.ts +563 -221
- package/apps/studio/sync/journal.ts +190 -0
- package/apps/studio/sync/migrate-seed.ts +202 -44
- package/apps/studio/sync/projection.ts +22 -3
- package/apps/studio/sync/status.ts +15 -4
- package/apps/studio/test/acp-bridge.test.ts +127 -0
- package/apps/studio/test/acp-env.test.ts +65 -0
- package/apps/studio/test/acp-origin-gate.test.ts +78 -0
- package/apps/studio/test/acp-transcript.test.ts +112 -0
- package/apps/studio/test/activity.test.ts +1 -7
- package/apps/studio/test/annotate-write.test.ts +184 -0
- package/apps/studio/test/annotations-align.test.ts +88 -0
- package/apps/studio/test/annotations-bindings.test.ts +124 -0
- package/apps/studio/test/annotations-groups.test.ts +231 -0
- package/apps/studio/test/annotations-snap.test.ts +79 -0
- package/apps/studio/test/canvas-create-api.test.ts +72 -0
- package/apps/studio/test/canvas-edit.test.ts +181 -1
- package/apps/studio/test/canvas-list-watch.test.ts +322 -0
- package/apps/studio/test/canvas-meta-api.test.ts +161 -27
- package/apps/studio/test/canvas-origin-gate.test.ts +43 -0
- package/apps/studio/test/chat-markdown.test.tsx +58 -0
- package/apps/studio/test/collab-bridge.test.ts +0 -2
- package/apps/studio/test/collab-room.test.ts +2 -7
- package/apps/studio/test/collab-session-survival.test.tsx +176 -0
- package/apps/studio/test/csp-canvas-shell.test.ts +5 -0
- package/apps/studio/test/csrf-write-guard.test.ts +78 -0
- package/apps/studio/test/editing-presence.test.ts +103 -0
- package/apps/studio/test/figjam-v3-model.test.ts +342 -0
- package/apps/studio/test/fixtures/figjam-v3-groups-bindings.svg +1 -0
- package/apps/studio/test/fixtures/mock-acp-agent.mjs +45 -0
- package/apps/studio/test/git-api.test.ts +0 -0
- package/apps/studio/test/git-branches.test.ts +106 -0
- package/apps/studio/test/git-grouping.test.ts +106 -0
- package/apps/studio/test/git-watch.test.ts +97 -0
- package/apps/studio/test/github-api.test.ts +465 -0
- package/apps/studio/test/hub-link.test.ts +69 -0
- package/apps/studio/test/participants-chrome.test.ts +36 -1
- package/apps/studio/test/shared-doc-migrate.test.ts +224 -14
- package/apps/studio/test/sync-agent.test.ts +272 -2
- package/apps/studio/test/sync-codec.test.ts +65 -0
- package/apps/studio/test/sync-cold-seed-dedup.test.ts +187 -0
- package/apps/studio/test/sync-cold-start.test.ts +304 -0
- package/apps/studio/test/sync-connection-state.test.ts +68 -0
- package/apps/studio/test/sync-hardening.test.ts +0 -8
- package/apps/studio/test/sync-hubs-config.test.ts +0 -1
- package/apps/studio/test/sync-incident-replay.test.ts +211 -0
- package/apps/studio/test/sync-journal.test.ts +176 -0
- package/apps/studio/test/sync-runtime.test.ts +360 -5
- package/apps/studio/test/sync-status.test.ts +66 -0
- package/apps/studio/test/tour-overlay.test.tsx +18 -0
- package/apps/studio/test/use-annotation-resize.test.ts +159 -0
- package/apps/studio/test/use-artboard-drag.test.ts +0 -1
- package/apps/studio/test/use-collab.test.ts +0 -0
- package/apps/studio/test/use-tool-mode.test.tsx +5 -2
- package/apps/studio/tool-palette.tsx +30 -11
- package/apps/studio/undo-hud.tsx +0 -1
- package/apps/studio/use-agent-presence.tsx +4 -2
- package/apps/studio/use-annotation-resize.tsx +484 -54
- package/apps/studio/use-annotation-selection.tsx +16 -4
- package/apps/studio/use-canvas-activity.tsx +2 -2
- package/apps/studio/use-chrome-visibility.tsx +66 -0
- package/apps/studio/use-collab.tsx +434 -202
- package/apps/studio/use-selection-set.tsx +9 -0
- package/apps/studio/use-tool-mode.tsx +5 -1
- package/apps/studio/whats-new.json +208 -10
- package/apps/studio/whats-new.schema.json +18 -2
- package/apps/studio/ws.ts +44 -1
- package/cli/commands/design-link.test.mjs +84 -0
- package/cli/commands/design.mjs +3 -1
- package/cli/commands/design.test.mjs +5 -1
- package/cli/lib/design-link.mjs +51 -1
- package/cli/lib/gitignore-block.mjs +16 -3
- package/cli/lib/gitignore-block.test.mjs +13 -1
- package/package.json +11 -9
- package/plugins/design/dependencies.json +17 -0
- package/plugins/design/templates/_shell.html +58 -12
|
@@ -10,7 +10,15 @@
|
|
|
10
10
|
* selection resets (the strokes themselves persist via `.annotations.svg`).
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
-
import {
|
|
13
|
+
import {
|
|
14
|
+
createContext,
|
|
15
|
+
type ReactNode,
|
|
16
|
+
useCallback,
|
|
17
|
+
useContext,
|
|
18
|
+
useMemo,
|
|
19
|
+
useRef,
|
|
20
|
+
useState,
|
|
21
|
+
} from 'react';
|
|
14
22
|
|
|
15
23
|
export interface AnnotationSelectionValue {
|
|
16
24
|
selectedIds: string[];
|
|
@@ -57,10 +65,14 @@ export function AnnotationSelectionProvider({ children }: { children: ReactNode
|
|
|
57
65
|
|
|
58
66
|
// Read live from state at call time so multi-step flows in the same tick
|
|
59
67
|
// (e.g. a router callback that adds then asks `contains`) see the staged
|
|
60
|
-
// result instead of a stale closure capture.
|
|
61
|
-
|
|
68
|
+
// result instead of a stale closure capture. MUST be a real useRef — the
|
|
69
|
+
// pre-FigJam-v3 code created a fresh `{ current }` object literal every
|
|
70
|
+
// render, so the stable useCallback closure kept reading the FIRST render's
|
|
71
|
+
// (empty) selection forever: `contains()` always returned false, which
|
|
72
|
+
// silently broke hull/multi-drag and click-keeps-selection (user-gate
|
|
73
|
+
// finding, 2026-06-11).
|
|
74
|
+
const containsRef = useRef<string[]>(selectedIds);
|
|
62
75
|
containsRef.current = selectedIds;
|
|
63
|
-
// biome-ignore lint/correctness/useExhaustiveDependencies: ref read intentionally
|
|
64
76
|
const contains = useCallback((id: string) => containsRef.current.includes(id), []);
|
|
65
77
|
|
|
66
78
|
const value = useMemo<AnnotationSelectionValue>(
|
|
@@ -132,7 +132,7 @@ function readActivitySeed(): ActivityMap {
|
|
|
132
132
|
const out: ActivityMap = {};
|
|
133
133
|
for (const file of Object.keys(seed)) {
|
|
134
134
|
const e = seed[file];
|
|
135
|
-
if (
|
|
135
|
+
if (e?.status !== 'active') continue; // only resurrect active overlays
|
|
136
136
|
out[file] = {
|
|
137
137
|
status: 'active',
|
|
138
138
|
artboardIds: Array.isArray(e.artboardIds) ? e.artboardIds : null,
|
|
@@ -199,7 +199,7 @@ export function CanvasActivityProvider({
|
|
|
199
199
|
setMap((prev) => {
|
|
200
200
|
const entry = prev[detail.file];
|
|
201
201
|
// Only remove if it's still the same idle entry (not re-activated).
|
|
202
|
-
if (
|
|
202
|
+
if (entry?.status !== 'idle' || entry.ts !== ts) return prev;
|
|
203
203
|
const { [detail.file]: _drop, ...rest } = prev;
|
|
204
204
|
return rest;
|
|
205
205
|
});
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file use-chrome-visibility.tsx — canvas-chrome visibility store
|
|
3
|
+
* @scope apps/studio/use-chrome-visibility.tsx
|
|
4
|
+
* @purpose Tiny store shared by the in-canvas floating chrome — DCMiniMap +
|
|
5
|
+
* DCZoomToolbar (canvas-lib), ToolPalette, and AnnotationsLayer —
|
|
6
|
+
* so the dev-server menubar can hide/show the minimap and zoom
|
|
7
|
+
* controls, and drive a non-destructive "Presentation Mode" that
|
|
8
|
+
* overlays-hides ALL chrome (minimap, zoom, tool palette,
|
|
9
|
+
* annotations) without mutating the user's individual toggles.
|
|
10
|
+
* Mounted by CanvasShell (next to AnnotationsVisibilityProvider) so
|
|
11
|
+
* the user canvas (which renders the minimap/zoom) AND its overlay
|
|
12
|
+
* siblings under CanvasRouter all consume the same value. Updated
|
|
13
|
+
* by the `dgn:'view-chrome'` postMessage handler in CanvasRouter.
|
|
14
|
+
*
|
|
15
|
+
* `present` is a master overlay-hide that supersedes `minimap`/
|
|
16
|
+
* `zoom`: while it is on, every chrome consumer renders nothing,
|
|
17
|
+
* and exiting restores whatever the individual toggles were.
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
import { createContext, type ReactNode, useCallback, useContext, useMemo, useState } from 'react';
|
|
21
|
+
|
|
22
|
+
export interface ChromeVisibilityState {
|
|
23
|
+
/** Floating world mini-map (DCMiniMap). */
|
|
24
|
+
minimap: boolean;
|
|
25
|
+
/** Bottom zoom pill (DCZoomToolbar). */
|
|
26
|
+
zoom: boolean;
|
|
27
|
+
/** Presentation Mode — hides ALL chrome regardless of the two above. */
|
|
28
|
+
present: boolean;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export interface ChromeVisibilityValue extends ChromeVisibilityState {
|
|
32
|
+
/** Merge a partial patch (only the provided keys change). */
|
|
33
|
+
setChrome: (patch: Partial<ChromeVisibilityState>) => void;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
const ChromeVisibilityContext = createContext<ChromeVisibilityValue | null>(null);
|
|
37
|
+
|
|
38
|
+
export function ChromeVisibilityProvider({
|
|
39
|
+
children,
|
|
40
|
+
initial,
|
|
41
|
+
}: {
|
|
42
|
+
children: ReactNode;
|
|
43
|
+
initial?: Partial<ChromeVisibilityState>;
|
|
44
|
+
}) {
|
|
45
|
+
const [state, setState] = useState<ChromeVisibilityState>({
|
|
46
|
+
minimap: initial?.minimap ?? true,
|
|
47
|
+
zoom: initial?.zoom ?? true,
|
|
48
|
+
present: initial?.present ?? false,
|
|
49
|
+
});
|
|
50
|
+
const setChrome = useCallback((patch: Partial<ChromeVisibilityState>) => {
|
|
51
|
+
setState((prev) => ({ ...prev, ...patch }));
|
|
52
|
+
}, []);
|
|
53
|
+
const value = useMemo<ChromeVisibilityValue>(() => ({ ...state, setChrome }), [state, setChrome]);
|
|
54
|
+
return (
|
|
55
|
+
<ChromeVisibilityContext.Provider value={value}>{children}</ChromeVisibilityContext.Provider>
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Returns the chrome-visibility value, or null when rendered outside a
|
|
61
|
+
* provider (e.g. a bare DS specimen). Consumers treat null as "all visible"
|
|
62
|
+
* so the default behaviour is unchanged.
|
|
63
|
+
*/
|
|
64
|
+
export function useChromeVisibility(): ChromeVisibilityValue | null {
|
|
65
|
+
return useContext(ChromeVisibilityContext);
|
|
66
|
+
}
|