create-pmos 0.398.0 → 0.400.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 (515) hide show
  1. package/package.json +30 -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/briefing-premium-adddoc-test.js +19 -15
  7. package/workspace/briefing-premium-board-test.js +82 -50
  8. package/workspace/briefing-premium-calendar-2-test.js +36 -36
  9. package/workspace/briefing-premium-calendar-3-test.js +39 -39
  10. package/workspace/briefing-premium-calendar-test.js +23 -24
  11. package/workspace/briefing-premium-doc-edit-test.js +8 -10
  12. package/workspace/briefing-premium-initiative-test.js +38 -16
  13. package/workspace/briefing-premium-insights-test.js +114 -37
  14. package/workspace/briefing-premium-metrics-test.js +6 -4
  15. package/workspace/briefing-premium-products-test.js +10 -7
  16. package/workspace/briefing-premium-sources-test.js +25 -22
  17. package/workspace/briefing-premium-test.js +48 -43
  18. package/workspace/briefing-premium-work-test.js +16 -11
  19. package/workspace/c3-capture-test.js +0 -17
  20. package/workspace/changelog.json +29 -0
  21. package/workspace/ev-everywhere-test.js +210 -0
  22. package/workspace/fixtures/premium-viewer-fixtures.js +11 -6
  23. package/workspace/guide/briefing-premium.md +2 -2
  24. package/workspace/guide/home.md +58 -19
  25. package/workspace/guide/index.md +1 -1
  26. package/workspace/guide/layout.md +2 -2
  27. package/workspace/guide/notes.md +2 -2
  28. package/workspace/guide/phone-companion.md +1 -1
  29. package/workspace/lib/board-grill.js +63 -0
  30. package/workspace/lib/board-premium.js +36 -5
  31. package/workspace/lib/initiative-layout.js +77 -0
  32. package/workspace/lib/insights-premium.js +3 -2
  33. package/workspace/lib/insights-records.js +21 -7
  34. package/workspace/lib/meeting-points.js +52 -0
  35. package/workspace/lib/news-for-you.js +88 -0
  36. package/workspace/lib/notes-series.js +29 -6
  37. package/workspace/lib/report-confirm.js +48 -0
  38. package/workspace/lib/route-modules.js +9 -9
  39. package/workspace/lib/routes-board-docs.js +46 -0
  40. package/workspace/lib/routes-board-grill.js +90 -0
  41. package/workspace/lib/routes-home-review.js +108 -0
  42. package/workspace/lib/routes-initiative-layout.js +57 -0
  43. package/workspace/lib/routes-insights-premium.js +4 -1
  44. package/workspace/lib/routes-insights-records.js +8 -4
  45. package/workspace/lib/routes-meeting-points.js +37 -0
  46. package/workspace/lib/routes-news.js +57 -0
  47. package/workspace/lib/routes-notes.js +2 -1
  48. package/workspace/lib/routes-phone-day.js +18 -9
  49. package/workspace/lib/routes-report-confirm.js +31 -0
  50. package/workspace/lib/routes-search.js +38 -0
  51. package/workspace/lib/routes-slash.js +95 -0
  52. package/workspace/lib/search-index.js +176 -0
  53. package/workspace/package-lock.json +2 -2
  54. package/workspace/package.json +1 -2
  55. package/workspace/premium-board-actions-test.js +86 -50
  56. package/workspace/premium-briefing-depth-test.js +55 -54
  57. package/workspace/premium-chat-chart-tab-test.js +4 -2
  58. package/workspace/premium-chat-goal-view-test.js +1 -1
  59. package/workspace/premium-chat-report-tab-test.js +16 -2
  60. package/workspace/premium-chat-term-test.js +0 -10
  61. package/workspace/premium-core-doc-issue-test.js +15 -13
  62. package/workspace/premium-menu-rows-test.js +1 -1
  63. package/workspace/premium-phone-card-test.js +7 -5
  64. package/workspace/premium-report-read-test.js +55 -18
  65. package/workspace/premium-vw-backlog-test.js +2 -2
  66. package/workspace/premium-vw-cal-test.js +50 -35
  67. package/workspace/premium-vw-doc-test.js +10 -11
  68. package/workspace/premium-vw-item-test.js +1 -1
  69. package/workspace/premium-vw-jira-test.js +2 -2
  70. package/workspace/premium-vw-meet-test.js +37 -40
  71. package/workspace/premium-vw-notes-test.js +21 -19
  72. package/workspace/premium-vw-rec-test.js +11 -12
  73. package/workspace/premium-welcome-test.js +3 -3
  74. package/workspace/premium-work-depth-test.js +5 -6
  75. package/workspace/public/capture.html +23 -0
  76. package/workspace/public/pm/bd-acts.js +303 -225
  77. package/workspace/public/pm/bd-asks.js +261 -0
  78. package/workspace/public/pm/bd-pop.js +59 -0
  79. package/workspace/public/pm/bd-span.js +49 -13
  80. package/workspace/public/pm/bd-views.js +169 -0
  81. package/workspace/public/pm/c3-base.js +47 -0
  82. package/workspace/public/pm/c3-capture.js +1 -1
  83. package/workspace/public/pm/c3-ini-ui.js +1 -1
  84. package/workspace/public/pm/c3-sheet.js +1 -1
  85. package/workspace/public/pm/c3-toast.js +1 -1
  86. package/workspace/public/pm/console3.css +3 -0
  87. package/workspace/public/pm/cozy-board.css +301 -0
  88. package/workspace/public/pm/cozy-ev.css +228 -0
  89. package/workspace/public/pm/cozy-evmodel.js +106 -0
  90. package/workspace/public/pm/cozy-evui.js +47 -0
  91. package/workspace/public/pm/cozy-home.css +20 -5
  92. package/workspace/public/pm/cozy-insights.css +148 -10
  93. package/workspace/public/pm/cozy-nav.js +103 -39
  94. package/workspace/public/pm/cozy-news.js +140 -0
  95. package/workspace/public/pm/cozy-search.js +203 -0
  96. package/workspace/public/pm/cozy-settings.js +198 -0
  97. package/workspace/public/pm/cozy-sources.js +89 -0
  98. package/workspace/public/pm/cozy-today.css +220 -0
  99. package/workspace/public/pm/cozy-viewer.js +5 -2
  100. package/workspace/public/pm/cozy-vw-mtg.css +350 -0
  101. package/workspace/public/pm/cozy-vw-rp.css +152 -0
  102. package/workspace/public/pm/cozy.css +9 -0
  103. package/workspace/public/pm/goal-chat.js +5 -1
  104. package/workspace/public/pm/home-adddoc.js +5 -5
  105. package/workspace/public/pm/home-app.js +365 -70
  106. package/workspace/public/pm/home-around.js +24 -126
  107. package/workspace/public/pm/home-chat.js +77 -18
  108. package/workspace/public/pm/home-data.js +9 -7
  109. package/workspace/public/pm/home-dictate.js +57 -0
  110. package/workspace/public/pm/home-draft.js +6 -6
  111. package/workspace/public/pm/home-ini-model.js +190 -0
  112. package/workspace/public/pm/home-ini.css +171 -0
  113. package/workspace/public/pm/home-ini.js +466 -0
  114. package/workspace/public/pm/home-list.js +289 -0
  115. package/workspace/public/pm/home-more.js +18 -135
  116. package/workspace/public/pm/home-phone-card.js +13 -8
  117. package/workspace/public/pm/home-review.js +103 -0
  118. package/workspace/public/pm/home-task.js +67 -0
  119. package/workspace/public/pm/home-today.js +148 -0
  120. package/workspace/public/pm/home-work.js +63 -28
  121. package/workspace/public/pm/note-dock.js +1 -2
  122. package/workspace/public/pm/notes-links.js +1 -2
  123. package/workspace/public/pm/notes-task.js +3 -4
  124. package/workspace/public/pm/premium-board.js +164 -40
  125. package/workspace/public/pm/premium-chart-tab.js +4 -5
  126. package/workspace/public/pm/premium-first.js +5 -7
  127. package/workspace/public/pm/premium-initiative-head.js +3 -3
  128. package/workspace/public/pm/premium-insights.js +499 -202
  129. package/workspace/public/pm/premium-mtg-present.js +138 -0
  130. package/workspace/public/pm/premium-mtg-replay.js +142 -0
  131. package/workspace/public/pm/premium-report-read.js +216 -52
  132. package/workspace/public/pm/premium-report-tab.js +44 -19
  133. package/workspace/public/pm/premium-shell.js +7 -7
  134. package/workspace/public/pm/premium-vw-cal.js +150 -60
  135. package/workspace/public/pm/premium-vw-doc.css +20 -2
  136. package/workspace/public/pm/premium-vw-doc.js +22 -7
  137. package/workspace/public/pm/premium-vw-mtg.js +488 -261
  138. package/workspace/public/pm/premium-vw-notes.js +61 -0
  139. package/workspace/public/pm/rp-parts.js +269 -0
  140. package/workspace/public/pm/view-notes.js +2 -2
  141. package/workspace/public/premium-board.html +4 -3
  142. package/workspace/public/premium-insights.html +10 -10
  143. package/workspace/public/premium.html +3 -1
  144. package/workspace/r/m1.png +0 -0
  145. package/workspace/r/m2.png +0 -0
  146. package/workspace/r/m3.png +0 -0
  147. package/workspace/r/nl.png +0 -0
  148. package/workspace/replaced-tests.json +435 -0
  149. package/workspace/run-tests.js +323 -28
  150. package/workspace/server.js +15 -10
  151. package/workspace/test-files.json +3 -140
  152. package/workspace/test-lists/base.json +1 -2
  153. package/workspace/test-lists/c3-desktop-light-load.json +1 -2
  154. package/workspace/test-lists/c3-initiative-boards.json +1 -2
  155. package/workspace/test-lists/c3-meeting-focus.json +2 -12
  156. package/workspace/test-lists/c3-work-agent.json +1 -2
  157. package/workspace/test-lists/calendar-tidy-up.json +1 -2
  158. package/workspace/test-lists/console3-reports.json +1 -2
  159. package/workspace/test-lists/docs-three-way-sync.json +1 -2
  160. package/workspace/test-lists/extension-capture.json +5 -0
  161. package/workspace/test-lists/initiative-layout.json +9 -0
  162. package/workspace/test-lists/jira-wbs.json +1 -2
  163. package/workspace/test-lists/legacy-cleanup-a.json +9 -0
  164. package/workspace/test-lists/meeting-material.json +1 -2
  165. package/workspace/test-lists/meeting-notes.json +2 -36
  166. package/workspace/test-lists/meeting-replay.json +1 -2
  167. package/workspace/test-lists/mm-capture.json +2 -12
  168. package/workspace/test-lists/my-work.json +2 -10
  169. package/workspace/test-lists/onboarding-firstrun.json +2 -12
  170. package/workspace/test-lists/people-directory.json +1 -2
  171. package/workspace/test-lists/premium-uncovered-meetings.json +9 -0
  172. package/workspace/test-lists/premium-uncovered-reports.json +9 -0
  173. package/workspace/test-lists/run2-a.json +1 -2
  174. package/workspace/test-lists/run2-d.json +2 -19
  175. package/workspace/test-lists/run3-b.json +1 -2
  176. package/workspace/test-lists/run3-c.json +2 -12
  177. package/workspace/test-lists/run4-b.json +1 -2
  178. package/workspace/test-lists/run4-d.json +1 -5
  179. package/workspace/test-lists/run5-c.json +1 -11
  180. package/workspace/test-lists/run6.json +1 -5
  181. package/workspace/test-lists/uf-everywhere.json +15 -0
  182. package/workspace/test-lists/uf-home.json +9 -0
  183. package/workspace/test-lists/uncovered-board.json +9 -0
  184. package/workspace/test-lists/workspace-launch-flags.json +2 -12
  185. package/workspace/test-lists/workspace-profile-detection.json +2 -10
  186. package/workspace/test-timings.json +242 -123
  187. package/workspace/c3-briefing-test.js +0 -136
  188. package/workspace/c3-core-docs-test.js +0 -170
  189. package/workspace/c3-driver-fixture.js +0 -64
  190. package/workspace/c3-driver-test.js +0 -169
  191. package/workspace/c3-foundation-test.js +0 -163
  192. package/workspace/c3-ib-items-test.js +0 -114
  193. package/workspace/c3-ib-more-test.js +0 -146
  194. package/workspace/c3-ib-triage-backlog-test.js +0 -128
  195. package/workspace/c3-ini-harness.js +0 -66
  196. package/workspace/c3-ini-life-test.js +0 -167
  197. package/workspace/c3-initiatives-test.js +0 -186
  198. package/workspace/c3-light-load-test.js +0 -112
  199. package/workspace/c3-one-home-test.js +0 -149
  200. package/workspace/c3-phone-test.js +0 -289
  201. package/workspace/c3-quiet-test.js +0 -157
  202. package/workspace/c3-report-design-real-test.js +0 -264
  203. package/workspace/c3-report-design-test.js +0 -442
  204. package/workspace/c3-report-setup-test.js +0 -192
  205. package/workspace/c3-report-structure-real-test.js +0 -248
  206. package/workspace/c3-report-structure-test.js +0 -397
  207. package/workspace/c3-reports-test.js +0 -288
  208. package/workspace/c3-scan-test.js +0 -517
  209. package/workspace/c3-sessions-panel-test.js +0 -365
  210. package/workspace/c3-settings-test.js +0 -204
  211. package/workspace/c3-updates-test.js +0 -131
  212. package/workspace/c3-work-test.js +0 -260
  213. package/workspace/cut-stub.js +0 -40
  214. package/workspace/first-paint-audit.js +0 -160
  215. package/workspace/lib/c3-full-console.js +0 -15
  216. package/workspace/lib/engine/derived/trust.js +0 -3
  217. package/workspace/lib/engine/plan-forecast.js +0 -342
  218. package/workspace/lib/engine/report-families.js +0 -175
  219. package/workspace/lib/engine/truth-table.js +0 -57
  220. package/workspace/lib/routes-c3-init.js +0 -54
  221. package/workspace/lib/routes-c3-life.js +0 -120
  222. package/workspace/lib/routes-c3-timeline.js +0 -192
  223. package/workspace/lib/routes-forecast.js +0 -86
  224. package/workspace/lib/routes-releases.js +0 -130
  225. package/workspace/lib/routes-report-facts.js +0 -85
  226. package/workspace/lib/routes-report-families.js +0 -33
  227. package/workspace/lib/routes-signals.js +0 -51
  228. package/workspace/lib/routes-timeline.js +0 -197
  229. package/workspace/public/c3.html +0 -35
  230. package/workspace/public/index.html +0 -156
  231. package/workspace/public/pm/app.js +0 -831
  232. package/workspace/public/pm/bd-board.js +0 -159
  233. package/workspace/public/pm/bd-drag.js +0 -59
  234. package/workspace/public/pm/bd-model.js +0 -152
  235. package/workspace/public/pm/bd-timeline.js +0 -233
  236. package/workspace/public/pm/bd-tree.js +0 -244
  237. package/workspace/public/pm/board-copy.js +0 -59
  238. package/workspace/public/pm/board-read.js +0 -38
  239. package/workspace/public/pm/branches-sheet.js +0 -56
  240. package/workspace/public/pm/breakdown-api.js +0 -58
  241. package/workspace/public/pm/breakdown-copy.js +0 -138
  242. package/workspace/public/pm/briefing-deck.js +0 -441
  243. package/workspace/public/pm/briefing-model.js +0 -251
  244. package/workspace/public/pm/c3-ambient.js +0 -100
  245. package/workspace/public/pm/c3-audience-link.js +0 -21
  246. package/workspace/public/pm/c3-audience.js +0 -46
  247. package/workspace/public/pm/c3-boot.js +0 -13
  248. package/workspace/public/pm/c3-breakdown.js +0 -240
  249. package/workspace/public/pm/c3-brief-data.js +0 -11
  250. package/workspace/public/pm/c3-brief-mentions.js +0 -137
  251. package/workspace/public/pm/c3-brief-needs.js +0 -288
  252. package/workspace/public/pm/c3-brief-pulse.js +0 -112
  253. package/workspace/public/pm/c3-brief-summary.js +0 -139
  254. package/workspace/public/pm/c3-brief-today.js +0 -79
  255. package/workspace/public/pm/c3-brief.js +0 -279
  256. package/workspace/public/pm/c3-cal-strategy.js +0 -529
  257. package/workspace/public/pm/c3-calendar.js +0 -965
  258. package/workspace/public/pm/c3-calpop.js +0 -111
  259. package/workspace/public/pm/c3-case.js +0 -196
  260. package/workspace/public/pm/c3-core-docs.css +0 -18
  261. package/workspace/public/pm/c3-core-docs.js +0 -236
  262. package/workspace/public/pm/c3-daypart.js +0 -176
  263. package/workspace/public/pm/c3-demo-boards.js +0 -764
  264. package/workspace/public/pm/c3-demo-brief-ix.js +0 -350
  265. package/workspace/public/pm/c3-demo-brief-page.js +0 -70
  266. package/workspace/public/pm/c3-demo-cal-ix.js +0 -74
  267. package/workspace/public/pm/c3-demo-cal2.js +0 -66
  268. package/workspace/public/pm/c3-demo-cal3.js +0 -173
  269. package/workspace/public/pm/c3-demo-cal4.js +0 -169
  270. package/workspace/public/pm/c3-demo-cal5.js +0 -52
  271. package/workspace/public/pm/c3-demo-coredocs.js +0 -221
  272. package/workspace/public/pm/c3-demo-data.js +0 -552
  273. package/workspace/public/pm/c3-demo-focus.js +0 -181
  274. package/workspace/public/pm/c3-demo-init.js +0 -430
  275. package/workspace/public/pm/c3-demo-life.js +0 -77
  276. package/workspace/public/pm/c3-demo-material.js +0 -58
  277. package/workspace/public/pm/c3-demo-misc2.js +0 -34
  278. package/workspace/public/pm/c3-demo-phone.js +0 -48
  279. package/workspace/public/pm/c3-demo-plan2.js +0 -30
  280. package/workspace/public/pm/c3-demo-rd.js +0 -432
  281. package/workspace/public/pm/c3-demo-rep-ix.js +0 -126
  282. package/workspace/public/pm/c3-demo-rep2.js +0 -130
  283. package/workspace/public/pm/c3-demo-rep3.js +0 -138
  284. package/workspace/public/pm/c3-demo-rs.js +0 -287
  285. package/workspace/public/pm/c3-demo-term.js +0 -153
  286. package/workspace/public/pm/c3-demo-time.js +0 -49
  287. package/workspace/public/pm/c3-demo-work-ix.js +0 -32
  288. package/workspace/public/pm/c3-demo.js +0 -131
  289. package/workspace/public/pm/c3-design-studio.js +0 -369
  290. package/workspace/public/pm/c3-doc-formats.js +0 -153
  291. package/workspace/public/pm/c3-doc-sheet.js +0 -1230
  292. package/workspace/public/pm/c3-dock.js +0 -206
  293. package/workspace/public/pm/c3-docs.js +0 -291
  294. package/workspace/public/pm/c3-driver-work.js +0 -110
  295. package/workspace/public/pm/c3-driver.css +0 -18
  296. package/workspace/public/pm/c3-driver.js +0 -298
  297. package/workspace/public/pm/c3-focus.css +0 -304
  298. package/workspace/public/pm/c3-focus.js +0 -983
  299. package/workspace/public/pm/c3-ib-docs.js +0 -92
  300. package/workspace/public/pm/c3-ib-initiatives.js +0 -201
  301. package/workspace/public/pm/c3-ib-items.js +0 -210
  302. package/workspace/public/pm/c3-ib-releases.js +0 -48
  303. package/workspace/public/pm/c3-ib-sprints.js +0 -201
  304. package/workspace/public/pm/c3-ib-triage.js +0 -177
  305. package/workspace/public/pm/c3-ii-tabs.js +0 -252
  306. package/workspace/public/pm/c3-ini-life.css +0 -34
  307. package/workspace/public/pm/c3-ini-life.js +0 -379
  308. package/workspace/public/pm/c3-ini-records.js +0 -197
  309. package/workspace/public/pm/c3-ini-timeline.js +0 -278
  310. package/workspace/public/pm/c3-ini-work.js +0 -139
  311. package/workspace/public/pm/c3-init-extras.js +0 -170
  312. package/workspace/public/pm/c3-initiatives.js +0 -852
  313. package/workspace/public/pm/c3-lifecycle-panels.js +0 -479
  314. package/workspace/public/pm/c3-look.js +0 -27
  315. package/workspace/public/pm/c3-material.css +0 -22
  316. package/workspace/public/pm/c3-material.js +0 -321
  317. package/workspace/public/pm/c3-md.js +0 -3
  318. package/workspace/public/pm/c3-misc-panels.js +0 -89
  319. package/workspace/public/pm/c3-new-session.js +0 -110
  320. package/workspace/public/pm/c3-notes.js +0 -751
  321. package/workspace/public/pm/c3-phone-boot.js +0 -47
  322. package/workspace/public/pm/c3-phone-detail.js +0 -97
  323. package/workspace/public/pm/c3-phone-model.js +0 -3
  324. package/workspace/public/pm/c3-phone.css +0 -66
  325. package/workspace/public/pm/c3-phone.js +0 -444
  326. package/workspace/public/pm/c3-plan-panels.js +0 -163
  327. package/workspace/public/pm/c3-plan.js +0 -193
  328. package/workspace/public/pm/c3-quiet.css +0 -113
  329. package/workspace/public/pm/c3-quiet.js +0 -177
  330. package/workspace/public/pm/c3-replay.css +0 -133
  331. package/workspace/public/pm/c3-replay.js +0 -429
  332. package/workspace/public/pm/c3-report-deck.css +0 -163
  333. package/workspace/public/pm/c3-report-deck.js +0 -598
  334. package/workspace/public/pm/c3-report-frame.css +0 -20
  335. package/workspace/public/pm/c3-report-print.css +0 -20
  336. package/workspace/public/pm/c3-report-setup.css +0 -67
  337. package/workspace/public/pm/c3-report-setup.js +0 -298
  338. package/workspace/public/pm/c3-report-store.js +0 -244
  339. package/workspace/public/pm/c3-report-structure.css +0 -44
  340. package/workspace/public/pm/c3-report-structure.js +0 -473
  341. package/workspace/public/pm/c3-reports.css +0 -68
  342. package/workspace/public/pm/c3-reports.js +0 -377
  343. package/workspace/public/pm/c3-roadmap.js +0 -249
  344. package/workspace/public/pm/c3-scan-api.js +0 -167
  345. package/workspace/public/pm/c3-scan-next.js +0 -248
  346. package/workspace/public/pm/c3-scan-setup.js +0 -313
  347. package/workspace/public/pm/c3-scan-words.js +0 -41
  348. package/workspace/public/pm/c3-scan.css +0 -74
  349. package/workspace/public/pm/c3-scan.js +0 -93
  350. package/workspace/public/pm/c3-session-chat.js +0 -103
  351. package/workspace/public/pm/c3-session-conv.js +0 -165
  352. package/workspace/public/pm/c3-session-term.js +0 -216
  353. package/workspace/public/pm/c3-settings.css +0 -85
  354. package/workspace/public/pm/c3-settings.js +0 -1045
  355. package/workspace/public/pm/c3-shell.js +0 -628
  356. package/workspace/public/pm/c3-signals.js +0 -196
  357. package/workspace/public/pm/c3-strategy-panels.js +0 -45
  358. package/workspace/public/pm/c3-swipe.js +0 -230
  359. package/workspace/public/pm/c3-terminal-data.js +0 -48
  360. package/workspace/public/pm/c3-terminal-edge.js +0 -91
  361. package/workspace/public/pm/c3-terminal-icons.js +0 -40
  362. package/workspace/public/pm/c3-terminal-results.js +0 -141
  363. package/workspace/public/pm/c3-terminal.js +0 -52
  364. package/workspace/public/pm/c3-tickets.js +0 -163
  365. package/workspace/public/pm/c3-timeline.js +0 -201
  366. package/workspace/public/pm/calendar-views.js +0 -1049
  367. package/workspace/public/pm/console3-lift.md +0 -220
  368. package/workspace/public/pm/cozy-home.js +0 -172
  369. package/workspace/public/pm/cozy-initiative.css +0 -138
  370. package/workspace/public/pm/cycle-review.js +0 -125
  371. package/workspace/public/pm/data.js +0 -1577
  372. package/workspace/public/pm/dest-board.js +0 -444
  373. package/workspace/public/pm/dest-docs.js +0 -530
  374. package/workspace/public/pm/dest-initiatives.js +0 -162
  375. package/workspace/public/pm/dest-mywork.js +0 -307
  376. package/workspace/public/pm/dest-notes.js +0 -537
  377. package/workspace/public/pm/dest-people.js +0 -449
  378. package/workspace/public/pm/dest-reports.js +0 -383
  379. package/workspace/public/pm/dest-settings.js +0 -601
  380. package/workspace/public/pm/dest-today.js +0 -267
  381. package/workspace/public/pm/display-word.js +0 -56
  382. package/workspace/public/pm/doc-editor.js +0 -473
  383. package/workspace/public/pm/doc-graph.js +0 -272
  384. package/workspace/public/pm/doc-health-panel.js +0 -110
  385. package/workspace/public/pm/doc-rail.js +0 -167
  386. package/workspace/public/pm/doc-remote.js +0 -180
  387. package/workspace/public/pm/dock-sessions.js +0 -472
  388. package/workspace/public/pm/dock.js +0 -216
  389. package/workspace/public/pm/fixture.js +0 -821
  390. package/workspace/public/pm/flag-picker.js +0 -104
  391. package/workspace/public/pm/frame-copy.js +0 -278
  392. package/workspace/public/pm/freshness-line.js +0 -149
  393. package/workspace/public/pm/handoff-box.js +0 -82
  394. package/workspace/public/pm/initiative-list.js +0 -235
  395. package/workspace/public/pm/initiative-sheet.js +0 -331
  396. package/workspace/public/pm/initiatives-api.js +0 -95
  397. package/workspace/public/pm/initiatives-copy.js +0 -287
  398. package/workspace/public/pm/initiatives-timeline-copy.js +0 -59
  399. package/workspace/public/pm/initiatives-timeline.js +0 -410
  400. package/workspace/public/pm/initiatives-ui.js +0 -291
  401. package/workspace/public/pm/item-sheet.js +0 -268
  402. package/workspace/public/pm/keep-card.js +0 -204
  403. package/workspace/public/pm/lifecycle-lens-model.js +0 -246
  404. package/workspace/public/pm/lifecycle-lens.js +0 -276
  405. package/workspace/public/pm/lifecycle.js +0 -111
  406. package/workspace/public/pm/mobile.css +0 -366
  407. package/workspace/public/pm/mobile.js +0 -581
  408. package/workspace/public/pm/modes-live.js +0 -453
  409. package/workspace/public/pm/modes.js +0 -147
  410. package/workspace/public/pm/my-work-card.js +0 -51
  411. package/workspace/public/pm/my-work-data.js +0 -36
  412. package/workspace/public/pm/new-initiative-sheet.js +0 -169
  413. package/workspace/public/pm/next-step-ui.js +0 -190
  414. package/workspace/public/pm/outbox-panel.js +0 -125
  415. package/workspace/public/pm/palette-copy.js +0 -55
  416. package/workspace/public/pm/palette.js +0 -343
  417. package/workspace/public/pm/panel-breakdown.js +0 -702
  418. package/workspace/public/pm/panel-cockpit.js +0 -425
  419. package/workspace/public/pm/panel-detail.js +0 -1513
  420. package/workspace/public/pm/panel-initiatives.js +0 -929
  421. package/workspace/public/pm/panel-newsess.js +0 -709
  422. package/workspace/public/pm/panel-repos.js +0 -741
  423. package/workspace/public/pm/panel-tabs.js +0 -1506
  424. package/workspace/public/pm/panel-trees.js +0 -204
  425. package/workspace/public/pm/people-link.js +0 -106
  426. package/workspace/public/pm/phone-deck.js +0 -167
  427. package/workspace/public/pm/pm-work-view.js +0 -1533
  428. package/workspace/public/pm/portfolio-report.js +0 -61
  429. package/workspace/public/pm/premium-acts.js +0 -280
  430. package/workspace/public/pm/premium-brief.js +0 -111
  431. package/workspace/public/pm/premium-chat.js +0 -22
  432. package/workspace/public/pm/premium-doc-sheet.js +0 -312
  433. package/workspace/public/pm/premium-initiative.js +0 -324
  434. package/workspace/public/pm/premium-insights.css +0 -228
  435. package/workspace/public/pm/premium-metric-tiles.js +0 -68
  436. package/workspace/public/pm/premium-report-brief.js +0 -132
  437. package/workspace/public/pm/premium-vw-rec.js +0 -67
  438. package/workspace/public/pm/premium-wide.css +0 -30
  439. package/workspace/public/pm/print.css +0 -44
  440. package/workspace/public/pm/provider-cards.js +0 -136
  441. package/workspace/public/pm/registry.js +0 -203
  442. package/workspace/public/pm/release-card.js +0 -110
  443. package/workspace/public/pm/releases-view.js +0 -248
  444. package/workspace/public/pm/report-families-view.js +0 -505
  445. package/workspace/public/pm/report-slides.js +0 -438
  446. package/workspace/public/pm/report-tab.js +0 -33
  447. package/workspace/public/pm/report-view.js +0 -337
  448. package/workspace/public/pm/reports-copy.js +0 -134
  449. package/workspace/public/pm/roadmap.js +0 -294
  450. package/workspace/public/pm/run-card.js +0 -260
  451. package/workspace/public/pm/sessions-panel.js +0 -219
  452. package/workspace/public/pm/sheet-jira.js +0 -353
  453. package/workspace/public/pm/shell-bell.js +0 -163
  454. package/workspace/public/pm/shell-model.js +0 -83
  455. package/workspace/public/pm/shell-phone.js +0 -124
  456. package/workspace/public/pm/shell-readaloud.js +0 -53
  457. package/workspace/public/pm/shell-recording.js +0 -274
  458. package/workspace/public/pm/shell-ticker.js +0 -90
  459. package/workspace/public/pm/sig-watch.js +0 -41
  460. package/workspace/public/pm/slide-confirm.js +0 -163
  461. package/workspace/public/pm/slides-copy.js +0 -52
  462. package/workspace/public/pm/status-banner.js +0 -95
  463. package/workspace/public/pm/tab-doc.js +0 -859
  464. package/workspace/public/pm/tab-gone.js +0 -21
  465. package/workspace/public/pm/tab-term.js +0 -1210
  466. package/workspace/public/pm/tab-web.js +0 -90
  467. package/workspace/public/pm/timeline-copy.js +0 -48
  468. package/workspace/public/pm/timeline-forecast-view.js +0 -164
  469. package/workspace/public/pm/today-agenda.js +0 -331
  470. package/workspace/public/pm/today-cards.js +0 -244
  471. package/workspace/public/pm/today-copy.js +0 -506
  472. package/workspace/public/pm/today-day.js +0 -1371
  473. package/workspace/public/pm/today-goals.js +0 -297
  474. package/workspace/public/pm/today-jobs.js +0 -84
  475. package/workspace/public/pm/today-mentions.js +0 -50
  476. package/workspace/public/pm/topbar.js +0 -202
  477. package/workspace/public/pm/triage-card.js +0 -60
  478. package/workspace/public/pm/undo-hold.js +0 -103
  479. package/workspace/public/pm/view-addrepo.js +0 -208
  480. package/workspace/public/pm/view-files.js +0 -197
  481. package/workspace/public/pm/view-livenotes.js +0 -399
  482. package/workspace/public/pm/view-today.js +0 -13
  483. package/workspace/public/pm/view-validate.js +0 -171
  484. package/workspace/public/pm/welcome.js +0 -391
  485. package/workspace/public/pm/work-place.js +0 -68
  486. package/workspace/public/pm/xlsx-read.js +0 -117
  487. package/workspace/public/welcome.html +0 -22
  488. package/workspace/test-lists/browser-suites-green.json +0 -5
  489. package/workspace/test-lists/c3-core-docs.json +0 -9
  490. package/workspace/test-lists/c3-doc-sheet-rich.json +0 -6
  491. package/workspace/test-lists/c3-doc-sheet-size.json +0 -6
  492. package/workspace/test-lists/c3-doc-sheet-v2.json +0 -6
  493. package/workspace/test-lists/c3-ib-items.json +0 -9
  494. package/workspace/test-lists/c3-ib-more.json +0 -9
  495. package/workspace/test-lists/c3-ib-triage-backlog.json +0 -9
  496. package/workspace/test-lists/c3-ini-life.json +0 -9
  497. package/workspace/test-lists/c3-meeting-board.json +0 -5
  498. package/workspace/test-lists/c3-meeting-card.json +0 -5
  499. package/workspace/test-lists/c3-notes-place.json +0 -5
  500. package/workspace/test-lists/c3-notes-series.json +0 -5
  501. package/workspace/test-lists/calendar-time-page.json +0 -5
  502. package/workspace/test-lists/calpop.json +0 -4
  503. package/workspace/test-lists/console3-briefing.json +0 -9
  504. package/workspace/test-lists/console3-foundation.json +0 -9
  505. package/workspace/test-lists/console3-work-page.json +0 -9
  506. package/workspace/test-lists/premium-brief-parity.json +0 -9
  507. package/workspace/test-lists/report-design-studio-ui.json +0 -5
  508. package/workspace/test-lists/report-structure-ui.json +0 -11
  509. package/workspace/test-lists/report-workspace-ui.json +0 -5
  510. package/workspace/test-lists/run3-a.json +0 -5
  511. package/workspace/test-lists/run3-d.json +0 -6
  512. package/workspace/test-lists/run4-c.json +0 -13
  513. package/workspace/test-lists/today-goals-jobs-ui.json +0 -5
  514. package/workspace/test-lists/today-mentions-cards.json +0 -5
  515. package/workspace/test-lists/workspace-tabs-declutter.json +0 -13
