create-pmos 0.697.0 → 0.699.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (118) hide show
  1. package/package.json +20 -20
  2. package/payload/KIT-VERSION +1 -1
  3. package/payload/design-system/ui/tokens.css +1 -1
  4. package/payload/planning/evals/eval-calibration.md +1 -1
  5. package/payload/planning/okrs/health-budgets.md +1 -1
  6. package/payload/state/discoveries.md +1 -1
  7. package/workspace/changelog.json +19 -0
  8. package/workspace/design-system/ui/tokens.css +1 -1
  9. package/workspace/design-token-reach.js +64 -6
  10. package/workspace/guide/cli.md +8 -0
  11. package/workspace/guide/layout.md +9 -0
  12. package/workspace/lib/design-cli.js +14 -2
  13. package/workspace/lib/design-drift.js +2 -0
  14. package/workspace/lib/design-swap.js +146 -0
  15. package/workspace/lib/design-system.js +7 -4
  16. package/workspace/lib/route-modules.js +1 -0
  17. package/workspace/lib/routes-draft-keep.js +65 -0
  18. package/workspace/package-lock.json +2 -2
  19. package/workspace/package.json +1 -1
  20. package/workspace/public/pm/agenda-live.css +7 -7
  21. package/workspace/public/pm/bd-backlog.css +71 -71
  22. package/workspace/public/pm/bd-pin-card.css +2 -2
  23. package/workspace/public/pm/bd-pop-ds.css +1 -1
  24. package/workspace/public/pm/bd-publish.css +23 -23
  25. package/workspace/public/pm/bd-shared.css +22 -22
  26. package/workspace/public/pm/bd-work-ds.css +1 -1
  27. package/workspace/public/pm/bd-work.css +25 -25
  28. package/workspace/public/pm/c3-capture.css +3 -3
  29. package/workspace/public/pm/c3-initiatives.css +21 -21
  30. package/workspace/public/pm/components.css +585 -585
  31. package/workspace/public/pm/console3.css +304 -304
  32. package/workspace/public/pm/cozy-adler.css +6 -6
  33. package/workspace/public/pm/cozy-board.css +267 -267
  34. package/workspace/public/pm/cozy-buddy.css +1 -1
  35. package/workspace/public/pm/cozy-day-pick.css +7 -7
  36. package/workspace/public/pm/cozy-divider.css +2 -2
  37. package/workspace/public/pm/cozy-draft-keep.js +74 -0
  38. package/workspace/public/pm/cozy-ev.css +121 -121
  39. package/workspace/public/pm/cozy-events.css +22 -22
  40. package/workspace/public/pm/cozy-goals.css +3 -3
  41. package/workspace/public/pm/cozy-home-rows.css +50 -50
  42. package/workspace/public/pm/cozy-home.css +218 -218
  43. package/workspace/public/pm/cozy-insights.css +197 -197
  44. package/workspace/public/pm/cozy-lab.css +18 -18
  45. package/workspace/public/pm/cozy-library.css +1 -1
  46. package/workspace/public/pm/cozy-live-pill.css +4 -4
  47. package/workspace/public/pm/cozy-mtg-present.css +32 -32
  48. package/workspace/public/pm/cozy-nav.js +1 -0
  49. package/workspace/public/pm/cozy-onboard.css +22 -22
  50. package/workspace/public/pm/cozy-panel.css +24 -24
  51. package/workspace/public/pm/cozy-panels.css +4 -4
  52. package/workspace/public/pm/cozy-phone-rec.css +12 -12
  53. package/workspace/public/pm/cozy-phone-settings.css +4 -4
  54. package/workspace/public/pm/cozy-pick.css +7 -7
  55. package/workspace/public/pm/cozy-pop-work.css +56 -56
  56. package/workspace/public/pm/cozy-popup.css +25 -25
  57. package/workspace/public/pm/cozy-proto.css +44 -44
  58. package/workspace/public/pm/cozy-rec-now.css +23 -23
  59. package/workspace/public/pm/cozy-rec-present.css +18 -18
  60. package/workspace/public/pm/cozy-rec-tab.css +8 -8
  61. package/workspace/public/pm/cozy-reveal.css +14 -14
  62. package/workspace/public/pm/cozy-routine.css +29 -29
  63. package/workspace/public/pm/cozy-steps.css +10 -10
  64. package/workspace/public/pm/cozy-task-pop.css +8 -8
  65. package/workspace/public/pm/cozy-today-page.css +28 -28
  66. package/workspace/public/pm/cozy-today.css +165 -165
  67. package/workspace/public/pm/cozy-viewer.css +21 -21
  68. package/workspace/public/pm/cozy-vw-mtg.css +105 -105
  69. package/workspace/public/pm/cozy-vw-rp.css +66 -66
  70. package/workspace/public/pm/cozy-vw-shell.css +42 -42
  71. package/workspace/public/pm/cozy-vw.css +90 -90
  72. package/workspace/public/pm/cozy-xv.css +8 -8
  73. package/workspace/public/pm/cozy.css +24 -24
  74. package/workspace/public/pm/dash-view.css +23 -23
  75. package/workspace/public/pm/draft-keep.js +151 -0
  76. package/workspace/public/pm/hi-pop.css +29 -29
  77. package/workspace/public/pm/home-chat.js +1 -1
  78. package/workspace/public/pm/home-impact.css +10 -10
  79. package/workspace/public/pm/home-ini.css +34 -34
  80. package/workspace/public/pm/home-line.css +12 -12
  81. package/workspace/public/pm/impact.css +12 -12
  82. package/workspace/public/pm/ini-view.css +240 -240
  83. package/workspace/public/pm/intent.css +11 -11
  84. package/workspace/public/pm/komorebi.css +3 -3
  85. package/workspace/public/pm/load-shapes.css +10 -10
  86. package/workspace/public/pm/loose-props.css +17 -17
  87. package/workspace/public/pm/metric-drafts.css +10 -10
  88. package/workspace/public/pm/ms-suggest.css +12 -12
  89. package/workspace/public/pm/ov-view.css +10 -10
  90. package/workspace/public/pm/page-chat.css +1 -1
  91. package/workspace/public/pm/premium-vw-backlog.css +7 -7
  92. package/workspace/public/pm/premium-vw-cal.css +22 -22
  93. package/workspace/public/pm/premium-vw-copy.css +6 -6
  94. package/workspace/public/pm/premium-vw-doc.css +98 -98
  95. package/workspace/public/pm/premium-vw-guide.css +9 -9
  96. package/workspace/public/pm/premium-vw-item.css +7 -7
  97. package/workspace/public/pm/premium-vw-jira.css +28 -28
  98. package/workspace/public/pm/premium-vw-meet.css +26 -26
  99. package/workspace/public/pm/premium-vw-notepad.css +14 -14
  100. package/workspace/public/pm/premium-vw-notes.css +11 -11
  101. package/workspace/public/pm/premium-vw-page.js +1 -0
  102. package/workspace/public/pm/premium-vw-rec.css +22 -22
  103. package/workspace/public/pm/premium-vw-report.css +14 -14
  104. package/workspace/public/pm/premium-vw-slides.css +27 -27
  105. package/workspace/public/pm/premium.css +598 -598
  106. package/workspace/public/pm/prog-order.css +7 -7
  107. package/workspace/public/pm/prog-page.css +16 -16
  108. package/workspace/public/pm/program-charter.css +23 -23
  109. package/workspace/public/pm/ready-lib.css +4 -4
  110. package/workspace/public/pm/sort-order.css +3 -3
  111. package/workspace/public/pm/split-merge.css +21 -21
  112. package/workspace/public/pm/story.css +3 -3
  113. package/workspace/public/pm/task-card.css +21 -21
  114. package/workspace/public/pm/tk-tasks.css +32 -32
  115. package/workspace/public/pm/tk-view.css +7 -7
  116. package/workspace/public/pm/wf-page.css +46 -46
  117. package/workspace/test-lists/design-token-swap.json +9 -0
  118. package/workspace/test-lists/forms-keep-drafts.json +9 -0
