create-pmos 0.440.0 → 0.442.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 (95) hide show
  1. package/package.json +25 -25
  2. package/payload/KIT-VERSION +1 -1
  3. package/payload/planning/evals/eval-calibration.md +1 -1
  4. package/payload/planning/okrs/health-budgets.md +1 -1
  5. package/payload/state/discoveries.md +1 -1
  6. package/workspace/adler-seasons-art-test.js +106 -0
  7. package/workspace/adler-seasons-test.js +111 -0
  8. package/workspace/briefing-premium-adddoc-test.js +16 -13
  9. package/workspace/briefing-premium-board-test.js +19 -17
  10. package/workspace/briefing-premium-initiative-test.js +7 -4
  11. package/workspace/briefing-premium-products-test.js +4 -4
  12. package/workspace/briefing-premium-sources-test.js +2 -2
  13. package/workspace/briefing-premium-test.js +29 -23
  14. package/workspace/changelog.json +24 -0
  15. package/workspace/guide/adler.md +10 -0
  16. package/workspace/guide/core-documents.md +2 -2
  17. package/workspace/guide/data-freshness.md +7 -5
  18. package/workspace/guide/home.md +3 -1
  19. package/workspace/guide/horizon-scan.md +1 -1
  20. package/workspace/ini-workflow-test.js +6 -2
  21. package/workspace/lib/agent-inbox.js +20 -2
  22. package/workspace/lib/briefing-premium-sources.js +3 -0
  23. package/workspace/lib/briefing-premium.js +37 -7
  24. package/workspace/lib/driver-cli.js +1 -1
  25. package/workspace/lib/driver-run.js +15 -1
  26. package/workspace/lib/driver.js +31 -2
  27. package/workspace/lib/news-for-you.js +24 -9
  28. package/workspace/lib/pm-idle.js +12 -0
  29. package/workspace/lib/refresh.js +17 -8
  30. package/workspace/lib/routes-core-docs.js +1 -1
  31. package/workspace/lib/routes-news.js +15 -1
  32. package/workspace/lib/routes-phone-day.js +6 -4
  33. package/workspace/lib/settings-store.js +38 -0
  34. package/workspace/metric-drafts-ui-test.js +2 -2
  35. package/workspace/need-shot.js +57 -0
  36. package/workspace/news-viewers-test.js +183 -0
  37. package/workspace/package-lock.json +2 -2
  38. package/workspace/package.json +1 -1
  39. package/workspace/premium-board-actions-test.js +2 -1
  40. package/workspace/premium-chat-attach-test.js +2 -0
  41. package/workspace/premium-core-doc-issue-test.js +9 -8
  42. package/workspace/program-panel-test.js +1 -1
  43. package/workspace/public/pm/bd-ini-panel.js +6 -13
  44. package/workspace/public/pm/c3-ini-ui.js +1 -1
  45. package/workspace/public/pm/cozy-adler.css +21 -0
  46. package/workspace/public/pm/cozy-adler.js +415 -8
  47. package/workspace/public/pm/cozy-ev.css +44 -0
  48. package/workspace/public/pm/cozy-home.css +8 -0
  49. package/workspace/public/pm/cozy-news.js +186 -22
  50. package/workspace/public/pm/cozy-seasons.js +318 -0
  51. package/workspace/public/pm/cozy-settings.js +88 -5
  52. package/workspace/public/pm/cozy-today.css +5 -0
  53. package/workspace/public/pm/cozy-viewer.js +12 -7
  54. package/workspace/public/pm/cozy-vw-shell.css +49 -0
  55. package/workspace/public/pm/cozy.css +65 -0
  56. package/workspace/public/pm/dash-view.js +4 -2
  57. package/workspace/public/pm/home-adddoc.js +46 -26
  58. package/workspace/public/pm/home-app.js +142 -114
  59. package/workspace/public/pm/home-chat.js +1 -1
  60. package/workspace/public/pm/home-day.js +17 -9
  61. package/workspace/public/pm/home-draft.js +35 -23
  62. package/workspace/public/pm/home-ini.js +4 -4
  63. package/workspace/public/pm/home-mentions.js +1 -1
  64. package/workspace/public/pm/home-need.js +336 -0
  65. package/workspace/public/pm/home-today.js +2 -2
  66. package/workspace/public/pm/home-work.js +51 -4
  67. package/workspace/public/pm/impact.js +1 -1
  68. package/workspace/public/pm/ini-groups.js +15 -10
  69. package/workspace/public/pm/ini-links.js +1 -1
  70. package/workspace/public/pm/ini-tasks.js +208 -44
  71. package/workspace/public/pm/ini-view-model.js +8 -2
  72. package/workspace/public/pm/ini-view.css +305 -1
  73. package/workspace/public/pm/ini-view.js +190 -80
  74. package/workspace/public/pm/mission.js +234 -0
  75. package/workspace/public/pm/premium-board.js +1 -1
  76. package/workspace/public/pm/premium-welcome.js +2 -2
  77. package/workspace/public/pm/small-vw.js +128 -0
  78. package/workspace/public/pm/split-merge.js +1 -1
  79. package/workspace/public/pm/stage-line.js +2 -2
  80. package/workspace/server.js +10 -6
  81. package/workspace/skills/initiative-drive.skill +4 -1
  82. package/workspace/split-merge-ui-test.js +1 -1
  83. package/workspace/stage-card-test.js +48 -11
  84. package/workspace/task-links-test.js +2 -0
  85. package/workspace/task-milestones-test.js +5 -1
  86. package/workspace/task-plans-test.js +3 -3
  87. package/workspace/task-views-test.js +90 -37
  88. package/workspace/test-lists/adler-seasons-art.json +13 -0
  89. package/workspace/test-lists/batch18-adler-seasons.json +13 -0
  90. package/workspace/test-lists/batch18-asks.json +5 -0
  91. package/workspace/test-lists/mission.json +5 -0
  92. package/workspace/test-lists/news-viewers.json +13 -0
  93. package/workspace/test-lists/small-viewers.json +5 -0
  94. package/workspace/test-lists/viewer-tasks.json +5 -0
  95. package/workspace/tk-tasks-test.js +25 -30
