@1agh/maude 0.17.1 → 0.18.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.
Files changed (27) hide show
  1. package/cli/cli-wrapper.cjs +0 -0
  2. package/cli/commands/design.mjs +248 -43
  3. package/package.json +8 -8
  4. package/plugins/design/dev-server/bin/screenshot.sh +12 -0
  5. package/plugins/design/dev-server/boot-self-heal.ts +90 -0
  6. package/plugins/design/dev-server/build.ts +136 -8
  7. package/plugins/design/dev-server/canvas-pipeline.ts +5 -0
  8. package/plugins/design/dev-server/config.schema.json +12 -0
  9. package/plugins/design/dev-server/dist/client.bundle.js +3 -3
  10. package/plugins/design/dev-server/runtime-bundle.ts +29 -1
  11. package/plugins/design/dev-server/server.ts +6 -0
  12. package/plugins/design/dev-server/test/boot-self-heal.test.ts +112 -0
  13. package/plugins/design/dev-server/test/compile-entry.test.ts +134 -0
  14. package/plugins/design/dev-server/test/runtime-bundle-error-mapping.test.ts +43 -0
  15. package/plugins/design/templates/canvas.tsx.template +7 -7
  16. package/plugins/design/templates/design-system-inspiration/audience-pro/colors-presence.html +1 -1
  17. package/plugins/design/templates/design-system-inspiration/core/README.philosophy.md.tpl +11 -7
  18. package/plugins/design/templates/design-system-inspiration/core/SKILL.md.tpl +4 -3
  19. package/plugins/design/templates/design-system-inspiration/core/colors_and_type.css.tpl +61 -57
  20. package/plugins/design/templates/design-system-inspiration/core/config.json.tpl +2 -0
  21. package/plugins/design/templates/design-system-inspiration/core/preview/colors-accent.html +4 -4
  22. package/plugins/design/templates/design-system-inspiration/meta/presence-multiplayer.html +1 -1
  23. package/plugins/design/templates/design-system-inspiration/platform-desktop/ui_kits-desktop-showcase.html +3 -0
  24. package/plugins/design/templates/design-system-inspiration/platform-mobile/ui_kits-mobile-showcase.html +1 -1
  25. package/plugins/design/templates/design-system-inspiration/theme-both/colors-themes-side-by-side.html +6 -6
  26. package/plugins/design/templates/design-system-inspiration/universal/components-dialogs.html +3 -2
  27. package/plugins/design/templates/design-system-inspiration/universal/logo.html +2 -1
@@ -1,10 +1,10 @@
1
1
  <!--
2
2
  SPECIMEN: colors-accent
3
3
  DEMONSTRATES: --accent, --accent-hover, --accent-active, --accent-fg
4
- COMPOSITION: 4-state swatch grid + contextual button + link sample, demonstrating one-accent rule
4
+ COMPOSITION: 4-state swatch grid + contextual button + link sample, demonstrating the project's accent strategy
5
5
  COPY VOICE: action verbs ("Save", "Confirm", "Continue") — never "Click here" / "Get Started"
6
6
  WHEN SCAFFOLDED: always (Core)
7
- NOTES: This is THE place to demonstrate one-accent rule. The card should NOT show any --accent2 variant. accent-fg must clear WCAG AA against the accent background.
7
+ NOTES: Demonstrates the project's declared `accentStrategy` from config.json. For `single` (default) the card shows one accent family; for `paired` or `chromatic-N` the card should be extended to show every family. accent-fg must clear WCAG AA against the accent background.
8
8
  -->
9
9
  <!doctype html>
10
10
  <html lang="en">
@@ -17,7 +17,7 @@ NOTES: This is THE place to demonstrate one-accent rule. The card should NOT sho
17
17
  <body class="app" data-theme="dark">
18
18
  <main class="specimen">
19
19
  <h1>Accent</h1>
20
- <p class="lede">One accent family — four states. The one-accent rule means: when something needs attention, the answer is always this color, never a competing second hue. Sub-states cover hover, active, and the readable foreground that sits on top of it.</p>
20
+ <p class="lede">Accent family — four states (idle / hover / active / foreground). The project's `accentStrategy` declaration in <code>config.json</code> controls how many families exist; this specimen renders one. Extend it horizontally for `paired` or `chromatic-N` projects so every declared family appears side-by-side.</p>
21
21
 
22
22
  <div class="grid">