@@ -19,7 +19,7 @@
19
19
  .mb-dot { display: inline-block; width: 10px; height: 10px; border-radius: var(--radius-pill); background: var(--line); flex: none; }
20
20
  .mb-dot.ok { background: var(--leaf); } /* listening now: the one lit thing */
21
21
  .mb-dot.warn { background: var(--alert); }
22
- .mb-r .mb-dot { margin-top: 4px; }
22
+ .mb-r .mb-dot { margin-top: var(--space-4); }
23
23
  /* the buttons are pm-btn (komorebi.css); a link styled as one keeps no underline */
24
24
  .mb-ib { text-decoration: none; padding: 0; }
25
25
  @media (pointer: coarse) { .pm-ds .mb-ib.pm-btn { width: 44px; height: 44px; } }
@@ -1,10 +1,10 @@
1
1
  /* pm/cozy-day-pick.css — the app's own day field and its small calendar (pm/cozy-day-pick.js), and the "When did this happen?" line (pm/cozy-status-when.js).
2
2
  * Each button rule names its parent too, so a host's own button reset (task-card.css .tkc button) does not undo it. */
3
- .dp { display: flex; flex-direction: column; gap: 4px; }
3
+ .dp { display: flex; flex-direction: column; gap: var(--space-4); }
4
4
  .dp-box { position: relative; display: block; }
