create-pmos 0.697.0 → 0.698.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/package.json +14 -20
- package/payload/KIT-VERSION +1 -1
- package/payload/design-system/ui/tokens.css +1 -1
- package/payload/planning/evals/eval-calibration.md +1 -1
- package/payload/planning/okrs/health-budgets.md +1 -1
- package/payload/state/discoveries.md +1 -1
- package/workspace/changelog.json +13 -0
- package/workspace/design-system/ui/tokens.css +1 -1
- package/workspace/design-token-reach.js +64 -6
- package/workspace/guide/cli.md +8 -0
- package/workspace/lib/design-cli.js +14 -2
- package/workspace/lib/design-drift.js +2 -0
- package/workspace/lib/design-swap.js +146 -0
- package/workspace/lib/design-system.js +7 -4
- package/workspace/package-lock.json +2 -2
- package/workspace/package.json +1 -1
- package/workspace/public/pm/agenda-live.css +7 -7
- package/workspace/public/pm/bd-backlog.css +71 -71
- package/workspace/public/pm/bd-pin-card.css +2 -2
- package/workspace/public/pm/bd-pop-ds.css +1 -1
- package/workspace/public/pm/bd-publish.css +23 -23
- package/workspace/public/pm/bd-shared.css +22 -22
- package/workspace/public/pm/bd-work-ds.css +1 -1
- package/workspace/public/pm/bd-work.css +25 -25
- package/workspace/public/pm/c3-capture.css +3 -3
- package/workspace/public/pm/c3-initiatives.css +21 -21
- package/workspace/public/pm/components.css +585 -585
- package/workspace/public/pm/console3.css +304 -304
- package/workspace/public/pm/cozy-adler.css +6 -6
- package/workspace/public/pm/cozy-board.css +267 -267
- package/workspace/public/pm/cozy-buddy.css +1 -1
- package/workspace/public/pm/cozy-day-pick.css +7 -7
- package/workspace/public/pm/cozy-divider.css +2 -2
- package/workspace/public/pm/cozy-ev.css +121 -121
- package/workspace/public/pm/cozy-events.css +22 -22
- package/workspace/public/pm/cozy-goals.css +3 -3
- package/workspace/public/pm/cozy-home-rows.css +50 -50
- package/workspace/public/pm/cozy-home.css +218 -218
- package/workspace/public/pm/cozy-insights.css +197 -197
- package/workspace/public/pm/cozy-lab.css +18 -18
- package/workspace/public/pm/cozy-library.css +1 -1
- package/workspace/public/pm/cozy-live-pill.css +4 -4
- package/workspace/public/pm/cozy-mtg-present.css +32 -32
- package/workspace/public/pm/cozy-onboard.css +22 -22
- package/workspace/public/pm/cozy-panel.css +24 -24
- package/workspace/public/pm/cozy-panels.css +4 -4
- package/workspace/public/pm/cozy-phone-rec.css +12 -12
- package/workspace/public/pm/cozy-phone-settings.css +4 -4
- package/workspace/public/pm/cozy-pick.css +7 -7
- package/workspace/public/pm/cozy-pop-work.css +56 -56
- package/workspace/public/pm/cozy-popup.css +25 -25
- package/workspace/public/pm/cozy-proto.css +44 -44
- package/workspace/public/pm/cozy-rec-now.css +23 -23
- package/workspace/public/pm/cozy-rec-present.css +18 -18
- package/workspace/public/pm/cozy-rec-tab.css +8 -8
- package/workspace/public/pm/cozy-reveal.css +14 -14
- package/workspace/public/pm/cozy-routine.css +29 -29
- package/workspace/public/pm/cozy-steps.css +10 -10
- package/workspace/public/pm/cozy-task-pop.css +8 -8
- package/workspace/public/pm/cozy-today-page.css +28 -28
- package/workspace/public/pm/cozy-today.css +165 -165
- package/workspace/public/pm/cozy-viewer.css +21 -21
- package/workspace/public/pm/cozy-vw-mtg.css +105 -105
- package/workspace/public/pm/cozy-vw-rp.css +66 -66
- package/workspace/public/pm/cozy-vw-shell.css +42 -42
- package/workspace/public/pm/cozy-vw.css +90 -90
- package/workspace/public/pm/cozy-xv.css +8 -8
- package/workspace/public/pm/cozy.css +24 -24
- package/workspace/public/pm/dash-view.css +23 -23
- package/workspace/public/pm/hi-pop.css +29 -29
- package/workspace/public/pm/home-impact.css +10 -10
- package/workspace/public/pm/home-ini.css +34 -34
- package/workspace/public/pm/home-line.css +12 -12
- package/workspace/public/pm/impact.css +12 -12
- package/workspace/public/pm/ini-view.css +240 -240
- package/workspace/public/pm/intent.css +11 -11
- package/workspace/public/pm/komorebi.css +3 -3
- package/workspace/public/pm/load-shapes.css +10 -10
- package/workspace/public/pm/loose-props.css +17 -17
- package/workspace/public/pm/metric-drafts.css +10 -10
- package/workspace/public/pm/ms-suggest.css +12 -12
- package/workspace/public/pm/ov-view.css +10 -10
- package/workspace/public/pm/page-chat.css +1 -1
- package/workspace/public/pm/premium-vw-backlog.css +7 -7
- package/workspace/public/pm/premium-vw-cal.css +22 -22
- package/workspace/public/pm/premium-vw-copy.css +6 -6
- package/workspace/public/pm/premium-vw-doc.css +98 -98
- package/workspace/public/pm/premium-vw-guide.css +9 -9
- package/workspace/public/pm/premium-vw-item.css +7 -7
- package/workspace/public/pm/premium-vw-jira.css +28 -28
- package/workspace/public/pm/premium-vw-meet.css +26 -26
- package/workspace/public/pm/premium-vw-notepad.css +14 -14
- package/workspace/public/pm/premium-vw-notes.css +11 -11
- package/workspace/public/pm/premium-vw-rec.css +22 -22
- package/workspace/public/pm/premium-vw-report.css +14 -14
- package/workspace/public/pm/premium-vw-slides.css +27 -27
- package/workspace/public/pm/premium.css +598 -598
- package/workspace/public/pm/prog-order.css +7 -7
- package/workspace/public/pm/prog-page.css +16 -16
- package/workspace/public/pm/program-charter.css +23 -23
- package/workspace/public/pm/ready-lib.css +4 -4
- package/workspace/public/pm/sort-order.css +3 -3
- package/workspace/public/pm/split-merge.css +21 -21
- package/workspace/public/pm/story.css +3 -3
- package/workspace/public/pm/task-card.css +21 -21
- package/workspace/public/pm/tk-tasks.css +32 -32
- package/workspace/public/pm/tk-view.css +7 -7
- package/workspace/public/pm/wf-page.css +46 -46
- package/workspace/test-lists/design-token-swap.json +9 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-pmos",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.698.0",
|
|
4
4
|
"description": "Scaffold the PMOS portable kit — run the PMOS product-management workflow (initiative → lane-fit spec → contract → build → three gates, with work-type lanes for features, research, maintenance, incidents, and content) entirely inside your own repo, with all state as git-versioned files. Includes `workflow-sweep`, which audits the state every board derives from and separates real defects from work you simply have not done. `create-pmos workspace` also installs + launches the local Terminal Workspace GUI. No database, no network, no telemetry.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"bin": {
|
|
@@ -33,6 +33,19 @@
|
|
|
33
33
|
"audit"
|
|
34
34
|
],
|
|
35
35
|
"pmosChanges": [
|
|
36
|
+
{
|
|
37
|
+
"v": "0.698.0",
|
|
38
|
+
"at": "2026-11-22T10:16:59.106Z",
|
|
39
|
+
"f": 4,
|
|
40
|
+
"prs": [
|
|
41
|
+
{
|
|
42
|
+
"n": 1517,
|
|
43
|
+
"t": "Fixed spacing and corner values read the same-value Komorebi token (token-first step 2)",
|
|
44
|
+
"s": "Fixed spacing and corner values read the same-value Komorebi token (token-first step 2)",
|
|
45
|
+
"k": "x"
|
|
46
|
+
}
|
|
47
|
+
]
|
|
48
|
+
},
|
|
36
49
|
{
|
|
37
50
|
"v": "0.697.0",
|
|
38
51
|
"at": "2026-11-22T09:56:23.025Z",
|
|
@@ -417,25 +430,6 @@
|
|
|
417
430
|
"k": "new"
|
|
418
431
|
}
|
|
419
432
|
]
|
|
420
|
-
},
|
|
421
|
-
{
|
|
422
|
-
"v": "0.654.0",
|
|
423
|
-
"at": "2026-11-22T01:23:23.116Z",
|
|
424
|
-
"f": 4,
|
|
425
|
-
"prs": [
|
|
426
|
-
{
|
|
427
|
-
"n": 1436,
|
|
428
|
-
"t": "The Initiatives | Backlog switch is a tablist with its label again",
|
|
429
|
-
"s": "The Initiatives | Backlog switch is a tablist with its label again",
|
|
430
|
-
"k": "fix"
|
|
431
|
-
},
|
|
432
|
-
{
|
|
433
|
-
"n": 1437,
|
|
434
|
-
"t": "Publish to beta first; promote to GA only on evidence",
|
|
435
|
-
"s": "Publish to beta first; promote to GA only on evidence",
|
|
436
|
-
"k": "x"
|
|
437
|
-
}
|
|
438
|
-
]
|
|
439
433
|
}
|
|
440
434
|
]
|
|
441
435
|
}
|
package/payload/KIT-VERSION
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* PMOS Komorebi tokens. GENERATED from tokens.json by lib/design-system.js: do not edit; run `node lib/design-system.js --write`. */
|
|
2
2
|
:root, [data-theme="light"] {--raise:0 1px 2px rgba(42,46,53,.08), 0 4px 14px -6px rgba(70,80,50,.14);--lift:0 10px 28px -10px rgba(42,46,53,.28);--glow:0 0 0 2px #5F7A45, 0 0 0 5px rgba(95,122,69,.10)}
|
|
3
3
|
[data-theme="dark"] {--raise:0 1px 2px rgba(0,0,0,.4), 0 4px 14px -6px rgba(169,196,140,.08);--lift:0 10px 28px -10px rgba(0,0,0,.6);--glow:0 0 0 2px #A9C48C, 0 0 0 5px rgba(169,196,140,.12)}
|
|
4
|
-
:root {--space-4:4px;--space-8:8px;--space-12:12px;--space-16:16px;--space-24:24px;--space-32:32px;--space-48:48px;--space-64:64px;--radius-sm:6px;--radius-md:10px;--radius-card:16px;--radius-panel:24px;--radius-pill:999px}
|
|
4
|
+
:root:where(*) {--space-4:4px;--space-8:8px;--space-12:12px;--space-16:16px;--space-24:24px;--space-32:32px;--space-48:48px;--space-64:64px;--radius-sm:6px;--radius-md:10px;--radius-card:16px;--radius-panel:24px;--radius-pill:999px}
|
|
5
5
|
:root:where(*) {--type-title:26px;--leading-title:32px;--weight-title:600;--type-heading:18px;--leading-heading:24px;--weight-heading:600;--type-body:15px;--leading-body:24px;--weight-body:400;--type-small:13px;--leading-small:20px;--weight-small:400;--type-code:13px;--leading-code:20px;--weight-code:400}
|
|
6
6
|
.title{font-family:var(--font-sans);font-size:var(--type-title);line-height:var(--leading-title);font-weight:var(--weight-title)}
|
|
7
7
|
.heading{font-family:var(--font-sans);font-size:var(--type-heading);line-height:var(--leading-heading);font-weight:var(--weight-heading)}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
type: Reference
|
|
3
3
|
title: "Eval calibration log"
|
|
4
4
|
description: "Append-only record of every PM override of an evaluator verdict."
|
|
5
|
-
generated: {by: process:create-pmos, at: "2026-11-
|
|
5
|
+
generated: {by: process:create-pmos, at: "2026-11-22T10:16:55Z"}
|
|
6
6
|
status: stable
|
|
7
7
|
---
|
|
8
8
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
type: Reference
|
|
3
3
|
title: "Health budgets"
|
|
4
4
|
description: "Closed registry of health-budget anchors (D59), edited only by the PM."
|
|
5
|
-
generated: {by: process:create-pmos, at: "2026-11-
|
|
5
|
+
generated: {by: process:create-pmos, at: "2026-11-22T10:16:55Z"}
|
|
6
6
|
status: stable
|
|
7
7
|
---
|
|
8
8
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
type: Reference
|
|
3
3
|
title: "Discoveries and friction log"
|
|
4
4
|
description: "Append-only record of what runs discovered and where the process rubbed."
|
|
5
|
-
generated: {by: process:create-pmos, at: "2026-11-
|
|
5
|
+
generated: {by: process:create-pmos, at: "2026-11-22T10:16:55Z"}
|
|
6
6
|
status: stable
|
|
7
7
|
---
|
|
8
8
|
|
package/workspace/changelog.json
CHANGED
|
@@ -1,4 +1,17 @@
|
|
|
1
1
|
[
|
|
2
|
+
{
|
|
3
|
+
"v": "0.698.0",
|
|
4
|
+
"at": "2026-11-22T10:16:59.106Z",
|
|
5
|
+
"f": 4,
|
|
6
|
+
"prs": [
|
|
7
|
+
{
|
|
8
|
+
"n": 1517,
|
|
9
|
+
"t": "Fixed spacing and corner values read the same-value Komorebi token (token-first step 2)",
|
|
10
|
+
"s": "Fixed spacing and corner values read the same-value Komorebi token (token-first step 2)",
|
|
11
|
+
"k": "x"
|
|
12
|
+
}
|
|
13
|
+
]
|
|
14
|
+
},
|
|
2
15
|
{
|
|
3
16
|
"v": "0.697.0",
|
|
4
17
|
"at": "2026-11-22T09:56:23.025Z",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* PMOS Komorebi tokens. GENERATED from tokens.json by lib/design-system.js: do not edit; run `node lib/design-system.js --write`. */
|
|
2
2
|
:root, [data-theme="light"] {--raise:0 1px 2px rgba(42,46,53,.08), 0 4px 14px -6px rgba(70,80,50,.14);--lift:0 10px 28px -10px rgba(42,46,53,.28);--glow:0 0 0 2px #5F7A45, 0 0 0 5px rgba(95,122,69,.10)}
|
|
3
3
|
[data-theme="dark"] {--raise:0 1px 2px rgba(0,0,0,.4), 0 4px 14px -6px rgba(169,196,140,.08);--lift:0 10px 28px -10px rgba(0,0,0,.6);--glow:0 0 0 2px #A9C48C, 0 0 0 5px rgba(169,196,140,.12)}
|
|
4
|
-
:root {--space-4:4px;--space-8:8px;--space-12:12px;--space-16:16px;--space-24:24px;--space-32:32px;--space-48:48px;--space-64:64px;--radius-sm:6px;--radius-md:10px;--radius-card:16px;--radius-panel:24px;--radius-pill:999px}
|
|
4
|
+
:root:where(*) {--space-4:4px;--space-8:8px;--space-12:12px;--space-16:16px;--space-24:24px;--space-32:32px;--space-48:48px;--space-64:64px;--radius-sm:6px;--radius-md:10px;--radius-card:16px;--radius-panel:24px;--radius-pill:999px}
|
|
5
5
|
:root:where(*) {--type-title:26px;--leading-title:32px;--weight-title:600;--type-heading:18px;--leading-heading:24px;--weight-heading:600;--type-body:15px;--leading-body:24px;--weight-body:400;--type-small:13px;--leading-small:20px;--weight-small:400;--type-code:13px;--leading-code:20px;--weight-code:400}
|
|
6
6
|
.title{font-family:var(--font-sans);font-size:var(--type-title);line-height:var(--leading-title);font-weight:var(--weight-title)}
|
|
7
7
|
.heading{font-family:var(--font-sans);font-size:var(--type-heading);line-height:var(--leading-heading);font-weight:var(--weight-heading)}
|
|
@@ -8,7 +8,10 @@
|
|
|
8
8
|
* colour brand.css with the light --ink → a red must change every page whose body carries pm-ds (the colour tokens are scoped to it)
|
|
9
9
|
* A page that did not change fails the run (exit 1). Each page prints one "[token-reach]" line, and the run prints the computed type roles
|
|
10
10
|
* (--fs-body, --fs-meta, --fs-panel, --fs-display) of the unchanged page, which must still read 15, 13, 18 and 26 px.
|
|
11
|
-
*
|
|
11
|
+
* Changes also checked: --type-small, --muted (light and dark) and, since step 2 (token-swap-same-value), --space-8 must reach every page.
|
|
12
|
+
* OUT=<dir> where the before/after PNGs go (default: this run's state folder). PAGES=a.html,b.html only these pages.
|
|
13
|
+
* --same the other check: every page with each stylesheet in public/pm as on BASE_REF (default origin/main) against the files on
|
|
14
|
+
* disk, light and dark. A change that swaps a fixed value for a same-value token must show no difference. */
|
|
12
15
|
const fs = require('fs');
|
|
13
16
|
const path = require('path');
|
|
14
17
|
const { spawn } = require('child_process');
|
|
@@ -26,7 +29,15 @@ const CHANGES = [
|
|
|
26
29
|
{ key: 'type-small', sheet: 'komorebi.css', pairs: [['--type-small:13px', '--type-small:15px']], kind: 'type' },
|
|
27
30
|
{ key: 'ink', sheet: 'brand.css', pairs: [['--ink:#2A2E35', '--ink:#B03020'], ['--ink:#ECEEF1', '--ink:#FF8A80']], kind: 'colour' },
|
|
28
31
|
{ key: 'muted', sheet: 'brand.css', pairs: [['--muted:#646A74', '--muted:#B03020'], ['--muted:#9EA4AD', '--muted:#FF8A80']], kind: 'colour' },
|
|
32
|
+
{ key: 'space-8', sheet: 'komorebi.css', pairs: [['--space-8:8px', '--space-8:14px']], kind: 'space' },
|
|
33
|
+
{ key: 'space-4', sheet: 'komorebi.css', pairs: [['--space-4:4px', '--space-4:10px']], kind: 'space' },
|
|
34
|
+
{ key: 'space-12', sheet: 'komorebi.css', pairs: [['--space-12:12px', '--space-12:20px']], kind: 'space' },
|
|
35
|
+
{ key: 'radius-sm', sheet: 'komorebi.css', pairs: [['--radius-sm:6px', '--radius-sm:0px']], kind: 'corner' },
|
|
29
36
|
];
|
|
37
|
+
const KINDS = [...new Set(CHANGES.map((c) => c.kind))];
|
|
38
|
+
// the kinds a page must show to pass; spacing and corners are measured and printed (step 2 moved part of them onto tokens; the values
|
|
39
|
+
// between two tokens still bypass them, so a page can show neither yet)
|
|
40
|
+
const REQUIRED = new Set((process.env.REQUIRE || 'type,colour').split(','));
|
|
30
41
|
// a page the server serves at another address
|
|
31
42
|
const URLS = { 'capture.html': '/console.html?capture=1', 'premium-present.html': '/pm/present' };
|
|
32
43
|
const log = (s) => console.log('[token-reach] ' + s);
|
|
@@ -38,13 +49,17 @@ const sample = () => {
|
|
|
38
49
|
const r = el.getBoundingClientRect();
|
|
39
50
|
if (!r.width || !r.height) continue;
|
|
40
51
|
const s = getComputedStyle(el);
|
|
41
|
-
out.push(s.fontSize
|
|
52
|
+
out.push([s.fontSize, s.color, s.padding, s.margin, s.gap, s.borderRadius].join('|'));
|
|
42
53
|
}
|
|
43
54
|
const b = getComputedStyle(document.body);
|
|
44
55
|
return { els: out, pmds: document.body.classList.contains('pm-ds'), roles: ['--fs-body', '--fs-meta', '--fs-panel', '--fs-display'].map((n) => b.getPropertyValue(n).trim()) };
|
|
45
56
|
};
|
|
46
57
|
|
|
58
|
+
const SAME = process.argv.includes('--same');
|
|
59
|
+
const BASE_REF = process.env.BASE_REF || 'origin/main';
|
|
60
|
+
|
|
47
61
|
(async () => {
|
|
62
|
+
if (SAME) return same();
|
|
48
63
|
for (const c of CHANGES) for (const [from] of c.pairs) if (!read(path.join(PUB, 'pm', c.sheet)).includes(from)) { log(`${c.sheet} no longer holds "${from}": update CHANGES`); process.exit(2); }
|
|
49
64
|
const { chromium } = require('playwright-core');
|
|
50
65
|
const srv = spawn(process.execPath, [path.join(__dirname, 'server.js')], { cwd: __dirname, stdio: 'ignore', env: T.env({ PMOS_WS_PORT: String(T.PORT) }) });
|
|
@@ -62,7 +77,7 @@ const sample = () => {
|
|
|
62
77
|
await ctx.close();
|
|
63
78
|
return { ...s, png };
|
|
64
79
|
};
|
|
65
|
-
const misses = [];
|
|
80
|
+
const misses = [], unreached = [];
|
|
66
81
|
const roleLines = [];
|
|
67
82
|
for (const page of PAGES) {
|
|
68
83
|
const base = await shoot(page, null);
|
|
@@ -70,7 +85,7 @@ const sample = () => {
|
|
|
70
85
|
const steady = Buffer.compare(base.png, again.png) === 0;
|
|
71
86
|
fs.writeFileSync(path.join(OUT, page.replace('.html', '') + '-before.png'), base.png);
|
|
72
87
|
roleLines.push(`${page}: ${base.roles.join(' / ')}`);
|
|
73
|
-
const parts = [], hit =
|
|
88
|
+
const parts = [], hit = Object.fromEntries(KINDS.map((k) => [k, false]));
|
|
74
89
|
for (const c of CHANGES) {
|
|
75
90
|
const after = await shoot(page, c);
|
|
76
91
|
fs.writeFileSync(path.join(OUT, page.replace('.html', '') + '-' + c.key + '.png'), after.png);
|
|
@@ -80,14 +95,57 @@ const sample = () => {
|
|
|
80
95
|
if (reached) hit[c.kind] = true;
|
|
81
96
|
parts.push(`${c.key} ${reached ? 'yes' : 'no'} (${n})`);
|
|
82
97
|
}
|
|
83
|
-
for (const k of
|
|
84
|
-
|
|
98
|
+
for (const k of KINDS) if (!hit[k] && REQUIRED.has(k)) misses.push(`${page} ${k}`);
|
|
99
|
+
for (const k of KINDS) if (!hit[k] && !REQUIRED.has(k)) unreached.push(`${page} ${k}`);
|
|
100
|
+
log(`${page}${steady ? '' : ' (moves by itself)'} · ${KINDS.map((k) => `${k} ${hit[k] ? 'reached' : 'NOT reached'}`).join(' · ')} · ${parts.join(', ')}`);
|
|
85
101
|
}
|
|
86
102
|
console.log('\ntype roles on each page before the change (--fs-body / --fs-meta / --fs-panel / --fs-display):\n ' + roleLines.join('\n '));
|
|
87
103
|
const wrongRoles = roleLines.filter((l) => !l.endsWith('15px / 13px / 18px / 26px'));
|
|
88
104
|
if (wrongRoles.length) misses.push('type roles not 15/13/18/26 px on ' + wrongRoles.length + ' page(s)');
|
|
89
105
|
log(`${PAGES.length - new Set(misses.map((m) => m.split(' ')[0])).size} of ${PAGES.length} pages reached · screenshots in ${OUT}`);
|
|
90
106
|
if (misses.length) log('NOT reached: ' + misses.join(', '));
|
|
107
|
+
if (unreached.length) log('measured, not required (REQUIRE=…): not reached on ' + unreached.join(', '));
|
|
91
108
|
await browser.close(); srv.kill('SIGKILL'); T.killTmux && T.killTmux();
|
|
92
109
|
process.exit(misses.length ? 1 : 0);
|
|
93
110
|
})().catch((e) => { console.error(e); process.exit(2); });
|
|
111
|
+
|
|
112
|
+
/* --same: every page with each stylesheet in public/pm as on BASE_REF, against the files on disk, in light and dark. A change that only swaps
|
|
113
|
+
* a fixed value for a token of the same value must show no difference: not in the screenshot, not in any element's size, colour, spacing
|
|
114
|
+
* or corners. (token-swap-same-value, done test W6) */
|
|
115
|
+
async function same() {
|
|
116
|
+
const { execFileSync } = require('child_process');
|
|
117
|
+
const old = (f) => { try { return execFileSync('git', ['show', `${BASE_REF}:workspace/public/pm/${f}`], { cwd: __dirname, encoding: 'utf8', maxBuffer: 1 << 26, stdio: ['ignore', 'pipe', 'ignore'] }); } catch { return null; } };
|
|
118
|
+
const { chromium } = require('playwright-core');
|
|
119
|
+
const srv = spawn(process.execPath, [path.join(__dirname, 'server.js')], { cwd: __dirname, stdio: 'ignore', env: T.env({ PMOS_WS_PORT: String(T.PORT) }) });
|
|
120
|
+
await T.waitForServer(T.BASE);
|
|
121
|
+
const browser = await chromium.launch({ executablePath: findBrowser() });
|
|
122
|
+
fs.mkdirSync(OUT, { recursive: true });
|
|
123
|
+
const shoot = async (page, scheme, base) => {
|
|
124
|
+
const ctx = await browser.newContext({ viewport: { width: 1280, height: 800 }, colorScheme: scheme, reducedMotion: 'reduce' });
|
|
125
|
+
if (base) await ctx.route(/\/pm\/[^/?]+\.css(\?.*)?$/, (r) => { const f = new URL(r.request().url()).pathname.split('/').pop(); const t = old(f); return t == null ? r.continue() : r.fulfill({ contentType: 'text/css', body: t }); });
|
|
126
|
+
const p = await ctx.newPage();
|
|
127
|
+
await p.goto(T.BASE + (URLS[page] || '/' + page), { waitUntil: 'load' }).catch(() => {});
|
|
128
|
+
await p.waitForTimeout(1500);
|
|
129
|
+
const s = await p.evaluate(sample);
|
|
130
|
+
const png = await p.screenshot({ fullPage: true });
|
|
131
|
+
await ctx.close();
|
|
132
|
+
return { ...s, png };
|
|
133
|
+
};
|
|
134
|
+
const diff = [];
|
|
135
|
+
for (const page of PAGES) for (const scheme of ['light', 'dark']) for (let attempt = 1; attempt <= 2; attempt++) {
|
|
136
|
+
// a difference must show twice: a page that drew while its data was still arriving differs once by timing, not by the change
|
|
137
|
+
const a = await shoot(page, scheme, true), b = await shoot(page, scheme, false);
|
|
138
|
+
const n = a.els.filter((v, i) => b.els[i] !== v).length + Math.abs(a.els.length - b.els.length);
|
|
139
|
+
const shot = Buffer.compare(a.png, b.png) !== 0;
|
|
140
|
+
let moves = false;
|
|
141
|
+
if (shot && !n) { const a2 = await shoot(page, scheme, true); moves = Buffer.compare(a.png, a2.png) !== 0; } // a page that moves by itself
|
|
142
|
+
const differs = n > 0 || (shot && !moves);
|
|
143
|
+
if (differs && attempt === 1) continue;
|
|
144
|
+
if (differs) { diff.push(`${page} ${scheme}`); fs.writeFileSync(path.join(OUT, `${page.replace('.html', '')}-${scheme}-base.png`), a.png); fs.writeFileSync(path.join(OUT, `${page.replace('.html', '')}-${scheme}-now.png`), b.png); }
|
|
145
|
+
log(`${page} ${scheme} · ${differs ? `DIFFERS (${n} elements${shot ? ', screenshot' : ''})` : `same${moves ? ' (moves by itself; every element the same)' : ''}${attempt > 1 ? ' (second try)' : ''}`}`);
|
|
146
|
+
break;
|
|
147
|
+
}
|
|
148
|
+
log(`${diff.length} of ${PAGES.length * 2} page views differ from ${BASE_REF}${diff.length ? ': ' + diff.join(', ') : ''}`);
|
|
149
|
+
await browser.close(); srv.kill('SIGKILL'); T.killTmux && T.killTmux();
|
|
150
|
+
process.exit(diff.length ? 1 : 0);
|
|
151
|
+
}
|
package/workspace/guide/cli.md
CHANGED
|
@@ -356,6 +356,14 @@ The design system's own sheet (Komorebi, `komorebi.css`) is the only place the t
|
|
|
356
356
|
|
|
357
357
|
To change a text size on every page, change the style in `workspace/design-system/ui/tokens.json` and run `node lib/design-system.js --write`. Do not write a `--fs-*` value in a page's stylesheet.
|
|
358
358
|
|
|
359
|
+
### pmos design swap: a fixed value becomes the token with the same value
|
|
360
|
+
|
|
361
|
+
- `pmos design swap` counts, for each stylesheet, the fixed spacing (padding, margin, gap) and corner values that equal a design token. It also counts the values that sit between two tokens. It changes no file.
|
|
362
|
+
- `pmos design swap --write` replaces each of those values with its token, for example `padding: 8px 12px` with `padding: var(--space-8) var(--space-12)`. Nothing on screen moves, because the token has the same value. After that, a change to the token reaches every place that reads it.
|
|
363
|
+
- It does not change a value between two tokens. That is a decision for a person. It does not change the system's own sheets, scripts, HTML, a custom property, a `var()` fallback, `@keyframes` or the scaled slide and report canvases.
|
|
364
|
+
- When two system sheets have a token with the same value, a token at `:root` wins, then the later sheet. So the UI system's own token wins over a chart token.
|
|
365
|
+
- A product sets its files in `design-drift.json`. `swapIgnore` names sheets that draw in a frame without the system's sheets.
|
|
366
|
+
|
|
359
367
|
To see that a change reaches every page, run `node design-token-reach.js` in `workspace/`. It changes one token in a test copy of the system's sheets, takes a screenshot of each page before and after, and names each page the change did not reach. It changes no file.
|
|
360
368
|
|
|
361
369
|
### pmos pages: fix a page before you add to it
|
|
@@ -14,13 +14,16 @@
|
|
|
14
14
|
* --github print each new bypass as a GitHub warning on its file and line (the CI step uses it)
|
|
15
15
|
* --pages the older view instead: each page's share of system classes and its own CSS (a measure only)
|
|
16
16
|
*
|
|
17
|
-
*
|
|
17
|
+
* pmos design swap [--write] (initiative token-swap-same-value, lib/design-swap.js) each fixed spacing or corner value in a scanned
|
|
18
|
+
* stylesheet that equals a design token: counted per file, or with --write replaced by that token. Nothing on screen moves.
|
|
19
|
+
*
|
|
20
|
+
* Run it in the product's repository. drift reads git only and changes nothing else. Exit codes: 0 done, 1 a count rose (only with --gate) or
|
|
18
21
|
* the refs cannot be read, 2 usage. */
|
|
19
22
|
const fs = require('fs');
|
|
20
23
|
const path = require('path');
|
|
21
24
|
const D = require('./design-drift.js');
|
|
22
25
|
|
|
23
|
-
const COMMANDS = { design: ['drift'] };
|
|
26
|
+
const COMMANDS = { design: ['drift', 'swap'] };
|
|
24
27
|
const USAGE = [
|
|
25
28
|
'usage: pmos design drift — every place your styles and scripts do not read a design token, and which ones a change adds',
|
|
26
29
|
' pmos design drift [--ref <ref>] [--base <ref>|week] [--weeks <n>] [--json] [--write] [--gate] [--github] [--pages]',
|
|
@@ -32,6 +35,7 @@ const USAGE = [
|
|
|
32
35
|
' --github print each new bypass as a GitHub warning on its line',
|
|
33
36
|
' --pages each page\'s share of system classes instead (a measure only)',
|
|
34
37
|
'It reads git only. A product sets its files and system sheets in design-drift.json in its design-system folder.',
|
|
38
|
+
' pmos design swap [--write] each fixed spacing or corner value that equals a design token: counted, or with --write replaced by the token',
|
|
35
39
|
];
|
|
36
40
|
const FLAGS = new Set(['ref', 'base', 'weeks', 'json', 'write', 'gate', 'repo', 'github', 'pages']);
|
|
37
41
|
const BOOL = new Set(['json', 'write', 'gate', 'github', 'pages']);
|
|
@@ -60,6 +64,14 @@ async function run(argv, { say = (s) => console.log(s), cwd = process.cwd(), now
|
|
|
60
64
|
if (!sub || ['help', '--help', '-h'].includes(sub)) { for (const l of USAGE) say(l); return sub ? 0 : 2; }
|
|
61
65
|
if (!COMMANDS.design.includes(sub)) { say(`unknown design command "${sub}". Use one of: ${COMMANDS.design.join(', ')}`); return 2; }
|
|
62
66
|
const { pos, flags } = parse(args.slice(1));
|
|
67
|
+
if (sub === 'swap') {
|
|
68
|
+
const bad = Object.keys(flags).filter((k) => k !== 'write' && k !== 'repo');
|
|
69
|
+
if (pos.length || bad.length) { say('✗ usage: pmos design swap [--write]'); return 2; }
|
|
70
|
+
const root = repoRoot(flags.repo ? path.resolve(cwd, flags.repo) : cwd);
|
|
71
|
+
if (!root) { say('✗ this is not a git repository. Run pmos design swap in your product\'s repository.'); return 1; }
|
|
72
|
+
require('./design-swap.js').run({ root, write: !!flags.write, say });
|
|
73
|
+
return 0;
|
|
74
|
+
}
|
|
63
75
|
if (pos.length) { say(`✗ pmos design ${sub} takes no argument`); return 2; }
|
|
64
76
|
for (const k of Object.keys(flags)) if (!FLAGS.has(k)) { say(`✗ --${k} is not an option of pmos design drift`); return 2; }
|
|
65
77
|
for (const k of ['ref', 'base', 'weeks', 'repo']) if (k in flags && !flags[k]) { say(`✗ --${k} needs a value`); return 2; }
|
|
@@ -47,6 +47,8 @@ const DEFAULTS = Object.freeze({
|
|
|
47
47
|
scan: ['workspace/public/**/*.css', 'workspace/public/**/*.js', 'workspace/public/**/*.html'],
|
|
48
48
|
ignore: ['workspace/public/vendor/**'],
|
|
49
49
|
systemScripts: ['komorebi.js'],
|
|
50
|
+
// `pmos design swap` (token-swap-same-value) leaves these sheets alone: they draw in a frame that does not load the system's sheets
|
|
51
|
+
swapIgnore: ['workspace/public/pm/tokens.css', 'workspace/public/pm/premium-report-*.css'],
|
|
50
52
|
});
|
|
51
53
|
const CONFIG_PLACES = ['pmos/design-system/design-drift.json', 'design-system/design-drift.json', 'workspace/design-system/design-drift.json'];
|
|
52
54
|
const REBUILT_SHARE = 0.10;
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
/* design-swap.js — swap a fixed spacing or corner value for the design token with the same value (initiative token-swap-same-value,
|
|
3
|
+
* token-first design system step 2). Wawan, 2026-11-22: every part of every page reads the design system's tokens, so that changing one
|
|
4
|
+
* token changes every page. The token guard (lib/design-drift.js, `pmos design drift`) counts the places that skip a token; this rewrites
|
|
5
|
+
* the ones where a token has EXACTLY the value written, so nothing on screen moves.
|
|
6
|
+
*
|
|
7
|
+
* What it swaps: lengths in padding, margin, gap and border-radius declarations (each length of a shorthand on its own; px, and rem at
|
|
8
|
+
* 16 px). A length with no same-value token stays and is listed (`left`): a value between two tokens is a decision, never a guess.
|
|
9
|
+
* What it never touches: custom property definitions, a value inside var(--x, fallback), @keyframes, the scaled canvases (slides, report
|
|
10
|
+
* cards, the presented page, the diagram labels: their sizes follow the canvas, not the UI), the system's own sheets, scripts and HTML.
|
|
11
|
+
* Which token: from the system sheets (the product's design-drift config). A token declared at :root wins over a scoped one (it works on
|
|
12
|
+
* every page); then the later sheet wins, so the UI system's own sheet beats brand and charts (10px → --radius-md, not --radius-lane).
|
|
13
|
+
*
|
|
14
|
+
* swap(css, tokens) PURE → { css, n, left: [{ line, prop, value }] } · tokensFrom(sheetTexts) PURE → Map value(px) → { spacing, corner }
|
|
15
|
+
* run({ root, write, say }) → { files: [{ file, n, left }], total } — `pmos design swap [--write]` (lib/design-cli.js)
|
|
16
|
+
*/
|
|
17
|
+
const fs = require('fs');
|
|
18
|
+
const path = require('path');
|
|
19
|
+
const DD = require('./design-drift.js');
|
|
20
|
+
|
|
21
|
+
const SPACE_PROP = /^(?:(?:padding|margin)(?:-(?:top|right|bottom|left|inline|block)(?:-(?:start|end))?)?|(?:row-|column-)?gap)$/;
|
|
22
|
+
const RADIUS_PROP = /^border(?:-[a-z]+)*-radius$/;
|
|
23
|
+
const FAMILY = { spacing: /^--space-/, corner: /^--radius-/ };
|
|
24
|
+
// the scaled canvases (conformance-gate.js SCALED_CANVAS, and the report slide): their lengths are canvas units
|
|
25
|
+
const CANVAS = /(?:^|[\s>+~,(])\.(?:sl-(?:cv|tx|it|lab|axl|ph)|r-(?:title|heading|small|kicker|big|quote)|vzx-page|vz-(?:words|tfig|th)|rds|rsm|rp-slide|tg-clu|tg-tmc|iv-tlm|pc-(?:flow|lanes|sn|dn|e|ln|bx))\b/;
|
|
26
|
+
const LENGTH = /(?<![\w.#/-])(-?\d*\.?\d+)(px|rem)\b/g;
|
|
27
|
+
const log = (s) => `[token-swap] ${s}`;
|
|
28
|
+
|
|
29
|
+
/** PURE. The system's spacing and corner tokens: px value → { spacing: name, corner: name }. */
|
|
30
|
+
function tokensFrom(sheets) {
|
|
31
|
+
const best = { spacing: new Map(), corner: new Map() }; // px → { name, root, order }
|
|
32
|
+
sheets.forEach((css, order) => {
|
|
33
|
+
const src = String(css || '').replace(/\/\*[\s\S]*?\*\//g, '');
|
|
34
|
+
for (const m of src.matchAll(/([^{}]*)\{([^{}]*)\}/g)) {
|
|
35
|
+
const root = m[1].split(',').some((x) => /^:root\b/.test(x.trim()));
|
|
36
|
+
for (const d of m[2].matchAll(/(--[a-z0-9-]+)\s*:\s*([^;]+)/g)) {
|
|
37
|
+
const v = /^(\d*\.?\d+)(px|rem)$/.exec(d[2].trim()); if (!v) continue;
|
|
38
|
+
const px = v[2] === 'px' ? Number(v[1]) : Number(v[1]) * 16;
|
|
39
|
+
for (const k of Object.keys(FAMILY)) {
|
|
40
|
+
if (!FAMILY[k].test(d[1])) continue;
|
|
41
|
+
const cur = best[k].get(px), cand = { name: d[1], root, order };
|
|
42
|
+
if (!cur || (cand.root && !cur.root) || (cand.root === cur.root && cand.order >= cur.order)) best[k].set(px, cand);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
return { spacing: new Map([...best.spacing].map(([px, t]) => [px, t.name])), corner: new Map([...best.corner].map(([px, t]) => [px, t.name])) };
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/** One declaration value with each same-value length swapped. → { value, n, left: [length] } */
|
|
51
|
+
function swapValue(value, map) {
|
|
52
|
+
let n = 0; const left = [];
|
|
53
|
+
// a var(…) call is a token already: keep it whole (its fallback included)
|
|
54
|
+
const parts = []; let rest = value;
|
|
55
|
+
while (rest.length) {
|
|
56
|
+
const i = rest.indexOf('var(');
|
|
57
|
+
if (i < 0) { parts.push([rest, false]); break; }
|
|
58
|
+
parts.push([rest.slice(0, i), false]);
|
|
59
|
+
let depth = 0, j = i + 3;
|
|
60
|
+
for (; j < rest.length; j++) { if (rest[j] === '(') depth++; else if (rest[j] === ')' && --depth === 0) break; }
|
|
61
|
+
parts.push([rest.slice(i, j + 1), true]); rest = rest.slice(j + 1);
|
|
62
|
+
}
|
|
63
|
+
const out = parts.map(([t, keep]) => (keep ? t : t.replace(LENGTH, (m, num, unit) => {
|
|
64
|
+
const px = unit === 'px' ? Number(num) : Number(num) * 16;
|
|
65
|
+
if (px === 0) return m;
|
|
66
|
+
const name = map.get(Math.abs(px));
|
|
67
|
+
if (!name) { left.push(m); return m; }
|
|
68
|
+
n++;
|
|
69
|
+
return px < 0 ? `calc(-1 * var(${name}))` : `var(${name})`;
|
|
70
|
+
}))).join('');
|
|
71
|
+
return { value: out, n, left };
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/** PURE. Swap a stylesheet. Comments, @keyframes, custom properties and canvas rules stay as written. */
|
|
75
|
+
function swap(css, tokens) {
|
|
76
|
+
const src = String(css || '');
|
|
77
|
+
let out = '', n = 0, i = 0, line = 1;
|
|
78
|
+
const left = [];
|
|
79
|
+
const stack = []; // selector or at-rule prelude of each open block
|
|
80
|
+
let buf = '';
|
|
81
|
+
const skipBlock = () => stack.some((s) => /^@keyframes|^@-webkit-keyframes/.test(s) || CANVAS.test(' ' + s));
|
|
82
|
+
const flushDecl = (text) => {
|
|
83
|
+
// text: one declaration with its leading whitespace, no ';' or '}'
|
|
84
|
+
const m = /^(\s*)([a-z-]+)(\s*:\s*)([\s\S]*?)(\s*)$/.exec(text);
|
|
85
|
+
if (!m || skipBlock() || !stack.length) return text;
|
|
86
|
+
const prop = m[2];
|
|
87
|
+
const kind = SPACE_PROP.test(prop) ? 'spacing' : RADIUS_PROP.test(prop) ? 'corner' : null;
|
|
88
|
+
if (!kind) return text;
|
|
89
|
+
const r = swapValue(m[4], tokens[kind]);
|
|
90
|
+
n += r.n;
|
|
91
|
+
for (const v of r.left) left.push({ line, prop, value: v });
|
|
92
|
+
return m[1] + prop + m[3] + r.value + m[5];
|
|
93
|
+
};
|
|
94
|
+
while (i < src.length) {
|
|
95
|
+
const ch = src[i];
|
|
96
|
+
if (ch === '/' && src[i + 1] === '*') { const e = src.indexOf('*/', i + 2); const end = e < 0 ? src.length : e + 2; const c = src.slice(i, end); buf += c; line += (c.match(/\n/g) || []).length; i = end; continue; }
|
|
97
|
+
if (ch === '"' || ch === "'") { const e = src.indexOf(ch, i + 1); const end = e < 0 ? src.length : e + 1; buf += src.slice(i, end); i = end; continue; }
|
|
98
|
+
if (ch === '{') { stack.push(buf.replace(/\/\*[\s\S]*?\*\//g, '').trim()); out += buf + ch; buf = ''; i++; continue; }
|
|
99
|
+
if (ch === ';' || ch === '}') {
|
|
100
|
+
out += flushDecl(buf) + ch; buf = '';
|
|
101
|
+
if (ch === '}') stack.pop();
|
|
102
|
+
i++; continue;
|
|
103
|
+
}
|
|
104
|
+
if (ch === '\n') line++;
|
|
105
|
+
buf += ch; i++;
|
|
106
|
+
}
|
|
107
|
+
out += buf;
|
|
108
|
+
return { css: out, n, left };
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
/** Walk a folder for files (skips node_modules and .git). */
|
|
112
|
+
function walk(root, rel = '', acc = []) {
|
|
113
|
+
for (const e of fs.readdirSync(path.join(root, rel), { withFileTypes: true })) {
|
|
114
|
+
if (e.name === 'node_modules' || e.name === '.git') continue;
|
|
115
|
+
const p = rel ? rel + '/' + e.name : e.name;
|
|
116
|
+
if (e.isDirectory()) walk(root, p, acc); else acc.push(p);
|
|
117
|
+
}
|
|
118
|
+
return acc;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
/** `pmos design swap [--write]`: every scanned stylesheet of the product at root, from its design-drift config. */
|
|
122
|
+
function run({ root = process.cwd(), write = false, say = (s) => console.log(s) } = {}) {
|
|
123
|
+
const read = (p) => { try { return fs.readFileSync(path.join(root, p), 'utf8'); } catch { return null; } };
|
|
124
|
+
const cfg = DD.configAt(read);
|
|
125
|
+
const files = walk(root).filter((p) => /\.css$/i.test(p));
|
|
126
|
+
const isSystem = (p) => (cfg.systemSheets || []).some((n) => p === n || p.endsWith('/' + n));
|
|
127
|
+
const sysSheets = files.filter(isSystem).sort((a, b) => cfg.systemSheets.findIndex((n) => a.endsWith(n)) - cfg.systemSheets.findIndex((n) => b.endsWith(n)));
|
|
128
|
+
const tokens = tokensFrom(sysSheets.map(read));
|
|
129
|
+
const scan = (cfg.scan || []).map(DD.globRe), ignore = [...(cfg.ignore || []), ...(cfg.swapIgnore || [])].map(DD.globRe);
|
|
130
|
+
const targets = files.filter((p) => !isSystem(p) && scan.some((re) => re.test(p)) && !ignore.some((re) => re.test(p))).sort();
|
|
131
|
+
const out = []; let total = 0, leftTotal = 0;
|
|
132
|
+
for (const f of targets) {
|
|
133
|
+
const text = read(f);
|
|
134
|
+
const r = swap(text, tokens);
|
|
135
|
+
if (!r.n && !r.left.length) continue;
|
|
136
|
+
out.push({ file: f, n: r.n, left: r.left });
|
|
137
|
+
total += r.n; leftTotal += r.left.length;
|
|
138
|
+
if (r.n) say(log(`${f}: ${r.n} ${write ? 'swapped' : 'to swap'}${r.left.length ? `, ${r.left.length} between two tokens` : ''}`));
|
|
139
|
+
if (write && r.n) fs.writeFileSync(path.join(root, f), r.css);
|
|
140
|
+
}
|
|
141
|
+
say(log(`${write ? 'swapped' : 'same-value swaps'} ${total} in ${out.filter((x) => x.n).length} stylesheets; ${leftTotal} lengths sit between two tokens and stay`));
|
|
142
|
+
say(String(total));
|
|
143
|
+
return { files: out, total, left: leftTotal };
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
module.exports = { swap, swapValue, tokensFrom, run, CANVAS };
|
|
@@ -100,8 +100,9 @@ function tokensOf(json) {
|
|
|
100
100
|
}
|
|
101
101
|
|
|
102
102
|
// a token can name another one: "{blue}" is the brand's blue, so the chart role follows the brand in both themes
|
|
103
|
-
// the
|
|
104
|
-
// names that alias them (LEGACY_TYPE) resolve them everywhere.
|
|
103
|
+
// the UI system's unscoped token blocks (type, spacing, corners): written at :root in the workspace sheet too (not scoped to .pm-ds), so a
|
|
104
|
+
// page without pm-ds and the older names that alias them (LEGACY_TYPE) resolve them everywhere. No other sheet declares these names, so
|
|
105
|
+
// declaring them on every page changes no rule.
|
|
105
106
|
const TYPE_ROOT = ':root:where(*)';
|
|
106
107
|
const valueOf = (v) => String(v).replace(/\{([a-z0-9-]+)\}/g, 'var(--$1)');
|
|
107
108
|
/** PURE. A system's tokens.json → its tokens.css: the themed tokens (light, then dark), the rest, and (ui only) the type classes. */
|
|
@@ -120,7 +121,9 @@ function tokensCss(json, name) {
|
|
|
120
121
|
const L = [`/* ${(SYSTEMS[name] || {}).title || name} tokens. GENERATED from tokens.json by lib/design-system.js: do not edit; run \`node lib/design-system.js --write\`. */`];
|
|
121
122
|
if (light.length) L.push(`:root, [data-theme="light"] {${light.join(';')}}`);
|
|
122
123
|
if (dark.length) L.push(`[data-theme="dark"] {${dark.join(';')}}`);
|
|
123
|
-
|
|
124
|
+
// the UI system's spacing and corners sit at :root in the workspace sheet too (token-swap-same-value): a page sheet that reads them works
|
|
125
|
+
// on every page, with or without pm-ds
|
|
126
|
+
if (rest.length) L.push(`${(SYSTEMS[name] || {}).types ? TYPE_ROOT : ':root'} {${rest.join(';')}}`);
|
|
124
127
|
if ((SYSTEMS[name] || {}).types) {
|
|
125
128
|
// the type styles are tokens (--type-, --leading-, --weight-<style>), and the type classes read them: a change to one style's size in
|
|
126
129
|
// tokens.json reaches every class and part that names it (initiative token-first-design-system)
|
|
@@ -199,7 +202,7 @@ function sheetOf(name, tokens, bundle) {
|
|
|
199
202
|
` * lib/design-system.js: do not edit; change the system's files and run \`node lib/design-system.js --write\`. Every rule is scoped to ${sys.scope},`,
|
|
200
203
|
' * so the sheet changes nothing until a page puts the class on its root. Load brand.css, then charts.css, then the system\'s own sheet. */',
|
|
201
204
|
];
|
|
202
|
-
if (sys.types) L.push('/* Except the type tokens (--type-, --leading-, --weight
|
|
205
|
+
if (sys.types) L.push('/* Except the type, spacing and corner tokens (--type-, --leading-, --weight-, --space-, --radius-) and the workspace\'s older type names that\n * point at them (--fs-*, --fw-*, --lh-*): those sit at :root, so a change to one Komorebi token reaches every page, with or without the class. */');
|
|
203
206
|
if (name === 'brand') L.push(...FONTS);
|
|
204
207
|
// brand and charts sit inside another system's page: their own page-level rules (body, the preview root) are that system's job
|
|
205
208
|
const shared = sys.scope === FAMILY;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pmos-workspace",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.698.0",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "pmos-workspace",
|
|
9
|
-
"version": "0.
|
|
9
|
+
"version": "0.698.0",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@anthropic-ai/sdk": "^1.3.0",
|
package/workspace/package.json
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
/* pm/agenda-live.css — the agenda in 3 to 5 topics (pm/agenda-live.js; boards MgD and MgRD, initiative live-agenda-topics). Cozy tokens only. */
|
|
2
|
-
.mg { display: flex; flex-direction: column; gap:
|
|
2
|
+
.mg { display: flex; flex-direction: column; gap: var(--space-12); padding: var(--space-4) 0 var(--space-8); }
|
|
3
3
|
.mg * { box-sizing: border-box; }
|
|
4
4
|
.mg .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
|
|
5
|
-
.mg-tm { display: flex; align-items: baseline; gap:
|
|
5
|
+
.mg-tm { display: flex; align-items: baseline; gap: var(--space-8); flex-wrap: wrap; font-size: var(--fs-label); color: var(--cz-ink3); font-variant-numeric: tabular-nums; }
|
|
6
6
|
.mg-tm b { color: var(--cz-ink); font-weight: var(--fw-strong); }
|
|
7
7
|
.mg-tm .sp { flex: 1 1 0%; }
|
|
8
|
-
.mg-pr { display: flex; align-items: flex-start; gap: 10px; padding:
|
|
8
|
+
.mg-pr { display: flex; align-items: flex-start; gap: 10px; padding: var(--space-12) 14px; border-radius: 8px; background: var(--cz-well); }
|
|
9
9
|
.mg-pr .st { color: var(--cz-blueink); margin-top: 2px; display: inline-flex; }
|
|
10
10
|
.mg-pr .tx { flex: 1 1 0%; font-size: var(--fs-body); line-height: 1.5; color: var(--cz-ink); }
|
|
11
11
|
.mg-pr .tx small { display: block; margin-top: 2px; font-size: var(--fs-label); color: var(--cz-ink3); }
|
|
12
|
-
.mg-pr button { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius:
|
|
12
|
+
.mg-pr button { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: var(--radius-sm); border: 0; cursor: pointer; background: var(--cz-card); color: var(--cz-ink2); flex: 0 0 auto; }
|
|
13
13
|
@media (hover: hover) { .mg-pr button:hover { color: var(--cz-ink); } }
|
|
14
|
-
.mg-th { display: flex; flex-direction: column; gap: 6px; border-radius: 8px; background: var(--cz-well); padding: 10px
|
|
14
|
+
.mg-th { display: flex; flex-direction: column; gap: 6px; border-radius: 8px; background: var(--cz-well); padding: 10px var(--space-12); }
|
|
15
15
|
.mg-th[open] { gap: 6px; }
|
|
16
16
|
.mg-th.now { background: var(--cz-bluebg); }
|
|
17
17
|
.mg-th > summary { list-style: none; cursor: pointer; }
|
|
@@ -29,14 +29,14 @@
|
|
|
29
29
|
.mg .mk .odot { width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid var(--cz-ink3); background: linear-gradient(90deg, var(--cz-ink3) 50%, transparent 50%); display: block; opacity: .7; }
|
|
30
30
|
.mg .t4 { margin-left: auto; font-size: var(--fs-label); font-weight: var(--fw-strong); color: var(--cz-ink3); font-variant-numeric: tabular-nums; white-space: nowrap; padding-top: 2px; }
|
|
31
31
|
.mg .t4.ov { color: var(--cz-risk); }
|
|
32
|
-
.mg-now { background: var(--cz-card); border-radius: 8px; padding: 14px
|
|
32
|
+
.mg-now { background: var(--cz-card); border-radius: 8px; padding: 14px var(--space-16); display: flex; flex-direction: column; gap: 6px; }
|
|
33
33
|
.mg-now small { font-size: var(--fs-label); color: var(--cz-blueink); font-weight: var(--fw-strong); }
|
|
34
34
|
.mg-now h4 { margin: 0; font-size: var(--fs-row); font-weight: var(--fw-strong); color: var(--cz-ink); line-height: 1.35; }
|
|
35
35
|
.mg-now p { margin: 0; font-size: var(--fs-body); color: var(--cz-ink2); line-height: 1.5; }
|
|
36
36
|
.mg-now .ft { display: flex; align-items: center; gap: 10px; font-size: var(--fs-label); color: var(--cz-ink3); }
|
|
37
37
|
.mg-now .ft .sp { flex: 1 1 0%; }
|
|
38
38
|
.mg-lk { border: 0; background: none; padding: 6px 0; font: inherit; color: var(--cz-blueink); font-weight: var(--fw-strong); cursor: pointer; min-height: 32px; }
|
|
39
|
-
.mg-r { display: flex; align-items: flex-start; gap: 10px; padding:
|
|
39
|
+
.mg-r { display: flex; align-items: flex-start; gap: 10px; padding: var(--space-8) var(--space-4); font-size: var(--fs-body); line-height: 1.4; color: var(--cz-ink); }
|
|
40
40
|
.mg-r .tx { flex: 1 1 0%; min-width: 0; }
|
|
41
41
|
.mg-r .tx small { display: block; font-size: var(--fs-label); color: var(--cz-ink3); margin-top: 1px; line-height: 1.4; }
|
|
42
42
|
.mg-r .tx small.ok { color: var(--cz-ok); }
|