dev-process-kit 0.4.3 → 0.4.4

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.
Files changed (38) hide show
  1. package/README.md +1 -0
  2. package/dist/boards.js +1 -1
  3. package/dist/chunks/shared-B3ddPOb7.js +1 -0
  4. package/dist/chunks/shared-BEcs-9nd.js +6077 -0
  5. package/dist/chunks/{shared-BugVP_yn.js → shared-BIODquqM.js} +4 -4
  6. package/dist/chunks/{shared-tq8QsPTt.js → shared-BZ0Y7lDS.js} +41 -41
  7. package/dist/chunks/{shared-DJCdfkg-.js → shared-BncKaYRX.js} +1 -1
  8. package/dist/chunks/{shared-0HXwrPVn.js → shared-BqjrIOYm.js} +1 -1
  9. package/dist/chunks/shared-CaQMHNzp.js +3 -0
  10. package/dist/chunks/shared-Cd0znWBB.js +3545 -0
  11. package/dist/chunks/shared-Cuc_13rI.js +7378 -0
  12. package/dist/chunks/shared-D2yn0bY8.js +1883 -0
  13. package/dist/chunks/{shared-CeNV36-9.js → shared-D5_ZJTgh.js} +53 -53
  14. package/dist/chunks/shared-DDIKBRRU.js +1 -0
  15. package/dist/chunks/{shared-CxTKp5CX.js → shared-DbfVyq_3.js} +1 -1
  16. package/dist/chunks/{shared-D3Xm9wF8.js → shared-Dha4GwGq.js} +2 -2
  17. package/dist/chunks/shared-GVsZCCAa.js +4954 -0
  18. package/dist/chunks/{shared-CyOyXHQO.js → shared-IlpAgOtF.js} +1 -1
  19. package/dist/chunks/{shared-qLSu7C5m.js → shared-M5nBQyzE.js} +11 -11
  20. package/dist/chunks/{shared-BSEt0fN6.js → shared-lNnnWUPH.js} +14 -14
  21. package/dist/components.js +1 -1
  22. package/dist/index.js +1 -1
  23. package/dist/sync.js +1 -1
  24. package/dist/views/delegation-poker.js +1 -1
  25. package/dist/views/plain.js +1 -1
  26. package/dist/views/prototype.js +1 -1
  27. package/dist/views/slides.js +1 -1
  28. package/dist/views/task-board.js +1 -1
  29. package/dist/views/usm.js +1 -1
  30. package/package.json +1 -1
  31. package/dist/chunks/shared-B2F5LY6f.js +0 -1883
  32. package/dist/chunks/shared-B7MDu9J_.js +0 -6912
  33. package/dist/chunks/shared-C1sWnXGY.js +0 -1
  34. package/dist/chunks/shared-C2_qMOyi.js +0 -1
  35. package/dist/chunks/shared-CjWMknuE.js +0 -3645
  36. package/dist/chunks/shared-DCnxYUIB.js +0 -3
  37. package/dist/chunks/shared-DE09J93T.js +0 -5625
  38. package/dist/chunks/shared-Dxf3BUk6.js +0 -4192
