dev-process-kit 0.0.2-beta.1 → 0.0.3
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/README.md +22 -9
- package/dist/chunks/shared-B2K3LoOU.js +1016 -0
- package/dist/chunks/shared-BqW3KAJ4.js +613 -0
- package/dist/chunks/shared-Byv6cc0r.js +2779 -0
- package/dist/chunks/{shared-CmM4cgd6.js → shared-CKG_SQh5.js} +1 -1
- package/dist/chunks/shared-CPAT0Cgk.js +29 -0
- package/dist/chunks/shared-CwbzACTe.js +1874 -0
- package/dist/chunks/shared-DBDgdVsd.js +1 -0
- package/dist/chunks/shared-DMlMTd3c.js +1018 -0
- package/dist/chunks/shared-DaoPCw6-.js +556 -0
- package/dist/chunks/shared-DqB_TR20.js +1599 -0
- package/dist/chunks/shared-DsVxrO_3.js +609 -0
- package/dist/chunks/shared-iQIywbRc.js +676 -0
- package/dist/chunks/shared-xrCdgpNS.js +1 -0
- package/dist/components.js +1 -1
- package/dist/index.js +1 -1
- package/dist/templates/event-storming.js +1 -1
- package/dist/templates/example-mapping.js +1 -1
- package/dist/templates/grill.js +1 -1
- package/dist/templates/plain.js +1 -1
- package/dist/templates/prototype.js +1 -1
- package/dist/templates/slides.js +1 -0
- package/dist/templates/task-board.js +1 -0
- package/dist/templates/usm.js +1 -1
- package/package.json +4 -2
- package/dist/chunks/shared-5C6fORCL.js +0 -1404
- package/dist/chunks/shared-B1lFGiYZ.js +0 -1
- package/dist/chunks/shared-BEjjbZ0X.js +0 -2543
- package/dist/chunks/shared-BFAVBf4I.js +0 -1
- package/dist/chunks/shared-BybvAQye.js +0 -579
- package/dist/chunks/shared-DKxAm7wL.js +0 -27
- package/dist/chunks/shared-DgusMFKr.js +0 -1
- package/dist/chunks/shared-Dx0MEuAf.js +0 -921
- package/dist/chunks/shared-RclF4vSf.js +0 -692
- package/dist/chunks/shared-ao1beBgL.js +0 -544
- package/dist/chunks/shared-eiZoh1aF.js +0 -521
|
@@ -0,0 +1,613 @@
|
|
|
1
|
+
import{_,a9 as N,aa as f,ab as c,ac as k,ad as p,au as G,af as R,ag as Y,ae as I,V as u,C as v,i as U,a3 as x,a1 as l,a2 as d,aG as J,ay as V,a7 as W,z as Q,a0 as X,T as w}from"./shared-CwbzACTe.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"}}),y=["title","section","content"],Z=f({id:G,layout:c(I(y),"content"),title:R(p(),Y(1)),subtitle:c(p(),""),points:c(k(p()),[])}),$=f({title:c(p(),""),slides:c(k(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}},H=(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},L=(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===v&&i.target.type==="slide"&&i.target.id===e).map(i=>({id:i.id,body:U(i)})).filter(i=>i.body!==""),P=(t,e)=>{switch(e.type){case"slide":return T(t,e.id)!==void 0;case"page":return!0;default:return!1}},F=t=>{const e=m(t);return{name:"slides",label:"Slides",parseBase:S,emptyBase:C,actions:{},apply:()=>null,hasTarget:P,describe:(i,n)=>A(e,i,n),serialize:z,resolveNavigation:H,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),o={next:Math.min(s+1,n),previous:Math.max(s-1,0),first:0,last:n}[i];return t.slides[o]?.id},ie=(t,e)=>{const{state:i,navigation:n}=t,s=n.slide;return d`
|
|
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,o=>o.id,(o,a)=>{const g=o.id===s,b=t.commentCount({type:"slide",id:o.id});return d`
|
|
9
|
+
<li class="outline-row" data-current=${String(g)} data-layout=${o.layout}>
|
|
10
|
+
<a href=${t.hashFor({slide:o.id})} aria-current=${g?"page":l}>
|
|
11
|
+
<span class="outline-index">${String(a+1).padStart(2,"0")}</span>
|
|
12
|
+
<span class="outline-title">${o.title}</span>
|
|
13
|
+
${b>0?d`<span class="outline-note">${b}</span>`:l}
|
|
14
|
+
</a>
|
|
15
|
+
</li>
|
|
16
|
+
`})}
|
|
17
|
+
</ol>
|
|
18
|
+
</nav>
|
|
19
|
+
`},ne=(t,e,i)=>{const n=L(t.state,t.navigation);if(n===null)return d`<div class="deck">
|
|
20
|
+
<p class="deck-empty">${e.noSlidesBefore}<code>slides</code>${e.noSlidesAfter}</p>
|
|
21
|
+
</div>`;const{slide:s,index:o,total:a}=n;return d`
|
|
22
|
+
<div class="deck">
|
|
23
|
+
<div class="stage">${se(s,o)}</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(o+1,a)}>
|
|
37
|
+
<strong>${o+1}</strong> / ${a}
|
|
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:${(o+1)/a*100}%`}></span>
|
|
52
|
+
</div>
|
|
53
|
+
${i.canFullscreen?d`<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>`:l}
|
|
61
|
+
</div>
|
|
62
|
+
${ae(e,s,ee(t.comments,s.id),i)}
|
|
63
|
+
${oe(t.state,s.id)}
|
|
64
|
+
</div>
|
|
65
|
+
`},se=(t,e)=>d`
|
|
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===""?l:d`<p class="slide-subtitle">${t.subtitle}</p>`}
|
|
75
|
+
${t.points.length===0?l:d`<ul class="slide-points">
|
|
76
|
+
${t.points.map(i=>d`<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
|
+
`,ae=(t,e,i,n)=>{const s=n.draftFor(e.id),o=s.trim()!=="";return d`
|
|
83
|
+
<section class="slide-comments" aria-label=${t.commentOnSlide}>
|
|
84
|
+
${i.length===0?l:d`<ul class="slide-comment-list">
|
|
85
|
+
${x(i,a=>a.id,a=>d`<li>
|
|
86
|
+
<span class="slide-comment-body">${a.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(a.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=${a=>{a.currentTarget instanceof HTMLTextAreaElement&&n.onDraft(e.id,a.currentTarget.value)}}
|
|
105
|
+
@keydown=${a=>{a.isComposing||a.key!=="Enter"||!(a.metaKey||a.ctrlKey)||(a.preventDefault(),o&&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=${!o}
|
|
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
|
+
`},oe=(t,e)=>{const i=t.slides.filter(n=>n.id!==e);return i.length===0?l:d`<div class="parked" aria-hidden="true">
|
|
121
|
+
${i.map(n=>d`<slot name=${`preview:${n.id}`}></slot>`)}
|
|
122
|
+
</div>`},de=X`
|
|
123
|
+
/* ------------------------------------------------------------ outline */
|
|
124
|
+
|
|
125
|
+
.outline-head {
|
|
126
|
+
display: flex;
|
|
127
|
+
justify-content: space-between;
|
|
128
|
+
padding: 0 6px 8px;
|
|
129
|
+
border-bottom: 1px solid var(--dpk-rule);
|
|
130
|
+
margin-bottom: 6px;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
.outline-list {
|
|
134
|
+
display: grid;
|
|
135
|
+
gap: 2px;
|
|
136
|
+
margin: 0;
|
|
137
|
+
padding: 0;
|
|
138
|
+
list-style: none;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.outline-row {
|
|
142
|
+
position: relative;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.outline-row::before {
|
|
146
|
+
content: '';
|
|
147
|
+
position: absolute;
|
|
148
|
+
left: 0;
|
|
149
|
+
top: 6px;
|
|
150
|
+
bottom: 6px;
|
|
151
|
+
width: 3px;
|
|
152
|
+
border-radius: var(--dpk-radius-xs);
|
|
153
|
+
background: transparent;
|
|
154
|
+
transition: background 140ms var(--dpk-ease);
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
.outline-row a {
|
|
158
|
+
display: flex;
|
|
159
|
+
align-items: baseline;
|
|
160
|
+
gap: 10px;
|
|
161
|
+
padding: 7px 8px 7px 14px;
|
|
162
|
+
border-radius: var(--dpk-radius-sm);
|
|
163
|
+
color: var(--dpk-ink-soft);
|
|
164
|
+
font-size: 13px;
|
|
165
|
+
line-height: 1.4;
|
|
166
|
+
text-decoration: none;
|
|
167
|
+
transition:
|
|
168
|
+
background 140ms var(--dpk-ease),
|
|
169
|
+
color 140ms var(--dpk-ease),
|
|
170
|
+
box-shadow 140ms var(--dpk-ease);
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
.outline-row a:hover {
|
|
174
|
+
background: var(--dpk-paper-raised);
|
|
175
|
+
color: var(--dpk-ink);
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
.outline-row a:focus-visible {
|
|
179
|
+
outline: none;
|
|
180
|
+
box-shadow: var(--dpk-focus);
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
.outline-row[data-current='true']::before {
|
|
184
|
+
background: linear-gradient(180deg, var(--dpk-accent-bright), var(--dpk-accent-strong));
|
|
185
|
+
box-shadow: 0 0 8px color-mix(in srgb, var(--dpk-accent) 45%, transparent);
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
.outline-row[data-current='true'] a {
|
|
189
|
+
background: color-mix(in srgb, var(--dpk-accent) 8%, var(--dpk-paper-raised));
|
|
190
|
+
color: var(--dpk-ink);
|
|
191
|
+
box-shadow:
|
|
192
|
+
inset 0 0 0 1px color-mix(in srgb, var(--dpk-accent) 20%, transparent),
|
|
193
|
+
var(--dpk-shadow-xs);
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
/* A section slide opens a chapter: it reads as a heading in the outline. */
|
|
197
|
+
.outline-row[data-layout='section']:not(:first-child) {
|
|
198
|
+
margin-top: 10px;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
.outline-row[data-layout='section'] .outline-title,
|
|
202
|
+
.outline-row[data-layout='title'] .outline-title {
|
|
203
|
+
font-weight: 620;
|
|
204
|
+
color: var(--dpk-ink);
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
.outline-index {
|
|
208
|
+
flex: none;
|
|
209
|
+
font-family: var(--dpk-mono);
|
|
210
|
+
font-size: 10.5px;
|
|
211
|
+
font-variant-numeric: tabular-nums;
|
|
212
|
+
color: var(--dpk-ink-faint);
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
.outline-row[data-current='true'] .outline-index {
|
|
216
|
+
color: var(--dpk-accent);
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
.outline-title {
|
|
220
|
+
flex: 1;
|
|
221
|
+
min-width: 0;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
.outline-note {
|
|
225
|
+
flex: none;
|
|
226
|
+
min-width: 18px;
|
|
227
|
+
padding: 1px 6px;
|
|
228
|
+
border-radius: 999px;
|
|
229
|
+
background: var(--dpk-accent-soft);
|
|
230
|
+
color: var(--dpk-accent);
|
|
231
|
+
font-family: var(--dpk-mono);
|
|
232
|
+
font-size: 10px;
|
|
233
|
+
text-align: center;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
/* -------------------------------------------------------------- deck */
|
|
237
|
+
|
|
238
|
+
.deck {
|
|
239
|
+
display: grid;
|
|
240
|
+
/* The column follows the main area, not the widest thing in it. */
|
|
241
|
+
grid-template-columns: minmax(0, 1fr);
|
|
242
|
+
gap: 14px;
|
|
243
|
+
justify-items: center;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
.deck-empty {
|
|
247
|
+
margin: 48px auto;
|
|
248
|
+
color: var(--dpk-ink-faint);
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
/*
|
|
252
|
+
* The work surface the slide is projected onto: a quiet dot lattice, sunken
|
|
253
|
+
* a shade below the page, so the slide's own shadow has somewhere to land.
|
|
254
|
+
*/
|
|
255
|
+
.stage {
|
|
256
|
+
display: flex;
|
|
257
|
+
justify-content: center;
|
|
258
|
+
width: 100%;
|
|
259
|
+
padding: 28px;
|
|
260
|
+
border: 1px solid var(--dpk-rule);
|
|
261
|
+
border-radius: var(--dpk-radius-xl);
|
|
262
|
+
background: var(--dpk-dots), var(--dpk-paper-sunken);
|
|
263
|
+
box-shadow: inset 0 1px 3px var(--dpk-shade-1);
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
/*
|
|
267
|
+
* As wide as the column allows, but never taller than the window leaves room
|
|
268
|
+
* for: the header, the bar and the comments beneath (the list at its full
|
|
269
|
+
* height and the form) and the padding around them. The form stays on screen.
|
|
270
|
+
*/
|
|
271
|
+
.slide {
|
|
272
|
+
position: relative;
|
|
273
|
+
width: min(100%, 1180px, max(420px, calc((100dvh - 340px) * 16 / 9)));
|
|
274
|
+
aspect-ratio: 16 / 9;
|
|
275
|
+
overflow: hidden;
|
|
276
|
+
container-type: inline-size;
|
|
277
|
+
border: 1px solid var(--dpk-rule);
|
|
278
|
+
border-radius: var(--dpk-radius-lg);
|
|
279
|
+
background: var(--dpk-paper-raised);
|
|
280
|
+
box-shadow: var(--dpk-bevel), var(--dpk-shadow-lg);
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
.slide-content {
|
|
284
|
+
position: absolute;
|
|
285
|
+
inset: 0;
|
|
286
|
+
display: flex;
|
|
287
|
+
flex-direction: column;
|
|
288
|
+
gap: 2.2cqw;
|
|
289
|
+
padding: 5.5cqw 6.5cqw 5cqw;
|
|
290
|
+
overflow: auto;
|
|
291
|
+
font-size: 2.1cqw;
|
|
292
|
+
line-height: 1.55;
|
|
293
|
+
color: var(--dpk-ink-soft);
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
.slide-title {
|
|
297
|
+
font-size: 3.6cqw;
|
|
298
|
+
font-weight: 680;
|
|
299
|
+
line-height: 1.2;
|
|
300
|
+
letter-spacing: -0.015em;
|
|
301
|
+
color: var(--dpk-ink);
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
.slide-subtitle {
|
|
305
|
+
margin: 0;
|
|
306
|
+
font-size: 2.4cqw;
|
|
307
|
+
color: var(--dpk-ink-soft);
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
.slide-points {
|
|
311
|
+
display: grid;
|
|
312
|
+
gap: 1.3cqw;
|
|
313
|
+
margin: 0;
|
|
314
|
+
padding: 0;
|
|
315
|
+
list-style: none;
|
|
316
|
+
font-size: 2.5cqw;
|
|
317
|
+
color: var(--dpk-ink);
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
.slide-points li {
|
|
321
|
+
position: relative;
|
|
322
|
+
padding-left: 2.6cqw;
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
.slide-points li::before {
|
|
326
|
+
content: '';
|
|
327
|
+
position: absolute;
|
|
328
|
+
left: 0.2cqw;
|
|
329
|
+
top: 0.62em;
|
|
330
|
+
width: 0.9cqw;
|
|
331
|
+
height: 0.9cqw;
|
|
332
|
+
border-radius: 50%;
|
|
333
|
+
background: linear-gradient(135deg, var(--dpk-accent-bright), var(--dpk-accent-strong));
|
|
334
|
+
box-shadow: 0 0 0 3px color-mix(in srgb, var(--dpk-accent) 14%, transparent);
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
.slide-body {
|
|
338
|
+
flex: 1 1 auto;
|
|
339
|
+
min-height: 0;
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
.slide-body ::slotted(*) {
|
|
343
|
+
margin: 0;
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
.slide-number {
|
|
347
|
+
position: absolute;
|
|
348
|
+
right: 2.6cqw;
|
|
349
|
+
bottom: 2cqw;
|
|
350
|
+
font-family: var(--dpk-mono);
|
|
351
|
+
font-size: 1.2cqw;
|
|
352
|
+
font-variant-numeric: tabular-nums;
|
|
353
|
+
color: var(--dpk-ink-faint);
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
/* The cover: large title, the subtitle beneath, an accent rule on the left. */
|
|
357
|
+
.slide[data-layout='title'] .slide-content {
|
|
358
|
+
justify-content: center;
|
|
359
|
+
padding-left: 9cqw;
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
.slide[data-layout='title'] .slide-content::before {
|
|
363
|
+
content: '';
|
|
364
|
+
position: absolute;
|
|
365
|
+
left: 6.5cqw;
|
|
366
|
+
top: 50%;
|
|
367
|
+
width: 0.55cqw;
|
|
368
|
+
height: 16cqw;
|
|
369
|
+
border-radius: 999px;
|
|
370
|
+
background: linear-gradient(180deg, var(--dpk-accent-bright), var(--dpk-accent-strong));
|
|
371
|
+
box-shadow: 0 0 20px color-mix(in srgb, var(--dpk-accent) 35%, transparent);
|
|
372
|
+
transform: translateY(-50%);
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
.slide[data-layout='title'] .slide-title {
|
|
376
|
+
font-size: 5.6cqw;
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
.slide[data-layout='title'] .slide-body,
|
|
380
|
+
.slide[data-layout='section'] .slide-body {
|
|
381
|
+
flex: 0 0 auto;
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
/* A chapter divider: the title alone, on the accent tint. */
|
|
385
|
+
.slide[data-layout='section'] {
|
|
386
|
+
background: linear-gradient(135deg, var(--dpk-accent-soft), transparent 70%), var(--dpk-paper-raised);
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
.slide[data-layout='section'] .slide-content {
|
|
390
|
+
justify-content: center;
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
.slide[data-layout='section'] .slide-title {
|
|
394
|
+
font-size: 4.8cqw;
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
.slide[data-layout='section'] .slide-title::after {
|
|
398
|
+
content: '';
|
|
399
|
+
display: block;
|
|
400
|
+
width: 7cqw;
|
|
401
|
+
height: 0.5cqw;
|
|
402
|
+
margin-top: 2.4cqw;
|
|
403
|
+
border-radius: 999px;
|
|
404
|
+
background: linear-gradient(90deg, var(--dpk-accent-bright), var(--dpk-accent-strong));
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
/* Full screen: the stage alone, the slide as large as the screen allows. */
|
|
408
|
+
.stage:fullscreen {
|
|
409
|
+
align-items: center;
|
|
410
|
+
padding: 0;
|
|
411
|
+
border: none;
|
|
412
|
+
border-radius: 0;
|
|
413
|
+
box-shadow: none;
|
|
414
|
+
background: var(--dpk-dots), var(--dpk-paper-sunken);
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
.stage:fullscreen .slide {
|
|
418
|
+
width: min(100vw, calc(100vh * 16 / 9));
|
|
419
|
+
border: none;
|
|
420
|
+
border-radius: 0;
|
|
421
|
+
box-shadow: none;
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
/* ---------------------------------------------------------------- bar */
|
|
425
|
+
|
|
426
|
+
.deck-bar {
|
|
427
|
+
display: flex;
|
|
428
|
+
flex-wrap: wrap;
|
|
429
|
+
align-items: center;
|
|
430
|
+
gap: 8px 12px;
|
|
431
|
+
width: min(100%, 1180px);
|
|
432
|
+
padding: 8px 12px;
|
|
433
|
+
border: 1px solid var(--dpk-rule);
|
|
434
|
+
border-radius: var(--dpk-radius-lg);
|
|
435
|
+
background: var(--dpk-glass);
|
|
436
|
+
backdrop-filter: blur(12px);
|
|
437
|
+
box-shadow: var(--dpk-bevel), var(--dpk-shadow-xs);
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
.deck-move {
|
|
441
|
+
display: inline-flex;
|
|
442
|
+
align-items: center;
|
|
443
|
+
gap: 4px;
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
.deck-move .dpk-icon-btn {
|
|
447
|
+
width: 30px;
|
|
448
|
+
height: 30px;
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
.deck-counter {
|
|
452
|
+
min-width: 54px;
|
|
453
|
+
font-family: var(--dpk-mono);
|
|
454
|
+
font-size: 12px;
|
|
455
|
+
font-variant-numeric: tabular-nums;
|
|
456
|
+
text-align: center;
|
|
457
|
+
color: var(--dpk-ink-faint);
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
.deck-counter strong {
|
|
461
|
+
color: var(--dpk-ink);
|
|
462
|
+
font-weight: 600;
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
.deck-progress {
|
|
466
|
+
flex: 1 1 80px;
|
|
467
|
+
height: 4px;
|
|
468
|
+
border-radius: 999px;
|
|
469
|
+
background: var(--dpk-paper-inset);
|
|
470
|
+
box-shadow: inset 0 1px 2px var(--dpk-shade-1);
|
|
471
|
+
overflow: hidden;
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
.deck-progress span {
|
|
475
|
+
display: block;
|
|
476
|
+
height: 100%;
|
|
477
|
+
border-radius: inherit;
|
|
478
|
+
background: var(--dpk-accent);
|
|
479
|
+
transition: width 200ms ease;
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
.deck-bar .dpk-btn svg {
|
|
483
|
+
width: 14px;
|
|
484
|
+
height: 14px;
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
/* ----------------------------------------------------------- comments */
|
|
488
|
+
|
|
489
|
+
.slide-comments {
|
|
490
|
+
display: grid;
|
|
491
|
+
gap: 10px;
|
|
492
|
+
width: min(100%, 1180px);
|
|
493
|
+
padding: 14px;
|
|
494
|
+
border: 1px solid var(--dpk-rule);
|
|
495
|
+
border-radius: var(--dpk-radius-lg);
|
|
496
|
+
background: var(--dpk-paper-raised);
|
|
497
|
+
box-shadow: var(--dpk-bevel), var(--dpk-shadow-xs);
|
|
498
|
+
}
|
|
499
|
+
|
|
500
|
+
/* About three short comments; more scroll inside the list, not the page. */
|
|
501
|
+
.slide-comment-list {
|
|
502
|
+
display: grid;
|
|
503
|
+
align-content: start;
|
|
504
|
+
gap: 6px;
|
|
505
|
+
max-height: 96px;
|
|
506
|
+
margin: 0;
|
|
507
|
+
padding: 0;
|
|
508
|
+
overflow-y: auto;
|
|
509
|
+
overscroll-behavior: contain;
|
|
510
|
+
list-style: none;
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
.slide-comment-list li {
|
|
514
|
+
display: flex;
|
|
515
|
+
align-items: flex-start;
|
|
516
|
+
gap: 8px;
|
|
517
|
+
padding: 6px 6px 6px 12px;
|
|
518
|
+
border-left: 2px solid var(--dpk-accent);
|
|
519
|
+
border-radius: 0 var(--dpk-radius-sm) var(--dpk-radius-sm) 0;
|
|
520
|
+
background: var(--dpk-paper-sunken);
|
|
521
|
+
font-size: 13px;
|
|
522
|
+
line-height: 1.55;
|
|
523
|
+
color: var(--dpk-ink);
|
|
524
|
+
white-space: pre-wrap;
|
|
525
|
+
overflow-wrap: anywhere;
|
|
526
|
+
}
|
|
527
|
+
|
|
528
|
+
.slide-comment-body {
|
|
529
|
+
flex: 1;
|
|
530
|
+
min-width: 0;
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
.slide-comment-delete {
|
|
534
|
+
flex: none;
|
|
535
|
+
width: 22px;
|
|
536
|
+
height: 22px;
|
|
537
|
+
opacity: 0.55;
|
|
538
|
+
}
|
|
539
|
+
|
|
540
|
+
.slide-comment-list li:hover .slide-comment-delete,
|
|
541
|
+
.slide-comment-delete:focus-visible {
|
|
542
|
+
opacity: 1;
|
|
543
|
+
}
|
|
544
|
+
|
|
545
|
+
.slide-comment-delete svg {
|
|
546
|
+
width: 12px;
|
|
547
|
+
height: 12px;
|
|
548
|
+
}
|
|
549
|
+
|
|
550
|
+
.slide-comment-form {
|
|
551
|
+
display: grid;
|
|
552
|
+
grid-template-columns: minmax(0, 1fr) auto;
|
|
553
|
+
gap: 10px;
|
|
554
|
+
align-items: start;
|
|
555
|
+
}
|
|
556
|
+
|
|
557
|
+
.slide-comment-input {
|
|
558
|
+
height: 60px;
|
|
559
|
+
min-height: 60px;
|
|
560
|
+
resize: none;
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
.slide-comment-actions {
|
|
564
|
+
display: grid;
|
|
565
|
+
justify-items: end;
|
|
566
|
+
gap: 6px;
|
|
567
|
+
}
|
|
568
|
+
|
|
569
|
+
.slide-comment-hint {
|
|
570
|
+
font-family: var(--dpk-mono);
|
|
571
|
+
font-size: 10.5px;
|
|
572
|
+
color: var(--dpk-ink-faint);
|
|
573
|
+
white-space: nowrap;
|
|
574
|
+
}
|
|
575
|
+
|
|
576
|
+
@media (max-width: 560px) {
|
|
577
|
+
.slide-comment-body {
|
|
578
|
+
flex: 1;
|
|
579
|
+
min-width: 0;
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
.slide-comment-delete {
|
|
583
|
+
flex: none;
|
|
584
|
+
width: 22px;
|
|
585
|
+
height: 22px;
|
|
586
|
+
opacity: 0.55;
|
|
587
|
+
}
|
|
588
|
+
|
|
589
|
+
.slide-comment-list li:hover .slide-comment-delete,
|
|
590
|
+
.slide-comment-delete:focus-visible {
|
|
591
|
+
opacity: 1;
|
|
592
|
+
}
|
|
593
|
+
|
|
594
|
+
.slide-comment-delete svg {
|
|
595
|
+
width: 12px;
|
|
596
|
+
height: 12px;
|
|
597
|
+
}
|
|
598
|
+
|
|
599
|
+
.slide-comment-form {
|
|
600
|
+
grid-template-columns: minmax(0, 1fr);
|
|
601
|
+
}
|
|
602
|
+
}
|
|
603
|
+
|
|
604
|
+
.parked {
|
|
605
|
+
display: none;
|
|
606
|
+
}
|
|
607
|
+
|
|
608
|
+
@media (prefers-reduced-motion: reduce) {
|
|
609
|
+
.deck-progress span {
|
|
610
|
+
transition: none;
|
|
611
|
+
}
|
|
612
|
+
}
|
|
613
|
+
`,le='input, textarea, select, [contenteditable]:not([contenteditable="false"])',re=t=>t instanceof HTMLElement&&(t.isContentEditable||t.matches(le));class B extends w{static{this.styles=[w.styles,de]}#e=new Map;#t={slide:"",count:0};definitionFor(e){return F(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.#d(),onDraft:(n,s)=>this.#n(n,s),onComment:n=>this.#o(n),onDeleteComment:n=>this.removeAction(n)})}}updated(){super.updated(),this.#a()}#a(){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()}#o(e){const i=(this.#e.get(e)??"").trim();if(i==="")return;this.dispatch({type:v,target:{type:"slide",id:e},payload:{body:i}}).ok&&this.#n(e,"")}#d(){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:y,defineSlidesElement:K,describeSlidesAction:A,emptySlidesBase:C,findSlide:T,findSlideIndex:r,parseSlidesBase:S,resolveSlidesNavigation:H,serializeSlidesAction:z,slideKeyStep:O,slidePosition:L,slidesBaseSchema:$,slidesCommentTargets:D,slidesCurrentTarget:M,slidesDefinitionFor:F,slidesHasTarget:P,slidesMessages:m,slidesTargetLabel:E,slidesTitle:q,stepSlide:j},Symbol.toStringTag,{value:"Module"}));export{K as d,ce as i};
|