@@ -1,441 +0,0 @@
1
- /* pm/briefing-deck.js — the Briefing view (console3 wave C1), built on the console3 mockup's own markup and CSS.
2
- * The mockup (prototype/pmos-console-handoff/mockups/console3.html) is the UI: the stance bar (.stance; the part of the day and its
3
- * lens follow the clock, with no switch), the running line (.tick, .tkt), the card deck (.deck, .fc, .cf, .hero, .dk, .dkd), the flip to the case file (.fb,
4
- * .case, .chgl, .opts, .slt, .cft), the tilt and the flip animation. The styles are pm/console3.css (see pm/console3-lift.md).
5
- * This file keeps the data call (GET /api/briefing, the signal engine's cards) and the model (briefing-model.js) and draws
6
- * what the engine sent: at most five cards, none invented. A field the engine does not supply is left out.
7
- *
8
- * Read-only. The suggested move and the options are text; the slide-to-confirm on the case file is a disabled placeholder until
9
- * the outbox is mounted here. Nothing in this view sends anything.
10
- * Hero kinds drawn: line, big-number, ring, bars. Text only: two-bars, rows, mini-graph (the engine gives them no values to
11
- * plot, so their facts are listed as text and the kind is named).
12
- * Not registered with the registry (Today has no view registry): dest-today.js imports mountBriefing/disposeBriefing. */
13
- import { el } from './dom.js';
14
- import { createIdleGate, watchIdle, applyDayPart } from './c3-daypart.js';
15
- import { TAG_STYLE, PART_STYLE, partByKey, partFor, cardView, nextCards, swipeDir, sizeFor, caseModelOf, rawOption } from './briefing-model.js';
16
- import { rankCards } from './priority-model.js';
17
- import { BX, caseFile, toast } from './c3-brief.js';
18
- import { ensureC3Css, c3ic, c3ring, c3Phone } from './pm-work-view.js';
19
- import { listenButton } from './shell-readaloud.js';
20
- import { onBriefPage } from './c3-brief-data.js';
21
-
22
- const NS = 'http://www.w3.org/2000/svg';
23
- const roots = new WeakMap(); // host -> state
24
- const reduced = () => typeof matchMedia === 'function' && matchMedia('(prefers-reduced-motion: reduce)').matches;
25
- const small = 'font-size:var(--fs-2)';
26
-
27
- function svg(tag, attrs, ...kids) {
28
- const n = document.createElementNS(NS, tag);
29
- for (const k of Object.keys(attrs || {})) n.setAttribute(k, attrs[k]);
30
- for (const c of kids) if (c) n.appendChild(c);
31
- return n;
32
- }
33
-
34
- /* ── the hero, one per data shape: the mockup's hNum, hRing, hBars and hRows (console3.html lines 3095 to 3101) ──── */
35
-
36
- function heroLine(v, p) {
37
- const W = 340; const H = 60; const lo = Math.min(...p); const hi = Math.max(...p); const r = hi - lo || 1;
38
- const X = (i) => 4 + i * (W - 8) / (p.length - 1); const Y = (y) => H - 6 - ((y - lo) / r) * (H - 26);
39
- const pts = p.map((y, i) => X(i).toFixed(1) + ',' + Y(y).toFixed(1)).join(' ');
40
- const last = p[p.length - 1];
41
- return el('div', { class: 'hn' },
42
- el('div', { class: 'a' }, el('b', null, String(last))),
43
- el('div', { class: 'd', style: 'color:var(--muted-foreground)' }, 'from ' + p[0] + ' over ' + p.length + ' points'),
44
- svg('svg', { viewBox: `0 0 ${W} ${H}`, role: 'img', 'aria-label': 'trend of ' + p.length + ' points, from ' + p[0] + ' to ' + last },
45
- svg('polygon', { points: `4,${H - 4} ${pts} ${W - 4},${H - 4}`, fill: 'var(--acc)', 'fill-opacity': '.1' }),
46
- svg('polyline', { class: 'draw', pathLength: '1', points: pts, fill: 'none', stroke: 'var(--acc)', 'stroke-width': '3', 'stroke-linecap': 'round', 'stroke-linejoin': 'round' }),
47
- svg('circle', { cx: X(p.length - 1), cy: Y(last), r: '4.5', fill: 'var(--acc)', stroke: 'var(--card)', 'stroke-width': '2' })));
48
- }
49
-
50
-
51
- /* ── the mockup's richer heroes (hChain, hRing, hNum, hRows, hBars, hTiles, hSegs and the multi-line chart, console3.html lines 3095 to
52
- * 3101 and 3366): drawn only when a card carries `hero.rich`, which the engine does not send (the /c3.html demo mode does). ──────────── */
53
- function gateRing(r) {
54
- const cc = 2 * Math.PI * 38; const col = (r && r.tone) || 'var(--acc)'; const L = (r && r.lines) || [];
55
- return svg('svg', { width: 96, height: 96, viewBox: '0 0 96 96', role: 'img', 'aria-label': L.join(' ') },
56
- svg('circle', { cx: 48, cy: 48, r: 38, fill: 'none', stroke: 'var(--muted)', 'stroke-width': 7 }),
57
- svg('circle', { class: 'rg', cx: 48, cy: 48, r: 38, fill: 'none', stroke: col, 'stroke-width': 7, 'stroke-linecap': 'round', 'stroke-dasharray': (cc * (r.frac || 0)) + ' ' + cc, transform: 'rotate(-90 48 48)' }),
58
- txt(48, 50, L[0] || '', { 'text-anchor': 'middle', class: 't', style: 'font-size:var(--fs-3);font-weight:600' }), txt(48, 65, L[1] || '', { 'text-anchor': 'middle', style: 'font-size:var(--fs-1)' }));
59
- }
60
- const txt = (x, y, s, a) => { const t = svg('text', { x, y, ...(a || {}) }); t.textContent = s; return t; };
61
- const rows = (a) => el('div', { class: 'hrw' }, ...a.map((r) => el('div', { class: 'hrr ' + (r[2] || '') }, c3ic(r[0], 'sm'), el('span', null, r[1]), r[3] ? el('i', null, r[3]) : null)));
62
-
63
- function richHero(r) {
64
- if (r.kind === 'chain') {
65
- return el('div', { class: 'hg' }, gateRing(r.ring), el('div', { class: 'hch' }, ...r.steps.map((n) => el('div', { style: '--c:' + n[2] }, el('b', null, n[0]), el('span', null, n[1])))));
66
- }
67
- if (r.kind === 'ring') {
68
- const body = r.lines
69
- ? [el('b', null, r.cap), ...r.lines.map((x) => el('span', { style: 'display:flex;gap:6px;align-items:center;white-space:nowrap;' + (x[2] ? '' : 'color:var(--warning)') }, c3ic(x[2] ? 'check' : x[0], 'sm'), x[1]))]
70
- : [el('b', null, r.cap), r.sub ? el('span', null, r.sub) : null];
71
- return el('div', { class: 'hr' }, c3ring(r.done, r.total, r.size || 96), el('div', { class: 'c' }, ...body));
72
- }
73
- if (r.kind === 'rows') return rows(r.rows);
74
- if (r.kind === 'bars') {
75
- return el('div', { class: 'hbs' }, ...r.bars.map((b, i) => el('div', { class: 'hbr', style: '--c:' + b[2] }, el('div', { class: 'l' }, el('span', null, b[0]), el('i', null, b[3])),
76
- el('div', { class: 'tk' }, el('u', { style: 'width:' + Math.max(2, b[1] * 100) + '%;animation-delay:' + (i * 90) + 'ms' })))));
77
- }
78
- if (r.kind === 'tiles') return el('div', { class: 'htl', style: '--n:' + r.tiles.length }, ...r.tiles.map((t) => el('div', { style: '--c:' + t[2] }, el('b', null, t[0]), el('span', null, t[1]))));
79
- if (r.kind === 'num') {
80
- const a = r.arr; const W = 340; const H = 60; const lo = Math.min(...a, r.target); const hi = Math.max(...a, r.target); const q = hi - lo || 1;
81
- const X = (i) => 4 + i * (W - 8) / (a.length - 1); const Y = (v) => H - 6 - ((v - lo) / q) * (H - 26);
82
- const pts = a.map((v, i) => X(i).toFixed(1) + ',' + Y(v).toFixed(1)).join(' ');
83
- return el('div', { class: 'hn' }, el('div', { class: 'a' }, el('b', null, r.big), el('span', null, r.unit)), el('div', { class: 'd', style: 'color:' + r.tone }, r.delta),
84
- svg('svg', { viewBox: `0 0 ${W} ${H}`, role: 'img', 'aria-label': 'Trend against target' },
85
- svg('line', { x1: 4, x2: W - 4, y1: Y(r.target), y2: Y(r.target), stroke: 'var(--ring)', 'stroke-dasharray': '4 4' }), txt(W - 4, Y(r.target) - 4, 'target ' + r.target + r.unit, { 'text-anchor': 'end' }),
86
- svg('polygon', { points: `4,${H - 4} ${pts} ${W - 4},${H - 4}`, fill: r.tone, 'fill-opacity': '.1' }),
87
- svg('polyline', { class: 'draw', pathLength: '1', points: pts, fill: 'none', stroke: r.tone, 'stroke-width': 3, 'stroke-linecap': 'round', 'stroke-linejoin': 'round' }),
88
- svg('circle', { cx: X(a.length - 1), cy: Y(a[a.length - 1]), r: 4.5, fill: r.tone, stroke: 'var(--card)', 'stroke-width': 2 })));
89
- }
90
- if (r.kind === 'segs') {
91
- const W = 340; const H = 84; const tot = r.segs.reduce((t, x) => t + x[1], 0) || 1; let x0 = 0;
92
- const s = svg('svg', { viewBox: `0 0 ${W} ${H}`, role: 'img', 'aria-label': 'Effort in minutes per item' });
93
- r.segs.forEach((g, i) => {
94
- const w = (W - (r.segs.length - 1) * 4) * (g[1] / tot); const lab = g[0].length > Math.max(5, Math.floor(w / 6.5)) ? g[0].slice(0, Math.max(4, Math.floor(w / 6.5) - 1)) + '…' : g[0];
95
- s.append(svg('rect', { class: 'grow', style: 'animation-delay:' + (i * 90) + 'ms', x: x0, y: 20, width: w, height: 30, rx: 9, fill: g[2], opacity: '.92' }), txt(x0 + w / 2, 39, g[1] + ' min', { 'text-anchor': 'middle', style: 'fill:#fff;font-weight:500' }), txt(x0 + w / 2, 68, lab, { 'text-anchor': 'middle' }));
96
- x0 += w + 4;
97
- });
98
- s.append(txt(0, 12, 'total ' + r.total, {}));
99
- return s;
100
- }
101
- if (r.kind === 'axis') { // the mockup's "Today with the due times" axis (08:00 to 18:00): a focus window, due-time diamonds and now
102
- const X = (h) => 8 + (h - 8) / 10 * 324; const s = svg('svg', { viewBox: '0 0 340 92', role: 'img', 'aria-label': 'Today with the due times of your items' });
103
- s.append(svg('rect', { x: X(r.focus[0]).toFixed(1), y: 30, width: (X(r.focus[1]) - X(r.focus[0])).toFixed(1), height: 30, rx: 8, fill: 'var(--purple)', 'fill-opacity': '.12', stroke: 'var(--purple)', 'stroke-dasharray': '4 3' }), txt(((X(r.focus[0]) + X(r.focus[1])) / 2).toFixed(1), 49, 'focus', { 'text-anchor': 'middle', style: 'fill:var(--purple)' }),
104
- svg('line', { x1: 8, x2: 332, y1: 45, y2: 45, stroke: 'var(--border)', 'stroke-width': 2 }));
105
- [8, 10, 12, 14, 16, 18].forEach((h) => s.append(txt(X(h), 84, String(h).padStart(2, '0') + ':00', { 'text-anchor': h === 8 ? 'start' : h === 18 ? 'end' : 'middle' }), svg('line', { x1: X(h), x2: X(h), y1: 62, y2: 68, stroke: 'var(--ring)' })));
106
- r.marks.forEach((m) => { const x = X(m[0]); const g = svg('g', {}, svg('path', { d: `M${x} 36 l8 9 -8 9 -8 -9z`, fill: m[2], stroke: 'var(--card)', 'stroke-width': 2 }), txt(x, m[3] || 19, m[1], { 'text-anchor': 'middle', class: 't' })); s.append(g); });
107
- s.append(svg('line', { x1: X(r.now), x2: X(r.now), y1: 30, y2: 62, stroke: 'var(--foreground)', 'stroke-width': 2 }));
108
- return s;
109
- }
110
- if (r.kind === 'days') { // the mockup's "items per day over the next seven working days": a tile per day, a dot where an item lands
111
- const D = r.days; const w = 40.57; const s = svg('svg', { viewBox: '0 0 340 92', role: 'img', 'aria-label': 'Items per day over the next seven working days' });
112
- D.forEach((d, i) => { const x = 4 + i * 48.57; s.append(svg('rect', { x, y: 8, width: w, height: 62, rx: 10, fill: i === 0 ? 'var(--accw)' : 'var(--muted)' }), txt(x + w / 2, 84, d[0], { 'text-anchor': 'middle', class: i === 0 ? 't' : '' }),
113
- d[1] ? svg('circle', { cx: x + w / 2, cy: 52, r: 6, fill: 'var(--acc)' }) : txt(x + w / 2, 44, '·', { 'text-anchor': 'middle', style: 'fill:var(--ring)' })); });
114
- return s;
115
- }
116
- if (r.kind === 'multi') {
117
- const W = 340; const H = 96; const all = r.lines.flatMap((l) => l.pts); const lo = Math.min(...all); const hi = Math.max(...all); const N = Math.max(...r.lines.map((l) => (l.from || 0) + l.pts.length)) - 1;
118
- const X = (i) => 6 + i / N * (W - 12); const Y = (v) => H - 14 - (v - lo) / (hi - lo || 1) * (H - 26);
119
- const s = svg('svg', { viewBox: `0 0 ${W} ${H}`, role: 'img', 'aria-label': 'North star against plan' });
120
- r.lines.forEach((l) => s.append(svg('polyline', { points: l.pts.map((v, i) => X((l.from || 0) + i).toFixed(1) + ',' + Y(v).toFixed(1)).join(' '), fill: 'none', stroke: l.color, 'stroke-width': l.width, 'stroke-dasharray': l.dash || null, 'stroke-linecap': 'round' })));
121
- const act = r.lines[1]; s.append(svg('circle', { cx: X(act.pts.length - 1), cy: Y(act.pts[act.pts.length - 1]), r: 5, fill: 'var(--acc)', stroke: 'var(--card)', 'stroke-width': 2 }));
122
- s.append(txt(X(act.pts.length - 1) - 6, H - 2, 'now', { 'text-anchor': 'end' }), txt(W - 6, Y(r.lines[0].pts[r.lines[0].pts.length - 1]) - 6, 'plan', { 'text-anchor': 'end' }),
123
- txt(W - 6, Y(r.lines[2].pts[r.lines[2].pts.length - 1]) + 14, 'at today\'s pace', { 'text-anchor': 'end', style: 'fill:var(--warning)' }));
124
- return s;
125
- }
126
- return null;
127
- }
128
-
129
- function hero(v) {
130
- if (v.rich) { const h = richHero(v.rich); if (h) return h; }
131
- const k = v.hero.kind; const t = v.terms || {};
132
- if (k === 'line' && v.hero.points && v.hero.points.length >= 3) return heroLine(v, v.hero.points);
133
- if (k === 'ring' && t.impact != null) {
134
- const f = Math.max(0, Math.min(1, t.impact));
135
- return el('div', { class: 'hr' }, c3ring(Math.round(f * 100), 100, 96, Math.round(f * 100) + '%'), el('div', { class: 'c' }, el('b', null, 'impact ' + Math.round(f * 100) + '%')));
136
- }
137
- if (k === 'bars' && (t.impact != null || t.urgency != null)) {
138
- const row = (n, x, c, i) => (x == null ? null : el('div', { class: 'hbr', style: '--c:' + c },
139
- el('div', { class: 'l' }, el('span', null, n), el('i', null, x.toFixed(2))),
140
- el('div', { class: 'tk' }, el('u', { style: 'width:' + Math.max(2, Math.round(Math.max(0, Math.min(1, x)) * 100)) + '%;animation-delay:' + (i * 90) + 'ms' }))));
141
- return el('div', { class: 'hbs', 'aria-label': 'score terms' }, row('impact', t.impact, 'var(--acc)', 0), row('urgency', t.urgency, 'var(--warning)', 1), row('irreversible', t.irreversible, 'var(--destructive)', 2));
142
- }
143
- if (k === 'big-number') {
144
- const n = v.headline.match(/\d+(\.\d+)?/);
145
- const big = n ? n[0] : (v.deadline && v.deadline.days != null ? String(Math.round(v.deadline.days)) : null);
146
- if (big) return el('div', { class: 'hn' }, el('div', { class: 'a' }, el('b', null, big), v.deadline && !n ? el('span', null, 'days') : null));
147
- }
148
- // two-bars, rows, mini-graph (and any kind without values): the facts as text rows, named so the gap is visible
149
- return el('div', { class: 'hrw', 'data-hero-text': k }, ...(v.facts.length ? v.facts : [v.headline]).map((f) => el('div', { class: 'hrr' }, c3ic('info', 'sm'), el('span', null, f))));
150
- }
151
-
152
- /* ── one card: the mockup's cardHtml (line 2324): .fc > .ff (.tg + .cf) and .fb (.fh + .case) ──────────────────────── */
153
-
154
- /* the tag's style, coloured by the card's tone when the engine sends one (briefing-model.js TONE_COLOR) */
155
- const tagStyle = (v) => { const T = TAG_STYLE[v.tag] || TAG_STYLE['Just in']; return v.toneColor ? { ...T, color: v.toneColor } : T; };
156
- const pct = (x) => Math.round(Math.max(0, Math.min(1, x)) * 100);
157
-
158
- function eyebrow(v) {
159
- const T = tagStyle(v);
160
- if (v.eyebrow) return [el('span', { class: 'tg', style: '--tc:var(--muted-foreground)' }, c3ic(v.eyebrow.icon, 'sm'), v.eyebrow.label), v.pov ? el('span', { class: 'tag pov' }, v.pov) : null];
161
- const tg = el('span', { class: 'tg' + (T.filled ? ' f' : ''), title: T.q }, c3ic(v.icon || T.icon, 'sm'), v.kind || v.tag);
162
- return v.pov ? [tg, el('span', { class: 'tag pov' }, v.pov)] : tg;
163
- }
164
-
165
- /* One number tile. Its colour is a token name ('var(--warning)' gives class k-warning), set by console3.css, so no inline style is needed. */
166
- const kpTile = (v, l, c) => {
167
- const m = /^var\(--([a-z-]+)\)$/.exec(String(c || '')); const tone = m ? ({ success: 'foreground', purple: 'acc' }[m[1]] || m[1]) : 'acc'; // the colour vocabulary has no green or purple tile: success reads neutral, purple takes the accent
168
- return el('div', { class: 'kp k-' + tone }, el('b', null, v), el('span', null, l));
169
- };
170
-
171
- /* the mockup's .kp tiles (line 765): numbers the card carries, only the ones it carries */
172
- function kpis(v) {
173
- const t = v.terms || {};
174
- const a = [];
175
- if (t.impact != null) a.push([pct(t.impact) + '%', 'impact', 'var(--acc)']);
176
- if (t.urgency != null) a.push([pct(t.urgency) + '%', 'urgency', 'var(--warning)']);
177
- if (t.score != null) a.push([String(Math.round(t.score * 100) / 100), 'score', 'var(--success)']);
178
- return a.slice(0, 3).map((k) => kpTile(k[0], k[1], k[2]));
179
- }
180
-
181
- /* The front's right side (the mockup's UI.deck): the number tiles the card carries (.kp). A card that carries no number keeps its picture (.hero), so the
182
- * front is never empty. The tiles are a row of their own, not a second slot, so a card draws one or the other. */
183
- function cfh(v) {
184
- const tiles = v.kpisX ? v.kpisX.map((k) => kpTile(k.v, k.l, k.c)) : kpis(v);
185
- if (tiles.length) return el('div', { class: 'cfh', 'data-kp': String(tiles.length) }, el('div', { class: 'chips2 kps' }, ...tiles));
186
- return el('div', { class: 'cfh' }, el('div', { class: 'hero', 'data-hero': v.hero.kind }, hero(v)));
187
- }
188
-
189
- function front(v) {
190
- const rec = v.move ? el('span', { class: 'cfr' }, c3ic('spark', 'sm'), 'Suggested: ' + (v.move.length > 46 ? v.move.slice(0, 45) + '…' : v.move) + (v.conf != null ? ' · ' + Math.round(v.conf) + '%' : ''))
191
- : el('span', { class: 'cfr n' }, 'Tap to see the story ', c3ic('next', 'sm'));
192
- /* a card with factsX (the demo's mockup cards) draws its own icon per fact and no deadline line; an engine card is drawn as before */
193
- const facts = v.factsX ? v.factsX.map((f) => el('span', null, c3ic(f.icon, 'sm'), f.text)) : v.facts.map((f) => el('span', null, c3ic('info', 'sm'), f));
194
- if (v.deadline && !v.factsX) facts.push(el('span', null, c3ic('clock', 'sm'), 'deadline: ' + (v.deadline.days == null ? 'unknown' : v.deadline.text)));
195
- return el('div', { class: 'ff' },
196
- el('div', null, eyebrow(v)),
197
- el('div', { class: 'cf' },
198
- el('div', { class: 'cfa' }, el('h2', null, v.headline), v.sub ? el('div', { class: 'cfs' }, v.sub) : v.why ? el('div', { class: 'cfs', 'data-bf-why': '' }, 'why shown: ' + v.why) : null),
199
- cfh(v),
200
- el('div', { class: 'cff' }, el('div', { class: 'cfx' }, ...facts), rec)));
201
- }
202
-
203
- /* the case file: .fh, then .case (c3-case.js: .sit, .chgl evidence, .opts with effects and a confidence figure, .slt, .cft). The slide is live only where
204
- * something can carry the option out: in the demo (BX.sim) it records the choice in memory and toasts with an Undo; in real mode an engine card has no
205
- * route and no channel, so its case is `outward` and the slide is drawn disabled with the reason (c3-brief.js, briefing-model.js caseModelOf). */
206
- function back(S, v) {
207
- const T = tagStyle(v); const raw = caseModelOf(v, { sim: BX.sim }); const key = v.key || '';
208
- let cardEl = null; let box = null;
209
- const doneChips = (c) => {
210
- const o = (raw.opts || raw.options || []).find((q) => String(q.id) === String(BX.cdone[key]));
211
- c.querySelector('.opts') && c.querySelector('.opts').remove(); c.querySelector('.c3slide') && c.querySelector('.c3slide').remove();
212
- const chips = el('div', { class: 'chips2', 'data-bf': 'done' }, el('span', { class: 'st ok' }, c3ic('check', 'sm'), o ? (o.l || o.label) : 'Done'),
213
- el('button', { type: 'button', class: 'chip2 lk', 'data-bf': 'undo', onclick: (e) => { e.stopPropagation(); undo(); } }, c3ic('undo', 'sm'), 'undo'));
214
- const ft = c.querySelector('.cft'); if (ft) ft.before(chips); else c.append(chips);
215
- };
216
- const build = () => {
217
- const done = BX.cdone[key];
218
- let c;
219
- if (done && raw.doneModel) c = caseFile(raw.doneModel(done));
220
- else {
221
- c = caseFile(raw, { picked: BX.pick['c' + key], onPick: (id) => { BX.pick['c' + key] = id; }, onConfirm: choose });
222
- if (done) doneChips(c);
223
- }
224
- c.setAttribute('data-bf-case', '');
225
- return c;
226
- };
227
- const refresh = () => { const old = box.querySelector('.case'); const c = build(); if (old) { if (old.c3case) old.c3case.dispose(); old.replaceWith(c); } else box.append(c); };
228
- const mark = () => { if (!cardEl) return; const on = !!BX.cdone[key]; cardEl.classList.toggle('ok', on); const r = cardEl.querySelector(':scope > .rsv'); if (on && !r) cardEl.querySelector('.flipg').before(el('span', { class: 'rsv' }, c3ic('check', 'sm'), 'done')); else if (!on && r) r.remove(); };
229
- function undo() { delete BX.cdone[key]; mark(); refresh(); }
230
- function choose({ option }) {
231
- const ro = rawOption(raw, option.id) || {};
232
- BX.cdone[key] = option.id; mark(); refresh();
233
- const decide = String(ro.do || '').startsWith('decide:');
234
- toast(ro.msg || (decide ? 'Decision logged. Follow-up drafts are in the briefing. Nothing was sent.' : 'Done: ' + option.label), undo);
235
- if (decide && cardEl) flipTo(S, cardEl, false);
236
- }
237
- box = el('div', { class: 'fb' },
238
- el('div', { class: 'fh', 'data-bf': 'back', 'data-a': 'cflip', title: 'Flip back (Esc)' }, eyebrow(v), el('span', { class: 'why2' }, T.q.split(': ')[1], c3ic('undo', 'sm'))), build());
239
- box.bind = (c) => { cardEl = c; mark(); };
240
- return box;
241
- }
242
-
243
- function card(S, v, i, n) {
244
- const T = tagStyle(v); const bk = back(S, v);
245
- const c = el('article', {
246
- class: 'fc flipcard' + (i === 0 ? ' on' : ''), tabindex: '0', role: 'button', 'aria-expanded': 'false', 'aria-description': 'card ' + (i + 1) + ' of ' + n,
247
- 'data-a': 'cflip', 'data-bf': 'flip', 'data-bf-card': v.key || '', 'data-tag': T.key, 'data-tag-label': v.tag, style: '--tc:' + (v.eyebrow ? 'var(--muted-foreground)' : T.color),
248
- }, front(v), el('span', { class: 'flipg', 'aria-hidden': 'true' }, c3ic('undo', 'sm')), bk);
249
- bk.bind(c);
250
- /* named by its own headline (aria-labelledby) rather than a long aria-label: the card's name is its text, and the position is its description */
251
- const hd = c.querySelector('h2'); if (hd) { hd.id = 'fc-h-' + String(v.key || i).replace(/\W+/g, '-') + '-' + i; c.setAttribute('aria-labelledby', hd.id); } else c.setAttribute('aria-label', (v.kind || v.tag) + ': ' + v.headline);
252
- return c;
253
- }
254
-
255
- /* ── flip, tilt, deck sync: the mockup's flipTo (line 2403), tilt (line 2414) and deckSync (line 2163) ───────────────── */
256
-
257
- function flipTo(S, c, force) {
258
- if (!c) return;
259
- const deck = c.parentNode;
260
- if (!c.classList.contains('on') && !c.classList.contains('back')) { deck.scrollTo({ left: c.offsetLeft - deck.children[0].offsetLeft, behavior: reduced() ? 'auto' : 'smooth' }); return; }
261
- const toBack = force !== undefined ? force : !c.classList.contains('back');
262
- deck.querySelectorAll('.fc.back').forEach((o) => { if (o !== c) { o.classList.remove('back'); o.setAttribute('aria-expanded', 'false'); } });
263
- /* The flip is a CSS transition of rotateY (console3.css .flipcard, about 350 ms). The front has a fixed size; the back grows to fit its content (console3 foundation),
264
- * so the options and the slide are never clipped. Sibling cards keep their boxes. prefers-reduced-motion turns the transition off. */
265
- c.classList.toggle('back', toBack); c.setAttribute('aria-expanded', String(toBack));
266
- if (toBack && c.scrollIntoView) c.scrollIntoView({ block: 'nearest', behavior: reduced() ? 'auto' : 'smooth' }); // the back grows to its content: bring its foot into view
267
- S.flip = toBack ? c.dataset.bfCard || '1' : null;
268
- }
269
-
270
- function deckSync(S, deck) {
271
- const f = deck.children[0]; if (!f) return;
272
- const w = f.offsetWidth + 12;
273
- const i = Math.max(0, Math.min(deck.children.length - 1, Math.round(deck.scrollLeft / w)));
274
- S.i = i;
275
- [].forEach.call(deck.children, (c, j) => c.classList.toggle('on', j === i));
276
- S.root.querySelectorAll('.dkd').forEach((x, j) => x.setAttribute('aria-current', String(j === i)));
277
- }
278
-
279
- function scrollToCard(S, deck, i) {
280
- const c = deck.children[i]; if (!c) return;
281
- deck.scrollTo({ left: c.offsetLeft - deck.children[0].offsetLeft, behavior: reduced() ? 'auto' : 'smooth' });
282
- c.focus({ preventScroll: true });
283
- }
284
-
285
- function wireDeck(S, deck, cards) {
286
- deck.addEventListener('scroll', () => deckSync(S, deck));
287
- let y0 = null;
288
- deck.addEventListener('pointerdown', (e) => { y0 = e.target.closest('button,.fb .case') ? null : e.clientY; });
289
- deck.addEventListener('pointerup', (e) => {
290
- if (y0 === null) return; const dir = swipeDir(e.clientY - y0); y0 = null;
291
- const c = deck.children[S.i]; if (dir && c) flipTo(S, c, dir > 0); // up opens the case file, down closes it (the mockup's help text)
292
- });
293
- deck.addEventListener('pointercancel', () => { y0 = null; });
294
- deck.addEventListener('click', (e) => {
295
- const c = e.target.closest('.fc'); if (!c || e.target.closest('button')) return;
296
- if (c.classList.contains('back') && !e.target.closest('.fh')) return;
297
- flipTo(S, c);
298
- });
299
- deck.addEventListener('keydown', (e) => {
300
- const c = e.target.closest && e.target.closest('.fc');
301
- if (e.key === 'Escape' && S.flip) { const b = deck.querySelector('.fc.back'); if (b) { e.stopPropagation(); flipTo(S, b, false); } return; }
302
- if (!c) return;
303
- if (e.key === 'Enter' || e.key === ' ') { if (e.target === c) { e.preventDefault(); flipTo(S, c); } return; }
304
- if (e.key === 'ArrowRight' || e.key === 'ArrowLeft') { e.preventDefault(); scrollToCard(S, deck, nextCards(cards, S.i, e.key === 'ArrowRight' ? 1 : -1)); }
305
- });
306
- // the mockup's tilt: the card on top leans toward the pointer
307
- let tilt = null;
308
- deck.addEventListener('mousemove', (e) => {
309
- if (reduced()) return;
310
- const c = e.target.closest && e.target.closest('.fc.on:not(.back)');
311
- if (tilt && tilt !== c) { ['--rx', '--ry', '--mx', '--my'].forEach((p) => tilt.style.removeProperty(p)); tilt = null; }
312
- if (!c) return;
313
- const r = c.getBoundingClientRect(); const x = (e.clientX - r.left) / r.width; const yy = (e.clientY - r.top) / r.height;
314
- c.style.setProperty('--ry', ((x - 0.5) * 5).toFixed(2) + 'deg'); c.style.setProperty('--rx', ((0.5 - yy) * 4).toFixed(2) + 'deg');
315
- c.style.setProperty('--mx', (x * 100).toFixed(0) + '%'); c.style.setProperty('--my', (yy * 100).toFixed(0) + '%'); tilt = c;
316
- });
317
- }
318
-
319
- /* ── state, load, draw ── */
320
- /* One read per lens and zoom for the whole page: a page that mounts the deck on several tabs asks the server (a cold read of the
321
- * repository takes minutes) once, and every deck draws the same answer. A failed read is dropped so the next mount asks again. */
322
- const reads = new Map();
323
- function readLens(lens, zoom, scope) {
324
- const k = lens + '|' + zoom + (scope ? '|' + scope : '');
325
- if (!reads.has(k)) {
326
- const p = fetch('/api/briefing?lens=' + encodeURIComponent(lens) + '&zoom=' + zoom + (scope ? '&scope=' + encodeURIComponent(scope) : '')).then((r) => r.json())
327
- .then((j) => (j && j.ok ? j : { ok: false, error: (j && j.error) || 'not available' }), (e) => ({ ok: false, error: String(e && e.message || e) }));
328
- reads.set(k, p);
329
- p.then((j) => { if (!j.ok) reads.delete(k); else setTimeout(() => reads.delete(k), 60000); });
330
- }
331
- return reads.get(k);
332
- }
333
-
334
- async function load(S, lens) {
335
- if (S.data[lens] !== undefined) return;
336
- S.data[lens] = null;
337
- const got = await readLens(lens, S.zoom, S.ctx && S.ctx.scope);
338
- /* the deck takes the order the Needs you rows take (priority-model.js): the pinned Critical card, the hard lane, then by score */
339
- S.data[lens] = got && got.ok && Array.isArray(got.cards) ? { ...got, cards: rankCards(got.cards) } : got;
340
- if (S.dead) return; // a deck built before its host is attached still draws: it only touches its own root
341
- if (lens === S.lens) draw(S); // a lens the clock has since left stays read for later, undrawn
342
- }
343
-
344
- /* the stance bar (the mockup's stanceBar): the icon and greeting for the part of the day, the lens and its line, and the read-aloud button.
345
- * The part follows the clock and nothing else: there is no switch (the PM's feedback, initiative c3-daypart-auto-only). The name is the
346
- * PM's first name when PMOS holds one (GET /api/brief-page `me`); without one the greeting stands alone. */
347
- function stance(S) {
348
- const P = PART_STYLE[S.lens] || PART_STYLE.Plan;
349
- const part = partByKey(S.clockPart);
350
- return el('div', { class: 'stance', 'data-bf': 'lens-bar', 'data-part': part.k },
351
- el('span', { class: 'ki' }, c3ic(part.icon)),
352
- el('div', null, el('b', { title: 'Follows the clock: this is the part of the day it is now.' }, part.greet + (S.me ? ', ' + S.me : '')), el('span', { class: 'dim' }, S.lens + ': ' + P.sub)),
353
- listenButton(() => { const x = S.data[S.lens]; return x && x.ok ? x.cards[S.i] || x.cards[0] : null; })); // the mockup's speaker (data-a=listen) reads the card on top
354
- }
355
-
356
- /* the mockup's running line (.tick > .tkt, lines 539 to 545): the engine's ticker strings, twice so the marquee loops */
357
- function ticker(items) {
358
- const one = (hide) => items.map((t) => el('span', { class: 'tki', 'aria-hidden': hide ? 'true' : null }, el('b', { style: 'color:var(--acc)' }, c3ic('bolt', 'sm')), String(t)));
359
- return el('div', { class: 'tick', role: 'status', 'data-bf': 'ticker', title: items.join(' | ') }, el('div', { class: 'tkt' }, ...one(false), ...one(true)));
360
- }
361
-
362
- function draw(S) {
363
- const d = S.data[S.lens];
364
- /* a page's headline deck (ctx.bare, the Calendar tab): no lens row, and nothing at all until cards of its own scope arrive. ctx.scope
365
- * is then required of the answer, so a server that does not know the scope never fills the page with another page's cards. */
366
- const bare = !!(S.ctx && S.ctx.bare);
367
- if (bare && (!d || !d.ok || d.scope !== S.ctx.scope || !(d.cards || []).length)) { S.root.replaceChildren(); S.root.hidden = true; S.flip = null; return; }
368
- if (bare) S.root.hidden = false;
369
- const kids = bare ? [] : [stance(S)];
370
- if (!bare && S.ctx && S.ctx.afterStance) kids.push(S.ctx.afterStance); // a node the page keeps under the greeting (console3: The brief)
371
- if (!d) kids.push(el('p', { class: 'dim mono', style: small, role: 'status' }, 'Reading the repository'));
372
- else if (!d.ok) kids.push(el('p', { class: 'dim mono', style: small, role: 'status', 'data-bf': 'error' }, 'The briefing could not be read: ' + d.error));
373
- else {
374
- if (d.ticker && d.ticker.length && !(S.ctx && S.ctx.noTicker)) kids.push(ticker(d.ticker));
375
- if (d.banner) {
376
- const b = cardView(d.banner); const T = tagStyle(b);
377
- kids.push(el('div', { class: 'incident', role: 'status', 'data-bf': 'banner' }, el('span', { class: 'tg f', style: '--tc:var(--destructive)' }, c3ic(T.icon, 'sm'), b.tag), el('span', null, b.headline)));
378
- }
379
- if (!d.cards.length) kids.push(el('div', { class: 'fold', 'data-bf': 'empty' }, c3ic('check', 'sm'), 'No signals for this lens. Nothing needs you.'));
380
- else {
381
- if (S.i >= d.cards.length) S.i = 0;
382
- const views = d.cards.map(cardView);
383
- const deck = el('div', { class: 'deck', tabindex: '-1', role: 'group', 'aria-roledescription': 'card deck', 'aria-label': S.lens + ' briefing, size ' + sizeFor(S.host.clientWidth || 500), 'data-bf': 'deck' }, ...views.map((v, i) => card(S, v, i, views.length)));
384
- const dots = el('div', { class: 'dk', role: 'group', 'aria-label': 'Cards' }, ...views.map((v, i) => el('button', { type: 'button', class: 'dkd', 'aria-label': 'Card ' + (i + 1) + ': ' + v.tag, 'aria-current': String(i === 0), onClick: () => scrollToCard(S, deck, i) })));
385
- wireDeck(S, deck, d.cards);
386
- kids.push(el('section', { class: 'cdeck' }, deck, views.length > 1 ? dots : null));
387
- }
388
- }
389
- S.root.replaceChildren(...kids);
390
- S.flip = null;
391
- }
392
-
393
- export function mountBriefing(host, ctx) {
394
- if (!host) return;
395
- let S = roots.get(host);
396
- if (S) { if (!S.root.isConnected) host.replaceChildren(S.root); return; }
397
- ensureC3Css();
398
- const root = el('section', { class: 'c3 brief', 'data-board': 'briefing', 'aria-label': 'Briefing' });
399
- host.replaceChildren(root);
400
- const clockPart = partFor(new Date()).k;
401
- const clock = partByKey(clockPart).lens;
402
- S = { host, root, ctx: ctx || {}, lens: clock, clock, clockPart, me: null, zoom: 'week', i: 0, flip: null, data: {}, dead: false };
403
- S.stopPhone = c3Phone(root);
404
- roots.set(host, S);
405
- draw(S);
406
- if (!host.closest('[data-daypart]')) applyDayPart(root); // a page without the console3 shell still gets the day part tokens
407
- /* The clock moves the lens, but never under the reader: a new part waits for 60 s without pointer or key activity and for every card to be turned back. */
408
- const gate = createIdleGate({ current: S.clockPart, part: (ms) => partFor(new Date(ms)).k, busy: () => !!S.flip || !!S.root.querySelector('.fc.back'),
409
- apply: (k) => { if (S.dead) return; const l = partByKey(k).lens; S.clockPart = k; S.clock = l; S.lens = l; S.i = 0; S.flip = null; load(S, l); draw(S); if (S.ctx.onLens) S.ctx.onLens(l); } });
410
- S.idle = watchIdle(gate);
411
- if (!(S.ctx && S.ctx.bare)) onBriefPage((j) => { const me = j && j.ok !== false && j.me ? String(j.me) : null; if (me === S.me || S.dead) return; S.me = me; const old = S.root.querySelector('.stance'); if (old) old.replaceWith(stance(S)); }); // the greeting's name
412
- if (S.ctx.onLens) S.ctx.onLens(S.lens); // the page may follow the lens from the start (Reflect: "Carries over", "What I could stop")
413
- load(S, S.lens); // only the clock's lens: the next one is read when the clock moves to it
414
- }
415
-
416
- /* Demo: a tab whose deck follows another control (the Work lens) changes the scope the deck asks for. Real mode never calls it. */
417
- export function setBriefingScope(host, scope) {
418
- const S = roots.get(host);
419
- if (!S || S.ctx.scope === scope) return;
420
- S.ctx.scope = scope; S.data = {}; S.i = 0; S.flip = null; draw(S);
421
- load(S, S.lens);
422
- }
423
-
424
- /* Open one card on its case file (the bell's "go to the card", console3.html nopen 2533). True when the card is on this deck. */
425
- export function showCard(host, key) {
426
- const S = roots.get(host); const deck = S && S.root.querySelector('.deck'); if (!deck) return false;
427
- const i = [...deck.children].findIndex((c) => c.dataset.bfCard === String(key)); if (i < 0) return false;
428
- deck.scrollTo({ left: deck.children[i].offsetLeft - deck.children[0].offsetLeft, behavior: 'auto' }); deckSync(S, deck);
429
- flipTo(S, deck.children[i], true); deck.children[i].focus({ preventScroll: true }); return true;
430
- }
431
- /* Esc anywhere on the Briefing turns the open card back (the mockup binds it on the document, line 2463). True when one was open. */
432
- export function flipBack(host) {
433
- const S = roots.get(host); const b = S && S.root.querySelector('.fc.back'); if (!b) return false;
434
- flipTo(S, b, false); return true;
435
- }
436
-
437
- export function disposeBriefing(host) {
438
- const S = roots.get(host);
439
- if (S) { S.dead = true; if (S.stopPhone) S.stopPhone(); if (S.idle) S.idle.dispose(); }
440
- roots.delete(host);
441
- }