@@ -17,6 +17,8 @@
17
17
  .cz-vw-pri { height: 36px; padding: 0 14px; margin: 0 4px; border-radius: 999px; border: 0; background: var(--cz-ink); color: var(--cz-card); font: inherit; font-size: var(--fs-3); font-weight: 700; display: inline-flex; align-items: center; gap: 6px; flex: none; cursor: pointer; }
18
18
  .cz-vw-pri.i { width: 40px; height: 40px; padding: 0; justify-content: center; }
19
19
  .cz-vw-pri:focus-visible { outline: 2px solid var(--cz-blue); outline-offset: 2px; }
20
+ .cz-vw-pri.blue { background: var(--cz-solid); color: var(--cz-onsolid); } /* a form's round ✓ (batch 18 item 2-C, canvas OvA8People) */
21
+ @media (max-width: 760px) { .cz-vw-pri.i { width: 44px; height: 44px; } } /* 44 px targets on a phone */
20
22
  .cz-vw-ib { border-radius: 999px; }
21
23
 
22
24
  /* rename (canvas RnATask, RnAIni, RnAProg, RnAPhone): the title is the press; a tap makes it one field with a blue check */
@@ -173,3 +175,50 @@ body.cz-vw-rail [data-cz-vw-list] > :not(.cz-vw-railbar), body.cz-vw-rail #hmLis
173
175
  .cz-vw-chip:not(:has(b)) { padding: 0 6px; }
174
176
  .cz-vw-chip:focus-visible { outline: 2px solid var(--cz-blue); outline-offset: 1px; }
175
177
  @media (max-width: 760px) { .cz-vw-chip { min-height: 32px; } }
178
+
179
+ /* a form in the Viewer (batch 18 item 2-C, canvas OvA8People, OvA9Docs): ✓ in the header saves, ← cancels. Labels over 44 px fields,
180
+ * one-choice chips, a quiet note and a ✦ line; the same on Home and the Board (cozy-home.css is not loaded on the Board) */
181
+ .czf { display: flex; flex-direction: column; gap: 14px; margin: 0; }
182
+ .czf-l[hidden] { display: none; }
183
+ .czf-l { display: flex; flex-direction: column; gap: 6px; font-size: var(--fs-2); font-weight: 700; color: var(--cz-ink2); }
184
+ .czf-l input, .czf-l select { font: inherit; font-size: var(--fs-3); font-weight: 500; color: var(--cz-ink); height: 44px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--cz-hair); background: var(--cz-card); box-sizing: border-box; width: 100%; }
185
+ .czf-l input::placeholder { color: var(--cz-ink3); }
186
+ .czf-l input:disabled { background: var(--cz-well); color: var(--cz-ink3); }
187
+ .czf-l input:focus-visible, .czf-l select:focus-visible { outline: 2px solid var(--cz-blue); outline-offset: 1px; }
188
+ .czf-chips { display: flex; flex-wrap: wrap; gap: 8px; }
189
+ .czf-chips .cz-chip { height: 36px; padding: 0 14px; font-weight: 600; }
190
+ .czf-chips .cz-chip[aria-pressed="true"] { background: var(--cz-bluebg); border-color: transparent; color: var(--cz-blueink); font-weight: 700; }
191
+ .czf-chips .cz-chip svg { width: 13px; height: 13px; }
192
+ .czf-note { margin: 0; font-size: var(--fs-2); line-height: 1.45; color: var(--cz-ink3); }
193
+ .czf-spark { margin: 0; display: flex; gap: 8px; font-size: var(--fs-3); line-height: 1.5; color: var(--cz-ink2); }
194
+ .czf-spark svg { flex: none; width: 14px; height: 14px; margin-top: 4px; color: var(--cz-blue); }
195
+ .czf-err { margin: 0; font-size: var(--fs-2); color: var(--cz-red); }
196
+ .czf-err:empty { display: none; }
197
+ .czs-quiet { margin: 0; font-size: var(--fs-2); color: var(--cz-ink3); }
198
+ @media (max-width: 760px), (pointer: coarse) { .czf-chips .cz-chip { height: 44px; } .czf-l input, .czf-l select { font-size: var(--fs-4); } }
199
+
200
+ /* the Viewer's title wraps to two lines, then clamps (batch 18 item 2, the one pattern: OvA1Start). A title with Claude's ✦ chip keeps one. */
201
+ .cz-vw-title:not(.has-chip) { white-space: normal; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.25; overflow-wrap: anywhere; }
202
+ .cz-vw-hd { align-items: center; }
203
+
204
+ /* an ask's summary (batch 18 item 2-A, OvA1Start, OvA3Waited): ✦ Claude's offer, the progress of what it started, the amber "If it waits" line */
205
+ .nv { display: flex; flex-direction: column; gap: 12px; }
206
+ .nv-offer, .nv-cost { margin: 0; display: flex; gap: 8px; align-items: flex-start; font-size: var(--fs-3); line-height: 1.5; color: var(--cz-ink); }
207
+ .nv-offer svg { flex: none; margin-top: 3px; color: var(--cz-blueink); }
208
+ .nv-cost { font-size: var(--fs-2); font-weight: 700; color: var(--cz-risk); }
209
+ .nv-cost svg { flex: none; margin-top: 2px; }
210
+ .nv-bar { height: 6px; border-radius: 99px; background: var(--cz-hair); overflow: hidden; }
211
+ .nv-bar > span { display: block; height: 100%; border-radius: 99px; background: var(--cz-blue); }
212
+ .czs-pri svg { flex: none; }
213
+ /* the quiet owner line under the card: whose it is, the kind of work in words, the goal it moves */
214
+ .nv-own { margin: 0; display: flex; align-items: center; gap: 8px; font-size: var(--fs-2); font-weight: 600; color: var(--cz-ink3); line-height: 1.4; }
215
+ .nv-av { width: 22px; height: 22px; border-radius: 50%; background: var(--cz-bluebg); color: var(--cz-blueink); font-size: var(--fs-1); font-weight: 800; display: inline-grid; place-items: center; flex: none; }
216
+ /* a decision: the choices, Claude's pick marked, the why it wrote, and Record with its words */
217
+ .nv-dec { display: flex; flex-direction: column; gap: 8px; }
218
+ .nv-pick { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; background: var(--cz-card); color: var(--cz-blueink); font-size: var(--fs-1); font-weight: 800; }
219
+ .nv .ut-field label em { font-style: normal; font-weight: 600; color: var(--cz-ink3); }
220
+ .nv-facts { margin: 0; display: grid; gap: 6px; }
221
+ .nv-facts div { display: grid; grid-template-columns: 110px 1fr; gap: 10px; }
222
+ .nv-facts dt { color: var(--cz-ink3); font-size: var(--fs-2); }
223
+ .nv-facts dd { margin: 0; overflow-wrap: anywhere; }
224
+ .nv-rev .czs-cv { align-self: center; font-size: var(--fs-4); }
@@ -110,6 +110,16 @@ html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
110
110
  --cz-c-3a3018: #3A3018; --cz-c-e3c46a: #E3C46A; --cz-c-3a1f1d: #3A1F1D; --cz-c-f09a92: #F09A92;
