create-pmos 0.695.0 → 0.697.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 +15 -9
- package/payload/KIT-VERSION +1 -1
- package/payload/design-system/ui/components/bundle.css +35 -35
- package/payload/design-system/ui/tokens.css +6 -5
- 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/briefing-premium-doc-edit-test.js +5 -5
- package/workspace/briefing-premium-insights-test.js +2 -1
- package/workspace/changelog.json +14 -8
- package/workspace/design-system/ui/components/bundle.css +35 -35
- package/workspace/design-system/ui/tokens.css +6 -5
- package/workspace/design-token-reach.js +93 -0
- package/workspace/guide/cli.md +8 -0
- package/workspace/guide/home.md +3 -3
- package/workspace/lib/design-system.js +22 -4
- package/workspace/lib/premium-console-type.js +2 -1
- package/workspace/package-lock.json +2 -2
- package/workspace/package.json +1 -1
- package/workspace/premium-chat-notes-test.js +3 -3
- package/workspace/premium-menu-rows-test.js +2 -1
- package/workspace/premium-report-read-test.js +1 -1
- package/workspace/premium-vw-item-test.js +2 -0
- package/workspace/premium-vw-slides-test.js +3 -3
- package/workspace/public/capture.html +1 -0
- package/workspace/public/pm/console3.css +1 -1
- package/workspace/public/pm/cozy-board.css +3 -10
- package/workspace/public/pm/cozy-home.css +3 -5
- package/workspace/public/pm/cozy-insights.css +0 -1
- package/workspace/public/pm/cozy-viewer.js +1 -7
- package/workspace/public/pm/cozy-vw-shell.css +1 -2
- package/workspace/public/pm/cozy-vw.css +2 -6
- package/workspace/public/pm/cozy.css +3 -15
- package/workspace/public/pm/ds-bridge.css +3 -1
- package/workspace/public/pm/home-app.js +6 -7
- package/workspace/public/pm/home-chat.js +0 -1
- package/workspace/public/pm/home-ini.js +4 -4
- package/workspace/public/pm/home-more.js +1 -2
- package/workspace/public/pm/komorebi.css +44 -40
- package/workspace/public/pm/premium-board.js +1 -1
- package/workspace/public/pm/premium-mtg-present.js +1 -1
- package/workspace/public/pm/premium-report-read.js +3 -5
- package/workspace/public/pm/premium-shell.js +6 -10
- package/workspace/public/pm/premium-vw-backlog.css +0 -1
- package/workspace/public/pm/premium-vw-cal.css +0 -1
- package/workspace/public/pm/premium-vw-copy.css +0 -1
- package/workspace/public/pm/premium-vw-doc.css +0 -1
- package/workspace/public/pm/premium-vw-doc.js +2 -3
- package/workspace/public/pm/premium-vw-guide.css +0 -1
- package/workspace/public/pm/premium-vw-item.css +0 -1
- package/workspace/public/pm/premium-vw-jira.css +0 -1
- package/workspace/public/pm/premium-vw-meet.css +0 -1
- package/workspace/public/pm/premium-vw-notepad.css +0 -1
- package/workspace/public/pm/premium-vw-notes.css +0 -1
- package/workspace/public/pm/premium-vw-rec.css +0 -1
- package/workspace/public/pm/premium-vw-report.css +0 -1
- package/workspace/public/pm/premium-vw-slides.css +0 -1
- package/workspace/public/pm/premium-vw-slides.js +5 -6
- package/workspace/public/pm/premium.css +0 -1
- package/workspace/public/premium-board.html +1 -0
- package/workspace/public/premium-events.html +1 -0
- package/workspace/public/premium-goals.html +1 -0
- package/workspace/public/premium-intelligence.html +1 -0
- package/workspace/public/premium-library.html +1 -0
- package/workspace/public/premium-present.html +1 -0
- package/workspace/public/premium-routine.html +1 -0
- package/workspace/public/premium-viewer.html +1 -0
- package/workspace/test-lists/design-placeholders.json +9 -0
- package/workspace/test-lists/design-token-alias.json +9 -0
- package/workspace/public/pm/cozy-placeholder.js +0 -26
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
'use strict';
|
|
3
|
+
/* design-token-reach.js — proof that one design token change reaches every page (initiative token-first-design-system, done test T7, T8).
|
|
4
|
+
* Not a suite: a look at the pages, run by hand or by the Checker. It serves the workspace, and for each page in public/*.html that loads
|
|
5
|
+
* stylesheets it takes a screenshot and reads every visible element's font size and colour. Then it serves a TEST COPY of a system sheet
|
|
6
|
+
* with one token changed and does the same again. Nothing on disk changes:
|
|
7
|
+
* type komorebi.css with --type-body 15px → 17px must change every page
|
|
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
|
+
* 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
|
+
* (--fs-body, --fs-meta, --fs-panel, --fs-display) of the unchanged page, which must still read 15, 13, 18 and 26 px.
|
|
11
|
+
* OUT=<dir> where the before/after PNGs go (default: this run's state folder). PAGES=a.html,b.html only these pages. */
|
|
12
|
+
const fs = require('fs');
|
|
13
|
+
const path = require('path');
|
|
14
|
+
const { spawn } = require('child_process');
|
|
15
|
+
const { findBrowser } = require('./lib/find-browser');
|
|
16
|
+
const T = require('./test-run').configure({ name: 'design-token-reach' });
|
|
17
|
+
const OUT = process.env.OUT || path.join(T.STATE_DIR, 'token-reach');
|
|
18
|
+
const PUB = path.join(__dirname, 'public');
|
|
19
|
+
const read = (f) => fs.readFileSync(f, 'utf8');
|
|
20
|
+
|
|
21
|
+
const PAGES = (process.env.PAGES ? process.env.PAGES.split(',') : fs.readdirSync(PUB).filter((f) => f.endsWith('.html')))
|
|
22
|
+
.filter((f) => /href="\/pm\/[^"]+\.css"/.test(read(path.join(PUB, f))));
|
|
23
|
+
// each change is one token in a test copy of one system sheet; [from, to] pairs (a colour has a light and a dark value)
|
|
24
|
+
const CHANGES = [
|
|
25
|
+
{ key: 'type-body', sheet: 'komorebi.css', pairs: [['--type-body:15px', '--type-body:17px']], kind: 'type' },
|
|
26
|
+
{ key: 'type-small', sheet: 'komorebi.css', pairs: [['--type-small:13px', '--type-small:15px']], kind: 'type' },
|
|
27
|
+
{ key: 'ink', sheet: 'brand.css', pairs: [['--ink:#2A2E35', '--ink:#B03020'], ['--ink:#ECEEF1', '--ink:#FF8A80']], kind: 'colour' },
|
|
28
|
+
{ key: 'muted', sheet: 'brand.css', pairs: [['--muted:#646A74', '--muted:#B03020'], ['--muted:#9EA4AD', '--muted:#FF8A80']], kind: 'colour' },
|
|
29
|
+
];
|
|
30
|
+
// a page the server serves at another address
|
|
31
|
+
const URLS = { 'capture.html': '/console.html?capture=1', 'premium-present.html': '/pm/present' };
|
|
32
|
+
const log = (s) => console.log('[token-reach] ' + s);
|
|
33
|
+
|
|
34
|
+
/* every visible element's font size and colour, and the type roles on the body */
|
|
35
|
+
const sample = () => {
|
|
36
|
+
const out = [];
|
|
37
|
+
for (const el of document.querySelectorAll('body *')) {
|
|
38
|
+
const r = el.getBoundingClientRect();
|
|
39
|
+
if (!r.width || !r.height) continue;
|
|
40
|
+
const s = getComputedStyle(el);
|
|
41
|
+
out.push(s.fontSize + '|' + s.color);
|
|
42
|
+
}
|
|
43
|
+
const b = getComputedStyle(document.body);
|
|
44
|
+
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
|
+
};
|
|
46
|
+
|
|
47
|
+
(async () => {
|
|
48
|
+
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
|
+
const { chromium } = require('playwright-core');
|
|
50
|
+
const srv = spawn(process.execPath, [path.join(__dirname, 'server.js')], { cwd: __dirname, stdio: 'ignore', env: T.env({ PMOS_WS_PORT: String(T.PORT) }) });
|
|
51
|
+
await T.waitForServer(T.BASE);
|
|
52
|
+
const browser = await chromium.launch({ executablePath: findBrowser() });
|
|
53
|
+
fs.mkdirSync(OUT, { recursive: true });
|
|
54
|
+
const shoot = async (page, change) => {
|
|
55
|
+
const ctx = await browser.newContext({ viewport: { width: 1280, height: 800 }, colorScheme: 'light', reducedMotion: 'reduce' });
|
|
56
|
+
if (change) await ctx.route('**/pm/' + change.sheet + '*', (r) => r.fulfill({ contentType: 'text/css', body: change.pairs.reduce((t, [a, b]) => t.split(a).join(b), read(path.join(PUB, 'pm', change.sheet))) }));
|
|
57
|
+
const p = await ctx.newPage();
|
|
58
|
+
await p.goto(T.BASE + (URLS[page] || '/' + page), { waitUntil: 'load' }).catch(() => {});
|
|
59
|
+
await p.waitForTimeout(1500);
|
|
60
|
+
const s = await p.evaluate(sample);
|
|
61
|
+
const png = await p.screenshot({ fullPage: true });
|
|
62
|
+
await ctx.close();
|
|
63
|
+
return { ...s, png };
|
|
64
|
+
};
|
|
65
|
+
const misses = [];
|
|
66
|
+
const roleLines = [];
|
|
67
|
+
for (const page of PAGES) {
|
|
68
|
+
const base = await shoot(page, null);
|
|
69
|
+
const again = await shoot(page, null); // the same page twice: if it differs by itself, a changed screenshot proves nothing
|
|
70
|
+
const steady = Buffer.compare(base.png, again.png) === 0;
|
|
71
|
+
fs.writeFileSync(path.join(OUT, page.replace('.html', '') + '-before.png'), base.png);
|
|
72
|
+
roleLines.push(`${page}: ${base.roles.join(' / ')}`);
|
|
73
|
+
const parts = [], hit = { type: false, colour: false };
|
|
74
|
+
for (const c of CHANGES) {
|
|
75
|
+
const after = await shoot(page, c);
|
|
76
|
+
fs.writeFileSync(path.join(OUT, page.replace('.html', '') + '-' + c.key + '.png'), after.png);
|
|
77
|
+
const shot = Buffer.compare(base.png, after.png) !== 0;
|
|
78
|
+
const n = base.els.filter((v, i) => after.els[i] !== undefined && after.els[i] !== v).length;
|
|
79
|
+
const reached = shot && n > 0; // the screenshot changed AND at least one element's size or colour changed
|
|
80
|
+
if (reached) hit[c.kind] = true;
|
|
81
|
+
parts.push(`${c.key} ${reached ? 'yes' : 'no'} (${n})`);
|
|
82
|
+
}
|
|
83
|
+
for (const k of ['type', 'colour']) if (!hit[k]) misses.push(`${page} ${k}`);
|
|
84
|
+
log(`${page}${steady ? '' : ' (moves by itself)'} · type ${hit.type ? 'reached' : 'NOT reached'} · colour ${hit.colour ? 'reached' : 'NOT reached'} · ${parts.join(', ')}`);
|
|
85
|
+
}
|
|
86
|
+
console.log('\ntype roles on each page before the change (--fs-body / --fs-meta / --fs-panel / --fs-display):\n ' + roleLines.join('\n '));
|
|
87
|
+
const wrongRoles = roleLines.filter((l) => !l.endsWith('15px / 13px / 18px / 26px'));
|
|
88
|
+
if (wrongRoles.length) misses.push('type roles not 15/13/18/26 px on ' + wrongRoles.length + ' page(s)');
|
|
89
|
+
log(`${PAGES.length - new Set(misses.map((m) => m.split(' ')[0])).size} of ${PAGES.length} pages reached · screenshots in ${OUT}`);
|
|
90
|
+
if (misses.length) log('NOT reached: ' + misses.join(', '));
|
|
91
|
+
await browser.close(); srv.kill('SIGKILL'); T.killTmux && T.killTmux();
|
|
92
|
+
process.exit(misses.length ? 1 : 0);
|
|
93
|
+
})().catch((e) => { console.error(e); process.exit(2); });
|
package/workspace/guide/cli.md
CHANGED
|
@@ -350,6 +350,14 @@ The aim: change one token and every page follows. Each place this command counts
|
|
|
350
350
|
- `--pages` shows the older measure instead: for each page, the share of its classes that the system defines and its own CSS rules.
|
|
351
351
|
- A product sets the files to count and its system sheets in `design-drift.json` in its design-system folder, for example `{ "scan": ["web/**/*.css"], "systemSheets": ["ds.css"] }`.
|
|
352
352
|
|
|
353
|
+
### One token, every page
|
|
354
|
+
|
|
355
|
+
The design system's own sheet (Komorebi, `komorebi.css`) is the only place the text sizes are written. Its type styles are tokens: `--type-title`, `--type-heading`, `--type-body`, `--type-small` and `--type-code`, each with a `--leading-` and a `--weight-` token. The older names that pages use (`--fs-body`, `--fs-meta` and the other `--fs-*` roles, `--fw-regular`, `--fw-strong`) point at them. Every page loads the colour bridge (`ds-bridge.css`), so the older `--cz-*` colours point at the system's colours.
|
|
356
|
+
|
|
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
|
+
|
|
359
|
+
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
|
+
|
|
353
361
|
### pmos pages: fix a page before you add to it
|
|
354
362
|
|
|
355
363
|
A page that keeps breaking should get fixed before it gets a new feature. This command shows which pages keep breaking.
|
package/workspace/guide/home.md
CHANGED
|
@@ -167,7 +167,7 @@ PMOS names a session after its first real answer. It does not ask. It changes th
|
|
|
167
167
|
- **Undo** gives back the name that PMOS gave, and PMOS names the session again.
|
|
168
168
|
- The Home row shows the same name.
|
|
169
169
|
|
|
170
|
-
Some features
|
|
170
|
+
Some features, such as Notes, open as a plain card in the Viewer. Each one works fully. If a part of the Viewer cannot load, a short message says that it could not open.
|
|
171
171
|
|
|
172
172
|
## Search, Guide and Settings
|
|
173
173
|
|
|
@@ -239,11 +239,11 @@ A need opens in the Viewer with its title, its facts and its choices. A need fro
|
|
|
239
239
|
|
|
240
240
|
## Your first Briefing
|
|
241
241
|
|
|
242
|
-
After an import in Welcome, Home opens with `first=` in the address. A card at the top of the list shows what came in and the state of each tool that you ticked. **Undo this import** reverses the import and returns to Welcome.
|
|
242
|
+
After an import in Welcome, Home opens with `first=` in the address. A card at the top of the list shows what came in and the state of each tool that you ticked. **Undo this import** reverses the import and returns to Welcome.
|
|
243
243
|
|
|
244
244
|
## A document page
|
|
245
245
|
|
|
246
|
-
A document opens as a page in the Viewer. Use **Page**, **Edit** or **Markdown** to read it, edit it in place, or edit the file as text. Under the page, a section
|
|
246
|
+
A document opens as a page in the Viewer. Use **Page**, **Edit** or **Markdown** to read it, edit it in place, or edit the file as text. Under the page, a section holds two lists:
|
|
247
247
|
|
|
248
248
|
- **Edit log.** Each version of the file, with its reason, who changed it, and the day.
|
|
249
249
|
- **Proposals.** The agent's proposed changes. **Open proposals** shows each open proposal with the request and each section. **Accept** takes only the sections that are still current. If no section is current, the proposal says that it cannot be accepted. **Reject** asks for a reason first. **Closed** lists the accepted and rejected proposals with their reasons. If the server refuses a press, the section shows the server's reason.
|
|
@@ -100,6 +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 type tokens' block: written at :root in the workspace sheet too (not scoped to .pm-ds), so a page without pm-ds and the older
|
|
104
|
+
// names that alias them (LEGACY_TYPE) resolve them everywhere. The names are new, so declaring them on every page changes no rule.
|
|
105
|
+
const TYPE_ROOT = ':root:where(*)';
|
|
103
106
|
const valueOf = (v) => String(v).replace(/\{([a-z0-9-]+)\}/g, 'var(--$1)');
|
|
104
107
|
/** PURE. A system's tokens.json → its tokens.css: the themed tokens (light, then dark), the rest, and (ui only) the type classes. */
|
|
105
108
|
function tokensCss(json, name) {
|
|
@@ -119,9 +122,11 @@ function tokensCss(json, name) {
|
|
|
119
122
|
if (dark.length) L.push(`[data-theme="dark"] {${dark.join(';')}}`);
|
|
120
123
|
if (rest.length) L.push(`:root {${rest.join(';')}}`);
|
|
121
124
|
if ((SYSTEMS[name] || {}).types) {
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
}
|
|
125
|
+
// the type styles are tokens (--type-, --leading-, --weight-<style>), and the type classes read them: a change to one style's size in
|
|
126
|
+
// tokens.json reaches every class and part that names it (initiative token-first-design-system)
|
|
127
|
+
const styles = (((json && json.type) || {}).groups || []).flatMap((g) => (g.styles || []).map((st) => ({ ...st, family: st.family || g.family || 'sans' })));
|
|
128
|
+
if (styles.length) L.push(`${TYPE_ROOT} {${styles.map((st) => `--type-${st.name}:${st.fontSize};--leading-${st.name}:${st.lineHeight};--weight-${st.name}:${st.fontWeight}`).join(';')}}`);
|
|
129
|
+
for (const st of styles) L.push(`.${st.name}{font-family:var(--font-${st.family});font-size:var(--type-${st.name});line-height:var(--leading-${st.name});font-weight:var(--weight-${st.name})}`);
|
|
125
130
|
}
|
|
126
131
|
return L.join('\n') + '\n';
|
|
127
132
|
}
|
|
@@ -175,6 +180,17 @@ const UI_GLUE = [
|
|
|
175
180
|
`${SCOPE} .pm-chart-head:empty{display:none}`,
|
|
176
181
|
];
|
|
177
182
|
|
|
183
|
+
/* The workspace's older type names, pointed at Komorebi once, here (initiative token-first-design-system). The 16 stylesheets that
|
|
184
|
+
* wrote them again are gone, so a change to a Komorebi type token reaches every page. The values are the ones they had: 26, 18, 15, 13 px
|
|
185
|
+
* and 400 / 600. --fs-field is not a role (a phone zooms into a field under 16 px) and the line heights are the roles' own densities. */
|
|
186
|
+
const LEGACY_TYPE = ':root{' + [
|
|
187
|
+
'--fw-regular:var(--weight-body)', '--fw-strong:var(--weight-heading)', '--fs-field:16px',
|
|
188
|
+
'--fs-display:var(--type-title)', '--fs-page:var(--type-title)', '--fs-panel:var(--type-heading)',
|
|
189
|
+
'--fs-section:var(--type-body)', '--fs-row:var(--type-body)', '--fs-body:var(--type-body)',
|
|
190
|
+
'--fs-meta:var(--type-small)', '--fs-label:var(--type-small)', '--fs-badge:var(--type-small)',
|
|
191
|
+
'--lh-display:1.2', '--lh-page:1.2', '--lh-panel:1.3', '--lh-section:1.35', '--lh-row:1.4', '--lh-body:1.6', '--lh-meta:1.5', '--lh-label:1.35', '--lh-badge:1.2',
|
|
192
|
+
].join(';') + '}';
|
|
193
|
+
|
|
178
194
|
/** PURE. One system's workspace sheet from its tokens.css and components/bundle.css. */
|
|
179
195
|
function sheetOf(name, tokens, bundle) {
|
|
180
196
|
const sys = SYSTEMS[name];
|
|
@@ -183,6 +199,7 @@ function sheetOf(name, tokens, bundle) {
|
|
|
183
199
|
` * 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},`,
|
|
184
200
|
' * 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. */',
|
|
185
201
|
];
|
|
202
|
+
if (sys.types) L.push('/* Except the type tokens (--type-, --leading-, --weight-<style>) and the workspace\'s older type names that point at them (--fs-*, --fw-*,\n * --lh-*): those sit at :root, so a change to one Komorebi type token reaches every page, with or without the class. */');
|
|
186
203
|
if (name === 'brand') L.push(...FONTS);
|
|
187
204
|
// brand and charts sit inside another system's page: their own page-level rules (body, the preview root) are that system's job
|
|
188
205
|
const shared = sys.scope === FAMILY;
|
|
@@ -201,12 +218,13 @@ function sheetOf(name, tokens, bundle) {
|
|
|
201
218
|
if (/^@keyframes/.test(p.sel)) { L.push(`${indent}${p.sel}{${p.body.replace(/\s+/g, ' ')}}`); continue; }
|
|
202
219
|
// a preview wrapper's own layout (padding, a column of cards) is for the system's previews, not for a workspace page
|
|
203
220
|
if ((sys.roots || []).includes(p.sel) && /padding/.test(p.body)) continue;
|
|
221
|
+
if (p.sel === TYPE_ROOT) { L.push(`${indent}:root{${p.body}}`); continue; }
|
|
204
222
|
L.push(`${indent}${scopeList(p.sel, sys)}{${p.body}}`);
|
|
205
223
|
}
|
|
206
224
|
};
|
|
207
225
|
emit(pieces(dropImports(tokens)), '', false);
|
|
208
226
|
emit(pieces(dropImports(bundle)), '', true);
|
|
209
|
-
if (name === 'ui') L.push(...UI_GLUE);
|
|
227
|
+
if (name === 'ui') L.push(...UI_GLUE, LEGACY_TYPE);
|
|
210
228
|
return L.join('\n') + '\n';
|
|
211
229
|
}
|
|
212
230
|
|
|
@@ -8,6 +8,8 @@
|
|
|
8
8
|
* transform(css) maps a premium stylesheet onto the console's type and changes nothing else: every font size goes to the nearest console
|
|
9
9
|
* step, every heavy weight to 600 (550 to 500), the two font families to the console's, and the body line height to 1.5. It is idempotent,
|
|
10
10
|
* so a stylesheet already on console type comes back unchanged (premium-console-type.test.js holds the committed stylesheets to that).
|
|
11
|
+
* It no longer writes the role tokens into the stylesheet: they come from the design system, once, at :root in komorebi.css
|
|
12
|
+
* (initiative token-first-design-system). FS is the same values, for a caller that draws without komorebi.css.
|
|
11
13
|
* The browser suites also run it over the mockup before they compare computed styles, so the mockup stays the reference for the look and
|
|
12
14
|
* the console is the reference for the type. */
|
|
13
15
|
|
|
@@ -53,7 +55,6 @@ function transform(css, { base = '/vendor/', faces = true } = {}) {
|
|
|
53
55
|
.replace(/(\bbody\{[^}]*?)line-height:1\.45/g, '$1line-height:1.5')
|
|
54
56
|
.replace(/(\.brief\{[^}]*?)max-width:42ch/g, '$1max-width:64ch')
|
|
55
57
|
.replace(/\u0000(\d+)\u0000/g, (m, k) => kept[+k]);
|
|
56
|
-
if (!/--fs-body:/.test(out)) out = ':root{' + FS + '}\n' + out;
|
|
57
58
|
if (faces && !/space-grotesk-var\.woff2/.test(out)) out = fontFaces(base) + out;
|
|
58
59
|
return out;
|
|
59
60
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pmos-workspace",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.697.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.697.0",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@anthropic-ai/sdk": "^1.3.0",
|
package/workspace/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
'use strict';
|
|
3
3
|
/* premium-chat-notes-test.js — Notes for a premium chat conversation (initiative premium-chat-attach, N1-N7; re-pointed by premium-agreed-design
|
|
4
4
|
* to Home's chat: /premium-chat.html opens Home with the chat ?about names. Notes is not in the Agreed design, so it stays usable from the
|
|
5
|
-
* composer's + menu (Notes, #hmNotes) and opens in the cozy Viewer with
|
|
5
|
+
* composer's + menu (Notes, #hmNotes) and opens in the cozy Viewer, with no marker (remove-design-placeholders); there is no + menu and no tab strip).
|
|
6
6
|
* Serves the real Home from the real server; notes save through the real /api/chat-file/notes in a scratch state folder.
|
|
7
7
|
* N1 the Notes button opens the notepad in the Viewer, the old Scratchpad text is the first note · N2 typed Markdown is saved as a .md file
|
|
8
8
|
* N3 a checkbox ticks · N4 New note and the list · N5 the buttons are icons with names · N6 Add selection · N7 Share with Claude puts the note on
|
|
@@ -54,7 +54,7 @@ const notes = (key = KEY) => lib.listNotes({ runtimeDir: T.STATE_DIR, key }).not
|
|
|
54
54
|
await page.waitForFunction(() => !!document.querySelector('#hmNotes'), null, { timeout: 15000 });
|
|
55
55
|
return { page, ctx, errors, asks, st };
|
|
56
56
|
};
|
|
57
|
-
// Notes is an item of the box's + menu (Agreed design: the toolbar is "+ / @ chip"
|
|
57
|
+
// Notes is an item of the box's + menu (Agreed design: the toolbar is "+ / @ chip")
|
|
58
58
|
const openNotes = async (page) => { await page.click('#hmAdd'); await page.click('#hmNotes'); return until(async () => page.isVisible('#ntEd')); };
|
|
59
59
|
const typeIn = async (page, s) => { await page.click('#ntEd'); await page.keyboard.type(s); };
|
|
60
60
|
|
|
@@ -65,7 +65,7 @@ const notes = (key = KEY) => lib.listNotes({ runtimeDir: T.STATE_DIR, key }).not
|
|
|
65
65
|
/* N1 */
|
|
66
66
|
ok('N1 the composer has a Notes button, not a Scratchpad', /Notes/.test(await page.getAttribute('#hmNotes', 'aria-label')) && !/Scratchpad/.test(await page.textContent('#hmFoot')));
|
|
67
67
|
ok('N1 the Scratchpad strip and its chip are gone', (await page.$('#sPad')) === null && (await page.$('#sPadT')) === null);
|
|
68
|
-
ok('N1 Notes opens in the Viewer, titled Notes,
|
|
68
|
+
ok('N1 Notes opens in the Viewer, titled Notes, with no Waiting for design marker', !!(await openNotes(page)) && (await page.textContent('#czVwTitle')).trim() === 'Notes' && !!(await until(async () => page.isVisible('#ntEd'))) && !/Waiting for design/.test(await page.textContent('#czViewer')));
|
|
69
69
|
ok('N1 the old Scratchpad text is the first note, line by line', !!(await until(async () => notes().length === 1)) && notes()[0].text === 'call Dana\n\nask about Q4' && /call Dana[\s\S]*ask about Q4/.test(await page.textContent('#ntEd')));
|
|
70
70
|
ok('N1 the pad is emptied once its text is a note', !!(await until(async () => { const r = await (await fetch(BASE + '/api/scratchpad?key=' + encodeURIComponent(KEY))).json(); return r.text === ''; })));
|
|
71
71
|
ok('N1 the note title shows in the head', (await page.textContent('#ntSw')).trim() === 'call Dana');
|
|
@@ -16,7 +16,8 @@ const ok = (name, cond, extra = '') => { results.push({ name, cond: !!cond }); c
|
|
|
16
16
|
const PUB = path.join(__dirname, 'public');
|
|
17
17
|
const ORIGIN = 'http://pmos-menus.test';
|
|
18
18
|
const TYPES = { '.css': 'text/css', '.woff2': 'font/woff2', '.html': 'text/html', '.svg': 'image/svg+xml' };
|
|
19
|
-
|
|
19
|
+
// komorebi.css first, as every page loads it: the type roles (--fs-*) come from it since token-first-design-system
|
|
20
|
+
const SHEETS = ['pm/komorebi.css', 'pm/premium.css', 'pm/premium-vw-doc.css', 'pm/premium-vw-rec.css'];
|
|
20
21
|
|
|
21
22
|
const LONG = ['Migration off Okta (tender, award, migration), incl. the Okta CIS renewal runway', 'Inline login for eShop onsite checkout',
|
|
22
23
|
'MAGW migration to auth-service (Java to Go) — Phase 1 and Phase 2', 'Email OTP'];
|
|
@@ -200,7 +200,7 @@ const iss = issues.appendFromCli(dir, [{ ev: 'issued', cadence: CAD, slot: '2026
|
|
|
200
200
|
/* E: Edit edits in place: on a page the page editor, inside the card; Cancel brings the report back */
|
|
201
201
|
await tap('[data-r="view|doc"]');
|
|
202
202
|
await tap('[data-r="edit"]');
|
|
203
|
-
ok('E1 Edit on a page mounts the page editor in the card,
|
|
203
|
+
ok('E1 Edit on a page mounts the page editor in the card, with no Waiting for design marker', await until(() => p.evaluate(() => { const h = document.querySelector('#czViewer [data-vz-ed]'); return h && h.dataset.mounted && h.children.length > 0 && !/Waiting for design/.test(document.querySelector('#czViewer').textContent); }), 15000));
|
|
204
204
|
ok('E2 while editing the edit bar takes the summary\'s place: the chip says Editing the Oct 12 draft, then Slides | Page and Cancel', /Editing the Oct 12 draft/.test(await chipT()) && await tools() === 'view|deck,view|doc,edcancel' && !(await has('.czs-sum')) && !(await has('.rp-bar')), await tools());
|
|
205
205
|
await tap('[data-r="edcancel"]');
|
|
206
206
|
ok('E3 Cancel brings the report back', await until(() => p.evaluate(() => !!document.querySelector('#czViewer .rp-pg') && !document.querySelector('#czViewer [data-vz-ed]'))));
|
|
@@ -52,6 +52,8 @@ process.on('unhandledRejection', (e) => { console.error(e); finish(1); });
|
|
|
52
52
|
await page.route('**/api/briefing-premium/**', (r) => r.fulfill({ contentType: 'application/json', body: JSON.stringify({ ok: true, turns: [], working: false }) }));
|
|
53
53
|
await page.goto(BASE + '/today.html?ini=self-serve-v2&ws=w1&board=w1&theme=' + theme);
|
|
54
54
|
S.up = await until(() => page.evaluate(() => !!document.querySelector('#czViewer .iv-mc') && !!window.__premiumWorkItem), 20000);
|
|
55
|
+
// When Home does not come up, say what the page holds instead, so a CI-only failure can be read from the log.
|
|
56
|
+
if (!S.up) console.log(' (R9 not up: ' + JSON.stringify(await page.evaluate(() => { const v = document.querySelector('#czViewer'); return { url: location.pathname + location.search, viewer: v ? { hidden: v.hidden, w: v.getBoundingClientRect().width, cls: v.className, html: v.innerHTML.replace(/\s+/g, ' ').slice(0, 300) } : null, item: !!window.__premiumWorkItem, body: document.body.className, fs: getComputedStyle(document.documentElement).getPropertyValue('--fs-body') }; }).catch((e) => String(e))) + ' errors ' + JSON.stringify(S.errors.slice(0, 3)) + ' gets ' + S.gets.length + ')');
|
|
55
57
|
return { page, ctx, S };
|
|
56
58
|
};
|
|
57
59
|
const viaMore = async (pg, label) => { const it = (l) => `#czViewer .cz-vw-menu [role="menuitem"]:has(> span:first-child:text-is("${l}"))`, more = async () => { await pg.click('#czViewer:not([hidden]) [data-cz-vw="more"]'); await until(() => pg.evaluate(() => !!document.querySelector('#czViewer .cz-vw-menu'))); }, view = (v) => until(() => pg.evaluate((x) => !!document.querySelector(`#czViewer:not([hidden]) [data-hi-v="${x}"]`), v)); if ((await pg.$('#czViewer:not([hidden]) [data-hi-v="page"]')) && (await pg.$('#czViewer:not([hidden]) [data-iv-docs]')) && !['Split into a new initiative', 'Merge into', 'Program', 'Open on the Board', 'Copy', 'The record', 'Delete'].includes(label)) { await pg.click('#czViewer:not([hidden]) [data-iv-docs]'); await view('docs'); if (label === 'Documents') return; } await more(); for (let i = 0; i < 20 && !(await pg.$(it(label))) && !(await pg.$(it('Stage'))); i++) { await pg.keyboard.press('Escape'); await pg.waitForTimeout(250); await more(); } if (!(await pg.$(it(label))) && (await pg.$(it('Stage')))) { await pg.click(it('Stage')); await view('stage'); if (label === 'Stage') return; await more(); } await pg.click(it(label)); }; // batch 16 item 5c: the page's ⋯ is short; Documents opens from its fold, and the Documents view's ⋯ holds Stage, whose ⋯ holds Documents, Open the full record and Sprint
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/* premium-vw-slides-test.js — the slide editor in the Viewer card (initiative premium-viewer, R-SL1, R6, R7; planning/prd/premium-viewer-prd.md;
|
|
4
4
|
* re-pointed for premium-agreed-design, area viewer: ReportPanel.dc.html in edit mode). A real server on a scratch git repository with two cycles
|
|
5
5
|
* of one report (one issued). /premium-viewer.html?open=report opens a cycle in the Viewer card; Edit mounts the slide editor in the card, and the
|
|
6
|
-
* panel's own toolbar (Undo, Redo, Insert, Layout, Theme, Cancel, Save) drives it
|
|
6
|
+
* panel's own toolbar (Undo, Redo, Insert, Layout, Theme, Cancel, Save) drives it. The presenter view
|
|
7
7
|
* (N4 to N11) is the editor's own Present: the panel has no entry to it yet, so those checks press the editor's button directly.
|
|
8
8
|
* Every save goes through the real POST /api/doc-sheet/edit and is read back from disk.
|
|
9
9
|
* O opening · E editing · S save and read back · H a hand edit wins · C a stale file · N Present · I issued · F floors
|
|
@@ -93,7 +93,7 @@ const disk = () => fs.readFileSync(path.join(dir, pNew), 'utf8');
|
|
|
93
93
|
ok('O1 a draft report opens in the Viewer card', await openReader('2026-10-12'));
|
|
94
94
|
/* re-pointed (batch 6 item 1b, canvas OvReport): Edit is an icon on the report Viewer's bar, so ⋯ does not repeat it */
|
|
95
95
|
ok('O2 on Slides, Edit is on the bar once, as an icon, and ⋯ does not repeat it (OvReport)', await until(() => p.evaluate(() => !!document.querySelector('#czViewer [data-cz-vw="more"]'))) && !(await menuOf(p)).includes('Edit') && await p.evaluate(() => { const L = document.querySelectorAll('#czViewer .cz-vw-body [data-r="edit"]'); return L.length === 1 && L[0].closest('.rp-bar') && !L[0].textContent.trim() && L[0].getAttribute('aria-label') === 'Edit'; }));
|
|
96
|
-
ok('O3 Edit mounts the slide editor in the card, with no dialog and no tab; the
|
|
96
|
+
ok('O3 Edit mounts the slide editor in the card, with no dialog and no tab; the slide tools and the speaker notes are there, with no Waiting for design marker', await openEditor() && await p.evaluate(() => !document.querySelector('#dlg, #vTabs') && !!document.querySelector('#czViewer .sl-tools [data-dup]') && !!document.querySelector('#czViewer details.sl-notes textarea') && !/Waiting for design/.test(document.querySelector('#czViewer').textContent)));
|
|
97
97
|
ok('O3 the panel\'s toolbar drives it: Undo, Redo, Insert, Layout, Theme, Cancel and Save, and the cycle chip says Editing', await p.evaluate(() => [...document.querySelectorAll('#czViewer .vz-tb > button')].map((b) => b.dataset.r).join() === 'ed|undo,ed|redo,ins,ed|layout,ed|theme,edcancel,edsave' && /Editing the Oct 12 draft/.test(document.querySelector('#czViewer [data-r="cycm"]').textContent)), await p.evaluate(() => [...document.querySelectorAll('#czViewer .vz-tb > button')].map((b) => b.dataset.r).join()));
|
|
98
98
|
let s = await st();
|
|
99
99
|
ok('O4 the report reads as a title slide and one slide per section', s && s.n === 5 && s.slides[0].l === 'title' && s.slides.map((x) => x.els[0].html).join('|') === 'Partner review, 12 Oct|Headline|Initiatives|Partner note|Sources', s && s.slides.map((x) => x.els[0].html).join('|'));
|
|
@@ -120,7 +120,7 @@ const disk = () => fs.readFileSync(path.join(dir, pNew), 'utf8');
|
|
|
120
120
|
await p.mouse.dblclick(b.x + 20, b.y + b.h / 2);
|
|
121
121
|
await until(() => p.evaluate(() => document.activeElement && document.activeElement.isContentEditable));
|
|
122
122
|
await p.keyboard.press('End'); await p.keyboard.type(' this week');
|
|
123
|
-
await p.$eval(V + ' details.sl-notes', (d) => { d.open = true; }); // the speaker notes fold away under the stage
|
|
123
|
+
await p.$eval(V + ' details.sl-notes', (d) => { d.open = true; }); // the speaker notes fold away under the stage
|
|
124
124
|
await p.click(V + ' .sl-notes textarea'); await p.keyboard.type('Say the number first.');
|
|
125
125
|
s = await st();
|
|
126
126
|
ok('E3 double-click types into a text item', s.slides[1].els[0].html === 'Headline this week', s.slides[1].els[0].html);
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
<link rel="stylesheet" href="/pm/brand.css" />
|
|
13
13
|
<link rel="stylesheet" href="/pm/charts.css" />
|
|
14
14
|
<link rel="stylesheet" href="/pm/komorebi.css" />
|
|
15
|
+
<link rel="stylesheet" href="/pm/ds-bridge.css" />
|
|
15
16
|
<link rel="stylesheet" href="/pm/c3-capture.css" />
|
|
16
17
|
</head>
|
|
17
18
|
<body class="pm-ds cap-page">
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* alphas stay as written. */
|
|
14
14
|
.c3{
|
|
15
15
|
--fs-1:11px;--fs-2:12px;--fs-3:14px;--fs-4:16px;--fs-5:20px;--fs-6:28px; /* the old steps, still read by the few legacy rules that keep them (feedback batch 26 item 6) */
|
|
16
|
-
--fw
|
|
16
|
+
/* the type roles (--fs-*, --fw-*, --lh-*) come from komorebi.css at :root (initiative token-first-design-system) */
|
|
17
17
|
--sp-1:4px;--sp-2:8px;--sp-3:12px;--sp-4:16px;--sp-5:24px;
|
|
18
18
|
--acc:oklch(0.623 0.214 259.815);--accw:oklch(0.623 0.214 259.815 / 18%);
|
|
19
19
|
--sh1:0 1px 2px oklch(0 0 0 / 40%);
|
|
@@ -119,7 +119,6 @@ body.bd-page main.bd-main { position: relative; max-width: none; margin: 16px; p
|
|
|
119
119
|
.bd-page #moreMenu { right: 0; left: auto; }
|
|
120
120
|
.bd-page .crmenu > button { all: unset; box-sizing: border-box; cursor: pointer; display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px; border-radius: 12px; font: var(--fw-strong) var(--fs-row)/var(--lh-row) var(--cz-sans); color: var(--cz-ink); white-space: nowrap; }
|
|
121
121
|
.bd-page .crmenu > button:hover, .bd-page .crmenu > button:focus-visible { background: var(--cz-well); }
|
|
122
|
-
.bd-page .crmenu > button .bd-wtag { margin-left: auto; }
|
|
123
122
|
/* the product menu ticks several (batch 11 item 7): a blue tick when on, a grey dash on All products when only some are */
|
|
124
123
|
.bd-page .crmenu > button .crtk { margin-left: auto; width: 18px; height: 18px; flex: none; display: inline-flex; }
|
|
125
124
|
.bd-page .crmenu > button .crtk svg { width: 18px; height: 18px; fill: none; stroke: var(--cz-blue); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
|
|
@@ -178,11 +177,7 @@ body.bd-page main.bd-main { position: relative; max-width: none; margin: 16px; p
|
|
|
178
177
|
.bd-chip.bd-jf svg.ad-svg { width: 24px; height: 24px; }
|
|
179
178
|
.bd-pip { position: absolute; right: 3px; top: 3px; width: 9px; height: 9px; border-radius: 50%; background: var(--cz-risk); border: 2px solid var(--cz-card); }
|
|
180
179
|
|
|
181
|
-
/* ──
|
|
182
|
-
.bd-wait { border: 1px dashed var(--cz-hair); border-radius: 18px; padding: 22px; color: var(--cz-ink3); font-size: var(--fs-meta); line-height: var(--lh-meta); }
|
|
183
|
-
.bd-wait b { display: block; color: var(--cz-ink); font-size: var(--fs-body); margin-bottom: 4px; line-height: var(--lh-body); }
|
|
184
|
-
.bd-wait p { margin: 0; }
|
|
185
|
-
.bd-waitw { min-height: 200px; }
|
|
180
|
+
/* ── messages ── */
|
|
186
181
|
.bd-msg { margin: 0; padding: 18px; border: 1px solid var(--cz-hair); border-radius: 18px; font-size: var(--fs-meta); color: var(--cz-ink3); line-height: var(--lh-meta); }
|
|
187
182
|
.bd-msg b { color: var(--cz-ink); }
|
|
188
183
|
.bd-msg.err b { color: var(--cz-red); }
|
|
@@ -687,9 +682,7 @@ span.tg-end { left: var(--tl-x); cursor: default; } /* a shared board's milest
|
|
|
687
682
|
.tg-none .bd-chip, .tg-ask { height: 44px; }
|
|
688
683
|
}
|
|
689
684
|
|
|
690
|
-
/* ── the plain versions of what the Agreed design has no frame for (pm/bd-acts.js)
|
|
691
|
-
.bd-wtag { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: 999px; border: 1px dashed var(--bd-pass); color: var(--cz-ink3); font: var(--fw-strong) var(--fs-badge)/var(--lh-badge) var(--cz-sans); white-space: nowrap; vertical-align: middle; }
|
|
692
|
-
.pk-eye .bd-wtag { margin-left: 6px; }
|
|
685
|
+
/* ── the plain versions of what the Agreed design has no frame for (pm/bd-acts.js) ── */
|
|
693
686
|
.bd-whead { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; font-size: var(--fs-meta); color: var(--cz-ink3); line-height: var(--lh-meta); }
|
|
694
687
|
.bd-amut { margin: 0; font-size: var(--fs-meta); color: var(--cz-ink3); line-height: var(--lh-meta); }
|
|
695
688
|
.bd-amsg { margin: 0; min-height: 1em; font-size: var(--fs-meta); color: var(--cz-red); line-height: var(--lh-meta); }
|
|
@@ -775,7 +768,7 @@ button.bd-lr:hover { background: var(--bd-row); }
|
|
|
775
768
|
.bt-qt { margin-left: 0; }
|
|
776
769
|
}
|
|
777
770
|
|
|
778
|
-
/* the phone's plain entries to the help frames, Year and 5 yr (no phone frame draws them)
|
|
771
|
+
/* the phone's plain entries to the help frames, Year and 5 yr (no phone frame draws them) */
|
|
779
772
|
.bd-phx { flex-wrap: wrap; margin: 6px 0 0; }
|
|
780
773
|
.bd-phb { display: inline-flex; flex-wrap: wrap; gap: 6px; }
|
|
781
774
|
.bd-phscroll { overflow-x: auto; margin: 0 -16px; padding: 0 16px; }
|
|
@@ -410,8 +410,6 @@ form.hm-box textarea { min-height: 48px; border: 0; background: none; resize: no
|
|
|
410
410
|
.hv-ui .flag { align-self: flex-start; padding: 1px 8px; border-radius: var(--radius-pill, 999px); box-shadow: inset 0 0 0 1.5px var(--cz-blue); color: var(--cz-blueink); font-size: var(--fs-label); font-weight: var(--fw-strong); line-height: var(--lh-label); }
|
|
411
411
|
.hv-doc { line-height: 1.6; }
|
|
412
412
|
.hx { padding: 16px 20px 24px; display: flex; flex-direction: column; gap: 12px; font-size: var(--fs-body); line-height: var(--lh-body); }
|
|
413
|
-
.hx-wait, .hv .hx-wait { margin: 0; display: inline-flex; align-self: flex-start; align-items: center; gap: 6px; padding: 3px 10px; border-radius: var(--radius-pill, 999px); background: var(--cz-well); color: var(--cz-ink3); font-size: var(--fs-badge); font-weight: var(--fw-strong); line-height: var(--lh-badge); }
|
|
414
|
-
.hx-wait i { width: 6px; height: 6px; border-radius: 50%; background: var(--cz-dot-q); }
|
|
415
413
|
.hx-sec h4 { margin: 4px 0 6px; font-size: var(--fs-body); line-height: var(--lh-body); }
|
|
416
414
|
.hx-row { display: flex; align-items: center; gap: 8px; min-height: 44px; border-bottom: 1px solid var(--cz-hair); }
|
|
417
415
|
.hx-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
|
|
@@ -609,7 +607,7 @@ form.hm-box textarea { min-height: 48px; border: 0; background: none; resize: no
|
|
|
609
607
|
.hm-slash .l1 { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
|
|
610
608
|
.hm-slash .l1 b { font-size: var(--fs-row); font-weight: var(--fw-strong); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: var(--lh-row); }
|
|
611
609
|
.hm-scope + .hm-files { margin-bottom: 6px; }
|
|
612
|
-
/* the phone moment card (home-phone-card.js) at the top of the phone's sheet
|
|
610
|
+
/* the phone moment card (home-phone-card.js) at the top of the phone's sheet */
|
|
613
611
|
.hm-phc { display: grid; gap: 6px; margin: 2px 2px 14px; padding: 14px 16px; border-radius: var(--radius-card, 18px); background: var(--cz-card); box-shadow: inset 3px 0 0 var(--cz-blue), var(--cz-float); color: var(--cz-ink); }
|
|
614
612
|
.hm-phc[hidden] { display: none; }
|
|
615
613
|
.hm-phc .label { font-size: var(--fs-badge); font-weight: var(--fw-strong); letter-spacing: .04em; text-transform: uppercase; color: var(--cz-ink3); line-height: var(--lh-badge); }
|
|
@@ -636,7 +634,7 @@ form.hm-box textarea { min-height: 48px; border: 0; background: none; resize: no
|
|
|
636
634
|
.hm-phc .phmv p em { grid-column: 2; font-style: normal; font-size: var(--fs-meta); color: var(--cz-ink3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: var(--lh-meta); }
|
|
637
635
|
.hm-phc .phq { color: var(--cz-ink3); }
|
|
638
636
|
|
|
639
|
-
/* the first-run card after an import (premium-first.js): plain
|
|
637
|
+
/* the first-run card after an import (premium-first.js): plain */
|
|
640
638
|
.hm-first { display: grid; gap: 8px; margin: 2px 2px 14px; padding: 14px 16px; border-radius: var(--radius-card, 18px); background: var(--cz-card); box-shadow: var(--cz-float); color: var(--cz-ink); }
|
|
641
639
|
.hm-first h2 { margin: 0; font-size: var(--fs-body); line-height: var(--lh-body); }
|
|
642
640
|
.hm-first h4 { margin: 4px 0 0; font-size: var(--fs-body); line-height: var(--lh-body); }
|
|
@@ -646,7 +644,7 @@ form.hm-box textarea { min-height: 48px; border: 0; background: none; resize: no
|
|
|
646
644
|
.hv-intro { margin: 0; font-size: var(--fs-meta); line-height: 1.5; color: var(--cz-ink2); }
|
|
647
645
|
.hv-intro b { margin-right: 4px; color: var(--cz-ink); }
|
|
648
646
|
.hv-link { display: inline-flex; align-items: center; min-height: 44px; height: auto; text-decoration: none; box-sizing: border-box; }
|
|
649
|
-
/* Around you (home-around.js): plain
|
|
647
|
+
/* Around you (home-around.js): plain */
|
|
650
648
|
.ar { display: grid; gap: 10px; }
|
|
651
649
|
.ar-hd { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
|
|
652
650
|
.ar-hd small { font-size: var(--fs-meta); color: var(--cz-ink3); line-height: var(--lh-meta); }
|
|
@@ -404,7 +404,6 @@ p.ins-fl { flex-direction: row; align-items: center; margin: 0 0 6px; flex-wrap:
|
|
|
404
404
|
}
|
|
405
405
|
|
|
406
406
|
/* the minimal panels the Agreed design does not draw yet (goal detail, budget, tile target, report flows), in the Viewer card */
|
|
407
|
-
.ins-vbody .cz-ph { margin-bottom: 12px; }
|
|
408
407
|
.ins-kv { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 6px 12px; margin: 0 0 14px; font-size: var(--fs-body); line-height: var(--lh-body); }
|
|
409
408
|
.ins-kv dt { color: var(--muted); font-weight: var(--fw-strong); }
|
|
410
409
|
.ins-kv dd { margin: 0; color: var(--ink); min-width: 0; overflow-wrap: anywhere; }
|
|
@@ -65,7 +65,6 @@
|
|
|
65
65
|
* - every step is a browser history entry ({ czvw: { s, i } }), so the browser's Back and Forward and a phone's back swipe walk the same
|
|
66
66
|
* trail; Back at the first item closes the Viewer. Close (×, Escape, close()) takes the trail's entries off again, so Back never
|
|
67
67
|
* lands on a closed item. A page writes its own address with replaceUrl(url), which waits while the history is still moving.
|
|
68
|
-
* placeholder(featureName, { kind?, icon? }) opens the card with czPlaceholder(featureName) in it (cozy-placeholder.js)
|
|
69
68
|
* The popup (slice 2 of the six-place navigation, boards 3, 7, 23; pm/cozy-popup.js): open({ pop: { … } }) on a desk puts the item in a
|
|
70
69
|
* Viewer of its own on the left of the near-full popup, with the chat on its right. pop is what the chat is about (cozy-popup.js show()).
|
|
71
70
|
* A press inside the popup (the Viewer or the chat beside it) drills in there; the header then shows the path and ←. That Viewer has no
|
|
@@ -81,7 +80,6 @@
|
|
|
81
80
|
* widthOf(kind) · setWidth(px) · wide(on?) · railOn() for the page and the tests; railSync(key?) for a page
|
|
82
81
|
* that draws a card for a rail tile (Home).
|
|
83
82
|
* The look is in cozy-vw-shell.css (loaded here once) over cozy.css (.cz-vw…). The old #dlg path (premium-viewer.js) is separate. */
|
|
84
|
-
import { czPlaceholder } from './cozy-placeholder.js';
|
|
85
83
|
|
|
86
84
|
export const ICONS = {
|
|
87
85
|
doc: 'M7 3h7l5 5v13H7zM14 3v5h5',
|
|
@@ -718,10 +716,6 @@ export const bodyOf = (id) => { const x = ALL.find((y) => shown(y) && y.cur.id =
|
|
|
718
716
|
/** Close the Viewer that shows item id (nothing else). */
|
|
719
717
|
export function closeOf(id) { const x = ALL.find((y) => shown(y) && y.cur.id === String(id)); if (x) { use(x); close(); } }
|
|
720
718
|
export function onChange(fn) { if (typeof fn === 'function') G.subs.push(fn); }
|
|
721
|
-
/** Open the Viewer on a feature the design does not draw yet. */
|
|
722
|
-
export function placeholder(featureName, o = {}) {
|
|
723
|
-
return open({ id: 'placeholder:' + featureName, kind: o.kind || featureName, title: featureName, icon: o.icon || 'info', render: (el) => czPlaceholder(el, featureName) });
|
|
724
|
-
}
|
|
725
719
|
|
|
726
720
|
/* ── one trail: ← →, the browser's Back and Forward, a phone's back swipe (batch 14 item 7) ── */
|
|
727
721
|
const H = { s: '', n: 0, adopt: false, auto: false, q: [], wait: 0, press: null };
|
|
@@ -871,4 +865,4 @@ const popShown = () => ALL.some((y) => y.pop && shown(y));
|
|
|
871
865
|
export function popNext(pop) { G.popNext = pop ? { pop, t: Date.now() } : null; }
|
|
872
866
|
/** Close the popup's Viewer (an item with unsaved changes asks first). */
|
|
873
867
|
export function closePop() { const x = ALL.find((y) => y.pop && shown(y)); if (x) { use(x); guarded(close); } }
|
|
874
|
-
if (typeof window !== 'undefined') window.czViewer = { open, close, closeOf, bodyOf, back, forward, trail, replaceUrl, drill, setPresses, setChip, setCheck, isOpen, current, body, onChange,
|
|
868
|
+
if (typeof window !== 'undefined') window.czViewer = { open, close, closeOf, bodyOf, back, forward, trail, replaceUrl, drill, setPresses, setChip, setCheck, isOpen, current, body, onChange, retitle, czSummary, czSections, widthOf, setWidth, wide, railOn, railSync, ICONS };
|
|
@@ -38,7 +38,6 @@
|
|
|
38
38
|
.cz-vw-ib[aria-pressed="true"] { background: var(--cz-bluebg); color: var(--cz-blueink); }
|
|
39
39
|
.cz-vw-hd [data-cz-vw="back"] { margin-left: -6px; }
|
|
40
40
|
.cz-vw-body { padding: 8px 16px 16px; display: flex; flex-direction: column; gap: 12px; }
|
|
41
|
-
.cz-vw-body:has(> .cz-ph) { padding: 0; }
|
|
42
41
|
|
|
43
42
|
/* the grip (xvWidth): drag, double-click to reset, arrows from the keyboard */
|
|
44
43
|
.cz-vw-grip { position: absolute; left: 0; top: 50%; margin-top: -32px; width: 16px; height: 64px; display: flex; align-items: center; justify-content: center; cursor: col-resize; z-index: 4; touch-action: none; border-radius: 8px; }
|
|
@@ -132,7 +131,7 @@ button.czs-it:focus-visible { outline: 2px solid var(--cz-blue); outline-offset:
|
|
|
132
131
|
.cz-vw-w2 .cz-vw-body > .czs-sum { grid-column: 1; }
|
|
133
132
|
.cz-vw-w2 .cz-vw-body > :not(.czs-sum) { grid-column: 2; max-width: 75ch; }
|
|
134
133
|
.cz-vw-w2 .cz-vw-body > .czs-sum + * { grid-row: 1 / span 6; }
|
|
135
|
-
.cz-vw-w2 .cz-vw-body > :only-child
|
|
134
|
+
.cz-vw-w2 .cz-vw-body > :only-child { grid-column: 1 / -1; max-width: none; }
|
|
136
135
|
|
|
137
136
|
/* the list folded to a rail (xvWidth): "Show the list", then the groups' tiles */
|
|
138
137
|
body.cz-vw-rail [data-cz-vw-list], body.cz-vw-rail #hmList { flex: 0 0 64px !important; width: 64px !important; padding: 12px 8px !important; }
|
|
@@ -3,8 +3,7 @@
|
|
|
3
3
|
* ReportPanel.dc.html are the reference. Colours are the cozy tokens of pm/cozy.css only; the design's own names are aliased here:
|
|
4
4
|
* --vz-solid the design's --solid (the filled button) --vz-on text on it
|
|
5
5
|
* --vz-ember --ember (the blue dot, the ring) --vz-eink --ember-ink (blue text)
|
|
6
|
-
* --vz-spot --spot (the pale blue fill) --vz-ok --ok (done, matches, decisions)
|
|
7
|
-
* A part the design does not draw carries the cozy "Waiting for design" card (cozy-placeholder.js) or the small .vz-wait marker. */
|
|
6
|
+
* --vz-spot --spot (the pale blue fill) --vz-ok --ok (done, matches, decisions) */
|
|
8
7
|
.vz { --vz-solid: var(--cz-blueink); --vz-on: var(--cz-card); --vz-ember: var(--cz-blue); --vz-eink: var(--cz-blueink); --vz-spot: var(--cz-bluebg);
|
|
9
8
|
--vz-ok: var(--cz-blueink); --vz-bad: var(--cz-red);
|
|
10
9
|
box-sizing: border-box; padding: 16px 20px 28px; display: flex; flex-direction: column; gap: 12px; font-size: var(--fs-body); color: var(--cz-ink); font-family: var(--cz-sans); line-height: var(--lh-body); }
|
|
@@ -20,7 +19,6 @@
|
|
|
20
19
|
.vz .vz-col { display: flex; flex-direction: column; gap: 6px; }
|
|
21
20
|
.vz .vz-col14 { display: flex; flex-direction: column; gap: 14px; }
|
|
22
21
|
.vz .vz-sp { flex: 1; }
|
|
23
|
-
.vz .vz-wait { display: inline-flex; align-items: center; gap: 4px; padding: 1px 7px; border-radius: var(--radius-pill, 999px); background: var(--cz-well); color: var(--cz-ink3); font-size: var(--fs-badge); font-weight: var(--fw-strong); white-space: nowrap; line-height: var(--lh-badge); }
|
|
24
22
|
.vz .vz-msg { padding: 8px 10px; border-radius: var(--radius-md, 12px); background: var(--cz-well); font-size: var(--fs-meta); color: var(--cz-ink2); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; line-height: var(--lh-meta); }
|
|
25
23
|
.vz .vz-msg[data-tone="bad"] { background: var(--cz-redbg); color: var(--cz-red); }
|
|
26
24
|
.vz .vz-link { color: var(--vz-eink); font-weight: var(--fw-strong); font-size: var(--fs-label); min-height: 26px; padding: 0 8px; border-radius: var(--radius-sm, 8px); line-height: var(--lh-label); }
|
|
@@ -357,7 +355,6 @@ body.pm-ds .vz-host .cz-vw {
|
|
|
357
355
|
.vz-ed .sl-tb { display: none; }
|
|
358
356
|
.vz-ed { min-height: 0; }
|
|
359
357
|
.vz-issue[data-k="bad"] { background: var(--vz-bad) !important; }
|
|
360
|
-
.vz-pres .vz-wait { margin-left: 8px; }
|
|
361
358
|
@media (max-width: 760px) {
|
|
362
359
|
.vz-dko { display: none !important; }
|
|
363
360
|
.vz-pho { display: flex; flex-direction: column; gap: 2px; }
|
|
@@ -431,7 +428,7 @@ button.vz-line { padding: 4px; border-radius: var(--radius-sm, 8px); }
|
|
|
431
428
|
.vz-dkt button { aspect-ratio: 16 / 9; border-radius: var(--radius-md, 10px); padding: 8px !important; display: flex !important; align-items: flex-end; background: var(--cz-well) !important; color: var(--cz-ink2); border: 1px solid var(--cz-hair) !important; min-width: 0; }
|
|
432
429
|
.vz-dkt button[aria-current="true"] { border-color: transparent !important; box-shadow: 0 0 0 2px var(--vz-ember); }
|
|
433
430
|
.vz-dkt button span { display: block; font-size: var(--fs-badge); font-weight: var(--fw-strong); line-height: 1.3; text-align: left; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
|
|
434
|
-
/*
|
|
431
|
+
/* a quiet block under the view */
|
|
435
432
|
.vz-blk { display: flex; flex-direction: column; gap: 10px; padding-top: 14px; border-top: 1px solid var(--cz-hair); }
|
|
436
433
|
.vz-schm { flex-basis: 100%; display: flex; flex-direction: column; gap: 2px; padding: 8px; border-radius: var(--radius-card, 18px); background: var(--cz-card); box-shadow: 0 0 0 1px var(--cz-hair), var(--cz-sheet); max-width: 340px; }
|
|
437
434
|
.vz-schm .vz-r1 { padding: 6px 10px 2px; }
|
|
@@ -500,7 +497,6 @@ button.vz-line { padding: 4px; border-radius: var(--radius-sm, 8px); }
|
|
|
500
497
|
.sl-cz .sl-notes{display:block;font-size:var(--fs-meta);color:var(--cz-ink3);line-height:var(--lh-meta);}
|
|
501
498
|
.sl-cz .sl-notes summary{cursor:pointer;display:flex;align-items:center;gap:8px;min-height:32px}
|
|
502
499
|
.sl-cz .sl-notes textarea{width:100%;margin-top:4px;box-sizing:border-box;border-radius:var(--radius-md, 12px);background:var(--cz-card);color:var(--cz-ink)}
|
|
503
|
-
.sl-cz .vz-wait{display:inline-flex;align-items:center;padding:1px 7px;border-radius:var(--radius-pill, 999px);background:var(--cz-well);color:var(--cz-ink3);font-size:var(--fs-badge);font-weight:var(--fw-strong);white-space:nowrap;line-height:var(--lh-badge);}
|
|
504
500
|
@media (max-width:760px){.sl-cz .sl-tools .sl-b,.sl-cz .sl-nv{min-height:44px;height:44px}.sl-cz .sl-nv{width:44px}}
|
|
505
501
|
.sl-cz .sl-cap{display:block;min-width:0}
|
|
506
502
|
@media (max-width:640px){.sl-cz .sl-rail{order:0;overflow:visible}.sl-cz .sl-th{width:auto;flex:initial}.sl-cz .sl-tools .sl-bl span{display:inline}}
|
|
@@ -25,8 +25,9 @@ html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
|
|
|
25
25
|
:root{
|
|
26
26
|
/* Typography roles (feedback batch 26 item 6, agreed 2026-11-03): ONE face (Plus Jakarta Sans), TWO weights (400 text, 600 emphasis),
|
|
27
27
|
FOUR sizes (13 / 15 / 18 / 26) and ONE density, the most comfortable. Every font size, weight and line height in workspace/public names a
|
|
28
|
-
role token
|
|
29
|
-
|
|
28
|
+
role token; size and weight come from the role, never from the page. The values come from the design system (Komorebi): komorebi.css
|
|
29
|
+
points --fs-*, --fw-regular, --fw-strong and --lh-* at its --type-* and --weight-* tokens once, at :root, for every page
|
|
30
|
+
(initiative token-first-design-system). Change a size in workspace/design-system/ui/tokens.json, never here.
|
|
30
31
|
display 26 / 600 / 1.2 big numbers: North Star, KPI values
|
|
31
32
|
page 26 / 600 / 1.2 page and report titles
|
|
32
33
|
panel 18 / 600 / 1.3 a side panel, popover or card header
|
|
@@ -37,11 +38,6 @@ html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
|
|
|
37
38
|
label 13 / 600 / 1.35 column heads, field labels, time stamps
|
|
38
39
|
badge 13 / 600 / 1.2 initials, count pills, status chips
|
|
39
40
|
Kept on purpose: the slide canvases and report templates (their own scaled sizes) and the counts inside milestone diamonds. */
|
|
40
|
-
--fw-regular: 400; --fw-strong: 600;
|
|
41
|
-
/* not a role: a phone zooms the page into a field typed in under 16 px, so on a touch screen every field is 16 px (the rule below) */
|
|
42
|
-
--fs-field: 16px;
|
|
43
|
-
--fs-display: 26px; --fs-page: 26px; --fs-panel: 18px; --fs-section: 15px; --fs-row: 15px; --fs-body: 15px; --fs-meta: 13px; --fs-label: 13px; --fs-badge: 13px;
|
|
44
|
-
--lh-display: 1.2; --lh-page: 1.2; --lh-panel: 1.3; --lh-section: 1.35; --lh-row: 1.4; --lh-body: 1.6; --lh-meta: 1.5; --lh-label: 1.35; --lh-badge: 1.2;
|
|
45
41
|
--fw-display: var(--fw-strong); --fw-page: var(--fw-strong); --fw-panel: var(--fw-strong); --fw-section: var(--fw-strong); --fw-row: var(--fw-strong);
|
|
46
42
|
--fw-body: var(--fw-regular); --fw-meta: var(--fw-regular); --fw-label: var(--fw-strong); --fw-badge: var(--fw-strong);
|
|
47
43
|
/* The Agreed design's palette (premium-agreed-design): every colour the cozy sheets use, one token each, defined only here.
|
|
@@ -352,20 +348,12 @@ body.cz { margin: 0; font-family: var(--cz-sans); color: var(--cz-ink); backgrou
|
|
|
352
348
|
/* a phone: a title marked wrap (the initiative, batch 18 item 1) takes two lines before it cuts */
|
|
353
349
|
@media (max-width: 760px) { .cz-vw-title.wrap, .cz-vw-title.wrap .cz-vw-rn { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.25; } }
|
|
354
350
|
.cz-vw-body { flex: 1; min-height: 0; overflow: auto; }
|
|
355
|
-
.cz-vw-body > .cz-ph { margin: 16px; }
|
|
356
351
|
/* a phone: the Viewer is the whole screen, and the place menu steps aside while it is open */
|
|
357
352
|
@media (max-width: 760px) {
|
|
358
353
|
.cz-vw, .cz-vw.cz-vw-float { position: fixed; inset: 0; z-index: 70; width: auto; max-width: none; border: 0; border-radius: 0; box-shadow: var(--cz-sheet); }
|
|
359
354
|
.cz-vw-on .cz-fabw { display: none; }
|
|
360
355
|
}
|
|
361
356
|
|
|
362
|
-
/* ── A feature the design does not draw yet (cozy-placeholder.js): one small calm card ── */
|
|
363
|
-
.cz-ph { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-radius: 20px; background: var(--cz-well); color: var(--cz-ink2); font-family: var(--cz-sans); }
|
|
364
|
-
.cz-ph-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--cz-card); color: var(--cz-ink3); flex: none; }
|
|
365
|
-
.cz-ph-ic svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
|
|
366
|
-
.cz-ph-t { min-width: 0; }
|
|
367
|
-
.cz-ph-l { margin: 0; font-size: var(--fs-row); font-weight: var(--fw-strong); color: var(--cz-ink2); line-height: var(--lh-row); }
|
|
368
|
-
.cz-ph-n { margin: 2px 0 0; font-size: var(--fs-meta); color: var(--cz-ink3); line-height: var(--lh-meta); }
|
|
369
357
|
|
|
370
358
|
/* ── slide editor on the cozy pages (moved from premium-vw-slides.css, which stays on the console type scale) ── */
|
|
371
359
|
/* ── the cozy pages (premium-agreed-design, area viewer): the console tokens this sheet names, mapped to the cozy tokens of cozy.css,
|