dev-process-kit 0.0.17 → 0.1.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 +1 -1
- package/dist/chunks/shared-B5lBiq5s.js +1 -0
- package/dist/chunks/shared-BDka-8DG.js +3720 -0
- package/dist/chunks/shared-BWk3i0ft.js +2774 -0
- package/dist/chunks/{shared-XCFMpX43.js → shared-BZK_cqqQ.js} +12 -12
- package/dist/chunks/{shared-3uutHtJD.js → shared-Bhrkz9uX.js} +22 -25
- package/dist/chunks/{shared-D7TEJdR2.js → shared-BqL8W-G6.js} +1 -1
- package/dist/chunks/shared-BqvHpTHr.js +572 -0
- package/dist/chunks/shared-CjW1DhGL.js +1 -0
- package/dist/chunks/{shared-B_MRyp8K.js → shared-CqjOqXJ3.js} +32 -50
- package/dist/chunks/shared-D1W4I3eq.js +4143 -0
- package/dist/chunks/{shared-C_Ru__JO.js → shared-D6pr-dx0.js} +1 -1
- package/dist/chunks/{shared-DG16QEdg.js → shared-DRzfRsiJ.js} +173 -203
- package/dist/chunks/{shared-Bnqz77V3.js → shared-XXW1oBnj.js} +15 -13
- package/dist/chunks/{shared-QJPpnJIO.js → shared-gytWODMC.js} +2 -2
- package/dist/chunks/shared-k9bZPE_p.js +49 -0
- package/dist/components.js +1 -1
- package/dist/index.js +1 -1
- package/dist/templates/delegation-poker.js +1 -1
- package/dist/templates/event-storming.js +1 -1
- package/dist/templates/example-mapping.js +1 -1
- package/dist/templates/plain.js +1 -1
- package/dist/templates/prototype.js +1 -1
- package/dist/templates/slides.js +1 -1
- package/dist/templates/task-board.js +1 -1
- package/dist/templates/usm.js +1 -1
- package/dist/templates/whiteboard.js +1 -1
- package/package.json +1 -2
- package/dist/chunks/shared-B9XMvOh-.js +0 -1027
- package/dist/chunks/shared-BnGxP2qu.js +0 -2560
- package/dist/chunks/shared-CLSKGVCT.js +0 -572
- package/dist/chunks/shared-CjhDJ2vV.js +0 -2766
- package/dist/chunks/shared-CtHWU02m.js +0 -1
- package/dist/chunks/shared-D4K7KsfJ.js +0 -1
- package/dist/chunks/shared-DdefS1nG.js +0 -1
- package/dist/chunks/shared-DmOHk6B_.js +0 -3457
- package/dist/chunks/shared-OIF3QVAa.js +0 -30
- package/dist/chunks/shared-ml5h7U5L.js +0 -1
- package/dist/templates/grill.js +0 -1
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import{a0 as _,
|
|
1
|
+
import{a0 as _,ae as N,af as f,ag as c,ah as k,ai as p,aB as R,ak as G,al as Y,aj as I,V as u,C as v,h as U,a5 as x,a3 as d,a4 as l,b4 as J,ar as V,ac as W,z as Q,a2 as X,T as w}from"./shared-BDka-8DG.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:R,layout:c(I(y),"content"),title:G(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 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}},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 s=r(e,i.id),n=e.slides[s];return n===void 0?i.id:h(n,s)}case"page":return t.wholeDeck;default:return i.id}},z=(t,e,i)=>({title:e.type,targetLabel:E(t,i,e.target),tone:"meta"}),A=t=>`${t.type} ${u(t.target)} ${JSON.stringify(t.payload)}`,D=(t,e)=>e.slides.map((i,s)=>({value:u({type:"slide",id:i.id}),label:h(i,s),group:t.slideGroup})),M=(t,e,i)=>{const s=r(e,i.slide),n=e.slides[s];return n===void 0?null:{value:u({type:"slide",id:n.id}),label:h(n,s),group:t.slideGroup}},F=(t,e)=>{const i=t.slides[r(t,e.slide)]??t.slides[0],s={...e};return i?s.slide=i.id:delete s.slide,s},H=(t,e)=>{const i=r(t,e.slide),s=i===-1?0:i,n=t.slides[s];return n===void 0?null:{slide:n,index:s,total:t.slides.length,previous:t.slides[s-1],next:t.slides[s+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!==""),L=(t,e)=>{switch(e.type){case"slide":return T(t,e.id)!==void 0;case"page":return!0;default:return!1}},O=t=>{const e=m(t);return{name:"slides",label:"Slides",parseBase:S,emptyBase:C,actions:{},apply:()=>null,hasTarget:L,describe:(i,s)=>z(e,i,s),serialize:A,resolveNavigation:F,navigationFor:(i,s)=>s.type==="slide"?{slide:s.id}:null,commentTargets:i=>D(e,i),currentTarget:(i,s)=>M(e,i,s),title:q}},te={ArrowRight:"next",PageDown:"next",ArrowLeft:"previous",PageUp:"previous",Home:"first",End:"last"},P=t=>t.altKey===!0||t.ctrlKey===!0||t.metaKey===!0||t.shiftKey===!0?null:te[t.key]??null,j=(t,e,i)=>{const s=t.slides.length-1;if(s<0)return;const n=Math.max(r(t,e),0),o={next:Math.min(n+1,s),previous:Math.max(n-1,0),first:0,last:s}[i];return t.slides[o]?.id},ie=(t,e)=>{const{state:i,navigation:s}=t,n=s.slide;return l`
|
|
2
2
|
<nav class="outline" aria-label=${e.outline}>
|
|
3
3
|
<div class="outline-head">
|
|
4
4
|
<span class="dpk-label">${e.outline}</span>
|
|
5
5
|
<span class="dpk-label">${i.slides.length}</span>
|
|
6
6
|
</div>
|
|
7
7
|
<ol class="outline-list">
|
|
8
|
-
${x(i.slides,o=>o.id,(o,a)=>{const g=o.id===
|
|
8
|
+
${x(i.slides,o=>o.id,(o,a)=>{const g=o.id===n,b=t.commentCount({type:"slide",id:o.id});return l`
|
|
9
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":
|
|
10
|
+
<a href=${t.hashFor({slide:o.id})} aria-current=${g?"page":d}>
|
|
11
11
|
<span class="outline-index">${String(a+1).padStart(2,"0")}</span>
|
|
12
12
|
<span class="outline-title">${o.title}</span>
|
|
13
|
-
${b>0?
|
|
13
|
+
${b>0?l`<span class="outline-note">${b}</span>`:d}
|
|
14
14
|
</a>
|
|
15
15
|
</li>
|
|
16
16
|
`})}
|
|
17
17
|
</ol>
|
|
18
18
|
</nav>
|
|
19
|
-
`},
|
|
19
|
+
`},se=(t,e,i)=>{const s=H(t.state,t.navigation);if(s===null)return l`<div class="deck">
|
|
20
20
|
<p class="deck-empty">${e.noSlidesBefore}<code>slides</code>${e.noSlidesAfter}</p>
|
|
21
|
-
</div>`;const{slide:
|
|
21
|
+
</div>`;const{slide:n,index:o,total:a}=s;return l`
|
|
22
22
|
<div class="deck">
|
|
23
|
-
<div class="stage">${
|
|
23
|
+
<div class="stage">${ne(n,o)}</div>
|
|
24
24
|
<div class="deck-bar">
|
|
25
25
|
<div class="deck-move">
|
|
26
26
|
<button
|
|
@@ -28,7 +28,7 @@ import{a0 as _,ad as N,ae as f,af as c,ag as k,ah as p,aA as R,aj as G,ak as Y,a
|
|
|
28
28
|
type="button"
|
|
29
29
|
aria-label=${e.previous}
|
|
30
30
|
title=${e.previous}
|
|
31
|
-
?disabled=${
|
|
31
|
+
?disabled=${s.previous===void 0}
|
|
32
32
|
@click=${()=>i.onStep("previous")}
|
|
33
33
|
>
|
|
34
34
|
${J()}
|
|
@@ -41,7 +41,7 @@ import{a0 as _,ad as N,ae as f,af as c,ag as k,ah as p,aA as R,aj as G,ak as Y,a
|
|
|
41
41
|
type="button"
|
|
42
42
|
aria-label=${e.next}
|
|
43
43
|
title=${e.next}
|
|
44
|
-
?disabled=${
|
|
44
|
+
?disabled=${s.next===void 0}
|
|
45
45
|
@click=${()=>i.onStep("next")}
|
|
46
46
|
>
|
|
47
47
|
${V()}
|
|
@@ -50,19 +50,19 @@ import{a0 as _,ad as N,ae as f,af as c,ag as k,ah as p,aA as R,aj as G,ak as Y,a
|
|
|
50
50
|
<div class="deck-progress" aria-hidden="true">
|
|
51
51
|
<span style=${`width:${(o+1)/a*100}%`}></span>
|
|
52
52
|
</div>
|
|
53
|
-
${i.canFullscreen?
|
|
53
|
+
${i.canFullscreen?l`<button
|
|
54
54
|
class="dpk-btn deck-fullscreen"
|
|
55
55
|
type="button"
|
|
56
56
|
title=${e.fullscreenHint}
|
|
57
57
|
@click=${i.onFullscreen}
|
|
58
58
|
>
|
|
59
59
|
${W()} ${e.fullscreen}
|
|
60
|
-
</button>`:
|
|
60
|
+
</button>`:d}
|
|
61
61
|
</div>
|
|
62
|
-
${ae(e,
|
|
63
|
-
${oe(t.state,
|
|
62
|
+
${ae(e,n,ee(t.comments,n.id),i)}
|
|
63
|
+
${oe(t.state,n.id)}
|
|
64
64
|
</div>
|
|
65
|
-
`},
|
|
65
|
+
`},ne=(t,e)=>l`
|
|
66
66
|
<article
|
|
67
67
|
class="slide"
|
|
68
68
|
data-layout=${t.layout}
|
|
@@ -72,25 +72,25 @@ import{a0 as _,ad as N,ae as f,af as c,ag as k,ah as p,aA as R,aj as G,ak as Y,a
|
|
|
72
72
|
>
|
|
73
73
|
<div class="slide-content">
|
|
74
74
|
<h2 class="slide-title">${t.title}</h2>
|
|
75
|
-
${t.subtitle===""?l
|
|
76
|
-
${t.points.length===0?l
|
|
77
|
-
${t.points.map(i=>
|
|
75
|
+
${t.subtitle===""?d:l`<p class="slide-subtitle">${t.subtitle}</p>`}
|
|
76
|
+
${t.points.length===0?d:l`<ul class="slide-points">
|
|
77
|
+
${t.points.map(i=>l`<li>${i}</li>`)}
|
|
78
78
|
</ul>`}
|
|
79
79
|
<div class="slide-body"><slot name=${`preview:${t.id}`}></slot></div>
|
|
80
80
|
</div>
|
|
81
81
|
<span class="slide-number" aria-hidden="true">${e+1}</span>
|
|
82
82
|
</article>
|
|
83
|
-
`,ae=(t,e,i,
|
|
83
|
+
`,ae=(t,e,i,s)=>{const n=s.draftFor(e.id),o=n.trim()!=="";return l`
|
|
84
84
|
<section class="slide-comments" aria-label=${t.commentOnSlide}>
|
|
85
|
-
${i.length===0?l
|
|
86
|
-
${x(i,a=>a.id,a=>
|
|
85
|
+
${i.length===0?d:l`<ul class="slide-comment-list">
|
|
86
|
+
${x(i,a=>a.id,a=>l`<li>
|
|
87
87
|
<span class="slide-comment-body">${a.body}</span>
|
|
88
88
|
<button
|
|
89
89
|
class="dpk-icon-btn slide-comment-delete"
|
|
90
90
|
type="button"
|
|
91
91
|
aria-label=${t.deleteComment}
|
|
92
92
|
title=${t.deleteComment}
|
|
93
|
-
@click=${()=>
|
|
93
|
+
@click=${()=>s.onDeleteComment(a.id)}
|
|
94
94
|
>
|
|
95
95
|
${Q()}
|
|
96
96
|
</button>
|
|
@@ -101,16 +101,16 @@ import{a0 as _,ad as N,ae as f,af as c,ag as k,ah as p,aA as R,aj as G,ak as Y,a
|
|
|
101
101
|
class="dpk-textarea slide-comment-input"
|
|
102
102
|
aria-label=${t.commentOnSlide}
|
|
103
103
|
placeholder=${t.commentPlaceholder}
|
|
104
|
-
.value=${
|
|
105
|
-
@input=${a=>{a.currentTarget instanceof HTMLTextAreaElement&&
|
|
106
|
-
@keydown=${a=>{a.isComposing||a.key!=="Enter"||!(a.metaKey||a.ctrlKey)||(a.preventDefault(),o&&
|
|
104
|
+
.value=${n}
|
|
105
|
+
@input=${a=>{a.currentTarget instanceof HTMLTextAreaElement&&s.onDraft(e.id,a.currentTarget.value)}}
|
|
106
|
+
@keydown=${a=>{a.isComposing||a.key!=="Enter"||!(a.metaKey||a.ctrlKey)||(a.preventDefault(),o&&s.onComment(e.id))}}
|
|
107
107
|
></textarea>
|
|
108
108
|
<div class="slide-comment-actions">
|
|
109
109
|
<button
|
|
110
110
|
class="dpk-btn dpk-btn--accent slide-comment-submit"
|
|
111
111
|
type="button"
|
|
112
112
|
?disabled=${!o}
|
|
113
|
-
@click=${()=>
|
|
113
|
+
@click=${()=>s.onComment(e.id)}
|
|
114
114
|
>
|
|
115
115
|
${t.addComment}
|
|
116
116
|
</button>
|
|
@@ -118,9 +118,9 @@ import{a0 as _,ad as N,ae as f,af as c,ag as k,ah as p,aA as R,aj as G,ak as Y,a
|
|
|
118
118
|
</div>
|
|
119
119
|
</div>
|
|
120
120
|
</section>
|
|
121
|
-
`},oe=(t,e)=>{const i=t.slides.filter(
|
|
122
|
-
${i.map(
|
|
123
|
-
</div>`},
|
|
121
|
+
`},oe=(t,e)=>{const i=t.slides.filter(s=>s.id!==e);return i.length===0?d:l`<div class="parked" aria-hidden="true">
|
|
122
|
+
${i.map(s=>l`<slot name=${`preview:${s.id}`}></slot>`)}
|
|
123
|
+
</div>`},le=X`
|
|
124
124
|
/* ------------------------------------------------------------ outline */
|
|
125
125
|
|
|
126
126
|
.outline-head {
|
|
@@ -143,23 +143,11 @@ import{a0 as _,ad as N,ae as f,af as c,ag as k,ah as p,aA as R,aj as G,ak as Y,a
|
|
|
143
143
|
position: relative;
|
|
144
144
|
}
|
|
145
145
|
|
|
146
|
-
.outline-row::before {
|
|
147
|
-
content: '';
|
|
148
|
-
position: absolute;
|
|
149
|
-
left: 0;
|
|
150
|
-
top: 6px;
|
|
151
|
-
bottom: 6px;
|
|
152
|
-
width: 3px;
|
|
153
|
-
border-radius: var(--dpk-radius-xs);
|
|
154
|
-
background: transparent;
|
|
155
|
-
transition: background 140ms var(--dpk-ease);
|
|
156
|
-
}
|
|
157
|
-
|
|
158
146
|
.outline-row a {
|
|
159
147
|
display: flex;
|
|
160
148
|
align-items: baseline;
|
|
161
149
|
gap: 10px;
|
|
162
|
-
padding: 7px 8px
|
|
150
|
+
padding: 7px 8px;
|
|
163
151
|
border-radius: var(--dpk-radius-sm);
|
|
164
152
|
color: var(--dpk-ink-soft);
|
|
165
153
|
font-size: 13px;
|
|
@@ -181,11 +169,6 @@ import{a0 as _,ad as N,ae as f,af as c,ag as k,ah as p,aA as R,aj as G,ak as Y,a
|
|
|
181
169
|
box-shadow: var(--dpk-focus);
|
|
182
170
|
}
|
|
183
171
|
|
|
184
|
-
.outline-row[data-current='true']::before {
|
|
185
|
-
background: linear-gradient(180deg, var(--dpk-accent-bright), var(--dpk-accent-strong));
|
|
186
|
-
box-shadow: 0 0 8px color-mix(in srgb, var(--dpk-accent) 45%, transparent);
|
|
187
|
-
}
|
|
188
|
-
|
|
189
172
|
.outline-row[data-current='true'] a {
|
|
190
173
|
background: color-mix(in srgb, var(--dpk-accent) 8%, var(--dpk-paper-raised));
|
|
191
174
|
color: var(--dpk-ink);
|
|
@@ -523,9 +506,8 @@ import{a0 as _,ad as N,ae as f,af as c,ag as k,ah as p,aA as R,aj as G,ak as Y,a
|
|
|
523
506
|
display: flex;
|
|
524
507
|
align-items: flex-start;
|
|
525
508
|
gap: 8px;
|
|
526
|
-
padding: 6px 6px 6px
|
|
527
|
-
border-
|
|
528
|
-
border-radius: 0 var(--dpk-radius-sm) var(--dpk-radius-sm) 0;
|
|
509
|
+
padding: 6px 6px 6px 10px;
|
|
510
|
+
border-radius: var(--dpk-radius-sm);
|
|
529
511
|
background: var(--dpk-paper-sunken);
|
|
530
512
|
font-size: 13px;
|
|
531
513
|
line-height: 1.55;
|
|
@@ -619,4 +601,4 @@ import{a0 as _,ad as N,ae as f,af as c,ag as k,ah as p,aA as R,aj as G,ak as Y,a
|
|
|
619
601
|
transition: none;
|
|
620
602
|
}
|
|
621
603
|
}
|
|
622
|
-
`,
|
|
604
|
+
`,de='input, textarea, select, [contenteditable]:not([contenteditable="false"])',re=t=>t instanceof HTMLElement&&(t.isContentEditable||t.matches(de));class B extends w{static{this.styles=[w.styles,le]}#e=new Map;#t={slide:"",count:0};definitionFor(e){return O(e)}connectedCallback(){super.connectedCallback(),document.addEventListener("keydown",this.#n)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("keydown",this.#n)}renderRegions(e){const i=m(this.locale);return{sidebar:ie(e,i),sidebarHidden:e.state.slides.length===0,main:se(e,i,{canFullscreen:document.fullscreenEnabled===!0,draftFor:s=>this.#e.get(s)??"",onStep:s=>this.#i(s),onFullscreen:()=>this.#l(),onDraft:(s,n)=>this.#s(s,n),onComment:s=>this.#o(s),onDeleteComment:s=>this.removeAction(s)})}}updated(){super.updated(),this.#a()}#a(){const e=this.renderRoot.querySelector(".slide-comment-list"),i={slide:this.navigation.slide??"",count:e?.childElementCount??0},s=this.#t;this.#t=i,!(e===null||i.slide===s.slide&&i.count<=s.count)&&(e.scrollTop=e.scrollHeight)}#i(e){const i=j(this.derivation.state,this.navigation.slide,e);i!==void 0&&this.navigate({slide:i})}#s(e,i){const s=new Map(this.#e);i===""?s.delete(e):s.set(e,i),this.#e=s,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.#s(e,"")}#l(){const e=this.renderRoot.querySelector(".stage");!(e instanceof HTMLElement)||document.fullscreenElement!==null||e.requestFullscreen().catch(()=>{})}#n=e=>{if(e.defaultPrevented)return;const i=P(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:z,emptySlidesBase:C,findSlide:T,findSlideIndex:r,parseSlidesBase:S,resolveSlidesNavigation:F,serializeSlidesAction:A,slideKeyStep:P,slidePosition:H,slidesBaseSchema:$,slidesCommentTargets:D,slidesCurrentTarget:M,slidesDefinitionFor:O,slidesHasTarget:L,slidesMessages:m,slidesTargetLabel:E,slidesTitle:q,stepSlide:j},Symbol.toStringTag,{value:"Module"}));export{K as d,ce as i};
|