@jxsuite/studio 10.0.0 → 10.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (244) hide show
  1. package/dist/chunks/{2020-j56903f1.js → 2020-bx702wqa.js} +3 -3
  2. package/dist/chunks/adapter-pp011m5x.js +4 -0
  3. package/dist/chunks/add-new-flow-ecqmzz76.js +4 -0
  4. package/dist/chunks/cf-account-picker-c07znkqt.js +4 -0
  5. package/dist/chunks/cf-settings-0v2bmqy0.js +4 -0
  6. package/dist/chunks/components-yn0dn2pq.js +4 -0
  7. package/dist/chunks/content-source-g0j41yy6.js +4 -0
  8. package/dist/chunks/{convert-to-repeater-fhdwyg14.js → convert-to-repeater-sbjk7tgn.js} +3 -3
  9. package/dist/chunks/editor-xz02jeh1.js +4 -0
  10. package/dist/chunks/entry-commands-kmt02crp.js +4 -0
  11. package/dist/chunks/extension-sections-0rprf12d.js +4 -0
  12. package/dist/chunks/file-ops-mexj5qed.js +4 -0
  13. package/dist/chunks/files-b2tcppdd.js +4 -0
  14. package/dist/chunks/format-host-btsevv0c.js +4 -0
  15. package/dist/chunks/fs-events-r0apejva.js +4 -0
  16. package/dist/chunks/grid-open-n2a8xkht.js +4 -0
  17. package/dist/chunks/{grid-view-ka55z38f.js → grid-view-tghcwrrt.js} +12 -12
  18. package/dist/chunks/iframe-host-gx0ypyh3.js +4 -0
  19. package/dist/chunks/index-bs4k9tr6.js +4 -0
  20. package/dist/chunks/{index-qb98xhse.js → index-vr006kbt.js} +3 -3
  21. package/dist/chunks/{javascript-ces13wny.js → javascript-z1g3s9fd.js} +2 -2
  22. package/dist/chunks/{jsonMode-6md16d4v.js → jsonMode-7szwg8c4.js} +5 -5
  23. package/dist/chunks/jx-validate-ymf10teh.js +4 -0
  24. package/dist/chunks/layers-p9nfya38.js +4 -0
  25. package/dist/chunks/layers-panel-tt1hzhhf.js +4 -0
  26. package/dist/chunks/lit-html-x18n2sfz.js +4 -0
  27. package/dist/chunks/media-library-0n45gv8r.js +4 -0
  28. package/dist/chunks/media-picker-s09at95z.js +4 -0
  29. package/dist/chunks/{monaco-binding-p8j80s4w.js → monaco-binding-v42w9c1v.js} +3 -3
  30. package/dist/chunks/monaco-buffer-een2ea0v.js +4 -0
  31. package/dist/chunks/{monaco-setup-wasktzfg.js → monaco-setup-7bffxd6v.js} +3 -3
  32. package/dist/chunks/notify-qwb8radt.js +4 -0
  33. package/dist/chunks/parse-v77xtwv7.js +4 -0
  34. package/dist/chunks/platform-8jnez0wr.js +4 -0
  35. package/dist/chunks/publish-panel-aysnj611.js +4 -0
  36. package/dist/chunks/{publish-quick-vr695j26.js → publish-quick-kpbqs9mz.js} +3 -3
  37. package/dist/chunks/publish-workspace-nd0a8q99.js +4 -0
  38. package/dist/chunks/quick-search-vg0jkhk2.js +4 -0
  39. package/dist/chunks/references-a7v6a0e2.js +4 -0
  40. package/dist/chunks/right-panel-cvk1vxx5.js +4 -0
  41. package/dist/chunks/source-control-fsqzc6he.js +4 -0
  42. package/dist/chunks/studio-05jfwbmf.js +5 -0
  43. package/dist/chunks/{studio-hy4ye0dx.js → studio-0q5jwddh.js} +7 -7
  44. package/dist/chunks/{studio-jttyqrmh.js → studio-0w2dr0q8.js} +4 -4
  45. package/dist/chunks/{studio-xkxetm65.js → studio-1tzpds97.js} +5 -5
  46. package/dist/chunks/{studio-m48v13s3.js → studio-216b27sv.js} +3 -3
  47. package/dist/chunks/studio-2ejhqns4.js +5 -0
  48. package/dist/chunks/studio-2r90cts3.js +16 -0
  49. package/dist/chunks/{studio-h310mbqm.js → studio-399a25za.js} +4 -4
  50. package/dist/chunks/studio-399xknkb.js +6 -0
  51. package/dist/chunks/{studio-wxhy1yh7.js → studio-43y04qck.js} +4 -4
  52. package/dist/chunks/{studio-06j4en5h.js → studio-4g8yb6jn.js} +2 -2
  53. package/dist/chunks/{studio-jw0q5j6k.js → studio-4jhw38b2.js} +4 -4
  54. package/dist/chunks/{studio-3v5cagy9.js → studio-4ncmwqw5.js} +4 -4
  55. package/dist/chunks/studio-5atwjgkj.js +7 -0
  56. package/dist/chunks/{studio-gr36vnte.js → studio-5frqk7c0.js} +4 -4
  57. package/dist/chunks/{studio-9dz76yqc.js → studio-646nn2ys.js} +5 -5
  58. package/dist/chunks/{studio-tj2s0tks.js → studio-6cwj6xrx.js} +4 -4
  59. package/dist/chunks/studio-6hzdjfv0.js +5 -0
  60. package/dist/chunks/{studio-hcsba201.js → studio-71m92v9s.js} +7 -7
  61. package/dist/chunks/{studio-3c8pp7pb.js → studio-75kcdbsk.js} +4 -4
  62. package/dist/chunks/{studio-gwrhcrss.js → studio-78pywnp2.js} +5 -5
  63. package/dist/chunks/{studio-9cxmp61c.js → studio-86r8hp7r.js} +5 -5
  64. package/dist/chunks/studio-886t6ztg.js +5 -0
  65. package/dist/chunks/studio-8wnvtr4z.js +5 -0
  66. package/dist/chunks/studio-8z66jk4z.js +5 -0
  67. package/dist/chunks/{studio-ajw4k8hp.js → studio-9rbe2xpw.js} +3 -3
  68. package/dist/chunks/{studio-y26hx9re.js → studio-awxwjawq.js} +4 -4
  69. package/dist/chunks/studio-b2qpt0xy.js +14 -0
  70. package/dist/chunks/{studio-dx73md4n.js → studio-bvs9kpst.js} +7 -7
  71. package/dist/chunks/studio-c71806xz.js +7 -0
  72. package/dist/chunks/{studio-7dzyz9n8.js → studio-cbwks69x.js} +144 -144
  73. package/dist/chunks/studio-cg1bfyhf.js +9 -0
  74. package/dist/chunks/studio-cg710sk9.js +5 -0
  75. package/dist/chunks/studio-cw0wb9qk.js +7 -0
  76. package/dist/chunks/studio-cyheys7k.js +5 -0
  77. package/dist/chunks/studio-ea5m9kg5.js +5 -0
  78. package/dist/chunks/{studio-ry81j4q1.js → studio-ea74s8c1.js} +4 -4
  79. package/dist/chunks/{studio-xdpz9rpe.js → studio-efdxjwyp.js} +34 -34
  80. package/dist/chunks/{studio-agyvzfm4.js → studio-egmw2837.js} +4 -4
  81. package/dist/chunks/{studio-5tzgq6fx.js → studio-er5f383a.js} +4 -4
  82. package/dist/chunks/studio-f746039f.js +5 -0
  83. package/dist/chunks/studio-fmdymd9v.js +5 -0
  84. package/dist/chunks/studio-gcm12z00.js +6 -0
  85. package/dist/chunks/{studio-vswcpzk7.js → studio-gj98m8gy.js} +5 -5
  86. package/dist/chunks/{studio-yg3djpnm.js → studio-hasbgjah.js} +4 -4
  87. package/dist/chunks/studio-hhp4x8xf.js +6 -0
  88. package/dist/chunks/{studio-3w35qvay.js → studio-hz5n7x27.js} +4 -4
  89. package/dist/chunks/{studio-7xag4na8.js → studio-j3d2fjqz.js} +4 -4
  90. package/dist/chunks/studio-jeraxdgv.js +7 -0
  91. package/dist/chunks/studio-jvgek9xt.js +5 -0
  92. package/dist/chunks/studio-jws1a87n.js +5 -0
  93. package/dist/chunks/studio-k2sz13zg.js +5 -0
  94. package/dist/chunks/studio-k3m4jkdk.js +5 -0
  95. package/dist/chunks/{studio-r17asgs0.js → studio-kg1abnz0.js} +4 -4
  96. package/dist/chunks/{studio-s0fg2wav.js → studio-kg5ya5r2.js} +4 -4
  97. package/dist/chunks/studio-khwbgrtg.js +5 -0
  98. package/dist/chunks/studio-mx6wzh25.js +5 -0
  99. package/dist/chunks/studio-mxs3ar9t.js +5 -0
  100. package/dist/chunks/studio-nm4szey4.js +5 -0
  101. package/dist/chunks/studio-nqxqf8p2.js +4 -0
  102. package/dist/chunks/{studio-h5tpz5ke.js → studio-pjtntksy.js} +4 -4
  103. package/dist/chunks/studio-qh8berdz.js +5 -0
  104. package/dist/chunks/studio-qn7z4krm.js +5 -0
  105. package/dist/chunks/studio-qyed0ah6.js +5 -0
  106. package/dist/chunks/{studio-x97ay0v4.js → studio-r4bcdwhq.js} +4 -4
  107. package/dist/chunks/{studio-wxdcd42g.js → studio-r7pf0rkv.js} +6 -6
  108. package/dist/chunks/studio-rtfnhrdg.js +5 -0
  109. package/dist/chunks/{studio-fy7jzj9j.js → studio-rzqaz21g.js} +4 -4
  110. package/dist/chunks/studio-s5tzw84t.js +5 -0
  111. package/dist/chunks/{studio-1e8dw2w2.js → studio-sevbc3xv.js} +4 -4
  112. package/dist/chunks/{studio-ewarnzm4.js → studio-sxdb9h3q.js} +6 -6
  113. package/dist/chunks/studio-t51y8v1d.js +5 -0
  114. package/dist/chunks/{studio-k3bcy02e.js → studio-t98vq4r6.js} +4 -4
  115. package/dist/chunks/studio-th7z3fg7.js +5 -0
  116. package/dist/chunks/studio-tsxpqvh0.js +6 -0
  117. package/dist/chunks/{studio-396srjbk.js → studio-v1yascv2.js} +4 -4
  118. package/dist/chunks/{studio-ekgtrndg.js → studio-wc6za3zs.js} +4 -4
  119. package/dist/chunks/{studio-ndskgqef.js → studio-wxq6v5sv.js} +4 -4
  120. package/dist/chunks/{studio-4kzbrr5t.js → studio-y60sts62.js} +3 -3
  121. package/dist/chunks/studio-ybnwymxw.js +5 -0
  122. package/dist/chunks/studio-zndrqawb.js +5 -0
  123. package/dist/chunks/studio-zwaxn5s2.js +5 -0
  124. package/dist/chunks/{tsMode-h6tkz0ea.js → tsMode-f54j66ym.js} +5 -5
  125. package/dist/chunks/workspace-home-x1787wpv.js +4 -0
  126. package/dist/chunks/workspace-zpe1np43.js +4 -0
  127. package/dist/chunks/{ws-client-e951my95.js → ws-client-e8kj684q.js} +3 -3
  128. package/dist/manifest.json +76 -75
  129. package/dist/studio.js +83 -81
  130. package/package.json +4 -4
  131. package/src/browse/library-model.ts +56 -23
  132. package/src/commands/context.ts +1 -0
  133. package/src/editor/shortcuts.ts +3 -0
  134. package/src/panels/data-grid.ts +0 -4
  135. package/src/panels/settings-menu.ts +3 -3
  136. package/src/panels/settings-pane.ts +42 -56
  137. package/src/platform-errors.ts +17 -1
  138. package/src/platforms/cloud.ts +14 -0
  139. package/src/publish/publish-changes.ts +136 -4
  140. package/src/services/ai-import-tools.ts +6 -3
  141. package/src/services/ai-models.ts +65 -11
  142. package/src/services/ai-settings.ts +45 -5
  143. package/src/services/document-assistant.ts +5 -2
  144. package/src/services/settings/definitions.ts +19 -0
  145. package/src/settings/contributed-section.ts +16 -7
  146. package/src/settings/css-vars-editor.ts +4 -4
  147. package/src/settings/general-settings.ts +1 -4
  148. package/src/settings/preferences-accounts.ts +2 -2
  149. package/src/settings/preferences-dialog.ts +4 -2
  150. package/src/settings/project-sections.ts +1 -1
  151. package/src/settings/section-registry.ts +5 -4
  152. package/src/settings/settings-document.ts +33 -24
  153. package/src/settings/settings-workspace.ts +205 -0
  154. package/src/shell.ts +31 -6
  155. package/src/surfaces/ai-credentials-form.json +59 -5
  156. package/src/surfaces/ai-credentials-form.ts +15 -2
  157. package/src/surfaces/commandbar.ts +7 -3
  158. package/src/surfaces/settings-contributed.json +4 -4
  159. package/src/surfaces/settings-contributed.ts +2 -2
  160. package/src/surfaces/settings-pane.json +262 -180
  161. package/src/surfaces/settings-pane.ts +63 -14
  162. package/src/types.ts +14 -0
  163. package/src/ui/ai-credentials-form.ts +128 -11
  164. package/src/ui/regions.ts +5 -5
  165. package/src/workspace/tab-workspace.ts +3 -2
  166. package/src/workspace/workspace-home.ts +18 -4
  167. package/src/workspace/workspace-ids.ts +40 -7
  168. package/dist/chunks/adapter-wc5zvg9a.js +0 -4
  169. package/dist/chunks/add-new-flow-snx1s4b0.js +0 -4
  170. package/dist/chunks/cf-account-picker-xyqw0jex.js +0 -4
  171. package/dist/chunks/cf-settings-hp1pjm0n.js +0 -4
  172. package/dist/chunks/components-nkwphrx3.js +0 -4
  173. package/dist/chunks/content-source-6a253wmk.js +0 -4
  174. package/dist/chunks/editor-wqrc68ca.js +0 -4
  175. package/dist/chunks/entry-commands-nef0wrmp.js +0 -4
  176. package/dist/chunks/extension-sections-8ez2rrk8.js +0 -4
  177. package/dist/chunks/file-ops-y3w71k1n.js +0 -4
  178. package/dist/chunks/files-de90apn9.js +0 -4
  179. package/dist/chunks/format-host-zfjz4rzm.js +0 -4
  180. package/dist/chunks/fs-events-77c0mr0x.js +0 -4
  181. package/dist/chunks/grid-open-4n4fjfpf.js +0 -4
  182. package/dist/chunks/iframe-host-na2mywz4.js +0 -4
  183. package/dist/chunks/index-ewmgdb7c.js +0 -4
  184. package/dist/chunks/jx-validate-b309c020.js +0 -4
  185. package/dist/chunks/layers-8rn8y6qv.js +0 -4
  186. package/dist/chunks/layers-panel-eyah7h9z.js +0 -4
  187. package/dist/chunks/lit-html-wyqw04y2.js +0 -4
  188. package/dist/chunks/media-library-gs3np47y.js +0 -4
  189. package/dist/chunks/media-picker-tt7dk4tb.js +0 -4
  190. package/dist/chunks/monaco-buffer-wsf6cmnq.js +0 -4
  191. package/dist/chunks/notify-qwst108r.js +0 -4
  192. package/dist/chunks/parse-n8dfxnqf.js +0 -4
  193. package/dist/chunks/platform-c16mqvmp.js +0 -4
  194. package/dist/chunks/publish-panel-d34bhvwj.js +0 -4
  195. package/dist/chunks/publish-workspace-2yr60mt4.js +0 -4
  196. package/dist/chunks/quick-search-e6xsdv0d.js +0 -4
  197. package/dist/chunks/references-gsj6trdv.js +0 -4
  198. package/dist/chunks/right-panel-33jv1knc.js +0 -4
  199. package/dist/chunks/source-control-bj9bejjv.js +0 -4
  200. package/dist/chunks/studio-03mqh8ax.js +0 -5
  201. package/dist/chunks/studio-0ydxv2mr.js +0 -7
  202. package/dist/chunks/studio-2hsqbq7b.js +0 -7
  203. package/dist/chunks/studio-2j86y34y.js +0 -6
  204. package/dist/chunks/studio-2ks6ka4g.js +0 -5
  205. package/dist/chunks/studio-34jrz12k.js +0 -5
  206. package/dist/chunks/studio-35vrtpdq.js +0 -5
  207. package/dist/chunks/studio-38g0jdz7.js +0 -5
  208. package/dist/chunks/studio-3zge48z4.js +0 -7
  209. package/dist/chunks/studio-45gyxpcq.js +0 -5
  210. package/dist/chunks/studio-5wzdy1jc.js +0 -16
  211. package/dist/chunks/studio-732mw0g8.js +0 -5
  212. package/dist/chunks/studio-771k2n12.js +0 -5
  213. package/dist/chunks/studio-88bmt9rh.js +0 -5
  214. package/dist/chunks/studio-c1pxszat.js +0 -5
  215. package/dist/chunks/studio-cpkamjdn.js +0 -14
  216. package/dist/chunks/studio-d038kqbs.js +0 -5
  217. package/dist/chunks/studio-d83m0wyq.js +0 -5
  218. package/dist/chunks/studio-dbxv7w4s.js +0 -5
  219. package/dist/chunks/studio-de1s2x9v.js +0 -5
  220. package/dist/chunks/studio-epenqmvk.js +0 -7
  221. package/dist/chunks/studio-et2q4s8n.js +0 -5
  222. package/dist/chunks/studio-h7weqf2q.js +0 -5
  223. package/dist/chunks/studio-hwejq03c.js +0 -5
  224. package/dist/chunks/studio-k3a8rp3d.js +0 -5
  225. package/dist/chunks/studio-p1n2xjda.js +0 -5
  226. package/dist/chunks/studio-pgm83a2f.js +0 -6
  227. package/dist/chunks/studio-pqqq6v85.js +0 -5
  228. package/dist/chunks/studio-psh8mwnw.js +0 -4
  229. package/dist/chunks/studio-rzg8hnkf.js +0 -5
  230. package/dist/chunks/studio-tyw7tk0x.js +0 -5
  231. package/dist/chunks/studio-v9ywz2se.js +0 -6
  232. package/dist/chunks/studio-vzgmyt0v.js +0 -5
  233. package/dist/chunks/studio-x08a3m0a.js +0 -5
  234. package/dist/chunks/studio-x3mjr5cc.js +0 -5
  235. package/dist/chunks/studio-xh683qzy.js +0 -5
  236. package/dist/chunks/studio-yx8hzqja.js +0 -5
  237. package/dist/chunks/studio-zg16eeq1.js +0 -5
  238. package/dist/chunks/studio-zgx7svjd.js +0 -9
  239. package/dist/chunks/studio-zkq3r91p.js +0 -5
  240. package/dist/chunks/workspace-home-zkkrxq3r.js +0 -4
  241. package/dist/chunks/workspace-tdqqjqaa.js +0 -4
  242. package/src/settings/settings-dialog.ts +0 -192
  243. package/src/surfaces/settings-dialog.json +0 -51
  244. package/src/surfaces/settings-dialog.ts +0 -169
