create-pmos 0.657.0 → 0.659.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +6 -6
- package/payload/KIT-VERSION +1 -1
- package/payload/planning/evals/eval-calibration.md +1 -1
- package/payload/planning/okrs/health-budgets.md +1 -1
- package/payload/state/discoveries.md +1 -1
- package/workspace/changelog.json +5 -5
- package/workspace/guide/layout.md +9 -9
- package/workspace/package-lock.json +2 -2
- package/workspace/package.json +1 -1
- package/workspace/public/pm/cozy-events-view.js +130 -69
- package/workspace/public/pm/cozy-events.css +90 -83
- package/workspace/public/pm/cozy-events.js +44 -15
- package/workspace/public/pm/cozy-library.css +48 -69
- package/workspace/public/pm/premium-library.js +95 -63
- package/workspace/public/premium-events.html +20 -8
- package/workspace/public/premium-library.html +15 -11
|
@@ -1,52 +1,75 @@
|
|
|
1
|
-
/* cozy-events.css — Events (
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
* pm-
|
|
5
|
-
*
|
|
1
|
+
/* cozy-events.css — Events (initiative events-place), rebuilt from the PMOS design system's blocks (events-ds-page, board EventsDS on
|
|
2
|
+
* Exploring 3). The parts come from pm/komorebi.css: Late and Coming up are List blocks (pm-block list, rows pm-li, the late Badge
|
|
3
|
+
* pm-badge alert, the fold pm-fold), the suggestions are the Suggestion part (pm-sug, a primary Yes and an outline No), Today is a Timeline
|
|
4
|
+
* block (pm-block with pm-ev Events), the side is a Calendar block (pm-block with pm-cal) and Show a flat block (pm-leg), More is a Menu
|
|
5
|
+
* (pm-menu), icon buttons are pm-btn, Month | Week is Tabs and the toast is pm-toast. This sheet only places them and draws what no part
|
|
6
|
+
* has: the type marks, the now line's length and the full calendar's cells. System tokens only. */
|
|
6
7
|
.evp .vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
|
|
8
|
+
|
|
9
|
+
/* the top line: the path, the product chip, the day picked, then Search, + and More */
|
|
7
10
|
.evp-hd { display: flex; align-items: center; gap: 12px; min-height: 44px; }
|
|
8
|
-
.evp-
|
|
11
|
+
.evp-h1 { margin: 0; font: inherit; }
|
|
12
|
+
.evp-sp { flex: 1; }
|
|
9
13
|
.evp-dayf { margin: 0; gap: 4px; padding: 0 2px 0 10px; height: 32px; background: var(--blue-tint); color: var(--ink); }
|
|
10
14
|
.evp-dayf[hidden] { display: none; }
|
|
11
15
|
.evp-dayf b { font-weight: var(--fw-strong); color: var(--blue); }
|
|
12
|
-
.evp-
|
|
13
|
-
|
|
14
|
-
.evp-
|
|
16
|
+
.evp-mw { position: relative; }
|
|
17
|
+
.evp-menu { position: absolute; right: 0; top: calc(100% + 4px); z-index: 60; }
|
|
18
|
+
.evp-menu[hidden] { display: none; }
|
|
19
|
+
.evp-menu button:focus-visible { outline: none; box-shadow: var(--glow); }
|
|
20
|
+
|
|
21
|
+
/* Main + side */
|
|
22
|
+
.evp-grid { display: grid; grid-template-columns: minmax(0, 1100px) 340px; gap: var(--space-16); align-items: start; }
|
|
15
23
|
.evp-left { min-width: 0; display: flex; flex-direction: column; gap: var(--space-16); }
|
|
24
|
+
.evp-side { display: flex; flex-direction: column; gap: var(--space-16); min-width: 0; }
|
|
16
25
|
#evpList { display: flex; flex-direction: column; gap: var(--space-16); }
|
|
17
26
|
#evpList:empty, #evpHid:empty { display: none; }
|
|
18
|
-
.evp .evp-ib.evp-dt { position: relative; }
|
|
19
|
-
.evp .evp-dt input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; border: 0; padding: 0; }
|
|
20
|
-
.evp-t:focus-visible, .evp-md:focus-visible, .evp-f button:focus-visible, .evp-mn:focus-visible, .evp-cc:focus-visible, .evp-cd:focus-visible, .evp-cm:focus-visible { outline: none; box-shadow: var(--glow); }
|
|
21
|
-
@media (hover: hover) { .evp-t:hover b { text-decoration: underline; text-underline-offset: 3px; } .evp-mn:hover { text-decoration: underline; text-underline-offset: 3px; } }
|
|
22
|
-
|
|
23
|
-
/* a group: a List block; its heading carries the count, Yes to all sits at the right of the head */
|
|
24
|
-
.evp .evp-g h2 small { margin-left: 8px; font-size: var(--fs-meta); font-weight: var(--fw-regular); color: var(--muted); }
|
|
25
|
-
.evp .evp-late h2 small { color: var(--alert); }
|
|
26
|
-
.evp .evp-all { height: 32px; padding: 0 12px; border: 0; font: inherit; font-size: var(--fs-meta); font-weight: var(--fw-strong); color: var(--blue); background: var(--blue-tint); cursor: pointer; }
|
|
27
|
-
.evp .evp-far { margin-top: var(--space-8); }
|
|
28
27
|
|
|
29
|
-
/* a row: a ListRow
|
|
30
|
-
.evp .evp-r
|
|
31
|
-
.evp
|
|
32
|
-
.evp-d b {
|
|
33
|
-
.evp-d small { font-
|
|
34
|
-
.evp-
|
|
35
|
-
.evp-t { all: unset; box-sizing: border-box; min-width: 0; cursor: default; display: block; }
|
|
28
|
+
/* a row: a ListRow, day · mark · what · Badge · acts. The tools (a new day, Fixed) show on a row you point at or step into. */
|
|
29
|
+
.evp .evp-r.busy, .evp .evp-tr.busy { opacity: .55; pointer-events: none; }
|
|
30
|
+
.evp-d { flex: none; width: 64px; display: flex; flex-direction: column; font-family: var(--font-mono); font-size: var(--fs-meta); line-height: 20px; color: var(--muted); }
|
|
31
|
+
.evp-d b { font-weight: var(--fw-regular); white-space: nowrap; }
|
|
32
|
+
.evp-d small { font-family: var(--font-sans); font-size: var(--fs-meta); }
|
|
33
|
+
.evp-t { all: unset; box-sizing: border-box; cursor: default; }
|
|
36
34
|
button.evp-t { cursor: pointer; }
|
|
37
|
-
.evp-t
|
|
38
|
-
|
|
39
|
-
.evp-
|
|
40
|
-
.evp-
|
|
41
|
-
.evp-
|
|
35
|
+
.evp-t:focus-visible { outline: none; box-shadow: var(--glow); border-radius: var(--radius-sm); }
|
|
36
|
+
@media (hover: hover) { button.evp-t:hover .t { text-decoration: underline; text-underline-offset: 3px; } }
|
|
37
|
+
.evp-ty { font-style: normal; font-weight: var(--fw-regular); }
|
|
38
|
+
.evp-fixl { display: flex; align-items: center; gap: 6px; color: var(--ink); }
|
|
39
|
+
.evp-fixl > span { overflow: hidden; text-overflow: ellipsis; }
|
|
40
|
+
.evp-a { display: inline-flex; align-items: center; gap: 2px; white-space: nowrap; }
|
|
42
41
|
.evp .evp-go { height: 32px; gap: 4px; padding: 0 6px 0 12px; border: 0; font: inherit; font-size: var(--fs-meta); font-weight: var(--fw-strong); color: var(--blue); text-decoration: none; cursor: pointer; }
|
|
43
|
-
.evp .evp-go:focus-visible, .evp
|
|
44
|
-
|
|
45
|
-
.evp-
|
|
46
|
-
.evp
|
|
47
|
-
@media (hover: hover) { .evp-r:hover .evp-tl { opacity: 1; } }
|
|
48
|
-
@media (hover: none) { .evp-tl { opacity: 1; } }
|
|
42
|
+
.evp .evp-go:focus-visible, .evp-hid button:focus-visible { outline: none; box-shadow: var(--glow); }
|
|
43
|
+
.evp .evp-ib.evp-dt { position: relative; }
|
|
44
|
+
.evp .evp-dt input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; border: 0; padding: 0; }
|
|
45
|
+
.evp .evp-r.fixed .evp-tl { display: flex; }
|
|
49
46
|
.evp .evp-r.fixed .evp-fx { color: var(--blue); }
|
|
47
|
+
@media (hover: none) { .evp .evp-r .evp-tl { display: flex; } }
|
|
48
|
+
|
|
49
|
+
/* the Suggestion parts: the one over Late sits inside the block's padding; one under a date lines up with the title */
|
|
50
|
+
.evp-all { margin: 0 16px 6px; }
|
|
51
|
+
.evp-sug { margin: 2px 16px 8px 104px; }
|
|
52
|
+
.evp-sug .pm-star, .evp-all .pm-star { flex: none; }
|
|
53
|
+
|
|
54
|
+
/* Today: a Timeline block. Each line is the time, then an Event; the now line runs across the Events' column */
|
|
55
|
+
.evp-tl-list { display: flex; flex-direction: column; gap: 10px; }
|
|
56
|
+
.evp-tr { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 10px; align-items: center; }
|
|
57
|
+
.evp-tm { font-family: var(--font-mono); white-space: nowrap; }
|
|
58
|
+
.evp .evp-ev { flex-direction: row; align-items: center; gap: 10px; }
|
|
59
|
+
.evp-ev .txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
|
|
60
|
+
.evp-ev .t { font-weight: var(--fw-strong); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
61
|
+
.evp-ev .w { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
62
|
+
.evp-ev .evp-tl { display: none; gap: 2px; }
|
|
63
|
+
.evp-ev:hover .evp-tl, .evp-ev:focus-within .evp-tl, .evp-ev.fixed .evp-tl { display: flex; }
|
|
64
|
+
.evp-nowl .evp-tm { color: var(--alert); }
|
|
65
|
+
.evp-nl { height: 2px; background: var(--alert); border-radius: 2px; }
|
|
66
|
+
|
|
67
|
+
/* the fold lines: the rest of Late, and the later delivery milestones at the foot of Coming up */
|
|
68
|
+
.evp .evp-fold i { display: inline-grid; transition: transform var(--duration-quick) var(--ease-drift); }
|
|
69
|
+
.evp .evp-fold[aria-expanded="true"] i { transform: rotate(90deg); }
|
|
70
|
+
.evp .evp-fold:focus-visible { outline: none; box-shadow: var(--glow); }
|
|
71
|
+
.evp-fsub { font-weight: var(--fw-regular); }
|
|
72
|
+
.evp .evp-far { padding: 0 8px 8px; }
|
|
50
73
|
|
|
51
74
|
/* the marks, one per type, the same in the rows, the small month and the key (chart roles from charts.css):
|
|
52
75
|
* a diamond for a delivery milestone, round for a task, a ring for a meeting, a leaf ring for focus time, a square for a report */
|
|
@@ -62,69 +85,59 @@ button.evp-t { cursor: pointer; }
|
|
|
62
85
|
.evp-k.evp-mt.late, .evp-k.evp-fo.late { background: transparent; box-shadow: inset 0 0 0 2px var(--chart-risk); }
|
|
63
86
|
.evp-ty { font-style: normal; font-weight: var(--fw-strong); color: var(--ink); }
|
|
64
87
|
/* the line over the list when a filter hides dates */
|
|
65
|
-
.evp-hid { margin: 0;
|
|
66
|
-
.evp-hid button {
|
|
88
|
+
.evp-hid { margin: 0; }
|
|
89
|
+
.evp-hid button { border: 0; font: inherit; font-size: var(--fs-meta); font-weight: var(--fw-strong); color: var(--blue); background: var(--blue-tint); cursor: pointer; }
|
|
67
90
|
/* a coming day with many meetings: one line that opens them */
|
|
68
|
-
.evp .evp-day { width: 100%; border: 0; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer;
|
|
91
|
+
.evp .evp-day { width: 100%; border: 0; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; }
|
|
69
92
|
.evp .evp-day:focus-visible { outline: none; box-shadow: var(--glow); }
|
|
70
93
|
.evp-fi { display: inline-grid; color: var(--muted); transition: transform var(--duration-quick) var(--ease-drift); }
|
|
71
94
|
.evp-day[aria-expanded="true"] .evp-fi { transform: rotate(90deg); }
|
|
72
95
|
/* a date stated in a source: the line that states it, under the row */
|
|
73
|
-
.evp-src { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding:
|
|
96
|
+
.evp-src { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 0 16px 10px 104px; }
|
|
74
97
|
.evp-src q { flex: 1 1 100%; color: var(--ink); }
|
|
98
|
+
.evp-tl-list .evp-src { padding-left: 66px; }
|
|
75
99
|
.evp .evp-r.evp-kid { padding-left: 32px; min-height: 44px; }
|
|
76
|
-
.evp .evp-r.evp-kid .evp-d b { font-size: var(--fs-meta); }
|
|
77
100
|
|
|
78
|
-
.evp-more { display: flex; align-items: center; gap: 8px; margin: 0; padding: 4px 2px; font-size: var(--fs-meta); color: var(--muted); }
|
|
79
101
|
.evp-quiet { margin: 8px 0; }
|
|
80
102
|
.evp-note { margin: 0; color: var(--alert); }
|
|
81
103
|
.evp-note[hidden] { display: none; }
|
|
82
104
|
|
|
83
|
-
/* the fold lines: the rest of Late, and the far delivery milestones */
|
|
84
|
-
.evp .evp-fold i { display: inline-grid; transition: transform var(--duration-quick) var(--ease-drift); }
|
|
85
|
-
.evp .evp-fold[aria-expanded="true"] i { transform: rotate(90deg); }
|
|
86
|
-
.evp .evp-fold:focus-visible { outline: none; box-shadow: var(--glow); }
|
|
87
|
-
.evp > .evp-grid .evp-left > #evpList > .evp-fold { border-top: 0; border-radius: var(--radius-md); } /* the far milestones line stands alone */
|
|
88
|
-
|
|
89
105
|
/* your own date, written in place */
|
|
90
106
|
.evp-new { display: grid; grid-template-columns: minmax(0, 1fr) 160px auto; gap: 8px; align-items: center; margin: 0; padding: 8px; border-radius: var(--radius-card); background: var(--card); border: 1px solid var(--line); box-shadow: var(--raise); }
|
|
91
107
|
.evp-new[hidden] { display: none; }
|
|
92
108
|
.evp-new .pm-input { min-width: 0; }
|
|
93
109
|
|
|
94
|
-
/* the
|
|
95
|
-
.evp .evp-
|
|
96
|
-
.evp-
|
|
97
|
-
.evp-
|
|
98
|
-
.evp-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
.evp-md { all: unset; box-sizing: border-box; cursor: pointer; height: 40px; border-radius: var(--radius-sm); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: var(--fs-meta); color: var(--ink); transition: background var(--duration-quick) var(--ease-out); }
|
|
102
|
-
@media (hover: hover) { .evp-md:hover { background: var(--card); } }
|
|
110
|
+
/* the side: the Calendar block (buttons in the pm-cal grid: today ringed, the day picked filled, a mark per kind under a day), then Show */
|
|
111
|
+
.evp .evp-mn { font-size: var(--fs-body); color: var(--ink); }
|
|
112
|
+
.evp-mn:focus-visible { outline: none; box-shadow: var(--glow); }
|
|
113
|
+
.evp-mg .pm-meta { height: 28px; line-height: 28px; }
|
|
114
|
+
.evp-md { all: unset; box-sizing: border-box; cursor: pointer; height: 36px; border-radius: var(--radius-sm); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: var(--fs-meta); color: var(--ink); }
|
|
115
|
+
@media (hover: hover) { .evp-md:hover { background: var(--well); } }
|
|
116
|
+
.evp-md:focus-visible { outline: none; box-shadow: var(--glow); }
|
|
103
117
|
.evp-md.out { color: var(--muted); }
|
|
104
|
-
.evp-md.
|
|
118
|
+
.evp-md.today { box-shadow: var(--glow); font-weight: var(--fw-strong); }
|
|
105
119
|
.evp-md.on { background: var(--blue); color: var(--on-blue); }
|
|
106
|
-
.evp-md em { display: flex; gap: 3px; height:
|
|
107
|
-
.evp-md em .evp-k { width:
|
|
120
|
+
.evp-md em { display: flex; gap: 3px; height: 5px; }
|
|
121
|
+
.evp-md em .evp-k { width: 5px; height: 5px; }
|
|
108
122
|
.evp-md.on em .evp-k { background: var(--on-blue); box-shadow: none; }
|
|
109
|
-
.evp-
|
|
110
|
-
.evp-
|
|
111
|
-
.evp-f
|
|
112
|
-
.evp-f button
|
|
113
|
-
.evp-
|
|
114
|
-
.evp-f button small { font-size: var(--fs-meta); color: var(--muted); }
|
|
115
|
-
.evp-f button.evp-un { color: var(--muted);
|
|
116
|
-
.evp-f button.evp-un
|
|
117
|
-
.evp-key { display: flex; flex-wrap: wrap; gap: 6px 14px;
|
|
123
|
+
.evp-hint { margin: 0; }
|
|
124
|
+
.evp-show { gap: 8px; }
|
|
125
|
+
.evp .evp-f { flex-direction: column; gap: 2px; }
|
|
126
|
+
.evp .evp-f button { display: flex; height: 32px; padding: 0 8px; }
|
|
127
|
+
.evp .evp-f i.evp-k { width: 8px; height: 8px; } /* the key shows the same mark as the rows, not the legend's line */
|
|
128
|
+
.evp .evp-f button small { margin-left: auto; font-size: var(--fs-meta); color: var(--muted); }
|
|
129
|
+
.evp .evp-f button.evp-un { color: var(--muted); }
|
|
130
|
+
.evp .evp-f button.evp-un svg { margin-left: auto; color: var(--blue); }
|
|
131
|
+
.evp-key { display: flex; flex-wrap: wrap; gap: 6px 14px; }
|
|
118
132
|
.evp-key span { display: inline-flex; align-items: center; gap: 6px; }
|
|
119
|
-
.evp-hint { margin: 12px 0 0; }
|
|
120
133
|
|
|
121
134
|
/* the full calendar, in the left column: Calendar with Month | Week as Tabs */
|
|
122
135
|
.evp-ch { display: flex; align-items: center; gap: 2px; }
|
|
123
136
|
.evp-ch h2 { margin: 0 auto 0 4px; }
|
|
124
137
|
.evp-seg { margin-left: 8px; }
|
|
125
|
-
.evp .pm-tab[aria-pressed="true"] { background: var(--card); color: var(--ink); box-shadow: var(--raise); }
|
|
126
138
|
.evp .pm-tab:focus-visible { outline: none; box-shadow: var(--glow); }
|
|
127
139
|
.evp-fm { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-radius: var(--radius-card); border: 1px solid var(--line); background: var(--card); overflow: hidden; }
|
|
140
|
+
.evp-mh { font-size: var(--fs-meta); font-weight: var(--fw-strong); color: var(--muted); text-align: center; }
|
|
128
141
|
.evp-fm .evp-mh { padding: 8px 0 6px; }
|
|
129
142
|
.evp-mc { min-height: 104px; min-width: 0; padding: 4px; box-shadow: inset 1px 1px 0 var(--line); display: flex; flex-direction: column; gap: 2px; }
|
|
130
143
|
.evp-mc.out { background: var(--well); }
|
|
@@ -154,14 +167,11 @@ button.evp-t { cursor: pointer; }
|
|
|
154
167
|
|
|
155
168
|
/* the phone: the month and Show go under the dates */
|
|
156
169
|
@media (max-width: 760px) {
|
|
157
|
-
.evp-grid { grid-template-columns: minmax(0, 1fr);
|
|
158
|
-
.evp .evp-r {
|
|
159
|
-
.evp
|
|
160
|
-
.evp .evp-
|
|
161
|
-
.evp-
|
|
162
|
-
.evp-tl { min-width: 0; justify-content: flex-start; }
|
|
163
|
-
.evp-a .evp-sg { flex: 1 1 100%; } /* the suggestion on its own line, then ✓ ✕ together */
|
|
164
|
-
.evp-a { flex-wrap: wrap; white-space: normal; }
|
|
170
|
+
.evp-grid { grid-template-columns: minmax(0, 1fr); }
|
|
171
|
+
.evp .evp-r { flex-wrap: wrap; row-gap: 4px; padding: 8px 12px; }
|
|
172
|
+
.evp .evp-r .txt { flex: 1 1 calc(100% - 100px); }
|
|
173
|
+
.evp-sug, .evp-src { margin-left: 16px; padding-left: 16px; }
|
|
174
|
+
.evp-sug { flex-wrap: wrap; }
|
|
165
175
|
.evp-new { grid-template-columns: minmax(0, 1fr) auto; }
|
|
166
176
|
.evp-new input[type="date"] { grid-column: 1; }
|
|
167
177
|
.evp-ch { flex-wrap: wrap; }
|
|
@@ -171,9 +181,6 @@ button.evp-t { cursor: pointer; }
|
|
|
171
181
|
.evp-wc { min-height: 0; }
|
|
172
182
|
.evp .pm-btn { width: 44px; height: 44px; }
|
|
173
183
|
}
|
|
174
|
-
@media (max-width: 760px) and (hover: hover) {
|
|
175
|
-
.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 */
|
|
176
|
-
}
|
|
177
184
|
@media (prefers-reduced-motion: reduce) {
|
|
178
185
|
.evp .evp-toast { transform: translate(-50%, 0); }
|
|
179
186
|
.evp .evp-toast.on .timer { animation: none; }
|
|
@@ -1,21 +1,22 @@
|
|
|
1
|
-
/* pm/cozy-events.js — Events, the place for everything with a date (
|
|
2
|
-
*
|
|
1
|
+
/* pm/cozy-events.js — Events, the place for everything with a date (initiative events-place; rebuilt from the PMOS design system's blocks by
|
|
2
|
+
* initiative events-ds-page, board EventsDS on Exploring 3; the markup is pm/cozy-events-view.js, pure).
|
|
3
3
|
*
|
|
4
|
-
* One page
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
4
|
+
* One page, Main + side. The top line is the path, the product chip (pm/scope-chip.js: product, program and project), the day picked (with
|
|
5
|
+
* × to show every day), then Search (the one search, pm/cozy-search.js), + (your own date, written in place: a PM item with a due day) and
|
|
6
|
+
* More (the month, the week, Show every date, Connectors). Main: Late, a List block: one Suggestion "PMOS has a fix for all N late dates"
|
|
7
|
+
* with ✓ (Yes to all) and ✕ (No to all), then each row with PMOS's fix under its title and ✓ ✕. Today, a Timeline block with the now line
|
|
8
|
+
* (redrawn each minute). Coming up, a List block: a suggestion only under a date at risk; the later delivery milestones are one fold line.
|
|
9
|
+
* Side: the Calendar block (press a day to see only that day, again for every day; press the month for the full calendar, Month | Week,
|
|
10
|
+
* in the main column, the back arrow returns to the list) and Show: the types as the filter, which is the key to the marks too. PMOS
|
|
11
|
+
* remembers the types you turned off (localStorage 'pmos.events.hide.v2'; every type is on until pressed). When a filter hides dates one line
|
|
12
|
+
* says so, with Show all.
|
|
10
13
|
*
|
|
11
14
|
* 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
15
|
* 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
16
|
* 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
17
|
* 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
|
|
16
|
-
*
|
|
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). */
|
|
18
|
+
* "Ask the owner …" adds that ask as your own item, due today. Late shows its newest five, then one line that opens the rest. Pressing a row
|
|
19
|
+
* opens its work in the one popup (pm/cozy-popup.js) with Ask PMOS beside it. */
|
|
19
20
|
import { mountNav } from './cozy-nav.js';
|
|
20
21
|
import * as POP from './cozy-popup.js';
|
|
21
22
|
import { pmGet, pmPost } from './http.js';
|
|
@@ -34,7 +35,7 @@ const store = {
|
|
|
34
35
|
};
|
|
35
36
|
const $ = (s) => document.querySelector(s);
|
|
36
37
|
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
|
+
const S = { model: null, clock: 0, 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
|
|
|
39
40
|
function readShow() {
|
|
40
41
|
const off = new Set(String(store.get(HIDE_KEY) || '').split(',').filter(Boolean));
|
|
@@ -73,6 +74,9 @@ async function load() {
|
|
|
73
74
|
}
|
|
74
75
|
|
|
75
76
|
/* ── drawing ── */
|
|
77
|
+
const nowHM = () => { const d = new Date(); return String(d.getHours()).padStart(2, '0') + ':' + String(d.getMinutes()).padStart(2, '0'); };
|
|
78
|
+
// the now line moves with the clock: redraw each minute (a draw keeps every open fold and filter)
|
|
79
|
+
S.clock = setInterval(() => { if (document.visibilityState === 'visible' && S.model && !S.cal) draw(); }, 60000);
|
|
76
80
|
function draw() {
|
|
77
81
|
const M = S.model; if (!M) return;
|
|
78
82
|
const F = filt();
|
|
@@ -82,7 +86,7 @@ function draw() {
|
|
|
82
86
|
S.sel = { programs: S.sel.programs.filter((t) => known.has(t)), projects: S.sel.projects.filter((t) => known.has(t)) };
|
|
83
87
|
$('#evpScope').innerHTML = scopeChipHtml(S.P, S.sel, { id: 'evpScopeChip', groups });
|
|
84
88
|
$('#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 });
|
|
89
|
+
$('#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, now: nowHM() });
|
|
86
90
|
$('#evpList').classList.toggle('evp-cal', !!S.cal);
|
|
87
91
|
$('#evpMonth').innerHTML = monthHtml(S.ym, M.items, { today: M.today, day: S.day, ...F });
|
|
88
92
|
$('#evpShow').innerHTML = showHtml(S.show, { counts: countsOf(M.items, { scopeOk: F.scopeOk }), unread: M.unread || {} });
|
|
@@ -173,6 +177,17 @@ async function no(x) {
|
|
|
173
177
|
say('PMOS will not suggest this again.', () => pmPost('/api/events-place/mark', { sig, no: false }));
|
|
174
178
|
load();
|
|
175
179
|
}
|
|
180
|
+
/** ✕ on the Suggestion over Late: no to each fix in view, with one Undo. */
|
|
181
|
+
async function noAll() {
|
|
182
|
+
const ok = scopeOk();
|
|
183
|
+
const list = lateInView(S.model, { show: S.show, scopeOk: ok || undefined, day: S.day, open: S.open }).filter((x) => x.suggest);
|
|
184
|
+
if (!list.length) return;
|
|
185
|
+
const sigs = [];
|
|
186
|
+
for (const x of list) { const r = await pmPost('/api/events-place/mark', { sig: x.suggest.sig, no: true }); if (r && r.ok !== false) sigs.push(x.suggest.sig); }
|
|
187
|
+
if (!sigs.length) { say('Nothing was changed.'); return; }
|
|
188
|
+
say('PMOS will not suggest ' + (sigs.length === 1 ? 'this' : 'these ' + sigs.length) + ' again.', async () => { for (const sig of sigs) await pmPost('/api/events-place/mark', { sig, no: false }); });
|
|
189
|
+
load();
|
|
190
|
+
}
|
|
176
191
|
async function fix(x) {
|
|
177
192
|
const r = await pmPost('/api/events-place/mark', { key: x.key, fixed: !x.fixed });
|
|
178
193
|
if (!r || r.ok === false) { say((r && r.error) || 'Nothing was changed.'); return; }
|
|
@@ -223,11 +238,23 @@ async function addSave(e) {
|
|
|
223
238
|
load();
|
|
224
239
|
}
|
|
225
240
|
|
|
241
|
+
/* ── More: a menu under its button ── */
|
|
242
|
+
function menu(show) {
|
|
243
|
+
const m = $('#evpMenu'), b = document.querySelector('[data-evp-more]');
|
|
244
|
+
if (!m || !b) return;
|
|
245
|
+
m.hidden = !show; b.setAttribute('aria-expanded', show ? 'true' : 'false');
|
|
246
|
+
if (show) { const f = m.querySelector('button'); if (f) f.focus(); }
|
|
247
|
+
}
|
|
248
|
+
|
|
226
249
|
/* ── presses ── */
|
|
227
250
|
document.addEventListener('click', (e) => {
|
|
228
251
|
const t = e.target;
|
|
229
252
|
if (!t || !t.closest) return;
|
|
230
|
-
|
|
253
|
+
if (t.closest('[data-evp-more]')) { menu($('#evpMenu').hidden); return; }
|
|
254
|
+
const inMenu = !!t.closest('#evpMenu');
|
|
255
|
+
if (!inMenu) menu(false); else setTimeout(() => menu(false));
|
|
256
|
+
if (t.closest('[data-evp-search]')) { import('./cozy-search.js').then((M) => M.openSearch({})); return; }
|
|
257
|
+
const b = t.closest('[data-evp-noall],[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');
|
|
231
258
|
if (!b) return;
|
|
232
259
|
const x = itemOf(b);
|
|
233
260
|
if (b.id === 'evpScopeChip') {
|
|
@@ -253,6 +280,7 @@ document.addEventListener('click', (e) => {
|
|
|
253
280
|
if (b.matches('[data-evp-yes]')) yes(x);
|
|
254
281
|
else if (b.matches('[data-evp-no]')) no(x);
|
|
255
282
|
else if (b.matches('[data-evp-all]')) yesAll();
|
|
283
|
+
else if (b.matches('[data-evp-noall]')) noAll();
|
|
256
284
|
else if (b.matches('[data-evp-fix]')) fix(x);
|
|
257
285
|
else if (b.matches('[data-evp-done]')) done(x);
|
|
258
286
|
else if (b.matches('[data-evp-open]')) open(x);
|
|
@@ -277,6 +305,7 @@ document.addEventListener('click', (e) => {
|
|
|
277
305
|
document.addEventListener('change', (e) => { const i = e.target; if (i && i.matches && i.matches('[data-evp-date]')) redate(itemOf(i), i.value); });
|
|
278
306
|
$('#evpAdd').addEventListener('submit', addSave);
|
|
279
307
|
$('#evpAdd').addEventListener('keydown', (e) => { if (e.key === 'Escape') { e.currentTarget.reset(); e.currentTarget.hidden = true; } });
|
|
308
|
+
document.addEventListener('keydown', (e) => { if (e.key === 'Escape' && !$('#evpMenu').hidden) { e.preventDefault(); menu(false); document.querySelector('[data-evp-more]').focus(); } });
|
|
280
309
|
document.addEventListener('keydown', (e) => { if (e.key === 'Escape' && S.cal && !e.defaultPrevented && !document.querySelector('.cz-pop:not([hidden])')) { S.cal = null; draw(); } });
|
|
281
310
|
document.addEventListener('visibilitychange', () => { if (document.visibilityState === 'visible' && S.model) load(); });
|
|
282
311
|
|
|
@@ -1,22 +1,19 @@
|
|
|
1
|
-
/* cozy-library.css — Library (initiative library-place; slice 7 of the six-place navigation
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
* space and shadow are the system's tokens (brand.css, komorebi.css), light and dark.
|
|
6
|
-
* picker (cozy-pick.css), the same as the product, program and project chip beside them. */
|
|
1
|
+
/* cozy-library.css — Library (initiative library-place; slice 7 of the six-place navigation), rebuilt from Komorebi blocks
|
|
2
|
+
* (library-ds-page, board LibraryDS on Exploring 3). Layout Main + open item: the top line (Path, the scope chip, icon buttons), the search
|
|
3
|
+
* Input with its key, the filter chips, one List block of ListRows, and the open item as a Detail block at the right on a desk. The parts
|
|
4
|
+
* draw themselves (pm/komorebi.css); this sheet only places them, plus the shared picker's menus under their chips. Colours, corners,
|
|
5
|
+
* space and shadow are the system's tokens (brand.css, komorebi.css), light and dark. */
|
|
7
6
|
.lb-page .vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
|
|
8
7
|
|
|
9
|
-
/* the
|
|
8
|
+
/* the top line, the search and the chips */
|
|
10
9
|
.lb-bar { display: flex; align-items: center; gap: var(--space-8); min-height: 44px; }
|
|
11
|
-
.lb-
|
|
12
|
-
.lb-
|
|
13
|
-
.lb-
|
|
10
|
+
.lb-bar .sp, .lb-fl .sp { flex: 1; }
|
|
11
|
+
.lb-find { flex-wrap: nowrap; margin-top: var(--space-12); }
|
|
12
|
+
.lb-find .pm-input { flex: 1; min-width: 0; }
|
|
13
|
+
.lb-find .pm-input::-webkit-search-cancel-button { cursor: pointer; }
|
|
14
|
+
.lb-fl { margin-top: var(--space-12); }
|
|
15
|
+
.lb-chip.on, .lb-sc .scp-chip:not([aria-label$=": all"]) { background: var(--blue-tint); color: var(--blue); }
|
|
14
16
|
.lb-chip .pm-ic { width: 14px; height: 14px; }
|
|
15
|
-
.lb-find { margin-left: auto; display: flex; align-items: center; gap: var(--space-8); height: 40px; width: 380px; max-width: 46vw; padding: 0 var(--space-12); border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--card); color: var(--muted); flex: none; }
|
|
16
|
-
.lb-find input { all: unset; flex: 1; min-width: 0; font: inherit; font-size: var(--fs-body); color: var(--ink); }
|
|
17
|
-
.lb-find input::placeholder { color: var(--muted); }
|
|
18
|
-
.lb-find input::-webkit-search-cancel-button { cursor: pointer; }
|
|
19
|
-
.lb-find:focus-within { box-shadow: var(--glow); }
|
|
20
17
|
.lb-hid { margin: var(--space-8) var(--space-4) 0; }
|
|
21
18
|
.lb-hid:empty { display: none; }
|
|
22
19
|
.lb-hid button, .lb-retry { all: unset; cursor: pointer; color: var(--blue); font-weight: var(--fw-strong); }
|
|
@@ -27,41 +24,30 @@
|
|
|
27
24
|
.lb-main { flex: 1 1 auto; min-width: 0; max-width: 1400px; display: flex; flex-direction: column; gap: var(--space-16); }
|
|
28
25
|
#lbBody { display: flex; flex-direction: column; gap: var(--space-16); }
|
|
29
26
|
|
|
30
|
-
/* the
|
|
31
|
-
.lb-
|
|
32
|
-
.lb-
|
|
33
|
-
.lb-
|
|
34
|
-
.lb-
|
|
35
|
-
.lb-
|
|
36
|
-
.lb-
|
|
37
|
-
.lb-
|
|
38
|
-
.lb-
|
|
39
|
-
.lb-
|
|
40
|
-
.lb-t thead th:nth-child(8) { width: 88px; }
|
|
41
|
-
.lb-t tr:last-child td { border-bottom: 0; }
|
|
42
|
-
.lb-i { cursor: pointer; }
|
|
43
|
-
.lb-i .c { color: var(--muted); }
|
|
44
|
-
.lb-i td.ic { color: var(--muted); }
|
|
45
|
-
.lb-i td.ic .pm-ic { display: block; }
|
|
46
|
-
.lb-i.sub .lb-nw { padding-left: var(--space-16); }
|
|
47
|
-
.lb-i.sub .lb-nb { font-weight: var(--fw-regular); }
|
|
48
|
-
.lb-t .lb-g th { padding: 0; border-bottom: 1px solid var(--line); }
|
|
49
|
-
.lb-g .pm-group em { font-style: normal; font-weight: var(--fw-regular); }
|
|
50
|
-
.lb-s .pm-group { width: 100%; border: 0; font: inherit; font-size: var(--fs-meta); font-weight: var(--fw-strong); cursor: pointer; text-align: left; }
|
|
51
|
-
.lb-s .pm-group b { color: var(--ink); }
|
|
52
|
-
.lb-s .pm-group:focus-visible { outline: none; box-shadow: var(--glow); }
|
|
53
|
-
.lb-s .pm-group .pm-ic { width: 14px; height: 14px; }
|
|
27
|
+
/* the List block: group heads span the block; a row is pressable as a whole */
|
|
28
|
+
.lb-blk .rows { padding-top: var(--space-4); }
|
|
29
|
+
.lb-blk > .pm-group + .rows, .lb-blk > .lb-s + .rows { padding-top: var(--space-4); }
|
|
30
|
+
.lb-blk > .head + .pm-group { margin-top: 0; }
|
|
31
|
+
.lb-s { width: 100%; border: 0; font: inherit; font-size: var(--fs-meta); text-align: left; cursor: pointer; }
|
|
32
|
+
.lb-s b { color: var(--ink); }
|
|
33
|
+
.lb-s em, .lb-blk .pm-group em { font-style: normal; font-weight: var(--fw-regular); }
|
|
34
|
+
.lb-s:focus-visible { outline: none; box-shadow: var(--glow); }
|
|
35
|
+
.lb-i, .lb-mr { cursor: pointer; }
|
|
36
|
+
.lb-mi { display: inline-flex; color: var(--muted); }
|
|
54
37
|
.lb-nw { display: flex; align-items: center; gap: var(--space-4); min-width: 0; }
|
|
55
38
|
.lb-nb { all: unset; cursor: pointer; font-weight: var(--fw-strong); color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
|
|
56
39
|
.lb-nb:focus-visible { box-shadow: var(--glow); border-radius: var(--radius-sm); }
|
|
40
|
+
.pm-li.nest .lb-nb { font-weight: var(--fw-regular); }
|
|
41
|
+
.lb-sp { display: inline-flex; }
|
|
42
|
+
.lb-sp .pm-ic { width: 14px; height: 14px; }
|
|
57
43
|
.lb-old { border: 0; flex: none; cursor: pointer; font: inherit; font-size: var(--fs-meta); color: var(--muted); }
|
|
58
44
|
.lb-old[aria-expanded="true"] { background: var(--blue-tint); color: var(--blue); }
|
|
59
45
|
.lb-old:focus-visible { outline: none; box-shadow: var(--glow); }
|
|
60
|
-
.lb-
|
|
61
|
-
.lb-nm
|
|
46
|
+
.lb-acts { display: flex; gap: 2px; }
|
|
47
|
+
.lb-nm { flex-wrap: nowrap; }
|
|
62
48
|
.lb-nm .pm-input { height: 32px; font-weight: var(--fw-strong); }
|
|
63
|
-
.lb-sg { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: var(--space-4);
|
|
64
|
-
.lb-sg
|
|
49
|
+
.lb-sg { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: var(--space-4); color: var(--blue); }
|
|
50
|
+
.lb-sg .pm-ic { width: 14px; height: 14px; }
|
|
65
51
|
.lb-sg:focus-visible { box-shadow: var(--glow); border-radius: var(--radius-sm); }
|
|
66
52
|
.lb-n { margin: 0 var(--space-4); }
|
|
67
53
|
.lb-none { margin: 0; padding: var(--space-24) var(--space-16); }
|
|
@@ -72,18 +58,19 @@
|
|
|
72
58
|
.lb-sk i:nth-child(2) { width: 55%; }
|
|
73
59
|
.lb-sk i:nth-child(3) { width: 62%; }
|
|
74
60
|
|
|
75
|
-
/*
|
|
61
|
+
/* Also about this: each row with its passage, the idea in bold */
|
|
62
|
+
.lb-m .head { padding-top: var(--space-4); }
|
|
76
63
|
.lb-m .lb-mq { margin: 0 var(--space-16) var(--space-8); }
|
|
77
|
-
.lb-
|
|
64
|
+
.lb-mr { align-items: flex-start; padding-top: 10px; padding-bottom: 10px; }
|
|
65
|
+
.lb-mr .lb-mi { padding-top: 2px; }
|
|
78
66
|
.lb-mr .lb-nb { display: block; }
|
|
79
|
-
.lb-
|
|
80
|
-
.lb-ps { margin-top: var(--space-4); white-space: normal; color: var(--ink); }
|
|
67
|
+
.lb-ps { margin-top: var(--space-4); font-size: var(--fs-meta); line-height: var(--lh-meta); white-space: normal; }
|
|
81
68
|
.lb-ps b { font-weight: var(--fw-strong); }
|
|
82
69
|
.lb-mq { margin: 0 var(--space-4); }
|
|
83
70
|
|
|
84
|
-
/* the menus: Kind (families open to their kinds), State, Group
|
|
71
|
+
/* the menus under the chips: Kind (families open to their kinds), State, Group (the Tabs part); More is the Menu part */
|
|
85
72
|
.lb-cw { position: relative; display: inline-flex; flex: none; }
|
|
86
|
-
.lb-menu { position: absolute; left: 0; top: calc(100% + 8px); }
|
|
73
|
+
.lb-menu { position: absolute; left: 0; top: calc(100% + 8px); z-index: 20; }
|
|
87
74
|
.lb-cwr .lb-menu { left: auto; right: 0; }
|
|
88
75
|
.lb-menu .ppk-mi { min-height: 44px; }
|
|
89
76
|
.lb-menu .ppk-nm { flex-direction: row; align-items: baseline; gap: var(--space-8); }
|
|
@@ -99,32 +86,24 @@
|
|
|
99
86
|
.lb-pl .pm-tab:focus-visible { outline: none; box-shadow: var(--glow); }
|
|
100
87
|
.lb-gm { width: 320px; }
|
|
101
88
|
|
|
102
|
-
/* the open item: a Detail block,
|
|
103
|
-
.lb-pv { flex: 0 0
|
|
89
|
+
/* the open item: a Detail block, on a desk */
|
|
90
|
+
.lb-pv { flex: 0 0 420px; position: sticky; top: var(--space-12); max-height: calc(100vh - 120px); overflow: auto; }
|
|
104
91
|
.lb-pv[hidden] { display: none; }
|
|
105
|
-
.lb-pv.pm-block .head { align-items: flex-start; }
|
|
106
92
|
.lb-pv .head .pm-h { flex: 1; min-width: 0; overflow-wrap: anywhere; }
|
|
107
|
-
.lb-pv .pm-field { margin: 0; }
|
|
93
|
+
.lb-pv .pm-field, .lb-pv .lb-pvh { margin: 0; }
|
|
108
94
|
.lb-pv .pm-field dd { overflow-wrap: anywhere; }
|
|
109
|
-
.lb-
|
|
95
|
+
.lb-pvk { margin: var(--space-4) 0 0; font-weight: var(--fw-regular); }
|
|
110
96
|
.lb-pvl p { margin: 0 0 var(--space-4); font-size: var(--fs-meta); line-height: var(--lh-meta); }
|
|
111
|
-
.lb-pv ul { margin: 0; padding-left: 18px; font-size: var(--fs-meta); }
|
|
97
|
+
.lb-pv ul { margin: 0; padding-left: 18px; font-size: var(--fs-meta); line-height: var(--lh-meta); }
|
|
112
98
|
.lb-pv li { margin: 0 0 var(--space-4); }
|
|
113
|
-
.lb-pv li .lb-nb { font-weight: var(--fw-regular); white-space: normal; }
|
|
114
|
-
@media (max-width:
|
|
99
|
+
.lb-pv li .lb-nb { font-weight: var(--fw-regular); white-space: normal; color: var(--blue); }
|
|
100
|
+
@media (max-width: 1199px) { .lb-pv { display: none; } }
|
|
115
101
|
|
|
116
|
-
/*
|
|
117
|
-
@media (max-width: 1180px) {
|
|
118
|
-
.lb-t { table-layout: auto; }
|
|
119
|
-
.lb-t td.n { width: 100%; max-width: 0; }
|
|
120
|
-
.lb-t td.c { max-width: 160px; }
|
|
121
|
-
.lb-t tr > :nth-child(6), .lb-t tr > :nth-child(7) { display: none; }
|
|
122
|
-
}
|
|
123
|
-
/* a phone: the Table becomes a List (the kind, the name, the day) */
|
|
102
|
+
/* a phone: the chips scroll sideways; the menus rise from the bottom */
|
|
124
103
|
@media (max-width: 760px) {
|
|
125
|
-
.lb-
|
|
126
|
-
.lb-
|
|
127
|
-
.lb-
|
|
128
|
-
.lb-
|
|
104
|
+
.lb-page .lb-fl { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
|
|
105
|
+
.lb-bar #lbMore { display: none; } /* the phone's own ⋯ sits here; Show all stays in the hidden line */
|
|
106
|
+
.lb-fl .sp { display: none; }
|
|
107
|
+
.lb-find .pm-kbd { display: none; }
|
|
129
108
|
.lb-menu, .lb-cwr .lb-menu { position: fixed; left: 0; right: 0; top: auto; bottom: 0; width: auto; max-height: 80vh; border-radius: var(--radius-panel) var(--radius-panel) 0 0; padding: 18px 12px 28px; }
|
|
130
109
|
}
|