@@ -1,4 +1,4 @@
1
- import{b3 as L,b4 as B,a5 as d,b5 as E,_ as M,a4 as v,ag as n,r as D,ay as c,b6 as O,b7 as j,A as $,b8 as K,t as R}from"./shared-DE09J93T.js";import{L as N}from"./shared-CjW1DhGL.js";const H=[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20"}],["path",{d:"M2 12h20"}]],P=[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8"}],["path",{d:"M21 3v5h-5"}]],U=L(class extends B{constructor(){super(...arguments),this.key=d}render(e,r){return this.key=e,r}update(e,[r,t]){return r!==this.key&&(E(e),this.key=r),t}}),F=M({en:{comment:"Comment",commentOn:e=>`Comment on ${e}`,submit:"Add",cancel:"Cancel"},ja:{comment:"\u30B3\u30E1\u30F3\u30C8",commentOn:e=>`${e}\u3078\u306E\u30B3\u30E1\u30F3\u30C8`,submit:"\u8FFD\u52A0",cancel:"\u30AD\u30E3\u30F3\u30BB\u30EB"}}),G=(e,r,t={})=>({body:e,notes:r,submission:e.trim()||null,label:t.label??null,error:t.error??null,key:t.key??null,choice:t.choice??null,submitLabel:t.submitLabel??null,placeholder:t.placeholder??null}),S=(e,r,t)=>{const a=()=>{r.submission!==null&&t({kind:"comment",body:r.submission})};return n`<div
1
+ import{a4 as B,a0 as v,a2 as d,a3 as s,aG as $,r as E,aC as c,ba as M,bb as O,A as m,bc as j,t as D}from"./shared-BEcs-9nd.js";import{L as R}from"./shared-CjW1DhGL.js";const N=[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20"}],["path",{d:"M2 12h20"}]],G=[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8"}],["path",{d:"M21 3v5h-5"}]],H=B({en:{comment:"Comment",commentOn:e=>`Comment on ${e}`,submit:"Add",cancel:"Cancel"},ja:{comment:"\u30B3\u30E1\u30F3\u30C8",commentOn:e=>`${e}\u3078\u306E\u30B3\u30E1\u30F3\u30C8`,submit:"\u8FFD\u52A0",cancel:"\u30AD\u30E3\u30F3\u30BB\u30EB"}}),P=(e,r,t={})=>({body:e,notes:r,submission:e.trim()||null,label:t.label??null,error:t.error??null,key:t.key??null,choice:t.choice??null,submitLabel:t.submitLabel??null,placeholder:t.placeholder??null}),S=(e,r,t)=>{const a=()=>{r.submission!==null&&t({kind:"comment",body:r.submission})};return s`<div
2
2
  class="comment-pop"
3
3
  popover="manual"
4
4
  role="dialog"
@@ -6,11 +6,11 @@ import{b3 as L,b4 as B,a5 as d,b5 as E,_ as M,a4 as v,ag as n,r as D,ay as c,b6
6
6
  @click=${o=>o.stopPropagation()}
7
7
  @keydown=${o=>{o.isComposing||o.key!=="Escape"||(o.preventDefault(),o.stopPropagation(),t({kind:"dismiss"}))}}
8
8
  >
9
- ${r.label?n`<strong class="comment-target">${r.label}</strong>`:d}
10
- ${r.error?n`<p class="comment-error" role="alert">${r.error}</p>`:d}
11
- ${r.choice?m(r.choice,t):d}
12
- ${r.notes.length?n`<ul class="comment-list">
13
- ${r.notes.map(o=>n`<li>${o}</li>`)}
9
+ ${r.label?s`<strong class="comment-target">${r.label}</strong>`:d}
10
+ ${r.error?s`<p class="comment-error" role="alert">${r.error}</p>`:d}
11
+ ${r.choice?y(r.choice,t):d}
12
+ ${r.notes.length?s`<ul class="comment-list">
13
+ ${r.notes.map(o=>s`<li>${o}</li>`)}
14
14
  </ul>`:d}
15
15
  <textarea
16
16
  class="dpk-textarea"
@@ -18,7 +18,7 @@ import{b3 as L,b4 as B,a5 as d,b5 as E,_ as M,a4 as v,ag as n,r as D,ay as c,b6
18
18
  data-dpk-text-key=${r.key??d}
19
19
  .value=${r.body}
20
20
  @input=${o=>{o.currentTarget instanceof HTMLTextAreaElement&&t({kind:"input",body:o.currentTarget.value})}}
21
- @keydown=${o=>{o.isComposing||o.key==="Enter"&&(o.ctrlKey||o.metaKey)&&(o.preventDefault(),a())}}
21
+ @keydown=${o=>{$(o)==="submit"&&a()}}
22
22
  ></textarea>
23
23
  <div class="pop-actions">
24
24
  <button class="dpk-btn dpk-btn--accent" type="button" ?disabled=${r.submission===null} @click=${a}>
@@ -33,9 +33,9 @@ import{b3 as L,b4 as B,a5 as d,b5 as E,_ as M,a4 as v,ag as n,r as D,ay as c,b6
33
33
  ${e.cancel}
34
34
  </button>
35
35
  </div>
36
- </div>`},m=(e,r)=>{const t=e.options.find(a=>a.value===e.value)?.hint;return n`<fieldset class="comment-kinds">
36
+ </div>`},y=(e,r)=>{const t=e.options.find(a=>a.value===e.value)?.hint;return s`<fieldset class="comment-kinds">
37
37
  <legend>${e.label}</legend>
38
- ${e.options.map(a=>n`<label class="comment-kind">
38
+ ${e.options.map(a=>s`<label class="comment-kind">
39
39
  <input
40
40
  type="radio"
41
41
  name="comment-kind"
@@ -46,17 +46,17 @@ import{b3 as L,b4 as B,a5 as d,b5 as E,_ as M,a4 as v,ag as n,r as D,ay as c,b6
46
46
  <span>${a.label}</span>
47
47
  </label>`)}
48
48
  </fieldset>
49
- ${t===void 0?d:n`<p class="comment-kind-hint">${t}</p>`}`},_=(e,r,t)=>{const a=()=>{r.submission!==null&&t({kind:"comment",body:r.submission})},o=r.submitLabel??e.submit;return n`<form
49
+ ${t===void 0?d:s`<p class="comment-kind-hint">${t}</p>`}`},U=(e,r,t)=>{const a=()=>{r.submission!==null&&t({kind:"comment",body:r.submission})},o=r.submitLabel??e.submit;return s`<form
50
50
  class="inline-composer"
51
- @submit=${s=>{s.preventDefault(),a()}}
51
+ @submit=${n=>{n.preventDefault(),a()}}
52
52
  >
53
- ${r.choice?n`<div
53
+ ${r.choice?s`<div
54
54
  class="inline-composer-kinds"
55
- @keydown=${s=>{s.key==="Enter"&&s.preventDefault()}}
55
+ @keydown=${n=>{n.key==="Enter"&&n.preventDefault()}}
56
56
  >
57
- ${m(r.choice,t)}
57
+ ${y(r.choice,t)}
58
58
  </div>`:d}
59
- ${r.error?n`<p class="comment-error" role="alert">${r.error}</p>`:d}
59
+ ${r.error?s`<p class="comment-error" role="alert">${r.error}</p>`:d}
60
60
  <div class="inline-composer-box">
61
61
  <textarea
62
62
  rows="1"
@@ -64,8 +64,8 @@ import{b3 as L,b4 as B,a5 as d,b5 as E,_ as M,a4 as v,ag as n,r as D,ay as c,b6
64
64
  placeholder=${r.placeholder??d}
65
65
  data-dpk-text-key=${r.key??d}
66
66
  .value=${r.body}
67
- @input=${s=>{s.currentTarget instanceof HTMLTextAreaElement&&t({kind:"input",body:s.currentTarget.value})}}
68
- @keydown=${s=>{s.isComposing||s.key==="Enter"&&(s.ctrlKey||s.metaKey)&&(s.preventDefault(),a())}}
67
+ @input=${n=>{n.currentTarget instanceof HTMLTextAreaElement&&t({kind:"input",body:n.currentTarget.value})}}
68
+ @keydown=${n=>{$(n)==="submit"&&a()}}
69
69
  ></textarea>
70
70
  <button
71
71
  class="dpk-btn dpk-btn--accent inline-composer-send"
@@ -74,10 +74,10 @@ import{b3 as L,b4 as B,a5 as d,b5 as E,_ as M,a4 as v,ag as n,r as D,ay as c,b6
74
74
  title=${o}
75
75
  ?disabled=${r.submission===null}
76
76
  >
77
- ${D()}
77
+ ${E()}
78
78
  </button>
79
79
  </div>
80
- </form>`},W=v`
80
+ </form>`},F=v`
81
81
  .inline-composer {
82
82
  display: grid;
83
83
  gap: 8px;
@@ -152,20 +152,20 @@ import{b3 as L,b4 as B,a5 as d,b5 as E,_ as M,a4 as v,ag as n,r as D,ay as c,b6
152
152
  width: 16px;
153
153
  height: 16px;
154
154
  }
155
- `,y=(e,r)=>{const t=e.trim();if(t==="")return null;try{return t.startsWith("/")?new URL(t,r):new URL(/^[a-z][a-z0-9+.-]*:\/\//i.test(t)?t:`https://${t}`)}catch{return null}},X=e=>`${e.origin}${e.pathname.replace(/\/+$/,"")}`,q=(e,r)=>{const t=e.trim();return t.startsWith("/")?y(t,r)?.href??t:/^[a-z][a-z0-9+.-]*:\/\//i.test(t)?t:`https://${t}`},J=e=>{try{return new URL(e).host||e}catch{return e}},V=c(O),Q=c(j),Y=c(P),Z=c(N),f=c(H),ee=(e,r,t)=>{const a=r.length-1;if(e==="ArrowRight")return r[t===a?0:t+1];if(e==="ArrowLeft")return r[t===0?a:t-1];if(e==="Home")return r[0];if(e==="End")return r[a]},re=e=>{const{view:r,send:t,labels:a}=e,o=s=>i=>{const l=r.tabs[s],k=i.key==="Enter"||i.key===" "?l:ee(i.key,r.tabs,s);k!==void 0&&(i.preventDefault(),t({kind:"activate",id:k.id,focus:!0}))};return n`<div class="browser-tabs">
155
+ `,T=(e,r)=>{const t=e.trim();if(t==="")return null;try{return t.startsWith("/")?new URL(t,r):new URL(/^[a-z][a-z0-9+.-]*:\/\//i.test(t)?t:`https://${t}`)}catch{return null}},K=e=>`${e.origin}${e.pathname.replace(/\/+$/,"")}`,W=(e,r)=>{const t=e.trim();return t.startsWith("/")?T(t,r)?.href??t:/^[a-z][a-z0-9+.-]*:\/\//i.test(t)?t:`https://${t}`},X=e=>{try{return new URL(e).host||e}catch{return e}},_=c(M),J=c(O),V=c(G),q=c(R),f=c(N),Q=(e,r,t)=>{const a=r.length-1;if(e==="ArrowRight")return r[t===a?0:t+1];if(e==="ArrowLeft")return r[t===0?a:t-1];if(e==="Home")return r[0];if(e==="End")return r[a]},Y=e=>{const{view:r,send:t,labels:a}=e,o=n=>i=>{const l=r.tabs[n],k=i.key==="Enter"||i.key===" "?l:Q(i.key,r.tabs,n);k!==void 0&&(i.preventDefault(),t({kind:"activate",id:k.id,focus:!0}))};return s`<div class="browser-tabs">
156
156
  <div class="browser-tab-list" role="tablist" aria-label=${a.tabs}>
157
- ${r.tabs.map((s,i)=>n`<div
157
+ ${r.tabs.map((n,i)=>s`<div
158
158
  class="browser-tab"
159
159
  role="tab"
160
- tabindex=${s.active?"0":"-1"}
161
- aria-selected=${s.active?"true":"false"}
162
- title=${s.title}
163
- @click=${()=>t({kind:"activate",id:s.id})}
160
+ tabindex=${n.active?"0":"-1"}
161
+ aria-selected=${n.active?"true":"false"}
162
+ title=${n.title}
163
+ @click=${()=>t({kind:"activate",id:n.id})}
164
164
  @keydown=${o(i)}
165
165
  >
166
166
  <span class="browser-favicon">${f()}</span>
167
- <span class="browser-tab-title">${s.title}</span>
168
- ${T(e,s.id)}
167
+ <span class="browser-tab-title">${n.title}</span>
168
+ ${I(e,n.id)}
169
169
  </div>`)}
170
170
  </div>
171
171
  <button
@@ -175,30 +175,30 @@ import{b3 as L,b4 as B,a5 as d,b5 as E,_ as M,a4 as v,ag as n,r as D,ay as c,b6
175
175
  title=${a.newTab}
176
176
  @click=${()=>t({kind:"new-tab"})}
177
177
  >
178
- ${$()}
178
+ ${m()}
179
179
  </button>
180
180
  ${e.extra??d}
181
- </div>`},T=(e,r)=>n`<button
181
+ </div>`},I=(e,r)=>s`<button
182
182
  class="browser-tab-close"
183
183
  type="button"
184
184
  aria-label=${e.labels.closeTab}
185
185
  title=${e.labels.closeTab}
186
186
  @click=${t=>{t.stopPropagation(),e.send({kind:"close-tab",id:r})}}
187
187
  >
188
- ${R()}
189
- </button>`,te={back:V,forward:Q,reload:Y},p=(e,r)=>{const{view:t,send:a,labels:o}=e,s=o[r],i={back:!t.canBack,forward:!t.canForward,reload:t.entry?.kind!=="page"}[r];return n`<button
188
+ ${D()}
189
+ </button>`,Z={back:_,forward:J,reload:V},p=(e,r)=>{const{view:t,send:a,labels:o}=e,n=o[r],i={back:!t.canBack,forward:!t.canForward,reload:t.entry?.kind!=="page"}[r];return s`<button
190
190
  class=${`browser-nav browser-${r}`}
191
191
  type="button"
192
- aria-label=${s}
193
- title=${s}
192
+ aria-label=${n}
193
+ title=${n}
194
194
  ?disabled=${i}
195
195
  @click=${()=>a({kind:r})}
196
196
  >
197
- ${te[r]()}
198
- </button>`},ae=e=>{const{view:r,send:t,labels:a,phone:o}=e,s=r.profile??a.guest;return n`<div class="browser-toolbar">
199
- ${o?d:n`${p(e,"back")} ${p(e,"forward")} ${p(e,"reload")}`}
197
+ ${Z[r]()}
198
+ </button>`},ee=e=>{const{view:r,send:t,labels:a,phone:o}=e,n=r.profile??a.guest;return s`<div class="browser-toolbar">
199
+ ${o?d:s`${p(e,"back")} ${p(e,"forward")} ${p(e,"reload")}`}
200
200
  <div class="browser-address-form">
201
- <span class="browser-lock">${r.entry?.kind==="page"?Z():f()}</span>
201
+ <span class="browser-lock">${r.entry?.kind==="page"?q():f()}</span>
202
202
  <input
203
203
  class="browser-address"
204
204
  type="text"
@@ -206,17 +206,17 @@ import{b3 as L,b4 as B,a5 as d,b5 as E,_ as M,a4 as v,ag as n,r as D,ay as c,b6
206
206
  aria-label=${a.address}
207
207
  spellcheck="false"
208
208
  autocomplete="off"
209
- .value=${K(r.url)}
209
+ .value=${j(r.url)}
210
210
  @focus=${i=>{i.currentTarget instanceof HTMLInputElement&&i.currentTarget.select()}}
211
211
  @keydown=${i=>{const l=i.currentTarget;if(!(!(l instanceof HTMLInputElement)||i.isComposing)){if(i.key==="Enter"){if(i.preventDefault(),l.value.trim()==="")return;l.blur(),t({kind:"address",input:l.value});return}i.key==="Escape"&&(i.preventDefault(),l.value=r.url,l.blur())}}}
212
212
  />
213
213
  </div>
214
- <span class="browser-profile" title=${a.profile(s)}>
215
- <span class="browser-avatar" aria-hidden="true">${Array.from(s)[0]??""}</span>
216
- ${o?d:n`<span class="browser-profile-name">${s}</span>`}
214
+ <span class="browser-profile" title=${a.profile(n)}>
215
+ <span class="browser-avatar" aria-hidden="true">${Array.from(n)[0]??""}</span>
216
+ ${o?d:s`<span class="browser-profile-name">${n}</span>`}
217
217
  </span>
218
- </div>`},oe=e=>n`${e.phone?d:re(e)} ${ae(e)}
219
- <div class="browser-progress" aria-hidden="true"></div>`,se=e=>{if(!e.phone)return d;const{view:r,send:t,labels:a}=e;return n`<div class="browser-bottom">
218
+ </div>`},re=e=>s`${e.phone?d:Y(e)} ${ee(e)}
219
+ <div class="browser-progress" aria-hidden="true"></div>`,te=e=>{if(!e.phone)return d;const{view:r,send:t,labels:a}=e;return s`<div class="browser-bottom">
220
220
  ${p(e,"back")} ${p(e,"forward")}
221
221
  <button
222
222
  class="browser-nav browser-new-tab"
@@ -225,7 +225,7 @@ import{b3 as L,b4 as B,a5 as d,b5 as E,_ as M,a4 as v,ag as n,r as D,ay as c,b6
225
225
  title=${a.newTab}
226
226
  @click=${()=>t({kind:"new-tab"})}
227
227
  >
228
- ${$()}
228
+ ${m()}
229
229
  </button>
230
230
  <button
231
231
  class="browser-nav browser-tab-count"
@@ -238,19 +238,19 @@ import{b3 as L,b4 as B,a5 as d,b5 as E,_ as M,a4 as v,ag as n,r as D,ay as c,b6
238
238
  <span class="browser-tab-count-box">${r.tabs.length}</span>
239
239
  </button>
240
240
  ${p(e,"reload")}
241
- </div>`},ne=e=>{const{view:r,send:t,labels:a}=e;return n`<div class="browser-switcher" role="dialog" aria-label=${a.tabs}>
242
- ${r.tabs.map(o=>n`<div class="browser-card" aria-current=${o.active?"true":d}>
241
+ </div>`},ae=e=>{const{view:r,send:t,labels:a}=e;return s`<div class="browser-switcher" role="dialog" aria-label=${a.tabs}>
242
+ ${r.tabs.map(o=>s`<div class="browser-card" aria-current=${o.active?"true":d}>
243
243
  <button class="browser-card-open" type="button" @click=${()=>t({kind:"activate",id:o.id})}>
244
244
  <span class="browser-favicon">${f()}</span>
245
245
  <span class="browser-card-title">${o.title}</span>
246
246
  <span class="browser-card-url">${o.url}</span>
247
247
  </button>
248
- ${T(e,o.id)}
248
+ ${I(e,o.id)}
249
249
  </div>`)}
250
- </div>`},ie=e=>n`<div class="browser-newtab">
250
+ </div>`},oe=e=>s`<div class="browser-newtab">
251
251
  <p class="browser-newtab-label">${e.labels.shortcuts}</p>
252
252
  <div class="browser-shortcuts">
253
- ${e.shortcuts.map(r=>n`<a
253
+ ${e.shortcuts.map(r=>s`<a
254
254
  class="browser-shortcut"
255
255
  href=${r.href}
256
256
  @click=${t=>{t.preventDefault(),e.send({kind:"visit",page:r.page})}}
@@ -260,12 +260,12 @@ import{b3 as L,b4 as B,a5 as d,b5 as E,_ as M,a4 as v,ag as n,r as D,ay as c,b6
260
260
  <span class="browser-shortcut-url">${r.url}</span>
261
261
  </a>`)}
262
262
  </div>
263
- </div>`,de=(e,r)=>n`<div class="browser-unreachable" role="alert">
263
+ </div>`,ne=(e,r)=>s`<div class="browser-unreachable" role="alert">
264
264
  <h3>${e.unreachableTitle}</h3>
265
265
  <p>${e.unreachableBody}</p>
266
266
  <code>${r}</code>
267
- </div>`,le=(e,r)=>{const t=e.view.entry;return n`${e.phone&&e.switcher?ne(e):d}
268
- ${t?.kind==="unreachable"?de(e.labels,t.url):r===void 0?ie(e):r}`},b=e=>JSON.stringify(Object.entries(e).filter(([,r])=>r!==void 0).sort(([r],[t])=>r<t?-1:r>t?1:0)),I=(e,r)=>e?.kind==="page"&&b(e.page)===r,w=e=>`tab-${e}`,pe=e=>({tabs:[{id:w(1),history:[{kind:"page",page:e}],index:0}],activeId:w(1),seen:b(e),nextId:2}),ce={id:"",history:[],index:0},u=e=>e.tabs.find(r=>r.id===e.activeId)??e.tabs[0]??ce,x=e=>{const r=u(e);return r.history[r.index]},be=e=>u(e).index>0,ue=e=>{const r=u(e);return r.index<r.history.length-1},z=(e,r)=>({...e,tabs:e.tabs.map(t=>t.id===e.activeId?r(t):t)}),g=(e,r)=>z(e,t=>({...t,history:[...t.history.slice(0,t.index+1),r],index:t.index+1})),h=e=>{const r=x(e);return r?.kind==="page"?{...e,seen:b(r.page)}:e},A=(e,r)=>{const t=u(e),a=t.index+r;return a<0||a>=t.history.length?e:h(z(e,o=>({...o,index:a})))},C=(e,r,t)=>{const a=w(e.nextId),o=e.tabs.findIndex(s=>s.id===e.activeId)+1;return h({...e,tabs:[...e.tabs.slice(0,o),{id:a,history:[r],index:0},...e.tabs.slice(o)],activeId:t?e.activeId:a,nextId:e.nextId+1})},we=(e,r)=>{const t=e.tabs.findIndex(s=>s.id===r);if(t<0)return e;if(e.tabs.length===1){const s=w(e.nextId);return{...e,tabs:[{id:s,history:[{kind:"new-tab"}],index:0}],activeId:s,nextId:e.nextId+1}}const a=e.tabs.filter(s=>s.id!==r);if(r!==e.activeId)return{...e,tabs:a};const o=a[t]??a[t-1];return h({...e,tabs:a,activeId:o?.id??e.activeId})},xe=(e,r)=>{const t=r===null?null:b(r);if(t===e.seen)return e;const a={...e,seen:t};return r===null||t===null||I(x(e),t)?a:g(a,{kind:"page",page:r})},he=(e,r)=>{const t=b(r);return I(x(e),t)?e.seen===t?e:{...e,seen:t}:g({...e,seen:t},{kind:"page",page:r})},fe=(e,r)=>{switch(r.kind){case"observe":return xe(e,r.page);case"visit":return he(e,r.page);case"back":return A(e,-1);case"forward":return A(e,1);case"open-tab":return C(e,r.entry,r.background);case"new-tab":return C(e,{kind:"new-tab"},!1);case"unreachable":return g(e,{kind:"unreachable",url:r.url});case"activate":return e.tabs.some(t=>t.id===r.id)&&r.id!==e.activeId?h({...e,activeId:r.id}):e;case"close-tab":return we(e,r.id);default:return e}},ge=v`
267
+ </div>`,se=(e,r)=>{const t=e.view.entry;return s`${e.phone&&e.switcher?ae(e):d}
268
+ ${t?.kind==="unreachable"?ne(e.labels,t.url):r===void 0?oe(e):r}`},b=e=>JSON.stringify(Object.entries(e).filter(([,r])=>r!==void 0).sort(([r],[t])=>r<t?-1:r>t?1:0)),z=(e,r)=>e?.kind==="page"&&b(e.page)===r,w=e=>`tab-${e}`,ie=e=>({tabs:[{id:w(1),history:[{kind:"page",page:e}],index:0}],activeId:w(1),seen:b(e),nextId:2}),de={id:"",history:[],index:0},u=e=>e.tabs.find(r=>r.id===e.activeId)??e.tabs[0]??de,x=e=>{const r=u(e);return r.history[r.index]},le=e=>u(e).index>0,pe=e=>{const r=u(e);return r.index<r.history.length-1},A=(e,r)=>({...e,tabs:e.tabs.map(t=>t.id===e.activeId?r(t):t)}),g=(e,r)=>A(e,t=>({...t,history:[...t.history.slice(0,t.index+1),r],index:t.index+1})),h=e=>{const r=x(e);return r?.kind==="page"?{...e,seen:b(r.page)}:e},C=(e,r)=>{const t=u(e),a=t.index+r;return a<0||a>=t.history.length?e:h(A(e,o=>({...o,index:a})))},L=(e,r,t)=>{const a=w(e.nextId),o=e.tabs.findIndex(n=>n.id===e.activeId)+1;return h({...e,tabs:[...e.tabs.slice(0,o),{id:a,history:[r],index:0},...e.tabs.slice(o)],activeId:t?e.activeId:a,nextId:e.nextId+1})},ce=(e,r)=>{const t=e.tabs.findIndex(n=>n.id===r);if(t<0)return e;if(e.tabs.length===1){const n=w(e.nextId);return{...e,tabs:[{id:n,history:[{kind:"new-tab"}],index:0}],activeId:n,nextId:e.nextId+1}}const a=e.tabs.filter(n=>n.id!==r);if(r!==e.activeId)return{...e,tabs:a};const o=a[t]??a[t-1];return h({...e,tabs:a,activeId:o?.id??e.activeId})},be=(e,r)=>{const t=r===null?null:b(r);if(t===e.seen)return e;const a={...e,seen:t};return r===null||t===null||z(x(e),t)?a:g(a,{kind:"page",page:r})},ue=(e,r)=>{const t=b(r);return z(x(e),t)?e.seen===t?e:{...e,seen:t}:g({...e,seen:t},{kind:"page",page:r})},we=(e,r)=>{switch(r.kind){case"observe":return be(e,r.page);case"visit":return ue(e,r.page);case"back":return C(e,-1);case"forward":return C(e,1);case"open-tab":return L(e,r.entry,r.background);case"new-tab":return L(e,{kind:"new-tab"},!1);case"unreachable":return g(e,{kind:"unreachable",url:r.url});case"activate":return e.tabs.some(t=>t.id===r.id)&&r.id!==e.activeId?h({...e,activeId:r.id}):e;case"close-tab":return ce(e,r.id);default:return e}},xe=v`
269
269
  /*
270
270
  * A tab strip on a darker band, the active tab merged into the toolbar below
271
271
  * it, round navigation buttons, a pill address bar and the profile of the
@@ -789,4 +789,4 @@ import{b3 as L,b4 as B,a5 as d,b5 as E,_ as M,a4 as v,ag as n,r as D,ay as c,b6
789
789
  top: 8px;
790
790
  right: 8px;
791
791
  }
792
- `;export{W as a,_ as b,F as c,y as d,X as e,u as f,ue as g,be as h,U as i,J as j,ge as k,x as l,oe as m,le as n,se as o,G as p,fe as q,S as r,pe as s,q as t};
792
+ `;export{U as a,T as b,H as c,K as d,u as e,pe as f,le as g,X as h,F as i,xe as j,x as k,re as l,se as m,te as n,we as o,P as p,S as r,ie as s,W as t};
@@ -0,0 +1 @@
1
+ import{a4 as S,L as T,V as _}from"./shared-BEcs-9nd.js";import{m as j,q as a,k as o,h as k,j as l,C as B,v as E,w as $}from"./shared-CaQMHNzp.js";const r=S({en:{wholePage:"Whole page",sectionGroup:"Section"},ja:{wholePage:"\u30DA\u30FC\u30B8\u5168\u4F53",sectionGroup:"\u30BB\u30AF\u30B7\u30E7\u30F3"}}),x=a({id:B,title:E(l(),$(1))}),c=a({title:o(l(),""),sections:o(k(x),[])}),p=t=>{const e=j(c,t),i=new Set;for(const n of e.sections){if(i.has(n.id))throw new Error(`duplicate section id: ${n.id}`);i.add(n.id)}return{title:e.title,sections:e.sections}},d=()=>({title:"",sections:[]}),s=(t,e)=>t.sections.find(i=>i.id===e),m=t=>t.title===""?"Plain":t.title,u=(t,e,i)=>{switch(i.type){case"section":return s(e,i.id)?.title??i.id;case"page":return t.wholePage;default:return i.id}},g=(t,e,i)=>({title:e.type,targetLabel:u(t,i,e.target),tone:"meta"}),f=t=>`${t.type} ${T(t.target)} ${JSON.stringify(t.payload)}`,h=(t,e)=>e.sections.map(i=>({value:`section:${i.id}`,label:i.title,group:t.sectionGroup})),w=(t,e)=>e,y=(t,e)=>{switch(e.type){case"section":return s(t,e.id)!==void 0;case"page":return!0;default:return!1}},P=t=>{const e=r(t);return{kind:"view",name:"plain",label:"Plain",addable:!1,parseBase:p,emptyBase:d,actions:{},apply:()=>null,hasTarget:y,describe:(i,n)=>g(e,i,n),serialize:f,resolveNavigation:w,commentTargets:i=>h(e,i),title:m}};class b extends _{definitionFor(e){return P(e)}renderRegions(e){return{}}}const v=()=>{customElements.get("dpk-view-plain")||customElements.define("dpk-view-plain",b)},L=Object.freeze(Object.defineProperty({__proto__:null,DpkViewPlain:b,definePlainElement:v,describePlainAction:g,emptyPlainBase:d,findSection:s,parsePlainBase:p,plainBaseSchema:c,plainCommentTargets:h,plainDefinitionFor:P,plainHasTarget:y,plainMessages:r,plainTargetLabel:u,plainTitle:m,resolvePlainNavigation:w,serializePlainAction:f},Symbol.toStringTag,{value:"Module"}));export{v as d,L as i};
@@ -1,4 +1,4 @@
1
- import{a4 as e}from"./shared-DE09J93T.js";const r=e`
1
+ import{a0 as e}from"./shared-BEcs-9nd.js";const r=e`
2
2
  /* ------------------------------------------------------------ count */
3
3
 
4
4
  /* How many: a small rounded mono figure, beside a tab or a heading. data-size='sm' is quieter. */
@@ -1,4 +1,4 @@
1
- import{a6 as o,a4 as d,x as p,ag as u}from"./shared-DE09J93T.js";import{v as h,M as k,R as f,j as m}from"./shared-DCnxYUIB.js";const g={github:o`<path fill-rule="evenodd" d="M8 0c4.42 0 8 3.58 8 8a8.013 8.013 0 0 1-5.45 7.59c-.4.08-.55-.17-.55-.38 0-.27.01-1.13.01-2.2 0-.75-.25-1.23-.54-1.48 1.78-.2 3.65-.88 3.65-3.95 0-.88-.31-1.59-.82-2.15.08-.2.36-1.02-.08-2.12 0 0-.67-.22-2.2.82-.64-.18-1.32-.27-2-.27-.68 0-1.36.09-2 .27-1.53-1.03-2.2-.82-2.2-.82-.44 1.1-.16 1.92-.08 2.12-.51.56-.82 1.28-.82 2.15 0 3.06 1.86 3.75 3.64 3.95-.23.2-.44.55-.51 1.07-.46.21-1.61.55-2.33-.66-.15-.24-.6-.83-1.23-.82-.67.01-.27.38.01.53.34.19.73.9.82 1.13.16.45.68 1.31 2.69.94 0 .67.01 1.3.01 1.49 0 .21-.15.45-.55.38A7.995 7.995 0 0 1 0 8c0-4.42 3.58-8 8-8Z"></path>`,gitlab:o`<path d="M8 15 1.2 9.9a.7.7 0 0 1-.25-.78L2.7 2.6a.35.35 0 0 1 .66 0L5.1 7.6h5.8l1.74-5a.35.35 0 0 1 .66 0l1.75 6.52a.7.7 0 0 1-.25.78z"></path>`,jira:o`<path d="M14.6 7.4 8.6 1.4 8 .8 3.5 5.3 1.4 7.4a.85.85 0 0 0 0 1.2l4.1 4.1L8 15.2l4.5-4.5.07-.07 2.03-2.03a.85.85 0 0 0 0-1.2zM8 9.9 5.9 8 8 5.9 10.1 8z"></path>`,linear:o`<path d="M1.2 9.4a6.9 6.9 0 0 0 5.4 5.4zM1 7.3l7.7 7.7a7 7 0 0 0 1.9-.5L1.5 5.4a7 7 0 0 0-.5 1.9zm1.2-3.1 9.6 9.6a7 7 0 0 0 1.2-1.1L3.3 3a7 7 0 0 0-1.1 1.2zM4.3 2.3a7 7 0 1 1 9.4 9.4z"></path>`,figma:o`<path d="M5.5 1h2.3v4.6H5.5a2.3 2.3 0 1 1 0-4.6zm2.3 0h2.3a2.3 2.3 0 1 1 0 4.6H7.8zm2.3 4.6a2.3 2.3 0 1 1 0 4.6 2.3 2.3 0 0 1 0-4.6zM5.5 5.6h2.3v4.6H5.5a2.3 2.3 0 1 1 0-4.6zm0 4.6h2.3v2.3a2.3 2.3 0 1 1-2.3-2.3z"></path>`,notion:o`<path fill-rule="evenodd" d="M2.5 1.6 11 1c1 0 1.3.1 2 .6l2.1 1.5c.4.3.5.4.5.7v9.6c0 .7-.3 1.1-1.1 1.2l-9.4.6c-.6 0-.9-.1-1.2-.5L1.9 12c-.3-.5-.5-.8-.5-1.3V2.8c0-.6.3-1.1 1.1-1.2zM5 4.4v8.9l8.6-.5V4zm1 1.2 2.9-.2 3 4.7V5.6l-.8-.1v-.5l2-.1v.6l-.6.1v6.1l-.9.1-3.5-5.4v4.9l.8.2v.5l-2.3.1v-.5l.6-.2V6.4l-.8-.1z"></path>`},x=i=>i==="web"?p():u`<svg class="link-mark" viewBox="0 0 16 16" aria-hidden="true">${g[i]}</svg>`,v=d`
1
+ import{al as l,a0 as d,x as p,a3 as u}from"./shared-BEcs-9nd.js";import{v as h,N as k,T as f,j as m}from"./shared-CaQMHNzp.js";const g={github:l`<path fill-rule="evenodd" d="M8 0c4.42 0 8 3.58 8 8a8.013 8.013 0 0 1-5.45 7.59c-.4.08-.55-.17-.55-.38 0-.27.01-1.13.01-2.2 0-.75-.25-1.23-.54-1.48 1.78-.2 3.65-.88 3.65-3.95 0-.88-.31-1.59-.82-2.15.08-.2.36-1.02-.08-2.12 0 0-.67-.22-2.2.82-.64-.18-1.32-.27-2-.27-.68 0-1.36.09-2 .27-1.53-1.03-2.2-.82-2.2-.82-.44 1.1-.16 1.92-.08 2.12-.51.56-.82 1.28-.82 2.15 0 3.06 1.86 3.75 3.64 3.95-.23.2-.44.55-.51 1.07-.46.21-1.61.55-2.33-.66-.15-.24-.6-.83-1.23-.82-.67.01-.27.38.01.53.34.19.73.9.82 1.13.16.45.68 1.31 2.69.94 0 .67.01 1.3.01 1.49 0 .21-.15.45-.55.38A7.995 7.995 0 0 1 0 8c0-4.42 3.58-8 8-8Z"></path>`,gitlab:l`<path d="M8 15 1.2 9.9a.7.7 0 0 1-.25-.78L2.7 2.6a.35.35 0 0 1 .66 0L5.1 7.6h5.8l1.74-5a.35.35 0 0 1 .66 0l1.75 6.52a.7.7 0 0 1-.25.78z"></path>`,jira:l`<path d="M14.6 7.4 8.6 1.4 8 .8 3.5 5.3 1.4 7.4a.85.85 0 0 0 0 1.2l4.1 4.1L8 15.2l4.5-4.5.07-.07 2.03-2.03a.85.85 0 0 0 0-1.2zM8 9.9 5.9 8 8 5.9 10.1 8z"></path>`,linear:l`<path d="M1.2 9.4a6.9 6.9 0 0 0 5.4 5.4zM1 7.3l7.7 7.7a7 7 0 0 0 1.9-.5L1.5 5.4a7 7 0 0 0-.5 1.9zm1.2-3.1 9.6 9.6a7 7 0 0 0 1.2-1.1L3.3 3a7 7 0 0 0-1.1 1.2zM4.3 2.3a7 7 0 1 1 9.4 9.4z"></path>`,figma:l`<path d="M5.5 1h2.3v4.6H5.5a2.3 2.3 0 1 1 0-4.6zm2.3 0h2.3a2.3 2.3 0 1 1 0 4.6H7.8zm2.3 4.6a2.3 2.3 0 1 1 0 4.6 2.3 2.3 0 0 1 0-4.6zM5.5 5.6h2.3v4.6H5.5a2.3 2.3 0 1 1 0-4.6zm0 4.6h2.3v2.3a2.3 2.3 0 1 1-2.3-2.3z"></path>`,notion:l`<path fill-rule="evenodd" d="M2.5 1.6 11 1c1 0 1.3.1 2 .6l2.1 1.5c.4.3.5.4.5.7v9.6c0 .7-.3 1.1-1.1 1.2l-9.4.6c-.6 0-.9-.1-1.2-.5L1.9 12c-.3-.5-.5-.8-.5-1.3V2.8c0-.6.3-1.1 1.1-1.2zM5 4.4v8.9l8.6-.5V4zm1 1.2 2.9-.2 3 4.7V5.6l-.8-.1v-.5l2-.1v.6l-.6.1v6.1l-.9.1-3.5-5.4v4.9l.8.2v.5l-2.3.1v-.5l.6-.2V6.4l-.8-.1z"></path>`},x=i=>i==="web"?p():u`<svg class="link-mark" viewBox="0 0 16 16" aria-hidden="true">${g[i]}</svg>`,v=d`
2
2
  .link-mark {
3
3
  fill: currentColor;
4
4
  }
@@ -40,4 +40,4 @@ import{a6 as o,a4 as d,x as p,ag as u}from"./shared-DE09J93T.js";import{v as h,M
40
40
  text-overflow: ellipsis;
41
41
  white-space: nowrap;
42
42
  }
43
- `,s=/^[A-Z][A-Z0-9]+-\d+$/,c=i=>{let e=i;try{e=decodeURIComponent(i)}catch{}return e.replace(/[-_+]+/g," ").trim()},b=(i,e)=>{if(i!=="github.com")return null;const[t,n,r,a]=e;if(t===void 0)return{kind:"github",text:"GitHub",title:"github.com"};if(n===void 0)return{kind:"github",text:t,title:t};const l=`${t}/${n}`;return(r==="issues"||r==="pull"||r==="discussions")&&a&&/^\d+$/.test(a)?{kind:"github",text:`#${a}`,title:`${l}#${a}`}:r==="commit"&&a?{kind:"github",text:a.slice(0,7),title:`${l}@${a}`}:{kind:"github",text:l,title:l}},w=(i,e)=>{if(i!=="gitlab.com")return null;const t=e.indexOf("-"),n=(t<0?e:e.slice(0,t)).join("/"),r=t<0?void 0:e[t+1],a=t<0?void 0:e[t+2];if(a&&/^\d+$/.test(a)){if(r==="issues")return{kind:"gitlab",text:`#${a}`,title:`${n}#${a}`};if(r==="merge_requests")return{kind:"gitlab",text:`!${a}`,title:`${n}!${a}`}}return{kind:"gitlab",text:n||"GitLab",title:n||i}},$=(i,e,t)=>{if(!e.endsWith(".atlassian.net")&&!e.startsWith("jira."))return null;const n=(t[0]==="browse"?t[1]:void 0)??i.searchParams.get("selectedIssue")??t.find(r=>s.test(r));return n&&s.test(n)?{kind:"jira",text:n,title:`${e} ${n}`}:{kind:"jira",text:"Jira",title:e}},z=(i,e)=>{if(i!=="linear.app")return null;const t=e[1]==="issue"?e[2]?.toUpperCase():void 0;return t&&s.test(t)?{kind:"linear",text:t,title:t}:{kind:"linear",text:"Linear",title:i}},M=(i,e)=>{if(i!=="figma.com")return null;const[t,,n]=e;if((t==="file"||t==="design"||t==="proto"||t==="board")&&n){const r=c(n);return{kind:"figma",text:r,title:r}}return{kind:"figma",text:"Figma",title:i}},L=(i,e)=>{if(i!=="notion.so"&&!i.endsWith(".notion.site"))return null;const n=(e.at(-1)??"").replace(/-?[0-9a-f]{32}$/i,""),r=n===""?"Notion":c(n);return{kind:"notion",text:r,title:r}},j=i=>{let e;try{e=new URL(i)}catch{return{kind:"web",text:i,title:i}}const t=e.hostname.replace(/^www\./,""),n=e.pathname.split("/").filter(r=>r!=="");return b(t,n)??w(t,n)??$(e,t,n)??z(t,n)??M(t,n)??L(t,n)??{kind:"web",text:t,title:i}},y=h(m(),f(),k(i=>/^https?:\/\//i.test(i),"a link must be an http(s) URL"));export{x as a,j as d,y as h,v as l};
43
+ `,s=/^[A-Z][A-Z0-9]+-\d+$/,c=i=>{let e=i;try{e=decodeURIComponent(i)}catch{}return e.replace(/[-_+]+/g," ").trim()},b=(i,e)=>{if(i!=="github.com")return null;const[t,n,r,a]=e;if(t===void 0)return{kind:"github",text:"GitHub",title:"github.com"};if(n===void 0)return{kind:"github",text:t,title:t};const o=`${t}/${n}`;return(r==="issues"||r==="pull"||r==="discussions")&&a&&/^\d+$/.test(a)?{kind:"github",text:`#${a}`,title:`${o}#${a}`}:r==="commit"&&a?{kind:"github",text:a.slice(0,7),title:`${o}@${a}`}:{kind:"github",text:o,title:o}},w=(i,e)=>{if(i!=="gitlab.com")return null;const t=e.indexOf("-"),n=(t<0?e:e.slice(0,t)).join("/"),r=t<0?void 0:e[t+1],a=t<0?void 0:e[t+2];if(a&&/^\d+$/.test(a)){if(r==="issues")return{kind:"gitlab",text:`#${a}`,title:`${n}#${a}`};if(r==="merge_requests")return{kind:"gitlab",text:`!${a}`,title:`${n}!${a}`}}return{kind:"gitlab",text:n||"GitLab",title:n||i}},$=(i,e,t)=>{if(!e.endsWith(".atlassian.net")&&!e.startsWith("jira."))return null;const n=(t[0]==="browse"?t[1]:void 0)??i.searchParams.get("selectedIssue")??t.find(r=>s.test(r));return n&&s.test(n)?{kind:"jira",text:n,title:`${e} ${n}`}:{kind:"jira",text:"Jira",title:e}},z=(i,e)=>{if(i!=="linear.app")return null;const t=e[1]==="issue"?e[2]?.toUpperCase():void 0;return t&&s.test(t)?{kind:"linear",text:t,title:t}:{kind:"linear",text:"Linear",title:i}},L=(i,e)=>{if(i!=="figma.com")return null;const[t,,n]=e;if((t==="file"||t==="design"||t==="proto"||t==="board")&&n){const r=c(n);return{kind:"figma",text:r,title:r}}return{kind:"figma",text:"Figma",title:i}},M=(i,e)=>{if(i!=="notion.so"&&!i.endsWith(".notion.site"))return null;const n=(e.at(-1)??"").replace(/-?[0-9a-f]{32}$/i,""),r=n===""?"Notion":c(n);return{kind:"notion",text:r,title:r}},j=i=>{let e;try{e=new URL(i)}catch{return{kind:"web",text:i,title:i}}const t=e.hostname.replace(/^www\./,""),n=e.pathname.split("/").filter(r=>r!=="");return b(t,n)??w(t,n)??$(e,t,n)??z(t,n)??L(t,n)??M(t,n)??{kind:"web",text:t,title:i}},y=h(m(),f(),k(i=>/^https?:\/\//i.test(i),"a link must be an http(s) URL"));export{x as a,j as d,y as h,v as l};