111
111
  /* the report's title slide (ReportPanel.dc.html): its gradient and the accent of its second line */
112
112
  --cz-c-2546b8: #2546B8; --cz-c-1b3a9e: #1B3A9E; --cz-c-cfe88a: #CFE88A; --cz-c-9ab53c: #9AB53C;
113
+ /* the initiative as a mission (batch 18 item 1, pm/mission.js; XvpL5Rocket, XvpL6RocketDark) and Adler's wash on its card (XvpA1): the art's own colours */
114
+ --cz-c-e7ecfb: #E7ECFB; --cz-c-fff2e6: #FFF2E6; --cz-c-1b2340: #1B2340; --cz-c-2b2438: #2B2438; --cz-c-f6c46a: #F6C46A; --cz-c-ff8a4c: #FF8A4C;
115
+ --cz-c-b9c3e6: #B9C3E6; --cz-c-8fb8f2: #8FB8F2; --cz-c-5d86c8: #5D86C8; --cz-c-4f7fd0: #4F7FD0; --cz-c-dce4f6: #DCE4F6; --cz-c-3a4466: #3A4466;
116
+ --cz-c-a8b4d6: #A8B4D6; --cz-c-6b76a0: #6B76A0; --cz-c-b9d3f7: #B9D3F7; --cz-c-8c98c0: #8C98C0; --cz-c-8e99c4: #8E99C4; --cz-c-e2edd6: #E2EDD6;
117
+ --cz-c-26301f: #26301F; --cz-c-9cc98a: #9CC98A; --cz-c-55784a: #55784A; --cz-c-2f6feb: #2F6FEB; --cz-c-e3d8c6: #E3D8C6; --cz-c-3a352e: #3A352E;
118
+ --cz-c-bdb8b0: #BDB8B0; --cz-c-5a5752: #5A5752; --cz-c-a8b0c4: #A8B0C4; --cz-c-7e88a8: #7E88A8; --cz-c-8a6e4e: #8A6E4E; --cz-c-a08868: #A08868;
119
+ --cz-c-3a4152: #3A4152; --cz-c-c9ccd6: #C9CCD6; --cz-c-e9e4da: #E9E4DA; --cz-c-6fa0f0: #6FA0F0; --cz-c-9aa6bf: #9AA6BF; --cz-c-8e99b3: #8E99B3;
120
+ --cz-c-f4f1ec: #F4F1EC; --cz-c-e5605a: #E5605A; --cz-c-b9c1d6: #B9C1D6; --cz-c-5c6480: #5C6480; --cz-c-57b26b: #57B26B; --cz-c-c4cada: #C4CADA;
121
+ --cz-c-e8e4dc: #E8E4DC; --cz-c-6b7280: #6B7280; --cz-c-ffefd9: #FFEFD9; --cz-c-fbf4ea: #FBF4EA; --cz-c-edf5e5: #EDF5E5; --cz-c-e3f0da: #E3F0DA;
122
+ --cz-c-3b2e21: #3B2E21; --cz-c-2b2723: #2B2723; --cz-c-232d20: #232D20; --cz-c-1f2b1c: #1F2B1C;
113
123
  /* Adler, Claude's face (feedback batch 16 item 2; pm/cozy-adler.js and cozy-adler.css name these, never a colour): Wawan's art. Fur, cream,
114
124
  hoodie and sprout gradients, then the face, the props, and the scenes' skies and grounds. */
115
125
  --ad-f0: #FFD995; --ad-f1: #F0B05A; --ad-f2: #C98030; --ad-c0: #FFFFFA; --ad-c1: #FCEFD8; --ad-c2: #EBD3AE;
@@ -123,6 +133,46 @@ html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
123
133
  --ad-plain0: #F7F6F3; --ad-plain1: #F7F6F3; --ad-sun: #FFC85A; --ad-sunglow: #FFD27A; --ad-moon: #F4E9C6; --ad-firefly: #E9F59A;
