@jxsuite/studio 10.1.0 → 10.2.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 (239) hide show
  1. package/dist/chunks/{2020-mkb0qa6p.js → 2020-bx702wqa.js} +3 -3
  2. package/dist/chunks/adapter-pp011m5x.js +4 -0
  3. package/dist/chunks/add-new-flow-ecqmzz76.js +4 -0
  4. package/dist/chunks/cf-account-picker-c07znkqt.js +4 -0
  5. package/dist/chunks/cf-settings-0v2bmqy0.js +4 -0
  6. package/dist/chunks/components-yn0dn2pq.js +4 -0
  7. package/dist/chunks/content-source-g0j41yy6.js +4 -0
  8. package/dist/chunks/{convert-to-repeater-f92ey3kp.js → convert-to-repeater-sbjk7tgn.js} +3 -3
  9. package/dist/chunks/editor-xz02jeh1.js +4 -0
  10. package/dist/chunks/entry-commands-kmt02crp.js +4 -0
  11. package/dist/chunks/extension-sections-0rprf12d.js +4 -0
  12. package/dist/chunks/file-ops-mexj5qed.js +4 -0
  13. package/dist/chunks/files-b2tcppdd.js +4 -0
  14. package/dist/chunks/format-host-btsevv0c.js +4 -0
  15. package/dist/chunks/fs-events-r0apejva.js +4 -0
  16. package/dist/chunks/grid-open-n2a8xkht.js +4 -0
  17. package/dist/chunks/{grid-view-r22jsqht.js → grid-view-tghcwrrt.js} +12 -12
  18. package/dist/chunks/iframe-host-gx0ypyh3.js +4 -0
  19. package/dist/chunks/index-bs4k9tr6.js +4 -0
  20. package/dist/chunks/{index-pxwwf00y.js → index-vr006kbt.js} +3 -3
  21. package/dist/chunks/{javascript-pzqryby6.js → javascript-z1g3s9fd.js} +2 -2
  22. package/dist/chunks/{jsonMode-tcnyxyap.js → jsonMode-7szwg8c4.js} +5 -5
  23. package/dist/chunks/jx-validate-ymf10teh.js +4 -0
  24. package/dist/chunks/layers-p9nfya38.js +4 -0
  25. package/dist/chunks/layers-panel-tt1hzhhf.js +4 -0
  26. package/dist/chunks/lit-html-x18n2sfz.js +4 -0
  27. package/dist/chunks/media-library-0n45gv8r.js +4 -0
  28. package/dist/chunks/media-picker-s09at95z.js +4 -0
  29. package/dist/chunks/{monaco-binding-bqpge64f.js → monaco-binding-v42w9c1v.js} +3 -3
  30. package/dist/chunks/monaco-buffer-een2ea0v.js +4 -0
  31. package/dist/chunks/{monaco-setup-1mkab762.js → monaco-setup-7bffxd6v.js} +3 -3
  32. package/dist/chunks/notify-qwb8radt.js +4 -0
  33. package/dist/chunks/parse-v77xtwv7.js +4 -0
  34. package/dist/chunks/platform-8jnez0wr.js +4 -0
  35. package/dist/chunks/publish-panel-aysnj611.js +4 -0
  36. package/dist/chunks/{publish-quick-m9vkhahq.js → publish-quick-kpbqs9mz.js} +3 -3
  37. package/dist/chunks/publish-workspace-nd0a8q99.js +4 -0
  38. package/dist/chunks/quick-search-vg0jkhk2.js +4 -0
  39. package/dist/chunks/references-a7v6a0e2.js +4 -0
  40. package/dist/chunks/right-panel-cvk1vxx5.js +4 -0
  41. package/dist/chunks/source-control-fsqzc6he.js +4 -0
  42. package/dist/chunks/studio-05jfwbmf.js +5 -0
  43. package/dist/chunks/{studio-qyb5bebs.js → studio-0q5jwddh.js} +7 -7
  44. package/dist/chunks/{studio-cvz0e00f.js → studio-0w2dr0q8.js} +4 -4
  45. package/dist/chunks/{studio-eesyjg7h.js → studio-1tzpds97.js} +5 -5
  46. package/dist/chunks/{studio-a3s6frde.js → studio-216b27sv.js} +3 -3
  47. package/dist/chunks/studio-2ejhqns4.js +5 -0
  48. package/dist/chunks/studio-2r90cts3.js +16 -0
  49. package/dist/chunks/{studio-dy2xtt7a.js → studio-399a25za.js} +4 -4
  50. package/dist/chunks/studio-399xknkb.js +6 -0
  51. package/dist/chunks/{studio-jh6t5qz4.js → studio-43y04qck.js} +4 -4
  52. package/dist/chunks/{studio-skynbac3.js → studio-4g8yb6jn.js} +2 -2
  53. package/dist/chunks/{studio-jw0q5j6k.js → studio-4jhw38b2.js} +4 -4
  54. package/dist/chunks/{studio-4smcnv33.js → studio-4ncmwqw5.js} +4 -4
  55. package/dist/chunks/studio-5atwjgkj.js +7 -0
  56. package/dist/chunks/{studio-vcz63n42.js → studio-5frqk7c0.js} +4 -4
  57. package/dist/chunks/{studio-hsr3k06v.js → studio-646nn2ys.js} +5 -5
  58. package/dist/chunks/{studio-ch8gt8vt.js → studio-6cwj6xrx.js} +4 -4
  59. package/dist/chunks/studio-6hzdjfv0.js +5 -0
  60. package/dist/chunks/{studio-9cp96v90.js → studio-71m92v9s.js} +7 -7
  61. package/dist/chunks/{studio-brdp85q7.js → studio-75kcdbsk.js} +4 -4
  62. package/dist/chunks/{studio-6vwvshw8.js → studio-78pywnp2.js} +5 -5
  63. package/dist/chunks/{studio-ggm7zf70.js → studio-86r8hp7r.js} +5 -5
  64. package/dist/chunks/studio-886t6ztg.js +5 -0
  65. package/dist/chunks/{studio-5dmgmyw4.js → studio-8wnvtr4z.js} +4 -4
  66. package/dist/chunks/studio-8z66jk4z.js +5 -0
  67. package/dist/chunks/{studio-x2metr13.js → studio-9rbe2xpw.js} +3 -3
  68. package/dist/chunks/{studio-8qejv8yf.js → studio-awxwjawq.js} +4 -4
  69. package/dist/chunks/studio-b2qpt0xy.js +14 -0
  70. package/dist/chunks/{studio-9rcbvksg.js → studio-bvs9kpst.js} +7 -7
  71. package/dist/chunks/studio-c71806xz.js +7 -0
  72. package/dist/chunks/{studio-vjhej0w5.js → studio-cbwks69x.js} +140 -140
  73. package/dist/chunks/studio-cg1bfyhf.js +9 -0
  74. package/dist/chunks/studio-cg710sk9.js +5 -0
  75. package/dist/chunks/studio-cw0wb9qk.js +7 -0
  76. package/dist/chunks/studio-cyheys7k.js +5 -0
  77. package/dist/chunks/studio-ea5m9kg5.js +5 -0
  78. package/dist/chunks/{studio-4nkm4404.js → studio-ea74s8c1.js} +4 -4
  79. package/dist/chunks/{studio-37twdaf7.js → studio-efdxjwyp.js} +34 -34
  80. package/dist/chunks/{studio-pmzg17fj.js → studio-egmw2837.js} +4 -4
  81. package/dist/chunks/{studio-8jb31dcf.js → studio-er5f383a.js} +4 -4
  82. package/dist/chunks/studio-f746039f.js +5 -0
  83. package/dist/chunks/studio-fmdymd9v.js +5 -0
  84. package/dist/chunks/studio-gcm12z00.js +6 -0
  85. package/dist/chunks/{studio-t3j8htp7.js → studio-gj98m8gy.js} +5 -5
  86. package/dist/chunks/{studio-cgb97rwv.js → studio-hasbgjah.js} +4 -4
  87. package/dist/chunks/studio-hhp4x8xf.js +6 -0
  88. package/dist/chunks/{studio-848rk4p1.js → studio-hz5n7x27.js} +4 -4
  89. package/dist/chunks/{studio-0g2sm01j.js → studio-j3d2fjqz.js} +4 -4
  90. package/dist/chunks/studio-jeraxdgv.js +7 -0
  91. package/dist/chunks/studio-jvgek9xt.js +5 -0
  92. package/dist/chunks/studio-jws1a87n.js +5 -0
  93. package/dist/chunks/studio-k2sz13zg.js +5 -0
  94. package/dist/chunks/studio-k3m4jkdk.js +5 -0
  95. package/dist/chunks/{studio-7vb997ff.js → studio-kg1abnz0.js} +4 -4
  96. package/dist/chunks/{studio-s0fg2wav.js → studio-kg5ya5r2.js} +4 -4
  97. package/dist/chunks/studio-khwbgrtg.js +5 -0
  98. package/dist/chunks/studio-mx6wzh25.js +5 -0
  99. package/dist/chunks/studio-mxs3ar9t.js +5 -0
  100. package/dist/chunks/studio-nm4szey4.js +5 -0
  101. package/dist/chunks/studio-nqxqf8p2.js +4 -0
  102. package/dist/chunks/{studio-07k0geap.js → studio-pjtntksy.js} +4 -4
  103. package/dist/chunks/studio-qh8berdz.js +5 -0
  104. package/dist/chunks/studio-qn7z4krm.js +5 -0
  105. package/dist/chunks/studio-qyed0ah6.js +5 -0
  106. package/dist/chunks/{studio-5e7p1vgd.js → studio-r4bcdwhq.js} +4 -4
  107. package/dist/chunks/{studio-mwnmzx7g.js → studio-r7pf0rkv.js} +6 -6
  108. package/dist/chunks/studio-rtfnhrdg.js +5 -0
  109. package/dist/chunks/{studio-zacvfm31.js → studio-rzqaz21g.js} +4 -4
  110. package/dist/chunks/studio-s5tzw84t.js +5 -0
  111. package/dist/chunks/{studio-nf0pqpbj.js → studio-sevbc3xv.js} +4 -4
  112. package/dist/chunks/{studio-va0e63sk.js → studio-sxdb9h3q.js} +6 -6
  113. package/dist/chunks/studio-t51y8v1d.js +5 -0
  114. package/dist/chunks/{studio-pd9dsqpq.js → studio-t98vq4r6.js} +4 -4
  115. package/dist/chunks/studio-th7z3fg7.js +5 -0
  116. package/dist/chunks/studio-tsxpqvh0.js +6 -0
  117. package/dist/chunks/{studio-7823f0g8.js → studio-v1yascv2.js} +4 -4
  118. package/dist/chunks/{studio-tpy3rdxn.js → studio-wc6za3zs.js} +4 -4
  119. package/dist/chunks/{studio-5m0w815d.js → studio-wxq6v5sv.js} +4 -4
  120. package/dist/chunks/{studio-ahf3cspq.js → studio-y60sts62.js} +3 -3
  121. package/dist/chunks/studio-ybnwymxw.js +5 -0
  122. package/dist/chunks/studio-zndrqawb.js +5 -0
  123. package/dist/chunks/studio-zwaxn5s2.js +5 -0
  124. package/dist/chunks/{tsMode-6vwhy6ty.js → tsMode-f54j66ym.js} +5 -5
  125. package/dist/chunks/workspace-home-x1787wpv.js +4 -0
  126. package/dist/chunks/workspace-zpe1np43.js +4 -0
  127. package/dist/chunks/{ws-client-zcxkfgmf.js → ws-client-e8kj684q.js} +3 -3
  128. package/dist/manifest.json +76 -75
  129. package/dist/studio.js +81 -82
  130. package/package.json +4 -4
  131. package/src/browse/library-model.ts +56 -23
  132. package/src/commands/context.ts +1 -0
  133. package/src/editor/shortcuts.ts +3 -0
  134. package/src/panels/data-grid.ts +0 -4
  135. package/src/panels/settings-menu.ts +3 -3
  136. package/src/panels/settings-pane.ts +42 -56
  137. package/src/services/ai-import-tools.ts +6 -3
  138. package/src/services/ai-models.ts +65 -11
  139. package/src/services/ai-settings.ts +45 -5
  140. package/src/services/document-assistant.ts +5 -2
  141. package/src/services/settings/definitions.ts +19 -0
  142. package/src/settings/contributed-section.ts +16 -7
  143. package/src/settings/css-vars-editor.ts +4 -4
  144. package/src/settings/general-settings.ts +1 -4
  145. package/src/settings/preferences-accounts.ts +2 -2
  146. package/src/settings/preferences-dialog.ts +4 -2
  147. package/src/settings/project-sections.ts +1 -1
  148. package/src/settings/section-registry.ts +5 -4
  149. package/src/settings/settings-document.ts +33 -24
  150. package/src/settings/settings-workspace.ts +205 -0
  151. package/src/shell.ts +31 -6
  152. package/src/surfaces/ai-credentials-form.json +59 -5
  153. package/src/surfaces/ai-credentials-form.ts +15 -2
  154. package/src/surfaces/commandbar.ts +7 -3
  155. package/src/surfaces/settings-contributed.json +4 -4
  156. package/src/surfaces/settings-contributed.ts +2 -2
  157. package/src/surfaces/settings-pane.json +262 -180
  158. package/src/surfaces/settings-pane.ts +63 -14
  159. package/src/ui/ai-credentials-form.ts +128 -11
  160. package/src/ui/regions.ts +5 -5
  161. package/src/workspace/tab-workspace.ts +3 -2
  162. package/src/workspace/workspace-home.ts +18 -4
  163. package/src/workspace/workspace-ids.ts +40 -7
  164. package/dist/chunks/adapter-xcpsmecx.js +0 -4
  165. package/dist/chunks/add-new-flow-ptmhmzr9.js +0 -4
  166. package/dist/chunks/cf-account-picker-z1sgwpwd.js +0 -4
  167. package/dist/chunks/cf-settings-xqvhxxe9.js +0 -4
  168. package/dist/chunks/components-whsc81a7.js +0 -4
  169. package/dist/chunks/content-source-jwtxg78w.js +0 -4
  170. package/dist/chunks/editor-zdqdpq1x.js +0 -4
  171. package/dist/chunks/entry-commands-w8p2fbpt.js +0 -4
  172. package/dist/chunks/extension-sections-y2p1te2r.js +0 -4
  173. package/dist/chunks/file-ops-13ab4swj.js +0 -4
  174. package/dist/chunks/files-zbc8p6v1.js +0 -4
  175. package/dist/chunks/format-host-zjsbktbx.js +0 -4
  176. package/dist/chunks/fs-events-t6x0hch6.js +0 -4
  177. package/dist/chunks/grid-open-fyzdwpkh.js +0 -4
  178. package/dist/chunks/iframe-host-kbyqc7pt.js +0 -4
  179. package/dist/chunks/index-6nvj89vb.js +0 -4
  180. package/dist/chunks/jx-validate-5sp8a4rm.js +0 -4
  181. package/dist/chunks/layers-panel-qrxj9vr2.js +0 -4
  182. package/dist/chunks/layers-tpzayggx.js +0 -4
  183. package/dist/chunks/lit-html-x6nrxsx3.js +0 -4
  184. package/dist/chunks/media-library-ywppnjrz.js +0 -4
  185. package/dist/chunks/media-picker-etxgc8qq.js +0 -4
  186. package/dist/chunks/monaco-buffer-qrnqhk0b.js +0 -4
  187. package/dist/chunks/notify-kcv38wwe.js +0 -4
  188. package/dist/chunks/parse-df2kkmhc.js +0 -4
  189. package/dist/chunks/platform-dtsysmyd.js +0 -4
  190. package/dist/chunks/publish-panel-evb1rcxt.js +0 -4
  191. package/dist/chunks/publish-workspace-ktk9h536.js +0 -4
  192. package/dist/chunks/quick-search-2f47fxcw.js +0 -4
  193. package/dist/chunks/references-5w6ajjv7.js +0 -4
  194. package/dist/chunks/right-panel-kz0a6byf.js +0 -4
  195. package/dist/chunks/source-control-1phx90zk.js +0 -4
  196. package/dist/chunks/studio-0hr000ba.js +0 -5
  197. package/dist/chunks/studio-1wyp7dt5.js +0 -5
  198. package/dist/chunks/studio-20ap8dds.js +0 -5
  199. package/dist/chunks/studio-291gqh98.js +0 -5
  200. package/dist/chunks/studio-4zqfw5ha.js +0 -5
  201. package/dist/chunks/studio-56egy6vf.js +0 -5
  202. package/dist/chunks/studio-695k95bw.js +0 -5
  203. package/dist/chunks/studio-732mw0g8.js +0 -5
  204. package/dist/chunks/studio-76t560kn.js +0 -6
  205. package/dist/chunks/studio-8486jn4r.js +0 -5
  206. package/dist/chunks/studio-8x8616xd.js +0 -5
  207. package/dist/chunks/studio-bkmv1h3e.js +0 -9
  208. package/dist/chunks/studio-cqf1k4qk.js +0 -5
  209. package/dist/chunks/studio-dbgv4fv9.js +0 -16
  210. package/dist/chunks/studio-et6t8g4m.js +0 -4
  211. package/dist/chunks/studio-f2j9et3h.js +0 -14
  212. package/dist/chunks/studio-fep7hr66.js +0 -7
  213. package/dist/chunks/studio-fyf7j57j.js +0 -5
  214. package/dist/chunks/studio-g5prntab.js +0 -5
  215. package/dist/chunks/studio-ga77mf07.js +0 -5
  216. package/dist/chunks/studio-h7gy12h2.js +0 -5
  217. package/dist/chunks/studio-j933k8nr.js +0 -5
  218. package/dist/chunks/studio-jgbvqcgh.js +0 -5
  219. package/dist/chunks/studio-k4xc5g6h.js +0 -5
  220. package/dist/chunks/studio-p0nf2e1f.js +0 -6
  221. package/dist/chunks/studio-pzfa2vmb.js +0 -5
  222. package/dist/chunks/studio-rf8d6p9f.js +0 -7
  223. package/dist/chunks/studio-rt498t2v.js +0 -5
  224. package/dist/chunks/studio-sd07xva5.js +0 -6
  225. package/dist/chunks/studio-thj81e98.js +0 -7
  226. package/dist/chunks/studio-tyw7tk0x.js +0 -5
  227. package/dist/chunks/studio-vffwe9k7.js +0 -5
  228. package/dist/chunks/studio-vxjap704.js +0 -5
  229. package/dist/chunks/studio-w67vfgy5.js +0 -5
  230. package/dist/chunks/studio-xebavr9s.js +0 -5
  231. package/dist/chunks/studio-yg5n49za.js +0 -5
  232. package/dist/chunks/studio-yhz5b313.js +0 -5
  233. package/dist/chunks/studio-zsjpsw08.js +0 -5
  234. package/dist/chunks/studio-zxm98z2m.js +0 -7
  235. package/dist/chunks/workspace-d65bz1qk.js +0 -4
  236. package/dist/chunks/workspace-home-vbg9b3jh.js +0 -4
  237. package/src/settings/settings-dialog.ts +0 -192
  238. package/src/surfaces/settings-dialog.json +0 -51
  239. package/src/surfaces/settings-dialog.ts +0 -169
