@1agh/maude 0.17.2 → 0.18.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 +92 -29
- package/package.json +8 -8
- package/plugins/design/dev-server/bin/screenshot.sh +12 -0
- package/plugins/design/dev-server/boot-self-heal.ts +87 -0
- package/plugins/design/dev-server/build.ts +56 -2
- package/plugins/design/dev-server/config.schema.json +12 -0
- package/plugins/design/dev-server/dist/client.bundle.js +3 -3
- package/plugins/design/dev-server/dist/runtime/pixi-js.js +52708 -0
- package/plugins/design/dev-server/dist/runtime/react-dom.js +249 -0
- package/plugins/design/dev-server/dist/runtime/react-dom_client.js +10375 -0
- package/plugins/design/dev-server/dist/runtime/react.js +553 -0
- package/plugins/design/dev-server/dist/runtime/react_jsx-dev-runtime.js +78 -0
- package/plugins/design/dev-server/dist/runtime/react_jsx-runtime.js +103 -0
- package/plugins/design/dev-server/http.ts +5 -3
- package/plugins/design/dev-server/paths.ts +115 -0
- package/plugins/design/dev-server/runtime-bundle.ts +80 -7
- package/plugins/design/dev-server/server.ts +6 -0
- package/plugins/design/dev-server/test/boot-self-heal.test.ts +87 -0
- package/plugins/design/dev-server/test/paths.test.ts +31 -0
- package/plugins/design/dev-server/test/runtime-bundle-error-mapping.test.ts +43 -0
- package/plugins/design/templates/canvas.tsx.template +7 -7
- package/plugins/design/templates/design-system-inspiration/audience-pro/colors-presence.html +1 -1
- package/plugins/design/templates/design-system-inspiration/core/README.philosophy.md.tpl +11 -7
- package/plugins/design/templates/design-system-inspiration/core/SKILL.md.tpl +4 -3
- package/plugins/design/templates/design-system-inspiration/core/colors_and_type.css.tpl +61 -57
- package/plugins/design/templates/design-system-inspiration/core/config.json.tpl +2 -0
- package/plugins/design/templates/design-system-inspiration/core/preview/colors-accent.html +4 -4
- package/plugins/design/templates/design-system-inspiration/meta/presence-multiplayer.html +1 -1
- package/plugins/design/templates/design-system-inspiration/platform-desktop/ui_kits-desktop-showcase.html +3 -0
- package/plugins/design/templates/design-system-inspiration/platform-mobile/ui_kits-mobile-showcase.html +1 -1
- package/plugins/design/templates/design-system-inspiration/theme-both/colors-themes-side-by-side.html +6 -6
- package/plugins/design/templates/design-system-inspiration/universal/components-dialogs.html +3 -2
- package/plugins/design/templates/design-system-inspiration/universal/logo.html +2 -1
|
@@ -4,55 +4,59 @@
|
|
|
4
4
|
* Authoritative token file. Every canvas in <designRoot>/ui/ links to this.
|
|
5
5
|
* Production code should consume the same values (compiled to TS/JS or kept as CSS vars).
|
|
6
6
|
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* -
|
|
11
|
-
*
|
|
12
|
-
*
|
|
7
|
+
* This file is the single source of truth for the project's visual language.
|
|
8
|
+
* Every concrete value below is supplied by the discovery payload — there are
|
|
9
|
+
* NO universal defaults baked into this template. Spacing, type, easing,
|
|
10
|
+
* shadows, max-width, accent strategy, and color space are all project-flavored.
|
|
11
|
+
*
|
|
12
|
+
* Two invariants this template does enforce:
|
|
13
|
+
* 1. `prefers-reduced-motion: reduce` collapses every duration to 1ms (a11y).
|
|
14
|
+
* 2. Tokens used by canvases live under one of the documented family prefixes
|
|
15
|
+
* (--bg-*, --fg-*, --accent*, --border-*, --status-*, --space-*, --type-*,
|
|
16
|
+
* --lh-*, --radius-*, --shadow-*, --dur-*, --ease-*, --layout-*, --font-*).
|
|
17
|
+
*
|
|
18
|
+
* Everything else — palette structure, type ladder, motion personality — is
|
|
19
|
+
* a project decision recorded during /design:setup-ds.
|
|
13
20
|
*/
|
|
14
21
|
|
|
15
22
|
:root,
|
|
16
23
|
.{{root_class}}[data-theme="{{theme_default}}"] {
|
|
17
24
|
/* ─── Surfaces (deepest → highest) ─────────────────────────────────── */
|
|
18
|
-
--bg-0: {{
|
|
19
|
-
--bg-1: {{
|
|
20
|
-
--bg-2: {{
|
|
21
|
-
--bg-3: {{
|
|
22
|
-
--bg-4: {{
|
|
25
|
+
--bg-0: {{bg_0}}; /* page bg */
|
|
26
|
+
--bg-1: {{bg_1}}; /* card / panel bg */
|
|
27
|
+
--bg-2: {{bg_2}}; /* nested panel / popover */
|
|
28
|
+
--bg-3: {{bg_3}}; /* input bg / subtle row hover */
|
|
29
|
+
--bg-4: {{bg_4}}; /* hover / pressed state */
|
|
23
30
|
|
|
24
31
|
/* ─── Borders ──────────────────────────────────────────────────────── */
|
|
25
|
-
--border-subtle:
|
|
26
|
-
--border-default:
|
|
27
|
-
--border-strong:
|
|
32
|
+
--border-subtle: {{border_subtle}};
|
|
33
|
+
--border-default: {{border_default}};
|
|
34
|
+
--border-strong: {{border_strong}};
|
|
28
35
|
|
|
29
36
|
/* ─── Text ─────────────────────────────────────────────────────────── */
|
|
30
|
-
--fg-0: {{
|
|
31
|
-
--fg-1: {{
|
|
32
|
-
--fg-2: {{
|
|
33
|
-
--fg-3: {{
|
|
37
|
+
--fg-0: {{fg_0}}; /* primary text */
|
|
38
|
+
--fg-1: {{fg_1}}; /* secondary text */
|
|
39
|
+
--fg-2: {{fg_2}}; /* tertiary / muted */
|
|
40
|
+
--fg-3: {{fg_3}}; /* disabled */
|
|
34
41
|
|
|
35
|
-
/* ─── Accent (
|
|
36
|
-
|
|
37
|
-
--accent-hover: oklch(from var(--accent) calc(l - 0.04) c h);
|
|
38
|
-
--accent-active: oklch(from var(--accent) calc(l - 0.08) c h);
|
|
39
|
-
--accent-fg: {{accent_fg_oklch}};
|
|
42
|
+
/* ─── Accent ({{accent_strategy_summary}}) ─────────────────────────── */
|
|
43
|
+
{{accent_block}}
|
|
40
44
|
|
|
41
45
|
/* ─── Status (only if "status" ∈ activeFamilies) ───────────────────── */
|
|
42
|
-
--status-success:
|
|
43
|
-
--status-warn:
|
|
44
|
-
--status-error:
|
|
45
|
-
--status-info:
|
|
46
|
+
--status-success: {{status_success}};
|
|
47
|
+
--status-warn: {{status_warn}};
|
|
48
|
+
--status-error: {{status_error}};
|
|
49
|
+
--status-info: {{status_info}};
|
|
46
50
|
|
|
47
51
|
/* ─── Presence (only if "presence" ∈ activeFamilies) ───────────────── */
|
|
48
|
-
--presence-online:
|
|
49
|
-
--presence-away:
|
|
50
|
-
--presence-offline:
|
|
52
|
+
--presence-online: {{presence_online}};
|
|
53
|
+
--presence-away: {{presence_away}};
|
|
54
|
+
--presence-offline: {{presence_offline}};
|
|
51
55
|
|
|
52
56
|
/* ─── Shadows / elevation ──────────────────────────────────────────── */
|
|
53
|
-
--shadow-sm:
|
|
54
|
-
--shadow-md:
|
|
55
|
-
--shadow-lg:
|
|
57
|
+
--shadow-sm: {{shadow_sm}};
|
|
58
|
+
--shadow-md: {{shadow_md}};
|
|
59
|
+
--shadow-lg: {{shadow_lg}};
|
|
56
60
|
|
|
57
61
|
/* ─── Radii ────────────────────────────────────────────────────────── */
|
|
58
62
|
--radius-xs: {{radius_xs}};
|
|
@@ -60,45 +64,45 @@
|
|
|
60
64
|
--radius-md: {{radius_md}};
|
|
61
65
|
--radius-lg: {{radius_lg}};
|
|
62
66
|
--radius-xl: {{radius_xl}};
|
|
63
|
-
--radius-pill:
|
|
67
|
+
--radius-pill: {{radius_pill}};
|
|
64
68
|
|
|
65
|
-
/* ─── Spacing
|
|
66
|
-
--space-0:
|
|
67
|
-
--space-1:
|
|
68
|
-
--space-2:
|
|
69
|
-
--space-3:
|
|
70
|
-
--space-4:
|
|
71
|
-
--space-5:
|
|
72
|
-
--space-6:
|
|
73
|
-
--space-7:
|
|
74
|
-
--space-8:
|
|
69
|
+
/* ─── Spacing ──────────────────────────────────────────────────────── */
|
|
70
|
+
--space-0: {{space_0}};
|
|
71
|
+
--space-1: {{space_1}};
|
|
72
|
+
--space-2: {{space_2}};
|
|
73
|
+
--space-3: {{space_3}};
|
|
74
|
+
--space-4: {{space_4}};
|
|
75
|
+
--space-5: {{space_5}};
|
|
76
|
+
--space-6: {{space_6}};
|
|
77
|
+
--space-7: {{space_7}};
|
|
78
|
+
--space-8: {{space_8}};
|
|
75
79
|
|
|
76
80
|
/* ─── Typography ───────────────────────────────────────────────────── */
|
|
77
81
|
--font-display: {{font_display}};
|
|
78
82
|
--font-body: {{font_body}};
|
|
79
83
|
--font-mono: {{font_mono}};
|
|
80
84
|
|
|
81
|
-
/*
|
|
82
|
-
--type-xs:
|
|
83
|
-
--type-sm:
|
|
84
|
-
--type-base:
|
|
85
|
-
--type-md:
|
|
86
|
-
--type-lg:
|
|
87
|
-
--type-xl:
|
|
88
|
-
--type-2xl:
|
|
89
|
-
--type-3xl:
|
|
85
|
+
/* Type scale */
|
|
86
|
+
--type-xs: {{type_xs}}; --lh-xs: {{lh_xs}};
|
|
87
|
+
--type-sm: {{type_sm}}; --lh-sm: {{lh_sm}};
|
|
88
|
+
--type-base: {{type_base}}; --lh-base: {{lh_base}};
|
|
89
|
+
--type-md: {{type_md}}; --lh-md: {{lh_md}};
|
|
90
|
+
--type-lg: {{type_lg}}; --lh-lg: {{lh_lg}};
|
|
91
|
+
--type-xl: {{type_xl}}; --lh-xl: {{lh_xl}};
|
|
92
|
+
--type-2xl: {{type_2xl}}; --lh-2xl: {{lh_2xl}};
|
|
93
|
+
--type-3xl: {{type_3xl}}; --lh-3xl: {{lh_3xl}};
|
|
90
94
|
|
|
91
95
|
/* ─── Motion ───────────────────────────────────────────────────────── */
|
|
92
96
|
--dur-flip: {{dur_flip}};
|
|
93
97
|
--dur-panel: {{dur_panel}};
|
|
94
98
|
--dur-route: {{dur_route}};
|
|
95
99
|
--dur-soft: {{dur_soft}};
|
|
96
|
-
--ease-out:
|
|
97
|
-
--ease-in-out:
|
|
100
|
+
--ease-out: {{ease_out_curve}};
|
|
101
|
+
--ease-in-out: {{ease_in_out_curve}};
|
|
98
102
|
|
|
99
103
|
/* ─── Layout ───────────────────────────────────────────────────────── */
|
|
100
|
-
--layout-max-w:
|
|
101
|
-
--layout-gutter:
|
|
104
|
+
--layout-max-w: {{layout_max_w}};
|
|
105
|
+
--layout-gutter: {{layout_gutter}};
|
|
102
106
|
}
|
|
103
107
|
|
|
104
108
|
@media (prefers-reduced-motion: reduce) {
|
|
@@ -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
|
|
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:
|
|
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">
|
|
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>
|
|
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.
|
|
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:
|
|
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:
|
|
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:
|
|
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"
|
|
45
|
+
<div class="card">
|
|
46
46
|
<h3>Match recap</h3>
|
|
47
|
-
<p class="meta"
|
|
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"
|
|
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>
|
|
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>
|
package/plugins/design/templates/design-system-inspiration/universal/components-dialogs.html
CHANGED
|
@@ -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
|
-
|
|
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:
|
|
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
|
-
|
|
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>
|