124
134
  --ad-raincloud: #C9CED6; --ad-drop: #9AA6B8; --ad-ground: #E4D8BC; --ad-groundn: #3A4466; --ad-grass: #8DB05A; --ad-leaf2: #9CC25A;
125
135
  --ad-thinkdot: #A9B39A;
136
+ /* Adler dressed for the season (batch 18 item 8-B; adler-character/seasons-b/charms.py): the charms' colours, then each charm's sky (0, 1) and ground (g) */
137
+ --ad-k-amber1: #FFD27A; --ad-k-amber10: #B87628; --ad-k-amber2: #E9C38A; --ad-k-amber3: #FFB238; --ad-k-amber4: #F2963A; --ad-k-amber5: #E89A3C;
138
+ --ad-k-amber6: #D9973F; --ad-k-amber7: #B8945A; --ad-k-amber8: #C9963F; --ad-k-amber9: #C98434; --ad-k-blue1: #DCE3EC; --ad-k-blue10: #4894EA;
139
+ --ad-k-blue11: #6A8FB2; --ad-k-blue12: #5A7DB0; --ad-k-blue13: #2F5FB3; --ad-k-blue2: #C9D3DE; --ad-k-blue3: #A9D2EE; --ad-k-blue4: #C3CAD4;
140
+ --ad-k-blue5: #B9CBDC; --ad-k-blue6: #B9C6DA; --ad-k-blue7: #9AC4F0; --ad-k-blue8: #7FA6C9; --ad-k-blue9: #8A97AE; --ad-k-brown1: #A85E2A;
141
+ --ad-k-brown2: #8A6A3A; --ad-k-brown3: #6E4A2A; --ad-k-brown4: #3A2E22; --ad-k-gold1: #FFF1B8; --ad-k-gold10: #D4CFC3; --ad-k-gold11: #EBD79A;
142
+ --ad-k-gold12: #E9CD8C; --ad-k-gold13: #FFC85A; --ad-k-gold14: #F2C440; --ad-k-gold15: #E9B949; --ad-k-gold16: #C9A85E; --ad-k-gold17: #E0AE2A;
143
+ --ad-k-gold18: #C9962A; --ad-k-gold2: #F6E7C9; --ad-k-gold3: #E9E4D8; --ad-k-gold4: #F4E9C6; --ad-k-gold5: #F7E7B4; --ad-k-gold6: #FFE3A8;
144
+ --ad-k-gold7: #FFE9A0; --ad-k-gold9: #F2DBA0; --ad-k-green1: #A9C45A; --ad-k-green2: #9CC25A; --ad-k-green3: #7DAA45; --ad-k-green4: #6E9A45;
145
+ --ad-k-green6: #6E8E2E; --ad-k-green7: #5C8A2E; --ad-k-green8: #557A33; --ad-k-grey1: #9FA4AE; --ad-k-grey2: #8D929C; --ad-k-grey3: #5A6276;
146
+ --ad-k-grey4: #4E7A4A; --ad-k-grey5: #3F5A48; --ad-k-ink1: #2A2E35; --ad-k-ink2: #3A4466; --ad-k-ink3: #2E3A55; --ad-k-orange1: #F4B3A2;
147
+ --ad-k-orange2: #EE8A35; --ad-k-orange3: #E8743A; --ad-k-orange4: #C97A3E; --ad-k-orange5: #D27322; --ad-k-orange6: #B8642E;
148
+ --ad-k-paper1: #FFFBF0; --ad-k-paper10: #DDE7F6; --ad-k-paper11: #C9CDD4; --ad-k-paper12: #E3ECF6; --ad-k-paper2: #FFF8EA; --ad-k-paper3: #EAF4FF;
149
+ --ad-k-paper4: #F1F4EA; --ad-k-paper6: #F1F5E7; --ad-k-paper7: #E8ECF2; --ad-k-paper8: #FFF3D1; --ad-k-paper9: #E9E6F2; --ad-k-red1: #F7C9D4;
150
+ --ad-k-red10: #A8322C; --ad-k-red11: #7E2A2A; --ad-k-red2: #F4B3C2; --ad-k-red3: #E79AAE; --ad-k-red4: #C77A90; --ad-k-red5: #D9574F;
151
+ --ad-k-red6: #D9473F; --ad-k-red7: #C8473F; --ad-k-red8: #B8352E; --ad-k-red9: #9E3B3B; --ad-k-teal1: #9CC7D6; --ad-k-violet1: #8E7CC3;
152
+ --ad-newyear0: #FFF4E2; --ad-newyear1: #F8E3C0; --ad-newyearg: #E4D8BC; --ad-cny0: #FFF1E6; --ad-cny1: #F7DCCB; --ad-cnyg: #E4D8BC;
153
+ --ad-lantern0: #3A3350; --ad-lantern1: #4B3B58; --ad-lanterng: #5A4A6E;
154
+ --ad-valentine0: #FFF3F3; --ad-valentine1: #F8E3E6; --ad-valentineg: #E4D8BC;
155
+ --ad-ramadan0: #2E3A55; --ad-ramadan1: #3B4A66; --ad-ramadang: #4A5A72; --ad-raya0: #F3F7EA; --ad-raya1: #E3ECD2; --ad-rayag: #D7E2BC;
156
+ --ad-haji0: #F2F5EC; --ad-haji1: #E2E9D6; --ad-hajig: #D7E2BC; --ad-iwd0: #FFF9E6; --ad-iwd1: #F7EED0; --ad-iwdg: #E4D8BC;
157
+ --ad-pi0: #F7F3EA; --ad-pi1: #EFE8D8; --ad-pig: #E4D8BC; --ad-easter0: #F4F8EC; --ad-easter1: #E8F0DA; --ad-easterg: #CFE0B0;
158
+ --ad-earth0: #EEF6FB; --ad-earth1: #DDEBF4; --ad-earthg: #CFE0B0; --ad-labour0: #F6F4EE; --ad-labour1: #ECE8DE; --ad-labourg: #E4D8BC;
159
+ --ad-vesak0: #FDF6EC; --ad-vesak1: #EFE6F3; --ad-vesakg: #C9DDE8; --ad-dragonboat0: #EEF6F7; --ad-dragonboat1: #DCEBEE; --ad-dragonboatg: #B9DCE4;
160
+ --ad-natday0: #F3F6FB; --ad-natday1: #E4EBF5; --ad-natdayg: #E4D8BC; --ad-moon0: #1E2438; --ad-moon1: #2D3550; --ad-moong: #B9BDC6;
161
+ --ad-ndp0: #3B3F66; --ad-ndp1: #6A5578; --ad-ndpg: #4A4A70; --ad-teachers0: #F6F4EE; --ad-teachers1: #ECE8DE; --ad-teachersg: #E4D8BC;
162
+ --ad-midautumn0: #26304D; --ad-midautumn1: #3A4466; --ad-midautumng: #3A4466; --ad-exam0: #F4F3EF; --ad-exam1: #E9E7E1; --ad-examg: #E4D8BC;
163
+ --ad-children0: #EFF6FD; --ad-children1: #E1EDF9; --ad-childreng: #E4D8BC;
164
+ --ad-nightrace0: #1E2438; --ad-nightrace1: #2D3550; --ad-nightraceg: #2A3150;
165
+ --ad-halloween0: #4A3B66; --ad-halloween1: #6A4E7A; --ad-halloweeng: #56466E;
166
+ --ad-deepavali0: #3E2F55; --ad-deepavali1: #6B4560; --ad-deepavalig: #5A3E5E; --ad-thanks0: #FFF2DE; --ad-thanks1: #F5DFC0; --ad-thanksg: #E4D8BC;
167
+ --ad-hanukkah0: #EEF3FB; --ad-hanukkah1: #DEE7F5; --ad-hanukkahg: #E4D8BC;
168
+ --ad-christmas0: #F7F3EA; --ad-christmas1: #EDE6D6; --ad-christmasg: #E4D8BC;
169
+ --ad-dongzhi0: #F6F3EA; --ad-dongzhi1: #EEE9DC; --ad-dongzhig: #E4D8BC; --ad-pongal0: #FFF6E2; --ad-pongal1: #F6E6C4; --ad-pongalg: #E4D8BC;
170
+ --ad-football0: #EEF5E8; --ad-football1: #DCEBCF; --ad-footballg: #9CC27A; --ad-games0: #F2F6FB; --ad-games1: #E3ECF6; --ad-gamesg: #E8A07A;
171
+ --ad-movie0: #2A2333; --ad-movie1: #3B2F45; --ad-movieg: #3B2F45; --ad-music0: #F3EFF8; --ad-music1: #E6E0F0; --ad-musicg: #E4D8BC;
172
+ --ad-spring0: #FBF6F3; --ad-spring1: #F2E8E8; --ad-springg: #CFE0B0; --ad-summer0: #FFF3D6; --ad-summer1: #FBE3B0; --ad-summerg: #E4D8BC;
173
+ --ad-autumn0: #FFF2DE; --ad-autumn1: #F5DFC0; --ad-autumng: #E9C79A; --ad-winter0: #EEF3F8; --ad-winter1: #DDE6EF; --ad-winterg: #FFFFFF;
174
+ --ad-monsoon0: #E8EEF3; --ad-monsoon1: #D5DFE8; --ad-monsoong: #C9D6E2; --ad-pmosday0: #F7F6F3; --ad-pmosday1: #EFEDE8; --ad-pmosdayg: #E4D8BC;
175
+ --ad-birthday0: #FFF4E2; --ad-birthday1: #F8E3C0; --ad-birthdayg: #E4D8BC;
126
176
  }
