@1agh/maude 0.28.0 → 0.28.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/cli/commands/design.mjs +69 -3
- package/cli/commands/design.test.mjs +97 -1
- package/cli/lib/cache.mjs +1 -1
- package/cli/lib/config-lint.mjs +1 -1
- package/cli/lib/copy-tree.mjs +1 -1
- package/cli/lib/design-link.mjs +1 -1
- package/cli/lib/flow-design-integration.test.mjs +1 -1
- package/cli/lib/gitignore-block.test.mjs +2 -2
- package/cli/lib/stack-detect.mjs +1 -1
- package/package.json +9 -9
- package/plugins/design/dev-server/annotations-context-toolbar.tsx +1 -1
- package/plugins/design/dev-server/annotations-layer.tsx +3 -3
- package/plugins/design/dev-server/api.ts +1 -1
- package/plugins/design/dev-server/bin/scenario-report.mjs +1 -1
- package/plugins/design/dev-server/bin/server-up.sh +102 -9
- package/plugins/design/dev-server/bin/visual-sanity.sh +19 -3
- package/plugins/design/dev-server/canvas-comment-mount.tsx +1 -1
- package/plugins/design/dev-server/canvas-cursors.ts +1 -1
- package/plugins/design/dev-server/canvas-lib.tsx +10 -21
- package/plugins/design/dev-server/canvas-shell.tsx +1 -1
- package/plugins/design/dev-server/collab/awareness-bridge.ts +1 -1
- package/plugins/design/dev-server/collab/index.ts +4 -4
- package/plugins/design/dev-server/collab/persistence.ts +1 -1
- package/plugins/design/dev-server/context-menu.tsx +1 -1
- package/plugins/design/dev-server/dist/client.bundle.js +4 -4
- package/plugins/design/dev-server/dist/comment-mount.js +5 -5
- package/plugins/design/dev-server/dist/runtime/lib0_decoding.js +1 -620
- package/plugins/design/dev-server/dist/runtime/lib0_encoding.js +1 -604
- package/plugins/design/dev-server/dist/runtime/motion.js +4 -4944
- package/plugins/design/dev-server/dist/runtime/motion_react.js +10 -10054
- package/plugins/design/dev-server/dist/runtime/pixi-js.js +2775 -52482
- package/plugins/design/dev-server/dist/runtime/react-dom.js +1 -231
- package/plugins/design/dev-server/dist/runtime/react-dom_client.js +9 -10357
- package/plugins/design/dev-server/dist/runtime/react.js +1 -535
- package/plugins/design/dev-server/dist/runtime/react_jsx-dev-runtime.js +1 -60
- package/plugins/design/dev-server/dist/runtime/react_jsx-runtime.js +1 -85
- package/plugins/design/dev-server/dist/runtime/y-protocols_awareness.js +1 -376
- package/plugins/design/dev-server/dist/runtime/y-protocols_sync.js +1 -100
- package/plugins/design/dev-server/dist/runtime/yjs.js +5 -6687
- package/plugins/design/dev-server/draw/brush.ts +3 -3
- package/plugins/design/dev-server/draw/index.ts +5 -5
- package/plugins/design/dev-server/draw/layout.ts +1 -1
- package/plugins/design/dev-server/draw/test/geometry.test.ts +1 -1
- package/plugins/design/dev-server/draw/test/layout.test.ts +1 -1
- package/plugins/design/dev-server/draw/test/primitives.test.ts +1 -1
- package/plugins/design/dev-server/draw/test/serialize.test.ts +1 -1
- package/plugins/design/dev-server/equal-spacing-handles.tsx +1 -1
- package/plugins/design/dev-server/examples/perf-100-artboards.tsx +1 -2
- package/plugins/design/dev-server/export-dialog.tsx +1 -1
- package/plugins/design/dev-server/exporters/html.ts +1 -1
- package/plugins/design/dev-server/exporters/index.ts +2 -2
- package/plugins/design/dev-server/exporters/pdf.ts +1 -1
- package/plugins/design/dev-server/exporters/png.ts +1 -1
- package/plugins/design/dev-server/exporters/pptx.ts +1 -1
- package/plugins/design/dev-server/exporters/svg.ts +1 -1
- package/plugins/design/dev-server/http.ts +1 -1
- package/plugins/design/dev-server/marquee-overlay.tsx +1 -1
- package/plugins/design/dev-server/server.ts +1 -1
- package/plugins/design/dev-server/sync/agent.ts +1 -1
- package/plugins/design/dev-server/sync/index.ts +5 -5
- package/plugins/design/dev-server/sync/materialize.ts +2 -2
- package/plugins/design/dev-server/sync/migrate-seed.ts +1 -1
- package/plugins/design/dev-server/sync/projection.ts +3 -3
- package/plugins/design/dev-server/test/ai-activity.test.ts +1 -1
- package/plugins/design/dev-server/test/annotations-api.test.ts +1 -2
- package/plugins/design/dev-server/test/annotations-draw-modifiers.test.ts +2 -2
- package/plugins/design/dev-server/test/annotations-layer.test.ts +6 -6
- package/plugins/design/dev-server/test/annotations-roundtrip.test.ts +1 -1
- package/plugins/design/dev-server/test/boot-self-heal.test.ts +1 -1
- package/plugins/design/dev-server/test/canvas-cursors.test.ts +1 -1
- package/plugins/design/dev-server/test/canvas-edit.test.ts +1 -1
- package/plugins/design/dev-server/test/canvas-header.test.ts +1 -1
- package/plugins/design/dev-server/test/canvas-hmr-runtime.test.tsx +1 -1
- package/plugins/design/dev-server/test/canvas-lib-inline.test.ts +1 -1
- package/plugins/design/dev-server/test/canvas-lib-resolver.test.ts +1 -2
- package/plugins/design/dev-server/test/canvas-meta-api.test.ts +1 -2
- package/plugins/design/dev-server/test/canvas-origin-gate.test.ts +1 -2
- package/plugins/design/dev-server/test/collab-annotations-bridge.test.ts +1 -1
- package/plugins/design/dev-server/test/collab-bridge.test.ts +1 -1
- package/plugins/design/dev-server/test/collab-protocol.test.ts +2 -2
- package/plugins/design/dev-server/test/collab-room.test.ts +1 -1
- package/plugins/design/dev-server/test/collab-stress.test.ts +1 -1
- package/plugins/design/dev-server/test/comments-api.test.ts +1 -2
- package/plugins/design/dev-server/test/compile-entry.test.ts +1 -2
- package/plugins/design/dev-server/test/exporters/canva.test.ts +1 -2
- package/plugins/design/dev-server/test/exporters/history.test.ts +1 -2
- package/plugins/design/dev-server/test/exporters/pw-launch.test.ts +1 -1
- package/plugins/design/dev-server/test/exporters/scope.test.ts +1 -2
- package/plugins/design/dev-server/test/exporters/zip.test.ts +1 -2
- package/plugins/design/dev-server/test/git-lifecycle.test.ts +1 -2
- package/plugins/design/dev-server/test/handoff-static-frames.test.ts +1 -1
- package/plugins/design/dev-server/test/handoff.test.ts +1 -1
- package/plugins/design/dev-server/test/hmr-broadcast.test.ts +1 -1
- package/plugins/design/dev-server/test/input-router.test.ts +2 -2
- package/plugins/design/dev-server/test/locator.test.ts +1 -1
- package/plugins/design/dev-server/test/runtime-bundle.test.ts +1 -1
- package/plugins/design/dev-server/test/shared-doc-convergence.test.ts +1 -1
- package/plugins/design/dev-server/test/shared-doc-migrate.test.ts +2 -3
- package/plugins/design/dev-server/test/shared-doc-projection.test.ts +1 -1
- package/plugins/design/dev-server/test/snap-distance-pill.test.ts +1 -1
- package/plugins/design/dev-server/test/sync-agent.test.ts +2 -3
- package/plugins/design/dev-server/test/sync-atomic-write.test.ts +2 -3
- package/plugins/design/dev-server/test/sync-codec.test.ts +1 -1
- package/plugins/design/dev-server/test/sync-connection-state.test.ts +1 -1
- package/plugins/design/dev-server/test/sync-echo-guard.test.ts +1 -1
- package/plugins/design/dev-server/test/sync-fs-mirror.test.ts +1 -2
- package/plugins/design/dev-server/test/sync-hardening.test.ts +4 -5
- package/plugins/design/dev-server/test/sync-hubs-config.test.ts +1 -2
- package/plugins/design/dev-server/test/sync-meta-codec.test.ts +1 -1
- package/plugins/design/dev-server/test/sync-runtime.test.ts +3 -8
- package/plugins/design/dev-server/test/sync-status.test.ts +1 -1
- package/plugins/design/dev-server/test/sync-untrusted.test.ts +1 -2
- package/plugins/design/dev-server/test/undo-stack.test.ts +2 -2
- package/plugins/design/dev-server/test/use-agent-presence.test.tsx +4 -1
- package/plugins/design/dev-server/test/use-artboard-drag.test.ts +3 -3
- package/plugins/design/dev-server/test/use-canvas-activity.test.tsx +2 -2
- package/plugins/design/dev-server/test/use-selection-set.test.tsx +1 -1
- package/plugins/design/dev-server/test/use-snap-guides.test.ts +1 -1
- package/plugins/design/dev-server/test/use-undo-stack.test.tsx +2 -2
- package/plugins/design/dev-server/use-agent-presence.tsx +1 -1
- package/plugins/design/dev-server/use-annotation-resize.tsx +1 -5
- package/plugins/design/dev-server/use-annotation-selection.tsx +2 -6
- package/plugins/design/dev-server/use-annotations-visibility.tsx +1 -1
- package/plugins/design/dev-server/use-artboard-drag.tsx +1 -1
- package/plugins/design/dev-server/use-canvas-activity.tsx +1 -1
- package/plugins/design/dev-server/use-collab.tsx +3 -4
- package/plugins/design/dev-server/use-selection-set.tsx +1 -1
- package/plugins/design/dev-server/use-tool-mode.tsx +1 -1
- package/plugins/design/dev-server/use-undo-stack.tsx +4 -5
- package/plugins/design/templates/_shell.html +3 -3
- package/plugins/design/templates/design-system-inspiration/SUB-AGENT-PROMPTS.md +18 -3
|
@@ -23,15 +23,15 @@
|
|
|
23
23
|
|
|
24
24
|
import type { Rect } from './geometry.ts';
|
|
25
25
|
import {
|
|
26
|
-
|
|
26
|
+
circle,
|
|
27
27
|
type DrawPrimitive,
|
|
28
28
|
type DrawStyle,
|
|
29
|
-
type Point,
|
|
30
|
-
circle,
|
|
31
29
|
fe,
|
|
32
30
|
filter,
|
|
33
31
|
group,
|
|
34
32
|
line,
|
|
33
|
+
type Point,
|
|
34
|
+
path,
|
|
35
35
|
} from './primitives.ts';
|
|
36
36
|
|
|
37
37
|
function fmt(n: number): string {
|
|
@@ -18,11 +18,11 @@
|
|
|
18
18
|
* React-free (DDR-067) — nothing here imports react / a `.tsx`.
|
|
19
19
|
*/
|
|
20
20
|
|
|
21
|
-
export * from './primitives.ts';
|
|
22
|
-
export * from './geometry.ts';
|
|
23
|
-
export * from './palette.ts';
|
|
24
|
-
export * from './composition.ts';
|
|
25
21
|
export * from './brush.ts';
|
|
22
|
+
export * from './composition.ts';
|
|
23
|
+
export * from './geometry.ts';
|
|
26
24
|
export * from './layout.ts';
|
|
27
|
-
export * from './serialize.ts';
|
|
28
25
|
export * from './optimize.ts';
|
|
26
|
+
export * from './palette.ts';
|
|
27
|
+
export * from './primitives.ts';
|
|
28
|
+
export * from './serialize.ts';
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
17
|
import { type Rect, routeConnector } from './geometry.ts';
|
|
18
|
-
import { type DrawPrimitive, type Point,
|
|
18
|
+
import { type DrawPrimitive, group, type Point, polyline, rect, snap, text } from './primitives.ts';
|
|
19
19
|
|
|
20
20
|
// ─────────────────────────────────────────────────────────────────────────────
|
|
21
21
|
// Grid + modular scale
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { describe, expect, test } from 'bun:test';
|
|
2
2
|
import type { Rect } from '../geometry.ts';
|
|
3
|
-
import { type LabelItem,
|
|
3
|
+
import { diagram, type LabelItem, modularScale, placeLabels, snapToGrid } from '../layout.ts';
|
|
4
4
|
import type { Point } from '../primitives.ts';
|
|
5
5
|
|
|
6
6
|
describe('grid + modular scale', () => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { describe, expect, test } from 'bun:test';
|
|
2
|
-
import { path, circle, group, line, rect, text } from '../primitives.ts';
|
|
3
2
|
import type { DrawPrimitive } from '../primitives.ts';
|
|
3
|
+
import { circle, group, line, path, rect, text } from '../primitives.ts';
|
|
4
4
|
import { primitivesToNodes, toJsx, toSvg } from '../serialize.ts';
|
|
5
5
|
|
|
6
6
|
const SAMPLE: DrawPrimitive[] = [
|
|
@@ -15,9 +15,9 @@
|
|
|
15
15
|
import { useEffect, useRef, useState } from 'react';
|
|
16
16
|
|
|
17
17
|
import {
|
|
18
|
+
detectEqualSpacing,
|
|
18
19
|
type EqualSpacingResult,
|
|
19
20
|
type SpacingAxis,
|
|
20
|
-
detectEqualSpacing,
|
|
21
21
|
} from './equal-spacing-detector.ts';
|
|
22
22
|
import { useSelectionSet } from './use-selection-set.tsx';
|
|
23
23
|
|
|
@@ -20,9 +20,8 @@
|
|
|
20
20
|
* Results land in .ai/decisions/DDR-024 + .ai/logs/phase-4-perf-<date>.md.
|
|
21
21
|
*/
|
|
22
22
|
|
|
23
|
-
import { useEffect } from 'react';
|
|
24
|
-
|
|
25
23
|
import { DCArtboard, DCSection, DesignCanvas } from '@maude/canvas-lib';
|
|
24
|
+
import { useEffect } from 'react';
|
|
26
25
|
|
|
27
26
|
const ARTBOARD_COUNT = 100;
|
|
28
27
|
const NODES_PER_ARTBOARD = 30;
|
|
@@ -13,10 +13,10 @@ import path from 'node:path';
|
|
|
13
13
|
import JSZip from 'jszip';
|
|
14
14
|
|
|
15
15
|
import {
|
|
16
|
+
canvasShellUrl,
|
|
16
17
|
type ExportContext,
|
|
17
18
|
type ExportOptions,
|
|
18
19
|
type ExportResult,
|
|
19
|
-
canvasShellUrl,
|
|
20
20
|
} from './index.ts';
|
|
21
21
|
import type { Target } from './scope.ts';
|
|
22
22
|
|
|
@@ -13,7 +13,7 @@ import * as html from './html.ts';
|
|
|
13
13
|
import * as pdf from './pdf.ts';
|
|
14
14
|
import * as png from './png.ts';
|
|
15
15
|
import * as pptx from './pptx.ts';
|
|
16
|
-
import { type ResolveScopeArgs, type Scope, type Target
|
|
16
|
+
import { type ResolveScopeArgs, resolveScope, type Scope, type Target } from './scope.ts';
|
|
17
17
|
import * as svg from './svg.ts';
|
|
18
18
|
import * as zip from './zip.ts';
|
|
19
19
|
|
|
@@ -100,8 +100,8 @@ export async function runExport(args: {
|
|
|
100
100
|
return adapter.run(targets, args.options, args.ctx);
|
|
101
101
|
}
|
|
102
102
|
|
|
103
|
-
export { resolveScope };
|
|
104
103
|
export type { Scope, Target };
|
|
104
|
+
export { resolveScope };
|
|
105
105
|
|
|
106
106
|
/**
|
|
107
107
|
* Build the `_canvas-shell.html?canvas=…&tokens=…&components=…` URL the
|
|
@@ -15,10 +15,10 @@ import path from 'node:path';
|
|
|
15
15
|
import { PDFDocument } from 'pdf-lib';
|
|
16
16
|
|
|
17
17
|
import {
|
|
18
|
+
canvasShellUrl,
|
|
18
19
|
type ExportContext,
|
|
19
20
|
type ExportOptions,
|
|
20
21
|
type ExportResult,
|
|
21
|
-
canvasShellUrl,
|
|
22
22
|
} from './index.ts';
|
|
23
23
|
import type { Target } from './scope.ts';
|
|
24
24
|
|
|
@@ -14,10 +14,10 @@ import path from 'node:path';
|
|
|
14
14
|
import JSZip from 'jszip';
|
|
15
15
|
|
|
16
16
|
import {
|
|
17
|
+
canvasShellUrl,
|
|
17
18
|
type ExportContext,
|
|
18
19
|
type ExportOptions,
|
|
19
20
|
type ExportResult,
|
|
20
|
-
canvasShellUrl,
|
|
21
21
|
} from './index.ts';
|
|
22
22
|
import type { Target } from './scope.ts';
|
|
23
23
|
|
|
@@ -28,10 +28,10 @@ import PptxGenJS from 'pptxgenjs';
|
|
|
28
28
|
|
|
29
29
|
import { getBrowserBundle } from './_browser-bundles.ts';
|
|
30
30
|
import {
|
|
31
|
+
canvasShellUrl,
|
|
31
32
|
type ExportContext,
|
|
32
33
|
type ExportOptions,
|
|
33
34
|
type ExportResult,
|
|
34
|
-
canvasShellUrl,
|
|
35
35
|
} from './index.ts';
|
|
36
36
|
import type { Target } from './scope.ts';
|
|
37
37
|
|
|
@@ -14,10 +14,10 @@ import JSZip from 'jszip';
|
|
|
14
14
|
|
|
15
15
|
import { getBrowserBundle } from './_browser-bundles.ts';
|
|
16
16
|
import {
|
|
17
|
+
canvasShellUrl,
|
|
17
18
|
type ExportContext,
|
|
18
19
|
type ExportOptions,
|
|
19
20
|
type ExportResult,
|
|
20
|
-
canvasShellUrl,
|
|
21
21
|
} from './index.ts';
|
|
22
22
|
import type { Target } from './scope.ts';
|
|
23
23
|
|
|
@@ -19,7 +19,7 @@ import type { ActiveJsonShape } from './exporters/scope.ts';
|
|
|
19
19
|
import type { Inspect } from './inspect.ts';
|
|
20
20
|
import { canvasSlug, writeLocator } from './locator.ts';
|
|
21
21
|
import { DEV_SERVER_ROOT } from './paths.ts';
|
|
22
|
-
import {
|
|
22
|
+
import { getRuntimeBundle, packageForSlug, RUNTIME_PACKAGES, slugFor } from './runtime-bundle.ts';
|
|
23
23
|
|
|
24
24
|
// Real disk install root — never the virtual `/$bunfs/root` of compiled bins.
|
|
25
25
|
// See paths.ts for the resolution logic + Phase 19.1 / v0.18.1 rationale.
|
|
@@ -28,7 +28,7 @@ import { createHttp } from './http.ts';
|
|
|
28
28
|
import { createInspect } from './inspect.ts';
|
|
29
29
|
import { startHeapWatch } from './mem.ts';
|
|
30
30
|
import { createSyncRuntime } from './sync/index.ts';
|
|
31
|
-
import {
|
|
31
|
+
import { createWs, isLoopbackHost, parseCollabSlug, type WsData } from './ws.ts';
|
|
32
32
|
|
|
33
33
|
// Phase 19 / DDR-044 — covers the marketplace-cache-install gap where
|
|
34
34
|
// node_modules/ ships empty (git clone honors .gitignore). Auto-installs +
|
|
@@ -33,7 +33,6 @@ import type * as Y from 'yjs';
|
|
|
33
33
|
|
|
34
34
|
import { atomicWrite } from './atomic-write.ts';
|
|
35
35
|
import {
|
|
36
|
-
Y_SYNC_TYPES,
|
|
37
36
|
annotationsFromDoc,
|
|
38
37
|
applyAnnotationsToDoc,
|
|
39
38
|
applyCommentsToDoc,
|
|
@@ -45,6 +44,7 @@ import {
|
|
|
45
44
|
htmlFromDoc,
|
|
46
45
|
mergeSharedMetaIntoLocal,
|
|
47
46
|
metaFromDoc,
|
|
47
|
+
Y_SYNC_TYPES,
|
|
48
48
|
} from './codec.ts';
|
|
49
49
|
import { type EchoGuard, hashBytes } from './echo-guard.ts';
|
|
50
50
|
|
|
@@ -29,15 +29,15 @@ import type { Context } from '../context.ts';
|
|
|
29
29
|
import { type CanvasSyncAgent, createCanvasSyncAgent } from './agent.ts';
|
|
30
30
|
import {
|
|
31
31
|
type ConnectionMonitor,
|
|
32
|
-
type ProviderStatus,
|
|
33
32
|
createConnectionMonitor,
|
|
33
|
+
type ProviderStatus,
|
|
34
34
|
} from './connection-state.ts';
|
|
35
|
-
import { type EchoGuard
|
|
36
|
-
import { type FsReader
|
|
35
|
+
import { createEchoGuard, type EchoGuard } from './echo-guard.ts';
|
|
36
|
+
import { createFsReader, type FsReader } from './fs-mirror.ts';
|
|
37
37
|
import { getHubToken } from './hubs-config.ts';
|
|
38
38
|
import { migrateSeed } from './migrate-seed.ts';
|
|
39
|
-
import { type DocProjection
|
|
40
|
-
import { type SyncStatusStore
|
|
39
|
+
import { createDocProjection, type DocProjection } from './projection.ts';
|
|
40
|
+
import { createSyncStatusStore, type SyncStatusStore } from './status.ts';
|
|
41
41
|
import { writeUntrustedMarkers } from './untrusted.ts';
|
|
42
42
|
|
|
43
43
|
/** A minimum-surface stand-in for the HocuspocusProvider's runtime API. */
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
|
|
22
22
|
import type * as Y from 'yjs';
|
|
23
23
|
import { Y_TYPES } from '../collab/persistence.ts';
|
|
24
|
-
import {
|
|
24
|
+
import { annotationsFromDoc, commentsFromDoc, Y_SYNC_TYPES } from './codec.ts';
|
|
25
25
|
|
|
26
26
|
export interface CanonicalMaterialization {
|
|
27
27
|
html: string;
|
|
@@ -59,4 +59,4 @@ export function materializeCanonical(doc: Y.Doc): string {
|
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
// Re-export so a shadow-compare caller has the type names in one import.
|
|
62
|
-
export {
|
|
62
|
+
export { Y_SYNC_TYPES, Y_TYPES };
|
|
@@ -34,12 +34,12 @@ import type * as Y from 'yjs';
|
|
|
34
34
|
|
|
35
35
|
import { Y_TYPES } from '../collab/persistence.ts';
|
|
36
36
|
import {
|
|
37
|
-
Y_SYNC_TYPES,
|
|
38
37
|
applyAnnotationsToDoc,
|
|
39
38
|
applyCommentsToDoc,
|
|
40
39
|
applyCssToDoc,
|
|
41
40
|
applyHtmlToDoc,
|
|
42
41
|
applyMetaToDoc,
|
|
42
|
+
Y_SYNC_TYPES,
|
|
43
43
|
} from './codec.ts';
|
|
44
44
|
import { ORIGINS } from './origins.ts';
|
|
45
45
|
|
|
@@ -30,9 +30,6 @@ import type * as Y from 'yjs';
|
|
|
30
30
|
|
|
31
31
|
import { atomicWrite } from './atomic-write.ts';
|
|
32
32
|
import {
|
|
33
|
-
MAX_CSS_BYTES,
|
|
34
|
-
MAX_HTML_BYTES,
|
|
35
|
-
MAX_META_BYTES,
|
|
36
33
|
applyAnnotationsToDoc,
|
|
37
34
|
applyCommentsToDoc,
|
|
38
35
|
applyCssToDoc,
|
|
@@ -40,6 +37,9 @@ import {
|
|
|
40
37
|
applyMetaToDoc,
|
|
41
38
|
cssFromDoc,
|
|
42
39
|
htmlFromDoc,
|
|
40
|
+
MAX_CSS_BYTES,
|
|
41
|
+
MAX_HTML_BYTES,
|
|
42
|
+
MAX_META_BYTES,
|
|
43
43
|
mergeSharedMetaIntoLocal,
|
|
44
44
|
metaFromDoc,
|
|
45
45
|
} from './codec.ts';
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import { describe, expect, test } from 'bun:test';
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import { createAiActivity, HEARTBEAT_GRACE_MS } from '../collab/ai-activity.ts';
|
|
6
6
|
import { type Context, createBus } from '../context.ts';
|
|
7
7
|
|
|
8
8
|
function makeCtx(): { ctx: Context; events: { file: string; entry: unknown }[] } {
|
|
@@ -8,11 +8,10 @@
|
|
|
8
8
|
// - PUT rejects oversized bodies (>1 MB)
|
|
9
9
|
// - Unknown method → 405
|
|
10
10
|
|
|
11
|
+
import { describe, expect, test } from 'bun:test';
|
|
11
12
|
import { existsSync, mkdirSync, readFileSync, writeFileSync } from 'node:fs';
|
|
12
13
|
import { join } from 'node:path';
|
|
13
14
|
|
|
14
|
-
import { describe, expect, test } from 'bun:test';
|
|
15
|
-
|
|
16
15
|
import { bootServer, killProc, makeSandbox, nextPort } from './_helpers.ts';
|
|
17
16
|
|
|
18
17
|
const SVG_OK =
|
|
@@ -6,13 +6,13 @@ import { describe, expect, test } from 'bun:test';
|
|
|
6
6
|
|
|
7
7
|
import {
|
|
8
8
|
type ArrowStroke,
|
|
9
|
+
applyDrawModifiers,
|
|
10
|
+
constrainDrawBox,
|
|
9
11
|
type EllipseStroke,
|
|
10
12
|
type PenStroke,
|
|
11
13
|
type PolygonStroke,
|
|
12
14
|
type RectStroke,
|
|
13
15
|
type StickyStroke,
|
|
14
|
-
applyDrawModifiers,
|
|
15
|
-
constrainDrawBox,
|
|
16
16
|
} from '../annotations-layer.tsx';
|
|
17
17
|
|
|
18
18
|
const NONE = { shift: false, alt: false };
|
|
@@ -11,23 +11,23 @@ import { describe, expect, test } from 'bun:test';
|
|
|
11
11
|
|
|
12
12
|
import {
|
|
13
13
|
type ArrowStroke,
|
|
14
|
+
arrowHeadPoints,
|
|
14
15
|
type EllipseStroke,
|
|
15
16
|
type PenStroke,
|
|
16
17
|
type PolygonStroke,
|
|
17
|
-
type RectStroke,
|
|
18
|
-
STICKY_PALETTE,
|
|
19
|
-
type StickyStroke,
|
|
20
|
-
type Stroke,
|
|
21
|
-
type TextStroke,
|
|
22
|
-
arrowHeadPoints,
|
|
23
18
|
penPathD,
|
|
24
19
|
polygonPoints,
|
|
25
20
|
polygonVertices,
|
|
21
|
+
type RectStroke,
|
|
26
22
|
rid,
|
|
23
|
+
STICKY_PALETTE,
|
|
24
|
+
type StickyStroke,
|
|
25
|
+
type Stroke,
|
|
27
26
|
strokeBBox,
|
|
28
27
|
strokeHitTest,
|
|
29
28
|
strokesShallowEqual,
|
|
30
29
|
strokesToSvg,
|
|
30
|
+
type TextStroke,
|
|
31
31
|
} from '../annotations-layer.tsx';
|
|
32
32
|
|
|
33
33
|
describe('annotations-layer / penPathD', () => {
|
|
@@ -9,7 +9,7 @@ import { mkdirSync, mkdtempSync, rmSync, writeFileSync } from 'node:fs';
|
|
|
9
9
|
import { tmpdir } from 'node:os';
|
|
10
10
|
import { join } from 'node:path';
|
|
11
11
|
|
|
12
|
-
import { type SelfHealOptions
|
|
12
|
+
import { bootSelfHeal, type SelfHealOptions } from '../boot-self-heal.ts';
|
|
13
13
|
|
|
14
14
|
let TMP: string;
|
|
15
15
|
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
import { describe, expect, test } from 'bun:test';
|
|
7
7
|
|
|
8
|
-
import {
|
|
8
|
+
import { applyEdit, CanvasEditError, editAttribute } from '../canvas-edit.ts';
|
|
9
9
|
import { transpileCanvasSource } from '../canvas-pipeline.ts';
|
|
10
10
|
|
|
11
11
|
const CANVAS = '/abs/Canvas.tsx';
|
|
@@ -18,7 +18,7 @@ afterAll(() => {
|
|
|
18
18
|
});
|
|
19
19
|
|
|
20
20
|
import { act, createElement } from 'react';
|
|
21
|
-
import { type Root
|
|
21
|
+
import { createRoot, type Root } from 'react-dom/client';
|
|
22
22
|
|
|
23
23
|
import { CanvasErrorBoundary } from '../canvas-comment-mount.tsx';
|
|
24
24
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
import { describe, expect, test } from 'bun:test';
|
|
5
5
|
|
|
6
|
-
import {
|
|
6
|
+
import { buildLibMap, inlineUsedExports, type LibMap } from '../canvas-lib-inline.ts';
|
|
7
7
|
|
|
8
8
|
const LIB_PATH = '/virtual/_lib/canvas-lib.tsx';
|
|
9
9
|
|
|
@@ -2,12 +2,11 @@
|
|
|
2
2
|
// bundled canvas-lib (Phase 3.6.1 Task 2; relocated to dev-server in Phase
|
|
3
3
|
// 4.0.5 per DDR-025).
|
|
4
4
|
|
|
5
|
+
import { afterAll, beforeAll, describe, expect, test } from 'bun:test';
|
|
5
6
|
import { existsSync } from 'node:fs';
|
|
6
7
|
import { mkdir, rm, writeFile } from 'node:fs/promises';
|
|
7
8
|
import path from 'node:path';
|
|
8
9
|
|
|
9
|
-
import { afterAll, beforeAll, describe, expect, test } from 'bun:test';
|
|
10
|
-
|
|
11
10
|
import { buildCanvasModule } from '../canvas-build.ts';
|
|
12
11
|
import {
|
|
13
12
|
CANVAS_LIB_SPECIFIER,
|
|
@@ -8,11 +8,10 @@
|
|
|
8
8
|
// - GET returns the merged meta
|
|
9
9
|
// - Paths that escape repoRoot are 400
|
|
10
10
|
|
|
11
|
+
import { describe, expect, test } from 'bun:test';
|
|
11
12
|
import { mkdirSync, readFileSync, writeFileSync } from 'node:fs';
|
|
12
13
|
import { join } from 'node:path';
|
|
13
14
|
|
|
14
|
-
import { describe, expect, test } from 'bun:test';
|
|
15
|
-
|
|
16
15
|
import { bootServer, killProc, makeSandbox, nextPort } from './_helpers.ts';
|
|
17
16
|
|
|
18
17
|
interface MetaShape {
|
|
@@ -5,11 +5,10 @@
|
|
|
5
5
|
// designRoot assets + the shell still serve; (4) the shell carries the hardened
|
|
6
6
|
// CSP. See .ai/logs/security-reviews/phase-9.1-t2-f1-cross-origin-reaudit.md.
|
|
7
7
|
|
|
8
|
+
import { describe, expect, test } from 'bun:test';
|
|
8
9
|
import { mkdirSync, readFileSync, writeFileSync } from 'node:fs';
|
|
9
10
|
import { join } from 'node:path';
|
|
10
11
|
|
|
11
|
-
import { describe, expect, test } from 'bun:test';
|
|
12
|
-
|
|
13
12
|
import { bootServer, killProc, makeSandbox, nextPort } from './_helpers.ts';
|
|
14
13
|
|
|
15
14
|
async function readCanvasOrigin(designRoot: string): Promise<string> {
|
|
@@ -45,7 +45,7 @@ describe('Registry.syncRoomFromAnnotations', () => {
|
|
|
45
45
|
test('inspector-write origin propagates through doc.update', () => {
|
|
46
46
|
const r = createRegistry(noopCallbacks());
|
|
47
47
|
const room = r.get('echo-slug');
|
|
48
|
-
let lastOrigin: unknown
|
|
48
|
+
let lastOrigin: unknown;
|
|
49
49
|
room.doc.on('update', (_update, origin) => {
|
|
50
50
|
lastOrigin = origin;
|
|
51
51
|
});
|
|
@@ -71,7 +71,7 @@ describe('Registry inspector-bridge', () => {
|
|
|
71
71
|
test('inspector-write origin triggers doc.update broadcast', async () => {
|
|
72
72
|
const r = createRegistry(noopCallbacks());
|
|
73
73
|
const room = r.get('echo-slug');
|
|
74
|
-
let lastOrigin: unknown
|
|
74
|
+
let lastOrigin: unknown;
|
|
75
75
|
room.doc.on('update', (_update, origin) => {
|
|
76
76
|
lastOrigin = origin;
|
|
77
77
|
});
|
|
@@ -8,12 +8,12 @@ import { Awareness } from 'y-protocols/awareness';
|
|
|
8
8
|
import * as Y from 'yjs';
|
|
9
9
|
|
|
10
10
|
import {
|
|
11
|
-
MESSAGE_AWARENESS,
|
|
12
|
-
MESSAGE_SYNC,
|
|
13
11
|
encodeAwarenessFrame,
|
|
14
12
|
encodeHandshake,
|
|
15
13
|
encodeSyncUpdate,
|
|
16
14
|
handleMessage,
|
|
15
|
+
MESSAGE_AWARENESS,
|
|
16
|
+
MESSAGE_SYNC,
|
|
17
17
|
} from '../collab/protocol.ts';
|
|
18
18
|
|
|
19
19
|
function readType(frame: Uint8Array): number {
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
encodeSyncUpdate,
|
|
13
13
|
handleMessage,
|
|
14
14
|
} from '../collab/protocol.ts';
|
|
15
|
-
import { type RoomCallbacks, type RoomConn
|
|
15
|
+
import { createRoom, type RoomCallbacks, type RoomConn } from '../collab/room.ts';
|
|
16
16
|
|
|
17
17
|
function makeConn(id: string): RoomConn & { recv: Uint8Array[] } {
|
|
18
18
|
const recv: Uint8Array[] = [];
|
|
@@ -19,7 +19,7 @@ import { afterEach, describe, expect, test } from 'bun:test';
|
|
|
19
19
|
import { Awareness } from 'y-protocols/awareness';
|
|
20
20
|
import * as Y from 'yjs';
|
|
21
21
|
|
|
22
|
-
import { type RoomConn
|
|
22
|
+
import { createRoom, type RoomConn } from '../collab/room.ts';
|
|
23
23
|
|
|
24
24
|
const STRESS_MS = Number(process.env.MAUDE_STRESS_MS ?? 10_000);
|
|
25
25
|
const RSS_GROWTH_LIMIT_MB = 20;
|
|
@@ -11,11 +11,10 @@
|
|
|
11
11
|
// git sandbox; gracefully empty if git fails)
|
|
12
12
|
// - Reply on unknown id → 404
|
|
13
13
|
|
|
14
|
+
import { describe, expect, test } from 'bun:test';
|
|
14
15
|
import { mkdirSync, readFileSync, writeFileSync } from 'node:fs';
|
|
15
16
|
import { join } from 'node:path';
|
|
16
17
|
|
|
17
|
-
import { describe, expect, test } from 'bun:test';
|
|
18
|
-
|
|
19
18
|
import { bootServer, killProc, makeSandbox, nextPort } from './_helpers.ts';
|
|
20
19
|
|
|
21
20
|
async function initGit(root: string) {
|
|
@@ -4,12 +4,11 @@
|
|
|
4
4
|
// no spawn): given a target, it writes two files (`init-oxc-<slug>.ts` +
|
|
5
5
|
// `server-<slug>.ts`) under dist/.compile-entries/ and returns the entry path.
|
|
6
6
|
|
|
7
|
+
import { describe, expect, test } from 'bun:test';
|
|
7
8
|
import { existsSync, readFileSync, rmSync } from 'node:fs';
|
|
8
9
|
import { dirname, join } from 'node:path';
|
|
9
10
|
import { fileURLToPath } from 'node:url';
|
|
10
11
|
|
|
11
|
-
import { describe, expect, test } from 'bun:test';
|
|
12
|
-
|
|
13
12
|
import { writeCompileEntry } from '../build.ts';
|
|
14
13
|
|
|
15
14
|
const ROOT = dirname(fileURLToPath(import.meta.url));
|
|
@@ -4,9 +4,8 @@
|
|
|
4
4
|
// + the empty/file-tree branches.
|
|
5
5
|
|
|
6
6
|
import { describe, expect, test } from 'bun:test';
|
|
7
|
-
|
|
8
|
-
import { buildHandoffMarkdown } from '../../exporters/canva-handoff-prompt.ts';
|
|
9
7
|
import { run } from '../../exporters/canva.ts';
|
|
8
|
+
import { buildHandoffMarkdown } from '../../exporters/canva-handoff-prompt.ts';
|
|
10
9
|
|
|
11
10
|
const CTX = {
|
|
12
11
|
designRoot: '/tmp/.design',
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
// Phase 6.5 T10 — export history persistence + endpoint.
|
|
2
2
|
|
|
3
|
+
import { describe, expect, test } from 'bun:test';
|
|
3
4
|
import { readFileSync } from 'node:fs';
|
|
4
5
|
import { join } from 'node:path';
|
|
5
6
|
|
|
6
|
-
import { describe, expect, test } from 'bun:test';
|
|
7
|
-
|
|
8
7
|
import { bootServer, killProc, makeSandbox, nextPort } from '../_helpers.ts';
|
|
9
8
|
|
|
10
9
|
interface HistoryShape {
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
import { describe, expect, test } from 'bun:test';
|
|
9
9
|
|
|
10
|
-
import { INSTALL_HINT,
|
|
10
|
+
import { INSTALL_HINT, isMissingBrowserError, NO_BROWSER_EXIT } from '../../bin/_pw-launch.mjs';
|
|
11
11
|
|
|
12
12
|
describe('_pw-launch — missing-browser classifier', () => {
|
|
13
13
|
test('matches the real Playwright "Executable doesn\'t exist" message', () => {
|