create-pmos 0.610.0 → 0.612.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 (164) hide show
  1. package/package.json +135 -27
  2. package/payload/KIT-VERSION +2 -2
  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/payload/state/log.md +1 -1
  7. package/workspace/board-columns-test.js +2 -1
  8. package/workspace/board-deliveries-test.js +2 -1
  9. package/workspace/board-programs-test.js +7 -3
  10. package/workspace/board-publish-ui-test.js +2 -1
  11. package/workspace/board-shared-ui-test.js +2 -1
  12. package/workspace/board-workflows-test.js +2 -1
  13. package/workspace/briefing-premium-board-test.js +3 -2
  14. package/workspace/briefing-premium-calendar-2-test.js +3 -2
  15. package/workspace/briefing-premium-calendar-3-test.js +1 -1
  16. package/workspace/briefing-premium-calendar-test.js +1 -1
  17. package/workspace/briefing-premium-doc-edit-test.js +2 -1
  18. package/workspace/briefing-premium-insights-test.js +4 -3
  19. package/workspace/briefing-premium-test.js +3 -2
  20. package/workspace/calm-timeline-test.js +2 -1
  21. package/workspace/changelog.json +134 -0
  22. package/workspace/core-docs-workflow-test.js +2 -1
  23. package/workspace/ev-everywhere-test.js +3 -2
  24. package/workspace/guide/home.md +2 -2
  25. package/workspace/guide/index.md +4 -0
  26. package/workspace/guide/layout.md +97 -3
  27. package/workspace/guide/programs.md +16 -2
  28. package/workspace/guide/routine.md +65 -0
  29. package/workspace/guide/scheduled-tasks-and-cli.md +1 -1
  30. package/workspace/guide/settings-and-switches.md +2 -2
  31. package/workspace/impact-screens-test.js +3 -1
  32. package/workspace/ini-workflow-test.js +2 -1
  33. package/workspace/lib/board-premium.js +12 -4
  34. package/workspace/lib/classic-board.js +15 -0
  35. package/workspace/lib/cos-chat.js +1 -0
  36. package/workspace/lib/doc-library.js +43 -12
  37. package/workspace/lib/doc-path.js +30 -0
  38. package/workspace/lib/engine/boards.js +4 -2
  39. package/workspace/lib/events-place.js +368 -0
  40. package/workspace/lib/events-stated.js +129 -0
  41. package/workspace/lib/initiative-chat.js +1 -0
  42. package/workspace/lib/insights-premium.js +13 -1
  43. package/workspace/lib/library-find.js +162 -0
  44. package/workspace/lib/library-items.js +250 -0
  45. package/workspace/lib/notes.js +9 -1
  46. package/workspace/lib/plan-items.js +17 -3
  47. package/workspace/lib/route-modules.js +4 -0
  48. package/workspace/lib/routes-artefacts.js +5 -2
  49. package/workspace/lib/routes-boards.js +6 -2
  50. package/workspace/lib/routes-doc-sheet.js +1 -0
  51. package/workspace/lib/routes-events-place.js +203 -0
  52. package/workspace/lib/routes-library.js +155 -0
  53. package/workspace/lib/routes-pop-work.js +39 -0
  54. package/workspace/lib/routes-report-setups.js +32 -1
  55. package/workspace/lib/routes-today-log.js +48 -0
  56. package/workspace/lib/routine-reports.js +84 -0
  57. package/workspace/lib/status-when.js +36 -0
  58. package/workspace/lib/task-items.js +5 -3
  59. package/workspace/lib/today-log.js +131 -0
  60. package/workspace/live-pill-round-test.js +10 -7
  61. package/workspace/metric-drafts-ui-test.js +3 -1
  62. package/workspace/milestone-pins-test.js +2 -1
  63. package/workspace/milestone-suggest-test.js +3 -1
  64. package/workspace/package-lock.json +2 -2
  65. package/workspace/package.json +1 -1
  66. package/workspace/panels-test.js +2 -1
  67. package/workspace/premium-board-actions-test.js +3 -1
  68. package/workspace/premium-rec-tab-test.js +2 -1
  69. package/workspace/premium-vw-backlog-test.js +3 -1
  70. package/workspace/premium-vw-item-test.js +3 -1
  71. package/workspace/premium-vw-jira-test.js +3 -1
  72. package/workspace/premium-vw-meet-test.js +2 -1
  73. package/workspace/premium-vw-notes-test.js +3 -2
  74. package/workspace/product-lane-test.js +2 -1
  75. package/workspace/program-charter-test.js +3 -1
  76. package/workspace/program-leave-test.js +2 -1
  77. package/workspace/program-order-test.js +2 -1
  78. package/workspace/program-panel-test.js +3 -1
  79. package/workspace/public/pm/artefact-kind.js +87 -0
  80. package/workspace/public/pm/bd-ini-panel.js +77 -12
  81. package/workspace/public/pm/bd-prog-panel.js +55 -8
  82. package/workspace/public/pm/bd-span.js +5 -0
  83. package/workspace/public/pm/bd-work.css +192 -0
  84. package/workspace/public/pm/bd-work.js +483 -0
  85. package/workspace/public/pm/cozy-bar.css +11 -0
  86. package/workspace/public/pm/cozy-bar.js +99 -0
  87. package/workspace/public/pm/cozy-day-pick.css +27 -0
  88. package/workspace/public/pm/cozy-day-pick.js +97 -0
  89. package/workspace/public/pm/cozy-ev.css +2 -5
  90. package/workspace/public/pm/cozy-events-view.js +274 -0
  91. package/workspace/public/pm/cozy-events.css +179 -0
  92. package/workspace/public/pm/cozy-events.js +278 -0
  93. package/workspace/public/pm/cozy-evmodel.js +1 -1
  94. package/workspace/public/pm/cozy-goals.css +172 -0
  95. package/workspace/public/pm/cozy-library.css +125 -0
  96. package/workspace/public/pm/cozy-live-pill.js +1 -0
  97. package/workspace/public/pm/cozy-nav.js +6 -7
  98. package/workspace/public/pm/cozy-pick.css +3 -0
  99. package/workspace/public/pm/cozy-pop-work.css +224 -0
  100. package/workspace/public/pm/cozy-pop-work.js +668 -0
  101. package/workspace/public/pm/cozy-popup.css +11 -2
  102. package/workspace/public/pm/cozy-popup.js +67 -9
  103. package/workspace/public/pm/cozy-routine-job.js +203 -0
  104. package/workspace/public/pm/cozy-routine-model.js +219 -0
  105. package/workspace/public/pm/cozy-routine-pop.js +318 -0
  106. package/workspace/public/pm/cozy-routine.css +155 -0
  107. package/workspace/public/pm/cozy-routine.js +335 -0
  108. package/workspace/public/pm/cozy-schedwork.js +6 -5
  109. package/workspace/public/pm/cozy-settings.js +1 -5
  110. package/workspace/public/pm/cozy-status-when.js +48 -0
  111. package/workspace/public/pm/cozy-today-app.js +236 -0
  112. package/workspace/public/pm/cozy-today-model.js +176 -0
  113. package/workspace/public/pm/cozy-today-page.css +100 -0
  114. package/workspace/public/pm/cozy-today-view.js +76 -0
  115. package/workspace/public/pm/cozy-viewer.js +19 -8
  116. package/workspace/public/pm/cozy-vw-mtg.css +39 -0
  117. package/workspace/public/pm/goals-model.js +205 -0
  118. package/workspace/public/pm/goals-open.js +124 -0
  119. package/workspace/public/pm/home-app.js +18 -3
  120. package/workspace/public/pm/home-chat.js +4 -2
  121. package/workspace/public/pm/home-ini.js +43 -10
  122. package/workspace/public/pm/ini-edit.js +3 -1
  123. package/workspace/public/pm/ini-view-model.js +1 -1
  124. package/workspace/public/pm/library-model.js +197 -0
  125. package/workspace/public/pm/library-open.js +37 -0
  126. package/workspace/public/pm/page-chat.js +12 -2
  127. package/workspace/public/pm/pop-work-model.js +493 -0
  128. package/workspace/public/pm/premium-board.js +204 -17
  129. package/workspace/public/pm/premium-goals.js +213 -0
  130. package/workspace/public/pm/premium-library.js +436 -0
  131. package/workspace/public/pm/premium-shell.js +1 -1
  132. package/workspace/public/pm/premium-vw-mtg.js +79 -1
  133. package/workspace/public/pm/scope-chip.js +204 -0
  134. package/workspace/public/premium-board.html +1 -0
  135. package/workspace/public/premium-events.html +44 -0
  136. package/workspace/public/premium-goals.html +37 -0
  137. package/workspace/public/premium-library.html +39 -0
  138. package/workspace/public/premium-routine.html +33 -0
  139. package/workspace/public/today.html +50 -0
  140. package/workspace/ready-dash-ui-test.js +3 -1
  141. package/workspace/rename-test.js +2 -1
  142. package/workspace/run-tests.js +4 -1
  143. package/workspace/server.js +4 -2
  144. package/workspace/sort-order-test.js +2 -1
  145. package/workspace/split-merge-ui-test.js +3 -1
  146. package/workspace/stage-card-tasks-test.js +3 -1
  147. package/workspace/stage-card-test.js +2 -1
  148. package/workspace/task-delete-test.js +2 -1
  149. package/workspace/task-links-test.js +2 -1
  150. package/workspace/task-milestones-test.js +4 -2
  151. package/workspace/task-plans-test.js +3 -1
  152. package/workspace/task-press-test.js +3 -1
  153. package/workspace/task-views-test.js +3 -1
  154. package/workspace/test-lists/doc-path.json +9 -0
  155. package/workspace/test-lists/events-place.json +11 -0
  156. package/workspace/test-lists/goals-place.json +9 -0
  157. package/workspace/test-lists/library-place.json +9 -0
  158. package/workspace/test-lists/pop-work.json +9 -0
  159. package/workspace/test-lists/routine-place.json +9 -0
  160. package/workspace/test-lists/status-when.json +9 -0
  161. package/workspace/test-lists/today-log.json +9 -0
  162. package/workspace/test-lists/work-view.json +9 -0
  163. package/workspace/timeline-holds-test.js +3 -1
  164. package/workspace/tk-tasks-test.js +2 -1