127
177
  .cz {
128
178
  --cz-ink: var(--cz-c-2a2e35); --cz-ink2: var(--cz-c-4a4f58); --cz-ink3: var(--cz-c-646a74);
@@ -139,6 +189,14 @@ html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
139
189
  --cz-sans: 'Nunito', ui-sans-serif, system-ui, sans-serif;
140
190
  --cz-mono: 'IBM Plex Mono', ui-monospace, Menlo, monospace;
141
191
  --cz-done: var(--cz-c-1e449b); --cz-bubble: var(--cz-c-e8f1fb); --cz-solid: var(--cz-c-2f5fb3); --cz-onsolid: var(--cz-c-ffffff);
192
+ /* the mission (pm/mission.js) and Adler's wash on the initiative card: light, then the dark block's own */
193
+ --mi-s0: var(--cz-c-e7ecfb); --mi-s1: var(--cz-c-fff2e6); --mi-t1: var(--cz-c-ff8a4c); --mi-gold: var(--cz-c-f6c46a); --mi-star: var(--cz-c-b9c3e6);
194
+ --mi-pl: var(--cz-c-8fb8f2); --mi-pls: var(--cz-c-4f7fd0); --mi-pq: var(--cz-c-dce4f6); --mi-pqs: var(--cz-c-a8b4d6); --mi-spot: var(--cz-c-b9d3f7); --mi-qm: var(--cz-c-8c98c0);
195
+ --mi-gr: var(--cz-c-e2edd6); --mi-dn: var(--cz-c-9cc98a); --mi-nw: var(--cz-c-2f6feb); --mi-q: var(--cz-c-e3d8c6); --mi-late: var(--cz-c-d9773f); --mi-hold: var(--cz-c-bdb8b0);
196
+ --mi-dash: var(--cz-c-a8b0c4); --mi-pole: var(--cz-c-8a6e4e); --mi-line: var(--cz-c-3a4152); --mi-wh: var(--cz-c-ffffff); --mi-lens: var(--cz-c-6fa0f0); --mi-gh: var(--cz-c-6fa0f0);
197
+ --mi-pad: var(--cz-c-9aa6bf); --mi-rb: var(--cz-c-ffffff); --mi-fin: var(--cz-c-e5605a); --mi-path: var(--cz-c-b9c1d6); --mi-smoke: var(--cz-c-ffffff); --mi-ok: var(--cz-c-57b26b);
198
+ --mi-off: var(--cz-c-c4cada); --mi-td: var(--cz-c-2a2e35); --mi-pz: var(--cz-c-6b7280); --mi-glow: rgba(47,111,235,.25);
199
+ --iv-wash: linear-gradient(140deg, var(--cz-c-ffefd9) 0%, var(--cz-c-fbf4ea) 42%, var(--cz-c-edf5e5) 78%, var(--cz-c-e3f0da) 100%); --iv-washhr: rgba(111,140,90,.18);
142
200
  }