23
23
  <div class="swatch"><div class="chip" style="background: var(--accent);"></div><div class="meta"><strong>--accent</strong>Idle</div></div>
@@ -41,7 +41,7 @@ NOTES: This is THE place to demonstrate one-accent rule. The card should NOT sho
41
41
  </div>
42
42
 
43
43
  <footer class="legend">
44
- <p>The one-accent rule: no <code>--accent2</code>. Calls-to-attention should compete with each other through hierarchy and size, not through parallel hues.</p>
44
+ <p>Accent count follows <code>config.accentStrategy</code>. For `single` projects, calls-to-attention compete through hierarchy and size rather than parallel hues. For `paired` / `chromatic-N` projects, each declared family takes its own semantic role (e.g. <code>--accent</code> = primary action, <code>--accent-2</code> = exploratory). The completeness-critic gates the family count against the declared strategy.</p>
45
45
  </footer>
46
46
  </main>
47
47
  </body>
@@ -4,7 +4,7 @@ DEMONSTRATES: forward-pointer to v1.x multiplayer features — live cursors with
4
4
  COMPOSITION: full mockup of a shared canvas with 3 cursors + awareness rail + typing indicator
5
5
  COPY VOICE: real names, real "X is editing" strings
6
6
  WHEN SCAFFOLDED: meta + presence family (typically v1.1+ projects with Yjs)
7
- NOTES: This is a forward-pointer specimen showing what the multiplayer UX looks like once Phase 8 (Yjs LAN) lands. The cursor color is per-user (hashed from user ID into an OKLCH band). Don't blink cursors — too noisy.
7
+ NOTES: This is a forward-pointer specimen showing what the multiplayer UX looks like once Phase 8 (Yjs LAN) lands. Per-user cursor colors are illustrative only — the inline `oklch(...)` values below are NOT part of the project's design system. A real implementation should source per-user colors from a `--presence-user-*` family (token-driven) or derive from `--accent` via a deterministic hash on user ID. Don't blink cursors — too noisy.
8
8
  -->
9
9
  <!doctype html>
10
10
  <html lang="en">
@@ -132,6 +132,9 @@ NOTES:
132
132
  </div>
133
133
  <div class="spacer"></div>
134
134
  <input class="search" type="search" placeholder="search… (⌘ K)" />
135
+ <!-- Per-team accent picker. The inline `oklch(...)` values below are illustrative only — a real per-tenant
136
+ implementation should source team accents from a `--accent-team-*` family or compute analogous hues
137
+ from `--accent`. Don't hardcode tenant brand colors in the design system. -->
135
138
  <div class="accent-picker" role="group" aria-label="Accent">
136
139
  <button class="accent-swatch is-on" data-team="default" style="background: var(--accent);" aria-label="default"></button>
137
140
  <button class="accent-swatch" data-team="cyan" style="background: oklch(72% 0.16 220);" aria-label="cyan"></button>
@@ -22,7 +22,7 @@ NOTES:
22
22
  <link rel="stylesheet" href="../core/colors_and_type.css" />
23
23
  <link rel="stylesheet" href="../core/preview/_layout.css" />
24
24
  <style>
25
- body { padding: 0; margin: 0; background: oklch(8% 0.005 60); display: grid; place-items: start center; min-height: 100vh; }
25
+ body { padding: 0; margin: 0; background: var(--bg-0); display: grid; place-items: start center; min-height: 100vh; }
26
26
  .specimen { max-width: none; margin: 0; padding: var(--space-5) 0; }
27
27
 