5
5
  .hi-field .dp-in { padding-right: 44px; }
6
6
  .dp-box .dp-tg { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); }
7
- .dp .dp-tg, .dp-cal .dp-nav { display: inline-grid; place-items: center; width: 26px; height: 26px; border: 0; border-radius: 6px; background: none; color: var(--cz-ink2); cursor: pointer; }
7
+ .dp .dp-tg, .dp-cal .dp-nav { display: inline-grid; place-items: center; width: 26px; height: 26px; border: 0; border-radius: var(--radius-sm); background: none; color: var(--cz-ink2); cursor: pointer; }
8
8
  .dp .dp-tg:hover, .dp-cal .dp-nav:hover, .dp .dp-tg[aria-expanded="true"] { background: var(--cz-well); color: var(--cz-ink); }
9
9
  .dp-msg { margin: 2px 0 0; color: var(--cz-late); }
10
10
  .dp-cal { margin-top: 6px; display: flex; flex-direction: column; gap: 2px; width: 224px; }
@@ -12,17 +12,17 @@
12
12
  .dp-mh b { font-weight: var(--fw-strong); color: var(--cz-ink); }
13
13
  .dp-wk, .dp-row { display: grid; grid-template-columns: repeat(7, 32px); }
14
14
  .dp-wk i { font-style: normal; text-align: center; font-size: var(--fs-meta); color: var(--cz-ink3); padding: 2px 0; }
15
- .dp-row .dp-d { height: 28px; border: 0; border-radius: 6px; background: none; font: inherit; font-size: var(--fs-meta); color: var(--cz-ink); cursor: pointer; font-variant-numeric: tabular-nums; }
15
+ .dp-row .dp-d { height: 28px; border: 0; border-radius: var(--radius-sm); background: none; font: inherit; font-size: var(--fs-meta); color: var(--cz-ink); cursor: pointer; font-variant-numeric: tabular-nums; }
16
16
  .dp-row .dp-d:hover:not(:disabled) { background: var(--cz-well); }
17
17
  .dp-d.out { color: var(--cz-ink3); }
18
18
  .dp-d.td { box-shadow: 0 0 0 1px var(--cz-blue) inset; }
19
19
  .dp-d.on { background: var(--cz-blue); color: var(--cz-onsolid); font-weight: var(--fw-strong); }
20
20
  .dp-d:disabled { color: var(--cz-hair); cursor: default; }
21
- .sw { margin-top: 6px; padding-top: 8px; border-top: 1px solid var(--cz-hair); }
21
+ .sw { margin-top: 6px; padding-top: var(--space-8); border-top: 1px solid var(--cz-hair); }
22
22
  .sw-q { margin: 0 0 6px; font-size: var(--fs-meta); color: var(--cz-ink2); }
23
23
  .sw-ch { display: flex; flex-wrap: wrap; gap: 6px; }
24
- .sw .sw-b { border: 0; border-radius: 999px; background: var(--cz-card); box-shadow: 0 0 0 1px var(--cz-hair) inset; font: inherit; font-size: var(--fs-meta); color: var(--cz-ink); padding: 4px 11px; cursor: pointer; white-space: nowrap; }
24
+ .sw .sw-b { border: 0; border-radius: var(--radius-pill); background: var(--cz-card); box-shadow: 0 0 0 1px var(--cz-hair) inset; font: inherit; font-size: var(--fs-meta); color: var(--cz-ink); padding: var(--space-4) 11px; cursor: pointer; white-space: nowrap; }
25
25
  .sw .sw-b:hover { background: var(--cz-well); }
26
26
  .sw .sw-b[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--cz-blue) inset; font-weight: var(--fw-strong); }