143
201
  .cz.dark, html.dark .cz, :root[data-theme="dark"] .cz {
144
202
  --cz-ink: var(--cz-c-eceef1); --cz-ink2: var(--cz-c-c5c9d0); --cz-ink3: var(--cz-c-9ea4ad);
@@ -149,6 +207,11 @@ html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
149
207
  --cz-done: var(--cz-c-9bc7f4); --cz-bubble: rgba(106,170,240,.14); --cz-solid: var(--cz-c-4894ea); --cz-onsolid: var(--cz-c-ffffff);
150
208
  --cz-late: var(--cz-c-e8a07a); --cz-latebg: var(--cz-c-3a2418); --cz-ok: var(--cz-c-8fcf9c); --cz-okbg: var(--cz-c-1f3324);
151
209
  --cz-risk: var(--cz-c-e3c46a); --cz-riskbg: var(--cz-c-3a3018); --cz-red: var(--cz-c-f09a92); --cz-redbg: var(--cz-c-3a1f1d);
210
+ --mi-s0: var(--cz-c-1b2340); --mi-s1: var(--cz-c-2b2438); --mi-star: var(--cz-c-ffffff); --mi-pl: var(--cz-c-5d86c8); --mi-pq: var(--cz-c-3a4466); --mi-pqs: var(--cz-c-6b76a0);
211
+ --mi-qm: var(--cz-c-8e99c4); --mi-gr: var(--cz-c-26301f); --mi-dn: var(--cz-c-55784a); --mi-q: var(--cz-c-3a352e); --mi-hold: var(--cz-c-5a5752); --mi-dash: var(--cz-c-7e88a8);
212
+ --mi-pole: var(--cz-c-a08868); --mi-line: var(--cz-c-c9ccd6); --mi-wh: var(--cz-c-e9e4da); --mi-gh: var(--cz-c-8fb8f2); --mi-pad: var(--cz-c-8e99b3); --mi-rb: var(--cz-c-f4f1ec);
213
+ --mi-path: var(--cz-c-5c6480); --mi-smoke: var(--cz-c-c9ccd6); --mi-off: var(--cz-c-7e88a8); --mi-td: var(--cz-c-e8e4dc); --mi-pz: var(--cz-c-c9ccd6);
214
+ --iv-wash: linear-gradient(140deg, var(--cz-c-3b2e21) 0%, var(--cz-c-2b2723) 45%, var(--cz-c-232d20) 80%, var(--cz-c-1f2b1c) 100%); --iv-washhr: rgba(220,190,140,.14);
152
215
  }
153
216
  body.cz { margin: 0; font-family: var(--cz-sans); color: var(--cz-ink); background: var(--cz-ground); background-attachment: fixed; -webkit-font-smoothing: antialiased; font-size: var(--fs-3); }
154
217
  .cz .sky { display: none; }
@@ -254,6 +317,8 @@ body.cz { margin: 0; font-family: var(--cz-sans); color: var(--cz-ink); backgrou
254
317
  .cz-vw-ib:hover:not(:disabled) { background: var(--cz-well); }
255
318
  .cz-vw-ib:disabled { color: var(--cz-ink3); opacity: .45; cursor: not-allowed; }
256
319
  @media (max-width: 760px) { .cz-vw-ib { width: 44px; height: 44px; } } /* 44 px targets on a phone */
320
+ /* a phone: a title marked wrap (the initiative, batch 18 item 1) takes two lines before it cuts */
321
+ @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; } }
257
322
  .cz-vw-body { flex: 1; min-height: 0; overflow: auto; }
258
323
  .cz-vw-body > .cz-ph { margin: 16px; }
259
324
  /* a phone: the Viewer is the whole screen, and the place menu steps aside while it is open */
@@ -229,12 +229,14 @@ export function wireDash(body, h) {
229
229
  }
230
230
 
231
231
  /** One host's Dashboard state, for a view that already draws its work in the Viewer (the initiative view on the Board and on Home).
232
- * o: { page ('initiative:<id>'), scope, ws, board (each a value or a function), vid (the Viewer item's id), VW, redraw(), toast(t), openReport(row), editNeeds(n), mdHtml() }
232
+ * o: { page ('initiative:<id>'), scope, ws, board (each a value or a function), vid (the Viewer item's id), VW, redraw(), toast(t), openReport(row), editNeeds(n), mdHtml(),
233
+ * menu (on a phone the toggle sits in ⋯) }
233
234
  * → { presses(), shows(), html(work), read(via), toggle(), wire(body) } */
