@jxsuite/studio 10.5.0 → 10.6.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 (279) hide show
  1. package/data/locales/en/elements.json +434 -0
  2. package/data/webdata.json +116 -139
  3. package/dist/chunks/{2020-7sx2vexa.js → 2020-rqm7qrje.js} +3 -3
  4. package/dist/chunks/adapter-cyy8vbcx.js +4 -0
  5. package/dist/chunks/add-new-flow-8cgtejv2.js +4 -0
  6. package/dist/chunks/{cf-account-picker-ajh60k54.js → cf-account-picker-v3qd2dhw.js} +3 -3
  7. package/dist/chunks/cf-settings-1fnw874z.js +4 -0
  8. package/dist/chunks/{color-area-gbcftzh3.js → color-area-frd9y9q6.js} +2 -2
  9. package/dist/chunks/{color-field-85136598.js → color-field-rebpbe33.js} +3 -3
  10. package/dist/chunks/{color-slider-w1s3ndd8.js → color-slider-6bzmk3s7.js} +2 -2
  11. package/dist/chunks/color-t2bnnj8y.js +4 -0
  12. package/dist/chunks/{combobox-dk98wc5x.js → combobox-c49x7gf1.js} +2 -2
  13. package/dist/chunks/components-y8yhdd7d.js +4 -0
  14. package/dist/chunks/content-source-9e7qvmsf.js +4 -0
  15. package/dist/chunks/convert-to-repeater-pd2w4z21.js +4 -0
  16. package/dist/chunks/editor-mb9jzdrw.js +4 -0
  17. package/dist/chunks/entry-commands-at0wnx3f.js +4 -0
  18. package/dist/chunks/extension-sections-4z9qq0gh.js +4 -0
  19. package/dist/chunks/file-ops-dtdvjmza.js +4 -0
  20. package/dist/chunks/files-8pf70854.js +4 -0
  21. package/dist/chunks/format-host-fd3m2y2a.js +4 -0
  22. package/dist/chunks/fs-events-hrk29vcv.js +4 -0
  23. package/dist/chunks/grid-open-bh74v82z.js +4 -0
  24. package/dist/chunks/{grid-view-0v4hjspb.js → grid-view-a51mgzmq.js} +10 -10
  25. package/dist/chunks/{icons-j9eksgew.js → icons-qp8fn1k8.js} +2 -2
  26. package/dist/chunks/{iframe-entry-4zqtn3ry.js → iframe-entry-mpwe5pwk.js} +4 -4
  27. package/dist/chunks/{iframe-entry-2x9bn5ng.js → iframe-entry-msd43x9h.js} +4 -4
  28. package/dist/chunks/iframe-entry-rt8jz5t8.js +5 -0
  29. package/dist/chunks/{iframe-entry-54kwwhmg.js → iframe-entry-v40cr813.js} +2 -2
  30. package/dist/chunks/iframe-host-q0s0wwy3.js +4 -0
  31. package/dist/chunks/{image-bake-m8gzaan9.js → image-bake-q9ajdjsj.js} +3 -3
  32. package/dist/chunks/{image-editor-0afyws7c.js → image-editor-ke9std9b.js} +2 -2
  33. package/dist/chunks/index-57ang7ma.js +4 -0
  34. package/dist/chunks/index-eytr7av4.js +17 -0
  35. package/dist/chunks/{index-2q88g57p.js → index-x495reff.js} +3 -3
  36. package/dist/chunks/{javascript-5sxtr1g7.js → javascript-qe34bvaz.js} +3 -3
  37. package/dist/chunks/{jsonMode-m6sf47hq.js → jsonMode-m8rseh31.js} +8 -8
  38. package/dist/chunks/jx-validate-bbd1mary.js +4 -0
  39. package/dist/chunks/layers-panel-wcjtdqsa.js +4 -0
  40. package/dist/chunks/layers-yscpys6q.js +4 -0
  41. package/dist/chunks/{listbox-k5p41049.js → listbox-tktzq5xj.js} +2 -2
  42. package/dist/chunks/lit-html-qm5wbhqz.js +4 -0
  43. package/dist/chunks/media-library-2hfff88g.js +4 -0
  44. package/dist/chunks/media-open-4pb05cne.js +4 -0
  45. package/dist/chunks/media-picker-bzktmmwr.js +4 -0
  46. package/dist/chunks/{menu-26nez152.js → menu-xc3cbgsd.js} +2 -2
  47. package/dist/chunks/{monaco-binding-1s2b8snq.js → monaco-binding-7t38arh9.js} +3 -3
  48. package/dist/chunks/monaco-buffer-3vz94c9f.js +4 -0
  49. package/dist/chunks/monaco-setup-fstdew02.js +4 -0
  50. package/dist/chunks/notify-gbdcckrh.js +4 -0
  51. package/dist/chunks/parse-fpdzgk4c.js +4 -0
  52. package/dist/chunks/platform-9g72gdqr.js +4 -0
  53. package/dist/chunks/{popover-fhdnt4be.js → popover-cnmsav6b.js} +2 -2
  54. package/dist/chunks/publish-panel-91x1cb5d.js +4 -0
  55. package/dist/chunks/publish-quick-e2dmf7eg.js +4 -0
  56. package/dist/chunks/publish-workspace-1x8mnzrj.js +4 -0
  57. package/dist/chunks/quick-search-2m4y6p1x.js +4 -0
  58. package/dist/chunks/references-yg1g9rwx.js +4 -0
  59. package/dist/chunks/right-panel-7mfyhzrk.js +4 -0
  60. package/dist/chunks/source-control-rrc4jgp5.js +4 -0
  61. package/dist/chunks/{split-qh21j2b0.js → split-d15yencd.js} +2 -2
  62. package/dist/chunks/{studio-r5g7fx7q.js → studio-0jhhznxy.js} +6 -6
  63. package/dist/chunks/studio-0nb57pjg.js +7 -0
  64. package/dist/chunks/{studio-bpzwhn88.js → studio-0wa4wv4s.js} +4 -4
  65. package/dist/chunks/studio-0z8kp4xk.js +5 -0
  66. package/dist/chunks/{studio-jqvke4ac.js → studio-18gc5t3v.js} +4 -4
  67. package/dist/chunks/{studio-xh6rf05g.js → studio-1b79rpcb.js} +4 -4
  68. package/dist/chunks/studio-211q5j7m.js +4 -0
  69. package/dist/chunks/studio-213pyfxh.js +16 -0
  70. package/dist/chunks/studio-2b1smjvp.js +5 -0
  71. package/dist/chunks/{studio-dst8y8vh.js → studio-2v6tc9jp.js} +4 -4
  72. package/dist/chunks/studio-30j0wz99.js +5 -0
  73. package/dist/chunks/studio-3kmqhwtt.js +5 -0
  74. package/dist/chunks/studio-44drsmhw.js +5 -0
  75. package/dist/chunks/{studio-d5f7sskn.js → studio-495b6f2r.js} +4 -4
  76. package/dist/chunks/{studio-g65t6svn.js → studio-4gthb2fd.js} +4 -4
  77. package/dist/chunks/{studio-bmwgj8ez.js → studio-4xadhxj1.js} +4 -4
  78. package/dist/chunks/{studio-zav9hgb3.js → studio-52mzbxqm.js} +4 -4
  79. package/dist/chunks/{studio-thgexj3w.js → studio-56mmnsw8.js} +7 -7
  80. package/dist/chunks/studio-59hz8f4r.js +5 -0
  81. package/dist/chunks/{studio-bk0anq3b.js → studio-5k9mfafh.js} +3 -3
  82. package/dist/chunks/{studio-qarg1xf9.js → studio-5qez462c.js} +5 -5
  83. package/dist/chunks/studio-6tnpg0vx.js +5 -0
  84. package/dist/chunks/studio-6w8mt734.js +6 -0
  85. package/dist/chunks/studio-7hm04x5z.js +5 -0
  86. package/dist/chunks/studio-8atmfjjm.js +7 -0
  87. package/dist/chunks/{studio-69g6a0jn.js → studio-8n99z71s.js} +4 -4
  88. package/dist/chunks/{studio-ep1384t9.js → studio-8vmad6x2.js} +4 -4
  89. package/dist/chunks/{studio-6sxnqqw8.js → studio-93p5k4r4.js} +4 -4
  90. package/dist/chunks/{studio-hy936516.js → studio-9gb0m81w.js} +4 -4
  91. package/dist/chunks/{studio-ek4fb4eb.js → studio-a4ymg4vd.js} +4 -4
  92. package/dist/chunks/studio-anc8067x.js +5 -0
  93. package/dist/chunks/{studio-ketrgtph.js → studio-dbdt67kr.js} +5 -5
  94. package/dist/chunks/studio-dbex091t.js +5 -0
  95. package/dist/chunks/{studio-nngc45ct.js → studio-dj8ctxey.js} +4 -4
  96. package/dist/chunks/{studio-pgze9p34.js → studio-ed9bz68j.js} +5 -5
  97. package/dist/chunks/{studio-4ncxzw5m.js → studio-fe2d1fp5.js} +4 -4
  98. package/dist/chunks/{studio-m8hesdrw.js → studio-fgp4cyy3.js} +4 -4
  99. package/dist/chunks/{studio-151kgn69.js → studio-ft706q02.js} +4 -4
  100. package/dist/chunks/{studio-pv1ts08p.js → studio-g79s1dyg.js} +5 -5
  101. package/dist/chunks/{studio-zkkt13qd.js → studio-gahswxp4.js} +4 -4
  102. package/dist/chunks/{studio-x5ffyssw.js → studio-gbqc12bk.js} +4 -4
  103. package/dist/chunks/{studio-4jy967rj.js → studio-gxphbetb.js} +5 -5
  104. package/dist/chunks/studio-hdf01j7q.js +7 -0
  105. package/dist/chunks/studio-hf259xzd.js +48 -0
  106. package/dist/chunks/studio-jbva4wxw.js +5 -0
  107. package/dist/chunks/{studio-td3h1644.js → studio-jj9gf1qc.js} +4 -4
  108. package/dist/chunks/studio-jsjg3mjv.js +5 -0
  109. package/dist/chunks/studio-jtvb8hd7.js +5 -0
  110. package/dist/chunks/{studio-c72v1kwc.js → studio-kp4vzrct.js} +4 -4
  111. package/dist/chunks/{studio-s4k1v7dt.js → studio-kpx02gaa.js} +6 -6
  112. package/dist/chunks/{studio-3yr1zdp9.js → studio-kv1728ex.js} +8 -8
  113. package/dist/chunks/studio-m25ry0mf.js +5 -0
  114. package/dist/chunks/studio-mcbwmkyh.js +5 -0
  115. package/dist/chunks/studio-meajkr51.js +5 -0
  116. package/dist/chunks/studio-mkjrjpr2.js +6 -0
  117. package/dist/chunks/{studio-nv5eq0f7.js → studio-mr084886.js} +181 -181
  118. package/dist/chunks/{studio-43pynnhz.js → studio-mrb10hv3.js} +4 -4
  119. package/dist/chunks/{studio-7qqb7hb8.js → studio-nhpg405j.js} +4 -4
  120. package/dist/chunks/{studio-n271vdsg.js → studio-nsec0hxm.js} +41 -41
  121. package/dist/chunks/{studio-ztzf8mce.js → studio-nv0mh0p5.js} +4 -4
  122. package/dist/chunks/studio-pafmb06w.js +5 -0
  123. package/dist/chunks/{studio-4s5bka8t.js → studio-pgftd79b.js} +4 -4
  124. package/dist/chunks/{studio-wn2cmf9q.js → studio-pk961xgz.js} +4 -4
  125. package/dist/chunks/studio-pzbr7g05.js +5 -0
  126. package/dist/chunks/{studio-15mfah02.js → studio-qcc5hsw2.js} +6 -6
  127. package/dist/chunks/studio-qfq58c8n.js +5 -0
  128. package/dist/chunks/{studio-j3bq30yz.js → studio-qvb2jr83.js} +4 -4
  129. package/dist/chunks/studio-r85zw6ay.js +5 -0
  130. package/dist/chunks/{studio-f69wcajk.js → studio-s0kwce5w.js} +5 -5
  131. package/dist/chunks/studio-s6ymkf3q.js +14 -0
  132. package/dist/chunks/{studio-8ncm9zwx.js → studio-s7p5ccxa.js} +4 -4
  133. package/dist/chunks/{studio-zzgp5yka.js → studio-s9jjap3x.js} +4 -4
  134. package/dist/chunks/{studio-ber1dgte.js → studio-t5hde1ws.js} +4 -4
  135. package/dist/chunks/studio-vj9yv897.js +5 -0
  136. package/dist/chunks/{studio-ajfq4fmr.js → studio-wmak8xjw.js} +4 -4
  137. package/dist/chunks/{studio-k05g7efh.js → studio-wqsmvtqj.js} +4 -4
  138. package/dist/chunks/studio-x3z3rhej.js +5 -0
  139. package/dist/chunks/{studio-7qr8k0v2.js → studio-xb55kpmy.js} +4 -4
  140. package/dist/chunks/{studio-f3awr5nc.js → studio-xxtdajmv.js} +7 -7
  141. package/dist/chunks/{studio-1a7zshnv.js → studio-xxttcym1.js} +4 -4
  142. package/dist/chunks/{studio-czpmzs9r.js → studio-y2zsnzye.js} +7 -7
  143. package/dist/chunks/{studio-9f5vcb4w.js → studio-y3tjh2xb.js} +3 -3
  144. package/dist/chunks/studio-y4f1rdsj.js +5 -0
  145. package/dist/chunks/studio-ybkd5w8k.js +5 -0
  146. package/dist/chunks/{studio-cv6gnjqd.js → studio-yetr4gg1.js} +4 -4
  147. package/dist/chunks/{studio-ehj3csbm.js → studio-z295anhs.js} +5 -5
  148. package/dist/chunks/{studio-pte5w7rf.js → studio-z89e6wpg.js} +8 -8
  149. package/dist/chunks/{studio-4z0cdh16.js → studio-zbwr6prc.js} +3 -3
  150. package/dist/chunks/{studio-w3aafbpk.js → studio-zdbsv5q2.js} +3 -3
  151. package/dist/chunks/{studio-eq5vqn1q.js → studio-zvthj8hg.js} +4 -4
  152. package/dist/chunks/toast-2kn2vrn4.js +4 -0
  153. package/dist/chunks/{toast-host-g3r2s0kn.js → toast-host-3rxeyj3d.js} +3 -3
  154. package/dist/chunks/{tooltip-gtx40bjg.js → tooltip-ghkxkasp.js} +2 -2
  155. package/dist/chunks/{tree-a19s1c05.js → tree-vw4nc63s.js} +2 -2
  156. package/dist/chunks/{tsMode-3f116hth.js → tsMode-7gngmamr.js} +7 -7
  157. package/dist/chunks/workspace-gv0hxgsm.js +4 -0
  158. package/dist/chunks/workspace-home-j7e0mjy5.js +4 -0
  159. package/dist/chunks/{ws-client-cb49m87s.js → ws-client-vs11sxc5.js} +3 -3
  160. package/dist/iframe-entry.js +14 -14
  161. package/dist/manifest.json +84 -83
  162. package/dist/studio.js +80 -80
  163. package/package.json +12 -12
  164. package/src/browse/preview-style.ts +2 -1
  165. package/src/canvas/canvas-render.ts +6 -1
  166. package/src/canvas/iframe-drop.ts +84 -1
  167. package/src/canvas/iframe-entry.ts +9 -6
  168. package/src/canvas/iframe-render.ts +13 -0
  169. package/src/collab/collab-session.ts +2 -2
  170. package/src/commands/levels.ts +1 -1
  171. package/src/create/add-new-flow.ts +2 -1
  172. package/src/editor/convert-targets.ts +2 -23
  173. package/src/editor/slash-menu.ts +35 -17
  174. package/src/files/files.ts +18 -0
  175. package/src/format/format-choices.ts +5 -5
  176. package/src/format/format-host.ts +35 -3
  177. package/src/grid/redirects-grid.ts +4 -4
  178. package/src/locale/element-names.ts +131 -0
  179. package/src/panels/dnd.ts +3 -1
  180. package/src/panels/elements-panel.ts +93 -36
  181. package/src/panels/imports-panel.ts +3 -2
  182. package/src/panels/navigator-panels.ts +10 -10
  183. package/src/panels/panel-registry.ts +3 -3
  184. package/src/panels/site-panel.ts +2 -1
  185. package/src/panels/style-panel.ts +2 -1
  186. package/src/panels/styles-panel.ts +2 -2
  187. package/src/platforms/cloud.ts +5 -2
  188. package/src/services/ai-command-tools.ts +2 -1
  189. package/src/services/ai-project-tools.ts +18 -5
  190. package/src/services/jxn-language.ts +110 -0
  191. package/src/services/model-uri.ts +3 -0
  192. package/src/services/monaco-setup.ts +6 -2
  193. package/src/settings/contributed-section.ts +2 -1
  194. package/src/settings/extension-commands.ts +2 -1
  195. package/src/settings/general-settings.ts +2 -2
  196. package/src/settings/settings-document.ts +5 -5
  197. package/src/shell.ts +1 -1
  198. package/src/studio.ts +28 -11
  199. package/src/style/variables-view.ts +2 -2
  200. package/src/surfaces/panel-elements.json +466 -206
  201. package/src/surfaces/panel-elements.ts +61 -25
  202. package/src/tabs/project-config.ts +13 -13
  203. package/src/tabs/tab.ts +7 -2
  204. package/src/types.ts +11 -2
  205. package/src/view.ts +9 -2
  206. package/src/workspace/tab-workspace.ts +2 -2
  207. package/src/workspace/workspace-back.ts +2 -2
  208. package/dist/chunks/adapter-12dxr3z7.js +0 -4
  209. package/dist/chunks/add-new-flow-any4pw2q.js +0 -4
  210. package/dist/chunks/cf-settings-hbj16kh3.js +0 -4
  211. package/dist/chunks/color-thzpppyc.js +0 -4
  212. package/dist/chunks/components-a98hzqw9.js +0 -4
  213. package/dist/chunks/content-source-jq3fjs3w.js +0 -4
  214. package/dist/chunks/convert-to-repeater-g66r6qp1.js +0 -4
  215. package/dist/chunks/editor-rth1rzj8.js +0 -4
  216. package/dist/chunks/entry-commands-02j0s19w.js +0 -4
  217. package/dist/chunks/extension-sections-rqrs7dr0.js +0 -4
  218. package/dist/chunks/file-ops-6a49er4c.js +0 -4
  219. package/dist/chunks/files-b2p9y0yz.js +0 -4
  220. package/dist/chunks/format-host-7xe57k1s.js +0 -4
  221. package/dist/chunks/fs-events-0xsy168g.js +0 -4
  222. package/dist/chunks/grid-open-h3q4fjy5.js +0 -4
  223. package/dist/chunks/iframe-entry-m24fza30.js +0 -5
  224. package/dist/chunks/iframe-host-8jcmaktg.js +0 -4
  225. package/dist/chunks/index-7nj2375a.js +0 -4
  226. package/dist/chunks/jx-validate-808zgbgy.js +0 -4
  227. package/dist/chunks/layers-0ffdtqjn.js +0 -4
  228. package/dist/chunks/layers-panel-rw62wtvf.js +0 -4
  229. package/dist/chunks/lit-html-9bz9rcfv.js +0 -4
  230. package/dist/chunks/media-library-2a5hdbek.js +0 -4
  231. package/dist/chunks/media-open-069kzhj4.js +0 -4
  232. package/dist/chunks/media-picker-4p4pd28y.js +0 -4
  233. package/dist/chunks/monaco-buffer-m9fd2dka.js +0 -4
  234. package/dist/chunks/monaco-setup-e0crh3v6.js +0 -4
  235. package/dist/chunks/notify-re3js157.js +0 -4
  236. package/dist/chunks/parse-hee7ne9b.js +0 -4
  237. package/dist/chunks/platform-rywy3tkg.js +0 -4
  238. package/dist/chunks/publish-panel-czkpg8m4.js +0 -4
  239. package/dist/chunks/publish-quick-b9wbhqj6.js +0 -4
  240. package/dist/chunks/publish-workspace-yy6d23b7.js +0 -4
  241. package/dist/chunks/quick-search-tp7pjnmv.js +0 -4
  242. package/dist/chunks/references-wd2yj8s1.js +0 -4
  243. package/dist/chunks/right-panel-x971k0zc.js +0 -4
  244. package/dist/chunks/source-control-k4p00hpe.js +0 -4
  245. package/dist/chunks/studio-1d8m5s38.js +0 -16
  246. package/dist/chunks/studio-35pmfjtx.js +0 -5
  247. package/dist/chunks/studio-44xqe0b7.js +0 -4
  248. package/dist/chunks/studio-48yzqzqr.js +0 -5
  249. package/dist/chunks/studio-5rq3e4q5.js +0 -5
  250. package/dist/chunks/studio-6hcfm9q3.js +0 -5
  251. package/dist/chunks/studio-6mf31e16.js +0 -5
  252. package/dist/chunks/studio-8w5pa88p.js +0 -7
  253. package/dist/chunks/studio-9c6cbq2c.js +0 -4
  254. package/dist/chunks/studio-aaw7wxv8.js +0 -5
  255. package/dist/chunks/studio-afx9brsc.js +0 -5
  256. package/dist/chunks/studio-dmgh2rrj.js +0 -5
  257. package/dist/chunks/studio-erjccagy.js +0 -5
  258. package/dist/chunks/studio-ex1644g2.js +0 -5
  259. package/dist/chunks/studio-gw83z798.js +0 -7
  260. package/dist/chunks/studio-j52ks8q7.js +0 -5
  261. package/dist/chunks/studio-kefs4sz4.js +0 -5
  262. package/dist/chunks/studio-m3jrjfhy.js +0 -14
  263. package/dist/chunks/studio-n4pnf0sw.js +0 -5
  264. package/dist/chunks/studio-ncwx602y.js +0 -5
  265. package/dist/chunks/studio-nzp0sqjg.js +0 -5
  266. package/dist/chunks/studio-ph17an19.js +0 -5
  267. package/dist/chunks/studio-q509sqt8.js +0 -5
  268. package/dist/chunks/studio-s49y6m5b.js +0 -5
  269. package/dist/chunks/studio-t46rt6gx.js +0 -5
  270. package/dist/chunks/studio-veh91hjv.js +0 -5
  271. package/dist/chunks/studio-vswmz40d.js +0 -6
  272. package/dist/chunks/studio-w4mfaaam.js +0 -5
  273. package/dist/chunks/studio-x5py815g.js +0 -5
  274. package/dist/chunks/studio-z6s56dzz.js +0 -5
  275. package/dist/chunks/studio-ze1sm147.js +0 -7
  276. package/dist/chunks/studio-zn7ysyzb.js +0 -5
  277. package/dist/chunks/toast-w11qpkyz.js +0 -4
  278. package/dist/chunks/workspace-home-61n1jz3q.js +0 -4
  279. package/dist/chunks/workspace-sheek6zw.js +0 -4
