@jxsuite/studio 8.0.1 → 8.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.
Files changed (219) hide show
  1. package/dist/chunks/{2020-5wtzce5g.js → 2020-dg097k3e.js} +3 -3
  2. package/dist/chunks/adapter-tck81zft.js +4 -0
  3. package/dist/chunks/{add-new-flow-psym14sn.js → add-new-flow-a1w0bnm6.js} +3 -3
  4. package/dist/chunks/{cf-account-picker-haqazq5r.js → cf-account-picker-ce3kp3x1.js} +3 -3
  5. package/dist/chunks/cf-settings-7ye6x7g2.js +4 -0
  6. package/dist/chunks/color-4gj49xq6.js +4 -0
  7. package/dist/chunks/{color-area-6rbra5dy.js → color-area-vh9cew51.js} +2 -2
  8. package/dist/chunks/{color-field-gy56c94g.js → color-field-e78f16bs.js} +3 -3
  9. package/dist/chunks/{color-slider-sqqdyf6c.js → color-slider-fg4yhvk6.js} +2 -2
  10. package/dist/chunks/{combobox-72h32ejk.js → combobox-6hs00996.js} +2 -2
  11. package/dist/chunks/components-qce0v93f.js +4 -0
  12. package/dist/chunks/content-source-jjx8kgzr.js +4 -0
  13. package/dist/chunks/{convert-to-repeater-he70fc2b.js → convert-to-repeater-grnmea6c.js} +3 -3
  14. package/dist/chunks/editor-bkja5dbv.js +4 -0
  15. package/dist/chunks/entry-commands-1wh0btvg.js +4 -0
  16. package/dist/chunks/{extension-sections-0egb88dm.js → extension-sections-rp7fkega.js} +3 -3
  17. package/dist/chunks/file-ops-6pe4z7an.js +4 -0
  18. package/dist/chunks/files-ybpp3j38.js +4 -0
  19. package/dist/chunks/format-host-3mtbhxk1.js +4 -0
  20. package/dist/chunks/fs-events-xfanfxds.js +4 -0
  21. package/dist/chunks/grid-open-dg5qmnaj.js +4 -0
  22. package/dist/chunks/{grid-view-qg1b5eqx.js → grid-view-x26rfpz1.js} +16 -15
  23. package/dist/chunks/{icons-63bjtbs7.js → icons-853n6qt3.js} +2 -2
  24. package/dist/chunks/{iframe-entry-2zggzajv.js → iframe-entry-02wzcyvy.js} +4 -4
  25. package/dist/chunks/{iframe-entry-99nr5zfb.js → iframe-entry-42hpmwz5.js} +4 -4
  26. package/dist/chunks/{iframe-entry-76j8vwwx.js → iframe-entry-b5qgggyp.js} +2 -2
  27. package/dist/chunks/iframe-host-j2bk2xkc.js +4 -0
  28. package/dist/chunks/{index-32eqzv1k.js → index-203h71wy.js} +3 -3
  29. package/dist/chunks/index-fkrm7pdk.js +4 -0
  30. package/dist/chunks/{javascript-pjp734q4.js → javascript-ww5pv5ae.js} +2 -2
  31. package/dist/chunks/{jsonMode-njkvsa02.js → jsonMode-vwbdwwq3.js} +6 -6
  32. package/dist/chunks/jx-validate-w7v32f6a.js +4 -0
  33. package/dist/chunks/layers-g7j732cm.js +4 -0
  34. package/dist/chunks/layers-panel-gjrsxcck.js +4 -0
  35. package/dist/chunks/{listbox-c421cf8c.js → listbox-7gka1h86.js} +2 -2
  36. package/dist/chunks/lit-html-jdfz9rhc.js +4 -0
  37. package/dist/chunks/media-library-9j0v4wmk.js +4 -0
  38. package/dist/chunks/media-picker-cpyyt2m0.js +4 -0
  39. package/dist/chunks/{menu-bdpzbfvs.js → menu-d2jxpgma.js} +2 -2
  40. package/dist/chunks/{monaco-binding-vq1hgnn0.js → monaco-binding-63tqze27.js} +3 -3
  41. package/dist/chunks/monaco-buffer-9wcme176.js +4 -0
  42. package/dist/chunks/{monaco-setup-xrd2cbkp.js → monaco-setup-zyyynnj8.js} +3 -3
  43. package/dist/chunks/notify-rahnnnv4.js +4 -0
  44. package/dist/chunks/platform-b2aqv7v5.js +4 -0
  45. package/dist/chunks/{popover-b89sfej7.js → popover-9tf4cjrk.js} +2 -2
  46. package/dist/chunks/publish-panel-4yk2461b.js +4 -0
  47. package/dist/chunks/{publish-quick-qx2455cj.js → publish-quick-ajzdhhs6.js} +3 -3
  48. package/dist/chunks/publish-workspace-mxestzcf.js +4 -0
  49. package/dist/chunks/quick-search-9g6z65b0.js +4 -0
  50. package/dist/chunks/references-c26enpxs.js +4 -0
  51. package/dist/chunks/right-panel-9d0e0yg7.js +4 -0
  52. package/dist/chunks/source-control-xyn3a8ds.js +4 -0
  53. package/dist/chunks/{split-c9zfdgxf.js → split-m5rwn31z.js} +2 -2
  54. package/dist/chunks/{studio-x9hsze61.js → studio-02phtmqn.js} +4 -4
  55. package/dist/chunks/{studio-4hp8pkyt.js → studio-0khd0xdw.js} +4 -4
  56. package/dist/chunks/studio-1fvzq9vs.js +5 -0
  57. package/dist/chunks/studio-1gdfsr49.js +12 -0
  58. package/dist/chunks/{studio-3q40e3rj.js → studio-1meqbxns.js} +4 -4
  59. package/dist/chunks/{studio-q0tccd43.js → studio-1yhz0s8p.js} +4 -4
  60. package/dist/chunks/studio-25a5by3h.js +5 -0
  61. package/dist/chunks/{studio-k3xxbagr.js → studio-2b8443ms.js} +3 -3
  62. package/dist/chunks/{studio-3qqjeep5.js → studio-2c2mjyzj.js} +5 -5
  63. package/dist/chunks/studio-2dtc90zs.js +10 -0
  64. package/dist/chunks/{studio-9tmebf0s.js → studio-332hesdk.js} +4 -4
  65. package/dist/chunks/{studio-03ct6yfv.js → studio-3pndhat0.js} +8 -8
  66. package/dist/chunks/{studio-s32578pn.js → studio-3q6n9qvq.js} +4 -4
  67. package/dist/chunks/studio-4dsdnan2.js +9 -0
  68. package/dist/chunks/{studio-ed1hp6zf.js → studio-4fjqdzrb.js} +5 -5
  69. package/dist/chunks/{studio-jcnsdaep.js → studio-533py3yy.js} +4 -4
  70. package/dist/chunks/studio-5abge3wy.js +5 -0
  71. package/dist/chunks/{studio-8tr6cfrc.js → studio-6vrxzkba.js} +4 -4
  72. package/dist/chunks/{studio-jaaz8ce9.js → studio-73wz63nn.js} +4 -4
  73. package/dist/chunks/{studio-bavb31r0.js → studio-74nzv280.js} +4 -4
  74. package/dist/chunks/{studio-q7rtx6zq.js → studio-7cg75gtj.js} +7 -7
  75. package/dist/chunks/studio-89cwmnae.js +5 -0
  76. package/dist/chunks/studio-8m1t83kn.js +7 -0
  77. package/dist/chunks/{studio-q0mvbaq6.js → studio-8nyw10dp.js} +4 -4
  78. package/dist/chunks/{studio-83mk4bgg.js → studio-94ppxeqy.js} +8 -8
  79. package/dist/chunks/{studio-qmn1xc24.js → studio-957jg8g3.js} +4 -4
  80. package/dist/chunks/{studio-r5qy30vx.js → studio-9wyqyfqy.js} +4 -4
  81. package/dist/chunks/studio-a3evp7f6.js +6 -0
  82. package/dist/chunks/{studio-n0c5h6mf.js → studio-a6x058ew.js} +4 -4
  83. package/dist/chunks/studio-ana67wax.js +5 -0
  84. package/dist/chunks/studio-b4xhpcwy.js +4 -0
  85. package/dist/chunks/studio-bf0rgyf7.js +5 -0
  86. package/dist/chunks/{studio-x1x167jh.js → studio-bqgs90r8.js} +4 -4
  87. package/dist/chunks/{studio-qwdqwkj0.js → studio-c4rcaftm.js} +4 -4
  88. package/dist/chunks/{studio-mn0476ag.js → studio-c5dj3dzk.js} +4 -4
  89. package/dist/chunks/studio-cgjt1zce.js +5 -0
  90. package/dist/chunks/{studio-bbe4c90a.js → studio-cpdzrdgp.js} +4 -4
  91. package/dist/chunks/studio-cq87hree.js +5 -0
  92. package/dist/chunks/studio-d140sy8e.js +5 -0
  93. package/dist/chunks/{studio-jsgf2q5k.js → studio-dmn7gpba.js} +5 -5
  94. package/dist/chunks/studio-e8pzjjhf.js +5 -0
  95. package/dist/chunks/{studio-dgk4dqtx.js → studio-f8kz3krj.js} +5 -5
  96. package/dist/chunks/{studio-qgh13jtz.js → studio-fqs1a22a.js} +4 -4
  97. package/dist/chunks/{studio-syreb644.js → studio-fw3jp9m7.js} +4 -4
  98. package/dist/chunks/{studio-ed3xx40h.js → studio-g6ysm05p.js} +6 -6
  99. package/dist/chunks/studio-gmhd0j3f.js +5 -0
  100. package/dist/chunks/{studio-p4nrkvqr.js → studio-gqpty626.js} +4 -4
  101. package/dist/chunks/{studio-kt3pjkwd.js → studio-grp684wx.js} +4 -4
  102. package/dist/chunks/{studio-df0baea9.js → studio-h98520qr.js} +4 -4
  103. package/dist/chunks/{studio-8m0y2qe7.js → studio-hnx1h1pr.js} +4 -4
  104. package/dist/chunks/studio-hvxt8z79.js +5 -0
  105. package/dist/chunks/{studio-43sd2mam.js → studio-hw60n5dh.js} +3 -3
  106. package/dist/chunks/{studio-wbcjbhy1.js → studio-hxq1ebp0.js} +6 -6
  107. package/dist/chunks/{studio-wys23mxz.js → studio-j4e627w1.js} +4 -4
  108. package/dist/chunks/{studio-ccv2svc6.js → studio-j5jqvyn3.js} +4 -4
  109. package/dist/chunks/{studio-881z1xrx.js → studio-jqrg9xxg.js} +4 -4
  110. package/dist/chunks/{studio-b7y5mr30.js → studio-kdseew9m.js} +4 -4
  111. package/dist/chunks/studio-kt2j51sa.js +5 -0
  112. package/dist/chunks/{studio-d5grtb9e.js → studio-m4w6sygj.js} +9 -9
  113. package/dist/chunks/{studio-zz9qe3rw.js → studio-mmqr9awv.js} +37 -37
  114. package/dist/chunks/{studio-5g0rprdt.js → studio-nm9qev4p.js} +5 -5
  115. package/dist/chunks/{studio-tft6r105.js → studio-nsv7g1qn.js} +4 -4
  116. package/dist/chunks/{studio-3e54qh39.js → studio-p89w12s2.js} +5 -5
  117. package/dist/chunks/{studio-y3ahhdpx.js → studio-pbagym4j.js} +4 -4
  118. package/dist/chunks/{studio-w4rz9hdk.js → studio-pr23qhrw.js} +4 -4
  119. package/dist/chunks/{studio-6m380wp7.js → studio-r4ya3sb2.js} +4 -4
  120. package/dist/chunks/studio-rdnezzkd.js +6 -0
  121. package/dist/chunks/{studio-f14e1zdj.js → studio-rm9m3z60.js} +4 -4
  122. package/dist/chunks/studio-tpmnbgmt.js +5 -0
  123. package/dist/chunks/studio-ttxhq5yt.js +5 -0
  124. package/dist/chunks/{studio-nh6d342n.js → studio-txkx6586.js} +6 -6
  125. package/dist/chunks/{studio-a2bvaptz.js → studio-v0gsjav0.js} +4 -4
  126. package/dist/chunks/{studio-fbhxxc5f.js → studio-v2ek69cb.js} +4 -4
  127. package/dist/chunks/{studio-y0n7yxea.js → studio-wcakp5bt.js} +7 -7
  128. package/dist/chunks/{studio-k7evxqh4.js → studio-x3ge4rts.js} +4 -4
  129. package/dist/chunks/{studio-pbxa5fpc.js → studio-xddgbwhe.js} +3 -3
  130. package/dist/chunks/{studio-c05wdnt3.js → studio-y1x65h5r.js} +4 -4
  131. package/dist/chunks/{studio-rthyg42z.js → studio-z42kysg7.js} +169 -169
  132. package/dist/chunks/studio-zf188hnd.js +5 -0
  133. package/dist/chunks/{studio-tfkznv39.js → studio-zht0x0v3.js} +4 -4
  134. package/dist/chunks/{studio-svb7yyve.js → studio-zm7dnr9g.js} +4 -4
  135. package/dist/chunks/{tooltip-yypz28gq.js → tooltip-dj1pvgz7.js} +2 -2
  136. package/dist/chunks/{tree-9xa4hm7n.js → tree-j0ebwr5s.js} +2 -2
  137. package/dist/chunks/{tsMode-epyfz1hv.js → tsMode-vra2hh7y.js} +5 -5
  138. package/dist/chunks/workspace-3nt93k48.js +4 -0
  139. package/dist/chunks/workspace-home-zbgyqqws.js +4 -0
  140. package/dist/chunks/{ws-client-bv552sfx.js → ws-client-72x5n99j.js} +3 -3
  141. package/dist/iframe-entry.js +14 -14
  142. package/dist/manifest.json +75 -75
  143. package/dist/studio.js +80 -80
  144. package/package.json +11 -11
  145. package/src/browse/component-examples.ts +15 -224
  146. package/src/browse/library-preview.ts +6 -13
  147. package/src/browse/preview-root.ts +7 -4
  148. package/src/canvas/canvas-utils.ts +18 -4
  149. package/src/canvas/iframe-editable-root.ts +13 -4
  150. package/src/canvas/iframe-entry.ts +3 -1
  151. package/src/canvas/iframe-interaction.ts +11 -2
  152. package/src/canvas/iframe-render.ts +25 -3
  153. package/src/canvas/preview-placeholder.ts +120 -0
  154. package/src/editor/shortcuts.ts +3 -0
  155. package/src/panels/component-preview.ts +5 -0
  156. package/src/panels/pane-context.ts +43 -18
  157. package/src/panels/site-model.ts +7 -19
  158. package/src/panels/site-panel.ts +2 -25
  159. package/src/panels/stylebook-doc.ts +2 -53
  160. package/src/services/references.ts +0 -0
  161. package/src/style/stylebook-specimens.ts +11 -15
  162. package/src/surfaces/pane-context.json +286 -265
  163. package/src/surfaces/pane-context.ts +17 -8
  164. package/src/tabs/tab.ts +5 -6
  165. package/src/utils/geometry.ts +49 -2
  166. package/dist/chunks/adapter-5tphg7xe.js +0 -4
  167. package/dist/chunks/cf-settings-h2wrh6hq.js +0 -4
  168. package/dist/chunks/color-m7r1vk54.js +0 -4
  169. package/dist/chunks/components-r22xca09.js +0 -4
  170. package/dist/chunks/content-source-mmppmcyg.js +0 -4
  171. package/dist/chunks/editor-ccd9jwsa.js +0 -4
  172. package/dist/chunks/entry-commands-6qxz9e8p.js +0 -4
  173. package/dist/chunks/file-ops-qnab36ek.js +0 -4
  174. package/dist/chunks/files-rcn56qvm.js +0 -4
  175. package/dist/chunks/format-host-yxz0kjjs.js +0 -4
  176. package/dist/chunks/fs-events-d1qxq4z4.js +0 -4
  177. package/dist/chunks/grid-open-4z1g062t.js +0 -4
  178. package/dist/chunks/iframe-host-ssv7kyj0.js +0 -4
  179. package/dist/chunks/index-f0jn7nnp.js +0 -4
  180. package/dist/chunks/jx-validate-ttasrbh7.js +0 -4
  181. package/dist/chunks/layers-bgyr11tr.js +0 -4
  182. package/dist/chunks/layers-panel-7ez66zeq.js +0 -4
  183. package/dist/chunks/lit-html-v9gh687x.js +0 -4
  184. package/dist/chunks/media-library-sq468wts.js +0 -4
  185. package/dist/chunks/media-picker-shfe59pt.js +0 -4
  186. package/dist/chunks/monaco-buffer-3afgwvbp.js +0 -4
  187. package/dist/chunks/notify-kzrjr3fv.js +0 -4
  188. package/dist/chunks/platform-7v4rtd7m.js +0 -4
  189. package/dist/chunks/publish-panel-2z9gw8ee.js +0 -4
  190. package/dist/chunks/publish-workspace-wrc1dgwx.js +0 -4
  191. package/dist/chunks/quick-search-n0t0eqxb.js +0 -4
  192. package/dist/chunks/references-9547rg5s.js +0 -4
  193. package/dist/chunks/right-panel-wsgnr9pn.js +0 -4
  194. package/dist/chunks/source-control-kwktr9y6.js +0 -4
  195. package/dist/chunks/studio-07rcfje3.js +0 -5
  196. package/dist/chunks/studio-3exxhz5g.js +0 -5
  197. package/dist/chunks/studio-3qeh9t0h.js +0 -6
  198. package/dist/chunks/studio-58xg6j2q.js +0 -9
  199. package/dist/chunks/studio-80jyh1xh.js +0 -4
  200. package/dist/chunks/studio-8vcvfs7r.js +0 -6
  201. package/dist/chunks/studio-fyh0jc96.js +0 -5
  202. package/dist/chunks/studio-gcxk20n7.js +0 -5
  203. package/dist/chunks/studio-m8g16bgz.js +0 -5
  204. package/dist/chunks/studio-mx1smyq0.js +0 -5
  205. package/dist/chunks/studio-pgmvdv7z.js +0 -7
  206. package/dist/chunks/studio-ph84avkf.js +0 -5
  207. package/dist/chunks/studio-rj9eamf8.js +0 -5
  208. package/dist/chunks/studio-rptgsk96.js +0 -5
  209. package/dist/chunks/studio-s19tp1xr.js +0 -5
  210. package/dist/chunks/studio-tf9jryb1.js +0 -10
  211. package/dist/chunks/studio-txf2kysx.js +0 -5
  212. package/dist/chunks/studio-v8867ddv.js +0 -12
  213. package/dist/chunks/studio-vxq7fcvv.js +0 -5
  214. package/dist/chunks/studio-wc649wss.js +0 -5
  215. package/dist/chunks/studio-z97c48fk.js +0 -5
  216. package/dist/chunks/studio-zat62m0c.js +0 -5
  217. package/dist/chunks/studio-zcd2e7yz.js +0 -5
  218. package/dist/chunks/workspace-dz7nxfhv.js +0 -4
  219. package/dist/chunks/workspace-home-xsd7hkjw.js +0 -4