234
235
  export function dashHost(o) {
235
236
  const x = { view: 'work', d: null, read: false, open: new Set() };
236
237
  const W = () => (typeof o.ws === 'function' ? o.ws() : o.ws) || '', B = () => (typeof o.board === 'function' ? o.board() : o.board) || '';
237
- const presses = () => (x.d ? [togglePress(x.view)] : []);
238
+ // o.menu: on a phone the toggle goes into ⋯ (the initiative's page, batch 18 item 1)
239
+ const presses = () => (x.d ? [{ ...togglePress(x.view), menu: !!o.menu }] : []);
238
240
  const shows = () => x.view === 'dash' && !!x.d;
239
241
  // the body is drawn again only when it shows the dashboard, before or after: a read that lands on the Work view only adds the header icon,
240
242
  // so the focus (a stage picker, a task being typed) stays where the PM left it
@@ -1,48 +1,68 @@
1
- /* home-adddoc.js — Add a document, in Home's Viewer (premium-agreed-design; initiative briefing-premium-adddoc).
2
- * Drawn in the Viewer's card shape (canvas HmMyWork: the title, the fields, the foot with the press). It is the form the old
3
- * dialog had (title, phase, who writes it, where it lives, the address) and its one press posts to POST /api/custom-docs/add, nothing else.
1
+ /* home-adddoc.js — Add a document, in Home's Viewer (premium-agreed-design; initiative briefing-premium-adddoc; batch 18 item 2-C, canvas OvA9Docs).
2
+ * Shell A's form: ✓ in the header adds, ← cancels. A short note line, the title, Stage chips (an initiative only), Who writes it chips,
3
+ * Where it lives, and the page address only when it does not live in PMOS. Its one press posts to POST /api/custom-docs/add, nothing else.
4
4
  *
5
5
  * openAddDocVw({ VW, pmPost, toast, ws, scope, phases, title, back, onAdded })
6
6
  * VW the Home Viewer host (cozy-viewer): open({ id, kind, title, icon, render }) gives the body to draw in
7
7
  * ws the workspace the record is written in; scope 'initiative:<id>' or 'board:<id>'
8
- * phases the stages a phase can name (an initiative only); back() reopens what the form came from (Cancel)
8
+ * phases the stages a phase can name (an initiative only); back() reopens what the form came from (←)
9
9
  * onAdded awaited after the route answers ok
10
10
  */
11
11
  const esc = (s) => String(s == null ? '' : s).replace(/[&<>"']/g, (c) => ({ '&': '&amp;', '<': '&lt;', '>': '&gt;', '"': '&quot;', "'": '&#39;' }[c]));
12
12
  const KINDS = ['Confluence', 'Google Docs', 'Google Slides'];
13
+ const I = { doc: 'M7 3h7l5 5v13H7zM14 3v5h5', check: 'M5 12.5l4.5 4.5L19 7.5', spark: 'M12 3l1.8 4.7L18.5 9.5l-4.7 1.8L12 16l-1.8-4.7L5.5 9.5l4.7-1.8z' };
14
+ const svg = (d) => `<svg aria-hidden="true" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="${d}"/></svg>`;
15
+ /** The ✦ line under the form: what happens to the record, said once, for the choices made. Pure. */
16
+ export function whereLine(kind, who) {
17
+ if (kind) return 'It is saved on the record with the ' + kind + ' page’s address. PMOS does not read or sync that page.';
18
+ return (who === 'you' ? 'You write it, and it is saved on the record.' : 'It is saved on the record as mine to draft.') + ' Pick Confluence or Google Docs to paste a page address instead.';
19
+ }
13
20
 
14
21
  export function openAddDocVw(o) {
15
22
  const ini = String(o.scope).startsWith('initiative:');
16
23
  const phases = (o.phases && o.phases.length ? o.phases : ['Discover', 'Plan', 'Build', 'Evaluate']);
17
- let who = 'drafts';
24
+ const X = { who: 'drafts', phase: phases[0], kind: '', busy: false };
25
+ const chips = (id, label, list, cur, attr) => `<div class="czf-l" role="group" aria-label="${label}"><span>${label}</span><div class="czf-chips" id="${id}">${list.map(([v, t, ic]) => `<button type="button" class="cz-chip" ${attr}="${esc(v)}" aria-pressed="${v === cur}">${ic ? svg(ic) : ''}${esc(t)}</button>`).join('')}</div></div>`;
18
26
  const draw = (b) => {
19
- b.innerHTML = `<div class="hx-sec hm-adf ut-vc"><div><h2 class="ut-h2">Add a document</h2>${o.title ? `<p class="ut-sub">${esc(o.title)}</p>` : ''}</div>`
20
- + `<p class="ut-small ut-mut" data-ad-note>Add a document the core set does not cover, for example a research plan, a UAT plan or a contract. It is saved on the ${ini ? 'initiative' : 'board'}'s record with the address of a copy that lives in Confluence or Google Docs. PMOS does not read or sync that page.</p>`
21
- + `<label class="hv-why"><span>Title</span><input id="adT" maxlength="80" placeholder="For example: UAT plan" autocomplete="off"></label>`
22
- + (ini ? `<label class="hv-why"><span>Phase</span><select id="adPh">${phases.map((k) => `<option>${esc(k)}</option>`).join('')}</select></label>` : '')
23
- + `<div class="hv-why"><span>Who writes it</span><div class="hx-tabs" id="adW" role="group" aria-label="Who writes it"><button type="button" data-w="drafts" aria-pressed="true">PMOS drafts it</button><button type="button" data-w="you" aria-pressed="false">I write it</button></div></div>`
24
- + `<label class="hv-why"><span>Where it lives</span><select id="adK"><option value="">In PMOS</option>${KINDS.map((k) => `<option>${k}</option>`).join('')}</select></label>`
25
- + `<label class="hv-why"><span>Page address</span><input id="adU" maxlength="300" placeholder="Paste the page address" disabled autocomplete="off"></label>`
26
- + `<p class="hx-n" id="adM" role="status"></p>`
27
- + `<div class="ut-foot"><button type="button" class="ut-btn pri" id="adGo">Add document</button><button type="button" class="ut-btn ghost" id="adNo">Cancel</button></div></div>`;
27
+ b.innerHTML = `<form class="czf hm-adf" data-czf-adddoc novalidate>`
28
+ + `<p class="czf-note" data-ad-note>For a document the core set does not cover, like a UAT plan or a contract.</p>`
29
+ + `<label class="czf-l"><span>Title</span><input id="adT" maxlength="80" placeholder="For example: UAT plan" autocomplete="off"></label>`
30
+ + (ini ? chips('adPh', 'Stage', phases.map((k) => [k, k]), X.phase, 'data-ph') : '')
31
+ + chips('adW', 'Who writes it', [['drafts', 'I draft it', I.spark], ['you', 'You write it']], X.who, 'data-w')
32
+ + `<label class="czf-l"><span>Where it lives</span><select id="adK"><option value="">In PMOS</option>${KINDS.map((k) => `<option>${k}</option>`).join('')}</select></label>`
33
+ + `<label class="czf-l" id="adUL" hidden><span>Page address</span><input id="adU" maxlength="300" placeholder="Paste the page address" autocomplete="off"></label>`
34
+ + `<p class="czf-spark" id="adS">${svg(I.spark)}<span>${esc(whereLine(X.kind, X.who))}</span></p>`
35
+ + `<p class="czf-err" id="adM" role="status"></p><button type="submit" hidden></button></form>`;
28
36
  };
29
- const body = o.VW.open({ id: 'adddoc:' + o.scope, kind: 'New document', title: 'Add a document' + (o.title ? ' · ' + o.title : ''), icon: 'doc', render: draw });
37
+ const body = o.VW.open({ id: 'adddoc:' + o.scope, kind: 'New document', title: 'Add a document', sub: o.title || '', icon: I.doc, back: true,
38
+ presses: [{ act: 'add', label: 'Add the document', icon: I.check, solid: true, blue: true }],
39
+ onPress: (a) => { if (a === 'add') add(); },
40
+ render: draw });
30
41
  const $ = (s) => body.querySelector(s);
31
- body.onchange = (e) => { if (e.target.id === 'adK') { $('#adU').disabled = !e.target.value; if (e.target.value) $('#adU').focus(); } };
32
- body.onclick = async (e) => {
33
- const w = e.target.closest('[data-w]');
34
- if (w) { who = w.dataset.w; body.querySelectorAll('#adW button').forEach((x) => x.setAttribute('aria-pressed', String(x === w))); return; }
35
- if (e.target.closest('#adNo')) { if (o.back) o.back(); return; }
36
- if (!e.target.closest('#adGo')) return;
37
- const title = $('#adT').value.trim(), m = $('#adM'), kind = $('#adK').value, url = ($('#adU').value || '').trim();
42
+ const say = () => { const s = $('#adS span'); if (s) s.textContent = whereLine(X.kind, X.who); };
43
+ body.onchange = (e) => {
44
+ if (e.target.id !== 'adK') return;
45
+ X.kind = e.target.value; $('#adUL').hidden = !X.kind; say();
46
+ if (X.kind) $('#adU').focus();
47
+ };
48
+ body.onclick = (e) => {
49
+ const w = e.target.closest('[data-w]'), ph = e.target.closest('[data-ph]');
50
+ if (w) { X.who = w.dataset.w; body.querySelectorAll('#adW [data-w]').forEach((x) => x.setAttribute('aria-pressed', String(x === w))); say(); }
51
+ if (ph) { X.phase = ph.dataset.ph; body.querySelectorAll('#adPh [data-ph]').forEach((x) => x.setAttribute('aria-pressed', String(x === ph))); }
52
+ };
53
+ body.addEventListener('submit', (e) => { e.preventDefault(); add(); });
54
+ async function add() {
55
+ if (X.busy) return;
56
+ const title = $('#adT').value.trim(), m = $('#adM'), kind = X.kind, url = ($('#adU').value || '').trim();
38
57
  if (!title) { m.textContent = 'Give the document a title.'; $('#adT').focus(); return; }
39
58
  if (kind && !url) { m.textContent = 'Paste the address of the ' + kind + ' page, or choose In PMOS.'; $('#adU').focus(); return; }
40
- const go = $('#adGo'); go.disabled = true;
41
- const res = await o.pmPost('/api/custom-docs/add', { ws: o.ws, scope: o.scope, title, writer: who, phase: ini ? $('#adPh').value : undefined, kind: kind || undefined, url: kind ? url : undefined });
42
- if (!res || res.ok !== true) { go.disabled = false; m.textContent = (res && res.error) || 'The document could not be added.'; return; }
59
+ X.busy = true; m.textContent = '';
60
+ const res = await o.pmPost('/api/custom-docs/add', { ws: o.ws, scope: o.scope, title, writer: X.who, phase: ini ? X.phase : undefined, kind: kind || undefined, url: kind ? url : undefined });
61
+ X.busy = false;
62
+ if (!res || res.ok !== true) { m.textContent = (res && res.error) || 'The document could not be added.'; return; }
43
63
  o.toast('Document added. It is saved on the record.');
44
64
  if (o.onAdded) await o.onAdded();
45
- };
65
+ }
46
66
  const t = $('#adT'); if (t) t.focus();
47
67
  return body;
48
68
  }