@skillre/dsh-plugin-work-dashboard 0.12.0 → 0.14.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.
@@ -0,0 +1,18 @@
1
+ /**
2
+ * The stylesheet for the POC 3.2 report page and its return receipt.
3
+ *
4
+ * This is a plain string on purpose: the page is a single offline HTML file, so
5
+ * there is nothing to import and no build-time asset to reference. The Host
6
+ * embeds it in a `<style>` element; {@link REPORT_PAGE_SCRIPT} reads the same
7
+ * bytes back out of the document when it builds the return receipt, so the page
8
+ * and the receipt cannot drift apart.
9
+ *
10
+ * Constraints:
11
+ * - No `@import`, no remote font, no remote image: the file has to open from
12
+ * `file://` on a locked-down laptop with no network.
13
+ * - Every selector is prefixed `rp-` so it cannot collide with the Host shell.
14
+ * - Only the interactive page lives here. Saving writes the same document back
15
+ * with the colleague's answers embedded, so there is no second "receipt"
16
+ * style sheet to keep in sync.
17
+ */
18
+ export declare const REPORT_STYLE: string;
@@ -0,0 +1,412 @@
1
+ /**
2
+ * The stylesheet for the POC 3.2 report page and its return receipt.
3
+ *
4
+ * This is a plain string on purpose: the page is a single offline HTML file, so
5
+ * there is nothing to import and no build-time asset to reference. The Host
6
+ * embeds it in a `<style>` element; {@link REPORT_PAGE_SCRIPT} reads the same
7
+ * bytes back out of the document when it builds the return receipt, so the page
8
+ * and the receipt cannot drift apart.
9
+ *
10
+ * Constraints:
11
+ * - No `@import`, no remote font, no remote image: the file has to open from
12
+ * `file://` on a locked-down laptop with no network.
13
+ * - Every selector is prefixed `rp-` so it cannot collide with the Host shell.
14
+ * - Only the interactive page lives here. Saving writes the same document back
15
+ * with the colleague's answers embedded, so there is no second "receipt"
16
+ * style sheet to keep in sync.
17
+ */
18
+ export const REPORT_STYLE = `
19
+ :root{
20
+ --rp-primary:#2864E8;
21
+ --rp-primary-dark:#1E54C9;
22
+ --rp-primary-soft:rgba(40,100,232,.08);
23
+ --rp-text:#141F2E;
24
+ --rp-text-2:#48586D;
25
+ --rp-text-3:#8794A6;
26
+ --rp-bg:#F4F6FA;
27
+ --rp-surface:#fff;
28
+ --rp-inset:#F7F9FC;
29
+ --rp-line:#E5EAF1;
30
+ --rp-line-2:#D3DBE6;
31
+ --rp-green:#1E7D62;
32
+ --rp-green-soft:rgba(30,125,98,.10);
33
+ --rp-amber:#A96C10;
34
+ --rp-amber-soft:rgba(169,108,16,.11);
35
+ --rp-red:#B93B2C;
36
+ --rp-red-soft:rgba(185,59,44,.08);
37
+ --rp-mono:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
38
+ --rp-shadow-1:0 1px 2px rgba(20,32,52,.04);
39
+ --rp-shadow-2:0 2px 8px rgba(20,32,52,.07);
40
+ --rp-radius:10px;
41
+ }
42
+ *{box-sizing:border-box;margin:0;padding:0}
43
+ [hidden]{display:none!important}
44
+ html{-webkit-text-size-adjust:100%}
45
+ body{
46
+ font-family:'Avenir Next','PingFang SC','Microsoft YaHei',system-ui,-apple-system,sans-serif;
47
+ background:var(--rp-bg);color:var(--rp-text);font-size:14px;line-height:22px;
48
+ -webkit-font-smoothing:antialiased;padding:26px 20px 118px;
49
+ }
50
+ .rp-app{max-width:788px;margin:0 auto}
51
+ .rp-sr{
52
+ position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;
53
+ clip:rect(0,0,0,0);white-space:nowrap;border:0;
54
+ }
55
+ :focus-visible{outline:2px solid var(--rp-primary);outline-offset:2px}
56
+ .rp-fatal{
57
+ max-width:788px;margin:40px auto;padding:18px 20px;background:var(--rp-surface);
58
+ border:1px solid var(--rp-line);border-left:3px solid var(--rp-red);border-radius:10px;
59
+ color:var(--rp-text-2);font-size:13px;line-height:20px;white-space:pre-wrap;
60
+ }
61
+
62
+ /* ============================ header ============================ */
63
+ .rp-head{display:flex;align-items:flex-start;gap:24px;margin-bottom:20px}
64
+ .rp-head-main{flex:1;min-width:0}
65
+ .rp-eyebrow{font-size:11px;font-weight:700;letter-spacing:.1em;text-transform:uppercase;color:var(--rp-primary)}
66
+ .rp-title{margin:6px 0 0;font-size:27px;line-height:35px;font-weight:700;letter-spacing:-.022em;overflow-wrap:anywhere}
67
+ .rp-meta{margin-top:7px;display:flex;flex-wrap:wrap;align-items:center;font-size:12.5px;color:var(--rp-text-3)}
68
+ .rp-meta span{padding:0 9px;border-right:1px solid var(--rp-line)}
69
+ .rp-meta span:first-child{padding-left:0}
70
+ .rp-meta span:last-child{border-right:0}
71
+ .rp-meta b{color:var(--rp-text-2);font-weight:600}
72
+ .rp-head-round{flex:none;text-align:right;padding-top:2px}
73
+ .rp-big{font-size:34px;line-height:36px;font-weight:700;font-variant-numeric:tabular-nums;letter-spacing:-.03em}
74
+ .rp-small{font-size:10.5px;color:var(--rp-text-3);letter-spacing:.04em}
75
+ .rp-idents{display:flex;flex-wrap:wrap;gap:6px 14px;margin-top:10px;font-size:12px;color:var(--rp-text-3)}
76
+ .rp-idents b{color:var(--rp-text-2);font-weight:600}
77
+
78
+ /* ============================ notices ============================ */
79
+ .rp-notice{
80
+ display:flex;align-items:flex-start;gap:10px;margin-bottom:14px;padding:10px 13px;
81
+ border:1px solid rgba(40,100,232,.2);background:var(--rp-primary-soft);
82
+ border-radius:8px;font-size:12px;line-height:18px;color:var(--rp-text-2);
83
+ }
84
+ .rp-notice.is-warn{border-color:rgba(169,108,16,.3);background:var(--rp-amber-soft)}
85
+ .rp-notice p{flex:1}
86
+ .rp-notice button{
87
+ flex:none;border:0;background:none;color:var(--rp-primary);font:inherit;
88
+ font-weight:650;cursor:pointer;padding:1px 2px;
89
+ }
90
+ .rp-notice button:hover{text-decoration:underline}
91
+
92
+ /* ============================ tabs ============================ */
93
+ .rp-tabs{
94
+ display:flex;gap:6px;overflow-x:auto;margin:0 0 18px;padding-bottom:2px;
95
+ scrollbar-width:thin;
96
+ }
97
+ .rp-tab{
98
+ flex:none;display:inline-flex;align-items:center;gap:7px;padding:7px 12px;
99
+ border:1px solid var(--rp-line);border-radius:8px;background:var(--rp-surface);
100
+ font:inherit;font-size:12.5px;color:var(--rp-text-2);cursor:pointer;white-space:nowrap;
101
+ }
102
+ .rp-tab:hover{border-color:var(--rp-line-2)}
103
+ .rp-tab[aria-selected="true"]{border-color:var(--rp-primary);background:var(--rp-primary-soft);color:var(--rp-primary);font-weight:650}
104
+ .rp-tab-id{font-family:var(--rp-mono);font-size:10px;color:var(--rp-text-3)}
105
+ .rp-tab-dot{width:6px;height:6px;border-radius:50%;background:var(--rp-line-2)}
106
+ .rp-tab-dot[data-filled="true"]{background:var(--rp-green)}
107
+
108
+ /* ============================ sections ============================ */
109
+ .rp-sec{margin-top:28px;scroll-margin-top:20px}
110
+ .rp-sec-head{display:flex;align-items:center;gap:11px;margin-bottom:4px}
111
+ .rp-sec-num{
112
+ flex:none;width:23px;height:23px;border-radius:7px;background:var(--rp-text);color:#fff;
113
+ font-size:12px;font-weight:700;display:flex;align-items:center;justify-content:center;
114
+ font-variant-numeric:tabular-nums;
115
+ }
116
+ .rp-sec-title{font-size:16.5px;font-weight:700;letter-spacing:-.012em}
117
+ .rp-sec-count{margin-left:auto;font-size:11px;color:var(--rp-text-3);font-variant-numeric:tabular-nums}
118
+ .rp-sec-note{margin:0 0 13px 34px;font-size:12px;line-height:19px;color:var(--rp-text-3)}
119
+
120
+ /* ============================ round strip ============================ */
121
+ .rp-roundbar{
122
+ border:0;border-top:1px dashed var(--rp-line-2);background:transparent;border-radius:0;
123
+ padding:12px 0 0;margin:0 0 14px;box-shadow:none;
124
+ }
125
+ .rp-roundbar .rp-f-label,.rp-roundbar .rp-mini-label{font-size:11px;color:var(--rp-text-3)}
126
+ .rp-roundbar .rp-input,.rp-roundbar .rp-select{padding:6px 9px;font-size:12.5px}
127
+ .rp-grid-3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:11px 13px}
128
+ .rp-grid-2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:11px 13px}
129
+ @media(max-width:760px){
130
+ .rp-grid-3{grid-template-columns:repeat(2,minmax(0,1fr))}
131
+ }
132
+ @media(max-width:520px){
133
+ .rp-grid-3,.rp-grid-2{grid-template-columns:minmax(0,1fr)}
134
+ }
135
+
136
+ /* ============================ item card ============================ */
137
+ .rp-item{
138
+ background:var(--rp-surface);border:1px solid var(--rp-line);border-radius:11px;
139
+ padding:14px 16px 15px 17px;margin-bottom:10px;border-left:3px solid var(--rp-line-2);
140
+ box-shadow:var(--rp-shadow-1);transition:border-color .15s,box-shadow .15s;
141
+ }
142
+ .rp-item:hover{box-shadow:var(--rp-shadow-2)}
143
+ .rp-item[data-status="done"]{border-left-color:var(--rp-green)}
144
+ .rp-item[data-status="doing"]{border-left-color:var(--rp-primary)}
145
+ .rp-item[data-status="delay"]{border-left-color:var(--rp-amber)}
146
+ .rp-item[data-status="drop"]{border-left-color:var(--rp-text-3)}
147
+ .rp-item-top{display:flex;align-items:flex-start;gap:10px;flex-wrap:wrap}
148
+ .rp-idx{flex:none;font-family:var(--rp-mono);font-size:10.5px;color:var(--rp-text-3);padding-top:4px}
149
+ .rp-item-title{flex:1;min-width:180px}
150
+ .rp-plan-text{font-size:14.5px;line-height:21px;font-weight:650;letter-spacing:-.008em;overflow-wrap:anywhere}
151
+ .rp-item-sub{margin-top:2px;font-size:11px;color:var(--rp-text-3)}
152
+ .rp-item-sub b{color:var(--rp-text-2);font-weight:600}
153
+ .rp-tag{
154
+ display:inline-block;font-size:9.5px;font-weight:700;letter-spacing:.02em;
155
+ padding:1px 6px;border-radius:4px;vertical-align:1px;margin-left:7px;
156
+ }
157
+ .rp-tag-plan{background:var(--rp-inset);color:var(--rp-text-3);border:1px solid var(--rp-line)}
158
+ .rp-tag-extra{background:var(--rp-primary-soft);color:var(--rp-primary)}
159
+ .rp-item-body{margin-top:11px;padding-left:22px}
160
+ .rp-item-top .rp-del{margin-top:1px}
161
+ .rp-statusf{flex:none;margin-top:0;min-width:0}
162
+ .rp-item-top .rp-statusf{margin-top:1px}
163
+
164
+ /* ============================ segmented status ============================ */
165
+ .rp-seg{
166
+ display:flex;flex:none;flex-wrap:wrap;gap:0;border:1px solid var(--rp-line);
167
+ border-radius:8px;overflow:hidden;background:var(--rp-surface);
168
+ }
169
+ .rp-seg button{
170
+ border:0;background:transparent;font:inherit;font-size:11px;color:var(--rp-text-3);
171
+ padding:5px 9px;cursor:pointer;white-space:nowrap;border-right:1px solid var(--rp-line);
172
+ }
173
+ .rp-seg button:last-child{border-right:0}
174
+ .rp-seg button:hover{background:var(--rp-inset);color:var(--rp-text-2)}
175
+ .rp-seg button[aria-pressed="true"]{font-weight:700}
176
+ .rp-seg button[data-k="done"][aria-pressed="true"]{background:var(--rp-green-soft);color:var(--rp-green)}
177
+ .rp-seg button[data-k="doing"][aria-pressed="true"]{background:var(--rp-primary-soft);color:var(--rp-primary)}
178
+ .rp-seg button[data-k="delay"][aria-pressed="true"]{background:var(--rp-amber-soft);color:var(--rp-amber)}
179
+ .rp-seg button[data-k="drop"][aria-pressed="true"]{background:var(--rp-inset);color:var(--rp-text-2)}
180
+ .rp-seg.is-error{border-color:var(--rp-red);box-shadow:0 0 0 2px var(--rp-red-soft)}
181
+ .rp-mini-label{display:block;font-size:11.5px;font-weight:650;color:var(--rp-text-2);margin-bottom:5px}
182
+ .rp-line-status{margin-top:12px}
183
+
184
+ /* ============================ fields ============================ */
185
+ .rp-f{margin-top:11px;min-width:0}
186
+ .rp-f:first-child{margin-top:0}
187
+ .rp-label{display:block;font-size:11.5px;font-weight:650;color:var(--rp-text-2);margin-bottom:5px;line-height:17px}
188
+ .rp-label .rp-req{color:var(--rp-red);margin-left:2px}
189
+ .rp-help{font-size:10.5px;line-height:16px;color:var(--rp-text-3);margin:-2px 0 5px}
190
+ .rp-input,.rp-area,.rp-select{
191
+ width:100%;padding:8px 11px;border:1px solid var(--rp-line);border-radius:7px;
192
+ font-family:inherit;font-size:13.5px;line-height:20px;background:var(--rp-surface);color:var(--rp-text);
193
+ }
194
+ .rp-input::placeholder,.rp-area::placeholder{color:#A9B4C2}
195
+ .rp-input:focus,.rp-area:focus,.rp-select:focus{
196
+ outline:none;border-color:var(--rp-primary);box-shadow:0 0 0 3px var(--rp-primary-soft);
197
+ }
198
+ .rp-area{min-height:58px;resize:vertical}
199
+ .rp-select{appearance:none;background-image:linear-gradient(45deg,transparent 50%,var(--rp-text-3) 50%),linear-gradient(135deg,var(--rp-text-3) 50%,transparent 50%);background-position:calc(100% - 15px) 50%,calc(100% - 10px) 50%;background-size:5px 5px,5px 5px;background-repeat:no-repeat;padding-right:30px}
200
+ .rp-input.is-invalid,.rp-area.is-invalid,.rp-select.is-invalid{border-color:var(--rp-red);background-color:#FFFDFC}
201
+ .rp-f.is-error>.rp-input,.rp-f.is-error>.rp-area,.rp-f.is-error>.rp-select,
202
+ .rp-f.is-error .rp-ev-row .rp-input,.rp-f.is-error .rp-ev-row .rp-select{border-color:var(--rp-red)}
203
+ .rp-err{display:none;margin-top:5px;font-size:11px;line-height:16px;color:var(--rp-red)}
204
+ .rp-f.is-error .rp-err,.rp-err.is-error{display:block}
205
+ .rp-err-general{margin:0 0 12px 34px}
206
+ .rp-inline-note{font-size:11px;line-height:17px;color:var(--rp-text-3);margin-top:5px}
207
+
208
+ /* ============================ evidence ============================ */
209
+ .rp-ev{margin-top:12px}
210
+ .rp-ev-bar{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
211
+ .rp-ev-count{
212
+ font-size:11px;color:var(--rp-text-3);padding:4px 9px;border-radius:6px;
213
+ background:var(--rp-inset);border:1px solid var(--rp-line);
214
+ }
215
+ .rp-ev-count.has{color:var(--rp-green);background:var(--rp-green-soft);border-color:rgba(30,125,98,.18)}
216
+ .rp-ev-toggle{
217
+ background:none;border:0;font:inherit;font-size:11.5px;color:var(--rp-primary);
218
+ cursor:pointer;font-weight:650;padding:4px 2px;
219
+ }
220
+ .rp-ev-toggle:hover{text-decoration:underline}
221
+ .rp-ev-list{margin-top:8px;display:none;flex-direction:column;gap:8px}
222
+ .rp-ev-list[data-open="true"]{display:flex}
223
+ .rp-ev-field{margin-top:0}
224
+ .rp-ev-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,.7fr) minmax(0,.55fr) 30px;gap:7px;align-items:center}
225
+ .rp-del{
226
+ flex:none;background:none;border:1px solid var(--rp-line);border-radius:6px;
227
+ color:var(--rp-text-3);width:30px;height:36px;cursor:pointer;font-size:14px;line-height:1;
228
+ }
229
+ .rp-del:hover{border-color:rgba(185,59,44,.3);color:var(--rp-red)}
230
+ .rp-ev-add{
231
+ align-self:flex-start;background:none;border:1px dashed var(--rp-line-2);border-radius:7px;
232
+ color:var(--rp-text-2);font:inherit;font-size:11.5px;font-weight:650;cursor:pointer;padding:6px 11px;
233
+ }
234
+ .rp-ev-add:hover{border-color:var(--rp-primary);color:var(--rp-primary);background:var(--rp-primary-soft)}
235
+
236
+ /* ============================ checks / extras ============================ */
237
+ .rp-more{margin-top:12px}
238
+ .rp-more>summary{
239
+ cursor:pointer;list-style:none;font-size:11.5px;font-weight:650;color:var(--rp-text-2);
240
+ display:flex;align-items:center;gap:7px;padding:3px 0;
241
+ }
242
+ .rp-more>summary::-webkit-details-marker{display:none}
243
+ .rp-more>summary::before{
244
+ content:'';flex:none;width:0;height:0;border-left:5px solid var(--rp-text-3);
245
+ border-top:4px solid transparent;border-bottom:4px solid transparent;transition:transform .15s;
246
+ }
247
+ .rp-more[open]>summary::before{transform:rotate(90deg)}
248
+ .rp-more-body{margin-top:10px;padding-top:2px}
249
+ .rp-checks{display:flex;flex-wrap:wrap;gap:7px}
250
+ .rp-check{
251
+ display:inline-flex;align-items:center;gap:6px;padding:6px 10px;
252
+ border:1px solid var(--rp-line);border-radius:7px;background:var(--rp-surface);
253
+ font-size:12px;color:var(--rp-text-2);cursor:pointer;
254
+ }
255
+ .rp-check input{accent-color:var(--rp-primary);margin:0}
256
+ .rp-check.is-on{border-color:var(--rp-primary);background:var(--rp-primary-soft);color:var(--rp-primary)}
257
+ .rp-check-id{font-family:var(--rp-mono);font-size:9.5px;color:var(--rp-text-3)}
258
+
259
+ /* ============================ add buttons ============================ */
260
+ .rp-add{
261
+ display:flex;align-items:center;justify-content:center;gap:7px;width:100%;
262
+ padding:11px;border:1.5px dashed var(--rp-line-2);border-radius:10px;background:transparent;
263
+ color:var(--rp-text-2);font:inherit;font-size:13px;font-weight:650;cursor:pointer;margin-top:10px;
264
+ }
265
+ .rp-add:hover{border-color:var(--rp-primary);color:var(--rp-primary);background:var(--rp-primary-soft)}
266
+
267
+ /* ============================ next plans ============================ */
268
+ .rp-choice{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:12px}
269
+ .rp-choice-opt{
270
+ position:relative;display:inline-flex;flex-direction:row;align-items:center;gap:2px;padding:6px 11px;
271
+ border:1px solid var(--rp-line);border-radius:999px;background:var(--rp-surface);cursor:pointer;
272
+ }
273
+ .rp-choice-opt input{position:absolute;opacity:0;width:1px;height:1px}
274
+ .rp-choice-opt .rp-choice-title{font-size:12px;font-weight:650;color:var(--rp-text-2)}
275
+ .rp-choice-opt .rp-choice-hint{display:none}
276
+ .rp-choice-opt.is-on{border-color:var(--rp-primary);background:var(--rp-primary-soft)}
277
+ .rp-choice-opt.is-on .rp-choice-title{color:var(--rp-primary)}
278
+ .rp-choice-opt:focus-within{outline:2px solid var(--rp-primary);outline-offset:2px}
279
+ .rp-plan-row{
280
+ display:grid;grid-template-columns:minmax(0,1.7fr) minmax(0,.9fr) minmax(0,.9fr) 30px;
281
+ gap:8px;align-items:start;margin-bottom:8px;
282
+ }
283
+ .rp-plan-list.is-error .rp-plan-row .rp-input{border-color:var(--rp-red)}
284
+ .rp-plans-empty{font-size:11.5px;color:var(--rp-text-3);margin:2px 0 8px}
285
+ .rp-plan-row .rp-f{margin-top:0;min-width:0}
286
+ .rp-plan-row .rp-err{margin-top:4px}
287
+ @media(max-width:680px){
288
+ .rp-plan-row{grid-template-columns:minmax(0,1fr) minmax(0,1fr) 30px}
289
+ .rp-plan-row .rp-plan-goal{grid-column:1/-1}
290
+ }
291
+
292
+ /* ============================ optional / stage notes ============================ */
293
+ .rp-opt{margin-top:32px;border-top:1px solid var(--rp-line);padding-top:18px}
294
+ .rp-opt>summary{
295
+ cursor:pointer;list-style:none;font-size:13.5px;font-weight:650;color:var(--rp-text-2);
296
+ display:flex;align-items:center;gap:9px;
297
+ }
298
+ .rp-opt>summary::-webkit-details-marker{display:none}
299
+ .rp-opt>summary::before{
300
+ content:'';flex:none;width:0;height:0;border-left:5px solid var(--rp-text-3);
301
+ border-top:4px solid transparent;border-bottom:4px solid transparent;transition:transform .15s;
302
+ }
303
+ .rp-opt[open]>summary::before{transform:rotate(90deg)}
304
+ .rp-opt-note{font-size:11.5px;line-height:18px;color:var(--rp-text-3);margin:7px 0 0 20px}
305
+ .rp-opt-body{margin-top:14px;display:grid;gap:10px}
306
+ .rp-stage{
307
+ border:1px solid var(--rp-line);border-radius:9px;background:var(--rp-surface);
308
+ padding:10px 13px;
309
+ }
310
+ .rp-stage>summary{
311
+ cursor:pointer;list-style:none;display:flex;align-items:center;gap:8px;
312
+ font-size:12.5px;font-weight:650;color:var(--rp-text-2);
313
+ }
314
+ .rp-stage>summary::-webkit-details-marker{display:none}
315
+ .rp-stage>summary::before{
316
+ content:'';flex:none;width:0;height:0;border-left:5px solid var(--rp-text-3);
317
+ border-top:4px solid transparent;border-bottom:4px solid transparent;transition:transform .15s;
318
+ }
319
+ .rp-stage[open]>summary::before{transform:rotate(90deg)}
320
+ .rp-stage-badge{
321
+ font-size:9.5px;font-weight:700;padding:1px 6px;border-radius:4px;
322
+ background:var(--rp-primary-soft);color:var(--rp-primary);letter-spacing:.02em;
323
+ }
324
+ .rp-stage-body{margin-top:9px}
325
+
326
+ /* ============================ preview ============================ */
327
+ .rp-preview{margin-top:30px;border:1px solid var(--rp-line);border-radius:10px;background:var(--rp-surface);scroll-margin-bottom:120px}
328
+ .rp-preview>summary{
329
+ cursor:pointer;list-style:none;padding:12px 15px;font-size:12.5px;font-weight:650;
330
+ color:var(--rp-text-2);display:flex;align-items:center;gap:8px;
331
+ }
332
+ .rp-preview>summary::-webkit-details-marker{display:none}
333
+ .rp-preview>summary::before{
334
+ content:'';flex:none;width:0;height:0;border-left:5px solid var(--rp-text-3);
335
+ border-top:4px solid transparent;border-bottom:4px solid transparent;transition:transform .15s;
336
+ }
337
+ .rp-preview[open]>summary::before{transform:rotate(90deg)}
338
+ .rp-preview-body{padding:0 15px 14px;font-size:12px;line-height:19px;color:var(--rp-text-2)}
339
+ .rp-preview-list{list-style:none;display:flex;flex-direction:column;gap:6px;margin-top:8px}
340
+ .rp-preview-list li{padding:7px 10px;border-radius:7px;background:var(--rp-inset);overflow-wrap:anywhere}
341
+ .rp-preview-list b{font-weight:650;color:var(--rp-text)}
342
+ .rp-preview-dim{color:var(--rp-text-3);font-size:11px}
343
+ .rp-preview h3{font-size:11px;font-weight:650;letter-spacing:.05em;text-transform:uppercase;color:var(--rp-text-3);margin:12px 0 0}
344
+
345
+ /* ============================ footer bar ============================ */
346
+ .rp-bar{
347
+ position:fixed;left:0;right:0;bottom:0;background:rgba(255,255,255,.97);
348
+ border-top:1px solid var(--rp-line);backdrop-filter:blur(8px);
349
+ padding:11px 20px calc(11px + env(safe-area-inset-bottom,0px));
350
+ box-shadow:0 -2px 12px rgba(20,32,52,.05);z-index:40;
351
+ }
352
+ .rp-bar-in{max-width:788px;margin:0 auto;display:flex;align-items:center;gap:10px;flex-wrap:wrap}
353
+ .rp-state{flex:1;min-width:180px;font-size:12px;line-height:18px;color:var(--rp-text-3)}
354
+ .rp-state b{color:var(--rp-amber);font-weight:700}
355
+ .rp-state .rp-ok{color:var(--rp-green);font-weight:650}
356
+ .rp-bar-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
357
+ .rp-btn{
358
+ padding:9px 15px;border-radius:8px;border:1px solid var(--rp-line);background:var(--rp-surface);
359
+ font:inherit;font-size:13px;color:var(--rp-text-2);cursor:pointer;white-space:nowrap;font-weight:600;
360
+ }
361
+ .rp-btn:hover{background:var(--rp-inset)}
362
+ .rp-btn:disabled{opacity:.55;cursor:progress}
363
+ .rp-btn-primary{background:var(--rp-primary);border-color:var(--rp-primary);color:#fff}
364
+ .rp-btn-primary:hover{background:var(--rp-primary-dark)}
365
+ .rp-linkbtn{
366
+ border:0;background:none;padding:6px 2px;font:inherit;font-size:11.5px;
367
+ color:var(--rp-text-3);cursor:pointer;text-decoration:underline;white-space:nowrap;
368
+ }
369
+ .rp-linkbtn:hover{color:var(--rp-text-2)}
370
+ @media(max-width:620px){
371
+ body{padding:18px 13px 142px}
372
+ .rp-head{gap:12px}
373
+ .rp-title{font-size:23px;line-height:30px}
374
+ .rp-big{font-size:28px;line-height:30px}
375
+ .rp-item{padding:12px 13px 13px 14px}
376
+ .rp-item-body{padding-left:0}
377
+ .rp-sec-note{margin-left:0}
378
+ .rp-item-top .rp-statusf{width:100%;margin-top:8px}
379
+ .rp-item-top .rp-seg{width:100%;margin-top:0}
380
+ .rp-item-top .rp-seg button{flex:1;padding:6px 4px;text-align:center}
381
+ .rp-seg button{padding:6px 8px}
382
+ .rp-ev-row{grid-template-columns:minmax(0,1fr) minmax(0,1fr) 30px}
383
+ .rp-ev-row .rp-ev-type{grid-column:1/3}
384
+ .rp-bar-in{align-items:stretch}
385
+ .rp-state{flex:1 1 100%;min-width:0}
386
+ .rp-bar-actions{flex:1 1 100%}
387
+ .rp-bar-actions .rp-btn-primary{flex:1}
388
+ }
389
+
390
+ /* ============================ toast / modal ============================ */
391
+ .rp-toast{
392
+ position:fixed;left:50%;bottom:86px;transform:translateX(-50%);
393
+ max-width:min(560px,calc(100vw - 32px));padding:10px 15px;border-radius:9px;
394
+ background:rgba(20,31,46,.94);color:#fff;font-size:12.5px;line-height:18px;
395
+ box-shadow:0 6px 22px rgba(20,32,52,.22);z-index:60;
396
+ }
397
+ .rp-modal{position:fixed;inset:0;background:rgba(12,20,32,.44);display:flex;align-items:center;justify-content:center;padding:20px;z-index:70}
398
+ .rp-modal-card{
399
+ width:100%;max-width:540px;max-height:86vh;overflow:auto;background:var(--rp-surface);
400
+ border-radius:14px;padding:20px 22px;box-shadow:0 18px 48px rgba(12,20,32,.26);
401
+ }
402
+ .rp-modal-card h2{font-size:17px;line-height:24px;font-weight:700;margin:0 0 8px}
403
+ .rp-modal-card p{font-size:12.5px;line-height:19px;color:var(--rp-text-2)}
404
+ .rp-modal-list{list-style:none;display:flex;flex-direction:column;gap:6px;margin:12px 0 0}
405
+ .rp-modal-list li{padding:7px 10px;border-radius:7px;background:var(--rp-inset);font-size:12px;overflow-wrap:anywhere}
406
+ .rp-modal-list b{font-weight:650;color:var(--rp-text)}
407
+ .rp-modal-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:18px;flex-wrap:wrap}
408
+
409
+ @media(prefers-reduced-motion:reduce){
410
+ *{transition:none!important}
411
+ }
412
+ `;
package/lib/store.js CHANGED
@@ -16,6 +16,7 @@
16
16
  */
