dev-process-kit 0.3.0-beta.2 → 0.3.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/README.md +8 -8
- package/dist/boards.js +1 -1
- package/dist/chunks/shared-BFraiskj.js +3662 -0
- package/dist/chunks/{shared-B-DAJvq3.js → shared-BYbcHniE.js} +34 -34
- package/dist/chunks/{shared-D2qgtKhc.js → shared-B_Tiv_T3.js} +1 -1
- package/dist/chunks/shared-BfByEotW.js +6322 -0
- package/dist/chunks/{shared-CPNa9lTa.js → shared-Bs2YYFvO.js} +1 -1
- package/dist/chunks/shared-D4PPk0Dk.js +1 -0
- package/dist/chunks/shared-DMksNmni.js +1 -0
- package/dist/chunks/{shared-Dgse8blZ.js → shared-DNsl9DK1.js} +1 -1
- package/dist/chunks/shared-DYDJzB79.js +5222 -0
- package/dist/chunks/shared-DegJ_tfw.js +767 -0
- package/dist/chunks/{shared-C7wOrDIL.js → shared-DqlTHpRQ.js} +1 -1
- package/dist/chunks/{shared-BdIN9A6O.js → shared-FMBoDqPg.js} +1 -1
- package/dist/chunks/shared-Ln6ei2B2.js +1864 -0
- package/dist/chunks/shared-RvLH2Fqp.js +1598 -0
- package/dist/chunks/{shared-BT5Ayp_z.js → shared-TtB-p2Zh.js} +1 -1
- package/dist/chunks/{shared-DOKOFdYm.js → shared-WtWbdwp_.js} +3 -3
- package/dist/chunks/{shared-CPwjSgu0.js → shared-epAjO2d1.js} +1 -1
- package/dist/components.js +1 -1
- package/dist/index.js +1 -1
- package/dist/views/delegation-poker.js +1 -1
- package/dist/views/plain.js +1 -1
- package/dist/views/prototype.js +1 -1
- package/dist/views/slides.js +1 -1
- package/dist/views/task-board.js +1 -1
- package/dist/views/usm.js +1 -1
- package/package.json +1 -1
- package/dist/chunks/shared-BTf38OnF.js +0 -1
- package/dist/chunks/shared-BXejn2ZQ.js +0 -4928
- package/dist/chunks/shared-CE8X9qCv.js +0 -1636
- package/dist/chunks/shared-CpJDPnHA.js +0 -573
- package/dist/chunks/shared-DgexE4u1.js +0 -1862
- package/dist/chunks/shared-DnJcdL52.js +0 -3586
- package/dist/chunks/shared-HdOOfyqP.js +0 -6208
- package/dist/chunks/shared-TrlnHjrJ.js +0 -1
|
@@ -0,0 +1,767 @@
|
|
|
1
|
+
import{au as X,av as $,aw as p,aa as S,ac as u,aM as ee,ax as te,ay as ie,az as se,p as ne,a9 as ae,a5 as oe,S as g,C as E,h as re,aH as T,ai as d,as as r,by as de,aZ as le,b5 as ce,y as N,ah as pe,V as C}from"./shared-DYDJzB79.js";import{a as ue}from"./shared-FMBoDqPg.js";const P=["title","section","content"],he=$({id:ee,layout:p(se(P),"content"),title:te(u(),ie(1)),subtitle:p(u(),""),points:p(S(u()),[]),notes:p(u(),"")}),q=$({title:p(u(),""),slides:p(S(he),[])}),A=t=>{const e=X(q,t),i=new Set;for(const s of e.slides){if(i.has(s.id))throw new Error(`duplicate slide id: ${s.id}`);i.add(s.id)}return{title:e.title,slides:e.slides}},z=()=>({title:"",slides:[]}),l=(t,e)=>e===void 0?-1:t.slides.findIndex(i=>i.id===e),D=(t,e)=>t.slides[l(t,e)],c="SET_SLIDE_NOTES",me=ae({notes:u()}),b={[c]:ne(c,"slide",me)},H={setNotes:(t,e)=>({type:c,target:{type:"slide",id:t},payload:{notes:e}})},M=(t,e)=>{switch(e.type){case c:{if(e.target.type!=="slide")return null;const i=l(t,e.target.id);if(i===-1)return null;const s=b[c].parse(e);if(s===null)return null;const{notes:a}=s.payload;return{...t,slides:t.slides.map((n,o)=>o===i?{...n,notes:a}:n)}}default:return null}},v=oe({en:{wholeDeck:"Whole deck",slideGroup:"Slide",outline:"Slides",previous:"Previous slide",next:"Next slide",position:(t,e)=>`Slide ${t} of ${e}`,present:"Present",presentation:"Presentation",exitPresentation:"Exit presentation",speakerNotes:"Speaker notes",speakerNotesHint:"Only the presenter sees these. They are never projected.",speakerNotesPlaceholder:"What to say on this slide",saveNotes:"Save notes",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`,present:"\u30D7\u30EC\u30BC\u30F3",presentation:"\u30D7\u30EC\u30BC\u30F3\u8868\u793A",exitPresentation:"\u30D7\u30EC\u30BC\u30F3\u3092\u7D42\u4E86",speakerNotes:"\u30B9\u30D4\u30FC\u30AB\u30FC\u30CE\u30FC\u30C8",speakerNotesHint:"\u767A\u8868\u8005\u3060\u3051\u306B\u898B\u3048\u307E\u3059\u3002\u30B9\u30E9\u30A4\u30C9\u306B\u306F\u6295\u5F71\u3055\u308C\u307E\u305B\u3093\u3002",speakerNotesPlaceholder:"\u3053\u306E\u30B9\u30E9\u30A4\u30C9\u3067\u8A71\u3059\u3053\u3068",saveNotes:"\u30CE\u30FC\u30C8\u3092\u4FDD\u5B58",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"}}),f="present",k="1",m=t=>t[f]===k,O=t=>({[f]:t?k:null}),j=t=>t.title===""?"Slides":t.title,x=(t,e)=>`${e+1}. ${t.title}`,F=(t,e,i)=>{switch(i.type){case"slide":{const s=l(e,i.id),a=e.slides[s];return a===void 0?i.id:x(a,s)}case"page":return t.wholeDeck;default:return i.id}},L=(t,e,i)=>{const s=F(t,i,e.target);return e.type===c?{title:t.speakerNotes,targetLabel:s,tone:"update"}:{title:e.type,targetLabel:s,tone:"meta"}},_=t=>`${t.type} ${g(t.target)} ${JSON.stringify(t.payload)}`,K=(t,e)=>e.slides.map((i,s)=>({value:g({type:"slide",id:i.id}),label:x(i,s),group:t.slideGroup})),R=(t,e,i)=>{const s=l(e,i.slide),a=e.slides[s];return a===void 0?null:{value:g({type:"slide",id:a.id}),label:x(a,s),group:t.slideGroup}},B=(t,e)=>{const i=t.slides[l(t,e.slide)]??t.slides[0],s={...e};return i?s.slide=i.id:delete s.slide,(i===void 0||!m(e))&&delete s[f],s},w=(t,e)=>{const i=l(t,e.slide),s=i===-1?0:i,a=t.slides[s];return a===void 0?null:{slide:a,index:s,total:t.slides.length,previous:t.slides[s-1],next:t.slides[s+1]}},ge=(t,e)=>t.filter(i=>i.type===E&&i.target.type==="slide"&&i.target.id===e).map(i=>({id:i.id,body:re(i)})).filter(i=>i.body!==""),G=(t,e)=>{switch(e.type){case"slide":return D(t,e.id)!==void 0;case"page":return!0;default:return!1}},I=t=>{const e=v(t);return{kind:"view",name:"slides",label:"Slides",addable:!1,parseBase:A,emptyBase:z,actions:b,apply:M,hasTarget:G,describe:(i,s)=>L(e,i,s),serialize:_,resolveNavigation:B,navigationFor:(i,s)=>s.type==="slide"?{slide:s.id}:null,commentTargets:i=>K(e,i),currentTarget:(i,s)=>R(e,i,s),title:j}},fe={ArrowRight:"next",PageDown:"next",ArrowLeft:"previous",PageUp:"previous",Home:"first",End:"last"},U=t=>t.altKey===!0||t.ctrlKey===!0||t.metaKey===!0||t.shiftKey===!0?null:fe[t.key]??null,Y=(t,e,i)=>{const s=t.slides.length-1;if(s<0)return;const a=Math.max(l(t,e),0),n={next:Math.min(a+1,s),previous:Math.max(a-1,0),first:0,last:s}[i];return t.slides[n]?.id},be=(t,e)=>{const{state:i,navigation:s}=t,a=s.slide;return r`
|
|
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="dpk-navlist outline-list">
|
|
8
|
+
${T(i.slides,n=>n.id,(n,o)=>{const h=n.id===a,y=t.commentCount({type:"slide",id:n.id});return r`
|
|
9
|
+
<li class="outline-row" data-current=${String(h)} data-layout=${n.layout}>
|
|
10
|
+
<a href=${t.hashFor({slide:n.id})} aria-current=${h?"page":d}>
|
|
11
|
+
<span class="outline-index">${String(o+1).padStart(2,"0")}</span>
|
|
12
|
+
<span class="outline-title">${n.title}</span>
|
|
13
|
+
${y>0?r`<span class="outline-note">${y}</span>`:d}
|
|
14
|
+
</a>
|
|
15
|
+
</li>
|
|
16
|
+
`})}
|
|
17
|
+
</ol>
|
|
18
|
+
</nav>
|
|
19
|
+
`},V=(t,e)=>r`
|
|
20
|
+
<article
|
|
21
|
+
class="slide"
|
|
22
|
+
data-layout=${t.layout}
|
|
23
|
+
data-dpk-target=${g({type:"slide",id:t.id})}
|
|
24
|
+
aria-roledescription="slide"
|
|
25
|
+
aria-label=${`${e+1}. ${t.title}`}
|
|
26
|
+
>
|
|
27
|
+
<div class="slide-content">
|
|
28
|
+
<h2 class="slide-title">${t.title}</h2>
|
|
29
|
+
${t.subtitle===""?d:r`<p class="slide-subtitle">${t.subtitle}</p>`}
|
|
30
|
+
${t.points.length===0?d:r`<ul class="slide-points">
|
|
31
|
+
${t.points.map(i=>r`<li>${i}</li>`)}
|
|
32
|
+
</ul>`}
|
|
33
|
+
<div class="slide-body"><slot name=${`preview:${t.id}`}></slot></div>
|
|
34
|
+
</div>
|
|
35
|
+
<span class="slide-number" aria-hidden="true">${e+1}</span>
|
|
36
|
+
</article>
|
|
37
|
+
`,W=(t,e)=>{const i=t.slides.filter(s=>s.id!==e);return i.length===0?d:r`<div class="parked" aria-hidden="true">
|
|
38
|
+
${i.map(s=>r`<slot name=${`preview:${s.id}`}></slot>`)}
|
|
39
|
+
</div>`},J=(t,e)=>{const{position:i,onStep:s,prefix:a}=e;return r`<div class="${a}-move">
|
|
40
|
+
<button
|
|
41
|
+
class="dpk-icon-btn ${a}-prev"
|
|
42
|
+
type="button"
|
|
43
|
+
aria-label=${t.previous}
|
|
44
|
+
title=${t.previous}
|
|
45
|
+
?disabled=${!i.hasPrevious}
|
|
46
|
+
@click=${()=>s("previous")}
|
|
47
|
+
>
|
|
48
|
+
${de()}
|
|
49
|
+
</button>
|
|
50
|
+
<span class="deck-counter" role="status" aria-label=${t.position(i.index+1,i.total)}>
|
|
51
|
+
<strong>${i.index+1}</strong> / ${i.total}
|
|
52
|
+
</span>
|
|
53
|
+
<button
|
|
54
|
+
class="dpk-icon-btn ${a}-next"
|
|
55
|
+
type="button"
|
|
56
|
+
aria-label=${t.next}
|
|
57
|
+
title=${t.next}
|
|
58
|
+
?disabled=${!i.hasNext}
|
|
59
|
+
@click=${()=>s("next")}
|
|
60
|
+
>
|
|
61
|
+
${le()}
|
|
62
|
+
</button>
|
|
63
|
+
</div>`},ve=(t,e,i,s)=>e?r`<button class="dpk-btn ${s}" type="button" title=${t.fullscreenHint} @click=${i}>
|
|
64
|
+
${ce()} ${t.fullscreen}
|
|
65
|
+
</button>`:d,ke=(t,e,i)=>{const s=w(t.state,t.navigation);if(s===null)return d;const{slide:a,index:n,total:o}=s,h=a.notes.trim();return r`
|
|
66
|
+
<div
|
|
67
|
+
class="presentation"
|
|
68
|
+
popover="manual"
|
|
69
|
+
role="dialog"
|
|
70
|
+
aria-modal="true"
|
|
71
|
+
aria-label=${e.presentation}
|
|
72
|
+
tabindex="-1"
|
|
73
|
+
>
|
|
74
|
+
<div class="presentation-stage">${V(a,n)}</div>
|
|
75
|
+
<div class="presentation-bar" role="group" aria-label=${e.presentation}>
|
|
76
|
+
${J(e,{position:{index:n,total:o,hasPrevious:s.previous!==void 0,hasNext:s.next!==void 0},onStep:i.onStep,prefix:"presentation"})}
|
|
77
|
+
${ve(e,i.canFullscreen,i.onFullscreen,"deck-fullscreen")}
|
|
78
|
+
<button class="dpk-btn presentation-exit" type="button" @click=${i.onExit}>
|
|
79
|
+
${N()} ${e.exitPresentation}
|
|
80
|
+
</button>
|
|
81
|
+
</div>
|
|
82
|
+
${h===""?d:r`<aside class="presentation-notes" aria-label=${e.speakerNotes}>
|
|
83
|
+
<p class="dpk-label">${e.speakerNotes}</p>
|
|
84
|
+
<p class="presentation-notes-body">${h}</p>
|
|
85
|
+
</aside>`}
|
|
86
|
+
${W(t.state,a.id)}
|
|
87
|
+
</div>
|
|
88
|
+
`},xe=(t,e,i)=>{const s=i.textFor(e),a=s.trim()!==e.notes;return r`<section class="slide-notes" aria-label=${t.speakerNotes}>
|
|
89
|
+
<div class="slide-notes-head">
|
|
90
|
+
<span class="dpk-label">${t.speakerNotes}</span>
|
|
91
|
+
<span class="slide-notes-hint">${t.speakerNotesHint}</span>
|
|
92
|
+
</div>
|
|
93
|
+
<textarea
|
|
94
|
+
class="dpk-textarea slide-notes-input"
|
|
95
|
+
data-dpk-text-key=${`slide:${e.id}`}
|
|
96
|
+
aria-label=${t.speakerNotes}
|
|
97
|
+
placeholder=${t.speakerNotesPlaceholder}
|
|
98
|
+
.value=${s}
|
|
99
|
+
@input=${n=>{n.currentTarget instanceof HTMLTextAreaElement&&i.onDraft(e,n.currentTarget.value)}}
|
|
100
|
+
@keydown=${n=>{n.isComposing||n.key!=="Enter"||!(n.metaKey||n.ctrlKey)||(n.preventDefault(),a&&i.onSave(e.id))}}
|
|
101
|
+
></textarea>
|
|
102
|
+
<div class="slide-notes-actions">
|
|
103
|
+
<span class="slide-notes-submit-hint">${t.submitHint}</span>
|
|
104
|
+
<button
|
|
105
|
+
class="dpk-btn dpk-btn--accent slide-notes-save"
|
|
106
|
+
type="button"
|
|
107
|
+
?disabled=${!a}
|
|
108
|
+
@click=${()=>i.onSave(e.id)}
|
|
109
|
+
>
|
|
110
|
+
${t.saveNotes}
|
|
111
|
+
</button>
|
|
112
|
+
</div>
|
|
113
|
+
</section>`},we=(t,e,i)=>{const s=w(t.state,t.navigation);if(s===null)return r`<div class="deck">
|
|
114
|
+
<p class="dpk-empty deck-empty">${e.noSlidesBefore}<code>slides</code>${e.noSlidesAfter}</p>
|
|
115
|
+
</div>`;const{slide:a,index:n,total:o}=s;return r`
|
|
116
|
+
<div class="deck">
|
|
117
|
+
<div class="stage">${V(a,n)}</div>
|
|
118
|
+
<div class="dpk-toolbar deck-bar">
|
|
119
|
+
${J(e,{position:{index:n,total:o,hasPrevious:s.previous!==void 0,hasNext:s.next!==void 0},onStep:i.onStep,prefix:"deck"})}
|
|
120
|
+
<div class="deck-progress" aria-hidden="true">
|
|
121
|
+
<span style=${`width:${(n+1)/o*100}%`}></span>
|
|
122
|
+
</div>
|
|
123
|
+
<button class="dpk-btn deck-present" type="button" title=${e.fullscreenHint} @click=${i.onPresent}>
|
|
124
|
+
${e.present}
|
|
125
|
+
</button>
|
|
126
|
+
</div>
|
|
127
|
+
${xe(e,a,i.notes)}
|
|
128
|
+
${ye(e,a,ge(t.comments,a.id),i)}
|
|
129
|
+
${W(t.state,a.id)}
|
|
130
|
+
</div>
|
|
131
|
+
`},ye=(t,e,i,s)=>{const a=s.draftFor(e.id),n=a.trim()!=="";return r`
|
|
132
|
+
<section class="slide-comments" aria-label=${t.commentOnSlide}>
|
|
133
|
+
${i.length===0?d:r`<ul class="slide-comment-list">
|
|
134
|
+
${T(i,o=>o.id,o=>r`<li>
|
|
135
|
+
<span class="slide-comment-body">${o.body}</span>
|
|
136
|
+
<button
|
|
137
|
+
class="dpk-icon-btn slide-comment-delete"
|
|
138
|
+
type="button"
|
|
139
|
+
aria-label=${t.deleteComment}
|
|
140
|
+
title=${t.deleteComment}
|
|
141
|
+
@click=${()=>s.onDeleteComment(o.id)}
|
|
142
|
+
>
|
|
143
|
+
${N()}
|
|
144
|
+
</button>
|
|
145
|
+
</li>`)}
|
|
146
|
+
</ul>`}
|
|
147
|
+
<div class="slide-comment-form">
|
|
148
|
+
<textarea
|
|
149
|
+
class="dpk-textarea slide-comment-input"
|
|
150
|
+
aria-label=${t.commentOnSlide}
|
|
151
|
+
placeholder=${t.commentPlaceholder}
|
|
152
|
+
.value=${a}
|
|
153
|
+
@input=${o=>{o.currentTarget instanceof HTMLTextAreaElement&&s.onDraft(e.id,o.currentTarget.value)}}
|
|
154
|
+
@keydown=${o=>{o.isComposing||o.key!=="Enter"||!(o.metaKey||o.ctrlKey)||(o.preventDefault(),n&&s.onComment(e.id))}}
|
|
155
|
+
></textarea>
|
|
156
|
+
<div class="slide-comment-actions">
|
|
157
|
+
<button
|
|
158
|
+
class="dpk-btn dpk-btn--accent slide-comment-submit"
|
|
159
|
+
type="button"
|
|
160
|
+
?disabled=${!n}
|
|
161
|
+
@click=${()=>s.onComment(e.id)}
|
|
162
|
+
>
|
|
163
|
+
${t.addComment}
|
|
164
|
+
</button>
|
|
165
|
+
<span class="slide-comment-hint">${t.submitHint}</span>
|
|
166
|
+
</div>
|
|
167
|
+
</div>
|
|
168
|
+
</section>
|
|
169
|
+
`},$e=pe`
|
|
170
|
+
/* ------------------------------------------------------------ outline */
|
|
171
|
+
|
|
172
|
+
.outline-head {
|
|
173
|
+
display: flex;
|
|
174
|
+
justify-content: space-between;
|
|
175
|
+
padding: 0 6px 8px;
|
|
176
|
+
border-bottom: 1px solid var(--dpk-rule);
|
|
177
|
+
margin-bottom: 6px;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
.outline-row {
|
|
181
|
+
position: relative;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
.outline-row a {
|
|
185
|
+
align-items: baseline;
|
|
186
|
+
gap: 10px;
|
|
187
|
+
padding: 7px 8px;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
/* A section slide opens a chapter: it reads as a heading in the outline. */
|
|
191
|
+
.outline-row[data-layout='section']:not(:first-child) {
|
|
192
|
+
margin-top: 10px;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
.outline-row[data-layout='section'] .outline-title,
|
|
196
|
+
.outline-row[data-layout='title'] .outline-title {
|
|
197
|
+
font-weight: 620;
|
|
198
|
+
color: var(--dpk-ink);
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
.outline-index {
|
|
202
|
+
flex: none;
|
|
203
|
+
font-family: var(--dpk-mono);
|
|
204
|
+
font-size: 10.5px;
|
|
205
|
+
font-variant-numeric: tabular-nums;
|
|
206
|
+
color: var(--dpk-ink-faint);
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
.outline-row[data-current='true'] .outline-index {
|
|
210
|
+
color: var(--dpk-accent);
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
.outline-title {
|
|
214
|
+
flex: 1;
|
|
215
|
+
min-width: 0;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
.outline-note {
|
|
219
|
+
flex: none;
|
|
220
|
+
min-width: 18px;
|
|
221
|
+
padding: 1px 6px;
|
|
222
|
+
border-radius: 999px;
|
|
223
|
+
background: var(--dpk-accent-soft);
|
|
224
|
+
color: var(--dpk-accent);
|
|
225
|
+
font-family: var(--dpk-mono);
|
|
226
|
+
font-size: 10px;
|
|
227
|
+
text-align: center;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
/* -------------------------------------------------------------- deck */
|
|
231
|
+
|
|
232
|
+
.deck {
|
|
233
|
+
display: grid;
|
|
234
|
+
/* The column follows the main area, not the widest thing in it. */
|
|
235
|
+
grid-template-columns: minmax(0, 1fr);
|
|
236
|
+
gap: 14px;
|
|
237
|
+
justify-items: center;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
.deck-empty {
|
|
241
|
+
display: block;
|
|
242
|
+
max-width: none;
|
|
243
|
+
margin: 48px auto;
|
|
244
|
+
padding: 0;
|
|
245
|
+
border: 0;
|
|
246
|
+
border-radius: 0;
|
|
247
|
+
background: transparent;
|
|
248
|
+
color: var(--dpk-ink-faint);
|
|
249
|
+
font-size: inherit;
|
|
250
|
+
line-height: inherit;
|
|
251
|
+
text-align: start;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
/*
|
|
255
|
+
* The work surface the slide is projected onto: a quiet dot lattice, sunken
|
|
256
|
+
* a shade below the page, so the slide's own shadow has somewhere to land.
|
|
257
|
+
*/
|
|
258
|
+
.stage {
|
|
259
|
+
display: flex;
|
|
260
|
+
justify-content: center;
|
|
261
|
+
width: 100%;
|
|
262
|
+
padding: 28px;
|
|
263
|
+
border: 1px solid var(--dpk-rule);
|
|
264
|
+
border-radius: var(--dpk-radius-xl);
|
|
265
|
+
background: var(--dpk-dots), var(--dpk-paper-sunken);
|
|
266
|
+
box-shadow: inset 0 1px 3px var(--dpk-shade-1);
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
/*
|
|
270
|
+
* As wide as the column allows, but never taller than the window leaves room
|
|
271
|
+
* for: the header, the bar and the comments beneath (the list at its full
|
|
272
|
+
* height and the form) and the padding around them. The form stays on screen.
|
|
273
|
+
*/
|
|
274
|
+
.slide {
|
|
275
|
+
position: relative;
|
|
276
|
+
width: min(100%, 1180px, max(420px, calc((100dvh - 340px) * 16 / 9)));
|
|
277
|
+
aspect-ratio: 16 / 9;
|
|
278
|
+
overflow: hidden;
|
|
279
|
+
container-type: inline-size;
|
|
280
|
+
border: 1px solid var(--dpk-rule);
|
|
281
|
+
border-radius: var(--dpk-radius-lg);
|
|
282
|
+
background: var(--dpk-paper-raised);
|
|
283
|
+
box-shadow: var(--dpk-bevel), var(--dpk-shadow-lg);
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
.slide-content {
|
|
287
|
+
position: absolute;
|
|
288
|
+
inset: 0;
|
|
289
|
+
display: flex;
|
|
290
|
+
flex-direction: column;
|
|
291
|
+
gap: 2.2cqw;
|
|
292
|
+
/* The bottom keeps the last line clear of the page number once it scrolls. */
|
|
293
|
+
padding: 5.5cqw 6.5cqw 6cqw;
|
|
294
|
+
overflow: auto;
|
|
295
|
+
overflow-wrap: anywhere;
|
|
296
|
+
font-size: 2.1cqw;
|
|
297
|
+
line-height: 1.55;
|
|
298
|
+
color: var(--dpk-ink-soft);
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
.slide-title {
|
|
302
|
+
font-size: 3.6cqw;
|
|
303
|
+
font-weight: 680;
|
|
304
|
+
line-height: 1.2;
|
|
305
|
+
letter-spacing: -0.015em;
|
|
306
|
+
color: var(--dpk-ink);
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
.slide-subtitle {
|
|
310
|
+
margin: 0;
|
|
311
|
+
font-size: 2.4cqw;
|
|
312
|
+
color: var(--dpk-ink-soft);
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
.slide-points {
|
|
316
|
+
display: grid;
|
|
317
|
+
gap: 1.3cqw;
|
|
318
|
+
margin: 0;
|
|
319
|
+
padding: 0;
|
|
320
|
+
list-style: none;
|
|
321
|
+
font-size: 2.5cqw;
|
|
322
|
+
color: var(--dpk-ink);
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
.slide-points li {
|
|
326
|
+
position: relative;
|
|
327
|
+
padding-left: 2.6cqw;
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
.slide-points li::before {
|
|
331
|
+
content: '';
|
|
332
|
+
position: absolute;
|
|
333
|
+
left: 0.2cqw;
|
|
334
|
+
top: 0.62em;
|
|
335
|
+
width: 0.9cqw;
|
|
336
|
+
height: 0.9cqw;
|
|
337
|
+
border-radius: 50%;
|
|
338
|
+
background: linear-gradient(135deg, var(--dpk-accent-bright), var(--dpk-accent-strong));
|
|
339
|
+
box-shadow: 0 0 0 3px color-mix(in srgb, var(--dpk-accent) 14%, transparent);
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
.slide-body {
|
|
343
|
+
flex: 1 1 auto;
|
|
344
|
+
min-height: 0;
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
.slide-body ::slotted(*) {
|
|
348
|
+
margin: 0;
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
/* Over the content, which may scroll beneath it: a backdrop keeps both legible. */
|
|
352
|
+
.slide-number {
|
|
353
|
+
position: absolute;
|
|
354
|
+
right: 2cqw;
|
|
355
|
+
bottom: 1.6cqw;
|
|
356
|
+
z-index: 1;
|
|
357
|
+
padding: 0.3cqw 0.7cqw;
|
|
358
|
+
border-radius: 999px;
|
|
359
|
+
background: color-mix(in srgb, var(--dpk-paper-raised) 88%, transparent);
|
|
360
|
+
font-family: var(--dpk-mono);
|
|
361
|
+
font-size: 1.2cqw;
|
|
362
|
+
font-variant-numeric: tabular-nums;
|
|
363
|
+
color: var(--dpk-ink-faint);
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
/* The cover: large title, the subtitle beneath, an accent rule on the left. */
|
|
367
|
+
/* \`safe\`: content taller than the slide starts at the top, where scrolling reaches it. */
|
|
368
|
+
.slide[data-layout='title'] .slide-content {
|
|
369
|
+
justify-content: safe center;
|
|
370
|
+
padding-left: 9cqw;
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
.slide[data-layout='title'] .slide-content::before {
|
|
374
|
+
content: '';
|
|
375
|
+
position: absolute;
|
|
376
|
+
left: 6.5cqw;
|
|
377
|
+
top: 50%;
|
|
378
|
+
width: 0.55cqw;
|
|
379
|
+
height: 16cqw;
|
|
380
|
+
border-radius: 999px;
|
|
381
|
+
background: linear-gradient(180deg, var(--dpk-accent-bright), var(--dpk-accent-strong));
|
|
382
|
+
box-shadow: 0 0 20px color-mix(in srgb, var(--dpk-accent) 35%, transparent);
|
|
383
|
+
transform: translateY(-50%);
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
.slide[data-layout='title'] .slide-title {
|
|
387
|
+
font-size: 5.6cqw;
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
.slide[data-layout='title'] .slide-body,
|
|
391
|
+
.slide[data-layout='section'] .slide-body {
|
|
392
|
+
flex: 0 0 auto;
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
/* A chapter divider: the title alone, on the accent tint. */
|
|
396
|
+
.slide[data-layout='section'] {
|
|
397
|
+
background: linear-gradient(135deg, var(--dpk-accent-soft), transparent 70%), var(--dpk-paper-raised);
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
.slide[data-layout='section'] .slide-content {
|
|
401
|
+
justify-content: safe center;
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
.slide[data-layout='section'] .slide-title {
|
|
405
|
+
font-size: 4.8cqw;
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
.slide[data-layout='section'] .slide-title::after {
|
|
409
|
+
content: '';
|
|
410
|
+
display: block;
|
|
411
|
+
width: 7cqw;
|
|
412
|
+
height: 0.5cqw;
|
|
413
|
+
margin-top: 2.4cqw;
|
|
414
|
+
border-radius: 999px;
|
|
415
|
+
background: linear-gradient(90deg, var(--dpk-accent-bright), var(--dpk-accent-strong));
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
/* Full screen, entered from the presentation surface: the slide as large as the screen allows. */
|
|
419
|
+
.presentation:fullscreen {
|
|
420
|
+
align-items: center;
|
|
421
|
+
padding: 0;
|
|
422
|
+
border: none;
|
|
423
|
+
border-radius: 0;
|
|
424
|
+
box-shadow: none;
|
|
425
|
+
background: var(--dpk-dots), var(--dpk-paper-sunken);
|
|
426
|
+
}
|
|
427
|
+
.presentation:fullscreen .slide {
|
|
428
|
+
width: min(100vw, calc(100vh * 16 / 9));
|
|
429
|
+
border: none;
|
|
430
|
+
border-radius: 0;
|
|
431
|
+
box-shadow: none;
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
/* ------------------------------------------------------------ notes */
|
|
435
|
+
|
|
436
|
+
/*
|
|
437
|
+
* The presenter's material, under the stage and never on it: what is written
|
|
438
|
+
* here is shown to the presenter alone (here, and in presentation mode).
|
|
439
|
+
*/
|
|
440
|
+
.slide-notes {
|
|
441
|
+
display: grid;
|
|
442
|
+
gap: 8px;
|
|
443
|
+
width: min(100%, 1180px);
|
|
444
|
+
padding: 12px 14px;
|
|
445
|
+
border: 1px dashed var(--dpk-rule-strong);
|
|
446
|
+
border-radius: var(--dpk-radius-lg);
|
|
447
|
+
background: var(--dpk-paper);
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
.slide-notes-head {
|
|
451
|
+
display: flex;
|
|
452
|
+
flex-wrap: wrap;
|
|
453
|
+
align-items: baseline;
|
|
454
|
+
gap: 4px 10px;
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
.slide-notes-hint {
|
|
458
|
+
font-size: 11.5px;
|
|
459
|
+
color: var(--dpk-ink-faint);
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
.slide-notes-input {
|
|
463
|
+
min-height: 56px;
|
|
464
|
+
resize: vertical;
|
|
465
|
+
font-size: 13px;
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
.slide-notes-actions {
|
|
469
|
+
display: flex;
|
|
470
|
+
align-items: center;
|
|
471
|
+
justify-content: flex-end;
|
|
472
|
+
gap: 10px;
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
.slide-notes-submit-hint {
|
|
476
|
+
font-family: var(--dpk-mono);
|
|
477
|
+
font-size: 10.5px;
|
|
478
|
+
color: var(--dpk-ink-faint);
|
|
479
|
+
white-space: nowrap;
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
/* ------------------------------------------------------ presentation */
|
|
483
|
+
|
|
484
|
+
/*
|
|
485
|
+
* Presentation mode: the slide as the whole screen, owned by the view rather
|
|
486
|
+
* than by the browser's full screen API, so it works in a sandboxed frame and
|
|
487
|
+
* can be exercised without a browser. It covers the shell, including the
|
|
488
|
+
* outline and the deck bar, which are not rendered while it is open.
|
|
489
|
+
*/
|
|
490
|
+
.presentation {
|
|
491
|
+
position: fixed;
|
|
492
|
+
inset: 0;
|
|
493
|
+
/*
|
|
494
|
+
* It is a manual popover, and the UA's [popover] rule sizes that to the
|
|
495
|
+
* content (width: fit-content) and centres it with margin: auto, which
|
|
496
|
+
* would leave the stage a small box in the middle of the screen rather than
|
|
497
|
+
* the screen itself. Pinned to all four edges with an automatic size, it
|
|
498
|
+
* covers the viewport.
|
|
499
|
+
*/
|
|
500
|
+
width: auto;
|
|
501
|
+
height: auto;
|
|
502
|
+
max-width: none;
|
|
503
|
+
max-height: none;
|
|
504
|
+
margin: 0;
|
|
505
|
+
z-index: 60;
|
|
506
|
+
display: grid;
|
|
507
|
+
grid-template-rows: minmax(0, 1fr) auto auto;
|
|
508
|
+
justify-items: center;
|
|
509
|
+
align-content: center;
|
|
510
|
+
gap: 14px;
|
|
511
|
+
padding: 20px clamp(16px, 3vw, 40px);
|
|
512
|
+
background: var(--dpk-dots), var(--dpk-paper-sunken);
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
.presentation:focus-visible {
|
|
516
|
+
outline: none;
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
.presentation-stage {
|
|
520
|
+
display: flex;
|
|
521
|
+
align-items: center;
|
|
522
|
+
justify-content: center;
|
|
523
|
+
width: 100%;
|
|
524
|
+
min-height: 0;
|
|
525
|
+
}
|
|
526
|
+
|
|
527
|
+
/* As large as the screen allows, leaving room for the bar and the notes. */
|
|
528
|
+
.presentation .slide {
|
|
529
|
+
width: min(100%, calc((100dvh - 200px) * 16 / 9));
|
|
530
|
+
border: none;
|
|
531
|
+
box-shadow: var(--dpk-bevel), var(--dpk-shadow-lg);
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
.presentation-bar {
|
|
535
|
+
display: flex;
|
|
536
|
+
flex-wrap: wrap;
|
|
537
|
+
align-items: center;
|
|
538
|
+
justify-content: center;
|
|
539
|
+
gap: 8px;
|
|
540
|
+
padding: 8px 12px;
|
|
541
|
+
border: 1px solid var(--dpk-rule);
|
|
542
|
+
border-radius: var(--dpk-radius-lg);
|
|
543
|
+
background: var(--dpk-glass);
|
|
544
|
+
backdrop-filter: blur(12px);
|
|
545
|
+
box-shadow: var(--dpk-bevel), var(--dpk-shadow-xs);
|
|
546
|
+
}
|
|
547
|
+
|
|
548
|
+
.presentation-move {
|
|
549
|
+
display: inline-flex;
|
|
550
|
+
align-items: center;
|
|
551
|
+
gap: 4px;
|
|
552
|
+
}
|
|
553
|
+
|
|
554
|
+
.presentation-move .dpk-icon-btn {
|
|
555
|
+
width: 30px;
|
|
556
|
+
height: 30px;
|
|
557
|
+
}
|
|
558
|
+
|
|
559
|
+
.presentation-bar .dpk-btn svg {
|
|
560
|
+
width: 14px;
|
|
561
|
+
height: 14px;
|
|
562
|
+
}
|
|
563
|
+
|
|
564
|
+
.presentation-notes {
|
|
565
|
+
width: min(100%, 1180px);
|
|
566
|
+
max-height: 22dvh;
|
|
567
|
+
overflow-y: auto;
|
|
568
|
+
padding: 10px 14px;
|
|
569
|
+
border: 1px dashed var(--dpk-rule-strong);
|
|
570
|
+
border-radius: var(--dpk-radius-lg);
|
|
571
|
+
background: var(--dpk-paper);
|
|
572
|
+
}
|
|
573
|
+
|
|
574
|
+
.presentation-notes-body {
|
|
575
|
+
margin: 4px 0 0;
|
|
576
|
+
font-size: 13px;
|
|
577
|
+
line-height: 1.6;
|
|
578
|
+
color: var(--dpk-ink);
|
|
579
|
+
white-space: pre-wrap;
|
|
580
|
+
overflow-wrap: anywhere;
|
|
581
|
+
}
|
|
582
|
+
|
|
583
|
+
/* ---------------------------------------------------------------- bar */
|
|
584
|
+
|
|
585
|
+
.deck-bar {
|
|
586
|
+
width: min(100%, 1180px);
|
|
587
|
+
padding: 8px 12px;
|
|
588
|
+
border: 1px solid var(--dpk-rule);
|
|
589
|
+
border-radius: var(--dpk-radius-lg);
|
|
590
|
+
background: var(--dpk-glass);
|
|
591
|
+
backdrop-filter: blur(12px);
|
|
592
|
+
box-shadow: var(--dpk-bevel), var(--dpk-shadow-xs);
|
|
593
|
+
}
|
|
594
|
+
|
|
595
|
+
.deck-move {
|
|
596
|
+
display: inline-flex;
|
|
597
|
+
align-items: center;
|
|
598
|
+
gap: 4px;
|
|
599
|
+
}
|
|
600
|
+
|
|
601
|
+
.deck-move .dpk-icon-btn {
|
|
602
|
+
width: 30px;
|
|
603
|
+
height: 30px;
|
|
604
|
+
}
|
|
605
|
+
|
|
606
|
+
.deck-counter {
|
|
607
|
+
min-width: 54px;
|
|
608
|
+
font-family: var(--dpk-mono);
|
|
609
|
+
font-size: 12px;
|
|
610
|
+
font-variant-numeric: tabular-nums;
|
|
611
|
+
text-align: center;
|
|
612
|
+
color: var(--dpk-ink-faint);
|
|
613
|
+
}
|
|
614
|
+
|
|
615
|
+
.deck-counter strong {
|
|
616
|
+
color: var(--dpk-ink);
|
|
617
|
+
font-weight: 600;
|
|
618
|
+
}
|
|
619
|
+
|
|
620
|
+
.deck-progress {
|
|
621
|
+
flex: 1 1 80px;
|
|
622
|
+
height: 4px;
|
|
623
|
+
border-radius: 999px;
|
|
624
|
+
background: var(--dpk-paper-inset);
|
|
625
|
+
box-shadow: inset 0 1px 2px var(--dpk-shade-1);
|
|
626
|
+
overflow: hidden;
|
|
627
|
+
}
|
|
628
|
+
|
|
629
|
+
.deck-progress span {
|
|
630
|
+
display: block;
|
|
631
|
+
height: 100%;
|
|
632
|
+
border-radius: inherit;
|
|
633
|
+
background: var(--dpk-accent);
|
|
634
|
+
transition: width 200ms ease;
|
|
635
|
+
}
|
|
636
|
+
|
|
637
|
+
.deck-bar .dpk-btn svg {
|
|
638
|
+
width: 14px;
|
|
639
|
+
height: 14px;
|
|
640
|
+
}
|
|
641
|
+
|
|
642
|
+
/* ----------------------------------------------------------- comments */
|
|
643
|
+
|
|
644
|
+
.slide-comments {
|
|
645
|
+
display: grid;
|
|
646
|
+
gap: 10px;
|
|
647
|
+
width: min(100%, 1180px);
|
|
648
|
+
padding: 14px;
|
|
649
|
+
border: 1px solid var(--dpk-rule);
|
|
650
|
+
border-radius: var(--dpk-radius-lg);
|
|
651
|
+
background: var(--dpk-paper-raised);
|
|
652
|
+
box-shadow: var(--dpk-bevel), var(--dpk-shadow-xs);
|
|
653
|
+
}
|
|
654
|
+
|
|
655
|
+
/* About three short comments; more scroll inside the list, not the page. */
|
|
656
|
+
.slide-comment-list {
|
|
657
|
+
display: grid;
|
|
658
|
+
align-content: start;
|
|
659
|
+
gap: 6px;
|
|
660
|
+
max-height: 96px;
|
|
661
|
+
margin: 0;
|
|
662
|
+
padding: 0;
|
|
663
|
+
overflow-y: auto;
|
|
664
|
+
overscroll-behavior: contain;
|
|
665
|
+
list-style: none;
|
|
666
|
+
}
|
|
667
|
+
|
|
668
|
+
.slide-comment-list li {
|
|
669
|
+
display: flex;
|
|
670
|
+
align-items: flex-start;
|
|
671
|
+
gap: 8px;
|
|
672
|
+
padding: 6px 6px 6px 10px;
|
|
673
|
+
border-radius: var(--dpk-radius-sm);
|
|
674
|
+
background: var(--dpk-paper-sunken);
|
|
675
|
+
font-size: 13px;
|
|
676
|
+
line-height: 1.55;
|
|
677
|
+
color: var(--dpk-ink);
|
|
678
|
+
white-space: pre-wrap;
|
|
679
|
+
overflow-wrap: anywhere;
|
|
680
|
+
}
|
|
681
|
+
|
|
682
|
+
.slide-comment-body {
|
|
683
|
+
flex: 1;
|
|
684
|
+
min-width: 0;
|
|
685
|
+
}
|
|
686
|
+
|
|
687
|
+
.slide-comment-delete {
|
|
688
|
+
flex: none;
|
|
689
|
+
width: 22px;
|
|
690
|
+
height: 22px;
|
|
691
|
+
opacity: 0.55;
|
|
692
|
+
}
|
|
693
|
+
|
|
694
|
+
.slide-comment-list li:hover .slide-comment-delete,
|
|
695
|
+
.slide-comment-delete:focus-visible {
|
|
696
|
+
opacity: 1;
|
|
697
|
+
}
|
|
698
|
+
|
|
699
|
+
.slide-comment-delete svg {
|
|
700
|
+
width: 12px;
|
|
701
|
+
height: 12px;
|
|
702
|
+
}
|
|
703
|
+
|
|
704
|
+
.slide-comment-form {
|
|
705
|
+
display: grid;
|
|
706
|
+
grid-template-columns: minmax(0, 1fr) auto;
|
|
707
|
+
gap: 10px;
|
|
708
|
+
align-items: start;
|
|
709
|
+
}
|
|
710
|
+
|
|
711
|
+
.slide-comment-input {
|
|
712
|
+
height: 60px;
|
|
713
|
+
min-height: 60px;
|
|
714
|
+
resize: none;
|
|
715
|
+
}
|
|
716
|
+
|
|
717
|
+
.slide-comment-actions {
|
|
718
|
+
display: grid;
|
|
719
|
+
justify-items: end;
|
|
720
|
+
gap: 6px;
|
|
721
|
+
}
|
|
722
|
+
|
|
723
|
+
.slide-comment-hint {
|
|
724
|
+
font-family: var(--dpk-mono);
|
|
725
|
+
font-size: 10.5px;
|
|
726
|
+
color: var(--dpk-ink-faint);
|
|
727
|
+
white-space: nowrap;
|
|
728
|
+
}
|
|
729
|
+
|
|
730
|
+
@media (max-width: 560px) {
|
|
731
|
+
.slide-comment-body {
|
|
732
|
+
flex: 1;
|
|
733
|
+
min-width: 0;
|
|
734
|
+
}
|
|
735
|
+
|
|
736
|
+
.slide-comment-delete {
|
|
737
|
+
flex: none;
|
|
738
|
+
width: 22px;
|
|
739
|
+
height: 22px;
|
|
740
|
+
opacity: 0.55;
|
|
741
|
+
}
|
|
742
|
+
|
|
743
|
+
.slide-comment-list li:hover .slide-comment-delete,
|
|
744
|
+
.slide-comment-delete:focus-visible {
|
|
745
|
+
opacity: 1;
|
|
746
|
+
}
|
|
747
|
+
|
|
748
|
+
.slide-comment-delete svg {
|
|
749
|
+
width: 12px;
|
|
750
|
+
height: 12px;
|
|
751
|
+
}
|
|
752
|
+
|
|
753
|
+
.slide-comment-form {
|
|
754
|
+
grid-template-columns: minmax(0, 1fr);
|
|
755
|
+
}
|
|
756
|
+
}
|
|
757
|
+
|
|
758
|
+
.parked {
|
|
759
|
+
display: none;
|
|
760
|
+
}
|
|
761
|
+
|
|
762
|
+
@media (prefers-reduced-motion: reduce) {
|
|
763
|
+
.deck-progress span {
|
|
764
|
+
transition: none;
|
|
765
|
+
}
|
|
766
|
+
}
|
|
767
|
+
`,Se='input, textarea, select, [contenteditable]:not([contenteditable="false"])',Ee=t=>t instanceof HTMLElement&&(t.isContentEditable||t.matches(Se)),Te=t=>{for(let e=t;e!==null;){if(e.hasAttribute("hidden"))return!1;const i=e.getRootNode();e=e.parentElement??(i instanceof ShadowRoot?i.host:null)}return!0};class Z extends C{static{this.styles=[C.styles,ue,$e]}#t=new Map;#e=new Map;#s=!1;#n={slide:"",count:0};definitionFor(e){return I(e)}connectedCallback(){super.connectedCallback(),document.addEventListener("keydown",this.#r)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("keydown",this.#r)}renderRegions(e){const i=v(this.locale),s=m(e.navigation),a={canFullscreen:document.fullscreenEnabled===!0,draftFor:n=>this.#t.get(n)??"",notes:{textFor:n=>this.#e.get(n.id)??n.notes,onDraft:(n,o)=>this.#p(n,o),onSave:n=>this.#u(n)},onStep:n=>this.#a(n),onPresent:()=>this.#i(!0),onExit:()=>this.#i(!1),onFullscreen:()=>this.#h(),onDraft:(n,o)=>this.#o(n,o),onComment:n=>this.#c(n),onDeleteComment:n=>this.removeAction(n)};return{sidebar:s?d:be(e,i),sidebarHidden:s||e.state.slides.length===0,main:s?ke(e,i,a):we(e,i,a)}}updated(){super.updated(),this.#d(),this.#l()}#d(){const e=m(this.navigation);e&&!this.#s&&this.renderRoot.querySelector(".presentation")?.focus(),this.#s=e}#l(){const e=this.renderRoot.querySelector(".slide-comment-list"),i={slide:this.navigation.slide??"",count:e?.childElementCount??0},s=this.#n;this.#n=i,!(e===null||i.slide===s.slide&&i.count<=s.count)&&(e.scrollTop=e.scrollHeight)}#a(e){const i=Y(this.derivation.state,this.navigation.slide,e);i!==void 0&&this.navigate({slide:i})}#i(e){this.navigate(O(e))}#o(e,i){const s=new Map(this.#t);i===""?s.delete(e):s.set(e,i),this.#t=s,this.requestUpdate()}#c(e){const i=(this.#t.get(e)??"").trim();if(i==="")return;this.dispatch({type:E,target:{type:"slide",id:e},payload:{body:i}}).ok&&this.#o(e,"")}#p(e,i){const s=new Map(this.#e);i===e.notes?s.delete(e.id):s.set(e.id,i),this.#e=s,this.requestUpdate()}#u(e){const i=(this.#e.get(e)??"").trim();if(!this.dispatch(H.setNotes(e,i)).ok)return;const a=new Map(this.#e);a.delete(e),this.#e=a,this.requestUpdate()}#h(){const e=this.renderRoot.querySelector(".presentation");!(e instanceof HTMLElement)||document.fullscreenElement!==null||e.requestFullscreen().catch(()=>{})}#r=e=>{if(e.defaultPrevented||!Te(this))return;if(e.key==="Escape"){if(!m(this.navigation)||this.notesOpen||e.isComposing)return;e.preventDefault(),this.#i(!1);return}const i=U(e);i===null||e.composedPath().some(Ee)||(e.preventDefault(),this.#a(i))}}const Q=()=>{customElements.get("dpk-view-slides")||customElements.define("dpk-view-slides",Z)},Ne=Object.freeze(Object.defineProperty({__proto__:null,DpkViewSlides:Z,PRESENT_KEY:f,PRESENT_ON:k,SET_SLIDE_NOTES:c,SLIDE_LAYOUTS:P,applySlidesAction:M,defineSlidesElement:Q,describeSlidesAction:L,emptySlidesBase:z,findSlide:D,findSlideIndex:l,parseSlidesBase:A,resolveSlidesNavigation:B,serializeSlidesAction:_,slideKeyStep:U,slidePosition:w,slidesAction:H,slidesActions:b,slidesBaseSchema:q,slidesCommentTargets:K,slidesCurrentTarget:R,slidesDefinitionFor:I,slidesHasTarget:G,slidesMessages:v,slidesPresentation:O,slidesPresenting:m,slidesTargetLabel:F,slidesTitle:j,stepSlide:Y},Symbol.toStringTag,{value:"Module"}));export{Q as d,Ne as i};
|