@jxsuite/studio 9.0.0 → 10.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 (178) hide show
  1. package/dist/chunks/{2020-89fz3pfy.js → 2020-j56903f1.js} +3 -3
  2. package/dist/chunks/adapter-wc5zvg9a.js +4 -0
  3. package/dist/chunks/{add-new-flow-nmkqpjym.js → add-new-flow-snx1s4b0.js} +3 -3
  4. package/dist/chunks/{cf-account-picker-2e06qxey.js → cf-account-picker-xyqw0jex.js} +3 -3
  5. package/dist/chunks/cf-settings-hp1pjm0n.js +4 -0
  6. package/dist/chunks/components-nkwphrx3.js +4 -0
  7. package/dist/chunks/content-source-6a253wmk.js +4 -0
  8. package/dist/chunks/{convert-to-repeater-j9hfcj4f.js → convert-to-repeater-fhdwyg14.js} +3 -3
  9. package/dist/chunks/editor-wqrc68ca.js +4 -0
  10. package/dist/chunks/entry-commands-nef0wrmp.js +4 -0
  11. package/dist/chunks/{extension-sections-thfke054.js → extension-sections-8ez2rrk8.js} +2 -2
  12. package/dist/chunks/file-ops-y3w71k1n.js +4 -0
  13. package/dist/chunks/files-de90apn9.js +4 -0
  14. package/dist/chunks/format-host-zfjz4rzm.js +4 -0
  15. package/dist/chunks/fs-events-77c0mr0x.js +4 -0
  16. package/dist/chunks/grid-open-4n4fjfpf.js +4 -0
  17. package/dist/chunks/{grid-view-7d2nx83y.js → grid-view-ka55z38f.js} +4 -4
  18. package/dist/chunks/iframe-host-na2mywz4.js +4 -0
  19. package/dist/chunks/index-ewmgdb7c.js +4 -0
  20. package/dist/chunks/{index-jxmt7vh8.js → index-qb98xhse.js} +3 -3
  21. package/dist/chunks/{javascript-vmqp56ke.js → javascript-ces13wny.js} +2 -2
  22. package/dist/chunks/{jsonMode-n3wmpant.js → jsonMode-6md16d4v.js} +2 -2
  23. package/dist/chunks/jx-validate-b309c020.js +4 -0
  24. package/dist/chunks/layers-8rn8y6qv.js +4 -0
  25. package/dist/chunks/layers-panel-eyah7h9z.js +4 -0
  26. package/dist/chunks/media-library-gs3np47y.js +4 -0
  27. package/dist/chunks/media-picker-tt7dk4tb.js +4 -0
  28. package/dist/chunks/{monaco-binding-wfhmz89d.js → monaco-binding-p8j80s4w.js} +3 -3
  29. package/dist/chunks/monaco-buffer-wsf6cmnq.js +4 -0
  30. package/dist/chunks/{monaco-setup-fty7a8vg.js → monaco-setup-wasktzfg.js} +2 -2
  31. package/dist/chunks/notify-qwst108r.js +4 -0
  32. package/dist/chunks/platform-c16mqvmp.js +4 -0
  33. package/dist/chunks/publish-panel-d34bhvwj.js +4 -0
  34. package/dist/chunks/{publish-quick-12hh8926.js → publish-quick-vr695j26.js} +3 -3
  35. package/dist/chunks/publish-workspace-2yr60mt4.js +4 -0
  36. package/dist/chunks/quick-search-e6xsdv0d.js +4 -0
  37. package/dist/chunks/references-gsj6trdv.js +4 -0
  38. package/dist/chunks/right-panel-33jv1knc.js +4 -0
  39. package/dist/chunks/source-control-bj9bejjv.js +4 -0
  40. package/dist/chunks/{studio-9ndgd55w.js → studio-03mqh8ax.js} +4 -4
  41. package/dist/chunks/{studio-apapy17g.js → studio-06j4en5h.js} +2 -2
  42. package/dist/chunks/{studio-aghsg0ds.js → studio-0ydxv2mr.js} +6 -6
  43. package/dist/chunks/{studio-ekzbgnjp.js → studio-1e8dw2w2.js} +4 -4
  44. package/dist/chunks/{studio-0nefxhar.js → studio-2hsqbq7b.js} +5 -5
  45. package/dist/chunks/{studio-sm2f0sc6.js → studio-2j86y34y.js} +5 -5
  46. package/dist/chunks/{studio-1cfyd1ys.js → studio-2ks6ka4g.js} +3 -3
  47. package/dist/chunks/{studio-vtey9w98.js → studio-34jrz12k.js} +4 -4
  48. package/dist/chunks/{studio-e4rq6x0q.js → studio-35vrtpdq.js} +4 -4
  49. package/dist/chunks/{studio-a9k86nq6.js → studio-38g0jdz7.js} +4 -4
  50. package/dist/chunks/{studio-9gzvypw4.js → studio-396srjbk.js} +4 -4
  51. package/dist/chunks/{studio-4j35hgsw.js → studio-3c8pp7pb.js} +4 -4
  52. package/dist/chunks/{studio-z1p91z5a.js → studio-3v5cagy9.js} +4 -4
  53. package/dist/chunks/{studio-a6e5fzve.js → studio-3w35qvay.js} +4 -4
  54. package/dist/chunks/{studio-ry4789ng.js → studio-3zge48z4.js} +6 -6
  55. package/dist/chunks/{studio-9ra9e7m4.js → studio-45gyxpcq.js} +4 -4
  56. package/dist/chunks/{studio-tfmhnwyr.js → studio-4kzbrr5t.js} +3 -3
  57. package/dist/chunks/{studio-tyzgte21.js → studio-5tzgq6fx.js} +4 -4
  58. package/dist/chunks/{studio-nqexty8x.js → studio-5wzdy1jc.js} +6 -6
  59. package/dist/chunks/{studio-14hh60j8.js → studio-771k2n12.js} +4 -4
  60. package/dist/chunks/{studio-nm86874b.js → studio-7dzyz9n8.js} +98 -98
  61. package/dist/chunks/{studio-k5n4es74.js → studio-7xag4na8.js} +4 -4
  62. package/dist/chunks/studio-88bmt9rh.js +5 -0
  63. package/dist/chunks/{studio-kyw47pet.js → studio-9b7177jq.js} +4 -4
  64. package/dist/chunks/{studio-yjh9gddd.js → studio-9cxmp61c.js} +5 -5
  65. package/dist/chunks/{studio-qd0cycm4.js → studio-9dz76yqc.js} +5 -5
  66. package/dist/chunks/{studio-cg54vtet.js → studio-agyvzfm4.js} +4 -4
  67. package/dist/chunks/{studio-x2trkhk5.js → studio-c1pxszat.js} +4 -4
  68. package/dist/chunks/{studio-qs5fmhtj.js → studio-cpkamjdn.js} +7 -7
  69. package/dist/chunks/{studio-n4qq1n57.js → studio-d038kqbs.js} +4 -4
  70. package/dist/chunks/{studio-fj6jzgxw.js → studio-d83m0wyq.js} +4 -4
  71. package/dist/chunks/studio-dbxv7w4s.js +5 -0
  72. package/dist/chunks/{studio-7q6jdd4h.js → studio-de1s2x9v.js} +4 -4
  73. package/dist/chunks/{studio-h4jbgne2.js → studio-dx73md4n.js} +6 -6
  74. package/dist/chunks/{studio-nfwacw31.js → studio-ekgtrndg.js} +4 -4
  75. package/dist/chunks/{studio-79r8msnr.js → studio-epenqmvk.js} +3 -3
  76. package/dist/chunks/{studio-sc35ttdk.js → studio-et2q4s8n.js} +4 -4
  77. package/dist/chunks/{studio-g45r5vm8.js → studio-ewarnzm4.js} +2 -2
  78. package/dist/chunks/{studio-nfmpmkqb.js → studio-fy7jzj9j.js} +4 -4
  79. package/dist/chunks/{studio-kqh7fxn6.js → studio-gr36vnte.js} +4 -4
  80. package/dist/chunks/{studio-spza69tb.js → studio-gwrhcrss.js} +5 -5
  81. package/dist/chunks/{studio-8hf8qcm1.js → studio-h310mbqm.js} +4 -4
  82. package/dist/chunks/{studio-qevf5z9d.js → studio-h5tpz5ke.js} +4 -4
  83. package/dist/chunks/studio-h7weqf2q.js +5 -0
  84. package/dist/chunks/{studio-gk9yk8dj.js → studio-hcsba201.js} +6 -6
  85. package/dist/chunks/{studio-ws2r1d7e.js → studio-hwejq03c.js} +4 -4
  86. package/dist/chunks/{studio-9179bsm7.js → studio-hy4ye0dx.js} +6 -6
  87. package/dist/chunks/{studio-myb4mf0h.js → studio-jttyqrmh.js} +4 -4
  88. package/dist/chunks/{studio-k6hbx2fc.js → studio-jw0q5j6k.js} +4 -4
  89. package/dist/chunks/{studio-s4fq9jht.js → studio-k3a8rp3d.js} +4 -4
  90. package/dist/chunks/{studio-by8x0jvc.js → studio-k3bcy02e.js} +4 -4
  91. package/dist/chunks/{studio-3hpcawh8.js → studio-m48v13s3.js} +3 -3
  92. package/dist/chunks/{studio-4qg61g9j.js → studio-ndskgqef.js} +4 -4
  93. package/dist/chunks/studio-p1n2xjda.js +5 -0
  94. package/dist/chunks/{studio-ae7a69jc.js → studio-pgm83a2f.js} +5 -5
  95. package/dist/chunks/{studio-0rg30pvs.js → studio-pqqq6v85.js} +4 -4
  96. package/dist/chunks/{studio-gskkgfe3.js → studio-r17asgs0.js} +4 -4
  97. package/dist/chunks/{studio-8pne0rx4.js → studio-ry81j4q1.js} +4 -4
  98. package/dist/chunks/{studio-mkw17ngg.js → studio-rzg8hnkf.js} +4 -4
  99. package/dist/chunks/{studio-trcfer2b.js → studio-s0fg2wav.js} +4 -4
  100. package/dist/chunks/{studio-gczve8zf.js → studio-tj2s0tks.js} +3 -3
  101. package/dist/chunks/{studio-tn7v8gey.js → studio-v9ywz2se.js} +5 -5
  102. package/dist/chunks/{studio-nvfa137z.js → studio-vswcpzk7.js} +5 -5
  103. package/dist/chunks/{studio-ztppbam0.js → studio-vzgmyt0v.js} +4 -4
  104. package/dist/chunks/{studio-fg4fj9ec.js → studio-wxdcd42g.js} +5 -5
  105. package/dist/chunks/{studio-xzgp0cp7.js → studio-wxhy1yh7.js} +4 -4
  106. package/dist/chunks/{studio-4rgem12q.js → studio-x08a3m0a.js} +4 -4
  107. package/dist/chunks/{studio-t6dqnnft.js → studio-x3mjr5cc.js} +4 -4
  108. package/dist/chunks/{studio-9ff0vqff.js → studio-x97ay0v4.js} +4 -4
  109. package/dist/chunks/{studio-32d8wyxq.js → studio-xdpz9rpe.js} +29 -29
  110. package/dist/chunks/{studio-6k9djnxw.js → studio-xh683qzy.js} +4 -4
  111. package/dist/chunks/{studio-c88gq88j.js → studio-xkxetm65.js} +5 -5
  112. package/dist/chunks/{studio-jr30g4ae.js → studio-y26hx9re.js} +4 -4
  113. package/dist/chunks/{studio-hcy9zeac.js → studio-yg3djpnm.js} +4 -4
  114. package/dist/chunks/studio-yx8hzqja.js +5 -0
  115. package/dist/chunks/{studio-ht81xjkr.js → studio-zg16eeq1.js} +4 -4
  116. package/dist/chunks/{studio-6rbaedw2.js → studio-zgx7svjd.js} +6 -6
  117. package/dist/chunks/{studio-ywf9y1e2.js → studio-zkq3r91p.js} +4 -4
  118. package/dist/chunks/{tsMode-byje4a01.js → tsMode-h6tkz0ea.js} +2 -2
  119. package/dist/chunks/workspace-home-zkkrxq3r.js +4 -0
  120. package/dist/chunks/workspace-tdqqjqaa.js +4 -0
  121. package/dist/chunks/{ws-client-h09h6sqg.js → ws-client-e951my95.js} +3 -3
  122. package/dist/iframe-entry.js +8 -8
  123. package/dist/manifest.json +72 -72
  124. package/dist/studio.js +64 -65
  125. package/package.json +11 -11
  126. package/src/canvas/iframe-editable-root.ts +32 -2
  127. package/src/format/format-host.ts +1 -1
  128. package/src/github/github-auth-status.ts +2 -2
  129. package/src/media/media-library.ts +73 -3
  130. package/src/packages/ensure-deps.ts +5 -5
  131. package/src/packages/pull-package-sync.ts +4 -4
  132. package/src/panels/activity-panel.ts +1 -1
  133. package/src/platforms/cloud.ts +48 -34
  134. package/src/settings/extension-commands.ts +1 -1
  135. package/src/settings/extension-rows.ts +1 -6
  136. package/src/settings/extensions-section.ts +3 -6
  137. package/src/surfaces/block-action-bar.json +1 -3
  138. package/src/surfaces/media-library.json +35 -0
  139. package/src/surfaces/media-library.ts +2 -0
  140. package/src/surfaces/menu.ts +62 -1
  141. package/src/surfaces/settings-packages.ts +1 -1
  142. package/src/types.ts +10 -8
  143. package/src/ui/layers.ts +1 -1
  144. package/src/ui/progress-modal.ts +3 -3
  145. package/dist/chunks/adapter-ay13gema.js +0 -4
  146. package/dist/chunks/cf-settings-5y04810c.js +0 -4
  147. package/dist/chunks/components-3vf75n83.js +0 -4
  148. package/dist/chunks/content-source-4f2raf4a.js +0 -4
  149. package/dist/chunks/editor-645krvtz.js +0 -4
  150. package/dist/chunks/entry-commands-3qmv8wkr.js +0 -4
  151. package/dist/chunks/file-ops-kkhp9ma7.js +0 -4
  152. package/dist/chunks/files-yswdhxrf.js +0 -4
  153. package/dist/chunks/format-host-4g8ex6bz.js +0 -4
  154. package/dist/chunks/fs-events-z9gpvc6t.js +0 -4
  155. package/dist/chunks/grid-open-fm4j183c.js +0 -4
  156. package/dist/chunks/iframe-host-q7fedsmr.js +0 -4
  157. package/dist/chunks/index-pt4wh98x.js +0 -4
  158. package/dist/chunks/jx-validate-19y62knt.js +0 -4
  159. package/dist/chunks/layers-panel-1qvc83y9.js +0 -4
  160. package/dist/chunks/layers-qf0bc7ze.js +0 -4
  161. package/dist/chunks/media-library-f9d5qcjb.js +0 -4
  162. package/dist/chunks/media-picker-rsb1fmk2.js +0 -4
  163. package/dist/chunks/monaco-buffer-ak0raadw.js +0 -4
  164. package/dist/chunks/notify-4qj70q0x.js +0 -4
  165. package/dist/chunks/platform-ehg6t9vd.js +0 -4
  166. package/dist/chunks/publish-panel-yhmda3cd.js +0 -4
  167. package/dist/chunks/publish-workspace-hx8qdv9p.js +0 -4
  168. package/dist/chunks/quick-search-r955m3q1.js +0 -4
  169. package/dist/chunks/references-8gxv0x7t.js +0 -4
  170. package/dist/chunks/right-panel-jarwqjpy.js +0 -4
  171. package/dist/chunks/source-control-84qt25m9.js +0 -4
  172. package/dist/chunks/studio-2bq7hheq.js +0 -5
  173. package/dist/chunks/studio-dvhxxxbd.js +0 -5
  174. package/dist/chunks/studio-ge08zwpv.js +0 -5
  175. package/dist/chunks/studio-nr0kcqc6.js +0 -5
  176. package/dist/chunks/studio-y47090vq.js +0 -5
  177. package/dist/chunks/workspace-7q4arnt3.js +0 -4
  178. package/dist/chunks/workspace-home-ge027kr6.js +0 -4
@@ -5,7 +5,8 @@
5
5
  * `menu.json` is the markup, ARIA and style, and this adapter is the decisions — which records,
6
6
  * what they print, where the panel opens, what runs on select. The kit owns the menu contract
7
7
  * (roving focus, typeahead, submenus, light dismissal, Escape) through the platform's own popover,