@@ -0,0 +1,179 @@
1
+ /* cozy-events.css — Events (slice 6 of the six-place navigation, initiative events-place; board 2, StEvPlan). One container: the white page
2
+ * panel; the dates sit in one card per group with a thin border; the small month and Show sit in one grey box on the right. Tokens only. */
3
+ .evp-page .vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
4
+ .evp-hd { display: flex; align-items: center; gap: 12px; min-height: 44px; }
5
+ .evp-hd h1 { margin: 0; font-size: var(--fs-page); font-weight: var(--fw-page); line-height: var(--lh-page); }
6
+ .evp-dayf { margin: 0; display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-meta); color: var(--cz-ink2); background: var(--cz-bluebg); border-radius: 999px; padding: 2px 4px 2px 12px; }
7
+ .evp-dayf[hidden] { display: none; }
8
+ .evp-dayf b { font-weight: var(--fw-strong); color: var(--cz-blueink); }
9
+ .evp-scope { margin-right: auto; }
10
+ /* the list takes at most about 1100 px, so a suggestion sits near its row on a wide screen (round 2, point 6) */
11
+ .evp-grid { display: grid; grid-template-columns: minmax(0, 1100px) 316px; gap: 28px; align-items: start; }
12
+ .evp-left { min-width: 0; }
13
+
14
+ /* the icon buttons */
15
+ .evp-ib { all: unset; box-sizing: border-box; cursor: pointer; position: relative; width: 30px; height: 30px; border-radius: 50%; display: inline-grid; place-items: center; color: var(--cz-ink2); flex: none; }
16
+ .evp-ib:focus-visible, .evp-t:focus-visible, .evp-md:focus-visible, .evp-f button:focus-visible, .evp-all:focus-visible, .evp-go:focus-visible { outline: 2px solid var(--cz-blue); outline-offset: 2px; }
17
+ .evp-a .evp-ib { background: var(--cz-card); box-shadow: inset 0 0 0 1px var(--cz-hair); }
18
+ .evp-ib.evp-yes { color: var(--cz-ok); }
19
+ .evp-add { width: 36px; height: 36px; border-radius: 12px; color: var(--cz-blueink); }
20
+ @media (hover: hover) { .evp-ib:hover { background: var(--cz-well2); } .evp-t:hover b { text-decoration: underline; text-underline-offset: 3px; } .evp-md:hover { background: var(--cz-card); } }
21
+
22
+ /* the groups */
23
+ .evp-g { margin: 0 0 20px; }
24
+ .evp-g h2 { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: var(--fs-label); font-weight: var(--fw-label); letter-spacing: .06em; text-transform: uppercase; color: var(--cz-ink3); }
25
+ .evp-g h2 small { font-size: var(--fs-label); font-weight: var(--fw-label); }
26
+ .evp-late h2 { color: var(--cz-late); }
27
+ .evp-now h2 { color: var(--cz-blueink); }
28
+ .evp-all { all: unset; box-sizing: border-box; cursor: pointer; margin-left: auto; height: 28px; padding: 0 12px; border-radius: 999px; background: var(--cz-well); font-size: var(--fs-meta); font-weight: var(--fw-strong); letter-spacing: 0; text-transform: none; color: var(--cz-ink); }
29
+ .evp-b { border-radius: 16px; box-shadow: inset 0 0 0 1px var(--cz-hair); background: var(--cz-card); overflow: hidden; }
30
+ .evp-now .evp-b { background: var(--cz-bluebg); box-shadow: none; }
31
+
32
+ /* a row */
33
+ .evp-r { display: grid; grid-template-columns: 104px 10px minmax(0, 1fr) auto auto; align-items: center; column-gap: 14px; min-height: 60px; padding: 6px 12px 6px 16px; box-sizing: border-box; }
34
+ .evp-r + .evp-r { box-shadow: inset 0 1px 0 var(--cz-hair); }
35
+ .evp-r.busy { opacity: .55; pointer-events: none; }
36
+ .evp-d b { display: block; font-size: var(--fs-row); font-weight: var(--fw-row); }
37
+ .evp-d small { font-size: var(--fs-meta); color: var(--cz-ink3); }
38
+ .evp-d.late small { color: var(--cz-late); }
39
+ .evp-d.risk small { color: var(--cz-risk); }
40
+ .evp-t { all: unset; box-sizing: border-box; min-width: 0; cursor: default; display: block; }
41
+ button.evp-t { cursor: pointer; }
42
+ .evp-t b { display: block; font-size: var(--fs-row); font-weight: var(--fw-row); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
43
+ .evp-t small { display: block; margin-top: 1px; font-size: var(--fs-meta); color: var(--cz-ink3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
44
+ .evp-a { display: inline-flex; align-items: center; gap: 8px; font-size: var(--fs-meta); color: var(--cz-ink2); white-space: nowrap; }
45
+ .evp-sg { display: inline-flex; align-items: center; gap: 6px; }
46
+ .evp-sp { display: inline-grid; color: var(--cz-blueink); }
47
+ button.evp-go { border: 0; font: inherit; font-size: var(--fs-meta); font-weight: var(--fw-strong); cursor: pointer; }
48
+ .evp-go { display: inline-flex; align-items: center; gap: 4px; height: 32px; padding: 0 8px 0 14px; border-radius: 999px; background: var(--cz-card); font-size: var(--fs-meta); font-weight: var(--fw-strong); color: var(--cz-ink); text-decoration: none; }
49
+ /* the tools: a new day and Fixed, shown on a row you point at or step into; a fixed row keeps its lock */
50
+ .evp-tl { display: inline-flex; align-items: center; justify-content: flex-end; gap: 2px; min-width: 62px; opacity: 0; }
51
+ .evp-r:focus-within .evp-tl, .evp-r.fixed .evp-tl { opacity: 1; }
52
+ @media (hover: hover) { .evp-r:hover .evp-tl { opacity: 1; } }
53
+ @media (hover: none) { .evp-tl { opacity: 1; } }
54
+ .evp-r.fixed .evp-fx { color: var(--cz-blueink); }
55
+ .evp-dt input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; border: 0; padding: 0; }
56
+
57
+ /* the marks: a diamond for a delivery milestone, round for a task or a report, a ring for a meeting or focus time */
58
+ .evp-k { display: inline-block; width: 8px; height: 8px; flex: none; background: var(--cz-blueink); }
59
+ .evp-k.evp-dm { transform: rotate(45deg); border-radius: 2px; }
60
+ .evp-k.evp-rd { border-radius: 50%; background: var(--cz-blue); }
61
+ .evp-k.evp-mt { border-radius: 50%; background: transparent; box-shadow: inset 0 0 0 2px var(--cz-blue); }
62
+ .evp-k.late { background: var(--cz-dot-late); }
63
+ .evp-k.risk { background: var(--cz-dot-risk); }
64
+ .evp-k.evp-mt.late { background: transparent; box-shadow: inset 0 0 0 2px var(--cz-dot-late); }
65
+ /* round 2: one mark per type, the same in the rows, the small month and the key */
66
+ .evp-k.evp-fo { border-radius: 50%; background: transparent; box-shadow: inset 0 0 0 2px var(--cz-ok); }
67
+ .evp-k.evp-rp { border-radius: 2px; background: var(--cz-ink3); }
68
+ .evp-k.evp-dl { border-radius: 50%; background: var(--cz-c-b07cc6); }
69
+ .evp-k.evp-fo.late, .evp-k.evp-fo.risk { background: transparent; }
70
+ .evp-ty { font-style: normal; font-weight: var(--fw-strong); color: var(--cz-ink2); }
71
+ /* the line over the list when a filter hides dates */
72
+ .evp-hid { margin: 0 0 12px; font-size: var(--fs-meta); color: var(--cz-ink2); }
73
+ .evp-hid button { all: unset; cursor: pointer; font-weight: var(--fw-strong); color: var(--cz-blueink); }
74
+ .evp-hid button:focus-visible, .evp-un:focus-visible, .evp-day:focus-visible { outline: 2px solid var(--cz-blue); outline-offset: 2px; }
75
+ /* a coming day with many meetings: one line that opens them */
76
+ button.evp-day { all: unset; box-sizing: border-box; cursor: pointer; display: grid; grid-template-columns: 104px 10px minmax(0, 1fr) auto; align-items: center; column-gap: 14px; width: 100%; min-height: 60px; padding: 6px 16px; }
77
+ .evp-r + .evp-day, .evp-day + .evp-r { box-shadow: inset 0 1px 0 var(--cz-hair); }
78
+ .evp-fi { display: inline-grid; color: var(--cz-ink3); transition: transform .15s; }
79
+ .evp-day[aria-expanded="true"] .evp-fi { transform: rotate(90deg); }
80
+ /* a date stated in a source: the line that states it, under the row */
81
+ .evp-src { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 4px 16px 12px 158px; font-size: var(--fs-meta); color: var(--cz-ink2); }
82
+ .evp-src q { flex: 1 1 100%; color: var(--cz-ink); }
83
+ .evp-r.evp-kid { padding-left: 32px; }
84
+ .evp-r.evp-kid .evp-d b { font-size: var(--fs-meta); }
85
+ .evp-src .evp-go { background: var(--cz-well); }
86
+
87
+ .evp-more { display: flex; align-items: center; gap: 8px; margin: 0; padding: 4px 2px; font-size: var(--fs-meta); color: var(--cz-ink2); }
88
+ .evp-quiet { margin: 8px 0; font-size: var(--fs-body); color: var(--cz-ink3); }
89
+ .evp-note { margin: 0 0 12px; font-size: var(--fs-meta); color: var(--cz-risk); }
90
+
91
+ /* your own date, written in place */
92
+ .evp-new { display: grid; grid-template-columns: minmax(0, 1fr) 160px auto; gap: 8px; align-items: center; margin: 0 0 16px; padding: 8px 8px 8px 14px; border-radius: 16px; box-shadow: inset 0 0 0 1px var(--cz-hair); }
93
+ .evp-new[hidden] { display: none; }
94
+ .evp-new input { box-sizing: border-box; height: 36px; border: 0; background: var(--cz-well); border-radius: 10px; padding: 0 10px; font: inherit; font-size: var(--fs-body); color: var(--cz-ink); min-width: 0; }
95
+
96
+ /* the grey box: the small month, then Show */
97
+ .evp-side { border-radius: 20px; background: var(--cz-well); padding: 16px; }
98
+ .evp-mt-top { display: flex; align-items: center; gap: 4px; margin: 0 0 10px; }
99
+ .evp-mt-top b { margin-right: auto; font-size: var(--fs-section); font-weight: var(--fw-section); }
100
+ .evp-mg { display: grid; grid-template-columns: repeat(7, 1fr); row-gap: 4px; }
101
+ .evp-mh { font-size: var(--fs-meta); font-weight: var(--fw-strong); color: var(--cz-ink3); text-align: center; padding-bottom: 4px; }
102
+ .evp-md { all: unset; box-sizing: border-box; cursor: pointer; height: 40px; border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: var(--fs-meta); color: var(--cz-ink); }
103
+ .evp-md.out { color: var(--cz-ink3); }
104
+ .evp-md.now { background: var(--cz-card); box-shadow: inset 0 0 0 1.5px var(--cz-blue); color: var(--cz-blueink); font-weight: var(--fw-strong); }
105
+ .evp-md.on { background: var(--cz-blue); color: var(--cz-onsolid); }
106
+ .evp-md em { display: flex; gap: 3px; height: 6px; }
107
+ .evp-md em .evp-k { width: 6px; height: 6px; }
108
+ .evp-md.on em .evp-k { background: var(--cz-onsolid); box-shadow: none; }
109
+ .evp-sh { margin: 16px 0 6px; font-size: var(--fs-label); font-weight: var(--fw-label); letter-spacing: .06em; text-transform: uppercase; color: var(--cz-ink3); }
110
+ .evp-f { display: grid; gap: 4px; }
111
+ .evp-f button { all: unset; box-sizing: border-box; cursor: pointer; display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 10px; border-radius: 10px; background: var(--cz-card); font-size: var(--fs-meta); color: var(--cz-ink); }
112
+ .evp-f button[aria-pressed="false"] { background: transparent; color: var(--cz-ink3); }
113
+ .evp-on { margin-left: auto; display: inline-grid; color: var(--cz-blueink); }
114
+ .evp-f button small { font-size: var(--fs-meta); color: var(--cz-ink3); }
115
+ .evp-f button.evp-un { color: var(--cz-ink2); background: transparent; box-shadow: inset 0 0 0 1px var(--cz-hair); }
116
+ .evp-key { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 12px 0 0; font-size: var(--fs-meta); color: var(--cz-ink2); }
117
+ .evp-key span { display: inline-flex; align-items: center; gap: 6px; }
118
+ .evp-hint { margin: 12px 0 0; font-size: var(--fs-meta); color: var(--cz-ink3); }
119
+
120
+ /* the fold lines: the rest of Late, and the far delivery milestones */
121
+ .evp-fold { all: unset; box-sizing: border-box; cursor: pointer; display: flex; align-items: center; gap: 8px; width: 100%; margin: 6px 0 0; padding: 8px 4px; border-radius: 10px; font-size: var(--fs-meta); color: var(--cz-ink2); }
122
+ .evp-fold i { display: inline-grid; transition: transform .15s; }
123
+ .evp-fold[aria-expanded="true"] i { transform: rotate(90deg); }
124
+ .evp-fold:focus-visible, .evp-mn:focus-visible, .evp-cc:focus-visible, .evp-cd:focus-visible, .evp-cm:focus-visible { outline: 2px solid var(--cz-blue); outline-offset: 2px; }
125
+ .evp-far { margin: 4px 0 0; }
126
+ @media (hover: hover) { .evp-fold:hover { background: var(--cz-well); } .evp-mn:hover { text-decoration: underline; text-underline-offset: 3px; } .evp-cc:hover { background: var(--cz-well2); } }
127
+
128
+ /* the month name opens the full calendar */
129
+ .evp-mn { all: unset; box-sizing: border-box; cursor: pointer; margin-right: auto; font-size: var(--fs-section); font-weight: var(--fw-section); border-radius: 8px; }
130
+
131
+ /* the full calendar, in the left column */
132
+ .evp-ch { display: flex; align-items: center; gap: 4px; margin: 0 0 12px; }
133
+ .evp-ch h2 { margin: 0 auto 0 4px; font-size: var(--fs-section); font-weight: var(--fw-section); }
134
+ .evp-ch .cz-seg { margin-left: 8px; }
135
+ .evp-fm { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-radius: 16px; box-shadow: inset 0 0 0 1px var(--cz-hair); overflow: hidden; }
136
+ .evp-fm .evp-mh { padding: 8px 0 6px; }
137
+ .evp-mc { min-height: 104px; min-width: 0; padding: 4px; box-shadow: inset 1px 1px 0 var(--cz-hair); display: flex; flex-direction: column; gap: 2px; }
138
+ .evp-mc.out { background: var(--cz-well); }
139
+ .evp-mc.out .evp-cd { color: var(--cz-ink3); }
140
+ .evp-cd { all: unset; box-sizing: border-box; cursor: pointer; align-self: flex-start; min-width: 26px; height: 26px; padding: 0 6px; border-radius: 13px; display: inline-grid; place-items: center; font-size: var(--fs-meta); color: var(--cz-ink); }
141
+ .evp-cd.now { background: var(--cz-blue); color: var(--cz-onsolid); font-weight: var(--fw-strong); }
142
+ .evp-cc { all: unset; box-sizing: border-box; cursor: pointer; display: flex; align-items: center; gap: 6px; min-width: 0; padding: 2px 6px; border-radius: 8px; font-size: var(--fs-meta); color: var(--cz-ink); }
143
+ .evp-cc span { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
144
+ .evp-cc.late span { color: var(--cz-late); }
145
+ .evp-cm { all: unset; box-sizing: border-box; cursor: pointer; padding: 0 6px; font-size: var(--fs-meta); color: var(--cz-ink3); }
146
+ .evp-wk { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
147
+ .evp-wc { min-width: 0; min-height: 240px; padding: 6px; border-radius: 14px; box-shadow: inset 0 0 0 1px var(--cz-hair); display: flex; flex-direction: column; gap: 4px; }
148
+ .evp-wc.now { background: var(--cz-bluebg); box-shadow: none; }
149
+ .evp-wc .evp-cc { align-items: flex-start; }
150
+ .evp-wc .evp-cc .evp-k { margin-top: 5px; }
151
+ .evp-wc .evp-cc span { white-space: normal; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
152
+ .evp-wh { display: flex; align-items: center; gap: 6px; margin: 0 0 4px; font-size: var(--fs-label); font-weight: var(--fw-label); color: var(--cz-ink3); }
153
+
154
+ /* the toast with Undo */
155
+ .evp-toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 16px); opacity: 0; pointer-events: none; z-index: 80; display: flex; align-items: center; gap: 14px; padding: 10px 12px 10px 18px; border-radius: 14px; background: var(--cz-ink); color: var(--cz-card); font-size: var(--fs-meta); box-shadow: var(--cz-float); transition: opacity .18s, transform .18s; }
156
+ .evp-toast.on { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
157
+ .evp-undo { all: unset; cursor: pointer; font-weight: var(--fw-strong); color: var(--cz-card); text-decoration: underline; text-underline-offset: 3px; }
158
+
159
+ /* the phone: the month and Show go under the dates */
160
+ @media (max-width: 760px) {
161
+ .evp-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
162
+ .evp-r { grid-template-columns: 76px 10px minmax(0, 1fr); row-gap: 6px; padding: 8px 12px; }
163
+ .evp-a, .evp-tl { grid-column: 3; justify-self: start; }
164
+ button.evp-day { grid-template-columns: 76px 10px minmax(0, 1fr) auto; padding: 8px 12px; }
165
+ .evp-src { padding-left: 112px; }
166
+ .evp-tl { min-width: 0; justify-content: flex-start; }
167
+ .evp-a .evp-sg { flex: 1 1 100%; } /* the suggestion on its own line, then ✓ ✕ together */
168
+ .evp-a { flex-wrap: wrap; white-space: normal; }
169
+ .evp-new { grid-template-columns: minmax(0, 1fr) auto; }
170
+ .evp-new input[type="date"] { grid-column: 1; }
171
+ .evp-ch { flex-wrap: wrap; }
172
+ .evp-mc { min-height: 64px; }
173
+ .evp-mc .evp-cc span { display: none; }
174
+ .evp-wk { grid-template-columns: minmax(0, 1fr); }
175
+ .evp-wc { min-height: 0; }
176
+ }
177
+ @media (max-width: 760px) and (hover: hover) {
178
+ .evp-r:not(:hover):not(:focus-within):not(.fixed) .evp-tl { display: none; } /* a narrow window: no empty line for tools you are not pointing at */
179
+ }
@@ -0,0 +1,278 @@
1
+ /* pm/cozy-events.js — Events, the place for everything with a date (slice 6 of the six-place navigation, initiative events-place; board 2,
2
+ * StEvPlan, on Exploring 2; build plan /mnt/project-files/nav-structure/build-plan.md).
3
+ *
4
+ * One page with no views. Left: the dates grouped by what you do about them. Late: what PMOS suggests for each (✓ ✕), and Yes to all. Today: one
5
+ * press to the act itself. Coming up: a suggestion only where a date is at risk. The later delivery milestones are one quiet line. Right, in
6
+ * one grey box: a small month (press a day to see only that day; press it again for every day), then Show: the four kinds as the filter, which
7
+ * is the key to the marks too. PMOS remembers the types you turned off (localStorage 'pmos.events.hide.v2'; every type is on until pressed).
8
+ * Round 2: the chip beside the title filters by product (the saved product pick), program and project (pm/scope-chip.js); when a filter
9
+ * hides dates one line says so, with Show all. The + adds your own date (a PM item with a due day).
10
+ *
11
+ * Reads GET /api/events-place (lib/routes-events-place.js); 202 means a Board is still being read, and the page asks again. Writes only on a
12
+ * press, through the routes that exist: ✓ on a suggestion is POST /api/boards/tasks/state (Done, Won't do) or /api/boards/tasks/edit (a new
13
+ * due day) for a PMOS task, and /api/pm-items/* for your own item; each has Undo for a moment. ✕ and Fixed are POST /api/events-place/mark.
14
+ * A date PMOS cannot write (a Jira date, a plan end): ✓ on "Mark it done" or "Drop this date" is a mark too (Events stops listing it), and ✓ on
15
+ * "Ask the owner …" adds that ask as your own item, due today. Late shows its newest five, then one line that opens the rest; the far delivery
16
+ * milestones are one line that opens them. Pressing the month name opens the full calendar in the left column (Month | Week; the back arrow
17
+ * returns to the list; a day shows that day's rows). Pressing a row opens its work in the one popup (pm/cozy-popup.js) with Ask PMOS beside
18
+ * it. The markup is pm/cozy-events-view.js (pure). */
19
+ import { mountNav } from './cozy-nav.js';
20
+ import * as POP from './cozy-popup.js';
21
+ import { pmGet, pmPost } from './http.js';
22
+ import { TYPES, listHtml, calHtml, monthHtml, showHtml, hiddenHtml, countsOf, shiftMonth, esc } from './cozy-events-view.js';
23
+ import { readPick } from './cozy-pick.js';
24
+ import { scopeChipHtml, openScope, matches, narrowed, scopeWords, whenNames } from './scope-chip.js';
25
+
26
+ // round 2: PMOS keeps the types you turned OFF, so every type (and a new one) is on until you press it. The old key kept the kinds that
27
+ // were on, and one stale value hid meetings, tasks and reports for good with nothing on the page to say so: it is dropped.
28
+ const HIDE_KEY = 'pmos.events.hide.v2';
29
+ const SCOPE_KEY = 'pmos.events.scope.v1';
30
+ const UNDO_MS = 6000;
31
+ const store = {
32
+ get(k) { try { return localStorage.getItem(k); } catch { return null; } },
33
+ set(k, v) { try { if (v == null) localStorage.removeItem(k); else localStorage.setItem(k, v); } catch { /* a private window */ } },
34
+ };
35
+ const $ = (s) => document.querySelector(s);
36
+ store.set('pmos.events.show', null);
37
+ const S = { model: null, show: readShow(), P: null, sel: readSel(), day: null, ym: null, busy: new Set(), open: new Set(), cal: null, wk: null, tries: 0, timer: 0, toastT: 0 };
38
+
39
+ function readShow() {
40
+ const off = new Set(String(store.get(HIDE_KEY) || '').split(',').filter(Boolean));
41
+ return TYPES.filter((k) => !off.has(k));
42
+ }
43
+ function readSel() {
44
+ try { const v = JSON.parse(store.get(SCOPE_KEY) || '{}'); return { programs: Array.isArray(v.programs) ? v.programs : [], projects: Array.isArray(v.projects) ? v.projects : [] }; } catch { return { programs: [], projects: [] }; }
45
+ }
46
+ /** The chip's test for one item, or null when nothing is narrowed. */
47
+ const scopeOk = () => (narrowed(S.P, S.sel) ? (x) => matches(x.scope, S.P, S.sel) : null);
48
+ const filt = () => ({ show: S.show, scopeOk: scopeOk() || undefined });
49
+ async function loadPick() { S.P = await readPick(); draw(); }
50
+ whenNames().then(() => draw()); // the chip's products by their display names
51
+ addEventListener('pp:changed', (e) => { S.P = e.detail && e.detail.products ? e.detail : S.P; draw(); });
52
+
53
+ mountNav('events', document);
54
+
55
+ /* ── reading ── */
56
+ async function load() {
57
+ clearTimeout(S.timer);
58
+ const r = await pmGet('/api/events-place');
59
+ if (r && r.ok && r.state === 'reading') {
60
+ if (!S.model) $('#evpList').innerHTML = '<p class="evp-quiet" role="status">Reading the dates from every product.</p>';
61
+ S.timer = setTimeout(load, Math.min(4000, 400 * 2 ** S.tries++));
62
+ return;
63
+ }
64
+ S.tries = 0;
65
+ if (!r || !r.ok) {
66
+ if (!S.model) $('#evpList').innerHTML = `<p class="evp-quiet" role="alert"><b>The dates could not be read</b>, so this page shows nothing rather than guess.${r && r.error ? ' The reason: ' + esc(r.error) : ''}</p>`;
67
+ S.timer = setTimeout(load, 15000);
68
+ return;
69
+ }
70
+ S.model = r;
71
+ if (!S.ym) S.ym = String(r.today).slice(0, 7);
72
+ draw();
73
+ }
74
+
75
+ /* ── drawing ── */
76
+ function draw() {
77
+ const M = S.model; if (!M) return;
78
+ const F = filt();
79
+ const groups = { programs: (M.filters && M.filters.programs) || [], projects: (M.filters && M.filters.projects) || [] };
80
+ // the chip names only what the model can still offer: a program or project with no date left is not kept as a hidden pick
81
+ const known = new Set([...groups.programs, ...groups.projects].map((f) => f.id));
82
+ S.sel = { programs: S.sel.programs.filter((t) => known.has(t)), projects: S.sel.projects.filter((t) => known.has(t)) };
83
+ $('#evpScope').innerHTML = scopeChipHtml(S.P, S.sel, { id: 'evpScopeChip', groups });
84
+ $('#evpHid').innerHTML = S.cal ? '' : hiddenHtml(M.items, { ...F, scopeWords: F.scopeOk ? scopeWords(S.P, S.sel, groups) : '' });
85
+ $('#evpList').innerHTML = S.cal ? calHtml(M, { view: S.cal, ym: S.ym, day: S.wk, ...F }) : listHtml(M, { ...F, day: S.day, busy: S.busy, open: S.open });
86
+ $('#evpList').classList.toggle('evp-cal', !!S.cal);
87
+ $('#evpMonth').innerHTML = monthHtml(S.ym, M.items, { today: M.today, day: S.day, ...F });
88
+ $('#evpShow').innerHTML = showHtml(S.show, { counts: countsOf(M.items, { scopeOk: F.scopeOk }), unread: M.unread || {} });
89
+ const miss = (M.missing || []).length ? 'Not read: ' + M.missing.join(', ') + '.' : '';
90
+ const note = $('#evpNote'); note.textContent = miss; note.hidden = !miss;
91
+ const day = $('#evpDay');
92
+ if (S.day) { day.hidden = false; day.querySelector('b').textContent = new Date(S.day + 'T00:00:00').toLocaleDateString(undefined, { weekday: 'short', day: 'numeric', month: 'short' }); } else day.hidden = true;
93
+ }
94
+ const addDays = (d, n) => new Date(Date.parse(d + 'T00:00:00Z') + n * 86400000).toISOString().slice(0, 10);
95
+ const itemOf = (el) => { const r = el && el.closest('[data-key]'); return r && S.model ? S.model.items.find((x) => x.key === r.dataset.key) : null; };
96
+
97
+ /* ── the toast with Undo ── */
98
+ function say(text, undo) {
99
+ const t = $('#toast');
100
+ clearTimeout(S.toastT);
101
+ t.innerHTML = `<span>${esc(text)}</span>${undo ? '<button type="button" class="evp-undo">Undo</button>' : ''}`;
102
+ t.classList.add('on');
103
+ const b = t.querySelector('.evp-undo');
104
+ if (b) b.onclick = async () => { t.classList.remove('on'); await undo(); load(); };
105
+ S.toastT = setTimeout(() => t.classList.remove('on'), UNDO_MS);
106
+ }
107
+
108
+ /* ── the writes, each through a route that exists ── */
109
+ const taskBody = (x) => ({ ws: x.task.ws, board: x.task.board, task: x.task.uid });
110
+ async function setState(x, state) { return pmPost('/api/boards/tasks/state', { ...taskBody(x), state }); }
111
+ async function setDue(x, due) {
112
+ if (x.own) return pmPost('/api/pm-items/edit', { id: x.own, fields: { due } });
113
+ return pmPost('/api/boards/tasks/edit', { ...taskBody(x), due });
114
+ }
115
+ /** Apply one suggestion. → { ok, undo, error } */
116
+ async function apply(x, s) {
117
+ const was = x.task && x.task.status ? x.task.status : 'To do';
118
+ if (s.op === 'done') {
119
+ if (x.own) { const r = await pmPost('/api/pm-items/done', { id: x.own }); return { ok: r && r.ok !== false, error: r && r.error, undo: () => pmPost('/api/pm-items/reopen', { id: x.own }) }; }
120
+ const r = await setState(x, 'Done'); return { ok: r && r.ok !== false, error: r && r.error, undo: () => setState(x, was) };
121
+ }
122
+ if (s.op === 'drop') {
123
+ if (x.own) { const r = await pmPost('/api/pm-items/remove', { id: x.own }); return { ok: r && r.ok !== false, error: r && r.error, undo: () => pmPost('/api/pm-items/undo', { id: x.own }) }; }
124
+ const r = await setState(x, "Won't do"); return { ok: r && r.ok !== false, error: r && r.error, undo: () => setState(x, was) };
125
+ }
126
+ if (s.op === 'met' || s.op === 'gone') {
127
+ const r = await pmPost('/api/events-place/mark', { key: x.key, gone: s.op === 'met' ? 'met' : 'dropped' });
128
+ return { ok: r && r.ok !== false, error: r && r.error, undo: () => pmPost('/api/events-place/mark', { key: x.key, gone: false }) };
129
+ }
130
+ if (s.op === 'ask' && s.ask) {
131
+ const r = await pmPost('/api/pm-items/add', { line: s.ask });
132
+ const id = r && r.item && r.item.id;
133
+ if (!id) return { ok: false, error: (r && r.error) || 'The ask could not be added.' };
134
+ await pmPost('/api/pm-items/edit', { id, fields: { due: S.model.today } });
135
+ return { ok: true, undo: () => pmPost('/api/pm-items/remove', { id }) };
136
+ }
137
+ if (s.op === 'move' && s.to) {
138
+ const r = await setDue(x, s.to); return { ok: r && r.ok !== false, error: r && r.error, undo: () => setDue(x, x.date) };
139
+ }
140
+ return { ok: false, error: 'PMOS cannot make this change here. Open the work to change it.' };
141
+ }
142
+ async function yes(x) {
143
+ if (!x || !x.suggest) return;
144
+ S.busy.add(x.key); draw();
145
+ const out = await apply(x, x.suggest);
146
+ S.busy.delete(x.key);
147
+ if (!out.ok) { say(out.error || 'Nothing was changed.'); draw(); return; }
148
+ say(x.suggest.text + ': ' + x.title + '.', out.undo);
149
+ load();
150
+ }
151
+ async function yesAll() {
152
+ const ok = scopeOk();
153
+ const list = S.model.items.filter((x) => x.group === 'late' && x.suggest && S.show.includes(x.type || x.kind) && (!ok || ok(x)) && (!S.day || x.date === S.day));
154
+ if (!list.length) return;
155
+ list.forEach((x) => S.busy.add(x.key)); draw();
156
+ const undos = [];
157
+ let failed = 0;
158
+ for (const x of list) { const o = await apply(x, x.suggest); if (o.ok) undos.push(o.undo); else failed++; S.busy.delete(x.key); }
159
+ say(undos.length + ' ' + (undos.length === 1 ? 'change' : 'changes') + ' made' + (failed ? ', ' + failed + ' could not be made' : '') + '.', undos.length ? async () => { for (const u of undos.reverse()) await u(); } : null);
160
+ load();
161
+ }
162
+ async function no(x) {
163
+ if (!x || !x.suggest) return;
164
+ const sig = x.suggest.sig;
165
+ const r = await pmPost('/api/events-place/mark', { sig, no: true });
166
+ if (!r || r.ok === false) { say((r && r.error) || 'Nothing was changed.'); return; }
167
+ say('PMOS will not suggest this again.', () => pmPost('/api/events-place/mark', { sig, no: false }));
168
+ load();
169
+ }
170
+ async function fix(x) {
171
+ const r = await pmPost('/api/events-place/mark', { key: x.key, fixed: !x.fixed });
172
+ if (!r || r.ok === false) { say((r && r.error) || 'Nothing was changed.'); return; }
173
+ say(x.fixed ? 'PMOS may suggest a new date for it again.' : 'Fixed. PMOS will never suggest a new date for it.', () => pmPost('/api/events-place/mark', { key: x.key, fixed: !!x.fixed }));
174
+ load();
175
+ }
176
+ async function done(x) {
177
+ const out = await apply(x, { op: 'done' });
178
+ if (!out.ok) { say(out.error || 'Nothing was changed.'); return; }
179
+ say('Done: ' + x.title + '.', out.undo);
180
+ load();
181
+ }
182
+ async function redate(x, due) {
183
+ if (!due || due === x.date) return;
184
+ const r = await setDue(x, due);
185
+ if (!r || r.ok === false) { say((r && r.error) || 'Nothing was changed.'); return; }
186
+ say('New date: ' + x.title + '.', () => setDue(x, x.date));
187
+ load();
188
+ }
189
+ function open(x) {
190
+ if (!x) return;
191
+ if (x.own && !x.work) return;
192
+ const w = x.work;
193
+ if (!w) { if (x.link) window.open(x.link, '_blank', 'noopener'); return; }
194
+ const about = { id: w.id, kind: 'initiative', title: w.title || undefined, ws: w.ws || undefined };
195
+ POP.openWork({ about, open: () => import('./premium-vw-item.js').then((M) => (x.task && x.kind === 'task'
196
+ ? M.openWorkItem({ kind: 'task', ini: w.id, key: 'task:' + x.task.uid, ws: w.ws, board: w.board })
197
+ : M.openWorkItem({ kind: 'initiative', id: w.id, ws: w.ws, board: w.board, title: w.title || undefined }))) });
198
+ }
199
+
200
+ /* ── the + : your own date, written in place ── */
201
+ function addOpen() {
202
+ const f = $('#evpAdd');
203
+ f.hidden = false;
204
+ if (!f.elements.when.value && S.model) f.elements.when.value = S.day || S.model.today;
205
+ f.elements.what.focus();
206
+ }
207
+ async function addSave(e) {
208
+ e.preventDefault();
209
+ const f = $('#evpAdd'), what = f.elements.what.value.trim(), when = f.elements.when.value;
210
+ if (!what || !when) { (what ? f.elements.when : f.elements.what).focus(); return; }
211
+ const r = await pmPost('/api/pm-items/add', { line: what });
212
+ const id = r && r.item && r.item.id;
213
+ if (!id) { say((r && r.error) || 'It could not be added.'); return; }
214
+ await pmPost('/api/pm-items/edit', { id, fields: { due: when } });
215
+ f.reset(); f.hidden = true;
216
+ say('Added: ' + what + '.', () => pmPost('/api/pm-items/remove', { id }));
217
+ load();
218
+ }
219
+
220
+ /* ── presses ── */
221
+ document.addEventListener('click', (e) => {
222
+ const t = e.target;
223
+ if (!t || !t.closest) return;
224
+ const b = t.closest('[data-evp-yes],[data-evp-no],[data-evp-all],[data-evp-fix],[data-evp-done],[data-evp-open],[data-evp-src],[data-evp-day],[data-evp-month],[data-evp-week],[data-evp-show],[data-evp-showall],[data-evp-connect],[data-evp-add],[data-evp-clear],[data-evp-fold],[data-evp-full],[data-evp-view],[data-evp-list],#evpScopeChip,.evp-dt');
225
+ if (!b) return;
226
+ const x = itemOf(b);
227
+ if (b.id === 'evpScopeChip') {
228
+ const M = S.model || {}, groups = { programs: (M.filters && M.filters.programs) || [], projects: (M.filters && M.filters.projects) || [] };
229
+ openScope(b, { P: S.P, groups, sel: S.sel, onApply: (next) => {
230
+ S.sel = { programs: next.programs, projects: next.projects };
231
+ store.set(SCOPE_KEY, S.sel.programs.length || S.sel.projects.length ? JSON.stringify(S.sel) : null);
232
+ if (S.P && S.P.products) S.P = { ...S.P, products: S.P.products.map((p) => ({ ...p, on: next.products.includes(p.ws) })) };
233
+ draw();
234
+ } });
235
+ return;
236
+ }
237
+ if (b.matches('[data-evp-src]')) { const k = 'src:' + (x && x.key); if (S.open.has(k)) S.open.delete(k); else S.open.add(k); draw(); return; }
238
+ if (b.matches('[data-evp-connect]')) { import('./cozy-settings.js').then((M) => M.openSettings('connectors')); return; }
239
+ if (b.matches('[data-evp-showall]')) {
240
+ // Show all: every type on, no program or project, and every product in the saved pick
241
+ S.show = [...TYPES]; store.set(HIDE_KEY, null);
242
+ S.sel = { programs: [], projects: [] }; store.set(SCOPE_KEY, null);
243
+ if (S.P && S.P.products && S.P.products.some((p) => !p.on)) import('./cozy-pick.js').then((M) => M.savePick(S.P.products.map((p) => p.ws)));
244
+ draw();
245
+ return;
246
+ }
247
+ if (b.matches('[data-evp-yes]')) yes(x);
248
+ else if (b.matches('[data-evp-no]')) no(x);
249
+ else if (b.matches('[data-evp-all]')) yesAll();
250
+ else if (b.matches('[data-evp-fix]')) fix(x);
251
+ else if (b.matches('[data-evp-done]')) done(x);
252
+ else if (b.matches('[data-evp-open]')) open(x);
253
+ else if (b.matches('[data-evp-day]')) { const d = b.dataset.evpDay; S.day = S.cal ? d : S.day === d ? null : d; S.cal = null; draw(); }
254
+ else if (b.matches('[data-evp-fold]')) { const k = b.dataset.evpFold; if (S.open.has(k)) S.open.delete(k); else S.open.add(k); draw(); }
255
+ else if (b.matches('[data-evp-full]')) { S.cal = S.cal || 'month'; draw(); const h = $('#evpList h2'); if (h) { h.tabIndex = -1; h.focus(); } }
256
+ else if (b.matches('[data-evp-view]')) { S.cal = b.dataset.evpView === 'week' ? 'week' : 'month'; draw(); }
257
+ else if (b.matches('[data-evp-list]')) { S.cal = null; draw(); }
258
+ else if (b.matches('[data-evp-week]')) { S.wk = addDays(S.wk || S.day || S.model.today, 7 * Number(b.dataset.evpWeek)); draw(); }
259
+ else if (b.matches('[data-evp-month]')) { S.ym = shiftMonth(S.ym, Number(b.dataset.evpMonth)); draw(); }
260
+ else if (b.matches('[data-evp-clear]')) { S.day = null; draw(); }
261
+ else if (b.matches('[data-evp-add]')) addOpen();
262
+ else if (b.matches('[data-evp-show]')) {
263
+ const k = b.dataset.evpShow, on = new Set(S.show);
264
+ if (on.has(k)) on.delete(k); else on.add(k);
265
+ S.show = TYPES.filter((x) => on.has(x));
266
+ const off = TYPES.filter((x) => !on.has(x));
267
+ store.set(HIDE_KEY, off.length ? off.join(',') : null);
268
+ draw();
269
+ } else if (b.matches('.evp-dt')) { const i = b.querySelector('input'); if (i && typeof i.showPicker === 'function') { e.preventDefault(); try { i.showPicker(); } catch { i.focus(); } } }
270
+ });
271
+ document.addEventListener('change', (e) => { const i = e.target; if (i && i.matches && i.matches('[data-evp-date]')) redate(itemOf(i), i.value); });
272
+ $('#evpAdd').addEventListener('submit', addSave);
273
+ $('#evpAdd').addEventListener('keydown', (e) => { if (e.key === 'Escape') { e.currentTarget.reset(); e.currentTarget.hidden = true; } });
274
+ document.addEventListener('keydown', (e) => { if (e.key === 'Escape' && S.cal && !e.defaultPrevented && !document.querySelector('.cz-pop:not([hidden])')) { S.cal = null; draw(); } });
275
+ document.addEventListener('visibilitychange', () => { if (document.visibilityState === 'visible' && S.model) load(); });
276
+
277
+ load();
278
+ loadPick();
@@ -18,7 +18,7 @@
18
18
  * wtChip(worktrees) → 'main + 3 worktrees'
19
19
  * initials(name) → 'Mei' · 'DL' (EvInbox's avatars: a short first name, else two initials) */
20
20
 
21
- const PLACE = { home: 'Today', board: 'Work', insights: 'Goals', settings: 'Settings' }; // the places' names since slice 1 of the six places
21
+ const PLACE = { home: 'Today', board: 'Work', insights: 'Goals', library: 'Library', settings: 'Settings' }; // the places' names since slice 1 of the six places
22
22
  const SRC_NAME = { repository: 'Repository', initiatives: 'Initiatives', calendar: 'Calendar', jira: 'Jira', 'my-work': 'Your tasks', tracker: 'Tracker items', tools: 'Mail, Slack and meeting notes' };
23
23
  const SRC_SUB = { repository: 'This product\'s repository', initiatives: 'Read from the repository', calendar: 'Your calendar', jira: 'The Jira projects of your initiatives', 'my-work': 'The work assigned to you', tracker: 'The tracker items of your initiatives', tools: 'Mail, Slack, Confluence and Wispr Flow' };
24
24
  const PARTS = { jira: 'Board and the Jira-linked initiatives', calendar: 'Today and your meetings', 'my-work': 'Your tasks', tracker: 'The tracker items on Board', tools: 'New for you and the digests', initiatives: 'Home and Board', repository: 'Home and Board' };