27
- .sw-day:not(:empty) { margin-top: 8px; }
28
- .pw-dp + .pw-dp { margin-top: 8px; }
27
+ .sw-day:not(:empty) { margin-top: var(--space-8); }
28
+ .pw-dp + .pw-dp { margin-top: var(--space-8); }
@@ -3,7 +3,7 @@
3
3
  * on it, inside the engine's centred .cz-pn-in. Token vars from cozy.css only. Motion: the leaves open on hover and the sprout leans while dragging, nothing else. */
4
4
  .cz-dv-hd { position: absolute; left: 50%; top: 50%; width: 10px; height: 60px; margin: -30px 0 0 -5px; box-sizing: border-box; border-radius: 5px;
5
5
  background: var(--cz-card); box-shadow: 0 2px 8px -2px rgba(42,46,53,.28), 0 0 0 1px var(--cz-hair); display: flex; flex-direction: column;
6
- align-items: center; justify-content: center; gap: 4px; pointer-events: none; transition: background .15s, box-shadow .15s; }
6
+ align-items: center; justify-content: center; gap: var(--space-4); pointer-events: none; transition: background .15s, box-shadow .15s; }
7
7
  .cz-dv-hd b { display: block; width: 3px; height: 3px; border-radius: 50%; background: var(--cz-ink3); }
8
8
  .cz-pn-div.hov .cz-dv-hd, .cz-pn-div.drag .cz-dv-hd, .cz-pn-div:focus-visible .cz-dv-hd { background: var(--cz-bluebg); box-shadow: 0 0 0 1.5px var(--cz-blue), 0 4px 12px -4px color-mix(in srgb, var(--cz-blue) 50%, transparent); }
9
9
  .cz-pn-div.hov .cz-dv-hd b, .cz-pn-div.drag .cz-dv-hd b, .cz-pn-div:focus-visible .cz-dv-hd b { background: var(--cz-blueink); }
@@ -11,7 +11,7 @@
11
11
  /* the blue line while dragging is the engine's (.cz-pn-div::after in cozy-panels.css); its ::before is the hit area */
12
12
 
13
13
  /* on top of the first divider: Adler's sprout, or the day's charm */
14
- .cz-dv-top { position: absolute; left: 50%; top: 50%; width: 26px; height: 31px; margin: -64px 0 0 -13px; display: flex; align-items: flex-end; justify-content: center; pointer-events: none; }
14
+ .cz-dv-top { position: absolute; left: 50%; top: 50%; width: 26px; height: 31px; margin: calc(-1 * var(--space-64)) 0 0 -13px; display: flex; align-items: flex-end; justify-content: center; pointer-events: none; }
15
15
  .cz-dv-top:empty { display: none; }
16
16
  .cz-dv-sp { width: 22px; height: 26px; overflow: visible; transform-origin: 50% 100%; transition: transform .25s ease-out; }
17
17
  .cz-dv-st { fill: none; stroke: var(--ad-h1); stroke-width: 2; stroke-linecap: round; }