8
- * so nothing here binds a key or a document listener.
8
+ * so nothing here binds a key, and the one window listener is the record of which pointers are held
9
+ * ({@link pointersReleased}): a menu asked for mid-press is shown on the release.
9
10
  *
10
11
  * Every menu opens in a `getLayerSlot("popover", id)` slot, which is what carries the
11
12
  * `overlay.menu:<id>` region the screenshot pipeline addresses, and is torn down when the popover
@@ -309,6 +310,10 @@ export function openMenu(options: OpenMenuOptions): MenuHandle {
309
310
  if (aborted()) {
310
311
  return;
311
312
  }
313
+ await pointersReleased(controller.signal);
314
+ if (aborted()) {
315
+ return;
316
+ }
312
317
  const source =
313
318
  options.opener instanceof HTMLElement && options.opener !== document.body
314
319
  ? options.opener
@@ -368,6 +373,62 @@ export function openMenu(options: OpenMenuOptions): MenuHandle {
368
373
  return handle;
369
374
  }
370
375
 
376
+ /**
377
+ * The pointers pressed in this document and not yet released, by `pointerId`.
378
+ *
379
+ * Read by {@link pointersReleased}. Window listeners in the capture phase, so the record is current
380
+ * before any handler in the document runs, a `contextmenu` handler included. A press in the canvas
381
+ * iframe is never seen here, and needs not be: that release lands in the iframe's document, which
382
+ * cannot light-dismiss a popover in this one. Bound at load, so the press that asks for the first
383
+ * menu is already recorded; not at all without a window, where the docs build imports this module
384
+ * for the command catalog and nothing is ever pressed.
385
+ */
386
+ const pressedPointers = new Set<number>();
387
+ if (typeof window !== "undefined") {
388
+ window.addEventListener("pointerdown", (event) => pressedPointers.add(event.pointerId), true);
389
+ window.addEventListener("pointerup", (event) => pressedPointers.delete(event.pointerId), true);
390
+ window.addEventListener(
391
+ "pointercancel",
392
+ (event) => pressedPointers.delete(event.pointerId),
393
+ true,
394
+ );
395
+ // A release outside a window that lost focus may never arrive.
396
+ window.addEventListener("blur", () => pressedPointers.clear());
397
+ }
398
+
399
+ /**
400
+ * Settle once no pointer is held down in this document, or when `signal` aborts.
401
+ *
402
+ * A menu shown while the button that asked for it is still down is light-dismissed by that button's
403
+ * release. On Linux and macOS `contextmenu` fires on the PRESS, so every right-click menu opened
404
+ * with the button held, and the release that followed is a `pointerup` outside the popover. The
405
+ * HTML light-dismiss algorithm hides every `auto` popover on it, before the event reaches any
406
+ * listener, so it cannot be cancelled. Chromium 156 exempts a non-primary button and Electron 43's
407
+ * Chromium does not: in the desktop app the menu flashed and vanished. Waiting for the release is
408
+ * what Windows does natively, where `contextmenu` fires on it; a menu opened by a click or a key
409
+ * has nothing held and is shown at once.
410
+ */
411
+ function pointersReleased(signal: AbortSignal): Promise<void> {
412
+ if (pressedPointers.size === 0 || signal.aborted) {
413
+ return Promise.resolve();
414
+ }
415
+ return new Promise((resolve) => {
416
+ const waiting = new AbortController();
417
+ const settle = (): void => {
418
+ if (pressedPointers.size === 0 || signal.aborted) {
419
+ waiting.abort();
420
+ resolve();
421
+ }
422
+ };
423
+ // Registered after the record's own listeners, so each sees the record already updated.
424
+ const options = { capture: true, signal: waiting.signal };
425
+ window.addEventListener("pointerup", settle, options);
426
+ window.addEventListener("pointercancel", settle, options);
427
+ window.addEventListener("blur", settle, { signal: waiting.signal });
428
+ signal.addEventListener("abort", settle, { signal: waiting.signal });
429
+ });
430
+ }
431
+
371
432
  /**
372
433
  * Give the keyboard back to the opener BEFORE a chosen row runs, while the menu still holds it.
373
434
  *
@@ -73,7 +73,7 @@ export interface PackagesActions {
73
73
  /** Move every package that is behind one. */
74
74
  updateAll: () => void;
75
75
  remove: (name: string) => void;
76
- /** Run `bun install` over the project as it stands. */
76
+ /** Install the project's dependencies as it stands. */
77
77
  reinstall: () => void;
78
78
  }
79
79
 