@@ -1,6 +0,0 @@
1
- import{p}from"./studio-w4rz9hdk.js";import{x}from"./studio-gcxk20n7.js";import{oe}from"./studio-p4nrkvqr.js";import{tf}from"./studio-z97c48fk.js";import{v,Qx}from"./studio-vxq7fcvv.js";async function Nw(e,o){return p().codeService(e,o)}async function rN(e){return p().locateFile(e)}var Ku=new Map;async function Aw(e,o){let s=e.$prototype?x?.projectConfig?.imports?.[e.$prototype]:null,t=e.$src||s;if(!t||!e.$prototype)return null;let r=`${t}::${e.$prototype}`;if(Ku.has(r))return Ku.get(r);try{let n=p(),i=!s&&o.documentPath?`${location.origin}/${o.documentPath}`:void 0,a=await n.fetchPluginSchema(t,e.$prototype,i);return Ku.set(r,a),a}catch{return Ku.set(r,null),null}}function GT(e,o){let s=e.getModel();if(!s)return;let t=tf();if(!t)return;let r=o.flatMap((n)=>{let i=n.labels?.[0];if(!i)return[];let{line:a,column:c,length:u}=i.span;return[{code:n.url?{target:t.Uri.parse(n.url),value:n.code}:n.code,endColumn:c+(u||1),endLineNumber:a,message:n.message+(n.help?`
2
- ${n.help}`:""),severity:n.severity==="error"?t.MarkerSeverity.Error:t.MarkerSeverity.Warning,source:"oxlint",startColumn:c,startLineNumber:a}]});t.editor.setModelMarkers(s,"oxlint",r)}function sN(e,o){let s=(t)=>{if(!v(t))return null;let r=t.parameters;if(!Array.isArray(r)||r.length===0)return null;return Qx(r)};if(e.type==="def"){let t=e.defName?s(o?.state?.[e.defName]):null;if(t)return t}else if(e.type==="event"){if(!o||!e.path)return["state","event"];let t=oe(o,e.path),r=t&&e.eventKey?s(t[e.eventKey]):null;if(r)return r}return["state","event"]}
3
- export{Nw,rN,Ku,Aw,GT,sN};
4
-
5
- //# debugId=FF3435608B424ED264756E2164756E21
6
- //# sourceMappingURL=studio-3qeh9t0h.js.map
@@ -1,9 +0,0 @@
1
- import{Pp}from"./studio-q7rtx6zq.js";import{Mm,Hx,u}from"./studio-c05wdnt3.js";import{g}from"./studio-43sd2mam.js";import{to,Sr,Xw,h}from"./studio-d5grtb9e.js";import{Ae}from"./studio-fbhxxc5f.js";import{T,R}from"./studio-x9hsze61.js";import{vt,nl,Di,Hc,Tp,Wr,Lb,OL,HL}from"./studio-rj9eamf8.js";import{fS,mS,RT,Sw}from"./studio-8vcvfs7r.js";import{x,dl}from"./studio-gcxk20n7.js";import{n,Z,S,Ie,Ni,rd}from"./studio-vxq7fcvv.js";import{le}from"./studio-qgh13jtz.js";var Dy="Project Styles",Ru="stylebook",Gf="tokens",K="source",Bg={elements:Ru,variables:Gf,code:K},h_=["elements","variables","code"],ER=h_.map((e)=>Bg[e]),p_=[{id:"color",prefix:"--color-",title:"Colors"},{id:"font",prefix:"--font-",title:"Fonts"},{id:"size",prefix:"--size-",title:"Sizes & Spacing"},{id:"other",prefix:"--",title:"Other"}];function f_(e){if(e.startsWith("--color"))return"color";if(e.startsWith("--font"))return"font";if(e.startsWith("--size")||e.startsWith("--spacing")||e.startsWith("--radius"))return"size";return"other"}function Q(e){let o=f_(e);if(o==="other")return e;let{prefix:t}=p_.find((r)=>r.id===o);return Hx(e,t)}function X(e){if(!e)return[];let o=[];for(let[t,r]of Object.entries(e)){if(!t.startsWith("--"))continue;if(!n(r)&&!Z(r))continue;o.push({group:f_(t),label:Q(t),name:t,value:r})}return o}function m_(e){let o=X(e);return p_.map((t)=>({group:t,tokens:o.filter((r)=>r.group===t.id)}))}function g_(e){if(!e)return[];let{featureQueries:o,sizeBreakpoints:t}=Wr(e),r=[],a=[];for(let{name:s,query:c}of o){let y=Tp(c);if(y)r.push({key:`@${s}`,kind:"scheme",label:y==="dark"?"Dark":"Light",name:s,scheme:y});else a.push({key:`@${s}`,kind:"feature",label:`@${s}`,name:s})}let i=t.map(({name:s})=>({key:`@${s}`,kind:"size",label:`@${s}`,name:s}));return[...r,...i,...a]}function _(e,o){return Ni(e,o.key)}function Ny(e,o,t){let r=_(e,o)?.[t];return n(r)||Z(r)?r:void 0}function Pk(e,o,t,r){if(r){rd(e,o.key)[t]=r;return}let a=_(e,o);if(!a)return;if(delete a[t],Object.keys(a).length===0)delete e[o.key]}function TR(e,o,t,r=[]){let a=new Set(r.map((i)=>i.name));return o.filter((i)=>!a.has(i.name)&&Ny(e,i,t)===void 0)}var cp={$sections:[{label:"Headings",elements:[{tag:"h1",text:"Code Is Poetry"},{tag:"h2",text:"Code Is Poetry"},{tag:"h3",text:"Code Is Poetry"},{tag:"h4",text:"Code Is Poetry"},{tag:"h5",text:"Code Is Poetry"},{tag:"h6",text:"Code Is Poetry"}]},{label:"Paragraph",elements:[{tag:"p",text:"In a village of La Mancha, the name of which I have no desire to call to mind, there lived not long since one of those gentlemen that keep a lance in the lance-rack, an old buckler, a lean hack, and a greyhound for coursing."}]},{label:"List",elements:[{tag:"ul",children:[{tag:"li",text:"Alice."},{tag:"li",text:"The White Rabbit."},{tag:"li",text:"The Cheshire Cat."},{tag:"li",text:"The Mad Hatter."},{tag:"li",text:"The Queen of Hearts."}]},{tag:"ol",children:[{tag:"li",text:"First item"},{tag:"li",text:"Second item"},{tag:"li",text:"Third item"}]}]},{label:"Quote",elements:[{tag:"blockquote",children:[{tag:"p",text:"In quoting others, we cite ourselves.",style:"font-size:1.25em;font-style:italic"},{tag:"p",text:"— Julio Cortázar"}]}]},{label:"Code",elements:[{tag:"pre",children:[{tag:"code",text:`// A "block" is the abstract term used
2
- // to describe units of markup that
3
- // when composed together, form the
4
- // content or layout of a page.
5
- registerBlockType( name, settings );`}]}]},{label:"Inline",elements:[{tag:"a",text:"Visit the documentation",attributes:{href:"#"}},{tag:"strong",text:"Bold text emphasis"},{tag:"em",text:"Italic text emphasis"},{tag:"small",text:"Fine print and legal text"},{tag:"mark",text:"Highlighted text"},{tag:"code",text:"const x = 42;"},{tag:"abbr",text:"HTML",attributes:{title:"HyperText Markup Language"}},{tag:"sub",text:"subscript"},{tag:"sup",text:"superscript"}]},{label:"Form",elements:[{tag:"input",attributes:{type:"text",placeholder:"Enter text…"}},{tag:"button",text:"Click Me"},{tag:"select",children:[{tag:"option",text:"Option 1"},{tag:"option",text:"Option 2"},{tag:"option",text:"Option 3"}]},{tag:"textarea",attributes:{placeholder:"Enter longer text…",rows:"3"}}]},{label:"Table",elements:[{tag:"table",children:[{tag:"thead",children:[{tag:"tr",children:[{tag:"th",text:"Name"},{tag:"th",text:"Role"},{tag:"th",text:"Status"}]}]},{tag:"tbody",children:[{tag:"tr",children:[{tag:"td",text:"Alice"},{tag:"td",text:"Developer"},{tag:"td",text:"Active"}]},{tag:"tr",children:[{tag:"td",text:"Bob"},{tag:"td",text:"Designer"},{tag:"td",text:"Away"}]},{tag:"tr",children:[{tag:"td",text:"Carol"},{tag:"td",text:"Manager"},{tag:"td",text:"Active"}]}]}]}]},{label:"Interactive",elements:[{tag:"details",attributes:{open:""},children:[{tag:"summary",text:"Click to expand details"},{tag:"p",text:"Additional detail content revealed when the disclosure widget is toggled open."}]}]},{label:"Media",elements:[{tag:"img",attributes:{alt:"Placeholder image"},style:"width:100%;max-width:400px;height:200px;background:#e0e0e0;display:block;border-radius:4px"},{tag:"video",attributes:{controls:""},style:"width:100%;max-width:400px;height:200px;background:#e0e0e0;display:block;border-radius:4px"},{tag:"audio",attributes:{controls:""},style:"width:100%"}]}],$variables:{color:{label:"Color",prefix:"--color-",placeholder:"#007acc"},font:{label:"Font",prefix:"--font-",placeholder:"system-ui, sans-serif"},size:{label:"Size",prefix:"--size-",placeholder:"16px"},other:{label:"Other",prefix:"--",placeholder:"value"}}};var A={$schema:"https://jxsuite.com/schema/v1",$id:"StudioStylebookChrome",$description:"The bar across the top of the Project Styles canvas: the filter that narrows the specimen catalogue, and the toggle that reduces it to the elements this file has already styled. Both are shell state rather than document state — the adapter owns which — and the two names come in as values, because the surface is called Project Styles and the canvas view it draws is the wire word `stylebook`; nothing a reader sees here may be spelled from that. **The bar IS the kit's toolbar now.** It used to write `role=\"toolbar\"` and its own `aria-label` on a `<div>`, which is a role with none of the behaviour under it: two controls, two tab stops, and no arrow key between them. `jx-action-group` is not the element for it — that one roves `jx-action-button` and this bar's first control is a `jx-textfield` — so `jx-toolbar` is, and the field keeps its own arrows while its caret still has text to walk (ui.md §5.5).",tagName:"jx-toolbar",attributes:{part:"chrome"},$props:{label:{$ref:"#/state/title"}},style:{$description:'What `.sb-chrome` said in `styles/overlays.css`, plus the six inline declarations the template carried beside it, plus `.tb-toggle` — all three go dead with this conversion, and none of them is shared with another surface. Three repairs on the way. The bar is one element rather than a positioned box wrapping a `role="toolbar"` row that declared the same flex layout again. The flex layout is not declared here EITHER any more: `display: flex`, `align-items: center`, the `--jx-space-2` gap, the sans face and the foreground colour are all `jx-toolbar`\'s own, so what is left below is only what a positioned BAND is. And `.tb-toggle` read `var(--spectrum-font-size-50, 11px)`, which the kit spells `--jx-text-sm` at the same value; the rest of its drawing is a `jx-action-button` reaching in through `part="control"`, because what it has to look like is a small bordered chip and every fill and control height the kit draws would otherwise have to be taken back off.',position:"absolute",top:"0",left:"0",right:"0",zIndex:"15",flexShrink:"0",padding:"var(--jx-space-2) var(--jx-space-3)",background:"var(--bg-panel)",borderBottom:"1px solid var(--border)",'& [part="filter"]':{flex:"1",maxWidth:"200px"},'& [part="customized"] > [part="control"]':{$description:"Bordered, unfilled and dimmed until it is on, which is what says it is a filter rather than an action: the catalogue it narrows is the thing the reader is looking at, so the control has to be quieter than its subject.",padding:"3px var(--jx-space-3)",border:"1px solid var(--border)",borderRadius:"var(--radius)",background:"transparent",color:"var(--fg-dim)",fontSize:"var(--jx-text-sm)",":hover":{background:"var(--hover-bg)"}},'& [part="customized"][data-selected] > [part="control"]':{$description:"`data-selected` and not `selected`: the kit reflects the pressed state as a data attribute (`jx-action-button.json`), and the property this document binds never reaches the attribute of the same name.",borderColor:"var(--accent)",background:"var(--accent-15)",color:"var(--accent)"}},children:[{tagName:"jx-textfield",attributes:{part:"filter"},$props:{size:"sm",type:"search",clearable:!0,label:{$ref:"#/state/filterLabel"},placeholder:"Filter…",value:{$ref:"#/state/filter"}},oninput:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/setFilter"},value:[{$ref:"event#/target/value"}]}]}},{tagName:"jx-action-button",$description:"`onchange` and not `onclick`: a `toggles` button owns its own pressed state and says so with `change` (`jx-action-button.json`), and an `onclick` written here would replace the element's own click handler on the same property — the toggle would stop flipping and stop announcing `aria-pressed`.",attributes:{part:"customized"},$props:{size:"sm",toggles:!0,selected:{$ref:"#/state/customizedOnly"},label:{$ref:"#/state/customizedLabel"},hint:{$ref:"#/state/customizedHint"}},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/toggleCustomized"},value:[]}]},children:[{tagName:"span",textContent:"${state.customizedLabel}"}]}]};T("stylebook-chrome",A);function W(e,o){let t=document.createElement("div");t.style.display="contents";let r=g({...e,...o}),a=null,i=!1;function s(){i=!0,R("stylebook-chrome",r,t).then((c)=>{i=!1,a=c})}return s(),{host:t,update(c){if(Object.assign(r,c),i||a!==null&&t.contains(a.root))return;a?.dispose(),a=null,t.textContent="",s()}}}function L(e){return!e.startsWith(":")&&!e.startsWith(".")&&!e.startsWith("&")&&!e.startsWith("[")&&!e.startsWith("@")&&!e.startsWith("--")}function O(e){return S(e)&&!Array.isArray(e)}var B="& .element-card-preview";function Ay(e){let o={},t=(r)=>{let a={};for(let[i,s]of Object.entries(r))if(i!=="@--")a[i]=s;return a};for(let[r,a]of Object.entries(e)){if(!O(a)){o[r]=a;continue}if(r==="@--")continue;if(Pp(r)){o[r]=a;continue}if(r.startsWith("@")){let i={};for(let[s,c]of Object.entries(a))if(O(c)&&L(s))i[`${B} ${s}`]=t(c);else i[s]=c;o[r]=i;continue}if(L(r)){o[`${B} ${r}`]=t(a);continue}o[r]=a}return o}function H(e,o){let t=o.split(" "),r=e;for(let a of t){if(!O(r))return null;r=r[a]}return O(r)?r:null}function Oy(e,o){let t=H(e,o);if(t&&Object.keys(t).length>0)return!0;for(let[r,a]of Object.entries(e)){if(!r.startsWith("@")||!O(a))continue;let i=H(a,o);if(i&&Object.keys(i).length>0)return!0}return!1}function oe(e){if(!e)return null;return e.split(" ").pop()??null}function My(e,o){let t=oe(o),r=[],a=(i,s,c)=>{let y=c?`${c} ${i.tag}`:i.tag;r.push({depth:s,entry:i,path:y,selected:i.tag===t,tag:i.tag});let C=i.children?[...new Map(i.children.map((w)=>[w.tag,w])).values()]:[];for(let w of C)a(w,s+1,y)};for(let i of e)a(i,0,"");return r}function ne(e,o,t){let[r]=Array.isArray(e.children)?e.children:[];if(!S(r)||Array.isArray(r)||!Ie(r.items))return null;let{$ref:a}=r.items,i=a.startsWith("#/state/")?a.slice(8):"",s=e.state?.[i];if(!Array.isArray(s))return null;t[o]=s;for(let[y,C]of Object.entries(e.state??{}))if(y!==i&&!(y in t))t[y]=C;return{children:[{...r,items:{$ref:`#/state/${o}`}}],tagName:"div"}}function V(e){let o=new Map,t=new Map,r=e.filter.toLowerCase(),a=(l,d,f)=>{let p=l.tag===f?f:`${f} ${l.tag}`;o.set(Hc(d),p);let b=l.children??[];for(let[v,I]of b.entries())a(I,[...d,"children",v],f)},i=(l)=>{let d={...l.attributes};if(l.style)d.style=l.style;let f={tagName:l.tag};if(l.text)f.textContent=l.text;if(Object.keys(d).length>0)f.attributes=d;if(l.children)f.children=l.children.map(i);return f},s=(l,d,f,p,b)=>{o.set(Hc(p),l),o.set(Hc([...p,"children",0]),l);let v=[...p,"children",0,"children",0];if(b)a(b,v,l);else o.set(Hc(v),l);if(!t.has(l))t.set(l,p);return{attributes:{class:"element-card"},children:[{attributes:{class:"element-card-preview"},children:[f],tagName:"div"},{attributes:{class:"element-card-label"},tagName:"div",textContent:d}],tagName:"div"}},c=[],y=(l,d)=>({attributes:{class:"sb-section"},children:[{attributes:{class:"sb-label"},tagName:"div",textContent:l},{attributes:{class:"sb-body"},children:d,tagName:"div"}],tagName:"div"}),C=()=>["children",c.length,"children",1];for(let l of e.meta.$sections){let d=l.elements;if(r)d=d.filter((b)=>b.tag.includes(r)||l.label.toLowerCase().includes(r));if(e.customizedOnly)d=d.filter((b)=>Oy(e.effectiveStyle,b.tag));if(d.length===0)continue;let f=C(),p=d.map((b,v)=>s(b.tag,`<${b.tag}>`,i(b),[...f,"children",v],b));c.push(y(l.label,p))}let w=[],E={};{let l=e.components;if(r)l=l.filter((d)=>d.tagName.toLowerCase().includes(r));if(e.customizedOnly)l=l.filter((d)=>Oy(e.effectiveStyle,d.tagName));if(l.length>0){let d=C(),f=l.map((p,b)=>{let v=[...d,"children",b];if(p.source!=="npm"&&p.path?.endsWith(".json")){w.push({$ref:`/${e.projectRoot?`${e.projectRoot}/`:""}${p.path}`.replace(/^\/+/,"/")});let m=e.specimens?.get(p.tagName);if(m?.kind==="props"){let P={$props:m.props,tagName:p.tagName};return s(p.tagName,`<${p.tagName}>`,P,v,null)}if(m?.kind==="row"){let P=ne(m.sample.doc,`stylebookRow${b}`,E);if(P)return s(p.tagName,`<${p.tagName}>`,P,v,null)}if(m?.kind!=="none"){let P={};for(let N of p.props??[])if(N.default!==void 0&&N.default!=="false"&&N.default!=="''")P[N.name]=String(N.default).replaceAll(/^'|'$/g,"");let D={tagName:p.tagName};if(Object.keys(P).length>0)D.attributes=P;return s(p.tagName,`<${p.tagName}>`,D,v,null)}}let M={attributes:{class:"sb-fallback"},tagName:"div",textContent:`<${p.tagName}>`};return s(p.tagName,`<${p.tagName}>`,M,v,null)});c.push(y("Components",f))}}if(c.length===0)c.push({attributes:{class:"sb-empty"},tagName:"div",textContent:e.customizedOnly?"No customized elements":"No matching elements"});let k={};if(w.length>0)k.$elements=w;if(e.effectiveHead&&e.effectiveHead.length>0)k.$head=e.effectiveHead;if(k.$media=e.effectiveMedia,Object.keys(E).length>0)k.state=E;return k.attributes={class:"sb-root"},k.children=c,k.style=Ay(e.effectiveStyle),k.tagName="div",{doc:k,pathToTag:o,tagToCardPath:t}}var q=new WeakMap;async function re(e){let{path:o}=e;if(e.source==="npm"||!o?.endsWith(".json"))return{kind:"bare"};let t=await RT(o);if(!t)return{kind:"bare"};let r=await fS(t,o);if(r.size>0&&await Sw(t,o,r))return{kind:"props",props:Object.fromEntries(r)};let a=await mS(t,o);if(a&&await Lb(e))return{kind:"row",sample:a};return await Sw(t,o,new Map)?{kind:"bare"}:{kind:"none"}}async function F(e,o=re){let t=q.get(e);if(!t)t=new Map,q.set(e,t);let r=t,a=await Promise.all(e.map(async(i)=>{let s=i.path??i.tagName,c=r.get(s);if(!c)c=o(i).catch(()=>({kind:"bare"})),r.set(s,c);return[i.tagName,await c]}));return new Map(a)}var G=new WeakMap;function ae(e){let o={customizedHint:"Show only the elements this file has already styled",customizedLabel:"Customized",customizedOnly:h.stylebook.customizedOnly,filter:h.stylebook.filter,filterLabel:`Filter the ${Dy} catalogue`,title:Dy},t=G.get(e);if(t)return t.update(o),t.host;let r=W(o,{setFilter:(a)=>{h.stylebook.filter=a},toggleCustomized:()=>{h.stylebook.customizedOnly=!h.stylebook.customizedOnly}});return G.set(e,r),r.host}function ie(e,o){let t=e.filter((r)=>r.name===(o??"base"));return t.length>0?t:e.slice(0,1)}async function LR(e,o){let t=e.wrap,r=vt(e.paneId),a=h.stylebook.filter.toLowerCase(),{customizedOnly:i}=h.stylebook,s=e.renderGeneration,c=Ae,y=F(c),C=to(r?.doc.document?.$media),{sizeBreakpoints:w,baseWidth:E}=Wr(C),k=w.length>0,l=ae(e);t.style.overflow="hidden";let d=[];if(k){d.push({displayName:Di("--"),name:"base",width:E});for(let m of w)d.push({displayName:Di(m.name),name:m.name,width:m.width})}let f;if(!k){let m=C["--"],P=m?`${Di("--")} (${E}px)`:null;f=[o.canvasPanelEntry(m?"base":null,P,!m,m?E:void 0)]}else f=ie(d,nl(e.paneId)).map((m)=>o.canvasPanelEntry(m.name,`${m.displayName} (${m.width}px)`,!1,m.width));if(!await o.drawStage(e,{frame:"boards",framePart:"panzoom",frameVars:"--boards-inset:40px",handles:"hidden",hug:!1,innerPart:"boards",lead:"chrome",panels:f.map((m)=>m.item)},f))return;let b=o.stageHost(e,"chrome-host");if(b&&b.firstChild!==l)b.replaceChildren(l);let v=await y;if(e.renderGeneration!==s)return;let I=V({components:c,specimens:v,customizedOnly:Boolean(i),effectiveHead:Xw(r?.doc.document?.$head),effectiveMedia:C,effectiveStyle:Sr(r?.doc.document?.style),filter:a,meta:cp,projectRoot:x?.projectRoot??null}),{panels:M}=e;for(let{panel:m}of f)M.push(m),OL(e.renderGeneration,I,m.canvas,m._width);if(k)o.updateActivePanelHeaders(e);o.applyTransform(e),o.observeCenterUntilStable(e)}function Cd(e,o,{panCanvas:t=!1}={}){let r={activeSelector:e,rightTab:"style"};if(o!==void 0)r.activeMedia=o;if(dl(u.value,{selection:[],ui:r}),h.stylebook.selection=e,e&&t)HL(e)}var b_=[{id:"page",strip:"page",title:"Page"},{id:"properties",strip:"element",title:"Content"},{id:"style",strip:"element",title:"Style"},{id:"events",strip:"element",title:"Logic"},{id:"assistant",strip:"assistant",title:"Assistant"}],Fk=[{id:"page",title:"Page"},{id:"element",title:"Element"},{id:"assistant",title:"Assistant"}];function v_(){return{saveDocument:()=>{},undo:()=>{},redo:()=>{},openInBrowser:()=>{},buildSite:()=>{},closeDocument:()=>{},duplicateSelection:()=>{},deleteSelection:()=>{},selectParent:()=>{},toggleDock:()=>{},toggleZen:()=>{},openPalette:()=>{},openProject:()=>{},newWindow:()=>{},panelRoster:[],focusPanel:()=>{},focusInspectorTab:()=>{},cycleRegion:()=>{}}}var j=(e)=>e.document.open,J=(e)=>e.selection.count>0&&e.editor.kind==="canvas",z=(e)=>!e.selection.isRoot&&e.selection.paths.every((o)=>Mm(o)),U="an element selected on the canvas that has a sibling position: not the document root, a repeater's template or a switch case",Y=(e)=>e.map((o)=>`[${o.join(", ")}]`).join(" and ");function Kf(e){return[{id:"file.save",title:"Save",category:"File",level:"document",icon:"floppy-disk",keybinding:"mod+s",menus:["commandbar/primary","statusbar/document","palette"],group:"1_file",undo:"none",when:j,enablement:(t)=>t.document.dirty,requires:"unsaved changes",run:()=>e.saveDocument()},{id:"document.close",title:"Close Document",category:"Document",level:"document",keybinding:"mod+w",menus:["context/tab","palette"],group:"1_file",when:j,requires:"an open document",run:()=>e.closeDocument()},{id:"view.openInBrowser",title:"Open in Browser",category:"View",level:"document",icon:"arrow-square-out",keybinding:"mod+shift+o",menus:["commandbar/primary","statusbar/document","palette"],group:"2_output",when:(t)=>t.project.isSite,enablement:j,requires:"a page to preview",run:()=>e.openInBrowser()},{id:"project.buildSite",title:"Build Site",category:"Project",level:"project",menus:["commandbar/overflow","palette"],group:"2_output",when:(t)=>t.project.isSite,requires:"a site project",run:()=>e.buildSite()},{id:"edit.undo",title:"Undo",category:"Edit",level:"document",icon:"arrow-u-up-left",keybinding:"mod+z",menus:["commandbar/primary","palette"],group:"1_history",order:1,when:j,enablement:(t)=>t.document.canUndo,requires:"a change to undo",run:()=>e.undo()},{id:"edit.redo",title:"Redo",category:"Edit",level:"document",icon:"arrow-u-up-right",keybinding:["mod+shift+z","mod+y"],menus:["commandbar/primary","palette"],group:"1_history",order:2,when:j,enablement:(t)=>t.document.canRedo,requires:"a change to redo",run:()=>e.redo()},{id:"selection.duplicate",title:"Duplicate",category:"Selection",level:"selection",keyScope:"canvas",keybinding:"mod+d",menus:["blockbar","context/element","context/layer","outline/row","palette"],group:"3_structure",undo:"document",when:J,enablement:z,requires:U,aiTool:{name:"duplicate_node",description:"Duplicate elements in the document, inserting each copy after its original, as one undoable step. The copies become the selection.",report:({after:t})=>{let r=t.selection.paths.length;return`Duplicated ${r} element${r===1?"":"s"}; the ${r===1?"copy is":"copies are"} selected at ${Y(t.selection.paths)}.`}},run:()=>e.duplicateSelection()},{id:"selection.repeat",title:"Repeat...",category:"Selection",level:"selection",keyScope:"canvas",menus:["context/element","palette"],group:"3_structure",undo:"document",when:J,enablement:(t)=>z(t)&&!t.selection.isRepeater,requires:"an element with a sibling position that is not already a repeater",run:()=>{(le("he70fc2b"),import("./convert-to-repeater-he70fc2b.js")).then(({convertToRepeater:t})=>t())}},{id:"selection.delete",title:"Delete",category:"Selection",level:"selection",keyScope:"canvas",keybinding:["delete","backspace"],menus:["blockbar","context/element","context/layer","outline/row","palette"],group:"9_danger",destructive:!0,undo:"document",when:J,enablement:z,requires:U,aiTool:{name:"delete_node",description:"Delete elements from the document as one undoable step.",report:({before:t,after:r})=>{let a=t.selection.paths.length;return`Deleted ${a} element${a===1?"":"s"} at ${Y(t.selection.paths)} in one undo step; the selection is now ${r.selection.count===0?"empty":"elsewhere"}.`}},run:()=>e.deleteSelection()},{id:"selection.selectParent",title:"Select Parent",category:"Selection",level:"selection",keyScope:"canvas",keybinding:["escape","arrowleft"],menus:["palette"],group:"2_navigate",when:J,requires:"an element selection",run:()=>e.selectParent()},{id:"view.toggleNavigator",title:"Toggle Navigator Dock",category:"View",level:"application",keybinding:"mod+b",menus:["commandbar/overflow","palette"],group:"4_docks",run:()=>e.toggleDock("navigator")},{id:"view.toggleInspector",title:"Toggle Inspector Dock",category:"View",level:"application",keybinding:"mod+alt+b",menus:["commandbar/overflow","palette"],group:"4_docks",run:()=>e.toggleDock("inspector")},{id:"view.zen",title:"Zen Mode",category:"View",level:"application",keybinding:"mod+.",menus:["commandbar/overflow","palette"],group:"4_docks",run:()=>e.toggleZen()},{id:"palette.open",title:"Open Command Center",category:"View",level:"application",keybinding:"mod+k",menus:["palette"],group:"5_palette",run:()=>e.openPalette("picker")},{id:"palette.openFiles",title:"Go to File…",category:"File",level:"application",keybinding:"mod+p",menus:["palette"],group:"5_palette",run:()=>e.openPalette("files")},{id:"palette.openCommands",title:"Run Command…",category:"View",level:"application",keybinding:"mod+shift+p",menus:["palette"],group:"5_palette",run:()=>e.openPalette("commands")},{id:"palette.openNodes",title:"Go to Symbol in Document…",category:"Selection",level:"document",menus:["palette"],group:"5_palette",when:j,requires:"an open document",run:()=>e.openPalette("nodes")},{id:"project.open",title:"Open Project…",category:"Project",level:"project",keybinding:"mod+o",menus:["commandbar/overflow","statusbar/project","palette"],group:"1_file",run:()=>e.openProject()},{id:"view.newWindow",title:"New Window",category:"View",level:"application",keybinding:"mod+shift+n",menus:["commandbar/overflow","palette"],group:"1_file",when:(t)=>t.capability.windowControls,requires:"a host that can hold more than one window",run:()=>e.newWindow()},{id:"project.openRecent",title:"Open Recent…",category:"Project",level:"project",menus:["commandbar/overflow","statusbar/project","palette"],group:"1_file",run:()=>e.openPalette("projects")},...se(e),...ce(e),{id:"view.cycleRegion",title:"Focus Next Region",category:"View",level:"application",keybinding:"f6",menus:["palette"],group:"4_docks",run:()=>e.cycleRegion(1)},{id:"view.cycleRegionBack",title:"Focus Previous Region",category:"View",level:"application",keybinding:"shift+f6",menus:["palette"],group:"4_docks",run:()=>e.cycleRegion(-1)}]}function se(e){return e.panelRoster.map((o)=>({id:`panel.focus.${o.id}`,title:`Show ${o.title}`,category:"View",level:"application",menus:["palette"],group:"4_docks",requires:"an open project",when:(t)=>t.project.open&&(o.when?.(t)??!0),run:()=>e.focusPanel(o.id)}))}function ce(e){return b_.map((o,t)=>({id:`inspector.focus.${o.id}`,title:`Show ${o.title}`,category:"View",level:"document",keybinding:`mod+shift+${t+1}`,menus:["palette"],group:"4_docks",requires:"an open document",when:(a)=>a.document.open,run:()=>e.focusInspectorTab(o.id)}))}
6
- export{Dy,Ru,Gf,Bg,h_,ER,p_,f_,m_,g_,Ny,Pk,TR,Ay,Oy,My,cp,LR,Cd,b_,Fk,v_,Kf};
7
-
8
- //# debugId=96E67B117E07535A64756E2164756E21
9
- //# sourceMappingURL=studio-58xg6j2q.js.map
@@ -1,4 +0,0 @@
1
- import{Sy,va,e_,ss,t_,as}from"./studio-83mk4bgg.js";import{$e}from"./studio-p4nrkvqr.js";import{n,Z,v}from"./studio-vxq7fcvv.js";var zI="meta",WI="frontmatter",VI="structure",UI="source",qI=2;function m(e){return v(e)}function _u(e){return e.getMap(zI)}function GI(e){return e.getMap(WI)}function Dg(e){return e.getMap(VI)}function KI(e){return e.getText(UI)}var Y=new Set(["textContent"]),h=new Set(["style","attributes","$props"]);function y(e,t){let o=e.toString();if(o===t)return!1;let r=0,s=Math.min(o.length,t.length);while(r<s&&o[r]===t[r])r+=1;let a=o.length,i=t.length;while(a>r&&i>r&&o[a-1]===t[i-1])a-=1,i-=1;if(a>r)e.delete(r,a-r);if(i>r)e.insert(r,t.slice(r,i));return!0}function f(e){let t=new ss;for(let[o,r]of Object.entries(e)){if(r===void 0)continue;t.set(o,m(r)?f(r):$e(r))}return t}function g(e,t){for(let o of[...e.keys()])if(!(o in t)||t[o]===void 0)e.delete(o);for(let[o,r]of Object.entries(t)){if(r===void 0)continue;let s=e.get(o);if(m(r))if(s instanceof ss)g(s,r);else e.set(o,f(r));else if(!b(s,r))e.set(o,$e(r))}}function b(e,t){if(e===t)return!0;if(e instanceof ss||e instanceof va||e instanceof as)return!1;return JSON.stringify(e??null)===JSON.stringify(t??null)}function d(e){return n(e)?new as(e):JI(e)}function Hf(e){let t=new va;return t.insert(0,e.map((o)=>d(o))),t}function JI(e){if(!m(e))throw TypeError("collab-schema: a document node must be a plain object");let t=new ss;for(let[o,r]of Object.entries(e)){if(r===void 0)continue;if(o==="children"&&Array.isArray(r))t.set(o,Hf(r));else if(Y.has(o)&&n(r))t.set(o,new as(r));else if(h.has(o)&&m(r))t.set(o,f(r));else t.set(o,$e(r))}return t}function S(e){return Object.fromEntries(Array.from(e.entries(),([t,o])=>[t,Bf(o)]))}function E(e){if(n(e))return e;return e instanceof as?e.toString():S(e)}function Bf(e){if(e instanceof ss)return S(e);if(e instanceof va)return e.toArray().map((t)=>Bf(t));if(e instanceof as)return e.toString();return e}function l2(e){return S(Dg(e))}function X0(e,t){let o=Dg(e);for(let r of t)if(o instanceof ss)o=o.get(String(r));else if(o instanceof va){let s=Number(r);if(!Number.isInteger(s)||s<0||s>=o.length)return;o=o.get(s)}else return;return o}function pk(e,t,o){let r=KI(e);if(r.toString()===t)return!1;return e.transact(()=>{y(r,t)},o),!0}function c2(e,t,o={}){let r=_u(e);if(r.get("structureSeeded")===!0)return!1;return e.transact(()=>{let s=Dg(e);for(let[i,c]of Object.entries(t)){if(c===void 0)continue;if(i==="children"&&Array.isArray(c))s.set(i,Hf(c));else s.set(i,$e(c))}let a=GI(e);for(let[i,c]of Object.entries(o.frontmatter??{}))if(c!==void 0)a.set(i,$e(c));r.set("schemaVersion",qI),r.set("canonical","structure"),r.set("canonicalRev",0),r.set("sourceFormat",o.sourceFormat??null),r.set("structureSeeded",!0)},o.origin),!0}var d2="jx-local",u2="jx-mirror",h2="jx-seed";class Su extends Error{constructor(e){super(`collab-path-unresolved:${e.join("/")}`);this.name="CollabPathError"}}function O(e,t){let o=X0(e,t);if(!(o instanceof ss))throw new Su(t);return o}function p(e,t,o){let r=O(e,t),s=r.get("children");if(s instanceof va)return s;if(o&&s===void 0){let a=new va;return r.set("children",a),a}throw new Su([...t,"children"])}function J(e,t,o){let r=e.get(t);if(t==="children"&&Array.isArray(o)){e.set(t,Hf(o));return}if(Y.has(t)&&n(o)){if(r instanceof as)y(r,o);else e.set(t,new as(o));return}if(h.has(t)&&v(o)){if(r instanceof ss)g(r,o);else e.set(t,f(o));return}e.set(t,$e(o))}function V(e,t){let{op:o}=t;switch(t.op){case"set-key":{let r=O(e,t.path);if(t.value===void 0)r.delete(t.key);else J(r,t.key,t.value);return}case"insert-child":{let r=p(e,t.parentPath,!0);if(t.index<0||t.index>r.length)throw new Su([...t.parentPath,"children",t.index]);r.insert(t.index,[d(t.node)]);return}case"remove-child":{let r=p(e,t.parentPath,!1);if(t.index<0||t.index>=r.length)throw new Su([...t.parentPath,"children",t.index]);r.delete(t.index,1);return}case"set-child":{let r=p(e,t.parentPath,!1);if(t.index<0||t.index>=r.length)throw new Su([...t.parentPath,"children",t.index]);let s=r.get(t.index);if(s instanceof as&&n(t.node)){y(s,t.node);return}r.delete(t.index,1),r.insert(t.index,[d(t.node)]);return}case"move-child":{let r=p(e,t.fromParentPath,!1),s=p(e,t.toParentPath,!0);if(t.fromIndex<0||t.fromIndex>=r.length)throw new Su([...t.fromParentPath,"children",t.fromIndex]);let a=Bf(r.get(t.fromIndex));if(r.delete(t.fromIndex,1),t.toIndex<0||t.toIndex>s.length)throw new Su([...t.toParentPath,"children",t.toIndex]);s.insert(t.toIndex,[d(a)]);return}default:throw Error(`unknown-doc-op:${o}`)}}function p2(e,t,o){e.transact(()=>{for(let r of t)V(e,r)},o)}function w(e){for(let t=0;t<e.length;t++){let o=e[t];if(!n(o))continue;if(h.has(o))return{key:o,nodePath:e.slice(0,t)};if(Y.has(o))return{key:o,nodePath:e.slice(0,t)}}return null}function P(e){return e instanceof as||e instanceof ss||n(e)}function C(e){return e.every((t)=>n(t)||Z(t))}function f2(e){if(e.length===0)return[];let t=e.map((s)=>s.path);if(!t.every((s)=>C(s)))return null;for(let s=0;s<t.length;s++)for(let a=0;a<t.length;a++){if(s===a)continue;let i=t[s],c=t[a];if(i.length<=c.length&&i.every((u,l)=>u===c[l]))return null}if(e.filter((s)=>s instanceof Sy).length>1)return null;let r=[];for(let s of e){let{path:a}=s,i=w(a);if(i){let{doc:c}=s.target;if(!c)return null;let u=X0(c,[...i.nodePath,i.key]);if(u===void 0)return null;r.push({key:i.key,op:"set-key",path:i.nodePath,value:Bf(u)});continue}if(s instanceof t_){let c=a.at(-1);if(a.at(-2)==="children"&&Z(c)){r.push({index:c,node:s.target.toString(),op:"set-child",parentPath:a.slice(0,-2)});continue}return null}if(s instanceof e_){let c=s.target;for(let[u,l]of s.changes.keys)if(l.action==="delete")r.push({key:u,op:"set-key",path:a});else r.push({key:u,op:"set-key",path:a,value:Bf(c.get(u))})}else if(s instanceof Sy){if(a.at(-1)!=="children")return null;let c=a.slice(0,-1),u=0;for(let l of s.changes.delta)if(l.retain!==void 0)u+=l.retain;else if(l.delete!==void 0)for(let x=0;x<l.delete;x++)r.push({index:u,op:"remove-child",parentPath:c});else if(l.insert!==void 0){let x=Array.isArray(l.insert)?l.insert:[l.insert];for(let D of x){if(!P(D))return null;r.push({index:u,node:E(D),op:"insert-child",parentPath:c}),u+=1}}}else return null}return r}function m2(e,t,o){e.transact(()=>{let r=Dg(e),s=[...r.keys()];for(let i of s)if(!(i in t)||t[i]===void 0)r.delete(i);for(let[i,c]of Object.entries(t)){if(c===void 0)continue;if(i==="children"&&Array.isArray(c))r.set(i,Hf(c));else r.set(i,$e(c))}let a=_u(e);a.set("canonicalRev",Number(a.get("canonicalRev")??0)+1)},o)}function fk(e){return _u(e).get("canonical")==="source"?"source":"structure"}function mk(e){return Number(_u(e).get("canonicalRev")??0)}function g2(e,t,o){if(fk(e)==="source")return!1;return e.transact(()=>{pk(e,t,o);let r=_u(e);r.set("canonical","source"),r.set("canonicalRev",mk(e)+1)},o),!0}function b2(e,t){if(fk(e)!=="source")return!1;return e.transact(()=>{let o=_u(e);o.set("canonical","structure"),o.set("canonicalRev",mk(e)+1)},t),!0}function v2(e,t,o){let r=[];for(let[s,a]of e.getStates()){let i=a;if(s!==o&&i.mode==="source"&&i.focusedPath===t)r.push(s)}return r}function y2(e,t){let o=e.clientID,r=e.getStates().get(o);if(r?.mode!=="source"||r.focusedPath!==t)return!1;let s=o;for(let[a,i]of e.getStates()){let c=i;if(c.mode==="source"&&c.focusedPath===t&&c.canWrite!==!1&&a<s)s=a}return s===o}var gk=["#4f9cf9","#e5484d","#30a46c","#f5a524","#8e4ec6","#00a2c7","#e93d82","#a8845c"];function w2(e){let t=5381;for(let r=0;r<e.length;r++)t=Math.imul(t,33)+(e.codePointAt(r)??0);let o=Math.abs(t)%gk.length;return gk[o]}export{zI,WI,VI,UI,qI,_u,GI,Dg,KI,Hf,JI,Bf,l2,X0,pk,c2,d2,u2,h2,Su,p2,f2,m2,fk,mk,g2,b2,v2,y2,gk,w2};
2
-
3
- //# debugId=927469AD1BAD395664756E2164756E21
4
- //# sourceMappingURL=studio-80jyh1xh.js.map
@@ -1,6 +0,0 @@
1
- import{mx,Pp,Fp,jp,gx,Tm,Wd,qb,Hp,C$,ch,$m,qA,Ta}from"./studio-q7rtx6zq.js";import{p}from"./studio-w4rz9hdk.js";import{fh}from"./studio-8m0y2qe7.js";import{Qt,Hi,dv}from"./studio-c05wdnt3.js";import{Ot,cn}from"./studio-z97c48fk.js";import{Ae}from"./studio-fbhxxc5f.js";import{ar}from"./studio-fyh0jc96.js";import{ah,jb,Jl,Sm,Hb,Hd}from"./studio-ph84avkf.js";import{NS,OS,Tb,Lb}from"./studio-rj9eamf8.js";import{or}from"./studio-q0tccd43.js";import{x}from"./studio-gcxk20n7.js";import{n,te,S,v,Ie,_n,rc}from"./studio-vxq7fcvv.js";function R(e,t){return new URL(`/node_modules/${e}`,t).href}var L=4;function P(e){if(e===void 0)return!1;if(n(e))return!e.includes("${");if(Array.isArray(e))return e.every((t)=>P(t));if(v(e))return!("$ref"in e)&&!("$prototype"in e)&&!("$expression"in e)&&Object.values(e).every((t)=>P(t));return!0}function F(e){return new Set(Object.keys(e.state??{}).filter((t)=>!rc(t)))}function H(e){let t=new Map;for(let[s,r]of Object.entries(e.state??{})){if(rc(s)||!v(r)||!Array.isArray(r.examples))continue;let[o]=r.examples;if(P(o))t.set(s,o)}return t}function C(e,t){let s=(r,o)=>{if(Array.isArray(r)){for(let i of r)s(i,o);return}if(!_n(r))return;t(r,o),s(r.children,o),s(r.map,r.$prototype==="Array"?r:o);for(let i of Object.values(r.cases??{}))s(i,o)};s(e,null)}function V(e,t,s){let r=new Map;return C(e,(o)=>{if(o.tagName!==t||!v(o.$props))return;let i=new Map;for(let[l,u]of Object.entries(o.$props))if(s.has(l)&&P(u))i.set(l,u);if(i.size>r.size)r=i}),r}async function j(e){try{let t=await p().readFile(e);await Ot();let s;if(cn(e))s=(await or(e,t)).document;else if(e.endsWith(".json"))s=JSON.parse(t);else return null;return _n(s)?s:null}catch{return null}}async function E(e,t){let s=await ar({path:e,tagName:t});if(s.status!=="ready")return[];let{i18n:r}=Qt(x?.projectConfig??{}),o=(l)=>{let u=Hi(l,r);return u!==null&&u!==r?.defaultLocale},i=s.result.files.map((l)=>l.path);return[...i.filter((l)=>!o(l)),...i.filter((l)=>o(l))].slice(0,L)}async function fS(e,t){let s=F(e),r=n(e.tagName)?e.tagName:null,o=H(e);if(!r||s.size===0)return o;let i=new Map;for(let l of await E(t,r)){let u=V(await j(l),r,s);if(u.size>i.size)i=u}return new Map([...i,...o])}function J(e){let{items:t}=e;if(!Ie(t)||!t.$ref.startsWith("#/state/"))return null;let s=t.$ref.slice(8);return s!==""&&!s.includes("/")?s:null}async function mS(e,t){let s=n(e.tagName)?e.tagName:null;if(!s)return null;for(let r of await E(t,s)){let o=await j(r),i=[];C(o,(c,a)=>{if(c.tagName===s&&a&&J(a))i.push(a)});let[l]=i,u=l?J(l):null;if(!o||!l||!u)continue;let f=await OS(o,[u],new URL(r,Jl(x?.projectRoot)).href),y=f.state?.[u];if(!Array.isArray(y)||y.length===0)continue;let w=r.startsWith("pages/")?await NS({documentPath:r,isEntry:!1,lang:o.$lang,title:o.title},x?.projectConfig):null;return{doc:{children:[l],state:{...f.state,[u]:y.slice(0,1),...w},tagName:"div"},file:r}}return null}var W={body:"body",root:":root"};function k(e,t,s,r,o=W){let i=[],l=(c,a)=>{let h={mediaQueries:t,scope:a,transposeValue:s};if(r)h.resolveValue=(g,b)=>r(g,b,a);for(let g of Tm(c,h))i.push(g.text)},u={},f={},y=[],w=[];for(let[c,a]of Object.entries(e)){if(S(a)&&!Array.isArray(a)){if(c.startsWith("@"))y.push([c,a]);else if(!c.startsWith("--"))w.push([c,a]);continue}if(gx(c)||c.startsWith("@"))continue;if(c.startsWith("--")||c==="colorScheme"||c==="color-scheme")u[c]=a;else f[c]=a}l(u,o.root),l(f,o.body);for(let[c,a]of w)if(c.startsWith("&"))l({[c]:a},o.root);else l(a,c);for(let[c,a]of y){if(mx(c)||Pp(c)){l({[c]:a},null);continue}let h={},g={},b=[];for(let[m,d]of Object.entries(a)){if(S(d)&&!Array.isArray(d)){if(!m.startsWith("@"))b.push([m,d]);continue}if(m.startsWith("--"))h[m]=d;else g[m]=d}l({[c]:h},o.root),l({[c]:g},o.body);for(let[m,d]of b)l({[c]:d},m)}if(Object.values(t).some((c)=>jp(c)!==null)&&!("colorScheme"in e))i.push(`${o.root} { color-scheme: light dark }`,`${o.root}:where([${Fp}="light"]) { color-scheme: light }`,`${o.root}:where([${Fp}="dark"]) { color-scheme: dark }`);return i.join(`
2
- `)}var _={body:":host",root:":host"},O=new WeakMap,D=new WeakMap;function U(e){let t=e.replaceAll(/:root\b/g,":host").replaceAll(/(^|[\s,>+~(])(?:html|body)(?![\w-])/g,"$1:host").replaceAll(/:host(?:\s*>?\s*:host)+/g,":host");return t===e?null:t}function M(e){for(let t=0;t<e.cssRules.length;t+=1){let s=e.cssRules[t],r=s instanceof CSSStyleRule?U(s.selectorText):null;if(s instanceof CSSStyleRule&&r!==null){let i=`${r}${s.cssText.slice(s.cssText.indexOf("{"))}`;try{e.insertRule(i,t),e.deleteRule(t+1)}catch{}}let o=e.cssRules[t];if(o instanceof CSSGroupingRule)M(o)}}function z(e){let t=[];for(let s of e??[]){if(!S(s)||String(s.tagName).toLowerCase()!=="link")continue;let{href:r,rel:o}=s.attributes??{};if(n(r)&&r!==""&&n(o)&&o.split(/\s+/).includes("stylesheet"))t.push(r)}return t}async function I(e){let t=Hb(e,"project.json");try{let s=await fetch(t);if(!s.ok)return null;let r=new URL(t,location.href).href,o=new CSSStyleSheet({baseURL:r});return o.replaceSync(await s.text()),M(o),o}catch{return null}}async function B(e){let s=(await Promise.all(z(e.$head).map((o)=>I(o)))).filter((o)=>o!==null),{style:r}=e;if(S(r)){let o=new CSSStyleSheet;o.replaceSync(k(r,e.$media??{},(i)=>i,void 0,_)),s.push(o)}return s}function N(){let e=x?.projectConfig;if(!e||!te(globalThis.CSSStyleSheet))return Promise.resolve([]);let t=O.get(e);if(!t)t=B(e).then((s)=>(D.set(e,s),s)),O.set(e,t);return t}function JD(){let e=x?.projectConfig;return(e&&D.get(e))??[]}var K=150;function _w(e=K){let t=new Map;function s(){for(let[r,o]of t){if(t.size<=e)break;t.delete(r),o.remove()}}return{clear(){for(let r of t.values())r.remove();t.clear()},get(r){let o=t.get(r);if(o!==void 0)t.delete(r),t.set(r,o);return o},has:(r)=>t.has(r),keys:()=>[...t.keys()],set(r,o){t.delete(r),t.set(r,o),s()},size:()=>t.size}}function A(e){let t=Jl(x?.projectRoot);return URL.canParse(t)?new URL(e,t).href:location.href}async function G(e){try{let t=await p().readFile(e);Wd(!0);let s=Sm(e,Hd());await Ot();let r;if(cn(e))r=(await or(e,t)).document;else r=JSON.parse(t);return await T(r,e,s)}catch{return null}}async function T(e,t,s=Sm(t,Hd())){Wd(!0),qb(jb());let r=await ch(e,{},A(t)),o=s&&{...s,versions:fh()};C$((i)=>dv(i,o));try{let i=Ta(e,r);return i instanceof HTMLElement?i:null}finally{C$(null)}}async function Y(e,t){let s=await RT(t);if(!s)return null;let r=await fS(s,t);if(r.size>0&&await Sw(s,t,r))return Tb(e,r);let o=await mS(s,t);if(o&&await Lb(e))return T(o.doc,o.file);return await Sw(s,t,r)?Tb(e,r):null}async function RT(e){try{let t=JSON.parse(await p().readFile(e));return S(t)&&!Array.isArray(t)?t:null}catch{return null}}async function Sw(e,t,s){let r=null;try{Wd(!0),qb(jb());let o=await ch(e,{},A(t));for(let[u,f]of s)o[u]=f;let i=!1;$m(()=>{i=!0});let{stop:l}=Hp(()=>Ta({...e,tagName:"div"},o));return r=l,!i}catch{return!1}finally{$m(null),r?.()}}function q(e){return e.source!=="npm"&&(e.path?.endsWith(".json")??!1)}async function Cw(e,t){let s=t.get(e);if(s)return s;let r;try{qA((i)=>R(i,`${ah()}/`)),await N();let o=Ae.find((i)=>i.path===e);if(o&&q(o))r=await Y(o,e);else r=o?await Tb(o):await G(e)}catch{return}if(!r)return;return t.set(e,r),r}function bp(e){if(!te(globalThis.IntersectionObserver))return{destroy(){},observe:(r)=>e(r),releaseDetached:()=>0};let t=new Set,s=new IntersectionObserver((r)=>{for(let o of r)if(o.isIntersecting)t.delete(o.target),s.unobserve(o.target),e(o.target)},{rootMargin:"200px"});return{destroy(){s.disconnect(),t.clear()},observe(r){if(t.has(r))return;t.add(r),s.observe(r)},releaseDetached(){let r=0;for(let o of t)if(!o.isConnected)t.delete(o),s.unobserve(o),r+=1;return r}}}
3
- export{fS,mS,JD,_w,RT,Sw,Cw,bp};
4
-
5
- //# debugId=3F6BD22739F96C3564756E2164756E21
6
- //# sourceMappingURL=studio-8vcvfs7r.js.map
@@ -1,5 +0,0 @@
1
- import{p,_e}from"./studio-w4rz9hdk.js";import{Q}from"./studio-nqxqf8p2.js";import{te}from"./studio-vxq7fcvv.js";function ph(){return _e()&&te(p().findReferences)}function u(e){return`${e.path??""}\x00${e.tagName??""}`}var i=new Map,o=new Map;function al(e){if(!ph())return{status:"unsupported"};return i.get(u(e))??(o.has(u(e))?{status:"pending"}:null)}async function ar(e){if(!ph())return{status:"unsupported"};if(!e.path&&!e.tagName)return{status:"failed",message:"no target to look for"};let t=u(e),s=i.get(t);if(s)return s;let r=o.get(t);if(r)return r;let n={};if(e.path!==void 0)n.path=e.path;if(e.tagName!==void 0)n.tagName=e.tagName;let a=(async()=>{try{return{result:await p().findReferences(n),status:"ready"}}catch(c){return{message:Q(c),status:"failed"}}})();o.set(t,a);let d=f,l=await a;if(o.get(t)===a)o.delete(t);if(d!==f)return l;return i.set(t,l),l}function $$(e){return i.delete(u(e)),ar(e)}var f=0,g=new Set;function Er(){f+=1,i.clear(),o.clear();for(let e of g)e()}function Yb(e){return g.add(e),()=>{g.delete(e)}}function wC(e){let t=0;for(let s of e.files)if(s.path.startsWith("pages/"))t+=1;return{others:e.files.length-t,pages:t}}function Zb(e){let{others:t,pages:s}=wC(e);if(s===0&&t===0)return"Not used yet";let r=t===1?"file":"files";if(s===0)return`Used in ${t} ${r}`;let n=`Used on ${s} page${s===1?"":"s"}`;return t===0?n:`${n} and ${t} other ${r}`}function I$(e,t){if(e.status==="unsupported")return null;if(e.status==="pending")return"Counting references…";if(e.status==="failed")return`References could not be counted (${e.message}) — this may break more than it appears to.`;let{files:s,refsTotal:r}=e.result;if(s.length===0)return t==="delete"?"Nothing else in this project refers to it.":"Nothing else in this project refers to it, so nothing needs updating.";let n=`${r} reference${r===1?"":"s"} in ${s.length} file${s.length===1?"":"s"}`,a=e.result.errors.length>0?" (at least — some documents could not be read)":"";if(t==="delete")return`${n}${a} will break. Those files stay on disk; the references in them stop resolving.`;if(t==="convert")return`${n}${a} will be updated automatically to point at the new file.`;return`${n}${a} will be updated automatically. Nothing else changes.`}function Xb(e){return e.files.toSorted((t,s)=>s.count-t.count||t.path.localeCompare(s.path))}
2
- export{ph,al,ar,$$,Er,Yb,wC,Zb,I$,Xb};
3
-
4
- //# debugId=39E7419F0667812364756E2164756E21
5
- //# sourceMappingURL=studio-fyh0jc96.js.map
@@ -1,5 +0,0 @@
1
- import{n,Z,Xe,te,S,v,Ie,Yo,_n,rf,it}from"./studio-vxq7fcvv.js";var gv=400;var Yp=350,jC=300,VO=30000;function lr(e){return Array.isArray(e?.children)?e.children:[]}function bv(e,t,i=""){if(!S(e))return e;if(Array.isArray(e)){for(let[l,s]of e.entries())bv(s,t,`${i}/${l}`);return e}let r=e,{children:o}=r;if(Yo(o)){let l=o;t?.(i,l),r.children=[l]}if(Array.isArray(r.children))for(let[l,s]of r.children.entries())bv(s,t,`${i}/children/${l}`);if(r.$prototype==="Array"&&S(r.map))bv(r.map,t,`${i}/map`);if(S(r.cases))for(let[l,s]of Object.entries(r.cases))bv(s,t,`${i}/cases/${Y$(l)}`);return e}function Y$(e){return String(e).replaceAll("~","~0").replaceAll("/","~1")}function At(e){return e.length>=2?e.slice(0,-2):null}function hi(e){return e.at(-1)}function Z$(e){return e.join("/")}function $r(e,t){if(e===t)return!0;if(!e||!t||e.length!==t.length)return!1;return e.every((i,r)=>i===t[r])}function nc(e,t){if(e.length>t.length)return!1;return e.every((i,r)=>i===t[r])}function _h(e,t=[],i=0){let r=[];return u(e,t,i,r,!1),r}function u(e,t,i,r,o){if(n(e)||Z(e)||Xe(e)){if(!o)r.push({depth:i,node:e,nodeType:"text",path:t});return}if(e.$prototype==="Array"){if(!o)r.push({depth:i,node:e,nodeType:"map",path:t});let s=e.map;if(S(s))u(s,[...t,"map"],i+1,r,!1);return}if(!o)r.push({depth:i,node:e,nodeType:"element",path:t});if(e.$props&&it(e.tagName).includes("-")&&!Array.isArray(e.children))return;let{children:l}=e;if(Array.isArray(l))for(let s=0;s<l.length;s++){let a=[...t,"children",s];u(l[s],a,i+1,r,!1)}else if(Yo(l))u(l,[...t,"children"],i+1,r,!1);if(e.$switch&&S(e.cases))for(let[s,a]of Object.entries(e.cases)){let p=[...t,"cases",s];if(S(a)&&a.$ref)r.push({depth:i+1,node:a,nodeType:"case-ref",path:p});else if(S(a))r.push({depth:i+1,node:a,nodeType:"case",path:p}),u(a,p,i+2,r,!0)}}function Ir(e){if(!e)return"?";if(e.$prototype==="Array"){let{items:r}=e;return`Repeater → ${(Ie(r)?r.$ref:void 0)||"items"}`}if(e.$title)return e.$title;if(e.$id)return e.$id;if(e.tagName==="slot"){let r=e.attributes?.name;return n(r)&&r.trim()?`slot: ${r.trim()}`:"slot"}let t=it(e.tagName)||"div",i=e.$switch?" ⇆":"";if(n(e.textContent)&&e.textContent.length>0)return`${t} — ${e.textContent.slice(0,24)}${i}`;return t+i}var x=null;function id(e){x=e}function wn(){return x}function Sh(e){return S(e)}function Zp(e){if(Array.isArray(e))return e.map((i)=>Zp(i));if(!_n(e))return e;let t={};for(let[i,r]of Object.entries(e)){if(i.startsWith("on")&&rf(r))continue;if(i==="children")t.children=Array.isArray(r)?r.map((o)=>Zp(o)):Zp(r);else if(i==="cases"&&Sh(r)){let o={};for(let[l,s]of Object.entries(r))o[l]=Zp(s);t.cases=o}else if(i==="state"&&Sh(r)){let o={};for(let[l,s]of Object.entries(r)){if(v(s)&&s.timing==="server")continue;o[l]=s}t.state=o}else t[i]=r}return t}var HC=null,Ch=null,X$=null,Q$=null,eI=null;function c(e){let t=document.querySelector(`#${e}`);return t instanceof HTMLElement?t:null}function UO(){HC=c("activity-bar"),Ch=c("left-panel"),X$=c("right-panel"),Q$=c("toolbar"),eI=c("statusbar")}function Xp(e,t){if(!e)throw TypeError(`#${t} is not in the shell yet; initShellRefs() has not found it`);return e}var Vm=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),tI=[":hover",":focus",":active",":focus-within",":focus-visible",":disabled",":first-child",":last-child","::before","::after","::placeholder"];function Wx(e){return e.startsWith(":")||e.startsWith(".")||e.startsWith("&")||e.startsWith("[")}var f=new Map;function Vx(e,t,i){let r=t??gv;return(...o)=>{clearTimeout(f.get(e)),f.set(e,setTimeout(()=>{f.delete(e),i(...o)},r))}}function qO(e){clearTimeout(f.get(e)),f.delete(e)}var m=new Map;function y(e){return(S(e)||te(e))&&"then"in e&&te(e.then)}var d=0;function GO(){return d}function h(e,t){d+=1;let i=()=>{d-=1},r=null;try{let o=t();if(y(o))r=o}catch(o){console.error(`Renderer "${e}" failed:`,o)}if(!r){i();return}r.then(i,(o)=>{console.error(`Renderer "${e}" failed:`,o),i()})}function Um(e,t){m.set(e,t)}function cr(){for(let[e,t]of m.entries())h(e,t)}function xn(...e){for(let t of e){let i=m.get(t);if(!i)continue;h(t,i)}}function dl(e,t){if(e){if(t.selection!==void 0)e.session.selection=t.selection;if(t.hover!==void 0)e.session.hover=t.hover;if(t.clipboard!==void 0)e.session.clipboard=t.clipboard;if(t.ui)Object.assign(e.session.ui,t.ui);if(t.canvas)Object.assign(e.session.canvas,t.canvas)}}function Da(e,t,i){if(e)e.session.ui[t]=i}function KO(e,t){if(e)Object.assign(e.session.canvas,t)}
2
- export{gv,Yp,jC,VO,lr,bv,Y$,At,hi,Z$,$r,nc,_h,Ir,x,id,wn,Sh,Zp,HC,Ch,X$,Q$,eI,UO,Xp,Vm,tI,Wx,Vx,qO,GO,Um,cr,xn,dl,Da,KO};
3
-
4
- //# debugId=4062451AE00E330A64756E2164756E21
5
- //# sourceMappingURL=studio-gcxk20n7.js.map
@@ -1,5 +0,0 @@
1
- import{xx,Xl,ll,m,_i,Bt}from"./studio-c05wdnt3.js";import{hS,xw,LT}from"./studio-qwdqwkj0.js";import{eE,tE,QR}from"./studio-pgmvdv7z.js";import{o_,r_,Ek}from"./studio-a2bvaptz.js";var n={children:[],tagName:"div"},_2=new Set(Object.values(xx));function n_(e){return _2.has(e)}function xk(e){let o=Xl(e),r=m.tabs.get(o);if(r)return Bt(o),r;return _i({capabilities:{modes:[xx[e]]},document:structuredClone(n),documentPath:null,id:o})}function _k(e,o){_i({background:!0,capabilities:{modes:[xx[e]]},document:structuredClone(n),documentPath:null,id:Xl(e),paneId:o})}function i_(e,o){let r=ll(o.id);if(r==="media")return hS(e,o);if(r==="content")return eE(e,o);return o_(e,o)}function Og(e){xw(e),tE(e),r_(e)}function Sk(e,o){let{paneId:r}=e;if(i_(r,o))return;Og(r);let t=ll(o.id);if(t==="media"){LT(e,o);return}if(t==="content"){QR(e,o);return}Ek(e,o)}
2
- export{_2,n_,xk,_k,i_,Og,Sk};
3
-
4
- //# debugId=8DED0E14628C946464756E2164756E21
5
- //# sourceMappingURL=studio-m8g16bgz.js.map
@@ -1,5 +0,0 @@
1
- import{yh}from"./studio-c05wdnt3.js";import{mb}from"./studio-tf9jryb1.js";import{x}from"./studio-gcxk20n7.js";import{n,S}from"./studio-vxq7fcvv.js";function YE(){return Object.keys(x?.projectConfig?.content??{})}function wa(e){let t=mb(e);if(!t)return null;if(/\.[a-z\d]+$/i.test(t.dir))return null;return{def:t.def,dir:t.dir,ext:t.ext,name:t.name,schema:t.def.schema??null}}function gw(){return YE().map((e)=>wa(e)).filter((e)=>e!==null)}function Ac(e){let t=yh(e??null,x?.projectConfig);return t?wa(t.name):null}function HD(e){let t=yh(e??null,x?.projectConfig),r=t?mb(t.name):null;if(!t||!r)return null;return{def:r.def,dir:r.dir,ext:r.ext,name:r.name,schema:t.schema}}function c(e){if(e===null||!S(e))return e;return JSON.parse(JSON.stringify(e))}function u(e){if(n(e.$ref))return"";switch(e.type){case"boolean":return!1;case"integer":case"number":return 0;case"array":return[];case"object":return ZE(e);default:return""}}function ZE(e){let t=e?.properties;if(!t)return{};let r=new Set(Array.isArray(e.required)?e.required:[]),o={};for(let[i,l]of Object.entries(t))if(l.default!==void 0)o[i]=c(l.default);else if(r.has(i))o[i]=u(l);return o}function BD(e,t){return(Array.isArray(e?.required)?e.required:[]).filter((o)=>t[o]===void 0)}
2
- export{YE,wa,gw,Ac,HD,ZE,BD};
3
-
4
- //# debugId=EF9BEB41768252A764756E2164756E21
5
- //# sourceMappingURL=studio-mx1smyq0.js.map
@@ -1,7 +0,0 @@
1
- import{p,_e}from"./studio-w4rz9hdk.js";import{ks}from"./studio-tf9jryb1.js";import{Q}from"./studio-nqxqf8p2.js";import{ge,ne,g,C}from"./studio-43sd2mam.js";import{wi,T,R,rt,xi}from"./studio-x9hsze61.js";import{Vt,Qt,Hi,ev}from"./studio-c05wdnt3.js";import{Us}from"./studio-y0n7yxea.js";import{Xt}from"./studio-pbxa5fpc.js";import{Er}from"./studio-fyh0jc96.js";import{Dp}from"./studio-ph84avkf.js";import{rr}from"./studio-3exxhz5g.js";import{_r,Xu,ES,wN,Cb,ci,Fw,CN,Vl,IS,th,EN,kp}from"./studio-rj9eamf8.js";import{vb,yb}from"./studio-q0tccd43.js";import{yi}from"./studio-ed3xx40h.js";import{pp,U_,SE,tb,CE,nw,iw,mD,EE,sm,ow,vD,TE,nb,yD,wD,xD,_D,SD,LE,CD}from"./studio-03ct6yfv.js";import{Pl}from"./studio-txf2kysx.js";import{eS}from"./studio-wys23mxz.js";import{wa}from"./studio-mx1smyq0.js";import{JD,_w,Cw,bp}from"./studio-8vcvfs7r.js";import{vp}from"./studio-e1g64q43.js";import{x,xn}from"./studio-gcxk20n7.js";import{n,te,S,v}from"./studio-vxq7fcvv.js";import{le}from"./studio-qgh13jtz.js";function ee(e){return{contentType:null,draft:!1,layout:void 0,path:e}}function ue(e,t,a){let{contentType:r,layout:o}=IS(t,a),i=a?.[ks]===!0||t?.[ks]===!0;return{contentType:r,draft:i,layout:o,path:e}}async function De(e){try{let t=await p().readFile(e);if(e.endsWith(".json")){let o=JSON.parse(t);return S(o)&&!Array.isArray(o)?ue(e,o,null):ee(e)}let{parseSourceForPath:a}=await (le("qnab36ek"),import("./file-ops-qnab36ek.js")),r=await a(e,t);return ue(e,r.document,r.frontmatter)}catch{return ee(e)}}var Ie=300,q=null,z=null,ae=0,re=new Set;function me(e){let t=e.join(`
2
- `);if(q?.key===t)return q.pages;if(!_e())return new Map(e.map((a)=>[a,ee(a)]));if(z?.key!==t){let a=ae,r=Promise.all(e.slice(0,Ie).map((o)=>De(o))).then((o)=>{if(a!==ae||z?.read!==r)return;z=null,q={key:t,pages:new Map(o.map((i)=>[i.path,i]))};for(let i of re)i()});z={key:t,read:r}}return null}function qg(){ae+=1,q=null,z=null}function fe(e){return re.add(e),()=>{re.delete(e)}}function zy(e){return e?"true":"false"}function JR(e){return e.trim().toLowerCase()}function Gg(e,...t){return e===""||t.some((a)=>a.toLowerCase().includes(e))}function Td(e){let t=e.replaceAll(/[-_]+/g," ").trim();return t===""?e:t.charAt(0).toUpperCase()+t.slice(1)}function ie(e){let t=Td(e);if(/ies$/i.test(t))return`${t.slice(0,-3)}y`;if(/[^s]s$/i.test(t))return t.slice(0,-1);return t}function oe(e){let t=e.slice(e.lastIndexOf("/")+1),a=t.lastIndexOf(".");return a>0?t.slice(0,a):t}function Y(e,t,a){let r=Hi(t,a);return r===null?e:`${e} (${r})`}function U(e,t,a=null){if(Hi(t,a)!==null){let c=ev(t,a);return Y(U(_r(c),c),t,a)}if(e.urlPattern==="/")return"Home";let r=e.urlPattern.split("/").filter((c)=>c!==""),o=(c)=>c==="*"||c.startsWith(":"),i=r.at(-1)??oe(t);if(!o(i))return Td(i);let l=r.findLast((c)=>!o(c));return Td(l??oe(t).replaceAll(/[[\].]/g,""))}function YR(e,t,a,r={}){let o=r.i18n??null,i=e.flatMap((u)=>Xu(u.path,r.extensions)?[{fact:u,route:_r(u.path)}]:[]).toSorted((u,m)=>ES(u.route,m.route)||u.fact.path.localeCompare(m.fact.path)),l=[],c=(u,m,f,L)=>({detail:m.urlPattern,key:u.path,kind:f,label:L,path:u.path,selected:zy(u.path===a)}),d=new Map;for(let u of i){let m=u.fact.contentType;if(m!==null&&t.has(m))d.set(m,[...d.get(m)??[],u])}let s=new Set;for(let{fact:u,route:m}of i){let f=u.contentType,L=f===null?void 0:d.get(f);if(f===null||L===void 0){l.push(c(u,m,"page",U(m,u.path,o)));continue}if(s.has(f))continue;s.add(f),l.push({detail:Ve(t.get(f)??null),key:`collection:${f}`,kind:"collection",label:Td(f),path:"",selected:"false"});let H=`${ie(f)} page`;for(let D of L){let N=Y(H,D.fact.path,o);l.push(c(D.fact,D.route,"entry-page",N))}}return l}function Ve(e){if(e===null)return"";return`${e} ${e===1?"entry":"entries"}`}function ZR(e,t){if(t==="")return[...e];let a=[],r=null,o=!1;for(let i of e){if(i.kind==="collection"){if(r=i,o=Gg(t,i.label),o)a.push(i);continue}if(i.kind==="page")r=null;if(i.kind==="entry-page"&&o||Gg(t,i.label,i.detail,i.path)){if(r&&!o)a.push(r),o=!0;a.push(i)}}return a}function ze(e){if(e===null)return"";if(e===0)return"not used yet";return`used by ${e} ${e===1?"page":"pages"}`}function Yk(e,t,a,r,o=null){return e.filter((i)=>i.endsWith(".json")).toSorted((i,l)=>i.localeCompare(l)).flatMap((i)=>{let l=Td(oe(i));if(!Gg(r,l,i))return[];return[{detail:i===o?"default layout":ze(t(i)),key:i,label:l,path:i,selected:zy(i===a)}]})}var Be='img:not([src]), img[src=""] { visibility: hidden; }',he=new WeakMap;function We(e){let t=he.get(e);if(t)return t;let a=e.defaultView?.CSSStyleSheet;if(!te(a))return null;let r=new a;return r.replaceSync(Be),he.set(e,r),r}function Wy(e,t){let a=e.shadowRoot??e.attachShadow({mode:"open"}),r=We(e.ownerDocument);a.adoptedStyleSheets=[...JD(),...e.ownerDocument.adoptedStyleSheets,...r?[r]:[]],a.replaceChildren(t)}function Vy(e){return e.shadowRoot?.firstElementChild??null}function B(e,t){if(e===void 0||e.trim()==="")return[];if(!t)return[e];return e.split(",").map((a)=>a.trim()).filter((a)=>a!=="")}var He=12;function be(e,t,a){let r=e.find((o)=>t.has(o.name));if(r)return{...r,order:t.get(r.name)};for(let o of e){if(o.measure)continue;let i=a.flatMap((c)=>B(c?.fields?.[o.name],o.list)),l=new Set(i).size;if(l>=2&&l<i.length&&l<=He)return{...o,order:[]}}return null}function j(e){return(t)=>e.get(t.path)}var we=j(new Map),de={board:{itemWidth:0,rowHeight:0,windowed:!1},calendar:{itemWidth:0,rowHeight:0,windowed:!1},cards:{itemWidth:200,rowHeight:194,windowed:!0},table:{itemWidth:0,rowHeight:32,windowed:!0}},Ge=60,se=25;function ve(e,t){let a=de[e];if(a.itemWidth<=0||t<=0)return 1;return Math.max(1,Math.floor(t/a.itemWidth))}function qe(e){if(e===void 0||!Number.isFinite(e))return"";if(e<1024)return`${e} B`;let t=["KB","MB","GB"],a=e/1024,r=0;while(a>=1024&&r<t.length-1)a/=1024,r+=1;return`${a<10?a.toFixed(1):Math.round(a)} ${t[r]}`}function Ye(e){return e?vp(new Date(e)):""}function Ue(e,t,a){switch(t){case"date":return a?.date??"";case"status":return a?.status??"";case"template":return a?.template??"";case"title":return a?.title??e.name;case"locale":return e.locale?Vt(e.locale):"";case"modified":return Ye(e.modified);case"name":return e.name;case"path":return e.record?.source??e.path;case"size":return qe(e.size);case"type":return e.type;case"url":return e.collection===ci?_r(e.path).urlPattern:"";default:{let r=_D(t);return r===null?"":a?.fields?.[r]??""}}}function xe(e,t,a,r){let o=Dp(e.ext),i=r?.thumb??"";return{art:o||i!==""?"image":a&&e.collection!==null&&!e.record?"doc":"glyph",cells:t.map((l)=>({field:l.field,text:Ue(e,l.field,r)})),meta:e.type,name:r?.title??e.name,path:e.path,src:o?rr(e.path):i}}function ce(e,t){return{art:"glyph",cells:[],meta:e.type,name:t?.title??e.name,path:e.path,src:""}}function $e(e,t=we){let{days:a,undated:r}=wD(e,(c)=>t(c)?.date||TE(c)),o=a.slice(0,Ge),i=a.length-o.length,l=o.map((c)=>({count:"",files:c.files.map((d)=>ce(d,t(d))),id:c.date,note:"",noteState:"hidden",title:c.date,undated:"false"}));if(r.length>0)l.push({count:"",files:r.slice(0,se).map((c)=>ce(c,t(c))),id:"__undated",note:`${r.length} file${r.length===1?"":"s"} with no dated name and no modification time.`,noteState:"shown",title:"No date",undated:"true"});return{groups:l,truncated:i>0?`${i} older ${i===1?"day is":"days are"} not shown — filter, or switch to Table.`:""}}var ye=["Draft","Published"];function Je(e,t){let a=new Map;for(let o of e){let i=t(o)?.status||"No status",l=a.get(i);if(l)l.push(o);else a.set(i,[o])}let r=(o)=>{let i=ye.indexOf(o);return i===-1?ye.length:i};return[...a.entries()].map(([o,i])=>({files:i,group:o})).toSorted((o,i)=>r(o.group)-r(i.group)||o.group.localeCompare(i.group))}function Ke(e,t,a){let r=`No ${a.title.toLowerCase()}`,o=new Map;for(let l of e){let c=B(t(l)?.fields?.[a.name],a.list);for(let d of c.length===0?[r]:new Set(c)){let s=o.get(d);if(s)s.push(l);else o.set(d,[l])}}let i=(l)=>{if(l===r)return Number.MAX_SAFE_INTEGER;let c=a.order.indexOf(l);return c===-1?a.order.length:c};return[...o.entries()].map(([l,c])=>({files:c,group:l})).toSorted((l,c)=>i(l.group)-i(c.group)||l.group.localeCompare(c.group))}function Se(e,t=we,a=null){return(e.some((i)=>(t(i)?.status??"")!=="")?Je(e,t):a?Ke(e,t,a):xD(e)).map((i)=>{let l=i.files.length-se;return{count:String(i.files.length),files:i.files.slice(0,se).map((c)=>ce(c,t(c))),id:i.group,note:l>0?`${l} more — switch to Table to see them.`:"",noteState:l>0?"shown":"hidden",title:i.group,undated:"false"}})}var Le={$schema:"https://jxsuite.com/schema/v1",$id:"StudioLibraryPane",$description:"The Content home (studio.md §22.5): one collection, browsed, as a Jx document over the kit. The adapter (`browse/library-pane.ts`) keeps every decision — which collection is shown, which of its files the filter kept, which of them the window renders, where the collection is published, and what a row's context menu offers — and hands this document one projection: a discriminant naming which of eight things to draw, the view switch already marked, a header line that is one of four states, and rows that are already strings. Nothing here asks what a file is, how big the viewport is, or whether the scan finished. The eight cases of `view` are the four honest empty states the Manage view collapsed into “No files found” — a scan still running, a scan that could not finish, a collection with nothing in it, and a filter that matched nothing — followed by the four views, so “what is on screen” has exactly one source. A card's live preview is an ISLAND: the document renders `doc-preview` and nothing inside it, and the adapter fills it through `onNodeCreated` when the card comes into view.",tagName:"div",attributes:{part:"library","data-jx-region":"${state.region}"},style:{$description:"What the fifty-two `.library*` rules in `styles/overlays.css` said, keyed on `part` and re-pointed at the studio token layer. Every one of them was this surface's alone, so the block goes with the conversion rather than being copied. Three sets of names could not come with the declarations. Ten `var(--spectrum-font-size-50 | -75, …)` reads are the kit's `--jx-text-sm` and `--jx-text-md`, which are the same 11px and 12px: a `--spectrum-*` name is declared by `<sp-theme>` and by nothing else in this package, and `styles/spectrum.css` is deleted whole with the last Spectrum component, so a document that reads one is a document whose colours change when a component it does not use is removed. `--spectrum-gray-100` and `--spectrum-gray-200` are the studio's own `--bg-input` and `--hover-bg`; `--spectrum-blue-600` — the card's hover border and the drop outline — is `--accent`, which is what a Spectrum blue was standing in for; and `--spectrum-orange-100`, the incomplete-scan banner's ground, is mixed from `--warning` so the banner follows the chrome theme instead of being a dark-only hex. Nine names that were handles rather than styling stop being names at all: `.library-grid-cards`, `.library-grid-media`, `.library-day-undated`, `.library-drop-active`, `.library-upload-input` and the four `data-field` widths are `data-` attributes on a part here, because a part is the handle now.",display:"flex",flexDirection:"column",width:"100%",height:"100%",overflow:"hidden",fontFamily:"var(--jx-font-sans)",fontSize:"var(--jx-text-md)",color:"var(--fg)",'& [part="banner-slot"], & [part="locale-slot"], & [part="filter-slot"], & [part="fields-slot"], & [part="new-slot"], & [part="page-slot"], & [part="view-slot"], & [part="art-slot"], & [part="note-slot"], & [part="truncated-slot"]':{$description:"A `$switch` renders its own container, and none of these six is a box: each stands exactly where its case does, so the case's own rule is the only one that lays anything out.",display:"contents"},'& [part="head"]':{$description:"The collection's title over its toolbar: the Content-Collection and Content-Pages boards' heading row. It does not scroll with the list.",display:"flex",flexDirection:"column",gap:"var(--jx-space-3)",padding:"var(--jx-space-4) var(--jx-space-5) var(--jx-space-3)",background:"var(--bg-panel)",borderBottom:"1px solid var(--border)",flexShrink:"0"},'& [part="heading"]':{display:"flex",flexDirection:"column",gap:"var(--jx-space-1)"},'& [part="title"]':{margin:"0",fontSize:"var(--jx-text-lg)",fontWeight:"600",color:"var(--fg)"},'& [part="subtitle"]':{margin:"0",fontSize:"var(--jx-text-md)",color:"var(--fg-dim)"},'& [part="subtitle"]:empty':{$description:"Only Pages carries a line under its title; a collection's own line is the header bar below the toolbar.",display:"none"},'& [part="toolbar"]':{$description:"It wraps rather than scrolls: the view switch, the search, the language facet, Fields and New are all equally reachable, and a toolbar that hid half of them behind an overflow would put the collection's own state somewhere the reader has to go looking for it.",display:"flex",alignItems:"center",gap:"var(--jx-space-3)",padding:"0",flexShrink:"0",flexWrap:"wrap"},'& [part="search"]':{width:"220px"},'& [part="locale"]':{$description:"Narrow on purpose: it holds one language name, and the toolbar wraps before it grows.",width:"160px"},'& [part="filter"]':{$description:"Narrow like the language facet: it holds one value of one field.",width:"160px"},'& [part="spacer"]':{flex:"1"},'& [part="layouts"]':{flexShrink:"0"},'& [part="banner"]':{$description:"The banner an INCOMPLETE listing carries. The Problem in the dock is the durable record; this is the same fact on the surface it is about, because a reader looking at a short list needs to know it is short for a reason without going anywhere to find out.",display:"flex",alignItems:"center",justifyContent:"space-between",gap:"var(--jx-space-4)",padding:"var(--jx-space-3) var(--jx-space-5)",background:"color-mix(in srgb, var(--warning) 18%, var(--bg-panel))",borderBottom:"1px solid var(--border)",color:"var(--fg)",fontSize:"var(--jx-text-md)"},'& [part="body"]':{flex:"1",minHeight:"0",overflow:"auto",position:"relative"},'& [part="empty"]':{padding:"48px var(--jx-space-6)",textAlign:"center",color:"var(--fg-dim)",display:"flex",flexDirection:"column",alignItems:"center",gap:"var(--jx-space-3)"},'& [part="empty"] p':{margin:"0"},'& [part="empty-detail"]':{fontSize:"var(--jx-text-md)",color:"var(--fg-dim)"},'& [part="truncated"]':{$description:"What a capped layout did not draw, stated. A grouped list cannot window — a window over one either breaks the groups or needs variable-height measurement — so Calendar and Board cap instead, and a layout that truncated in silence would be the same class of lie as “No files found”.",margin:"var(--jx-space-3) 0 0",fontSize:"var(--jx-text-sm)",color:"var(--fg-dim)"},'& [part="grid"]':{$description:"Cards and Media, the two windowed grids. The item sizes here are the ones `library-layouts.ts`'s LAYOUT_METRICS counts rows in; change one and change both.",display:"grid",gap:"var(--jx-space-4)",padding:"var(--jx-space-4) var(--jx-space-5)",alignItems:"start"},'& [part="grid"][data-layout="cards"]':{gridTemplateColumns:"repeat(auto-fill, minmax(188px, 1fr))"},'& [part="card"], & [part="tile"]':{cursor:"pointer",overflow:"hidden",border:"1px solid var(--border)",borderRadius:"var(--radius)",background:"var(--bg-panel)"},'& [part="card"]:hover, & [part="tile"]:hover':{borderColor:"var(--accent)"},'& [part="card-art"], & [part="tile-art"]':{aspectRatio:"4 / 3",display:"flex",alignItems:"center",justifyContent:"center",overflow:"hidden",background:"var(--bg-input)",pointerEvents:"none"},'& [part="file-glyph"]':{"--jx-icon-size":"32px",color:"var(--fg-dim)"},'& [part="doc-preview"]':{$description:"The island. The document renders this box and nothing inside it; the adapter mounts a real runtime render of the file into a shadow root of the island's own when the card comes into view (`mountPreview` in `browse/library-preview.ts`, which keeps the document's ids out of Studio's), and the zoom is what makes a page-sized document readable as a thumbnail without rendering it at thumbnail size: the render is laid out in a box two and a half times as wide and drawn at 0.4. It is `inert`, so a page's own links and buttons are neither focusable nor named inside the card.",width:"100%",height:"100%",zoom:"0.4",overflow:"hidden"},'& [part="thumb"]':{maxWidth:"100%",maxHeight:"100%",objectFit:"contain"},'& [part="card-label"], & [part="tile-label"]':{padding:"6px var(--jx-space-3) 0",fontSize:"var(--jx-text-md)",color:"var(--fg)",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},'& [part="card-meta"]':{padding:"0 var(--jx-space-3) 6px",fontSize:"var(--jx-text-sm)",color:"var(--fg-dim)"},'& [part="table"]':{$description:"A windowed list rather than a table component: the rows have to be sliceable, and every table widget wants the whole set.",display:"flex",flexDirection:"column",minWidth:"min-content",padding:"0 var(--jx-space-5) var(--jx-space-5)"},'& [part="table-head"], & [part="table-row"]':{display:"flex",alignItems:"center",gap:"var(--jx-space-3)",height:"32px",borderBottom:"1px solid var(--border)"},'& [part="table-head"]':{position:"sticky",top:"0",zIndex:"1",background:"var(--bg-panel)",fontWeight:"600",fontSize:"var(--jx-text-md)"},'& [part="table-row"]':{cursor:"pointer"},'& [part="table-row"]:hover':{background:"var(--hover-bg)"},'& [part="cell"]':{$description:"Every column keeps a floor: with a collection's six field columns beside the file facts, a cell that may shrink to nothing is a column of ellipses. When the floors outgrow the pane, the table scrolls sideways instead. Each cell's text is kept out of its intrinsic width (`contain: inline-size`), so the table's `min-content` is the sum of those floors rather than of every full title.",flex:"1",minWidth:"80px",contain:"inline-size",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontSize:"var(--jx-text-md)"},'& [part="cell"][data-field="name"], & [part="cell"][data-field="title"]':{$description:"What a row is called keeps a readable width however many field columns stand beside it.",flex:"3",minWidth:"220px",fontWeight:"500"},'& [part="cell"][data-field="path"]':{flex:"2",color:"var(--fg-dim)",fontFamily:"var(--font-mono)",fontSize:"var(--jx-text-sm)"},'& [part="cell"][data-field="size"], & [part="cell"][data-field="modified"]':{flex:"0 0 96px"},'& [part="cell"][data-field="locale"]':{$description:"Fixed, like size and modified: a language name is short and never earns width from Name. Without this it inherits the `flex: 1` above and the Name column loses a quarter of itself in every multilingual project.",flex:"0 0 90px",color:"var(--fg-dim)"},'& [part="calendar"]':{padding:"var(--jx-space-4) var(--jx-space-5)"},'& [part="day"]':{marginBottom:"var(--jx-space-5)"},'& [part="day-date"]':{margin:"0 0 var(--jx-space-2)",fontSize:"var(--jx-text-md)",fontWeight:"600",color:"var(--fg)"},'& [part="day"][data-undated="true"] [part="day-date"]':{$description:"A file with no dated name and no modification time is set apart rather than parked on today. A calendar that invents dates is worse than one that says which files it could not place.",color:"var(--fg-dim)"},'& [part="note"]':{margin:"0 0 var(--jx-space-2)",fontSize:"var(--jx-text-sm)",color:"var(--fg-dim)"},'& [part="board"]':{display:"flex",gap:"var(--jx-space-4)",padding:"var(--jx-space-4) var(--jx-space-5)",alignItems:"flex-start",overflowX:"auto"},'& [part="column"]':{flex:"0 0 220px",border:"1px solid var(--border)",borderRadius:"var(--radius)",padding:"var(--jx-space-3)",background:"var(--bg-panel)"},'& [part="column-title"]':{margin:"0 0 6px",fontSize:"var(--jx-text-md)",fontWeight:"600",display:"flex",justifyContent:"space-between"},'& [part="count"]':{color:"var(--fg-dim)",fontWeight:"400"},'& [part="list"]':{listStyle:"none",margin:"0",padding:"0"},'& [part="list-item"]':{padding:"3px var(--jx-space-2)",borderRadius:"var(--radius)",cursor:"pointer",fontSize:"var(--jx-text-md)",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},'& [part="list-item"]:hover':{background:"var(--hover-bg)"},'& [part="page-line"]':{$description:"One line saying where the collection's entries are published, the Content-Collection board's bar under the toolbar. Its action is quiet: it opens another workspace, and it must not compete with New.",display:"flex",alignItems:"center",flexWrap:"wrap",gap:"var(--jx-space-2)",padding:"var(--jx-space-2) var(--jx-space-5)",background:"var(--bg-panel)",borderBottom:"1px solid var(--border)",fontSize:"var(--jx-text-md)",color:"var(--fg-dim)",flexShrink:"0"},'& [part="page-pattern"]':{fontFamily:"var(--font-mono)",fontSize:"var(--jx-text-sm)",color:"var(--fg)"},'& [part="design-page"], & [part="add-page"]':{marginLeft:"auto"},'& [part="card"]:focus-visible, & [part="table-row"]:focus-visible, & [part="list-item"]:focus-visible':{$description:"Rows and cards open on Enter or Space as well as a click, so the keyboard reaches an entry; the ring says which one it is on.",outline:"var(--jx-focus-ring)",outlineOffset:"-2px"}},children:[{tagName:"div",attributes:{part:"head"},children:[{tagName:"div",attributes:{part:"heading"},children:[{tagName:"h2",attributes:{part:"title"},textContent:"${state.title}"},{tagName:"p",attributes:{part:"subtitle"},textContent:"${state.subtitle}"}]},{tagName:"div",attributes:{part:"toolbar"},children:[{tagName:"jx-action-group",attributes:{part:"layouts"},$props:{selects:"single",compact:!0,label:"View"},children:[{$prototype:"Array",items:{$ref:"#/state/layouts"},key:{$ref:"$map/item/key"},map:{tagName:"jx-action-button",attributes:{part:"layout","data-layout":"${$map.item.key}"},$props:{size:"sm",hint:"${$map.item.label}",checked:{$ref:"$map/item/checked"}},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/setLayout"},value:[{$ref:"$map/item/key"}]}]},children:[{tagName:"span",textContent:"${$map.item.label}"}]}}]},{tagName:"jx-textfield",attributes:{part:"search"},$props:{label:"${state.searchLabel}",placeholder:"${state.searchLabel}…",size:"sm",value:{$ref:"#/state/query"},type:"search"},oninput:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/search"},value:[{$ref:"event#/target/value"}]}]}},{tagName:"div",attributes:{part:"locale-slot",role:"none"},$switch:{$ref:"#/state/localeState"},cases:{shown:{tagName:"jx-select",attributes:{part:"locale"},$props:{label:"Language",size:"sm",options:{$ref:"#/state/localeOptions"},value:{$ref:"#/state/localeValue"}},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/setLocale"},value:[{$ref:"event#/target/value"}]}],description:"The facet's options come from ALL scanned files, never from the filtered ones: a picker whose choices collapse to the choice just made cannot be used to make another."}}}},{tagName:"div",attributes:{part:"filter-slot",role:"none"},$switch:{$ref:"#/state/filterState"},cases:{shown:{$description:"The Filter: one value of what groups the entries, their status or the field the Board groups by, so it offers exactly the Board's columns.",tagName:"jx-select",attributes:{part:"filter"},$props:{label:"Filter",size:"sm",options:{$ref:"#/state/filterOptions"},value:{$ref:"#/state/filterValue"}},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/setFilter"},value:[{$ref:"event#/target/value"}]}]}}}},{tagName:"span",attributes:{part:"spacer"}},{tagName:"div",attributes:{part:"grid-slot",role:"none"},$switch:{$ref:"#/state/fieldsState"},cases:{shown:{tagName:"jx-action-button",attributes:{part:"edit-grid"},$props:{size:"sm",icon:"rows",hint:"Edit every entry of this collection in a grid"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/openGrid"},value:[]}],description:"The collection's grid (`collection.editInGrid { name }`): the one visible door to it, since the palette cannot prompt for a free-text name."},children:[{tagName:"span",textContent:"Edit in grid"}]}}},{tagName:"div",attributes:{part:"fields-slot",role:"none"},$switch:{$ref:"#/state/fieldsState"},cases:{shown:{tagName:"jx-action-button",attributes:{part:"fields"},$props:{size:"sm",icon:"sliders-horizontal",hint:"Edit this collection's fields in Project Settings",haspopup:"dialog"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/openFields"},value:[]}],description:'Project Settings › Content types, on this collection (`settings.open { section: "content", entry }`).'},children:[{tagName:"span",textContent:"Fields"}]}}},{tagName:"div",attributes:{part:"new-slot",role:"none"},$switch:{$ref:"#/state/newState"},cases:{shown:{tagName:"jx-button",attributes:{part:"new"},$props:{size:"sm",variant:"accent"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/openNew"},value:[]}],description:"Creation is somebody else's flow: `file.new` opens Add new on this collection's kind, a page for Pages and an entry for a collection."},children:[{tagName:"span",textContent:"${state.newLabel}"}]}}}]}]},{$description:"The header line: where this collection's entries are published, derived from the page whose `$paths.contentType` names it. Pages draw nothing here.",tagName:"div",attributes:{part:"page-slot",role:"none"},$switch:{$ref:"#/state/page/state"},cases:{loading:{tagName:"div",attributes:{part:"page-line"},children:[{tagName:"span",attributes:{part:"page-text"},textContent:"${state.page.text}"}]},page:{tagName:"div",attributes:{part:"page-line","data-state":"page"},children:[{tagName:"span",attributes:{part:"page-text"},textContent:"${state.page.text}"},{tagName:"code",attributes:{part:"page-pattern"},textContent:"${state.page.pattern}"},{tagName:"span",attributes:{part:"page-template"},textContent:"${state.page.template}"},{tagName:"jx-action-button",attributes:{part:"design-page"},$props:{size:"sm",quiet:!0},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/designPage"},value:[]}],description:"Opening the page is activating it, which enters Design (studio.md §22.1)."},children:[{tagName:"span",textContent:"${state.page.designLabel}"}]}]},none:{tagName:"div",attributes:{part:"page-line","data-state":"none"},children:[{tagName:"span",attributes:{part:"page-text"},textContent:"${state.page.text}"},{tagName:"jx-action-button",attributes:{part:"add-page"},$props:{size:"sm",quiet:!0},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/addPage"},value:[]}],description:"Writes the collection's page exactly as Add new's own-page option does."},children:[{tagName:"span",textContent:"Add one"}]}]}}},{tagName:"div",attributes:{part:"banner-slot",role:"none"},$switch:{$ref:"#/state/bannerState"},cases:{shown:{tagName:"div",attributes:{part:"banner",role:"status"},children:[{tagName:"span",textContent:"${state.bannerText}"},{tagName:"jx-button",attributes:{part:"retry"},$props:{size:"sm",variant:"secondary"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/retry"}}]},children:[{tagName:"span",textContent:"Retry"}]}]}}},{tagName:"div",attributes:{part:"body"},onscroll:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/scrolled"}}],description:"The rendered item count is proportional to the VIEWPORT, not to the project: a scroll recomputes the window from the box the adapter measures here, and never re-reads the scan."},children:[{tagName:"div",attributes:{part:"view-slot",role:"none"},$switch:{$ref:"#/state/view"},cases:{loading:{tagName:"div",attributes:{part:"empty"},children:[{tagName:"p",textContent:"Scanning the project…"}]},incomplete:{tagName:"div",attributes:{part:"empty"},children:[{tagName:"p",textContent:"Nothing to show, and the scan did not finish."},{tagName:"p",attributes:{part:"empty-detail"},textContent:"${state.emptyDetail}"},{tagName:"jx-button",attributes:{part:"retry"},$props:{size:"sm",variant:"primary"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/retry"}}]},children:[{tagName:"span",textContent:"Retry"}]}]},empty:{tagName:"div",attributes:{part:"empty"},children:[{tagName:"p",textContent:"${state.emptyMessage}"},{tagName:"p",attributes:{part:"empty-detail"},textContent:"${state.emptyDetail}"}]},nomatch:{tagName:"div",attributes:{part:"empty"},children:[{tagName:"p",children:[{tagName:"span",textContent:"${state.emptyMessage}"},{tagName:"span",attributes:{part:"empty-detail"},textContent:" ${state.emptyDetail}"}]},{tagName:"jx-button",attributes:{part:"reset"},$props:{size:"sm",variant:"secondary"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/reset"}}],description:"Both facets in one clause and one button, so a reader who filtered twice is told about both rather than sent to clear one and find the list still empty."},children:[{tagName:"span",textContent:"Clear filters"}]}]},cards:{tagName:"div",attributes:{part:"grid","data-layout":"cards",style:"${state.pad}"},children:[{$prototype:"Array",items:{$ref:"#/state/rows"},key:{$ref:"$map/item/path"},map:{tagName:"div",attributes:{part:"card","data-path":"${$map.item.path}",tabindex:"0",role:"button"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/openFile"},value:[{$ref:"$map/item/path"}]}]},onkeydown:{$prototype:"Function",body:[{$switch:{$ref:"event#/key"},cases:{Enter:[{preventDefault:!0},{operator:"call",target:{$ref:"#/state/openFile"},value:[{$ref:"$map/item/path"}]}]," ":[{preventDefault:!0},{operator:"call",target:{$ref:"#/state/openFile"},value:[{$ref:"$map/item/path"}]}]}}]},oncontextmenu:{$prototype:"Function",body:[{preventDefault:!0},{stopPropagation:!0},{operator:"call",target:{$ref:"#/state/contextMenu"},value:[{$ref:"$map/item/path"},{$ref:"event#/clientX"},{$ref:"event#/clientY"}]}]},children:[{tagName:"div",attributes:{part:"card-art"},children:[{tagName:"div",attributes:{part:"art-slot",role:"none"},$switch:{$ref:"$map/item/art"},cases:{image:{tagName:"img",attributes:{part:"thumb",loading:"lazy",src:"${$map.item.src}",alt:""}},doc:{tagName:"div",attributes:{part:"doc-preview","data-path":"${$map.item.path}",inert:""}},glyph:{tagName:"jx-icon",attributes:{part:"file-glyph"},$props:{name:"file-text"}}}}]},{tagName:"div",attributes:{part:"card-label",title:"${$map.item.path}"},textContent:"${$map.item.name}"},{tagName:"div",attributes:{part:"card-meta"},textContent:"${$map.item.meta}"}]}}]},table:{tagName:"div",attributes:{part:"table",role:"table","aria-label":"${state.title}"},children:[{tagName:"div",attributes:{part:"table-head",role:"row"},children:[{$prototype:"Array",items:{$ref:"#/state/columns"},key:{$ref:"$map/item/field"},map:{tagName:"div",attributes:{part:"cell",role:"columnheader","data-field":"${$map.item.field}"},textContent:"${$map.item.title}"}}]},{tagName:"div",attributes:{part:"pad",style:"${state.padTop}"}},{$prototype:"Array",items:{$ref:"#/state/rows"},key:{$ref:"$map/item/path"},map:{tagName:"div",attributes:{part:"table-row",role:"row","data-path":"${$map.item.path}",tabindex:"0"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/openFile"},value:[{$ref:"$map/item/path"}]}]},onkeydown:{$prototype:"Function",body:[{$switch:{$ref:"event#/key"},cases:{Enter:[{preventDefault:!0},{operator:"call",target:{$ref:"#/state/openFile"},value:[{$ref:"$map/item/path"}]}]," ":[{preventDefault:!0},{operator:"call",target:{$ref:"#/state/openFile"},value:[{$ref:"$map/item/path"}]}]}}]},oncontextmenu:{$prototype:"Function",body:[{preventDefault:!0},{stopPropagation:!0},{operator:"call",target:{$ref:"#/state/contextMenu"},value:[{$ref:"$map/item/path"},{$ref:"event#/clientX"},{$ref:"event#/clientY"}]}]},children:[{$prototype:"Array",items:{$ref:"$map/item/cells"},key:{$ref:"$map/item/field"},map:{tagName:"div",attributes:{part:"cell",role:"cell","data-field":"${$map.item.field}"},textContent:"${$map.item.text}"}}]}},{tagName:"div",attributes:{part:"pad",style:"${state.padBottom}"}}]},calendar:{tagName:"div",attributes:{part:"calendar"},children:[{$prototype:"Array",items:{$ref:"#/state/groups"},key:{$ref:"$map/item/id"},map:{tagName:"section",attributes:{part:"day","data-undated":"${$map.item.undated}"},children:[{tagName:"h3",attributes:{part:"day-date"},textContent:"${$map.item.title}"},{tagName:"div",attributes:{part:"note-slot",role:"none"},$switch:{$ref:"$map/item/noteState"},cases:{shown:{tagName:"p",attributes:{part:"note"},textContent:"${$map.item.note}"}}},{tagName:"ul",attributes:{part:"list"},children:[{$prototype:"Array",items:{$ref:"$map/item/files"},key:{$ref:"$map/item/path"},map:{tagName:"li",attributes:{part:"list-item","data-path":"${$map.item.path}",title:"${$map.item.path}",tabindex:"0"},textContent:"${$map.item.name}",onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/openFile"},value:[{$ref:"$map/item/path"}]}]},onkeydown:{$prototype:"Function",body:[{$switch:{$ref:"event#/key"},cases:{Enter:[{preventDefault:!0},{operator:"call",target:{$ref:"#/state/openFile"},value:[{$ref:"$map/item/path"}]}]," ":[{preventDefault:!0},{operator:"call",target:{$ref:"#/state/openFile"},value:[{$ref:"$map/item/path"}]}]}}]},oncontextmenu:{$prototype:"Function",body:[{preventDefault:!0},{stopPropagation:!0},{operator:"call",target:{$ref:"#/state/contextMenu"},value:[{$ref:"$map/item/path"},{$ref:"event#/clientX"},{$ref:"event#/clientY"}]}]}}}]}]}},{tagName:"div",attributes:{part:"truncated-slot",role:"none"},$switch:{$ref:"#/state/truncatedState"},cases:{shown:{tagName:"p",attributes:{part:"truncated"},textContent:"${state.truncated}"}}}]},board:{tagName:"div",attributes:{part:"board"},children:[{$prototype:"Array",items:{$ref:"#/state/groups"},key:{$ref:"$map/item/id"},map:{tagName:"section",attributes:{part:"column"},children:[{tagName:"h3",attributes:{part:"column-title"},children:[{tagName:"span",textContent:"${$map.item.title}"},{tagName:"span",attributes:{part:"count"},textContent:"${$map.item.count}"}]},{tagName:"ul",attributes:{part:"list"},children:[{$prototype:"Array",items:{$ref:"$map/item/files"},key:{$ref:"$map/item/path"},map:{tagName:"li",attributes:{part:"list-item","data-path":"${$map.item.path}",title:"${$map.item.path}",tabindex:"0"},textContent:"${$map.item.name}",onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/openFile"},value:[{$ref:"$map/item/path"}]}]},onkeydown:{$prototype:"Function",body:[{$switch:{$ref:"event#/key"},cases:{Enter:[{preventDefault:!0},{operator:"call",target:{$ref:"#/state/openFile"},value:[{$ref:"$map/item/path"}]}]," ":[{preventDefault:!0},{operator:"call",target:{$ref:"#/state/openFile"},value:[{$ref:"$map/item/path"}]}]}}]},oncontextmenu:{$prototype:"Function",body:[{preventDefault:!0},{stopPropagation:!0},{operator:"call",target:{$ref:"#/state/contextMenu"},value:[{$ref:"$map/item/path"},{$ref:"event#/clientX"},{$ref:"event#/clientY"}]}]}}}]},{tagName:"div",attributes:{part:"note-slot",role:"none"},$switch:{$ref:"$map/item/noteState"},cases:{shown:{tagName:"p",attributes:{part:"truncated"},textContent:"${$map.item.note}"}}}]}}]}}}]}]};T("library-pane",Le);function Fe(e,t){e.region=t.region,e.view=t.view,e.title=t.title,e.subtitle=t.subtitle,e.searchLabel=t.searchLabel,e.newLabel=t.newLabel,e.newState=t.newState,e.fieldsState=t.fieldsState,e.page=t.page,e.layouts=t.layouts,e.filterState=t.filterState,e.filterOptions=t.filterOptions,e.filterValue=t.filterValue,e.localeState=t.localeState,e.localeOptions=t.localeOptions,e.localeValue=t.localeValue,e.query=t.query,e.bannerState=t.bannerState,e.bannerText=t.bannerText,e.emptyMessage=t.emptyMessage,e.emptyDetail=t.emptyDetail,e.pad=t.pad,e.padTop=t.padTop,e.padBottom=t.padBottom,e.rows=t.rows,e.columns=t.columns,e.groups=t.groups,e.truncated=t.truncated,e.truncatedState=t.truncatedState}function Qe(e){let t=n(e)?void 0:e.attributes?.part;return n(t)?t:""}function Ze(e){let t=e?.$map,a=v(t)?t.item:void 0,r=v(a)?a.path:void 0;return n(r)?r:""}function Ce(e,t,a){e.replaceChildren();let r=new AbortController;wN(e,r.signal);let o=g({addPage:a.addPage,bannerState:"hidden",bannerText:"",columns:[],contextMenu:a.contextMenu,designPage:a.designPage,emptyDetail:"",emptyMessage:"",fieldsState:"hidden",groups:[],layouts:[],filterOptions:[],filterState:"hidden",filterValue:"",localeOptions:[],localeState:"hidden",localeValue:"",newLabel:"",newState:"hidden",openFields:a.openFields,openGrid:a.openGrid,openFile:a.openFile,openNew:a.openNew,pad:"",padBottom:"",padTop:"",previewSlot:a.previewSlot,query:"",region:"",reset:a.reset,retry:a.retry,page:{designLabel:"",pattern:"",state:"hidden",template:"",text:""},rows:[],scrolled:a.scrolled,scroller:a.scroller,search:a.search,searchLabel:"",setLayout:a.setLayout,setFilter:a.setFilter,setLocale:a.setLocale,subtitle:"",title:"",truncated:"",truncatedState:"hidden",view:"loading"});Fe(o,t);let i=null,l=!1,c=R("library-pane",o,e,{onNodeCreated:(d,s,u,m)=>{let f=Qe(u);if(f===""||!(d instanceof HTMLElement))return;if(f==="body"){a.scroller(d);return}if(f==="doc-preview"){let L=Ze(m);if(L)a.previewSlot(d,L)}}}).then((d)=>{let s=d.root;if(l)return d.dispose(),s;return i=d,s});return{attached:()=>{if(l)return!1;let d=i?.root;return d===void 0?!0:d instanceof HTMLElement&&e.contains(d)},dispose(){l=!0,r.abort(),i?.dispose(),i=null},ready:c,update:(d)=>Fe(o,d)}}var et="table",y=g({collection:ci,loading:!1,revision:0,views:{}});function Qa(e=Au()){let t=y.views[e];if(t)return t;let a={filter:"",layout:et,locale:"",query:""};return y.views[e]=a,y.views[e]??a}function M(){return Vl(y.collection)??{fileBacked:!1,item:"page",key:ci,kind:"pages",title:"Pages"}}function Au(){return M().key}var E=null,O=!1;function P(){if(E?.stale()===!0){E=null,O=!1;for(let e of A.values())e.cache.clear()}return E??=CD(),E}function w(){y.revision+=1}function XR(e){y.collection=e,Qa(e),w(),xn("leftPanel")}function Zk(e,t=Au()){Qa(t).layout=e,w()}function I_(e,t=Au()){Qa(t).query=e,w()}function tt(e,t=Au()){Qa(t).filter=e,w()}function R_(e,t=Au()){Qa(t).locale=e,w()}function Ld(){E=null,O=!1;for(let e of A.values())e.cache.clear();w()}function Xk(){let e=P();if(!O&&!y.loading)V();if(!e.scanned())return null;let t=new Map;for(let a of e.files())if(a.collection!==null)t.set(a.collection,(t.get(a.collection)??0)+1);return t}var at=600,ke="content.scan",F="Content";async function V(){let e=P();O=!0,y.loading=!0,w();let t={handle:null},a=setTimeout(()=>{t.handle=Us({source:F,status:"Reading the project's directories…",title:"Scan project files"})},at);try{await e.rows();let r=e.failures();if(r.length>0){let o=r.map((l)=>`${l.dir} — ${l.error}`).join(`
3
- `),i=`Could not read ${r.length} project ${r.length===1?"directory":"directories"} — this list is incomplete.`;C.error(i,{action:"content.refresh",detail:o,key:ke,path:r[0].dir,source:F,tier:"problem"}),t.handle?.setStatus(i)}t.handle?.done(`${e.files().length} file(s)`)}catch(r){if(t.handle)t.handle.fail("Could not scan the project's files.");else C.error("Could not scan the project's files.",{action:"content.refresh",detail:Q(r),key:ke,source:F,tier:"problem"})}finally{clearTimeout(a),y.loading=!1,w(),xn("leftPanel")}}async function Qk(){E=null,O=!1;for(let e of A.values())e.cache.clear();await V()}var A=new Map;function W(e){return A.get(e)??null}function eE(e,t){let a=W(e);return a!==null&&a.tabId===t.id&&a.wrap.isConnected&&a.surface.attached()}function tE(e){let t=A.get(e);if(!t)return;if(t.settleTimer!==null)clearTimeout(t.settleTimer),t.settleTimer=null;t.unlisten(),t.observer.destroy(),t.cache.clear(),t.slots.clear(),t.pendingPaths.clear(),t.scope.stop(),t.surface.dispose(),A.delete(e)}function nt(e,t,a){let r=de[t],o=e?.scroller??null;if(!r.windowed||!o)return{end:a,padBottom:0,padTop:0,start:0,totalRows:a};return eS({columns:ve(t,o.clientWidth),count:a,rowHeight:r.rowHeight,scrollTop:o.scrollTop,viewportHeight:o.clientHeight})}async function ot(e,t){e.pendingPaths.add(t);try{let a=await Cw(t,e.cache);if(!a||W(e.paneId)!==e)return;let r=e.slots.get(t);if(r?.isConnected&&!Vy(r))Wy(r,a)}finally{e.pendingPaths.delete(t)}}function Te(e,t,a){let r=e.cache.get(a);if(Vy(t))return;if(r){Wy(t,r);return}if(e.pendingPaths.has(a))return;e.pending.set(t,a),e.observer.observe(t)}function it(e,t,a){e.slots.set(a,t),Te(e,t,a)}function lt(e){if(e.settleTimer!==null)return;e.settleTimer=setTimeout(()=>{if(e.settleTimer=null,W(e.paneId)!==e)return;e.observer.releaseDetached();let t=vD.has(Qa().layout);for(let[a,r]of e.slots){if(!r.isConnected){e.slots.delete(a);continue}if(t)Te(e,r,a)}},0)}function je(e){if(e.record)mD(e.record.source,e.record.row);else if(e.collection===null||e.collection===ci)yi(e.path);else Pl(e.path)}var _=null;function st(){_?.close(),_=null}function Re(e){return P().files().find((t)=>t.path===e)??null}function ct(e,t,a){let r=Re(e);if(!r||r.record)return;st();let o=(i,l,c,d={})=>({destructive:!1,disabled:!1,dividerAbove:!1,id:i,run:c,title:l,...d});_=Xt({label:"File actions",onClosed:(i)=>{if(_===i)_=null},origin:{x:t,y:a},region:"content",rows:[o("open","Open",()=>{je(r)}),o("rename","Rename…",()=>{dt(r)},{dividerAbove:!0}),o("duplicate","Duplicate",()=>{pt(r)}),o("delete","Delete",()=>{ut(r)},{destructive:!0,dividerAbove:!0})]})}async function dt(e){let t=await yb(e.path),a={confirmLabel:"Rename",select:"stem",validate:(c)=>c.trim()?"":"Enter a file name.",value:e.name};if(t!==void 0)a.message=t;let r=await xi("Rename",a);if(!r||r===e.name)return;let o=e.path.replaceAll("\\","/"),i=o.includes("/")?o.slice(0,o.lastIndexOf("/")):".",l=i==="."?r:`${i}/${r}`;try{await p().renameFile(e.path,l),Er(),Ld(),await V(),C.success(`Renamed to ${r}`)}catch(c){C.error(`Could not rename ${e.name}.`,{detail:Q(c),path:e.path,source:F})}}async function pt(e){let t=e.path.replaceAll("\\","/"),a=t.includes("/")?t.slice(0,t.lastIndexOf("/")):".",o=`${e.name.replace(/(\.[^.]+)$/,"")}-copy${e.ext||""}`,i=a==="."?o:`${a}/${o}`;try{let l=p(),c=await l.readFile(e.path);await l.writeFile(i,c),Ld(),await V(),C.success(`Duplicated as ${o}`)}catch(l){C.error(`Could not duplicate ${e.name}.`,{detail:Q(l),path:e.path,source:F})}}async function ut(e){if(!await vb(e))return;try{await p().deleteFile(e.path),Er(),Ld(),await V(),C.success(`Deleted ${e.name}`)}catch(a){C.error(`Could not delete ${e.name}.`,{detail:Q(a),path:e.path,source:F})}}function Pe(e,t){if(e.layout===!1)return"with no template";let a=e.layout??t;return a?`using ${Cb(a)}`:"with no template"}function mt(e,t,a,r=[]){let o={designLabel:"",pattern:"",state:"hidden",template:"",text:""};if(e.kind==="pages")return o;if(t===void 0)return{...o,state:"loading",text:"Finding where these entries are published…"};if(t===null)return{...o,state:"none",text:"Entries have no page of their own"};let i=nb(),l=(d)=>{let s=d===null?-1:i.indexOf(d);return s===-1?i.length:s},c=r.filter((d)=>d.locale!==null).toSorted((d,s)=>l(d.locale)-l(s.locale));if(c.length>1){let d=new Set(c.map((s)=>Pe(s,a)));return{designLabel:`Design the ${e.item} page`,pattern:c.map((s)=>`${s.pattern} (${s.locale})`).join(", "),state:"page",template:d.size===1?[...d][0]:"using a template per language",text:`Each ${e.item} has a page in each language at`}}return{designLabel:`Design the ${e.item} page`,pattern:t.pattern,state:"page",template:Pe(t,a),text:`Each ${e.item} has a page at`}}function ft(e){let t=th(e,Qa(e).locale);if(t)yi(t.path)}async function gt(e){let{addCollectionPage:t}=await (le("psym14sn"),import("./add-new-flow-psym14sn.js"));await t(e)}function ht(e,t,a){return{checked:a?"true":"false",key:e,label:t}}function yt(e,t){let a=`${t.locale===""?"":` in ${Vt(t.locale)}`}${t.filter===""?"":` filtered to ${t.filter}`}`,r=t.query.trim();return`No ${e.kind==="pages"?"pages":e.title.toLowerCase()} match${r?` “${r}”`:""}${a}.`}function bt(e,t,a,r){if(a>0)return t;if(y.loading||!e.scanned())return"loading";if(e.failures().length>0)return"incomplete";return r===0?"empty":"nomatch"}function D_(e){return P().files().filter((t)=>t.collection===e).map((t)=>t.path)}function wt(e,t){if(e.kind==="pages")return P().scanned()?vt(t==="table"):j(new Map);if(e.fileBacked){let o=Me(e.key),i=P().files().filter((l)=>l.collection===e.key&&l.record);return j(new Map(i.map((l)=>{let{fields:c}=l.record,d=U_(o,c),s=d===null?"":tb(c[d]??""),u=CE(l.record.source,c,o);return[l.path,{date:s,fields:c,status:"",thumb:u,title:l.name}]})))}if(!P().scanned())return j(new Map);let a=nw(e.key,D_(e.key)),r=new Map((a??[]).map((o)=>[o.path,{date:o.date,fields:o.fields,status:o.status,thumb:o.thumb,title:o.title}]));return j(r)}function vt(e){let t=D_(ci),a=e?me(t):null,r=new Set(Object.keys(x?.projectConfig?.content??{})),o=Ee(),{i18n:i}=Qt(x?.projectConfig??{}),l=[...a?.values()??[]].some((d)=>d.draft),c=new Map(t.map((d)=>{let s=a?.get(d),u=s?.contentType??null,m=s===void 0?void 0:s.layout??o??!1;return[d,{date:"",status:s===void 0||!l?"":s.draft?"Draft":"Published",template:m===void 0?"":m===!1?"None":Cb(m),title:u!==null&&r.has(u)?Y(`${ie(u)} page`,d,i):U(_r(d),d,i)}]}));return j(c)}function xt(e){return e.map((t)=>({file:t,route:_r(t.path)})).toSorted((t,a)=>ES(t.route,a.route)||t.file.path.localeCompare(a.file.path)).map(({file:t})=>t)}function Me(e){return wa(e)?.schema??CN(e)}function $t(e){let t=new Set,a=pp(e),r=SE(e);for(let o of[a,r])if(o!==null)t.add(o);return t}function St(e){let t=new Map;for(let[a,r]of Object.entries(e?.properties??{}))if(Array.isArray(r.enum))t.set(a,r.enum.filter((o)=>n(o)));return t}function Lt(e,t){let a=[...new Set(e.flatMap((i)=>i?.status?[i.status]:[]))];if(a.length>0)return{matches:(i,l)=>(i?.status??"")===l,title:"Status",values:a.toSorted((i,l)=>i==="Draft"?-1:l==="Draft"?1:i.localeCompare(l))};if(!t)return null;let r=new Set(e.flatMap((i)=>B(i?.fields?.[t.name],t.list))),o=t.order.length>0?[...t.order,...[...r].filter((i)=>!t.order.includes(i)).toSorted()]:[...r].toSorted((i,l)=>i.localeCompare(l));return{matches:(i,l)=>B(i?.fields?.[t.name],t.list).includes(l),title:t.title,values:o}}function Ne(e,t){let a=P(),r=M(),o=Qa(r.key),{layout:i}=o,l=EE(a.files(),{collection:r.key,query:""}),c=wt(r,i),d=l.map((h)=>c(h)),s=r.kind==="collection"?Me(r.key):null,u=SD(s,$t(s)),m=be(u,St(s),d),f=r.kind==="collection"?Lt(d,m):null,L=f!==null&&f.values.includes(o.filter)?o.filter:"",H=EE(a.files(),{collection:r.key,locale:o.locale,query:o.query}),D=f===null||L===""?H:H.filter((h)=>f.matches(c(h),L)),N=r.kind==="pages"?xt(D):D,J=l.length,b=bt(a,i,N.length,J),I=nt(e,i,N.length),Ae=N.slice(I.start,I.end),k=a.failures(),K=yD(l),pe=LE(r.key,{date:SE(s)!==null||d.some((h)=>(h?.date??"")!==""),fields:u,locale:K.length>1,status:d.some((h)=>(h?.status??"")!=="")}),Oe=b==="cards",X=b==="calendar"?$e(N,c):{groups:[],truncated:""},G=r.kind==="pages",Z=G?"pages":r.title.toLowerCase();return{bannerState:k.length>0?"shown":"hidden",bannerText:k.length===0?"":`This list is incomplete — ${k.length} ${k.length===1?"directory":"directories"} could not be read (${k[0].dir}${k.length>1?", …":""}).`,columns:b==="table"?pe.map((h)=>({field:h.field,title:h.title})):[],emptyDetail:b==="incomplete"?`${k.length} ${k.length===1?"directory":"directories"} could not be read, so this is not the same as an empty collection.`:b==="nomatch"?`${J} ${J===1?r.item:Z} in all.`:b==="empty"?`New ${r.item} adds the first one.`:"",emptyMessage:b==="nomatch"?yt(r,o):b==="empty"?`No ${Z} yet.`:"",fieldsState:r.kind==="collection"?"shown":"hidden",groups:b==="board"?Se(N,c,m):X.groups,layouts:sm.map((h)=>ht(h,ow[h],i===h)),localeOptions:[{label:"All languages",value:"all"},...K.map((h)=>({label:Vt(h),value:h}))],filterOptions:f===null?[]:[{label:`Any ${f.title.toLowerCase()}`,value:"all"},...f.values.map((h)=>({label:h,value:h}))],filterState:f!==null&&f.values.length>1?"shown":"hidden",filterValue:L===""?"all":L,localeState:K.length<2?"hidden":"shown",localeValue:o.locale===""?"all":o.locale,newLabel:`New ${r.item}`,newState:r.fileBacked?"hidden":"shown",pad:`padding-top:calc(var(--jx-space-4) + ${I.padTop}px);padding-bottom:calc(var(--jx-space-4) + ${I.padBottom}px)`,padBottom:`height:${I.padBottom}px`,padTop:`height:${I.padTop}px`,page:mt(r,G?null:th(r.key,o.locale),Ee(),G||o.locale!==""?[]:EN(r.key)??[]),query:o.query,region:wi(t,"content"),rows:b==="cards"||b==="table"?Ae.map((h)=>xe(h,b==="table"?pe:[],Oe,c(h))):[],searchLabel:`Search ${Z}`,subtitle:G?"Every URL on your site.":"",title:r.title,truncated:X.truncated,truncatedState:X.truncated===""?"hidden":"shown",view:b}}function Ee(){return x?.projectConfig?.defaults?.layout??null}function QR(e,t){let{paneId:a,wrap:r}=e;if(eE(a,t))return;tE(a);let o=null,i=bp((s)=>{let u=o;if(!u)return;let m=u.pending.get(s);if(m!==void 0)u.pending.delete(s),ot(u,m)}),l=()=>{if(o!==null&&W(a)===o)o.surface.update(Ne(o,a)),lt(o)},c=Ce(r,Ne(null,a),{addPage:()=>{gt(M().key)},contextMenu:(s,u,m)=>ct(s,u,m),designPage:()=>{ft(M().key)},openFields:()=>{rt("settings.open",{entry:M().key,section:"content"},F)},openGrid:()=>{let s=M(),u=s.fileBacked?Fw(s.key):null;if(u){yi(u);return}rt("collection.editInGrid",{name:s.key},F)},openFile:(s)=>{je(Re(s)??{collection:Au(),path:s})},openNew:()=>{let s=M(),{locale:u}=Qa(s.key),m=s.kind==="pages"?{kind:"page"}:{collection:s.key,kind:"entry"};if(u!=="")m.locale=u;rt("file.new",m,F)},previewSlot:(s,u)=>{if(o)it(o,s,u)},reset:()=>{I_(""),R_("")},retry:()=>{Qk()},scrolled:()=>w(),scroller:(s)=>{if(o)o.scroller=s},search:(s)=>I_(s),setLayout:(s)=>Zk(s),setFilter:(s)=>tt(s==="all"?"":s),setLocale:(s)=>R_(s==="all"?"":s)}),d=ge();o={cache:_w(),observer:i,paneId:a,pending:new WeakMap,pendingPaths:new Set,scope:d,scroller:null,settleTimer:null,slots:new Map,surface:c,tabId:t.id,unlisten:(()=>{let s=kp(()=>w()),u=iw(()=>w()),m=fe(()=>w());return()=>{s(),u(),m()}})(),wrap:r},A.set(a,o),d.run(()=>{ne(()=>{if(W(a)!==o)return;y.revision,y.collection,y.loading;let s=Qa(Au());if(s.layout,s.query,s.locale,l(),!O&&!y.loading)V()})})}function eD(){y.collection=ci,y.views={},y.loading=!1,E=null,O=!1,w()}
4
- export{qg,zy,JR,Gg,Td,YR,ZR,Yk,Wy,Vy,Qa,Au,XR,Zk,I_,R_,Ld,Xk,Qk,eE,tE,D_,QR,eD};
5
-
6
- //# debugId=3FF5F7453ADEE45864756E2164756E21
7
- //# sourceMappingURL=studio-pgmvdv7z.js.map
@@ -1,5 +0,0 @@
1
- import{p,_e}from"./studio-w4rz9hdk.js";import{YO,ZO}from"./studio-8tr6cfrc.js";import{fh}from"./studio-8m0y2qe7.js";import{Qt,cv,dv,u}from"./studio-c05wdnt3.js";import{x}from"./studio-gcxk20n7.js";function ze(t){return t.getBoundingClientRect()}function lx(t,e,n=document){return n.elementFromPoint(t,e)}var Js=new Set([".jpg",".jpeg",".png",".gif",".svg",".webp",".avif",".ico"]),o$=new Set([".mp4",".webm",".mov",".m4v"]),r$=new Set([".mp3",".wav",".ogg",".m4a",".flac"]),Ys=new Set([...Js,...o$,...r$,".pdf",".woff",".woff2",".ttf",".otf"]);function on(t){let e=t.lastIndexOf(".");return e>0?t.slice(e).toLowerCase():""}function Dp(t){return Js.has(t.startsWith(".")?t.toLowerCase():`.${t.toLowerCase()}`)}function ah(){let t=_e()?p().canvasUrl:void 0;if(t)return new URL(t,location.href).origin;return location.origin}function jb(){let t=_e()?p().canvasUrl:void 0;if(!t)return null;let e=new URL(t,location.href);return e.origin===location.origin?e.searchParams.get("rpcToken"):null}function Jl(t){let e=ah(),n=_e()?p().documentBaseUrl:void 0;if(n){let r=n.endsWith("/")?n:`${n}/`;return new URL(r,`${e}/`).href}let o=t||"";return`${e}/${o?`${o}/`:""}`}function aC(t){if(t.startsWith("data:")||t.startsWith("blob:")||t.startsWith("http")||t.startsWith("views://"))return t;let e=ah();if((e.startsWith("http:")||e.startsWith("https:"))&&e!==location.origin)return`${e}/${t.replace(/^\.?\//,"")}`;return t}function s$(){return Qt(x?.projectConfig??{}).i18n?.locales??[]}function Sm(t,e){let n=e?.space??"site",o=cv(t,x?.projectConfig?.content,s$());if(n==="site"&&!o)return null;let r={documentDir:ZO(t??""),lanes:YO,mounts:o?[o]:[],space:n};if(e?.fileBaseUrl!==void 0)r.fileBaseUrl=e.fileBaseUrl;return r}function Kc(t){return Hb(t,u.value?.documentPath)}function Hb(t,e){if(!t)return t;let n=Sm(e,Hd()),o=n&&{...n,versions:fh()};return aC(dv(t,o)??t)}function Hd(){let t={fileBaseUrl:Jl(x?.projectRoot)};if(_e())t.space=p().assetSpace;return t}
2
- export{ze,lx,Js,o$,r$,Ys,on,Dp,ah,jb,Jl,aC,s$,Sm,Kc,Hb,Hd};
3
-
4
- //# debugId=2F95F555EBF5D14A64756E2164756E21
5
- //# sourceMappingURL=studio-ph84avkf.js.map