17
17
  import YAML from 'yaml';
18
18
  import { daysSince, lastProgressDate, latestProgress, normalizeStage, numberOrNull, readDimensions, scanGaps, text, } from './gap.js';
19
+ import { roundActual, roundEvidence, structuredLines } from './progress.js';
19
20
  import { parseRules } from './rules.js';
20
21
  import { parseHealthConfig, parseSignals } from './signals.js';
21
22
  import { buildBlockerBoard } from './blockers.js';
@@ -141,7 +142,7 @@ export class PocStore {
141
142
  source: rules.source,
142
143
  rulesVersion: rules.rulesVersion,
143
144
  schemaVersion: schemaVersionOf(records),
144
- schemaCurrent: records.some((record) => text(record.schema_version) === '3.1'),
145
+ schemaCurrent: records.length > 0 && records.every((record) => ['3.1', '3.2'].includes(text(record.schema_version))),
145
146
  healthSource: health.source,
146
147
  },
147
148
  warnings: [...warnings, ...rules.warnings, ...health.warnings, ...signals.warnings],
@@ -229,9 +230,12 @@ export class PocStore {
229
230
  goal: text(entry?.goal),
230
231
  scenarioIds: (entry?.scenario_ids ?? []).map(text).filter((item) => item !== ''),
231
232
  criteriaIds: (entry?.criteria_ids ?? []).map(text).filter((item) => item !== ''),
232
- actual: text(entry?.actual),
233
+ actual: entry ? roundActual(entry) : '',
234
+ ...(structuredLines(entry) ? { lines: structuredLines(entry) } : {}),
235
+ ...(Array.isArray(entry?.next_plans) ? { nextPlans: entry.next_plans } : {}),
236
+ ...(Array.isArray(entry?.stage_notes) ? { stageNotes: entry.stage_notes } : {}),
233
237
  completion: text(entry?.completion),
234
- evidence: (entry?.evidence ?? []).map((item) => ({
238
+ evidence: roundEvidence(entry).map((item) => ({
235
239
  title: text(item?.title),
236
240
  link: text(item?.link),
237
241
  type: text(item?.type),
@@ -307,7 +311,7 @@ function progressSummary(poc) {
307
311
  const type = text(last.type);
308
312
  if (type !== '')
309
313
  parts.push(type);
310
- const actual = text(last.actual);
314
+ const actual = roundActual(last);
311
315
  if (actual !== '')
312
316
  parts.push(actual.replace(/\s+/g, ' ').slice(0, 80));
313
317
  const completion = text(last.completion);
package/lib/timeline.js CHANGED
@@ -12,6 +12,7 @@
12
12
  * record the ledger actually contains.
13
13
  */
14
14
  import { normalizeStage, numberOrNull, text } from './gap.js';
15
+ import { roundActual, roundEvidence } from './progress.js';
15
16
  /** `true` when a value is a real `YYYY-MM-DD` date. */
16
17
  function isDate(value) {
17
18
  return /^\d{4}-\d{2}-\d{2}$/.test(value) && !Number.isNaN(Date.parse(`${value}T00:00:00Z`));
@@ -35,10 +36,10 @@ export function buildGlobalTimeline(records, options) {
35
36
  continue;
36
37
  }
37
38
  for (const raw of progress) {
38
- const entry = (raw ?? {});
39
- const evidence = Array.isArray(entry.evidence) ? entry.evidence : [];
40
- const customer = (entry.customer ?? {});
41
- const next = (entry.next ?? {});
39
+ const entry = raw ?? {};
40
+ const evidence = roundEvidence(entry);
41
+ const customer = entry.customer ?? {};
42
+ const next = entry.next ?? {};
42
43
  const titles = evidence
43
44
  .map((item) => text(item?.title))
44
45
  .filter((title) => title !== '');
@@ -50,7 +51,7 @@ export function buildGlobalTimeline(records, options) {
50
51
  seq: numberOrNull(entry.seq),
51
52
  type: text(entry.type),
52
53
  goal: text(entry.goal),
53
- actual: text(entry.actual),
54
+ actual: roundActual(entry),
54
55
  completion: text(entry.completion),
55
56
  evidence: titles.join(' · '),
56
57
  evidenceCount: evidence.length,
@@ -58,7 +59,7 @@ export function buildGlobalTimeline(records, options) {
58
59
  recognition: text(customer.recognition),
59
60
  gate3_1: text(entry.gate3_1),
60
61
  gate3_2: text(entry.gate3_2),
61
- nextGoal: text(next.goal),
62
+ nextGoal: Array.isArray(entry.next_plans) ? entry.next_plans.map((plan) => `${plan.goal} · ${plan.owner} · ${plan.deadline}`).join(';') : text(next.goal),
62
63
  nextOwner: text(next.owner),
63
64
  nextDeadline: text(next.deadline),
64
65
  });
package/lib/types.d.ts CHANGED
@@ -134,7 +134,40 @@ export interface RiskRecord {
134
134
  * variant to tolerate here — reading it as "no scenario links" would silently
135
135
  * demote every scenario from 已证明 back to 未开始.
136
136
  */
137
+ export interface ProgressPlanRecord {
138
+ id: string;
139
+ goal: string;
140
+ owner: string;
141
+ deadline: string;
142
+ }
143
+ export interface ProgressLineRecord {
144
+ plan_id?: string;
145
+ title: string;
146
+ status: string;
147
+ actual: string;
148
+ evidence?: EvidenceRecord[];
149
+ customer?: {
150
+ synced_with?: string;
151
+ feedback?: string;
152
+ };
153
+ scenario_ids?: string[];
154
+ criteria_ids?: string[];
155
+ completion?: string;
156
+ review?: {
157
+ gate3_1?: string;
158
+ gate3_2?: string;
159
+ recognition?: string;
160
+ };
161
+ }
137
162
  export interface ProgressRecord {
163
+ /** Structured round fields; absent on preserved v3.1 history. */
164
+ submission_id?: string;
165
+ lines?: ProgressLineRecord[];
166
+ next_plans?: ProgressPlanRecord[];
167
+ stage_notes?: {
168
+ stage: 'G0' | 'G1' | 'G2' | 'G4';
169
+ text: string;
170
+ }[];
138
171
  seq?: number | null;
139
172
  date?: string | null;
140
173
  type?: string | null;
@@ -236,7 +269,7 @@ export interface OrgRecord {
236
269
  */
237
270
  export interface PocRecord {
238
271
  /**
239
- * The data-shape version, fixed `"3.1"`.
272
+ * Data shape: legacy 3.1 or structured 3.2.
240
273
  *
241
274
  * Optional only because the reader must not crash on a file that lacks it —
242
275
  * the ledger's validator rejects such a file with `E-VERSION`, so a record
@@ -507,13 +540,16 @@ export interface RulesProvenance {
507
540
  rulesVersion: string;
508
541
  /** The data-shape version from `config/enums`/projects, when known. */
509
542
  schemaVersion: string;
510
- /** `true` when at least one project file declares `schema_version: "3.1"`. */
543
+ /** Whether every loaded project uses a recognized ledger shape. */
511
544
  schemaCurrent: boolean;
512
545
  /** The staleness limits in force, from `config/health.yaml`. */
513
546
  healthSource: 'ledger' | 'fallback';
514
547
  }
515
548
  /** One progress entry as the detail page receives it: every field present. */
516
549
  export interface ProgressView {
550
+ lines?: ProgressLineRecord[];
551
+ nextPlans?: ProgressPlanRecord[];
552
+ stageNotes?: NonNullable<ProgressRecord['stage_notes']>;
517
553
  seq: number | null;
518
554
  date: string;
519
555
  type: string;
@@ -677,18 +713,31 @@ export type PocRequest = {
677
713
  intent?: FormIntentKind;
678
714
  };
679
715
  /**
680
- * One generated collection form, ready for the browser to save.
716
+ * One generated form file, ready for the browser to save.
681
717
  *
682
- * The HTML is generated on the Host rather than in the Client because the
683
- * generator needs the YAML serializer, and bundling `yaml` into the browser
684
- * module would add ~100 KiB to a page that never otherwise parses YAML.
718
+ * A progress export is one file PER project: each project goes to a different
719
+ * owner, so a merged document would have to be split again by hand before it
720
+ * could be filled in. The HTML is generated on the Host rather than in the
721
+ * Client because the generator needs the ledger's display projection, and
722
+ * bundling that into the browser module would add weight to a page that never
723
+ * otherwise parses YAML.
685
724
  */
686
- export interface ExportFormResult {
725
+ export interface ExportFormFile {
687
726
  /** The whole self-contained document. */
688
727
  html: string;
689
- /** The suggested download name. */
728
+ /** The suggested download name (`项目名称_负责人_记录进展_日期.html`). */
690
729
  fileName: string;
691
- /** How many projects the form covers; `0` for a blank form. */
730
+ /** How many projects this file covers; `0` for a blank form. */
731
+ projectCount: number;
732
+ /** The project this file covers, or `null` for the blank new-project form. */
733
+ pocId: string | null;
734
+ }
735
+ export interface ExportFormResult {
736
+ /** One document per project, or a single blank form. */
737
+ files: ExportFormFile[];
738
+ /** How many files the export produced. */
739
+ fileCount: number;
740
+ /** How many projects the whole export covers; `0` for a blank form. */
692
741
  projectCount: number;
693
742
  }
694
743
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skillre/dsh-plugin-work-dashboard",
3
- "version": "0.12.0",
3
+ "version": "0.14.0",
4
4
  "description": "工作看板:多模块运营看板,POC 运营为首个模块(四维结果、阶段轨道、缺口清单、风险看板、时间线、导出表单)",
5
5
  "icon": "./icon.svg",
6
6
  "type": "module",