@@ -1,4 +0,0 @@
1
- import{ee}from"./studio-et6t8g4m.js";import{p}from"./studio-w67vfgy5.js";import{g,C}from"./studio-ahf3cspq.js";import"./studio-x2metr13.js";import{Ot,Nt,dh,ae}from"./studio-f2j9et3h.js";import"./studio-4nkm4404.js";import{Ue,ft,T,R,Yt,rt,tt}from"./studio-cvz0e00f.js";import{Ht,Na,lr,Aa}from"./studio-848rk4p1.js";import{Pn,Vt,ln,go}from"./studio-j933k8nr.js";import"./studio-yg5n49za.js";import{sS}from"./studio-mwnmzx7g.js";import"./studio-0hr000ba.js";import"./studio-pd9dsqpq.js";import"./studio-dy2xtt7a.js";import"./studio-8x8616xd.js";import"./studio-xebavr9s.js";import{Co,Gl}from"./studio-dbgv4fv9.js";import"./studio-zxm98z2m.js";import"./studio-qyb5bebs.js";import"./studio-ggm7zf70.js";import"./studio-5dmgmyw4.js";import{Wc,_a,Sa}from"./studio-20ap8dds.js";import{Zu,$b}from"./studio-695k95bw.js";import{Ne,Mb}from"./studio-nf0pqpbj.js";import"./studio-va0e63sk.js";import"./studio-ga77mf07.js";import"./studio-vxjap704.js";import"./studio-fyf7j57j.js";import"./studio-5m0w815d.js";import"./studio-fep7hr66.js";import{K_,OE,fw,X_,wi}from"./studio-thj81e98.js";import"./studio-5e7p1vgd.js";import"./studio-jw0q5j6k.js";import"./studio-zacvfm31.js";import"./studio-k1wvtp03.js";import{lm}from"./studio-pzfa2vmb.js";import"./studio-pmzg17fj.js";import"./studio-bkmv1h3e.js";import"./studio-jh6t5qz4.js";import{tE,Ky}from"./studio-t3j8htp7.js";import{nb,nw,Bs,Ic,P_,sm,iw,F_,hE,Qa,j_,Mu,H_,cD,pE,am,ib,fE,mE,gE,dD,uD,B_}from"./studio-g5prntab.js";import{Jg}from"./studio-7823f0g8.js";import{Yg,Cd,kd}from"./studio-rf8d6p9f.js";import{ew,cE}from"./studio-291gqh98.js";import{Ml}from"./studio-jgbvqcgh.js";import"./studio-4zqfw5ha.js";import{qE,vw}from"./studio-56egy6vf.js";import{as}from"./studio-s0fg2wav.js";import"./studio-76t560kn.js";import"./studio-6vwvshw8.js";import"./studio-vcz63n42.js";import{S,xn}from"./studio-rt498t2v.js";import{n,v}from"./studio-zsjpsw08.js";var z={$schema:"https://jxsuite.com/schema/v1",$id:"StudioAddNew",$description:"Add new: the one dialog that creates a page, a collection, a template, a component, a collection entry or an upload (`specs/studio.md` §9.1.1). One `jx-dialog`, so the platform owns modality, Escape, the backdrop and focus restoration. The kinds run down the left as a radiogroup and the chosen kind's name and options fill the right; the line above the buttons is the derived result, the same `deriveCreation` the write performs, so what it says is what is written. Nothing here composes a path, judges a name or knows a format: `create/add-new-flow.ts` keeps every decision and hands this document rows that are already strings, flags that are already booleans and a refusal that is already a sentence.",tagName:"jx-dialog",$props:{headline:"Add new",confirmLabel:{$ref:"#/state/cta"},confirmDisabled:{$ref:"#/state/blocked"},cancelLabel:"Cancel",size:"lg"},attributes:{part:"add-new","data-kind":"${state.kind}"},onconfirm:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/confirm"},value:[]}]},oncancel:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/closed"},value:[]}]},onclose:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/closed"},value:[]}]},ondragover:{$prototype:"Function",body:[{preventDefault:!0}]},ondrop:{$prototype:"Function",body:[{preventDefault:!0},{operator:"call",target:{$ref:"#/state/drop"},value:[{$ref:"event#/dataTransfer/files"}]}]},style:{$description:"The board's two columns in the kit's scale. The kinds take a fixed gutter so the right side does not move under the reader as they switch kinds, and the options column scrolls on its own so a long template list never pushes the result line and the buttons off the dialog. No part here is named `field`, `label`, `body`, `error`, `text` or `actions`: the kit is light DOM, and `jx-textfield`, `jx-select` and `jx-dialog` each draw internal nodes under those names inside this same tree.",'& [part="sheet"]':{display:"flex",gap:"var(--jx-space-5)",minHeight:"360px"},'& [part="kinds-column"]':{flex:"0 0 208px",display:"flex",flexDirection:"column",gap:"var(--jx-space-3)",borderRight:"1px solid var(--border)",paddingRight:"var(--jx-space-3)"},'& [part="kinds"]':{display:"flex",flexDirection:"column",alignItems:"stretch",gap:"var(--jx-space-1)"},'& [part="kind"]':{display:"block"},'& [part="kind"] > [part="control"]':{$description:"A kind is a row with its own two lines, so the button's box stretches across the gutter and starts its content at the left edge rather than centring an icon.",width:"100%",height:"auto",justifyContent:"flex-start",alignItems:"flex-start",textAlign:"start",padding:"var(--jx-space-2) var(--jx-space-3)",gap:"var(--jx-space-3)"},'& [part="kind-text"]':{display:"flex",flexDirection:"column",gap:"2px"},'& [part="kind-name"]':{fontSize:"var(--jx-text-md)",color:"var(--fg)"},'& [part="kind-hint"], & [part="choice-note"]':{fontSize:"var(--jx-text-sm)",color:"var(--fg-dim)",whiteSpace:"normal"},'& [part="chord-note"], & [part="note"], & [part="kind-intro"], & [part="drop-summary"]':{margin:"0",fontSize:"var(--jx-text-sm)",color:"var(--fg-dim)"},'& [part="chord-note"]':{marginTop:"auto"},'& [part="detail"]':{flex:"1",minWidth:"0",display:"flex",flexDirection:"column",gap:"var(--jx-space-4)",maxHeight:"60vh",overflowY:"auto"},'& [part="options"]':{display:"flex",flexDirection:"column",gap:"var(--jx-space-3)"},'& [part="name-slot"], & [part="options-slot"], & [part="url-slot"], & [part="own-page-slot"], & [part="copy-slot"], & [part="locale-slot"], & [part="localized-slot"]':{$description:"Branch hosts are structure rather than layout: `display: contents` puts what they carry straight into the column, so one gap rule spaces every row whether it is drawn or not.",display:"contents"},'& [part="group-label"]':{margin:"0",fontSize:"var(--jx-text-sm)",color:"var(--fg-dim)"},'& [part="url-row"], & [part="pattern-row"]':{display:"flex",flexWrap:"wrap",alignItems:"center",gap:"var(--jx-space-2)"},'& [part="url-label"]':{fontSize:"var(--jx-text-sm)",color:"var(--fg-dim)"},'& [part="route"], & [part="pattern"]':{fontFamily:"var(--font-mono)",fontSize:"var(--jx-text-sm)",color:"var(--fg)"},'& [part="start-row"]':{display:"flex",flexDirection:"column",gap:"var(--jx-space-2)"},'& [part="start-from"], & [part="wrap-in"], & [part="component-start"]':{display:"flex",flexWrap:"wrap",gap:"var(--jx-space-2)"},'& [part="choice-card"] > [part="control"]':{$description:"A choice is a card with a name and a note, as the board draws it: its own two lines inside one radio, so the reader hears one name and sees both.",minWidth:"132px",height:"auto",flexDirection:"column",alignItems:"flex-start",textAlign:"start",padding:"var(--jx-space-2) var(--jx-space-3)",gap:"2px"},'& [part="choice-name"]':{display:"block",fontSize:"var(--jx-text-md)",color:"var(--fg)"},'& [part="choice-note"]':{display:"block"},'& [part="presets"]':{display:"flex",flexWrap:"wrap",gap:"var(--jx-space-2)"},'& [part="drop"]':{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"var(--jx-space-2)",minHeight:"200px",padding:"var(--jx-space-5)",border:"1px dashed var(--border)",borderRadius:"var(--radius)",textAlign:"center"},'& [part="drop"][data-drop="true"]':{borderColor:"var(--accent)",background:"var(--accent-10)"},'& [part="drop-title"]':{margin:"0",fontSize:"var(--jx-text-md)",color:"var(--fg)"},'& [part="browse"]':{display:"inline-flex",alignItems:"center",gap:"var(--jx-space-2)",padding:"var(--jx-space-1) var(--jx-space-3)",border:"1px solid var(--border)",borderRadius:"var(--radius)",color:"var(--fg)",cursor:"pointer"},'& [part="browse"]:focus-within':{outline:"var(--jx-focus-ring)",outlineOffset:"2px"},'& [part="browse-input"]':{$description:"Visually hidden, never `display: none`: the input is the control, and a hidden-from-layout one cannot take focus from the keyboard. The label around it is what is drawn and what is clicked.",position:"absolute",width:"1px",height:"1px",opacity:"0",overflow:"hidden"},'& [part="saved"]':{margin:"0",paddingTop:"var(--jx-space-3)",borderTop:"1px solid var(--border)",fontSize:"var(--jx-text-sm)",color:"var(--fg-dim)",overflowWrap:"anywhere"}},children:[{tagName:"div",attributes:{part:"sheet"},children:[{tagName:"div",attributes:{part:"kinds-column"},children:[{tagName:"jx-action-group",attributes:{part:"kinds"},$props:{selects:"single",label:"What to create",orientation:"vertical",compact:!1},children:[{$prototype:"Array",items:{$ref:"#/state/kinds"},key:{$ref:"$map/item/id"},map:{tagName:"jx-action-button",attributes:{part:"kind","data-kind":"${$map.item.id}"},$props:{label:{$ref:"$map/item/label"},icon:{$ref:"$map/item/icon"},checked:{$ref:"$map/item/checked"}},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/pickKind"},value:[{$ref:"$map/item/id"}]}]},children:[{tagName:"span",attributes:{part:"kind-text"},children:[{tagName:"span",attributes:{part:"kind-name"},textContent:"${$map.item.label}"},{tagName:"span",attributes:{part:"kind-hint"},textContent:"${$map.item.hint}"}]}]}}]},{tagName:"p",attributes:{part:"chord-note"},textContent:"${state.chordNote}"}]},{tagName:"section",attributes:{part:"detail","aria-label":"${state.kindLabel}"},children:[{tagName:"p",attributes:{part:"kind-intro"},textContent:"${state.kindHint}"},{tagName:"div",attributes:{part:"name-slot",role:"none"},$switch:{$ref:"#/state/named"},cases:{true:{tagName:"jx-field",attributes:{part:"name-row"},$props:{span:!0,label:{$ref:"#/state/nameLabel"},invalid:{$ref:"#/state/invalid"}},children:[{tagName:"jx-textfield",attributes:{part:"name"},$props:{value:{$ref:"#/state/name"},placeholder:{$ref:"#/state/placeholder"},invalid:{$ref:"#/state/invalid"},error:{$ref:"#/state/error"},required:!0,autocomplete:"off"},oninput:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/setName"},value:[{$ref:"event#/target/value"}]}]},onkeydown:{$prototype:"Function",body:[{$switch:{$ref:"event#/key"},cases:{Enter:[{preventDefault:!0},{operator:"call",target:{$ref:"#/state/confirm"},value:[]}]}}]}}]}}},{tagName:"div",attributes:{part:"options-slot",role:"none"},$switch:{$ref:"#/state/kind"},cases:{page:{tagName:"div",attributes:{part:"options",role:"none"},children:[{tagName:"div",attributes:{part:"locale-slot",role:"none"},$switch:{$ref:"#/state/localeShown"},cases:{true:{tagName:"jx-field",attributes:{part:"locale-row"},$props:{span:!0,label:"Language"},children:[{tagName:"jx-select",attributes:{part:"locale"},$props:{size:"sm",label:"Language",options:{$ref:"#/state/localeOptions"},value:{$ref:"#/state/locale"}},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/pickLocale"},value:[{$ref:"event#/target/value"}]}]}}]}}},{tagName:"div",attributes:{part:"url-row"},children:[{tagName:"span",attributes:{part:"url-label"},textContent:"URL"},{tagName:"code",attributes:{part:"route"},textContent:"${state.route}"},{tagName:"jx-action-button",attributes:{part:"edit-url"},$props:{label:"Edit URL",toggles:!0,selected:{$ref:"#/state/editingUrl"},size:"sm"},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/toggleUrl"},value:[]}]},children:[{tagName:"span",textContent:"Edit"}]}]},{tagName:"div",attributes:{part:"url-slot",role:"none"},$switch:{$ref:"#/state/editingUrl"},cases:{true:{tagName:"jx-field",attributes:{part:"url-row-field"},$props:{span:!0,label:"URL"},children:[{tagName:"jx-textfield",attributes:{part:"url"},$props:{size:"sm",mono:!0,value:{$ref:"#/state/url"},placeholder:"/pricing"},oninput:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/setUrl"},value:[{$ref:"event#/target/value"}]}]},onkeydown:{$prototype:"Function",body:[{$switch:{$ref:"event#/key"},cases:{Enter:[{preventDefault:!0},{operator:"call",target:{$ref:"#/state/confirm"},value:[]}]}}]}}]}}},{tagName:"div",attributes:{part:"start-row"},children:[{tagName:"p",attributes:{part:"group-label"},textContent:"Start from"},{tagName:"jx-action-group",attributes:{part:"start-from"},$props:{selects:"single",label:"Start from",compact:!1},children:[{$prototype:"Array",items:{$ref:"#/state/startChoices"},key:{$ref:"$map/item/value"},map:{tagName:"jx-action-button",attributes:{part:"choice-card","data-value":"${$map.item.value}"},$props:{label:{$ref:"$map/item/label"},checked:{$ref:"$map/item/checked"},disabled:{$ref:"$map/item/disabled"},hint:{$ref:"$map/item/reason"},quiet:!1},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/pickStart"},value:[{$ref:"$map/item/value"}]}]},children:[{tagName:"span",attributes:{part:"choice-name"},textContent:"${$map.item.label}"},{tagName:"span",attributes:{part:"choice-note"},textContent:"${$map.item.note}"}]}}]}]}]},collection:{tagName:"div",attributes:{part:"options",role:"none"},children:[{tagName:"p",attributes:{part:"group-label"},textContent:"Each ${state.itemNoun} has"},{tagName:"jx-action-group",attributes:{part:"presets"},$props:{selects:"multiple",label:"Fields",compact:!1},children:[{$prototype:"Array",items:{$ref:"#/state/presets"},key:{$ref:"$map/item/id"},map:{tagName:"jx-action-button",attributes:{part:"preset","data-preset":"${$map.item.id}"},$props:{label:{$ref:"$map/item/label"},toggles:!0,selected:{$ref:"$map/item/selected"},quiet:!1,size:"sm",icon:{$ref:"$map/item/icon"}},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/togglePreset"},value:[{$ref:"$map/item/id"}]}]},children:[{tagName:"span",textContent:"${$map.item.label}"}]}}]},{tagName:"p",attributes:{part:"note"},textContent:"You can add or change fields later."},{tagName:"div",attributes:{part:"localized-slot",role:"none"},$switch:{$ref:"#/state/localizable"},cases:{true:{tagName:"jx-checkbox",attributes:{part:"localized"},$props:{checked:{$ref:"#/state/localized"}},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/setLocalized"},value:[{$ref:"event#/target/checked"}]}]},children:[{tagName:"span",textContent:"One folder per language (${state.localeSummary})"}]}}},{tagName:"jx-checkbox",attributes:{part:"own-page"},$props:{checked:{$ref:"#/state/ownPage"}},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/setOwnPage"},value:[{$ref:"event#/target/checked"}]}]},children:[{tagName:"span",textContent:"Give each ${state.itemNoun} its own page"}]},{tagName:"div",attributes:{part:"own-page-slot",role:"none"},$switch:{$ref:"#/state/ownPage"},cases:{true:{tagName:"div",attributes:{part:"pattern-row"},children:[{tagName:"span",attributes:{part:"url-label"},textContent:"at"},{tagName:"code",attributes:{part:"pattern"},textContent:"${state.pattern}"},{tagName:"span",attributes:{part:"url-label"},textContent:"using"},{tagName:"jx-select",attributes:{part:"page-template"},$props:{size:"sm",label:"Template for each page",options:{$ref:"#/state/templateOptions"},value:{$ref:"#/state/pageTemplate"}},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/pickPageTemplate"},value:[{$ref:"event#/target/value"}]}]}}]}}}]},template:{tagName:"div",attributes:{part:"options",role:"none"},children:[{tagName:"p",attributes:{part:"group-label"},textContent:"Wrap it in"},{tagName:"jx-action-group",attributes:{part:"wrap-in"},$props:{selects:"single",label:"Wrap it in",compact:!1},children:[{$prototype:"Array",items:{$ref:"#/state/wrapChoices"},key:{$ref:"$map/item/value"},map:{tagName:"jx-action-button",attributes:{part:"choice-card","data-value":"${$map.item.value}"},$props:{label:{$ref:"$map/item/label"},checked:{$ref:"$map/item/checked"},disabled:{$ref:"$map/item/disabled"},hint:{$ref:"$map/item/reason"},quiet:!1},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/pickWrap"},value:[{$ref:"$map/item/value"}]}]},children:[{tagName:"span",attributes:{part:"choice-name"},textContent:"${$map.item.label}"},{tagName:"span",attributes:{part:"choice-note"},textContent:"${$map.item.note}"}]}}]},{tagName:"p",attributes:{part:"note"},textContent:"Pages placed in this template fill its Content area. You can add more named areas later."}]},component:{tagName:"div",attributes:{part:"options",role:"none"},children:[{tagName:"p",attributes:{part:"group-label"},textContent:"Start from"},{tagName:"jx-action-group",attributes:{part:"component-start"},$props:{selects:"single",label:"Start from",compact:!1},children:[{$prototype:"Array",items:{$ref:"#/state/componentChoices"},key:{$ref:"$map/item/value"},map:{tagName:"jx-action-button",attributes:{part:"choice-card","data-value":"${$map.item.value}"},$props:{label:{$ref:"$map/item/label"},checked:{$ref:"$map/item/checked"},disabled:{$ref:"$map/item/disabled"},hint:{$ref:"$map/item/reason"},quiet:!1},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/pickComponentStart"},value:[{$ref:"$map/item/value"}]}]},children:[{tagName:"span",attributes:{part:"choice-name"},textContent:"${$map.item.label}"},{tagName:"span",attributes:{part:"choice-note"},textContent:"${$map.item.note}"}]}}]},{tagName:"div",attributes:{part:"copy-slot",role:"none"},$switch:{$ref:"#/state/copying"},cases:{true:{tagName:"jx-field",attributes:{part:"copy-row"},$props:{span:!0,label:"Copy of"},children:[{tagName:"jx-select",attributes:{part:"copy-of"},$props:{size:"sm",label:"Component to copy",options:{$ref:"#/state/copyOptions"},value:{$ref:"#/state/copyOf"}},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/pickCopy"},value:[{$ref:"event#/target/value"}]}]}}]}}},{tagName:"p",attributes:{part:"note"},textContent:"It appears under Components in the Site panel, ready to drag onto any page."}]},entry:{tagName:"div",attributes:{part:"options",role:"none"},children:[{tagName:"jx-field",attributes:{part:"collection-row"},$props:{span:!0,label:"Collection"},children:[{tagName:"jx-select",attributes:{part:"collection"},$props:{size:"sm",label:"Collection",options:{$ref:"#/state/collectionOptions"},value:{$ref:"#/state/collection"}},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/pickCollection"},value:[{$ref:"event#/target/value"}]}]}}]},{tagName:"div",attributes:{part:"locale-slot",role:"none"},$switch:{$ref:"#/state/localeShown"},cases:{true:{tagName:"jx-field",attributes:{part:"locale-row"},$props:{span:!0,label:"Language"},children:[{tagName:"jx-select",attributes:{part:"locale"},$props:{size:"sm",label:"Language",options:{$ref:"#/state/localeOptions"},value:{$ref:"#/state/locale"}},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/pickLocale"},value:[{$ref:"event#/target/value"}]}]}}]}}}]},media:{tagName:"div",attributes:{part:"drop","data-drop":"${state.dropActive}"},ondragover:{$prototype:"Function",body:[{preventDefault:!0},{operator:"call",target:{$ref:"#/state/dragOver"},value:[]}]},ondragleave:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/dragOut"},value:[]}]},children:[{tagName:"jx-icon",attributes:{part:"drop-glyph"},$props:{name:"upload-simple"}},{tagName:"p",attributes:{part:"drop-title"},textContent:"Drop images, video or documents"},{tagName:"label",attributes:{part:"browse"},children:[{tagName:"input",attributes:{part:"browse-input",type:"file",multiple:!0,accept:"${state.uploadAccept}"},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/choose"},value:[{$ref:"event#/target"}]}]}},{tagName:"span",textContent:"Browse files"}]},{tagName:"p",attributes:{part:"drop-summary"},textContent:"${state.fileSummary}"}]}}}]}]},{tagName:"p",attributes:{part:"saved","aria-live":"polite"},textContent:"${state.saved}"}]};T("add-new",z);function D(e){return{...e,blocked:!e.canConfirm,invalid:e.error!=="",named:e.kind!=="media"}}function E(e){let t=document.createElement("div");t.style.pointerEvents="auto",t.setAttribute(Ue,ft("dialog","add-new")),e.layer.append(t);let r=!1,o=()=>{if(r)return;r=!0,e.actions.closed()},l=()=>r,{actions:a}=e,d=g({...D(e.view),choose:a.choose,closed:o,confirm:a.confirm,dragOut:a.dragOut,dragOver:a.dragOver,drop:a.drop,pickCollection:a.pickCollection,pickComponentStart:a.pickComponentStart,pickCopy:a.pickCopy,pickKind:a.pickKind,pickLocale:a.pickLocale,pickPageTemplate:a.pickPageTemplate,pickStart:a.pickStart,pickWrap:a.pickWrap,setName:(m)=>{d.name=m,a.setName(m)},setLocalized:a.setLocalized,setOwnPage:a.setOwnPage,setUrl:(m)=>{d.url=m,a.setUrl(m)},toggleUrl:a.toggleUrl,togglePreset:a.togglePreset}),f=null,u=()=>{setTimeout(()=>{let m=f?.root;if(r||!(m instanceof HTMLElement))return;let c=m.querySelector('jx-textfield[part="name"]');if(c)dh(c,"all")},0)},b=R("add-new",d,t).then(async(m)=>{f=m;let c=m.root;if(l())return m.dispose(),c;if(await Yt(c),l())return c;if(Ot(c),d.named)u();return c});return{close(){let m=f?.root;if(m instanceof HTMLElement)Nt(m);f?.dispose(),f=null,t.remove(),o()},host:t,ready:b,update(m){Object.assign(d,D(m))}}}var y="Add new";async function W(){return(await tE()).map((t)=>({name:t.name,ref:t.path})).toSorted((t,r)=>t.name.localeCompare(r.name))}function _(){for(let e of K_("page")){if(e.ext===".json")continue;let t=Na(e.ext,"serialize");if(t)return{ext:e.ext,name:t.name}}return null}function B(){let e=lr(),t=e?.extensions[0];return e&&t?{ext:t,name:e.name}:null}function J(){return ln(S?.projectConfig??{}).i18n}async function V(e){let t={},{i18n:r}=ln(S?.projectConfig??{});for(let o of await sS(e)){let l=Pn(go(o,r));if(l!==null)t[l]=o}return t}async function L(){await Ht().catch(()=>{});let e=await Promise.all(vw().map(async(t)=>{let r={dir:t.dir,ext:t.ext,formatName:B_(t),name:t.name,schema:t.schema};if(ib(t))r.localeDirs=await V(t);return r}));return{i18n:J(),article:_(),collections:e,componentTags:Ne.map((t)=>t.tagName),copyableTags:Ne.filter((t)=>I(t)).map((t)=>t.tagName),contentFormat:B(),declaredContent:qE(),defaultLayout:S?.projectConfig?.defaults?.layout??null,hasSelection:ew()!==null,layouts:await W()}}function I(e){let{path:t}=e;return n(t)&&e.source!=="npm"&&t.endsWith(".json")}async function Y(){let e=new Map;for(let t of Ne){let{path:r}=t;if(!I(t)||!n(r))continue;try{let o=JSON.parse(await p().readFile(r));if(v(o))e.set(t.tagName,o)}catch{}}return e}function U(e,t){let r=e.trim();if(r===Bs||r==="none"||r==="")return Bs;if(r===Ic)return Ic;let o=Qa(r);return t.find((a)=>Qa(a.ref)===o||Qa(a.ref)===`layouts/${o}`||Qa(a.ref)===`layouts/${o}.json`||a.name.toLowerCase()===r.toLowerCase())?.ref??null}function G(e,t){let r={};if(e.collection!==void 0)r.collection=e.collection;if(e.locale!==void 0){if(am(e.locale,t)===null){let o=t.i18n?.locales??[];throw RangeError(`command "file.new" argument "locale": "${e.locale}" is not a language this `+`project declares — declared: ${o.length===0?"none":o.join(", ")}`)}r.locale=e.locale}if(e.template!==void 0){let o=U(e.template,t.layouts);if(o===null){let l=t.layouts.map((a)=>Qa(a.ref));throw RangeError(`command "file.new" argument "template": "${e.template}" names no template — `+`declared: ${[Bs,Ic,...l].join(", ")}`)}if(e.kind==="collection")r.pageTemplate=o===Ic?Bs:o;else if(e.kind==="template")r.startFrom=o===Bs||o===Ic?"":o;else r.startFrom=o}return r}async function Q(e){if(e.format===null)return Co(e.doc,null);return Aa(e.format,e.doc,{frontmatter:e.frontmatter??!0,mode:"roundtrip"})}async function F(e,t,r=!1){for(let o of dD(gE(e)))await Promise.all(o.map(async(l)=>{if(!r&&t.has(l))return;t.set(l,uD(l,t)?new Set:await fw(l))}))}function k(e){if(Jg(e),kd(),e.some((t)=>t.startsWith("pages/")))$b(),Yg();OE(e).then((t)=>{if(t)kd(),xn("leftPanel")})}async function P(e,t,r){let o;try{o=await Q(t)}catch(l){throw C.error(`Could not prepare ${e}.`,{detail:ee(l),path:e,source:y}),Error(`could not prepare ${e}`,{cause:l})}if(await X_(e,o,{quiet:r,source:y})===null)throw Error(`could not write ${e}`)}async function X(e){let t=e.config,r=S?.projectConfig?.content,o=v(r)?{...r}:{};if(o[t.name]=t.entry,!(await Gl({content:o})).ok)return null;let a=["project.json"],d=[];for(let u of[{body:e.content,path:e.path},...e.extraWrites])try{await P(u.path,u.body,!0),a.push(u.path)}catch{d.push(u.path)}if(d.length===0)C.success(`Created the ${t.name} collection`);else C.warn(`Created the ${t.name} collection, but ${d.join(" and ")} could not be written.`,{source:y});k(a),lm(t.name),rt("content.showCollection",{collection:t.name},y);let f={kind:"collection",path:`content/${t.name}`,wrote:a};if(e.route!==void 0)f.route=e.route;return f}async function M(e,t,r){if(e.kind==="media"){let l=await Sa(r,{dir:_a,only:"media"});if(l.length===0)return null;let a=l.map((d)=>d.path);return k(a),rt("media.browse",{select:l[0].path},y),{kind:"media",path:_a,wrote:a}}if(e.kind==="collection")return X(e);let o={kind:e.kind,path:e.path,wrote:[e.path]};if(e.route!==void 0)o.route=e.route;if(e.tag!==void 0)o.tag=e.tag;if(e.kind==="component"&&t.startFrom===P_){let l=await cE(e.tag);if(l===null)return null;return k([l]),await wi(l),o}try{await P(e.path,e.content,!1)}catch{return null}switch(k([e.path]),e.kind){case"component":{Mb(e.path,e.content.doc),await wi(e.path);break}case"template":{Ky(),await wi(e.path);break}case"entry":{if(t.collection!==void 0)lm(t.collection);await Ml(e.path);break}default:await wi(e.path)}return o}async function Ve(e){let t=e.kind??"page";if(t==="media")throw RangeError('command "file.new": Media is uploaded, not named; run file.new { kind: "media" } with no name to open the upload drop zone.');let r=await L(),o=G({...e,kind:t},r);if(t==="entry"&&o.collection===void 0&&r.collections.length===1)o.collection=r.collections[0].name;let l=fE(t,e.name,o,r),a=new Map;await F(l,a,!0);let d=mE(l,e.name,o,r,(u)=>a.get(u));if(d!=="")throw RangeError(`command "file.new": ${d}`);let f=await M(l,o,[]);if(f===null)throw Error(`file.new could not create ${l.path}; the reason is in Problems.`);return f}async function Ye(e){let t=await L(),r=t.collections.find((u)=>u.name===e);if(!r)return C.error(`"${e}" is not a collection this project declares.`,{source:y}),null;let o=`pages/${as(e)||e}`,l=`${o}/[slug].json`;if((await fw(o)).has("[slug].json"))return C.error(`${l} already exists.`,{detail:"Open it in Design and point its $paths at this collection, or rename it first.",path:l,source:y}),null;let d=cD(r.schema,r.formatName!==null),f=pE(e,d,j_(Mu(t),t),t);try{await P(l,{doc:f,format:null},!1)}catch{return null}return k([l]),l}function j(e){switch(e.kind){case"page":{let t={startFrom:e.pageStart};if(e.editingUrl)t.url=e.url;if(e.locale!=="")t.locale=e.locale;return t}case"template":return{startFrom:e.wrap};case"component":{let t={startFrom:e.componentStart};if(e.componentStart===sm&&e.copyOf!=="")t.copyOf=e.copyOf;return t}case"collection":return{fields:e.fields,localized:e.localized,ownPage:e.ownPage,pageTemplate:e.pageTemplate};case"entry":{let t={};if(e.collection!=="")t.collection=e.collection;if(e.locale!=="")t.locale=e.locale;return t}default:return{files:e.files.length}}}function w(e,t,r,o,l=""){return{checked:e===o?"true":"false",disabled:l!=="",label:t,note:r,reason:l,value:e}}function Z(e,t){let r=t.layouts.map((o)=>w(o.ref,o.name,t.defaultLayout!==null&&Qa(o.ref)===Qa(t.defaultLayout)?"the site's default":"a template",e.pageStart));if(t.article!==null)r.push(w(Ic,"Article","mostly writing",e.pageStart));return r.push(w(Bs,"Blank","no template",e.pageStart)),r}function q(){let e=ew();if(!e)return"nothing selected";let r=1+(Array.isArray(e.node.children)?e.node.children.length:0);return r===1?"1 element":`${r} elements`}function te(){let e=ae()?.keymap,t=e?.bindingsFor("file.new")??[];if(!e||t.length===0)return"";let[r,...o]=t.map((l)=>e.format(l));return o.length===0?`${r} opens this anywhere.`:`${r} opens this in the desktop app, ${o.join(" or ")} anywhere.`}function O(e,t,r,o){let l=nw[e.kind],a=nb.filter((s)=>s!=="entry"||t.collections.length>0).map((s)=>({checked:s===e.kind?"true":"false",hint:nw[s].hint,icon:nw[s].icon,id:s,label:nw[s].label})),d=r.config?.name??"",f=Zu(d===""?"items":d),u=t.i18n?.locales??[],b=t.collections.find((s)=>s.name===e.collection),m=u.length>0&&(e.kind==="page"||e.kind==="entry"&&b!==void 0&&ib(b)),c=[...t.layouts.map((s)=>({label:s.name,value:s.ref})),{label:"No template",value:Bs}];return{canConfirm:o===""&&!e.busy,chordNote:te(),collection:e.collection,collectionOptions:t.collections.map((s)=>({label:Cd(s.name),value:s.name})),componentChoices:[w("blank","Blank","an empty block",e.componentStart),w(P_,"Current selection",q(),e.componentStart,t.hasSelection===!0?"":"Select an element on the canvas first."),w(sm,"Copy of…","an existing one",e.componentStart,(t.copyableTags??[]).length>0?"":"This project has no components of its own to copy yet.")],copyOf:e.copyOf,copyOptions:[...t.componentDocs?.keys()??[]].map((s)=>({label:`<${s}>`,value:s})),copying:e.componentStart===sm,cta:l.cta,dropActive:e.dropActive?"true":"false",editingUrl:e.editingUrl,error:e.touched||e.kind==="media"?e.kind==="media"?"":o:"",fileSummary:e.files.length===0?"":e.files.map((s)=>s.name).join(", "),itemNoun:f,kind:e.kind,kindHint:l.hint,kindLabel:l.label,kinds:a,locale:e.locale,localeOptions:u.map((s)=>({label:Vt(s),value:s})),localeShown:m,localeSummary:u.join(", "),localizable:u.length>0,localized:e.localized,name:e.name,nameLabel:l.nameLabel,ownPage:e.ownPage,pageTemplate:e.pageTemplate,pattern:r.route??`/${d===""?"items":d}/:slug`,placeholder:l.placeholder,presets:iw.filter((s)=>s!=="richText"||t.contentFormat!==null).map((s)=>{let x=e.fields.includes(s);return{icon:x?"check":"plus",id:s,label:F_[s].label,selected:x}}),route:r.route===void 0||r.route===""?"/":r.route,saved:r.saved,startChoices:Z(e,t),templateOptions:c,uploadAccept:Wc(),url:e.url,wrapChoices:[...t.layouts.map((s)=>w(s.ref,s.name,"keeps its frame around this one",e.wrap)),w("","Nothing","a fresh frame",e.wrap)]}}function oe(e,t){let r=e.kind??"page";return r==="entry"&&t.collections.length===0?"page":r}var A=null;function Ge(e={}){if(A)return A.done;let t,r=new Promise((l)=>{t=l}),o={done:r,handle:null};return A=o,ne(e,t,o),r}async function ne(e,t,r){let o=await L(),l=new Map,a={busy:!1,collection:e.collection??o.collections[0]?.name??"",locale:am(e.locale,o)??o.i18n?.defaultLocale??"",localized:o.i18n!==null&&o.i18n!==void 0,componentStart:"blank",copyOf:"",dropActive:!1,editingUrl:!1,fields:[...hE],files:[],kind:oe(e,o),name:e.name??"",ownPage:!0,pageStart:H_(o,am(e.locale,o)??o.i18n?.defaultLocale??""),pageTemplate:Mu(o),templateChosen:e.template!==void 0,touched:(e.name??"")!=="",url:"",wrap:Mu(o)===Bs?"":Mu(o)};if(e.template!==void 0){let i=U(e.template,o.layouts);if(i!==null)a.pageStart=i,a.pageTemplate=i===Ic?Bs:i,a.wrap=i===Bs||i===Ic?"":i}if(o.contentFormat===null)a.fields=a.fields.filter((i)=>i!=="richText");let d=!1,f=null,u=()=>fE(a.kind,a.name,j(a),o),b=(i)=>mE(i,a.name,j(a),o,(h)=>l.get(h)),m=()=>{let i=u();if(r.handle?.update(O(a,o,i,b(i))),gE(i).some((h)=>!l.has(h)))F(i,l).then(()=>{if(!d){let h=u();r.handle?.update(O(a,o,h,b(h)))}})},c=(i)=>{i(),m()},s=async()=>{if(a.busy)return;a.touched=!0;let i=u();if(await F(i,l,!0),b(i)!==""){m();return}a.busy=!0,m();try{f=await M(i,j(a),a.files)}catch(N){C.error("Could not create it.",{detail:ee(N),source:y}),f=null}if(a.busy=!1,f===null){m();return}r.handle?.close()},x=u(),K=E({actions:{choose:(i)=>{let h=[...i.files??[]];i.value="",c(()=>{a.files=[...a.files,...h]})},closed:()=>{if(d)return;d=!0,A=null,r.handle?.close(),t(f)},confirm:()=>{s()},dragOut:()=>{c(()=>{a.dropActive=!1})},dragOver:()=>{if(!a.dropActive)c(()=>{a.dropActive=!0})},drop:(i)=>{c(()=>{a.dropActive=!1;let h=i?[...i]:[];if(h.length>0)a.kind="media";a.files=[...a.files,...h]})},pickCollection:(i)=>{c(()=>{a.collection=i})},pickComponentStart:(i)=>{if(c(()=>{a.componentStart=i}),i===sm&&o.componentDocs===void 0)Y().then((h)=>{if(o.componentDocs=h,a.copyOf==="")a.copyOf=h.keys().next().value??"";if(!d)m()})},pickLocale:(i)=>{c(()=>{if(a.locale=i,!a.templateChosen)a.pageStart=H_(o,i)})},setLocalized:(i)=>{c(()=>{a.localized=i})},pickCopy:(i)=>{c(()=>{a.copyOf=i})},pickKind:(i)=>{c(()=>{a.kind=i})},pickPageTemplate:(i)=>{c(()=>{a.pageTemplate=i})},pickStart:(i)=>{c(()=>{a.pageStart=i,a.templateChosen=!0})},pickWrap:(i)=>{c(()=>{a.wrap=i})},setName:(i)=>{c(()=>{a.name=i,a.touched=!0})},setOwnPage:(i)=>{c(()=>{a.ownPage=i})},setUrl:(i)=>{c(()=>{a.url=i,a.touched=!0})},toggleUrl:()=>{c(()=>{if(!a.editingUrl)a.url=u().route??"/";a.editingUrl=!a.editingUrl})},togglePreset:(i)=>{c(()=>{let h=iw.find((N)=>N===i);if(h===void 0)return;a.fields=a.fields.includes(h)?a.fields.filter((N)=>N!==h):[...a.fields,h]})}},layer:tt("dialog"),view:O(a,o,x,b(x))});r.handle=K,m()}export{Ye as addCollectionPage,Ve as createDirect,Ge as openAddNew};
2
-
3
- //# debugId=8A053266CA1B648664756E2164756E21
4
- //# sourceMappingURL=add-new-flow-ptmhmzr9.js.map
@@ -1,4 +0,0 @@
1
- import{ee}from"./studio-et6t8g4m.js";import{p,_e}from"./studio-w67vfgy5.js";import{g}from"./studio-ahf3cspq.js";import"./studio-x2metr13.js";import{Ot,Nt}from"./studio-f2j9et3h.js";import"./studio-4nkm4404.js";import{Ue,ft,T,R,Yt,tt}from"./studio-cvz0e00f.js";import"./studio-fep7hr66.js";import"./studio-xebavr9s.js";import"./studio-h7gy12h2.js";import"./studio-8x8616xd.js";import{um}from"./studio-8486jn4r.js";var d={$schema:"https://jxsuite.com/schema/v1",$id:"StudioCfAccountPicker",$description:"The Cloudflare account picker: which of the accounts this grant reaches should publishing and the assistant run against. A `jx-dialog`, so the platform owns modality, Escape, focus restoration and the backdrop — which is what retired the `sp-dialog-wrapper` this surface used to open by hand, along with the focus trap and the `aria-modal` slot `showDialog` wrapped around it. There is no confirming button: each row commits itself, because a picker whose answer is one of N rows has N answers rather than one. The adapter (`surfaces/cf-account-picker.ts`) hands in rows that are already strings and booleans — nothing here knows what `cf_account_required` is, which call refused, or whether the list came back empty because the grant reaches nothing or because Cloudflare could not be reached.",tagName:"jx-dialog",$props:{headline:"Choose a Cloudflare account",confirmLabel:"",cancelLabel:"Cancel",size:"sm"},attributes:{part:"cf-accounts"},oncancel:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/closed"},value:[]}]},onclose:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/closed"},value:[]}]},style:{$description:"The picker's own look. Four `.cf-account-picker*` rules in `styles/shell.css` become the parts below and one of them does not come with them: `min-width: 320px` was this surface sizing its own box, and `jx-dialog` is what sizes a dialog now — `sm` is `min(90vw, 24rem)`, which is wider than the 320px it asked for. The row shape came from `.prefs-account`, which the lit template BORROWED from Preferences › Accounts; it is copied here rather than shared, because a class in a stylesheet is a thing two surfaces can drift apart on and `preferences-dialog.ts` still draws its own rows from it. Three token repairs travel with them: `--spectrum-font-size-75` and `--spectrum-font-size-50` resolve only inside `<sp-theme>`, and a document mounted in the dialog layer is outside it, so every one of them would silently have taken its hard-coded fallback.",'& [part="picker"]':{display:"flex",flexDirection:"column",gap:"var(--jx-space-4)"},'& [part="intro"], & [part="empty"]':{$description:"The lede and the two absences read as the same secondary line, so they are one rule: the sentence over the list and the sentence drawn instead of it are the same voice.",margin:"0",fontSize:"var(--jx-text-md)",color:"var(--fg-dim)"},'& [part="failure"]':{$description:'A commit the broker refused, said above the list the reader is still looking at. It is not an announcement of the same thing twice: the list survives a refusal, because listing again is not what would fix an account Cloudflare will not accept, so the reason has to sit beside the rows that are still on offer. It is `failure` rather than `error` because every kit field draws a permanent, empty `[part="error"]` of its own, and the kit is light DOM: a rule on that name here would reach any field this dialog ever holds.',margin:"0",fontSize:"var(--jx-text-md)",color:"var(--danger)"},'& [part="fail"]':{$description:"The one state that offers a verb of its own. Retrying is right for a listing that never landed and wrong for a grant that genuinely reaches nothing, so the button lives in this branch rather than under both.",display:"flex",flexDirection:"column",alignItems:"flex-start",gap:"var(--jx-space-3)"},'& [part="list"]':{display:"flex",flexDirection:"column",gap:"var(--jx-space-2)"},'& [part="row"]':{display:"flex",alignItems:"center",justifyContent:"space-between",gap:"var(--jx-space-4)",padding:"var(--jx-space-3)",border:"1px solid var(--border)",borderRadius:"var(--radius)"},'& [part="text"]':{$description:"`min-width: 0` lets the column shrink below its content, so the name and id reflow inside the row instead of pushing its own button off the end of it; what lets them reflow is their own `overflow-wrap`. Nothing here ellipsizes. Unlike Preferences › Accounts, the row does not wrap its button onto a line of its own: in an `sm` dialog the arithmetic (a 120px basis, the gap and a 105px button against a 236px row) would wrap every row at rest.",display:"flex",flexDirection:"column",gap:"var(--jx-space-1)",minWidth:"0"},'& [part="name"]':{$description:"`overflow-wrap: anywhere` because Cloudflare names a new account after the email that opened it (`name@example.com's Account`), and an address has no break opportunity in it.",color:"var(--fg)",overflowWrap:"anywhere"},'& [part="detail"]':{$description:"The account id under the name. Two Cloudflare accounts may carry the same name and the id is what is stored, so the row shows both rather than the half a reader would have to guess from. `overflow-wrap: anywhere` because the id is 32 hex digits with no break opportunity: it measured 203px in a 119px column and ran under the row's own button. It reflows rather than ellipsizing, because the id is the half that tells two same-named accounts apart.",fontSize:"var(--jx-text-sm)",color:"var(--fg-dim)",overflowWrap:"anywhere"}},children:[{tagName:"div",attributes:{part:"picker"},children:[{tagName:"p",attributes:{part:"intro"},textContent:"Your Cloudflare login reaches more than one account. Publishing and the assistant both run against the one you pick; you can change it in Preferences › Accounts."},{tagName:"div",attributes:{part:"body-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/listState"},cases:{loading:{tagName:"p",attributes:{part:"empty"},textContent:"Reading your Cloudflare accounts…"},empty:{tagName:"p",attributes:{part:"empty"},textContent:"This Cloudflare login reaches no accounts. Create one at dash.cloudflare.com, then try again."},failed:{tagName:"div",attributes:{part:"fail"},children:[{tagName:"p",attributes:{part:"empty"},textContent:"${state.failureMessage}"},{tagName:"jx-button",attributes:{part:"retry"},$props:{size:"sm"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/retry"},value:[]}]},children:[{tagName:"span",textContent:"Try again"}]}]},listed:{tagName:"div",attributes:{part:"listed",role:"none"},style:{display:"contents"},children:[{tagName:"div",attributes:{part:"failure-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/hasFailure"},cases:{true:{tagName:"p",attributes:{part:"failure"},textContent:"${state.failure}"}}},{tagName:"div",attributes:{part:"list"},children:[{$prototype:"Array",items:{$ref:"#/state/rows"},key:{$ref:"$map/item/id"},map:{tagName:"div",attributes:{part:"row","data-account":"${$map.item.id}"},children:[{tagName:"div",attributes:{part:"text"},children:[{tagName:"span",attributes:{part:"name"},textContent:"${$map.item.name}"},{tagName:"span",attributes:{part:"detail"},textContent:"${$map.item.id}"}]},{tagName:"jx-button",attributes:{part:"choose"},$props:{size:"sm",variant:"accent",disabled:{$ref:"$map/item/busy"}},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/choose"},value:[{$ref:"$map/item/id"}]}]},children:[{tagName:"span",textContent:"${$map.item.label}"}]}]}}]}]}}}]}]};T("cf-account-picker",d);function h(t){let a=t.choosing!=="";return{...t,failureMessage:`Cloudflare could not be reached: ${t.failure}`,hasFailure:t.failure!=="",listState:t.loading?"loading":t.accounts.length>0?"listed":t.failure!==""?"failed":"empty",rows:t.accounts.map((o)=>({busy:a,id:o.id,label:t.choosing===o.id?"Selecting…":"Use this account",name:o.name}))}}function f(t){let a=document.createElement("div");a.style.pointerEvents="auto",a.setAttribute(Ue,ft("dialog","cf-accounts")),t.layer.append(a);let o=!1,s=()=>{if(o)return;o=!0,t.onClosed()},u=()=>o,n=g({...h({accounts:[],choosing:"",failure:"",loading:!0}),choose:(e)=>{t.onChoose(e)},closed:s,retry:()=>{t.onRetry()}}),l=null,c=R("cf-account-picker",n,a).then(async(e)=>{l=e;let i=e.root;if(u())return e.dispose(),i;if(await Yt(i),u())return i;return Ot(i),i});return{close(){if(o)return;let e=l?.root;if(e instanceof HTMLElement)Nt(e);l?.dispose(),l=null,a.remove(),s()},host:a,ready:c,update(e){Object.assign(n,h({accounts:e.accounts??n.accounts,choosing:e.choosing??n.choosing,failure:e.failure??n.failure,loading:e.loading??n.loading}))}}}function w(){if(!_e())return!1;let t=p();return Boolean(t.cfAccounts&&t.cfSelectAccount)}function H(){if(!w())return Promise.resolve(null);return new Promise((t)=>{let a=[],o="",s=!1,u=(r)=>{if(s)return;s=!0,c.close(),t(r)};async function n(){c.update({failure:"",loading:!0});let r="";try{a=await p().cfAccounts?.()??[]}catch(e){a=[],r=ee(e)}if(s)return;c.update({accounts:a,failure:r,loading:!1})}async function l(r){let e=a.find((i)=>i.id===r);if(!e||o!=="")return;o=r,c.update({choosing:r,failure:""});try{await p().cfSelectAccount?.({id:e.id,name:e.name})}catch(i){if(o="",!s)c.update({choosing:"",failure:ee(i)});return}um(),u(e)}let c=f({layer:tt("dialog"),onChoose:(r)=>{l(r)},onClosed:()=>{u(null)},onRetry:()=>{n()}});n()})}export{H as openCfAccountPicker};
2
-
3
- //# debugId=4E304B4185034BAB64756E2164756E21
4
- //# sourceMappingURL=cf-account-picker-z1sgwpwd.js.map
@@ -1,4 +0,0 @@
1
- import{db,DE,NE,Q2,AE}from"./studio-h7gy12h2.js";import"./studio-xebavr9s.js";import"./studio-ahf3cspq.js";import"./studio-w67vfgy5.js";export{AE as clearCfConnection,NE as getCfAccountId,db as getCfToken,Q2 as setCfAccountId,DE as setCfToken};
2
-
3
- //# debugId=0E7B9727EB82F81064756E2164756E21
4
- //# sourceMappingURL=cf-settings-xqvhxxe9.js.map
@@ -1,4 +0,0 @@
1
- import{Ne,Zw,xa,Mb,jc,Hc}from"./studio-nf0pqpbj.js";import"./studio-w67vfgy5.js";export{Zw as _componentRegistryLoaded,jc as buildComponentInstance,Ne as componentRegistry,Hc as computeRelativePath,xa as loadComponentRegistry,Mb as noteComponentSaved};
2
-
3
- //# debugId=B06E555D0907927464756E2164756E21
4
- //# sourceMappingURL=components-whsc81a7.js.map
@@ -1,4 +0,0 @@
1
- import{mb,rS,sS,gb,tT,nT,iT}from"./studio-mwnmzx7g.js";import"./studio-ga77mf07.js";import"./studio-6vwvshw8.js";import"./studio-qyb5bebs.js";import"./studio-zxm98z2m.js";import"./studio-ggm7zf70.js";import"./studio-695k95bw.js";import"./studio-nf0pqpbj.js";import"./studio-dbgv4fv9.js";import"./studio-va0e63sk.js";import"./studio-20ap8dds.js";import"./studio-5dmgmyw4.js";import"./studio-8x8616xd.js";import"./studio-xebavr9s.js";import"./studio-cvz0e00f.js";import"./studio-x2metr13.js";import"./studio-f2j9et3h.js";import"./studio-dy2xtt7a.js";import"./studio-0hr000ba.js";import"./studio-pd9dsqpq.js";import"./studio-j933k8nr.js";import"./studio-yg5n49za.js";import"./studio-4nkm4404.js";import"./studio-ahf3cspq.js";import"./studio-et6t8g4m.js";import"./studio-848rk4p1.js";import"./studio-w67vfgy5.js";export{rS as collectionDirs,mb as collectionInfo,sS as collectionSourceDirs,nT as createCollectionSource,iT as createPagesSource,gb as listCollectionEntryIds,tT as reloadDraftAwareGrids};
2
-
3
- //# debugId=A52099944B7F1D8F64756E2164756E21
4
- //# sourceMappingURL=content-source-jwtxg78w.js.map
@@ -1,4 +0,0 @@
1
- import{z2,Wf,W2,V2,U2,np,q2,G2,ba,Y0,yd,K2,Wn,we}from"./studio-vjhej0w5.js";export{z2 as CancellationTokenSource,Wf as Emitter,W2 as KeyCode,V2 as KeyMod,ba as MarkerSeverity,Y0 as MarkerTag,U2 as Position,np as Range,q2 as Selection,G2 as SelectionDirection,K2 as Token,yd as Uri,Wn as editor,we as languages};
2
-
3
- //# debugId=F46FDAF7D1F5D84764756E2164756E21
4
- //# sourceMappingURL=editor-zdqdpq1x.js.map
@@ -1,4 +0,0 @@
1
- import{B_,X2,bE}from"./studio-g5prntab.js";import"./studio-jgbvqcgh.js";import"./studio-pzfa2vmb.js";import"./studio-bkmv1h3e.js";import"./studio-jw0q5j6k.js";import"./studio-zacvfm31.js";import"./studio-56egy6vf.js";import"./studio-mwnmzx7g.js";import"./studio-pmzg17fj.js";import"./studio-5e7p1vgd.js";import"./studio-ga77mf07.js";import"./studio-6vwvshw8.js";import"./studio-vcz63n42.js";import"./studio-qyb5bebs.js";import"./studio-zxm98z2m.js";import"./studio-ggm7zf70.js";import"./studio-695k95bw.js";import"./studio-nf0pqpbj.js";import"./studio-dbgv4fv9.js";import"./studio-va0e63sk.js";import"./studio-20ap8dds.js";import"./studio-5dmgmyw4.js";import"./studio-8x8616xd.js";import"./studio-xebavr9s.js";import"./studio-cvz0e00f.js";import"./studio-x2metr13.js";import"./studio-f2j9et3h.js";import"./studio-dy2xtt7a.js";import"./studio-0hr000ba.js";import"./studio-pd9dsqpq.js";import"./studio-j933k8nr.js";import"./studio-yg5n49za.js";import"./studio-4nkm4404.js";import"./studio-ahf3cspq.js";import"./studio-et6t8g4m.js";import"./studio-848rk4p1.js";import"./studio-w67vfgy5.js";import"./studio-k1wvtp03.js";export{X2 as createEntry,B_ as entryFormatName,bE as registerContentCommands};
2
-
3
- //# debugId=7BED9BB0320B1EFB64756E2164756E21
4
- //# sourceMappingURL=entry-commands-w8p2fbpt.js.map
@@ -1,4 +0,0 @@
1
- import"./studio-w67vfgy5.js";import{Ht,ed,Qd}from"./studio-848rk4p1.js";import"./studio-et6t8g4m.js";import{g}from"./studio-ahf3cspq.js";import"./studio-j933k8nr.js";import"./studio-yg5n49za.js";import"./studio-4nkm4404.js";import"./studio-f2j9et3h.js";import"./studio-zacvfm31.js";import"./studio-x2metr13.js";import{T,R,Zs,tt}from"./studio-cvz0e00f.js";import"./studio-5e7p1vgd.js";import"./studio-k1wvtp03.js";import"./studio-8qejv8yf.js";import{MR,PR,Ol,FR,Wk,Iu}from"./studio-1wyp7dt5.js";import{nS,HD,YE,XE}from"./studio-fyf7j57j.js";import"./studio-0hr000ba.js";import"./studio-pd9dsqpq.js";import"./studio-dy2xtt7a.js";import"./studio-8x8616xd.js";import"./studio-xebavr9s.js";import"./studio-dbgv4fv9.js";import"./studio-zxm98z2m.js";import"./studio-qyb5bebs.js";import"./studio-ggm7zf70.js";import"./studio-mwnmzx7g.js";import"./studio-5dmgmyw4.js";import"./studio-20ap8dds.js";import"./studio-695k95bw.js";import"./studio-nf0pqpbj.js";import"./studio-va0e63sk.js";import"./studio-ga77mf07.js";import"./studio-6vwvshw8.js";import{n,_}from"./studio-zsjpsw08.js";var h={$schema:"https://jxsuite.com/schema/v1",$id:"StudioDataActions",$description:"The actions row a data-domain settings section grows: test a connection, push the schema, open the rows as a grid. It is an ISLAND inside `surfaces/settings-contributed.json` — the generic contributed-section renderer stays extension-agnostic and draws an empty host, and `panels/data-grid.ts` mounts this into it — which is the seam that lets the data surface contribute verbs without the settings machinery learning what a connection is.",tagName:"div",attributes:{part:"data-actions"},style:{display:"flex",flexWrap:"wrap",alignItems:"center",gap:"var(--jx-space-2)",fontFamily:"var(--jx-font-sans)",fontSize:"var(--jx-text-md)",'& [part="result"]':{fontSize:"var(--jx-text-sm)",color:"var(--fg-dim)"},'& [part="result"][data-ok="false"]':{color:"var(--danger)"},'& [part="result"][data-ok="true"]':{color:"var(--success, var(--accent))"}},children:[{tagName:"span",attributes:{part:"test-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/testState"},cases:{shown:{tagName:"jx-button",attributes:{part:"test"},$props:{variant:"secondary",size:"sm",disabled:{$ref:"#/state/testDisabled"}},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/test"},value:[]}]},children:[{tagName:"span",textContent:"${state.testLabel}"}]}}},{tagName:"jx-button",attributes:{part:"push"},$props:{variant:"secondary",size:"sm"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/push"},value:[]}]},children:[{tagName:"span",textContent:"Push Schema"}]},{tagName:"jx-button",attributes:{part:"grid"},$props:{variant:"secondary",size:"sm"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/openGrid"},value:[]}]},children:[{tagName:"span",textContent:"Open Data Grid"}]},{tagName:"span",attributes:{part:"result-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/resultState"},cases:{shown:{$description:"The last test's verdict, and a live region because it arrives after the press that asked for it.",tagName:"span",attributes:{part:"result",role:"status","data-ok":"${state.resultOk}",title:"${state.resultTitle}"},textContent:"${state.resultText}"}}}]};T("data-actions",h);function S(t,e){t.testState=e.testState,t.testLabel=e.testLabel,t.testDisabled=e.testDisabled,t.resultState=e.resultState,t.resultOk=e.resultOk,t.resultText=e.resultText,t.resultTitle=e.resultTitle}function y(t,e,o){let a=g({openGrid:o.openGrid,push:o.push,resultOk:"false",resultState:"hidden",resultText:"",resultTitle:"",test:o.test,testDisabled:!1,testLabel:"Test Connection",testState:"hidden"});S(a,e);let s=null,l=!1,r=R("data-actions",a,t).then((i)=>{let d=i.root;if(l)return i.dispose(),d;return s=i,d});return{dispose(){l=!0,s?.dispose(),s=null},ready:r,update:(i)=>S(a,i)}}var b={$schema:"https://jxsuite.com/schema/v1",$id:"StudioPushPlan",$description:"What pushing the schema would do, or what it did. The dry run is the whole point of the surface: a push rewrites a live database's shape, so the plan is read before the apply, and the confirm dialog around this document is the one that gates it. The ISLAND of `ui/layers.ts`'s confirm dialog rather than a dialog of its own (studio-ui-guidelines.md §12.5).",tagName:"div",attributes:{part:"plan"},style:{display:"flex",flexDirection:"column",gap:"var(--jx-space-2)",minWidth:"0",fontFamily:"var(--jx-font-sans)",fontSize:"var(--jx-text-md)",color:"var(--fg)",'& [part="steps"]':{margin:"0",padding:"0",listStyle:"none",display:"flex",flexDirection:"column",gap:"2px",maxHeight:"40vh",overflowY:"auto"},'& [part="step"]':{fontFamily:"var(--font-mono)",fontSize:"var(--jx-text-sm)",padding:"2px var(--jx-space-2)",borderLeft:"2px solid var(--border)"},'& [part="step"][data-kind="drop"]':{borderLeftColor:"var(--danger)"},'& [part="step"][data-kind="create"]':{borderLeftColor:"var(--success, var(--accent))"},'& [part="warning"]':{margin:"0",fontSize:"var(--jx-text-sm)",color:"var(--warning, var(--fg-dim))"},'& [part="failure"]':{$description:'`failure` rather than `error`: every kit field draws a permanent, empty `[part="error"]` of its own, and the kit is light DOM, so a rule on that name here would reach any field the plan ever holds.',margin:"0",fontSize:"var(--jx-text-sm)",color:"var(--danger)"}},children:[{tagName:"ul",attributes:{part:"steps"},children:[{$prototype:"Array",items:{$ref:"#/state/steps"},key:{$ref:"$map/item/key"},map:{tagName:"li",attributes:{part:"step","data-kind":"${$map.item.kind}"},textContent:"${$map.item.summary}"}}]},{$prototype:"Array",items:{$ref:"#/state/warnings"},key:{$ref:"$map/item/key"},map:{tagName:"p",attributes:{part:"warning"},textContent:"${$map.item.text}"}},{$prototype:"Array",items:{$ref:"#/state/errors"},key:{$ref:"$map/item/key"},map:{tagName:"p",attributes:{part:"failure",role:"alert"},textContent:"${$map.item.text}"}}]};T("push-plan",b);function x(t,e){let o=g({errors:e.errors,steps:e.steps,warnings:e.warnings}),a=null,s=!1,l=R("push-plan",o,t).then((r)=>{if(s)r.dispose();else a=r;return r.root});return{dispose(){s=!0,a?.dispose(),a=null},ready:l,update(r){o.steps=r.steps,o.warnings=r.warnings,o.errors=r.errors}}}var u=null;function v(){let t=u;u=null,t?.plan?.dispose(),t?.handle.close()}function P(t,e){return t.map((o,a)=>({key:`${e}:${a}`,text:o}))}function k(t){let e=t.phase==="done"?t.result:t.dryRun;return{errors:P(e?.errors??[],"error"),steps:(e?.plan??[]).map((o,a)=>({key:`${o.kind}:${a}`,kind:o.kind,summary:o.summary})),warnings:P(e?.warnings??[],"warning")}}function H(t){if(t.phase==="loading")return"Compiling plan…";if(t.phase==="applying")return"Applying…";if(t.phase==="done")return t.result?.applied?"Schema applied.":"Push failed.";let e=t.dryRun?.plan.length??0,o=t.dryRun?.errors?.length??0;return e===0&&o===0?"Nothing to push — the schema is up to date.":""}function m(){let t=u;if(!t)return;let e=t.phase==="confirm"&&(t.dryRun?.plan.length??0)>0;t.handle.update({cancelLabel:t.phase==="done"?"Close":"Cancel",confirmLabel:e?"Apply":"",message:H(t)}),t.plan?.update(k(t))}async function N(t,e){if(u)return;let o={connection:t,dryRun:null,onDone:e,phase:"loading",plan:null,result:null},a=Zs({cancelLabel:"Cancel",confirmLabel:"",headline:t?`Push Schema — ${t}`:"Push Schema",island:(i)=>{o.plan=x(i,k(o))},layer:tt("dialog"),message:"Compiling plan…",onCancel:v,onClosed:()=>{if(u===o)v()},onConfirm:()=>{j()},region:"data/push"}),s=Object.assign(o,{handle:a});u=s;let l={dryRun:!0};if(t!==void 0)l.connection=t;let r=await YE(l);if(u!==s)return;s.dryRun=r,s.phase="confirm",m()}async function j(){let t=u;if(!t)return;t.phase="applying",m();let e=await YE(t.connection===void 0?{}:{connection:t.connection});if(u!==t)return;t.result=e,t.phase="done",m(),t.onDone()}var c={pushing:!1,testResult:null,testing:null},D=new Map;function w(t,e){let{testResult:o}=c;return{resultOk:o?.ok?"true":"false",resultState:o?"shown":"hidden",resultText:o?`${o.connection}: ${o.ok?"connected":o.error??"failed"}`:"",resultTitle:o?.error??"",testDisabled:!e||c.testing!==null,testLabel:c.testing?"Testing…":"Test Connection",testState:t==="connections"?"shown":"hidden"}}function A(t){if(t!=="connections"&&t!=="data"||!nS())return null;return(e,o)=>O(e,t,o)}async function E(t,e){c.testing=t,c.testResult=null,e();let o=await HD(t);c.testing=null,c.testResult={...o,connection:t},e()}function O(t,e,o){let{rerender:a,selected:s}=o,l=D.get(t);if(l){l.update(w(e,s));return}let r=()=>e==="connections"?o.selected??void 0:void 0;D.set(t,y(t,w(e,s),{openGrid:()=>{Iu(),XE()},push:()=>{N(r(),a)},test:()=>{let i=o.selected;if(i)E(i,a)}}))}var V=100;function G(t){let e=t.studio?.settings;if(!e)return null;let{key:o}=t.project,a=e.layout??"form",s=t.entrySchema??{},l=a==="map"?_(s.additionalProperties)?s.additionalProperties:{}:s,r=e.label??t.project.title??o,i={};if(e.entry!==void 0)i.entry=e.entry;if(e.layout!==void 0)i.layout=e.layout;return{contribution:{entrySchema:l,key:o,settings:i,title:r},group:PR(e.group)?e.group:MR,icon:e.icon,intro:n(e.intro)?e.intro:void 0,key:o,label:r,order:e.order??V}}var f=new Set,p=null;function dt(){return p??Promise.resolve()}function pt(){return p??=M().finally(()=>{p=null}),p}async function M(){let[t]=await Promise.all([ed(),Ht()]),e=new Set;for(let o of t)for(let a of o.contributions){let s=G(a);if(!s)continue;let{contribution:l}=s;Ol({group:s.group,icon:s.icon,intro:s.intro,key:s.key,label:s.label,order:s.order,render:(r)=>{let i=A(s.key),d={formats:Qd()};if(i!==null)d.actions=i;Wk(r,l,d)}}),e.add(s.key)}for(let o of f)if(!e.has(o))FR(o);f.clear();for(let o of e)f.add(o)}export{dt as extensionSectionsReady,pt as syncExtensionSettingsSections};
2
-
3
- //# debugId=FB2A449EC2B0134664756E2164756E21
4
- //# sourceMappingURL=extension-sections-y2p1te2r.js.map
@@ -1,4 +0,0 @@
1
- import{eN,jr,AT,sP,OT,wp,MT,_b,Sb}from"./studio-ga77mf07.js";import"./studio-6vwvshw8.js";import"./studio-qyb5bebs.js";import"./studio-zxm98z2m.js";import"./studio-ggm7zf70.js";import"./studio-695k95bw.js";import"./studio-nf0pqpbj.js";import"./studio-dbgv4fv9.js";import"./studio-va0e63sk.js";import"./studio-20ap8dds.js";import"./studio-5dmgmyw4.js";import"./studio-8x8616xd.js";import"./studio-xebavr9s.js";import"./studio-cvz0e00f.js";import"./studio-x2metr13.js";import"./studio-f2j9et3h.js";import"./studio-dy2xtt7a.js";import"./studio-0hr000ba.js";import"./studio-pd9dsqpq.js";import"./studio-j933k8nr.js";import"./studio-yg5n49za.js";import"./studio-4nkm4404.js";import"./studio-ahf3cspq.js";import"./studio-et6t8g4m.js";import"./studio-848rk4p1.js";import"./studio-w67vfgy5.js";export{_b as confirmFileDelete,MT as exportFile,sP as openFile,AT as parseCollabSource,eN as parseFormatSource,jr as parseSourceForPath,Sb as renamePromptMessage,wp as saveFile,OT as setDocumentSavedListener};
2
-
3
- //# debugId=98898593D0384B2D64756E2164756E21
4
- //# sourceMappingURL=file-ops-13ab4swj.js.map
@@ -1,4 +0,0 @@
1
- import{zs,pm,OE,ME,L2,PE,FE,jE,Z_,$2,pb,HE,I2,R2,BE,OD,D2,N2,fw,X_,MD,zE,A2,wi,Q_,WE,VE,fm,UE,O2,M2}from"./studio-thj81e98.js";import"./studio-4zqfw5ha.js";import"./studio-56egy6vf.js";import"./studio-fyf7j57j.js";import"./studio-mwnmzx7g.js";import"./studio-vxjap704.js";import"./studio-fep7hr66.js";import"./studio-5e7p1vgd.js";import"./studio-ga77mf07.js";import"./studio-6vwvshw8.js";import"./studio-5m0w815d.js";import"./studio-vcz63n42.js";import"./studio-qyb5bebs.js";import"./studio-zxm98z2m.js";import"./studio-ggm7zf70.js";import"./studio-695k95bw.js";import"./studio-nf0pqpbj.js";import"./studio-dbgv4fv9.js";import"./studio-va0e63sk.js";import"./studio-20ap8dds.js";import"./studio-5dmgmyw4.js";import"./studio-8x8616xd.js";import"./studio-xebavr9s.js";import"./studio-cvz0e00f.js";import"./studio-x2metr13.js";import"./studio-f2j9et3h.js";import"./studio-dy2xtt7a.js";import"./studio-0hr000ba.js";import"./studio-pd9dsqpq.js";import"./studio-j933k8nr.js";import"./studio-yg5n49za.js";import"./studio-4nkm4404.js";import"./studio-ahf3cspq.js";import"./studio-et6t8g4m.js";import"./studio-848rk4p1.js";import"./studio-w67vfgy5.js";export{I2 as FILE_ROW_HEIGHT,BE as canMoveInto,N2 as createFileIn,Z_ as findHomePage,jE as initProjectRepo,R2 as isFileDrag,fw as listTakenNames,zs as loadDirectory,PE as loadProject,pm as loadProjectDirectories,O2 as mountFilesPanel,MD as notifyMoveOutcome,Q_ as openFileInPane,wi as openFileInTab,$2 as openHomePage,pb as openLastSessionOrHome,FE as openProject,zE as parentDirOf,D2 as pickAndUploadTo,OE as refreshProjectDirectoriesFor,UE as registerFilesPanel,WE as reloadCleanTab,fm as reloadFileInTab,VE as reloadTabsIfChanged,HE as setSessionWorkspaceShow,L2 as setShowIgnoredFiles,A2 as settleRename,ME as showIgnoredFiles,M2 as unmountFilesPanel,OD as uploadFilesToDir,X_ as writeNewFile};
2
-
3
- //# debugId=2DD183C506EF8F3A64756E2164756E21
4
- //# sourceMappingURL=files-zbc8p6v1.js.map
@@ -1,4 +0,0 @@
1
- import{Ht,Lh,ed,kv,Ux,ec,Qd,Na,Wi,of,fn,ul,Ev,lr,oI,Aa,rI}from"./studio-848rk4p1.js";import"./studio-w67vfgy5.js";export{lr as defaultContentFormat,ul as documentExtensions,Na as formatByExtension,Wi as formatByName,fn as formatForPath,oI as formatParse,Aa as formatSerialize,Ux as getExtensionCatalog,kv as getExtensions,Qd as getFormats,ed as loadExtensions,Ht as loadFormats,of as noFormatError,ec as refreshExtensionUi,Lh as refreshFormats,Ev as routedPageExtensions,rI as splitFormatDocument};
2
-
3
- //# debugId=FA4C4FED9FF2A13464756E2164756E21
4
- //# sourceMappingURL=format-host-zjsbktbx.js.map
@@ -1,4 +0,0 @@
1
- import{Ta,Bd,C$}from"./studio-dy2xtt7a.js";import"./studio-0hr000ba.js";import"./studio-pd9dsqpq.js";import"./studio-j933k8nr.js";import"./studio-yg5n49za.js";import"./studio-4nkm4404.js";import"./studio-ahf3cspq.js";import"./studio-et6t8g4m.js";import"./studio-848rk4p1.js";import"./studio-w67vfgy5.js";export{Bd as isRecentLocal,Ta as markLocalMutation,C$ as startFsSync};
2
-
3
- //# debugId=7C62BDF0702E7C2064756E2164756E21
4
- //# sourceMappingURL=fs-events-t6x0hch6.js.map
@@ -1,4 +0,0 @@
1
- import{ZE,zD,oS,XE,QE}from"./studio-fyf7j57j.js";import"./studio-mwnmzx7g.js";import"./studio-ga77mf07.js";import"./studio-6vwvshw8.js";import"./studio-qyb5bebs.js";import"./studio-zxm98z2m.js";import"./studio-ggm7zf70.js";import"./studio-695k95bw.js";import"./studio-nf0pqpbj.js";import"./studio-dbgv4fv9.js";import"./studio-va0e63sk.js";import"./studio-20ap8dds.js";import"./studio-5dmgmyw4.js";import"./studio-8x8616xd.js";import"./studio-xebavr9s.js";import"./studio-cvz0e00f.js";import"./studio-x2metr13.js";import"./studio-f2j9et3h.js";import"./studio-dy2xtt7a.js";import"./studio-0hr000ba.js";import"./studio-pd9dsqpq.js";import"./studio-j933k8nr.js";import"./studio-yg5n49za.js";import"./studio-4nkm4404.js";import"./studio-ahf3cspq.js";import"./studio-et6t8g4m.js";import"./studio-848rk4p1.js";import"./studio-w67vfgy5.js";export{zD as openCollectionGrid,ZE as openCsvGridTab,XE as openGridSourcePicker,oS as openPagesGrid,QE as registerGridCommands};
2
-
3
- //# debugId=AD25A9B3B968468764756E2164756E21
4
- //# sourceMappingURL=grid-open-fyzdwpkh.js.map
@@ -1,4 +0,0 @@
1
- import{cL,dL,uL,hL,qS,Db,Nb,GS,Ul,pL,fL,mL,Ab,B2,aP,gL,Fc,Gw,Kw,bL,vL,yL,wL,xL,_L,SL,CL,kL,EL,TL,LL,KS,$L,Ob,IL,RL,DL,NL,AL,OL,Jw,ML,ql,PL,ih,FL,Yw,JS}from"./studio-695k95bw.js";import"./studio-nf0pqpbj.js";import"./studio-dbgv4fv9.js";import"./studio-va0e63sk.js";import"./studio-5dmgmyw4.js";import"./studio-xebavr9s.js";import"./studio-f2j9et3h.js";import"./studio-pd9dsqpq.js";import"./studio-j933k8nr.js";import"./studio-yg5n49za.js";import"./studio-4nkm4404.js";import"./studio-ahf3cspq.js";import"./studio-et6t8g4m.js";import"./studio-848rk4p1.js";import"./studio-w67vfgy5.js";export{gL as adoptCanvasPreviewMode,dL as allowAutoRequestsOnNextRender,Nb as beginDragSession,pL as canvasIdleBlockers,mL as canvasPointAt,Kw as clearDropIndicator,Yw as commitActiveEditSession,GS as currentDragSession,$L as dragHostTab,Gw as endDragSession,hL as flushCanvasEdits,JS as getEditBarAnchorRect,ql as getEditSnapshot,Ul as hostDragGeometry,qS as hostForCanvas,SL as isCaretActive,Db as liveDragHostAt,aP as measureInCanvas,IL as mountIframeCanvas,RL as mountStylebookCanvas,ML as panToStylebookTag,fL as pointerAnchor,ih as postApplyFormat,DL as postColorSchemeToLiveHosts,LL as postDialogOpen,Fc as postDragMessage,NL as postLocaleToLiveHosts,FL as postOpenSlash,KS as postPatchToHosts,TL as postPopoverOpen,AL as postRedefineElementToLiveHosts,OL as postSiteStyleToLiveHosts,Jw as postStyleUpdateToStylebookHosts,Ob as releaseCanvasHosts,uL as requestCanvasEval,Ab as revealCanvasPath,B2 as revealCanvasPathIn,cL as sawIframeDragOver,xL as setCanvasContextMenuHandler,kL as setCanvasPointerDownHandler,wL as setCanvasSlashHandler,yL as setFileDropHandler,EL as setIframePatchEscalation,vL as setInsertZoneClickHandler,PL as setKeymapSource,bL as setNativeDragEnterHandler,_L as setStylebookHitHandler,CL as setToolbarRefresh};
2
-
3
- //# debugId=753DA87DDA3177B764756E2164756E21
4
- //# sourceMappingURL=iframe-host-kbyqc7pt.js.map
@@ -1,4 +0,0 @@
1
- import{HI,BI,zI,WI,VI,xu,UI,Mg,qI,Vf,GI,Uf,h2,X0,ck,p2,f2,m2,g2,_u,b2,v2,y2,dk,uk,w2,x2,_2,S2,hk,C2}from"./studio-a3s6frde.js";import{wd,Q0,Pg,k2,ZI,XI,QI,eR,Fg,mk,gk}from"./studio-9rcbvksg.js";import{Ws,nP}from"./studio-07k0geap.js";import{Se,oe,Lv,$v}from"./studio-tpy3rdxn.js";export{VI as COLLAB_SCHEMA_VERSION,_u as CollabPathError,Fg as EnvelopeError,XI as FRAME_AWARENESS,eR as FRAME_CONTROL,QI as FRAME_DOC_CLOSE,ZI as FRAME_DOC_SYNC,BI as FRONTMATTER_KEY,f2 as LOCAL_ORIGIN,HI as META_KEY,m2 as MIRROR_ORIGIN,hk as PRESENCE_PALETTE,g2 as SEED_ORIGIN,WI as SOURCE_KEY,zI as STRUCTURE_KEY,k2 as UndoManager,wd as YDoc,w2 as acquireSourceCanonical,$v as applyDocOpToDoc,b2 as applyDocOpsToY,dk as canonicalOf,uk as canonicalRevOf,Lv as childArray,Se as cloneValue,C2 as colorForKey,Pg as createAbsolutePositionFromRelativePosition,Q0 as createRelativePositionFromTypeIndex,gk as decodeFrame,Ws as deepEqual,nP as diffDocs,mk as encodeFrame,UI as frontmatterMap,oe as getNodeAtPath,S2 as isSourceReconciler,xu as metaMap,_2 as otherSourceEditors,x2 as releaseSourceCanonical,y2 as replaceYStructure,X0 as resolveYPath,p2 as seedStructure,qI as sourceText,Mg as structureMap,Vf as toYChildren,GI as toYNode,ck as updateSourceText,h2 as yDocToJson,v2 as yEventsToDocOps,Uf as yValueToJson};
2
-
3
- //# debugId=0DAFEC162E507B3D64756E2164756E21
4
- //# sourceMappingURL=index-6nvj89vb.js.map
@@ -1,4 +0,0 @@
1
- import{eP,hm,tP,Bu}from"./studio-8qejv8yf.js";export{eP as applyProjectSchemas,hm as validateDoc,tP as validateDocOrNull,Bu as validateProjectConfig};
2
-
3
- //# debugId=DCDFDCA01E5FB08964756E2164756E21
4
- //# sourceMappingURL=jx-validate-5sp8a4rm.js.map
@@ -1,4 +0,0 @@
1
- import{T2,Rk}from"./studio-sd07xva5.js";import"./studio-hsr3k06v.js";import"./studio-p0nf2e1f.js";import"./studio-291gqh98.js";import"./studio-jh6t5qz4.js";import"./studio-jw0q5j6k.js";import"./studio-zacvfm31.js";import"./studio-4zqfw5ha.js";import"./studio-76t560kn.js";import"./studio-pmzg17fj.js";import"./studio-5e7p1vgd.js";import"./studio-ga77mf07.js";import"./studio-6vwvshw8.js";import"./studio-vcz63n42.js";import"./studio-qyb5bebs.js";import"./studio-zxm98z2m.js";import"./studio-ggm7zf70.js";import"./studio-695k95bw.js";import"./studio-nf0pqpbj.js";import"./studio-dbgv4fv9.js";import"./studio-va0e63sk.js";import"./studio-20ap8dds.js";import"./studio-5dmgmyw4.js";import"./studio-8x8616xd.js";import"./studio-xebavr9s.js";import"./studio-cvz0e00f.js";import"./studio-x2metr13.js";import"./studio-f2j9et3h.js";import"./studio-dy2xtt7a.js";import"./studio-0hr000ba.js";import"./studio-pd9dsqpq.js";import"./studio-j933k8nr.js";import"./studio-yg5n49za.js";import"./studio-4nkm4404.js";import"./studio-ahf3cspq.js";import"./studio-et6t8g4m.js";import"./studio-848rk4p1.js";import"./studio-w67vfgy5.js";import"./studio-k1wvtp03.js";export{Rk as registerLayersPanel,T2 as startLayerTitleEdit};
2
-
3
- //# debugId=8CE1D9B01A09470664756E2164756E21
4
- //# sourceMappingURL=layers-panel-qrxj9vr2.js.map
@@ -1,4 +0,0 @@
1
- import{tt,f$,qb,m$,qo,pC,Qn,Xs,Gb,g$}from"./studio-cvz0e00f.js";import"./studio-x2metr13.js";import"./studio-f2j9et3h.js";import"./studio-4nkm4404.js";import"./studio-ahf3cspq.js";import"./studio-et6t8g4m.js";export{Gb as clearLayerSlot,Xs as getLayerSlot,f$ as initLayers,qb as isModalOpen,m$ as isPopoverOpen,tt as layerHost,g$ as overlayIdleBlockers,qo as showConfirmDialog,Qn as showPromptDialog,pC as showSaveDiscardDialog};
2
-
3
- //# debugId=AB9810CBDB74E9FC64756E2164756E21
4
- //# sourceMappingURL=layers-tpzayggx.js.map
@@ -1,4 +0,0 @@
1
- import{Vr,qc,mt,b$,io}from"./studio-x2metr13.js";export{b$ as _$LH,Vr as html,qc as noChange,mt as nothing,io as render};
2
-
3
- //# debugId=F5375AC98F6C752D64756E2164756E21
4
- //# sourceMappingURL=lit-html-x6nrxsx3.js.map
@@ -1,4 +0,0 @@
1
- import{iP,wb,KD,fS,_w,LT,$T,P2,oP,F2,mS,rP,IT}from"./studio-cqf1k4qk.js";import"./studio-76t560kn.js";import"./studio-pmzg17fj.js";import"./studio-5e7p1vgd.js";import"./studio-ga77mf07.js";import"./studio-6vwvshw8.js";import"./studio-5m0w815d.js";import"./studio-vcz63n42.js";import"./studio-qyb5bebs.js";import"./studio-zxm98z2m.js";import"./studio-ggm7zf70.js";import"./studio-695k95bw.js";import"./studio-nf0pqpbj.js";import"./studio-dbgv4fv9.js";import"./studio-va0e63sk.js";import"./studio-20ap8dds.js";import"./studio-5dmgmyw4.js";import"./studio-8x8616xd.js";import"./studio-xebavr9s.js";import"./studio-cvz0e00f.js";import"./studio-x2metr13.js";import"./studio-f2j9et3h.js";import"./studio-dy2xtt7a.js";import"./studio-0hr000ba.js";import"./studio-pd9dsqpq.js";import"./studio-j933k8nr.js";import"./studio-yg5n49za.js";import"./studio-4nkm4404.js";import"./studio-ahf3cspq.js";import"./studio-et6t8g4m.js";import"./studio-848rk4p1.js";import"./studio-w67vfgy5.js";export{iP as MEDIA_HOME_MODE,P2 as applyMediaBrowse,mS as closeMediaPickDialog,KD as deleteMediaFile,_w as detachMediaLibrary,$T as focusMediaHome,fS as mediaLibraryMounted,rP as openMediaPickDialog,LT as renderMediaLibrary,F2 as requestMediaReplace,oP as requestMediaUpload,IT as resetMediaLibrary,wb as selectedEntry};
2
-
3
- //# debugId=45763B3695D53CC464756E2164756E21
4
- //# sourceMappingURL=media-library-ywppnjrz.js.map
@@ -1,4 +0,0 @@
1
- import{DT,NT,Wu,kw,j2,vS,H2,yS,Hl,bm}from"./studio-pmzg17fj.js";import"./studio-vcz63n42.js";import"./studio-20ap8dds.js";import"./studio-5dmgmyw4.js";import"./studio-cvz0e00f.js";import"./studio-x2metr13.js";import"./studio-f2j9et3h.js";import"./studio-0hr000ba.js";import"./studio-pd9dsqpq.js";import"./studio-j933k8nr.js";import"./studio-yg5n49za.js";import"./studio-4nkm4404.js";import"./studio-ahf3cspq.js";import"./studio-et6t8g4m.js";import"./studio-848rk4p1.js";import"./studio-w67vfgy5.js";export{kw as invalidateMediaCache,DT as isMediaScanPath,Hl as mountMediaPicker,NT as onProjectMediaChange,j2 as openFullMediaPicker,yS as pickAndUpload,Wu as projectMediaFiles,vS as showMediaPickerPopover,bm as unmountMediaPicker,H2 as uploadAndAssign};
2
-
3
- //# debugId=ED26FA4C064B4D5964756E2164756E21
4
- //# sourceMappingURL=media-picker-etxgc8qq.js.map
@@ -1,4 +0,0 @@
1
- import{Kp,gv,bv,K$,Yd,Jp,Zd,Yp}from"./studio-yg5n49za.js";import"./studio-ahf3cspq.js";export{Kp as BUFFER_COMMIT,Yd as bufferIsLive,Jp as bufferMovedOn,gv as bufferWrites,K$ as cancelBufferWrites,bv as commitBufferWrites,Zd as commitTabBuffers,Yp as tabBufferUnsaved};
2
-
3
- //# debugId=790E0C043D3FF7A664756E2164756E21
4
- //# sourceMappingURL=monaco-buffer-qrnqhk0b.js.map
@@ -1,4 +0,0 @@
1
- import{Xd,ta,C,Th,dl,tf,Sv}from"./studio-ahf3cspq.js";export{dl as clearProblems,Th as dismiss,C as notify,Sv as problemCount,tf as problemFindings,ta as problems,Xd as toasts};
2
-
3
- //# debugId=50C5B16CB0D4E70164756E2164756E21
4
- //# sourceMappingURL=notify-kcv38wwe.js.map
@@ -1,4 +0,0 @@
1
- import{ee}from"./studio-et6t8g4m.js";export{ee as errorMessage};
2
-
3
- //# debugId=49B8EDB00CF264CF64756E2164756E21
4
- //# sourceMappingURL=parse-df2kkmhc.js.map
@@ -1,4 +0,0 @@
1
- import{rf,sI,Tv,aI,p,_e}from"./studio-w67vfgy5.js";export{rf as canOpenProject,p as getPlatform,_e as hasPlatform,Tv as launcherSignal,aI as platformInFlight,sI as registerPlatform};
2
-
3
- //# debugId=6149BBFCC07A9BA664756E2164756E21
4
- //# sourceMappingURL=platform-dtsysmyd.js.map
@@ -1,4 +0,0 @@
1
- import{wk,Y2}from"./studio-yhz5b313.js";import"./studio-h7gy12h2.js";import"./studio-zxm98z2m.js";import"./studio-dbgv4fv9.js";import"./studio-8x8616xd.js";import"./studio-xebavr9s.js";import"./studio-cvz0e00f.js";import"./studio-x2metr13.js";import"./studio-f2j9et3h.js";import"./studio-j933k8nr.js";import"./studio-yg5n49za.js";import"./studio-4nkm4404.js";import"./studio-ahf3cspq.js";import"./studio-et6t8g4m.js";import"./studio-848rk4p1.js";import"./studio-w67vfgy5.js";export{Y2 as openPublishPanel,wk as seedPublishConnected};
2
-
3
- //# debugId=53A3503D776FD3F764756E2164756E21
4
- //# sourceMappingURL=publish-panel-evb1rcxt.js.map
@@ -1,4 +0,0 @@
1
- import{nR,xk,o_,r_,_k}from"./studio-ch8gt8vt.js";import"./studio-vffwe9k7.js";import"./studio-vxjap704.js";import"./studio-fep7hr66.js";import"./studio-5m0w815d.js";import"./studio-vcz63n42.js";import"./studio-qyb5bebs.js";import"./studio-zxm98z2m.js";import"./studio-ggm7zf70.js";import"./studio-695k95bw.js";import"./studio-nf0pqpbj.js";import"./studio-dbgv4fv9.js";import"./studio-va0e63sk.js";import"./studio-20ap8dds.js";import"./studio-5dmgmyw4.js";import"./studio-8x8616xd.js";import"./studio-xebavr9s.js";import"./studio-cvz0e00f.js";import"./studio-x2metr13.js";import"./studio-f2j9et3h.js";import"./studio-0hr000ba.js";import"./studio-pd9dsqpq.js";import"./studio-j933k8nr.js";import"./studio-yg5n49za.js";import"./studio-4nkm4404.js";import"./studio-ahf3cspq.js";import"./studio-et6t8g4m.js";import"./studio-848rk4p1.js";import"./studio-w67vfgy5.js";export{r_ as detachPublishWorkspace,xk as focusPublishHome,o_ as publishWorkspaceMounted,_k as renderPublishWorkspace,nR as showPublishTab};
2
-
3
- //# debugId=D7F8A122C50D058864756E2164756E21
4
- //# sourceMappingURL=publish-workspace-ktk9h536.js.map
@@ -1,4 +0,0 @@
1
- import{Sk,zg}from"./studio-4smcnv33.js";import"./studio-thj81e98.js";import"./studio-4zqfw5ha.js";import"./studio-56egy6vf.js";import"./studio-fyf7j57j.js";import"./studio-mwnmzx7g.js";import"./studio-vxjap704.js";import"./studio-fep7hr66.js";import"./studio-5e7p1vgd.js";import"./studio-ga77mf07.js";import"./studio-6vwvshw8.js";import"./studio-5m0w815d.js";import"./studio-vcz63n42.js";import"./studio-qyb5bebs.js";import"./studio-zxm98z2m.js";import"./studio-ggm7zf70.js";import"./studio-695k95bw.js";import"./studio-nf0pqpbj.js";import"./studio-dbgv4fv9.js";import"./studio-va0e63sk.js";import"./studio-20ap8dds.js";import"./studio-5dmgmyw4.js";import"./studio-8x8616xd.js";import"./studio-xebavr9s.js";import"./studio-cvz0e00f.js";import"./studio-x2metr13.js";import"./studio-f2j9et3h.js";import"./studio-dy2xtt7a.js";import"./studio-0hr000ba.js";import"./studio-pd9dsqpq.js";import"./studio-j933k8nr.js";import"./studio-yg5n49za.js";import"./studio-4nkm4404.js";import"./studio-ahf3cspq.js";import"./studio-et6t8g4m.js";import"./studio-848rk4p1.js";import"./studio-w67vfgy5.js";export{Sk as initQuickSearch,zg as openQuickSearch};
2
-
3
- //# debugId=B1FD077F611E0D8464756E2164756E21
4
- //# sourceMappingURL=quick-search-2f47fxcw.js.map
@@ -1,4 +0,0 @@
1
- import{hh,zd,La,k$,Sr,E$,Qb,T$,ev}from"./studio-0hr000ba.js";import"./studio-et6t8g4m.js";import"./studio-w67vfgy5.js";export{Sr as invalidateUsages,La as loadUsages,E$ as onUsagesInvalidated,zd as peekUsages,k$ as retryUsages,ev as usageFiles,Qb as usageHeadline,T$ as usageWarning,hh as usagesSupported};
2
-
3
- //# debugId=96AF6378379C20D864756E2164756E21
4
- //# sourceMappingURL=references-5w6ajjv7.js.map
@@ -1,4 +0,0 @@
1
- import{dR,Ck,Z2,kk,Wg,Dl,Cu}from"./studio-cgb97rwv.js";import"./studio-hsr3k06v.js";import"./studio-p0nf2e1f.js";import"./studio-t3j8htp7.js";import"./studio-jh6t5qz4.js";import"./studio-pzfa2vmb.js";import"./studio-bkmv1h3e.js";import"./studio-zacvfm31.js";import"./studio-thj81e98.js";import"./studio-4zqfw5ha.js";import"./studio-56egy6vf.js";import"./studio-fyf7j57j.js";import"./studio-mwnmzx7g.js";import"./studio-vxjap704.js";import"./studio-fep7hr66.js";import"./studio-76t560kn.js";import"./studio-pmzg17fj.js";import"./studio-5e7p1vgd.js";import"./studio-ga77mf07.js";import"./studio-6vwvshw8.js";import"./studio-5m0w815d.js";import"./studio-vcz63n42.js";import"./studio-qyb5bebs.js";import"./studio-zxm98z2m.js";import"./studio-ggm7zf70.js";import"./studio-695k95bw.js";import"./studio-nf0pqpbj.js";import"./studio-dbgv4fv9.js";import"./studio-va0e63sk.js";import"./studio-20ap8dds.js";import"./studio-5dmgmyw4.js";import"./studio-8x8616xd.js";import"./studio-xebavr9s.js";import"./studio-cvz0e00f.js";import"./studio-x2metr13.js";import"./studio-f2j9et3h.js";import"./studio-dy2xtt7a.js";import"./studio-0hr000ba.js";import"./studio-pd9dsqpq.js";import"./studio-j933k8nr.js";import"./studio-yg5n49za.js";import"./studio-4nkm4404.js";import"./studio-ahf3cspq.js";import"./studio-et6t8g4m.js";import"./studio-848rk4p1.js";import"./studio-w67vfgy5.js";import"./studio-k1wvtp03.js";export{Dl as inspectorTab,Ck as mount,Wg as render,kk as restingInspectorTab,Cu as setInspectorTab,dR as stripOf,Z2 as unmount};
2
-
3
- //# debugId=4554D2B1BD9A7FD964756E2164756E21
4
- //# sourceMappingURL=right-panel-kz0a6byf.js.map
@@ -1,4 +0,0 @@
1
- import{ks,rT,cS,dS,vb,Vs,sT,aT,lT,cT,dT,uT,hT,pT,fT,mT,gT,bT,vT,yT,uS,wT,xT,xw,_T,ST,yb,CT}from"./studio-vxjap704.js";import"./studio-fep7hr66.js";import"./studio-5m0w815d.js";import"./studio-vcz63n42.js";import"./studio-qyb5bebs.js";import"./studio-zxm98z2m.js";import"./studio-ggm7zf70.js";import"./studio-695k95bw.js";import"./studio-nf0pqpbj.js";import"./studio-dbgv4fv9.js";import"./studio-va0e63sk.js";import"./studio-20ap8dds.js";import"./studio-5dmgmyw4.js";import"./studio-8x8616xd.js";import"./studio-xebavr9s.js";import"./studio-cvz0e00f.js";import"./studio-x2metr13.js";import"./studio-f2j9et3h.js";import"./studio-0hr000ba.js";import"./studio-pd9dsqpq.js";import"./studio-j933k8nr.js";import"./studio-yg5n49za.js";import"./studio-4nkm4404.js";import"./studio-ahf3cspq.js";import"./studio-et6t8g4m.js";import"./studio-848rk4p1.js";import"./studio-w67vfgy5.js";export{ST as armGitPoll,uS as changeRow,yT as checkoutBranch,yb as cleanupSourceControl,dS as cloneRepository,xT as commitRow,vT as createBranch,bT as discardFile,cS as fetchGitLog,hT as fetchRemote,wT as groupFilesByComponent,gT as includeNewChanges,_T as lastUpdatedLabel,lT as loadDiffForLens,rT as noteFileSaved,uT as openFileComparison,Vs as platformHostsGit,sT as platformOpensPullRequests,vb as platformSupportsClone,pT as pullRemote,ks as refreshGitStatus,CT as registerSourceControlCommands,xw as relativeDate,dT as runCloneRepository,mT as setAllIncluded,fT as setIncluded,cT as setSourceControlDeps,aT as statusTag};
2
-
3
- //# debugId=951B2409A5D3949464756E2164756E21
4
- //# sourceMappingURL=source-control-1phx90zk.js.map
@@ -1,5 +0,0 @@
1
- import{p,_e}from"./studio-w67vfgy5.js";import{ee}from"./studio-et6t8g4m.js";import{Q}from"./studio-zsjpsw08.js";function hh(){return _e()&&Q(p().findReferences)}function u(e){return`${e.path??""}\x00${e.tagName??""}`}var i=new Map,o=new Map;function zd(e){if(!hh())return{status:"unsupported"};return i.get(u(e))??(o.has(u(e))?{status:"pending"}:null)}async function La(e){if(!hh())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:ee(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 k$(e){return i.delete(u(e)),La(e)}var f=0,g=new Set;function Sr(){f+=1,i.clear(),o.clear();for(let e of g)e()}function E$(e){return g.add(e),()=>{g.delete(e)}}function h(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 Qb(e){let{others:t,pages:s}=h(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 T$(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 ev(e){return e.files.toSorted((t,s)=>s.count-t.count||t.path.localeCompare(s.path))}
2
- export{hh,zd,La,k$,Sr,E$,Qb,T$,ev};
3
-
4
- //# debugId=146E50B4CF5FA43C64756E2164756E21
5
- //# sourceMappingURL=studio-0hr000ba.js.map
@@ -1,5 +0,0 @@
1
- import{ee}from"./studio-et6t8g4m.js";import{p}from"./studio-w67vfgy5.js";import{g,C}from"./studio-ahf3cspq.js";import{ov}from"./studio-j933k8nr.js";import{Ot,Nt,ae}from"./studio-f2j9et3h.js";import{Fl,mp}from"./studio-zacvfm31.js";import{Ue,ft,T,R,Yt,rt,tt}from"./studio-cvz0e00f.js";import{Bu}from"./studio-8qejv8yf.js";import{BD}from"./studio-fyf7j57j.js";import{Gl}from"./studio-dbgv4fv9.js";import{S}from"./studio-rt498t2v.js";import{n,Q,_,v}from"./studio-zsjpsw08.js";var B=[{id:"general",intro:"",label:"General",note:""},{id:"integrations",intro:"Turn on what your site needs. Each one adds its own options where you use it.",label:"Integrations",note:""},{id:"advanced",intro:"Changes here affect every page. Most sites never need them.",label:"Advanced",note:"For developers"}],MR="integrations";function PR(e){return B.some((o)=>o.id===e)}var ve="overview",E=new Map,G=new Set;function D(){for(let e of G)e()}function _d(){D()}function E_(e){return G.add(e),()=>{G.delete(e)}}function Ol(e){E.set(e.key,e),D()}function FR(e){if(E.delete(e))D()}function we(){return[...E.values()].toSorted((e,o)=>e.order-o.order)}function zy(){let e=we();return B.flatMap((o)=>{let s=e.filter((t)=>(t.group??"integrations")===o.id);return s.length===0?[]:[{id:o.id,intro:o.intro,label:o.label,note:o.note,sections:s}]})}function zk(){return zy().flatMap((e)=>e.sections.map((o)=>o.key))}function H(e){return E.get(e)}var L=null,P=ve;function V(){if(L!==null&&E.has(L))return P=L,L=null,P;if(E.has(P))return P;return zk()[0]??P}function T_(e){if(E.has(e))P=e,L=null;else L=e;D()}var X={$schema:"https://jxsuite.com/schema/v1",$id:"StudioSettingsDialog",$description:"Project Settings (§17.1): a `jx-dialog` whose body is the settings editor's two columns, the grouped section list and the section body. The dialog owns modality, Escape and focus restoration, and its one footer answer is Close: every section writes as it is edited, so there is nothing to confirm or cancel. The body is an ISLAND: this document draws the slot and nothing in it, and `settings/settings-dialog.ts` mounts `settings-pane.json` there through `onNodeCreated` (studio-ui-guidelines.md §9.4).",tagName:"jx-dialog",$props:{headline:"Project settings",confirmLabel:"",cancelLabel:"Close",size:"xl"},attributes:{part:"settings"},oncancel:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/closed"},value:[]}]},onclose:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/closed"},value:[]}]},children:[{tagName:"div",attributes:{part:"pane-slot"},style:{$description:"The editor's box is its own (`settings-pane.json`); the slot only gives it the dialog body's width.",minWidth:"0"}}]};T("settings-dialog",X);var W=ft("dialog","settings");function xe(e){let o=n(e)?void 0:e.attributes?.part;return n(o)?o:""}function Z(e){let o=document.createElement("div");o.style.pointerEvents="auto",e.layer.append(o);let s=!0,t=!1,i=()=>{if(!s)return;s=!1,e.closed()},r=g({closed:i}),l=null,a=(d)=>{if(!t&&s)Ot(d);return d},c=R("settings-dialog",r,o,{onNodeCreated:(d,m,h)=>{if(!t&&d instanceof HTMLElement&&xe(h)==="pane-slot")e.body(d)}}).then(async(d)=>{let m=d.root;if(t)return d.dispose(),m;return l=d,await Yt(m),(m.querySelector('dialog[part="dialog"]')??m).setAttribute(Ue,W),a(m)}),u=()=>{let d=l?.root;if(d instanceof HTMLElement)Nt(d);i()};return{close:u,dispose(){if(t)return;u(),t=!0,l?.dispose(),l=null,o.remove()},host:o,ready:c,show(){if(!t)s=!0;return c.then(a)}}}var te={$schema:"https://jxsuite.com/schema/v1",$id:"StudioSettingsContributed",$description:'The generic settings section behind `$studio.settings` (specs/extensions.md §9.1), as a Jx document over the kit. One document serves both layouts an extension may declare: "form" is a single schema form over the whole section value, "map" is master-detail — the entry keys on the left, the selected entry\'s form on the right. The adapter (`surfaces/settings-contributed.ts`) hands in the title, the layout, the entry rows already marked as selected, and whatever the reader is part-way through typing; `settings/contributed-section.ts` decides what an entry may be named, what reaches `project.json`, and what the validator said about it. The schema form itself is an ISLAND: this document renders `form-host` and nothing inside it, because a form built from a JSON Schema is `ui/schema-form.ts`\'s surface rather than this one\'s — the section places the element that surface hands back. The actions row is the second island: `panels/data-grid.ts` contributes it, and that one is still lit over Spectrum.',tagName:"section",attributes:{part:"contributed"},style:{$description:"What `.settings-section-title`, `.settings-two-col`, `.settings-list-panel`, `.settings-editor-panel`, `.settings-editor-header`, `.settings-empty-state` and `.settings-inline-form` said in `styles/overlays.css`, keyed on `part` and re-pointed at the studio token layer. This section was the LAST emitter of every one of them except `.settings-empty-state`, which `panels/settings-pane.ts` still writes when a project closes with the editor open — so those rules are dead in the stylesheet from here, and a central sweep removes them rather than this change, which owns no stylesheet. Two values could not come across. `.settings-editor-header h3` read `var(--spectrum-font-size-100, 14px)`, and a document is mounted in the pane rather than inside `<sp-theme>`, so it would have taken its hard-coded fallback every time; the entry name is a kit textfield now and carries the kit's own type ramp. And `.entry-name-input`, `.settings-form-panel`, `.settings-section` and `.contributed-section` had no rule anywhere at all — they were four entries on `check-styles.ts`'s orphan ledger, which is the ledger's point.",display:"block",'& [part="title"]':{margin:"0 0 16px",fontSize:"16px",fontWeight:"600",color:"var(--fg)"},'& [part="actions"]':{$description:"The host-contributed actions row — Test Connection, Push Schema, Open Data Grid on the data sections. `.data-section-actions` never had a rule anywhere, so the row was whatever the buttons stacked up to; it is a row with a gap under it now.",display:"flex",alignItems:"center",flexWrap:"wrap",gap:"8px",marginBottom:"12px"},'& [part="columns"]':{$description:"The 1px gap over the border colour is the divider between the two columns: two panels on `--bg-panel` with `--border` showing through the gap, so nothing draws a rule of its own.",display:"flex",height:"100%",gap:"1px",background:"var(--border)"},'& [part="list"]':{display:"flex",flexDirection:"column",gap:"4px",padding:"12px",width:"200px",minWidth:"200px",background:"var(--bg-panel)",overflowY:"auto"},'& [part="entry"], & [part="new-open"]':{width:"100%"},'& [part="entry"] > [part="control"], & [part="new-open"] > [part="control"]':{$description:"`.settings-list-panel sp-action-button` said `width: 100%; justify-content: flex-start`, and both halves belong to the button the row is made of rather than to the row: a kit action button centres its glyph and its label, which reads as a list of centred names.",width:"100%",justifyContent:"flex-start"},'& [part="new-form"]':{display:"flex",alignItems:"center",gap:"6px"},'& [part="new-field"]':{flex:"1",minWidth:"0"},'& [part="empty"]':{flex:"1",display:"flex",alignItems:"center",justifyContent:"center",background:"var(--bg-panel)",color:"var(--fg-dim)",fontSize:"13px"},'& [part="editor"]':{$description:"`min-width: 0` is the one line `.settings-editor-panel` did not have and needed: a flex child's floor is its content, and the schema form inside this one is a whole form rather than the short cards Data Shapes puts here — so a long pointer or a wide row pushed the column past the right edge of the pane instead of scrolling inside it.",flex:"1",padding:"16px",background:"var(--bg-panel)",overflowY:"auto",minWidth:"0"},'& [part="editor-header"]':{display:"flex",alignItems:"center",gap:"12px",marginBottom:"16px"},'& [part="entry-name"]':{flex:"1",minWidth:"0",maxWidth:"220px"}},children:[{tagName:"h3",attributes:{part:"title"},textContent:"${state.title}"},{tagName:"div",attributes:{part:"actions-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/actionsState"},cases:{slot:{$description:"An island: the host renders its own actions into this node and the document renders nothing inside it.",tagName:"div",attributes:{part:"actions"}}}},{tagName:"div",attributes:{part:"body-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/layout"},cases:{form:{$description:"An island: `ui/schema-form.ts` draws the whole section value into this node.",tagName:"div",attributes:{part:"form-host"}},map:{tagName:"div",attributes:{part:"columns"},children:[{tagName:"div",attributes:{part:"list"},children:[{$prototype:"Array",items:{$ref:"#/state/entries"},key:{$ref:"$map/item/key"},map:{tagName:"jx-action-button",attributes:{part:"entry","data-entry":"${$map.item.key}","data-jx-region":"${$map.item.region}"},$props:{label:"${$map.item.key}",selected:{$ref:"$map/item/selected"},quiet:!0,size:"sm"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/select"},value:[{$ref:"$map/item/key"}]}]},children:[{tagName:"span",textContent:"${$map.item.key}"}]}},{tagName:"div",attributes:{part:"new-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/newState"},cases:{closed:{tagName:"jx-action-button",attributes:{part:"new-open"},$props:{label:"${state.newLabel}",icon:"plus",quiet:!0,size:"sm"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/openNew"},value:[]}]},children:[{tagName:"span",textContent:"${state.newLabel}"}]},open:{tagName:"div",attributes:{part:"new-form"},children:[{tagName:"jx-textfield",attributes:{part:"new-field"},$props:{label:"${state.newFieldLabel}",placeholder:"${state.newPlaceholder}",size:"sm",value:{$ref:"#/state/newName"}},oninput:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/editNew"},value:[{$ref:"event#/target/value"}]}]},onkeydown:{$prototype:"Function",body:[{$switch:{$ref:"event#/key"},cases:{Enter:[{preventDefault:!0},{operator:"call",target:{$ref:"#/state/createNew"},value:[]}],Escape:[{preventDefault:!0},{operator:"call",target:{$ref:"#/state/cancelNew"},value:[]}]}}]}},{tagName:"jx-button",attributes:{part:"new-create"},$props:{size:"sm"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/createNew"},value:[]}]},children:[{tagName:"span",textContent:"Create"}]}]}}}]},{tagName:"div",attributes:{part:"editor-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/editorState"},cases:{empty:{tagName:"div",attributes:{part:"empty"},textContent:"${state.emptyText}"},editing:{tagName:"div",attributes:{part:"editor","data-jx-region":"${state.editorRegion}"},children:[{tagName:"div",attributes:{part:"editor-header"},children:[{tagName:"jx-textfield",attributes:{part:"entry-name"},$props:{label:"Entry name",size:"sm",value:{$ref:"#/state/entryName"}},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/renameEntry"},value:[{$ref:"event#/target/value"}]}]},onkeydown:{$prototype:"Function",body:[{$switch:{$ref:"event#/key"},cases:{Enter:[{operator:"call",target:{$ref:"#/state/renameEntry"},value:[{$ref:"event#/target/value"}]}],Escape:[{operator:"call",target:{$ref:"#/state/cancelRename"},value:[{$ref:"event#/target/value"}]}]}}]}},{tagName:"jx-action-button",attributes:{part:"delete-entry"},$props:{label:"Delete entry",hint:"Delete entry",icon:"trash",quiet:!0,size:"sm"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/removeEntry"},value:[]}]}}]},{$description:"An island: `ui/schema-form.ts` draws the selected entry into this node.",tagName:"div",attributes:{part:"form-host"}}]}}}]}}}]};T("settings-contributed",te);function Te(){return{actionsState:"none",editorRegion:"",editorState:"empty",entries:[],entryName:"",layout:"form",newName:"",newState:"closed",title:"",emptyText:"",newFieldLabel:"",newLabel:"",newPlaceholder:""}}function Ne(e){let o=n(e)?void 0:e.attributes?.part;return n(o)?o:""}function ne(e,o,s){e.textContent="";let t=g({...Te(),...o}),i=null,r=!1,l=R("settings-contributed",t,e,{onNodeCreated:(a,c,u)=>{if(!(a instanceof HTMLElement))return;let d=Ne(u);if(d==="form-host")s.formSlot(a);else if(d==="actions")s.actionsSlot(a)}}).then((a)=>{let c=a.root;if(r)return a.dispose(),c;return i=a,c});return{attached:()=>{if(r)return!1;let a=i?.root;return a===void 0?!0:a instanceof HTMLElement&&e.contains(a)},dispose(){r=!0,i?.dispose(),i=null},host:e,ready:l,update(a){t.actionsState=a.actionsState,t.editorRegion=a.editorRegion,t.editorState=a.editorState,t.entries=a.entries,t.entryName=a.entryName,t.layout=a.layout,t.newName=a.newName,t.newState=a.newState,t.title=a.title,t.emptyText=a.emptyText,t.newFieldLabel=a.newFieldLabel,t.newLabel=a.newLabel,t.newPlaceholder=a.newPlaceholder}}}var x=new Map,A=new Set,I=new Map;function jR(e,o){let s=S?.projectConfig?.[e],t=v(s)?s:{};if(!Object.hasOwn(t,o))return Object.keys(t);return x.set(e,o),null}var J=new Map;function ke(e,o){let s={},t=[];for(let i of o){let r=i.indexOf(": "),l=r===-1?"":i.slice(0,r),a=r===-1?i:i.slice(r+2);if(l===e){t.push(a);continue}if(!l.startsWith(`${e}/`))continue;let[c]=l.slice(e.length+1).split("/");if(c&&s[c]===void 0)s[c]=a}return{fields:s,section:t}}async function z(e,o){let s=S?.projectConfig;if(!s)return;if(!(await Gl()).ok)return;let i=[];try{i=await Bu(s)}catch(r){C.warn(`Could not validate project.json — ${ee(r)}`,{key:"settings:validator",path:"project.json",source:"Settings",tier:"problem"});return}J.set(e,ke(e,i).fields),o()}function oe(e,o){for(let[s,t]of Object.entries(o))if(t===void 0)delete e[s];else e[s]=t}function U(e){return e.toLowerCase().replaceAll(/\s+/g,"-").replaceAll(/[^a-z0-9-]/g,"")}function Ce(e,o){if(!e)return{};let s=(i)=>{let r={};for(let[l,a]of Object.entries(i))r[l]=t(a);return r},t=(i)=>{if(n(i))return i.replaceAll("${key}",o);if(Array.isArray(i))return i.map((r)=>t(r));if(v(i))return s(i);return i};return s(e)}function ie(e,o,s=null){let t=p(),i={fieldKeyPrefix:`$settings.${e}`,resolvePointer:(r,l)=>{let a={projectConfig:S?.projectConfig??{}};if(v(l))a.scope=l;if(o.formats!==void 0)a.formats=o.formats;return mp(r,a)}};if(Q(t.setSecrets))i.commitSecret=async(r,l)=>{let a=BD(e,s,r);return await t.setSecrets({set:{[a]:l}}),a};return i}function j(e){let o=S?.projectConfig;if(!o)return null;let s=o[e];if(v(s))return s;let t={};return o[e]=t,t}function re(e){return`${W}/${e}`}var se=new WeakMap;function w(e){Wk(e.container,e.contribution,e.opts)}function le(e,o){e.echo=o,w(e)}var Ee="entry";function je(e){let o=e?.trim().toLowerCase()||Ee,s=`${o.charAt(0).toUpperCase()}${o.slice(1)}`;return{emptyText:`Select ${/^[aeiou]/u.test(o)?"an":"a"} ${o} or create one`,newFieldLabel:`${s} name`,newLabel:`New ${o}`,newPlaceholder:`${U(o)}-name`}}function Me(e){let{contribution:o,opts:s}=e,t=o.key,i=o.title??t,r=s.actions?"slot":"none",l=re("editor"),a=je(o.settings.entry?.noun);if((o.settings.layout??"form")!=="map")return{actionsState:r,editorRegion:l,editorState:"empty",entries:[],entryName:"",layout:"form",newName:"",newState:"closed",title:i,...a};let c=j(t)??{},u=x.get(t)??null,d=u===null?void 0:c[u],m=u!==null&&_(d);return{actionsState:r,editorRegion:l,editorState:m?"editing":"empty",entries:Object.keys(c).map((h)=>({key:h,region:re(`entry:${h}`),selected:h===u})),entryName:e.echo??(m?u:""),layout:"map",newName:I.get(t)??"",newState:A.has(t)?"open":"closed",title:i,...a}}function ce(e){let o=e.formHost;if(!o)return;let{contribution:s,opts:t}=e,i=s.key,r=s.settings.entry?.ui,l=()=>w(e),a=(N)=>{if(N.parentNode!==o)o.replaceChildren(N)};if((s.settings.layout??"form")!=="map"){let N=`/${i}`;a(Fl(`section:${i}`,s.entrySchema,j(i)??{},{context:ie(i,t,null),errors:J.get(N)??{},onChange:(y)=>{let f=j(i);if(!f)return;oe(f,y),l(),z(N,l)},rerender:l,...r!==void 0&&{ui:r}}));return}let c=j(i)??{},u=x.get(i)??null,d=u===null?void 0:c[u];if(u===null||!_(d)){o.replaceChildren();return}let m=d,h=`/${i}/${u}`;a(Fl(`section:${i}:${u}`,s.entrySchema,m,{context:ie(i,t,u),errors:J.get(h)??{},onChange:(N)=>{oe(m,N),l(),z(h,l)},rerender:l,...r!==void 0&&{ui:r}}))}function de(e){let o=e.actionsHost,{actions:s}=e.opts;if(!o)return;if(!s){o.replaceChildren();return}let t=e.contribution.key,i=(e.contribution.settings.layout??"form")==="map"?x.get(t)??null:null;s(o,{rerender:()=>w(e),sectionKey:t,selected:i})}function Pe(e){let o=(i)=>{e.echo=null,w(e),z(i,()=>w(e))},s=()=>{e.echo=null,w(e)},t=()=>e.contribution.key;return{cancelNew(){A.delete(t()),I.delete(t()),w(e)},cancelRename(i){le(e,i),s()},createNew(){let i=t(),r=U(I.get(i)??""),l=j(i);if(!r||!l||l[r])return;l[r]=Ce(e.contribution.settings.entry?.newEntry,r),x.set(i,r),A.delete(i),I.delete(i),o(`/${i}`)},editNew(i){I.set(t(),i),w(e)},openNew(){A.add(t()),w(e)},removeEntry(){let i=t(),r=x.get(i)??null,l=j(i);if(!r||!l?.[r])return;delete l[r],x.set(i,null),o(`/${i}`)},renameEntry(i){le(e,i);let r=t(),l=x.get(r)??null,a=j(r),c=U(i.trim());if(!l||!a||!c||c===l||a[c]){s();return}let u={};for(let[d,m]of Object.entries(a))u[d===l?c:d]=m,delete a[d];Object.assign(a,u),x.set(r,c),o(`/${r}`)},select(i){x.set(t(),i),e.echo=null,w(e)}}}function Wk(e,o,s={}){let t=se.get(e);if(t)t.contribution=o,t.opts=s;let i=t?.handle??null;if(!t||!i?.attached()){i?.dispose();let r={actionsHost:null,container:e,contribution:o,echo:null,formHost:null,handle:null,opts:s};se.set(e,r),i=ne(e,Pe(r),{actionsSlot:(l)=>{r.actionsHost=l,de(r)},formSlot:(l)=>{r.formHost=l,ce(r)}}),r.handle=i,t=r}i.update(Me(t)),de(t),ce(t)}var pe={$schema:"https://jxsuite.com/schema/v1",$id:"StudioSettingsPane",$description:'The Project Settings dialog\'s two columns: the grouped section list and the section body (§17.1). It draws no section: `panels/settings-pane.ts` keeps the registry, decides which section is current, and renders whichever one that is into the one empty `[part="section-host"]` island this document leaves for it (studio-ui-guidelines.md §9.4), because a section renderer may be a lit template or a mounted document and neither can share a container with this one. The list is three vertical `tablist`s, one per group (General, Integrations, Advanced), each named by its group heading: a tablist may own only tabs, so a heading between two runs of rows has to END one list rather than sit inside it. Each group is one tab stop and the arrow keys move within it. Under the groups, a Moved footnote names what left Project Settings for a workspace, each with a button that goes there.',tagName:"div",attributes:{part:"doc"},style:{$description:'No part below is named `body`, `field`, `label`, `error`, `text` or `actions`: this document is mounted inside a `jx-dialog`, the kit is light DOM, and the dialog draws its own `[part="body"]` around this one, so a rule keyed on that name here would also be a rule the dialog\'s own styles reach.',display:"flex",height:"min(68vh, 640px)",minHeight:"0",background:"var(--bg)",color:"var(--fg)",fontFamily:"var(--jx-font-sans)",textAlign:"initial",'& [part="nav"]':{display:"flex",flexDirection:"column",gap:"var(--jx-space-4)",width:"200px",minWidth:"200px",flexShrink:"0",padding:"var(--jx-space-2) var(--jx-space-3) var(--jx-space-2) 0",borderRight:"1px solid var(--border)",overflowY:"auto",fontSize:"13px"},'& [part="group"]':{display:"flex",flexDirection:"column",gap:"var(--jx-space-1)"},'& [part="group-title"]':{display:"flex",alignItems:"baseline",gap:"var(--jx-space-2)",margin:"0",padding:"0 var(--jx-space-3)",color:"var(--fg-dim)",fontSize:"var(--jx-text-sm)",fontWeight:"600",letterSpacing:"0.04em",textTransform:"uppercase"},'& [part="group-note"]':{$description:`The Advanced group's "For developers": a qualifier on the heading, not a second heading, so it reads at the heading's size without its weight.`,fontWeight:"400",letterSpacing:"0",textTransform:"none"},'& [part="group-note"]:empty':{display:"none"},'& [part="group-tabs"]':{$description:"The rule a vertical strip draws on its trailing edge is the column's own here: the nav draws one border for all three groups, so each strip drawing its own would stack three short rules beside it.",borderInlineEnd:"0"},'& [part="nav-item"]':{$description:"Full-bleed rows, which a tab is not by default: `jx-tab` centres its label and caps itself at 220px because a horizontal strip is a row of chips. In the nav column the row IS the target, so the label goes to the leading edge and the cap comes off.",maxWidth:"none",justifyContent:"flex-start",padding:"var(--jx-space-2) var(--jx-space-3)"},'& [part="moved"]':{display:"flex",flexDirection:"column",gap:"var(--jx-space-1)",marginTop:"auto",padding:"var(--jx-space-3)",borderTop:"1px solid var(--border)",color:"var(--fg-dim)",fontSize:"var(--jx-text-md)"},'& [part="moved-title"]':{margin:"0",fontWeight:"600",color:"var(--fg)"},'& [part="moved-row"]':{display:"flex",alignItems:"center",flexWrap:"wrap",gap:"var(--jx-space-1)"},'& [part="content"]':{flex:"1",minWidth:"0",overflowY:"auto",padding:"var(--jx-space-2) var(--jx-space-5)"},'& [part="group-intro"]':{margin:"0 0 var(--jx-space-3)",color:"var(--fg-dim)",fontSize:"13px"},'& [part="group-intro"]:empty':{display:"none"},'& [part="section-host"]':{display:"block",minWidth:"0"},'& [part="empty"]':{$description:"What the body says when the active section is registered by nobody: every section unregistering at once, which is a project closing while the dialog is open. A blank column beside a list reads as a broken dialog, so it says which it is.",display:"flex",alignItems:"center",justifyContent:"center",minHeight:"120px",margin:"0",color:"var(--fg-dim)",fontSize:"13px"},'& [part="failure"]':{$description:"A section whose renderer threw or rejected. It is said where the section would have been, in the reader's line of sight, because a section that silently draws nothing is indistinguishable from one with nothing to say.",margin:"0",padding:"var(--jx-space-3)",border:"1px solid var(--danger)",borderRadius:"var(--radius)",color:"var(--fg)",fontSize:"13px"}},children:[{tagName:"div",attributes:{part:"nav",role:"none"},children:[{$prototype:"Array",items:{$ref:"#/state/groups"},key:{$ref:"$map/item/id"},map:{tagName:"div",attributes:{part:"group",role:"none","data-group":"${$map.item.id}"},children:[{tagName:"h3",attributes:{part:"group-title",id:"${$map.item.titleId}"},children:[{tagName:"span",textContent:"${$map.item.label}"},{tagName:"span",attributes:{part:"group-note"},textContent:"${$map.item.note}"}]},{tagName:"jx-tabs",attributes:{part:"group-tabs",selected:"${state.active}",orientation:"vertical"},$props:{label:{$ref:"$map/item/tabsLabel"}},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/selectSection"},value:[{$ref:"event#/detail"}]}]},children:[{$prototype:"Array",items:{$ref:"$map/item/sections"},key:{$ref:"$map/item/key"},map:{tagName:"jx-tab",attributes:{part:"nav-item",id:"${$map.item.tabId}","data-section":"${$map.item.key}",value:"${$map.item.key}",label:"${$map.item.label}",panel:"settings-pane-panel"}}}]}]}},{tagName:"div",attributes:{part:"moved",role:"group","aria-labelledby":"settings-pane-moved"},children:[{tagName:"p",attributes:{part:"moved-title",id:"settings-pane-moved"},textContent:"Moved"},{$prototype:"Array",items:{$ref:"#/state/moved"},key:{$ref:"$map/item/workspace"},map:{tagName:"div",attributes:{part:"moved-row","data-moved":"${$map.item.workspace}"},children:[{tagName:"span",textContent:"${$map.item.what} →"},{tagName:"jx-button",attributes:{part:"moved-link"},$props:{size:"sm",quiet:!0,label:{$ref:"$map/item/linkLabel"}},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/openMoved"},value:[{$ref:"$map/item/workspace"}]}]},children:[{tagName:"span",textContent:"${$map.item.place}"}]}]}}]}]},{tagName:"jx-tab-panel",attributes:{part:"content",id:"settings-pane-panel"},$props:{active:!0,labelledby:{$ref:"#/state/activeTabId"}},children:[{$description:`The current group's intro ("Changes here affect every page. Most sites never need them."), above whichever of its sections is showing. General has none, and an empty sentence draws nothing.`,tagName:"p",attributes:{part:"group-intro"},textContent:"${state.intro}"},{$description:"The island, and it stays empty: a settings section renders itself, into a host this document never writes into and never reads back (studio-ui-guidelines.md §9.4).",tagName:"div",attributes:{part:"section-host"}},{tagName:"div",attributes:{part:"empty-slot",role:"none"},$switch:{$ref:"#/state/hasSection"},cases:{false:{tagName:"p",attributes:{part:"empty"},textContent:"${state.empty}"}}},{tagName:"div",attributes:{part:"failure-slot",role:"none"},$switch:{$ref:"#/state/failureState"},cases:{failed:{tagName:"p",attributes:{part:"failure",role:"alert"},textContent:"${state.failure}"}}}]}]};T("settings-pane",pe);function He(e){let o=n(e)?void 0:e.attributes?.part;return n(o)?o:""}function ue(e){return e===""?"ok":"failed"}function me(e,o,s){let t=g({...o,...s,failureState:ue(o.failure)});e.textContent="",delete e._$litPart$;let i=null,r=!1,l=null,a=R("settings-pane",t,e,{onNodeCreated:(c,u,d)=>{if(!r&&c instanceof HTMLElement&&He(d)==="section-host")l=c}}).then((c)=>{if(r){c.dispose();return}i=c});return{body:()=>l,dispose(){r=!0,i?.dispose(),i=null,l=null},focusActive(){let c=i?.root;if(c instanceof HTMLElement)c.querySelector('[part="nav-item"][aria-selected="true"]')?.focus()},ready:a,update(c){t.groups=c.groups,t.moved=c.moved,t.activeTabId=c.activeTabId,t.empty=c.empty,t.intro=c.intro,t.hasSection=c.hasSection,t.failure=c.failure,t.failureState=ue(c.failure),t.active=c.active}}}var Ie="No settings sections.",fe=[{place:"Styles › Variables",view:"variables",what:"Colors and fonts",workspace:"styles"},{place:"Publish › Hosting",publishTab:"hosting",what:"Hosting and domain",workspace:"publish"},{inspector:"page",place:"Page tab",what:"Head and SEO defaults",workspace:"design"}];function ge(e){return`settings-nav-${e}`}function Oe(e){return fe.find((o)=>o.workspace===e)??null}function F(e){let o=V(),s=zy();return{active:o,activeTabId:ge(o),empty:Ie,failure:e,groups:s.map((t)=>({id:t.id,label:t.label,note:t.note,sections:t.sections.map((i)=>({key:i.key,label:i.label,tabId:ge(i.key)})),tabsLabel:t.note===""?t.label:`${t.label}, ${t.note.toLowerCase()}`,titleId:`settings-group-${t.id}`})),hasSection:H(o)!==void 0,intro:H(o)?.intro||(s.find((t)=>t.sections.some((i)=>i.key===o))?.intro??""),moved:fe.map((t)=>{let{title:i}=ov(t.workspace),r=t.place??i;return{linkLabel:`${t.what}: ${r}. Go to ${i}`,place:r,what:t.what,workspace:t.workspace}})}}function he(e,o){let s=!1,t=null,i=null,r=null,l="",a=0,c=me(e,F(l),{openMoved:(y)=>{let f=Oe(y);if(f!==null)o.openMoved(f.workspace,f.inspector,f.view,f.publishTab)},selectSection:(y)=>{T_(y)}});function u(y,f,k){if(s||k!==a)return;l=`Could not show ${H(y)?.label??y}: ${f}`,c.update(F(l))}function d(y){if(s)return;let f=V(),k=c.body();if(k!==t)t=k,r=null;if(!k||!y&&r===f){c.update(F(l));return}let q=r!==f;r=f,l="",c.update(F(l));let K=H(f);if(!K){i=null,k.replaceChildren();return}if(q||!i||i.parentElement!==k)i=document.createElement("div"),k.replaceChildren(i);a+=1;let Y=a;try{let O=K.render(i);if(O instanceof Promise)O.catch((ye)=>{u(f,ee(ye),Y)})}catch(O){u(f,ee(O),Y)}}let m=()=>E_(()=>{d(!0)}),h=m(),N=c.ready.then(()=>{d(!0)});return{dispose(){if(s)return;s=!0,h?.(),h=null,c.dispose()},focusActive:()=>{c.focusActive()},ready:N,resume(){if(s||h!==null)return;h=m(),i=null,d(!0)},suspend(){h?.(),h=null}}}var b=null,M=!1;function be(){return M}function De(){let e={dialog:Z({body:(o)=>{e.pane=he(o,{openMoved:(s,t,i,r)=>{Ae(s,t,i,r)}})},closed:()=>{if(b===e)Iu()},layer:tt("dialog")}),pane:null};return e}async function Ae(e,o,s,t){if(Iu(),s!==void 0){await rt("styles.open",{view:s},"Settings");return}if(t!==void 0){await rt("publish.open",{tab:t},"Settings");return}if(await rt("view.setWorkspace",{workspace:e},"Settings"),o===void 0)return;if(await rt("view.setRightPanel",{open:!0},"Settings"),ae()?.isEnabled("view.setRightTab")===!0)await rt("view.setRightTab",{tab:o},"Settings")}async function HR(){if(M&&b){await b.dialog.ready;return}if(M=!0,b&&!b.dialog.host.isConnected)Re(),M=!0;let e=b;if(e)e.pane?.resume(),await e.dialog.show();else e=De(),b=e,await e.dialog.ready;let o=e.pane;if(o===null||b!==e||!be())return;if(await o.ready,b===e&&be())o.focusActive()}function Iu(){if(!M)return;M=!1,b?.pane?.suspend(),b?.dialog.close()}function Re(){M=!1;let e=b;b=null,e?.pane?.dispose(),e?.dialog.dispose()}
2
- export{MR,PR,_d,E_,Ol,FR,zy,zk,T_,jR,Wk,HR,Iu};
3
-
4
- //# debugId=51349F206A48F52D64756E2164756E21
5
- //# sourceMappingURL=studio-1wyp7dt5.js.map
@@ -1,5 +0,0 @@
1
- import{ee}from"./studio-et6t8g4m.js";import{p,_e}from"./studio-w67vfgy5.js";import{C}from"./studio-ahf3cspq.js";import{Sr}from"./studio-0hr000ba.js";import{A$,dv,h}from"./studio-j933k8nr.js";import{MC,Si,wv}from"./studio-4nkm4404.js";import{us,Wd,tO}from"./studio-pd9dsqpq.js";import{Js,e$,t$,Ys,nn,rC,n$,sh}from"./studio-5dmgmyw4.js";import{S}from"./studio-rt498t2v.js";function d(t){let e=["B","KB","MB","GB"],n=t,r=0;while(n>=1024&&r<e.length-1)n/=1024,r+=1;return`${r===0?n:Number(n.toFixed(1))} ${e[r]}`}var x=["image/*","video/*","audio/*",".pdf",".svg",".woff",".woff2",".ttf",".otf"].join(",");function Wc(){return(_e()?p().assetCapabilities?.accept:void 0)??x}function Md(t){return Ys.has(nn(t))}function Vc(t){let e=t.type??"";if(e.startsWith("image/"))return"image";if(e.startsWith("video/"))return"video";if(e.startsWith("audio/"))return"audio";let n=nn(t.name);if(Js.has(n))return"image";if(e$.has(n))return"video";if(t$.has(n))return"audio";return"file"}var ZL=new Set([".woff",".woff2",".ttf",".otf"]);function dA(t){if(ZL.has(nn(t)))return"font";let e=Vc({name:t});return e==="file"?"document":e}var y=/^content\/([^/]+)\//,_a="public/media";function XL(t){let e=t?y.exec(t.replaceAll("\\","/")):null;return e?`content/${e[1]}/images`:_a}function uA(t){let e=t.replaceAll("\\","/");return e===_a||/^content\/[^/]+\/images$/.test(e)}function A(t){let e=t.replaceAll("\\","/");if(e.startsWith("public/"))return e.slice(6);let n=/^content\/[^/]+\/(.+)$/.exec(e);if(n)return`./${n[1]}`;return`./${e}`}function w(t,e){if(!e.has(t))return t;let n=nn(t),r=n?t.slice(0,-n.length):t;for(let i=1;;i++){let o=`${r}-${i}${n}`;if(!e.has(o))return o}}function E(t,e){let n=t.replaceAll("\\","/").replace(/\/+$/,"");return n==="."||n===""?e:`${n}/${e}`}var f=null;function hA(t){f=t}async function QL(t){await f?.(t)}function b(t){let e=t.replaceAll("\\","/"),n=e.lastIndexOf("/");return n>0?e.slice(0,n):"."}function M(t,e){let n=(o)=>e==="image"?Js.has(nn(o.name)):Md(o.name),r=[],i=[];for(let o of t)if(n(o))r.push(o);else i.push(o.name);if(i.length>0)C.warn(i.length===1?`Skipped ${i[0]}`:`Skipped ${i.length} files`,{detail:e==="image"?`Only images can be used here: ${i.join(", ")}.`:`Studio lists images, video, audio, PDFs and fonts as media, so ${i.join(", ")} would not appear in it.`,source:"Media"});return r}async function Sa(t,e={}){let n=e.only===void 0?[...t]:M([...t],e.only);if(n.length===0)return[];let r=p(),i=e.dir??XL(h.value?.documentPath??null),o;try{let s=await us(()=>r.listDirectory(i));o=new Set(s.map((l)=>l.name))}catch{o=new Set}let u=_e()?p().assetCapabilities?.maxUploadBytes:void 0,a=[];for(let s of n){if(u!==void 0&&s.size>u){C.error(`${s.name} is too large.`,{detail:`This backend accepts at most ${d(u)}; that file is ${d(s.size)}.`,source:"Media"});continue}let l=w(s.name,o);o.add(l);let m=E(i,l);try{let{path:c}=await r.uploadFile(m,s);Wd([c]),a.push({kind:Vc(s),name:l,path:c,ref:A(c)})}catch(c){C.error(`Could not upload ${s.name}.`,{detail:ee(c),path:m,source:"Media"})}}if(a.length>0)C.success(a.length===1?`Uploaded ${a[0].name} to ${i}/`:`Uploaded ${a.length} files to ${i}/`),await f?.(i);return a}var O=[new Set([".jpg",".jpeg"]),new Set([".tif",".tiff"])];function g(t){return O.find((e)=>e.has(t))??new Set([t])}function pA(t){return[...g(nn(t))].join(",")}function v(t,e){return g(nn(t)).has(nn(e.name))}async function fA(t,e){let n=t.split("/").pop()??t;if(!v(t,e))return C.error(`${e.name} cannot replace ${n}.`,{detail:`${n} is ${nn(t)||"a file with no extension"} and ${e.name} is ${nn(e.name)||"a file with no extension"}. Every page that uses ${n} would get bytes its address does not describe; choose a file of the same type, or upload it as a new file.`,path:t,source:"Media"}),!1;let r=_e()?p().assetCapabilities?.maxUploadBytes:void 0;if(r!==void 0&&e.size>r)return C.error(`${e.name} is too large.`,{detail:`This backend accepts at most ${d(r)}; that file is ${d(e.size)}.`,source:"Media"}),!1;let i;try{({path:i}=await p().uploadFile(t,e))}catch(o){return C.error(`Could not replace ${n}.`,{detail:ee(o),path:t,source:"Media"}),!1}if(Wd([t,i]),Sr(),await QL(b(t)),i!==t)return C.warn(`${n} was not replaced.`,{detail:`The backend stored the new file as ${i}, so every reference still shows the old one.`,path:t,source:"Media",tier:"problem"}),!1;return C.success(`Replaced ${n}`),!0}function mA(t){let e=Si(t),n=e.lastIndexOf("/");return n===-1?e:e.slice(n+1)}function jb(t){let e=Si(t),n=e.lastIndexOf("/");return n===-1?".":e.slice(0,n)}function I(){return S?.projectConfig?.content??null}function N(t){return dv(t,I(),n$())}function F(t,e){return`${Si(e.urlPrefix)}/${t.slice(e.dir.length+1)}`}function Hb(t){let e=Si(t);if(e.startsWith(`${MC}/`))return`/${e.slice(MC.length+1)}`;let n=N(e);return n?`/${F(e,n)}`:`/${e}`}function tr(t){let e=Si(t);if(e==="")return t;let{space:n,fileBaseUrl:r}=sh();if(n==="repo")return A$(`${r}${wv(e)}`,tO(e));return rC(`/${wv(Hb(e).slice(1))}`)}
2
- export{Wc,Md,Vc,ZL,dA,_a,XL,uA,hA,QL,Sa,pA,fA,mA,jb,Hb,tr};
3
-
4
- //# debugId=A7E590EC832B29D564756E2164756E21
5
- //# sourceMappingURL=studio-20ap8dds.js.map
@@ -1,5 +0,0 @@
1
- import{ee}from"./studio-et6t8g4m.js";import{Oe,ir,Ud,h}from"./studio-j933k8nr.js";import{C}from"./studio-ahf3cspq.js";import{p}from"./studio-w67vfgy5.js";import{Ne,xa,Hc}from"./studio-nf0pqpbj.js";import{Qn}from"./studio-cvz0e00f.js";import{lw,lb}from"./studio-jw0q5j6k.js";import{xS}from"./studio-ga77mf07.js";import{Co}from"./studio-dbgv4fv9.js";import{Ut,zi}from"./studio-rt498t2v.js";import{oe}from"./studio-tpy3rdxn.js";import{_,it}from"./studio-zsjpsw08.js";function ew(){let t=h.value,e=Oe(t?.session.selection);if(!t||!e||e.length<2)return null;let o=oe(t.doc.document,e);if(!o||!o.tagName)return null;return{node:o,path:e}}async function rm(){let t=ew();if(!t)return;let e=await b(g(t.node));if(!e)return;await cE(e.toLowerCase())}async function cE(t){let e=h.value,o=ew();if(!e||!o)return null;let{node:m,path:f}=o,l=v(m);l.tagName=t;let r=`components/${t}.json`,c=Hc(e.documentPath,r),u=f;if(!Ud(e,(n)=>{let s=Ut(u)??[],d=zi(u),a=n;for(let i of s)a=a[i];if(!Array.isArray(a.children))a.children=[];if(a.children[d]={tagName:t},!n.$elements)n.$elements=[];if(!n.$elements.some((i)=>_(i)&&("$ref"in i)&&i.$ref===c))n.$elements.push({$ref:c})}))return null;try{await p().writeFile(r,Co(l,null)),await xa();let s=xS(l);if(C.success(`Converted to <${t}>`),s)C.warn(`<${t}> has a slot problem: ${s}`,{path:r,source:"Components",tier:"problem"});return r}catch(n){return C.error(`Could not save the <${t}> component.`,{detail:ee(n),path:r,source:"Components"}),null}}function g(t){if(t.$id){let o=lb(t.$id);if(o!=="")return o}let e=(it(t.tagName)||"div").toLowerCase();return e.includes("-")?e:lb(e)}function v(t){let e=ir(t);return delete e.$id,delete e.$layout,delete e.$paths,e}function N(t){let e=t.trim().toLowerCase(),o=lw(e);if(o!=="")return o;return Ne.some((m)=>m.tagName===e)?`Component <${e}> already exists`:""}function b(t){return Qn("Convert to Component",{confirmLabel:"Convert",message:"Enter a hyphenated tag name for the new component.",placeholder:"my-component",validate:N,value:t})}
2
- export{ew,rm,cE};
3
-
4
- //# debugId=07970D617D0AB42164756E2164756E21
5
- //# sourceMappingURL=studio-291gqh98.js.map
@@ -1,5 +0,0 @@
1
- import{He}from"./studio-5dmgmyw4.js";import{Q}from"./studio-zsjpsw08.js";var f=3;function p(e,t,n){return Math.min(n,Math.max(t,e))}function eS(e){let t=Math.max(0,Math.trunc(e.count)),n=Math.max(1,Math.trunc(e.columns??1)),o=Math.ceil(t/n);if(!(e.rowHeight>0)||!(e.viewportHeight>0))return{end:t,padBottom:0,padTop:0,start:0,totalRows:o};let r=Math.max(0,Math.trunc(e.overscanRows??f)),i=Math.max(0,e.scrollTop),m=Math.floor(i/e.rowHeight),w=Math.ceil(e.viewportHeight/e.rowHeight)+1,l=p(m-r,0,o),a=p(m+w+r,l,o);return{end:Math.min(t,a*n),padBottom:(o-a)*e.rowHeight,padTop:l*e.rowHeight,start:Math.min(t,l*n),totalRows:o}}function M(e,t){return e.start===t.start&&e.end===t.end&&e.totalRows===t.totalRows&&e.padTop===t.padTop&&e.padBottom===t.padBottom}function R(e){let{scroller:t,list:n,count:o,rowHeight:r,columns:i,onChange:m,overscanRows:w}=e,l={end:0,padBottom:0,padTop:0,start:0,totalRows:0},a=!1;function c(){if(a)return;let d=eS({columns:i?.()??1,count:o(),overscanRows:w??f,rowHeight:r(),scrollTop:n?H(t,n):t.scrollTop,viewportHeight:t.clientHeight}),b=!M(l,d);if(l=d,b)m(d)}t.addEventListener("scroll",c,{passive:!0});let u=0,T=()=>{if(u!==0)return;u=requestAnimationFrame(()=>{u=0,c()})},s=null;if(Q(globalThis.ResizeObserver)){if(s=new ResizeObserver(T),s.observe(t),n)s.observe(n)}return c(),{destroy(){if(a=!0,t.removeEventListener("scroll",c),s?.disconnect(),s=null,u!==0)cancelAnimationFrame(u),u=0},measure:c,range:()=>l}}function v(e){for(let t=e;t;t=t.parentElement){if(t.scrollHeight<=t.clientHeight)continue;let n=getComputedStyle(t).overflowY;if(n==="auto"||n==="scroll"||n==="overlay")return t}return null}function g(e){let t=h.get(e);if(t&&t.isConnected&&e.isConnected&&t.contains(e))return t;let n=L(e)??v(e);if(n)h.set(e,n);else h.delete(e);return n}var x="data-jx-scroller";function L(e){return e.isConnected?e.closest(`[${x}]`):null}function H(e,t){if(e===t)return Math.max(0,e.scrollTop);return Math.max(0,He(e).top-He(t).top)}function mw(e,t){let n=e?.isConnected===!0?g(e):null;if(!n||!e){let o=Math.max(0,Math.trunc(t.count));return{end:o,padBottom:0,padTop:0,start:0,totalRows:o}}return eS({columns:t.columns??1,count:t.count,overscanRows:t.overscanRows??f,rowHeight:t.rowHeight,scrollTop:H(n,e),viewportHeight:n.clientHeight})}function W(e){let t=e.listOffset+e.index*e.rowHeight,n=t+e.rowHeight;if(t<e.scrollTop)return Math.max(0,t);if(n>e.scrollTop+e.viewportHeight)return Math.max(0,n-e.viewportHeight);return null}function gw(e,t,n){let o=e?.isConnected===!0?g(e):null;if(!o||!e||t<0||!(n>0))return!1;let{scrollTop:r}=o,i=W({index:t,listOffset:r-H(o,e),rowHeight:n,scrollTop:r,viewportHeight:o.clientHeight});if(i===null)return!1;return o.scrollTop=i,!0}function PD(e,t,n){let o=e?.querySelector(t);return o&&o.offsetHeight>0?o.offsetHeight:n}var h=new WeakMap;function bw(e,t,n){let o=g(t);if(e&&e.list===t&&e.scroller===o)return e;if(e?.window.destroy(),!o)return null;return{list:t,scroller:o,window:R({count:n.count,list:t,onChange:()=>n.onChange(),rowHeight:n.rowHeight,scroller:o})}}
2
- export{eS,mw,gw,PD,bw};
3
-
4
- //# debugId=30FF87A4AACC39C164756E2164756E21
5
- //# sourceMappingURL=studio-4zqfw5ha.js.map
@@ -1,5 +0,0 @@
1
- import{bh}from"./studio-j933k8nr.js";import{mb}from"./studio-mwnmzx7g.js";import{S}from"./studio-rt498t2v.js";import{n,_}from"./studio-zsjpsw08.js";function qE(){return Object.keys(S?.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 vw(){return qE().map((e)=>wa(e)).filter((e)=>e!==null)}function Rc(e){let t=bh(e??null,S?.projectConfig);return t?wa(t.name):null}function FD(e){let t=bh(e??null,S?.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||!_(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 GE(e);default:return""}}function GE(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 jD(e,t){return(Array.isArray(e?.required)?e.required:[]).filter((o)=>t[o]===void 0)}
2
- export{qE,wa,vw,Rc,FD,GE,jD};
3
-
4
- //# debugId=F71471AC53023BB364756E2164756E21
5
- //# sourceMappingURL=studio-56egy6vf.js.map