package/src/types.ts CHANGED
@@ -472,8 +472,9 @@ export interface StudioPlatform {
472
472
  removePackage: (name: string) => Promise<void>;
473
473
  listPackages: () => Promise<PackageInfo[]>;
474
474
  /**
475
- * Run `bun install` in the project root. Optional: platforms without a Bun-capable backend omit
476
- * it and the install-on-open / reinstall affordances are skipped.
475
+ * Install the project's dependencies (npm's installer, writing `package-lock.json`). Optional:
476
+ * platforms with no `node_modules` to install into (the cloud) omit it and the install-on-open /
477
+ * reinstall affordances are skipped.
477
478
  */
478
479
  installDependencies?: () => Promise<PackageOpResult>;
479
480
  /** Whether the project has uninstalled dependencies (node_modules missing). */
@@ -486,7 +487,7 @@ export interface StudioPlatform {
486
487
  packageVersions?: () => Promise<PackageVersionInfo[]>;
487
488
  /**
488
489
  * Rewrite the version range of each named package (preserving its dependencies/devDependencies
489
- * placement) and run `bun install`. Used by the @jxsuite bump and per-dependency updates.
490
+ * placement) and install. Used by the @jxsuite bump and per-dependency updates.
490
491
  */
491
492
  setPackageVersions?: (
492
493
  updates: { name: string; version: string; dev?: boolean }[],
@@ -522,11 +523,12 @@ export interface StudioPlatform {
522
523
  * is dropped from the registry before composition rather than passed to it. A studio that
523
524
  * advertised a shipped list would offer rows the host would refuse.
524
525
  *
525
- * Each entry additionally carries two facts only a backend holds: whether THIS host resolves the
526
- * package without a project install (`bundled`), and whether the project has it installed
527
- * (`installed`) — the latter because `listPackages` does not mean one thing across backends.
528
- * `enabled` is deliberately absent: it is `projectConfig.extensions.includes(name)`, which Studio
529
- * already owns and rewrites through the `updateSiteConfig` chokepoint.
526
+ * Each entry additionally carries one fact only a backend holds: whether the project has it
527
+ * installed (`installed`), because `listPackages` does not mean one thing across backends. No
528
+ * host answers for an extension the project lacks (specs/extensions.md §3), so a row that is not
529
+ * installed is always install-then-enable. `enabled` is deliberately absent: it is
530
+ * `projectConfig.extensions.includes(name)`, which Studio already owns and rewrites through the
531
+ * `updateSiteConfig` chokepoint.
530
532
  *
531
533
  * Optional: platforms without it offer no catalogue, and adding an extension stays a typed
532
534
  * package name.
package/src/ui/layers.ts CHANGED
@@ -523,7 +523,7 @@ function reducedMotion(): boolean {
523
523
  /**
524
524
  * **One of the three exceptions §13.5 lists** — behaviour that differs under `?automation=1` beyond
525
525
  * installing the hook, pinning the clock and selecting a profile. The other two are both refusals
526
- * to touch the project on disk: `packages/ensure-deps.ts` declines to run `bun install`, and
526
+ * to touch the project on disk: `packages/ensure-deps.ts` declines to run an install, and
527
527
  * `packages/jxsuite-update.ts` declines to prompt for a dependency update. This one is the only
528
528
  * exception that changes what a picture SHOWS rather than what it avoids doing.
529
529
  *
@@ -4,8 +4,8 @@
4
4
  *
5
5
  * What changed. This modal used to be four things at once: the running state, the error view, the
6
6
  * log and the operation's entire memory. It blocked the whole app, offered no way out, and took all
7
- * four with it when it closed — so a failed `bun install` could be read exactly once, and a hung
8
- * one could not be escaped at all. §16.4 splits those apart:
7
+ * four with it when it closed — so a failed install could be read exactly once, and a hung one
8
+ * could not be escaped at all. §16.4 splits those apart:
9
9
  *
10
10
  * - The **record** moves to `panels/activity-panel.ts`, which keeps the entry, its steps and its log
11
11
  * after the modal is gone;
@@ -120,7 +120,7 @@ export function showProgressModal(opts: ProgressModalOptions): ProgressModalHand
120
120
  fail(message: string) {
121
121
  // The error view is not rendered here any more: it is the Problems row, with the log as its
122
122
  // `detail`, and it is still on screen tomorrow. Three of the four call sites hand over a
123
- // CAPTURED LOG as their message — `result.log ?? "bun install failed"` — so a multi-line one
123
+ // CAPTURED LOG as their message — `result.log ?? "Install failed"` — so a multi-line one
124
124
  // Is split the way the old view split it: "<title> failed" as the headline, the whole text
125
125
  // As the detail. A Problems list whose first row is 400 lines of `bun` output is not a list.
126
126
  const text = message.trim();
@@ -1,4 +0,0 @@
1
- import{qs,Gs,Wr}from"./studio-g45r5vm8.js";export{Wr as draggable,qs as dropTargetForElements,Gs as monitorForElements};
2
-
3
- //# debugId=6706B48D5462E95E64756E2164756E21
4
- //# sourceMappingURL=adapter-ay13gema.js.map
@@ -1,4 +0,0 @@
1
- import{cb,DE,NE,Z2,AE}from"./studio-nr0kcqc6.js";import"./studio-14hh60j8.js";import"./studio-tfmhnwyr.js";import"./studio-9ndgd55w.js";export{AE as clearCfConnection,NE as getCfAccountId,cb as getCfToken,Z2 as setCfAccountId,DE as setCfToken};
2
-
3
- //# debugId=9B842315B780DEB864756E2164756E21
4
- //# sourceMappingURL=cf-settings-5y04810c.js.map
@@ -1,4 +0,0 @@
1
- import{Ne,Zw,xa,Ob,Fc,jc}from"./studio-ekzbgnjp.js";import"./studio-9ndgd55w.js";export{Zw as _componentRegistryLoaded,Fc as buildComponentInstance,Ne as componentRegistry,jc as computeRelativePath,xa as loadComponentRegistry,Ob as noteComponentSaved};
2
-
3
- //# debugId=FCFBCB13AFA3037764756E2164756E21
4
- //# sourceMappingURL=components-3vf75n83.js.map
@@ -1,4 +0,0 @@
1
- import{fb,rS,sS,mb,tT,nT,iT}from"./studio-fg4fj9ec.js";import"./studio-x2trkhk5.js";import"./studio-spza69tb.js";import"./studio-9179bsm7.js";import"./studio-0nefxhar.js";import"./studio-yjh9gddd.js";import"./studio-0rg30pvs.js";import"./studio-ekzbgnjp.js";import"./studio-nqexty8x.js";import"./studio-g45r5vm8.js";import"./studio-vtey9w98.js";import"./studio-t6dqnnft.js";import"./studio-y47090vq.js";import"./studio-14hh60j8.js";import"./studio-myb4mf0h.js";import"./studio-ajw4k8hp.js";import"./studio-qs5fmhtj.js";import"./studio-8hf8qcm1.js";import"./studio-7q6jdd4h.js";import"./studio-by8x0jvc.js";import"./studio-ztppbam0.js";import"./studio-4rgem12q.js";import"./studio-8pne0rx4.js";import"./studio-tfmhnwyr.js";import"./studio-psh8mwnw.js";import"./studio-a6e5fzve.js";import"./studio-9ndgd55w.js";export{rS as collectionDirs,fb as collectionInfo,sS as collectionSourceDirs,nT as createCollectionSource,iT as createPagesSource,mb as listCollectionEntryIds,tT as reloadDraftAwareGrids};
2
-
3
- //# debugId=5EDD101C20492A8A64756E2164756E21
4
- //# sourceMappingURL=content-source-4f2raf4a.js.map
@@ -1,4 +0,0 @@
1
- import{H2,Wf,B2,z2,W2,np,V2,U2,ga,Y0,vd,q2,Wn,we}from"./studio-nm86874b.js";export{H2 as CancellationTokenSource,Wf as Emitter,B2 as KeyCode,z2 as KeyMod,ga as MarkerSeverity,Y0 as MarkerTag,W2 as Position,np as Range,V2 as Selection,U2 as SelectionDirection,q2 as Token,vd as Uri,Wn as editor,we as languages};
2
-
3
- //# debugId=0ABAF5272BD2763564756E2164756E21
4
- //# sourceMappingURL=editor-645krvtz.js.map
@@ -1,4 +0,0 @@
1
- import{B_,Y2,bE}from"./studio-mkw17ngg.js";import"./studio-ge08zwpv.js";import"./studio-ht81xjkr.js";import"./studio-6rbaedw2.js";import"./studio-k6hbx2fc.js";import"./studio-nfmpmkqb.js";import"./studio-n4qq1n57.js";import"./studio-9ff0vqff.js";import"./studio-fg4fj9ec.js";import"./studio-cg54vtet.js";import"./studio-x2trkhk5.js";import"./studio-spza69tb.js";import"./studio-kqh7fxn6.js";import"./studio-9179bsm7.js";import"./studio-0nefxhar.js";import"./studio-yjh9gddd.js";import"./studio-0rg30pvs.js";import"./studio-ekzbgnjp.js";import"./studio-nqexty8x.js";import"./studio-g45r5vm8.js";import"./studio-vtey9w98.js";import"./studio-t6dqnnft.js";import"./studio-y47090vq.js";import"./studio-14hh60j8.js";import"./studio-myb4mf0h.js";import"./studio-ajw4k8hp.js";import"./studio-qs5fmhtj.js";import"./studio-8hf8qcm1.js";import"./studio-7q6jdd4h.js";import"./studio-by8x0jvc.js";import"./studio-ztppbam0.js";import"./studio-4rgem12q.js";import"./studio-8pne0rx4.js";import"./studio-tfmhnwyr.js";import"./studio-psh8mwnw.js";import"./studio-a6e5fzve.js";import"./studio-9ndgd55w.js";import"./studio-k1wvtp03.js";export{Y2 as createEntry,B_ as entryFormatName,bE as registerContentCommands};
2
-
3
- //# debugId=B3F7191EB41FD41A64756E2164756E21
4
- //# sourceMappingURL=entry-commands-3qmv8wkr.js.map
@@ -1,4 +0,0 @@
1
- import{QD,jr,AT,rP,OT,wp,MT,wb,xb}from"./studio-x2trkhk5.js";import"./studio-spza69tb.js";import"./studio-9179bsm7.js";import"./studio-0nefxhar.js";import"./studio-yjh9gddd.js";import"./studio-0rg30pvs.js";import"./studio-ekzbgnjp.js";import"./studio-nqexty8x.js";import"./studio-g45r5vm8.js";import"./studio-vtey9w98.js";import"./studio-t6dqnnft.js";import"./studio-y47090vq.js";import"./studio-14hh60j8.js";import"./studio-myb4mf0h.js";import"./studio-ajw4k8hp.js";import"./studio-qs5fmhtj.js";import"./studio-8hf8qcm1.js";import"./studio-7q6jdd4h.js";import"./studio-by8x0jvc.js";import"./studio-ztppbam0.js";import"./studio-4rgem12q.js";import"./studio-8pne0rx4.js";import"./studio-tfmhnwyr.js";import"./studio-psh8mwnw.js";import"./studio-a6e5fzve.js";import"./studio-9ndgd55w.js";export{wb as confirmFileDelete,MT as exportFile,rP as openFile,AT as parseCollabSource,QD as parseFormatSource,jr as parseSourceForPath,xb as renamePromptMessage,wp as saveFile,OT as setDocumentSavedListener};
2
-
3
- //# debugId=12B19E983D3681CC64756E2164756E21
4
- //# sourceMappingURL=file-ops-kkhp9ma7.js.map
@@ -1,4 +0,0 @@
1
- import{Bs,pm,OE,ME,E2,PE,FE,jE,Z_,T2,hb,HE,L2,$2,BE,OD,I2,R2,pw,X_,MD,zE,D2,yi,Q_,WE,VE,fm,UE,N2,A2}from"./studio-ry4789ng.js";import"./studio-s4fq9jht.js";import"./studio-n4qq1n57.js";import"./studio-1cfyd1ys.js";import"./studio-9ff0vqff.js";import"./studio-fg4fj9ec.js";import"./studio-ws2r1d7e.js";import"./studio-79r8msnr.js";import"./studio-x2trkhk5.js";import"./studio-spza69tb.js";import"./studio-4qg61g9j.js";import"./studio-kqh7fxn6.js";import"./studio-9179bsm7.js";import"./studio-0nefxhar.js";import"./studio-yjh9gddd.js";import"./studio-0rg30pvs.js";import"./studio-ekzbgnjp.js";import"./studio-nqexty8x.js";import"./studio-g45r5vm8.js";import"./studio-vtey9w98.js";import"./studio-t6dqnnft.js";import"./studio-y47090vq.js";import"./studio-14hh60j8.js";import"./studio-myb4mf0h.js";import"./studio-ajw4k8hp.js";import"./studio-qs5fmhtj.js";import"./studio-8hf8qcm1.js";import"./studio-7q6jdd4h.js";import"./studio-by8x0jvc.js";import"./studio-ztppbam0.js";import"./studio-4rgem12q.js";import"./studio-8pne0rx4.js";import"./studio-tfmhnwyr.js";import"./studio-psh8mwnw.js";import"./studio-a6e5fzve.js";import"./studio-9ndgd55w.js";export{L2 as FILE_ROW_HEIGHT,BE as canMoveInto,R2 as createFileIn,Z_ as findHomePage,jE as initProjectRepo,$2 as isFileDrag,pw as listTakenNames,Bs as loadDirectory,PE as loadProject,pm as loadProjectDirectories,N2 as mountFilesPanel,MD as notifyMoveOutcome,Q_ as openFileInPane,yi as openFileInTab,T2 as openHomePage,hb as openLastSessionOrHome,FE as openProject,zE as parentDirOf,I2 as pickAndUploadTo,OE as refreshProjectDirectoriesFor,UE as registerFilesPanel,WE as reloadCleanTab,fm as reloadFileInTab,VE as reloadTabsIfChanged,HE as setSessionWorkspaceShow,E2 as setShowIgnoredFiles,D2 as settleRename,ME as showIgnoredFiles,A2 as unmountFilesPanel,OD as uploadFilesToDir,X_ as writeNewFile};
2
-
3
- //# debugId=6E30048FC4EC2D3564756E2164756E21
4
- //# sourceMappingURL=files-yswdhxrf.js.map
@@ -1,4 +0,0 @@
1
- import{Ht,Lh,Qc,Cv,Ux,ec,Xd,Na,Wi,of,fn,ul,kv,lr,oI,Aa,rI}from"./studio-a6e5fzve.js";import"./studio-9ndgd55w.js";export{lr as defaultContentFormat,ul as documentExtensions,Na as formatByExtension,Wi as formatByName,fn as formatForPath,oI as formatParse,Aa as formatSerialize,Ux as getExtensionCatalog,Cv as getExtensions,Xd as getFormats,Qc as loadExtensions,Ht as loadFormats,of as noFormatError,ec as refreshExtensionUi,Lh as refreshFormats,kv as routedPageExtensions,rI as splitFormatDocument};
2
-
3
- //# debugId=C90299CC3464784B64756E2164756E21
4
- //# sourceMappingURL=format-host-4g8ex6bz.js.map
@@ -1,4 +0,0 @@
1
- import{Ta,Hd,C$}from"./studio-8hf8qcm1.js";import"./studio-7q6jdd4h.js";import"./studio-by8x0jvc.js";import"./studio-ztppbam0.js";import"./studio-4rgem12q.js";import"./studio-8pne0rx4.js";import"./studio-tfmhnwyr.js";import"./studio-psh8mwnw.js";import"./studio-a6e5fzve.js";import"./studio-9ndgd55w.js";export{Hd as isRecentLocal,Ta as markLocalMutation,C$ as startFsSync};
2
-
3
- //# debugId=488DC9A47953DD8E64756E2164756E21
4
- //# sourceMappingURL=fs-events-z9gpvc6t.js.map
@@ -1,4 +0,0 @@
1
- import{ZE,zD,oS,XE,QE}from"./studio-1cfyd1ys.js";import"./studio-fg4fj9ec.js";import"./studio-x2trkhk5.js";import"./studio-spza69tb.js";import"./studio-9179bsm7.js";import"./studio-0nefxhar.js";import"./studio-yjh9gddd.js";import"./studio-0rg30pvs.js";import"./studio-ekzbgnjp.js";import"./studio-nqexty8x.js";import"./studio-g45r5vm8.js";import"./studio-vtey9w98.js";import"./studio-t6dqnnft.js";import"./studio-y47090vq.js";import"./studio-14hh60j8.js";import"./studio-myb4mf0h.js";import"./studio-ajw4k8hp.js";import"./studio-qs5fmhtj.js";import"./studio-8hf8qcm1.js";import"./studio-7q6jdd4h.js";import"./studio-by8x0jvc.js";import"./studio-ztppbam0.js";import"./studio-4rgem12q.js";import"./studio-8pne0rx4.js";import"./studio-tfmhnwyr.js";import"./studio-psh8mwnw.js";import"./studio-a6e5fzve.js";import"./studio-9ndgd55w.js";export{zD as openCollectionGrid,ZE as openCsvGridTab,XE as openGridSourcePicker,oS as openPagesGrid,QE as registerGridCommands};
2
-
3
- //# debugId=AD25A9B3B968468764756E2164756E21
4
- //# sourceMappingURL=grid-open-fm4j183c.js.map
@@ -1,4 +0,0 @@
1
- import{cL,dL,uL,hL,qS,Rb,Db,GS,Ul,pL,fL,mL,Nb,j2,sP,gL,Pc,Gw,Kw,bL,vL,yL,wL,xL,_L,SL,CL,kL,EL,TL,LL,KS,$L,Ab,IL,RL,DL,NL,AL,OL,Jw,ML,ql,PL,ih,FL,Yw,JS}from"./studio-0rg30pvs.js";import"./studio-ekzbgnjp.js";import"./studio-nqexty8x.js";import"./studio-g45r5vm8.js";import"./studio-t6dqnnft.js";import"./studio-14hh60j8.js";import"./studio-qs5fmhtj.js";import"./studio-by8x0jvc.js";import"./studio-ztppbam0.js";import"./studio-4rgem12q.js";import"./studio-8pne0rx4.js";import"./studio-tfmhnwyr.js";import"./studio-psh8mwnw.js";import"./studio-a6e5fzve.js";import"./studio-9ndgd55w.js";export{gL as adoptCanvasPreviewMode,dL as allowAutoRequestsOnNextRender,Db as beginDragSession,pL as canvasIdleBlockers,mL as canvasPointAt,Kw as clearDropIndicator,Yw as commitActiveEditSession,GS as currentDragSession,$L as dragHostTab,Gw as endDragSession,hL as flushCanvasEdits,JS as getEditBarAnchorRect,ql as getEditSnapshot,Ul as hostDragGeometry,qS as hostForCanvas,SL as isCaretActive,Rb as liveDragHostAt,sP as measureInCanvas,IL as mountIframeCanvas,RL as mountStylebookCanvas,ML as panToStylebookTag,fL as pointerAnchor,ih as postApplyFormat,DL as postColorSchemeToLiveHosts,LL as postDialogOpen,Pc as postDragMessage,NL as postLocaleToLiveHosts,FL as postOpenSlash,KS as postPatchToHosts,TL as postPopoverOpen,AL as postRedefineElementToLiveHosts,OL as postSiteStyleToLiveHosts,Jw as postStyleUpdateToStylebookHosts,Ab as releaseCanvasHosts,uL as requestCanvasEval,Nb as revealCanvasPath,j2 as revealCanvasPathIn,cL as sawIframeDragOver,xL as setCanvasContextMenuHandler,kL as setCanvasPointerDownHandler,wL as setCanvasSlashHandler,yL as setFileDropHandler,EL as setIframePatchEscalation,vL as setInsertZoneClickHandler,PL as setKeymapSource,bL as setNativeDragEnterHandler,_L as setStylebookHitHandler,CL as setToolbarRefresh};
2
-
3
- //# debugId=9F3DF202CEAD816064756E2164756E21
4
- //# sourceMappingURL=iframe-host-q7fedsmr.js.map
@@ -1,4 +0,0 @@
1
- import{HI,BI,zI,WI,VI,wu,UI,Og,qI,Vf,GI,Uf,d2,X0,ck,u2,h2,p2,f2,xu,m2,g2,b2,dk,uk,v2,y2,w2,x2,hk,_2}from"./studio-3hpcawh8.js";import{yd,Q0,Mg,S2,ZI,XI,QI,eR,Pg,mk,gk}from"./studio-h4jbgne2.js";import{zs,eP}from"./studio-qevf5z9d.js";import{Se,oe,Tv,Lv}from"./studio-nfwacw31.js";export{VI as COLLAB_SCHEMA_VERSION,xu as CollabPathError,Pg as EnvelopeError,XI as FRAME_AWARENESS,eR as FRAME_CONTROL,QI as FRAME_DOC_CLOSE,ZI as FRAME_DOC_SYNC,BI as FRONTMATTER_KEY,h2 as LOCAL_ORIGIN,HI as META_KEY,p2 as MIRROR_ORIGIN,hk as PRESENCE_PALETTE,f2 as SEED_ORIGIN,WI as SOURCE_KEY,zI as STRUCTURE_KEY,S2 as UndoManager,yd as YDoc,v2 as acquireSourceCanonical,Lv as applyDocOpToDoc,m2 as applyDocOpsToY,dk as canonicalOf,uk as canonicalRevOf,Tv as childArray,Se as cloneValue,_2 as colorForKey,Mg as createAbsolutePositionFromRelativePosition,Q0 as createRelativePositionFromTypeIndex,gk as decodeFrame,zs as deepEqual,eP as diffDocs,mk as encodeFrame,UI as frontmatterMap,oe as getNodeAtPath,x2 as isSourceReconciler,wu as metaMap,w2 as otherSourceEditors,y2 as releaseSourceCanonical,b2 as replaceYStructure,X0 as resolveYPath,u2 as seedStructure,qI as sourceText,Og as structureMap,Vf as toYChildren,GI as toYNode,ck as updateSourceText,d2 as yDocToJson,g2 as yEventsToDocOps,Uf as yValueToJson};
2
-
3
- //# debugId=9E25003D3A34DBB764756E2164756E21
4
- //# sourceMappingURL=index-pt4wh98x.js.map
@@ -1,4 +0,0 @@
1
- import{X2,hm,Q2,Bu}from"./studio-jr30g4ae.js";export{X2 as applyProjectSchemas,hm as validateDoc,Q2 as validateDocOrNull,Bu as validateProjectConfig};
2
-
3
- //# debugId=A95888877705833464756E2164756E21
4
- //# sourceMappingURL=jx-validate-19y62knt.js.map
@@ -1,4 +0,0 @@
1
- import{k2,Rk}from"./studio-tn7v8gey.js";import"./studio-qd0cycm4.js";import"./studio-sm2f0sc6.js";import"./studio-fj6jzgxw.js";import"./studio-xzgp0cp7.js";import"./studio-k6hbx2fc.js";import"./studio-nfmpmkqb.js";import"./studio-s4fq9jht.js";import"./studio-9ff0vqff.js";import"./studio-ae7a69jc.js";import"./studio-cg54vtet.js";import"./studio-x2trkhk5.js";import"./studio-spza69tb.js";import"./studio-kqh7fxn6.js";import"./studio-9179bsm7.js";import"./studio-0nefxhar.js";import"./studio-yjh9gddd.js";import"./studio-0rg30pvs.js";import"./studio-ekzbgnjp.js";import"./studio-nqexty8x.js";import"./studio-g45r5vm8.js";import"./studio-vtey9w98.js";import"./studio-t6dqnnft.js";import"./studio-y47090vq.js";import"./studio-14hh60j8.js";import"./studio-myb4mf0h.js";import"./studio-ajw4k8hp.js";import"./studio-qs5fmhtj.js";import"./studio-8hf8qcm1.js";import"./studio-7q6jdd4h.js";import"./studio-by8x0jvc.js";import"./studio-ztppbam0.js";import"./studio-4rgem12q.js";import"./studio-8pne0rx4.js";import"./studio-tfmhnwyr.js";import"./studio-psh8mwnw.js";import"./studio-a6e5fzve.js";import"./studio-9ndgd55w.js";import"./studio-k1wvtp03.js";export{Rk as registerLayersPanel,k2 as startLayerTitleEdit};
2
-
3
- //# debugId=F5D8D0CE9225B14C64756E2164756E21
4
- //# sourceMappingURL=layers-panel-1qvc83y9.js.map
@@ -1,4 +0,0 @@
1
- import{tt,f$,Ub,m$,qo,pC,xi,Zs,qb,g$}from"./studio-myb4mf0h.js";import"./studio-ajw4k8hp.js";import"./studio-qs5fmhtj.js";import"./studio-8pne0rx4.js";import"./studio-tfmhnwyr.js";import"./studio-psh8mwnw.js";export{qb as clearLayerSlot,Zs as getLayerSlot,f$ as initLayers,Ub as isModalOpen,m$ as isPopoverOpen,tt as layerHost,g$ as overlayIdleBlockers,qo as showConfirmDialog,xi as showPromptDialog,pC as showSaveDiscardDialog};
2
-
3
- //# debugId=3E1ED8836792A73C64756E2164756E21
4
- //# sourceMappingURL=layers-qf0bc7ze.js.map
@@ -1,4 +0,0 @@
1
- import{tP,xw,O2,fS,_w,LT,$T,M2,nP,iP,mS,oP,IT}from"./studio-dvhxxxbd.js";import"./studio-ae7a69jc.js";import"./studio-cg54vtet.js";import"./studio-x2trkhk5.js";import"./studio-spza69tb.js";import"./studio-4qg61g9j.js";import"./studio-kqh7fxn6.js";import"./studio-9179bsm7.js";import"./studio-0nefxhar.js";import"./studio-yjh9gddd.js";import"./studio-0rg30pvs.js";import"./studio-ekzbgnjp.js";import"./studio-nqexty8x.js";import"./studio-g45r5vm8.js";import"./studio-vtey9w98.js";import"./studio-t6dqnnft.js";import"./studio-y47090vq.js";import"./studio-14hh60j8.js";import"./studio-myb4mf0h.js";import"./studio-ajw4k8hp.js";import"./studio-qs5fmhtj.js";import"./studio-8hf8qcm1.js";import"./studio-7q6jdd4h.js";import"./studio-by8x0jvc.js";import"./studio-ztppbam0.js";import"./studio-4rgem12q.js";import"./studio-8pne0rx4.js";import"./studio-tfmhnwyr.js";import"./studio-psh8mwnw.js";import"./studio-a6e5fzve.js";import"./studio-9ndgd55w.js";export{tP as MEDIA_HOME_MODE,M2 as applyMediaBrowse,mS as closeMediaPickDialog,O2 as deleteMediaFile,_w as detachMediaLibrary,$T as focusMediaHome,fS as mediaLibraryMounted,oP as openMediaPickDialog,LT as renderMediaLibrary,iP as requestMediaReplace,nP as requestMediaUpload,IT as resetMediaLibrary,xw as selectedEntry};
2
-
3
- //# debugId=1B85E04D283C816864756E2164756E21
4
- //# sourceMappingURL=media-library-f9d5qcjb.js.map
@@ -1,4 +0,0 @@
1
- import{DT,NT,Wu,kw,P2,vS,F2,yS,Hl,bm}from"./studio-cg54vtet.js";import"./studio-kqh7fxn6.js";import"./studio-vtey9w98.js";import"./studio-t6dqnnft.js";import"./studio-myb4mf0h.js";import"./studio-ajw4k8hp.js";import"./studio-qs5fmhtj.js";import"./studio-7q6jdd4h.js";import"./studio-by8x0jvc.js";import"./studio-ztppbam0.js";import"./studio-4rgem12q.js";import"./studio-8pne0rx4.js";import"./studio-tfmhnwyr.js";import"./studio-psh8mwnw.js";import"./studio-a6e5fzve.js";import"./studio-9ndgd55w.js";export{kw as invalidateMediaCache,DT as isMediaScanPath,Hl as mountMediaPicker,NT as onProjectMediaChange,P2 as openFullMediaPicker,yS as pickAndUpload,Wu as projectMediaFiles,vS as showMediaPickerPopover,bm as unmountMediaPicker,F2 as uploadAndAssign};
2
-
3
- //# debugId=88DBECDD754458E264756E2164756E21
4
- //# sourceMappingURL=media-picker-rsb1fmk2.js.map
@@ -1,4 +0,0 @@
1
- import{Kp,mv,gv,K$,Jd,Jp,Yd,Yp}from"./studio-4rgem12q.js";import"./studio-tfmhnwyr.js";export{Kp as BUFFER_COMMIT,Jd as bufferIsLive,Jp as bufferMovedOn,mv as bufferWrites,K$ as cancelBufferWrites,gv as commitBufferWrites,Yd as commitTabBuffers,Yp as tabBufferUnsaved};
2
-
3
- //# debugId=24FF16FC222AB9A964756E2164756E21
4
- //# sourceMappingURL=monaco-buffer-ak0raadw.js.map
@@ -1,4 +0,0 @@
1
- import{Zd,ea,C,Th,dl,tf,_v}from"./studio-tfmhnwyr.js";export{dl as clearProblems,Th as dismiss,C as notify,_v as problemCount,tf as problemFindings,ea as problems,Zd as toasts};
2
-
3
- //# debugId=EBC10BE25E1B2B1364756E2164756E21
4
- //# sourceMappingURL=notify-4qj70q0x.js.map
@@ -1,4 +0,0 @@
1
- import{rf,sI,Ev,aI,p,_e}from"./studio-9ndgd55w.js";export{rf as canOpenProject,p as getPlatform,_e as hasPlatform,Ev as launcherSignal,aI as platformInFlight,sI as registerPlatform};
2
-
3
- //# debugId=CDDAFCE41C3095D264756E2164756E21
4
- //# sourceMappingURL=platform-ehg6t9vd.js.map
@@ -1,4 +0,0 @@
1
- import{wk,K2}from"./studio-6k9djnxw.js";import"./studio-nr0kcqc6.js";import"./studio-0nefxhar.js";import"./studio-nqexty8x.js";import"./studio-y47090vq.js";import"./studio-14hh60j8.js";import"./studio-myb4mf0h.js";import"./studio-ajw4k8hp.js";import"./studio-qs5fmhtj.js";import"./studio-ztppbam0.js";import"./studio-4rgem12q.js";import"./studio-8pne0rx4.js";import"./studio-tfmhnwyr.js";import"./studio-psh8mwnw.js";import"./studio-a6e5fzve.js";import"./studio-9ndgd55w.js";export{K2 as openPublishPanel,wk as seedPublishConnected};
2
-
3
- //# debugId=4578D6069A04EAE964756E2164756E21
4
- //# sourceMappingURL=publish-panel-yhmda3cd.js.map
@@ -1,4 +0,0 @@
1
- import{nR,xk,o_,r_,_k}from"./studio-gczve8zf.js";import"./studio-a9k86nq6.js";import"./studio-ws2r1d7e.js";import"./studio-79r8msnr.js";import"./studio-4qg61g9j.js";import"./studio-kqh7fxn6.js";import"./studio-9179bsm7.js";import"./studio-0nefxhar.js";import"./studio-yjh9gddd.js";import"./studio-0rg30pvs.js";import"./studio-ekzbgnjp.js";import"./studio-nqexty8x.js";import"./studio-g45r5vm8.js";import"./studio-vtey9w98.js";import"./studio-t6dqnnft.js";import"./studio-y47090vq.js";import"./studio-14hh60j8.js";import"./studio-myb4mf0h.js";import"./studio-ajw4k8hp.js";import"./studio-qs5fmhtj.js";import"./studio-7q6jdd4h.js";import"./studio-by8x0jvc.js";import"./studio-ztppbam0.js";import"./studio-4rgem12q.js";import"./studio-8pne0rx4.js";import"./studio-tfmhnwyr.js";import"./studio-psh8mwnw.js";import"./studio-a6e5fzve.js";import"./studio-9ndgd55w.js";export{r_ as detachPublishWorkspace,xk as focusPublishHome,o_ as publishWorkspaceMounted,_k as renderPublishWorkspace,nR as showPublishTab};
2
-
3
- //# debugId=D7F8A122C50D058864756E2164756E21
4
- //# sourceMappingURL=publish-workspace-hx8qdv9p.js.map
@@ -1,4 +0,0 @@
1
- import{Sk,Bg}from"./studio-z1p91z5a.js";import"./studio-ry4789ng.js";import"./studio-s4fq9jht.js";import"./studio-n4qq1n57.js";import"./studio-1cfyd1ys.js";import"./studio-9ff0vqff.js";import"./studio-fg4fj9ec.js";import"./studio-ws2r1d7e.js";import"./studio-79r8msnr.js";import"./studio-x2trkhk5.js";import"./studio-spza69tb.js";import"./studio-4qg61g9j.js";import"./studio-kqh7fxn6.js";import"./studio-9179bsm7.js";import"./studio-0nefxhar.js";import"./studio-yjh9gddd.js";import"./studio-0rg30pvs.js";import"./studio-ekzbgnjp.js";import"./studio-nqexty8x.js";import"./studio-g45r5vm8.js";import"./studio-vtey9w98.js";import"./studio-t6dqnnft.js";import"./studio-y47090vq.js";import"./studio-14hh60j8.js";import"./studio-myb4mf0h.js";import"./studio-ajw4k8hp.js";import"./studio-qs5fmhtj.js";import"./studio-8hf8qcm1.js";import"./studio-7q6jdd4h.js";import"./studio-by8x0jvc.js";import"./studio-ztppbam0.js";import"./studio-4rgem12q.js";import"./studio-8pne0rx4.js";import"./studio-tfmhnwyr.js";import"./studio-psh8mwnw.js";import"./studio-a6e5fzve.js";import"./studio-9ndgd55w.js";export{Sk as initQuickSearch,Bg as openQuickSearch};
2
-
3
- //# debugId=3681C735EE63CC3764756E2164756E21
4
- //# sourceMappingURL=quick-search-r955m3q1.js.map
@@ -1,4 +0,0 @@
1
- import{hh,Bd,La,k$,Sr,E$,Xb,T$,Qb}from"./studio-7q6jdd4h.js";import"./studio-psh8mwnw.js";import"./studio-9ndgd55w.js";export{Sr as invalidateUsages,La as loadUsages,E$ as onUsagesInvalidated,Bd as peekUsages,k$ as retryUsages,Qb as usageFiles,Xb as usageHeadline,T$ as usageWarning,hh as usagesSupported};
2
-
3
- //# debugId=620C7A34ED0773A364756E2164756E21
4
- //# sourceMappingURL=references-8gxv0x7t.js.map
@@ -1,4 +0,0 @@
1
- import{dR,Ck,J2,kk,zg,Dl,Su}from"./studio-hcy9zeac.js";import"./studio-qd0cycm4.js";import"./studio-sm2f0sc6.js";import"./studio-nvfa137z.js";import"./studio-xzgp0cp7.js";import"./studio-ht81xjkr.js";import"./studio-6rbaedw2.js";import"./studio-nfmpmkqb.js";import"./studio-ry4789ng.js";import"./studio-s4fq9jht.js";import"./studio-n4qq1n57.js";import"./studio-1cfyd1ys.js";import"./studio-9ff0vqff.js";import"./studio-fg4fj9ec.js";import"./studio-ws2r1d7e.js";import"./studio-79r8msnr.js";import"./studio-ae7a69jc.js";import"./studio-cg54vtet.js";import"./studio-x2trkhk5.js";import"./studio-spza69tb.js";import"./studio-4qg61g9j.js";import"./studio-kqh7fxn6.js";import"./studio-9179bsm7.js";import"./studio-0nefxhar.js";import"./studio-yjh9gddd.js";import"./studio-0rg30pvs.js";import"./studio-ekzbgnjp.js";import"./studio-nqexty8x.js";import"./studio-g45r5vm8.js";import"./studio-vtey9w98.js";import"./studio-t6dqnnft.js";import"./studio-y47090vq.js";import"./studio-14hh60j8.js";import"./studio-myb4mf0h.js";import"./studio-ajw4k8hp.js";import"./studio-qs5fmhtj.js";import"./studio-8hf8qcm1.js";import"./studio-7q6jdd4h.js";import"./studio-by8x0jvc.js";import"./studio-ztppbam0.js";import"./studio-4rgem12q.js";import"./studio-8pne0rx4.js";import"./studio-tfmhnwyr.js";import"./studio-psh8mwnw.js";import"./studio-a6e5fzve.js";import"./studio-9ndgd55w.js";import"./studio-k1wvtp03.js";export{Dl as inspectorTab,Ck as mount,zg as render,kk as restingInspectorTab,Su as setInspectorTab,dR as stripOf,J2 as unmount};
2
-
3
- //# debugId=7DCA18538EC5265964756E2164756E21
4
- //# sourceMappingURL=right-panel-jarwqjpy.js.map
@@ -1,4 +0,0 @@
1
- import{Ws,rT,cS,dS,bb,wa,sT,aT,lT,cT,dT,uT,hT,pT,fT,mT,gT,bT,vT,yT,uS,wT,xT,ww,_T,ST,vb,CT}from"./studio-ws2r1d7e.js";import"./studio-79r8msnr.js";import"./studio-4qg61g9j.js";import"./studio-kqh7fxn6.js";import"./studio-9179bsm7.js";import"./studio-0nefxhar.js";import"./studio-yjh9gddd.js";import"./studio-0rg30pvs.js";import"./studio-ekzbgnjp.js";import"./studio-nqexty8x.js";import"./studio-g45r5vm8.js";import"./studio-vtey9w98.js";import"./studio-t6dqnnft.js";import"./studio-y47090vq.js";import"./studio-14hh60j8.js";import"./studio-myb4mf0h.js";import"./studio-ajw4k8hp.js";import"./studio-qs5fmhtj.js";import"./studio-7q6jdd4h.js";import"./studio-by8x0jvc.js";import"./studio-ztppbam0.js";import"./studio-4rgem12q.js";import"./studio-8pne0rx4.js";import"./studio-tfmhnwyr.js";import"./studio-psh8mwnw.js";import"./studio-a6e5fzve.js";import"./studio-9ndgd55w.js";export{ST as armGitPoll,uS as changeRow,yT as checkoutBranch,vb as cleanupSourceControl,dS as cloneRepository,xT as commitRow,vT as createBranch,bT as discardFile,cS as fetchGitLog,hT as fetchRemote,wT as groupFilesByComponent,gT as includeNewChanges,_T as lastUpdatedLabel,lT as loadDiffForLens,rT as noteFileSaved,uT as openFileComparison,wa as platformHostsGit,sT as platformOpensPullRequests,bb as platformSupportsClone,pT as pullRemote,Ws as refreshGitStatus,CT as registerSourceControlCommands,ww as relativeDate,dT as runCloneRepository,mT as setAllIncluded,fT as setIncluded,cT as setSourceControlDeps,aT as statusTag};
2
-
3
- //# debugId=DB3FA1E26A1C157464756E2164756E21
4
- //# sourceMappingURL=source-control-84qt25m9.js.map
@@ -1,5 +0,0 @@
1
- import{_x,Yl,al,m,_i,jt}from"./studio-ztppbam0.js";import{fS,_w,LT}from"./studio-dvhxxxbd.js";import{Yk,Zk,ZR}from"./studio-aghsg0ds.js";import{o_,r_,_k}from"./studio-gczve8zf.js";var n={children:[],tagName:"div"},C2=new Set(Object.values(_x));function n_(e){return C2.has(e)}function bk(e){let o=Yl(e),r=m.tabs.get(o);if(r)return jt(o),r;return _i({capabilities:{modes:[_x[e]]},document:structuredClone(n),documentPath:null,id:o})}function vk(e,o){_i({background:!0,capabilities:{modes:[_x[e]]},document:structuredClone(n),documentPath:null,id:Yl(e),paneId:o})}function i_(e,o){let r=al(o.id);if(r==="media")return fS(e,o);if(r==="content")return Yk(e,o);return o_(e,o)}function Fg(e){_w(e),Zk(e),r_(e)}function yk(e,o){let{paneId:r}=e;if(i_(r,o))return;Fg(r);let t=al(o.id);if(t==="media"){LT(e,o);return}if(t==="content"){ZR(e,o);return}_k(e,o)}
2
- export{C2,n_,bk,vk,i_,Fg,yk};
3
-
4
- //# debugId=20CAC9A67B2FAB9564756E2164756E21
5
- //# sourceMappingURL=studio-2bq7hheq.js.map
@@ -1,5 +0,0 @@
1
- import{te}from"./studio-psh8mwnw.js";import{p}from"./studio-9ndgd55w.js";import{g,C}from"./studio-tfmhnwyr.js";import{hh,Sr,E$}from"./studio-7q6jdd4h.js";import{Ot,Nt}from"./studio-qs5fmhtj.js";import{Ue,wi,ft,T,R,Jt,tt}from"./studio-myb4mf0h.js";import{m,u,Kd}from"./studio-ztppbam0.js";import{zd}from"./studio-by8x0jvc.js";import{He}from"./studio-t6dqnnft.js";import{zc,_a,XL,dA,QL,Sa,hA,pA,Fb,tr}from"./studio-vtey9w98.js";import{Ow,Gu}from"./studio-9179bsm7.js";import{NT,Wu}from"./studio-cg54vtet.js";import{jT,HT,BT,zT,_b}from"./studio-4qg61g9j.js";import{bp}from"./studio-ae7a69jc.js";import{Rd,Dd,qu,_p,Aw}from"./studio-kqh7fxn6.js";import{n,_}from"./studio-ywf9y1e2.js";import{le}from"./studio-k5n4es74.js";var D=[{key:"all",label:"All media"},{key:"image",label:"Images"},{key:"video",label:"Video"},{key:"audio",label:"Audio"},{key:"document",label:"Documents"},{key:"font",label:"Fonts"},{key:"unused",label:"Unused"}],pS=D.map((e)=>e.key);function ae(e){return pS.some((t)=>t===e)}function F(e){return D.find((t)=>t.key===e)?.label??"All media"}var K=[{key:"newest",label:"Newest"},{key:"name",label:"Name"},{key:"size",label:"Size"}],Ne=K.map((e)=>e.key);function re(e){return Ne.some((t)=>t===e)}function z(e,t,i){switch(t){case"all":return!0;case"unused":return i!==null&&i.has(e.file);default:return e.kind===t}}function U(e,t){let i=t.trim().toLowerCase();return i===""||e.name.toLowerCase().includes(i)}function W(e,t){return e.filter((a)=>z(a,t.filter,t.unused)&&U(a,t.query)).toSorted((a,r)=>je(t.sort,a,r)||a.file.localeCompare(r.file))}function je(e,t,i){switch(e){case"name":return t.name.localeCompare(i.name,void 0,{numeric:!0,sensitivity:"base"});case"size":return(i.bytes??-1)-(t.bytes??-1);default:return(i.modified??"").localeCompare(t.modified??"")}}function ne(e,t){let i={all:e.length,audio:0,document:0,font:0,image:0,unused:t===null?null:e.filter((a)=>t.has(a.file)).length,video:0};for(let a of e)i[a.kind]=(i[a.kind]??0)+1;return i}var Ce=132,ie=12;function oe(e){return Math.max(1,Math.floor((e+ie)/(Ce+ie)))}function se(e,t,i,a,r=!1){if(a===0)return null;let o=Math.min(Math.max(e,0),a-1),l=o-o%i,c;switch(t){case"ArrowRight":{c=o+1;break}case"ArrowLeft":{c=o-1;break}case"ArrowDown":{c=o+i;break}case"ArrowUp":{c=o-i;break}case"Home":{c=r?0:l;break}case"End":{c=r?a-1:Math.min(l+i-1,a-1);break}default:return null}return c<0||c>=a?o:c}var de={$schema:"https://jxsuite.com/schema/v1",$id:"StudioMediaLibrary",$description:"The Media workspace's library (`specs/studio.md` §22.6): the project's media as filters, a grid and the selected file's detail. ONE document in two modes. In `manage` it is the Media home tab, with Replace, Open in viewer and Delete under the detail; in `pick` it is the full-size picker inside a `jx-dialog` (`media-pick-dialog.json`), and the dialog's own footer answers Cancel or Use <file>. `media/media-library.ts` keeps every decision (which files a filter keeps, the sort, what a count may claim, where an arrow lands, what Replace writes) and hands this document strings and discriminants. **Unused is drawn with no number until the usage sweep has settled**, and Missing alt text and tags are not drawn at all: each needs a store that does not exist, and a filter that cannot be answered is not shipped as one that always answers nothing.",tagName:"div",attributes:{part:"media-library","data-jx-region":"${state.region}","data-mode":"${state.mode}","data-drop":"${state.dropActive}"},style:{$description:"Three columns over the whole stage: the filters, the grid with its toolbar, and the selected file's detail. Fills the pane's stage by its own geometry, as the workspace home does: the stage is `position: relative` (`pane-grid.json`). In pick mode the same columns fill the dialog's body instead, so the root's box is the only thing that differs between the two modes.",position:"absolute",inset:"0",display:"grid",gridTemplateColumns:"200px minmax(0, 1fr) 300px",boxSizing:"border-box",fontFamily:"var(--jx-font-sans)",fontSize:"var(--jx-text-md)",color:"var(--fg)",background:"var(--bg)",'&[data-mode="pick"]':{$description:"Inside a dialog there is no stage to fill: the box is the dialog body's, at a height the dialog can scroll within.",position:"relative",inset:"auto",height:"min(70vh, 620px)",gridTemplateColumns:"150px minmax(0, 1fr) 210px"},'&[data-drop="true"]':{$description:"The drop affordance is a STATE the flow holds, not a class a handler adds and forgets to take off.",outline:"2px dashed var(--accent)",outlineOffset:"-4px"},'& [part="filters"]':{display:"flex",flexDirection:"column",gap:"2px",padding:"var(--jx-space-3) var(--jx-space-2)",borderRight:"1px solid var(--border)",background:"var(--bg-panel)",overflowY:"auto"},'& [part="filters-heading"]':{margin:"0",padding:"var(--jx-space-2) var(--jx-space-2) var(--jx-space-1)",fontSize:"var(--jx-text-xs)",fontWeight:"600",letterSpacing:"0.06em",textTransform:"uppercase",color:"var(--fg-dim)"},'& [part="filter"]':{display:"flex",alignItems:"center",gap:"var(--jx-space-2)",height:"30px",padding:"0 var(--jx-space-2)",border:"none",borderRadius:"var(--radius)",background:"none",color:"var(--fg)",font:"inherit",textAlign:"left",cursor:"pointer"},'& [part="filter"]:hover':{background:"var(--hover-bg)"},'& [part="filter"][aria-pressed="true"]':{background:"color-mix(in srgb, var(--accent) 16%, transparent)",color:"var(--fg)",fontWeight:"600"},'& [part="filter"]:focus-visible':{outline:"var(--jx-focus-ring)",outlineOffset:"-2px"},'& [part="filter-count"]':{marginLeft:"auto",fontSize:"var(--jx-text-xs)",color:"var(--fg-dim)",fontWeight:"400"},'& [part="main"]':{display:"flex",flexDirection:"column",minWidth:"0",minHeight:"0"},'& [part="toolbar"]':{display:"flex",alignItems:"center",flexWrap:"wrap",gap:"var(--jx-space-3)",padding:"var(--jx-space-3) var(--jx-space-4)",borderBottom:"1px solid var(--border)"},'& [part="title"]':{margin:"0 auto 0 0",fontSize:"var(--jx-text-lg)",fontWeight:"600"},'& [part="search"]':{width:"220px"},'& [part="sort"]':{width:"130px"},'& [part="upload"], & [part="empty-upload"]':{$description:"A LABEL around the file picker, not a button that clicks a hidden one: the picker is the control, so it takes focus, Enter opens it and a screen reader announces a file upload. A plain element because a label forwards a click to the input it contains and a custom element between the two would break that.",position:"relative",display:"inline-flex",alignItems:"center",gap:"6px",height:"28px",padding:"0 var(--jx-space-3)",border:"1px solid var(--border)",borderRadius:"var(--radius)",background:"var(--bg-panel)",color:"var(--fg)",font:"inherit",cursor:"pointer",":hover":{background:"var(--hover-bg)"},":has(:focus-visible)":{outline:"var(--jx-focus-ring)",outlineOffset:"2px"}},'& [part="upload-input"], & [part="replace-input"]':{$description:"Out of the way but still FOCUSABLE: `display: none` would take the control out of the tab order, and the label around it draws the focus ring for it.",position:"absolute",width:"1px",height:"1px",opacity:"0",pointerEvents:"none"},'& [part="upload-glyph"]':{"--jx-icon-size":"16px"},'& [part="body"]':{flex:"1",minHeight:"0",overflowY:"auto",padding:"var(--jx-space-4)"},'& [part="grid"]':{$description:"auto-fill over a minimum tile width; `media/media-library-model.ts` `gridColumns` does the same arithmetic, so ArrowDown lands on the tile drawn under the current one. Keep the two numbers in step.",display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(132px, 1fr))",gap:"12px",alignContent:"start"},'& [part="tile"]':{display:"flex",flexDirection:"column",gap:"4px",padding:"4px",borderRadius:"var(--jx-radius-md, 6px)",border:"2px solid transparent",cursor:"pointer",minWidth:"0",outline:"none"},'& [part="tile"]:hover':{background:"var(--hover-bg)"},'& [part="tile"][aria-selected="true"]':{borderColor:"var(--accent)"},'& [part="tile"]:focus-visible':{outline:"var(--jx-focus-ring)",outlineOffset:"2px"},'& [part="thumb"]':{display:"flex",alignItems:"center",justifyContent:"center",aspectRatio:"4 / 3",borderRadius:"var(--radius)",background:"var(--bg-input)",overflow:"hidden",color:"var(--fg-dim)","--jx-icon-size":"28px"},'& [part="thumb-img"]':{width:"100%",height:"100%",objectFit:"cover"},'& [part="tile-name"]':{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontSize:"var(--jx-text-sm)"},'& [part="tile-caption"]':{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontSize:"var(--jx-text-xs)",color:"var(--fg-dim)",minHeight:"1em"},'& [part="empty"]':{display:"flex",flexDirection:"column",alignItems:"center",gap:"var(--jx-space-3)",padding:"48px var(--jx-space-6)",textAlign:"center",color:"var(--fg-dim)","--jx-icon-size":"40px"},'& [part="empty-title"]':{margin:"0",fontSize:"var(--jx-text-lg)",fontWeight:"600",color:"var(--fg)"},'& [part="empty-detail"]':{margin:"0",maxWidth:"42ch",lineHeight:"1.5"},'& [part="detail"]':{display:"flex",flexDirection:"column",gap:"var(--jx-space-3)",padding:"var(--jx-space-4)",borderLeft:"1px solid var(--border)",background:"var(--bg-panel)",overflowY:"auto",minWidth:"0"},'& [part="detail-hint"]':{margin:"auto 0",textAlign:"center",color:"var(--fg-dim)"},'& [part="detail-preview"]':{display:"flex",alignItems:"center",justifyContent:"center",minHeight:"140px",maxHeight:"220px",borderRadius:"var(--radius)",background:"var(--bg-input)",overflow:"hidden",color:"var(--fg-dim)","--jx-icon-size":"40px"},'& [part="preview-img"], & [part="preview-video"]':{maxWidth:"100%",maxHeight:"220px",objectFit:"contain"},'& [part="preview-audio"]':{width:"100%"},'& [part="preview-specimen"]':{$description:"The viewer's specimen at a side pane's size. The face arrives as the `@font-face` the flow writes under a family name generated from the path (`media/media-pane.ts` `specimenOf`); the element carries only that name, as a custom property, and the fallback stack is a rule, here.",display:"flex",flexDirection:"column",gap:"var(--jx-space-2)",padding:"var(--jx-space-4)",maxWidth:"100%",color:"var(--fg)",fontFamily:"var(--jx-specimen-family, system-ui), system-ui, sans-serif"},'& [part="specimen-line"]':{margin:"0",lineHeight:"1.3",overflowWrap:"anywhere"},'& [part="specimen-line"][data-size="32"]':{fontSize:"32px"},'& [part="specimen-line"][data-size="14"]':{fontSize:"var(--jx-text-md)"},'& [part="detail-name"]':{margin:"0",fontSize:"var(--jx-text-md)",fontWeight:"600",overflowWrap:"anywhere"},'& [part="facts"]':{margin:"0",color:"var(--fg-dim)",fontSize:"var(--jx-text-sm)"},'& [part="group-title"]':{margin:"0",fontSize:"var(--jx-text-xs)",fontWeight:"600",color:"var(--fg-dim)"},'& [part="url"]':{display:"flex",alignItems:"center",gap:"var(--jx-space-2)",minWidth:"0"},'& [part="url-value"]':{flex:"1",minWidth:"0",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontFamily:"var(--jx-font-mono)",fontSize:"var(--jx-text-sm)"},'& [part="usage"]':{display:"flex",flexDirection:"column",gap:"var(--jx-space-1)"},'& [part="usage-headline"]':{margin:"0",fontSize:"var(--jx-text-sm)"},'& [part="usage-list"]':{margin:"0",padding:"0",listStyle:"none",display:"flex",flexDirection:"column",gap:"2px"},'& [part="usage-row"]':{display:"flex",alignItems:"center",gap:"var(--jx-space-2)"},'& [part="usage-link"]':{flex:"1",minWidth:"0",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",border:"none",background:"none",padding:"0",color:"var(--accent)",font:"inherit",fontSize:"var(--jx-text-sm)",textAlign:"left",cursor:"pointer",":hover":{textDecoration:"underline"},":focus-visible":{outline:"var(--jx-focus-ring)"}},'& [part="usage-count"]':{fontSize:"var(--jx-text-xs)",color:"var(--fg-dim)"},'& [part="actions"]':{display:"flex",flexWrap:"wrap",gap:"var(--jx-space-2)",marginTop:"var(--jx-space-2)"},'& [part="replace"]':{position:"relative",display:"inline-flex",alignItems:"center",height:"28px",padding:"0 var(--jx-space-3)",border:"1px solid var(--border)",borderRadius:"var(--radius)",background:"var(--bg)",color:"var(--fg)",font:"inherit",cursor:"pointer",":hover":{background:"var(--hover-bg)"},":has(:focus-visible)":{outline:"var(--jx-focus-ring)",outlineOffset:"2px"}}},ondragover:{$prototype:"Function",body:[{preventDefault:!0},{operator:"call",target:{$ref:"#/state/dragOver"},value:[]}],description:"A file dropped ANYWHERE on the library uploads, to the destination the Upload label names before the drop: public/media/."},ondragleave:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/dragOut"},value:[]}]},ondrop:{$prototype:"Function",body:[{preventDefault:!0},{operator:"call",target:{$ref:"#/state/drop"},value:[{$ref:"event#/dataTransfer/files"}]}]},children:[{tagName:"nav",attributes:{part:"filters","aria-label":"Media filters"},children:[{tagName:"h2",attributes:{part:"filters-heading"},textContent:"Library"},{$prototype:"Array",items:{$ref:"#/state/filters"},key:{$ref:"$map/item/key"},map:{tagName:"button",attributes:{part:"filter",type:"button","aria-pressed":"${$map.item.pressed}","data-filter":"${$map.item.key}"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/setFilter"},value:[{$ref:"$map/item/key"}]}]},children:[{tagName:"span",attributes:{part:"filter-label"},textContent:"${$map.item.label}"},{tagName:"span",attributes:{part:"filter-count"},textContent:"${$map.item.count}"}]}}]},{tagName:"section",attributes:{part:"main","aria-labelledby":"${state.titleId}"},children:[{tagName:"header",attributes:{part:"toolbar"},children:[{tagName:"h2",attributes:{part:"title",id:"${state.titleId}"},textContent:"${state.title}"},{tagName:"jx-textfield",attributes:{part:"search"},$props:{type:"search",size:"sm",label:"Search media",placeholder:"Search by name…",autocomplete:"off",value:{$ref:"#/state/query"}},oninput:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/setQuery"},value:[{$ref:"event#/target/value"}]}]}},{tagName:"jx-select",attributes:{part:"sort"},$props:{label:"Sort",size:"sm",options:{$ref:"#/state/sortOptions"},value:{$ref:"#/state/sort"}},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/setSort"},value:[{$ref:"event#/target/value"}]}]}},{tagName:"label",attributes:{part:"upload",title:"${state.uploadHint}"},children:[{tagName:"input",attributes:{part:"upload-input",type:"file",multiple:!0,accept:"${state.uploadAccept}"},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/upload"},value:[{$ref:"event#/target"}]}],description:"The picker itself, so the destination in the label's tooltip is visible BEFORE the files are chosen. The flow takes the element rather than the file list because a file input that is not cleared refuses the same file twice."}},{tagName:"jx-icon",attributes:{part:"upload-glyph","aria-hidden":"true"},$props:{name:"upload-simple"}},{tagName:"span",textContent:"Upload"}]}]},{tagName:"div",attributes:{part:"body"},children:[{tagName:"div",attributes:{part:"grid-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/gridState"},cases:{loading:{tagName:"p",attributes:{part:"empty",role:"status"},textContent:"Reading the project's media…"},counting:{tagName:"p",attributes:{part:"empty",role:"status"},textContent:"${state.countingLabel}"},empty:{tagName:"div",attributes:{part:"empty"},children:[{tagName:"jx-icon",attributes:{part:"empty-glyph","aria-hidden":"true"},$props:{name:"image"}},{tagName:"p",attributes:{part:"empty-title"},textContent:"${state.emptyTitle}"},{tagName:"p",attributes:{part:"empty-detail"},textContent:"${state.emptyDetail}"},{tagName:"label",attributes:{part:"empty-upload",title:"${state.uploadHint}"},children:[{tagName:"input",attributes:{part:"upload-input",type:"file",multiple:!0,accept:"${state.uploadAccept}"},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/upload"},value:[{$ref:"event#/target"}]}],description:"The picker itself, so the destination in the label's tooltip is visible BEFORE the files are chosen. The flow takes the element rather than the file list because a file input that is not cleared refuses the same file twice."}},{tagName:"jx-icon",attributes:{part:"upload-glyph","aria-hidden":"true"},$props:{name:"upload-simple"}},{tagName:"span",textContent:"Upload"}]}]},nomatch:{tagName:"div",attributes:{part:"empty"},children:[{tagName:"jx-icon",attributes:{part:"empty-glyph","aria-hidden":"true"},$props:{name:"image"}},{tagName:"p",attributes:{part:"empty-title"},textContent:"${state.emptyTitle}"},{tagName:"p",attributes:{part:"empty-detail"},textContent:"${state.emptyDetail}"},{tagName:"jx-button",attributes:{part:"reset"},$props:{size:"sm",variant:"secondary"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/reset"},value:[]}]},children:[{tagName:"span",textContent:"Show all media"}]}]},listed:{tagName:"div",attributes:{part:"grid",role:"listbox","aria-labelledby":"${state.titleId}"},onkeydown:{$prototype:"Function",body:[{$switch:{$ref:"event#/key"},cases:{ArrowRight:[{preventDefault:!0},{operator:"call",target:{$ref:"#/state/key"},value:[{$ref:"event#/key"},{$ref:"event#/ctrlKey"}]}],ArrowLeft:[{preventDefault:!0},{operator:"call",target:{$ref:"#/state/key"},value:[{$ref:"event#/key"},{$ref:"event#/ctrlKey"}]}],ArrowDown:[{preventDefault:!0},{operator:"call",target:{$ref:"#/state/key"},value:[{$ref:"event#/key"},{$ref:"event#/ctrlKey"}]}],ArrowUp:[{preventDefault:!0},{operator:"call",target:{$ref:"#/state/key"},value:[{$ref:"event#/key"},{$ref:"event#/ctrlKey"}]}],Home:[{preventDefault:!0},{operator:"call",target:{$ref:"#/state/key"},value:[{$ref:"event#/key"},{$ref:"event#/ctrlKey"}]}],End:[{preventDefault:!0},{operator:"call",target:{$ref:"#/state/key"},value:[{$ref:"event#/key"},{$ref:"event#/ctrlKey"}]}],Enter:[{preventDefault:!0},{operator:"call",target:{$ref:"#/state/activateSelected"},value:[]}]}}],description:"The grid pattern: arrows move one tile, Home and End to the ends of the row, Ctrl+Home and Ctrl+End to the ends of the grid, and Enter opens the selected file (in pick mode, uses it). The flow computes where the move lands; the tile that receives it takes focus, so the roving tabindex follows the selection."},children:[{$prototype:"Array",items:{$ref:"#/state/tiles"},key:{$ref:"$map/item/key"},map:{tagName:"div",attributes:{part:"tile",role:"option","aria-selected":"${$map.item.selected}",tabindex:"${$map.item.tabindex}","data-file":"${$map.item.file}",title:"${$map.item.name}"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/select"},value:[{$ref:"$map/item/file"}]}]},onfocus:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/focusTile"},value:[{$ref:"$map/item/file"}]}],description:"Selection follows focus, the listbox pattern: a Tab onto the grid lands on the roving stop and selects it, so the first Enter opens (in pick mode, uses) the tile the focus ring is on rather than nothing."},ondblclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/activate"},value:[{$ref:"$map/item/file"}]}]},children:[{tagName:"div",attributes:{part:"thumb"},children:[{tagName:"div",attributes:{part:"thumb-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"$map/item/thumbState"},cases:{image:{tagName:"img",attributes:{part:"thumb-img",src:"${$map.item.thumbSrc}",alt:"",draggable:"false"},onload:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/measure"},value:[{$ref:"$map/item/file"},{$ref:"event#/target/naturalWidth"},{$ref:"event#/target/naturalHeight"}]}]}},pending:{tagName:"span",attributes:{part:"thumb-pending","aria-hidden":"true"}},glyph:{tagName:"jx-icon",attributes:{part:"thumb-glyph","aria-hidden":"true"},$props:{name:{$ref:"$map/item/glyph"}}}},$description:"The thumbnail is asked for when the tile scrolls into view, not when the grid is built: `pending` until the flow's observer reports the tile, then the picture. A file the browser draws no picture of shows its kind's glyph."}]},{tagName:"span",attributes:{part:"tile-name"},textContent:"${$map.item.name}"},{tagName:"span",attributes:{part:"tile-caption"},textContent:"${$map.item.caption}"}]}}]}}}]}]},{tagName:"aside",attributes:{part:"detail","aria-label":"Details"},children:[{tagName:"div",attributes:{part:"detail-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/detailState"},cases:{none:{tagName:"p",attributes:{part:"detail-hint"},textContent:"${state.detailHint}"},shown:{tagName:"div",attributes:{part:"detail-body",role:"none"},style:{display:"contents"},children:[{tagName:"div",attributes:{part:"detail-preview"},children:[{tagName:"div",attributes:{part:"preview-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/previewKind"},cases:{image:{tagName:"img",attributes:{part:"preview-img",src:"${state.previewSrc}",alt:""},onload:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/measure"},value:[{$ref:"#/state/selectedFile"},{$ref:"event#/target/naturalWidth"},{$ref:"event#/target/naturalHeight"}]}]}},video:{tagName:"video",attributes:{part:"preview-video",src:"${state.previewSrc}",controls:!0}},audio:{tagName:"audio",attributes:{part:"preview-audio",src:"${state.previewSrc}",controls:!0}},font:{tagName:"div",attributes:{part:"preview-specimen",style:"${state.previewSpecimenFamily}"},children:[{tagName:"style",textContent:"${state.previewFontFace}"},{tagName:"p",attributes:{part:"specimen-line","data-size":"32"},textContent:"Aa"},{tagName:"p",attributes:{part:"specimen-line","data-size":"14"},textContent:"${state.previewSpecimen}"}]},glyph:{tagName:"jx-icon",attributes:{part:"preview-glyph","aria-hidden":"true"},$props:{name:{$ref:"#/state/previewGlyph"}}}}}]},{tagName:"h3",attributes:{part:"detail-name"},textContent:"${state.detailName}"},{tagName:"p",attributes:{part:"facts"},textContent:"${state.detailFacts}"},{tagName:"div",attributes:{part:"url-group"},children:[{tagName:"h4",attributes:{part:"group-title"},textContent:"Site URL"},{tagName:"div",attributes:{part:"url"},children:[{tagName:"code",attributes:{part:"url-value"},textContent:"${state.detailRef}"},{tagName:"jx-action-button",attributes:{part:"copy"},$props:{size:"sm",quiet:!0,hint:"Copy the site URL"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/copyRef"},value:[]}]},children:[{tagName:"span",textContent:"Copy"}]}]}]},{tagName:"div",attributes:{part:"usage-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/usageState"},cases:{shown:{tagName:"div",attributes:{part:"usage"},children:[{tagName:"h4",attributes:{part:"group-title"},textContent:"Used on"},{tagName:"p",attributes:{part:"usage-headline"},textContent:"${state.usageHeadline}"},{tagName:"div",attributes:{part:"usage-list-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/hasUsageFiles"},cases:{true:{tagName:"ul",attributes:{part:"usage-list"},children:[{$prototype:"Array",items:{$ref:"#/state/usageFiles"},key:{$ref:"$map/item/path"},map:{tagName:"li",attributes:{part:"usage-row","data-usage":"${$map.item.path}"},children:[{tagName:"button",attributes:{part:"usage-link",type:"button",title:"Open ${$map.item.path}"},textContent:"${$map.item.path}",onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/openDocument"},value:[{$ref:"$map/item/path"}]}]}},{tagName:"span",attributes:{part:"usage-count"},textContent:"${$map.item.count}"}]}}]}}}]}},$description:'Hidden on a host with no reference index, which is a different fact from "nothing uses it": a confident zero is the one answer this pane must never invent.'},{tagName:"div",attributes:{part:"actions-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/mode"},cases:{manage:{tagName:"div",attributes:{part:"actions"},children:[{tagName:"label",attributes:{part:"replace",title:"Replace ${state.detailName} everywhere it is used"},children:[{tagName:"input",attributes:{part:"replace-input",type:"file",accept:"${state.replaceAccept}"},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/replace"},value:[{$ref:"event#/target"}]}],description:"Replace writes the chosen file over this one's path, so every reference keeps resolving and now shows the new bytes (studio.md §9.3). The element rather than the list, so the input can be cleared."}},{tagName:"span",textContent:"Replace"}]},{tagName:"jx-button",attributes:{part:"open-viewer"},$props:{size:"sm",variant:"secondary"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/openViewer"},value:[]}]},children:[{tagName:"span",textContent:"Open in viewer"}]},{tagName:"jx-button",attributes:{part:"delete"},$props:{size:"sm",variant:"negative"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/remove"},value:[]}]},children:[{tagName:"span",textContent:"Delete"}]}]}},$description:"Manage mode's actions. Pick mode has none here: its answer is the dialog's own footer, Cancel and Use <file>."}]}}}]}]};T("media-library",de);function Ee(){return{countingLabel:"",detailFacts:"",detailHint:"",detailName:"",detailRef:"",detailState:"none",dropActive:"false",emptyDetail:"",emptyTitle:"",filters:[],gridState:"loading",mode:"manage",previewFontFace:"",previewGlyph:"",previewKind:"glyph",previewSpecimen:"",previewSpecimenFamily:"",previewSrc:"",query:"",region:"",replaceAccept:"",selectedFile:"",sort:"",sortOptions:[],tiles:[],title:"",titleId:"",uploadAccept:"",uploadHint:"",usageFiles:[],usageHeadline:"",usageState:"hidden"}}function pe(e,t){Object.assign(e,t),e.hasUsageFiles=t.usageFiles.length>0}function Ae(e){let t=n(e)?void 0:e.attributes?.part;return n(t)?t:""}function Ie(e){let t=e?.$map,i=_(t)&&"item"in t?t.item:void 0;return _(i)&&"file"in i&&n(i.file)?i.file:null}function q(e,t,i,a){if(a.clear)e.replaceChildren();let{tileHost:r,gridHost:o,inputHost:l,...c}=i,s=g({...Ee(),...c,hasUsageFiles:!1});pe(s,t);let h=null,w=!1,P=R("media-library",s,e,{onNodeCreated:(f,d,k,Te)=>{if(w||!(f instanceof HTMLElement))return;let H=Ae(k);if(H==="tile"){let ee=Ie(Te);if(ee!==null)r(f,ee)}else if(H==="grid")o(f);else if(f instanceof HTMLInputElement&&H==="upload-input")l(f,"upload");else if(f instanceof HTMLInputElement&&H==="replace-input")l(f,"replace")}}).then((f)=>{if(w)f.dispose();else h=f;return f.root});return{attached:()=>{if(w)return!1;let f=h?.root;return f===void 0?!0:f instanceof HTMLElement&&e.contains(f)},dispose(){w=!0,h?.dispose(),h=null},ready:P,update:(f)=>pe(s,f)}}var ce={$schema:"https://jxsuite.com/schema/v1",$id:"StudioMediaPickDialog",$description:"The full-size media picker (`specs/studio.md` §9.3): a `jx-dialog` whose body is the Media workspace's own library surface in pick mode, so the picker and the workspace are one surface at two sizes. The dialog owns modality, Escape, the backdrop and focus restoration, and its footer is the answer: Cancel, or Use <file>, disabled until a file is chosen. The body is an ISLAND: this document draws the slot and nothing in it, and `surfaces/media-pick-dialog.ts` mounts `media-library.json` there through `onNodeCreated`.",tagName:"jx-dialog",$props:{headline:{$ref:"#/state/headline"},confirmLabel:{$ref:"#/state/confirmLabel"},confirmDisabled:{$ref:"#/state/blocked"},cancelLabel:"Cancel",dismissible:!0,size:"xl"},attributes:{part:"media-pick"},onconfirm:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/confirm"},value:[]}]},oncancel:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/closed"},value:[]}]},onclose:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/closed"},value:[]}]},children:[{tagName:"div",attributes:{part:"library-slot"},style:{$description:"The library's box in pick mode is its own (`media-library.json`, `data-mode=\"pick\"`); the slot only gives it the dialog body's width.",minWidth:"0"}}]};T("media-pick-dialog",ce);var V="media-picker";function Oe(e){let t=n(e)?void 0:e.attributes?.part;return n(t)?t:""}function ue(e){let t=document.createElement("div");t.style.pointerEvents="auto",t.setAttribute(Ue,ft("dialog",V)),e.layer.append(t);let i=!1,a=()=>{if(i)return;i=!0,e.closed()},r=()=>i,o=g({...e.view,closed:a,confirm:e.confirm}),l=null,c=R("media-pick-dialog",o,t,{onNodeCreated:(s,h,w)=>{if(!r()&&s instanceof HTMLElement&&Oe(w)==="library-slot")e.body(s)}}).then(async(s)=>{l=s;let h=s.root;if(r())return s.dispose(),h;if(await Jt(h),!r())Ot(h);return h});return{close(){let s=l?.root;if(s instanceof HTMLElement)Nt(s);l?.dispose(),l=null,t.remove(),a()},host:t,ready:c,update(s){Object.assign(o,s)}}}var tP="media-home",ve={audio:"play",document:"file-text",font:"text-aa",image:"image",video:"play"},Pe={audio:"Audio",document:"Document",font:"Font",image:"Image",video:"Video"},y={filter:"all",query:"",sort:"newest",selected:null},j=null,x=null,A=0,I=0,E=!1,G=0;function Y(){x=null,E=!1,A=0,I=0,G+=1}function Ke(){return[...S].some((e)=>!e.disposed&&e.choice.filter==="unused")}async function ze(e){if(E||x!==null||!hh())return;let t=G;E=!0,A=0,I=e.length;let i=new Set;for(let a of e){let r=await Gu(a.file);if(t!==G)return;if(!Ke()){Y();return}if(r.status==="ready"&&r.result.files.length===0)i.add(a.file);A+=1,b()}x=i,E=!1,b()}var S=new Set,M=new Map,J=new Set,L=null;function be(){if(L!==null)return;let e=()=>{Y(),b()},t=NT(e),i=E$(e);L=()=>{t(),i()}}function _e(){if(S.size===0&&L)L(),L=null}function v(e){if(!e.disposed){if(e.handle?.update(X(e)),e.onSelect?.(),We(e),e.focusOwed)queueMicrotask(()=>Le(e));we(e)}}function We(e){let t=e.reveal,i=t===null?void 0:e.tiles.get(t);if(i?.isConnected)e.reveal=null,i.scrollIntoView({block:"nearest"})}function we(e){if(e.sweepTimer!==null||e.disposed)return;e.sweepTimer=setTimeout(()=>{e.sweepTimer=null,e.observer.releaseDetached();for(let[t,i]of e.tiles)if(!i.isConnected)e.tiles.delete(t);for(let t of[e.inputs.upload,e.inputs.replace])for(let i of t)if(!i.isConnected)t.delete(i)},0)}function xe(e){return[...e].find((t)=>t.isConnected)??null}function b(){for(let e of S)v(e)}function Q(e){if(e.disposed=!0,e.sweepTimer!==null)clearTimeout(e.sweepTimer),e.sweepTimer=null;e.inputs.upload.clear(),e.inputs.replace.clear(),e.observer.destroy(),e.handle?.dispose(),e.handle=null,e.tiles.clear(),S.delete(e),_e()}function $e(e){let t=Wu(),i=t===null?null:e.images?t.filter((r)=>r.isImage):t;return{files:(i??[]).map((r)=>{let o=Dd(r.file);return{bytes:o?.bytes??null,file:r.file,kind:r.kind,modified:o?.modified??null,name:r.name}}),listed:i}}function qe(e){return D.filter((t)=>(t.key!=="unused"||hh())&&(!e.images||t.key==="image"||t.key==="unused"))}function xw(e){let{filter:t,query:i,selected:a}=e.choice;if(a===null)return null;let r=Wu()?.find((l)=>l.file===a)??null;if(r===null||e.images&&!r.isImage)return null;let o={bytes:null,file:r.file,kind:r.kind,modified:null,name:r.name};return z(o,t,x)&&U(o,i)?r:null}function Ve(e,t){if(t===0)return{emptyDetail:`Upload files or drop them anywhere here. They are saved under ${e.uploadDir}/, and anything already under public/ or a collection's images/ folder is listed here too.`,emptyTitle:e.images?"No images yet":"No media yet"};let{filter:i,query:a}=e.choice;if(a.trim()!=="")return{emptyDetail:`Nothing in ${F(i)} matches it.`,emptyTitle:`No matches for “${a.trim()}”`};if(i==="unused")return{emptyDetail:"Every file is referenced by at least one document.",emptyTitle:"No unused media"};return{emptyDetail:`${t} ${t===1?"file":"files"} in the project, none of them ${F(i).toLowerCase()}.`,emptyTitle:`No ${F(i).toLowerCase()}`}}function X(e){let{choice:t}=e,{files:i,listed:a}=$e(e),r=ne(i,x),o=qe(e);if(!o.some((d)=>d.key===t.filter))t.filter=o[0]?.key??"all";let l=W(i,{filter:t.filter,query:t.query,sort:t.sort,unused:x}),c=Wu();if(t.filter==="unused"&&c!==null)ze(c);let s="listed";if(a===null)s="loading";else if(t.filter==="unused"&&x===null)s="counting";else if(i.length===0||l.length===0)s=i.length===0?"empty":"nomatch";let h=xw(e),w=l.some((d)=>d.file===t.selected)?t.selected:l[0]?.file??null,P=l.map((d)=>{let k=d.kind==="image";return{caption:Aw(Dd(d.file))||Pe[d.kind],file:d.file,glyph:ve[d.kind],key:d.file,name:d.name,selected:d.file===t.selected?"true":"false",tabindex:d.file===w?"0":"-1",thumbSrc:k&&e.visible.has(d.file)?tr(d.file):"",thumbState:k?e.visible.has(d.file)?"image":"pending":"glyph"}}),f=e.images&&t.filter==="image"?"Images":F(t.filter);return{countingLabel:I>0?`Counting references… ${A} of ${I}`:"Counting references…",dropActive:e.dropActive?"true":"false",filters:o.map((d)=>{let k=r[d.key];return{count:k===null?"":String(k),key:d.key,label:e.images&&d.key==="image"?"All images":d.label,pressed:d.key===t.filter?"true":"false"}}),gridState:s,mode:e.mode,query:t.query,region:e.region,sort:t.sort,sortOptions:K.map((d)=>({label:d.label,value:d.key})),tiles:P,title:f,titleId:`media-library-title-${e.region.replaceAll(/[^\w-]/g,"-")}`,uploadAccept:e.images?"image/*":zc(),uploadHint:`Upload into ${e.uploadDir}/`,...Ve(e,i.length),...Be(e,h)}}function Be(e,t){if(t===null)return{detailFacts:"",detailHint:e.mode==="pick"?"Choose a file to use it.":"Select a file to see its details.",detailName:"",detailRef:"",detailState:"none",previewFontFace:"",previewGlyph:"",previewKind:"glyph",previewSpecimen:"",previewSpecimenFamily:"",previewSrc:"",replaceAccept:"",selectedFile:"",usageFiles:[],usageHeadline:"",usageState:"hidden"};let i=Dd(t.file),a=Ow(t.file);if(!Rd(t.file))qu(t.file).then(b);if(a===null||a.status==="pending")Gu(t.file).then(b);let r=jT(t.file),o=r==="image"||r==="video"||r==="audio"||r==="font"?r:"glyph",l=o==="font"?BT(t.file):{fontFace:"",specimen:"",specimenFamily:""};return{detailFacts:HT(t.file,i),detailHint:"",detailName:t.name,detailRef:t.ref,detailState:"shown",previewFontFace:l.fontFace,previewGlyph:ve[t.kind],previewKind:o,previewSpecimen:l.specimen,previewSpecimenFamily:l.specimenFamily,previewSrc:o==="glyph"?"":tr(t.file),replaceAccept:hA(t.file),selectedFile:t.file,...zT(a)}}var fe=null,me=null;function Ge(){return fe??=(le("yswdhxrf"),import("./files-yswdhxrf.js")),fe}function Ye(){return me??=(le("kkhp9ma7"),import("./file-ops-kkhp9ma7.js")),me}function Z(e){try{e.showPicker()}catch{e.focus()}}function N(e,t){e.choice.selected=t,v(e)}async function ge(e,t){let i=await Sa([...t],{dir:e.uploadDir,only:e.images?"image":"media"}),[a]=i;if(!a)return;if(e.choice.filter!=="all"&&e.choice.filter!==a.kind)e.choice.filter=e.images?"image":"all";e.choice.query="",e.reveal=a.path,N(e,a.path)}async function O2(e){let t=e.split("/").pop()??e,{confirmFileDelete:i}=await Ye();if(!await i({name:t,path:e}))return!1;let{markLocalMutation:a}=await (le("z9gpvc6t"),import("./fs-events-z9gpvc6t.js"));try{a(e),await p().deleteFile(e)}catch(l){return C.error(`Could not delete ${t}.`,{detail:te(l),path:e,source:"Media"}),!1}if(zd([e]),Sr(),m.tabs.has(e))Kd(e);for(let l of S)if(l.choice.selected===e)l.choice.selected=null;if(y.selected===e)y.selected=null;let r=Fb(e),o=await Je(r,a);return await QL(o?Fb(r):r),C.success(`Deleted ${t}`),!0}async function Je(e,t){if(!dA(e))return!1;let i=p();try{if((await i.listDirectory(e)).length>0)return!1;return t(e),await i.deleteFile(e),!0}catch{return!1}}function Me(e){return{activate:(t)=>{N(e,t),he(e,t)},activateSelected:()=>{let{selected:t}=e.choice;if(t!==null)he(e,t)},copyRef:()=>{let t=xw(e);if(t&&"clipboard"in navigator)navigator.clipboard.writeText(t.ref)},dragOut:()=>{if(e.dropActive)e.dropActive=!1,v(e)},dragOver:()=>{if(!e.dropActive)e.dropActive=!0,v(e)},drop:(t)=>{if(e.dropActive=!1,v(e),t?.length)ge(e,t)},focusTile:(t)=>{if(e.choice.selected!==t)N(e,t)},gridHost:(t)=>{e.grid=t},inputHost:(t,i)=>{e.inputs[i].add(t),we(e);let a=j;if(e.mode==="manage"&&a?.role===i&&(i==="upload"||a.file===e.choice.selected))j=null,Z(t)},key:(t,i)=>Qe(e,t,i),measure:(t,i,a)=>{if(_p(t,i,a))b();else if(!Rd(t))qu(t).then(b)},openDocument:(t)=>{Ge().then(({openFileInTab:i})=>i(t))},openViewer:()=>{let{selected:t}=e.choice;if(t!==null)_b(t)},remove:()=>{let{selected:t}=e.choice;if(t!==null)O2(t)},replace:(t)=>{let[i]=t.files??[];t.value="";let{selected:a}=e.choice;if(i&&a!==null)pA(a,i).then(b)},reset:()=>{e.choice.filter=e.images?"image":"all",e.choice.query="",v(e)},select:(t)=>N(e,t),setFilter:(t)=>{if(ae(t))e.choice.filter=t,v(e)},setQuery:(t)=>{e.choice.query=t,v(e)},setSort:(t)=>{if(re(t))e.choice.sort=t,v(e)},tileHost:(t,i)=>{e.tiles.set(i,t),ke.set(t,i),e.observer.observe(t)},upload:(t)=>{let i=[...t.files??[]];if(t.value="",i.length>0)ge(e,i)}}}function he(e,t){if(e.mode==="pick"){let i=xw(e);if(i)e.onPick?.(i);return}_b(t)}function Qe(e,t,i){let{files:a}=$e(e),r=W(a,{filter:e.choice.filter,query:e.choice.query,sort:e.choice.sort,unused:x}),o=r.findIndex((h)=>h.file===e.choice.selected),l=e.grid?oe(He(e.grid).width):1,c=o===-1?r.length>0?0:null:se(o,t,l,r.length,i),s=c===null?void 0:r[c];if(!s)return;N(e,s.file),e.tiles.get(s.file)?.focus()}var ke=new WeakMap;function Se(e,t,i,a,r,o){let l={choice:t,disposed:!1,dropActive:!1,grid:null,handle:null,images:r,inputs:{replace:new Set,upload:new Set},mode:e,observer:bp((c)=>{let s=ke.get(c);if(s!==void 0&&!l.visible.has(s))l.visible.add(s),Xe(l)}),onPick:null,onSelect:null,paneId:a,reveal:null,focusOwed:!1,region:i,sweepTimer:null,tiles:new Map,uploadDir:o,visible:new Set};return l}var B=new Set;function Xe(e){if(B.has(e))return;B.add(e),queueMicrotask(()=>{B.delete(e),v(e)})}function fS(e,t){let i=M.get(e);return i!==void 0&&i.tabId===t.id&&i.wrap.isConnected&&i.mount.handle!==null&&i.mount.handle.attached()}function _w(e){let t=M.get(e);if(!t)return;Q(t.mount),M.delete(e)}function LT(e,t){let{paneId:i,wrap:a}=e;if(fS(i,t))return;_w(i);let r=Se("manage",y,wi(i,"media-library"),i,!1,_a);if(S.add(r),be(),r.handle=q(a,X(r),Me(r),{clear:!0}),M.set(i,{mount:r,tabId:t.id,wrap:a}),J.delete(i))Fe(r)}async function Fe(e){await e.handle?.ready,Le(e,!0)}function Le(e,t=e.focusOwed){if(!t||e.disposed)return;let{selected:i}=e.choice,a=(i===null?void 0:e.tiles.get(i))??[...e.tiles.values()].find((r)=>r.getAttribute("tabindex")==="0");if(a?.isConnected){e.focusOwed=!1,a.focus();return}e.focusOwed=!0}function $T(e){let t=M.get(e);if(t?.wrap.isConnected&&t.mount.handle?.attached()===!0){Fe(t.mount);return}J.add(e)}function M2(e){if(e.filter!==void 0)y.filter=e.filter;if(e.query!==void 0)y.query=e.query;if(e.select!==void 0){if(y.selected=e.select,y.filter!=="all")y.filter="all";y.query=""}b()}function nP(){let e=[...M.values()].map((t)=>xe(t.mount.inputs.upload)).find((t)=>t!==null)??null;if(e){Z(e);return}j={file:null,role:"upload"}}function iP(e){M2({select:e});let t=null;for(let i of M.values())if(i.mount.choice.selected===e)t??=xe(i.mount.inputs.replace);if(t){Z(t);return}j={file:e,role:"replace"}}var O=null;function ye(e){let t=xw(e);return{blocked:t===null,confirmLabel:t?`Use ${t.name}`:e.images?"Use image":"Use file",headline:e.images?"Choose an image":"Choose media"}}function mS(){let e=O;if(O=null,e)Q(e.mount),e.dialog.close()}function oP(e){mS();let t={filter:e.images?"image":"all",query:"",selected:null,sort:"newest"},i=Se("pick",t,`${ft("dialog",V)}/library`,null,e.images,XL(u.value?.documentPath??null)),a=(o)=>{mS(),e.onPick(o.ref)};i.onPick=a,S.add(i),be();let r=ue({body:(o)=>{i.handle=q(o,X(i),Me(i),{clear:!1})},closed:()=>{if(O?.mount===i)mS();else Q(i)},confirm:()=>{let o=xw(i);if(o)a(o)},layer:tt("dialog"),view:ye(i)});i.onSelect=()=>r.update(ye(i)),O={dialog:r,mount:i}}function IT(){mS();for(let e of M.keys())_w(e);y.filter="all",y.query="",y.selected=null,y.sort="newest",j=null,J.clear(),Y()}
2
- export{pS,tP,xw,O2,fS,_w,LT,$T,M2,nP,iP,mS,oP,IT};
3
-
4
- //# debugId=06DC0765C6515CCB64756E2164756E21
5
- //# sourceMappingURL=studio-dvhxxxbd.js.map
@@ -1,5 +0,0 @@
1
- import{Un,m,jt}from"./studio-ztppbam0.js";import{kD}from"./studio-6rbaedw2.js";import{Xu}from"./studio-0rg30pvs.js";import{le}from"./studio-k5n4es74.js";var e="edit",a=new Set(["edit","design"]);function r(t){for(let i of m.tabs.values())if(i.documentPath===t)return i;return null}async function Ml(t){if(!Xu(t)){let o=Un(t);if(o&&!o.fileBacked)return kD(t);let{openFileInTab:s}=await (le("yswdhxrf"),import("./files-yswdhxrf.js"));return await s(t),r(t)}let{openFileInTab:i}=await (le("yswdhxrf"),import("./files-yswdhxrf.js"));await i(t);let n=r(t);if(!n)return null;if(!a.has(n.session.ui.canvasMode)&&n.capabilities.modes.includes(e))n.session.ui.canvasMode=e,n.session.ui.preview=!1;return jt(n.id),n}
2
- export{Ml};
3
-
4
- //# debugId=C86248B95CF9AA2164756E2164756E21
5
- //# sourceMappingURL=studio-ge08zwpv.js.map
@@ -1,5 +0,0 @@
1
- import{pt,Uo,xr,Ap}from"./studio-14hh60j8.js";function cb(){return Uo(pt.cfToken)}function DE(t){xr(pt.cfToken,t||"")}function NE(){return Uo(pt.cfAccountId)}function Z2(t){xr(pt.cfAccountId,t||"")}function AE(){Ap([pt.cfToken,pt.cfAccountId])}
2
- export{cb,DE,NE,Z2,AE};
3
-
4
- //# debugId=25989528E8543C3764756E2164756E21
5
- //# sourceMappingURL=studio-nr0kcqc6.js.map
@@ -1,5 +0,0 @@
1
- import{p,_e}from"./studio-9ndgd55w.js";import{pt,Uo,$A,Np,fx,xr,RA,Ap}from"./studio-14hh60j8.js";import{C}from"./studio-tfmhnwyr.js";import{Ys,tt}from"./studio-myb4mf0h.js";import{n,Z,Ze,Q,v}from"./studio-ywf9y1e2.js";var l=null;async function Pd(){if(!_e()||!Q(p().getAccountStatus)){l=null;return}try{l=await p().getAccountStatus?.()??null}catch{l=null}}function sC(){return l}function aC(){return l!==null&&l.installations.length===0&&Boolean(l.appInstallUrl)}function mA(){if(l===null)return null;let e=l.installations.flatMap((r)=>r.manageUrl?[{account:r.account??`Installation ${r.id}`,url:r.manageUrl}]:[]);if(e.length===0&&!l.appInstallUrl)return null;let t={manage:e};if(l.appInstallUrl)t.installUrl=l.appInstallUrl;return t}function gA(){return l?.entries??[]}function i$(){return(l?.notices??[]).filter((e)=>e.display!=="toast")}var L=new Set;function N(){let e=(l?.notices??[]).filter((t)=>t.display==="toast"&&!L.has(t.id));for(let t of e)L.add(t.id);return e}var G="https://jxsuite.com/problems/";function k(e){return typeof e==="string"}function X(e){return typeof e==="object"&&e!==null}function Wb(e){if(!k(e)||!e.startsWith("https://jxsuite.com/problems/"))return null;let t=e.slice(29);return t===""?null:t}function nr(e){if(k(e))return e.trim()===""?null:e;if(!X(e))return null;for(let t of[e.detail,e.error,e.title])if(k(t)&&t.trim()!=="")return t;return null}function rl(e,t){return nr(e)??(t===void 0?"Request failed":`Request failed (${t})`)}var d=(e,t,r,i)=>{let s={status:t,title:r,type:`${G}${e}`};if(i!==void 0)s.extensions=i;return s},me={invalidRequest:d("invalid-request",400,"The request was malformed or incomplete"),notFound:d("not-found",404,"The requested resource does not exist"),methodNotAllowed:d("method-not-allowed",405,"That method is not allowed on this route"),conflict:d("conflict",409,"The request conflicts with the current state",["conflicts"]),payloadTooLarge:d("payload-too-large",413,"The request body is too large"),unauthorized:d("unauthorized",401,"Credentials are missing or not accepted"),forbidden:d("forbidden",403,"The request was refused"),needsInstallationAccess:d("needs-installation-access",403,"The GitHub App is not installed for that account",["installUrl"]),pathOutsideProject:d("path-outside-project",403,"The path resolves outside the active project"),actionRequired:d("action-required",403,"An action is required first",["actions","heading","retry"]),noActiveProject:d("no-active-project",409,"No project is active on this backend"),capabilityUnavailable:d("capability-unavailable",501,"This backend does not provide that capability"),upstreamFailure:d("upstream-failure",502,"An upstream service failed",["upstream"]),internalError:d("internal-error",500,"The backend failed to complete the request")};var o=(e,t,r,i)=>{let s={method:e,path:t,optional:i!==void 0,summary:r};if(i!==void 0)s.degradation=i;return s},he={activate:o("POST","/__studio/activate","Bind the backend to a project root"),project:o("GET","/__studio/project","Root project metadata {name, root}"),projectInfo:o("GET","/__studio/project-info","Probe a directory: {isSiteProject, projectConfig?, directories?}"),resolveSite:o("GET","/__studio/resolve-site","Resolve the owning site of a file path {sitePath, projectConfig?, fileRelPath?}"),sites:o("GET","/__studio/sites","Enumerate site projects [{config, path}] (backs listProjects)","The welcome screen's Projects catalogue stays hidden."),createProject:o("POST","/__studio/create-project","Scaffold a project at a caller-chosen destination → {root, config}"),starters:o("GET","/__studio/starters","Starter templates (StarterInfo[])","The New Project picker offers only blank/templates."),importSite:o("POST","/__studio/import-site","Clone a live website into a project; streams NDJSON progress","The New Project Import tab is unavailable."),files:o("GET","/__studio/files","List a directory (DirEntry[]) in stable path order; an entry may carry an opaque content `version` the backend vouches for; with ?glob=<pattern>, search matching files project-wide"),fileRead:o("GET","/__studio/file","Read a file's text content"),filesRead:o("POST","/__studio/files/read","Read many files' text content {paths} → ReadFilesResult {files: [path, {content} | "+"{error: {status, code?, message}}][], omitted}. At most READ_FILES_MAX_PATHS (200) paths and a backend byte budget per call: the excess is listed in `omitted` (never a 400) and the first path is always answered. Per-path errors: 404 missing/deleted, 415 binary, 413 too large, 502 upstream. Allowed for read-only sessions; keeps fileRead's server-side effects","Adapters fall back to one fileRead per path."),fileWrite:o("PUT","/__studio/file","Write a file's text content"),fileDelete:o("DELETE","/__studio/file","Delete a file"),fileUpload:o("POST","/__studio/file/upload","Upload binary content to a path → UploadResult {path, size?}. `path` is the answer, not an "+"echo: a store that de-duplicates, suffixes, or normalizes names reports what it really wrote"),fileBytes:o("GET","/__studio/file/bytes","A project file's raw bytes, undecoded — the read side of `fileUpload`, for a caller that must "+"not go through UTF-8","Studio can only read a project file as text, so any surface that must decode one stays hidden."),documentRaw:o("GET","/__studio/raw/","A project file as its own bytes, at its own URL — the mount a canvas renders against when "+"the editor origin does not serve the site's URL space. The project-relative path is appended to this prefix","The canvas cannot address project files by URL, so a host whose origin does not serve the site URL space renders no component $refs and no images."),fileRename:o("POST","/__studio/file/rename","Rename/move (+ refactor report). `from`/`to` are server-root-relative; every path in the "+"report is relative to the active project (specs/server.md §4.1)"),references:o("GET","/__studio/references","Where a file or a component tag is used (?path=&tag=, at least one) → ReferencesResult "+"{files, filesReferencing, refsTotal} — the read side of the rename refactor's own walker, "+"cached until the backend's watcher sees the tree move (backs findReferences). `?path=` is server-root-relative and every path in the answer is relative to the active project; a "+"target outside that project is a 400, never a zero-result 200 (specs/server.md §4.1)",'Usage counts are hidden: no "Used on N pages" in the inspector, no Selection: Find Usages, and delete/rename confirmations state no reference count.'),locate:o("POST","/__studio/locate","Find a file by name → {path | null}"),collab:o("GET","/__studio/collab","Realtime co-editing: a WebSocket upgrade speaking the @jxsuite/collab wire envelope (one socket per project, documents multiplexed by path; y-protocols sync + project-level "+"awareness in lib0 binary frames — see @jxsuite/collab/envelope for the frame layout and "+"the docEpoch/doc-reset lifecycle). A plain GET (no Upgrade) answers {collab, protocols, version} as the capability probe, and `protocols` is the subprotocol negotiation: the client offers one of them as Sec-WebSocket-Protocol and the server echoes it, or the "+"client offers none when the server advertises none, because RFC 6455 §4.1 fails a "+"connection whose offer went unechoed.","Realtime co-editing is unavailable; Studio edits solo with file-level saves"),components:o("GET","/__studio/components","Discover components (ComponentMeta[])"),cem:o("GET","/__studio/cem","Custom-elements manifest of an npm dependency","Dependency components lose prop/slot metadata."),formats:o("GET","/__studio/formats","The project's format registry entries plus a sibling `extensions` array — per enabled "+"extension its manifest identity and project-section contributions (ExtensionsInfo[]; backs listFormats and listExtensions).","Only .json documents open (backs listFormats); descriptor-contributed settings sections do not appear."),extensionCatalog:o("GET","/__studio/catalog","Extensions this backend can OFFER (ExtensionCatalogEntry[]) — the shipped first-party "+"catalogue plus any package in the project's own dependencies exporting a jx-extension.json, each marked with whether the host resolves it without a project install and whether the project has it installed. A capability rather than a constant: a Worker ships a fixed set "+"of extension packages (specs/extensions.md §5.5). Backs listExtensionCatalog.","The Extensions section offers no catalogue; adding an extension stays a typed package name."),projectSchemas:o("GET","/__studio/project-schemas","The project's generated entry documents (project.schema.json / document.schema.json), "+"PRE-BUNDLED into self-contained schemas — {project, document} (backs fetchProjectSchemas). "+"Regenerated on demand when missing or older than project.json.","The JSON editor falls back to the bundled core schemas (extension sections get no editor validation/completion)."),format:o("POST","/__studio/format","Dispatch a format capability {format, action: parse|serialize, source?|doc?}","Non-JSON documents cannot be parsed/serialized (backs formatAction)."),pluginSchema:o("GET","/__studio/plugin-schema","Extract a $studio schema from a class source","Plugin property panels fall back to generic JSON editing."),codeFormat:o("POST","/__studio/code/format","Format posted source {code, path?} → {code, errors}","Code editors skip format-on-open/save (codeService returns null)."),codeMinify:o("POST","/__studio/code/minify","Minify posted source {code} → {code}","Compiled-output minification is skipped."),codeLint:o("POST","/__studio/code/lint","Lint posted source {code, path?} → {diagnostics}","Code editors show no lint markers."),buildSite:o("POST","/__studio/build","Build or render the site → {routes, files, errors, mode?, url}","Build Site reports that this target cannot build."),previewSite:o("POST","/__studio/preview","Preview the working tree at a route → {routes, files, errors, mode, url, reused}","Open in Browser falls back to buildSite."),previewOverlay:o("POST","/__studio/preview/overlay","Publish (POST) or retract (DELETE) a document's unsaved bytes → 204","A live preview shows the last saved state instead of the editor's."),packages:o("GET","/__studio/packages","List dependencies (PackageInfo[])"),packagesAdd:o("POST","/__studio/packages/add","Add a dependency"),packagesRemove:o("POST","/__studio/packages/remove","Remove a dependency"),packagesInstall:o("POST","/__studio/packages/install","Run the package manager install","Install/reinstall affordances are hidden; manifest-only edits still work."),packagesNeedsInstall:o("GET","/__studio/packages/needs-install","Whether node_modules is stale","The install-on-open prompt never shows."),packagesVersions:o("GET","/__studio/packages/versions","Newest published version of each dependency (PackageVersionInfo[])","The Latest column stays empty and the update affordances are hidden."),packagesSetVersions:o("POST","/__studio/packages/set-versions","Rewrite dependency ranges and install","Bulk version updates are hidden."),gitStatus:o("GET","/__studio/git/status","Working-tree status (GitStatusResult)"),gitBranches:o("GET","/__studio/git/branches","Branch list (GitBranchesResult)"),gitLog:o("GET","/__studio/git/log","Recent commits (GitLogEntry[])"),gitStage:o("POST","/__studio/git/stage","Stage files"),gitUnstage:o("POST","/__studio/git/unstage","Unstage files"),gitCommit:o("POST","/__studio/git/commit","Commit staged (else all dirty) files"),gitPush:o("POST","/__studio/git/push","Push (cloud: sync check — commits land on push)"),gitPull:o("POST","/__studio/git/pull","Pull/fast-forward; 409 {conflicts} on overlap"),gitFetch:o("POST","/__studio/git/fetch","Refresh remote tracking state"),gitCheckout:o("POST","/__studio/git/checkout","Switch branches"),gitCreateBranch:o("POST","/__studio/git/create-branch","Create a branch"),gitDiff:o("GET","/__studio/git/diff","Unified diff of dirty files (or one path)"),gitShow:o("GET","/__studio/git/show","File content at a ref"),gitDiscard:o("POST","/__studio/git/discard","Discard working changes"),gitInit:o("POST","/__studio/git/init","Initialize a repository"),gitAddRemote:o("POST","/__studio/git/add-remote","Add a remote"),gitClone:o("POST","/__studio/git/clone","Clone a repository","The welcome screen hides Clone Git Repository."),gitPr:o("POST","/__studio/git/pr","Open a pull request → PullRequestInfo","Studio falls back to a direct GitHub API call with the user's token."),dataConnections:o("GET","/__studio/data/connections","Connector connections with configured/missingSecrets/isDefault state, reachable table names, and registry-descriptor provider metadata (DataConnectionsResponse; backs dataConnections)","The connections settings section shows no status, and data-domain actions stay hidden."),dataConnectionTest:o("POST","/__studio/data/connections/test","Probe a connection {connection} → DataConnectionTestResult (backs dataConnectionTest)","The Test Connection action is hidden."),dataPush:o("POST","/__studio/data/push","Additive schema push {connection?, dryRun?} → DataPushResult (plan of DataPushStep[], "+"applied, warnings/errors; backs dataPush)","The Push Schema action is hidden; schemas deploy via `jx db push` instead."),dataRows:o("GET","/__studio/data/rows","Page a table (DataRowsQuery params) → DataRowsResult {rows, total, columns} (backs dataRows)","The data grid is unavailable."),dataInsertRow:o("POST","/__studio/data/rows","Insert a row {table, connection?, values} → {row} (backs dataInsertRow)","The data grid hides its add-row footer."),dataUpdateRow:o("PUT","/__studio/data/rows","Update a row keyed on its primary key {table, connection?, pk, set} → {row} (backs "+"dataUpdateRow)","Data grid cells are read-only."),dataDeleteRow:o("DELETE","/__studio/data/rows","Delete a row (?table=&pk=&connection=) → {ok} (backs dataDeleteRow)","The data grid hides row deletion."),secretsList:o("GET","/__studio/secrets","Configured secret env-var NAMES, never values (SecretsListResponse; backs listSecrets)","Secret fields cannot show set/unset state."),secretsSet:o("PUT","/__studio/secrets","Write/remove secrets in the backend store (.dev.vars locally) {set?, remove?} → names "+"(backs setSecrets)","The secret form control renders disabled; secrets are edited in .dev.vars by hand."),aiChat:o("POST","/__studio/ai/chat","StreamEvent SSE chat proxy {messages, tools, systemPrompt, model}"),aiModels:o("GET","/__studio/ai/models","Model catalogue (AiModelsResponse)"),cfProxy:o("POST","/__studio/cf/proxy","Allowlisted Cloudflare API passthrough {path, method?, body?} (backs cfApi)","The Publish panel explains the git-push publishing path instead.")};var o$=200,r$=100,s$=12;var Y=new Set(["reload","repeat","none"]);function Dp(e){if(!Array.isArray(e))return[];return e.flatMap((r)=>{if(!v(r))return[];let{href:i,id:s,label:f,primary:m}=r;if(!n(s)||!s||!n(f)||!f)return[];let c={id:s,label:f};if(n(i)&&i)c.href=i;if(m===!0)c.primary=!0;return[c]})}function q(e){return n(e)&&Y.has(e)}function a$(e){return q(e)?e:void 0}function ee(e){return e.replaceAll("_","-")}function _(e){if(!v(e))return{};let{actions:t,code:r,heading:i,installUrl:s,retry:f,type:m}=e,c={},a=Wb(m)??(n(r)?ee(r):null);if(a!==null)c.code=a;if(n(s))c.installUrl=s;if(t!==void 0)c.actions=Dp(t);if(n(i)&&i)c.heading=i;if(q(f))c.retry=f;return c}function bA(e){let t=_(e);return t.code==="needs-installation-access"&&t.installUrl?t.installUrl:null}function vA(e){return _(e).code==="action-required"}function Fd(){return Uo(pt.aiOpenAiKey)}function yA(e){xr(pt.aiOpenAiKey,e||"")}function dx(){return $A(pt.aiOpenAiKey)}function sl(){return Uo(pt.aiBaseUrl)}function ux(){return Uo(pt.aiModel)}function wA(e){xr(pt.aiModel,e||"")}function xA(e){RA([[pt.aiOpenAiKey,e.apiKey],[pt.aiBaseUrl,e.baseUrl],[pt.aiModel,e.model]])}function _A(e){return!Tm(pt.aiOpenAiKey,e.apiKey,Fd())||!Tm(pt.aiBaseUrl,e.baseUrl,sl())||!Tm(pt.aiModel,e.model,ux())}function Tm(e,t,r){return fx(e,t)===fx(e,r)}function SA(){Ap([pt.aiOpenAiKey,pt.aiBaseUrl,pt.aiModel])}function lC(){return{apiKey:Fd(),baseUrl:sl()}}function V(e){return`${e.apiKey}\x00${e.baseUrl}`}var g=null,P="",j=!1,A=!1,D="",M,I="",R=null,U=null,F=new Set,te=600000,S=0,J=!1;function ds(){g=null,P="",j=!1,A=!1,D="",M=void 0,I="",R=null,U=null,S=0}var ne=new Set([pt.aiOpenAiKey.key,pt.aiBaseUrl.key,pt.cfToken.key,pt.cfAccountId.key]);Np((e)=>{if(e.some((t)=>ne.has(t)))ds()});function l$(e){return g&&P===V(e)?g:null}function K(e){return g?.find((t)=>t.id===e)}function c$(e){return K(e)?.toolSupport}function CA(e){return K(e)?.contextWindow}function hx(e){if(e)F.add(e);U??=ah({force:!0}).catch(()=>{}).then(()=>{S=Date.now();for(let t of F)t()})}function oe(){if(!A||S===0||Date.now()-S<te)return!1;return U=null,S=0,hx(),!0}function re(){if(typeof window>"u"||J)return;J=!0,window.addEventListener("focus",()=>{oe()})}re();function Vb(){return dx()||cC()}function cC(){return j}function kA(){return A}function Lm(){return M}function EA(){return I}function dC(){return R}function ie(){return D}function Kl(){return ux()||ie()||pt.aiModel.default}function se(e,t){let r;try{r=new URL(e,"http://jx.invalid")}catch{return e}return r.pathname=r.pathname.replace(/[^/]*$/,t),/^https?:/i.test(e)?r.href:`${r.pathname}${r.search}`}async function ah(e={}){let t=e.credentials??lC(),r=V(t);if(g&&P===r&&!e.force)return g;let i=p(),s=await Promise.resolve(i.aiChatUrl()),f=se(s,"models"),m={};if(t.apiKey)m["X-Api-Key"]=t.apiKey;if(t.baseUrl)m["X-Api-Base-URL"]=t.baseUrl;let c=await fetch(f,{headers:m});if(!c.ok)throw Error(`HTTP ${c.status}`);let a=await c.json();if(j=a.configured===!0,A=a.managed===!0,D=a.defaultModel??"",M=a.code,I=a.upstreamError!==void 0?a.upstreamMessage??"":"",R=null,a.code==="action_required"){let u={actions:Dp(a.actions)};if(n(a.detail)&&a.detail)u.detail=a.detail;R=u}return g=(a.models||[]).map((u)=>{let h={id:u.id,name:u.name||u.id};if(Z(u.contextWindow))h.contextWindow=u.contextWindow;if(Ze(u.toolSupport))h.toolSupport=u.toolSupport;return h}),P=r,g}var T=new Set,B=null;function TA(e){if(T.size===0){B=e;return}for(let t of T)t(e)}function H(e){T.add(e);let t=B;if(B=null,t)e(t);return()=>{T.delete(e)}}function uC(){return _e()&&Q(p().performAction)}function d$(e){let t=e.find((i)=>i.primary)??e[0];if(!t)return null;let r=e.find((i)=>i!==t);return r?{lead:t,other:r}:{lead:t}}var w=null,W=!1;function hC(e){let t=d$(e.actions);if(!uC()||!t)return Promise.resolve(!1);return w??=ae(e,t).finally(()=>{w=null}),w}async function $m(e){let t=_(e);if(t.code!=="action-required"||!t.actions?.length)return!1;return hC({actions:t.actions,detail:e instanceof Error?e.message:void 0,heading:t.heading,retry:t.retry})}async function z(){ds(),await Pd(),u$()}function ae(e,t){let r=e.detail??"This needs one more step first.";return new Promise((i)=>{let s="offer",f=(y)=>{if(s==="done")return;s="done",E.close(),i(y)},m=(y)=>{s="offer",E.update({cancelLabel:"Not now",confirmLabel:t.lead.label,message:y,secondaryLabel:t.other?.label??""})},c=async(y)=>{let b;try{b=await y}catch(x){if(s==="waiting")m(x instanceof Error?x.message:String(x));return}if(b?.status==="done"){await z(),f(!0);return}if(s!=="waiting"||!b||b.status==="redirect")return;Pd(),m(r)},a=(y)=>{if(s!=="offer")return;s="waiting";let b;try{b=p().performAction(y)}catch(x){m(x instanceof Error?x.message:String(x));return}E.update({cancelLabel:"Cancel",confirmLabel:"Waiting…",message:"Finish in the window that opened. This closes by itself once it is done.",secondaryLabel:""}),c(b)},{lead:u,other:h}=t,O={cancelLabel:"Not now",confirmLabel:u.label,headline:e.heading??"One more step",layer:tt("dialog"),message:r,onCancel:()=>{W=!0,f(!1)},onClosed:()=>{f(!1)},onConfirm:()=>{a(u)},region:"account/action"};if(h)O.onSecondary=()=>{a(h)},O.secondaryLabel=h.label;let E=Ys(O)})}function ce(e){if(e==="reload")location.reload();else if(e==="repeat")C.info("Done. Run that again now.",{key:"account.action.retry",source:"Account"})}function LA(){return H((e)=>{if(W||w)return;hC(e).then((t)=>{if(t)ce(e.retry)})})}async function px(e){if(!uC())return!1;let t=p().performAction(e),r;try{r=await t}catch(i){return C.error(i instanceof Error?i.message:String(i),{key:"account.action",source:"Account",tier:"toast"}),!1}if(r?.status==="done")return await z(),!0;if(r?.status!=="redirect")await Pd();return!1}function u$(){for(let e of N()){let t={key:`account.notice.${e.id}`,source:"Account"};if(e.level==="warning")C.warn(e.message,t);else C.info(e.message,t)}}
2
- export{Pd,sC,aC,mA,gA,i$,Wb,nr,rl,o$,r$,s$,Dp,a$,bA,vA,Fd,yA,dx,sl,ux,wA,xA,_A,Tm,SA,lC,ds,l$,c$,CA,hx,Vb,cC,kA,Lm,EA,dC,Kl,ah,TA,uC,d$,hC,$m,LA,px,u$};
3
-
4
- //# debugId=3BDE87C4AF619A0A64756E2164756E21
5
- //# sourceMappingURL=studio-y47090vq.js.map