@@ -0,0 +1,74 @@
1
+ /**
2
+ * cozy-draft-keep.js — the page side of pm/draft-keep.js (initiative forms-keep-drafts): one keeper per page, its listeners on the
3
+ * document, and the design system's Toast when a draft comes back. draft-keep.js loads it in a browser; the engine and the Toast's
4
+ * markup stay in draft-keep.js, where node tests reach them.
5
+ */
6
+ import { createKeeper, toastHtml } from './draft-keep.js';
7
+ const TOAST_MS = 6000;
8
+
9
+ export function install() {
10
+ const W = window;
11
+ const store = {
12
+ get: (k) => { const s = W.localStorage.getItem(k); return s ? JSON.parse(s) : null; },
13
+ set: (k, v) => W.localStorage.setItem(k, JSON.stringify(v)),
14
+ remove: (k) => W.localStorage.removeItem(k),
15
+ keys: () => Array.from({ length: W.localStorage.length }, (_, i) => W.localStorage.key(i)).filter(Boolean),
16
+ };
17
+ const mark = (ev, n) => {
18
+ console.info(`[draft-keep] ${ev} ${n}`);
19
+ import('./http.js').then((h) => h.pmPost('/api/draft-keep/mark', { ev, n })).catch(() => {});
20
+ };
21
+ // a press is near a box when they share a form, or the press sits within the box's three nearest ancestors
22
+ const near = (btn, el) => {
23
+ if (el.form && btn.form === el.form) return true;
24
+ let a = el.parentElement;
25
+ for (let i = 0; i < 3 && a; i++, a = a.parentElement) if (a.contains(btn)) return true;
26
+ return false;
27
+ };
28
+ let pend = 0, toastEl = null, toastT = 0;
29
+ const still = () => (W.matchMedia && W.matchMedia('(prefers-reduced-motion: reduce)').matches) || document.documentElement.classList.contains('ad-still');
30
+ const showToast = () => {
31
+ const n = pend; pend = 0;
32
+ if (!n) return;
33
+ if (!toastEl) {
34
+ toastEl = document.createElement('div');
35
+ toastEl.className = 'pm-ds'; // the Komorebi scope: its Toast and tokens apply inside it
36
+ // a desk: bottom centre, as the Toast part says. A phone: under the top bar, so it never covers the chat box at the foot (critic, p16)
37
+ const phone = W.innerWidth <= 760; // the same edge as the menu's phone layout (cozy-nav.js)
38
+ toastEl.style.cssText = `position:fixed;left:50%;${phone ? 'top:var(--space-64)' : 'bottom:var(--space-24)'};transform:translateX(-50%);z-index:2147483000;background:none`
39
+ + (still() ? '' : ';transition:opacity var(--duration-enter) var(--ease-out)');
40
+ document.body.appendChild(toastEl);
41
+ toastEl.addEventListener('click', (e) => { if (e.target.closest('[data-dk-undo]')) { K.undo(); hide(); } });
42
+ toastEl.addEventListener('mouseenter', () => clearTimeout(toastT));
43
+ toastEl.addEventListener('mouseleave', () => { toastT = setTimeout(hide, TOAST_MS); });
44
+ }
45
+ toastEl.innerHTML = toastHtml(n);
46
+ toastEl.hidden = false; toastEl.style.opacity = '1';
47
+ const bar = toastEl.querySelector('[data-dk-timer]');
48
+ // the countdown line moves only when motion is allowed (critic, p12): reduced motion or Settings > Adler > Motion: Still shows it still
49
+ if (bar) { bar.style.display = 'block'; bar.style.width = '100%'; if (!still()) { bar.style.transition = `width ${TOAST_MS / 1000}s linear`; requestAnimationFrame(() => { bar.style.width = '0'; }); } }
50
+ clearTimeout(toastT); toastT = setTimeout(hide, TOAST_MS);
51
+ };
52
+ const hide = () => { if (toastEl) { toastEl.hidden = true; toastEl.innerHTML = ''; } };
53
+ const K = createKeeper({
54
+ store, near, path: location.pathname,
55
+ onRestore: (list) => { if (!pend) queueMicrotask(showToast); pend += list.length; },
56
+ onMark: mark,
57
+ });
58
+ let tickT = 0;
59
+ const soon = () => { clearTimeout(tickT); tickT = setTimeout(() => K.tick(), 60); };
60
+ const later = () => { soon(); setTimeout(() => K.tick(), 700); setTimeout(() => K.tick(), 2000); };
61
+ const boxes = (root) => (root.matches && root.matches('textarea,input') ? [root] : []).concat(root.querySelectorAll ? [...root.querySelectorAll('textarea,input')] : []);
62
+ const scan = (root) => { for (const el of boxes(root)) K.seen(el); };
63
+ document.addEventListener('focusin', (e) => K.seen(e.target), true);
64
+ document.addEventListener('input', (e) => { if (e.isTrusted) K.input(e.target); }, true);
65
+ document.addEventListener('submit', (e) => { K.submitted(e.target); later(); }, true);
66
+ document.addEventListener('click', (e) => { const b = e.target.closest && e.target.closest('button,[role="button"],input[type="submit"]'); if (b) { K.pressed(b); later(); } }, true);
67
+ document.addEventListener('keydown', (e) => { if (e.key === 'Enter' && !e.shiftKey && !e.isComposing) { K.entered(e.target); later(); } }, true);
68
+ new MutationObserver((ms) => {
69
+ for (const m of ms) for (const a of m.addedNodes) if (a.nodeType === 1) scan(a);
70
+ soon();
71
+ }).observe(document.documentElement, { childList: true, subtree: true });
72
+ scan(document);
73
+ }
74
+