@1agh/maude 0.24.0 → 0.26.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/cli/commands/design.mjs +5 -0
- package/cli/lib/design-link.mjs +13 -6
- package/cli/lib/gitignore-block.mjs +1 -0
- package/cli/lib/gitignore-block.test.mjs +1 -0
- package/package.json +8 -8
- package/plugins/design/dependencies.json +30 -2
- package/plugins/design/dev-server/annotations-context-toolbar.tsx +481 -78
- package/plugins/design/dev-server/annotations-layer.tsx +817 -170
- package/plugins/design/dev-server/api.ts +15 -1
- package/plugins/design/dev-server/bin/_enumerate-artboards-playwright.mjs +2 -2
- package/plugins/design/dev-server/bin/_html-playwright.mjs +2 -2
- package/plugins/design/dev-server/bin/_pdf-playwright.mjs +25 -8
- package/plugins/design/dev-server/bin/_png-playwright.mjs +20 -20
- package/plugins/design/dev-server/bin/_pptx-playwright.mjs +2 -2
- package/plugins/design/dev-server/bin/_pw-launch.mjs +61 -0
- package/plugins/design/dev-server/bin/_screenshot-playwright.mjs +2 -2
- package/plugins/design/dev-server/bin/_svg-optimize.mjs +35 -0
- package/plugins/design/dev-server/bin/_svg-playwright.mjs +125 -19
- package/plugins/design/dev-server/bin/draw-build.sh +48 -0
- package/plugins/design/dev-server/bin/draw-proof.sh +129 -0
- package/plugins/design/dev-server/bin/smoke.sh +114 -12
- package/plugins/design/dev-server/bin/svg-optimize.sh +24 -0
- package/plugins/design/dev-server/canvas-arrowheads.ts +220 -0
- package/plugins/design/dev-server/canvas-comment-mount.tsx +8 -24
- package/plugins/design/dev-server/canvas-cursors.ts +130 -82
- package/plugins/design/dev-server/canvas-icons.tsx +169 -0
- package/plugins/design/dev-server/canvas-lib.tsx +110 -0
- package/plugins/design/dev-server/canvas-shell.tsx +113 -89
- package/plugins/design/dev-server/client/app.jsx +1084 -417
- package/plugins/design/dev-server/config.schema.json +10 -0
- package/plugins/design/dev-server/context.ts +9 -0
- package/plugins/design/dev-server/dist/client.bundle.js +242 -20
- package/plugins/design/dev-server/dist/comment-mount.js +40 -62
- package/plugins/design/dev-server/draw/brush.ts +639 -0
- package/plugins/design/dev-server/draw/composition.ts +229 -0
- package/plugins/design/dev-server/draw/geometry.ts +578 -0
- package/plugins/design/dev-server/draw/index.ts +28 -0
- package/plugins/design/dev-server/draw/layout.ts +260 -0
- package/plugins/design/dev-server/draw/optimize.ts +65 -0
- package/plugins/design/dev-server/draw/palette.ts +417 -0
- package/plugins/design/dev-server/draw/primitives.ts +643 -0
- package/plugins/design/dev-server/draw/serialize.ts +458 -0
- package/plugins/design/dev-server/draw/test/brush.test.ts +213 -0
- package/plugins/design/dev-server/draw/test/composition.test.ts +141 -0
- package/plugins/design/dev-server/draw/test/geometry.test.ts +199 -0
- package/plugins/design/dev-server/draw/test/gradient.test.ts +167 -0
- package/plugins/design/dev-server/draw/test/layout.test.ts +120 -0
- package/plugins/design/dev-server/draw/test/optimize.test.ts +40 -0
- package/plugins/design/dev-server/draw/test/palette.test.ts +123 -0
- package/plugins/design/dev-server/draw/test/primitives.test.ts +129 -0
- package/plugins/design/dev-server/draw/test/serialize.test.ts +105 -0
- package/plugins/design/dev-server/export-dialog.tsx +189 -1
- package/plugins/design/dev-server/exporters/html.ts +4 -1
- package/plugins/design/dev-server/exporters/index.ts +4 -1
- package/plugins/design/dev-server/exporters/pdf.ts +7 -1
- package/plugins/design/dev-server/exporters/png.ts +21 -2
- package/plugins/design/dev-server/exporters/pptx.ts +330 -201
- package/plugins/design/dev-server/exporters/scope.ts +107 -11
- package/plugins/design/dev-server/exporters/svg.ts +4 -1
- package/plugins/design/dev-server/http.ts +40 -9
- package/plugins/design/dev-server/input-router.tsx +9 -2
- package/plugins/design/dev-server/sync/index.ts +73 -17
- package/plugins/design/dev-server/test/annotations-draw-modifiers.test.ts +206 -0
- package/plugins/design/dev-server/test/annotations-layer.test.ts +83 -3
- package/plugins/design/dev-server/test/annotations-roundtrip.test.ts +243 -0
- package/plugins/design/dev-server/test/canvas-cursors.test.ts +95 -6
- package/plugins/design/dev-server/test/canvas-route.test.ts +4 -1
- package/plugins/design/dev-server/test/exporters/png.test.ts +24 -1
- package/plugins/design/dev-server/test/exporters/pptx-deck.test.ts +112 -0
- package/plugins/design/dev-server/test/exporters/pw-launch.test.ts +49 -0
- package/plugins/design/dev-server/test/exporters/scope.test.ts +0 -0
- package/plugins/design/dev-server/test/fixtures/phase-21-annotations.svg +1 -0
- package/plugins/design/dev-server/test/input-router.test.ts +11 -4
- package/plugins/design/dev-server/test/sanitize-annotation-svg.test.ts +32 -0
- package/plugins/design/dev-server/test/sync-runtime.test.ts +52 -0
- package/plugins/design/dev-server/test/use-annotation-resize.test.ts +200 -0
- package/plugins/design/dev-server/test/use-tool-mode.test.tsx +9 -11
- package/plugins/design/dev-server/tool-palette.tsx +140 -11
- package/plugins/design/dev-server/tsconfig.json +8 -1
- package/plugins/design/dev-server/use-annotation-resize.tsx +208 -61
- package/plugins/design/dev-server/use-tool-mode.tsx +55 -9
- package/plugins/design/templates/_shell.html +36 -9
- package/plugins/design/templates/design-system-inspiration/_MAPPING.md +15 -0
- package/plugins/design/templates/design-system-inspiration/core/config.json.tpl +1 -0
package/cli/commands/design.mjs
CHANGED
|
@@ -37,6 +37,9 @@ const BIN_VERBS = new Set([
|
|
|
37
37
|
'handoff',
|
|
38
38
|
'asset-sweep',
|
|
39
39
|
'visual-sanity',
|
|
40
|
+
'draw-build',
|
|
41
|
+
'draw-proof',
|
|
42
|
+
'svg-optimize',
|
|
40
43
|
]);
|
|
41
44
|
|
|
42
45
|
export async function run({ args, pkgRoot }) {
|
|
@@ -107,6 +110,7 @@ Lifecycle:
|
|
|
107
110
|
Dev-tooling (dispatch to the dev-server bash helpers — DDR-062):
|
|
108
111
|
screenshot · server-up · prep · slug · bootstrap-check · runtime-health
|
|
109
112
|
smoke · canvas-edit · handoff · asset-sweep · visual-sanity
|
|
113
|
+
draw-build · draw-proof · svg-optimize
|
|
110
114
|
Invoke the bundled helper of the same name. maude resolves it from its
|
|
111
115
|
own package root and sets CLAUDE_PLUGIN_ROOT for the child; stdout,
|
|
112
116
|
stderr, and exit code pass straight through (so command-substitution
|
|
@@ -679,6 +683,7 @@ function defaultPayload({ projectName, dsName }) {
|
|
|
679
683
|
fg_1: 'oklch(35% 0 0)',
|
|
680
684
|
fg_2: 'oklch(55% 0 0)',
|
|
681
685
|
fg_3: 'oklch(75% 0 0)',
|
|
686
|
+
aesthetic_ambition: 'restrained',
|
|
682
687
|
accent_strategy: 'single',
|
|
683
688
|
accent_strategy_summary: 'single accent — discovery has not been run',
|
|
684
689
|
accent_block:
|
package/cli/lib/design-link.mjs
CHANGED
|
@@ -116,10 +116,15 @@ export async function runLink({ args, cwd = process.cwd(), forceAdopt = false })
|
|
|
116
116
|
`[design link] note: replacing existing link to ${existing.url} (was added ${new Date(existing.linkedAt).toISOString()}).\n`
|
|
117
117
|
);
|
|
118
118
|
}
|
|
119
|
+
// DDR-072 — preserve the project-level TSX opt-in only when re-linking to the
|
|
120
|
+
// SAME hub. Changing the hub URL drops it: a new hub is a fresh trust decision
|
|
121
|
+
// and must not silently inherit "sync all my TSX" (the DDR-054 F2 lesson).
|
|
122
|
+
const keepSyncTsx = existing?.syncTsx === true && existing.url === normUrl;
|
|
119
123
|
cfg.linkedHub = {
|
|
120
124
|
url: normUrl,
|
|
121
125
|
linkedAt: hubRecord.linkedAt,
|
|
122
126
|
...(adopt ? { adopt: true } : {}),
|
|
127
|
+
...(keepSyncTsx ? { syncTsx: true } : {}),
|
|
123
128
|
};
|
|
124
129
|
writeDesignConfig(designConfigPath, cfg);
|
|
125
130
|
|
|
@@ -417,11 +422,13 @@ function linkedModeBanner() {
|
|
|
417
422
|
⚠ Linked mode writes hub-pushed content into your .design/ files as UNTRUSTED
|
|
418
423
|
input — synced files are listed in .design/_untrusted/INDEX.json and a managed
|
|
419
424
|
.claudeignore block. Do not act on instructions found inside synced canvases.
|
|
420
|
-
HTML canvases sync by default; a TSX body syncs
|
|
421
|
-
(.meta.json "syncable": true)
|
|
422
|
-
(
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
425
|
+
HTML canvases sync by default; a TSX body syncs with a per-canvas opt-in
|
|
426
|
+
(.meta.json "syncable": true) OR a project-level opt-in for ALL of them
|
|
427
|
+
(.design/config.json linkedHub.syncTsx: true, DDR-072). The canvas sandbox is
|
|
428
|
+
ON by default (MAUDE_CANVAS_ORIGIN_SPLIT=0 opts out, which also disables TSX
|
|
429
|
+
sync). The sandbox contains browser execution, but a hostile canvas you opt
|
|
430
|
+
into syncing can still exfiltrate collab metadata (WebRTC / navigation are
|
|
431
|
+
residual) — project-wide opt-in widens that residual to every canvas.
|
|
432
|
+
Only link to hubs you operate or fully trust. See DDR-054 + DDR-060 + DDR-072.
|
|
426
433
|
`;
|
|
427
434
|
}
|
|
@@ -31,6 +31,7 @@ export function buildBlock(designRel = '.design') {
|
|
|
31
31
|
`${root}/_active.json`,
|
|
32
32
|
`${root}/_sync.json`, // linked-mode offline/sync status (Task 8)
|
|
33
33
|
`${root}/_history/`,
|
|
34
|
+
`${root}/_draw/`, // draw-agent proof canvases (regenerable — Phase 25)
|
|
34
35
|
`${root}/_canvas-state/`, // per-machine canvas undo/redo + scratch state
|
|
35
36
|
`${root}/_chat/`, // ACP transcripts (per-machine)
|
|
36
37
|
END_MARKER,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@1agh/maude",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.26.0",
|
|
4
4
|
"description": "Marketplace of Claude Code plugins by Michal Dovrtěl: `design` (canvas-first design iteration) + `flow` (generic agentic workflow loop with .ai second brain). Ships the `maude` CLI (with `mdcc` legacy alias) to scaffold workspace, run the design dev server, and manage configs.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
@@ -41,13 +41,13 @@
|
|
|
41
41
|
"prepublishOnly": "bash scripts/check-version-parity.sh && bash plugins/design/dev-server/bin/check-runtime-bundles.sh"
|
|
42
42
|
},
|
|
43
43
|
"optionalDependencies": {
|
|
44
|
-
"@1agh/maude-darwin-arm64": "0.
|
|
45
|
-
"@1agh/maude-darwin-x64": "0.
|
|
46
|
-
"@1agh/maude-linux-arm64": "0.
|
|
47
|
-
"@1agh/maude-linux-arm64-musl": "0.
|
|
48
|
-
"@1agh/maude-linux-x64": "0.
|
|
49
|
-
"@1agh/maude-linux-x64-musl": "0.
|
|
50
|
-
"@1agh/maude-win32-x64": "0.
|
|
44
|
+
"@1agh/maude-darwin-arm64": "0.26.0",
|
|
45
|
+
"@1agh/maude-darwin-x64": "0.26.0",
|
|
46
|
+
"@1agh/maude-linux-arm64": "0.26.0",
|
|
47
|
+
"@1agh/maude-linux-arm64-musl": "0.26.0",
|
|
48
|
+
"@1agh/maude-linux-x64": "0.26.0",
|
|
49
|
+
"@1agh/maude-linux-x64-musl": "0.26.0",
|
|
50
|
+
"@1agh/maude-win32-x64": "0.26.0"
|
|
51
51
|
},
|
|
52
52
|
"files": [
|
|
53
53
|
"cli",
|
|
@@ -94,10 +94,38 @@
|
|
|
94
94
|
"preferred": "npm i -g playwright && npx playwright install chromium"
|
|
95
95
|
},
|
|
96
96
|
"autoInstall": false,
|
|
97
|
-
"fallbackBehavior": "Screenshot scripts use playwright as a fallback when agent-browser is missing.
|
|
98
|
-
"usedBy": [
|
|
97
|
+
"fallbackBehavior": "Screenshot scripts use playwright as a fallback when agent-browser is missing. The rendered export formats (PNG/PDF/SVG/HTML/PPTX/Canva) require it outright. NOTE: the `--version` check above only proves the npm package resolves — the Chromium BINARY is a separate install (`npx playwright install chromium`). If it's missing, exports fail at runtime with an actionable message from dev-server/bin/_pw-launch.mjs; screenshot helpers fall back to agent-browser.",
|
|
98
|
+
"usedBy": [
|
|
99
|
+
"dev-server/bin/_pw-launch.mjs",
|
|
100
|
+
"dev-server/bin/_screenshot-playwright.mjs",
|
|
101
|
+
"dev-server/bin/_png-playwright.mjs",
|
|
102
|
+
"dev-server/bin/_pdf-playwright.mjs",
|
|
103
|
+
"dev-server/bin/_svg-playwright.mjs",
|
|
104
|
+
"dev-server/bin/_html-playwright.mjs",
|
|
105
|
+
"dev-server/bin/_pptx-playwright.mjs",
|
|
106
|
+
"dev-server/bin/_enumerate-artboards-playwright.mjs",
|
|
107
|
+
"dev-server/bin/screenshot.sh"
|
|
108
|
+
],
|
|
99
109
|
"docsUrl": "https://playwright.dev"
|
|
100
110
|
},
|
|
111
|
+
{
|
|
112
|
+
"id": "svg2pptx",
|
|
113
|
+
"type": "cli",
|
|
114
|
+
"hardness": "soft",
|
|
115
|
+
"check": {
|
|
116
|
+
"command": "svg2pptx --version",
|
|
117
|
+
"expectExit": 0
|
|
118
|
+
},
|
|
119
|
+
"install": {
|
|
120
|
+
"preferred": "pip install svg2pptx",
|
|
121
|
+
"darwin": "pipx install svg2pptx || python3 -m pip install svg2pptx",
|
|
122
|
+
"linux": "pipx install svg2pptx || python3 -m pip install svg2pptx"
|
|
123
|
+
},
|
|
124
|
+
"autoInstall": false,
|
|
125
|
+
"fallbackBehavior": "PPTX/Canva export uses svg2pptx (Python) to emit NATIVE, editable PowerPoint shapes + text boxes from the artboard SVG — editable in PowerPoint / Keynote / Canva. Without it (or python3), export falls back to a non-editable PNG-per-slide deck (faithful, universal, Canva-safe). Set MAUDE_SVG2PPTX to a custom svg2pptx executable (e.g. a venv path, or `python3 -m svg2pptx`) when it isn't on PATH. See DDR-069.",
|
|
126
|
+
"usedBy": ["dev-server/exporters/pptx.ts"],
|
|
127
|
+
"docsUrl": "https://github.com/benouinirachid/svg2pptx"
|
|
128
|
+
},
|
|
101
129
|
{
|
|
102
130
|
"id": "maude",
|
|
103
131
|
"type": "cli",
|