@@ -0,0 +1,4 @@
1
+ import{hh,zd,$a,$$,Sr,I$,tv,R$,nv}from"./studio-mx6wzh25.js";import"./studio-nqxqf8p2.js";import"./studio-jws1a87n.js";export{Sr as invalidateUsages,$a as loadUsages,I$ as onUsagesInvalidated,zd as peekUsages,$$ as retryUsages,nv as usageFiles,tv as usageHeadline,R$ as usageWarning,hh as usagesSupported};
2
+
3
+ //# debugId=8B82F000161ED9E264756E2164756E21
4
+ //# sourceMappingURL=references-a7v6a0e2.js.map
@@ -0,0 +1,4 @@
1
+ import{fR,Ck,rP,kk,Ug,Ol,Cu}from"./studio-hasbgjah.js";import"./studio-646nn2ys.js";import"./studio-tsxpqvh0.js";import"./studio-gj98m8gy.js";import"./studio-43y04qck.js";import"./studio-qh8berdz.js";import"./studio-cg1bfyhf.js";import"./studio-rzqaz21g.js";import"./studio-c71806xz.js";import"./studio-mxs3ar9t.js";import"./studio-2ejhqns4.js";import"./studio-05jfwbmf.js";import"./studio-r7pf0rkv.js";import"./studio-zwaxn5s2.js";import"./studio-5atwjgkj.js";import"./studio-399xknkb.js";import"./studio-egmw2837.js";import"./studio-r4bcdwhq.js";import"./studio-qyed0ah6.js";import"./studio-78pywnp2.js";import"./studio-wxq6v5sv.js";import"./studio-5frqk7c0.js";import"./studio-0q5jwddh.js";import"./studio-cw0wb9qk.js";import"./studio-86r8hp7r.js";import"./studio-rtfnhrdg.js";import"./studio-sevbc3xv.js";import"./studio-2r90cts3.js";import"./studio-sxdb9h3q.js";import"./studio-f746039f.js";import"./studio-8wnvtr4z.js";import"./studio-hhp4x8xf.js";import"./studio-th7z3fg7.js";import"./studio-0w2dr0q8.js";import"./studio-9rbe2xpw.js";import"./studio-b2qpt0xy.js";import"./studio-399a25za.js";import"./studio-mx6wzh25.js";import"./studio-t98vq4r6.js";import"./studio-k2sz13zg.js";import"./studio-qn7z4krm.js";import"./studio-ea74s8c1.js";import"./studio-y60sts62.js";import"./studio-nqxqf8p2.js";import"./studio-hz5n7x27.js";import"./studio-jws1a87n.js";import"./studio-k1wvtp03.js";export{Ol as inspectorTab,Ck as mount,Ug as render,kk as restingInspectorTab,Cu as setInspectorTab,fR as stripOf,rP as unmount};
2
+
3
+ //# debugId=469895DB51B37EE864756E2164756E21
4
+ //# sourceMappingURL=right-panel-cvk1vxx5.js.map
@@ -0,0 +1,4 @@
1
+ import{ks,lT,cS,dS,wb,Vs,cT,dT,uT,hT,pT,fT,mT,gT,bT,vT,yT,wT,xT,_T,uS,ST,CT,xw,kT,ET,xb,TT}from"./studio-zwaxn5s2.js";import"./studio-5atwjgkj.js";import"./studio-wxq6v5sv.js";import"./studio-5frqk7c0.js";import"./studio-0q5jwddh.js";import"./studio-cw0wb9qk.js";import"./studio-86r8hp7r.js";import"./studio-rtfnhrdg.js";import"./studio-sevbc3xv.js";import"./studio-2r90cts3.js";import"./studio-sxdb9h3q.js";import"./studio-f746039f.js";import"./studio-8wnvtr4z.js";import"./studio-hhp4x8xf.js";import"./studio-th7z3fg7.js";import"./studio-0w2dr0q8.js";import"./studio-9rbe2xpw.js";import"./studio-b2qpt0xy.js";import"./studio-mx6wzh25.js";import"./studio-t98vq4r6.js";import"./studio-k2sz13zg.js";import"./studio-qn7z4krm.js";import"./studio-ea74s8c1.js";import"./studio-y60sts62.js";import"./studio-nqxqf8p2.js";import"./studio-hz5n7x27.js";import"./studio-jws1a87n.js";export{ET as armGitPoll,uS as changeRow,_T as checkoutBranch,xb as cleanupSourceControl,dS as cloneRepository,CT as commitRow,xT as createBranch,wT as discardFile,cS as fetchGitLog,mT as fetchRemote,ST as groupFilesByComponent,yT as includeNewChanges,kT as lastUpdatedLabel,uT as loadDiffForLens,lT as noteFileSaved,fT as openFileComparison,Vs as platformHostsGit,cT as platformOpensPullRequests,wb as platformSupportsClone,gT as pullRemote,ks as refreshGitStatus,TT as registerSourceControlCommands,xw as relativeDate,pT as runCloneRepository,vT as setAllIncluded,bT as setIncluded,hT as setSourceControlDeps,dT as statusTag};
2
+
3
+ //# debugId=37E95BBB7AF94D9364756E2164756E21
4
+ //# sourceMappingURL=source-control-fsqzc6he.js.map
@@ -0,0 +1,5 @@
1
+ import{St,ti,Ce,We,vh,m,_i,Pt}from"./studio-k2sz13zg.js";import{g}from"./studio-y60sts62.js";import{p}from"./studio-jws1a87n.js";import{Ft,fn}from"./studio-hz5n7x27.js";import{L,R,Zs,dt}from"./studio-0w2dr0q8.js";import{La,Bd}from"./studio-399a25za.js";import{Dd,iT,rS,rT,sT}from"./studio-r7pf0rkv.js";import{Sb,ls,Vl,Tw,Lw,yp,Qo,wp}from"./studio-qyed0ah6.js";import{S}from"./studio-cg710sk9.js";import{n,Z,ee,df}from"./studio-8z66jk4z.js";var T={$schema:"https://jxsuite.com/schema/v1",$id:"StudioGridOpen",$description:"Every grid-able source a project has, grouped by where it comes from: the project's own pages and content collections first, then each connection's tables. It is the ISLAND of a confirm dialog rather than a dialog of its own — `ui/layers.ts`'s dialog owns the headline, the cancel button, modality and focus, and this document is only the list — because a second answer to \"what is a dialog\" is a defect (studio-ui-guidelines.md §12.5). Group headings are why it is not the kit menu: a menu row can carry a divider above it and cannot carry a name for the run it opens.",tagName:"div",attributes:{part:"sources"},style:{display:"flex",flexDirection:"column",gap:"var(--jx-space-3)",minWidth:"280px",fontFamily:"var(--jx-font-sans)",fontSize:"var(--jx-text-md)",color:"var(--fg)",'& [part="group-title"]':{margin:"0",fontSize:"var(--jx-text-xs)",fontWeight:"600",textTransform:"uppercase",letterSpacing:"0.04em",color:"var(--fg-dim)"},'& [part="rows"]':{display:"flex",flexDirection:"column",gap:"1px",marginTop:"var(--jx-space-1)"},'& [part="source"]':{textAlign:"left",background:"none",border:"none",color:"var(--fg)",font:"inherit",padding:"var(--jx-space-2) var(--jx-space-2)",borderRadius:"var(--jx-radius-sm)",cursor:"pointer"},'& [part="source"]:hover':{background:"var(--bg-hover)"},'& [part="source"]:focus-visible':{outline:"var(--jx-focus-ring)",outlineOffset:"-2px"},'& [part="group-empty"]':{margin:"0",padding:"var(--jx-space-2)",color:"var(--fg-dim)",fontSize:"var(--jx-text-sm)"}},children:[{$prototype:"Array",items:{$ref:"#/state/groups"},key:{$ref:"$map/item/key"},map:{$description:"One origin of grid-able sources. A connection with no tables says why it has none instead of drawing an empty box — an author who has not pushed a schema yet is exactly the reader who needs the sentence.",tagName:"section",attributes:{part:"group","data-group":"${$map.item.key}"},children:[{tagName:"h3",attributes:{part:"group-title"},textContent:"${$map.item.title}"},{tagName:"div",attributes:{part:"rows"},$switch:{$ref:"$map/item/state"},cases:{listed:{tagName:"div",attributes:{part:"rows-list",role:"none"},style:{display:"contents"},children:[{$prototype:"Array",items:{$ref:"$map/item/rows"},key:{$ref:"$map/item/id"},map:{tagName:"button",attributes:{part:"source",type:"button","data-source":"${$map.item.id}"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/open"},value:[{$ref:"$map/item/id"}]}]},textContent:"${$map.item.label}"}}]},empty:{tagName:"p",attributes:{part:"group-empty"},textContent:"${$map.item.emptyMessage}"}}}]}}]};L("grid-open",T);function j(e,r,t){let o=g({groups:r,open:t}),i=null,s=!1,c=R("grid-open",o,e).then((y)=>{let a=y.root;if(s)return y.dispose(),a;return i=y,a});return{dispose(){s=!0,i?.dispose(),i=null},ready:c}}function x(){try{return p()}catch{return null}}function nS(){return ee(x()?.dataRows)}async function I(){let e=x();if(!ee(e?.dataConnections))return null;return e.dataConnections()}async function UD(e){let r=x();if(!ee(r?.dataConnectionTest))return{error:"Connection tests are not supported by this backend",ok:!1};try{return await r.dataConnectionTest(e)}catch(t){return{error:t instanceof Error?t.message:String(t),ok:!1}}}async function QE(e){let r=x();if(!ee(r?.dataPush))return{applied:!1,errors:["Schema push is not supported by this backend"],plan:[]};try{return await r.dataPush(e)}catch(t){return{applied:!1,errors:[t instanceof Error?t.message:String(t)],plan:[]}}}function k(e){let t=x()?.[e];if(t===void 0)throw Error(`The ${String(e)} surface is not supported by this backend`);return t}function v(e){return k("dataRows")(e)}function K(e){return k("dataInsertRow")(e)}function M(e){return k("dataUpdateRow")(e)}function E(e){return k("dataDeleteRow")(e)}function qD(e,r,t){let o=(c)=>c.replaceAll(/([a-z0-9])([A-Z])/g,"$1_$2").replaceAll(/[^A-Za-z0-9]+/g,"_").replaceAll(/^_+|_+$/g,"").toUpperCase(),s=[r??e,t.replace(/Env$/,"")].flatMap((c)=>{let y=o(c);return y?[y]:[]}).join("_")||"SECRET";return/^\d/.test(s)?`JX_${s}`:s}var B=["id","sku","slug","Slug"];function H(e){let r=new Set;return e.map((t,o)=>{let i=t.trim()===""?`column${o+1}`:t;if(r.has(i))i=`${i}__${o+1}`;return r.add(i),i})}function Q(e,r){for(let t of B){let o=e.indexOf(t);if(o===-1)continue;let i=r.rows.map((s)=>s[o]??"");if(i.every((s)=>s!=="")&&new Set(i).size===i.length)return t}return null}function O(e,r){let t=Dd(e),o=H(t.headers),i=Q(o,t),s=i?o.indexOf(i):-1,c=t.rows.map((d,u)=>s===-1?String(u):d[s]),y=new Map(c.map((d,u)=>[d,u])),a=vh(r,S?.projectConfig),l=a?.schema.properties??{},b=t.rows.slice(0,50).map((d)=>{let u={};for(let[C,G]of o.entries())u[G]=d[C]??"";return u}),f=new Map(Lw(b).map((d)=>[d.field,d])),w=new Map(Tw(a?.schema,{idField:i??void 0}).map((d)=>[d.field,d]));return{columns:o.map((d,u)=>{let G=(d in l?w.get(d):void 0)??f.get(d)??{editable:!0,field:d,kind:"string",title:t.headers[u]||d};return{...G,pk:d===i,title:t.headers[u]?.trim()||G.title}}),doc:t,fields:o,keys:c,keyToIndex:y,loadText:e}}function J(e,r){let t={},o=e.doc.rows[r]??[];for(let[i,s]of e.fields.entries()){let c=e.columns[i],y=o[i]??"";t[s]=c.kind==="string"||c.kind==="text"||c.kind==="readonly"?y:yp(y,c)}return t}function A(e,r){let t=e.doc.rows.map((s)=>[...s]),o=(s)=>e.fields.indexOf(s);for(let s of r.cells){let c=e.keyToIndex.get(s.rowKey),y=o(s.field);if(c===void 0||y===-1)continue;t[c][y]=Qo(s.value)}for(let s of r.inserts){let c=e.fields.map((y)=>Qo(s.cells[y]??null));t.push(c)}let i=r.deletes.map((s)=>e.keyToIndex.get(s.rowKey)).filter((s)=>s!==void 0).toSorted((s,c)=>c-s);for(let s of i)t.splice(s,1);return{...e.doc,rows:t}}function F(e,r){return{cells:e.cells.map((t)=>({field:t.field,rowKey:t.rowKey,...r})),deletes:e.deletes.map((t)=>({rowKey:t.rowKey,...r})),inserts:e.inserts.map((t)=>({error:r.error,ok:r.ok,tempKey:t.tempKey}))}}function iS(e){let r=null,t=(o=!1)=>{if(!o&&r)return r;return r=p().readFile(e).then((i)=>O(i,e)),r};return{backingPaths:()=>new Map([[e,"*"]]),capabilities:{delete:!0,insert:!0,remotePaging:!1,remoteSort:!1},async columns(){return(await t()).columns},async commit(o){let i=await t(),s=p(),c=null;try{c=await s.readFile(e)}catch{c=null}if(c!==i.loadText&&!Bd(e))return F(o,{error:"File changed on disk — refresh to reload",ok:!1,stale:!0});let y=A(i,o),a=iT(y);return La(e),await s.writeFile(e,a),r=Promise.resolve(O(a,e)),F(o,{ok:!0})},id:e,label:e.split("/").pop()??e,async refresh(){await t(!0)},async rows(){let o=await t(),i=o.doc.rows.map((s,c)=>({cells:J(o,c),key:o.keys[c]}));return{rows:i,total:i.length}},async serializeForSource(o){let i=await t();return iT(A(i,o))}}}var z=50;function U(e){let r=e.toLowerCase();if(/(int|real|floa|doub|num|dec)/.test(r))return"number";if(r.includes("bool"))return"boolean";if(/(timestamp|datetime|date)/.test(r))return"date";return"string"}function q(e){return!e.pk&&e.name!=="created_at"&&e.name!=="updated_at"}function W(e){if(e===void 0)return null;if(df(e))return e;return JSON.stringify(e)}function _(e,r){let t=[],o="id",i=new Map,s=(a)=>{if(a.length>0)t=a,o=a.find((l)=>l.pk)?.name??"id"},c=(a)=>{let l={table:r};if(e)l.connection=e;if(l.limit=a?.limit??z,l.offset=a?.offset??0,a?.orderBy)l.dir=a.dir??"asc",l.orderBy=a.orderBy;return l},y=(a,l)=>{let b=a[o];if(n(b)||Z(b))return i.set(String(b),b),String(b);return`row-${l}`};return{capabilities:{delete:!0,insert:!0,remotePaging:!0,remoteSort:!0},async columns(){if(t.length===0){let a=await v(c({limit:1,offset:0}));s(a.columns)}return t.map((a)=>{let l=q(a)?U(a.type):"readonly";return{editable:l!=="readonly",field:a.name,kind:l,pk:a.pk===!0,title:a.name,widthHint:a.pk?80:void 0}})},async commit(a){let l={cells:[],deletes:[],inserts:[]},b=new Map;for(let f of a.cells){let w=b.get(f.rowKey)??[];w.push({field:f.field,value:f.value}),b.set(f.rowKey,w)}for(let[f,w]of b){let h=i.get(f),d=(u,C)=>{for(let G of w)l.cells.push({error:C,field:G.field,ok:u,rowKey:f})};if(h===void 0){d(!1,"Row has no primary key — refresh the grid");continue}try{let u={};for(let G of w)u[G.field]=G.value;let C={pk:h,set:u,table:r};if(e)C.connection=e;await M(C),d(!0)}catch(u){d(!1,u instanceof Error?u.message:String(u))}}for(let f of a.inserts)try{let w={};for(let[G,P]of Object.entries(f.cells))if(P!==null)w[G]=P;let h={table:r,values:w};if(e)h.connection=e;let{row:d}=await K(h),u=d[o],C;if(n(u)||Z(u))C=String(u),i.set(C,u);l.inserts.push({newKey:C,ok:!0,tempKey:f.tempKey})}catch(w){l.inserts.push({error:w instanceof Error?w.message:String(w),ok:!1,tempKey:f.tempKey})}for(let f of a.deletes){let w=i.get(f.rowKey);if(w===void 0){l.deletes.push({error:"Row has no primary key — refresh the grid",ok:!1,rowKey:f.rowKey});continue}try{let h={pk:w,table:r};if(e)h.connection=e;await E(h),l.deletes.push({ok:!0,rowKey:f.rowKey})}catch(h){l.deletes.push({error:h instanceof Error?h.message:String(h),ok:!1,rowKey:f.rowKey})}}return l},id:ls({connection:e??"default",kind:"data",table:r}),label:r,async refresh(){t=[],i.clear()},async rows(a){let l=await v(c(a));return s(l.columns),{rows:l.rows.map((f,w)=>{let h=y(f,w),d={};for(let u of t)d[u.name]=W(f[u.name]);return{cells:d,key:h}}),total:l.total}}}}async function eT(e,r={}){let t=m.tabs.get(e);if(t)return Pt(e,{focus:r.focus!==!1}),t;try{await Ft()}catch{}let o=iS(e),i=_i({capabilities:{modes:["grid","source"]},document:structuredClone(Sb),documentPath:e,id:e,sourceFormat:fn(e)?.name??null,...r.paneId!==void 0&&{paneId:r.paneId},...r.preview===!0&&{preview:!0},...r.focus===!1&&{focus:!1}});return wp(i,o).load(),i}function D(e){let r=_i({capabilities:{modes:["grid"]},document:structuredClone(Sb),documentPath:null,id:e.id});return wp(r,e).load(),r}function GD(e){let r=ls({kind:"collection",name:e}),t=m.tabs.get(r);if(t)return Pt(r),t;return D(rT(e))}function oS(){let e=ls({kind:"pages"}),r=m.tabs.get(e);if(r)return Pt(e),r;return D(sT())}function N(e,r){let t=ls({connection:e??"default",kind:"data",table:r}),o=m.tabs.get(t);if(o)return Pt(t),o;return D(_(e,r))}function X(e){let r=Vl(e);if(r?.kind==="pages")oS();else if(r?.kind==="collection")GD(r.name);else if(r?.kind==="data")N(r.connection,r.table)}function Y(e,r){return[{emptyMessage:"",key:"project",rows:[{id:ls({kind:"pages"}),label:"Pages"},...e.map(({name:t})=>({id:ls({kind:"collection",name:t}),label:`Collection: ${t}`}))],state:"listed",title:"Project"},...r.map((t)=>({emptyMessage:"No tables — push a schema first.",key:`data:${t.name}`,rows:t.tables.map((o)=>({id:ls({connection:t.name,kind:"data",table:o}),label:o})),state:t.tables.length===0?"empty":"listed",title:`Data · ${t.name}`}))]}async function tT(){let e=rS(),r=[];if(nS())r=(await I().catch(()=>null))?.connections??[];let t=null,o=Zs({cancelLabel:"Cancel",confirmLabel:"",headline:"Open Grid",island:(i)=>{t=j(i,Y(e,r),(s)=>{o.close(),X(s)})},layer:dt("dialog"),onCancel:()=>o.close(),onClosed:()=>{t?.dispose(),t=null},onConfirm:()=>{},region:"grid/open"});o.ready}function te(){return[{args:Ce({name:We("The content collection's name, as project.json declares it.")}),category:"Project",id:"collection.editInGrid",level:"project",menus:["context/file","palette"],group:"5_data",requires:"a project that declares content collections",when:(e)=>e.project.open,run:(e,r)=>{let t=St("collection.editInGrid",r,"name"),o=rS().map((i)=>i.name);if(!o.includes(t))throw RangeError(`command "collection.editInGrid" argument "name": "${t}" is not a content `+"collection this project declares — it declares: "+`${o.length>0?o.join(", "):"none"}`);GD(t)},title:"Edit Collection in Grid"},{args:{additionalProperties:!1,properties:{connection:We('The connection name from project.json. Defaults to "default".'),table:We("The table to open.")},required:["table"],type:"object"},category:"Project",id:"data.openGrid",level:"project",menus:["palette"],group:"5_data",requires:"a platform that serves the data routes",when:(e)=>e.project.open,enablement:(e)=>e.capability.dataRows,run:(e,r)=>{let t=St("data.openGrid",r,"table");N(ti("data.openGrid",r,"connection"),t)},title:"Open Data Grid"}]}function nT(e){e.registerAll(te())}
2
+ export{nS,UD,QE,qD,iS,eT,GD,oS,tT,nT};
3
+
4
+ //# debugId=E674EF29442BC0D664756E2164756E21
5
+ //# sourceMappingURL=studio-05jfwbmf.js.map
@@ -1,9 +1,9 @@
1
- import{Vr}from"./studio-ajw4k8hp.js";import{Ot,Nt}from"./studio-cpkamjdn.js";import{ge,ne,g,ar,C}from"./studio-4kzbrr5t.js";import{Si}from"./studio-ry81j4q1.js";import{Ue,ft,T,R,Yt,tt}from"./studio-jttyqrmh.js";import{oh}from"./studio-5wzdy1jc.js";import{hN}from"./studio-2hsqbq7b.js";import{Xn}from"./studio-9cxmp61c.js";import{Bd,La,Qb}from"./studio-de1s2x9v.js";var y={$schema:"https://jxsuite.com/schema/v1",$id:"StudioPanelActivity",$description:'The Activity feed: one row per operation this session, newest last, drawn from the projection `panels/activity-panel.ts` hands in. A row is a glyph, a head line (what the operation is, who is running it, how long it has taken), the line it is doing now, the plan it declared, the log it captured and — only when the operation handed a callback over — its Cancel. Every conditional the row has is a boolean field on the projected item, because `$switch` over a value is the only conditional a document has and "is this entry cancellable" is a question the panel has already answered. Nothing here reads the activity store: the panel owns what an operation IS, and the surface owns what it looks like.',tagName:"div",attributes:{part:"panel"},style:{$description:"What `.activity-panel`, `.activity-actions`, `.activity-list`, `.activity-row`, `.activity-icon`, `.activity-body`, `.activity-head`, `.activity-title`, `.activity-source`, `.activity-duration`, `.activity-status`, `.activity-steps`, `.activity-step`, `.activity-step-icon`, `.activity-log-toggle` and `.activity-log` said in `styles/panels.css`, keyed on `part`. Two rules were DELETED rather than moved: `.activity-clear` and `.activity-cancel` drew a small bordered button by hand, and `jx-button` is that button — so the sizes, the border, the hover fill and the disabled state are the kit's now. Three token names changed meaning on the way: `--spectrum-font-size-50`, `--spectrum-font-size-75` and `--spectrum-corner-radius-75` resolve only inside `<sp-theme>`, and this document is mounted into the Bottom dock's body where that element is not an ancestor — every one of them would silently have taken its px fallback. They are the kit's own scale here (`--jx-text-sm`, `--jx-text-md`, `--jx-radius-xs`), which is the step each of them was. The `.activity-*` rules stay in the stylesheet regardless: `publish/deploy-checklist.ts` still draws the checklist above this feed in that same vocabulary, and it is a lit template until it converts.",display:"flex",flexDirection:"column",gap:"8px",padding:"8px",minWidth:"0",fontFamily:"var(--jx-font-sans)",color:"var(--fg)",'& [part="feed"]':{display:"flex",flexDirection:"column",gap:"8px",minWidth:"0"},'& [part="actions"]':{display:"flex",justifyContent:"flex-end"},'& [part="list"]':{display:"flex",flexDirection:"column",gap:"4px",margin:"0",padding:"0",listStyle:"none"},'& [part="row"]':{$description:"The left border is the state, at 3px, which is the one thing that must be legible in a column of twenty rows without reading any of them. Its default is the dim foreground so a state nobody has a colour for still draws a border rather than a gap.",display:"flex",alignItems:"flex-start",gap:"8px",padding:"6px 8px",border:"1px solid var(--border)",borderLeft:"3px solid var(--fg-dim)",borderRadius:"var(--radius)",background:"var(--bg-panel)",color:"var(--fg)",fontSize:"var(--jx-text-md)"},'& [part="row"][data-state="running"]':{borderLeftColor:"var(--accent)"},'& [part="row"][data-state="done"]':{borderLeftColor:"var(--success)"},'& [part="row"][data-state="failed"]':{borderLeftColor:"var(--danger)"},'& [part="row"][data-state="cancelled"]':{borderLeftColor:"var(--fg-dim)"},'& [part="icon"]':{flex:"none",width:"14px",textAlign:"center",fontWeight:"700",lineHeight:"1.5"},'& [part="row"][data-state="running"] [part="icon"]':{color:"var(--accent)"},'& [part="row"][data-state="done"] [part="icon"]':{color:"var(--success)"},'& [part="row"][data-state="failed"] [part="icon"]':{color:"var(--danger)"},'& [part="body"]':{flex:"1",minWidth:"0",display:"flex",flexDirection:"column",gap:"2px"},'& [part="head"]':{display:"flex",alignItems:"baseline",gap:"8px",minWidth:"0"},'& [part="row-title"]':{fontWeight:"700",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},'& [part="source"], & [part="duration"]':{flex:"none",color:"var(--fg-dim)",fontSize:"var(--jx-text-sm)"},'& [part="duration"]':{$description:"Pushed to the far edge so a column of rows reads as a column of times.",marginLeft:"auto"},'& [part="status"]':{color:"var(--fg-dim)",overflowWrap:"anywhere"},'& [part="steps"]':{$description:'The plan, declared up front, so "which of the three steps is this on" is answered by looking rather than by reading the status line and remembering what came before it.',display:"flex",flexDirection:"column",gap:"1px",margin:"2px 0 0",padding:"0",listStyle:"none",fontSize:"var(--jx-text-sm)"},'& [part="step"]':{display:"flex",gap:"6px",color:"var(--fg-dim)"},'& [part="step"][data-state="running"]':{color:"var(--fg)"},'& [part="step"][data-state="done"] [part="step-icon"]':{color:"var(--success)"},'& [part="step"][data-state="failed"] [part="step-icon"]':{color:"var(--danger)"},'& [part="step-icon"]':{flex:"none",width:"10px",textAlign:"center"},'& [part="log-toggle"]':{$description:"A plain button rather than a kit one, and the one element here that is not the kit's. The control has to carry `aria-expanded` on the node the reader actually focuses, and a `jx-button` forwards a fixed set of ARIA properties to the control inside its shadow root — an attribute written on the host would name the wrapper and not the button. Its wording is the disclosure's whole state (`docs/studio/interface/problems-and-progress.md` calls it the Show log disclosure), so nothing else has to draw one.",alignSelf:"flex-start",padding:"0",border:"none",background:"none",color:"var(--accent)",font:"inherit",fontSize:"var(--jx-text-sm)",cursor:"pointer",":hover":{textDecoration:"underline"},":focus-visible":{outline:"var(--jx-focus-ring)",outlineOffset:"2px"}},'& [part="log"]':{$description:"The captured output the progress modal used to show once and then lose. It scrolls inside the row rather than growing it, so one 400-line `bun install` failure does not become the whole panel. It is selectable against the root's `user-select: none`, the one part of an activity row that is: the output is what a reader pastes into a bug report, and the row offers no copy action.",userSelect:"text",maxHeight:"180px",margin:"2px 0 0",padding:"6px",overflow:"auto",borderRadius:"var(--jx-radius-xs)",background:"var(--bg)",color:"var(--fg-dim)",fontFamily:"var(--font-mono)",fontSize:"var(--jx-text-sm)",whiteSpace:"pre-wrap"},'& [part="cancel"]':{flex:"none"},'& [part="empty"]':{$description:"The teaching empty state, drawn here rather than borrowed from `panels/empty-state.ts`: that helper is a lit template and a document cannot call one. What it says is what is kept — one sentence saying what the region is FOR, then where its content comes from — and this region's fill is an operation somebody else starts, so it offers no button.",display:"flex",flexDirection:"column",alignItems:"center",gap:"8px",padding:"24px",textAlign:"center",fontSize:"13px",color:"var(--fg-dim)"},'& [part="empty-message"], & [part="empty-detail"]':{margin:"0",maxWidth:"34ch",lineHeight:"1.5"},'& [part="empty-detail"]':{fontSize:"var(--jx-text-sm)",opacity:"0.8"}},children:[{tagName:"div",attributes:{part:"feed-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/hasRows"},cases:{true:{tagName:"div",attributes:{part:"feed"},children:[{tagName:"div",attributes:{part:"actions-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/hasFinished"},cases:{true:{tagName:"div",attributes:{part:"actions"},children:[{tagName:"jx-button",$props:{size:"sm",quiet:!0},attributes:{part:"clear"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/clearFinished"}}]},children:[{tagName:"span",textContent:"${state.clearLabel}"}]}]}}},{tagName:"ul",attributes:{part:"list"},children:[{$prototype:"Array",items:{$ref:"#/state/rows"},key:{$ref:"$map/item/id"},map:{tagName:"li",attributes:{part:"row","data-state":"${$map.item.state}"},children:[{tagName:"span",attributes:{part:"icon","aria-hidden":"true"},textContent:"${$map.item.icon}"},{tagName:"div",attributes:{part:"body"},children:[{tagName:"div",attributes:{part:"head"},children:[{tagName:"span",attributes:{part:"row-title"},textContent:"${$map.item.title}"},{tagName:"span",attributes:{part:"source-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"$map/item/hasSource"},cases:{true:{tagName:"span",attributes:{part:"source"},textContent:"${$map.item.source}"}}},{tagName:"span",attributes:{part:"duration"},textContent:"${$map.item.duration}"}]},{tagName:"div",attributes:{part:"status-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"$map/item/hasStatus"},cases:{true:{tagName:"div",attributes:{part:"status"},textContent:"${$map.item.status}"}}},{tagName:"div",attributes:{part:"steps-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"$map/item/hasSteps"},cases:{true:{tagName:"ol",attributes:{part:"steps"},children:[{$prototype:"Array",items:{$ref:"$map/item/steps"},key:{$ref:"$map/item/key"},map:{tagName:"li",attributes:{part:"step","data-state":"${$map.item.state}"},children:[{tagName:"span",attributes:{part:"step-icon","aria-hidden":"true"},textContent:"${$map.item.icon}"},{tagName:"span",attributes:{part:"step-label"},textContent:"${$map.item.label}"}]}}]}}},{tagName:"div",attributes:{part:"log-toggle-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"$map/item/hasLog"},cases:{true:{tagName:"button",attributes:{part:"log-toggle",type:"button","aria-expanded":"${$map.item.expanded ? 'true' : 'false'}"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/toggleLog"},value:[{$ref:"$map/item/id"}]}]},textContent:"${$map.item.logLabel}"}}},{tagName:"div",attributes:{part:"log-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"$map/item/showLog"},cases:{true:{tagName:"pre",attributes:{part:"log"},textContent:"${$map.item.logText}"}}}]},{tagName:"div",attributes:{part:"cancel-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"$map/item/cancellable"},cases:{true:{tagName:"jx-button",$props:{size:"sm"},attributes:{part:"cancel",title:"Stop this operation"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/cancel"},value:[{$ref:"$map/item/id"}]}]},children:[{tagName:"span",textContent:"Cancel"}]}}}]}}]}]},false:{tagName:"div",attributes:{part:"empty"},children:[{tagName:"p",attributes:{part:"empty-message"},textContent:"Long operations show their progress, their log and their Cancel button here."},{tagName:"p",attributes:{part:"empty-detail"},textContent:"Installs, clones, publishes and imports report here while they run."}]}}}]};T("panel-activity",y);var h=null,u=null,d=null,c=null;function N(t,e){t.rows=e.rows,t.hasRows=e.hasRows,t.hasFinished=e.hasFinished,t.clearLabel=e.clearLabel}function E(t){if(h!==t)return!1;return c===null?d!==null:c.root.parentNode===t}function v(t,e){if(E(t))return;f(),h=t;let i=g({cancel:e.cancel,clearFinished:e.clearFinished,clearLabel:"",hasFinished:!1,hasRows:!1,rows:[],toggleLog:e.toggleLog});u=ge(),u.run(()=>{ne(()=>{N(i,e.project())})});let a=R("panel-activity",i,t);d=a,a.then((l)=>{if(d===a)c=l;else l.dispose()})}function f(){u?.stop(),u=null;let t=d;if(d=null,c)c.dispose(),c=null;else if(t)t.then((e)=>e.dispose());h=null}var cs=g([]),j=20,p=new Map,b=0;function I(){return b+=1,`a${b}`}function Dc(t){return t.state!=="running"}function w(){let t=cs.filter((e)=>Dc(e)).length-j;while(t>0){let e=cs.findIndex((i)=>Dc(i));if(e===-1)return;p.delete(cs[e].id),cs.splice(e,1),t-=1}}function Vs(t){let e={cancellable:t.cancel!==void 0,endedAt:null,expanded:!1,id:I(),log:[],startedAt:ar(),state:"running",status:t.status??"",steps:(t.steps??[]).map((o)=>({label:o,state:"pending"})),title:t.title},i=t.source===void 0?e:{...e,source:t.source};if(t.cancel)p.set(i.id,t.cancel);cs.push(i);let a=cs.at(-1);w();let l=(o,r)=>{if(Dc(a))return;if(a.state=o,a.endedAt=ar(),r!==void 0)a.status=r;for(let n of a.steps)n.state=n.state==="done"?"done":o==="done"?"done":"failed";a.cancellable=!1,p.delete(a.id),w()};return{done(o){l("done",o)},entry:a,fail(o,r={}){if(Dc(a))return;let n=a.log.join(`
2
- `);l("failed",o);let s={source:a.source??a.title};if(n!=="")s.detail=n;if(r.action!==void 0)s.action=r.action;if(r.actionArgs!==void 0)s.actionArgs=r.actionArgs;if(r.path!==void 0)s.path=r.path;C.error(o,s)},id:a.id,log(o){let r=o.replace(/\s+$/,"");if(r!=="")a.log.push(r)},setStatus(o){if(!Dc(a))a.status=o},step(o){let r=a.steps.findIndex((n)=>n.label===o);if(r===-1)a.steps.push({label:o,state:"pending"}),r=a.steps.length-1;for(let[n,s]of a.steps.entries())s.state=n<r?"done":n===r?"running":s.state;a.status=o}}}function x(t){return cs.find((e)=>e.id===t)}function m(){return cs.filter((t)=>!Dc(t))}function H(t){let e=x(t),i=p.get(t);if(!e||!i||Dc(e))return!1;return i(),p.delete(t),e.state="cancelled",e.endedAt=ar(),e.cancellable=!1,e.status="Cancelled",!0}function F(){let t=cs.filter((i)=>!Dc(i)),e=cs.length-t.length;return cs.splice(0,cs.length,...t),e}function sN(){return m().map((t)=>`activity: ${t.title} — ${t.status||"running"}`)}var P={cancelled:"⊘",done:"✓",failed:"✕",running:"⋯"},M={done:"✓",failed:"✕",pending:"·",running:"⋯"};function V(t,e=ar()){let i=Math.max(0,(t.endedAt??e)-t.startedAt);if(i<1000)return`${i}ms`;let a=Math.round(i/1000);return a<60?`${a}s`:`${Math.floor(a/60)}m ${a%60}s`}function O(t,e){return{icon:M[t.state],key:`${e}:${t.label}`,label:t.label,state:t.state}}function VT(t){let e=t.log.length;return{cancellable:t.cancellable,duration:V(t),expanded:t.expanded,hasLog:e>0,hasSource:(t.source??"")!=="",hasStatus:t.status!=="",hasSteps:t.steps.length>0,icon:P[t.state],id:t.id,logLabel:t.expanded?"Hide log":`Show log (${e} line(s))`,logText:t.log.join(`
3
- `),showLog:t.expanded&&e>0,source:t.source??"",state:t.state,status:t.status,steps:t.steps.map((i,a)=>O(i,a)),title:t.title}}function z(){let t=cs.filter((e)=>Dc(e)).length;return{clearLabel:`Clear ${t} finished`,hasFinished:t>0,hasRows:cs.length>0,rows:cs.map((e)=>VT(e))}}var D={cancel:(t)=>{H(t)},clearFinished:()=>{F()},project:z,toggleLog:(t)=>{let e=x(t);if(e)e.expanded=!e.expanded}};function _(){return Vr`<div data-deploy-checklist></div>
4
- <div data-activity-surface></div>`}function U(t){let e=t.querySelector("[data-activity-surface]");if(!e){f();return}v(e,D)}function aN(){Xn({id:"activity",title:"Activity",level:"project",dock:"bottom",icon:"clock-counter-clockwise",rail:!1,badge:()=>m().length>0?m().length:null,render:()=>_(),afterRender:(t,e)=>{hN(e),U(e)}})}var W={message:"no media file to look for",status:"failed"};function A(t){let e=Si(t);return e===""?null:{path:e}}function Ow(t){let e=A(t);return e===null?null:Bd(e)}async function Gu(t){let e=A(t);return e===null?W:La(e)}function lN(t){if(t===null)return"Counting references…";switch(t.status){case"unsupported":return null;case"pending":return"Counting references…";case"failed":return"Usage unknown";default:return Qb(t.result)}}var S={$schema:"https://jxsuite.com/schema/v1",$id:"StudioProgressModal",$description:"The one surface in Studio that blocks while it works: the operation's name, a spinner, the line under it, and the two ways out. A `jx-dialog`, so the platform owns modality, the backdrop, focus restoration and Escape — which is what retired the `sp-underlay` this surface used to paint beside itself, and with it the fixed box, the panel, the shadow and the `z-index: 1000` that box needed to climb back out from under its own scrim. The two answers are the dialog's own: confirm is `Run in the background`, which stops the BLOCKING and leaves the work running in Activity, and the secondary answer is Cancel, drawn only when the operation handed one over. It is the secondary rather than the cancel answer for a reason that is behavioural, not cosmetic: the platform raises one `cancel` for Escape, for a light dismissal and for the cancel button alike, and a surface that cannot tell them apart would stop a dependency install on a keystroke. Escape therefore means what confirm means — stop blocking, not stop working — and the answer that stops the work is a button and only a button.",tagName:"jx-dialog",$props:{headline:{$ref:"#/state/title"},confirmLabel:"Run in the background",secondaryLabel:{$ref:"#/state/cancelLabel"},cancelLabel:"",size:"sm"},attributes:{part:"progress"},onconfirm:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/background"},value:[]}]},onsecondary:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/cancel"},value:[]}]},oncancel:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/background"},value:[]}]},onclose:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/closed"},value:[]}]},style:{$description:"What is left once `jx-dialog` has drawn the dialog. `.progress-modal` is gone rather than moved — it positioned a fixed box, painted its panel, border, radius and shadow, capped its height and then lifted itself above the scrim it rendered beside — and a modal `<dialog>` in the top layer is every one of those. `.progress-title` went the same way: the operation's name is the dialog's headline, which is also its accessible name, so nothing here draws a title.",'& [part="row"]':{display:"flex",alignItems:"center",gap:"var(--jx-space-4)"},'& [part="status"]':{$description:"`anywhere`, because a status line is usually a path or a package spec with no space in it, and one of those would otherwise be the thing that decides how wide the dialog is. `min-width: 0` is what lets it wrap at all: a flex item's automatic minimum is its content, so without this the row refuses to shrink and the text overflows instead.",minWidth:"0",color:"var(--fg-dim)",fontSize:"var(--jx-text-md)",overflowWrap:"anywhere"}},children:[{tagName:"div",attributes:{part:"row"},children:[{tagName:"jx-spinner",attributes:{part:"busy"},$props:{size:"lg"}},{tagName:"span",attributes:{part:"status","aria-live":"polite"},textContent:"${state.status}"}]}]};T("progress-modal",S);function k(t){let e=document.createElement("div");e.style.pointerEvents="auto",e.setAttribute(Ue,ft("modal","progress")),t.layer.append(e);let i=!1,a=()=>i,l=g({background:()=>{t.onBackground()},cancel:()=>{t.onCancel()},cancelLabel:t.cancellable?"Cancel":"",closed:()=>{t.onClosed()},status:t.status,title:t.title}),o=null,r=R("progress-modal",l,e).then(async(n)=>{let s=n.root;if(a())return n.dispose(),s;if(o=n,await Yt(s),a())return s;return Ot(s),s});return{close(){if(i)return;i=!0;let n=o?.root;if(n instanceof HTMLElement)Nt(n);o?.dispose(),o=null,e.remove()},host:e,ready:r,setStatus(n){l.status=n}}}function el(t){let e=!1,i={title:t.title};if(t.status!==void 0)i.status=t.status;if(t.source!==void 0)i.source=t.source;if(t.cancel!==void 0)i.cancel=t.cancel;let a=Vs(i),l=()=>{if(e)return;e=!0,r.close()},o=()=>{l(),oh("activity")},r=k({cancellable:t.cancel!==void 0,layer:tt("modal"),onBackground:o,onCancel:()=>{l(),t.cancel?.()},onClosed:l,status:t.status??"",title:t.title});return{activity:a,done(){a.done(),l()},fail(n){let s=n.trim();if(s===""||s.includes(`
1
+ import{Vr}from"./studio-9rbe2xpw.js";import{Kt,zt}from"./studio-b2qpt0xy.js";import{ge,ne,g,ar,C}from"./studio-y60sts62.js";import{Si}from"./studio-ea74s8c1.js";import{Ve,wt,L,R,sn,dt}from"./studio-0w2dr0q8.js";import{ih}from"./studio-2r90cts3.js";import{bN}from"./studio-cw0wb9qk.js";import{Xn}from"./studio-86r8hp7r.js";import{zd,$a,tv}from"./studio-mx6wzh25.js";var y={$schema:"https://jxsuite.com/schema/v1",$id:"StudioPanelActivity",$description:'The Activity feed: one row per operation this session, newest last, drawn from the projection `panels/activity-panel.ts` hands in. A row is a glyph, a head line (what the operation is, who is running it, how long it has taken), the line it is doing now, the plan it declared, the log it captured and — only when the operation handed a callback over — its Cancel. Every conditional the row has is a boolean field on the projected item, because `$switch` over a value is the only conditional a document has and "is this entry cancellable" is a question the panel has already answered. Nothing here reads the activity store: the panel owns what an operation IS, and the surface owns what it looks like.',tagName:"div",attributes:{part:"panel"},style:{$description:"What `.activity-panel`, `.activity-actions`, `.activity-list`, `.activity-row`, `.activity-icon`, `.activity-body`, `.activity-head`, `.activity-title`, `.activity-source`, `.activity-duration`, `.activity-status`, `.activity-steps`, `.activity-step`, `.activity-step-icon`, `.activity-log-toggle` and `.activity-log` said in `styles/panels.css`, keyed on `part`. Two rules were DELETED rather than moved: `.activity-clear` and `.activity-cancel` drew a small bordered button by hand, and `jx-button` is that button — so the sizes, the border, the hover fill and the disabled state are the kit's now. Three token names changed meaning on the way: `--spectrum-font-size-50`, `--spectrum-font-size-75` and `--spectrum-corner-radius-75` resolve only inside `<sp-theme>`, and this document is mounted into the Bottom dock's body where that element is not an ancestor — every one of them would silently have taken its px fallback. They are the kit's own scale here (`--jx-text-sm`, `--jx-text-md`, `--jx-radius-xs`), which is the step each of them was. The `.activity-*` rules stay in the stylesheet regardless: `publish/deploy-checklist.ts` still draws the checklist above this feed in that same vocabulary, and it is a lit template until it converts.",display:"flex",flexDirection:"column",gap:"8px",padding:"8px",minWidth:"0",fontFamily:"var(--jx-font-sans)",color:"var(--fg)",'& [part="feed"]':{display:"flex",flexDirection:"column",gap:"8px",minWidth:"0"},'& [part="actions"]':{display:"flex",justifyContent:"flex-end"},'& [part="list"]':{display:"flex",flexDirection:"column",gap:"4px",margin:"0",padding:"0",listStyle:"none"},'& [part="row"]':{$description:"The left border is the state, at 3px, which is the one thing that must be legible in a column of twenty rows without reading any of them. Its default is the dim foreground so a state nobody has a colour for still draws a border rather than a gap.",display:"flex",alignItems:"flex-start",gap:"8px",padding:"6px 8px",border:"1px solid var(--border)",borderLeft:"3px solid var(--fg-dim)",borderRadius:"var(--radius)",background:"var(--bg-panel)",color:"var(--fg)",fontSize:"var(--jx-text-md)"},'& [part="row"][data-state="running"]':{borderLeftColor:"var(--accent)"},'& [part="row"][data-state="done"]':{borderLeftColor:"var(--success)"},'& [part="row"][data-state="failed"]':{borderLeftColor:"var(--danger)"},'& [part="row"][data-state="cancelled"]':{borderLeftColor:"var(--fg-dim)"},'& [part="icon"]':{flex:"none",width:"14px",textAlign:"center",fontWeight:"700",lineHeight:"1.5"},'& [part="row"][data-state="running"] [part="icon"]':{color:"var(--accent)"},'& [part="row"][data-state="done"] [part="icon"]':{color:"var(--success)"},'& [part="row"][data-state="failed"] [part="icon"]':{color:"var(--danger)"},'& [part="body"]':{flex:"1",minWidth:"0",display:"flex",flexDirection:"column",gap:"2px"},'& [part="head"]':{display:"flex",alignItems:"baseline",gap:"8px",minWidth:"0"},'& [part="row-title"]':{fontWeight:"700",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},'& [part="source"], & [part="duration"]':{flex:"none",color:"var(--fg-dim)",fontSize:"var(--jx-text-sm)"},'& [part="duration"]':{$description:"Pushed to the far edge so a column of rows reads as a column of times.",marginLeft:"auto"},'& [part="status"]':{color:"var(--fg-dim)",overflowWrap:"anywhere"},'& [part="steps"]':{$description:'The plan, declared up front, so "which of the three steps is this on" is answered by looking rather than by reading the status line and remembering what came before it.',display:"flex",flexDirection:"column",gap:"1px",margin:"2px 0 0",padding:"0",listStyle:"none",fontSize:"var(--jx-text-sm)"},'& [part="step"]':{display:"flex",gap:"6px",color:"var(--fg-dim)"},'& [part="step"][data-state="running"]':{color:"var(--fg)"},'& [part="step"][data-state="done"] [part="step-icon"]':{color:"var(--success)"},'& [part="step"][data-state="failed"] [part="step-icon"]':{color:"var(--danger)"},'& [part="step-icon"]':{flex:"none",width:"10px",textAlign:"center"},'& [part="log-toggle"]':{$description:"A plain button rather than a kit one, and the one element here that is not the kit's. The control has to carry `aria-expanded` on the node the reader actually focuses, and a `jx-button` forwards a fixed set of ARIA properties to the control inside its shadow root — an attribute written on the host would name the wrapper and not the button. Its wording is the disclosure's whole state (`docs/studio/interface/problems-and-progress.md` calls it the Show log disclosure), so nothing else has to draw one.",alignSelf:"flex-start",padding:"0",border:"none",background:"none",color:"var(--accent)",font:"inherit",fontSize:"var(--jx-text-sm)",cursor:"pointer",":hover":{textDecoration:"underline"},":focus-visible":{outline:"var(--jx-focus-ring)",outlineOffset:"2px"}},'& [part="log"]':{$description:"The captured output the progress modal used to show once and then lose. It scrolls inside the row rather than growing it, so one 400-line `bun install` failure does not become the whole panel. It is selectable against the root's `user-select: none`, the one part of an activity row that is: the output is what a reader pastes into a bug report, and the row offers no copy action.",userSelect:"text",maxHeight:"180px",margin:"2px 0 0",padding:"6px",overflow:"auto",borderRadius:"var(--jx-radius-xs)",background:"var(--bg)",color:"var(--fg-dim)",fontFamily:"var(--font-mono)",fontSize:"var(--jx-text-sm)",whiteSpace:"pre-wrap"},'& [part="cancel"]':{flex:"none"},'& [part="empty"]':{$description:"The teaching empty state, drawn here rather than borrowed from `panels/empty-state.ts`: that helper is a lit template and a document cannot call one. What it says is what is kept — one sentence saying what the region is FOR, then where its content comes from — and this region's fill is an operation somebody else starts, so it offers no button.",display:"flex",flexDirection:"column",alignItems:"center",gap:"8px",padding:"24px",textAlign:"center",fontSize:"13px",color:"var(--fg-dim)"},'& [part="empty-message"], & [part="empty-detail"]':{margin:"0",maxWidth:"34ch",lineHeight:"1.5"},'& [part="empty-detail"]':{fontSize:"var(--jx-text-sm)",opacity:"0.8"}},children:[{tagName:"div",attributes:{part:"feed-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/hasRows"},cases:{true:{tagName:"div",attributes:{part:"feed"},children:[{tagName:"div",attributes:{part:"actions-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/hasFinished"},cases:{true:{tagName:"div",attributes:{part:"actions"},children:[{tagName:"jx-button",$props:{size:"sm",quiet:!0},attributes:{part:"clear"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/clearFinished"}}]},children:[{tagName:"span",textContent:"${state.clearLabel}"}]}]}}},{tagName:"ul",attributes:{part:"list"},children:[{$prototype:"Array",items:{$ref:"#/state/rows"},key:{$ref:"$map/item/id"},map:{tagName:"li",attributes:{part:"row","data-state":"${$map.item.state}"},children:[{tagName:"span",attributes:{part:"icon","aria-hidden":"true"},textContent:"${$map.item.icon}"},{tagName:"div",attributes:{part:"body"},children:[{tagName:"div",attributes:{part:"head"},children:[{tagName:"span",attributes:{part:"row-title"},textContent:"${$map.item.title}"},{tagName:"span",attributes:{part:"source-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"$map/item/hasSource"},cases:{true:{tagName:"span",attributes:{part:"source"},textContent:"${$map.item.source}"}}},{tagName:"span",attributes:{part:"duration"},textContent:"${$map.item.duration}"}]},{tagName:"div",attributes:{part:"status-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"$map/item/hasStatus"},cases:{true:{tagName:"div",attributes:{part:"status"},textContent:"${$map.item.status}"}}},{tagName:"div",attributes:{part:"steps-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"$map/item/hasSteps"},cases:{true:{tagName:"ol",attributes:{part:"steps"},children:[{$prototype:"Array",items:{$ref:"$map/item/steps"},key:{$ref:"$map/item/key"},map:{tagName:"li",attributes:{part:"step","data-state":"${$map.item.state}"},children:[{tagName:"span",attributes:{part:"step-icon","aria-hidden":"true"},textContent:"${$map.item.icon}"},{tagName:"span",attributes:{part:"step-label"},textContent:"${$map.item.label}"}]}}]}}},{tagName:"div",attributes:{part:"log-toggle-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"$map/item/hasLog"},cases:{true:{tagName:"button",attributes:{part:"log-toggle",type:"button","aria-expanded":"${$map.item.expanded ? 'true' : 'false'}"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/toggleLog"},value:[{$ref:"$map/item/id"}]}]},textContent:"${$map.item.logLabel}"}}},{tagName:"div",attributes:{part:"log-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"$map/item/showLog"},cases:{true:{tagName:"pre",attributes:{part:"log"},textContent:"${$map.item.logText}"}}}]},{tagName:"div",attributes:{part:"cancel-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"$map/item/cancellable"},cases:{true:{tagName:"jx-button",$props:{size:"sm"},attributes:{part:"cancel",title:"Stop this operation"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/cancel"},value:[{$ref:"$map/item/id"}]}]},children:[{tagName:"span",textContent:"Cancel"}]}}}]}}]}]},false:{tagName:"div",attributes:{part:"empty"},children:[{tagName:"p",attributes:{part:"empty-message"},textContent:"Long operations show their progress, their log and their Cancel button here."},{tagName:"p",attributes:{part:"empty-detail"},textContent:"Installs, clones, publishes and imports report here while they run."}]}}}]};L("panel-activity",y);var h=null,u=null,d=null,c=null;function T(t,e){t.rows=e.rows,t.hasRows=e.hasRows,t.hasFinished=e.hasFinished,t.clearLabel=e.clearLabel}function E(t){if(h!==t)return!1;return c===null?d!==null:c.root.parentNode===t}function v(t,e){if(E(t))return;f(),h=t;let i=g({cancel:e.cancel,clearFinished:e.clearFinished,clearLabel:"",hasFinished:!1,hasRows:!1,rows:[],toggleLog:e.toggleLog});u=ge(),u.run(()=>{ne(()=>{T(i,e.project())})});let a=R("panel-activity",i,t);d=a,a.then((l)=>{if(d===a)c=l;else l.dispose()})}function f(){u?.stop(),u=null;let t=d;if(d=null,c)c.dispose(),c=null;else if(t)t.then((e)=>e.dispose());h=null}var cs=g([]),j=20,p=new Map,b=0;function I(){return b+=1,`a${b}`}function Ac(t){return t.state!=="running"}function w(){let t=cs.filter((e)=>Ac(e)).length-j;while(t>0){let e=cs.findIndex((i)=>Ac(i));if(e===-1)return;p.delete(cs[e].id),cs.splice(e,1),t-=1}}function Us(t){let e={cancellable:t.cancel!==void 0,endedAt:null,expanded:!1,id:I(),log:[],startedAt:ar(),state:"running",status:t.status??"",steps:(t.steps??[]).map((o)=>({label:o,state:"pending"})),title:t.title},i=t.source===void 0?e:{...e,source:t.source};if(t.cancel)p.set(i.id,t.cancel);cs.push(i);let a=cs.at(-1);w();let l=(o,r)=>{if(Ac(a))return;if(a.state=o,a.endedAt=ar(),r!==void 0)a.status=r;for(let n of a.steps)n.state=n.state==="done"?"done":o==="done"?"done":"failed";a.cancellable=!1,p.delete(a.id),w()};return{done(o){l("done",o)},entry:a,fail(o,r={}){if(Ac(a))return;let n=a.log.join(`
2
+ `);l("failed",o);let s={source:a.source??a.title};if(n!=="")s.detail=n;if(r.action!==void 0)s.action=r.action;if(r.actionArgs!==void 0)s.actionArgs=r.actionArgs;if(r.path!==void 0)s.path=r.path;C.error(o,s)},id:a.id,log(o){let r=o.replace(/\s+$/,"");if(r!=="")a.log.push(r)},setStatus(o){if(!Ac(a))a.status=o},step(o){let r=a.steps.findIndex((n)=>n.label===o);if(r===-1)a.steps.push({label:o,state:"pending"}),r=a.steps.length-1;for(let[n,s]of a.steps.entries())s.state=n<r?"done":n===r?"running":s.state;a.status=o}}}function x(t){return cs.find((e)=>e.id===t)}function m(){return cs.filter((t)=>!Ac(t))}function H(t){let e=x(t),i=p.get(t);if(!e||!i||Ac(e))return!1;return i(),p.delete(t),e.state="cancelled",e.endedAt=ar(),e.cancellable=!1,e.status="Cancelled",!0}function F(){let t=cs.filter((i)=>!Ac(i)),e=cs.length-t.length;return cs.splice(0,cs.length,...t),e}function uN(){return m().map((t)=>`activity: ${t.title} — ${t.status||"running"}`)}var P={cancelled:"⊘",done:"✓",failed:"✕",running:"⋯"},M={done:"✓",failed:"✕",pending:"·",running:"⋯"};function V(t,e=ar()){let i=Math.max(0,(t.endedAt??e)-t.startedAt);if(i<1000)return`${i}ms`;let a=Math.round(i/1000);return a<60?`${a}s`:`${Math.floor(a/60)}m ${a%60}s`}function O(t,e){return{icon:M[t.state],key:`${e}:${t.label}`,label:t.label,state:t.state}}function GT(t){let e=t.log.length;return{cancellable:t.cancellable,duration:V(t),expanded:t.expanded,hasLog:e>0,hasSource:(t.source??"")!=="",hasStatus:t.status!=="",hasSteps:t.steps.length>0,icon:P[t.state],id:t.id,logLabel:t.expanded?"Hide log":`Show log (${e} line(s))`,logText:t.log.join(`
3
+ `),showLog:t.expanded&&e>0,source:t.source??"",state:t.state,status:t.status,steps:t.steps.map((i,a)=>O(i,a)),title:t.title}}function z(){let t=cs.filter((e)=>Ac(e)).length;return{clearLabel:`Clear ${t} finished`,hasFinished:t>0,hasRows:cs.length>0,rows:cs.map((e)=>GT(e))}}var D={cancel:(t)=>{H(t)},clearFinished:()=>{F()},project:z,toggleLog:(t)=>{let e=x(t);if(e)e.expanded=!e.expanded}};function _(){return Vr`<div data-deploy-checklist></div>
4
+ <div data-activity-surface></div>`}function U(t){let e=t.querySelector("[data-activity-surface]");if(!e){f();return}v(e,D)}function hN(){Xn({id:"activity",title:"Activity",level:"project",dock:"bottom",icon:"clock-counter-clockwise",rail:!1,badge:()=>m().length>0?m().length:null,render:()=>_(),afterRender:(t,e)=>{bN(e),U(e)}})}var W={message:"no media file to look for",status:"failed"};function A(t){let e=Si(t);return e===""?null:{path:e}}function Ow(t){let e=A(t);return e===null?null:zd(e)}async function qu(t){let e=A(t);return e===null?W:$a(e)}function pN(t){if(t===null)return"Counting references…";switch(t.status){case"unsupported":return null;case"pending":return"Counting references…";case"failed":return"Usage unknown";default:return tv(t.result)}}var S={$schema:"https://jxsuite.com/schema/v1",$id:"StudioProgressModal",$description:"The one surface in Studio that blocks while it works: the operation's name, a spinner, the line under it, and the two ways out. A `jx-dialog`, so the platform owns modality, the backdrop, focus restoration and Escape — which is what retired the `sp-underlay` this surface used to paint beside itself, and with it the fixed box, the panel, the shadow and the `z-index: 1000` that box needed to climb back out from under its own scrim. The two answers are the dialog's own: confirm is `Run in the background`, which stops the BLOCKING and leaves the work running in Activity, and the secondary answer is Cancel, drawn only when the operation handed one over. It is the secondary rather than the cancel answer for a reason that is behavioural, not cosmetic: the platform raises one `cancel` for Escape, for a light dismissal and for the cancel button alike, and a surface that cannot tell them apart would stop a dependency install on a keystroke. Escape therefore means what confirm means — stop blocking, not stop working — and the answer that stops the work is a button and only a button.",tagName:"jx-dialog",$props:{headline:{$ref:"#/state/title"},confirmLabel:"Run in the background",secondaryLabel:{$ref:"#/state/cancelLabel"},cancelLabel:"",size:"sm"},attributes:{part:"progress"},onconfirm:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/background"},value:[]}]},onsecondary:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/cancel"},value:[]}]},oncancel:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/background"},value:[]}]},onclose:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/closed"},value:[]}]},style:{$description:"What is left once `jx-dialog` has drawn the dialog. `.progress-modal` is gone rather than moved — it positioned a fixed box, painted its panel, border, radius and shadow, capped its height and then lifted itself above the scrim it rendered beside — and a modal `<dialog>` in the top layer is every one of those. `.progress-title` went the same way: the operation's name is the dialog's headline, which is also its accessible name, so nothing here draws a title.",'& [part="row"]':{display:"flex",alignItems:"center",gap:"var(--jx-space-4)"},'& [part="status"]':{$description:"`anywhere`, because a status line is usually a path or a package spec with no space in it, and one of those would otherwise be the thing that decides how wide the dialog is. `min-width: 0` is what lets it wrap at all: a flex item's automatic minimum is its content, so without this the row refuses to shrink and the text overflows instead.",minWidth:"0",color:"var(--fg-dim)",fontSize:"var(--jx-text-md)",overflowWrap:"anywhere"}},children:[{tagName:"div",attributes:{part:"row"},children:[{tagName:"jx-spinner",attributes:{part:"busy"},$props:{size:"lg"}},{tagName:"span",attributes:{part:"status","aria-live":"polite"},textContent:"${state.status}"}]}]};L("progress-modal",S);function k(t){let e=document.createElement("div");e.style.pointerEvents="auto",e.setAttribute(Ve,wt("modal","progress")),t.layer.append(e);let i=!1,a=()=>i,l=g({background:()=>{t.onBackground()},cancel:()=>{t.onCancel()},cancelLabel:t.cancellable?"Cancel":"",closed:()=>{t.onClosed()},status:t.status,title:t.title}),o=null,r=R("progress-modal",l,e).then(async(n)=>{let s=n.root;if(a())return n.dispose(),s;if(o=n,await sn(s),a())return s;return Kt(s),s});return{close(){if(i)return;i=!0;let n=o?.root;if(n instanceof HTMLElement)zt(n);o?.dispose(),o=null,e.remove()},host:e,ready:r,setStatus(n){l.status=n}}}function il(t){let e=!1,i={title:t.title};if(t.status!==void 0)i.status=t.status;if(t.source!==void 0)i.source=t.source;if(t.cancel!==void 0)i.cancel=t.cancel;let a=Us(i),l=()=>{if(e)return;e=!0,r.close()},o=()=>{l(),ih("activity")},r=k({cancellable:t.cancel!==void 0,layer:dt("modal"),onBackground:o,onCancel:()=>{l(),t.cancel?.()},onClosed:l,status:t.status??"",title:t.title});return{activity:a,done(){a.done(),l()},fail(n){let s=n.trim();if(s===""||s.includes(`
5
5
  `))a.log(s),a.fail(`${t.title} failed`);else a.fail(s);l()},log(n){a.log(n)},setStatus(n){if(a.setStatus(n),!e)r.setStatus(n)}}}
6
- export{cs,Dc,Vs,sN,VT,aN,el,Ow,Gu,lN};
6
+ export{cs,Ac,Us,uN,GT,hN,il,Ow,qu,pN};
7
7
 
8
- //# debugId=FF46C19DFEAC5B9164756E2164756E21
9
- //# sourceMappingURL=studio-hy4ye0dx.js.map
8
+ //# debugId=46C42E8BDCA7162064756E2164756E21
9
+ //# sourceMappingURL=studio-0q5jwddh.js.map
@@ -1,5 +1,5 @@
1
- import{mt,io}from"./studio-ajw4k8hp.js";import{VA,fC,Ot,Nt,dh,YA,ae}from"./studio-cpkamjdn.js";import{ge,ne,g,Zd,C,Th}from"./studio-4kzbrr5t.js";import{te}from"./studio-psh8mwnw.js";import{n,Q}from"./studio-zkq3r91p.js";var Ue="data-jx-region",fe=["rail","navigator","inspector","pane","dock.bottom","statusbar","commandbar","overlay"],pe=new Set(["dock.bottom"]);function me(e){let t=e.indexOf("/"),o=t===-1?e:e.slice(0,t),r=t===-1?void 0:e.slice(t+1);if(r===""||o==="")return null;let s=o,i;if(!pe.has(o)){let c=o.indexOf(".");if(c!==-1){if(s=o.slice(0,c),i=o.slice(c+1),i==="")return null}}let l=fe.find((c)=>c===s);if(l===void 0)return null;return i===void 0?r===void 0?{surface:l}:{part:r,surface:l}:r===void 0?{instance:i,surface:l}:{instance:i,part:r,surface:l}}function ve(e){return me(e)!==null}function he(e){if(e==="pane")return"pane.primary";return e.startsWith("pane/")?`pane.primary/${e.slice(5)}`:e}function X(e){return e??document}var be=[{locate:([,e],t)=>{let r=Op(`inspector/field:${e}`,t)?.querySelector('[part="browse"]');return r?[r]:[]},pattern:/^inspector\/field:(.+)\/browse$/},{locate:([,e],t)=>{let o=Op("inspector",t);return o?[...o.querySelectorAll(`[data-prop="${CSS.escape(e)}"]`)]:[]},pattern:/^inspector\/field:(.+)$/}];function ye(e,t){let o=he(e);if(!ve(o))return[];let r=[...X(t).querySelectorAll(`[data-jx-region="${CSS.escape(o)}"]`)];if(r.length>0)return r;for(let s of be){let i=o.match(s.pattern);if(i)return s.locate(i,X(t))}return[]}function Op(e,t){return ye(e,t).at(-1)??null}var p$={dock:"dock.bottom",inspector:"inspector",navigator:"navigator",pane:"pane.primary",rail:"rail",status:"statusbar"};function wi(e,t){return t?`pane.${e}/${t}`:`pane.${e}`}function PA(e){return wi(e,"tabs")}function FA(e){return`navigator/panel:${e}`}function jA(e){return`inspector/tab:${e}`}var HA="navigator/statements";function BA(e){return`inspector/statements:${e}`}function mx(e){return`dock.bottom/panel:${e}`}var xe={dialog:"dialog",modal:"dialog",popover:"menu",toast:"toasts"};function ft(e,t){let o=xe[e];return t?`overlay.${o}:${t}`:`overlay.${o}`}var _=new Map,Z=1;function ee(e){let t=Z;return Z+=1,_.set(t,{...e,id:t}),t}function I(e){_.delete(e)}function oe(){return[..._.values()]}function OA(e){let t=e.toLowerCase();return oe().filter((o)=>o.elements.has(t))}function MA(e){return oe().filter((t)=>t.name===e)}var F=null;function h$(e=document){return F??=YA({document:e}),F}function re(){return F??h$()}var E="jx-studio:/surfaces/",M=new Map;function T(e,t){M.set(e,t),fC(Se(e),t)}function Se(e){return`${E}${e}.json`}function zA(e){return M.get(e)}function $e(e){if(!e.startsWith(E)||!e.endsWith(".json"))return;return M.get(e.slice(E.length,-5))}async function R(e,t,o,r={}){let s=M.get(e);if(!s)throw Error(`Studio surface "${e}" is not registered`);if(await re(),r.region)o.setAttribute(Ue,r.region);let i={scope:t,base:E,resolver:$e};if(r.onNodeCreated)i.onNodeCreated=r.onNodeCreated;if(r.onNodeMoved)i.onNodeMoved=r.onNodeMoved;if(r.signal)i.signal=r.signal;let l=await VA(s,o,i),c=(a)=>({dispose:a,elements:l.elements,root:l.root,scope:l.scope});if(r.signal?.aborted)return c(l.dispose);let d=0,p=()=>{l.dispose(),I(d)};return d=ee({elements:l.elements,host:o,name:e,remount:async()=>{p(),await R(e,t,o,r)}}),r.signal?.addEventListener("abort",()=>I(d),{once:!0}),c(p)}var ie={$schema:"https://jxsuite.com/schema/v1",$id:"StudioDialog",$description:"Studio's confirm, save-or-discard and prompt dialogs: one jx-dialog whose body is projected from the adapter's scope. `message` is a sentence; `choice` is a `jx-select` over the options; `field` is the prompt's jx-textfield with its refusal. The four answers call the host's functions, and the host decides when the dialog closes.",tagName:"jx-dialog",$props:{headline:{$ref:"#/state/headline"},confirmLabel:{$ref:"#/state/confirmLabel"},secondaryLabel:{$ref:"#/state/secondaryLabel"},cancelLabel:{$ref:"#/state/cancelLabel"},destructive:{$ref:"#/state/destructive"},size:{$ref:"#/state/size"}},attributes:{headline:"${state.headline}","confirm-label":"${state.confirmLabel || null}","secondary-label":"${state.secondaryLabel || null}","cancel-label":"${state.cancelLabel || null}",part:"dialog-host"},onconfirm:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/confirm"},value:[]}]},onsecondary:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/secondary"},value:[]}]},oncancel:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/cancel"},value:[]}]},onclose:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/closed"},value:[]}]},style:{'& [part="message"]':{$description:"The one part of a dialog that is text rather than interface, so it opts back in to selection. The root sets `user-select: none` and `styles/tokens.json` restates it on every `dialog`, so the headline, the labels and the buttons around this sentence stay unselectable; a message is often the thing a reader copies into a search or a bug report.",margin:"0 0 var(--jx-space-3)",userSelect:"text"},'& [part="message"]:last-child':{margin:"0"},'& [part="island"] > p, & [part="island"] > span, & [part="island"] > strong, & [part="island"] > em, & [part="island"] > code':{$description:"The island's own prose is the message's other form — a body richer than a sentence, written straight into the island from a lit template (studio-ui-guidelines.md §9.4) — so it is selectable for the same reason `[part=\"message\"]` is. The opt-in stops at those children because the island is ALSO the mount point for a whole document: the Open Grid picker and Push Schema's plan put their surfaces here, and `user-select` inherits, so a rule on the island itself would hand selection to every heading, source row and button they draw, which is the interface the policy exists to keep unselectable. A mounted surface roots a `div`; a message writes paragraphs and text-level spans, so the two forms are told apart by the child that arrives.",userSelect:"text"},'& [part="island"]:empty':{display:"none"},'& [part="message-slot"], & [part="choice-slot"], & [part="field-slot"]':{display:"contents"},'& [part="choice-row"]':{display:"flex",flexDirection:"column",gap:"var(--jx-space-1)",margin:"0 0 var(--jx-space-3)"},'& [part="choice-label"]':{fontSize:"var(--jx-text-sm)",color:"var(--jx-fg-dim)"},"& jx-textfield":{width:"100%"}},children:[{tagName:"div",attributes:{part:"message-slot",role:"none"},$switch:{$ref:"#/state/hasMessage"},cases:{true:{tagName:"p",attributes:{part:"message"},textContent:"${state.message}"}}},{tagName:"div",attributes:{part:"island"}},{tagName:"div",attributes:{part:"choice-slot",role:"none"},$switch:{$ref:"#/state/hasChoice"},cases:{true:{tagName:"div",attributes:{part:"choice-row"},children:[{tagName:"span",attributes:{part:"choice-label"},textContent:"${state.choiceLabel}"},{tagName:"jx-select",$props:{label:{$ref:"#/state/choiceLabel"},options:{$ref:"#/state/options"},value:{$ref:"#/state/chosen"}},attributes:{part:"choice"},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/pick"},value:[{$ref:"event#/target/value"}]}]}}]}}},{tagName:"div",attributes:{part:"field-slot",role:"none"},$switch:{$ref:"#/state/hasField"},cases:{true:{tagName:"jx-textfield",$props:{label:{$ref:"#/state/headline"},value:{$ref:"#/state/value"},placeholder:{$ref:"#/state/placeholder"},invalid:{$ref:"#/state/invalid"},error:{$ref:"#/state/error"},multiline:{$ref:"#/state/multiline"},rows:{$ref:"#/state/rows"},mono:{$ref:"#/state/mono"}},attributes:{part:"field"},oninput:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/input"},value:[{$ref:"event#/target/value"}]}]},onkeydown:{$prototype:"Function",body:[{$switch:{$ref:"#/state/singleLine"},cases:{true:[{$switch:{$ref:"event#/key"},cases:{Enter:[{preventDefault:!0},{operator:"call",target:{$ref:"#/state/confirm"},value:[]}]}}]}}]},$description:"The prompt's one field. `multiline` is what makes it a paste box rather than a line: an import the author copied out of a `_redirects` file is column-aligned, so it also asks for `mono`. A multiline field takes Enter as a newline, which is why the Enter-confirms handler below is guarded on it — a paste box whose second line submits the dialog cannot be typed into."}}}]};T("dialog",ie);function Yt(e){if(e.querySelector('[part="dialog"]'))return Promise.resolve(e);return new Promise((t)=>{e.addEventListener("jx-ready",function o(r){if(r.target!==e&&!e.querySelector('[part="dialog"]'))return;e.removeEventListener("jx-ready",o),t(e)})})}function Ys(e){let t=document.createElement("div");t.style.pointerEvents="auto",t.setAttribute(Ue,ft("dialog",e.region)),e.layer.append(t);let o=g({cancel:()=>{e.onCancel()},cancelLabel:e.cancelLabel,choiceLabel:e.choice?.label??"",chosen:e.choice?.chosen??"",closed:()=>{e.onClosed()},confirm:()=>{e.onConfirm()},confirmLabel:e.confirmLabel,destructive:e.destructive===!0,error:"",hasChoice:e.choice!==void 0,hasField:e.field!==void 0,mono:e.field?.mono===!0,multiline:e.field?.multiline===!0,rows:e.field?.rows??"3",singleLine:e.field!==void 0&&e.field.multiline!==!0?"true":"false",hasMessage:e.message!==void 0&&e.message!=="",headline:e.headline,input:(a)=>{o.value=a,e.onInput?.(a)},invalid:!1,message:e.message??"",options:e.choice?.options??[],pick:(a)=>{e.onPick?.(a)},placeholder:e.field?.placeholder??"",secondary:()=>{e.onSecondary?.()},secondaryLabel:e.secondaryLabel??"",size:e.size??"sm",value:e.field?.value??""}),r=null,s=!1,i=()=>s,l=()=>{},c=new Promise((a)=>{l=a}),p=R("dialog",o,t).then(async(a)=>{let u=a.root;if(i())return a.dispose(),u;if(r=a,await Promise.race([Yt(u),c]),i())return u;if(e.island?.(u.querySelector('[part="island"]')??u),Ot(u),e.field){let x=u.querySelector("jx-textfield");if(x)setTimeout(()=>{if(!s)dh(x,e.field?.select??"all")},0)}return u});return{close(){if(s)return;s=!0,l();let a=r?.root;if(a instanceof HTMLElement)Nt(a);r?.dispose(),r=null,t.remove()},host:t,ready:p,update(a){if(a.confirmLabel!==void 0)o.confirmLabel=a.confirmLabel;if(a.cancelLabel!==void 0)o.cancelLabel=a.cancelLabel;if(a.secondaryLabel!==void 0)o.secondaryLabel=a.secondaryLabel;if(a.message!==void 0)o.message=a.message,o.hasMessage=a.message!=="";if(a.value!==void 0)o.value=a.value;if(a.placeholder!==void 0)o.placeholder=a.placeholder;if(a.invalid!==void 0)o.invalid=a.invalid;if(a.error!==void 0)if(a.error!==""&&a.error===o.error){o.error="";let u=a.error;queueMicrotask(()=>{o.error=u})}else o.error=a.error;if(a.options!==void 0)o.options=a.options;if(a.chosen!==void 0)o.chosen=a.chosen}}}var se={$schema:"https://jxsuite.com/schema/v1",$id:"StudioToasts",$description:"The toast stack: a rendering of the notification service's toasts, newest last. Each row is projected by ui/layers.ts with its severity glyph and, where a recovery command exists, that command's title and gate; the two buttons call back into the host, which owns the records and their timers.",tagName:"div",attributes:{part:"stack"},style:{position:"absolute",right:"var(--jx-space-4)",bottom:"36px",display:"flex",flexDirection:"column",gap:"var(--jx-space-3)",alignItems:"flex-end",maxWidth:"min(420px, calc(100vw - 24px))",'& [part="toast"]':{display:"flex",alignItems:"center",gap:"var(--jx-space-3)",pointerEvents:"auto",padding:"var(--jx-space-3)",border:"1px solid var(--jx-border)",borderLeft:"3px solid var(--jx-fg-dim)",borderRadius:"var(--jx-radius-md)",background:"var(--jx-bg-panel)",color:"var(--jx-fg)",fontSize:"var(--jx-text-sm)",lineHeight:"var(--jx-leading-sm)",boxShadow:"var(--jx-shadow-popover)"},'& [part="toast"][data-severity="success"]':{borderLeftColor:"var(--jx-success)"},'& [part="toast"][data-severity="info"]':{borderLeftColor:"var(--jx-accent)"},'& [part="toast"][data-severity="warn"]':{borderLeftColor:"var(--jx-warning)"},'& [part="toast"][data-severity="error"]':{borderLeftColor:"var(--jx-danger)"},'& [part="icon"]':{flex:"none",width:"14px",textAlign:"center",fontWeight:"700"},'& [data-severity="success"] [part="icon"]':{color:"var(--jx-success)"},'& [data-severity="info"] [part="icon"]':{color:"var(--jx-accent)"},'& [data-severity="warn"] [part="icon"]':{color:"var(--jx-warning)"},'& [data-severity="error"] [part="icon"]':{color:"var(--jx-danger)"},'& [part="message"]':{flex:"1",minWidth:"0",overflow:"hidden",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:"3"},'& [part="action-slot"]':{display:"contents"},'& [part="action"] > [part="control"]':{color:"var(--jx-accent)"}},children:[{$prototype:"Array",items:{$ref:"#/state/toasts"},key:{$ref:"$map/item/id"},map:{tagName:"div",attributes:{part:"toast","data-severity":"${$map.item.severity}"},children:[{tagName:"span",attributes:{part:"icon","aria-hidden":"true"},textContent:"${$map.item.icon}"},{tagName:"span",attributes:{part:"message"},textContent:"${$map.item.message}"},{tagName:"span",attributes:{part:"action-slot",role:"none"},$switch:{$ref:"$map/item/hasAction"},cases:{true:{tagName:"jx-button",$props:{size:"sm",quiet:!0,disabled:{$ref:"$map/item/actionDisabled"}},attributes:{part:"action",title:"${$map.item.actionTitle}"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/runAction"},value:[{$ref:"$map/item/id"}]}]},children:[{tagName:"span",textContent:"${$map.item.actionLabel}"}]}}},{tagName:"jx-action-button",$props:{label:"Dismiss notification",hint:"Dismiss notification",icon:"x",size:"sm"},attributes:{part:"dismiss"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/dismissToast"},value:[{$ref:"$map/item/id"}]}]}}]}}]};function Te(e){return e instanceof RangeError||e instanceof Error&&e.name==="CommandUnavailableError"}function En(e,t,o,r=t){let s=(l)=>{if(!Te(l))console.error(`${r}: command "${t}" failed`,l);C.error(te(l),{key:`command.run:${t}`,source:r})},i;try{i=e.run(t,o)}catch(l){return s(l),Promise.resolve()}return Promise.resolve(i).catch(s)}function rt(e,t,o){let r=ae();return r?En(r,e,t,o):Promise.resolve()}var de=null,z=null,J=null,j=null;function tt(e){return(e==="popover"?de:e==="modal"?z:e==="toast"?j:J)??document.body}function f$(){de=document.querySelector("#layer-popover"),z=document.querySelector("#layer-modal"),J=document.querySelector("#layer-dialog"),j=document.querySelector("#layer-toast"),Ne()}var le="jx-dialog[data-open], dialog[open]";function qb(){return Boolean(J?.querySelector(le)||z?.querySelector(le))}function m$(){return document.querySelector(":popover-open")!==null}function qo(e,t,o={}){let{confirmLabel:r="Confirm",cancelLabel:s="Cancel",destructive:i=!1}=o;return new Promise((l)=>{let c=!1,d=(a)=>{if(c)return;c=!0,p.close(),l(a)},p=Ys({cancelLabel:s,confirmLabel:r,destructive:i,headline:e,layer:tt("dialog"),...U(t),onCancel:()=>d(!1),onClosed:()=>d(!1),onConfirm:()=>d(!0)})})}function pC(e,t,o={}){let{saveLabel:r="Save",discardLabel:s="Discard",cancelLabel:i="Cancel"}=o;return new Promise((l)=>{let c=!1,d=(a)=>{if(c)return;c=!0,p.close(),l(a)},p=Ys({cancelLabel:i,confirmLabel:r,headline:e,layer:tt("dialog"),...U(t),onCancel:()=>d("cancel"),onClosed:()=>d("cancel"),onConfirm:()=>d("save"),onSecondary:()=>d("discard"),secondaryLabel:s})})}function U(e){if(n(e))return{message:e};return{island:(t)=>{io(e,t)}}}function xi(e,t={}){let{cancelLabel:o="Cancel",choice:r,confirmLabel:s="OK",message:i,mono:l=!1,multiline:c=!1,placeholder:d="",rows:p="3",select:a="all",size:u,validate:x,value:ue=""}=t,P=(v)=>x?x(v,L):v.trim()?"":"Enter a value.",h=ue,L=r?.initial??"",m="",V=!1,W=()=>Q(d)?d():d,K=()=>r?r.options().map((v)=>({label:v.label,value:v.value})):[];return new Promise((v)=>{let B=!1,D=(f)=>{if(B)return;B=!0,k.close(),v(f)},Y=(f)=>{m=f,k.update({error:m,invalid:m!==""})},S={cancelLabel:o,confirmLabel:s,headline:e,layer:tt("dialog"),onCancel:()=>D(null),onClosed:()=>D(null),onConfirm:()=>{let f=P(h);if(f){Y(f);return}D(h.trim())},onInput:(f)=>{V=!0,h=f;let w=P(h);if(w!==m)Y(w)},onPick:(f)=>{L=f,r?.onChange?.(f);let w=P(h);m=V||m?w:"",k.update({chosen:L,error:m,invalid:m!=="",options:K(),placeholder:W()})}};if(i!==void 0)Object.assign(S,U(i));if(r)S.choice={chosen:L,label:r.label,options:K()};if(S.field={mono:l,multiline:c,placeholder:W(),rows:p,select:a,value:h},u!==void 0)S.size=u;let k=Ys(S)})}var N=new Map;function Zs(e,t){let o=`${e}:${t}`,r=N.get(o);if(r&&r.parentElement)return r;return r=document.createElement("div"),r.style.pointerEvents="auto",r.setAttribute(Ue,ft(e,t)),tt(e).append(r),N.set(o,r),r}function Gb(e,t){let o=`${e}:${t}`,r=N.get(o);if(r)io(mt,r),r.remove(),N.delete(o)}var we=180,Ee={error:"✕",info:"ℹ",success:"✓",warn:"!"},A=null,y=new Map,b=new Set;function Me(){if(!("matchMedia"in globalThis))return!1;return globalThis.matchMedia("(prefers-reduced-motion: reduce)").matches===!0}function Oe(){try{return new URLSearchParams(globalThis.location.search).get("automation")==="1"}catch{return!1}}function g$(){return[...b].map((e)=>`overlay: toast ${e} settling in`)}function q(e){let t=y.get(e);if(t!==void 0)clearTimeout(t),y.delete(e);b.delete(e),Th(e)}function Ce(e){if(y.has(e.id)||b.has(e.id))return;let t=Me()?0:we;if(t>0)b.add(e.id),setTimeout(()=>b.delete(e.id),t);let o=e.timeoutMs??0;if(o<=0||Oe())return;y.set(e.id,setTimeout(()=>q(e.id),o))}T("toasts",se);var G=null,H=null,O=null;function ce(){return G??=g({dismissToast:(e)=>{q(e)},runAction:(e)=>{let t=Zd.find((r)=>r.id===e),o=ae();if(!t?.action||!o)return;q(e),En(o,t.action,t.actionArgs,"Notifications")},toasts:[]}),G}function je(e){let t=e.action===void 0?null:ae(),o=e.action,r=t&&o!==void 0?t.get(o):void 0,s=r&&o!==void 0&&t.isVisible(o)?r:null,i=s&&o!==void 0?t.disabledReason(o):void 0;return{actionDisabled:i!==void 0,actionLabel:s?.title??"",actionTitle:s===null?"":i===void 0?s.title:`${s.title} — requires ${i}`,hasAction:s!==null,icon:Ee[e.severity],id:e.id,message:e.message,severity:e.severity}}function Ne(){if(Ae(),!j)return;A=ge(),A.run(()=>{ne(()=>{Zd.length,ae();for(let e of Zd)Ce(e);ce().toasts=Zd.map((e)=>je(e))})}),H=R("toasts",ce(),j),H.then((e)=>{O=e})}function Ae(){A?.stop(),A=null;for(let t of y.values())clearTimeout(t);y.clear(),b.clear();let e=H;if(H=null,O)O.dispose(),O=null;else if(e)e.then((t)=>t.dispose());G=null}
2
- export{OA,MA,h$,Ue,Op,p$,wi,PA,FA,jA,HA,BA,mx,ft,T,zA,R,Yt,Ys,En,rt,tt,f$,qb,m$,qo,pC,xi,Zs,Gb,g$};
1
+ import{ft,io}from"./studio-9rbe2xpw.js";import{QA,fC,Kt,zt,dh,rO,ae}from"./studio-b2qpt0xy.js";import{ge,ne,g,Xd,C,Lh}from"./studio-y60sts62.js";import{Q}from"./studio-nqxqf8p2.js";import{n,ee}from"./studio-8z66jk4z.js";var Ve="data-jx-region",fe=["rail","navigator","inspector","pane","dock.bottom","statusbar","commandbar","overlay"],pe=new Set(["dock.bottom"]);function me(e){let t=e.indexOf("/"),o=t===-1?e:e.slice(0,t),r=t===-1?void 0:e.slice(t+1);if(r===""||o==="")return null;let s=o,i;if(!pe.has(o)){let c=o.indexOf(".");if(c!==-1){if(s=o.slice(0,c),i=o.slice(c+1),i==="")return null}}let l=fe.find((c)=>c===s);if(l===void 0)return null;return i===void 0?r===void 0?{surface:l}:{part:r,surface:l}:r===void 0?{instance:i,surface:l}:{instance:i,part:r,surface:l}}function ve(e){return me(e)!==null}function he(e){if(e==="pane")return"pane.primary";return e.startsWith("pane/")?`pane.primary/${e.slice(5)}`:e}function X(e){return e??document}var be=[{locate:([,e],t)=>{let r=Mp(`inspector/field:${e}`,t)?.querySelector('[part="browse"]');return r?[r]:[]},pattern:/^inspector\/field:(.+)\/browse$/},{locate:([,e],t)=>{let o=Mp("inspector",t);return o?[...o.querySelectorAll(`[data-prop="${CSS.escape(e)}"]`)]:[]},pattern:/^inspector\/field:(.+)$/}];function ye(e,t){let o=he(e);if(!ve(o))return[];let r=[...X(t).querySelectorAll(`[data-jx-region="${CSS.escape(o)}"]`)];if(r.length>0)return r;for(let s of be){let i=o.match(s.pattern);if(i)return s.locate(i,X(t))}return[]}function Mp(e,t){return ye(e,t).at(-1)??null}var b$={dock:"dock.bottom",inspector:"inspector",navigator:"navigator",pane:"pane.primary",rail:"rail",status:"statusbar"};function Qn(e,t){return t?`pane.${e}/${t}`:`pane.${e}`}function qA(e){return Qn(e,"tabs")}function GA(e){return`navigator/panel:${e}`}function KA(e){return`inspector/tab:${e}`}var JA="navigator/statements";function YA(e){return`inspector/statements:${e}`}function mx(e){return`dock.bottom/panel:${e}`}var xe={dialog:"dialog",modal:"dialog",popover:"menu",toast:"toasts"};function wt(e,t){let o=xe[e];return t?`overlay.${o}:${t}`:`overlay.${o}`}var _=new Map,Z=1;function te(e){let t=Z;return Z+=1,_.set(t,{...e,id:t}),t}function I(e){_.delete(e)}function oe(){return[..._.values()]}function VA(e){let t=e.toLowerCase();return oe().filter((o)=>o.elements.has(t))}function UA(e){return oe().filter((t)=>t.name===e)}var F=null;function g$(e=document){return F??=rO({document:e}),F}function re(){return F??g$()}var E="jx-studio:/surfaces/",M=new Map;function L(e,t){M.set(e,t),fC(Se(e),t)}function Se(e){return`${E}${e}.json`}function ZA(e){return M.get(e)}function $e(e){if(!e.startsWith(E)||!e.endsWith(".json"))return;return M.get(e.slice(E.length,-5))}async function R(e,t,o,r={}){let s=M.get(e);if(!s)throw Error(`Studio surface "${e}" is not registered`);if(await re(),r.region)o.setAttribute(Ve,r.region);let i={scope:t,base:E,resolver:$e};if(r.onNodeCreated)i.onNodeCreated=r.onNodeCreated;if(r.onNodeMoved)i.onNodeMoved=r.onNodeMoved;if(r.signal)i.signal=r.signal;let l=await QA(s,o,i),c=(a)=>({dispose:a,elements:l.elements,root:l.root,scope:l.scope});if(r.signal?.aborted)return c(l.dispose);let d=0,p=()=>{l.dispose(),I(d)};return d=te({elements:l.elements,host:o,name:e,remount:async()=>{p(),await R(e,t,o,r)}}),r.signal?.addEventListener("abort",()=>I(d),{once:!0}),c(p)}var ie={$schema:"https://jxsuite.com/schema/v1",$id:"StudioDialog",$description:"Studio's confirm, save-or-discard and prompt dialogs: one jx-dialog whose body is projected from the adapter's scope. `message` is a sentence; `choice` is a `jx-select` over the options; `field` is the prompt's jx-textfield with its refusal. The four answers call the host's functions, and the host decides when the dialog closes.",tagName:"jx-dialog",$props:{headline:{$ref:"#/state/headline"},confirmLabel:{$ref:"#/state/confirmLabel"},secondaryLabel:{$ref:"#/state/secondaryLabel"},cancelLabel:{$ref:"#/state/cancelLabel"},destructive:{$ref:"#/state/destructive"},size:{$ref:"#/state/size"}},attributes:{headline:"${state.headline}","confirm-label":"${state.confirmLabel || null}","secondary-label":"${state.secondaryLabel || null}","cancel-label":"${state.cancelLabel || null}",part:"dialog-host"},onconfirm:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/confirm"},value:[]}]},onsecondary:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/secondary"},value:[]}]},oncancel:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/cancel"},value:[]}]},onclose:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/closed"},value:[]}]},style:{'& [part="message"]':{$description:"The one part of a dialog that is text rather than interface, so it opts back in to selection. The root sets `user-select: none` and `styles/tokens.json` restates it on every `dialog`, so the headline, the labels and the buttons around this sentence stay unselectable; a message is often the thing a reader copies into a search or a bug report.",margin:"0 0 var(--jx-space-3)",userSelect:"text"},'& [part="message"]:last-child':{margin:"0"},'& [part="island"] > p, & [part="island"] > span, & [part="island"] > strong, & [part="island"] > em, & [part="island"] > code':{$description:"The island's own prose is the message's other form — a body richer than a sentence, written straight into the island from a lit template (studio-ui-guidelines.md §9.4) — so it is selectable for the same reason `[part=\"message\"]` is. The opt-in stops at those children because the island is ALSO the mount point for a whole document: the Open Grid picker and Push Schema's plan put their surfaces here, and `user-select` inherits, so a rule on the island itself would hand selection to every heading, source row and button they draw, which is the interface the policy exists to keep unselectable. A mounted surface roots a `div`; a message writes paragraphs and text-level spans, so the two forms are told apart by the child that arrives.",userSelect:"text"},'& [part="island"]:empty':{display:"none"},'& [part="message-slot"], & [part="choice-slot"], & [part="field-slot"]':{display:"contents"},'& [part="choice-row"]':{display:"flex",flexDirection:"column",gap:"var(--jx-space-1)",margin:"0 0 var(--jx-space-3)"},'& [part="choice-label"]':{fontSize:"var(--jx-text-sm)",color:"var(--jx-fg-dim)"},"& jx-textfield":{width:"100%"}},children:[{tagName:"div",attributes:{part:"message-slot",role:"none"},$switch:{$ref:"#/state/hasMessage"},cases:{true:{tagName:"p",attributes:{part:"message"},textContent:"${state.message}"}}},{tagName:"div",attributes:{part:"island"}},{tagName:"div",attributes:{part:"choice-slot",role:"none"},$switch:{$ref:"#/state/hasChoice"},cases:{true:{tagName:"div",attributes:{part:"choice-row"},children:[{tagName:"span",attributes:{part:"choice-label"},textContent:"${state.choiceLabel}"},{tagName:"jx-select",$props:{label:{$ref:"#/state/choiceLabel"},options:{$ref:"#/state/options"},value:{$ref:"#/state/chosen"}},attributes:{part:"choice"},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/pick"},value:[{$ref:"event#/target/value"}]}]}}]}}},{tagName:"div",attributes:{part:"field-slot",role:"none"},$switch:{$ref:"#/state/hasField"},cases:{true:{tagName:"jx-textfield",$props:{label:{$ref:"#/state/headline"},value:{$ref:"#/state/value"},placeholder:{$ref:"#/state/placeholder"},invalid:{$ref:"#/state/invalid"},error:{$ref:"#/state/error"},multiline:{$ref:"#/state/multiline"},rows:{$ref:"#/state/rows"},mono:{$ref:"#/state/mono"}},attributes:{part:"field"},oninput:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/input"},value:[{$ref:"event#/target/value"}]}]},onkeydown:{$prototype:"Function",body:[{$switch:{$ref:"#/state/singleLine"},cases:{true:[{$switch:{$ref:"event#/key"},cases:{Enter:[{preventDefault:!0},{operator:"call",target:{$ref:"#/state/confirm"},value:[]}]}}]}}]},$description:"The prompt's one field. `multiline` is what makes it a paste box rather than a line: an import the author copied out of a `_redirects` file is column-aligned, so it also asks for `mono`. A multiline field takes Enter as a newline, which is why the Enter-confirms handler below is guarded on it — a paste box whose second line submits the dialog cannot be typed into."}}}]};L("dialog",ie);function sn(e){if(e.querySelector('[part="dialog"]'))return Promise.resolve(e);return new Promise((t)=>{e.addEventListener("jx-ready",function o(r){if(r.target!==e&&!e.querySelector('[part="dialog"]'))return;e.removeEventListener("jx-ready",o),t(e)})})}function Zs(e){let t=document.createElement("div");t.style.pointerEvents="auto",t.setAttribute(Ve,wt("dialog",e.region)),e.layer.append(t);let o=g({cancel:()=>{e.onCancel()},cancelLabel:e.cancelLabel,choiceLabel:e.choice?.label??"",chosen:e.choice?.chosen??"",closed:()=>{e.onClosed()},confirm:()=>{e.onConfirm()},confirmLabel:e.confirmLabel,destructive:e.destructive===!0,error:"",hasChoice:e.choice!==void 0,hasField:e.field!==void 0,mono:e.field?.mono===!0,multiline:e.field?.multiline===!0,rows:e.field?.rows??"3",singleLine:e.field!==void 0&&e.field.multiline!==!0?"true":"false",hasMessage:e.message!==void 0&&e.message!=="",headline:e.headline,input:(a)=>{o.value=a,e.onInput?.(a)},invalid:!1,message:e.message??"",options:e.choice?.options??[],pick:(a)=>{e.onPick?.(a)},placeholder:e.field?.placeholder??"",secondary:()=>{e.onSecondary?.()},secondaryLabel:e.secondaryLabel??"",size:e.size??"sm",value:e.field?.value??""}),r=null,s=!1,i=()=>s,l=()=>{},c=new Promise((a)=>{l=a}),p=R("dialog",o,t).then(async(a)=>{let u=a.root;if(i())return a.dispose(),u;if(r=a,await Promise.race([sn(u),c]),i())return u;if(e.island?.(u.querySelector('[part="island"]')??u),Kt(u),e.field){let x=u.querySelector("jx-textfield");if(x)setTimeout(()=>{if(!s)dh(x,e.field?.select??"all")},0)}return u});return{close(){if(s)return;s=!0,l();let a=r?.root;if(a instanceof HTMLElement)zt(a);r?.dispose(),r=null,t.remove()},host:t,ready:p,update(a){if(a.confirmLabel!==void 0)o.confirmLabel=a.confirmLabel;if(a.cancelLabel!==void 0)o.cancelLabel=a.cancelLabel;if(a.secondaryLabel!==void 0)o.secondaryLabel=a.secondaryLabel;if(a.message!==void 0)o.message=a.message,o.hasMessage=a.message!=="";if(a.value!==void 0)o.value=a.value;if(a.placeholder!==void 0)o.placeholder=a.placeholder;if(a.invalid!==void 0)o.invalid=a.invalid;if(a.error!==void 0)if(a.error!==""&&a.error===o.error){o.error="";let u=a.error;queueMicrotask(()=>{o.error=u})}else o.error=a.error;if(a.options!==void 0)o.options=a.options;if(a.chosen!==void 0)o.chosen=a.chosen}}}var se={$schema:"https://jxsuite.com/schema/v1",$id:"StudioToasts",$description:"The toast stack: a rendering of the notification service's toasts, newest last. Each row is projected by ui/layers.ts with its severity glyph and, where a recovery command exists, that command's title and gate; the two buttons call back into the host, which owns the records and their timers.",tagName:"div",attributes:{part:"stack"},style:{position:"absolute",right:"var(--jx-space-4)",bottom:"36px",display:"flex",flexDirection:"column",gap:"var(--jx-space-3)",alignItems:"flex-end",maxWidth:"min(420px, calc(100vw - 24px))",'& [part="toast"]':{display:"flex",alignItems:"center",gap:"var(--jx-space-3)",pointerEvents:"auto",padding:"var(--jx-space-3)",border:"1px solid var(--jx-border)",borderLeft:"3px solid var(--jx-fg-dim)",borderRadius:"var(--jx-radius-md)",background:"var(--jx-bg-panel)",color:"var(--jx-fg)",fontSize:"var(--jx-text-sm)",lineHeight:"var(--jx-leading-sm)",boxShadow:"var(--jx-shadow-popover)"},'& [part="toast"][data-severity="success"]':{borderLeftColor:"var(--jx-success)"},'& [part="toast"][data-severity="info"]':{borderLeftColor:"var(--jx-accent)"},'& [part="toast"][data-severity="warn"]':{borderLeftColor:"var(--jx-warning)"},'& [part="toast"][data-severity="error"]':{borderLeftColor:"var(--jx-danger)"},'& [part="icon"]':{flex:"none",width:"14px",textAlign:"center",fontWeight:"700"},'& [data-severity="success"] [part="icon"]':{color:"var(--jx-success)"},'& [data-severity="info"] [part="icon"]':{color:"var(--jx-accent)"},'& [data-severity="warn"] [part="icon"]':{color:"var(--jx-warning)"},'& [data-severity="error"] [part="icon"]':{color:"var(--jx-danger)"},'& [part="message"]':{flex:"1",minWidth:"0",overflow:"hidden",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:"3"},'& [part="action-slot"]':{display:"contents"},'& [part="action"] > [part="control"]':{color:"var(--jx-accent)"}},children:[{$prototype:"Array",items:{$ref:"#/state/toasts"},key:{$ref:"$map/item/id"},map:{tagName:"div",attributes:{part:"toast","data-severity":"${$map.item.severity}"},children:[{tagName:"span",attributes:{part:"icon","aria-hidden":"true"},textContent:"${$map.item.icon}"},{tagName:"span",attributes:{part:"message"},textContent:"${$map.item.message}"},{tagName:"span",attributes:{part:"action-slot",role:"none"},$switch:{$ref:"$map/item/hasAction"},cases:{true:{tagName:"jx-button",$props:{size:"sm",quiet:!0,disabled:{$ref:"$map/item/actionDisabled"}},attributes:{part:"action",title:"${$map.item.actionTitle}"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/runAction"},value:[{$ref:"$map/item/id"}]}]},children:[{tagName:"span",textContent:"${$map.item.actionLabel}"}]}}},{tagName:"jx-action-button",$props:{label:"Dismiss notification",hint:"Dismiss notification",icon:"x",size:"sm"},attributes:{part:"dismiss"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/dismissToast"},value:[{$ref:"$map/item/id"}]}]}}]}}]};function Te(e){return e instanceof RangeError||e instanceof Error&&e.name==="CommandUnavailableError"}function En(e,t,o,r=t){let s=(l)=>{if(!Te(l))console.error(`${r}: command "${t}" failed`,l);C.error(Q(l),{key:`command.run:${t}`,source:r})},i;try{i=e.run(t,o)}catch(l){return s(l),Promise.resolve()}return Promise.resolve(i).catch(s)}function nt(e,t,o){let r=ae();return r?En(r,e,t,o):Promise.resolve()}var de=null,z=null,J=null,j=null;function dt(e){return(e==="popover"?de:e==="modal"?z:e==="toast"?j:J)??document.body}function v$(){de=document.querySelector("#layer-popover"),z=document.querySelector("#layer-modal"),J=document.querySelector("#layer-dialog"),j=document.querySelector("#layer-toast"),Ne()}var le="jx-dialog[data-open], dialog[open]";function Kb(){return Boolean(J?.querySelector(le)||z?.querySelector(le))}function y$(){return document.querySelector(":popover-open")!==null}function qo(e,t,o={}){let{confirmLabel:r="Confirm",cancelLabel:s="Cancel",destructive:i=!1}=o;return new Promise((l)=>{let c=!1,d=(a)=>{if(c)return;c=!0,p.close(),l(a)},p=Zs({cancelLabel:s,confirmLabel:r,destructive:i,headline:e,layer:dt("dialog"),...U(t),onCancel:()=>d(!1),onClosed:()=>d(!1),onConfirm:()=>d(!0)})})}function pC(e,t,o={}){let{saveLabel:r="Save",discardLabel:s="Discard",cancelLabel:i="Cancel"}=o;return new Promise((l)=>{let c=!1,d=(a)=>{if(c)return;c=!0,p.close(),l(a)},p=Zs({cancelLabel:i,confirmLabel:r,headline:e,layer:dt("dialog"),...U(t),onCancel:()=>d("cancel"),onClosed:()=>d("cancel"),onConfirm:()=>d("save"),onSecondary:()=>d("discard"),secondaryLabel:s})})}function U(e){if(n(e))return{message:e};return{island:(t)=>{io(e,t)}}}function ei(e,t={}){let{cancelLabel:o="Cancel",choice:r,confirmLabel:s="OK",message:i,mono:l=!1,multiline:c=!1,placeholder:d="",rows:p="3",select:a="all",size:u,validate:x,value:ue=""}=t,P=(v)=>x?x(v,T):v.trim()?"":"Enter a value.",h=ue,T=r?.initial??"",m="",V=!1,W=()=>ee(d)?d():d,K=()=>r?r.options().map((v)=>({label:v.label,value:v.value})):[];return new Promise((v)=>{let B=!1,D=(f)=>{if(B)return;B=!0,k.close(),v(f)},Y=(f)=>{m=f,k.update({error:m,invalid:m!==""})},S={cancelLabel:o,confirmLabel:s,headline:e,layer:dt("dialog"),onCancel:()=>D(null),onClosed:()=>D(null),onConfirm:()=>{let f=P(h);if(f){Y(f);return}D(h.trim())},onInput:(f)=>{V=!0,h=f;let w=P(h);if(w!==m)Y(w)},onPick:(f)=>{T=f,r?.onChange?.(f);let w=P(h);m=V||m?w:"",k.update({chosen:T,error:m,invalid:m!=="",options:K(),placeholder:W()})}};if(i!==void 0)Object.assign(S,U(i));if(r)S.choice={chosen:T,label:r.label,options:K()};if(S.field={mono:l,multiline:c,placeholder:W(),rows:p,select:a,value:h},u!==void 0)S.size=u;let k=Zs(S)})}var N=new Map;function Xs(e,t){let o=`${e}:${t}`,r=N.get(o);if(r&&r.parentElement)return r;return r=document.createElement("div"),r.style.pointerEvents="auto",r.setAttribute(Ve,wt(e,t)),dt(e).append(r),N.set(o,r),r}function Jb(e,t){let o=`${e}:${t}`,r=N.get(o);if(r)io(ft,r),r.remove(),N.delete(o)}var we=180,Ee={error:"✕",info:"ℹ",success:"✓",warn:"!"},A=null,y=new Map,b=new Set;function Me(){if(!("matchMedia"in globalThis))return!1;return globalThis.matchMedia("(prefers-reduced-motion: reduce)").matches===!0}function Oe(){try{return new URLSearchParams(globalThis.location.search).get("automation")==="1"}catch{return!1}}function w$(){return[...b].map((e)=>`overlay: toast ${e} settling in`)}function q(e){let t=y.get(e);if(t!==void 0)clearTimeout(t),y.delete(e);b.delete(e),Lh(e)}function Ce(e){if(y.has(e.id)||b.has(e.id))return;let t=Me()?0:we;if(t>0)b.add(e.id),setTimeout(()=>b.delete(e.id),t);let o=e.timeoutMs??0;if(o<=0||Oe())return;y.set(e.id,setTimeout(()=>q(e.id),o))}L("toasts",se);var G=null,H=null,O=null;function ce(){return G??=g({dismissToast:(e)=>{q(e)},runAction:(e)=>{let t=Xd.find((r)=>r.id===e),o=ae();if(!t?.action||!o)return;q(e),En(o,t.action,t.actionArgs,"Notifications")},toasts:[]}),G}function je(e){let t=e.action===void 0?null:ae(),o=e.action,r=t&&o!==void 0?t.get(o):void 0,s=r&&o!==void 0&&t.isVisible(o)?r:null,i=s&&o!==void 0?t.disabledReason(o):void 0;return{actionDisabled:i!==void 0,actionLabel:s?.title??"",actionTitle:s===null?"":i===void 0?s.title:`${s.title} — requires ${i}`,hasAction:s!==null,icon:Ee[e.severity],id:e.id,message:e.message,severity:e.severity}}function Ne(){if(Ae(),!j)return;A=ge(),A.run(()=>{ne(()=>{Xd.length,ae();for(let e of Xd)Ce(e);ce().toasts=Xd.map((e)=>je(e))})}),H=R("toasts",ce(),j),H.then((e)=>{O=e})}function Ae(){A?.stop(),A=null;for(let t of y.values())clearTimeout(t);y.clear(),b.clear();let e=H;if(H=null,O)O.dispose(),O=null;else if(e)e.then((t)=>t.dispose());G=null}
2
+ export{VA,UA,g$,Ve,Mp,b$,Qn,qA,GA,KA,JA,YA,mx,wt,L,ZA,R,sn,Zs,En,nt,dt,v$,Kb,y$,qo,pC,ei,Xs,Jb,w$};
3
3
 
4
- //# debugId=96837B8036F17C7764756E2164756E21
5
- //# sourceMappingURL=studio-jttyqrmh.js.map
4
+ //# debugId=CEEB46BE4AFC2A3C64756E2164756E21
5
+ //# sourceMappingURL=studio-0w2dr0q8.js.map