@jxsuite/studio 6.1.1 → 8.0.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 (785) hide show
  1. package/README.md +5 -5
  2. package/dist/chunks/2020-5wtzce5g.js +4 -0
  3. package/dist/chunks/{action-group-2mqby73c.js → action-group-4aan7g6g.js} +3 -3
  4. package/dist/chunks/adapter-5tphg7xe.js +4 -0
  5. package/dist/chunks/add-new-flow-psym14sn.js +4 -0
  6. package/dist/chunks/cf-account-picker-haqazq5r.js +4 -0
  7. package/dist/chunks/cf-settings-h2wrh6hq.js +4 -0
  8. package/dist/chunks/color-area-6rbra5dy.js +4 -0
  9. package/dist/chunks/color-field-gy56c94g.js +4 -0
  10. package/dist/chunks/color-m7r1vk54.js +4 -0
  11. package/dist/chunks/color-slider-sqqdyf6c.js +4 -0
  12. package/dist/chunks/combobox-72h32ejk.js +4 -0
  13. package/dist/chunks/components-r22xca09.js +4 -0
  14. package/dist/chunks/content-source-mmppmcyg.js +4 -0
  15. package/dist/chunks/convert-to-repeater-he70fc2b.js +4 -0
  16. package/dist/chunks/dialog-c4x05vyx.js +4 -0
  17. package/dist/chunks/editor-ccd9jwsa.js +4 -0
  18. package/dist/chunks/entry-commands-6qxz9e8p.js +4 -0
  19. package/dist/chunks/extension-sections-0egb88dm.js +4 -0
  20. package/dist/chunks/file-ops-qnab36ek.js +4 -0
  21. package/dist/chunks/files-rcn56qvm.js +4 -0
  22. package/dist/chunks/format-host-yxz0kjjs.js +4 -0
  23. package/dist/chunks/fs-events-d1qxq4z4.js +4 -0
  24. package/dist/chunks/grid-open-4z1g062t.js +4 -0
  25. package/dist/chunks/grid-view-qg1b5eqx.js +51 -0
  26. package/dist/chunks/icons-63bjtbs7.js +4 -0
  27. package/dist/chunks/iframe-entry-2zggzajv.js +5 -0
  28. package/dist/chunks/iframe-entry-76j8vwwx.js +5 -0
  29. package/dist/chunks/iframe-entry-99nr5zfb.js +5 -0
  30. package/dist/chunks/iframe-entry-pkgmcgp0.js +5 -0
  31. package/dist/chunks/iframe-host-ssv7kyj0.js +4 -0
  32. package/dist/chunks/{index-2veqmnhr.js → index-32eqzv1k.js} +3 -3
  33. package/dist/chunks/index-f0jn7nnp.js +4 -0
  34. package/dist/chunks/{javascript-8nbvs12s.js → javascript-pjp734q4.js} +3 -3
  35. package/dist/chunks/jsonMode-njkvsa02.js +13 -0
  36. package/dist/chunks/jx-validate-ttasrbh7.js +4 -0
  37. package/dist/chunks/layers-bgyr11tr.js +4 -0
  38. package/dist/chunks/layers-panel-7ez66zeq.js +4 -0
  39. package/dist/chunks/listbox-c421cf8c.js +4 -0
  40. package/dist/chunks/lit-html-v9gh687x.js +4 -0
  41. package/dist/chunks/media-library-sq468wts.js +4 -0
  42. package/dist/chunks/media-picker-shfe59pt.js +4 -0
  43. package/dist/chunks/menu-bdpzbfvs.js +4 -0
  44. package/dist/chunks/monaco-binding-vq1hgnn0.js +4 -0
  45. package/dist/chunks/monaco-buffer-3afgwvbp.js +4 -0
  46. package/dist/chunks/monaco-setup-xrd2cbkp.js +4 -0
  47. package/dist/chunks/notify-kzrjr3fv.js +4 -0
  48. package/dist/chunks/number-field-y62xq0ty.js +4 -0
  49. package/dist/chunks/parse-v77xtwv7.js +4 -0
  50. package/dist/chunks/platform-7v4rtd7m.js +4 -0
  51. package/dist/chunks/popover-b89sfej7.js +4 -0
  52. package/dist/chunks/publish-panel-2z9gw8ee.js +4 -0
  53. package/dist/chunks/publish-quick-qx2455cj.js +4 -0
  54. package/dist/chunks/publish-workspace-wrc1dgwx.js +4 -0
  55. package/dist/chunks/quick-search-n0t0eqxb.js +4 -0
  56. package/dist/chunks/references-9547rg5s.js +4 -0
  57. package/dist/chunks/right-panel-wsgnr9pn.js +4 -0
  58. package/dist/chunks/select-rzds841e.js +4 -0
  59. package/dist/chunks/source-control-kwktr9y6.js +4 -0
  60. package/dist/chunks/split-c9zfdgxf.js +4 -0
  61. package/dist/chunks/studio-03ct6yfv.js +9 -0
  62. package/dist/chunks/studio-07rcfje3.js +5 -0
  63. package/dist/chunks/studio-3e54qh39.js +7 -0
  64. package/dist/chunks/studio-3exxhz5g.js +5 -0
  65. package/dist/chunks/studio-3q40e3rj.js +5 -0
  66. package/dist/chunks/studio-3qeh9t0h.js +6 -0
  67. package/dist/chunks/studio-3qqjeep5.js +6 -0
  68. package/dist/chunks/studio-43sd2mam.js +4 -0
  69. package/dist/chunks/studio-4hp8pkyt.js +5 -0
  70. package/dist/chunks/studio-58xg6j2q.js +9 -0
  71. package/dist/chunks/studio-5g0rprdt.js +7 -0
  72. package/dist/chunks/studio-6m380wp7.js +5 -0
  73. package/dist/chunks/studio-80jyh1xh.js +4 -0
  74. package/dist/chunks/studio-83mk4bgg.js +9 -0
  75. package/dist/chunks/{studio-kggey1jt.js → studio-881z1xrx.js} +4 -4
  76. package/dist/chunks/studio-8m0y2qe7.js +5 -0
  77. package/dist/chunks/studio-8tr6cfrc.js +5 -0
  78. package/dist/chunks/studio-8vcvfs7r.js +6 -0
  79. package/dist/chunks/studio-9tmebf0s.js +5 -0
  80. package/dist/chunks/studio-a2bvaptz.js +5 -0
  81. package/dist/chunks/studio-b7y5mr30.js +5 -0
  82. package/dist/chunks/studio-bavb31r0.js +5 -0
  83. package/dist/chunks/studio-bbe4c90a.js +5 -0
  84. package/dist/chunks/studio-c05wdnt3.js +5 -0
  85. package/dist/chunks/studio-ccv2svc6.js +5 -0
  86. package/dist/chunks/studio-d5grtb9e.js +16 -0
  87. package/dist/chunks/studio-df0baea9.js +5 -0
  88. package/dist/chunks/studio-dgk4dqtx.js +7 -0
  89. package/dist/chunks/studio-e1g64q43.js +5 -0
  90. package/dist/chunks/studio-ed1hp6zf.js +6 -0
  91. package/dist/chunks/studio-ed3xx40h.js +7 -0
  92. package/dist/chunks/studio-f14e1zdj.js +5 -0
  93. package/dist/chunks/studio-fbhxxc5f.js +5 -0
  94. package/dist/chunks/studio-fyh0jc96.js +5 -0
  95. package/dist/chunks/studio-gcxk20n7.js +5 -0
  96. package/dist/chunks/studio-jaaz8ce9.js +5 -0
  97. package/dist/chunks/{studio-8grwxtqk.js → studio-jcnsdaep.js} +4 -4
  98. package/dist/chunks/studio-jsgf2q5k.js +7 -0
  99. package/dist/chunks/{studio-1q1sh2ax.js → studio-k3xxbagr.js} +3 -3
  100. package/dist/chunks/studio-k7evxqh4.js +5 -0
  101. package/dist/chunks/studio-kt3pjkwd.js +5 -0
  102. package/dist/chunks/studio-m8g16bgz.js +5 -0
  103. package/dist/chunks/studio-mn0476ag.js +5 -0
  104. package/dist/chunks/studio-mx1smyq0.js +5 -0
  105. package/dist/chunks/studio-n0c5h6mf.js +5 -0
  106. package/dist/chunks/{studio-rv11kfwa.js → studio-nh6d342n.js} +7 -7
  107. package/dist/chunks/studio-nqxqf8p2.js +4 -0
  108. package/dist/chunks/studio-p4nrkvqr.js +5 -0
  109. package/dist/chunks/{studio-h46vtzk8.js → studio-pbxa5fpc.js} +4 -4
  110. package/dist/chunks/studio-pgmvdv7z.js +7 -0
  111. package/dist/chunks/studio-ph84avkf.js +5 -0
  112. package/dist/chunks/{studio-wszjyh0j.js → studio-q0mvbaq6.js} +4 -4
  113. package/dist/chunks/studio-q0tccd43.js +5 -0
  114. package/dist/chunks/studio-q7rtx6zq.js +14 -0
  115. package/dist/chunks/{studio-pre0skq6.js → studio-qgh13jtz.js} +4 -4
  116. package/dist/chunks/studio-qmn1xc24.js +5 -0
  117. package/dist/chunks/studio-qwdqwkj0.js +5 -0
  118. package/dist/chunks/{studio-t6b6qe31.js → studio-r5qy30vx.js} +4 -4
  119. package/dist/chunks/studio-rj9eamf8.js +5 -0
  120. package/dist/chunks/studio-rptgsk96.js +5 -0
  121. package/dist/chunks/studio-rthyg42z.js +928 -0
  122. package/dist/chunks/studio-s19tp1xr.js +5 -0
  123. package/dist/chunks/studio-s32578pn.js +5 -0
  124. package/dist/chunks/studio-svb7yyve.js +5 -0
  125. package/dist/chunks/studio-syreb644.js +5 -0
  126. package/dist/chunks/studio-tf9jryb1.js +10 -0
  127. package/dist/chunks/studio-tfkznv39.js +5 -0
  128. package/dist/chunks/studio-tft6r105.js +5 -0
  129. package/dist/chunks/studio-txf2kysx.js +5 -0
  130. package/dist/chunks/studio-v8867ddv.js +12 -0
  131. package/dist/chunks/studio-vxq7fcvv.js +5 -0
  132. package/dist/chunks/studio-w4rz9hdk.js +5 -0
  133. package/dist/chunks/studio-wbcjbhy1.js +9 -0
  134. package/dist/chunks/studio-wc649wss.js +5 -0
  135. package/dist/chunks/studio-wys23mxz.js +5 -0
  136. package/dist/chunks/studio-x1x167jh.js +5 -0
  137. package/dist/chunks/studio-x9hsze61.js +5 -0
  138. package/dist/chunks/studio-y0n7yxea.js +9 -0
  139. package/dist/chunks/studio-y3ahhdpx.js +5 -0
  140. package/dist/chunks/studio-z97c48fk.js +5 -0
  141. package/dist/chunks/studio-zat62m0c.js +5 -0
  142. package/dist/chunks/studio-zcd2e7yz.js +5 -0
  143. package/dist/chunks/studio-zz9qe3rw.js +64 -0
  144. package/dist/chunks/swatch-group-ewh24n1f.js +4 -0
  145. package/dist/chunks/tabs-f5cw3tgp.js +4 -0
  146. package/dist/chunks/textfield-wewc8rq2.js +4 -0
  147. package/dist/chunks/toast-1gv0h53h.js +4 -0
  148. package/dist/chunks/toast-host-1yg5ar8d.js +4 -0
  149. package/dist/chunks/{toolbar-2nnzqhrj.js → toolbar-44cm5cta.js} +3 -3
  150. package/dist/chunks/tooltip-yypz28gq.js +4 -0
  151. package/dist/chunks/tree-9xa4hm7n.js +4 -0
  152. package/dist/chunks/tsMode-epyfz1hv.js +14 -0
  153. package/dist/chunks/workspace-dz7nxfhv.js +4 -0
  154. package/dist/chunks/workspace-home-xsd7hkjw.js +4 -0
  155. package/dist/chunks/ws-client-bv552sfx.js +4 -0
  156. package/dist/iframe-entry.js +20 -16
  157. package/dist/manifest.json +77 -63
  158. package/dist/studio.js +106 -107
  159. package/dist/workers/ts.worker.js +3 -3
  160. package/package.json +17 -16
  161. package/src/about/about-modal.ts +4 -3
  162. package/src/account/action-flow.ts +45 -38
  163. package/src/account-status.ts +7 -2
  164. package/src/browse/component-examples.ts +272 -0
  165. package/src/browse/library-commands.ts +64 -104
  166. package/src/browse/library-layouts.ts +270 -53
  167. package/src/browse/library-model.ts +194 -134
  168. package/src/browse/library-pane.ts +748 -440
  169. package/src/browse/library-preview.ts +161 -26
  170. package/src/browse/library-source.ts +308 -41
  171. package/src/browse/preview-root.ts +78 -0
  172. package/src/browse/preview-style.ts +155 -0
  173. package/src/canvas/asset-refs.ts +40 -10
  174. package/src/canvas/asset-resolve.ts +19 -23
  175. package/src/canvas/canvas-helpers.ts +7 -6
  176. package/src/canvas/canvas-live-render.ts +260 -77
  177. package/src/canvas/canvas-origin.ts +37 -12
  178. package/src/canvas/canvas-page-context.ts +112 -0
  179. package/src/canvas/canvas-patcher.ts +30 -30
  180. package/src/canvas/canvas-perf.ts +11 -5
  181. package/src/canvas/canvas-render.ts +175 -148
  182. package/src/canvas/canvas-surface.ts +5 -3
  183. package/src/canvas/canvas-utils.ts +147 -61
  184. package/src/canvas/dialog-path.ts +9 -4
  185. package/src/canvas/dialog-state.ts +1 -2
  186. package/src/canvas/diff-marks.ts +9 -16
  187. package/src/canvas/diff-toolbar.ts +8 -7
  188. package/src/canvas/edit-width-drag.ts +4 -1
  189. package/src/canvas/edit-width.ts +1 -3
  190. package/src/canvas/iframe-channel.ts +27 -13
  191. package/src/canvas/iframe-drop.ts +120 -12
  192. package/src/canvas/iframe-editable-root.ts +29 -16
  193. package/src/canvas/iframe-entry.ts +104 -75
  194. package/src/canvas/iframe-eval.ts +73 -49
  195. package/src/canvas/iframe-host.ts +269 -158
  196. package/src/canvas/iframe-inline-edit.ts +49 -30
  197. package/src/canvas/iframe-insert.ts +5 -4
  198. package/src/canvas/iframe-interaction.ts +30 -25
  199. package/src/canvas/iframe-keys.ts +11 -0
  200. package/src/canvas/iframe-overlay.ts +1 -1
  201. package/src/canvas/iframe-patch.ts +25 -21
  202. package/src/canvas/iframe-position.ts +12 -6
  203. package/src/canvas/iframe-protocol.ts +36 -21
  204. package/src/canvas/iframe-render.ts +84 -35
  205. package/src/canvas/iframe-slash.ts +24 -11
  206. package/src/canvas/iframe-subtree.ts +10 -3
  207. package/src/canvas/npm-modules.ts +22 -0
  208. package/src/canvas/path-mapping.ts +19 -12
  209. package/src/canvas/popover-path.ts +7 -3
  210. package/src/canvas/popover-state.ts +1 -2
  211. package/src/canvas/preview-navigate.ts +16 -0
  212. package/src/canvas/repeater-sources.ts +200 -0
  213. package/src/canvas/serialize-scope.ts +13 -5
  214. package/src/canvas/stage-scrollbar.ts +7 -2
  215. package/src/canvas/surface-registry.ts +27 -3
  216. package/src/collab/collab-commands.ts +7 -2
  217. package/src/collab/collab-session.ts +84 -45
  218. package/src/collab/collab-state.ts +4 -3
  219. package/src/collab/monaco-binding.ts +16 -13
  220. package/src/collab/monaco-cursors.ts +5 -2
  221. package/src/commands/app-commands.ts +16 -6
  222. package/src/commands/budget.ts +13 -11
  223. package/src/commands/command-args.ts +103 -71
  224. package/src/commands/context.ts +55 -28
  225. package/src/commands/defaults.ts +69 -45
  226. package/src/commands/keymap.ts +56 -43
  227. package/src/commands/levels.ts +14 -8
  228. package/src/commands/live-context.ts +9 -7
  229. package/src/commands/reference.ts +2 -1
  230. package/src/commands/registry.ts +22 -11
  231. package/src/commands/run-reported.ts +15 -10
  232. package/src/component-props.ts +46 -30
  233. package/src/content/collection-match.ts +11 -9
  234. package/src/content/collection-pages.ts +412 -0
  235. package/src/content/content-collections.ts +270 -0
  236. package/src/content/draft-state.ts +4 -3
  237. package/src/content/entry-commands.ts +54 -62
  238. package/src/content/entry-editor.ts +137 -32
  239. package/src/content/entry-fields.ts +25 -8
  240. package/src/content/entry-inspector.ts +225 -0
  241. package/src/content/entry-model.ts +38 -15
  242. package/src/content/entry-open.ts +80 -0
  243. package/src/content/entry-summaries.ts +440 -0
  244. package/src/content/file-record-ids.ts +80 -0
  245. package/src/content/file-records.ts +125 -0
  246. package/src/content/page-summaries.ts +129 -0
  247. package/src/content/record-entry.ts +201 -0
  248. package/src/content/writing-banner.ts +177 -0
  249. package/src/create/add-new-commands.ts +185 -0
  250. package/src/create/add-new-flow.ts +1116 -0
  251. package/src/create/add-new.ts +1014 -0
  252. package/src/create/element-name.ts +121 -0
  253. package/src/editor/canvas-context-menu.ts +1 -2
  254. package/src/editor/canvas-slash-bridge.ts +3 -6
  255. package/src/editor/content-slice.ts +16 -14
  256. package/src/editor/context-menu.ts +35 -22
  257. package/src/editor/convert-targets.ts +30 -35
  258. package/src/editor/convert-to-component.ts +78 -48
  259. package/src/editor/convert-to-repeater.ts +34 -22
  260. package/src/editor/editable-tags.ts +17 -2
  261. package/src/editor/file-drop-action.ts +29 -22
  262. package/src/editor/inline-edit-apply.ts +79 -17
  263. package/src/editor/inline-edit.ts +76 -50
  264. package/src/editor/inline-format.ts +59 -56
  265. package/src/editor/inline-link.ts +40 -15
  266. package/src/editor/insert-component.ts +91 -0
  267. package/src/editor/insert-zone-action.ts +14 -5
  268. package/src/editor/merge-tags.ts +58 -19
  269. package/src/editor/repeater-scope.ts +39 -28
  270. package/src/editor/shortcuts.ts +76 -42
  271. package/src/editor/slash-menu.ts +52 -14
  272. package/src/files/asset-versions.ts +4 -4
  273. package/src/files/components.ts +89 -20
  274. package/src/files/elements.ts +5 -6
  275. package/src/files/file-ops.ts +92 -41
  276. package/src/files/files.ts +248 -239
  277. package/src/files/fs-events.ts +18 -7
  278. package/src/files/media-meta.ts +97 -2
  279. package/src/files/media-paths.ts +3 -0
  280. package/src/files/media-types.ts +55 -0
  281. package/src/files/media-upload.ts +209 -52
  282. package/src/files/new-file-name.ts +156 -0
  283. package/src/files/serialize-document.ts +15 -5
  284. package/src/format/constraints.ts +1 -1
  285. package/src/format/convert-file.ts +27 -13
  286. package/src/format/format-choices.ts +2 -1
  287. package/src/format/format-host.ts +91 -50
  288. package/src/github/github-auth-status.ts +27 -3
  289. package/src/github/github-auth.ts +21 -11
  290. package/src/github/github-publish.ts +28 -23
  291. package/src/grid/cell-editors.ts +46 -31
  292. package/src/grid/cell-popovers.ts +5 -3
  293. package/src/grid/edit-buffer.ts +10 -9
  294. package/src/grid/grid-controller.ts +25 -23
  295. package/src/grid/grid-layout.ts +21 -5
  296. package/src/grid/grid-open.ts +3 -33
  297. package/src/grid/grid-panel.ts +65 -6
  298. package/src/grid/grid-reveal.ts +34 -0
  299. package/src/grid/grid-source.ts +9 -31
  300. package/src/grid/grid-view.ts +45 -23
  301. package/src/grid/redirects-grid.ts +14 -5
  302. package/src/grid/redirects.ts +16 -14
  303. package/src/grid/schema-columns.ts +25 -19
  304. package/src/grid/sources/connector-source.ts +47 -20
  305. package/src/grid/sources/content-source.ts +100 -31
  306. package/src/grid/sources/csv-file-source.ts +2 -2
  307. package/src/grid/tabulator-tables.d.ts +61 -34
  308. package/src/hosting/document.ts +2 -2
  309. package/src/hosting/stage.ts +7 -7
  310. package/src/i18n/i18n-commands.ts +3 -3
  311. package/src/media/media-commands.ts +181 -0
  312. package/src/media/media-library-model.ts +232 -0
  313. package/src/media/media-library.ts +1283 -0
  314. package/src/media/media-pane.ts +51 -20
  315. package/src/new-project/add-repo-modal.ts +20 -19
  316. package/src/new-project/import-tab.ts +10 -14
  317. package/src/new-project/location-fields.ts +2 -1
  318. package/src/new-project/new-project-modal.ts +12 -9
  319. package/src/packages/jxsuite-update.ts +4 -3
  320. package/src/packages/pull-package-sync.ts +26 -25
  321. package/src/page-params.ts +97 -68
  322. package/src/panels/activity-panel.ts +38 -14
  323. package/src/panels/ai-chat/attached-context.ts +13 -7
  324. package/src/panels/ai-chat/chat-markdown.ts +8 -8
  325. package/src/panels/ai-chat/chat-view.ts +80 -73
  326. package/src/panels/ai-chat/composer.ts +30 -33
  327. package/src/panels/ai-chat/sessions-view.ts +1 -2
  328. package/src/panels/ai-panel.ts +23 -20
  329. package/src/panels/block-action-bar.ts +57 -46
  330. package/src/panels/bottom-dock.ts +5 -3
  331. package/src/panels/canvas-dnd-bridge.ts +36 -26
  332. package/src/panels/chat-panel.ts +6 -6
  333. package/src/panels/collections-panel.ts +306 -0
  334. package/src/panels/component-preview.ts +35 -13
  335. package/src/panels/data-explorer.ts +63 -26
  336. package/src/panels/data-grid.ts +18 -11
  337. package/src/panels/dnd.ts +115 -138
  338. package/src/panels/editors.ts +52 -21
  339. package/src/panels/elements-panel.ts +19 -5
  340. package/src/panels/empty-state.ts +2 -2
  341. package/src/panels/events-panel.ts +84 -69
  342. package/src/panels/formula-workspace.ts +78 -54
  343. package/src/panels/frontmatter-fields.ts +33 -28
  344. package/src/panels/git-diff-open.ts +10 -6
  345. package/src/panels/head-panel.ts +488 -202
  346. package/src/panels/i18n-panel.ts +20 -12
  347. package/src/panels/imports-panel.ts +25 -47
  348. package/src/panels/jump-bar.ts +75 -31
  349. package/src/panels/layers-panel.ts +130 -101
  350. package/src/panels/left-panel.ts +25 -11
  351. package/src/panels/navigator-panels.ts +23 -11
  352. package/src/panels/pane-context.ts +140 -49
  353. package/src/panels/pane-grid.ts +55 -26
  354. package/src/panels/panel-registry.ts +36 -46
  355. package/src/panels/properties-panel.ts +182 -124
  356. package/src/panels/quick-search.ts +53 -31
  357. package/src/panels/right-panel.ts +201 -45
  358. package/src/panels/seo-modal.ts +54 -125
  359. package/src/panels/settings-menu.ts +63 -61
  360. package/src/panels/settings-pane.ts +268 -162
  361. package/src/panels/signals-panel.ts +156 -135
  362. package/src/panels/site-model.ts +367 -0
  363. package/src/panels/site-panel.ts +638 -0
  364. package/src/panels/statement-editor.ts +230 -140
  365. package/src/panels/style-panel.ts +253 -206
  366. package/src/panels/style-utils.ts +114 -51
  367. package/src/panels/stylebook-doc.ts +195 -60
  368. package/src/panels/stylebook-layers-panel.ts +48 -89
  369. package/src/panels/stylebook-panel.ts +60 -27
  370. package/src/panels/styles-panel.ts +327 -0
  371. package/src/panels/tab-drop.ts +27 -11
  372. package/src/panels/tab-strip.ts +143 -49
  373. package/src/platform-errors.ts +57 -43
  374. package/src/platform.ts +59 -31
  375. package/src/platforms/cloud.ts +373 -176
  376. package/src/platforms/default-platform.ts +14 -8
  377. package/src/platforms/devserver.ts +180 -142
  378. package/src/platforms/read-batcher.ts +16 -8
  379. package/src/project-list.ts +2 -1
  380. package/src/publish/deploy-checklist.ts +20 -9
  381. package/src/publish/pages-service.ts +66 -27
  382. package/src/publish/publish-changes.ts +491 -0
  383. package/src/publish/publish-commands.ts +88 -22
  384. package/src/publish/publish-ids.ts +49 -0
  385. package/src/publish/publish-panel.ts +10 -6
  386. package/src/publish/publish-quick.ts +148 -0
  387. package/src/publish/publish-workspace.ts +926 -0
  388. package/src/publish/source-control.ts +907 -0
  389. package/src/recent-projects.ts +15 -8
  390. package/src/resize-edges.ts +26 -36
  391. package/src/services/a11y-report.ts +26 -19
  392. package/src/services/agent-seed.ts +23 -11
  393. package/src/services/ai-ask.ts +9 -12
  394. package/src/services/ai-command-tools.ts +68 -62
  395. package/src/services/ai-import-tools.ts +80 -67
  396. package/src/services/ai-models.ts +17 -13
  397. package/src/services/ai-project-tools.ts +68 -32
  398. package/src/services/ai-session-store.ts +19 -10
  399. package/src/services/ai-system-prompt.ts +46 -20
  400. package/src/services/ai-tools.ts +71 -27
  401. package/src/services/ai-write-report.ts +20 -12
  402. package/src/services/ai-writes.ts +4 -4
  403. package/src/services/automation.ts +74 -51
  404. package/src/services/cem-export.ts +149 -58
  405. package/src/services/cf-settings.ts +4 -4
  406. package/src/services/clock.ts +6 -1
  407. package/src/services/code-services.ts +37 -31
  408. package/src/services/connection.ts +2 -2
  409. package/src/services/context-manager.ts +14 -10
  410. package/src/services/context-resolver.ts +20 -8
  411. package/src/services/data-service.ts +19 -15
  412. package/src/services/directory-picker.ts +20 -14
  413. package/src/services/document-assistant.ts +39 -19
  414. package/src/services/gated-registry.ts +10 -6
  415. package/src/services/harness/chat-reducer.ts +23 -1
  416. package/src/services/import-client.ts +91 -38
  417. package/src/services/import-seed.ts +8 -2
  418. package/src/services/jx-validate.ts +28 -31
  419. package/src/services/live-preview.ts +0 -0
  420. package/src/services/live-surfaces.ts +6 -3
  421. package/src/services/model-uri.ts +10 -2
  422. package/src/services/module-preloads.ts +12 -8
  423. package/src/services/monaco-buffer.ts +43 -24
  424. package/src/services/monaco-lazy.ts +7 -8
  425. package/src/services/monaco-setup.ts +23 -16
  426. package/src/services/notify.ts +44 -17
  427. package/src/services/popover-report.ts +25 -10
  428. package/src/services/preview-eval.ts +20 -8
  429. package/src/services/profile.ts +13 -6
  430. package/src/services/project-path.ts +13 -10
  431. package/src/services/references.ts +0 -0
  432. package/src/services/render-critic.ts +29 -9
  433. package/src/services/settings/definitions.ts +25 -14
  434. package/src/services/settings/kernel.ts +13 -4
  435. package/src/services/settings/write-queue.ts +9 -9
  436. package/src/services/token-lint.ts +12 -10
  437. package/src/services/tool-executor.ts +17 -5
  438. package/src/services/tool-outcomes.ts +44 -24
  439. package/src/services/trusted-types.ts +24 -7
  440. package/src/settings/contexts-section.ts +11 -8
  441. package/src/settings/contributed-section.ts +128 -70
  442. package/src/settings/css-vars-editor.ts +119 -32
  443. package/src/settings/defs-editor.ts +38 -35
  444. package/src/settings/developer-panels.ts +43 -0
  445. package/src/settings/extension-rows.ts +16 -8
  446. package/src/settings/extension-sections.ts +42 -14
  447. package/src/settings/extensions-section.ts +4 -1
  448. package/src/settings/general-settings.ts +101 -28
  449. package/src/settings/locales-section.ts +20 -12
  450. package/src/settings/preferences-dialog.ts +17 -7
  451. package/src/settings/preferences-keymap.ts +7 -5
  452. package/src/settings/preferences-sections.ts +11 -5
  453. package/src/settings/project-sections.ts +28 -11
  454. package/src/settings/schema-field-ui.ts +12 -1
  455. package/src/settings/section-registry.ts +116 -11
  456. package/src/settings/settings-dialog.ts +192 -0
  457. package/src/settings/settings-document.ts +186 -166
  458. package/src/shell/tree.ts +6 -5
  459. package/src/shell.ts +536 -477
  460. package/src/site-context.ts +101 -32
  461. package/src/state.ts +68 -57
  462. package/src/store.ts +54 -34
  463. package/src/studio.ts +219 -116
  464. package/src/style/live-preview.ts +1 -1
  465. package/src/style/project-styles.ts +40 -7
  466. package/src/style/stylebook-specimens.ts +89 -0
  467. package/src/style/stylebook-target.ts +26 -0
  468. package/src/style/tag-inheritance.ts +105 -0
  469. package/src/style/token-ref.ts +5 -4
  470. package/src/style/variables-focus.ts +61 -0
  471. package/src/style/variables-view.ts +235 -0
  472. package/src/surfaces/about.ts +18 -19
  473. package/src/surfaces/add-new.json +1482 -0
  474. package/src/surfaces/add-new.ts +325 -0
  475. package/src/surfaces/add-repo.ts +17 -19
  476. package/src/surfaces/ai-chat.ts +33 -38
  477. package/src/surfaces/ai-credentials-form.ts +6 -16
  478. package/src/surfaces/ai-managed-connect.ts +3 -4
  479. package/src/surfaces/ai-model-picker.ts +3 -5
  480. package/src/surfaces/block-action-bar.ts +22 -11
  481. package/src/surfaces/boot-failure.json +4 -3
  482. package/src/surfaces/boot-failure.ts +4 -5
  483. package/src/surfaces/bottom-dock.json +1 -1
  484. package/src/surfaces/bottom-dock.ts +9 -18
  485. package/src/surfaces/canvas-stage.json +30 -19
  486. package/src/surfaces/canvas-stage.ts +17 -16
  487. package/src/surfaces/cf-account-picker.ts +17 -18
  488. package/src/surfaces/collections-panel.json +615 -0
  489. package/src/surfaces/collections-panel.ts +168 -0
  490. package/src/surfaces/commandbar.json +241 -96
  491. package/src/surfaces/commandbar.ts +145 -105
  492. package/src/surfaces/convert-repeater.ts +17 -19
  493. package/src/surfaces/data-actions.ts +9 -7
  494. package/src/surfaces/dialog.ts +26 -28
  495. package/src/surfaces/diff-toolbar.ts +9 -7
  496. package/src/surfaces/empty-state.json +1 -1
  497. package/src/surfaces/empty-state.ts +7 -10
  498. package/src/surfaces/entry-editor.json +136 -0
  499. package/src/surfaces/entry-editor.ts +35 -11
  500. package/src/surfaces/entry-inspector.json +371 -0
  501. package/src/surfaces/entry-inspector.ts +143 -0
  502. package/src/surfaces/expression-editor.ts +11 -25
  503. package/src/surfaces/files-panel.ts +27 -14
  504. package/src/surfaces/formula-palette.ts +4 -5
  505. package/src/surfaces/github-auth.ts +16 -20
  506. package/src/surfaces/github-publish.ts +17 -22
  507. package/src/surfaces/grid-cell.ts +30 -31
  508. package/src/surfaces/grid-open.ts +10 -14
  509. package/src/surfaces/grid-panel.ts +13 -9
  510. package/src/surfaces/grid-replace.ts +13 -13
  511. package/src/surfaces/grid-views.ts +15 -18
  512. package/src/surfaces/inspector-dock.json +162 -14
  513. package/src/surfaces/inspector-dock.ts +59 -31
  514. package/src/surfaces/jump-bar.ts +5 -6
  515. package/src/surfaces/jxsuite-update.ts +16 -22
  516. package/src/surfaces/library-pane.json +670 -437
  517. package/src/surfaces/library-pane.ts +111 -77
  518. package/src/surfaces/logic-panel.ts +17 -30
  519. package/src/surfaces/logic-workspace.ts +13 -15
  520. package/src/surfaces/media-browser.json +62 -6
  521. package/src/surfaces/media-browser.ts +26 -11
  522. package/src/surfaces/media-field.json +1 -1
  523. package/src/surfaces/media-field.ts +4 -5
  524. package/src/surfaces/media-library.json +1586 -0
  525. package/src/surfaces/media-library.ts +282 -0
  526. package/src/surfaces/media-pane.ts +8 -7
  527. package/src/surfaces/media-pick-dialog.json +71 -0
  528. package/src/surfaces/media-pick-dialog.ts +132 -0
  529. package/src/surfaces/menu.ts +47 -23
  530. package/src/surfaces/navigator-dock.ts +11 -12
  531. package/src/surfaces/new-project.ts +27 -26
  532. package/src/surfaces/pane-context.json +144 -77
  533. package/src/surfaces/pane-context.ts +44 -25
  534. package/src/surfaces/pane-grid.ts +15 -10
  535. package/src/surfaces/panel-activity.ts +5 -6
  536. package/src/surfaces/panel-data.ts +3 -4
  537. package/src/surfaces/panel-deploy-checklist.json +12 -6
  538. package/src/surfaces/panel-deploy-checklist.ts +8 -7
  539. package/src/surfaces/panel-elements.ts +5 -7
  540. package/src/surfaces/panel-i18n.ts +5 -7
  541. package/src/surfaces/panel-imports.ts +6 -13
  542. package/src/surfaces/panel-outline.ts +25 -19
  543. package/src/surfaces/panel-page.json +72 -2
  544. package/src/surfaces/panel-page.ts +49 -25
  545. package/src/surfaces/panel-problems.ts +5 -7
  546. package/src/surfaces/panel-signals.json +1 -1
  547. package/src/surfaces/panel-signals.ts +25 -39
  548. package/src/surfaces/panel-stylebook-layers.json +71 -204
  549. package/src/surfaces/panel-stylebook-layers.ts +5 -29
  550. package/src/surfaces/preferences.json +120 -48
  551. package/src/surfaces/preferences.ts +29 -11
  552. package/src/surfaces/progress-modal.ts +15 -9
  553. package/src/surfaces/properties-panel.json +1 -1
  554. package/src/surfaces/properties-panel.ts +20 -42
  555. package/src/surfaces/publish-quick.json +428 -0
  556. package/src/surfaces/publish-quick.ts +165 -0
  557. package/src/surfaces/publish-workspace.json +2892 -0
  558. package/src/surfaces/publish-workspace.ts +391 -0
  559. package/src/surfaces/publish.ts +18 -18
  560. package/src/surfaces/push-plan.ts +7 -8
  561. package/src/surfaces/rail.json +1 -159
  562. package/src/surfaces/rail.ts +22 -79
  563. package/src/surfaces/reference-field.ts +11 -15
  564. package/src/surfaces/schema-builder.ts +16 -22
  565. package/src/surfaces/schema-form.json +10 -2
  566. package/src/surfaces/schema-form.ts +17 -25
  567. package/src/surfaces/secret-field.ts +9 -6
  568. package/src/surfaces/seo.json +1 -1
  569. package/src/surfaces/seo.ts +21 -15
  570. package/src/surfaces/settings-contexts.ts +9 -7
  571. package/src/surfaces/settings-contributed.json +5 -5
  572. package/src/surfaces/settings-contributed.ts +32 -12
  573. package/src/surfaces/settings-css-vars.json +44 -36
  574. package/src/surfaces/settings-css-vars.ts +82 -16
  575. package/src/surfaces/settings-defs.json +2 -2
  576. package/src/surfaces/settings-defs.ts +17 -21
  577. package/src/surfaces/settings-deploy.json +2 -15
  578. package/src/surfaces/settings-deploy.ts +9 -16
  579. package/src/surfaces/settings-dialog.json +51 -0
  580. package/src/surfaces/settings-dialog.ts +169 -0
  581. package/src/surfaces/settings-extensions.ts +5 -6
  582. package/src/surfaces/settings-head.ts +33 -39
  583. package/src/surfaces/settings-locales.ts +8 -20
  584. package/src/surfaces/settings-overview.json +3 -3
  585. package/src/surfaces/settings-overview.ts +14 -8
  586. package/src/surfaces/settings-packages.ts +8 -7
  587. package/src/surfaces/settings-pane.json +269 -46
  588. package/src/surfaces/settings-pane.ts +88 -36
  589. package/src/surfaces/settings-rawjson.ts +5 -6
  590. package/src/surfaces/shell.json +2 -1
  591. package/src/surfaces/shell.ts +1 -2
  592. package/src/surfaces/site-panel.json +1029 -0
  593. package/src/surfaces/site-panel.ts +233 -0
  594. package/src/surfaces/slash-menu.json +63 -21
  595. package/src/surfaces/slash-menu.ts +42 -9
  596. package/src/surfaces/statements.ts +13 -18
  597. package/src/surfaces/statusbar.ts +56 -29
  598. package/src/surfaces/style-panel.ts +18 -31
  599. package/src/surfaces/stylebook-chrome.ts +3 -5
  600. package/src/surfaces/styles-panel.json +735 -0
  601. package/src/surfaces/styles-panel.ts +195 -0
  602. package/src/surfaces/styles-variables.json +149 -0
  603. package/src/surfaces/styles-variables.ts +145 -0
  604. package/src/surfaces/tab-strip.json +4 -4
  605. package/src/surfaces/tab-strip.ts +14 -13
  606. package/src/surfaces/target-line.ts +6 -7
  607. package/src/surfaces/welcome.ts +6 -8
  608. package/src/surfaces/writing-banner.json +94 -0
  609. package/src/surfaces/writing-banner.ts +80 -0
  610. package/src/tabs/bare-repeaters.ts +101 -0
  611. package/src/tabs/patch-ops.ts +4 -3
  612. package/src/tabs/project-config.ts +32 -21
  613. package/src/tabs/selection.ts +36 -8
  614. package/src/tabs/tab.ts +99 -48
  615. package/src/tabs/transact.ts +98 -53
  616. package/src/types.ts +53 -43
  617. package/src/ui/ai-credentials-form.ts +10 -13
  618. package/src/ui/ai-model-picker.ts +3 -3
  619. package/src/ui/cf-account-picker.ts +7 -9
  620. package/src/ui/color-selector.ts +9 -5
  621. package/src/ui/dynamic-slot.ts +7 -8
  622. package/src/ui/expression-editor.ts +112 -105
  623. package/src/ui/form-controls.ts +104 -56
  624. package/src/ui/formula-catalog.ts +239 -230
  625. package/src/ui/formula-chips.ts +33 -18
  626. package/src/ui/layers.ts +57 -31
  627. package/src/ui/media-picker.ts +300 -47
  628. package/src/ui/popover-surface.ts +20 -12
  629. package/src/ui/progress-modal.ts +13 -8
  630. package/src/ui/regions.ts +14 -12
  631. package/src/ui/schema-form.ts +372 -97
  632. package/src/ui/surface.ts +71 -8
  633. package/src/ui/timing.ts +9 -0
  634. package/src/ui/value-source.ts +44 -31
  635. package/src/ui/virtual-window.ts +29 -3
  636. package/src/utils/base64.ts +6 -4
  637. package/src/utils/edit-display.ts +366 -111
  638. package/src/utils/element-selectors.ts +3 -2
  639. package/src/utils/google-fonts.ts +15 -14
  640. package/src/utils/inherited-style.ts +18 -20
  641. package/src/utils/link-target.ts +1 -1
  642. package/src/utils/local-day.ts +18 -0
  643. package/src/utils/preview-format.ts +25 -3
  644. package/src/utils/strip-events.ts +49 -22
  645. package/src/utils/studio-utils.ts +29 -14
  646. package/src/view.ts +2 -3
  647. package/src/workspace/pane-derive.ts +14 -16
  648. package/src/workspace/session.ts +81 -50
  649. package/src/workspace/tab-workspace.ts +137 -0
  650. package/src/workspace/workspace-back.ts +189 -0
  651. package/src/workspace/workspace-home.ts +133 -0
  652. package/src/workspace/workspace-ids.ts +129 -0
  653. package/src/workspace/workspace-switch.ts +372 -0
  654. package/src/workspace/workspace.ts +165 -47
  655. package/styles/shell-frame.css +30 -7
  656. package/styles/shell-frame.json +15 -3
  657. package/dist/chunks/2020-va2wwra4.js +0 -4
  658. package/dist/chunks/adapter-f93pafd7.js +0 -4
  659. package/dist/chunks/cf-account-picker-af1h381v.js +0 -4
  660. package/dist/chunks/cf-settings-125tdm0w.js +0 -4
  661. package/dist/chunks/color-area-jqhna8zy.js +0 -4
  662. package/dist/chunks/color-field-embq5ctg.js +0 -4
  663. package/dist/chunks/color-fpezvnkt.js +0 -4
  664. package/dist/chunks/color-slider-1qmw7wqy.js +0 -4
  665. package/dist/chunks/combobox-773hdzyj.js +0 -4
  666. package/dist/chunks/components-ax2f1fnn.js +0 -4
  667. package/dist/chunks/content-source-108aqtk1.js +0 -4
  668. package/dist/chunks/convert-to-repeater-ry5rmppr.js +0 -4
  669. package/dist/chunks/dialog-mtm9fq5t.js +0 -4
  670. package/dist/chunks/editor-pfgdmkb0.js +0 -4
  671. package/dist/chunks/entry-commands-t0k1q0kx.js +0 -4
  672. package/dist/chunks/extension-sections-6mwh2hf8.js +0 -4
  673. package/dist/chunks/file-ops-meej5mqf.js +0 -4
  674. package/dist/chunks/files-44vp8a2s.js +0 -4
  675. package/dist/chunks/format-host-7q1petb9.js +0 -4
  676. package/dist/chunks/fs-events-h2mwnxaz.js +0 -4
  677. package/dist/chunks/git-panel-zngbymvd.js +0 -4
  678. package/dist/chunks/grid-view-sx9vynsp.js +0 -51
  679. package/dist/chunks/icons-p44xhjf0.js +0 -4
  680. package/dist/chunks/iframe-entry-f7mqjwpm.js +0 -5
  681. package/dist/chunks/iframe-entry-haw7jkvz.js +0 -5
  682. package/dist/chunks/iframe-entry-z6qrytv3.js +0 -5
  683. package/dist/chunks/iframe-host-qk3ycq87.js +0 -4
  684. package/dist/chunks/index-wkyfjeqz.js +0 -4
  685. package/dist/chunks/jsonMode-s8kt9dsj.js +0 -13
  686. package/dist/chunks/jx-validate-psgd7vsx.js +0 -4
  687. package/dist/chunks/layers-panel-1kq2jyfk.js +0 -4
  688. package/dist/chunks/layers-xd92fg8d.js +0 -4
  689. package/dist/chunks/listbox-s8fkmnq8.js +0 -4
  690. package/dist/chunks/lit-html-ac4cwwr4.js +0 -4
  691. package/dist/chunks/media-picker-0svzkdyb.js +0 -4
  692. package/dist/chunks/menu-37d07z9m.js +0 -4
  693. package/dist/chunks/menu-5c55ea3d.js +0 -4
  694. package/dist/chunks/monaco-binding-z6r70pdt.js +0 -4
  695. package/dist/chunks/monaco-buffer-fz6gq5y7.js +0 -4
  696. package/dist/chunks/monaco-setup-q4axkgj7.js +0 -4
  697. package/dist/chunks/notify-0xgtn8q1.js +0 -4
  698. package/dist/chunks/number-field-gw7sq8rn.js +0 -4
  699. package/dist/chunks/parse-897fvqah.js +0 -4
  700. package/dist/chunks/platform-v1qctbe6.js +0 -4
  701. package/dist/chunks/popover-8htra4er.js +0 -4
  702. package/dist/chunks/publish-panel-ym1fmgq5.js +0 -4
  703. package/dist/chunks/quick-search-a54e6t5n.js +0 -4
  704. package/dist/chunks/references-gmqp82fs.js +0 -4
  705. package/dist/chunks/right-panel-v7t9awbk.js +0 -4
  706. package/dist/chunks/section-registry-vhyf3zsr.js +0 -4
  707. package/dist/chunks/select-n3v7gwas.js +0 -4
  708. package/dist/chunks/split-pff8f3ze.js +0 -4
  709. package/dist/chunks/studio-0bhx5hz6.js +0 -5
  710. package/dist/chunks/studio-0k1ddnyy.js +0 -6
  711. package/dist/chunks/studio-1b04pd0j.js +0 -64
  712. package/dist/chunks/studio-4dwbj6gb.js +0 -5
  713. package/dist/chunks/studio-4tanh828.js +0 -5
  714. package/dist/chunks/studio-55h4mstj.js +0 -4
  715. package/dist/chunks/studio-5tnvjkz4.js +0 -5
  716. package/dist/chunks/studio-60dqgb0c.js +0 -5
  717. package/dist/chunks/studio-61dp09qg.js +0 -9
  718. package/dist/chunks/studio-63epcrj2.js +0 -5
  719. package/dist/chunks/studio-74k29dy9.js +0 -5
  720. package/dist/chunks/studio-7vg6jcd3.js +0 -5
  721. package/dist/chunks/studio-7zx31knw.js +0 -9
  722. package/dist/chunks/studio-8bxk97km.js +0 -5
  723. package/dist/chunks/studio-933e30n4.js +0 -5
  724. package/dist/chunks/studio-98wnwhbg.js +0 -5
  725. package/dist/chunks/studio-9mccjwjh.js +0 -14
  726. package/dist/chunks/studio-a2ke1e4t.js +0 -5
  727. package/dist/chunks/studio-e3a2a6v3.js +0 -4
  728. package/dist/chunks/studio-e81q1vb9.js +0 -5
  729. package/dist/chunks/studio-epgrmqqm.js +0 -5
  730. package/dist/chunks/studio-ery42sqr.js +0 -4
  731. package/dist/chunks/studio-g1shz58g.js +0 -5
  732. package/dist/chunks/studio-gf0fz03c.js +0 -5
  733. package/dist/chunks/studio-gjtpe62q.js +0 -6
  734. package/dist/chunks/studio-gkskhg7m.js +0 -5
  735. package/dist/chunks/studio-gx4dnjzd.js +0 -5
  736. package/dist/chunks/studio-j03zga3y.js +0 -9
  737. package/dist/chunks/studio-jhpxeckz.js +0 -5
  738. package/dist/chunks/studio-k01r7ykp.js +0 -5
  739. package/dist/chunks/studio-kk7h30ne.js +0 -7
  740. package/dist/chunks/studio-kt1zqney.js +0 -5
  741. package/dist/chunks/studio-m3cwhvye.js +0 -5
  742. package/dist/chunks/studio-mcayt6hz.js +0 -5
  743. package/dist/chunks/studio-myjcghv3.js +0 -5
  744. package/dist/chunks/studio-n8bxwc3y.js +0 -4
  745. package/dist/chunks/studio-ngm8gvpb.js +0 -5
  746. package/dist/chunks/studio-nj5a01jy.js +0 -928
  747. package/dist/chunks/studio-pcgz8heb.js +0 -5
  748. package/dist/chunks/studio-qcsq0t15.js +0 -5
  749. package/dist/chunks/studio-qkstvve9.js +0 -5
  750. package/dist/chunks/studio-qv1pwd3c.js +0 -5
  751. package/dist/chunks/studio-rc6dvxjb.js +0 -7
  752. package/dist/chunks/studio-s8dmmz66.js +0 -5
  753. package/dist/chunks/studio-sp5xzbj4.js +0 -6
  754. package/dist/chunks/studio-szsjbj0g.js +0 -5
  755. package/dist/chunks/studio-t1xzawhr.js +0 -16
  756. package/dist/chunks/studio-tdcprbqb.js +0 -5
  757. package/dist/chunks/studio-vrmcjf9g.js +0 -7
  758. package/dist/chunks/studio-vyc0b4he.js +0 -10
  759. package/dist/chunks/studio-w0cgf6jg.js +0 -5
  760. package/dist/chunks/studio-w3hskzqk.js +0 -5
  761. package/dist/chunks/studio-xgrgcdyh.js +0 -9
  762. package/dist/chunks/studio-xz2yxfcb.js +0 -5
  763. package/dist/chunks/studio-y6n42tgs.js +0 -5
  764. package/dist/chunks/studio-yb560vxr.js +0 -5
  765. package/dist/chunks/studio-yn9f8vtx.js +0 -5
  766. package/dist/chunks/studio-yw05w8f0.js +0 -7
  767. package/dist/chunks/studio-z16sgavc.js +0 -5
  768. package/dist/chunks/studio-zey7zsdw.js +0 -12
  769. package/dist/chunks/studio-zyqn40w4.js +0 -5
  770. package/dist/chunks/swatch-group-8qh9a3bm.js +0 -4
  771. package/dist/chunks/tabs-jwthg40w.js +0 -4
  772. package/dist/chunks/textfield-spy3hc77.js +0 -4
  773. package/dist/chunks/toast-4d35zd64.js +0 -4
  774. package/dist/chunks/toast-host-8sjmfed3.js +0 -4
  775. package/dist/chunks/tooltip-fd6g9xy3.js +0 -4
  776. package/dist/chunks/tree-h19v1jfz.js +0 -4
  777. package/dist/chunks/tsMode-2frah6h1.js +0 -14
  778. package/dist/chunks/workspace-zt81g1ms.js +0 -4
  779. package/dist/chunks/ws-client-n2bh4hkf.js +0 -4
  780. package/src/panels/frontmatter-panel.ts +0 -701
  781. package/src/panels/git-panel.ts +0 -1120
  782. package/src/surfaces/doc-header.json +0 -776
  783. package/src/surfaces/doc-header.ts +0 -231
  784. package/src/surfaces/git-panel.json +0 -1880
  785. package/src/surfaces/git-panel.ts +0 -272