@@ -0,0 +1,7 @@
1
+ import{ln,Ey,h}from"./studio-ybkd5w8k.js";import{st,Tr,zp,So}from"./studio-kp4vzrct.js";import{u}from"./studio-3kmqhwtt.js";import{x}from"./studio-anc8067x.js";import{b}from"./studio-y3tjh2xb.js";var Yb=["application","project","document","selection"],YO=["global","canvas","caret","grid","code","dock","palette"],ZO=["File","Edit","Selection","Insert","View","Document","Project","Source Control","Publish","Assistant","Collaborate","Help"],v=["commandbar/primary","commandbar/overflow","statusbar/project","statusbar/document","statusbar/selection","context/element","context/file","context/layer","context/tab","context/pane","blockbar","blockbar/format","outline/row","settings/menu","palette","never"],g={"commandbar/primary":{admits:["application","document"],note:"document only for Save / Undo / Redo / Open in Browser, by frequency; ≤5 total"},"commandbar/overflow":{admits:["application","project","document"],note:"never selection — the Command Bar is not a selection surface"},"statusbar/project":{admits:["project"],note:"the status bar's left field"},"statusbar/document":{admits:["document"],note:"the status bar's centre field"},"statusbar/selection":{admits:["selection"],note:"the status bar's right field"},"context/element":{admits:["selection"],note:"the canvas element menu acts on a selection"},"context/file":{admits:["project"],note:"a file row addresses the project's file set"},"context/layer":{admits:["selection"],note:"an outline row IS a selection"},"context/tab":{admits:["document"],note:"a tab addresses one document"},"context/pane":{admits:["document"],note:"a pane hosts one document"},blockbar:{admits:["selection"],note:"the floating bar owns selection-scoped verbs"},"blockbar/format":{admits:["selection"],note:"the bar's inline-format cluster — a range inside the selection is still the selection"},"outline/row":{admits:["selection"],note:"row actions act on the row's node"},"settings/menu":{admits:["application","project"],note:"the rail foot's gear menu — the settings family. It is a MENU, not a pinned slot, so it "+"may host two levels for the reason commandbar/overflow does: a menu prints each row's own name, chord and gate, and draws a divider where the level changes. The rail's PINNED groups stay single-level, in PANEL_PLACEMENT_MATRIX"},palette:{admits:["application","project","document","selection"],note:"the level-agnostic surface; it groups rows by level"},never:{admits:["application","project","document","selection"],note:"keyboard- and API-only; no rendered surface to be misplaced in"}},P=["rail/project","rail/document","navigator","inspector","dock.bottom"],y={"rail/project":{admits:["project"],note:"the rail's upper group — Site, and Files with the developer panels on"},"rail/document":{admits:["document"],note:"the rail's lower group — Insert, Outline, Data, and Packages with the developer panels on"},navigator:{admits:["project","document"],note:"whichever level the hosted panel declares; the panel header prints it"},inspector:{admits:["document","selection"],note:"Page is the open document's tab, Element the selection's (§6)"},"dock.bottom":{admits:["project","document"],note:"the panel header states which"}};function w(e){return e==="bottom"?"dock.bottom":e}function E(e){let t=[w(e.dock)];if(e.rail!==!1)t.push(`rail/${e.level}`);return t}function C(e){return P.some((t)=>t===e)}function c(e){let t=[];if(!d(e.level))return t.push({panelId:e.id,placement:"—",level:String(e.level),message:`declares unknown level "${String(e.level)}" (expected one of: ${Yb.join(", ")})`}),t;for(let n of E(e)){if(!C(n)){t.push({panelId:e.id,placement:n,level:e.level,message:`is level "${e.level}" and would render in "${n}", which is not a panel `+"placement — the rail has a group for project and one for document, and nothing else"});continue}let o=y[n];if(!o.admits.includes(e.level))t.push({panelId:e.id,placement:n,level:e.level,message:`is level "${e.level}" but "${n}" admits only ${o.admits.join(", ")} — ${o.note}`})}return t}function S(e){return v.some((t)=>t===e)}function d(e){return Yb.some((t)=>t===e)}function XO(e){let t=[];if(!d(e.level))return t.push({commandId:e.id,placement:"—",level:String(e.level),message:`declares unknown level "${String(e.level)}" (expected one of: ${Yb.join(", ")})`}),t;for(let n of e.menus??[]){if(!S(n)){t.push({commandId:e.id,placement:String(n),level:e.level,message:`declares unknown placement "${String(n)}"`});continue}let o=g[n];if(!o.admits.includes(e.level))t.push({commandId:e.id,placement:n,level:e.level,message:`is level "${e.level}" but "${n}" admits only ${o.admits.join(", ")} — ${o.note}`})}return t}var l="true",r=b({on:Tr(st.developerPanels)===l});zp((e)=>{if(e.includes(st.developerPanels.key))r.on=Tr(st.developerPanels)===l});function kC(){return r.on}function QO(e){r.on=e,So(st.developerPanels,e?l:"")}function ih(){let e=Ey();return e.project.open=x!==null,e.project.isMultilingual=(ln(x?.projectConfig??{}).i18n?.locales.length??0)>1,e.git.dirtyCount=u.git.status?.files.length??0,e.workspace.id=u.workspace,e.document.open=h.value!==null,e}var L=/^[a-z][\w-]*$/,a=new Map;function ei(e){if(!L.test(e.id))throw Error(`Panel id "${e.id}" is malformed — expected /^[a-z][\\w-]*$/, because the id is also `+`the region "navigator/panel:${e.id}" and the value view.setActivity accepts.`);if(a.has(e.id))throw Error(`Panel "${e.id}" is already registered — a second definition site is the defect this `+"registry exists to prevent.");let t=c({id:e.id,level:e.level,dock:e.dock,rail:e.rail});if(t.length>0){let n=t.map((o)=>` ✗ ${e.id} ${o.message}`).join(`
2
+ `);throw Error(`Panel "${e.id}" violates the level × placement matrix:
3
+ ${n}`)}if(e.railLabel!==void 0&&(e.railLabel.trim()===""||!e.title.startsWith(e.railLabel)))throw Error(`Panel "${e.id}" declares railLabel "${e.railLabel}", which is not a leading part of its title "${e.title}": the rail button's accessible name is the title, and the words on screen must be inside it (WCAG 2.5.3, Label in Name).`);a.set(e.id,e)}function Pp(e){return a.get(e)}function bx(e){let t=[...a.values()];return e?t.filter((n)=>n.dock===e):t}function yx(e,t){return e.when?e.when(t):!0}var m=[{level:"project",label:"Project"},{level:"document",label:"Document"}];function p(){return bx().filter((e)=>e.rail!==!1)}function cL(e){let t=kC(),n=p().filter((o)=>o.rail!=="developer"||t);return m.flatMap(({level:o,label:f})=>{let i=n.filter((s)=>s.level===o&&yx(s,e));return i.length>0?[{level:o,label:f,panels:i}]:[]})}function eA(){let e=p();return m.flatMap(({level:t})=>e.filter((n)=>n.level===t))}
4
+ export{Yb,YO,ZO,XO,kC,QO,ih,ei,Pp,bx,yx,cL,eA};
5
+
6
+ //# debugId=793293E867F36C9964756E2164756E21
7
+ //# sourceMappingURL=studio-0nb57pjg.js.map
@@ -1,5 +1,5 @@
1
- import{us}from"./studio-td3h1644.js";var r="site-",f=new Set(["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),o=[[183,183],[192,214],[216,246],[248,893],[895,8191],[8204,8205],[8255,8256],[8304,8591],[11264,12271],[12289,55295],[63744,64975],[65008,65533],[65536,983039]];function n(e){return`${String.fromCodePoint(92)}u{${e.toString(16)}}`}var a=[String.raw`\-.0-9_a-z`,...o.map(([e,t])=>`${n(e)}-${n(t)}`)].join(""),s=new RegExp(`^[${a}]$`,"u");function Lw(e){if(e==="")return"Enter a tag name.";if(!/^[a-z]/.test(e))return"A tag name starts with a lower-case letter.";for(let t of e.slice(1))if(!s.test(t))return/[A-Z]/.test(t)?"A tag name is lower case.":`“${t}” cannot appear in a tag name.`;if(!e.includes("-"))return"A tag name needs a hyphen, such as my-card.";if(f.has(e))return`<${e}> is reserved by HTML.`;return""}function $b(e){let t=us(e).replaceAll(/-+/g,"-").replaceAll(/^-|-$/g,"");if(t==="")return"";return/^[a-z]/.test(t)&&t.includes("-")?t:`${r}${t}`}
2
- export{Lw,$b};
1
+ import{hs}from"./studio-jj9gf1qc.js";var r="site-",f=new Set(["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),o=[[183,183],[192,214],[216,246],[248,893],[895,8191],[8204,8205],[8255,8256],[8304,8591],[11264,12271],[12289,55295],[63744,64975],[65008,65533],[65536,983039]];function n(e){return`${String.fromCodePoint(92)}u{${e.toString(16)}}`}var a=[String.raw`\-.0-9_a-z`,...o.map(([e,t])=>`${n(e)}-${n(t)}`)].join(""),s=new RegExp(`^[${a}]$`,"u");function Ow(e){if(e==="")return"Enter a tag name.";if(!/^[a-z]/.test(e))return"A tag name starts with a lower-case letter.";for(let t of e.slice(1))if(!s.test(t))return/[A-Z]/.test(t)?"A tag name is lower case.":`“${t}” cannot appear in a tag name.`;if(!e.includes("-"))return"A tag name needs a hyphen, such as my-card.";if(f.has(e))return`<${e}> is reserved by HTML.`;return""}function Nb(e){let t=hs(e).replaceAll(/-+/g,"-").replaceAll(/^-|-$/g,"");if(t==="")return"";return/^[a-z]/.test(t)&&t.includes("-")?t:`${r}${t}`}
2
+ export{Ow,Nb};
3
3
 
4
- //# debugId=3A0193554AB411ED64756E2164756E21
5
- //# sourceMappingURL=studio-bpzwhn88.js.map
4
+ //# debugId=56CE3144A8E8986764756E2164756E21
5
+ //# sourceMappingURL=studio-0wa4wv4s.js.map
@@ -0,0 +1,5 @@
1
+ function n(e){return typeof e==="string"}function J(e){return typeof e==="number"}function qe(e){return typeof e==="boolean"}function qM(e){return typeof e==="bigint"}function iv(e){return typeof e==="symbol"}function Q(e){return typeof e==="function"}function S(e){return typeof e==="object"&&e!==null}function kf(e){return e===null||n(e)||J(e)||qe(e)}function f(e){return typeof e==="object"&&e!==null&&!Array.isArray(e)}function Oe(e){return f(e)&&typeof e.$ref==="string"}function Wa(e){return f(e)&&e.$prototype==="Function"}function hc(e){return f(e)&&f(e.$expression)}function B_(e){return hc(e)&&Array.isArray(e.parameters)&&e.parameters.length>0}function kI(e){return Wa(e)&&Array.isArray(e.body)}function rv(e){return f(e)&&typeof e.$prototype==="string"&&e.$prototype!=="Function"}function ov(e){return f(e)&&e.timing==="server"&&typeof e.$src==="string"&&typeof e.$export==="string"&&!e.$prototype}var s=new Set(["type","enum","minimum","maximum","minLength","maxLength","pattern","format","items","properties","required","description","title","$comment"]);function JM(e){if(!f(e))return!1;for(let t of Object.keys(e))if(!s.has(t))return!1;return!0}function Ir(e){return f(e)&&e.$prototype==="Array"}function Gn(e){return f(e)}function hr(e){return typeof e==="string"&&e.includes("${")}function EI(e){return/\breturn\b[^\S\n]*(?![;}\s]|$)/.test(e)}function kl(e){return typeof e==="object"&&e!==null&&!Array.isArray(e)}function Di(e,t){let r=e?.[t];return kl(r)?r:void 0}function dd(e,t){let r=e[t];if(kl(r))return r;let o={};return e[t]=o,o}function Ef(e){return Oe(e)||Wa(e)||hc(e)}function wg(e,t){let r=e[t];return Ef(r)?r:void 0}function V_(e){if(!e)return[];return e.map((t)=>n(t)?t:t.name)}function i(e){return typeof e==="string"}function Hh(e){if(typeof e!=="object"||e===null||Array.isArray(e)||!f(e.$expression))return!1;let t=e.$expression;if(t.operator==="?:")return typeof t.value==="string"&&typeof t.initial==="string";if(t.operator==="switch")return f(t.cases)&&Object.values(t.cases).every((r)=>n(r))&&typeof t.default==="string";return!1}function TI(e){if(i(e))return[e];if(!Hh(e))return[];let t=e.$expression;if(t.operator==="?:")return[...new Set([t.value,t.initial])];return[...new Set([...Object.values(t.cases),t.default])]}function rt(e){return i(e)?e:TI(e).join("|")}function ud(e){return e.startsWith("#")}
2
+ export{n,J,qe,qM,iv,Q,S,kf,f,Oe,Wa,hc,B_,kI,rv,ov,JM,Ir,Gn,hr,EI,kl,Di,dd,Ef,wg,V_,Hh,TI,rt,ud};
3
+
4
+ //# debugId=8BD662035708140C64756E2164756E21
5
+ //# sourceMappingURL=studio-0z8kp4xk.js.map
@@ -1,5 +1,5 @@
1
- import{Me}from"./studio-bmwgj8ez.js";import{Q}from"./studio-erjccagy.js";var f=3;function p(e,t,n){return Math.min(n,Math.max(t,e))}function W0(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=W0({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,Me(e).top-Me(t).top)}function zw(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 W0({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 Uw(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 KD(e,t,n){let o=e?.querySelector(t);return o&&o.offsetHeight>0?o.offsetHeight:n}var h=new WeakMap;function qw(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{W0,zw,Uw,KD,qw};
1
+ import{Me}from"./studio-4xadhxj1.js";import{Q}from"./studio-0z8kp4xk.js";var f=3;function p(e,t,n){return Math.min(n,Math.max(t,e))}function ZS(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=ZS({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,Me(e).top-Me(t).top)}function Gw(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 ZS({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 Yw(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 rO(e,t,n){let o=e?.querySelector(t);return o&&o.offsetHeight>0?o.offsetHeight:n}var h=new WeakMap;function Zw(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{ZS,Gw,Yw,rO,Zw};
3
3
 
4
- //# debugId=DA9D7F883647F4C064756E2164756E21
5
- //# sourceMappingURL=studio-jqvke4ac.js.map
4
+ //# debugId=EA507F463E4C4CCD64756E2164756E21
5
+ //# sourceMappingURL=studio-18gc5t3v.js.map
@@ -1,5 +1,5 @@
1
- import{n,Q,S}from"./studio-erjccagy.js";function cf(r){if(!r)return!1;if(Q(r.openProject))return!0;return r.openProjectPicker==="repo-list"&&Q(r.listRepos)&&Q(r.importProject)}function qR(r){globalThis.__jxPlatform=r}function jy(){return globalThis.__jxLauncher}var a=new Map;function KR(){let r=[];for(let[o,i]of a)for(let t=0;t<i;t++)r.push(o);return r}function s(r){a.set(r,(a.get(r)??0)+1)}function c(r){let o=(a.get(r)??1)-1;if(o>0)a.set(r,o);else a.delete(r)}function g(r){return(S(r)||Q(r))&&"then"in r&&Q(r.then)}function d(r,o,i){return(...t)=>{let e=o.apply(i,t);if(!g(e))return e;s(r);let u=()=>{c(r)};return e.then(u,u),e}}function P(r){let o=new Map;return new Proxy(r,{get(i,t){let e=i[t];if(!Q(e)||!n(t))return e;let u=o.get(t);if(u&&u.raw===e)return u.wrapper;let f=d(t,e,i);return o.set(t,{raw:e,wrapper:f}),f}})}var l=null;function p(){let r=globalThis.__jxPlatform;if(!r)throw Error("No platform registered. Call registerPlatform() before starting Studio.");if(l?.raw!==r)l={raw:r,wrapped:P(r)};return l.wrapped}function ve(){return globalThis.__jxPlatform!=null}
2
- export{cf,qR,jy,KR,p,ve};
1
+ import{n,Q,S}from"./studio-0z8kp4xk.js";function pf(r){if(!r)return!1;if(Q(r.openProject))return!0;return r.openProjectPicker==="repo-list"&&Q(r.listRepos)&&Q(r.importProject)}function tI(r){globalThis.__jxPlatform=r}function zy(){return globalThis.__jxLauncher}var a=new Map;function nI(){let r=[];for(let[o,i]of a)for(let t=0;t<i;t++)r.push(o);return r}function s(r){a.set(r,(a.get(r)??0)+1)}function c(r){let o=(a.get(r)??1)-1;if(o>0)a.set(r,o);else a.delete(r)}function g(r){return(S(r)||Q(r))&&"then"in r&&Q(r.then)}function d(r,o,i){return(...t)=>{let e=o.apply(i,t);if(!g(e))return e;s(r);let u=()=>{c(r)};return e.then(u,u),e}}function P(r){let o=new Map;return new Proxy(r,{get(i,t){let e=i[t];if(!Q(e)||!n(t))return e;let u=o.get(t);if(u&&u.raw===e)return u.wrapper;let f=d(t,e,i);return o.set(t,{raw:e,wrapper:f}),f}})}var l=null;function p(){let r=globalThis.__jxPlatform;if(!r)throw Error("No platform registered. Call registerPlatform() before starting Studio.");if(l?.raw!==r)l={raw:r,wrapped:P(r)};return l.wrapped}function we(){return globalThis.__jxPlatform!=null}
2
+ export{pf,tI,zy,nI,p,we};
3
3
 
4
- //# debugId=6691C22E6D5D9AFA64756E2164756E21
5
- //# sourceMappingURL=studio-xh6rf05g.js.map
4
+ //# debugId=848D9B8B6F44CD9064756E2164756E21
5
+ //# sourceMappingURL=studio-1b79rpcb.js.map
@@ -0,0 +1,4 @@
1
+ import{Qv,Ea,W0,ss,z0,as}from"./studio-kv1728ex.js";import{Ce}from"./studio-ft706q02.js";import{n,J,f}from"./studio-0z8kp4xk.js";var tN="meta",nN="frontmatter",iN="structure",rN="source",oN=2;function Y(e){return f(e)}function Lu(e){return e.getMap(tN)}function sN(e){return e.getMap(nN)}function ob(e){return e.getMap(iN)}function aN(e){return e.getText(rN)}var h=new Set(["textContent"]),y=new Set(["style","attributes","$props"]);function g(e,t){let o=e.toString();if(o===t)return!1;let r=0,s=Math.min(o.length,t.length);while(r<s&&o[r]===t[r])r+=1;let a=o.length,i=t.length;while(a>r&&i>r&&o[a-1]===t[i-1])a-=1,i-=1;if(a>r)e.delete(r,a-r);if(i>r)e.insert(r,t.slice(r,i));return!0}function d(e){let t=new ss;for(let[o,r]of Object.entries(e)){if(r===void 0)continue;t.set(o,Y(r)?d(r):Ce(r))}return t}function S(e,t){for(let o of[...e.keys()])if(!(o in t)||t[o]===void 0)e.delete(o);for(let[o,r]of Object.entries(t)){if(r===void 0)continue;let s=e.get(o);if(Y(r))if(s instanceof ss)S(s,r);else e.set(o,d(r));else if(!V(s,r))e.set(o,Ce(r))}}function V(e,t){if(e===t)return!0;if(e instanceof ss||e instanceof Ea||e instanceof as)return!1;return JSON.stringify(e??null)===JSON.stringify(t??null)}function p(e){return n(e)?new as(e):lN(e)}function am(e){let t=new Ea;return t.insert(0,e.map((o)=>p(o))),t}function lN(e){if(!Y(e))throw TypeError("collab-schema: a document node must be a plain object");let t=new ss;for(let[o,r]of Object.entries(e)){if(r===void 0)continue;if(o==="children"&&Array.isArray(r))t.set(o,am(r));else if(h.has(o)&&n(r))t.set(o,new as(r));else if(y.has(o)&&Y(r))t.set(o,d(r));else t.set(o,Ce(r))}return t}function D(e){return Object.fromEntries(Array.from(e.entries(),([t,o])=>[t,lm(o)]))}function O(e){if(n(e))return e;return e instanceof as?e.toString():D(e)}function lm(e){if(e instanceof ss)return D(e);if(e instanceof Ea)return e.toArray().map((t)=>lm(t));if(e instanceof as)return e.toString();return e}function Y2(e){return D(ob(e))}function B0(e,t){let o=ob(e);for(let r of t)if(o instanceof ss)o=o.get(String(r));else if(o instanceof Ea){let s=Number(r);if(!Number.isInteger(s)||s<0||s>=o.length)return;o=o.get(s)}else return;return o}function uE(e,t,o){let r=aN(e);if(r.toString()===t)return!1;return e.transact(()=>{g(r,t)},o),!0}function Z2(e,t,o={}){let r=Lu(e);if(r.get("structureSeeded")===!0)return!1;return e.transact(()=>{let s=ob(e);for(let[i,c]of Object.entries(t)){if(c===void 0)continue;if(i==="children"&&Array.isArray(c))s.set(i,am(c));else s.set(i,Ce(c))}let a=sN(e);for(let[i,c]of Object.entries(o.frontmatter??{}))if(c!==void 0)a.set(i,Ce(c));r.set("schemaVersion",oN),r.set("canonical","structure"),r.set("canonicalRev",0),r.set("sourceFormat",o.sourceFormat??null),r.set("structureSeeded",!0)},o.origin),!0}var X2="jx-local",Q2="jx-mirror",eF="jx-seed";class Ru extends Error{constructor(e){super(`collab-path-unresolved:${e.join("/")}`);this.name="CollabPathError"}}function T(e,t){let o=B0(e,t);if(!(o instanceof ss))throw new Ru(t);return o}function x(e,t,o){let r=T(e,t),s=r.get("children");if(s instanceof Ea)return s;if(o&&s===void 0){let a=new Ea;return r.set("children",a),a}throw new Ru([...t,"children"])}function w(e,t,o){let r=e.get(t);if(t==="children"&&Array.isArray(o)){e.set(t,am(o));return}if(h.has(t)&&n(o)){if(r instanceof as)g(r,o);else e.set(t,new as(o));return}if(y.has(t)&&f(o)){if(r instanceof ss)S(r,o);else e.set(t,d(o));return}e.set(t,Ce(o))}function P(e,t){let{op:o}=t;switch(t.op){case"set-key":{let r=T(e,t.path);if(t.value===void 0)r.delete(t.key);else w(r,t.key,t.value);return}case"insert-child":{let r=x(e,t.parentPath,!0);if(t.index<0||t.index>r.length)throw new Ru([...t.parentPath,"children",t.index]);r.insert(t.index,[p(t.node)]);return}case"remove-child":{let r=x(e,t.parentPath,!1);if(t.index<0||t.index>=r.length)throw new Ru([...t.parentPath,"children",t.index]);r.delete(t.index,1);return}case"set-child":{let r=x(e,t.parentPath,!1);if(t.index<0||t.index>=r.length)throw new Ru([...t.parentPath,"children",t.index]);let s=r.get(t.index);if(s instanceof as&&n(t.node)){g(s,t.node);return}r.delete(t.index,1),r.insert(t.index,[p(t.node)]);return}case"move-child":{let r=x(e,t.fromParentPath,!1),s=x(e,t.toParentPath,!0);if(t.fromIndex<0||t.fromIndex>=r.length)throw new Ru([...t.fromParentPath,"children",t.fromIndex]);let a=lm(r.get(t.fromIndex));if(r.delete(t.fromIndex,1),t.toIndex<0||t.toIndex>s.length)throw new Ru([...t.toParentPath,"children",t.toIndex]);s.insert(t.toIndex,[p(a)]);return}default:throw Error(`unknown-doc-op:${o}`)}}function tF(e,t,o){e.transact(()=>{for(let r of t)P(e,r)},o)}function C(e){for(let t=0;t<e.length;t++){let o=e[t];if(!n(o))continue;if(y.has(o))return{key:o,nodePath:e.slice(0,t)};if(h.has(o))return{key:o,nodePath:e.slice(0,t)}}return null}function N(e){return e instanceof as||e instanceof ss||n(e)}function v(e){return e.every((t)=>n(t)||J(t))}function nF(e){if(e.length===0)return[];let t=e.map((s)=>s.path);if(!t.every((s)=>v(s)))return null;for(let s=0;s<t.length;s++)for(let a=0;a<t.length;a++){if(s===a)continue;let i=t[s],c=t[a];if(i.length<=c.length&&i.every((u,l)=>u===c[l]))return null}if(e.filter((s)=>s instanceof Qv).length>1)return null;let r=[];for(let s of e){let{path:a}=s,i=C(a);if(i){let{doc:c}=s.target;if(!c)return null;let u=B0(c,[...i.nodePath,i.key]);if(u===void 0)return null;r.push({key:i.key,op:"set-key",path:i.nodePath,value:lm(u)});continue}if(s instanceof z0){let c=a.at(-1);if(a.at(-2)==="children"&&J(c)){r.push({index:c,node:s.target.toString(),op:"set-child",parentPath:a.slice(0,-2)});continue}return null}if(s instanceof W0){let c=s.target;for(let[u,l]of s.changes.keys)if(l.action==="delete")r.push({key:u,op:"set-key",path:a});else r.push({key:u,op:"set-key",path:a,value:lm(c.get(u))})}else if(s instanceof Qv){if(a.at(-1)!=="children")return null;let c=a.slice(0,-1),u=0;for(let l of s.changes.delta)if(l.retain!==void 0)u+=l.retain;else if(l.delete!==void 0)for(let m=0;m<l.delete;m++)r.push({index:u,op:"remove-child",parentPath:c});else if(l.insert!==void 0){let m=Array.isArray(l.insert)?l.insert:[l.insert];for(let E of m){if(!N(E))return null;r.push({index:u,node:O(E),op:"insert-child",parentPath:c}),u+=1}}}else return null}return r}function iF(e,t,o){e.transact(()=>{let r=ob(e),s=[...r.keys()];for(let i of s)if(!(i in t)||t[i]===void 0)r.delete(i);for(let[i,c]of Object.entries(t)){if(c===void 0)continue;if(i==="children"&&Array.isArray(c))r.set(i,am(c));else r.set(i,Ce(c))}let a=Lu(e);a.set("canonicalRev",Number(a.get("canonicalRev")??0)+1)},o)}function hE(e){return Lu(e).get("canonical")==="source"?"source":"structure"}function pE(e){return Number(Lu(e).get("canonicalRev")??0)}function rF(e,t,o){if(hE(e)==="source")return!1;return e.transact(()=>{uE(e,t,o);let r=Lu(e);r.set("canonical","source"),r.set("canonicalRev",pE(e)+1)},o),!0}function oF(e,t){if(hE(e)!=="source")return!1;return e.transact(()=>{let o=Lu(e);o.set("canonical","structure"),o.set("canonicalRev",pE(e)+1)},t),!0}function sF(e,t,o){let r=[];for(let[s,a]of e.getStates()){let i=a;if(s!==o&&i.mode==="source"&&i.focusedPath===t)r.push(s)}return r}function aF(e,t){let o=e.clientID,r=e.getStates().get(o);if(r?.mode!=="source"||r.focusedPath!==t)return!1;let s=o;for(let[a,i]of e.getStates()){let c=i;if(c.mode==="source"&&c.focusedPath===t&&c.canWrite!==!1&&a<s)s=a}return s===o}var fE=["#4f9cf9","#e5484d","#30a46c","#f5a524","#8e4ec6","#00a2c7","#e93d82","#a8845c"];function lF(e){let t=5381;for(let r=0;r<e.length;r++)t=Math.imul(t,33)+(e.codePointAt(r)??0);let o=Math.abs(t)%fE.length;return fE[o]}export{tN,nN,iN,rN,oN,Lu,sN,ob,aN,am,lN,lm,Y2,B0,uE,Z2,X2,Q2,eF,Ru,tF,nF,iF,hE,pE,rF,oF,sF,aF,fE,lF};
2
+
3
+ //# debugId=D3F171516212F2CA64756E2164756E21
4
+ //# sourceMappingURL=studio-211q5j7m.js.map
@@ -0,0 +1,16 @@
1
+ import{J,iv,Q}from"./studio-0z8kp4xk.js";function w(e){return e.replaceAll("~","~0").replaceAll("/","~1")}var T=100;function CI(e){let t={blankAfter:new Set,escaped:new Map,inline:new Map},n=0,c=()=>{let o=0;while(n<e.length&&(e[n]===" "||e[n]==="\t"||e[n]==="\r"||e[n]===`
2
+ `)){if(e[n]===`
3
+ `)o+=1;n+=1}return o},u=()=>{let o=n,a=new Set;n+=1;while(n<e.length&&e[n]!=='"')if(e[n]==="\\")if(e[n+1]==="u"){let s=Number.parseInt(e.slice(n+2,n+6),16);if(s>=128)a.add(s);n+=6}else n+=2;else n+=1;return n+=1,{escaped:a,raw:e.slice(o,n)}},l=(o,a)=>{let s=c();if(e[n]===a)return n+=1,!0;if(n+=1,s+=c(),s>=2)t.blankAfter.add(o);return!1},g=(o)=>{c();let a=e[n];if(a==="{"){n+=1;let s=c()>0;if(e[n]==="}"){n+=1;return}t.inline.set(o,!s);while(n<e.length){let r=JSON.parse(u().raw);c(),n+=1;let i=`${o}/${w(r)}`;if(g(i),l(i,"}"))return}}else if(a==="["){if(n+=1,c(),e[n]==="]"){n+=1;return}for(let s=0;n<e.length;s+=1){let r=`${o}/${s}`;if(g(r),l(r,"]"))return}}else if(a==='"'){let{escaped:s}=u();if(s.size>0)t.escaped.set(o,s)}else while(n<e.length&&!`,]} \r
4
+ `.includes(e[n]))n+=1};return g(""),t}function fs(e){return{document:JSON.parse(e),layout:CI(e)}}var L=/[^\u0020-\u007E]/,R=/^[\p{Mn}\p{Me}\p{Cf}]$/u,W=/^\p{Emoji_Presentation}$/u;function D(e){return e>=4352&&(e<=4447||e===9001||e===9002||e>=11904&&e<=12871&&e!==12351||e>=12880&&e<=19903||e>=19968&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65131||e>=65281&&e<=65376||e>=65504&&e<=65510||e>=110592&&e<=110593||e>=127488&&e<=127569||e>=131072&&e<=262141)}function E(e){if(!L.test(e))return e.length;let t=0;for(let n of e){if(R.test(n))continue;t+=D(n.codePointAt(0))||W.test(n)?2:1}return t}function k(e){return e===void 0||Q(e)||iv(e)}function z(e){return Object.entries(e).filter(([,t])=>!k(t))}function P(e){return typeof e==="object"&&e!==null&&!Array.isArray(e)}function H(e){if(e.length<2)return!1;let t=Array.isArray(e[0])?"array":P(e[0])?"object":null;if(t===null)return!1;return e.every((n)=>t==="array"?Array.isArray(n)&&n.length>1:P(n)&&z(n).length>1)}function K(e){return e.length>1&&e.every((t)=>J(t))}function N(e,t){let n=k(e)?"null":JSON.stringify(e);return t===void 0?n:n.replaceAll(/[\u0080-\uFFFF]/g,(c)=>{let u=c.codePointAt(0);return t.has(u)?`\\u${u.toString(16).padStart(4,"0")}`:c})}function vr(e,t,n=T){let c=t?.inline??new Map,u=t?.blankAfter??new Set,l=t?.escaped??new Map,g=(r,i)=>c.get(r)??i,o=(r,i,b)=>{if(Array.isArray(r)){if(r.length===0)return"[]";if(H(r))return null;let m=[];for(let[d,y]of r.entries()){let p=`${i}/${d}`,f=u.has(p)?null:o(y,p,b);if(f===null)return null;m.push(f)}return`[${m.join(", ")}]`}if(P(r)){let m=z(r);if(m.length===0)return"{}";if(!g(i,b))return null;let d=[];for(let[y,p]of m){let f=`${i}/${w(y)}`,x=u.has(f)?null:o(p,f,!0);if(x===null)return null;d.push(`${JSON.stringify(y)}: ${x}`)}return`{ ${d.join(", ")} }`}return N(r,l.get(i))},a=(r)=>r.map(({path:i,text:b},m)=>m===r.length-1?b:`${b},
5
+ ${u.has(i)?`
6
+ `:""}`).join(""),s=(r,i,b,m,d,y)=>{if(!Array.isArray(r)&&!P(r))return N(r,l.get(i));let p=o(r,i,d);if(p!==null&&m+E(p)+y<=n)return p;let f=" ".repeat(b+2),x=`
7
+ ${" ".repeat(b)}`;if(Array.isArray(r)){if(K(r))return`[
8
+ ${Y(r,f,n,(j)=>u.has(`${i}/${j}`))}${x}]`;let S=r.map((h,j)=>{let _=`${i}/${j}`,O=j===r.length-1,A=s(h,_,b+2,f.length,d,O?0:1);return{path:_,text:`${f}${A}`}});return`[
9
+ ${a(S)}${x}]`}let V=z(r),F=g(i,d),M=V.map(([S,h],j)=>{let _=`${i}/${w(S)}`,O=`${JSON.stringify(S)}: `,A=j===V.length-1,C=f.length+E(O),I=s(h,_,b+2,C,F,A?0:1);return{path:_,text:`${f}${O}${I}`}});return`{
10
+ ${a(M)}${x}}`};return`${s(e,"",0,0,!1,0)}
11
+ `}function Y(e,t,n,c){let u=[],l="";for(let[g,o]of e.entries()){let a=`${N(o)}${g===e.length-1?"":","}`;if(l==="")l=`${t}${a}`;else if(l.length+1+a.length<=n)l=`${l} ${a}`;else u.push(l),l=`${t}${a}`;if(c(g)&&g<e.length-1)u.push(l,""),l=""}return u.push(l),u.join(`
12
+ `)}var da="project.json";function Ni(e){return e===da}
13
+ export{CI,fs,vr,da,Ni};
14
+
15
+ //# debugId=71C0F36378A6AC3F64756E2164756E21
16
+ //# sourceMappingURL=studio-213pyfxh.js.map
@@ -0,0 +1,5 @@
1
+ import{Qx,Da,vl,g,Si,Ft}from"./studio-ybkd5w8k.js";import{SS,Lw,pT}from"./studio-9gb0m81w.js";import{GE,YE,YN}from"./studio-kpx02gaa.js";import{dS,uS,iT}from"./studio-495b6f2r.js";import{FT,jT,KD}from"./studio-2v6tc9jp.js";var n={children:[],tagName:"div"},uF=new Set(Object.values(Qx));function nS(e){return uF.has(e)}function RE(e){let r=Da(e),o=g.tabs.get(r);if(o)return Ft(r),o;return Si({capabilities:{modes:[Qx[e]]},document:structuredClone(n),documentPath:null,id:r})}function IE(e,r){Si({background:!0,capabilities:{modes:[Qx[e]]},document:structuredClone(n),documentPath:null,id:Da(e),paneId:r})}function iS(e,r){let o=vl(r.id);if(o==="media")return SS(e,r);if(o==="content")return GE(e,r);if(o==="settings")return FT(e,r);return dS(e,r)}function ub(e){Lw(e),YE(e),uS(e),jT(e)}function NE(e,r){let{paneId:o}=e;if(iS(o,r))return;ub(o);let t=vl(r.id);if(t==="media"){pT(e,r);return}if(t==="content"){YN(e,r);return}if(t==="settings"){KD(e,r);return}iT(e,r)}
2
+ export{uF,nS,RE,IE,iS,ub,NE};
3
+
4
+ //# debugId=2E181892EE9942A464756E2164756E21
5
+ //# sourceMappingURL=studio-2b1smjvp.js.map
@@ -1,5 +1,5 @@
1
- import{ae}from"./studio-q509sqt8.js";import{X}from"./studio-9c6cbq2c.js";import{Up,gh}from"./studio-s49y6m5b.js";import{LA}from"./studio-1d8m5s38.js";import{nt}from"./studio-cv6gnjqd.js";import{$n,E,I}from"./studio-1a7zshnv.js";import{b}from"./studio-9f5vcb4w.js";import{n}from"./studio-erjccagy.js";var C=[{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"}],DD="integrations";function OD(e){return C.some((t)=>t.id===e)}var U="overview",m=new Map,T=new Set;function k(){for(let e of T)e()}function Od(){k()}function $0(e){return T.add(e),()=>{T.delete(e)}}function Gl(e){m.set(e.key,e),k()}function AD(e){if(m.delete(e))k()}function q(){return[...m.values()].toSorted((e,t)=>e.order-t.order)}function Ow(){let e=q();return C.flatMap((t)=>{let a=e.filter((r)=>(r.group??"integrations")===t.id);return a.length===0?[]:[{id:t.id,intro:t.intro,label:t.label,note:t.note,sections:a}]})}function $T(){return Ow().flatMap((e)=>e.sections.map((t)=>t.key))}function w(e){return m.get(e)}var h=null,f=U;function M(){if(h!==null&&m.has(h))return f=h,h=null,f;if(m.has(f))return f;return $T()[0]??f}function L0(e){if(m.has(e))f=e,h=null;else h=e;k()}var A={$schema:"https://jxsuite.com/schema/v1",$id:"StudioSettingsPane",$description:"Project Settings' home (§17.1, §22.9): the Settings workspace's surface, filling a pane's stage. A head names the workspace and carries the Back control, which says where it goes; under it, the settings editor's two columns, the grouped section list and the section body. 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:"settings","data-jx-region":"${state.region}",role:"region","aria-labelledby":"settings-pane-heading"},style:{$description:"Fills the pane's stage by its own geometry, as the Publish and Media homes do: the stage is `position: relative`, so the home takes the whole of it, and each column scrolls itself. No part below is named `body`, `field`, `label`, `error`, `text` or `actions`: sections mount kit controls and documents of their own inside this one, the kit is light DOM, and a rule keyed on one of their part names here would reach into them.",position:"absolute",inset:"0",display:"flex",flexDirection:"column",boxSizing:"border-box",minHeight:"0",background:"var(--bg)",color:"var(--fg)",fontFamily:"var(--jx-font-sans)",textAlign:"initial",'& [part="head"]':{display:"flex",alignItems:"center",gap:"var(--jx-space-3)",padding:"var(--jx-space-3) var(--jx-space-5)",borderBottom:"1px solid var(--border)"},'& [part="heading"]':{flex:"1",margin:"0",fontSize:"var(--jx-text-lg)",fontWeight:"600"},'& [part="columns"]':{display:"flex",flex:"1",minHeight:"0"},'& [part="nav"]':{display:"flex",flexDirection:"column",gap:"var(--jx-space-4)",width:"220px",minWidth:"220px",flexShrink:"0",padding:"var(--jx-space-3) var(--jx-space-3) var(--jx-space-3) var(--jx-space-2)",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-4) var(--jx-space-5) var(--jx-space-6)"},'& [part="group-intro"]':{margin:"0 0 var(--jx-space-3)",color:"var(--fg-dim)",fontSize:"13px",maxWidth:"1200px"},'& [part="group-intro"]:empty':{display:"none"},'& [part="section-host"]':{$description:"Wide enough for a map-layout section's list and editor side by side, and no wider: on a large monitor a form stretched to the stage's full width is a line too long to read.",display:"block",minWidth:"0",maxWidth:"1200px"},'& [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 Settings is on screen. A blank column beside a list reads as a broken surface, 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:"head"},children:[{tagName:"jx-action-button",attributes:{part:"back"},$props:{size:"sm",quiet:!0,icon:"arrow-left"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/back"},value:[]}]},children:[{tagName:"span",textContent:"${state.backLabel}"}],$description:"Back to the workspace Settings was opened from, named, as the pane context bar's Back is in a workspace with no tab strip (§22.1): the top bar draws no tab for Settings, so nothing else on screen says where the author came from."},{tagName:"h2",attributes:{part:"heading",id:"settings-pane-heading"},textContent:"${state.heading}"}]},{tagName:"div",attributes:{part:"columns",role:"none"},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}"}}}]}]}]};E("settings-pane",A);function J(e){let t=n(e)?void 0:e.attributes?.part;return n(t)?t:""}function H(e){return e===""?"ok":"failed"}function W(e,t,a){let r=b({...t,...a,failureState:H(t.failure)});e.textContent="",delete e._$litPart$;let o=null,s=!1,p=null,S=I("settings-pane",r,e,{onNodeCreated:(i,d,g)=>{if(!s&&i instanceof HTMLElement&&J(g)==="section-host")p=i}}).then((i)=>{if(s){i.dispose();return}o=i});return{attached:()=>{if(s)return!1;let i=o?.root;return i===void 0?!0:i instanceof HTMLElement&&e.contains(i)},body:()=>p,dispose(){s=!0,o?.dispose(),o=null,p=null},async focusActive(){let i=o?.root,d=i instanceof HTMLElement?[...i.querySelectorAll('[part="nav-item"]')].find((y)=>y.dataset.section===r.active):void 0;if(!d)return;let g=d.closest("jx-tabs");if(g&&d.getAttribute("aria-selected")!=="true")await new Promise((y)=>{g.addEventListener("jx-ready",()=>{y()},{once:!0})});if(!s)d.focus()},ready:S,update(i){r.region=i.region,r.heading=i.heading,r.backLabel=i.backLabel,r.groups=i.groups,r.moved=i.moved,r.activeTabId=i.activeTabId,r.empty=i.empty,r.intro=i.intro,r.hasSection=i.hasSection,r.failure=i.failure,r.failureState=H(i.failure),r.active=i.active}}}var K=gh("settings").title,Y="No settings sections.",O=[{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 G(e){return`settings-nav-${e}`}function Q(e){return O.find((t)=>t.workspace===e)??null}function P(e,t){let a=M(),r=Ow();return{active:a,backLabel:e.backLabel(),activeTabId:G(a),empty:Y,failure:t,groups:r.map((o)=>({id:o.id,label:o.label,note:o.note,sections:o.sections.map((s)=>({key:s.key,label:s.label,tabId:G(s.key)})),tabsLabel:o.note===""?o.label:`${o.label}, ${o.note.toLowerCase()}`,titleId:`settings-group-${o.id}`})),hasSection:w(a)!==void 0,heading:K,intro:w(a)?.intro||(r.find((o)=>o.sections.some((s)=>s.key===a))?.intro??""),moved:O.map((o)=>{let{title:s}=gh(o.workspace),p=o.place??s;return{linkLabel:`${o.what}: ${p}. Go to ${s}`,place:p,what:o.what,workspace:o.workspace}}),region:e.region}}function D(e,t){let a=!1,r=null,o=null,s=null,p="",S=0,i=W(e,P(t,p),{back:()=>{t.back()},openMoved:(l)=>{let c=Q(l);if(c!==null)t.openMoved(c.workspace,c.inspector,c.view,c.publishTab)},selectSection:(l)=>{L0(l)}});function d(l,c,u){if(a||u!==S)return;p=`Could not show ${w(l)?.label??l}: ${c}`,i.update(P(t,p))}function g(l){if(a)return;let c=M(),u=i.body();if(u!==r)r=u,s=null;if(!u||!l&&s===c){i.update(P(t,p));return}let j=s!==c;s=c,p="",i.update(P(t,p));let N=w(c);if(!N){o=null,u.replaceChildren();return}if(j||!o||o.parentElement!==u)o=document.createElement("div"),u.replaceChildren(o);S+=1;let L=S;try{let x=N.render(o);if(x instanceof Promise)x.catch((z)=>{d(c,X(z),L)})}catch(x){d(c,X(x),L)}}let y=$0(()=>{g(!0)}),F=i.ready.then(()=>{g(!0)});return{attached:()=>i.attached(),dispose(){if(a)return;a=!0,y(),i.dispose()},focusActive:()=>i.focusActive(),ready:F}}var Z="settings";function LT(e){return $n(e,Z)}var v=new Map,R=new Set;function _(){let e=LA();return e===null||e==="settings"?Up:e}async function ee(){await nt("view.setWorkspace",{workspace:_()},"Settings")}async function te(e,t,a,r){if(a!==void 0){await nt("styles.open",{view:a},"Settings");return}if(r!==void 0){await nt("publish.open",{tab:r},"Settings");return}if(await nt("view.setWorkspace",{workspace:e},"Settings"),t===void 0)return;if(await nt("view.setRightPanel",{open:!0},"Settings"),ae()?.isEnabled("view.setRightTab")===!0)await nt("view.setRightTab",{tab:t},"Settings")}function RT(e,t){let a=v.get(e);return a!==void 0&&a.tabId===t.id&&a.wrap.isConnected&&a.pane.attached()}function IT(e){let t=v.get(e);if(!t)return;v.delete(e),t.pane.dispose()}async function V(e,t){if(await t.pane.ready,v.get(e)===t)await t.pane.focusActive()}async function PD(e){let t=v.get(e);if(t?.wrap.isConnected===!0&&t.pane.attached()){await V(e,t);return}R.add(e)}var ne={back:()=>{ee()},backLabel:()=>`Back to ${gh(_()).title}`,openMoved:(e,t,a,r)=>{te(e,t,a,r)}};function MD(e,t){let{paneId:a,wrap:r}=e;if(RT(a,t))return;IT(a);let s={pane:D(r,{...ne,region:LT(a)}),tabId:t.id,wrap:r};if(v.set(a,s),R.delete(a))V(a,s)}
2
- export{DD,OD,Od,$0,Gl,AD,Ow,$T,L0,LT,RT,IT,PD,MD};
1
+ import{ae}from"./studio-dbex091t.js";import{Z}from"./studio-mkjrjpr2.js";import{Kp,vh}from"./studio-ybkd5w8k.js";import{VA}from"./studio-3kmqhwtt.js";import{it}from"./studio-yetr4gg1.js";import{$n,E,I}from"./studio-xxttcym1.js";import{b}from"./studio-y3tjh2xb.js";import{n}from"./studio-0z8kp4xk.js";var C=[{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"}],zD="integrations";function UD(e){return C.some((t)=>t.id===e)}var U="overview",m=new Map,T=new Set;function k(){for(let e of T)e()}function Pd(){k()}function PS(e){return T.add(e),()=>{T.delete(e)}}function Yl(e){m.set(e.key,e),k()}function qD(e){if(m.delete(e))k()}function q(){return[...m.values()].toSorted((e,t)=>e.order-t.order)}function jw(){let e=q();return C.flatMap((t)=>{let a=e.filter((r)=>(r.group??"integrations")===t.id);return a.length===0?[]:[{id:t.id,intro:t.intro,label:t.label,note:t.note,sections:a}]})}function PT(){return jw().flatMap((e)=>e.sections.map((t)=>t.key))}function w(e){return m.get(e)}var h=null,f=U;function M(){if(h!==null&&m.has(h))return f=h,h=null,f;if(m.has(f))return f;return PT()[0]??f}function MS(e){if(m.has(e))f=e,h=null;else h=e;k()}var A={$schema:"https://jxsuite.com/schema/v1",$id:"StudioSettingsPane",$description:"Project Settings' home (§17.1, §22.9): the Settings workspace's surface, filling a pane's stage. A head names the workspace and carries the Back control, which says where it goes; under it, the settings editor's two columns, the grouped section list and the section body. 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:"settings","data-jx-region":"${state.region}",role:"region","aria-labelledby":"settings-pane-heading"},style:{$description:"Fills the pane's stage by its own geometry, as the Publish and Media homes do: the stage is `position: relative`, so the home takes the whole of it, and each column scrolls itself. No part below is named `body`, `field`, `label`, `error`, `text` or `actions`: sections mount kit controls and documents of their own inside this one, the kit is light DOM, and a rule keyed on one of their part names here would reach into them.",position:"absolute",inset:"0",display:"flex",flexDirection:"column",boxSizing:"border-box",minHeight:"0",background:"var(--bg)",color:"var(--fg)",fontFamily:"var(--jx-font-sans)",textAlign:"initial",'& [part="head"]':{display:"flex",alignItems:"center",gap:"var(--jx-space-3)",padding:"var(--jx-space-3) var(--jx-space-5)",borderBottom:"1px solid var(--border)"},'& [part="heading"]':{flex:"1",margin:"0",fontSize:"var(--jx-text-lg)",fontWeight:"600"},'& [part="columns"]':{display:"flex",flex:"1",minHeight:"0"},'& [part="nav"]':{display:"flex",flexDirection:"column",gap:"var(--jx-space-4)",width:"220px",minWidth:"220px",flexShrink:"0",padding:"var(--jx-space-3) var(--jx-space-3) var(--jx-space-3) var(--jx-space-2)",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-4) var(--jx-space-5) var(--jx-space-6)"},'& [part="group-intro"]':{margin:"0 0 var(--jx-space-3)",color:"var(--fg-dim)",fontSize:"13px",maxWidth:"1200px"},'& [part="group-intro"]:empty':{display:"none"},'& [part="section-host"]':{$description:"Wide enough for a map-layout section's list and editor side by side, and no wider: on a large monitor a form stretched to the stage's full width is a line too long to read.",display:"block",minWidth:"0",maxWidth:"1200px"},'& [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 Settings is on screen. A blank column beside a list reads as a broken surface, 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:"head"},children:[{tagName:"jx-action-button",attributes:{part:"back"},$props:{size:"sm",quiet:!0,icon:"arrow-left"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/back"},value:[]}]},children:[{tagName:"span",textContent:"${state.backLabel}"}],$description:"Back to the workspace Settings was opened from, named, as the pane context bar's Back is in a workspace with no tab strip (§22.1): the top bar draws no tab for Settings, so nothing else on screen says where the author came from."},{tagName:"h2",attributes:{part:"heading",id:"settings-pane-heading"},textContent:"${state.heading}"}]},{tagName:"div",attributes:{part:"columns",role:"none"},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}"}}}]}]}]};E("settings-pane",A);function J(e){let t=n(e)?void 0:e.attributes?.part;return n(t)?t:""}function H(e){return e===""?"ok":"failed"}function W(e,t,a){let r=b({...t,...a,failureState:H(t.failure)});e.textContent="",delete e._$litPart$;let o=null,s=!1,p=null,S=I("settings-pane",r,e,{onNodeCreated:(i,d,g)=>{if(!s&&i instanceof HTMLElement&&J(g)==="section-host")p=i}}).then((i)=>{if(s){i.dispose();return}o=i});return{attached:()=>{if(s)return!1;let i=o?.root;return i===void 0?!0:i instanceof HTMLElement&&e.contains(i)},body:()=>p,dispose(){s=!0,o?.dispose(),o=null,p=null},async focusActive(){let i=o?.root,d=i instanceof HTMLElement?[...i.querySelectorAll('[part="nav-item"]')].find((y)=>y.dataset.section===r.active):void 0;if(!d)return;let g=d.closest("jx-tabs");if(g&&d.getAttribute("aria-selected")!=="true")await new Promise((y)=>{g.addEventListener("jx-ready",()=>{y()},{once:!0})});if(!s)d.focus()},ready:S,update(i){r.region=i.region,r.heading=i.heading,r.backLabel=i.backLabel,r.groups=i.groups,r.moved=i.moved,r.activeTabId=i.activeTabId,r.empty=i.empty,r.intro=i.intro,r.hasSection=i.hasSection,r.failure=i.failure,r.failureState=H(i.failure),r.active=i.active}}}var K=vh("settings").title,Y="No settings sections.",O=[{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 G(e){return`settings-nav-${e}`}function Q(e){return O.find((t)=>t.workspace===e)??null}function P(e,t){let a=M(),r=jw();return{active:a,backLabel:e.backLabel(),activeTabId:G(a),empty:Y,failure:t,groups:r.map((o)=>({id:o.id,label:o.label,note:o.note,sections:o.sections.map((s)=>({key:s.key,label:s.label,tabId:G(s.key)})),tabsLabel:o.note===""?o.label:`${o.label}, ${o.note.toLowerCase()}`,titleId:`settings-group-${o.id}`})),hasSection:w(a)!==void 0,heading:K,intro:w(a)?.intro||(r.find((o)=>o.sections.some((s)=>s.key===a))?.intro??""),moved:O.map((o)=>{let{title:s}=vh(o.workspace),p=o.place??s;return{linkLabel:`${o.what}: ${p}. Go to ${s}`,place:p,what:o.what,workspace:o.workspace}}),region:e.region}}function D(e,t){let a=!1,r=null,o=null,s=null,p="",S=0,i=W(e,P(t,p),{back:()=>{t.back()},openMoved:(l)=>{let c=Q(l);if(c!==null)t.openMoved(c.workspace,c.inspector,c.view,c.publishTab)},selectSection:(l)=>{MS(l)}});function d(l,c,u){if(a||u!==S)return;p=`Could not show ${w(l)?.label??l}: ${c}`,i.update(P(t,p))}function g(l){if(a)return;let c=M(),u=i.body();if(u!==r)r=u,s=null;if(!u||!l&&s===c){i.update(P(t,p));return}let j=s!==c;s=c,p="",i.update(P(t,p));let N=w(c);if(!N){o=null,u.replaceChildren();return}if(j||!o||o.parentElement!==u)o=document.createElement("div"),u.replaceChildren(o);S+=1;let L=S;try{let x=N.render(o);if(x instanceof Promise)x.catch((z)=>{d(c,Z(z),L)})}catch(x){d(c,Z(x),L)}}let y=PS(()=>{g(!0)}),F=i.ready.then(()=>{g(!0)});return{attached:()=>i.attached(),dispose(){if(a)return;a=!0,y(),i.dispose()},focusActive:()=>i.focusActive(),ready:F}}var X="settings";function MT(e){return $n(e,X)}var v=new Map,R=new Set;function _(){let e=VA();return e===null||e==="settings"?Kp:e}async function ee(){await it("view.setWorkspace",{workspace:_()},"Settings")}async function te(e,t,a,r){if(a!==void 0){await it("styles.open",{view:a},"Settings");return}if(r!==void 0){await it("publish.open",{tab:r},"Settings");return}if(await it("view.setWorkspace",{workspace:e},"Settings"),t===void 0)return;if(await it("view.setRightPanel",{open:!0},"Settings"),ae()?.isEnabled("view.setRightTab")===!0)await it("view.setRightTab",{tab:t},"Settings")}function FT(e,t){let a=v.get(e);return a!==void 0&&a.tabId===t.id&&a.wrap.isConnected&&a.pane.attached()}function jT(e){let t=v.get(e);if(!t)return;v.delete(e),t.pane.dispose()}async function V(e,t){if(await t.pane.ready,v.get(e)===t)await t.pane.focusActive()}async function JD(e){let t=v.get(e);if(t?.wrap.isConnected===!0&&t.pane.attached()){await V(e,t);return}R.add(e)}var ne={back:()=>{ee()},backLabel:()=>`Back to ${vh(_()).title}`,openMoved:(e,t,a,r)=>{te(e,t,a,r)}};function KD(e,t){let{paneId:a,wrap:r}=e;if(FT(a,t))return;jT(a);let s={pane:D(r,{...ne,region:MT(a)}),tabId:t.id,wrap:r};if(v.set(a,s),R.delete(a))V(a,s)}
2
+ export{zD,UD,Pd,PS,Yl,qD,jw,PT,MS,MT,FT,jT,JD,KD};
3
3
 
4
- //# debugId=A9BE80CDCF1124F664756E2164756E21
5
- //# sourceMappingURL=studio-dst8y8vh.js.map
4
+ //# debugId=B793D1137C81C1FB64756E2164756E21
5
+ //# sourceMappingURL=studio-2v6tc9jp.js.map
@@ -0,0 +1,5 @@
1
+ import{Z}from"./studio-mkjrjpr2.js";import{p}from"./studio-1b79rpcb.js";import{w}from"./studio-5k9mfafh.js";import{Qt}from"./studio-ybkd5w8k.js";import{Zl,$p}from"./studio-8vmad6x2.js";import{Yu}from"./studio-7hm04x5z.js";import{MT}from"./studio-2v6tc9jp.js";import{sc}from"./studio-3kmqhwtt.js";import{lO}from"./studio-93p5k4r4.js";import{x}from"./studio-anc8067x.js";import{ze,E,I}from"./studio-xxttcym1.js";import{b}from"./studio-y3tjh2xb.js";import{n,Q,S,f}from"./studio-0z8kp4xk.js";var H={$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 the page's own `--bg` with `--border` showing through the gap, so nothing draws a rule of its own. The panels are `--bg`, not `--bg-panel`, because the section is drawn on the Settings home, whose background is `--bg`: a second shade under one section of the form reads as a box nobody asked for.",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)",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)",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)",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"}}]}}}]}}}]};E("settings-contributed",H);function K(){return{actionsState:"none",editorRegion:"",editorState:"empty",entries:[],entryName:"",layout:"form",newName:"",newState:"closed",title:"",emptyText:"",newFieldLabel:"",newLabel:"",newPlaceholder:""}}function _(t){let r=n(t)?void 0:t.attributes?.part;return n(r)?r:""}function M(t,r,a){t.textContent="";let o=b({...K(),...r}),e=null,i=!1,c=I("settings-contributed",o,t,{onNodeCreated:(s,l,d)=>{if(!(s instanceof HTMLElement))return;let u=_(d);if(u==="form-host")a.formSlot(s);else if(u==="actions")a.actionsSlot(s)}}).then((s)=>{let l=s.root;if(i)return s.dispose(),l;return e=s,l});return{attached:()=>{if(i)return!1;let s=e?.root;return s===void 0?!0:s instanceof HTMLElement&&t.contains(s)},dispose(){i=!0,e?.dispose(),e=null},host:t,ready:c,update(s){o.actionsState=s.actionsState,o.editorRegion=s.editorRegion,o.editorState=s.editorState,o.entries=s.entries,o.entryName=s.entryName,o.layout=s.layout,o.newName=s.newName,o.newState=s.newState,o.title=s.title,o.emptyText=s.emptyText,o.newFieldLabel=s.newFieldLabel,o.newLabel=s.newLabel,o.newPlaceholder=s.newPlaceholder}}}var g=new Map,k=new Set,N=new Map;function WD(t,r){let a=x?.projectConfig?.[t],o=f(a)?a:{};if(!Object.hasOwn(o,r))return Object.keys(o);return g.set(t,r),null}var j=new Map;function q(t,r){let a={},o=[];for(let e of r){let i=e.indexOf(": "),c=i===-1?"":e.slice(0,i),s=i===-1?e:e.slice(i+2);if(c===t){o.push(s);continue}if(!c.startsWith(`${t}/`))continue;let[l]=c.slice(t.length+1).split("/");if(l&&a[l]===void 0)a[l]=s}return{fields:a,section:o}}async function O(t,r){let a=x?.projectConfig;if(!a)return;if(!(await sc()).ok)return;let e=[];try{e=await Yu(a)}catch(i){w.warn(`Could not validate project.json — ${Z(i)}`,{key:"settings:validator",path:Qt(),source:"Settings",tier:"problem"});return}j.set(t,q(t,e).fields),r()}function A(t,r){for(let[a,o]of Object.entries(r))if(o===void 0)delete t[a];else t[a]=o}function T(t){return t.toLowerCase().replaceAll(/\s+/g,"-").replaceAll(/[^a-z0-9-]/g,"")}function U(t,r){if(!t)return{};let a=(e)=>{let i={};for(let[c,s]of Object.entries(e))i[c]=o(s);return i},o=(e)=>{if(n(e))return e.replaceAll("${key}",r);if(Array.isArray(e))return e.map((i)=>o(i));if(f(e))return a(e);return e};return a(t)}function R(t,r,a=null){let o=p(),e={fieldKeyPrefix:`$settings.${t}`,resolvePointer:(i,c)=>{let s={projectConfig:x?.projectConfig??{}};if(f(c))s.scope=c;if(r.formats!==void 0)s.formats=r.formats;return $p(i,s)}};if(Q(o.setSecrets))e.commitSecret=async(i,c)=>{let s=lO(t,a,i);return await o.setSecrets({set:{[s]:c}}),s};return e}function v(t){let r=x?.projectConfig;if(!r)return null;let a=r[t];if(f(a))return a;let o={};return r[t]=o,o}function F(t,r){return`${t.closest(`[${ze}]`)?.getAttribute(ze)??MT("primary")}/${r}`}var J=new WeakMap;function m(t){AT(t.container,t.contribution,t.opts)}function P(t,r){t.echo=r,m(t)}var Y="entry";function B(t){let r=t?.trim().toLowerCase()||Y,a=`${r.charAt(0).toUpperCase()}${r.slice(1)}`;return{emptyText:`Select ${/^[aeiou]/u.test(r)?"an":"a"} ${r} or create one`,newFieldLabel:`${a} name`,newLabel:`New ${r}`,newPlaceholder:`${T(r)}-name`}}function G(t){let{contribution:r,opts:a}=t,o=r.key,e=r.title??o,i=a.actions?"slot":"none",c=F(t.container,"editor"),s=B(r.settings.entry?.noun);if((r.settings.layout??"form")!=="map")return{actionsState:i,editorRegion:c,editorState:"empty",entries:[],entryName:"",layout:"form",newName:"",newState:"closed",title:e,...s};let l=v(o)??{},d=g.get(o)??null,u=d===null?void 0:l[d],h=d!==null&&S(u);return{actionsState:i,editorRegion:c,editorState:h?"editing":"empty",entries:Object.keys(l).map((C)=>({key:C,region:F(t.container,`entry:${C}`),selected:C===d})),entryName:t.echo??(h?d:""),layout:"map",newName:N.get(o)??"",newState:k.has(o)?"open":"closed",title:e,...s}}function V(t){let r=t.formHost;if(!r)return;let{contribution:a,opts:o}=t,e=a.key,i=a.settings.entry?.ui,c=()=>m(t),s=(y)=>{if(y.parentNode!==r)r.replaceChildren(y)};if((a.settings.layout??"form")!=="map"){let y=`/${e}`;s(Zl(`section:${e}`,a.entrySchema,v(e)??{},{context:R(e,o,null),errors:j.get(y)??{},onChange:(W)=>{let L=v(e);if(!L)return;A(L,W),c(),O(y,c)},rerender:c,...i!==void 0&&{ui:i}}));return}let l=v(e)??{},d=g.get(e)??null,u=d===null?void 0:l[d];if(d===null||!S(u)){r.replaceChildren();return}let h=u,C=`/${e}/${d}`;s(Zl(`section:${e}:${d}`,a.entrySchema,h,{context:R(e,o,d),errors:j.get(C)??{},onChange:(y)=>{A(h,y),c(),O(C,c)},rerender:c,...i!==void 0&&{ui:i}}))}function D(t){let r=t.actionsHost,{actions:a}=t.opts;if(!r)return;if(!a){r.replaceChildren();return}let o=t.contribution.key,e=(t.contribution.settings.layout??"form")==="map"?g.get(o)??null:null;a(r,{rerender:()=>m(t),sectionKey:o,selected:e})}function X(t){let r=(e)=>{t.echo=null,m(t),O(e,()=>m(t))},a=()=>{t.echo=null,m(t)},o=()=>t.contribution.key;return{cancelNew(){k.delete(o()),N.delete(o()),m(t)},cancelRename(e){P(t,e),a()},createNew(){let e=o(),i=T(N.get(e)??""),c=v(e);if(!i||!c||c[i])return;c[i]=U(t.contribution.settings.entry?.newEntry,i),g.set(e,i),k.delete(e),N.delete(e),r(`/${e}`)},editNew(e){N.set(o(),e),m(t)},openNew(){k.add(o()),m(t)},removeEntry(){let e=o(),i=g.get(e)??null,c=v(e);if(!i||!c?.[i])return;delete c[i],g.set(e,null),r(`/${e}`)},renameEntry(e){P(t,e);let i=o(),c=g.get(i)??null,s=v(i),l=T(e.trim());if(!c||!s||!l||l===c||s[l]){a();return}let d={};for(let[u,h]of Object.entries(s))d[u===c?l:u]=h,delete s[u];Object.assign(s,d),g.set(i,l),r(`/${i}`)},select(e){g.set(o(),e),t.echo=null,m(t)}}}function AT(t,r,a={}){let o=J.get(t);if(o)o.contribution=r,o.opts=a;let e=o?.handle??null;if(!o||!e?.attached()){e?.dispose();let i={actionsHost:null,container:t,contribution:r,echo:null,formHost:null,handle:null,opts:a};J.set(t,i),e=M(t,X(i),{actionsSlot:(c)=>{i.actionsHost=c,D(i)},formSlot:(c)=>{i.formHost=c,V(i)}}),i.handle=e,o=i}e.update(G(o)),D(o),V(o)}
2
+ export{WD,AT};
3
+
4
+ //# debugId=D64C195C69DAE16664756E2164756E21
5
+ //# sourceMappingURL=studio-30j0wz99.js.map
@@ -0,0 +1,5 @@
1
+ import{st,Tr,So}from"./studio-kp4vzrct.js";import{p}from"./studio-1b79rpcb.js";import{uM,w}from"./studio-5k9mfafh.js";import{jn,Yx,ln,br,f1,Kp,Xx,ER,Qt,$y,tg,Bi,qn,Se,fi,$r,X,mi,og,g,ko,cc,Ft}from"./studio-ybkd5w8k.js";import{Z}from"./studio-mkjrjpr2.js";import{df}from"./studio-hf259xzd.js";import{x,od,_n}from"./studio-anc8067x.js";import{me,te,Lo,Ro,b,le}from"./studio-y3tjh2xb.js";import{CI,fs,vr}from"./studio-213pyfxh.js";import{n,J,qe,S,f}from"./studio-0z8kp4xk.js";import{ce}from"./studio-nhpg405j.js";var Te={default:{description:"Resume whatever was persisted — layout, recents, settings, chat history.",id:"default",reset:"none"},fresh:{description:"A first-run app: no layout, no recents, no settings, no history.",id:"fresh",reset:"app-state"}},H=new Map(Object.entries(Te)),ke="default",xe=/^jx[-._:]/;function Ie(e){return xe.test(e)}function Ee(){let e=typeof localStorage>"u"?void 0:localStorage;if(!e)return[];let t=[];try{for(let o=0;o<e.length;o++){let r=e.key(o);if(r&&Ie(r))t.push(r)}for(let o of t)e.removeItem(o)}catch{}return t}function Ce(e){let t=H.get(e);if(!t)throw RangeError(`unknown startup profile "${e}"; declared: ${[...H.keys()].join(", ")}`);if(t.reset==="app-state")Ee();return t}var T=null;function V(e){if(T)return T;let t=new URLSearchParams(e??(typeof location>"u"?"":location.search)),o=Ce(t.get("profile")??ke),r=t.get("clock");return T={clock:r===null?null:uM(r),profile:o},T}var G=new Set([mi,og]),_e=new Set(["auto","light","dark"]);function Ae(e){return n(e)&&_e.has(e)}function je(e){let{ui:t}=e.session;return{activeMedia:t.activeMedia,canvasMode:t.canvasMode,editZoom:t.editZoom,preview:t.preview,previewColorScheme:t.previewColorScheme,previewLocale:t.previewLocale,showLayout:t.showLayout,zoom:t.zoom}}function K(){let e={},t=[];for(let o of g.panes){if(o.derived)continue;let r=[];for(let i of o.tabOrder){let a=g.tabs.get(i);if(!a?.documentPath)continue;r.push(a.documentPath),e[a.documentPath]=je(a)}if(r.length===0)continue;let s=o.activeTabId?g.tabs.get(o.activeTabId):null;t.push({activeFile:s?.documentPath??null,files:r,id:o.id})}return{focusedPane:g.activePaneId,panes:t,ui:e}}function Re(e){if(!f(e))return{};let t={};if(n(e.canvasMode))t.canvasMode=e.canvasMode;if(qe(e.preview))t.preview=e.preview;if(J(e.zoom)&&Number.isFinite(e.zoom))t.zoom=e.zoom;if(J(e.editZoom)&&Number.isFinite(e.editZoom))t.editZoom=e.editZoom;if(e.activeMedia===null||n(e.activeMedia))t.activeMedia=e.activeMedia;if(Ae(e.previewColorScheme))t.previewColorScheme=e.previewColorScheme;if(e.previewLocale===null||n(e.previewLocale)&&Yx(e.previewLocale))t.previewLocale=e.previewLocale;if(qe(e.showLayout))t.showLayout=e.showLayout;return t}function q(e){if(!f(e)||!Array.isArray(e.panes))return null;let t=[];for(let r of e.panes){if(!f(r)||!n(r.id)||!G.has(r.id))continue;let s=Array.isArray(r.files)?r.files.filter((i)=>n(i)&&i!==""):[];if(s.length===0)continue;t.push({activeFile:n(r.activeFile)&&s.includes(r.activeFile)?r.activeFile:null,files:s,id:r.id})}if(t.length===0)return null;let o={};if(S(e.ui))for(let[r,s]of Object.entries(e.ui))o[r]=Re(s);return{focusedPane:n(e.focusedPane)&&G.has(e.focusedPane)?e.focusedPane:mi,panes:t,ui:o}}async function FA(e,t){let o=0;if(e.panes.some((i)=>i.id===og))t.ensureSecondPane();for(let i of e.panes)for(let a of i.files){try{await t.openFile(a,i.id)}catch{}if([...g.tabs.values()].some((c)=>c.documentPath===a))o+=1}if(o===0)return 0;for(let i of g.tabs.values()){let a=i.documentPath?e.ui[i.documentPath]:void 0;if(!a)continue;let{ui:c}=i.session;if(a.canvasMode&&i.capabilities.modes.includes(a.canvasMode))c.canvasMode=a.canvasMode;if(a.preview!==void 0)c.preview=a.preview;if(a.zoom!==void 0)c.zoom=a.zoom;if(a.editZoom!==void 0)c.editZoom=a.editZoom;if(a.activeMedia!==void 0)c.activeMedia=a.activeMedia;if(a.previewColorScheme!==void 0)c.previewColorScheme=a.previewColorScheme;if(a.previewLocale!==void 0)c.previewLocale=a.previewLocale;if(a.showLayout!==void 0)c.showLayout=a.showLayout}let r=g.panes.some((i)=>i.id===e.focusedPane)?e.focusedPane:null,s=null;for(let i of e.panes){let a=g.panes.find((v)=>v.id===i.id);if(!a||!i.activeFile)continue;let c=a.tabOrder.find((v)=>g.tabs.get(v)?.documentPath===i.activeFile);if(!c)continue;if(a.id===r)s=c;else Ft(c,{focus:!1})}if(s)Ft(s);else if(r)ko(r);return o}var Km=["review","deploys","branches","hosting"],r1={branches:"Branches",deploys:"Deploys",hosting:"Hosting",review:"Review changes"},De=["live","review"],Y="review",Q="live",Le=new Set(Km),Ne=new Set(De);function jA(e){return typeof e==="string"&&Le.has(e)}function Px(e){return typeof e==="string"&&Ne.has(e)}var k=["site","collections","styles","files","search","i18n","insert","layers","data","packages"],Oe=new Set(["collections","styles"]);function oe(e){return e&&!Oe.has(e)?e:We}var Me=new Map([["blocks","insert"],["head","site"],["page","site"],["imports","packages"],["git","site"],["state","data"]]),We="site";function o1(e,t){let o=k.find((r)=>r===e);if(o===void 0)throw Error(`${t}: "${e}" is not a declared Navigator panel id.`);return o}function j(e){if(!n(e))return null;let t=Me.get(e);if(t)return t;return k.find((o)=>o===e)??null}var C=["page","properties","style","events","assistant"],Mx="page",Be=["properties","style","events"],s1="properties";function Fx(e){return typeof e==="string"&&Be.some((t)=>t===e)}function nR(e){return typeof e==="string"&&C.some((t)=>t===e)}var jx=["problems","logic","activity"],iR="problems";function rR(e){return typeof e==="string"&&jx.some((t)=>t===e)}var Hx=["light","dark"],Gc={content:{id:"content",inspector:{open:!1,whileWriting:!0},navigator:{open:!0,panel:"collections"},rail:!1,tabStrip:!0},design:{id:"design",inspector:{open:!0},navigator:{initial:"site",open:!0},rail:!0,tabStrip:!0},media:{id:"media",inspector:{open:!1},navigator:{open:!1},rail:!1,tabStrip:!1},publish:{id:"publish",inspector:{open:!1},navigator:{open:!1},rail:!1,tabStrip:!1},settings:{id:"settings",inspector:{open:!1},navigator:{open:!1},rail:!1,tabStrip:!1},styles:{id:"styles",inspector:{open:!1,tab:"style",whileWriting:!0},navigator:{open:!0,panel:"styles"},rail:!1,tabStrip:!1}},ne="jx-studio-panel-widths",re="jx-studio-project::",Je="dark";function oR(e){return typeof e==="string"&&Hx.some((t)=>t===e)}function Fe(){let e=Tr(st.theme);return oR(e)?e:Je}var Bx=["left","right","bottom"],P={bottom:{collapsed:!0,size:220},left:{collapsed:!1,size:240},right:{collapsed:!1,size:280}},HA={bottom:P.bottom.size,left:P.left.size,right:P.right.size},Ue={bottom:"--dock-h-bottom",left:"--panel-w-left",right:"--panel-w-right"},ze={bottom:"bottom-collapsed",left:"left-collapsed",right:"right-collapsed"},sR=0.5,a1=0.2,l1=0.8;function $e(e){return J(e)&&e>=a1&&e<=l1?e:sR}function BA(e){u.paneSplit=Math.min(l1,Math.max(a1,e))}function He(){try{let e=JSON.parse(localStorage.getItem(ne)||"{}");return f(e)?e:{}}catch{return{}}}function Ve(e){return{left:e("left"),right:e("right"),bottom:e("bottom")}}function ie(){return{branches:null,commitMessage:"",diffState:null,error:null,lastUpdated:null,loading:!1,logEntries:null,rev:0,status:null}}function se(){return{build:{for:"",state:"idle",text:""},deploys:{error:"",project:"",rows:[],state:"idle"},destination:Q,review:{number:0,url:""},tab:Y}}var Ge="tokens";function ae(){return{customizedOnly:!1,filter:"",selection:null,variable:null,view:Ge}}function Ke(){let e=He(),t=Ve((o)=>{let r=e[o],s=e[`${o}Collapsed`];return{collapsed:qe(s)?s:P[o].collapsed,size:J(r)&&r>0?r:P[o].size}});return{bottomTab:rR(e.bottomTab)?e.bottomTab:iR,docks:t,focusRegion:"pane",paneSplit:$e(e.paneSplit),git:ie(),publish:se(),layoutSelection:null,leftTab:oe(j(e.leftTab)),stylebook:ae(),theme:Fe(),workspace:Kp}}V();var Ze=["jx-studio-doc-header-expanded"];function Ye(){try{for(let e of Ze)localStorage.removeItem(e)}catch{}}Ye();var u=b(Ke());function Wd(){try{localStorage.setItem(ne,JSON.stringify({bottom:u.docks.bottom.size,bottomCollapsed:u.docks.bottom.collapsed,bottomTab:u.bottomTab,left:u.docks.left.size,leftCollapsed:u.docks.left.collapsed,leftTab:u.leftTab,paneSplit:u.paneSplit,right:u.docks.right.size,rightCollapsed:u.docks.right.collapsed}))}catch{}}var _,R={},D=null;function VA(){return D}function L(e){if(!e)return{};try{let t=JSON.parse(localStorage.getItem(`${re}${e}`)||"{}");return f(t)?t:{}}catch{return{}}}function aR(e){let t=L(e).workspace;return ER(t)?t:Kp}function WA(e){return q(L(e).session)}var N=null;function Vx(e){N=e}function zA(){O()}function O(){let e=g.projectRoot;if(!e)return;try{localStorage.setItem(`${re}${e}`,JSON.stringify({session:e===N?K():L(e).session,workspace:u.workspace}))}catch{}}function Xe(e){if(e===_)return;if(_=e,R={},D=null,u.workspace=aR(e),e===null){u.leftTab=oe(j(u.leftTab));return}Lo();try{pe(u.workspace),Wd()}finally{Ro()}}function lR(e,t){let{inspector:o}=Gc[e];return o.open||o.whileWriting===!0&&t}function pe(e,t){let o=Gc[e],r=j(o.navigator.panel??R[e]??o.navigator.initial??u.leftTab);if(r)u.leftTab=r;if(u.docks.left.collapsed=!o.navigator.open,u.docks.right.collapsed=!lR(e,t?.writingOnCanvas?.()===!0),o.inspector.tab&&t)t.setInspectorTab(o.inspector.tab)}function c1(e,t){if(u.workspace===e)return!1;if(!Gc[u.workspace].navigator.panel)R[u.workspace]=u.leftTab;return D=u.workspace,u.workspace=e,pe(e,t),Wd(),O(),!0}function Gm(e=u.theme){return e==="light"?"vs":"vs-dark"}function Qe(){document.documentElement.dataset.theme=u.theme,df()?.editor.setTheme(Gm())}var et="rail-hidden",tt="tabs-hidden";function dy(e=u.workspace){return Gc[e].tabStrip}function ot(){let e=document.documentElement;for(let o of Bx)e.style.setProperty(Ue[o],`${u.docks[o].size}px`);let t=document.querySelector("#app");if(!t)return;for(let o of Bx)t.classList.toggle(ze[o],u.docks[o].collapsed);t.classList.toggle(et,!Gc[u.workspace].rail),t.classList.toggle(tt,!Gc[u.workspace].tabStrip)}var I=null,A=[];function uy(e){if(!A.includes(e))A.push(e)}function UA(){if(I)return;for(let e of A)e.mount();I=me(),I.run(()=>{te(()=>{ot()}),te(()=>{Qe()}),te(()=>{Xe(g.projectRoot)}),te(()=>{let e=g.projectRoot;g.activePaneId;for(let t of g.panes)t.id,t.activeTabId,t.tabOrder.join("\x00");if(e)O()})})}function Er(e,t){if(u.docks[e].collapsed===t){Wd();return}u.docks[e].collapsed=t,Wd()}function nt(e){Er(e,!u.docks[e].collapsed)}function qA(e,t){u.docks[e].size=t}function Yc(e){u.leftTab=e,Er("left",!1),Wd()}function ph(e){u.bottomTab=e,Er("bottom",!1),Wd()}function cR(e){if(u.theme===e)return;u.theme=e,So(st.theme,e)}function JA(e){if(e===u.leftTab&&!u.docks.left.collapsed){Er("left",!0);return}Yc(e)}function dR(e){u.layoutSelection=e}function Wx(){Object.assign(u.git,ie()),Object.assign(u.publish,se()),Object.assign(u.stylebook,ae()),u.layoutSelection=null,N=null,_=void 0}function ee(e,t){if(t.showWorkspace){t.showWorkspace(e);return}c1(e,t)}var E=(e)=>e.project.open;function rt(e){return[{args:Se({tab:fi(k,"Which Navigator panel to show.")}),category:"View",id:"view.setActivity",level:"application",menus:["commandbar/overflow","palette"],group:"4_docks",requires:"an open project",when:E,run:(t,o)=>{let r=qn("view.setActivity",o,"tab",k);if(e.panelAvailable&&!e.panelAvailable(r))throw RangeError(`command "view.setActivity" argument "tab": "${r}" names a panel that is registered but not available right now, so showing it would persist a Navigator tab nothing can draw`);Yc(r)},title:"Show Navigator Panel"},{args:Se({tab:fi(C,"Which Inspector tab to show.")}),category:"View",id:"view.setRightTab",level:"document",menus:["palette"],group:"4_docks",requires:"an open document",when:(t)=>t.document.open,run:(t,o)=>{e.setInspectorTab(qn("view.setRightTab",o,"tab",C))},title:"Show Inspector Tab"},{args:Se({open:$r("True to show the Navigator dock, false to collapse it.")}),category:"View",id:"view.setNavigator",level:"application",menus:["palette"],group:"4_docks",run:(t,o)=>{Er("left",!Bi("view.setNavigator",o,"open"))},title:"Show Navigator Dock"},{args:Se({open:$r("True to show the Inspector dock, false to collapse it.")}),category:"View",id:"view.setRightPanel",level:"application",menus:["palette"],group:"4_docks",run:(t,o)=>{Er("right",!Bi("view.setRightPanel",o,"open"))},title:"Show Inspector Dock"},{args:Se({open:$r("True to show the Bottom dock, false to collapse it.")}),category:"View",id:"view.setBottomDock",level:"application",menus:["palette"],group:"4_docks",run:(t,o)=>{Er("bottom",!Bi("view.setBottomDock",o,"open"))},title:"Show Bottom Dock"},{category:"View",id:"view.toggleBottomDock",keybinding:"mod+j",level:"application",menus:["commandbar/overflow","palette"],group:"4_docks",run:()=>{nt("bottom")},title:"Toggle Bottom Dock"},{args:Se({tab:fi(jx,"Which Bottom dock tab to show.")}),category:"View",id:"view.setBottomTab",level:"application",menus:["palette"],group:"4_docks",run:(t,o)=>{let r=qn("view.setBottomTab",o,"tab",jx);if(e.panelAvailable&&!e.panelAvailable(r))throw RangeError(`command "view.setBottomTab" argument "tab": "${r}" names a panel that is registered but not available right now, so showing it would persist a Bottom dock tab nothing can draw`);ph(r)},title:"Show Bottom Dock Tab"},{args:Se({open:$r("True to show the Assistant tab, false to step off it.")}),category:"View",id:"view.setAssistant",level:"application",menus:["never"],group:"4_docks",run:(t,o)=>{if(Bi("view.setAssistant",o,"open")){Er("right",!1),e.setInspectorTab("assistant");return}if(e.inspectorTab()==="assistant")e.setInspectorTab(e.restingInspectorTab?.()??Mx)},title:"Show Assistant"},{args:Se({workspace:fi(f1,"Which workspace to show.")}),category:"View",id:"view.setWorkspace",level:"application",menus:["never"],group:"4_workspaces",requires:"an open project",when:E,run:(t,o)=>{ee(qn("view.setWorkspace",o,"workspace",f1),e)},title:"Switch Workspace"},...Xx.map((t,o)=>({category:"View",id:`workspace.focus.${t.id}`,keybinding:`mod+${o+1}`,level:"application",menus:["palette"],group:"4_workspaces",requires:"an open project",when:E,run:()=>{ee(t.id,e)},title:`Go to ${t.title}`})),{args:Se({color:fi(Hx,"The Studio chrome's theme.")}),category:"View",id:"view.setTheme",level:"application",menus:["palette"],group:"6_appearance",run:(t,o)=>{cR(qn("view.setTheme",o,"color",Hx))},title:"Set Theme"}]}function KA(e,t){e.registerAll(rt(t))}function Jm(e){return vr(e,de())}var l=null,h=null,y=null,d=null;function de(){return ge()?.doc.layout??d}var M=null;function ge(){let e=g.tabs.get(Qt());return e?le(e):null}function it(){if(h)tg(h),h=null;l=null,y=null,d=null,M=null}function be(){return M??=(async()=>{try{let e=await p().readFile(Qt()),{document:t,layout:o}=fs(e);d=o,y=vr(t,de())}catch{y=null}})(),M}async function QL(e){if(await be(),e.doc.layout===null&&d!==null)e.doc.layout=d}function at(e){let t=_n();if(t.projectConfig===e)return;od({...t,projectConfig:e}),cc(g.projectRoot,e)}function ct(){let e=x?.projectConfig;return e?le(e):null}function W(e){return le(e)}function he(e,t){for(let o of Object.keys(e))delete e[o];Object.assign(e,t)}function ue(e){return l=e,e.scope.run(()=>{te(()=>{let t=e.doc.document;if(l!==e||!x)return;at(W(t))})}),e}function i1(){let e=_n(),t=ge();if(l&&(l!==(t??h)||le(l.doc.document)!==e.projectConfig))it();if(l)return l;if(t)return ue(t);return h=$y({document:e.projectConfig??{},documentPath:Qt(),id:Qt()}),ue(h)}function fe(e){return JSON.stringify(e.extensions??null)}async function lt(){let{loadFormats:e,refreshExtensionUi:t,refreshFormats:o}=await (ce("fd3m2y2a"),import("./format-host-fd3m2y2a.js"));o(),e(),t(p())}async function sc(e){let t=ct(),o=i1();await QL(o);let r=W(o.doc.document),s=Jm(r),i=t&&t!==r&&Jm(t)!==s?t:null;if(i&&o.doc.dirty){let m=Error(`${Qt()} has unsaved changes in its editor tab`);return w.error(`Could not save ${Qt()} — the file is open with unsaved changes. Save or `+"revert that tab, then make the settings change again.",{key:`save:${Qt()}`,path:Qt(),source:"Settings"}),{error:m,ok:!1}}let a=i??r,c=e?{...a,...e}:a,v=Jm(c);if(!i&&!o.doc.dirty&&v===y)return{ok:!0};let ve=fe(r);X(o,(m)=>{let z=m.doc.document;if(i)he(z,i);for(let[we,Pe]of Object.entries(e??{}))z[we]=Pe});let F=W(o.doc.document),U=Jm(F);try{await p().writeFile(Qt(),U)}catch(m){return w.error(`Could not save ${Qt()} — ${Z(m)}`,{key:`save:${Qt()}`,path:Qt(),source:"Settings"}),{error:m,ok:!1}}if(y=U,o.doc.dirty=!1,fe(F)!==ve)await lt();return{ok:!0}}async function AA(e,t){if(!x){cc(g.projectRoot,e);return}let o=i1();X(o,(r)=>he(r.doc.document,e),{skipHistory:!0}),o.doc.dirty=!1,await be(),d=CI(t),o.doc.layout=d,y=Jm(e)}function nr(e){let t=x?.projectConfig?.$media;if(!t)return e||{};if(!e)return{...t};return{...t,...e}}function _o(e){let t=x?.projectConfig?.style;if(!t)return e||{};if(!e)return{...t};let o={...t};for(let[r,s]of Object.entries(e)){let i=o[r];o[r]=S(s)&&S(i)?{...i,...s}:s}return o}function PA(e,t=[]){return{...eR(t),...x?.projectConfig?.imports,...e}}function eR(e){let t=e.flatMap((o)=>(o.classes??[]).filter((r)=>r.path.endsWith(".class.json")).map((r)=>[r.name,r.path]));return Object.fromEntries(t.toReversed())}function Dx(e){let t=x?.projectConfig?.$elements;if(!t?.length)return e||[];if(!e?.length)return[...t];let o=new Set,r=[];for(let s of[...t,...e]){let i=n(s)?s:S(s)?s.$ref:void 0;if(i&&!o.has(i))o.add(i),r.push(s)}return r}function Ox(e){let t=x?.projectConfig?.$head;if(!t?.length)return e||[];if(!e?.length)return[...t];let o=new Set,r=[];for(let s of[...t,...e]){let i=S(s)?s.attributes:void 0,a=String(i?.href||i?.src||"")||JSON.stringify(s);if(!o.has(a))o.add(a),r.push(s)}return r}function Ls(){let e=x?.projectConfig;return e?ln(e).i18n:null}function Wp(e,t){let o=Ls();if(o===null)return null;let r=jn(e);if(r!==null&&o.locales.includes(r))return r;return br(t??"",o)??o.defaultLocale}var B=new Map;function MA(){B.clear()}function gl(e){if(e===!1)return null;let t=x?.projectConfig?.defaults?.layout;return e||t||null}async function Ax(e){let t=e.replace(/^\.\//,""),o=B.get(t);if(o!==void 0)return structuredClone(o);try{let s=await p().readFile(t),i=JSON.parse(s);return B.set(t,i),structuredClone(i)}catch{return null}}function tR(e,t){let o=t.children??[],r=Array.isArray(o)?o:[],s=new Map,i=[];for(let a of r){let c=n(a)?void 0:a.attributes?.slot;if(!n(a)&&n(c)&&c){if(!s.has(c))s.set(c,[]);s.get(c).push(a)}else i.push(a)}if(ye(e,s,i),t.state)e.state={...e.state,...t.state};if(t.$media)e.$media={...e.$media,...t.$media};if(t.style)e.style={...e.style,...t.style};if(t.attributes)e.attributes={...e.attributes,...t.attributes};return e}function ye(e,t,o){if(!Array.isArray(e.children))return;let r=[];for(let s of e.children)if(S(s)&&s.tagName==="slot"){let i=s.attributes?.name;if(n(i)&&i&&t.has(i))r.push(...t.get(i)),t.delete(i);else if(!i&&o.length>0)r.push(...o);else if(Array.isArray(s.children))r.push(...s.children)}else{if(S(s))ye(s,t,o);r.push(s)}e.children=r}async function ir(e){let t=await sc(e);if(!t.ok)throw t.error}
2
+ export{Jm,QL,i1,sc,AA,nr,_o,PA,eR,Dx,Ox,Ls,Wp,MA,gl,Ax,tR,ir,FA,Km,r1,jA,Px,o1,Mx,s1,Fx,nR,jx,iR,rR,Hx,Gc,oR,Bx,HA,sR,a1,l1,BA,u,Wd,VA,aR,WA,Vx,zA,lR,c1,Gm,dy,uy,UA,Er,qA,Yc,ph,cR,JA,dR,Wx,KA};
3
+
4
+ //# debugId=2EFAE73EEF92D81064756E2164756E21
5
+ //# sourceMappingURL=studio-3kmqhwtt.js.map
@@ -0,0 +1,5 @@
1
+ import{gi}from"./studio-52mzbxqm.js";import{Va}from"./studio-y3tjh2xb.js";import{n}from"./studio-0z8kp4xk.js";var w=new Set([".apng",".avif",".bmp",".gif",".ico",".jpeg",".jpg",".png",".svg",".webp",".eot",".otf",".ttf",".woff",".woff2",".m4v",".mov",".mp4",".ogv",".webm",".aac",".flac",".m4a",".mp3",".oga",".ogg",".opus",".wav"]);function d(e){let o=e.lastIndexOf("/"),t=e.lastIndexOf(".");return t>o+1&&w.has(e.slice(t).toLowerCase())}var c=new Map,u=0,R=0,m=new Map,h=new Map,s=new Map,v=0,b=Date.now().toString(36),l=null,g=null,y=Object.freeze({}),_y=Va(0);function p(){g=null,_y.value+=1}function x(e){if(!s.has(e))return!1;return v+=1,s.set(e,`${b}.${v.toString(36)}`),l=null,d(e)}function S(e){if(s.delete(e))l=null}function O(){return u}function E(e,o){let t=m.get(e);if(t!==void 0&&t>o)return!0;for(let[i,r]of h)if(r>o&&e.startsWith(i))return!0;return!1}function P(e,o){if(o<R)return;let t=!1;for(let i of e){if(i.type!=="file")continue;let r=gi(i.path);if(r===""||E(r,o))continue;let a=n(i.version)&&i.version!==""?i.version:null,f=c.get(r);if(a===null){if(f===void 0)continue;c.delete(r)}else if(f===a)continue;else c.set(r,a),S(r);if(d(r))t=!0}if(t)p()}async function Is(e){let o=O(),t=await e();return P(t,o),t}function Gd(e,o=[]){u+=1;let t=!1;for(let i of e){let r=gi(i);if(r==="")continue;if(m.set(r,u),c.delete(r)&&d(r))t=!0;if(x(r))t=!0}for(let i of o){let r=gi(i);if(r==="")continue;let a=`${r}/`;h.set(a,u);for(let f of s.keys())if(f.startsWith(a)&&x(f))t=!0;for(let f of c.keys())if(f.startsWith(a)){if(c.delete(f),d(f))t=!0}}if(t)p()}function dP(e){return c.get(gi(e))}function yh(){if(g)return g;let e={},o=!1;for(let[t,i]of c)if(d(t))e[t]=i,o=!0;return g=o?Object.freeze(e):y,g}function kR(){let e=yh()!==y;if(c.clear(),m.clear(),h.clear(),u+=1,R=u,e)p()}function uP(e){let o=gi(e);if(o==="")return;v+=1;let t=`${b}.${v.toString(36)}`;if(s.set(o,t),l=null,d(o))p();return t}function hP(e){return s.get(gi(e))}function pP(){return s.size>0}function Jp(){if(l)return l;return l=s.size===0?y:Object.freeze(Object.fromEntries(s)),l}function Xm(){if(kR(),s.size>0)s.clear(),l=null,p()}
2
+ export{_y,Is,Gd,dP,yh,kR,uP,hP,pP,Jp,Xm};
3
+
4
+ //# debugId=91BC8CFB068B02FE64756E2164756E21
5
+ //# sourceMappingURL=studio-44drsmhw.js.map