28
28
  .artboard {
@@ -28,7 +28,7 @@ NOTES: Both themes use the SAME tokens (--bg-0..4 etc.); only their OKLCH values
28
28
  <p class="lede">The exact same UI rendered in both themes. Tokens carry the difference; the HTML structure is identical. If a component renders differently across themes (beyond color), that's a token-resolution bug, not a per-theme design.</p>
29
29
 
30
30
  <div class="grid" style="grid-template-columns: 1fr 1fr; gap: 16px;">
31
- <div class="pane app" data-theme="dark" style="background: oklch(16% 0.012 245); color: oklch(96% 0.008 245);">
31
+ <div class="pane app" data-theme="dark" style="background: var(--bg-0); color: var(--fg-0);">
32
32
  <h2 style="margin: 0 0 16px;">Dark</h2>
33
33
  <div class="card">
34
34
  <h3>Match recap</h3>
@@ -40,20 +40,20 @@ NOTES: Both themes use the SAME tokens (--bg-0..4 etc.); only their OKLCH values
40
40
  </div>
41
41
  </div>
42
42
 
43
- <div class="pane app" data-theme="light" style="background: oklch(98% 0.005 245); color: oklch(20% 0.012 245);">
43
+ <div class="pane app" data-theme="light" style="background: var(--bg-0); color: var(--fg-0);">
44
44
  <h2 style="margin: 0 0 16px;">Light</h2>
45
- <div class="card" style="background: oklch(95% 0.005 245); border-color: oklch(82% 0.010 245);">
45
+ <div class="card">
46
46
  <h3>Match recap</h3>
47
- <p class="meta" style="color: oklch(48% 0.012 245);">vs. Sparta U17 · 3-1</p>
47
+ <p class="meta">vs. Sparta U17 · 3-1</p>
48
48
  <div class="row" style="gap: 8px;">
49
49
  <button class="btn-primary">View</button>
50
- <button class="btn-secondary" style="background: oklch(91% 0.005 245); color: oklch(20% 0.012 245); border-color: oklch(78% 0.010 245);">Share</button>
50
+ <button class="btn-secondary">Share</button>
51
51
  </div>
52
52
  </div>
53
53
  </div>
54
54
  </div>
55
55
 
56
- <footer class="legend"><p>Inline OKLCH values here are just for the specimen; real projects swap them via <code>[data-theme="light"]</code> selectors in <code>colors_and_type.css</code>. The cascade carries every component without per-component theme overrides.</p></footer>
56
+ <footer class="legend"><p>Both panes use the same <code>var(--*)</code> tokens; only the <code>data-theme</code> attribute changes. Real projects define both themes inside <code>colors_and_type.css</code> via <code>[data-theme="dark"]</code> and <code>[data-theme="light"]</code> selectors. The cascade carries every component without per-component theme overrides.</p></footer>
57
57
  </main>
58
58
  </body>
59
59
  </html>
@@ -15,7 +15,8 @@ NOTES: Modal blocks the page; sheet slides from edge; alert is for irreversible
15
15
  <link rel="stylesheet" href="../core/preview/_layout.css" />
16
16
  <style>
17
17
  .dialog-frame { background: var(--bg-0); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); padding: var(--space-4); margin-bottom: 24px; position: relative; overflow: hidden; min-height: 220px; }
18
- .dialog-frame .veil { position: absolute; inset: 0; background: rgba(0,0,0,0.4); }
18
+ /* Veil opacity is a base value, not a token (per foundations/opacity.html). Color-space-agnostic. */
19
+ .dialog-frame .veil { position: absolute; inset: 0; background: color-mix(in srgb, black 40%, transparent); }
19
20
  .dialog { background: var(--bg-1); border: 1px solid var(--border-default); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: var(--space-5); width: 360px; position: relative; }
20
21
  .dialog .title { font-family: var(--font-display); font-size: var(--type-lg); font-weight: 600; line-height: var(--lh-lg); margin: 0 0 8px; }
21
22
  .dialog .body { color: var(--fg-1); margin: 0 0 var(--space-4); }
@@ -48,7 +49,7 @@ NOTES: Modal blocks the page; sheet slides from edge; alert is for irreversible
48
49
 
49
50
  <h2>Sheet</h2>
50
51
  <div class="dialog-frame">
51
- <div class="veil" style="background: rgba(0,0,0,0.25);"></div>
52
+ <div class="veil" style="background: color-mix(in srgb, black 25%, transparent);"></div>
52
53
  <aside class="dialog dialog-sheet" role="dialog" aria-labelledby="sheet-t">
53
54
  <p class="title" id="sheet-t">Player details</p>
54
55
  <p class="body">#9 · Forward · Captain</p>
@@ -19,7 +19,8 @@ NOTES:
19
19
  <style>
20
20
  body { padding: 24px; display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
21
21
  .frame { padding: 18px 22px; border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); background: var(--bg-1); }
22
- .light { background: #ffffff; }
22
+ /* `.light` frame shows the mark on the opposite-theme surface — sourced from the project's tokens, not hardcoded white. */
23
+ .light { background: var(--bg-0-light, var(--bg-0)); }
23
24
  .label { font-family: var(--font-mono); font-size: 11px; font-weight: 500; color: var(--fg-2); text-transform: uppercase; letter-spacing: 0.04em; margin-top: 10px; display: block; }
24
25
  </style>
25
26
  </head>