@@ -1,5 +0,0 @@
1
- var e=new Set;function DE(r){return e.add(r),()=>e.delete(r)}function NE(){let r=[];for(let t of e)try{let o=t();if(o)r.push(o)}catch{}return r}
2
- export{DE,NE};
3
-
4
- //# debugId=89F302B023695E9164756E2164756E21
5
- //# sourceMappingURL=studio-4dwbj6gb.js.map
@@ -1,5 +0,0 @@
1
- import{p}from"./studio-xz2yxfcb.js";import{hi}from"./studio-zyqn40w4.js";import{Ao}from"./studio-pcgz8heb.js";import{Ji,Tp,$L,IL}from"./studio-gx4dnjzd.js";var r=new Map,d=new Map,a=new Map;function l(e,t){let n=$L(e),i=a.get(e);return{bytes:typeof t?.size==="number"?t.size:null,ext:Ji(n),height:i?.height??null,kind:Tp({name:n}),modified:t?.modified??null,name:n,path:e,width:i?.width??null}}function xb(e){return r.get(hi(e))??null}function OE(e){for(let t of e){if(t.type!=="file")continue;let n=hi(t.path);if(!r.has(n))r.set(n,l(n,t))}}async function AE(e){let t=hi(e),n=r.get(t);if(n)return n;let i=d.get(t);if(i)return i;let o=(async()=>{let u;try{u=(await Ao(()=>p().listDirectory(IL(t)))).find((f)=>hi(f.path)===t)}catch{u=void 0}return l(t,u)})();d.set(t,o);let s=await o;return d.delete(t),r.set(t,s),s}function _b(e,t,n){if(!(t>0&&n>0))return!1;let i=hi(e),o=a.get(i);if(o&&o.width===t&&o.height===n)return!1;a.set(i,{height:n,width:t});let s=r.get(i);if(s)r.set(i,{...s,height:n,width:t});return!0}function PE(){r.clear(),a.clear()}function DS(e){if(e<1024)return`${e} B`;if(e<1048576)return`${Math.round(e/1024)} KB`;return`${(e/1048576).toFixed(1)} MB`}function ME(e){if(!e)return"";let t=[];if(e.width!==null&&e.height!==null)t.push(`${e.width} × ${e.height}`);if(e.bytes!==null)t.push(DS(e.bytes));return t.join(" · ")}
2
- export{xb,OE,AE,_b,PE,DS,ME};
3
-
4
- //# debugId=30D55BA934B6A8A764756E2164756E21
5
- //# sourceMappingURL=studio-4tanh828.js.map
@@ -1,4 +0,0 @@
1
- function q(e){let t=Object.create(null);for(let n of e.split(","))t[n]=1;return(n)=>(n in t)}var F=Object.assign;var je=Object.prototype.hasOwnProperty,j=(e,t)=>je.call(e,t),A=Array.isArray,k=(e)=>he(e)==="[object Map]";var de=(e)=>typeof e==="function",He=(e)=>typeof e==="string",R=(e)=>typeof e==="symbol",O=(e)=>e!==null&&typeof e==="object";var Ue=Object.prototype.toString,he=(e)=>Ue.call(e),me=(e)=>he(e).slice(8,-1);var H=(e)=>He(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e;var U=(e)=>{let t=Object.create(null);return(n)=>t[n]||(t[n]=e(n))},Ke=/-\w/g,ht=U((e)=>e.replace(Ke,(t)=>t.slice(1).toUpperCase())),ze=/\B([A-Z])/g,gt=U((e)=>e.replace(ze,"-$1").toLowerCase()),_e=U((e)=>e.charAt(0).toUpperCase()+e.slice(1)),mt=U((e)=>e?`on${_e(e)}`:""),E=(e,t)=>!Object.is(e,t);var We="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly";var _t=q(We+",async,autofocus,autoplay,controls,default,defer,disabled,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected");var d;class Ee{constructor(e=!1){if(this.detached=e,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!e&&d)if(d.active)this.parent=d,this.index=(d.scopes||(d.scopes=[])).push(this)-1;else this._active=!1,this._warnOnRun=!1}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let e,t;if(this.scopes){let n=this.scopes.slice();for(e=0,t=n.length;e<t;e++)n[e].pause()}for(e=0,t=this.effects.length;e<t;e++)this.effects[e].pause()}}resume(){if(this._active){if(this._isPaused){this._isPaused=!1;let e,t;if(this.scopes){let r=this.scopes.slice();for(e=0,t=r.length;e<t;e++)r[e].resume()}let n=this.effects.slice();for(e=0,t=n.length;e<t;e++)n[e].resume()}}}run(e){if(this._active){let t=d;try{return d=this,e()}finally{d=t}}}on(){if(++this._on===1)this.prevScope=d,d=this}off(){if(this._on>0&&--this._on===0){if(d===this)d=this.prevScope;else{let e=d;while(e){if(e.prevScope===this){e.prevScope=this.prevScope;break}e=e.prevScope}}this.prevScope=void 0}}stop(e){if(this._active){this._active=!1;let t,n;for(t=0,n=this.effects.length;t<n;t++)this.effects[t].stop();this.effects.length=0;for(t=0,n=this.cleanups.length;t<n;t++)this.cleanups[t]();if(this.cleanups.length=0,this.scopes){let r=this.scopes.slice();for(t=0,n=r.length;t<n;t++)r[t].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!e){let r=this.parent.scopes.pop();if(r&&r!==this)this.parent.scopes[this.index]=r,r.index=this.index}this.parent=void 0}}}function ge(e){return new Ee(e)}function dl(e,t=!1){if(d)d.cleanups.push(e)}var f;var X=new WeakSet;class W{constructor(e){if(this.fn=e,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,d)if(d.active)d.effects.push(this);else this.flags&=-2}pause(){this.flags|=64}resume(){if(this.flags&64){if(this.flags&=-65,X.has(this))X.delete(this),this.trigger()}}notify(){if(this.flags&2&&!(this.flags&32))return;if(!(this.flags&8))Se(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,ye(this),we(this);let e=f,t=m;f=this,m=!0;try{return this.fn()}finally{Te(this),f=e,m=t,this.flags&=-3}}stop(){if(this.flags&1){for(let e=this.deps;e;e=e.nextDep)ae(e);this.deps=this.depsTail=void 0,ye(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){if(this.flags&64)X.add(this);else if(this.scheduler)this.scheduler();else this.runIfDirty()}runIfDirty(){if(ee(this))this.run()}get dirty(){return ee(this)}}var be=0,M,L;function Se(e,t=!1){if(e.flags|=8,t){e.next=L,L=e;return}e.next=M,M=e}function re(){be++}function se(){if(--be>0)return;if(L){let t=L;L=void 0;while(t){let n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;while(M){let t=M;M=void 0;while(t){let n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(r){if(!e)e=r}t=n}}if(e)throw e}function we(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Te(e){let t,n=e.depsTail,r=n;while(r){let i=r.prevDep;if(r.version===-1){if(r===n)n=i;ae(r),Ge(r)}else t=r;r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=i}e.deps=t,e.depsTail=n}function ee(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Ne(t.dep.computed)||t.dep.version!==t.version))return!0;if(e._dirty)return!0;return!1}function Ne(e){if(e.flags&4&&!(e.flags&16))return;if(e.flags&=-17,e.globalVersion===P)return;if(e.globalVersion=P,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!ee(e)))return;e.flags|=2;let t=e.dep,n=f,r=m;f=e,m=!0;try{we(e);let i=e.fn(e._value);if(t.version===0||E(i,e._value))e.flags|=128,e._value=i,t.version++}catch(i){throw t.version++,i}finally{f=n,m=r,Te(e),e.flags&=-3}}function ae(e,t=!1){let{dep:n,prevSub:r,nextSub:i}=e;if(r)r.nextSub=i,e.prevSub=void 0;if(i)i.prevSub=r,e.nextSub=void 0;if(n.subs===e){if(n.subs=r,!r&&n.computed){n.computed.flags&=-5;for(let s=n.computed.deps;s;s=s.nextDep)ae(s,!0)}}if(!t&&!--n.sc&&n.map)n.map.delete(n.key)}function Ge(e){let{prevDep:t,nextDep:n}=e;if(t)t.nextDep=n,e.prevDep=void 0;if(n)n.prevDep=t,e.nextDep=void 0}function Q(e,t){if(e.effect instanceof W)e=e.effect.fn;let n=new W(e);if(t)F(n,t);try{n.run()}catch(i){throw n.stop(),i}let r=n.run.bind(n);return r.effect=n,r}var m=!0,xe=[];function wh(){xe.push(m),m=!1}function xh(){let e=xe.pop();m=e===void 0?!0:e}function a_(e,t=!1){if(f instanceof W)f.cleanup=e}function ye(e){let{cleanup:t}=e;if(e.cleanup=void 0,t){let n=f;f=void 0;try{t()}finally{f=n}}}var P=0;class Ae{constructor(e,t){this.sub=e,this.dep=t,this.version=t.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class Y{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(e){if(!f||!m||f===this.computed)return;let t=this.activeLink;if(t===void 0||t.sub!==f){if(t=this.activeLink=new Ae(f,this),!f.deps)f.deps=f.depsTail=t;else t.prevDep=f.depsTail,f.depsTail.nextDep=t,f.depsTail=t;Re(t)}else if(t.version===-1){if(t.version=this.version,t.nextDep){let n=t.nextDep;if(n.prevDep=t.prevDep,t.prevDep)t.prevDep.nextDep=n;if(t.prevDep=f.depsTail,t.nextDep=void 0,f.depsTail.nextDep=t,f.depsTail=t,f.deps===t)f.deps=n}}return t}trigger(e){this.version++,P++,this.notify(e)}notify(e){re();try{for(let t=this.subs;t;t=t.prevSub)if(t.sub.notify())t.sub.dep.notify()}finally{se()}}}function Re(e){if(e.dep.sc++,e.sub.flags&4){let t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let r=t.deps;r;r=r.nextDep)Re(r)}let n=e.dep.subs;if(n!==e){if(e.prevSub=n,n)n.nextSub=e}e.dep.subs=e}}var te=new WeakMap,N=Symbol(""),ne=Symbol(""),V=Symbol("");function h(e,t,n){if(m&&f){let r=te.get(e);if(!r)te.set(e,r=new Map);let i=r.get(n);if(!i)r.set(n,i=new Y),i.map=r,i.key=n;i.track()}}function w(e,t,n,r,i,s){let o=te.get(e);if(!o){P++;return}let a=(c)=>{if(c)c.trigger()};if(re(),t==="clear")o.forEach(a);else{let c=A(e),l=c&&H(n);if(c&&n==="length"){let u=Number(r);o.forEach((p,g)=>{if(g==="length"||g===V||!R(g)&&g>=u)a(p)})}else{if(n!==void 0||o.has(void 0))a(o.get(n));if(l)a(o.get(V));switch(t){case"add":if(!c){if(a(o.get(N)),k(e))a(o.get(ne))}else if(l)a(o.get("length"));break;case"delete":if(!c){if(a(o.get(N)),k(e))a(o.get(ne))}break;case"set":if(k(e))a(o.get(N));break}}}se()}function D(e){let t=oe(e);if(t===e)return t;if(h(t,"iterate",V),T(e))return t;if(!S(e))return t.map(v);return ng(e)?t.map((n)=>x(v(n))):t.map(x)}function ce(e){return h(e=oe(e),"iterate",V),e}function _(e,t){if(S(e))return ng(e)?x(v(t)):x(t);return v(t)}var $e={__proto__:null,[Symbol.iterator](){return J(this,Symbol.iterator,(e)=>_(this,e))},concat(...e){return D(this).concat(...e.map((t)=>A(t)?D(t):t))},entries(){return J(this,"entries",(e)=>(e[1]=_(this,e[1]),e))},every(e,t){return b(this,"every",e,t,void 0,arguments)},filter(e,t){return b(this,"filter",e,t,(n)=>n.map((r)=>_(this,r)),arguments)},find(e,t){return b(this,"find",e,t,(n)=>_(this,n),arguments)},findIndex(e,t){return b(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return b(this,"findLast",e,t,(n)=>_(this,n),arguments)},findLastIndex(e,t){return b(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return b(this,"forEach",e,t,void 0,arguments)},includes(...e){return Z(this,"includes",e)},indexOf(...e){return Z(this,"indexOf",e)},join(e){return D(this).join(e)},lastIndexOf(...e){return Z(this,"lastIndexOf",e)},map(e,t){return b(this,"map",e,t,void 0,arguments)},pop(){return I(this,"pop")},push(...e){return I(this,"push",e)},reduce(e,...t){return ve(this,"reduce",e,t)},reduceRight(e,...t){return ve(this,"reduceRight",e,t)},shift(){return I(this,"shift")},some(e,t){return b(this,"some",e,t,void 0,arguments)},splice(...e){return I(this,"splice",e)},toReversed(){return D(this).toReversed()},toSorted(e){return D(this).toSorted(e)},toSpliced(...e){return D(this).toSpliced(...e)},unshift(...e){return I(this,"unshift",e)},values(){return J(this,"values",(e)=>_(this,e))}};function J(e,t,n){let r=ce(e),i=r[t]();if(r!==e&&!T(e))i._next=i.next,i.next=()=>{let s=i._next();if(!s.done)s.value=n(s.value);return s};return i}var Ye=Array.prototype;function b(e,t,n,r,i,s){let o=ce(e),a=o!==e&&!T(e),c=o[t];if(c!==Ye[t]){let p=c.apply(e,s);return a?v(p):p}let l=n;if(o!==e){if(a)l=function(p,g){return n.call(this,_(e,p),g,e)};else if(n.length>2)l=function(p,g){return n.call(this,p,g,e)}}let u=c.call(o,l,r);return a&&i?i(u):u}function ve(e,t,n,r){let i=ce(e),s=i!==e&&!T(e),o=n,a=!1;if(i!==e){if(s)a=r.length===0,o=function(l,u,p){if(a)a=!1,l=_(e,l);return n.call(this,l,_(e,u),p,e)};else if(n.length>3)o=function(l,u,p){return n.call(this,l,u,p,e)}}let c=i[t](o,...r);return a?_(e,c):c}function Z(e,t,n){let r=oe(e);h(r,"iterate",V);let i=r[t](...n);if((i===-1||i===!1)&&ot(n[0]))return n[0]=oe(n[0]),r[t](...n);return i}function I(e,t,n=[]){wh(),re();let r=oe(e)[t].apply(e,n);return se(),xh(),r}var Be=q("__proto__,__v_isRef,__isVue"),Oe=new Set(Object.getOwnPropertyNames(Symbol).filter((e)=>e!=="arguments"&&e!=="caller").map((e)=>Symbol[e]).filter(R));function qe(e){if(!R(e))e=String(e);let t=oe(this);return h(t,"has",e),t.hasOwnProperty(e)}class le{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,n){if(t==="__v_skip")return e.__v_skip;let r=this._isReadonly,i=this._isShallow;if(t==="__v_isReactive")return!r;else if(t==="__v_isReadonly")return r;else if(t==="__v_isShallow")return i;else if(t==="__v_raw"){if(n===(r?i?rt:Ie:i?Ce:ke).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(n))return e;return}let s=A(e);if(!r){let a;if(s&&(a=$e[t]))return a;if(t==="hasOwnProperty")return qe}let o=Reflect.get(e,t,eu(e)?e:n);if(R(t)?Oe.has(t):Be(t))return o;if(!r)h(e,"get",t);if(i)return o;if(eu(o)){let a=s&&H(t)?o:o.value;return r&&O(a)?G(a):a}if(O(o))return r?G(o):y(o);return o}}class fe extends le{constructor(e=!1){super(!1,e)}set(e,t,n,r){let i=e[t],s=A(e)&&H(t);if(!this._isShallow){let c=S(i);if(!T(n)&&!S(n))i=oe(i),n=oe(n);if(!s&&eu(i)&&!eu(n))if(c)return!0;else return i.value=n,!0}let o=s?Number(t)<e.length:j(e,t),a=Reflect.set(e,t,n,eu(e)?e:r);if(e===oe(r)&&a){if(!o)w(e,"add",t,n);else if(E(n,i))w(e,"set",t,n,i)}return a}deleteProperty(e,t){let n=j(e,t),r=e[t],i=Reflect.deleteProperty(e,t);if(i&&n)w(e,"delete",t,void 0,r);return i}has(e,t){let n=Reflect.has(e,t);if(!R(t)||!Oe.has(t))h(e,"has",t);return n}ownKeys(e){return h(e,"iterate",A(e)?"length":N),Reflect.ownKeys(e)}}class De extends le{constructor(e=!1){super(!0,e)}set(e,t){return!0}deleteProperty(e,t){return!0}}var Xe=new fe,Je=new De,Ze=new fe(!0);var ie=(e)=>e,K=(e)=>Reflect.getPrototypeOf(e);function Qe(e,t,n){return function(...r){let i=this.__v_raw,s=oe(i),o=k(s),a=e==="entries"||e===Symbol.iterator&&o,c=e==="keys"&&o,l=i[e](...r),u=n?ie:t?x:v;return!t&&h(s,"iterate",c?ne:N),F(Object.create(l),{next(){let{value:p,done:g}=l.next();return g?{value:p,done:g}:{value:a?[u(p[0]),u(p[1])]:u(p),done:g}}})}}function z(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function et(e,t){let n={get(i){let s=this.__v_raw,o=oe(s),a=oe(i);if(!e){if(E(i,a))h(o,"get",i);h(o,"get",a)}let{has:c}=K(o),l=t?ie:e?x:v;if(c.call(o,i))return l(s.get(i));else if(c.call(o,a))return l(s.get(a));else if(s!==o)s.get(i)},get size(){let i=this.__v_raw;return!e&&h(oe(i),"iterate",N),i.size},has(i){let s=this.__v_raw,o=oe(s),a=oe(i);if(!e){if(E(i,a))h(o,"has",i);h(o,"has",a)}return i===a?s.has(i):s.has(i)||s.has(a)},forEach(i,s){let o=this,a=o.__v_raw,c=oe(a),l=t?ie:e?x:v;return!e&&h(c,"iterate",N),a.forEach((u,p)=>i.call(s,l(u),l(p),o))}};return F(n,e?{add:z("add"),set:z("set"),delete:z("delete"),clear:z("clear")}:{add(i){let s=oe(this),o=K(s),a=oe(i),c=!t&&!T(i)&&!S(i)?a:i;if(!(o.has.call(s,c)||E(i,c)&&o.has.call(s,i)||E(a,c)&&o.has.call(s,a)))s.add(c),w(s,"add",c,c);return this},set(i,s){if(!t&&!T(s)&&!S(s))s=oe(s);let o=oe(this),{has:a,get:c}=K(o),l=a.call(o,i);if(!l)i=oe(i),l=a.call(o,i);let u=c.call(o,i);if(o.set(i,s),!l)w(o,"add",i,s);else if(E(s,u))w(o,"set",i,s,u);return this},delete(i){let s=oe(this),{has:o,get:a}=K(s),c=o.call(s,i);if(!c)i=oe(i),c=o.call(s,i);let l=a?a.call(s,i):void 0,u=s.delete(i);if(c)w(s,"delete",i,void 0,l);return u},clear(){let i=oe(this),s=i.size!==0,o=void 0,a=i.clear();if(s)w(i,"clear",void 0,void 0,void 0);return a}}),["keys","values","entries",Symbol.iterator].forEach((i)=>{n[i]=Qe(i,e,t)}),n}function ue(e,t){let n=et(e,t);return(r,i,s)=>{if(i==="__v_isReactive")return!e;else if(i==="__v_isReadonly")return e;else if(i==="__v_raw")return r;return Reflect.get(j(n,i)&&i in r?n:r,i,s)}}var tt={get:ue(!1,!1)},nt={get:ue(!1,!0)},it={get:ue(!0,!1)};var ke=new WeakMap,Ce=new WeakMap,Ie=new WeakMap,rt=new WeakMap;function st(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function y(e){if(S(e))return e;return pe(e,!1,Xe,tt,ke)}function tg(e){return pe(e,!1,Ze,nt,Ce)}function G(e){return pe(e,!0,Je,it,Ie)}function pe(e,t,n,r,i){if(!O(e))return e;if(e.__v_raw&&!(t&&e.__v_isReactive))return e;if(e.__v_skip||!Object.isExtensible(e))return e;let s=i.get(e);if(s)return s;let o=st(me(e));if(o===0)return e;let a=new Proxy(e,o===2?r:n);return i.set(e,a),a}function ng(e){if(S(e))return ng(e.__v_raw);return!!(e&&e.__v_isReactive)}function S(e){return!!(e&&e.__v_isReadonly)}function T(e){return!!(e&&e.__v_isShallow)}function ot(e){return e?!!e.__v_raw:!1}function oe(e){let t=e&&e.__v_raw;return t?oe(t):e}var v=(e)=>O(e)?y(e):e,x=(e)=>O(e)?G(e):e;function eu(e){return e?e.__v_isRef===!0:!1}function ul(e){return Me(e,!1)}function hl(e){return Me(e,!0)}function Me(e,t){if(eu(e))return e;return new Le(e,t)}class Le{constructor(e,t){this.dep=new Y,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=t?e:oe(e),this._value=t?e:v(e),this.__v_isShallow=t}get value(){return this.dep.track(),this._value}set value(e){let t=this._rawValue,n=this.__v_isShallow||T(e)||S(e);if(e=n?e:oe(e),E(e,t))this._rawValue=e,this._value=n?e:v(e),this.dep.trigger()}}class Pe{constructor(e,t,n){this.fn=e,this.setter=t,this._value=void 0,this.dep=new Y(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=P-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!t,this.isSSR=n}notify(){if(this.flags|=16,!(this.flags&8)&&f!==this)return Se(this,!0),!0}get value(){let e=this.dep.track();if(Ne(this),e)e.version=this.dep.version;return this._value}set value(e){if(this.setter)this.setter(e)}}function tu(e,t,n=!1){let r,i;if(de(e))r=e;else r=e.get,i=e.set;return new Pe(r,i,n)}var at={assertive:"jx-live-assertive",polite:"jx-live-polite"};function ct(e){if(typeof document>"u")return null;let t=at[e],n=document.querySelector(`#${t}`);if(n)return n;let r=document.createElement("div");return r.id=t,r.setAttribute("aria-live",e),r.setAttribute("role",e==="assertive"?"alert":"status"),r.setAttribute("aria-atomic","true"),r.style.cssText="position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap;border:0",document.body.append(r),r}function tv(e,t="polite"){if(e==="")return;let n=ct(t);if(!n)return;n.textContent="",setTimeout(()=>{n.textContent=e},0)}var Ve=null;function jr(){return Ve??Date.now()}function KR(e){let t=e instanceof Date?e.getTime():typeof e==="number"?e:Date.parse(e);if(!Number.isFinite(t))throw TypeError(`clock: cannot pin to ${JSON.stringify(e)}`);return Ve=t,t}var lt={error:"problem",info:"toast",success:"toast",warn:"toast"},ft={error:8000,info:4000,success:4000,warn:8000},Fe=0;function ut(){return Fe+=1,`n${Fe}`}var Wc=y([]),ks=y([]),pt=4;function dt(e){return e==="problem"?ks:Wc}function C(e,t,n={}){let r=n.tier??lt[e],i={at:jr(),id:ut(),message:t,severity:e,tier:r,...n.action===void 0?{}:{action:n.action},...n.actionArgs===void 0?{}:{actionArgs:n.actionArgs},...n.detail===void 0?{}:{detail:n.detail},...n.source===void 0?{}:{source:n.source},...n.path===void 0?{}:{path:n.path},...n.key===void 0?{}:{key:n.key},...r==="toast"?{timeoutMs:n.timeoutMs??ft[e]}:{}},s=dt(r);if(i.key!==void 0){let o=s.findIndex((a)=>a.key===i.key);if(o!==-1)s.splice(o,1)}if(s.push(i),r==="toast")while(Wc.length>pt)Wc.shift();return tv(i.source===void 0?i.message:`${i.source}: ${i.message}`,e==="error"?"assertive":"polite"),i}function B(e){return(t,n={})=>C(e,t,n)}C.success=B("success");C.info=B("info");C.warn=B("warn");C.error=B("error");function nu(e){for(let t of[Wc,ks]){let n=t.findIndex((r)=>r.id===e);if(n!==-1)return t.splice(n,1),!0}return!1}function pl(e){let t=e?ks.filter((r)=>!e(r)):[],n=ks.length-t.length;return ks.splice(0,ks.length,...t),n}function _h(e){let t=[];for(let n of ks){if(n.source!==e)continue;let r={message:n.message,severity:n.severity};if(n.detail!==void 0)r.detail=n.detail;if(n.path!==void 0)r.path=n.path;if(n.key!==void 0)r.key=n.key;if(n.action!==void 0)r.action=n.action;if(n.actionArgs!==void 0)r.actionArgs=n.actionArgs;t.push(r)}return t}function ig(e){return e===void 0?ks.length:ks.filter((t)=>t.severity===e).length}export{ge,dl,Q,wh,xh,a_,y,tg,ng,oe,eu,ul,hl,tu,tv,jr,KR,Wc,ks,C,nu,pl,_h,ig};
2
-
3
- //# debugId=E3AE6575B63BEEB364756E2164756E21
4
- //# sourceMappingURL=studio-55h4mstj.js.map
@@ -1,5 +0,0 @@
1
- import{p}from"./studio-xz2yxfcb.js";import{me}from"./studio-pre0skq6.js";var s=null,y=null,h=null,g=!1;function E(n){return h=n,g=!0,s?P():Promise.resolve()}async function P(){if(!g)return;g=!1;try{let{applyProjectSchemas:n}=await (me("q4axkgj7"),import("./monaco-setup-q4axkgj7.js"));n(h)}catch{}}function Vp(){if(s)return Promise.resolve(s);return y??=(async()=>{let[n]=await Promise.all([(me("pfgdmkb0"),import("./editor-pfgdmkb0.js")),(me("q4axkgj7"),import("./monaco-setup-q4axkgj7.js"))]);return s=n,await P(),s})(),y}function mh(){return s}function zm(n,t,o){if(!n?.isConnected||t)return!1;return o()}var r=[],l=null;function Kt(){if(!l)l=(async()=>{try{r=await p().listFormats?.()??[]}catch{r=[]}return r})();return l}function Jd(){l=null,r=[],m=null,a=[],d=null,c=[]}var a=[],m=null;function Yd(){if(!m)m=(async()=>{try{a=await p().listExtensions?.()??[]}catch{a=[]}return a})();return m}function Um(){return a}var c=[],d=null;function F(){if(!d)d=(async()=>{try{c=await p().listExtensionCatalog?.()??[]}catch{c=[]}return c})();return d}function qy(){return c}async function M(n){let t=null;try{t=await n.fetchProjectSchemas?.()??null}catch{}E(t),await (me("psgd7vsx"),import("./jx-validate-psgd7vsx.js")).then(({applyProjectSchemas:o})=>o(t)).catch(()=>!1)}function rl(n){M(n),F(),(me("6mwh2hf8"),import("./extension-sections-6mwh2hf8.js")).then(({syncExtensionSettingsSections:t})=>t()).catch(()=>{})}function zp(){return r}function Ys(n,t){let o=n.startsWith(".")?n.toLowerCase():`.${n.toLowerCase()}`;return r.find((e)=>e.extensions.includes(o)&&(!t||e.capabilities[t]))}function _i(n){if(!n)return;return r.find((t)=>t.name===n)}function Up(n){return Error(`No format class imported for "${n}" — add one to project.json imports `+`(e.g. "Markdown": "@jxsuite/parser/Markdown.class.json") and make sure the project's dependencies are installed`)}function Qt(n){if(!n)return;let t=n.lastIndexOf(".");if(t===-1)return;return Ys(n.slice(t))}function ol(n){let t=new Set;for(let o of r){if(n&&!o.documentKinds.includes(n))continue;for(let e of o.extensions)t.add(e)}return t.delete(".json"),[...t]}function Fo(){return r.find((n)=>n.capabilities.serialize&&n.documentKinds.includes("content"))}async function k(n){let t=p();if(!t.formatAction)throw Error("Platform does not support format actions");return t.formatAction(n)}async function E1(n,t,o){return await k({action:"parse",format:n,options:o,source:t})}async function Zs(n,t,o){return await k({action:"serialize",doc:t,format:n,options:o})}function T1(n,t){let o=n?.studio?.documentMode,e=o?.componentWhen;if(e?.frontmatterKey){let i=t[e.frontmatterKey],u=e.matches?new RegExp(e.matches):/./;if(typeof i==="string"&&u.test(i))return{document:t,frontmatter:{},mode:"component"}}if(o?.default==="component")return{document:t,frontmatter:{},mode:"component"};let f=t.children??[];if(f.length===0)f.push({children:[],tagName:"p"});let S=new Set(["state","imports"]),x={children:f},w={};for(let[i,u]of Object.entries(t)){if(i==="children")continue;if(S.has(i))x[i]=u;else w[i]=u}return{document:x,frontmatter:w,mode:"content"}}
2
- export{Vp,mh,zm,Kt,Jd,Yd,Um,qy,rl,zp,Ys,_i,Up,Qt,ol,Fo,E1,Zs,T1};
3
-
4
- //# debugId=4CBCEEA8FB29FF3264756E2164756E21
5
- //# sourceMappingURL=studio-5tnvjkz4.js.map
@@ -1,5 +0,0 @@
1
- import{pn,an,ne}from"./studio-9mccjwjh.js";import{p}from"./studio-xz2yxfcb.js";import{No}from"./studio-tdcprbqb.js";import{y}from"./studio-55h4mstj.js";import{ot,zt,T,I,An,Ct}from"./studio-g1shz58g.js";import{Ld,pT,hm,eC,fT,va,vp}from"./studio-yw05w8f0.js";import{Uf,K0}from"./studio-933e30n4.js";import{D}from"./studio-yn9f8vtx.js";import{me}from"./studio-pre0skq6.js";function Ga(e){let t=e.trim().replaceAll("\\","/").split("/").filter((n)=>n!=="");return t.some((n)=>n==="."||n==="..")?null:t.join("/")}var P={$schema:"https://jxsuite.com/schema/v1",$id:"StudioPublish",$description:"Publish: the one-click Cloudflare Pages flow, as a `jx-dialog` over the kit. Eight bodies, one at a time, because the reader is at exactly one point of a chain — a host that cannot reach Cloudflare at all, a question still in flight, a connection that lapsed, an invitation to connect, a stored token Cloudflare refused, a field to paste a replacement into, the create-and-connect form, and the connected status. `publish/publish-panel.ts` keeps every one of those decisions and the calls that settle them; this document knows only which of the eight it was told to draw. **The token is never painted.** The field below binds no `value` — it is written by the reader and read once, on its way to storage — so a stored secret cannot reach the attribute, the serialised HTML or the accessibility tree, which is `studio.md` §15 rule 1 written as a missing binding rather than as a rule somebody remembers.",tagName:"jx-dialog",$props:{headline:"Publish",confirmLabel:"",cancelLabel:"Close",size:"md"},attributes:{part:"publish"},oncancel:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/closed"},value:[]}]},onclose:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/closed"},value:[]}]},style:{$description:"What the five `.publish-*` names carried, keyed on `part`, and most of them do not survive the move. `.publish-modal` and its `.new-project-modal` base were a fixed card, a scroll body, a border, a shadow and a `z-index: 1000` — a modal `<dialog>` is every one of those, and the top layer is what the z-index was climbing towards. `.publish-field` was a label stacked over a control, which is `jx-field`'s whole shape. What is left is the column gap between bodies, the two button rows, the hint and the refusal. Nothing here uses `--spectrum-*`: those custom properties resolve only inside `<sp-theme>`, and a document mounted in a layer host is outside it, so each would silently have taken its hard-coded fallback.",'& [part="body"]':{display:"flex",flexDirection:"column",gap:"var(--jx-space-3)"},'& [part="note"], & [part="status-line"], & [part="deployment"]':{margin:"0",lineHeight:"1.5"},'& [part="rows"]':{display:"flex",flexDirection:"column",gap:"var(--jx-space-3)"},'& [part="actions"]':{$description:'Wraps rather than overflows (studio-ui-guidelines.md §4.6): two buttons whose labels are whole phrases — "Verify & Connect", "Preferences › Accounts" — are wider than a narrow dialog at the sizes a reader may have set.',display:"flex",flexWrap:"wrap",gap:"var(--jx-space-2)"},'& [part="submit"]':{alignSelf:"flex-start"},'& [part="hint"]':{$description:"Publishing rides every commit, so the connected body's only job is to say what is already happening. Dim, because it is a standing fact rather than something to act on.",margin:"0",color:"var(--fg-dim)",fontSize:"var(--jx-text-sm)"},'& [part="failure"]':{$description:'`failure` and not `error`: `jx-textfield` and `jx-select` each draw a `[part="error"]` of their own inside this same tree, and the kit is light DOM — a scoped rule on that name would restyle the token field\'s refusal line too.',margin:"0",color:"var(--danger)",lineHeight:"1.5"},'& [part="link"], & [part="install-link"]':{color:"var(--accent)",textDecoration:"underline"},"& code":{fontFamily:"var(--font-mono)",fontSize:"var(--jx-text-sm)"}},children:[{tagName:"div",attributes:{part:"body"},children:[{tagName:"div",attributes:{part:"body-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/body"},cases:{unsupported:{tagName:"p",attributes:{part:"note"},children:["This platform cannot reach the Cloudflare API. Publish by committing and pushing — your host builds ",{tagName:"code",textContent:"bunx jx build"}," and serves ",{tagName:"code",textContent:"dist/"},"."]},loading:{tagName:"p",attributes:{part:"note"},textContent:"Checking Cloudflare connection…"},lapsed:{tagName:"div",attributes:{part:"lapsed",role:"none"},style:{display:"contents"},children:[{tagName:"p",attributes:{part:"note"},textContent:"Your Cloudflare connection has expired, so publishing cannot reach your account. Reconnect to restore it — this site's Pages project and its settings are untouched."},{tagName:"jx-button",$props:{variant:"accent",disabled:{$ref:"#/state/busy"}},attributes:{part:"reconnect"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/connect"},value:[]}]},children:[{tagName:"span",textContent:"${state.connectLabel}"}]}]},hosted:{tagName:"div",attributes:{part:"hosted",role:"none"},style:{display:"contents"},children:[{tagName:"p",attributes:{part:"note"},textContent:"Connect your Cloudflare account to publish this site."},{tagName:"jx-button",$props:{disabled:{$ref:"#/state/busy"}},attributes:{part:"connect"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/connect"},value:[]}]},children:[{tagName:"span",textContent:"Connect Cloudflare"}]}]},stored:{tagName:"div",attributes:{part:"stored",role:"none"},style:{display:"contents"},children:[{tagName:"p",attributes:{part:"note"},textContent:"A Cloudflare API token is stored on this machine, and Cloudflare did not accept it. It may have been revoked, or it may be missing the Account Settings Read and Pages Read/Write permissions."},{tagName:"div",attributes:{part:"actions"},children:[{tagName:"jx-button",$props:{disabled:{$ref:"#/state/busy"}},attributes:{part:"replace"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/replace"},value:[]}]},children:[{tagName:"span",textContent:"Replace token"}]},{tagName:"jx-button",$props:{quiet:!0},attributes:{part:"accounts"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/openAccounts"},value:[]}]},children:[{tagName:"span",textContent:"Preferences › Accounts"}]}]}]},token:{tagName:"div",attributes:{part:"token-form",role:"none"},style:{display:"contents"},children:[{tagName:"p",attributes:{part:"note"},textContent:"Paste a Cloudflare API token (permissions: Account Settings Read, Pages Read/Write). It is stored on this machine and only sent to the same-origin proxy — Studio never renders it back."},{tagName:"jx-field",$props:{span:!0,label:"API token"},attributes:{part:"token-row","data-field":"token"},children:[{tagName:"jx-textfield",$description:"No `value` binding, and its absence is the contract: a secret may pass through a field the reader typed it into and may never be painted into one they did not. The draft lives in the adapter's closure until Verify reads it, so nothing here — not the attribute, not the accessibility tree, not a DOM dump — has ever held it.",$props:{type:"password",placeholder:"cf_..."},attributes:{part:"token"},oninput:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/setToken"},value:[{$ref:"event#/target/value"}]}]}}]},{tagName:"div",attributes:{part:"actions"},children:[{tagName:"jx-button",$props:{variant:"accent",disabled:{$ref:"#/state/busy"}},attributes:{part:"verify"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/verify"},value:[]}]},children:[{tagName:"span",textContent:"Verify & Connect"}]},{tagName:"jx-button",$props:{quiet:!0},attributes:{part:"accounts"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/openAccounts"},value:[]}]},children:[{tagName:"span",textContent:"Preferences › Accounts"}]}]}]},form:{tagName:"div",attributes:{part:"connect-form",role:"none"},style:{display:"contents"},children:[{tagName:"p",attributes:{part:"note"},children:["Create a Cloudflare Pages project connected to this repository. Every commit then builds and publishes automatically (",{tagName:"code",textContent:"bunx jx build"},")."]},{tagName:"div",attributes:{part:"rows"},children:[{tagName:"jx-field",$props:{span:!0,label:"Account"},attributes:{part:"row","data-field":"account"},children:[{tagName:"jx-select",$props:{options:{$ref:"#/state/accountOptions"},value:{$ref:"#/state/accountId"}},attributes:{part:"account"},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/setAccount"},value:[{$ref:"event#/target/value"}]}]}}]},{tagName:"jx-field",$props:{span:!0,label:"Pages project name"},attributes:{part:"row","data-field":"projectName"},children:[{tagName:"jx-textfield",$props:{value:{$ref:"#/state/projectName"}},attributes:{part:"project-name"},oninput:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/setProjectName"},value:[{$ref:"event#/target/value"}]}]}}]},{tagName:"jx-field",$props:{span:!0,label:"GitHub owner"},attributes:{part:"row","data-field":"owner"},children:[{tagName:"jx-textfield",$props:{value:{$ref:"#/state/owner"}},attributes:{part:"owner"},oninput:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/setOwner"},value:[{$ref:"event#/target/value"}]}]}}]},{tagName:"jx-field",$props:{span:!0,label:"GitHub repository"},attributes:{part:"row","data-field":"repo"},children:[{tagName:"jx-textfield",$props:{value:{$ref:"#/state/repo"}},attributes:{part:"repo"},oninput:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/setRepo"},value:[{$ref:"event#/target/value"}]}]}}]},{tagName:"jx-field",$props:{span:!0,label:"Production branch"},attributes:{part:"row","data-field":"branch"},children:[{tagName:"jx-textfield",$props:{value:{$ref:"#/state/branch"}},attributes:{part:"branch"},oninput:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/setBranch"},value:[{$ref:"event#/target/value"}]}]}}]}]},{tagName:"jx-button",$props:{variant:"accent",disabled:{$ref:"#/state/busy"}},attributes:{part:"submit"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/submit"},value:[]}]},children:[{tagName:"span",textContent:"${state.submitLabel}"}]}]},status:{tagName:"div",attributes:{part:"status",role:"none"},style:{display:"contents"},children:[{tagName:"p",attributes:{part:"status-line"},children:["Connected to Pages project ",{tagName:"strong",attributes:{part:"project-name"},textContent:"${state.deployProject}"},{tagName:"span",attributes:{part:"site-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/hasProductionUrl"},cases:{true:{tagName:"span",children:[" — ",{tagName:"a",attributes:{part:"link",href:"${state.productionUrl}",target:"_blank",rel:"noreferrer"},textContent:"${state.productionUrl}"}]}}}]},{tagName:"div",attributes:{part:"deployment-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/hasDeployment"},cases:{true:{tagName:"p",attributes:{part:"deployment"},children:["Latest deployment: ",{tagName:"strong",attributes:{part:"deployment-state"},textContent:"${state.deploymentState}"}," (${state.deploymentEnvironment}) — ",{tagName:"a",attributes:{part:"link",href:"${state.deploymentUrl}",target:"_blank",rel:"noreferrer"},textContent:"preview"}]},false:{tagName:"p",attributes:{part:"deployment"},textContent:"No deployments yet — the first commit after connecting triggers one."}}},{tagName:"p",attributes:{part:"hint"},textContent:"Publishing happens automatically on every commit."},{tagName:"div",attributes:{part:"actions"},children:[{tagName:"jx-button",$props:{disabled:{$ref:"#/state/busy"}},attributes:{part:"refresh"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/refresh"},value:[]}]},children:[{tagName:"span",textContent:"Refresh"}]},{tagName:"jx-button",$props:{variant:"negative",disabled:{$ref:"#/state/busy"}},attributes:{part:"disconnect"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/disconnect"},value:[]}]},children:[{tagName:"span",textContent:"Disconnect"}]}]}]}}},{tagName:"div",attributes:{part:"failure-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/hasFailure"},cases:{true:{tagName:"p",attributes:{part:"failure"},children:["${state.failure}",{tagName:"span",attributes:{part:"pages-app-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/needsPagesApp"},cases:{true:{tagName:"span",children:[" — if the Cloudflare Pages GitHub App is not installed on the repository, ",{tagName:"a",attributes:{part:"install-link",href:"${state.pagesAppUrl}",target:"_blank",rel:"noreferrer"},textContent:"install it"}," and retry."]}}}]}}}]}]};T("publish",P);var S="https://github.com/apps/cloudflare-pages/installations/new";function F(e){if(!e.supported)return"unsupported";if(e.loading)return"loading";if(e.connected&&e.lapsed)return"lapsed";if(!e.connected){if(e.hosted)return"hosted";return e.tokenStored&&!e.replacing?"stored":"token"}return e.deploy?"status":"form"}function w(e){let{error:t}=e;return{accountId:e.form.accountId,accountOptions:e.accounts,body:F(e),branch:e.form.branch,busy:e.busy,connectLabel:e.busy?"Reconnecting…":"Reconnect Cloudflare",deploymentEnvironment:e.deployment?.environment??"",deploymentState:e.deployment?`${e.deployment.stage}: ${e.deployment.status}`:"",deploymentUrl:e.deployment?.url??"",deployProject:e.deploy?.projectName??"",failure:t,hasDeployment:e.deployment!==null,hasFailure:t!=="",hasProductionUrl:(e.deploy?.productionUrl??"")!=="",needsPagesApp:/github/i.test(t)&&/app|install|source|repo/i.test(t),owner:e.form.owner,pagesAppUrl:S,productionUrl:e.deploy?.productionUrl??"",projectName:e.form.projectName,repo:e.form.repo,submitLabel:e.busy?"Connecting…":"Create & Connect"}}function j(e){let t=document.createElement("div");t.style.pointerEvents="auto",e.layer.append(t);let n="",g=!1,N=()=>{if(g)return;g=!0,e.onClosed()},d=y({...w(e.view),closed:N,connect:()=>{e.onConnect()},disconnect:()=>{e.onDisconnect()},openAccounts:()=>{e.onOpenAccounts()},refresh:()=>{e.onRefresh()},replace:()=>{n="",e.onReplaceToken()},setAccount:(o)=>{d.accountId=o,e.onField("accountId",o)},setBranch:(o)=>{d.branch=o,e.onField("branch",o)},setOwner:(o)=>{d.owner=o,e.onField("owner",o)},setProjectName:(o)=>{d.projectName=o,e.onField("projectName",o)},setRepo:(o)=>{d.repo=o,e.onField("repo",o)},setToken:(o)=>{n=o},submit:()=>{e.onSubmit()},verify:()=>{let o=n;n="",e.onSaveToken(o)}}),b=null,k=I("publish",d,t).then(async(o)=>{b=o;let u=o.root;if(g)return o.dispose(),u;if(await An(u),g)return u;return(u.querySelector('dialog[part="dialog"]')??u).setAttribute(ot,zt("modal","publish")),pn(u),u});return{close(){let o=b?.root;if(o instanceof HTMLElement)an(o);b?.dispose(),b=null,n="",t.remove(),N()},host:t,ready:k,update(o){Object.assign(d,w(o))}}}var m=null,i="loading",f=[],l=null,r="",c=!1,h=!1,a={accountId:"",branch:"main",owner:"",projectName:"",repo:""};function x(){return D?.projectConfig??null}function R(e){return e.toLowerCase().replaceAll(/[^a-z0-9]+/g,"-").replaceAll(/^-+|-+$/g,"").slice(0,58)||"site"}function H(){let e=p().projectRoot,t=/^([\w.-]+)\/([\w.-]+)(?:@.+)?$/.exec(e);return t?{owner:t[1],repo:t[2]}:{owner:"",repo:""}}function L(){let e=/^[\w.-]+\/[\w.-]+@[^:]+:(.+)$/.exec(p().projectRoot)?.[1]??"";return Ga(e)??""}function U(){let e=va();return e?{productionUrl:e.productionUrl??"",projectName:e.projectName}:null}function C(){let e=Ld(),t=i==="loading"?null:i;return{accounts:f.map((n)=>({label:n.name,value:n.id})),busy:c,connected:t?.connected===!0,deploy:U(),deployment:l?{environment:l.environment,stage:l.stage,status:l.status,url:l.url}:null,error:r,form:{...a},hosted:e&&typeof p().cfConnect==="function",lapsed:t?.connected===!0&&t.needsReconnect===!0,loading:i==="loading",replacing:h,supported:e,tokenStored:Uf()!==""}}function s(){if(m){m.update(C());return}m=j({layer:Ct("modal"),onClosed:z,onConnect:()=>{_()},onDisconnect:()=>{V()},onField:(e,t)=>{a={...a,[e]:t}},onOpenAccounts:O,onRefresh:()=>{v()},onReplaceToken:()=>{h=!0,r="",s()},onSaveToken:(e)=>{E(e)},onSubmit:()=>{M()},view:C()})}async function v(){i="loading",s();try{if(i=await p().cfConnection?.()??null,i?.connected&&!i.needsReconnect){f=await pT(),a={...a,accountId:i.accountId??f[0]?.id??""};let e=va();if(e)l=await hm(e),vp(l)}}catch(e){i=null,r=e instanceof Error?e.message:String(e)}s()}async function E(e){let t=e.trim();if(!t){r="Paste a token, or use Preferences › Accounts to forget the stored one.",s();return}K0(t),h=!1,r="",await v()}function O(){ne()?.run("app.preferences",{section:"accounts"})}async function _(){c=!0,r="",s();try{let e=await p().cfConnect?.()??null;if(e?.status==="timeout")r="The Cloudflare window didn't finish. Sign in there, then reconnect — nothing was changed.";else if(e?.status==="connected"&&!e.connection.accountId){let{openCfAccountPicker:t}=await (me("af1h381v"),import("./cf-account-picker-af1h381v.js"));await t()}}catch(e){r=e instanceof Error?e.message:String(e)}c=!1,No(),await v()}async function M(){let e=x();if(!e)return;if(!a.projectName||!a.owner||!a.repo||!a.accountId){r="Account, project name, and the GitHub owner/repo are all required.",s();return}c=!0,r="",s();try{let t=L(),n=await fT(e,{accountId:a.accountId,owner:a.owner,productionBranch:a.branch||"main",projectName:a.projectName,repo:a.repo,...t?{rootDir:t}:{}});l=await hm(n).catch(()=>null)}catch(t){r=t instanceof Error?t.message:String(t)}c=!1,s()}async function V(){let e=x();if(!e)return;c=!0,s();try{await eC(e,null),l=null}catch(t){r=t instanceof Error?t.message:String(t)}c=!1,s()}function z(){let e=m;m=null,e?.close()}function j0(e){i={accountId:e.accountId??"demo-account",connected:!0},f=[],l=e.deployment,vp(e.deployment),r="",c=!1,h=!1,s()}function LI(){let e=x(),{owner:t,repo:n}=H();i="loading",f=[],l=null,r="",c=!1,h=!1,a={accountId:"",branch:"main",owner:t,projectName:va()?.projectName??R(e?.name??""),repo:n},s(),v()}
2
- export{Ga,j0,LI};
3
-
4
- //# debugId=D67BB801EAE031DF64756E2164756E21
5
- //# sourceMappingURL=studio-60dqgb0c.js.map
@@ -1,9 +0,0 @@
1
- import{Jy}from"./studio-9mccjwjh.js";import{ql,Hy,u}from"./studio-a2ke1e4t.js";import{y}from"./studio-55h4mstj.js";import{Oi,Jr,v}from"./studio-t1xzawhr.js";import{st}from"./studio-e81q1vb9.js";import{lt,vi,Bl,Ju,bo,BC,qC}from"./studio-gf0fz03c.js";import{D,Hc}from"./studio-yn9f8vtx.js";import{T,I}from"./studio-g1shz58g.js";import{me}from"./studio-pre0skq6.js";var R={$schema:"https://jxsuite.com/schema/v1",$id:"StudioStylebookChrome",$description:"The bar across the top of the Project Styles canvas: the filter that narrows the specimen catalogue, and the toggle that reduces it to the elements this file has already styled. Both are shell state rather than document state — the adapter owns which — and the two names come in as values, because the surface is called Project Styles and the canvas view it draws is the wire word `stylebook`; nothing a reader sees here may be spelled from that. **The bar IS the kit's toolbar now.** It used to write `role=\"toolbar\"` and its own `aria-label` on a `<div>`, which is a role with none of the behaviour under it: two controls, two tab stops, and no arrow key between them. `jx-action-group` is not the element for it — that one roves `jx-action-button` and this bar's first control is a `jx-textfield` — so `jx-toolbar` is, and the field keeps its own arrows while its caret still has text to walk (ui.md §5.5).",tagName:"jx-toolbar",attributes:{part:"chrome"},$props:{label:{$ref:"#/state/title"}},style:{$description:'What `.sb-chrome` said in `styles/overlays.css`, plus the six inline declarations the template carried beside it, plus `.tb-toggle` — all three go dead with this conversion, and none of them is shared with another surface. Three repairs on the way. The bar is one element rather than a positioned box wrapping a `role="toolbar"` row that declared the same flex layout again. The flex layout is not declared here EITHER any more: `display: flex`, `align-items: center`, the `--jx-space-2` gap, the sans face and the foreground colour are all `jx-toolbar`\'s own, so what is left below is only what a positioned BAND is. And `.tb-toggle` read `var(--spectrum-font-size-50, 11px)`, which the kit spells `--jx-text-sm` at the same value; the rest of its drawing is a `jx-action-button` reaching in through `part="control"`, because what it has to look like is a small bordered chip and every fill and control height the kit draws would otherwise have to be taken back off.',position:"absolute",top:"0",left:"0",right:"0",zIndex:"15",flexShrink:"0",padding:"var(--jx-space-2) var(--jx-space-3)",background:"var(--bg-panel)",borderBottom:"1px solid var(--border)",'& [part="filter"]':{flex:"1",maxWidth:"200px"},'& [part="customized"] > [part="control"]':{$description:"Bordered, unfilled and dimmed until it is on, which is what says it is a filter rather than an action: the catalogue it narrows is the thing the reader is looking at, so the control has to be quieter than its subject.",padding:"3px var(--jx-space-3)",border:"1px solid var(--border)",borderRadius:"var(--radius)",background:"transparent",color:"var(--fg-dim)",fontSize:"var(--jx-text-sm)",":hover":{background:"var(--hover-bg)"}},'& [part="customized"][data-selected] > [part="control"]':{$description:"`data-selected` and not `selected`: the kit reflects the pressed state as a data attribute (`jx-action-button.json`), and the property this document binds never reaches the attribute of the same name.",borderColor:"var(--accent)",background:"var(--accent-15)",color:"var(--accent)"}},children:[{tagName:"jx-textfield",attributes:{part:"filter"},$props:{size:"sm",type:"search",clearable:!0,label:{$ref:"#/state/filterLabel"},placeholder:"Filter…",value:{$ref:"#/state/filter"}},oninput:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/setFilter"},value:[{$ref:"event#/target/value"}]}]}},{tagName:"jx-action-button",$description:"`onchange` and not `onclick`: a `toggles` button owns its own pressed state and says so with `change` (`jx-action-button.json`), and an `onclick` written here would replace the element's own click handler on the same property — the toggle would stop flipping and stop announcing `aria-pressed`.",attributes:{part:"customized"},$props:{size:"sm",toggles:!0,selected:{$ref:"#/state/customizedOnly"},label:{$ref:"#/state/customizedLabel"},hint:{$ref:"#/state/customizedHint"}},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/toggleCustomized"},value:[]}]},children:[{tagName:"span",textContent:"${state.customizedLabel}"}]}]};T("stylebook-chrome",R);function O(e,o){let t=document.createElement("div");t.style.display="contents";let n=y({...e,...o}),r=null,s=!1;function i(){s=!0,I("stylebook-chrome",n,t).then((d)=>{s=!1,r=d})}return i(),{host:t,update(d){if(Object.assign(n,d),s||r!==null&&t.contains(r.root))return;r?.dispose(),r=null,t.textContent="",i()}}}function z(e){return!e.startsWith(":")&&!e.startsWith(".")&&!e.startsWith("&")&&!e.startsWith("[")&&!e.startsWith("@")&&!e.startsWith("--")}function w(e){return e!==null&&typeof e==="object"&&!Array.isArray(e)}var E="& .element-card-preview";function rb(e){let o=e,t={},n=(r)=>{let s={};for(let[i,d]of Object.entries(r))if(i!=="@--")s[i]=d;return s};for(let[r,s]of Object.entries(o)){if(!w(s)){t[r]=s;continue}if(r==="@--")continue;if(Jy(r)){t[r]=s;continue}if(r.startsWith("@")){let i={};for(let[d,g]of Object.entries(s))if(w(g)&&z(d))i[`${E} ${d}`]=n(g);else i[d]=g;t[r]=i;continue}if(z(r)){t[`${E} ${r}`]=n(s);continue}t[r]=s}return t}function M(e,o){let t=o.split(" "),n=e;for(let r of t){if(!w(n))return null;n=n[r]}return w(n)?n:null}function J(e,o){let t=e,n=M(t,o);if(n&&Object.keys(n).length>0)return!0;for(let[r,s]of Object.entries(t)){if(!r.startsWith("@")||!w(s))continue;let i=M(s,o);if(i&&Object.keys(i).length>0)return!0}return!1}function _(e){let o=new Map,t=new Map,n=e.filter.toLowerCase(),r=(a,c,h)=>{let p=a.tag===h?h:`${h} ${a.tag}`;o.set(Bl(c),p);let m=a.children??[];for(let[l,C]of m.entries())r(C,[...c,"children",l],h)},s=(a)=>{let c={...a.attributes};if(a.style)c.style=a.style;return{tagName:a.tag,...a.text?{textContent:a.text}:{},...Object.keys(c).length>0?{attributes:c}:{},...a.children?{children:a.children.map(s)}:{}}},i=(a,c,h,p,m)=>{o.set(Bl(p),a),o.set(Bl([...p,"children",0]),a);let l=[...p,"children",0,"children",0];if(m)r(m,l,a);else o.set(Bl(l),a);if(!t.has(a))t.set(a,p);return{attributes:{class:"element-card"},children:[{attributes:{class:"element-card-preview"},children:[h],tagName:"div"},{attributes:{class:"element-card-label"},tagName:"div",textContent:c}],tagName:"div"}},d=[],g=(a,c)=>({attributes:{class:"sb-section"},children:[{attributes:{class:"sb-label"},tagName:"div",textContent:a},{attributes:{class:"sb-body"},children:c,tagName:"div"}],tagName:"div"}),f=()=>["children",d.length,"children",1];for(let a of e.meta.$sections){let c=a.elements;if(n)c=c.filter((m)=>m.tag.includes(n)||a.label.toLowerCase().includes(n));if(e.customizedOnly)c=c.filter((m)=>J(e.effectiveStyle,m.tag));if(c.length===0)continue;let h=f(),p=c.map((m,l)=>i(m.tag,`<${m.tag}>`,s(m),[...h,"children",l],m));d.push(g(a.label,p))}let b=[];{let a=e.components;if(n)a=a.filter((c)=>c.tagName.toLowerCase().includes(n));if(e.customizedOnly)a=a.filter((c)=>J(e.effectiveStyle,c.tagName));if(a.length>0){let c=f(),h=a.map((p,m)=>{let l=[...c,"children",m];if(p.source!=="npm"&&p.path?.endsWith(".json")){b.push({$ref:`/${e.projectRoot?`${e.projectRoot}/`:""}${p.path}`.replace(/^\/+/,"/")});let j={};for(let k of p.props??[])if(k.default!==void 0&&k.default!=="false"&&k.default!=="''")j[k.name]=String(k.default).replaceAll(/^'|'$/g,"");let q={tagName:p.tagName,...Object.keys(j).length>0?{attributes:j}:{}};return i(p.tagName,`<${p.tagName}>`,q,l,null)}let V={attributes:{class:"sb-fallback"},tagName:"div",textContent:`<${p.tagName}>`};return i(p.tagName,`<${p.tagName}>`,V,l,null)});d.push(g("Components",h))}}if(d.length===0)d.push({attributes:{class:"sb-empty"},tagName:"div",textContent:e.customizedOnly?"No customized elements":"No matching elements"});return{doc:{...b.length>0?{$elements:b}:{},$media:e.effectiveMedia,attributes:{class:"sb-root"},children:d,style:rb(e.effectiveStyle),tagName:"div"},pathToTag:o,tagToCardPath:t}}var ob="Project Styles",sE="stylebook",mw=[{id:"color",prefix:"--color-",title:"Colors"},{id:"font",prefix:"--font-",title:"Fonts"},{id:"size",prefix:"--size-",title:"Sizes & Spacing"},{id:"other",prefix:"--",title:"Other"}];function L(e){if(e.startsWith("--color"))return"color";if(e.startsWith("--font"))return"font";if(e.startsWith("--size")||e.startsWith("--spacing")||e.startsWith("--radius"))return"size";return"other"}function nS(e){let o=L(e);if(o==="other")return e;let{prefix:t}=mw.find((n)=>n.id===o);return Hy(e,t)}function G(e){if(!e)return[];let o=[];for(let[t,n]of Object.entries(e)){if(!t.startsWith("--"))continue;if(typeof n!=="string"&&typeof n!=="number")continue;o.push({group:L(t),label:nS(t),name:t,value:n})}return o}function aE(e){let o=G(e);return mw.map((t)=>({group:t,tokens:o.filter((n)=>n.group===t.id)}))}function lE(e){if(!e)return[];let{featureQueries:o,sizeBreakpoints:t}=bo(e),n=[],r=[];for(let{name:i,query:d}of o){let g=Ju(d);if(g)n.push({key:`@${i}`,kind:"scheme",label:g==="dark"?"Dark":"Light",name:i,scheme:g});else r.push({key:`@${i}`,kind:"feature",label:`@${i}`,name:i})}let s=t.map(({name:i})=>({key:`@${i}`,kind:"size",label:`@${i}`,name:i}));return[...n,...s,...r]}function A(e,o){let t=e[o.key];return t&&typeof t==="object"?t:void 0}function sb(e,o,t){let n=A(e,o)?.[t];return typeof n==="string"||typeof n==="number"?n:void 0}function iS(e,o,t,n){if(n){let s=e[o.key]??={};s[t]=n;return}let r=A(e,o);if(!r)return;if(delete r[t],Object.keys(r).length===0)delete e[o.key]}function cE(e,o,t,n=[]){let r=new Set(n.map((s)=>s.name));return o.filter((s)=>!r.has(s.name)&&sb(e,s,t)===void 0)}var ab={$sections:[{label:"Headings",elements:[{tag:"h1",text:"Code Is Poetry"},{tag:"h2",text:"Code Is Poetry"},{tag:"h3",text:"Code Is Poetry"},{tag:"h4",text:"Code Is Poetry"},{tag:"h5",text:"Code Is Poetry"},{tag:"h6",text:"Code Is Poetry"}]},{label:"Paragraph",elements:[{tag:"p",text:"In a village of La Mancha, the name of which I have no desire to call to mind, there lived not long since one of those gentlemen that keep a lance in the lance-rack, an old buckler, a lean hack, and a greyhound for coursing."}]},{label:"List",elements:[{tag:"ul",children:[{tag:"li",text:"Alice."},{tag:"li",text:"The White Rabbit."},{tag:"li",text:"The Cheshire Cat."},{tag:"li",text:"The Mad Hatter."},{tag:"li",text:"The Queen of Hearts."}]},{tag:"ol",children:[{tag:"li",text:"First item"},{tag:"li",text:"Second item"},{tag:"li",text:"Third item"}]}]},{label:"Quote",elements:[{tag:"blockquote",children:[{tag:"p",text:"In quoting others, we cite ourselves.",style:"font-size:1.25em;font-style:italic"},{tag:"p",text:"— Julio Cortázar"}]}]},{label:"Code",elements:[{tag:"pre",children:[{tag:"code",text:`// A "block" is the abstract term used
2
- // to describe units of markup that
3
- // when composed together, form the
4
- // content or layout of a page.
5
- registerBlockType( name, settings );`}]}]},{label:"Inline",elements:[{tag:"a",text:"Visit the documentation",attributes:{href:"#"}},{tag:"strong",text:"Bold text emphasis"},{tag:"em",text:"Italic text emphasis"},{tag:"small",text:"Fine print and legal text"},{tag:"mark",text:"Highlighted text"},{tag:"code",text:"const x = 42;"},{tag:"abbr",text:"HTML",attributes:{title:"HyperText Markup Language"}},{tag:"sub",text:"subscript"},{tag:"sup",text:"superscript"}]},{label:"Form",elements:[{tag:"input",attributes:{type:"text",placeholder:"Enter text…"}},{tag:"button",text:"Click Me"},{tag:"select",children:[{tag:"option",text:"Option 1"},{tag:"option",text:"Option 2"},{tag:"option",text:"Option 3"}]},{tag:"textarea",attributes:{placeholder:"Enter longer text…",rows:"3"}}]},{label:"Table",elements:[{tag:"table",children:[{tag:"thead",children:[{tag:"tr",children:[{tag:"th",text:"Name"},{tag:"th",text:"Role"},{tag:"th",text:"Status"}]}]},{tag:"tbody",children:[{tag:"tr",children:[{tag:"td",text:"Alice"},{tag:"td",text:"Developer"},{tag:"td",text:"Active"}]},{tag:"tr",children:[{tag:"td",text:"Bob"},{tag:"td",text:"Designer"},{tag:"td",text:"Away"}]},{tag:"tr",children:[{tag:"td",text:"Carol"},{tag:"td",text:"Manager"},{tag:"td",text:"Active"}]}]}]}]},{label:"Interactive",elements:[{tag:"details",attributes:{open:""},children:[{tag:"summary",text:"Click to expand details"},{tag:"p",text:"Additional detail content revealed when the disclosure widget is toggled open."}]}]},{label:"Media",elements:[{tag:"img",attributes:{alt:"Placeholder image"},style:"width:100%;max-width:400px;height:200px;background:#e0e0e0;display:block;border-radius:4px"},{tag:"video",attributes:{controls:""},style:"width:100%;max-width:400px;height:200px;background:#e0e0e0;display:block;border-radius:4px"},{tag:"audio",attributes:{controls:""},style:"width:100%"}]}],$variables:{color:{label:"Color",prefix:"--color-",placeholder:"#007acc"},font:{label:"Font",prefix:"--font-",placeholder:"system-ui, sans-serif"},size:{label:"Size",prefix:"--size-",placeholder:"16px"},other:{label:"Other",prefix:"--",placeholder:"value"}}};var W=new WeakMap;function K(e){let o={customizedHint:"Show only the elements this file has already styled",customizedLabel:"Customized",customizedOnly:v.stylebook.customizedOnly,filter:v.stylebook.filter,filterLabel:`Filter the ${ob} catalogue`,title:ob},t=W.get(e);if(t)return t.update(o),t.host;let n=O(o,{setFilter:(r)=>{v.stylebook.filter=r},toggleCustomized:()=>{v.stylebook.customizedOnly=!v.stylebook.customizedOnly}});return W.set(e,n),n.host}async function dE(e,o){let t=e.wrap,n=lt(e.paneId),r=v.stylebook.filter.toLowerCase(),{customizedOnly:s}=v.stylebook,i=Oi(n?.doc.document?.$media),{sizeBreakpoints:d,baseWidth:g}=bo(i),f=d.length>0,b=K(e);t.style.overflow="hidden";let S=[];if(f){S.push({displayName:vi("--"),name:"base",width:g});for(let l of d)S.push({displayName:vi(l.name),name:l.name,width:l.width})}let a;if(!f){let l=i&&i["--"],C=l?`${vi("--")} (${g}px)`:null;a=[o.canvasPanelEntry(l?"base":null,C,!l,l?g:void 0)]}else a=S.map((l)=>o.canvasPanelEntry(l.name,`${l.displayName} (${l.width}px)`,!1,l.width));if(!await o.drawStage(e,{frame:"boards",framePart:"panzoom",frameVars:"--boards-inset:40px",handles:"hidden",hug:!1,innerPart:"boards",lead:"chrome",panels:a.map((l)=>l.item)},a))return;let h=o.stageHost(e,"chrome-host");if(h&&h.firstChild!==b)h.replaceChildren(b);let p=_({components:st,customizedOnly:Boolean(s),effectiveMedia:i??{},effectiveStyle:Jr(n?.doc.document?.style),filter:r,meta:ab,projectRoot:D?.projectRoot??null}),{panels:m}=e;for(let{panel:l}of a)m.push(l),BC(e.renderGeneration,p,l.canvas,l._width);if(f)o.updateActivePanelHeaders(e);o.applyTransform(e),o.observeCenterUntilStable(e)}function Ou(e,o,{panCanvas:t=!1}={}){if(v.stylebook.selection=e,Hc(u.value,{selection:[[]],ui:{activeSelector:e,rightTab:"style",...o!==void 0?{activeMedia:o}:{}}}),e&&t)qC(e)}var Q=8,gw=[{id:"properties",title:"Content"},{id:"style",title:"Style"},{id:"events",title:"Logic"},{id:"assistant",title:"Assistant"}];function bw(){return{saveDocument:()=>{},undo:()=>{},redo:()=>{},openInBrowser:()=>{},buildSite:()=>{},closeDocument:()=>{},duplicateSelection:()=>{},deleteSelection:()=>{},selectParent:()=>{},toggleDock:()=>{},toggleZen:()=>{},openPalette:()=>{},openProject:()=>{},newWindow:()=>{},panelRoster:[],focusPanel:()=>{},focusInspectorTab:()=>{},cycleRegion:()=>{}}}var x=(e)=>e.document.open,P=(e)=>e.selection.count>0&&e.editor.kind==="canvas",N=(e)=>!e.selection.isRoot&&e.selection.paths.every((o)=>ql(o)),B="an element selected on the canvas that has a sibling position: not the document root, a repeater's template or a switch case",H=(e)=>e.map((o)=>`[${o.join(", ")}]`).join(" and ");function cp(e){return[{id:"file.save",title:"Save",category:"File",level:"document",icon:"floppy-disk",keybinding:"mod+s",menus:["commandbar/primary","statusbar/document","palette"],group:"1_file",undo:"none",when:x,enablement:(t)=>t.document.dirty,requires:"unsaved changes",run:()=>e.saveDocument()},{id:"document.close",title:"Close Document",category:"Document",level:"document",keybinding:"mod+w",menus:["context/tab","palette"],group:"1_file",when:x,requires:"an open document",run:()=>e.closeDocument()},{id:"view.openInBrowser",title:"Open in Browser",category:"View",level:"document",icon:"arrow-square-out",keybinding:"mod+shift+o",menus:["commandbar/primary","statusbar/document","palette"],group:"2_output",when:(t)=>t.project.isSite,enablement:x,requires:"a page to preview",run:()=>e.openInBrowser()},{id:"project.buildSite",title:"Build Site",category:"Project",level:"project",menus:["commandbar/overflow","palette"],group:"2_output",when:(t)=>t.project.isSite,requires:"a site project",run:()=>e.buildSite()},{id:"edit.undo",title:"Undo",category:"Edit",level:"document",icon:"arrow-u-up-left",keybinding:"mod+z",menus:["commandbar/primary","palette"],group:"1_history",when:x,enablement:(t)=>t.document.canUndo,requires:"a change to undo",run:()=>e.undo()},{id:"edit.redo",title:"Redo",category:"Edit",level:"document",icon:"arrow-u-up-right",keybinding:["mod+shift+z","mod+y"],menus:["commandbar/primary","palette"],group:"1_history",when:x,enablement:(t)=>t.document.canRedo,requires:"a change to redo",run:()=>e.redo()},{id:"selection.duplicate",title:"Duplicate",category:"Selection",level:"selection",keyScope:"canvas",keybinding:"mod+d",menus:["blockbar","context/element","context/layer","outline/row","palette"],group:"3_structure",undo:"document",when:P,enablement:N,requires:B,aiTool:{name:"duplicate_node",description:"Duplicate elements in the document, inserting each copy after its original, as one undoable step. The copies become the selection.",report:({after:t})=>{let n=t.selection.paths.length;return`Duplicated ${n} element${n===1?"":"s"}; the ${n===1?"copy is":"copies are"} selected at ${H(t.selection.paths)}.`}},run:()=>e.duplicateSelection()},{id:"selection.repeat",title:"Repeat...",category:"Selection",level:"selection",keyScope:"canvas",menus:["context/element","palette"],group:"3_structure",undo:"document",when:P,enablement:(t)=>N(t)&&!t.selection.isRepeater,requires:"an element with a sibling position that is not already a repeater",run:()=>{(me("ry5rmppr"),import("./convert-to-repeater-ry5rmppr.js")).then(({convertToRepeater:t})=>t())}},{id:"selection.delete",title:"Delete",category:"Selection",level:"selection",keyScope:"canvas",keybinding:["delete","backspace"],menus:["blockbar","context/element","context/layer","outline/row","palette"],group:"9_danger",destructive:!0,undo:"document",when:P,enablement:N,requires:B,aiTool:{name:"delete_node",description:"Delete elements from the document as one undoable step.",report:({before:t,after:n})=>{let r=t.selection.paths.length;return`Deleted ${r} element${r===1?"":"s"} at ${H(t.selection.paths)} in one undo step; the selection is now ${n.selection.count===0?"empty":"elsewhere"}.`}},run:()=>e.deleteSelection()},{id:"selection.selectParent",title:"Select Parent",category:"Selection",level:"selection",keyScope:"canvas",keybinding:["escape","arrowleft"],menus:["palette"],group:"2_navigate",when:P,requires:"an element selection",run:()=>e.selectParent()},{id:"view.toggleNavigator",title:"Toggle Navigator Dock",category:"View",level:"application",keybinding:"mod+b",menus:["commandbar/overflow","palette"],group:"4_docks",run:()=>e.toggleDock("navigator")},{id:"view.toggleInspector",title:"Toggle Inspector Dock",category:"View",level:"application",keybinding:"mod+alt+b",menus:["commandbar/overflow","palette"],group:"4_docks",run:()=>e.toggleDock("inspector")},{id:"view.zen",title:"Zen Mode",category:"View",level:"application",keybinding:"mod+.",menus:["commandbar/overflow","palette"],group:"4_docks",run:()=>e.toggleZen()},{id:"palette.open",title:"Open Command Center",category:"View",level:"application",keybinding:"mod+k",menus:["palette"],group:"5_palette",run:()=>e.openPalette("picker")},{id:"palette.openFiles",title:"Go to File…",category:"File",level:"application",keybinding:"mod+p",menus:["palette"],group:"5_palette",run:()=>e.openPalette("files")},{id:"palette.openCommands",title:"Run Command…",category:"View",level:"application",keybinding:"mod+shift+p",menus:["palette"],group:"5_palette",run:()=>e.openPalette("commands")},{id:"palette.openNodes",title:"Go to Symbol in Document…",category:"Selection",level:"document",menus:["palette"],group:"5_palette",when:x,requires:"an open document",run:()=>e.openPalette("nodes")},{id:"project.open",title:"Open Project…",category:"Project",level:"project",keybinding:"mod+o",menus:["commandbar/overflow","statusbar/project","palette"],group:"1_file",run:()=>e.openProject()},{id:"view.newWindow",title:"New Window",category:"View",level:"application",keybinding:"mod+shift+n",menus:["commandbar/overflow","palette"],group:"1_file",when:(t)=>t.capability.windowControls,requires:"a host that can hold more than one window",run:()=>e.newWindow()},{id:"project.openRecent",title:"Open Recent…",category:"Project",level:"project",menus:["commandbar/overflow","statusbar/project","palette"],group:"1_file",run:()=>e.openPalette("projects")},...Z(e),...Y(e),{id:"view.cycleRegion",title:"Focus Next Region",category:"View",level:"application",keybinding:"f6",menus:["palette"],group:"4_docks",run:()=>e.cycleRegion(1)},{id:"view.cycleRegionBack",title:"Focus Previous Region",category:"View",level:"application",keybinding:"shift+f6",menus:["palette"],group:"4_docks",run:()=>e.cycleRegion(-1)}]}function Z(e){let o=0;return e.panelRoster.map((t)=>{let n={id:`panel.focus.${t.id}`,title:`Show ${t.title}`,category:"View",level:"application",menus:["palette"],group:"4_docks",requires:"an open project",when:(r)=>r.project.open&&(t.when?.(r)??!0),run:()=>e.focusPanel(t.id)};if(t.rail!==!1&&o<Q)o+=1,n.keybinding=`mod+${o}`;return n})}function Y(e){return gw.map((o,t)=>({id:`inspector.focus.${o.id}`,title:`Show ${o.title}`,category:"View",level:"document",keybinding:`mod+shift+${t+1}`,menus:["palette"],group:"4_docks",requires:"an open document",when:(r)=>r.document.open,run:()=>e.focusInspectorTab(o.id)}))}
6
- export{rb,ob,sE,mw,nS,aE,lE,sb,iS,cE,ab,dE,Ou,gw,bw,cp};
7
-
8
- //# debugId=80386DC2E14C2C1A64756E2164756E21
9
- //# sourceMappingURL=studio-61dp09qg.js.map
@@ -1,5 +0,0 @@
1
- import{OR}from"./studio-9mccjwjh.js";import{T,I}from"./studio-g1shz58g.js";import{y}from"./studio-55h4mstj.js";import{Pt}from"./studio-h46vtzk8.js";import{Hx,u}from"./studio-a2ke1e4t.js";import{Oe}from"./studio-mcayt6hz.js";import{Mt,cl,ea}from"./studio-s8dmmz66.js";var ie={$schema:"https://jxsuite.com/schema/v1",$id:"StudioSchemaForm",$description:"The shared schema→form engine as a document: one row per property of a JSON Schema, drawn from a projection `ui/schema-form.ts` computes. Nothing here reads a schema. The flow decides which of nine controls a property gets, what its options are, which rungs of the value ladder the position permits, what a commit is worth and whether the value is refused; this document draws the answer. That split is what lets the Entry editor, Project Settings and the Signals panel all embed the same form and get the same row — and it is why the engine hands back a HOST ELEMENT rather than a template: a document clears the host it is given, so a caller that is still lit renders an empty element for it and puts it in its own tree (studio-ui-guidelines.md §9.3, §9.4).",tagName:"div",attributes:{part:"form"},style:{$description:"What `.style-row`, `.style-row-label`, `.style-row--invalid`, `.style-row-error`, `.style-row-error-count`, `.array-object-field`, `.array-object-row` and `.schema-param-editor` said in `styles/inspector.css`, keyed on `part` and re-pointed at the studio token layer. Those rules are DEAD in the stylesheet now rather than shared: `ui/field-row.ts` drew the same row for the inspector panels and `ui/expression-editor.ts` the same array rows, and both converted, so this document's copy is the only emitter left. Every `--spectrum-font-size-*` reference is gone rather than renamed — those names resolve only inside `<sp-theme>`, and a document mounted in a settings pane or an entry editor is outside it, so each would silently have taken its hard-coded fallback.",display:"contents",'& [part="field"]':{padding:"var(--jx-space-1) 0"},'& [part="value"]':{$description:"The control line: the source chip, then whatever the rung draws. `min-width: 0` is load-bearing — without it a monospaced pointer or a long JSON line pushes the row past the pane's right edge instead of scrolling inside its own control.",display:"flex",alignItems:"flex-start",gap:"var(--jx-space-2)",minWidth:"0"},'& [part="value"] > *':{minWidth:"0"},'& [part="widget"] > *':{$description:"The switch wrapper is `display: contents`, so whatever rung it drew is the flex item of the line above rather than a box inside a box — which is what keeps `min-width: 0` reaching the control that actually needs it.",flex:"1",minWidth:"0"},'& [part="source"]':{$description:"Quiet while the value is fixed, accent-tinted the moment it is produced from something else — the one place in the row that says a value is not what it looks like.",flex:"none",color:"var(--fg-dim)",fontSize:"var(--jx-text-sm)"},'& [part="source"][data-source="bound"]':{color:"var(--accent)"},'& [part="pointer-group"]':{display:"flex",flex:"1",gap:"var(--jx-space-2)",minWidth:"0"},'& [part="pointer-group"] > *':{flex:"1",minWidth:"0"},'& [part="json"]':{display:"flex",flexDirection:"column",flex:"1",gap:"var(--jx-space-1)",minWidth:"0"},'& [part="chips"]':{display:"flex",flexWrap:"wrap",gap:"var(--jx-space-1)"},'& [part="chip"]':{padding:"1px var(--jx-space-2)",borderRadius:"var(--radius)",background:"var(--bg)",fontSize:"var(--jx-text-sm)",color:"var(--fg-dim)"},'& [part="rows"]':{display:"flex",flexDirection:"column",flex:"1",gap:"var(--jx-space-1)",minWidth:"0"},'& [part="row"]':{$description:"Wraps rather than scrolls: an item with five declared properties in a 260px inspector is a column of controls, not a horizontal scroller nobody finds the end of.",display:"flex",flexWrap:"wrap",alignItems:"center",gap:"var(--jx-space-1)",minWidth:"0"},'& [part="row-add"]':{alignSelf:"flex-start"},'& [part="field-error"]':{$description:"The left rule is what makes the line read as belonging to the control above it rather than to the row below.",margin:"var(--jx-space-1) 0 0",paddingLeft:"var(--jx-space-2)",borderLeft:"2px solid var(--danger)",fontSize:"var(--jx-text-sm)",lineHeight:"1.35",color:"var(--danger)"},'& [part="field-error-count"]':{marginLeft:"var(--jx-space-1)",fontFamily:"var(--font-mono)",opacity:"0.75"}},children:[{$prototype:"Array",items:{$ref:"#/state/fields"},key:{$ref:"$map/item/key"},map:{$description:"One property of the schema. `jx-field` owns the label, the required mark, the invalid shade and the association between the label and whatever control ends up in the slot, so none of that is written here — which is the whole of what the four hand-rolled `.style-row` variants used to carry.",tagName:"jx-field",attributes:{part:"field","data-prop":"${$map.item.prop}"},$props:{label:{$ref:"$map/item/label"},description:{$ref:"$map/item/description"},required:{$ref:"$map/item/required"},invalid:{$ref:"$map/item/invalid"},span:!0},children:[{tagName:"div",attributes:{part:"value",role:"none"},children:[{tagName:"span",attributes:{part:"source-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"$map/item/hasChip"},cases:{true:{$description:"The Value Source chip (§6.6): what produces this value, in the same four words every other bindable position in Studio uses. It opens the rung picker rather than cycling, so any rung the position permits is one action away. Drawn only where the host named somewhere a value could come from — a settings form that names none edits fixed values and shows no chip.",tagName:"jx-action-button",attributes:{part:"source","data-source":"${$map.item.source}"},$props:{label:{$ref:"$map/item/sourceName"},hint:{$ref:"$map/item/sourceHint"},size:"sm",haspopup:"menu",disabled:{$ref:"$map/item/sourceLocked"}},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/pickSource"},value:[{$ref:"$map/item/key"},{$ref:"event#/currentTarget"}]}]},children:[{tagName:"span",textContent:"${$map.item.sourceLabel}"}]}}},{tagName:"span",attributes:{part:"widget",role:"none"},style:{display:"contents"},$switch:{$ref:"$map/item/kind"},cases:{text:{$description:"The default control, and the one every scalar without a narrower answer lands on. Commits on input, debounced by the flow, which is what makes the canvas and the preview follow a value being typed rather than waiting for a blur.",tagName:"jx-textfield",attributes:{part:"text"},$props:{label:{$ref:"$map/item/label"},value:{$ref:"$map/item/value"},placeholder:{$ref:"$map/item/placeholder"},size:"sm",invalid:{$ref:"$map/item/invalid"},mono:{$ref:"$map/item/mono"},multiline:{$ref:"$map/item/multiline"}},oninput:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/edit"},value:[{$ref:"$map/item/key"},{$ref:"event#/target/value"}]}]},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/commit"},value:[{$ref:"$map/item/key"},{$ref:"event#/target/value"}]}]}},template:{$description:"The Mixed text rung: a string with `${…}` holes in it. Monospaced because what is being written is half text and half pointer, and committed on change rather than on input — a half-typed placeholder is not a template anybody meant.",tagName:"jx-textfield",attributes:{part:"template"},$props:{label:{$ref:"$map/item/label"},value:{$ref:"$map/item/value"},placeholder:"${state.templatePlaceholder}",size:"sm",mono:!0},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/commit"},value:[{$ref:"$map/item/key"},{$ref:"event#/target/value"}]}]}},pointer:{$description:"The From data… rung. It is TWO controls over one value because the kit has no combobox and this rung needs one: the list is a set of suggestions rather than a whitelist (a value may point at a route param, a signal, or a pointer neither the form nor its host enumerates), so the select offers what the host named and the field accepts anything. Picking a row writes the field; typing a pointer the host never named leaves the select showing it, because a select whose value matches no option synthesises the row rather than lying about what it holds.",tagName:"span",attributes:{part:"pointer-group",role:"none"},children:[{tagName:"jx-textfield",attributes:{part:"pointer"},$props:{label:"${$map.item.label} pointer",value:{$ref:"$map/item/value"},placeholder:"#/state/…",size:"sm",mono:!0},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/commit"},value:[{$ref:"$map/item/key"},{$ref:"event#/target/value"}]}]}},{tagName:"span",attributes:{part:"pointer-pick-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"$map/item/hasOptions"},cases:{true:{tagName:"jx-select",attributes:{part:"pointer-pick"},$props:{label:"${$map.item.label} source",options:{$ref:"$map/item/options"},value:{$ref:"$map/item/value"},size:"sm"},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/commit"},value:[{$ref:"$map/item/key"},{$ref:"event#/target/value"}]}]}}}}]},select:{$description:"A closed set the schema itself declares, or one the host resolved through a `#/$context/…` pointer. The empty row is offered only where the property is optional — a required field has no “none” to choose.",tagName:"jx-select",attributes:{part:"select"},$props:{label:{$ref:"$map/item/label"},options:{$ref:"$map/item/options"},value:{$ref:"$map/item/value"},size:"sm",invalid:{$ref:"$map/item/invalid"}},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/commit"},value:[{$ref:"$map/item/key"},{$ref:"event#/target/value"}]}]}},checkbox:{tagName:"jx-checkbox",attributes:{part:"checkbox"},$props:{label:{$ref:"$map/item/label"},checked:{$ref:"$map/item/checked"},size:"sm"},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/commitChecked"},value:[{$ref:"$map/item/key"},{$ref:"event#/target/checked"}]}]}},number:{$description:"`min`, `max` and `step` come straight off the property schema, so the control refuses out-of-range input before the flow has to say why. The stepper is off: these are configuration values that get typed, not nudged.",tagName:"jx-number-field",attributes:{part:"number"},$props:{label:{$ref:"$map/item/label"},value:{$ref:"$map/item/value"},placeholder:{$ref:"$map/item/placeholder"},min:{$ref:"$map/item/min"},max:{$ref:"$map/item/max"},step:{$ref:"$map/item/step"},size:"sm"},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/commit"},value:[{$ref:"$map/item/key"},{$ref:"event#/target/value"}]}]}},json:{$description:"A value with structure, edited as the JSON it is. The chips above it are a read of the shape currently held — property name and declared type — so the common case (“what is in here?”) is answered without reading the text. The flow parses on a debounce and keeps the last parsable value; a mid-keystroke `{` is not a refusal.",tagName:"span",attributes:{part:"json",role:"none"},children:[{tagName:"span",attributes:{part:"chips-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"$map/item/hasChips"},cases:{true:{tagName:"span",attributes:{part:"chips",role:"none"},children:[{$prototype:"Array",items:{$ref:"$map/item/chips"},key:{$ref:"$map/item/key"},map:{tagName:"span",attributes:{part:"chip"},textContent:"${$map.item.label}"}}]}}},{tagName:"jx-textfield",attributes:{part:"json-text"},$props:{label:{$ref:"$map/item/label"},value:{$ref:"$map/item/value"},placeholder:{$ref:"$map/item/placeholder"},size:"sm",mono:!0,multiline:!0,grows:!0},oninput:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/editJson"},value:[{$ref:"$map/item/key"},{$ref:"event#/target/value"}]}]}}]},rows:{$description:"An array whose items are objects with a declared shape: one row per item, one cell per declared property, a remove beside each and one add below. The alternative was the raw-JSON editor, which is what an array of anything else still gets — a shape the schema states is a shape the form can draw.",tagName:"span",attributes:{part:"rows",role:"none"},children:[{$prototype:"Array",items:{$ref:"$map/item/rows"},key:{$ref:"$map/item/key"},map:{tagName:"span",attributes:{part:"row",role:"none","data-row":"${$map.item.key}"},children:[{$prototype:"Array",items:{$ref:"$map/item/cells"},key:{$ref:"$map/item/id"},map:{tagName:"span",attributes:{part:"cell",role:"none"},style:{display:"contents"},$switch:{$ref:"$map/item/kind"},cases:{text:{tagName:"jx-textfield",attributes:{part:"cell-text"},$description:"Committed on input AND on change: a cell showing a pointer is committed when it is left, exactly as the pointer field above is, and a cell showing text follows the canvas while it is typed. The two never disagree — a change after an input carries the same string.",$props:{label:{$ref:"$map/item/label"},value:{$ref:"$map/item/value"},placeholder:{$ref:"$map/item/label"},size:"sm"},oninput:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/editCell"},value:[{$ref:"$map/item/field"},{$ref:"$map/item/row"},{$ref:"$map/item/key"},{$ref:"event#/target/value"}]}]},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/editCell"},value:[{$ref:"$map/item/field"},{$ref:"$map/item/row"},{$ref:"$map/item/key"},{$ref:"event#/target/value"}]}]}},select:{tagName:"jx-select",attributes:{part:"cell-select"},$props:{label:{$ref:"$map/item/label"},options:{$ref:"$map/item/options"},value:{$ref:"$map/item/value"},size:"sm"},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/editCell"},value:[{$ref:"$map/item/field"},{$ref:"$map/item/row"},{$ref:"$map/item/key"},{$ref:"event#/target/value"}]}]}},checkbox:{tagName:"jx-checkbox",attributes:{part:"cell-checkbox"},$props:{label:{$ref:"$map/item/label"},checked:{$ref:"$map/item/checked"},size:"sm"},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/editCellChecked"},value:[{$ref:"$map/item/field"},{$ref:"$map/item/row"},{$ref:"$map/item/key"},{$ref:"event#/target/checked"}]}]}},number:{tagName:"jx-number-field",attributes:{part:"cell-number"},$props:{label:{$ref:"$map/item/label"},value:{$ref:"$map/item/value"},size:"sm"},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/editCell"},value:[{$ref:"$map/item/field"},{$ref:"$map/item/row"},{$ref:"$map/item/key"},{$ref:"event#/target/value"}]}]}},control:{$description:"A cell a registered control owns — a relationship to another collection is the one that reaches here. The document draws the empty host and nothing inside it; `ui/schema-form.ts` mounts the control into it, by the same dispatch a FIELD host gets. An extension's control is its own surface rather than part of this one, and the seam between them is this empty node.",tagName:"span",attributes:{part:"cell-control-host","data-control":"${$map.item.id}",role:"none"}}}}},{tagName:"jx-action-button",attributes:{part:"row-remove"},$props:{icon:"trash",label:"${$map.item.removeLabel}",size:"sm"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/removeRow"},value:[{$ref:"$map/item/field"},{$ref:"$map/item/key"}]}]}}]}},{tagName:"jx-action-button",attributes:{part:"row-add"},$props:{icon:"plus",label:"${$map.item.addLabel}",size:"sm"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/addRow"},value:[{$ref:"$map/item/key"}]}]},children:[{tagName:"span",textContent:"Add"}]}]},control:{$description:"A field a registered control owns outright — `schema-builder`, `secret`, or the `reference` picker. The document draws the empty host and the flow MOUNTS the control into it: the registry's contract (specs/extensions.md §9.1) is a control that owns a host, all three built-ins are documents of their own, and a document clears the host it is given — which is why this node is drawn empty and never written to twice.",tagName:"div",attributes:{part:"control-host","data-control":{$ref:"$map/item/key"},role:"none"}}}}]},{tagName:"span",attributes:{part:"error-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"$map/item/hasError"},cases:{true:{$description:'§16.1\'s inline tier: why this value is refused, said AT the control that refuses it and for exactly as long as the value stays bad. `role="alert"` so it is announced when it appears, and a repeat counter from two up — “it refused me again” is otherwise indistinguishable from “the field is still red from last time”.',tagName:"p",attributes:{part:"field-error",role:"alert"},children:[{tagName:"span",attributes:{part:"field-error-text"},textContent:"${$map.item.error}"},{tagName:"span",attributes:{part:"error-count-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"$map/item/hasCount"},cases:{true:{tagName:"span",attributes:{part:"field-error-count"},textContent:"${$map.item.errorCount}"}}}]}}}]}}]};T("schema-form",ie);function ge(e,t){let r=t?.$map?.item,a=e==="control-host"?r?.key:e==="cell-control-host"?r?.id:void 0;return typeof a==="string"?a:""}function be(e){let t=typeof e==="string"?void 0:e.attributes?.part;return typeof t==="string"?t:""}function ae(e,t,r){let a=document.createElement("div");a.style.display="contents";let n=y({...e,...t,templatePlaceholder:"${state.…}"}),c=null,l=!1,h=!1;function d(){l=!0,I("schema-form",n,a,{onNodeCreated:(m,g,S,x)=>{if(!(m instanceof HTMLElement))return;let w=ge(be(S),x);if(w!=="")r(w,m)}}).then((m)=>{if(l=!1,h){m.dispose();return}c=m})}return d(),{dispose(){h=!0,c?.dispose(),c=null,a.textContent=""},host:a,update(m){if(n.fields=m.fields,h||l||c!==null&&a.contains(c.root))return;c?.dispose(),c=null,a.textContent="",d()}}}var _={anyOf:[{additionalProperties:!1,description:"Two-way: `target` is the test, `value` the tag when it is truthy, `initial` the tag when it is not.",properties:{initial:{$ref:"#/$defs/TagName"},operator:{const:"?:",type:"string"},target:{$ref:"#/$defs/ExpressionOperand"},value:{$ref:"#/$defs/TagName"}},required:["operator","target","value","initial"],title:"?: — the tag when the test holds, and the tag when it does not"},{additionalProperties:!1,description:"Multiway: `target` is the discriminant, matched against case keys by its string form. "+"`default` is required — an element with no tag cannot exist.",properties:{cases:{additionalProperties:{$ref:"#/$defs/TagName"},type:"object"},default:{$ref:"#/$defs/TagName"},operator:{const:"switch",type:"string"},target:{$ref:"#/$defs/ExpressionOperand"}},required:["operator","target","cases","default"],title:"switch — one tag per discriminant value, with a required fallback"}],description:"A tag name chosen at element creation. Every branch resolves to a `TagName`, so the candidate set is enumerable without evaluating anything."},W={anyOf:[{$ref:"#/$defs/TagName"},{additionalProperties:!1,properties:{$expression:{$ref:"#/$defs/TagExpression"}},required:["$expression"],type:"object"}]};var U={description:"HTML element tag name or custom element name (must contain a hyphen per Web Components spec). "+"A NAME, never an expression: no `${…}` position in the pipeline evaluates a tagName. Use "+"`$switch`/`cases` to vary the element.",minLength:1,pattern:"^[a-zA-Z][a-zA-Z0-9._-]*$",type:"string"};var z={oneOf:[{type:"string"},{$ref:"#/$defs/RefObject"}]};var $e={additionalProperties:!0,description:"A page-level <head> entry. Defines meta tags, link tags, script tags, etc.",properties:{attributes:{additionalProperties:{oneOf:[{type:"string"},{type:"boolean"}]},type:"object"},children:{items:{$ref:"#/$defs/HeadEntry"},type:"array"},tagName:{type:"string"},textContent:{description:"Element content. An object is serialized to JSON inside the tag — that is how a "+'JSON-LD block (`<script type="application/ld+json">`) is authored.',oneOf:[{type:"string"},{type:"object"}]}},required:["tagName"],type:"object"};var B={additionalProperties:!1,description:"A $ref binding. Resolves to a state entry (reactive) or plain value (static).",properties:{$ref:{$ref:"#/$defs/AnyRef"}},required:["$ref"],type:"object"};var L={additionalProperties:{anyOf:[{type:"string"},{type:"number"},{$ref:"#/$defs/RefObject"},{$ref:"#/$defs/StyleObject"}]},description:"CSS style definition. camelCase property names follow CSSOM convention. Keys starting with :, ., &, or [ are treated as nested CSS selectors. Keys matching $media breakpoint names (or other @-prefixed at-rules) group nested rules. Nesting is recursive: selector and at-rule groups may nest to arbitrary depth "+"(e.g. breakpoint → selector → pseudo-class), mirroring the compiler's recursive emission. "+"An object carrying $ref is a reactive VALUE, and the runtime reads it as one. It also matches the nested-block branch vacuously, since a block admits a string under any key, which is why these branches are anyOf rather than oneOf. A DECLARATION at-rule (@font-face, @property, @position-try, @counter-style) may hold an ARRAY of blocks, which is that key written more than once, in order: an object's keys are "+"unique, so @font-face — the at-rule whose identity is not in its key — could not otherwise "+"state a family's second weight at all.",patternProperties:{"^@(font-face|property|position-try|counter-style)":{anyOf:[{$ref:"#/$defs/StyleObject"},{items:{$ref:"#/$defs/StyleObject"},minItems:1,type:"array"}]}},properties:{$description:{description:"Why this rule exists. Emitted as a comment by static builds, ignored at runtime.",type:"string"}},type:"object"};var A={additionalProperties:!1,description:"Dynamic mapped list. Re-renders when the items state entry changes.",properties:{$prototype:{const:"Array",type:"string"},filter:{$ref:"#/$defs/RefObject"},items:{oneOf:[{$ref:"#/$defs/RefObject"},{type:"array"}]},key:{additionalProperties:!1,description:"The identity of each rendered row: a $map/item pointer read per item. A row whose key survives a change keeps its DOM node and its effects across reorders, insertions and "+"removals; without a key, rows are keyed by index. $map/index is not a key — an index "+"names a position, not a row.",properties:{$ref:{pattern:"^\\$map/item(/.+)?$",type:"string"}},required:["$ref"],type:"object"},map:{$ref:"#/$defs/ElementDef"},sort:{$ref:"#/$defs/RefObject"}},required:["$prototype","items","map"],type:"object"},Se={description:"Array of child definitions — elements, text, or Array namespaces (dynamic lists) mixed "+"freely. A bare Array namespace (the whole children slot is one dynamic list) is also "+"accepted for backward compatibility, as is a ${…} template string that resolves at build "+"time to an array of child definitions.",oneOf:[{items:{anyOf:[{$ref:"#/$defs/ElementDef"},{$ref:"#/$defs/SwitchNode"},{$ref:"#/$defs/ArrayNamespace"},{type:"string"},{type:"number"}]},type:"array"},{$ref:"#/$defs/ArrayNamespace"},{description:"Computed children — a ${…} template that resolves at build time to an array of child "+'definitions (e.g. "${state.entry.$children}" for parsed content). A bare plain-text string is NOT a valid children value; text children must be array items.',pattern:"\\$\\{",type:"string"}]};var G={additionalProperties:{oneOf:[{type:"string"},{type:"number"},{type:"boolean"},{$ref:"#/$defs/RefObject"}]},description:"HTML attributes and ARIA attributes set via element.setAttribute().",type:"object"},K={additionalProperties:{anyOf:[{type:"string"},{type:"number"},{type:"boolean"},{type:"array"},{type:"object"},{$ref:"#/$defs/RefObject"}]},description:"Explicit prop passing at a component boundary.",type:"object"},Y={oneOf:[{type:"string"},{type:"number"},{type:"boolean"},{type:"null"},{$ref:"#/$defs/RefObject"}]},X={additionalProperties:!1,description:"Reactive $ref that drives which case to render: a state entry, or inside a mapped array's template the row's $map/item or $map/index (spec §14.1).",properties:{$ref:{oneOf:[{$ref:"#/$defs/StateRef"},{$ref:"#/$defs/MapRef"}],type:"string"}},required:["$ref"],type:"object"};var Q={additionalProperties:!1,description:'A function declaration. $prototype must be "Function". body (inline) and $src (external) are mutually exclusive. First parameter is always state (the reactive scope).',properties:{$export:{description:"Named export in $src module. Defaults to the state key name.",type:"string"},$lazy:{description:"Load $src on first call instead of importing it up front. The function then returns a "+"promise, so it may only be called from a handler or lifecycle hook — never bound as a "+"computed value. Use it for code most visitors never reach.",type:"boolean"},$prototype:{const:"Function",type:"string"},$src:{description:"External module specifier. Mutually exclusive with body.",examples:["./counter.js","npm:@myorg/validators"],type:"string"},arguments:{description:"Legacy alias for parameters: bare string parameter names (state may be listed explicitly as the first name). Superseded by parameters.",examples:[["state","event"]],items:{type:"string"},type:"array"},body:{description:"Inline function body: an opaque JS source string (first implicit parameter is state), or a structured statement array (spec §20) — explicit structured function declaration, analyzable by tooling and editable visually. The escalation ladder within the shape is structured statements → JS string.",examples:["state.count++",'state.items.push({ id: Date.now(), text: "", done: false })','return state.score >= 90 ? "gold" : "silver"',[{operator:"push",target:{$ref:"#/state/cart"},value:1},{dispatchEvent:"cart-changed",detail:{$ref:"#/state/cart"}}]],oneOf:[{type:"string"},{$ref:"#/$defs/StatementList"}]},description:{type:"string"},emits:{description:"Array of CEM-compatible Event objects this function dispatches. Used for CEM extraction and studio event discovery.",items:{$ref:"#/$defs/CemEvent"},type:"array"},name:{description:"Explicit function name. Defaults to the state key name.",type:"string"},parameters:{description:"Function parameters (after the implicit state parameter). Accepts CEM-compatible parameter objects or bare string names for backward compatibility.",examples:[["event"],[{name:"event",type:{text:"Event"}}],[{description:"Item identifier",name:"id",type:{text:"number"}}]],items:{oneOf:[{type:"string"},{$ref:"#/$defs/CemParameter"}]},type:"array"},type:{description:"Return type for tooling (JSON Schema or CEM { text } format)."}},required:["$prototype"],type:"object"};var xe={additionalProperties:!1,description:"The core expression node. operator + target, with value gated by arity.",oneOf:[{not:{anyOf:[{required:["value"]},{required:["initial"]}]},properties:{operator:{$ref:"#/$defs/UnaryOperator"}},required:["operator"],title:"Unary — target only, no value"},{not:{required:["initial"]},properties:{operator:{$ref:"#/$defs/BinaryOperator"}},required:["operator","value"],title:"Binary — left in target, right in value"},{not:{required:["initial"]},properties:{operator:{$ref:"#/$defs/AssignmentOperator"},target:{$ref:"#/$defs/ExpressionPointer"}},required:["operator","value"],title:"Assignment — writable target, value required"},{not:{anyOf:[{required:["value"]},{required:["initial"]}]},properties:{operator:{$ref:"#/$defs/NoArgMethod"},target:{$ref:"#/$defs/ExpressionPointer"}},required:["operator"],title:"pop / shift — array receiver, no value"},{not:{required:["initial"]},properties:{operator:{$ref:"#/$defs/OneArgMethod"},target:{$ref:"#/$defs/ExpressionPointer"}},required:["operator","value"],title:"push / unshift — array receiver, single value argument"},{not:{required:["initial"]},properties:{operator:{$ref:"#/$defs/SpliceMethod"},target:{$ref:"#/$defs/ExpressionPointer"},value:{items:{$ref:"#/$defs/ExpressionOperand"},minItems:1,type:"array"}},required:["operator","value"],title:"splice — array receiver, [start, deleteCount, ...items]"},{properties:{operator:{$ref:"#/$defs/ReduceMethod"},target:{anyOf:[{$ref:"#/$defs/ExpressionPointer"},{$ref:"#/$defs/ExpressionNode"}]},value:{$ref:"#/$defs/ExpressionNode"}},required:["operator","value","initial"],title:"reduce — pure fold over a pointer or derived array; seed in initial"},{not:{required:["initial"]},properties:{operator:{$ref:"#/$defs/MapFilterMethod"},target:{anyOf:[{$ref:"#/$defs/ExpressionPointer"},{$ref:"#/$defs/ExpressionNode"}]},value:{$ref:"#/$defs/ExpressionNode"}},required:["operator","value"],title:"map / filter — pure over a pointer or derived array; per-item expression in value"},{description:"The ECMAScript conditional (ternary) operator, pure: target is the test, value the consequent, initial the alternate (the reduce precedent for repurposing initial). Chain else-if by nesting another ?: node in initial.",properties:{operator:{$ref:"#/$defs/ConditionalOperator"}},required:["operator","value","initial"],title:"?: — pure conditional; test in target, consequent in value, alternate in initial"},{description:"Value-keyed multiway selection, pure: target is the discriminant (matched against case keys by its string form, like element-level $switch), cases maps matched values to result operands, default is the operand when no case matches (result is undefined without it). Condition-chain branching composes from nested ?: nodes instead.",not:{anyOf:[{required:["value"]},{required:["initial"]}]},properties:{cases:{additionalProperties:{$ref:"#/$defs/ExpressionOperand"},type:"object"},default:{$ref:"#/$defs/ExpressionOperand"},operator:{$ref:"#/$defs/SwitchOperator"}},required:["operator","cases"],title:"switch — pure value-keyed selection; discriminant in target, results in cases/default"},{description:"A pure standard-library method call: target is the receiver (any operand — never mutated; change-by-copy names replace the mutating originals), value the optional argument (bare scalar) or argument list (array). A missing receiver or method yields undefined, matching null-safe path reads.",not:{required:["initial"]},properties:{operator:{$ref:"#/$defs/PureMethod"}},required:["operator"],title:"Pure method — genuine prototype methods; receiver in target, args in value"},{description:"Invoke a callable, pure in formula position: target is the callee pointer — a named formula entry (#/state/…) or a blessed pure global via window#/ (Math.*, JSON.*, Object.keys/values/entries, and "+`${OR()}) — and value is the positional argument list (the splice args-in-value precedent). Argument order follows the callee's declared parameters.`,not:{required:["initial"]},properties:{operator:{$ref:"#/$defs/CallOperator"},target:{$ref:"#/$defs/ExpressionPointer"},value:{items:{$ref:"#/$defs/ExpressionOperand"},type:"array"}},required:["operator"],title:"call — invoke a named formula or blessed global; callee in target, args in value"}],properties:{cases:{additionalProperties:{$ref:"#/$defs/ExpressionOperand"},description:"switch only: matched discriminant value (string form) → result operand.",type:"object"},default:{$ref:"#/$defs/ExpressionOperand",description:"switch only: result operand when no case key matches."},initial:{$ref:"#/$defs/ExpressionOperand"},operator:{type:"string"},target:{$ref:"#/$defs/ExpressionOperand"},value:{$ref:"#/$defs/ExpressionOperand"}},required:["operator","target"],type:"object"},Z={additionalProperties:!1,description:"A declarative expression entry (Shape 5). Used as a state entry or inline event handler. With parameters it is a named formula: a pure, reusable computation invoked via the call operator, its parameters resolved through $args/<name> refs in the body.",properties:{$description:{type:"string"},$expression:{$ref:"#/$defs/ExpressionNode"},$title:{type:"string"},parameters:{description:"Named-formula parameters (CEM convention, as on Function entries): bare names or CEM parameter objects. Present ⇒ the entry is callable, not a computed value.",items:{anyOf:[{type:"string"},{$ref:"#/$defs/CemParameter"}]},type:"array"}},required:["$expression"],type:"object"};var ve={description:"A single state entry. Shape is determined by value type: "+"scalar/array → naked reactive property, string with ${} → computed, "+'object with $prototype: "Function" → function, '+"object with $prototype: <other> → data source, "+"object with type and default → typed reactive property, "+"plain object → naked object reactive property.",oneOf:[{type:"number"},{type:"boolean"},{type:"null"},{type:"string"},{type:"array"},{$ref:"#/$defs/TypedStateDef"},{$ref:"#/$defs/FunctionDef"},{$ref:"#/$defs/ExternalClassDef"},{$ref:"#/$defs/ExpressionEntry"},{not:{anyOf:[{required:["$prototype"]},{required:["default"]},{required:["type"]},{required:["$expression"]}]},type:"object"}]};var we={additionalProperties:!1,description:"Project-section admission block (specs/extensions.md §9). A class carrying this block owns "+"the project.json section named by `key`; hosts dispatch that section's data through the class's projectData/resolvePaths capabilities.",properties:{description:{type:"string"},key:{description:"The project.json top-level section this class owns (exclusive per project).",type:"string"},referenceable:{description:"Whether section entries can be referenced from documents (e.g. content types).",type:"boolean"},title:{type:"string"}},required:["key"],type:"object"},ke={additionalProperties:!1,description:"Server-mount admission block (specs/extensions.md §11). A class carrying this block mounts "+"routes under its /_jx/ basePath in the site worker and dev server.",properties:{basePath:{description:"Route subtree this class mounts — must be under /_jx/ (exclusive per project).",examples:["/_jx/data","/_jx/auth"],type:"string"},module:{description:"Module specifier exporting the mount handler.",type:"string"},order:{description:"Mount order (ascending; default 100).",type:"number"}},required:["basePath"],type:"object"},je={description:"Connection-provider admission block (specs/extensions.md §12). A class carrying this block "+"provides database connections of the given provider/kind.",properties:{kind:{description:"SQL dialect family the provider speaks.",enum:["sqlite","postgres"],type:"string"},local:{description:"Local-development substitute provider (e.g. sqlite for D1).",type:"string"},module:{description:"Module specifier exporting the provider implementation.",type:"string"},provider:{description:"Provider identifier (e.g. d1, supabase, sqlite).",type:"string"},serve:{description:"Module specifier exporting the serve-time worker binding.",type:"string"}},required:["provider","kind"],type:"object"};var $b=[301,302,303,307,308],Ce={description:"Schema for Jx project.json files. A project.json file is the root anchor file for a Jx project, declaring site metadata, default settings, global styles, extensions, and build configuration. Open by design: extension-contributed sections (e.g. `content`) are opaque top-level keys; the generated per-project entry document (project.schema.json) closes the composition.",properties:{$defs:{description:"Global type definitions available to all pages.",type:"object"},$elements:{description:"Global custom element dependencies available to all pages. Items are $ref objects or npm package specifier strings.",items:{oneOf:[{additionalProperties:!1,properties:{$ref:{type:"string"}},required:["$ref"],type:"object"},{type:"string"}]},type:"array"},$head:{description:"Global <head> entries applied to all pages. Array of element definitions for meta tags, link tags, script tags, etc.",examples:[[{attributes:{href:"/favicon.svg",rel:"icon"},tagName:"link"},{attributes:{content:"Jx",name:"generator"},tagName:"meta"}]],items:{properties:{attributes:{additionalProperties:{type:"string"},type:"object"},tagName:{type:"string"}},type:"object"},type:"array"},$media:{additionalProperties:{type:"string"},description:'Named media breakpoints following CSS @custom-media convention. Available in all component style objects. Declaring a pure color-scheme query (e.g. "--dark": "(prefers-color-scheme: dark)") additionally opts the site into the forced-scheme contract: @--dark style blocks are dual-emitted so a data-color-scheme attribute on <html> overrides the OS preference, color-scheme is declared on :root, and a pre-paint script restores the '+"visitor's persisted choice (spec §9.5).",examples:[{"--dark":"(prefers-color-scheme: dark)","--lg":"(min-width: 1024px)","--md":"(min-width: 768px)","--sm":"(min-width: 640px)"}],type:"object"},$schema:{description:"Relative path to the generated per-project schema (conventionally ./project.schema.json, written by `jx schema`).",type:"string"},build:{description:"Build configuration.",properties:{adapter:{description:"Platform adapter for deployment-specific output.",enum:["static","cloudflare-pages","cloudflare-workers","node","bun"],type:"string"},deploy:{additionalProperties:!1,description:"Deployment tracking: the hosting project this repo publishes to. Identifiers "+"only (no secrets) — safe to commit; Studio uses it to tell whether the publish "+"workflow already exists. `adapter` says how the build is packaged; `deploy` says where it ships.",properties:{accountId:{description:"Hosting account id (e.g. the Cloudflare account id).",type:"string"},productionUrl:{description:"Production URL of the connected hosting project.",type:"string"},projectName:{description:"Hosting project name (e.g. the Cloudflare Pages project).",pattern:"^[a-z0-9][a-z0-9-]*$",type:"string"},provider:{description:"Hosting provider the project is connected to.",enum:["cloudflare-pages"],type:"string"}},required:["provider","accountId","projectName"],type:"object"},format:{default:"directory",description:"Reserved; currently unused. Accepted for forward compatibility with single-file output (desktop single-file mode) — the build emits per-route directories regardless.",enum:["directory","single"],type:"string"},outDir:{default:"./dist",description:"Output directory for compiled site.",type:"string"},headers:{additionalProperties:!1,description:"Emit dist/_headers — the response headers only the build can know. Honored by "+"Cloudflare Pages/Workers assets and Netlify; on the node/bun adapters the file documents what a reverse proxy in front of them must send.",properties:{cache:{default:"auto",description:'"auto" marks the content-addressed image variants immutable (RFC 8246) and revalidates everything else (RFC 9111). "off" emits no Cache-Control at all.',enum:["auto","off"],type:"string"},enabled:{default:!0,type:"boolean"},rules:{additionalProperties:{additionalProperties:{type:"string"},type:"object"},description:"Verbatim rules, merged after the generated block.",propertyNames:{pattern:"^/"},type:"object"},security:{additionalProperties:!1,properties:{contentTypeOptions:{default:!0,type:"boolean"},csp:{default:!1,description:"CSP Level 3. Off by default: unlike the other security headers this one "+"governs code the build cannot see — a third-party script that loads a "+"second script, a widget that opens a frame — so turning it on is a change "+"to verify in the browser console, not a safe default. `script-src` is derived from the inline scripts and external origins the build emitted; `style-src` keeps 'unsafe-inline', because per-page <style> blocks and per-element style attributes have no site-wide hash.",oneOf:[{type:"boolean"},{const:"report-only"},{additionalProperties:!1,properties:{directives:{additionalProperties:{oneOf:[{type:"string"},{const:!1}]},description:"Replace (string) or remove (false) a computed directive. A replacement is wholesale, so an addition restates the defaults.",type:"object"},mode:{default:"enforce",enum:["enforce","report-only"]},reportUri:{format:"uri-reference",type:"string"}},type:"object"}]},frameOptions:{default:"SAMEORIGIN",oneOf:[{enum:["DENY","SAMEORIGIN"],type:"string"},{const:!1}]},hsts:{default:!1,description:"RFC 6797. Off by default: a wrong max-age locks the apex domain to HTTPS for that long, and the mistake is invisible until a certificate lapses. `preload` requires `includeSubDomains` and is a build error without it.",oneOf:[{type:"boolean"},{additionalProperties:!1,properties:{includeSubDomains:{default:!0,type:"boolean"},maxAge:{default:31536000,minimum:0,type:"integer"},preload:{default:!1,type:"boolean"}},type:"object"}]},permissionsPolicy:{default:"camera=(), microphone=(), geolocation=()",oneOf:[{type:"string"},{const:!1}]},referrerPolicy:{default:"strict-origin-when-cross-origin",oneOf:[{enum:["no-referrer","no-referrer-when-downgrade","origin","origin-when-cross-origin","same-origin","strict-origin","strict-origin-when-cross-origin","unsafe-url"],type:"string"},{const:!1}]}},type:"object"}},type:"object"},sitemap:{default:!0,description:"Generate sitemap.xml from the route table (requires `url`). Set false to disable.",type:"boolean"},trailingSlash:{default:"always",description:"Trailing slash behavior for generated URLs.",enum:["always","never","ignore"],type:"string"}},type:"object"},copy:{additionalProperties:{type:"string"},description:"Declarative file copy map. Keys are source paths (relative to project root), values are destination paths (relative to outDir).",type:"object"},defaults:{description:"Default settings applied to all pages unless overridden.",properties:{charset:{default:"utf8",description:"Default charset for the page.",type:"string"},dir:{description:"Base direction for the <html> element. Omitted when unset — a page's `$dir` "+"overrides it. Right-to-left content renders left-to-right without this.",enum:["ltr","rtl","auto"],type:"string"},lang:{default:"en",description:"Default lang attribute for the <html> element. A page's `$lang` overrides it.",type:"string"},layout:{default:null,description:"Default layout file path applied to all pages. Set to null to render pages without a layout.",examples:["./layouts/base.json"],oneOf:[{type:"string"},{type:"null"}]},shadow:{default:!1,description:"Default shadow-DOM mode for every component (spec.md §16.6). Off unless set: a "+"shadow root isolates component styles from the page and replaces the <slot> emulation with real slot distribution. A component's own `$shadow` overrides this in both directions.",oneOf:[{enum:["open","closed"],type:"string"},{const:!1,type:"boolean"}]}},type:"object"},extensions:{description:"Extension packages: bare package names (resolved project-first through the package exports map) or relative paths. Each must export jx-extension.json.",examples:[["@jxsuite/parser"]],items:{type:"string"},type:"array"},manifest:{additionalProperties:!1,description:'W3C Web App Manifest, emitted as manifest.webmanifest with a <link rel="manifest"> on every page. Absent means no manifest: it is a claim that a site is meant to be installed, and most are not.',properties:{backgroundColor:{type:"string"},categories:{items:{type:"string"},type:"array"},description:{type:"string"},dir:{enum:["ltr","rtl","auto"],type:"string"},display:{default:"standalone",enum:["fullscreen","standalone","minimal-ui","browser"],type:"string"},enabled:{default:!0,type:"boolean"},icons:{description:"Icons at 192px and 512px are what browsers require before offering to install the site; the build warns when either is missing.",items:{additionalProperties:!1,properties:{purpose:{type:"string"},sizes:{examples:["192x192"],type:"string"},src:{type:"string"},type:{type:"string"}},required:["src"],type:"object"},type:"array"},lang:{type:"string"},name:{description:"Defaults to the project name.",type:"string"},orientation:{type:"string"},scope:{type:"string"},shortName:{type:"string"},startUrl:{default:"/",type:"string"},themeColor:{type:"string"}},type:"object"},serviceWorker:{default:!1,description:"W3C Service Worker, emitted as sw.js. Off unless declared — a worker is sticky, so it "+"is the one output that can keep breaking visitors after a deploy tries to fix them. **Turning it off means `false`, not deleting the key**: `false` emits a tombstone at the same URL that unregisters the old worker and clears its caches, and a 404 there is not an instruction to stop. HTML is always network-first; only the content-addressed /images/_optimized/* is served cache-first.",oneOf:[{type:"boolean"},{additionalProperties:!1,properties:{enabled:{default:!0,type:"boolean"},offlineFallback:{description:"Page served for a failed navigation. Added to `precache` if not already there.",type:"string"},precache:{description:"Site-absolute URLs fetched at install time. Each must be a file this build produces; one that is not fails the build, because a single unreachable entry stops the worker installing at all.",items:{pattern:"^/",type:"string"},type:"array"},scope:{default:"/",type:"string"}},type:"object"}]},securityTxt:{additionalProperties:!1,description:"RFC 9116 security.txt, emitted at .well-known/security.txt. `expires` is required by "+"§2.5.5 and an absent or past value is a build error — an expired file advertises a "+"reporting channel while telling the reporter not to trust it. A hand-placed public/.well-known/security.txt shadows this, which is how a clearsigned file ships.",properties:{acknowledgments:{items:{type:"string"},type:"array"},canonical:{type:"string"},contact:{description:"At least one mailto:, https: or tel: URI (§2.5.3).",items:{type:"string"},type:"array"},enabled:{default:!0,type:"boolean"},encryption:{items:{type:"string"},type:"array"},expires:{format:"date-time",type:"string"},hiring:{items:{type:"string"},type:"array"},policy:{items:{type:"string"},type:"array"},preferredLanguages:{description:"BCP 47 tags, validated and canonicalized like i18n.locales.",items:{pattern:Hx,type:"string"},type:"array"}},type:"object"},i18n:{description:"Internationalization configuration.",properties:{defaultLocale:{description:"Default locale, as a BCP 47 language tag. The pattern catches shape errors (`en_US`, `en--US`); the build is the authority on well-formedness.",examples:["en"],pattern:Hx,type:"string"},locales:{description:"Available locales, as BCP 47 language tags.",examples:[["en","fr","de"]],items:{pattern:Hx,type:"string"},type:"array"},routing:{description:"Locale routing strategy.",enum:["prefix-except-default","prefix-always"],type:"string"}},type:"object"},images:{$ref:"#/$defs/ImageConfig"},imports:{additionalProperties:{type:"string"},description:"Global import map: $prototype names to .class.json file paths. Makes external classes available by name in all pages.",examples:[{Markdown:"@jxsuite/parser/Markdown.class.json",MarkdownCollection:"@jxsuite/parser/MarkdownCollection.class.json"}],type:"object"},name:{default:"Jx Site",description:"Human-readable project name.",examples:["My Portfolio","Jx Example Site"],type:"string"},redirects:{additionalProperties:{oneOf:[{description:"Destination path or URL; implies a 301.",type:"string"},{additionalProperties:!1,description:"A redirect with an explicit RFC 9110 §15.4 status.",properties:{destination:{type:"string"},status:{default:301,description:"RFC 9110 §15.4 redirection status. 307 and 308 preserve the request method; "+"301 and 302 historically do not.",enum:[...$b],type:"integer"}},required:["destination"],type:"object"},{additionalProperties:!1,description:"A rewrite (proxy): the destination's content is served AT the source URL, with no "+"redirect. Emitted as status 200 in `_redirects`, which is the host convention — "+"not an HTTP redirection status.",properties:{destination:{type:"string"},rewrite:{const:!0,type:"boolean"}},required:["destination","rewrite"],type:"object"}]},description:"Static redirect and rewrite rules. Keys are source paths in URLPattern pathname syntax.",examples:[{"/api/*":{destination:"https://api.example.com/*",rewrite:!0},"/legacy/*":{destination:"/archive/*",status:308},"/old-about":"/about"}],propertyNames:{pattern:"^/"},type:"object"},state:{description:"Site-wide reactive state available to all pages.",type:"object"},style:{additionalProperties:{oneOf:[{type:"string"},{type:"number"},{$ref:"#/$defs/StyleObject"}]},description:"Global CSS styles applied to the <body> element. Uses the same camelCase CSSOM convention and recursive selector/at-rule nesting as component styles.",type:"object"},url:{description:"Production URL of the deployed site.",examples:["https://example.com","https://jxsuite.com"],type:"string"}},type:"object"};var Re={additionalProperties:!1,description:"Schema for jx-extension.json manifests. Located at the extension package root and exported so hosts can resolve <package>/jx-extension.json through the exports map.",properties:{$schema:{type:"string"},classes:{additionalProperties:{type:"string"},description:"$prototype-visible class name → class descriptor path, relative to the manifest.",type:"object"},description:{description:"One-line description.",type:"string"},name:{description:"Package name; must match package.json.",type:"string"},schemas:{additionalProperties:!1,description:"Schema fragments this package contributes, relative to the manifest.",properties:{document:{description:"Document-schema fragment (positions like $paths values).",type:"string"},fields:{description:"Field-union fragment: its $defs members are unioned into the per-project "+"field-schema resource as extension field extras (specs/extensions.md §5.3).",type:"string"},project:{description:"Project-schema fragment (top-level project.json sections).",type:"string"}},type:"object"},title:{description:"Human-readable name for studio surfaces.",type:"string"}},required:["name"],type:"object"};var Ee=["literal","ref","template","expression","function"],xr={expression:"Formula",function:"Inline function",literal:"Fixed value",ref:"From data…",template:"Mixed text"},Xw={expression:"Computed from other values, built up operator by operator.",function:"Code that runs when this fires.",literal:"A value you type here, the same every time.",ref:"The current value of a signal, picked from a list.",template:"Text with ${…} placeholders that fill in from signals."};function Sd(e){if(Mt(e))return"ref";if(cl(e))return"function";if(ea(e))return"template";if(e&&typeof e==="object"&&"$expression"in e)return"expression";return"literal"}var Me={oneOf:[{$ref:"#/$defs/RefObject"},{$ref:"#/$defs/ExpressionEntry"},{$ref:"#/$defs/FunctionDef"}]},Pe={ExpressionEntry:Z,FunctionDef:Q,RefObject:B,StyleObject:L};function Ne(e){let{required:t}=e;return Array.isArray(t)&&t.includes("$ref")&&Boolean(e.properties?.$ref)}function Ae(e){let{required:t}=e;return Array.isArray(t)&&t.includes("$expression")}function Fe(e){return e.properties?.$prototype?.const==="Function"}function Te(e){return e.type==="string"&&e.pattern===void 0&&e.enum===void 0&&e.const===void 0}var De=new Set(["array","boolean","integer","null","number","object","string"]);function ee(e,t){if(!e||typeof e!=="object")return;let r=e;if(t.seen.has(r))return;t.seen.add(r);let a=typeof r.$ref==="string"?r.$ref:void 0;if(a!==void 0&&Object.keys(r).length===1){let c=a.startsWith("#/$defs/")?a.slice(8):a,l=Pe[c];if(l)ee(l,t);else t.unresolved.add(a);return}if(Ne(r)){t.found.add("ref");return}if(Ae(r)){t.found.add("expression");return}if(Fe(r)){t.found.add("function");return}let n=!1;for(let c of["oneOf","anyOf","allOf"]){let l=r[c];if(Array.isArray(l)){n=!0;for(let h of l)ee(h,t)}}if(n)return;if(Te(r)){t.found.add("literal"),t.found.add("template");return}if(r.enum!==void 0||r.const!==void 0){t.found.add("literal");return}if(typeof r.type==="string"&&De.has(r.type))t.found.add("literal")}function qe(e){let t={found:new Set,seen:new Set,unresolved:new Set};return ee(e,t),{caps:Ee.filter((r)=>t.found.has(r)),unresolved:[...t.unresolved].toSorted()}}function te(e){return qe(e).caps}var Le={anyOf:[U,...W.anyOf.slice(1)]},eT=_.anyOf.map((e)=>e.properties.operator.const),Je={attribute:G.additionalProperties,componentProp:K.additionalProperties,elementProperty:Y,eventHandler:Me,repeaterFilter:A.properties.filter,repeaterItems:A.properties.items,repeaterSort:A.properties.sort,styleProperty:L.additionalProperties,switchDiscriminant:X,elementTag:Le,textProperty:z},se=new Map;function zS(e){let t=se.get(e);if(t)return t;let r=te(Je[e]);return se.set(e,r),r}function Cc(e){return typeof e==="string"?zS(e):te(e.schema)}function pe(e){return{anyOf:[te(e).length>0?e:{type:"string"},{$ref:"#/$defs/RefObject"}]}}var oe=new Map,re=new Map;function ne(e,t){return`${u.value?.id??"-"}|${e}|${t}`}function le(e){return`${u.value?.id??"-"}|${e}`}function Fu(e,t,r){oe.set(ne(e,t),Oe(r))}function ju(e,t){return oe.has(ne(e,t))}function He(e,t){return Oe(oe.get(ne(e,t)))}function Ve(e,t){re.set(le(e),t)}function ce(e){return e==="literal"||e==="template"}function Cd(e,t){let r=le(e),a=Sd(t),n=re.get(r),c=n!==void 0&&ce(n)&&ce(a)?n:a;return re.set(r,c),c}function kd(e,t){switch(e){case"ref":{let[r]=t.stateDefs;return r?{$ref:`#/state/${r}`}:{$ref:t.extraSignals?.[0]?.value??""}}case"template":{let[r]=t.stateDefs;return r?`\${state.${r}}`:"${}"}case"expression":return{$expression:{operator:"??",target:null,value:null}};case"function":return{$prototype:"Function",body:"",parameters:[]};default:return t.literalDefault}}function kc(e,t,r,a,n){return Fu(e,t,a),Ve(e,r),ju(e,r)?He(e,r):n}var J=new Map;function Qw(e,t){J.set(e,t)}var Ie=/^#\/content\/([^/]+)$/;function Hu(e){let t=typeof e?.$ref==="string"?Ie.exec(e.$ref):null;return t?t[1]:null}var de={resolvePointer:()=>{}};function ue(e,t,r){if(Array.isArray(e))return e;let a;if(e&&typeof e==="object"){let c=e.$ref;if(typeof c==="string")a=c}else if(typeof e==="string")a=e;if(a===void 0||!t)return;let n=t.resolvePointer(a,r);if(Array.isArray(n))return n.map(String);if(n&&typeof n==="object")return Object.keys(n);return}function me(e,t){if(e.trim()==="")return Number.NaN;return t?Math.trunc(Number(e)):Number(e)}function fe(e){return e.format!=="json-schema"&&e.type!=="object"&&e.type!=="array"}function _e(e){return[...(e.signals??[]).map((t)=>({label:t,value:`#/state/${t}`})),...(e.params??[]).map((t)=>({label:`$params/${t}`,value:`#/$params/${t}`}))]}var E="__none__";function he(e){if(e===void 0||e===null)return"";return typeof e==="object"?JSON.stringify(e,null,2):String(e)}function We(e,t,r){if(Mt(t))return"";if(t===void 0||t===null||t==="")return r?"Required.":"";if(Array.isArray(e.enum)&&!e.enum.includes(t))return`Choose one of: ${e.enum.map(String).join(", ")}.`;if(e.type==="number"||e.type==="integer"){let n=typeof t==="number"?t:Number(t);if(!Number.isFinite(n))return"Enter a number.";if(e.type==="integer"&&!Number.isInteger(n))return"Enter a whole number.";if(e.minimum!==void 0&&n<e.minimum)return`Must be ${e.minimum} or more.`;if(e.maximum!==void 0&&n>e.maximum)return`Must be ${e.maximum} or less.`;return""}if(e.type==="boolean"&&typeof t!=="boolean")return"Must be true or false.";if(e.type==="array"&&!Array.isArray(t))return"Must be a list.";if(e.type==="object"&&(typeof t!=="object"||Array.isArray(t)))return"Must be an object.";return""}var Ue=500,ze=400,H=new Map;function Ed(e,t,r,a){Be(e);let n=H.get(e);if(!n)n=Ge(),H.set(e,n);return n.update(t,r,a),n.host}function Be(e){for(let[t,r]of H)if(t!==e&&!r.host.isConnected)r.dispose(),H.delete(t)}function Ge(){let e={},t={},r={onChange:()=>{}},a=de,n=new Map,c=new Map,l=new Map,h=new Map,d=null,m=(o,i,s)=>{if(clearTimeout(c.get(o)),i<=0){s();return}c.set(o,setTimeout(s,i))},g=(o,i)=>{clearTimeout(c.get(o)),c.delete(o),i()},S=(o,i)=>{r.onChange({[o]:i})},x=(o,i)=>{if(o.commit==="none")return;switch(o.commit){case"ref":{let s=i.trim();S(o.prop,s?{$ref:s}:void 0);return}case"template":{S(o.prop,i);return}case"select":{S(o.prop,i===E?void 0:i);return}case"number":{let s=me(i,o.schema.type==="integer");S(o.prop,Number.isNaN(s)?void 0:s);return}case"json":{try{S(o.prop,JSON.parse(i))}catch{}return}default:S(o.prop,i||void 0)}},w=(o)=>{let i=[];for(let s of o.rows??[])i.push({...s});return i},F={addRow:(o)=>{let i=n.get(o);if(!i?.itemProps)return;let s={};for(let[f,b]of Object.entries(i.itemProps))if(b.default!==void 0)s[f]=b.default;S(o,[...w(i),s]),r.rerender?.()},commit:(o,i)=>{let s=n.get(o);if(s)g(o,()=>x(s,i))},commitChecked:(o,i)=>{let s=n.get(o);if(s)S(s.prop,i)},edit:(o,i)=>{let s=n.get(o);if(s&&s.debounceMs>0)m(o,s.debounceMs,()=>x(s,i))},editCell:(o,i,s,f)=>{M(o,i,s,f)},editCellChecked:(o,i,s,f)=>{M(o,i,s,f)},editJson:(o,i)=>{let s=n.get(o);if(s)m(o,Ue,()=>x(s,i))},pickSource:(o,i)=>{D(o,i)},removeRow:(o,i)=>{let s=n.get(o);if(!s)return;let f=Number(i),b=w(s).filter((C,R)=>R!==f);S(o,b.length>0?b:void 0),r.rerender?.()}};function M(o,i,s,f){let b=n.get(o);if(!b?.itemProps)return;let C=Number(i),R=w(b),O=R[C];if(!O)return;let N=b.itemProps[s];R[C]={...O,[s]:p(N,f,b.refCells?.has(`${o}/${i}/${s}`)??!1)},S(o,R)}function p(o,i,s){if(typeof i==="boolean")return i;let f=String(i);if(s){let b=f.trim();return b?{$ref:b}:void 0}if(o?.type==="integer"||o?.type==="number"){let b=me(f,o.type==="integer");return Number.isNaN(b)?void 0:b}if(f===E||f==="")return;return f}function D(o,i){let s=n.get(o);if(!s?.ladder)return;let{fieldKey:f,mode:b,offered:C,sources:R}=s.ladder;d?.close(),d=Pt({label:"Value source",onClosed:()=>{d=null},opener:i,region:"value-source",rows:C.map((O)=>({checked:O===b?"true":"false",destructive:!1,disabled:!1,dividerAbove:!1,id:O,title:xr[O]})),run:(O)=>{let N=O;if(N===b)return;let V=s.schema.default;if(b==="ref"&&V!==void 0&&!ju(f,"literal"))Fu(f,"literal",V);S(s.prop,kc(f,b,N,Oe(t[s.prop]),kd(N,{extraSignals:R,literalDefault:V,stateDefs:[]})))}})}function P(o){let i=n.get(o);if(i?.control)return{args:{ctx:a,key:i.prop,onChange:(s)=>S(i.prop,s),rerender:r.rerender,schema:i.schema,value:t[i.prop]},control:i.control};for(let s of n.values()){let f=s.cellControls?.get(o);if(!f)continue;let b=(s.rows??[])[Number(f.row)]??{};return{args:{ctx:a,key:f.key,onChange:(C)=>M(s.prop,f.row,f.key,C),rerender:r.rerender,schema:f.schema,value:b[f.key]},control:f.control}}return}function v(o,i){let s=P(o);if(!s)return;let f=h.get(o);if(f?.host===i){f.handle.update(s.args);return}f?.handle.dispose(),h.set(o,{handle:s.control.mount(i,s.args),host:i})}function k(){for(let[o,i]of h)if(!P(o))i.handle.dispose(),h.delete(o)}function q(){k();for(let[o,i]of l)v(o,i)}let j=ae({fields:[]},F,(o,i)=>{l.set(o,i),v(o,i)});return{dispose(){for(let o of c.values())clearTimeout(o);c.clear(),d?.close(),d=null;for(let o of h.values())o.handle.dispose();h.clear(),l.clear(),n.clear(),j.dispose()},host:j.host,update(o,i,s){e=o,t=i,r=s,a=s.context??de,n.clear(),j.update({fields:Ke(e,t,r,a,n)}),q()}}}function Ke(e,t,r,a,n){let c=new Set(e.required),l=_e(a);return Object.entries(e.properties??{}).map(([h,d])=>Ye(h,d,{ctx:a,opts:r,plans:n,required:c.has(h),sources:l,value:t}))}function Ye(e,t,r){let{ctx:a,opts:n,plans:c,required:l,sources:h,value:d}=r,m=d[e],g={commit:"text",debounceMs:ze,prop:e,schema:t};c.set(e,g);let S=n.errors?.[e]||We(t,m,Boolean(n.showRequired)&&l),x=n.errorCounts?.[e],w=n.ui?.[e]?.control,F=w?J.get(w):void 0,M=h.length>0&&fe(t)&&!w,p={addLabel:`Add ${e}`,checked:!1,chips:[],description:t.description??"",error:S,errorCount:x!==void 0&&x>1?`×${x}`:"",hasChip:!1,hasChips:!1,hasCount:x!==void 0&&x>1,hasError:S!=="",hasOptions:!1,invalid:S!=="",key:e,kind:"text",label:e,max:"",min:"",mono:!1,multiline:!1,options:[],placeholder:"",prop:t.name||e,required:l,rows:[],source:"fixed",sourceHint:"",sourceLabel:"",sourceLocked:!1,sourceName:"",step:"",value:""};if(M){let v=`${a.fieldKeyPrefix??""}.${e}`,k=Cd(v,m),q=Cc({schema:pe(t)});if(g.ladder={fieldKey:v,mode:k,offered:q,sources:h},p.hasChip=!0,p.sourceLabel=xr[k],p.sourceHint=Xw[k],p.source=k==="literal"?"fixed":"bound",p.sourceLocked=!q.some((j)=>j!==k),p.sourceName=p.sourceLocked?`Value source: ${p.sourceLabel} (no other source available here)`:`Value source: ${p.sourceLabel} — click to change`,k==="ref")return g.commit="ref",g.debounceMs=0,p.kind="pointer",p.value=Mt(m)?m.$ref:"",p.options=h.map((j)=>({label:j.label,value:j.value})),p.hasOptions=p.options.length>0,p;if(k==="template")return g.commit="template",g.debounceMs=0,p.kind="template",p.value=String(m??""),p}if(F)return g.commit="none",g.control=F,p.kind="control",p;if(Mt(m)&&fe(t))return g.commit="ref",g.debounceMs=0,p.kind="text",p.mono=!0,p.value=m.$ref,p.placeholder=e,p;if(Hu(t)!==null){let v=J.get("reference");if(v)return g.commit="none",g.control=v,p.kind="control",p}let D=ue(n.ui?.[e]?.enum??t.enum,a,d);if(D)return g.commit="select",g.debounceMs=0,p.kind="select",p.value=m!==void 0?String(m):t.default!==void 0?String(t.default):E,p.options=[...l?[]:[{label:"—",value:E}],...D.map((v)=>({label:v,value:v}))],p;if(t.type==="boolean")return g.commit="none",p.kind="checkbox",p.checked=Boolean(m??t.default??!1),p;if(t.type==="integer"||t.type==="number")return g.commit="number",g.debounceMs=0,p.kind="number",p.value=m!==void 0?String(m):"",p.placeholder=t.default!=null?String(t.default):"",p.min=t.minimum!==void 0?String(t.minimum):"",p.max=t.maximum!==void 0?String(t.maximum):"",p.step=t.type==="integer"?"1":"",p;if(t.format==="json-schema")return g.commit="json",p.kind="json",p.value=m!==void 0?JSON.stringify(m,null,2):"",p.placeholder=t.description??"JSON Schema defining the data shape…",p.chips=Xe(m),p.hasChips=p.chips.length>0,p;if(t.type==="array"&&t.items?.type==="object"&&t.items.properties)return Qe(e,t.items.properties,r,g,p);let P=Array.isArray(t.type)?t.type:[t.type];if(P.includes("array")||P.includes("object"))return g.commit="json",p.kind="json",p.value=m!==void 0?JSON.stringify(m,null,2):"",p.placeholder=t.default!==void 0?JSON.stringify(t.default):"",p;return p.kind="text",p.value=he(m),p.placeholder=t.default!==void 0?String(t.default):t.examples?.[0]??"",p}function Xe(e){if(!e||typeof e!=="object")return[];let t=e;if(t.$ref||typeof t.properties!=="object"||t.properties===null)return[];return Object.entries(t.properties).map(([r,a])=>({key:r,label:`${r}: ${String(a.type??"any")}`}))}function Qe(e,t,r,a,n){let c=r.value[e],l=Array.isArray(c)?c:[];return a.commit="none",a.itemProps=t,a.rows=l,a.cellControls=new Map,a.refCells=new Set,n.kind="rows",n.rows=l.map((h,d)=>Ze(e,String(d),h,t,r,a)),n}function Ze(e,t,r,a,n,c){return{cells:Object.entries(a).map(([l,h])=>et(e,t,l,h,r[l],n,c)),field:e,key:t,removeLabel:`Remove ${e} ${Number(t)+1}`}}function et(e,t,r,a,n,c,l){let h=`${e}/${t}/${r}`,d={checked:!1,field:e,id:h,key:r,kind:"text",label:r,options:[],row:t,value:""};if(Mt(n))return d.value=n.$ref,l.refCells?.add(h),d;if(Hu(a)!==null){let g=J.get("reference");if(g)return d.kind="control",l.cellControls?.set(h,{control:g,key:r,row:t,schema:a}),d}let m=ue(a.enum,c.ctx,c.value);if(m)return d.kind="select",d.value=n!==void 0?String(n):E,d.options=[{label:"—",value:E},...m.map((g)=>({label:g,value:g}))],d;if(a.type==="boolean")return d.kind="checkbox",d.checked=Boolean(n),d;if(a.type==="integer"||a.type==="number")return d.kind="number",d.value=n!==void 0?String(n):"",d;return d.value=he(n),d}var tt=/^\{@(\w+)\}$/;function Bu(e,t){if(!e.startsWith("#/$context/"))return;let r=[];for(let n of e.slice(11).split("/")){let c=n.match(tt);if(c){let l=t.scope?.[c[1]];if(typeof l!=="string"&&typeof l!=="number")return;let h=String(l);if(!h)return;r.push(h)}else r.push(n)}if(r[0]==="$formats"){if(r.length!==1)return;return(t.formats??[]).map((n)=>n.name)}let a=t.projectConfig;for(let n of r){if(a===null||typeof a!=="object")return;a=a[n]}return a}
2
- export{$b,xr,Xw,Sd,eT,zS,Cc,Fu,ju,Cd,kd,kc,Qw,Hu,Ed,Bu};
3
-
4
- //# debugId=4761654503BE4C2564756E2164756E21
5
- //# sourceMappingURL=studio-63epcrj2.js.map
@@ -1,5 +0,0 @@
1
- import{WR,VR,Xy,W1,zR,V1,UR,eg}from"./studio-zyqn40w4.js";import{p,Ve}from"./studio-xz2yxfcb.js";import{Wd}from"./studio-pcgz8heb.js";import{Or,u}from"./studio-a2ke1e4t.js";import{D}from"./studio-yn9f8vtx.js";var a=/^[\w.~-]+$/,g="content",d="{locale}";function e1(t,n){if(typeof n!=="string"||n==="")return t;let e=t.indexOf("#"),r=e===-1?"":t.slice(e),s=e===-1?t:t.slice(0,e),o=s.indexOf("?"),i=o===-1?s:s.slice(0,o),c=(o===-1?[]:s.slice(o+1).split("&")).filter((f)=>f!==""&&!A(f));return c.push(`v=${encodeURIComponent(n)}`),`${i}?${c.join("&")}${r}`}function A(t){let n=t.indexOf("="),e=n===-1?t:t.slice(0,n);if(e==="v")return!0;if(!e.includes("%"))return!1;try{return decodeURIComponent(e)==="v"}catch{return!1}}function x(t,n){if(!t||!Object.hasOwn(t,n))return;let e=t[n];return typeof e==="string"?e:void 0}function by(t,n,e=[]){if(!t||!n)return null;let r=t.replaceAll("\\","/").replace(/^\.\//,""),s=null,o=(i,l)=>{if(r.startsWith(`${i}/`)&&(!s||i.length>s.dir.length))s={dir:i,urlPrefix:l}};for(let[i,l]of Object.entries(n)){if(!l?.source||!a.test(i))continue;let c=R(l.source);if(c===""||c.startsWith(".."))continue;if(c.includes(d)){let f=y(r,c,i,e);if(f)o(f.dir,f.urlPrefix);continue}if(/\.[a-z0-9]+$/i.test(c))continue;o(c,`/${g}/${i}`)}return s}function y(t,n,e,r){let s=n.indexOf(d),o=n.slice(0,s),i=n.slice(s+d.length);if(!t.startsWith(o))return null;let l=t.slice(o.length).split("/")[0]??"";if(l===""||!a.test(l))return null;let c=r.find((h)=>h.toLowerCase()===l.toLowerCase());if(c===void 0||!a.test(c))return null;return{dir:`${o}${l}${i}`.replace(/\/+$/,""),urlPrefix:`/${g}/${e}/${c}`}}function R(t){return t.replaceAll("\\","/").replace(/^\.\//,"").replace(/\/+$/,"")}function yy(t,n){if(!n||t==="")return null;if(n.space==="repo"){if(!n.fileBaseUrl)return null;let r=UR(t,n.documentDir,n.mounts,n.lanes);if(r===null)return null;let{suffix:s}=Xy(t);return e1(`${n.fileBaseUrl}${eg(r)}${s}`,x(n.versions,r))}let[e]=n.mounts;return e?m(t,n.documentDir,e):null}function m(t,n,e){if(W1(t))return null;let{path:r,suffix:s}=Xy(t),o;try{o=decodeURIComponent(r)}catch{return null}let i=V1(n,o);if(i===null)return null;let l=WR([e],i);if(!l)return null;return`${l}${s}`}function Lm(){let t=Ve()?p().canvasUrl:void 0;if(t)return new URL(t,location.href).origin;return location.origin}function Lp(t){let n=Lm(),e=Ve()?p().documentBaseUrl:void 0;if(e){let s=e.endsWith("/")?e:`${e}/`;return new URL(s,`${n}/`).href}let r=t||"";return`${n}/${r?`${r}/`:""}`}function jx(t){if(t.startsWith("data:")||t.startsWith("blob:")||t.startsWith("http")||t.startsWith("views://"))return t;let n=Lm();if((n.startsWith("http:")||n.startsWith("https:"))&&n!==location.origin)return`${n}/${t.replace(/^\.?\//,"")}`;return t}function t1(){return Or(D?.projectConfig??{}).i18n?.locales??[]}function Rm(t,n){let e=n?.space??"site",r=by(t,D?.projectConfig?.content,t1());if(e==="site"&&!r)return null;return{documentDir:zR(t??""),...n?.fileBaseUrl===void 0?{}:{fileBaseUrl:n.fileBaseUrl},lanes:VR,mounts:r?[r]:[],space:e}}function Ac(t){if(!t)return t;let n=Rm(u.value?.documentPath,$m()),e=n&&{...n,versions:Wd()};return jx(yy(t,e)??t)}function $m(){return{fileBaseUrl:Lp(D?.projectRoot),...Ve()?{space:p().assetSpace}:{}}}
2
- export{e1,by,yy,Lm,Lp,jx,t1,Rm,Ac,$m};
3
-
4
- //# debugId=6170AB14F1933EB364756E2164756E21
5
- //# sourceMappingURL=studio-74k29dy9.js.map
@@ -1,5 +0,0 @@
1
- import{p,Ve}from"./studio-xz2yxfcb.js";import{te}from"./studio-ery42sqr.js";import{Us,cC}from"./studio-yb560vxr.js";import{ge,dl,Q,y,oe,C,pl,_h}from"./studio-55h4mstj.js";import{q,Om,Pc,Zr,Ny,Oy,ka,Mm,d1,m,u}from"./studio-a2ke1e4t.js";import{Kt,_i,Up,Qt,Fo,E1,Zs,T1}from"./studio-5tnvjkz4.js";import{Tm}from"./studio-gx4dnjzd.js";import{B1,FR,jR,Xd,Qm}from"./studio-9mccjwjh.js";import{to}from"./studio-g1shz58g.js";import{Tc}from"./studio-t6b6qe31.js";import{ys,yo}from"./studio-t1xzawhr.js";import{ya,jb}from"./studio-7zx31knw.js";import{AT,_C}from"./studio-gf0fz03c.js";import{Pb}from"./studio-qcsq0t15.js";import{K}from"./studio-yn9f8vtx.js";var X={invokerTags:Qm,popoverTags:Xd},M="Popover",me={display:"document.repairPopoverDisplay","open-display":"document.repairPopoverDisplay",invoker:"document.repairPopoverInvoker",mode:"document.repairPopoverMode"};function Z(e,r,o,n){let a=`${r}.${o}.${n.join("/")}`,l=e.get(a)??0;return e.set(a,l+1),l===0?a:`${a}#${l}`}function L(e,r){pl((l)=>l.source===M);let o=new Map,n=FR(e,X);for(let l of n){let g=l.fix===void 0?void 0:me[l.fix];C(l.severity,l.message,{detail:l.detail,key:Z(o,"popover",l.rule,l.path),source:M,tier:"problem",...g===void 0?{}:{action:g,actionArgs:{path:l.path}},...r===void 0?{}:{path:r}})}let a=AT(e,X);for(let l of a)C(l.severity,l.message,{detail:l.detail,key:Z(o,"dialog",l.rule,l.path),source:M,tier:"problem",...r===void 0?{}:{path:r}});return n.length+a.length}function z(e,r){let o=r?.path;if(!Array.isArray(o))throw RangeError(`command "${e}" needs a "path" argument naming the popover`);return o}function _(e){let r=u.value;if(!r)throw RangeError(`command "${e}" needs an open document`);return r}function ye(){return[{category:"Document",group:"2_document",id:"document.checkPopovers",level:"document",menus:["palette"],requires:"an open document",run:()=>{let e=_("document.checkPopovers"),r=L(e.doc.document,e.documentPath??void 0);C.success(r===0?"No popover problems found in this document.":`${r} popover problem(s) filed.`,{key:"popover.run",source:M})},title:"Check Popovers",when:(e)=>e.document.open,aiTool:{description:"Check the open document for popover defects an author can fix — a base-rule `display` "+"that defeats the browser's own hiding of a closed popover, `popovertarget` on an "+"element that cannot invoke, a target naming no popover, a cut exit animation — and "+"file each as a Problem. The findings come back as data.",name:"check_popovers",report:()=>{let e=_h(M),r=e.length;return{data:e,summary:r===0?"No popover problems found in this document.":`Filed ${r} popover problem${r===1?"":"s"} in Problems.`}}}},{args:{additionalProperties:!1,properties:{path:{items:{type:["string","number"]},type:"array"}},required:["path"],type:"object"},category:"Document",group:"2_document",id:"document.repairPopoverDisplay",level:"document",menus:[],requires:"a popover whose base rule sets display",run:(e,r)=>{let n=_("document.repairPopoverDisplay"),a=z("document.repairPopoverDisplay",r),l=K(n.doc.document,a),g=jR(l?.style);if(!g)throw RangeError(`command "${"document.repairPopoverDisplay"}": nothing to move — this popover sets no display`);q(n,(w)=>{for(let h of g.base)Pc(w,a,h,"");for(let h of g.breakpoints)Oy(w,a,[h],"display","");if(g.openDisplay!==null)Ny(w,a,":popover-open","display",g.openDisplay)}),C.success("Moved `display` into `:popover-open`.",{key:"popover.repaired.display",source:M})},title:"Move display into :popover-open",when:(e)=>e.document.open},{args:{additionalProperties:!1,properties:{path:{items:{type:["string","number"]},type:"array"}},required:["path"],type:"object"},category:"Document",group:"2_document",id:"document.repairPopoverInvoker",level:"document",menus:[],requires:"an element carrying popovertarget that cannot invoke",run:(e,r)=>{let n=_("document.repairPopoverInvoker"),a=z("document.repairPopoverInvoker",r);q(n,(l)=>{Zr(l,a,"popovertarget"),Zr(l,a,"popovertargetaction")}),C.success("Removed the attributes, which did nothing on this element.",{key:"popover.repaired.invoker",source:M})},title:"Remove the inert popover attributes",when:(e)=>e.document.open},{args:{additionalProperties:!1,properties:{path:{items:{type:["string","number"]},type:"array"}},required:["path"],type:"object"},category:"Document",group:"2_document",id:"document.repairPopoverMode",level:"document",menus:[],requires:"a popover whose mode is not one of the three keywords",run:(e,r)=>{let n=_("document.repairPopoverMode"),a=z("document.repairPopoverMode",r);q(n,(l)=>{Zr(l,a,"popover",B1)}),C.success(`Set \`popover\` to "${B1}".`,{key:"popover.repaired.mode",source:M})},title:"Set popover to auto",when:(e)=>e.document.open}]}function nT(e){e.registerAll(ye())}function Nb(e,r){if(e===r)return!0;if(Array.isArray(e)&&Array.isArray(r))return e.length===r.length&&e.every((o,n)=>o===r[n]);if(e!==null&&r!==null&&typeof e==="object"&&typeof r==="object"&&!Array.isArray(e)&&!Array.isArray(r))return e.$ref===r.$ref;return!1}var F="grid://";function gs(e){switch(e.kind){case"pages":return`${F}pages`;case"library":return`${F}library`;case"collection":return`${F}collection/${encodeURIComponent(e.name)}`;default:return`${F}data/${encodeURIComponent(e.connection)}/${encodeURIComponent(e.table)}`}}function he(e){return e.startsWith(F)}function cm(e){if(!he(e))return null;let r=e.slice(F.length).split("/");if(r[0]==="pages"&&r.length===1)return{kind:"pages"};if(r[0]==="library"&&r.length===1)return{kind:"library"};if(r[0]==="collection"&&r.length===2&&r[1])return{kind:"collection",name:decodeURIComponent(r[1])};if(r[0]==="data"&&r.length===3&&r[1]&&r[2])return{connection:decodeURIComponent(r[1]),kind:"data",table:decodeURIComponent(r[2])};return null}function tx(e){let r=cm(e);if(!r)return null;switch(r.kind){case"pages":return"Pages · grid";case"library":return"Library";case"collection":return`${r.name} · grid`;default:return`${r.table} @ ${r.connection} · grid`}}var ee=0;function re(e){let r=e.coalesceMs??800,o=e.now??(()=>Date.now()),n=y({deletes:new Set,errors:new Map,inserts:new Map,pending:new Map,redoStack:[],stale:new Set,undoStack:[]}),a=null,l=(t,i,s)=>{let d=n.errors.get(t);if(d)d.set(i,s);else n.errors.set(t,new Map([[i,s]]))},g=(t,i)=>{let s=n.errors.get(t);if(s?.delete(i),s?.size===0)n.errors.delete(t)},w=(t)=>{if(n.redoStack.length=0,a){a.push(t);return}let i=n.undoStack.at(-1);if(t.kind==="cell"&&i?.kind==="cell"&&i.rowKey===t.rowKey&&i.field===t.field&&t.at-i.at<=r){i.after=t.after,i.at=t.at;return}n.undoStack.push(t)},h=(t,i,s)=>{let d=n.inserts.get(t);if(d){if(s===null)delete d[i];else d[i]=s;return}if(Nb(s,e.resolveBaseline(t,i))){let c=n.pending.get(t);if(c?.delete(i),c?.size===0)n.pending.delete(t);return}let f=n.pending.get(t);if(f)f.set(i,{value:s});else n.pending.set(t,new Map([[i,{value:s}]]))},v=(t,i)=>{let s=n.inserts.get(t);if(s)return s[i]??null;let d=n.pending.get(t)?.get(i);return d?d.value:e.resolveBaseline(t,i)},S=(t,i)=>{let s=n.errors.get(t);return s?.get(i)??s?.get("*")??null},G=(t,i)=>{switch(t.kind){case"cell":{h(t.rowKey,t.field,i==="undo"?t.before:t.after);break}case"insert":{if(i==="undo")n.inserts.delete(t.tempKey);else n.inserts.set(t.tempKey,{...t.cells});break}case"drop-insert":{if(i==="undo")n.inserts.set(t.tempKey,{...t.cells});else n.inserts.delete(t.tempKey);break}case"delete":{if(i==="undo")n.deletes.delete(t.rowKey);else n.deletes.add(t.rowKey);break}default:{let s=i==="undo"?t.ops.toReversed():t.ops;for(let d of s)G(d,i);break}}},T=()=>{if(a)throw Error("edit-buffer: groups may not nest");a=[]},k=()=>{let t=a;if(a=null,!t)return;if(t.length===1)n.undoStack.push(t[0]);else if(t.length>1)n.undoStack.push({kind:"group",ops:t})},R=(t)=>{let i=(s)=>{switch(s.kind){case"cell":return t(s.rowKey)?null:s;case"insert":case"drop-insert":return t(s.tempKey)?null:s;case"delete":return t(s.rowKey)?null:s;default:{let d=s.ops.map((f)=>i(f)).filter((f)=>f!==null);return d.length>0?{kind:"group",ops:d}:null}}};n.undoStack=n.undoStack.map(i).filter((s)=>s!==null),n.redoStack=n.redoStack.map(i).filter((s)=>s!==null)};return{applyCommitResult(t){let i=new Set;for(let s of t.cells)if(s.ok){let d=n.pending.get(s.rowKey);if(d?.delete(s.field),d?.size===0)n.pending.delete(s.rowKey);g(s.rowKey,s.field)}else if(l(s.rowKey,s.field,s.error??"Save failed"),s.stale)n.stale.add(s.rowKey);for(let s of t.inserts)if(s.ok)n.inserts.delete(s.tempKey),n.errors.delete(s.tempKey),i.add(s.tempKey);else l(s.tempKey,"*",s.error??"Insert failed");for(let s of t.deletes)if(s.ok)n.deletes.delete(s.rowKey),n.pending.delete(s.rowKey),n.errors.delete(s.rowKey),i.add(s.rowKey);else if(l(s.rowKey,"*",s.error??"Delete failed"),s.stale)n.stale.add(s.rowKey);for(let s of i)n.stale.delete(s);if(i.size>0)R((s)=>i.has(s))},buildBatch(){let t=[];for(let[i,s]of n.pending){if(n.deletes.has(i))continue;for(let[d,f]of s)t.push({baseline:e.resolveBaseline(i,d),field:d,rowKey:i,value:f.value})}return{cells:t,deletes:[...n.deletes].map((i)=>({rowKey:i})),inserts:[...n.inserts].map(([i,s])=>({cells:{...s},tempKey:i}))}},canRedo:()=>n.redoStack.length>0,canUndo:()=>n.undoStack.length>0,cellError:S,cellState(t,i){if(S(t,i)!==null)return"error";if(n.stale.has(t))return"stale";if(n.inserts.has(t)||n.pending.get(t)?.has(i))return"dirty";return"clean"},deleteRow(t){if(n.deletes.has(t))return;let i=n.inserts.get(t);if(i){let s={...i};n.inserts.delete(t),n.errors.delete(t),n.stale.delete(t),w({cells:s,kind:"drop-insert",tempKey:t});return}n.deletes.add(t),w({kind:"delete",rowKey:t})},dirtyCount(){let t=n.inserts.size+n.deletes.size;for(let[i,s]of n.pending)if(!n.deletes.has(i))t+=s.size;return t},discardRow(t){n.pending.delete(t),n.deletes.delete(t),n.inserts.delete(t),n.errors.delete(t),n.stale.delete(t),R((i)=>i===t)},effectiveValue:v,beginGroup:T,endGroup:k,group(t){T();try{t()}finally{k()}},insertRow(t={}){ee+=1;let i=`__new-${ee}`;return n.inserts.set(i,{...t}),w({cells:{...t},kind:"insert",tempKey:i}),i},isDirty:()=>n.pending.size>0||n.inserts.size>0||n.deletes.size>0,isInsertKey:(t)=>n.inserts.has(t),markStale(t){for(let i of t)n.stale.add(i)},redo(){let t=n.redoStack.pop();if(!t)return!1;return G(t,"redo"),n.undoStack.push(t),!0},reset(){n.pending.clear(),n.inserts.clear(),n.deletes.clear(),n.errors.clear(),n.stale.clear(),n.undoStack.length=0,n.redoStack.length=0},rowState(t){if(n.deletes.has(t))return"pending-delete";if(n.inserts.has(t))return"pending-insert";if(n.stale.has(t))return"stale";if(n.pending.has(t)||n.errors.has(t))return"dirty";return"clean"},setCell(t,i,s){let d=v(t,i);if(Nb(d,s))return;h(t,i,s),w({after:s,at:o(),before:d,field:i,kind:"cell",rowKey:t})},state:n,undo(){let t=n.undoStack.pop();if(!t)return!1;return G(t,"undo"),n.redoStack.push(t),!0}}}var ne={array:220,boolean:70,date:130,enum:140,image:180,number:110,readonly:200,reference:200,string:180,text:340};function ie(e){return Math.min(340,Math.max(90,Math.round(e*7.5)))}function we(e){if(e.$ref)return"reference";if(e.enum!==void 0&&Array.isArray(e.enum))return"enum";let r=e.type==="array"?void 0:e.format;if(ka(r))return"image";if(r==="date"||r==="date-time")return"date";switch(e.type){case"number":case"integer":return"number";case"boolean":return"boolean";case"array":return"array";case"object":return"readonly";default:return(e.maxLength??0)>200||e.format==="markdown"?"text":"string"}}function se(e){let r=e.replaceAll(/([a-z0-9])([A-Z])/g,"$1 $2").replaceAll(/[_-]+/g," ").trim();return r.charAt(0).toUpperCase()+r.slice(1)}function Ob(e,r={}){let o=Object.entries(e?.properties??{}),n=new Set(e?.required),a=new Set(r.readonlyFields),l=o.map(([g,w])=>{let h=a.has(g)?"readonly":we(w),v=Array.isArray(w.enum)?Math.max(...w.enum.map((S)=>String(S).length),4):0;return{editable:h!=="readonly",field:g,kind:h,pk:g===r.idField,required:n.has(g),schema:w,title:se(g),widthHint:h==="enum"?ie(v+3):ne[h]}});return l.sort((g,w)=>{let h=(S)=>S.pk?0:S.required?1:2,v=h(g)-h(w);return v===0?0:v}),l}function Ab(e,r=50){let o=e.slice(0,r),n=[];for(let a of o)for(let l of Object.keys(a))if(!n.includes(l))n.push(l);return n.map((a)=>{let l=o.map((h)=>h[a]).filter((h)=>h!==null&&h!==void 0&&h!==""),g=be(l),w=Math.max(...l.map((h)=>Dr(h).length),a.length,4);return{editable:!0,field:a,kind:g,title:se(a),widthHint:g==="string"||g==="text"?ie(w):ne[g]}})}function be(e){if(e.length===0)return"string";if(e.some((o)=>Array.isArray(o)))return"array";let r=e.map(String);if(e.every((o)=>typeof o==="boolean")||r.every((o)=>/^(true|false)$/i.test(o)))return"boolean";if(e.every((o)=>typeof o==="number")||r.every((o)=>o.trim()!==""&&!Number.isNaN(Number(o.replaceAll(/[$€£¥,\s]/g,"")))))return"number";if(r.every((o)=>/^\d{4}-\d{2}-\d{2}([T ].*)?$/.test(o)))return"date";if(r.some((o)=>o.length>200))return"text";return"string"}function Vu(e,r){if(e===null||e===void 0)return null;switch(r.kind){case"number":{if(typeof e==="number")return Number.isNaN(e)?null:e;let o=String(e).trim().replaceAll(/[$€£¥,\s]/g,"");if(o==="")return null;let n=Number(o);return Number.isNaN(n)?null:n}case"boolean":{if(typeof e==="boolean")return e;return String(e).trim().toLowerCase()==="true"}case"array":{if(Array.isArray(e))return e.map(String);let o=String(e).trim();return o===""?[]:o.split(",").map((n)=>n.trim()).filter(Boolean)}case"reference":{if(typeof e==="object"&&e!==null&&"$ref"in e){let n=e.$ref;return typeof n==="string"&&n!==""?n:null}let o=String(e).trim();return o===""?null:o}default:{let o=String(e);return o===""?null:o}}}function Dr(e){if(e===null||e===void 0)return"";if(Array.isArray(e))return e.join(", ");if(typeof e==="object")return e.$ref;return String(e)}var nx="__key",U=new WeakMap;function Za(e){return e?U.get(oe(e))??null:null}function zu(e,r){let o=y({columns:[],error:null,grouping:null,loading:!1,query:{},rows:[],saving:!1,total:0}),n=new Map,a=(t)=>{n=new Map(t.map((i)=>[i.key,i]))},l=re({resolveBaseline:(t,i)=>n.get(t)?.cells[i]??null}),g=async()=>{let t=await r.rows(o.query);o.rows=t.rows,o.total=t.total,a(t.rows)},w=(t)=>{let i=o.columns.filter((f)=>f.required&&f.editable);if(i.length===0)return null;let s=t.cells.filter((f)=>f.value===null&&i.some((c)=>c.field===f.field)).map((f)=>({error:"Required",field:f.field,ok:!1,rowKey:f.rowKey})),d=t.inserts.filter((f)=>i.some((c)=>f.cells[c.field]===null||f.cells[c.field]===void 0)).map((f)=>({error:`Missing required: ${i.filter((x)=>f.cells[x.field]===null||f.cells[x.field]===void 0).map((x)=>x.field).join(", ")}`,ok:!1,tempKey:f.tempKey}));if(s.length===0&&d.length===0)return null;return{cells:s,deletes:[],inserts:d}},h=(t)=>t===null||t===""||Array.isArray(t)&&t.length===0,v=(t,i,s)=>{if(s==="number")return(typeof t==="number"?t:0)-(typeof i==="number"?i:0);if(s==="boolean")return(t===!0?1:0)-(i===!0?1:0);return Dr(t).localeCompare(Dr(i))},S=()=>{let t=o.rows.map((d)=>d.key),{dir:i,orderBy:s}=o.query;if(s&&!r.capabilities.remoteSort){let d=o.columns.find((c)=>c.field===s)?.kind,f=i==="desc"?-1:1;t=t.toSorted((c,x)=>{let P=l.effectiveValue(c,s),j=l.effectiveValue(x,s);if(h(P)!==h(j))return h(P)?1:-1;return f*v(P,j,d)})}return o.grouping?[...G(t).values()].flat():t},G=(t)=>{let i=new Map;for(let s of t){let d=Dr(l.effectiveValue(s,o.grouping)),f=i.get(d);if(f)f.push(s);else i.set(d,[s])}return i},T=null,k=()=>T?.refreshData(),R={addRow(t={}){let i=l.insertRow(t);return k(),i},bindView(t){T=t},buffer:l,deleteRows(t){if(t.length===0)return;l.group(()=>{for(let i of t)l.deleteRow(i)}),k()},discardRow(t){l.discardRow(t),k()},replaceAll(t,i){if(t==="")return 0;let s=o.columns.filter((c)=>c.editable&&(c.kind==="string"||c.kind==="text")),d=[...o.rows.map((c)=>c.key),...l.state.inserts.keys()],f=0;if(l.group(()=>{for(let c of d){if(l.rowState(c)==="pending-delete")continue;for(let x of s){let P=l.effectiveValue(c,x.field);if(typeof P==="string"&&P.includes(t))l.setCell(c,x.field,P.replaceAll(t,i)),f+=1}}}),f>0)k();return f},effectiveRows(){let t=(d)=>Array.isArray(d)?[...d]:d!==null&&typeof d==="object"?{$ref:d.$ref}:d,i=(d)=>{let f={[nx]:d};for(let c of o.columns)f[c.field]=t(l.effectiveValue(d,c.field));return f},s=S().map((d)=>i(d));for(let[d]of l.state.inserts)s.push(i(d));return s},groups(){if(!o.grouping)return[];return[...G(S())].map(([t,i])=>({count:i.length,value:t}))},async load(){o.loading=!0,o.error=null;try{o.columns=await r.columns(),await g()}catch(t){o.error=te(t)}finally{o.loading=!1}k()},async refresh(){if(l.isDirty()){if(!await to("Refresh Grid",`Discard ${l.dirtyCount()} pending change(s) and reload?`,{confirmLabel:"Discard & Reload",destructive:!0}))return}l.reset(),await r.refresh?.(),await this.load()},async save(){if(o.saving)return;let t=l.buildBatch(),i=t.cells.length+t.inserts.length+t.deletes.length;if(i===0){C.info("No grid changes to save.",{key:"grid.save"});return}let s=w(t);if(s){l.applyCommitResult(s),C.warn("Required cells are empty — fix the marked rows, then save again.",{key:"grid.save",source:"Data",tier:"problem"});return}if(t.deletes.length>0){if(!await to("Delete Rows",`Save will permanently delete ${t.deletes.length} row(s). Continue?`,{confirmLabel:"Delete & Save",destructive:!0}))return}let f=new Set(t.cells.map((c)=>c.rowKey)).size+t.inserts.length+t.deletes.length>5?ya({title:"Saving grid"}):null;o.saving=!0;try{let c=await r.commit(t),x=(b,V)=>`${b}\x00${V}`,P=new Map(t.cells.map((b)=>[x(b.rowKey,b.field),b]));for(let b of c.cells){let V=P.get(x(b.rowKey,b.field));if(b.ok&&V){let Y=n.get(b.rowKey);if(Y)Y.cells[b.field]=V.value}}if(l.applyCommitResult(c),c.inserts.some((b)=>b.ok)||c.deletes.some((b)=>b.ok))await g();let I=c.cells.filter((b)=>b.ok).length+c.inserts.filter((b)=>b.ok).length+c.deletes.filter((b)=>b.ok).length,H=i-I,W=c.cells.filter((b)=>b.stale).length+c.deletes.filter((b)=>b.stale).length;if(H===0)C.success(`Saved ${I} change(s).`,{key:"grid.save"});else C.error(`Saved ${I} · ${H} failed${W?` (${W} stale)`:""} — kept pending.`,{action:"file.save",key:"grid.save",source:"Data"})}catch(c){C.error("Could not save the grid.",{action:"file.save",detail:te(c),key:"grid.save",source:"Data"})}finally{o.saving=!1,f?.done(),k()}},serializeForSource(){if(!r.serializeForSource)return null;return r.serializeForSource(l.buildBatch())},async setQuery(t){o.query=t,o.loading=!0;try{await g()}catch(i){o.error=te(i)}finally{o.loading=!1}k()},setGrouping(t){o.grouping=t,k()},async setSort(t){let i={...o.query};if(t)i.orderBy=t.field,i.dir=t.dir;else delete i.orderBy,delete i.dir;if(!r.capabilities.remoteSort){o.query=i,k();return}await this.setQuery(i)},source:r,state:o,tab:e};return e.scope.run(()=>{Q(()=>{e.doc.dirty=l.isDirty()}),Om(e,{canRedo:()=>l.canRedo(),canUndo:()=>l.canUndo(),redo:()=>{l.redo(),k()},undo:()=>{l.undo(),k()}});let t=p();if(t.subscribeFileEvents&&r.backingPaths){let i=t.subscribeFileEvents((s)=>{let d=r.backingPaths(),f=new Set;for(let c of s){if(c.isDir)continue;let x=c.path.replaceAll("\\","/"),P=d.get(x);if(P!==void 0&&!Tc(x))f.add(P)}if(f.size===0)return;if(l.isDirty()){let c=f.has("*")?o.rows.map((x)=>x.key):[...f];l.markStale(c),C.warn("Grid rows changed on disk — marked stale; refresh to reload.",{key:"grid.stale",source:"Data"}),k()}else R.refresh()});dl(i)}dl(()=>{Om(e,null),U.delete(oe(e)),r.dispose?.()})}),U.set(oe(e),R),R}async function Td(e){let o=Za(e)?.serializeForSource();if(o)return o;await Kt();let n=_i(e.doc.sourceFormat);if(n?.capabilities.serialize){let a=e.doc.content?.frontmatter||{},l=e.doc.document,g={...a,...l,children:l.children??[]};return Zs(n.name,g,{mode:"roundtrip"})}if(e.doc.mode==="content"){let a=Fo();if(a){let l=e.doc.content?.frontmatter??{},g=Object.keys(l).length>0,w={...l,...e.doc.document};return Zs(a.name,w,{frontmatter:g,mode:"roundtrip"})}}return yo(e.doc.document,e.doc.layout??null)}var ve=200,ke=500,Ce=2097152,D=new Map,B=!1,N=null,E=null,O=null,J=null;function xe(){let e=[];for(let r of m.tabs.values())if(r.doc.dirty&&r.documentPath)e.push(r);return e}async function le(){if(!Ve())return;let e=p();if(!e.setPreviewOverlay||!e.clearPreviewOverlay)return;let r=new Set;for(let o of xe()){let n=o.documentPath.replace(/^\.\//,""),a;try{a=await Td(o)}catch{continue}if(a.length>Ce)continue;if(r.add(n),D.get(n)===a)continue;D.set(n,a),await e.setPreviewOverlay(n,a)}for(let o of D.keys())if(!r.has(o))D.delete(o),await e.clearPreviewOverlay(o)}function ae(){if(!B)return;let e=Date.now();if(O??=e,E)clearTimeout(E);let r=e-O,o=Math.max(0,Math.min(ve,ke-r));E=setTimeout(()=>{E=null,O=null,J=le().finally(()=>{J=null})},o)}function iT(){ae()}function rT(){if(B)return;B=!0,N=ge(),N.run(()=>{Q(()=>{for(let e of m.tabs.values())e.doc.dirty,e.doc.document;ae()})})}function oT(){if(B=!1,E)clearTimeout(E),E=null;O=null,N?.stop(),N=null,D.clear()}async function ix(){if(!B)return;if(E)clearTimeout(E),E=null,O=null;await J,await le()}var de=/^[A-Za-z0-9][A-Za-z0-9!#$&^_.+-]{0,126}$/,Se=new Set(["vnd","prs","x"]);function Pe(e){if(typeof e!=="string")return null;let[r,...o]=e.split(";"),n=(r??"").indexOf("/");if(n===-1)return null;let a=(r??"").slice(0,n).trim().toLowerCase(),l=(r??"").slice(n+1).trim().toLowerCase();if(!de.test(a)||!de.test(l))return null;let g=l.lastIndexOf("+"),w=g===-1?null:l.slice(g+1),h=g===-1?l:l.slice(0,g);if(w==="")return null;let v=h.indexOf("."),S=v===-1?null:h.slice(0,v),G=S!==null&&Se.has(S)?S:null,T=G===null?h:h.slice(G.length+1);if(T==="")return null;let k={};for(let R of o){let t=R.indexOf("=");if(t===-1)return null;let i=R.slice(0,t).trim().toLowerCase(),s=R.slice(t+1).trim();if(i==="")return null;if(s.startsWith('"')&&s.endsWith('"')&&s.length>=2)s=s.slice(1,-1);k[i]=s}return{parameters:k,subtype:T,suffix:w,tree:G,type:a}}function rx(e){let r=Pe(e);if(r===null)return null;let o=r.tree===null?"":`${r.tree}.`,n=r.suffix===null?"":`+${r.suffix}`;return`${r.type}/${o}${r.subtype}${n}`}var ce="text/markdown; variant=GFM",ue="application/yaml",ct={".markdown":`${ce}; charset=utf-8`,".md":`${ce}; charset=utf-8`,".yaml":`${ue}; charset=utf-8`,".yml":`${ue}; charset=utf-8`};async function Ge(e,r){let o=await E1(e.name,r);return T1(e,o)}async function Do(e,r){await Kt();let o=Qt(e);if(!o||!o.capabilities.parse)throw Up(e);return{...await Ge(o,r),format:o}}var JS=async(e,r)=>{if(e.documentPath&&Qt(e.documentPath)){let n=await Do(e.documentPath,r);return{document:n.document,frontmatter:n.frontmatter}}let o=ys(r);return e.doc.layout=o.layout,{document:o.document}};var fe=()=>{};function YS(e){fe=e}function A(e){let r=e.doc.document;fe(e.documentPath,r);let o=typeof r.tagName==="string"&&r.tagName.includes("-")?Pb(r):null;if(o)C.warn(o,{key:`slots:${e.documentPath??e.id}`,...e.documentPath===null?{}:{path:e.documentPath},source:"Components",tier:"problem"});L(r,e.documentPath??void 0)}function Re(e){return!Tm(e.documentPath??"")}async function yp(e=u.value){if(!e)return!1;if(await _C(e.id),Mm(e))return C.warn(`You have read access to this session — changes to ${e.documentPath??"this document"} stay in your browser and cannot be saved.`,{action:"file.save",key:`save.readOnly:${e.documentPath??e.id}`,...e.documentPath===null?{}:{path:e.documentPath},source:"Collaboration"}),!1;if(!Re(e))return C.warn(`${e.documentPath??"This file"} is a media file, so there is no document for Save to write.`,{key:`save.notADocument:${e.documentPath??e.id}`,...e.documentPath===null?{}:{path:e.documentPath},source:"Save"}),!1;let r=Za(e);if(r)return await r.save(),!e.doc.dirty;try{if(await d1(e))return A(e),!0;let o=await Td(e);if(e.documentPath)return await p().writeFile(e.documentPath,o),e.doc.dirty=!1,ix(),A(e),!0;if(e.fileHandle&&"createWritable"in e.fileHandle){let n=await e.fileHandle.createWritable();return await n.write(o),await n.close(),e.doc.dirty=!1,A(e),!0}C.warn("This document has no save target — use Export.",{key:"save.noTarget"})}catch(o){if(!(o instanceof Error&&o.name==="AbortError"))C.error(`Could not save ${e.documentPath??e.id}.`,{action:"file.save",detail:te(o),key:`save:${e.documentPath??e.id}`,...e.documentPath===null?{}:{path:e.documentPath},source:"Save"})}return!1}function Ee(e){return _i(e.doc.sourceFormat)??(e.doc.mode==="content"?Fo():void 0)}async function ZS(){let e=u.value;if(!e)return;try{await Kt();let r=Ee(e),o=await Td(e),n=r?rx(r.mediaType)??"text/plain":"application/json",a=r?r.extensions[0]:".json",l=r?r.name:"Jx Component",g=r?`content${a}`:"component.json";if("showSaveFilePicker"in window){let w=e.documentPath?e.documentPath.split("/").pop():g,h=await window.showSaveFilePicker({suggestedName:w,types:[{accept:{[n]:[a]},description:l}]}),v=await h.createWritable();await v.write(o),await v.close(),e.doc.dirty=!1,A(e),C.success(`Exported as ${h.name}.`)}else{let w=new Blob([o],{type:n}),h=URL.createObjectURL(w),v=document.createElement("a");v.href=h,v.download=g,v.click(),URL.revokeObjectURL(h),e.doc.dirty=!1,A(e),C.success(`Downloaded ${g}.`)}}catch(r){if(!(r instanceof Error&&r.name==="AbortError"))C.error("Could not export the document.",{detail:te(r),source:"Export"})}}async function pe(e,r){let o=Tm(e)?await jb(e):await Us({path:e});return cC(o,r)??""}async function dm(e){let r=await pe(e.path,"delete"),o=`Delete ${e.name}? This cannot be undone.`;return Boolean(await to("Delete File",r===""?o:`${o} ${r}`,{confirmLabel:"Delete",destructive:!0}))}async function um(e,r="rename"){let o=await pe(e,r);return o===""?void 0:o}
2
- export{Nb,gs,cm,tx,Ob,Ab,Vu,Dr,nx,Za,zu,nT,Td,iT,rT,oT,ix,rx,Do,JS,YS,yp,ZS,dm,um};
3
-
4
- //# debugId=B0789673446C505064756E2164756E21
5
- //# sourceMappingURL=studio-7vg6jcd3.js.map
@@ -1,9 +0,0 @@
1
- import{hi}from"./studio-zyqn40w4.js";import{ge,Q,y,jr,C}from"./studio-55h4mstj.js";import{Ic,Us,gm}from"./studio-yb560vxr.js";import{_o}from"./studio-1q1sh2ax.js";import{pn,an}from"./studio-9mccjwjh.js";import{ot,zt,T,I,An,Ct}from"./studio-g1shz58g.js";import{jd}from"./studio-t1xzawhr.js";import{gT}from"./studio-yw05w8f0.js";import{Kn}from"./studio-rc6dvxjb.js";var N={message:"no media file to look for",status:"failed"};function v(t){let e=hi(t);return e===""?null:{path:e}}function uT(t){let e=v(t);return e===null?null:Ic(e)}async function jb(t){let e=v(t);return e===null?N:Us(e)}function hT(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 gm(t.result)}}var b={$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",b);var g=null,h=null,p=null,d=null;function j(t,e){t.rows=e.rows,t.hasRows=e.hasRows,t.hasFinished=e.hasFinished,t.clearLabel=e.clearLabel}function H(t){if(g!==t)return!1;return d===null?p!==null:d.root.parentNode===t}function w(t,e){if(H(t))return;f(),g=t;let a=y({cancel:e.cancel,clearFinished:e.clearFinished,clearLabel:"",hasFinished:!1,hasRows:!1,rows:[],toggleLog:e.toggleLog});h=ge(),h.run(()=>{Q(()=>{j(a,e.project())})});let o=I("panel-activity",a,t);p=o,o.then((i)=>{if(p===o)d=i;else i.dispose()})}function f(){h?.stop(),h=null;let t=p;if(p=null,d)d.dispose(),d=null;else if(t)t.then((e)=>e.dispose());g=null}var s=y([]),R=20,u=new Map,x=0;function F(){return x+=1,`a${x}`}function c(t){return t.state!=="running"}function S(){let t=s.filter((e)=>c(e)).length-R;while(t>0){let e=s.findIndex((a)=>c(a));if(e===-1)return;u.delete(s[e].id),s.splice(e,1),t-=1}}function ba(t){let e={cancellable:t.cancel!==void 0,endedAt:null,expanded:!1,id:F(),log:[],startedAt:jr(),state:"running",status:t.status??"",steps:(t.steps??[]).map((i)=>({label:i,state:"pending"})),title:t.title,...t.source===void 0?{}:{source:t.source}};if(t.cancel)u.set(e.id,t.cancel);s.push(e);let a=s.at(-1);S();let o=(i,r)=>{if(c(a))return;if(a.state=i,a.endedAt=jr(),r!==void 0)a.status=r;for(let n of a.steps)n.state=n.state==="done"?"done":i==="done"?"done":"failed";a.cancellable=!1,u.delete(a.id),S()};return{done(i){o("done",i)},entry:a,fail(i,r={}){if(c(a))return;let n=a.log.join(`
2
- `);o("failed",i),C.error(i,{source:a.source??a.title,...n===""?{}:{detail:n},...r.action===void 0?{}:{action:r.action},...r.path===void 0?{}:{path:r.path}})},id:a.id,log(i){let r=i.replace(/\s+$/,"");if(r!=="")a.log.push(r)},setStatus(i){if(!c(a))a.status=i},step(i){let r=a.steps.findIndex((n)=>n.label===i);if(r===-1)a.steps.push({label:i,state:"pending"}),r=a.steps.length-1;for(let[n,l]of a.steps.entries())l.state=n<r?"done":n===r?"running":l.state;a.status=i}}}function A(t){return s.find((e)=>e.id===t)}function m(){return s.filter((t)=>!c(t))}function P(t){let e=A(t),a=u.get(t);if(!e||!a||c(e))return!1;return a(),u.delete(t),e.state="cancelled",e.endedAt=jr(),e.cancellable=!1,e.status="Cancelled",!0}function M(){let t=s.filter((a)=>!c(a)),e=s.length-t.length;return s.splice(0,s.length,...t),e}function cT(){return m().map((t)=>`activity: ${t.title} — ${t.status||"running"}`)}var D={cancelled:"⊘",done:"✓",failed:"✕",running:"⋯"},V={done:"✓",failed:"✕",pending:"·",running:"⋯"};function z(t,e=jr()){let a=Math.max(0,(t.endedAt??e)-t.startedAt);if(a<1000)return`${a}ms`;let o=Math.round(a/1000);return o<60?`${o}s`:`${Math.floor(o/60)}m ${o%60}s`}function _(t,e){return{icon:V[t.state],key:`${e}:${t.label}`,label:t.label,state:t.state}}function O(t){let e=t.log.length;return{cancellable:t.cancellable,duration:z(t),expanded:t.expanded,hasLog:e>0,hasSource:(t.source??"")!=="",hasStatus:t.status!=="",hasSteps:t.steps.length>0,icon:D[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((a,o)=>_(a,o)),title:t.title}}function U(){let t=s.filter((e)=>c(e)).length;return{clearLabel:`Clear ${t} finished`,hasFinished:t>0,hasRows:s.length>0,rows:s.map((e)=>O(e))}}var W={cancel:(t)=>{P(t)},clearFinished:()=>{M()},project:U,toggleLog:(t)=>{let e=A(t);if(e)e.expanded=!e.expanded}};function B(){return _o`<div data-deploy-checklist></div>
4
- <div data-activity-surface></div>`}function q(t){let e=t.querySelector("[data-activity-surface]");if(!e){f();return}w(e,W)}function dT(){Kn({id:"activity",title:"Activity",level:"project",dock:"bottom",icon:"clock-counter-clockwise",rail:!1,badge:()=>m().length>0?m().length:null,render:()=>B(),afterRender:(t,e)=>{gT(e),q(e)}})}var k={$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",k);function L(t){let e=document.createElement("div");e.style.pointerEvents="auto",e.setAttribute(ot,zt("modal","progress")),t.layer.append(e);let a=!1,o=y({background:()=>{t.onBackground()},cancel:()=>{t.onCancel()},cancelLabel:t.cancellable?"Cancel":"",closed:()=>{t.onClosed()},status:t.status,title:t.title}),i=null,r=I("progress-modal",o,e).then(async(n)=>{let l=n.root;if(a)return n.dispose(),l;if(i=n,await An(l),a)return l;return pn(l),l});return{close(){if(a)return;a=!0;let n=i?.root;if(n instanceof HTMLElement)an(n);i?.dispose(),i=null,e.remove()},host:e,ready:r,setStatus(n){o.status=n}}}function ya(t){let e=!1,a=ba({title:t.title,...t.status===void 0?{}:{status:t.status},...t.source===void 0?{}:{source:t.source},...t.cancel===void 0?{}:{cancel:t.cancel}}),o=()=>{if(e)return;e=!0,r.close()},i=()=>{o(),jd("activity")},r=L({cancellable:t.cancel!==void 0,layer:Ct("modal"),onBackground:i,onCancel:()=>{o(),t.cancel?.()},onClosed:o,status:t.status??"",title:t.title});return{activity:a,done(){a.done(),o()},fail(n){let l=(n??"").trim();if(l===""||l.includes(`
5
- `))a.log(l),a.fail(`${t.title} failed`);else a.fail(l);o()},log(n){a.log(n)},setStatus(n){if(a.setStatus(n),!e)r.setStatus(n)}}}
6
- export{ba,cT,dT,ya,uT,jb,hT};
7
-
8
- //# debugId=EA4F84741816E31364756E2164756E21
9
- //# sourceMappingURL=studio-7zx31knw.js.map
@@ -1,5 +0,0 @@
1
- import{RS,$S,IS}from"./studio-vrmcjf9g.js";import{p,Ve}from"./studio-xz2yxfcb.js";import{Uf,J0,Y0}from"./studio-933e30n4.js";import{yT,Hb,wa,kT,No,Xa,Vb}from"./studio-tdcprbqb.js";import{me}from"./studio-pre0skq6.js";var t="checking",i=null;function nb(){return Ve()&&Boolean(p().cfConnect)}async function zf(){if(!nb())return;i??=(async()=>{try{t=await p().cfConnection?.()??null}catch{t=null}i=null,sp()})(),await i}function Zk(){if(nb()&&t==="checking"&&!i)zf()}function Xk(){t="checking",i=null}async function d(){let n=await p().cfConnect?.();if(n?.status==="connected"&&!n.connection.accountId){let{openCfAccountPicker:e}=await (me("af1h381v"),import("./cf-account-picker-af1h381v.js"));await e()}No(),await zf()}function s(){let n={id:"disconnect",label:"Disconnect",run:async()=>{await p().cfDisconnect?.(),No(),await zf()},variant:"negative"},e=(r)=>({id:r==="Connect"?"connect":"reconnect",label:r,run:d,variant:"accent"}),o={id:"cloudflare",label:"Cloudflare",revoke:()=>{}};if(t==="checking")return{...o,actions:[],connected:!1,detail:"Checking your connection…"};if(!t?.connected)return{...o,actions:[e("Connect")],connected:!1,detail:"Not connected. Connecting publishes this site and runs the assistant on Workers AI."};let c=()=>{n.run()};if(t.needsReconnect)return{...o,actions:[e("Reconnect"),n],connected:!0,detail:"Connection expired. Reconnect to keep publishing and the assistant working.",revoke:c};if(t.needsAccount||!t.accountId)return{...o,actions:[{id:"choose-account",label:"Choose account",run:async()=>{let{openCfAccountPicker:r}=await (me("af1h381v"),import("./cf-account-picker-af1h381v.js"));if(await r())No(),await zf()},variant:"accent"},n],connected:!0,detail:"Connected, but no account is chosen yet — publishing and the assistant need one.",revoke:c};return{...o,actions:[n],connected:!0,detail:`Connected — ${t.accountName??t.accountId}.`,revoke:c}}function l(){let n=Uf(),e=J0();return{connected:Boolean(n),detail:n?`Connected${e?` — account ${e}`:""}.`:"Not connected. Publishing will ask when it needs it.",id:"cloudflare",label:"Cloudflare",revoke:Y0}}function u(n){let e={id:n.id,label:n.label,run:async()=>{await Vb(n)}};if(n.primary)e.variant="accent";return e}function f(n){return{actions:(n.actions??[]).map((e)=>u(e)),connected:n.connected??!1,detail:n.detail,id:`platform:${n.id}`,label:n.label,revoke:()=>{}}}function G0(){let n=RS(),e=Xa(),o=wa();return[{id:"github",label:"GitHub",detail:n?$S()==="desktop"?"Signed in — the token is in this app's config folder, readable only by you.":"Signed in — a device-flow token is stored in this browser.":"Not signed in. Cloning and pushing will ask when they need it.",connected:Boolean(n),revoke:IS},{id:"ai",label:"AI provider",detail:Hb()?`Key stored. Model ${e}${o?` via ${o}`:""}.`:"No key stored. The Assistant section is where one is entered.",connected:Hb(),revoke:kT},nb()?s():l(),...yT().map((c)=>f(c))]}function Qk(n){let e=G0().find((o)=>o.id===n);if(!e)return!1;return e.revoke(),sp(),!0}var a=new Set;function eE(n){return a.add(n),()=>{a.delete(n)}}function sp(){for(let n of a)n()}
2
- export{nb,zf,Zk,Xk,G0,Qk,eE,sp};
3
-
4
- //# debugId=97CF6214B79C962B64756E2164756E21
5
- //# sourceMappingURL=studio-8bxk97km.js.map
@@ -1,5 +0,0 @@
1
- import{St,Oo,Xo,eh}from"./studio-w0cgf6jg.js";function Uf(){return Oo(St.cfToken)}function K0(t){Xo(St.cfToken,t||"")}function J0(){return Oo(St.cfAccountId)}function RI(t){Xo(St.cfAccountId,t||"")}function Y0(){eh([St.cfToken,St.cfAccountId])}
2
- export{Uf,K0,J0,RI,Y0};
3
-
4
- //# debugId=6C77B9E400F50A4E64756E2164756E21
5
- //# sourceMappingURL=studio-933e30n4.js.map