dev-process-kit 0.0.2-beta.1 → 0.0.2

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.
@@ -1 +1 @@
1
- import{ay as t,az as a,a0 as i,aA as n}from"./shared-5C6fORCL.js";const o=t(class extends a{constructor(){super(...arguments),this.key=i}render(s,e){return this.key=s,e}update(s,[e,r]){return e!==this.key&&(n(s),this.key=e),r}});export{o as i};
1
+ import{aC as t,aD as a,a1 as i,aE as n}from"./shared-CcD4vDCE.js";const o=t(class extends a{constructor(){super(...arguments),this.key=i}render(s,e){return this.key=s,e}update(s,[e,r]){return e!==this.key&&(n(s),this.key=e),r}});export{o as i};
@@ -0,0 +1,560 @@
1
+ import{_,a9 as N,aa as b,ab as c,ac as v,ad as p,au as G,af as R,ag as Y,ae as I,V as u,C as k,i as U,a3 as x,a1 as d,a2 as o,aF as J,aG as V,a7 as W,z as Q,a0 as X,T as y}from"./shared-CcD4vDCE.js";const m=_({en:{wholeDeck:"Whole deck",slideGroup:"Slide",outline:"Slides",previous:"Previous slide",next:"Next slide",position:(t,e)=>`Slide ${t} of ${e}`,commentOnSlide:"Comment on this slide",commentPlaceholder:"A question, or what should change (passed to the agent)",addComment:"Add comment",deleteComment:"Delete this comment",submitHint:"\u2318 / Ctrl + Enter",fullscreen:"Full screen",fullscreenHint:"\u2190 \u2192 to move \xB7 Esc to leave",noSlidesBefore:"There are no slides yet. Add them to ",noSlidesAfter:" in the base data."},ja:{wholeDeck:"\u30C7\u30C3\u30AD\u5168\u4F53",slideGroup:"\u30B9\u30E9\u30A4\u30C9",outline:"\u30B9\u30E9\u30A4\u30C9",previous:"\u524D\u306E\u30B9\u30E9\u30A4\u30C9",next:"\u6B21\u306E\u30B9\u30E9\u30A4\u30C9",position:(t,e)=>`${e} \u679A\u4E2D ${t} \u679A\u76EE`,commentOnSlide:"\u3053\u306E\u30B9\u30E9\u30A4\u30C9\u306B\u30B3\u30E1\u30F3\u30C8",commentPlaceholder:"\u8CEA\u554F\u3084\u3001\u5909\u3048\u3066\u307B\u3057\u3044\u3053\u3068\uFF08Agent \u306B\u6E21\u308B\uFF09",addComment:"\u30B3\u30E1\u30F3\u30C8\u3092\u8FFD\u52A0",deleteComment:"\u3053\u306E\u30B3\u30E1\u30F3\u30C8\u3092\u524A\u9664",submitHint:"\u2318 / Ctrl + Enter",fullscreen:"\u5168\u753B\u9762\u8868\u793A",fullscreenHint:"\u2190 \u2192 \u3067\u79FB\u52D5 \xB7 Esc \u3067\u623B\u308B",noSlidesBefore:"\u30B9\u30E9\u30A4\u30C9\u304C\u307E\u3060\u3042\u308A\u307E\u305B\u3093\u3002base data \u306E ",noSlidesAfter:" \u306B\u8FFD\u52A0\u3057\u3066\u304F\u3060\u3055\u3044\u3002"}}),w=["title","section","content"],Z=b({id:G,layout:c(I(w),"content"),title:R(p(),Y(1)),subtitle:c(p(),""),points:c(v(p()),[])}),$=b({title:c(p(),""),slides:c(v(Z),[])}),S=t=>{const e=N($,t),i=new Set;for(const n of e.slides){if(i.has(n.id))throw new Error(`duplicate slide id: ${n.id}`);i.add(n.id)}return{title:e.title,slides:e.slides}},C=()=>({title:"",slides:[]}),r=(t,e)=>e===void 0?-1:t.slides.findIndex(i=>i.id===e),T=(t,e)=>t.slides[r(t,e)],q=t=>t.title===""?"Slides":t.title,h=(t,e)=>`${e+1}. ${t.title}`,E=(t,e,i)=>{switch(i.type){case"slide":{const n=r(e,i.id),s=e.slides[n];return s===void 0?i.id:h(s,n)}case"page":return t.wholeDeck;default:return i.id}},A=(t,e,i)=>({title:e.type,targetLabel:E(t,i,e.target),tone:"meta"}),z=t=>`${t.type} ${u(t.target)} ${JSON.stringify(t.payload)}`,D=(t,e)=>e.slides.map((i,n)=>({value:u({type:"slide",id:i.id}),label:h(i,n),group:t.slideGroup})),M=(t,e,i)=>{const n=r(e,i.slide),s=e.slides[n];return s===void 0?null:{value:u({type:"slide",id:s.id}),label:h(s,n),group:t.slideGroup}},F=(t,e)=>{const i=t.slides[r(t,e.slide)]??t.slides[0],n={...e};return i?n.slide=i.id:delete n.slide,n},H=(t,e)=>{const i=r(t,e.slide),n=i===-1?0:i,s=t.slides[n];return s===void 0?null:{slide:s,index:n,total:t.slides.length,previous:t.slides[n-1],next:t.slides[n+1]}},ee=(t,e)=>t.filter(i=>i.type===k&&i.target.type==="slide"&&i.target.id===e).map(i=>({id:i.id,body:U(i)})).filter(i=>i.body!==""),L=(t,e)=>{switch(e.type){case"slide":return T(t,e.id)!==void 0;case"page":return!0;default:return!1}},P=t=>{const e=m(t);return{name:"slides",label:"Slides",parseBase:S,emptyBase:C,actions:{},apply:()=>null,hasTarget:L,describe:(i,n)=>A(e,i,n),serialize:z,resolveNavigation:F,commentTargets:i=>D(e,i),currentTarget:(i,n)=>M(e,i,n),title:q}},te={ArrowRight:"next",PageDown:"next",ArrowLeft:"previous",PageUp:"previous",Home:"first",End:"last"},O=t=>t.altKey===!0||t.ctrlKey===!0||t.metaKey===!0||t.shiftKey===!0?null:te[t.key]??null,j=(t,e,i)=>{const n=t.slides.length-1;if(n<0)return;const s=Math.max(r(t,e),0),a={next:Math.min(s+1,n),previous:Math.max(s-1,0),first:0,last:n}[i];return t.slides[a]?.id},ie=(t,e)=>{const{state:i,navigation:n}=t,s=n.slide;return o`
2
+ <nav class="outline" aria-label=${e.outline}>
3
+ <div class="outline-head">
4
+ <span class="dpk-label">${e.outline}</span>
5
+ <span class="dpk-label">${i.slides.length}</span>
6
+ </div>
7
+ <ol class="outline-list">
8
+ ${x(i.slides,a=>a.id,(a,l)=>{const f=a.id===s,g=t.commentCount({type:"slide",id:a.id});return o`
9
+ <li class="outline-row" data-current=${String(f)} data-layout=${a.layout}>
10
+ <a href=${t.hashFor({slide:a.id})} aria-current=${f?"page":d}>
11
+ <span class="outline-index">${String(l+1).padStart(2,"0")}</span>
12
+ <span class="outline-title">${a.title}</span>
13
+ ${g>0?o`<span class="outline-note">${g}</span>`:d}
14
+ </a>
15
+ </li>
16
+ `})}
17
+ </ol>
18
+ </nav>
19
+ `},ne=(t,e,i)=>{const n=H(t.state,t.navigation);if(n===null)return o`<div class="deck">
20
+ <p class="deck-empty">${e.noSlidesBefore}<code>slides</code>${e.noSlidesAfter}</p>
21
+ </div>`;const{slide:s,index:a,total:l}=n;return o`
22
+ <div class="deck">
23
+ <div class="stage">${se(s,a)}</div>
24
+ <div class="deck-bar">
25
+ <div class="deck-move">
26
+ <button
27
+ class="dpk-icon-btn deck-prev"
28
+ type="button"
29
+ aria-label=${e.previous}
30
+ title=${e.previous}
31
+ ?disabled=${n.previous===void 0}
32
+ @click=${()=>i.onStep("previous")}
33
+ >
34
+ ${J()}
35
+ </button>
36
+ <span class="deck-counter" role="status" aria-label=${e.position(a+1,l)}>
37
+ <strong>${a+1}</strong> / ${l}
38
+ </span>
39
+ <button
40
+ class="dpk-icon-btn deck-next"
41
+ type="button"
42
+ aria-label=${e.next}
43
+ title=${e.next}
44
+ ?disabled=${n.next===void 0}
45
+ @click=${()=>i.onStep("next")}
46
+ >
47
+ ${V()}
48
+ </button>
49
+ </div>
50
+ <div class="deck-progress" aria-hidden="true">
51
+ <span style=${`width:${(a+1)/l*100}%`}></span>
52
+ </div>
53
+ ${i.canFullscreen?o`<button
54
+ class="dpk-btn deck-fullscreen"
55
+ type="button"
56
+ title=${e.fullscreenHint}
57
+ @click=${i.onFullscreen}
58
+ >
59
+ ${W()} ${e.fullscreen}
60
+ </button>`:d}
61
+ </div>
62
+ ${le(e,s,ee(t.comments,s.id),i)}
63
+ ${ae(t.state,s.id)}
64
+ </div>
65
+ `},se=(t,e)=>o`
66
+ <article
67
+ class="slide"
68
+ data-layout=${t.layout}
69
+ aria-roledescription="slide"
70
+ aria-label=${`${e+1}. ${t.title}`}
71
+ >
72
+ <div class="slide-content">
73
+ <h2 class="slide-title">${t.title}</h2>
74
+ ${t.subtitle===""?d:o`<p class="slide-subtitle">${t.subtitle}</p>`}
75
+ ${t.points.length===0?d:o`<ul class="slide-points">
76
+ ${t.points.map(i=>o`<li>${i}</li>`)}
77
+ </ul>`}
78
+ <div class="slide-body"><slot name=${`preview:${t.id}`}></slot></div>
79
+ </div>
80
+ <span class="slide-number" aria-hidden="true">${e+1}</span>
81
+ </article>
82
+ `,le=(t,e,i,n)=>{const s=n.draftFor(e.id),a=s.trim()!=="";return o`
83
+ <section class="slide-comments" aria-label=${t.commentOnSlide}>
84
+ ${i.length===0?d:o`<ul class="slide-comment-list">
85
+ ${x(i,l=>l.id,l=>o`<li>
86
+ <span class="slide-comment-body">${l.body}</span>
87
+ <button
88
+ class="dpk-icon-btn slide-comment-delete"
89
+ type="button"
90
+ aria-label=${t.deleteComment}
91
+ title=${t.deleteComment}
92
+ @click=${()=>n.onDeleteComment(l.id)}
93
+ >
94
+ ${Q()}
95
+ </button>
96
+ </li>`)}
97
+ </ul>`}
98
+ <div class="slide-comment-form">
99
+ <textarea
100
+ class="dpk-textarea slide-comment-input"
101
+ aria-label=${t.commentOnSlide}
102
+ placeholder=${t.commentPlaceholder}
103
+ .value=${s}
104
+ @input=${l=>{l.currentTarget instanceof HTMLTextAreaElement&&n.onDraft(e.id,l.currentTarget.value)}}
105
+ @keydown=${l=>{l.isComposing||l.key!=="Enter"||!(l.metaKey||l.ctrlKey)||(l.preventDefault(),a&&n.onComment(e.id))}}
106
+ ></textarea>
107
+ <div class="slide-comment-actions">
108
+ <button
109
+ class="dpk-btn dpk-btn--accent slide-comment-submit"
110
+ type="button"
111
+ ?disabled=${!a}
112
+ @click=${()=>n.onComment(e.id)}
113
+ >
114
+ ${t.addComment}
115
+ </button>
116
+ <span class="slide-comment-hint">${t.submitHint}</span>
117
+ </div>
118
+ </div>
119
+ </section>
120
+ `},ae=(t,e)=>{const i=t.slides.filter(n=>n.id!==e);return i.length===0?d:o`<div class="parked" aria-hidden="true">
121
+ ${i.map(n=>o`<slot name=${`preview:${n.id}`}></slot>`)}
122
+ </div>`},oe=X`
123
+ /* ------------------------------------------------------------ outline */
124
+
125
+ .outline-head {
126
+ display: flex;
127
+ justify-content: space-between;
128
+ padding: 0 6px 8px;
129
+ }
130
+
131
+ .outline-list {
132
+ display: grid;
133
+ gap: 2px;
134
+ margin: 0;
135
+ padding: 0;
136
+ list-style: none;
137
+ }
138
+
139
+ .outline-row a {
140
+ display: flex;
141
+ align-items: baseline;
142
+ gap: 10px;
143
+ padding: 7px 8px;
144
+ border-radius: var(--dpk-radius-sm);
145
+ color: var(--dpk-ink-soft);
146
+ font-size: 13px;
147
+ line-height: 1.4;
148
+ text-decoration: none;
149
+ transition:
150
+ background 140ms ease,
151
+ color 140ms ease;
152
+ }
153
+
154
+ .outline-row a:hover {
155
+ background: var(--dpk-paper-raised);
156
+ color: var(--dpk-ink);
157
+ }
158
+
159
+ .outline-row a:focus-visible {
160
+ outline: none;
161
+ box-shadow: var(--dpk-focus);
162
+ }
163
+
164
+ .outline-row[data-current='true'] a {
165
+ background: var(--dpk-paper-raised);
166
+ color: var(--dpk-ink);
167
+ box-shadow: var(--dpk-shadow-xs);
168
+ }
169
+
170
+ /* A section slide opens a chapter: it reads as a heading in the outline. */
171
+ .outline-row[data-layout='section']:not(:first-child) {
172
+ margin-top: 10px;
173
+ }
174
+
175
+ .outline-row[data-layout='section'] .outline-title,
176
+ .outline-row[data-layout='title'] .outline-title {
177
+ font-weight: 620;
178
+ color: var(--dpk-ink);
179
+ }
180
+
181
+ .outline-index {
182
+ flex: none;
183
+ font-family: var(--dpk-mono);
184
+ font-size: 10.5px;
185
+ font-variant-numeric: tabular-nums;
186
+ color: var(--dpk-ink-faint);
187
+ }
188
+
189
+ .outline-row[data-current='true'] .outline-index {
190
+ color: var(--dpk-accent);
191
+ }
192
+
193
+ .outline-title {
194
+ flex: 1;
195
+ min-width: 0;
196
+ }
197
+
198
+ .outline-note {
199
+ flex: none;
200
+ min-width: 18px;
201
+ padding: 1px 6px;
202
+ border-radius: 999px;
203
+ background: var(--dpk-accent-soft);
204
+ color: var(--dpk-accent);
205
+ font-family: var(--dpk-mono);
206
+ font-size: 10px;
207
+ text-align: center;
208
+ }
209
+
210
+ /* -------------------------------------------------------------- deck */
211
+
212
+ .deck {
213
+ display: grid;
214
+ /* The column follows the main area, not the widest thing in it. */
215
+ grid-template-columns: minmax(0, 1fr);
216
+ gap: 14px;
217
+ justify-items: center;
218
+ }
219
+
220
+ .deck-empty {
221
+ margin: 48px auto;
222
+ color: var(--dpk-ink-faint);
223
+ }
224
+
225
+ .stage {
226
+ display: flex;
227
+ justify-content: center;
228
+ width: 100%;
229
+ }
230
+
231
+ /*
232
+ * As wide as the column allows, but never taller than the window leaves room
233
+ * for: the header, the bar and the comments beneath (the list at its full
234
+ * height and the form) and the padding around them. The form stays on screen.
235
+ */
236
+ .slide {
237
+ position: relative;
238
+ width: min(100%, 1180px, max(420px, calc((100dvh - 340px) * 16 / 9)));
239
+ aspect-ratio: 16 / 9;
240
+ overflow: hidden;
241
+ container-type: inline-size;
242
+ border: 1px solid var(--dpk-rule);
243
+ border-radius: var(--dpk-radius-lg);
244
+ background: var(--dpk-paper-raised);
245
+ box-shadow: var(--dpk-shadow);
246
+ }
247
+
248
+ .slide-content {
249
+ position: absolute;
250
+ inset: 0;
251
+ display: flex;
252
+ flex-direction: column;
253
+ gap: 2.2cqw;
254
+ padding: 5.5cqw 6.5cqw 5cqw;
255
+ overflow: auto;
256
+ font-size: 2.1cqw;
257
+ line-height: 1.55;
258
+ color: var(--dpk-ink-soft);
259
+ }
260
+
261
+ .slide-title {
262
+ font-size: 3.6cqw;
263
+ font-weight: 680;
264
+ line-height: 1.2;
265
+ letter-spacing: -0.015em;
266
+ color: var(--dpk-ink);
267
+ }
268
+
269
+ .slide-subtitle {
270
+ margin: 0;
271
+ font-size: 2.4cqw;
272
+ color: var(--dpk-ink-soft);
273
+ }
274
+
275
+ .slide-points {
276
+ display: grid;
277
+ gap: 1.3cqw;
278
+ margin: 0;
279
+ padding: 0;
280
+ list-style: none;
281
+ font-size: 2.5cqw;
282
+ color: var(--dpk-ink);
283
+ }
284
+
285
+ .slide-points li {
286
+ position: relative;
287
+ padding-left: 2.6cqw;
288
+ }
289
+
290
+ .slide-points li::before {
291
+ content: '';
292
+ position: absolute;
293
+ left: 0.2cqw;
294
+ top: 0.62em;
295
+ width: 0.9cqw;
296
+ height: 0.9cqw;
297
+ border-radius: 50%;
298
+ background: var(--dpk-accent);
299
+ }
300
+
301
+ .slide-body {
302
+ flex: 1 1 auto;
303
+ min-height: 0;
304
+ }
305
+
306
+ .slide-body ::slotted(*) {
307
+ margin: 0;
308
+ }
309
+
310
+ .slide-number {
311
+ position: absolute;
312
+ right: 2.6cqw;
313
+ bottom: 2cqw;
314
+ font-family: var(--dpk-mono);
315
+ font-size: 1.2cqw;
316
+ font-variant-numeric: tabular-nums;
317
+ color: var(--dpk-ink-faint);
318
+ }
319
+
320
+ /* The cover: large title, the subtitle beneath, an accent rule on the left. */
321
+ .slide[data-layout='title'] .slide-content {
322
+ justify-content: center;
323
+ padding-left: 9cqw;
324
+ }
325
+
326
+ .slide[data-layout='title'] .slide-content::before {
327
+ content: '';
328
+ position: absolute;
329
+ left: 6.5cqw;
330
+ top: 50%;
331
+ width: 0.5cqw;
332
+ height: 16cqw;
333
+ border-radius: 999px;
334
+ background: var(--dpk-accent);
335
+ transform: translateY(-50%);
336
+ }
337
+
338
+ .slide[data-layout='title'] .slide-title {
339
+ font-size: 5.6cqw;
340
+ }
341
+
342
+ .slide[data-layout='title'] .slide-body,
343
+ .slide[data-layout='section'] .slide-body {
344
+ flex: 0 0 auto;
345
+ }
346
+
347
+ /* A chapter divider: the title alone, on the accent tint. */
348
+ .slide[data-layout='section'] {
349
+ background: linear-gradient(135deg, var(--dpk-accent-soft), transparent 70%), var(--dpk-paper-raised);
350
+ }
351
+
352
+ .slide[data-layout='section'] .slide-content {
353
+ justify-content: center;
354
+ }
355
+
356
+ .slide[data-layout='section'] .slide-title {
357
+ font-size: 4.8cqw;
358
+ }
359
+
360
+ .slide[data-layout='section'] .slide-title::after {
361
+ content: '';
362
+ display: block;
363
+ width: 7cqw;
364
+ height: 0.5cqw;
365
+ margin-top: 2.4cqw;
366
+ border-radius: 999px;
367
+ background: var(--dpk-accent);
368
+ }
369
+
370
+ /* Full screen: the stage alone, the slide as large as the screen allows. */
371
+ .stage:fullscreen {
372
+ align-items: center;
373
+ background: var(--dpk-paper-sunken);
374
+ }
375
+
376
+ .stage:fullscreen .slide {
377
+ width: min(100vw, calc(100vh * 16 / 9));
378
+ border: none;
379
+ border-radius: 0;
380
+ box-shadow: none;
381
+ }
382
+
383
+ /* ---------------------------------------------------------------- bar */
384
+
385
+ .deck-bar {
386
+ display: flex;
387
+ flex-wrap: wrap;
388
+ align-items: center;
389
+ gap: 8px 12px;
390
+ width: min(100%, 1180px);
391
+ }
392
+
393
+ .deck-move {
394
+ display: inline-flex;
395
+ align-items: center;
396
+ gap: 4px;
397
+ }
398
+
399
+ .deck-move .dpk-icon-btn {
400
+ width: 30px;
401
+ height: 30px;
402
+ }
403
+
404
+ .deck-counter {
405
+ min-width: 54px;
406
+ font-family: var(--dpk-mono);
407
+ font-size: 12px;
408
+ font-variant-numeric: tabular-nums;
409
+ text-align: center;
410
+ color: var(--dpk-ink-faint);
411
+ }
412
+
413
+ .deck-counter strong {
414
+ color: var(--dpk-ink);
415
+ font-weight: 600;
416
+ }
417
+
418
+ .deck-progress {
419
+ flex: 1 1 80px;
420
+ height: 3px;
421
+ border-radius: 999px;
422
+ background: var(--dpk-paper-inset);
423
+ overflow: hidden;
424
+ }
425
+
426
+ .deck-progress span {
427
+ display: block;
428
+ height: 100%;
429
+ border-radius: inherit;
430
+ background: var(--dpk-accent);
431
+ transition: width 200ms ease;
432
+ }
433
+
434
+ .deck-bar .dpk-btn svg {
435
+ width: 14px;
436
+ height: 14px;
437
+ }
438
+
439
+ /* ----------------------------------------------------------- comments */
440
+
441
+ .slide-comments {
442
+ display: grid;
443
+ gap: 8px;
444
+ width: min(100%, 1180px);
445
+ }
446
+
447
+ /* About three short comments; more scroll inside the list, not the page. */
448
+ .slide-comment-list {
449
+ display: grid;
450
+ align-content: start;
451
+ gap: 6px;
452
+ max-height: 96px;
453
+ margin: 0;
454
+ padding: 0;
455
+ overflow-y: auto;
456
+ overscroll-behavior: contain;
457
+ list-style: none;
458
+ }
459
+
460
+ .slide-comment-list li {
461
+ display: flex;
462
+ align-items: flex-start;
463
+ gap: 8px;
464
+ padding: 6px 6px 6px 12px;
465
+ border-left: 2px solid var(--dpk-accent);
466
+ border-radius: 0 var(--dpk-radius-sm) var(--dpk-radius-sm) 0;
467
+ background: var(--dpk-paper-sunken);
468
+ font-size: 13px;
469
+ line-height: 1.55;
470
+ color: var(--dpk-ink);
471
+ white-space: pre-wrap;
472
+ overflow-wrap: anywhere;
473
+ }
474
+
475
+ .slide-comment-body {
476
+ flex: 1;
477
+ min-width: 0;
478
+ }
479
+
480
+ .slide-comment-delete {
481
+ flex: none;
482
+ width: 22px;
483
+ height: 22px;
484
+ opacity: 0.55;
485
+ }
486
+
487
+ .slide-comment-list li:hover .slide-comment-delete,
488
+ .slide-comment-delete:focus-visible {
489
+ opacity: 1;
490
+ }
491
+
492
+ .slide-comment-delete svg {
493
+ width: 12px;
494
+ height: 12px;
495
+ }
496
+
497
+ .slide-comment-form {
498
+ display: grid;
499
+ grid-template-columns: minmax(0, 1fr) auto;
500
+ gap: 10px;
501
+ align-items: start;
502
+ }
503
+
504
+ .slide-comment-input {
505
+ height: 60px;
506
+ min-height: 60px;
507
+ resize: none;
508
+ }
509
+
510
+ .slide-comment-actions {
511
+ display: grid;
512
+ justify-items: end;
513
+ gap: 6px;
514
+ }
515
+
516
+ .slide-comment-hint {
517
+ font-family: var(--dpk-mono);
518
+ font-size: 10.5px;
519
+ color: var(--dpk-ink-faint);
520
+ white-space: nowrap;
521
+ }
522
+
523
+ @media (max-width: 560px) {
524
+ .slide-comment-body {
525
+ flex: 1;
526
+ min-width: 0;
527
+ }
528
+
529
+ .slide-comment-delete {
530
+ flex: none;
531
+ width: 22px;
532
+ height: 22px;
533
+ opacity: 0.55;
534
+ }
535
+
536
+ .slide-comment-list li:hover .slide-comment-delete,
537
+ .slide-comment-delete:focus-visible {
538
+ opacity: 1;
539
+ }
540
+
541
+ .slide-comment-delete svg {
542
+ width: 12px;
543
+ height: 12px;
544
+ }
545
+
546
+ .slide-comment-form {
547
+ grid-template-columns: minmax(0, 1fr);
548
+ }
549
+ }
550
+
551
+ .parked {
552
+ display: none;
553
+ }
554
+
555
+ @media (prefers-reduced-motion: reduce) {
556
+ .deck-progress span {
557
+ transition: none;
558
+ }
559
+ }
560
+ `,de='input, textarea, select, [contenteditable]:not([contenteditable="false"])',re=t=>t instanceof HTMLElement&&(t.isContentEditable||t.matches(de));class B extends y{static{this.styles=[y.styles,oe]}#e=new Map;#t={slide:"",count:0};definitionFor(e){return P(e)}connectedCallback(){super.connectedCallback(),document.addEventListener("keydown",this.#s)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("keydown",this.#s)}renderRegions(e){const i=m(this.locale);return{sidebar:ie(e,i),sidebarHidden:e.state.slides.length===0,main:ne(e,i,{canFullscreen:document.fullscreenEnabled===!0,draftFor:n=>this.#e.get(n)??"",onStep:n=>this.#i(n),onFullscreen:()=>this.#o(),onDraft:(n,s)=>this.#n(n,s),onComment:n=>this.#a(n),onDeleteComment:n=>this.removeAction(n)})}}updated(){super.updated(),this.#l()}#l(){const e=this.renderRoot.querySelector(".slide-comment-list"),i={slide:this.navigation.slide??"",count:e?.childElementCount??0},n=this.#t;this.#t=i,!(e===null||i.slide===n.slide&&i.count<=n.count)&&(e.scrollTop=e.scrollHeight)}#i(e){const i=j(this.derivation.state,this.navigation.slide,e);i!==void 0&&this.navigate({slide:i})}#n(e,i){const n=new Map(this.#e);i===""?n.delete(e):n.set(e,i),this.#e=n,this.requestUpdate()}#a(e){const i=(this.#e.get(e)??"").trim();if(i==="")return;this.dispatch({type:k,target:{type:"slide",id:e},payload:{body:i}}).ok&&this.#n(e,"")}#o(){const e=this.renderRoot.querySelector(".stage");!(e instanceof HTMLElement)||document.fullscreenElement!==null||e.requestFullscreen().catch(()=>{})}#s=e=>{if(e.defaultPrevented)return;const i=O(e);i===null||e.composedPath().some(re)||(e.preventDefault(),this.#i(i))}}const K=()=>{customElements.get("dpk-template-slides")||customElements.define("dpk-template-slides",B)},ce=Object.freeze(Object.defineProperty({__proto__:null,DpkTemplateSlides:B,SLIDE_LAYOUTS:w,defineSlidesElement:K,describeSlidesAction:A,emptySlidesBase:C,findSlide:T,findSlideIndex:r,parseSlidesBase:S,resolveSlidesNavigation:F,serializeSlidesAction:z,slideKeyStep:O,slidePosition:H,slidesBaseSchema:$,slidesCommentTargets:D,slidesCurrentTarget:M,slidesDefinitionFor:P,slidesHasTarget:L,slidesMessages:m,slidesTargetLabel:E,slidesTitle:q,stepSlide:j},Symbol.toStringTag,{value:"Module"}));export{K as d,ce as i};