@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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// use-tool-mode — Phase 4.1 Task 2. Provider transitions + cursor sync.
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { describe, expect, test } from 'bun:test';
|
|
4
4
|
|
|
5
5
|
import { renderToStaticMarkup } from 'react-dom/server';
|
|
6
6
|
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
} from '../use-tool-mode.tsx';
|
|
13
13
|
|
|
14
14
|
describe('use-tool-mode / static', () => {
|
|
15
|
-
test('DEFAULT_TOOLS exposes V/H/C + draw set B/I/R/N/A/T/E (single Shape tool + highlighter)', () => {
|
|
15
|
+
test('DEFAULT_TOOLS exposes V/H/C + draw set B/I/R/N/⇧S/A/T/E (single Shape tool + highlighter + section)', () => {
|
|
16
16
|
expect(DEFAULT_TOOLS.map((t) => t.id)).toEqual([
|
|
17
17
|
'move',
|
|
18
18
|
'hand',
|
|
@@ -21,6 +21,7 @@ describe('use-tool-mode / static', () => {
|
|
|
21
21
|
'highlighter',
|
|
22
22
|
'shape',
|
|
23
23
|
'sticky',
|
|
24
|
+
'section',
|
|
24
25
|
'arrow',
|
|
25
26
|
'text',
|
|
26
27
|
'eraser',
|
|
@@ -33,6 +34,7 @@ describe('use-tool-mode / static', () => {
|
|
|
33
34
|
'I',
|
|
34
35
|
'R',
|
|
35
36
|
'N',
|
|
37
|
+
'⇧S',
|
|
36
38
|
'A',
|
|
37
39
|
'T',
|
|
38
40
|
'E',
|
|
@@ -55,6 +57,7 @@ describe('use-tool-mode / static', () => {
|
|
|
55
57
|
'highlighter',
|
|
56
58
|
'shape',
|
|
57
59
|
'sticky',
|
|
60
|
+
'section',
|
|
58
61
|
'arrow',
|
|
59
62
|
'text',
|
|
60
63
|
'eraser',
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
SHAPE_KIND_ICONS,
|
|
21
21
|
TOOL_ICONS,
|
|
22
22
|
} from './canvas-icons.tsx';
|
|
23
|
-
import {
|
|
23
|
+
import { useChromeVisibility } from './use-chrome-visibility.tsx';
|
|
24
24
|
import { type ShapeKind, useToolMode } from './use-tool-mode.tsx';
|
|
25
25
|
|
|
26
26
|
// ─────────────────────────────────────────────────────────────────────────────
|
|
@@ -227,8 +227,18 @@ function ensurePaletteStyles(): void {
|
|
|
227
227
|
|
|
228
228
|
const NAV_TOOLS = ['move', 'hand', 'comment'] as const;
|
|
229
229
|
// Phase 24 — the two rect/ellipse buttons collapse into one Shape tool (with a
|
|
230
|
-
// kind popover); sticky/arrow/text/eraser keep their order.
|
|
231
|
-
|
|
230
|
+
// kind popover); sticky/arrow/text/eraser keep their order. Wave H — section
|
|
231
|
+
// joins the row (it was ⇧S-only before; users couldn't discover it).
|
|
232
|
+
const DRAW_TOOLS = [
|
|
233
|
+
'pen',
|
|
234
|
+
'highlighter',
|
|
235
|
+
'shape',
|
|
236
|
+
'sticky',
|
|
237
|
+
'section',
|
|
238
|
+
'arrow',
|
|
239
|
+
'text',
|
|
240
|
+
'eraser',
|
|
241
|
+
] as const;
|
|
232
242
|
|
|
233
243
|
// Phase 24 — the Shape tool's primitive picker (popover order matches FigJam).
|
|
234
244
|
const SHAPE_KINDS: ReadonlyArray<{ kind: ShapeKind; label: string }> = [
|
|
@@ -246,7 +256,7 @@ const SHAPE_KINDS: ReadonlyArray<{ kind: ShapeKind; label: string }> = [
|
|
|
246
256
|
export function ToolPalette() {
|
|
247
257
|
ensurePaletteStyles();
|
|
248
258
|
const { tool, setTool, tools, sticky, toggleSticky, shapeKind, setShapeKind } = useToolMode();
|
|
249
|
-
const
|
|
259
|
+
const chrome = useChromeVisibility();
|
|
250
260
|
const [mounted, setMounted] = useState(false);
|
|
251
261
|
const [shapeOpen, setShapeOpen] = useState(false);
|
|
252
262
|
const containerRef = useRef<HTMLDivElement | null>(null);
|
|
@@ -277,11 +287,12 @@ export function ToolPalette() {
|
|
|
277
287
|
}, [tool]);
|
|
278
288
|
|
|
279
289
|
if (!mounted) return null;
|
|
290
|
+
// Presentation Mode hides the whole tool palette (clean artboards-only view).
|
|
291
|
+
if (chrome?.present) return null;
|
|
280
292
|
|
|
281
293
|
const byId = new Map(tools.map((t) => [t.id, t]));
|
|
282
294
|
const navList = NAV_TOOLS.map((id) => byId.get(id)).filter(Boolean);
|
|
283
295
|
const drawList = DRAW_TOOLS.map((id) => byId.get(id)).filter(Boolean);
|
|
284
|
-
const annotationsHidden = visibilityCtx ? !visibilityCtx.visible : false;
|
|
285
296
|
|
|
286
297
|
const renderToolButton = (id: string, label: string, shortcut: string) => {
|
|
287
298
|
const Icon = TOOL_ICONS[id];
|
|
@@ -402,12 +413,20 @@ export function ToolPalette() {
|
|
|
402
413
|
</button>
|
|
403
414
|
<button
|
|
404
415
|
type="button"
|
|
405
|
-
aria-label=
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
416
|
+
aria-label="Presentation mode — hide all chrome"
|
|
417
|
+
title="Presentation mode — hide all chrome (Esc to exit)"
|
|
418
|
+
onClick={() => {
|
|
419
|
+
// Present Mode is a SHELL-level state (it hides the menubar /
|
|
420
|
+
// sidebar / panels too), so the canvas iframe requests it from the
|
|
421
|
+
// parent shell, which flips on `.is-present` + broadcasts
|
|
422
|
+
// dgn:'view-chrome' back down. Enter-only — the palette is hidden
|
|
423
|
+
// while presenting; exit is Esc or the floating pill.
|
|
424
|
+
try {
|
|
425
|
+
window.parent.postMessage({ dgn: 'present-enter' }, '*');
|
|
426
|
+
} catch {
|
|
427
|
+
/* detached / cross-origin */
|
|
428
|
+
}
|
|
429
|
+
}}
|
|
411
430
|
>
|
|
412
431
|
<IconPresentation />
|
|
413
432
|
</button>
|
package/apps/studio/undo-hud.tsx
CHANGED
|
@@ -82,7 +82,6 @@ export function UndoHud() {
|
|
|
82
82
|
return (
|
|
83
83
|
<div
|
|
84
84
|
className="dc-undo-hud"
|
|
85
|
-
// biome-ignore lint/a11y/useSemanticElements: <output> is form-scoped; this HUD is a global status overlay outside any form
|
|
86
85
|
data-visible={visible ? 'true' : 'false'}
|
|
87
86
|
role="status"
|
|
88
87
|
aria-live="polite"
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
|
|
24
24
|
import { createContext, type ReactNode, useContext, useEffect, useMemo, useState } from 'react';
|
|
25
25
|
|
|
26
|
-
import {
|
|
26
|
+
import { AGENT_COLOR } from './use-collab.tsx';
|
|
27
27
|
|
|
28
28
|
/** Wire shape of an `ai-activity` entry (matches collab/ai-activity.ts). */
|
|
29
29
|
export interface AiEntry {
|
|
@@ -134,7 +134,9 @@ export function deriveAgent(entry: AiEntry): AgentPresence {
|
|
|
134
134
|
const author = sanitizeAuthor(entry.author);
|
|
135
135
|
const id = `${author}:${entry.startedAt}`;
|
|
136
136
|
const name = agentFunnyName(id);
|
|
137
|
-
|
|
137
|
+
// DS colors-presence contract: the agent rides --presence-agent, a hue no
|
|
138
|
+
// human peer can hash to — attribution stays unambiguous on a shared canvas.
|
|
139
|
+
return { id, name, color: AGENT_COLOR, author, startedAt: entry.startedAt };
|
|
138
140
|
}
|
|
139
141
|
|
|
140
142
|
// ---------------------------------------------------------------------------
|