@jxsuite/studio 0.30.1 → 0.31.1

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.
package/dist/studio.js CHANGED
@@ -195099,11 +195099,11 @@ var init_state = __esm(() => {
195099
195099
  });
195100
195100
 
195101
195101
  // src/tabs/tab.ts
195102
- function createDefaultUi() {
195102
+ function createDefaultUi(canvasMode) {
195103
195103
  return {
195104
195104
  activeMedia: null,
195105
195105
  activeSelector: null,
195106
- canvasMode: "edit",
195106
+ canvasMode,
195107
195107
  editingFunction: null,
195108
195108
  featureToggles: {},
195109
195109
  gitBranches: null,
@@ -195139,6 +195139,7 @@ function createTab({
195139
195139
  const scope = effectScope();
195140
195140
  normalizeArrayChildren(document2);
195141
195141
  const resolvedModes = capabilities?.modes ?? inferModes(documentPath, sourceFormat);
195142
+ const initialCanvasMode = resolvedModes[0] ?? "edit";
195142
195143
  const tab = scope.run(() => ({
195143
195144
  capabilities: { modes: resolvedModes },
195144
195145
  doc: reactive({
@@ -195168,7 +195169,7 @@ function createTab({
195168
195169
  documentStack: [],
195169
195170
  hover: null,
195170
195171
  selection: null,
195171
- ui: createDefaultUi()
195172
+ ui: createDefaultUi(initialCanvasMode)
195172
195173
  })
195173
195174
  }));
195174
195175
  return tab;
@@ -201043,7 +201044,7 @@ function rawTextArea(key, value, commit, opts = {}) {
201043
201044
  const { onInput, onCommit } = makeHandlers(key, ms, commit, opts.commitMode);
201044
201045
  const style = [
201045
201046
  `min-height:${opts.minHeight ?? "40px"}`,
201046
- opts.mono ? "font-family:'SF Mono','Fira Code','Consolas',monospace;font-size:11px" : "",
201047
+ opts.mono ? "font-family:var(--font-mono);font-size:var(--spectrum-font-size-50,11px)" : "",
201047
201048
  opts.style ?? ""
201048
201049
  ].filter(Boolean).join(";");
201049
201050
  return keyed(key, html3`
@@ -201293,7 +201294,8 @@ function renderLiteralEditor(operand, onChange) {
201293
201294
  ?checked=${Boolean(operand)}
201294
201295
  @change=${(e) => onChange(e.target.checked)}
201295
201296
  >true</sp-checkbox
201296
- >` : html3`<span style="font-size:12px;color:var(--spectrum-global-color-gray-600)"
201297
+ >` : html3`<span
201298
+ style="font-size:var(--spectrum-font-size-75, 12px);color:var(--spectrum-gray-600, #808080)"
201297
201299
  >null</span
201298
201300
  >`}
201299
201301
  </div>
@@ -201339,7 +201341,7 @@ function renderSpliceArgsEditor(args, onChange, opts) {
201339
201341
  class="array-object-row"
201340
201342
  style="display:flex;gap:4px;align-items:center;margin-bottom:4px"
201341
201343
  >
201342
- <span style="font-size:10px;color:var(--spectrum-global-color-gray-600);min-width:30px">
201344
+ <span style="font-size:10px;color:var(--spectrum-gray-600, #808080);min-width:30px">
201343
201345
  ${labels[idx] ?? "item"}
201344
201346
  </span>
201345
201347
  ${renderOperandEditor(arg, (newArg) => {
@@ -201370,7 +201372,7 @@ function renderExpressionEditor(node, onChange, opts) {
201370
201372
  const safeNode = node && typeof node === "object" ? node : { operator: "=", target: null };
201371
201373
  const op = safeNode.operator || "=";
201372
201374
  const info = operatorInfo(op);
201373
- const nestStyle = depth > 0 ? "border-left:2px solid var(--spectrum-global-color-gray-300);margin-left:8px;padding-left:8px;" : "";
201375
+ const nestStyle = depth > 0 ? "border-left:2px solid var(--spectrum-gray-300, #3c3c3c);margin-left:8px;padding-left:8px;" : "";
201374
201376
  return html3`
201375
201377
  <div class="expression-editor" style=${nestStyle}>
201376
201378
  ${renderFieldRow({
@@ -201624,7 +201626,7 @@ function renderMediaPickerPopover() {
201624
201626
  slot="icon"
201625
201627
  src=${m.path}
201626
201628
  alt=""
201627
- style="width:24px;height:24px;object-fit:cover;border-radius:2px"
201629
+ style="width:24px;height:24px;object-fit:cover;border-radius:var(--spectrum-corner-radius-75, 2px)"
201628
201630
  />` : nothing}
201629
201631
  ${m.name}
201630
201632
  </sp-menu-item>
@@ -202352,7 +202354,7 @@ function renderFunctionFields(S, name, def3, _textareaRow, ctx) {
202352
202354
  </div>
202353
202355
  <textarea
202354
202356
  class="field-input"
202355
- style="min-height:60px;font-family:monospace;font-size:11px"
202357
+ style="min-height:60px;font-family:var(--font-mono);font-size:var(--spectrum-font-size-50, 11px)"
202356
202358
  .value=${def3.body || ""}
202357
202359
  @input=${(e) => {
202358
202360
  const v = e.target.value;
@@ -202377,7 +202379,7 @@ function renderParameterEditorTemplate(_S, name, def3, ctx) {
202377
202379
  <div style="display:flex;flex-wrap:wrap;gap:4px;align-items:center">
202378
202380
  ${params.map((p, i2) => html3`
202379
202381
  <span
202380
- style="display:inline-flex;align-items:center;gap:2px;padding:1px 6px;border-radius:3px;background:var(--bg-hover);font-size:11px;font-family:monospace"
202382
+ style="display:inline-flex;align-items:center;gap:2px;padding:1px 6px;border-radius:var(--radius);background:var(--hover-bg);font-size:var(--spectrum-font-size-50, 11px);font-family:var(--font-mono)"
202381
202383
  >
202382
202384
  ${p.name || "?"}
202383
202385
  <span
@@ -202393,7 +202395,7 @@ function renderParameterEditorTemplate(_S, name, def3, ctx) {
202393
202395
  `)}
202394
202396
  <input
202395
202397
  class="field-input"
202396
- style="width:60px;flex:0 0 auto;font-size:11px"
202398
+ style="width:60px;flex:0 0 auto;font-size:var(--spectrum-font-size-50, 11px)"
202397
202399
  placeholder="+"
202398
202400
  @keydown=${(e) => {
202399
202401
  if (e.key === "Enter" && e.target.value.trim()) {
@@ -202514,7 +202516,7 @@ function renderEmitsEditorTemplate(S, name, def3) {
202514
202516
  }
202515
202517
  return html3`
202516
202518
  <div
202517
- style="font-size:11px;font-weight:600;color:var(--fg-dim);margin:8px 0 4px;text-transform:uppercase;letter-spacing:0.05em"
202519
+ style="font-size:var(--spectrum-font-size-50, 11px);font-weight:600;color:var(--fg-dim);margin:8px 0 4px;text-transform:uppercase;letter-spacing:0.05em"
202518
202520
  >
202519
202521
  Emits
202520
202522
  </div>
@@ -202737,7 +202739,7 @@ function renderSchemaFieldsTemplate(schema, def3, name, _S, ctx = null) {
202737
202739
  <div style="display:flex;flex-wrap:wrap;gap:3px;margin-bottom:4px">
202738
202740
  ${Object.entries(cv.properties).map(([k, v]) => html3`
202739
202741
  <span
202740
- style="background:var(--bg-alt);padding:1px 6px;border-radius:3px;font-size:10px;color:var(--fg-dim)"
202742
+ style="background:var(--bg);padding:1px 6px;border-radius:var(--radius);font-size:10px;color:var(--fg-dim)"
202741
202743
  >${k}: ${v.type ?? "any"}</span
202742
202744
  >
202743
202745
  `)}
@@ -202857,7 +202859,7 @@ function renderExternalPrototypeEditorTemplate(S, name, def3, ctx) {
202857
202859
  }
202858
202860
  } else {
202859
202861
  schemaContent = html3`<div
202860
- style="padding:4px 0;font-size:11px;color:var(--fg-dim);font-style:italic"
202862
+ style="padding:4px 0;font-size:var(--spectrum-font-size-50, 11px);color:var(--fg-dim);font-style:italic"
202861
202863
  >
202862
202864
  Loading schema…
202863
202865
  </div>`;
@@ -202871,7 +202873,10 @@ function renderExternalPrototypeEditorTemplate(S, name, def3, ctx) {
202871
202873
  }
202872
202874
  }
202873
202875
  return html3`
202874
- ${importedPath ? html3`<div class="signal-hint" style="padding:4px 0 2px;font-size:11px;color:var(--fg-dim)">
202876
+ ${importedPath ? html3`<div
202877
+ class="signal-hint"
202878
+ style="padding:4px 0 2px;font-size:var(--spectrum-font-size-50, 11px);color:var(--fg-dim)"
202879
+ >
202875
202880
  ${def3.$prototype}
202876
202881
  </div>` : html3`
202877
202882
  ${signalFieldRow("Source", def3.$src || "", (v) => {
@@ -217858,7 +217863,11 @@ function renderLayersTemplate(ctx) {
217858
217863
  class="layer-row"
217859
217864
  style="padding-left:${depth * 16 + 8}px; opacity: 0.6; font-style: italic;"
217860
217865
  >
217861
- <span class="layer-tag" style="background: #64748b; font-size: 0.65rem;">text</span>
217866
+ <span
217867
+ class="layer-tag"
217868
+ style="background: var(--spectrum-gray-500, #64748b); font-size: 0.65rem;"
217869
+ >text</span
217870
+ >
217862
217871
  <span class="layer-label">${textPreview}</span>
217863
217872
  </div>
217864
217873
  `
@@ -218447,6 +218456,251 @@ var init_context_menu = __esm(() => {
218447
218456
  init_layers();
218448
218457
  });
218449
218458
 
218459
+ // src/ui/progress-modal.ts
218460
+ function card(body) {
218461
+ return html3`
218462
+ <sp-underlay open></sp-underlay>
218463
+ <div
218464
+ class="progress-modal"
218465
+ role="dialog"
218466
+ aria-live="polite"
218467
+ style="position:fixed;inset:0;margin:auto;width:min(420px,calc(100vw - 48px));max-height:calc(100vh - 96px);height:max-content;background:var(--bg-panel,#1e1e1e);border:1px solid var(--border,#3a3a3a);border-radius:var(--spectrum-corner-radius-200,8px);padding:24px;display:flex;flex-direction:column;gap:16px;box-shadow:0 8px 32px rgba(0,0,0,.4)"
218468
+ >
218469
+ ${body}
218470
+ </div>
218471
+ `;
218472
+ }
218473
+ function runningView(title, status2) {
218474
+ return card(html3`
218475
+ <div style="display:flex;align-items:center;gap:14px">
218476
+ <sp-progress-circle indeterminate size="m" aria-label=${title}></sp-progress-circle>
218477
+ <div style="display:flex;flex-direction:column;gap:2px">
218478
+ <strong style="font-size:var(--spectrum-font-size-100, 14px)">${title}</strong>
218479
+ ${status2 ? html3`<span style="font-size:var(--spectrum-font-size-75, 12px);color:var(--fg-dim,#aaa)"
218480
+ >${status2}</span
218481
+ >` : ""}
218482
+ </div>
218483
+ </div>
218484
+ `);
218485
+ }
218486
+ function errorView(title, message, onClose) {
218487
+ return card(html3`
218488
+ <div style="display:flex;flex-direction:column;gap:8px">
218489
+ <strong style="font-size:var(--spectrum-font-size-100, 14px);color:var(--danger,#e34850)"
218490
+ >${title} failed</strong
218491
+ >
218492
+ <pre
218493
+ style="font-size:var(--spectrum-font-size-50, 11px);white-space:pre-wrap;overflow:auto;max-height:240px;margin:0;color:var(--fg-dim,#aaa)"
218494
+ >
218495
+ ${message}</pre
218496
+ >
218497
+ </div>
218498
+ <div style="display:flex;justify-content:flex-end">
218499
+ <sp-button size="s" @click=${onClose}>Close</sp-button>
218500
+ </div>
218501
+ `);
218502
+ }
218503
+ function showProgressModal(opts) {
218504
+ const modal = openModal(runningView(opts.title, opts.status ?? ""));
218505
+ let closed = false;
218506
+ const close = () => {
218507
+ if (closed) {
218508
+ return;
218509
+ }
218510
+ closed = true;
218511
+ modal.close();
218512
+ };
218513
+ return {
218514
+ done: close,
218515
+ fail(message) {
218516
+ if (!closed) {
218517
+ modal.update(errorView(opts.title, message || "Unknown error", close));
218518
+ }
218519
+ },
218520
+ setStatus(text2) {
218521
+ if (!closed) {
218522
+ modal.update(runningView(opts.title, text2));
218523
+ }
218524
+ }
218525
+ };
218526
+ }
218527
+ var init_progress_modal = __esm(() => {
218528
+ init_lit_html();
218529
+ init_layers();
218530
+ });
218531
+
218532
+ // src/packages/ensure-deps.ts
218533
+ async function ensureDependenciesInstalled() {
218534
+ const platform3 = getPlatform();
218535
+ if (!platform3.dependenciesNeedInstall || !platform3.installDependencies) {
218536
+ return;
218537
+ }
218538
+ let needs = false;
218539
+ try {
218540
+ needs = await platform3.dependenciesNeedInstall();
218541
+ } catch {
218542
+ return;
218543
+ }
218544
+ if (!needs) {
218545
+ return;
218546
+ }
218547
+ const progress = showProgressModal({
218548
+ status: "Running bun install…",
218549
+ title: "Installing dependencies"
218550
+ });
218551
+ try {
218552
+ const result = await platform3.installDependencies();
218553
+ if (result.ok) {
218554
+ progress.done();
218555
+ } else {
218556
+ progress.fail(result.log ?? "bun install failed");
218557
+ }
218558
+ } catch (error) {
218559
+ progress.fail(error instanceof Error ? error.message : String(error));
218560
+ }
218561
+ }
218562
+ var init_ensure_deps = __esm(() => {
218563
+ init_platform3();
218564
+ init_progress_modal();
218565
+ });
218566
+
218567
+ // src/version.ts
218568
+ var APP_NAME = "Jx Studio", VERSION = "0.31.1", BUILD_DATE = "2026-06-24T17:37:59.421Z", GIT_COMMIT = "54f99a1", LINKS;
218569
+ var init_version = __esm(() => {
218570
+ LINKS = {
218571
+ github: "https://github.com/jxsuite/jx",
218572
+ docs: "https://github.com/jxsuite/jx#readme",
218573
+ license: "https://github.com/jxsuite/jx/blob/main/LICENSE"
218574
+ };
218575
+ });
218576
+
218577
+ // src/packages/semver.ts
218578
+ function stripRange(range2) {
218579
+ const base2 = range2.replace(/^[\^~>=<v\s]+/, "").trim();
218580
+ return base2.split(/\s+/)[0] ?? "";
218581
+ }
218582
+ function isComparable(spec) {
218583
+ if (spec.includes(":")) {
218584
+ return false;
218585
+ }
218586
+ return /^\d+\.\d+/.test(stripRange(spec));
218587
+ }
218588
+ function parts(version) {
218589
+ const core = stripRange(version).split(/[-+]/)[0] ?? "";
218590
+ const [major = 0, minor = 0, patch2 = 0] = core.split(".").map((n2) => Math.trunc(Number(n2)) || 0);
218591
+ return [major, minor, patch2];
218592
+ }
218593
+ function compareSemver(a, b) {
218594
+ const pa = parts(a);
218595
+ const pb = parts(b);
218596
+ for (let i2 = 0;i2 < 3; i2++) {
218597
+ const da = pa[i2] ?? 0;
218598
+ const db = pb[i2] ?? 0;
218599
+ if (da !== db) {
218600
+ return da < db ? -1 : 1;
218601
+ }
218602
+ }
218603
+ return 0;
218604
+ }
218605
+ function isUpgrade(current, latest) {
218606
+ if (!isComparable(current) || !isComparable(latest)) {
218607
+ return false;
218608
+ }
218609
+ return compareSemver(latest, current) > 0;
218610
+ }
218611
+
218612
+ // src/packages/jxsuite-update.ts
218613
+ async function checkJxsuiteUpdate() {
218614
+ const target = VERSION;
218615
+ if (!isComparable(target)) {
218616
+ return null;
218617
+ }
218618
+ const platform3 = getPlatform();
218619
+ let pkgs;
218620
+ try {
218621
+ pkgs = await platform3.listPackages();
218622
+ } catch {
218623
+ return null;
218624
+ }
218625
+ const outdated = [];
218626
+ for (const p of pkgs) {
218627
+ if (!p.name.startsWith(JXSUITE_PREFIX) || !isComparable(p.version)) {
218628
+ continue;
218629
+ }
218630
+ if (isUpgrade(p.version, target)) {
218631
+ outdated.push({ current: p.version, dev: Boolean(p.dev), name: p.name });
218632
+ }
218633
+ }
218634
+ return outdated.length > 0 ? { outdated, target } : null;
218635
+ }
218636
+ function dismissKey(root, target) {
218637
+ return `jx:jxsuite-update-dismissed:${root}:${target}`;
218638
+ }
218639
+ function isDismissed(root, target) {
218640
+ try {
218641
+ return localStorage.getItem(dismissKey(root, target)) === "1";
218642
+ } catch {
218643
+ return false;
218644
+ }
218645
+ }
218646
+ function setDismissed(root, target) {
218647
+ try {
218648
+ localStorage.setItem(dismissKey(root, target), "1");
218649
+ } catch {}
218650
+ }
218651
+ async function applyJxsuiteUpdate(outdated, target) {
218652
+ const platform3 = getPlatform();
218653
+ if (!platform3.setPackageVersions) {
218654
+ return;
218655
+ }
218656
+ const progress = showProgressModal({
218657
+ status: "Updating @jxsuite packages…",
218658
+ title: "Updating dependencies"
218659
+ });
218660
+ try {
218661
+ const result = await platform3.setPackageVersions(outdated.map((p) => ({ dev: p.dev, name: p.name, version: `^${target}` })));
218662
+ if (result.ok) {
218663
+ progress.done();
218664
+ statusMessage(`Updated ${outdated.length} @jxsuite package(s) to ${target}`);
218665
+ } else {
218666
+ progress.fail(result.log ?? "Update failed");
218667
+ }
218668
+ } catch (error) {
218669
+ progress.fail(error instanceof Error ? error.message : String(error));
218670
+ }
218671
+ }
218672
+ async function maybePromptJxsuiteUpdate(projectRoot) {
218673
+ const platform3 = getPlatform();
218674
+ if (!platform3.setPackageVersions) {
218675
+ return;
218676
+ }
218677
+ const check = await checkJxsuiteUpdate();
218678
+ if (!check || isDismissed(projectRoot, check.target)) {
218679
+ return;
218680
+ }
218681
+ const list2 = check.outdated.map((p) => `${p.name} ${p.current} → ^${check.target}`).join(`
218682
+ `);
218683
+ const confirmed = await showConfirmDialog("Update @jxsuite packages?", html3`This project uses older @jxsuite packages. Update them to match Studio ${check.target}?
218684
+ <br /><br /><span
218685
+ style="font-size:var(--spectrum-font-size-75, 12px);color:var(--fg-dim);white-space:pre-line"
218686
+ >${list2}</span
218687
+ >`, { cancelLabel: "Not now", confirmLabel: "Update" });
218688
+ if (!confirmed) {
218689
+ setDismissed(projectRoot, check.target);
218690
+ return;
218691
+ }
218692
+ await applyJxsuiteUpdate(check.outdated, check.target);
218693
+ }
218694
+ var JXSUITE_PREFIX = "@jxsuite/";
218695
+ var init_jxsuite_update = __esm(() => {
218696
+ init_lit_html();
218697
+ init_platform3();
218698
+ init_version();
218699
+ init_layers();
218700
+ init_progress_modal();
218701
+ init_statusbar();
218702
+ });
218703
+
218450
218704
  // src/files/fs-events.ts
218451
218705
  function markLocalMutation(...paths) {
218452
218706
  const expiry = Date.now() + RECENT_MS;
@@ -218605,9 +218859,11 @@ async function loadProject() {
218605
218859
  selectedPath: null
218606
218860
  });
218607
218861
  if (info.isSiteProject) {
218862
+ await ensureDependenciesInstalled();
218608
218863
  await loadDirectory(".");
218609
218864
  await loadComponentRegistry();
218610
218865
  await openHomePage();
218866
+ maybePromptJxsuiteUpdate(meta.root);
218611
218867
  }
218612
218868
  } catch {}
218613
218869
  }
@@ -218639,6 +218895,7 @@ async function openProject({
218639
218895
  searchQuery: "",
218640
218896
  selectedPath: null
218641
218897
  });
218898
+ await ensureDependenciesInstalled();
218642
218899
  await loadDirectory(".");
218643
218900
  await loadComponentRegistry();
218644
218901
  const conventionalDirs = new Set([
@@ -218666,6 +218923,7 @@ async function openProject({
218666
218923
  renderLeftPanel();
218667
218924
  statusMessage(`Opened project: ${requireProjectState().name}`);
218668
218925
  await openHomePage();
218926
+ maybePromptJxsuiteUpdate(requireProjectState().projectRoot);
218669
218927
  } catch (error) {
218670
218928
  statusMessage(`Error: ${errorMessage(error)}`);
218671
218929
  }
@@ -219314,12 +219572,6 @@ async function openFileInTab(path) {
219314
219572
  });
219315
219573
  requireProjectState().selectedPath = path;
219316
219574
  trackRecentFile({ name: path.split("/").pop() || path, path });
219317
- if (path === "project.json") {
219318
- const tab = activeTab.value;
219319
- if (tab) {
219320
- tab.session.ui.canvasMode = "stylebook";
219321
- }
219322
- }
219323
219575
  statusMessage(`Opened ${path.split("/").pop()}`);
219324
219576
  } catch (error) {
219325
219577
  statusMessage(`Error: ${errorMessage(error)}`);
@@ -219367,6 +219619,8 @@ var init_files2 = __esm(() => {
219367
219619
  init_platform3();
219368
219620
  init_statusbar();
219369
219621
  init_components();
219622
+ init_ensure_deps();
219623
+ init_jxsuite_update();
219370
219624
  init_fs_events();
219371
219625
  init_adapter();
219372
219626
  init_combine();
@@ -229543,14 +229797,16 @@ function renderGeneralSettings(container) {
229543
229797
  ${currentFavicon ? html3`<img
229544
229798
  src=${currentFavicon}
229545
229799
  alt="Current favicon"
229546
- style="width:32px;height:32px;object-fit:contain;border:1px solid var(--border);border-radius:4px;padding:2px"
229800
+ style="width:32px;height:32px;object-fit:contain;border:1px solid var(--border);border-radius:var(--radius);padding:2px"
229547
229801
  />` : html3`<div
229548
- style="width:32px;height:32px;border:1px dashed var(--border);border-radius:4px;display:flex;align-items:center;justify-content:center;color:var(--fg-dim);font-size:11px"
229802
+ style="width:32px;height:32px;border:1px dashed var(--border);border-radius:var(--radius);display:flex;align-items:center;justify-content:center;color:var(--fg-dim);font-size:var(--spectrum-font-size-50, 11px)"
229549
229803
  >
229550
229804
 
229551
229805
  </div>`}
229552
229806
  <sp-action-button size="s" @click=${onFaviconUpload}> Upload Favicon </sp-action-button>
229553
- ${currentFavicon ? html3`<span style="font-size:11px;color:var(--fg-dim)">${currentFavicon}</span>` : nothing}
229807
+ ${currentFavicon ? html3`<span style="font-size:var(--spectrum-font-size-50, 11px);color:var(--fg-dim)"
229808
+ >${currentFavicon}</span
229809
+ >` : nothing}
229554
229810
  </div>
229555
229811
  </div>
229556
229812
 
@@ -229631,6 +229887,219 @@ var init_general_settings = __esm(() => {
229631
229887
  init_files2();
229632
229888
  });
229633
229889
 
229890
+ // src/settings/dependencies-editor.ts
229891
+ function latestFor(p2) {
229892
+ if (p2.name.startsWith(JXSUITE_PREFIX2) && isComparable(VERSION) && isUpgrade(p2.version, VERSION)) {
229893
+ return VERSION;
229894
+ }
229895
+ const registry = _latest.get(p2.name);
229896
+ return registry && isUpgrade(p2.version, registry) ? registry : null;
229897
+ }
229898
+ async function load() {
229899
+ const platform4 = getPlatform();
229900
+ try {
229901
+ _packages = await platform4.listPackages();
229902
+ } catch {
229903
+ _packages = [];
229904
+ }
229905
+ _latest = new Map;
229906
+ if (platform4.outdatedPackages) {
229907
+ try {
229908
+ for (const o19 of await platform4.outdatedPackages()) {
229909
+ _latest.set(o19.name, o19.latest);
229910
+ }
229911
+ } catch {}
229912
+ }
229913
+ render5();
229914
+ }
229915
+ async function withBusy(fn) {
229916
+ if (_busy) {
229917
+ return;
229918
+ }
229919
+ _busy = true;
229920
+ render5();
229921
+ const progress = showProgressModal({ status: "Running bun…", title: "Updating dependencies" });
229922
+ try {
229923
+ await fn();
229924
+ progress.done();
229925
+ } catch (error) {
229926
+ progress.fail(error instanceof Error ? error.message : String(error));
229927
+ } finally {
229928
+ _busy = false;
229929
+ await load();
229930
+ }
229931
+ }
229932
+ async function onAdd() {
229933
+ const name = _addName.trim();
229934
+ if (!name) {
229935
+ return;
229936
+ }
229937
+ await withBusy(async () => {
229938
+ await getPlatform().addPackage(name);
229939
+ _addName = "";
229940
+ statusMessage(`Added ${name}`);
229941
+ });
229942
+ }
229943
+ async function onRemove(p2) {
229944
+ await withBusy(async () => {
229945
+ await getPlatform().removePackage(p2.name);
229946
+ statusMessage(`Removed ${p2.name}`);
229947
+ });
229948
+ }
229949
+ async function onUpdate(p2, latest) {
229950
+ const platform4 = getPlatform();
229951
+ if (!platform4.setPackageVersions) {
229952
+ return;
229953
+ }
229954
+ await withBusy(async () => {
229955
+ const target = stripRange(latest);
229956
+ const res = await platform4.setPackageVersions([
229957
+ { dev: Boolean(p2.dev), name: p2.name, version: `^${target}` }
229958
+ ]);
229959
+ if (!res.ok) {
229960
+ throw new Error(res.log ?? "Update failed");
229961
+ }
229962
+ statusMessage(`Updated ${p2.name} to ${target}`);
229963
+ });
229964
+ }
229965
+ async function onUpdateAll() {
229966
+ const platform4 = getPlatform();
229967
+ if (!platform4.setPackageVersions) {
229968
+ return;
229969
+ }
229970
+ const updates = (_packages ?? []).map((p2) => {
229971
+ const latest = latestFor(p2);
229972
+ return latest ? { dev: Boolean(p2.dev), name: p2.name, version: `^${stripRange(latest)}` } : null;
229973
+ }).filter((u) => u !== null);
229974
+ if (updates.length === 0) {
229975
+ return;
229976
+ }
229977
+ await withBusy(async () => {
229978
+ const res = await platform4.setPackageVersions(updates);
229979
+ if (!res.ok) {
229980
+ throw new Error(res.log ?? "Update failed");
229981
+ }
229982
+ statusMessage(`Updated ${updates.length} package(s)`);
229983
+ });
229984
+ }
229985
+ async function onReinstall() {
229986
+ const platform4 = getPlatform();
229987
+ if (!platform4.installDependencies) {
229988
+ return;
229989
+ }
229990
+ await withBusy(async () => {
229991
+ const res = await platform4.installDependencies();
229992
+ if (!res.ok) {
229993
+ throw new Error(res.log ?? "Install failed");
229994
+ }
229995
+ statusMessage("Dependencies reinstalled");
229996
+ });
229997
+ }
229998
+ function row(p2) {
229999
+ const latest = latestFor(p2);
230000
+ return html3`
230001
+ <sp-table-row>
230002
+ <sp-table-cell>
230003
+ ${p2.name}${p2.dev ? html3`<span style="color:var(--fg-dim);font-size:10px"> · dev</span>` : ""}
230004
+ </sp-table-cell>
230005
+ <sp-table-cell>${p2.version}</sp-table-cell>
230006
+ <sp-table-cell>${latest ?? "—"}</sp-table-cell>
230007
+ <sp-table-cell>
230008
+ ${latest ? html3`<sp-action-button
230009
+ size="s"
230010
+ quiet
230011
+ ?disabled=${_busy}
230012
+ title="Update to ${latest}"
230013
+ @click=${() => onUpdate(p2, latest)}
230014
+ >
230015
+ <sp-icon-refresh slot="icon"></sp-icon-refresh>
230016
+ </sp-action-button>` : ""}
230017
+ <sp-action-button
230018
+ size="s"
230019
+ quiet
230020
+ ?disabled=${_busy}
230021
+ title="Remove"
230022
+ @click=${() => onRemove(p2)}
230023
+ >
230024
+ <sp-icon-delete slot="icon"></sp-icon-delete>
230025
+ </sp-action-button>
230026
+ </sp-table-cell>
230027
+ </sp-table-row>
230028
+ `;
230029
+ }
230030
+ function render5() {
230031
+ if (!_container) {
230032
+ return;
230033
+ }
230034
+ const pkgs = _packages ?? [];
230035
+ const hasUpdates = pkgs.some((p2) => latestFor(p2) !== null);
230036
+ const tpl = html3`
230037
+ <div class="settings-section">
230038
+ <h3 class="settings-section-title">Dependencies</h3>
230039
+ <p class="settings-field-desc">Manage this project's npm dependencies.</p>
230040
+
230041
+ <div style="display:flex;gap:8px;margin-bottom:12px;align-items:center">
230042
+ <sp-textfield
230043
+ size="s"
230044
+ placeholder="package-name"
230045
+ .value=${_addName}
230046
+ ?disabled=${_busy}
230047
+ @input=${(e20) => {
230048
+ _addName = e20.target.value;
230049
+ }}
230050
+ ></sp-textfield>
230051
+ <sp-action-button size="s" ?disabled=${_busy} @click=${onAdd}>
230052
+ <sp-icon-add slot="icon"></sp-icon-add>
230053
+ Add
230054
+ </sp-action-button>
230055
+ <span style="flex:1"></span>
230056
+ ${hasUpdates ? html3`<sp-action-button size="s" ?disabled=${_busy} @click=${onUpdateAll}>
230057
+ Update all
230058
+ </sp-action-button>` : ""}
230059
+ <sp-action-button
230060
+ size="s"
230061
+ quiet
230062
+ ?disabled=${_busy}
230063
+ title="Reinstall (bun install)"
230064
+ @click=${onReinstall}
230065
+ >
230066
+ <sp-icon-refresh slot="icon"></sp-icon-refresh>
230067
+ Reinstall
230068
+ </sp-action-button>
230069
+ </div>
230070
+
230071
+ ${_packages === null ? html3`<p class="about-muted">Loading…</p>` : pkgs.length === 0 ? html3`<p class="about-muted">No dependencies.</p>` : html3`
230072
+ <sp-table size="s">
230073
+ <sp-table-head>
230074
+ <sp-table-head-cell>Package</sp-table-head-cell>
230075
+ <sp-table-head-cell>Current</sp-table-head-cell>
230076
+ <sp-table-head-cell>Latest</sp-table-head-cell>
230077
+ <sp-table-head-cell></sp-table-head-cell>
230078
+ </sp-table-head>
230079
+ <sp-table-body> ${pkgs.map((p2) => row(p2))} </sp-table-body>
230080
+ </sp-table>
230081
+ `}
230082
+ </div>
230083
+ `;
230084
+ render2(tpl, _container);
230085
+ }
230086
+ function renderDependenciesEditor(container) {
230087
+ _container = container;
230088
+ _packages = null;
230089
+ _addName = "";
230090
+ render5();
230091
+ load();
230092
+ }
230093
+ var JXSUITE_PREFIX2 = "@jxsuite/", _container = null, _packages = null, _latest, _busy = false, _addName = "";
230094
+ var init_dependencies_editor = __esm(() => {
230095
+ init_lit_html();
230096
+ init_platform3();
230097
+ init_version();
230098
+ init_statusbar();
230099
+ init_progress_modal();
230100
+ _latest = new Map;
230101
+ });
230102
+
229634
230103
  // src/settings/settings-modal.ts
229635
230104
  var exports_settings_modal = {};
229636
230105
  __export(exports_settings_modal, {
@@ -229731,6 +230200,10 @@ function renderActiveSection() {
229731
230200
  renderContentTypesEditor(_contentEl);
229732
230201
  break;
229733
230202
  }
230203
+ case "dependencies": {
230204
+ renderDependenciesEditor(_contentEl);
230205
+ break;
230206
+ }
229734
230207
  default: {
229735
230208
  break;
229736
230209
  }
@@ -229746,13 +230219,15 @@ var init_settings_modal = __esm(() => {
229746
230219
  init_css_vars_editor();
229747
230220
  init_head_editor();
229748
230221
  init_general_settings();
230222
+ init_dependencies_editor();
229749
230223
  init_layers();
229750
230224
  sections = [
229751
230225
  { icon: "sp-icon-properties", key: "general", label: "General" },
229752
230226
  { icon: "sp-icon-file-single-web-page", key: "head", label: "Head" },
229753
230227
  { icon: "sp-icon-brush", key: "cssVars", label: "CSS Variables" },
229754
230228
  { icon: "sp-icon-data", key: "definitions", label: "Definitions" },
229755
- { icon: "sp-icon-view-grid", key: "contentTypes", label: "Content Types" }
230229
+ { icon: "sp-icon-view-grid", key: "contentTypes", label: "Content Types" },
230230
+ { icon: "sp-icon-box", key: "dependencies", label: "Dependencies" }
229756
230231
  ];
229757
230232
  });
229758
230233
 
@@ -256208,7 +256683,7 @@ function renderCanvasNode(node, path, parent, activeBreakpoints, featureToggles)
256208
256683
  const keys = Object.keys(node.cases);
256209
256684
  const placeholder = document.createElement("div");
256210
256685
  placeholder.textContent = `[$switch: ${keys.join(" | ")}]`;
256211
- placeholder.style.cssText = "font-family:monospace;font-size:11px;padding:6px 10px;background:color-mix(in srgb, var(--danger) 8%, transparent);border:1px dashed color-mix(in srgb, var(--danger) 40%, transparent);border-radius:4px;color:var(--danger);font-style:italic";
256686
+ placeholder.style.cssText = "font-family:var(--font-mono);font-size:var(--spectrum-font-size-50,11px);padding:6px 10px;background:color-mix(in srgb, var(--danger) 8%, transparent);border:1px dashed color-mix(in srgb, var(--danger) 40%, transparent);border-radius:var(--radius);color:var(--danger);font-style:italic";
256212
256687
  el.append(placeholder);
256213
256688
  }
256214
256689
  el.style.pointerEvents = "none";
@@ -257019,7 +257494,7 @@ async function renderComponentPreview(comp) {
257019
257494
  }
257020
257495
  function _componentFallback(tagName) {
257021
257496
  const fallback2 = document.createElement("div");
257022
- fallback2.style.cssText = "padding:12px;border:1px dashed var(--border);border-radius:4px;color:var(--fg-dim)";
257497
+ fallback2.style.cssText = "padding:12px;border:1px dashed var(--border);border-radius:var(--radius);color:var(--fg-dim)";
257023
257498
  fallback2.textContent = `<${tagName}>`;
257024
257499
  return fallback2;
257025
257500
  }
@@ -260793,6 +261268,39 @@ function createDevServerPlatform() {
260793
261268
  }
260794
261269
  return await res.json();
260795
261270
  },
261271
+ async installDependencies() {
261272
+ const res = await fetch("/__studio/packages/install", { method: "POST" });
261273
+ if (!res.ok) {
261274
+ return { log: await res.text(), ok: false };
261275
+ }
261276
+ return await res.json();
261277
+ },
261278
+ async dependenciesNeedInstall() {
261279
+ const res = await fetch("/__studio/packages/needs-install");
261280
+ if (!res.ok) {
261281
+ return false;
261282
+ }
261283
+ const data = await res.json();
261284
+ return Boolean(data.needsInstall);
261285
+ },
261286
+ async outdatedPackages() {
261287
+ const res = await fetch("/__studio/packages/outdated");
261288
+ if (!res.ok) {
261289
+ return [];
261290
+ }
261291
+ return await res.json();
261292
+ },
261293
+ async setPackageVersions(updates) {
261294
+ const res = await fetch("/__studio/packages/set-versions", {
261295
+ body: JSON.stringify({ updates }),
261296
+ headers: { "Content-Type": "application/json" },
261297
+ method: "POST"
261298
+ });
261299
+ if (!res.ok) {
261300
+ return { log: await res.text(), ok: false };
261301
+ }
261302
+ return await res.json();
261303
+ },
260796
261304
  async codeService(action, payload) {
260797
261305
  try {
260798
261306
  const res = await fetch(`/__studio/code/${action}`, {
@@ -261160,6 +261668,8 @@ async function startResize(e, edge, wc) {
261160
261668
  init_code_services();
261161
261669
  init_signals_panel();
261162
261670
  init_components();
261671
+ init_ensure_deps();
261672
+ init_jxsuite_update();
261163
261673
  init_lit_html();
261164
261674
  // data/webdata.json
261165
261675
  var webdata_default = {
@@ -269670,10 +270180,10 @@ function parseFunction(str) {
269670
270180
  const isNumberRegex = /^-?[\d.]+$/;
269671
270181
  const unitValueRegex = /%|deg|g?rad|turn$/;
269672
270182
  const singleArgument = /\/?\s*(none|[-\w.]+(?:%|deg|g?rad|turn)?)/g;
269673
- let parts = str.match(isFunctionRegex);
269674
- if (parts) {
270183
+ let parts2 = str.match(isFunctionRegex);
270184
+ if (parts2) {
269675
270185
  let args = [];
269676
- parts[2].replace(singleArgument, ($0, rawArg) => {
270186
+ parts2[2].replace(singleArgument, ($0, rawArg) => {
269677
270187
  let match2 = rawArg.match(unitValueRegex);
269678
270188
  let arg = rawArg;
269679
270189
  if (match2) {
@@ -269704,9 +270214,9 @@ function parseFunction(str) {
269704
270214
  args.push(arg);
269705
270215
  });
269706
270216
  return {
269707
- name: parts[1].toLowerCase(),
269708
- rawName: parts[1],
269709
- rawArgs: parts[2],
270217
+ name: parts2[1].toLowerCase(),
270218
+ rawName: parts2[1],
270219
+ rawArgs: parts2[2],
269710
270220
  args
269711
270221
  };
269712
270222
  }
@@ -275340,8 +275850,8 @@ class NumberField extends TextfieldBase {
275340
275850
  const separators = this.valueBeforeFocus.split("").filter((char) => this.decimalsChars.has(char));
275341
275851
  const uniqueSeparators = new Set(separators);
275342
275852
  if (isIOS2() && this.inputElement.inputMode === "decimal" && normalizedValue !== this.valueBeforeFocus) {
275343
- const parts = this.numberFormatter.formatToParts(1000.1);
275344
- const replacementDecimal = parts.find((part) => part.type === "decimal").value;
275853
+ const parts2 = this.numberFormatter.formatToParts(1000.1);
275854
+ const replacementDecimal = parts2.find((part) => part.type === "decimal").value;
275345
275855
  for (const separator2 of uniqueSeparators) {
275346
275856
  const isDecimalSeparator = separator2 === replacementDecimal;
275347
275857
  if (!isDecimalSeparator && !this.isIntentDecimal) {
@@ -280602,6 +281112,9 @@ __decorateClass54([
280602
281112
  property({ type: String, attribute: "icon-label" })
280603
281113
  ], Toast.prototype, "iconLabel", 2);
280604
281114
 
281115
+ // src/ui/spectrum.ts
281116
+ init_ProgressCircle_dev();
281117
+
280605
281118
  // ../../node_modules/@lit-labs/virtualizer/events.js
280606
281119
  class RangeChangedEvent extends Event {
280607
281120
  constructor(range3) {
@@ -286310,6 +286823,7 @@ var components = [
286310
286823
  ["sp-accordion-item", AccordionItem],
286311
286824
  ["sp-action-bar", ActionBar2],
286312
286825
  ["sp-toast", Toast],
286826
+ ["sp-progress-circle", ProgressCircle],
286313
286827
  ["sp-table", Table2],
286314
286828
  ["sp-table-head", TableHead],
286315
286829
  ["sp-table-head-cell", TableHeadCell],
@@ -286347,6 +286861,7 @@ var components = [
286347
286861
  ["sp-icon-brush", IconBrush],
286348
286862
  ["sp-icon-gears", IconGears],
286349
286863
  ["sp-icon-settings", IconSettings],
286864
+ ["sp-icon-info", IconInfo],
286350
286865
  ["sp-icon-back", IconBack],
286351
286866
  ["sp-icon-properties", IconProperties],
286352
286867
  ["sp-icon-event", IconEvent],
@@ -286601,9 +287116,9 @@ function fileIcon(name) {
286601
287116
  return html3`<sp-icon-document size="s"></sp-icon-document>`;
286602
287117
  }
286603
287118
  function dirPart(path) {
286604
- const parts = path.split("/");
286605
- parts.pop();
286606
- return parts.length > 0 ? parts.join("/") : "";
287119
+ const parts2 = path.split("/");
287120
+ parts2.pop();
287121
+ return parts2.length > 0 ? parts2.join("/") : "";
286607
287122
  }
286608
287123
  function renderOverlay() {
286609
287124
  const container = getContainer();
@@ -286956,6 +287471,140 @@ init_reactivity();
286956
287471
  init_workspace2();
286957
287472
  init_view3();
286958
287473
  init_settings_modal();
287474
+
287475
+ // src/about/about-modal.ts
287476
+ init_lit_html();
287477
+ init_layers();
287478
+ init_platform3();
287479
+ init_version();
287480
+ var _handle2 = null;
287481
+ var _packages2 = null;
287482
+ var _appInfo = null;
287483
+ function openAboutModal() {
287484
+ if (_handle2) {
287485
+ return;
287486
+ }
287487
+ _packages2 = null;
287488
+ _appInfo = null;
287489
+ renderModal2();
287490
+ loadDetails();
287491
+ }
287492
+ function closeAboutModal() {
287493
+ if (!_handle2) {
287494
+ return;
287495
+ }
287496
+ _handle2.close();
287497
+ _handle2 = null;
287498
+ _packages2 = null;
287499
+ _appInfo = null;
287500
+ }
287501
+ async function loadDetails() {
287502
+ const platform4 = getPlatform();
287503
+ try {
287504
+ _packages2 = await platform4.listPackages();
287505
+ } catch {
287506
+ _packages2 = [];
287507
+ }
287508
+ if (platform4.getAppInfo) {
287509
+ try {
287510
+ _appInfo = await platform4.getAppInfo();
287511
+ } catch {
287512
+ _appInfo = null;
287513
+ }
287514
+ }
287515
+ if (_handle2) {
287516
+ renderModal2();
287517
+ }
287518
+ }
287519
+ function formatBuildDate(iso) {
287520
+ if (!iso) {
287521
+ return "—";
287522
+ }
287523
+ const date = new Date(iso);
287524
+ return Number.isNaN(date.getTime()) ? iso : date.toLocaleString();
287525
+ }
287526
+ function metaRows() {
287527
+ const rows = [
287528
+ ["Version", VERSION],
287529
+ ["Build date", formatBuildDate(BUILD_DATE)],
287530
+ ["Commit", GIT_COMMIT]
287531
+ ];
287532
+ if (_appInfo) {
287533
+ rows.push(["Channel", _appInfo.channel]);
287534
+ if (_appInfo.updateStatus) {
287535
+ rows.push(["Updates", _appInfo.updateStatus]);
287536
+ }
287537
+ }
287538
+ return rows;
287539
+ }
287540
+ function renderPackages() {
287541
+ if (_packages2 === null) {
287542
+ return html3`<p class="about-muted">Loading packages…</p>`;
287543
+ }
287544
+ if (_packages2.length === 0) {
287545
+ return html3`<p class="about-muted">No packages reported.</p>`;
287546
+ }
287547
+ return html3`
287548
+ <ul class="about-packages">
287549
+ ${_packages2.map((p2) => html3`
287550
+ <li class="about-package-row">
287551
+ <span class="about-package-name">${p2.name}</span>
287552
+ <span class="about-package-version">${p2.version}</span>
287553
+ </li>
287554
+ `)}
287555
+ </ul>
287556
+ `;
287557
+ }
287558
+ function renderModal2() {
287559
+ const tpl = html3`
287560
+ <sp-underlay open @close=${closeAboutModal}></sp-underlay>
287561
+ <div
287562
+ class="about-modal"
287563
+ role="dialog"
287564
+ aria-label="About ${APP_NAME}"
287565
+ @keydown=${(e20) => {
287566
+ if (e20.key === "Escape") {
287567
+ closeAboutModal();
287568
+ }
287569
+ }}
287570
+ >
287571
+ <div class="settings-modal-header">
287572
+ <h2 class="settings-modal-title">About ${APP_NAME}</h2>
287573
+ <sp-action-button quiet size="s" @click=${closeAboutModal} title="Close">
287574
+ <sp-icon-close slot="icon"></sp-icon-close>
287575
+ </sp-action-button>
287576
+ </div>
287577
+ <div class="about-modal-body">
287578
+ <dl class="about-meta">
287579
+ ${metaRows().map(([label, value]) => html3`
287580
+ <div class="about-meta-row">
287581
+ <dt class="about-meta-label">${label}</dt>
287582
+ <dd class="about-meta-value">${value}</dd>
287583
+ </div>
287584
+ `)}
287585
+ </dl>
287586
+
287587
+ <div class="about-links">
287588
+ <a href=${LINKS.github} target="_blank" rel="noreferrer noopener">GitHub</a>
287589
+ <a href=${LINKS.docs} target="_blank" rel="noreferrer noopener">Documentation</a>
287590
+ <a href=${LINKS.license} target="_blank" rel="noreferrer noopener">License</a>
287591
+ </div>
287592
+
287593
+ <section class="about-section">
287594
+ <h3 class="about-section-title">Packages</h3>
287595
+ ${renderPackages()}
287596
+ </section>
287597
+ </div>
287598
+ </div>
287599
+ `;
287600
+ if (_handle2) {
287601
+ _handle2.update(tpl);
287602
+ } else {
287603
+ _handle2 = openModal(tpl);
287604
+ }
287605
+ }
287606
+
287607
+ // src/panels/activity-bar.ts
286959
287608
  init_git_panel();
286960
287609
  var _scope3 = null;
286961
287610
  function mount4() {
@@ -287052,7 +287701,18 @@ function renderActivityBar() {
287052
287701
  </sp-tab>
287053
287702
  `)}
287054
287703
  </sp-tabs>
287055
- <div style="margin-top:auto;padding:8px 0;display:flex;justify-content:center">
287704
+ <div
287705
+ style="margin-top:auto;padding:8px 0;display:flex;flex-direction:column;align-items:center;gap:4px"
287706
+ >
287707
+ <sp-action-button
287708
+ quiet
287709
+ size="m"
287710
+ title="About"
287711
+ aria-label="About"
287712
+ @click=${() => openAboutModal()}
287713
+ >
287714
+ <sp-icon-info slot="icon"></sp-icon-info>
287715
+ </sp-action-button>
287056
287716
  <sp-action-button
287057
287717
  quiet
287058
287718
  size="m"
@@ -287284,7 +287944,7 @@ function getContentTypeTypes() {
287284
287944
  };
287285
287945
  });
287286
287946
  }
287287
- async function handleNewEntity(typeKey, _container, ctx) {
287947
+ async function handleNewEntity(typeKey, _container2, ctx) {
287288
287948
  const isContentType = typeKey.startsWith("contentType:");
287289
287949
  const contentTypeName = isContentType ? typeKey.slice("contentType:".length) : null;
287290
287950
  await loadFormats();
@@ -287753,10 +288413,10 @@ function invalidateBrowseCache() {
287753
288413
  // src/browse/browse-modal.ts
287754
288414
  init_files2();
287755
288415
  init_layers();
287756
- var _handle2 = null;
288416
+ var _handle3 = null;
287757
288417
  var _escHandler = null;
287758
288418
  function openBrowseModal() {
287759
- if (_handle2) {
288419
+ if (_handle3) {
287760
288420
  return;
287761
288421
  }
287762
288422
  _escHandler = (e20) => {
@@ -287791,18 +288451,18 @@ function openBrowseModal() {
287791
288451
  ></div>
287792
288452
  </div>
287793
288453
  `;
287794
- _handle2 = openModal(tpl);
288454
+ _handle3 = openModal(tpl);
287795
288455
  }
287796
288456
  function closeBrowseModal() {
287797
- if (!_handle2) {
288457
+ if (!_handle3) {
287798
288458
  return;
287799
288459
  }
287800
288460
  if (_escHandler) {
287801
288461
  document.removeEventListener("keydown", _escHandler, true);
287802
288462
  _escHandler = null;
287803
288463
  }
287804
- _handle2.close();
287805
- _handle2 = null;
288464
+ _handle3.close();
288465
+ _handle3 = null;
287806
288466
  }
287807
288467
 
287808
288468
  // src/new-project/new-project-modal.ts
@@ -287810,7 +288470,7 @@ init_lit_html();
287810
288470
  init_parse();
287811
288471
  init_layers();
287812
288472
  init_platform3();
287813
- var _handle3 = null;
288473
+ var _handle4 = null;
287814
288474
  var _form = {
287815
288475
  adapter: "static",
287816
288476
  description: "",
@@ -287822,7 +288482,7 @@ var _error = "";
287822
288482
  var _creating = false;
287823
288483
  var _resolve = null;
287824
288484
  function openNewProjectModal() {
287825
- if (_handle3) {
288485
+ if (_handle4) {
287826
288486
  return Promise.resolve(null);
287827
288487
  }
287828
288488
  _form = {
@@ -287836,21 +288496,21 @@ function openNewProjectModal() {
287836
288496
  _creating = false;
287837
288497
  return new Promise((resolve4) => {
287838
288498
  _resolve = resolve4;
287839
- renderModal2();
288499
+ renderModal3();
287840
288500
  });
287841
288501
  }
287842
288502
  function closeNewProjectModal() {
287843
- if (!_handle3) {
288503
+ if (!_handle4) {
287844
288504
  return;
287845
288505
  }
287846
- _handle3.close();
287847
- _handle3 = null;
288506
+ _handle4.close();
288507
+ _handle4 = null;
287848
288508
  if (_resolve) {
287849
288509
  _resolve(null);
287850
288510
  _resolve = null;
287851
288511
  }
287852
288512
  }
287853
- function renderModal2() {
288513
+ function renderModal3() {
287854
288514
  const onInput2 = (field) => (e20) => {
287855
288515
  _form[field] = e20.target.value;
287856
288516
  if (field === "name" && !_form.directory) {
@@ -287862,16 +288522,16 @@ function renderModal2() {
287862
288522
  if (field === "directory") {
287863
288523
  _dirDerived = false;
287864
288524
  }
287865
- renderModal2();
288525
+ renderModal3();
287866
288526
  };
287867
288527
  const onAdapterChange = (e20) => {
287868
288528
  _form.adapter = e20.target.value;
287869
- renderModal2();
288529
+ renderModal3();
287870
288530
  };
287871
288531
  const onSubmit = async () => {
287872
288532
  if (!_form.name.trim()) {
287873
288533
  _error = "Project name is required";
287874
- renderModal2();
288534
+ renderModal3();
287875
288535
  return;
287876
288536
  }
287877
288537
  if (!_form.directory.trim()) {
@@ -287879,14 +288539,14 @@ function renderModal2() {
287879
288539
  }
287880
288540
  _creating = true;
287881
288541
  _error = "";
287882
- renderModal2();
288542
+ renderModal3();
287883
288543
  try {
287884
288544
  const platform4 = getPlatform();
287885
288545
  const result = await platform4.createProject(_form);
287886
288546
  _creating = false;
287887
- if (_handle3) {
287888
- _handle3.close();
287889
- _handle3 = null;
288547
+ if (_handle4) {
288548
+ _handle4.close();
288549
+ _handle4 = null;
287890
288550
  }
287891
288551
  if (_resolve) {
287892
288552
  _resolve(result);
@@ -287895,7 +288555,7 @@ function renderModal2() {
287895
288555
  } catch (error) {
287896
288556
  _creating = false;
287897
288557
  _error = errorMessage(error);
287898
- renderModal2();
288558
+ renderModal3();
287899
288559
  }
287900
288560
  };
287901
288561
  const tpl = html3`
@@ -287975,10 +288635,10 @@ function renderModal2() {
287975
288635
  </div>
287976
288636
  </div>
287977
288637
  `;
287978
- if (!_handle3) {
287979
- _handle3 = openModal(tpl);
288638
+ if (!_handle4) {
288639
+ _handle4 = openModal(tpl);
287980
288640
  } else {
287981
- _handle3.update(tpl);
288641
+ _handle4.update(tpl);
287982
288642
  }
287983
288643
  }
287984
288644
  var _dirDerived = true;
@@ -288033,11 +288693,11 @@ function mount5(rootEl, ctx) {
288033
288693
  tab.history.index;
288034
288694
  tab.history.snapshots.length;
288035
288695
  }
288036
- render5();
288696
+ render6();
288037
288697
  });
288038
288698
  });
288039
288699
  }
288040
- function render5() {
288700
+ function render6() {
288041
288701
  if (!_rootEl || !_ctx12) {
288042
288702
  return;
288043
288703
  }
@@ -288146,7 +288806,7 @@ function minimalToolbarTemplate(ctx) {
288146
288806
  @click=${() => {
288147
288807
  view.rightPanelCollapsed = !view.rightPanelCollapsed;
288148
288808
  applyPanelCollapse();
288149
- render5();
288809
+ render6();
288150
288810
  }}
288151
288811
  >
288152
288812
  ${view.rightPanelCollapsed ? html3`<sp-icon-rail-right-open slot="icon"></sp-icon-rail-right-open>` : html3`<sp-icon-rail-right-close slot="icon"></sp-icon-rail-right-close>`}
@@ -288349,7 +289009,7 @@ function toolbarTemplate() {
288349
289009
  @click=${() => {
288350
289010
  view.rightPanelCollapsed = !view.rightPanelCollapsed;
288351
289011
  applyPanelCollapse();
288352
- render5();
289012
+ render6();
288353
289013
  }}
288354
289014
  >
288355
289015
  ${view.rightPanelCollapsed ? html3`<sp-icon-rail-right-open slot="icon"></sp-icon-rail-right-open>` : html3`<sp-icon-rail-right-close slot="icon"></sp-icon-rail-right-close>`}
@@ -288381,7 +289041,7 @@ function isTextInput(el) {
288381
289041
  return false;
288382
289042
  }
288383
289043
  function createPanelScheduler(opts) {
288384
- const { root: root2, render: render6, blockWhile } = opts;
289044
+ const { root: root2, render: render7, blockWhile } = opts;
288385
289045
  let editing = false;
288386
289046
  let scheduled = false;
288387
289047
  let pending = false;
@@ -288401,7 +289061,7 @@ function createPanelScheduler(opts) {
288401
289061
  pending = false;
288402
289062
  rendering = true;
288403
289063
  try {
288404
- render6();
289064
+ render7();
288405
289065
  } finally {
288406
289066
  rendering = false;
288407
289067
  }
@@ -290283,20 +290943,20 @@ function expandShorthand(shortVal, count) {
290283
290943
  if (!shortVal) {
290284
290944
  return Array.from({ length: count }, () => "");
290285
290945
  }
290286
- const parts = shortVal.trim().split(/\s+/);
290287
- if (count !== 4 || parts.length === 0) {
290946
+ const parts2 = shortVal.trim().split(/\s+/);
290947
+ if (count !== 4 || parts2.length === 0) {
290288
290948
  return Array.from({ length: count }, () => "");
290289
290949
  }
290290
- if (parts.length === 1) {
290291
- return [parts[0], parts[0], parts[0], parts[0]];
290950
+ if (parts2.length === 1) {
290951
+ return [parts2[0], parts2[0], parts2[0], parts2[0]];
290292
290952
  }
290293
- if (parts.length === 2) {
290294
- return [parts[0], parts[1], parts[0], parts[1]];
290953
+ if (parts2.length === 2) {
290954
+ return [parts2[0], parts2[1], parts2[0], parts2[1]];
290295
290955
  }
290296
- if (parts.length === 3) {
290297
- return [parts[0], parts[1], parts[2], parts[1]];
290956
+ if (parts2.length === 3) {
290957
+ return [parts2[0], parts2[1], parts2[2], parts2[1]];
290298
290958
  }
290299
- return [parts[0], parts[1], parts[2], parts[3]];
290959
+ return [parts2[0], parts2[1], parts2[2], parts2[3]];
290300
290960
  }
290301
290961
  function compressShorthand(vals) {
290302
290962
  const [t15, r8, b2, l] = vals;
@@ -291346,7 +292006,7 @@ function styleSidebarTemplate(node, activeMediaTab, activeSelector, effectiveSty
291346
292006
  ${nestedRules.map((rule) => html3`
291347
292007
  <div style="display:flex;align-items:center;gap:4px">
291348
292008
  <button
291349
- style="flex:1;text-align:left;padding:6px 10px;background:var(--spectrum-gray-200, #1a1a1a);border:none;border-radius:4px;color:var(--spectrum-gray-900, #fafafa);font-size:12px;cursor:pointer"
292009
+ style="flex:1;text-align:left;padding:6px 10px;background:var(--spectrum-gray-200, #1a1a1a);border:none;border-radius:var(--radius);color:var(--spectrum-gray-900, #fafafa);font-size:var(--spectrum-font-size-75, 12px);cursor:pointer"
291350
292010
  @click=${() => {
291351
292011
  const newSelector = activeSelector ? `${activeSelector} ${rule}` : rule;
291352
292012
  selectStylebookTag(newSelector, undefined, {
@@ -291362,7 +292022,7 @@ function styleSidebarTemplate(node, activeMediaTab, activeSelector, effectiveSty
291362
292022
  </div>
291363
292023
  `)}
291364
292024
  <button
291365
- style="padding:6px 10px;background:none;border:1px dashed var(--spectrum-gray-400, #333);border-radius:4px;color:var(--spectrum-gray-700, #a1a1aa);font-size:12px;cursor:pointer"
292025
+ style="padding:6px 10px;background:none;border:1px dashed var(--spectrum-gray-400, #333);border-radius:var(--radius);color:var(--spectrum-gray-700, #a1a1aa);font-size:var(--spectrum-font-size-75, 12px);cursor:pointer"
291366
292026
  @click=${() => {
291367
292027
  const name = prompt("Selector name (e.g. th, :hover, .active):");
291368
292028
  if (name && name.trim()) {
@@ -291949,7 +292609,7 @@ function renderSwitchFieldsTemplate(node, path, mapSignals) {
291949
292609
  return html3`
291950
292610
  ${bindableFieldRow("Expression", "text", node.$switch, (v) => transactDoc(activeTab.value, (t15) => mutateUpdateProperty(t15, path, "$switch", v)), null, mapSignals)}
291951
292611
  <div
291952
- style="font-size:11px;font-weight:600;color:var(--fg-dim);margin:8px 0 4px;text-transform:uppercase;letter-spacing:0.05em"
292612
+ style="font-size:var(--spectrum-font-size-50, 11px);font-weight:600;color:var(--fg-dim);margin:8px 0 4px;text-transform:uppercase;letter-spacing:0.05em"
291953
292613
  >
291954
292614
  Cases
291955
292615
  </div>
@@ -291981,7 +292641,7 @@ function renderSwitchFieldsTemplate(node, path, mapSignals) {
291981
292641
  >→</span
291982
292642
  >
291983
292643
  <span
291984
- style="cursor:pointer;color:var(--danger);font-size:11px"
292644
+ style="cursor:pointer;color:var(--danger);font-size:var(--spectrum-font-size-50, 11px)"
291985
292645
  @click=${(e20) => {
291986
292646
  e20.stopPropagation();
291987
292647
  transactDoc(activeTab.value, (t15) => mutateRemoveSwitchCase(t15, path, caseName));
@@ -292194,7 +292854,7 @@ function renderMediaFieldsTemplate(node) {
292194
292854
  }}
292195
292855
  />
292196
292856
  <span
292197
- style="font-size:10px;color:var(--fg-dim);font-family:'SF Mono','Fira Code',monospace;white-space:nowrap"
292857
+ style="font-size:10px;color:var(--fg-dim);font-family:var(--font-mono);white-space:nowrap"
292198
292858
  >${view.addBreakpointPreview}</span
292199
292859
  >
292200
292860
  </div>
@@ -292245,7 +292905,7 @@ function mediaBreakpointRowTemplate(name, query3) {
292245
292905
  <input
292246
292906
  class="field-input"
292247
292907
  .value=${live(mediaDisplayName(name))}
292248
- style="flex:1;font-weight:600;font-size:12px"
292908
+ style="flex:1;font-weight:600;font-size:var(--spectrum-font-size-75, 12px)"
292249
292909
  @input=${(e20) => {
292250
292910
  const newKey = friendlyNameToMedia(e20.target.value);
292251
292911
  currentRawLabel = newKey || "";
@@ -292267,7 +292927,7 @@ function mediaBreakpointRowTemplate(name, query3) {
292267
292927
  />
292268
292928
  <span
292269
292929
  class="bp-raw-label"
292270
- style="font-size:10px;color:var(--fg-dim);font-family:'SF Mono','Fira Code',monospace;white-space:nowrap"
292930
+ style="font-size:10px;color:var(--fg-dim);font-family:var(--font-mono);white-space:nowrap"
292271
292931
  >${name}</span
292272
292932
  >
292273
292933
  <span
@@ -292383,13 +293043,17 @@ function renderLayoutSelectionPanel(ctx) {
292383
293043
  style="font-size:9px;padding:2px 6px;background:var(--spectrum-purple-600);color:white;border-radius:3px;text-transform:uppercase;letter-spacing:0.5px"
292384
293044
  >Layout</span
292385
293045
  >
292386
- <code style="font-size:12px;font-family:monospace">&lt;${tagName}&gt;</code>
293046
+ <code
293047
+ style="font-size:var(--spectrum-font-size-75, 12px);font-family:var(--font-mono)"
293048
+ >&lt;${tagName}&gt;</code
293049
+ >
292387
293050
  </div>
292388
293051
  ${className2 ? html3`<div class="style-row">
292389
293052
  <div class="style-row-label">
292390
293053
  <sp-field-label size="s">Class</sp-field-label>
292391
293054
  </div>
292392
- <span style="font-size:11px;color:var(--fg-dim);word-break:break-all"
293055
+ <span
293056
+ style="font-size:var(--spectrum-font-size-50, 11px);color:var(--fg-dim);word-break:break-all"
292393
293057
  >${className2}</span
292394
293058
  >
292395
293059
  </div>` : nothing}
@@ -292623,9 +293287,9 @@ function renderPropertiesPanelTemplate(ctx) {
292623
293287
  const def3 = d3;
292624
293288
  return html3`
292625
293289
  <div
292626
- style="display:flex;gap:6px;align-items:center;padding:2px 0;font-size:11px"
293290
+ style="display:flex;gap:6px;align-items:center;padding:2px 0;font-size:var(--spectrum-font-size-50, 11px)"
292627
293291
  >
292628
- <code style="font-family:monospace;color:var(--accent)"
293292
+ <code style="font-family:var(--font-mono);color:var(--accent)"
292629
293293
  >${def3.attribute}</code
292630
293294
  >
292631
293295
  <span style="color:var(--fg-dim)"> → </span>
@@ -292634,7 +293298,7 @@ function renderPropertiesPanelTemplate(ctx) {
292634
293298
  >${def3.type}</span
292635
293299
  >` : nothing}
292636
293300
  ${def3.reflects ? html3`<span
292637
- style="font-size:9px;background:var(--bg-hover);padding:1px 4px;border-radius:3px"
293301
+ style="font-size:9px;background:var(--hover-bg);padding:1px 4px;border-radius:var(--radius)"
292638
293302
  >reflects</span
292639
293303
  >` : nothing}
292640
293304
  </div>
@@ -292703,9 +293367,9 @@ function renderPropertiesPanelTemplate(ctx) {
292703
293367
  <div class="style-section-body">
292704
293368
  ${cssProps.map(([prop, val]) => html3`
292705
293369
  <div
292706
- style="display:flex;gap:6px;align-items:center;padding:2px 0;font-size:11px"
293370
+ style="display:flex;gap:6px;align-items:center;padding:2px 0;font-size:var(--spectrum-font-size-50, 11px)"
292707
293371
  >
292708
- <code style="font-family:monospace;color:var(--accent)">${prop}</code>
293372
+ <code style="font-family:var(--font-mono);color:var(--accent)">${prop}</code>
292709
293373
  <span style="margin-left:auto;color:var(--fg-dim)">${String(val)}</span>
292710
293374
  </div>
292711
293375
  `)}
@@ -292714,8 +293378,8 @@ function renderPropertiesPanelTemplate(ctx) {
292714
293378
  `;
292715
293379
  })() : nothing;
292716
293380
  const cssPartsT = isCustomElementDoc({ document: tab.doc.document }) && isRoot ? (() => {
292717
- const parts = collectCssParts(tab.doc.document);
292718
- if (parts.length === 0) {
293381
+ const parts2 = collectCssParts(tab.doc.document);
293382
+ if (parts2.length === 0) {
292719
293383
  return nothing;
292720
293384
  }
292721
293385
  return html3`
@@ -292725,11 +293389,13 @@ function renderPropertiesPanelTemplate(ctx) {
292725
293389
  @sp-accordion-item-toggle=${() => toggleSection("__cssparts")}
292726
293390
  >
292727
293391
  <div class="style-section-body">
292728
- ${parts.map((p2) => html3`
293392
+ ${parts2.map((p2) => html3`
292729
293393
  <div
292730
- style="display:flex;gap:6px;align-items:center;padding:2px 0;font-size:11px"
293394
+ style="display:flex;gap:6px;align-items:center;padding:2px 0;font-size:var(--spectrum-font-size-50, 11px)"
292731
293395
  >
292732
- <code style="font-family:monospace;color:var(--accent)">${p2.name}</code>
293396
+ <code style="font-family:var(--font-mono);color:var(--accent)"
293397
+ >${p2.name}</code
293398
+ >
292733
293399
  <span style="color:var(--fg-dim)">&lt;${p2.tag}&gt;</span>
292734
293400
  </div>
292735
293401
  `)}
@@ -293469,9 +294135,9 @@ function mountAiPanel() {
293469
294135
  }
293470
294136
  var _g = globalThis;
293471
294137
  function rerenderPanel() {
293472
- const { render: render6 } = _g.__jxRightPanelRender || {};
293473
- if (render6) {
293474
- render6();
294138
+ const { render: render7 } = _g.__jxRightPanelRender || {};
294139
+ if (render7) {
294140
+ render7();
293475
294141
  }
293476
294142
  requestAnimationFrame(() => mountQuikChat());
293477
294143
  }
@@ -293757,7 +294423,9 @@ function renderAiPanelTemplate() {
293757
294423
  <div class="ai-status-center">
293758
294424
  <sp-icon-artboard style="font-size:32px"></sp-icon-artboard>
293759
294425
  <div>Claude authentication required</div>
293760
- <div style="font-size:11px;color:var(--spectrum-global-color-gray-600)">
294426
+ <div
294427
+ style="font-size:var(--spectrum-font-size-50, 11px);color:var(--spectrum-gray-600, #808080)"
294428
+ >
293761
294429
  Run the following in your terminal:
293762
294430
  </div>
293763
294431
  <code class="ai-code-snippet">npx @anthropic-ai/claude-code login</code>
@@ -293793,7 +294461,7 @@ var _scheduler = null;
293793
294461
  function mount6(ctx) {
293794
294462
  _ctx13 = ctx;
293795
294463
  mountAiPanel();
293796
- registerRightPanelRender(render6);
294464
+ registerRightPanelRender(render7);
293797
294465
  _scheduler = createPanelScheduler({
293798
294466
  blockWhile: isColorPopoverOpen,
293799
294467
  render: _doRender,
@@ -293817,11 +294485,11 @@ function mount6(ctx) {
293817
294485
  tab.session.ui.styleFilter;
293818
294486
  tab.session.ui.styleFilterActive;
293819
294487
  tab.session.ui.inspectorSections;
293820
- render6();
294488
+ render7();
293821
294489
  });
293822
294490
  });
293823
294491
  }
293824
- function render6() {
294492
+ function render7() {
293825
294493
  _scheduler?.schedule();
293826
294494
  }
293827
294495
  var _propsContainer = null;
@@ -293875,7 +294543,7 @@ function _doRender() {
293875
294543
  const sel = e21.target.selected;
293876
294544
  if (sel && sel !== tab) {
293877
294545
  updateUi("rightTab", sel);
293878
- render6();
294546
+ render7();
293879
294547
  }
293880
294548
  }}
293881
294549
  >
@@ -294010,18 +294678,18 @@ function renderStylebookLayersTemplate(ctx) {
294010
294678
  const style2 = rootStyle;
294011
294679
  const vars = Object.entries(style2).filter(([k2]) => k2.startsWith("--"));
294012
294680
  if (vars.length === 0) {
294013
- return html3`<div style="padding:16px;text-align:center;color:var(--fg-dim);font-size:12px">
294681
+ return html3`<div
294682
+ style="padding:16px;text-align:center;color:var(--fg-dim);font-size:var(--spectrum-font-size-75, 12px)"
294683
+ >
294014
294684
  No variables defined
294015
294685
  </div>`;
294016
294686
  }
294017
294687
  return html3`${vars.map(([k2, v2]) => html3`
294018
294688
  <div class="layer-row">
294019
- <span class="layer-tag" style="font-size:10px;font-family:'SF Mono','Fira Code',monospace"
294020
- >var</span
294021
- >
294689
+ <span class="layer-tag" style="font-size:10px;font-family:var(--font-mono)">var</span>
294022
294690
  <span class="layer-label">${k2}</span>
294023
294691
  <span
294024
- style="font-size:11px;color:var(--fg-dim);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:80px"
294692
+ style="font-size:var(--spectrum-font-size-50, 11px);color:var(--fg-dim);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:80px"
294025
294693
  >${String(v2)}</span
294026
294694
  >
294027
294695
  </div>
@@ -294123,7 +294791,8 @@ function renderElementsTemplate(ctx) {
294123
294791
  }}
294124
294792
  >
294125
294793
  <div class="element-card-preview">
294126
- <span style="color:var(--fg-dim);font-size:11px;font-style:italic"
294794
+ <span
294795
+ style="color:var(--fg-dim);font-size:var(--spectrum-font-size-50, 11px);font-style:italic"
294127
294796
  >&lt;${comp.tagName}&gt;</span
294128
294797
  >
294129
294798
  </div>
@@ -294170,11 +294839,11 @@ function mount7(ctx) {
294170
294839
  tab.session.ui.gitLoading;
294171
294840
  tab.session.ui.gitError;
294172
294841
  }
294173
- render7();
294842
+ render8();
294174
294843
  });
294175
294844
  });
294176
294845
  }
294177
- function render7() {
294846
+ function render8() {
294178
294847
  _scheduler2?.schedule();
294179
294848
  }
294180
294849
  function _doRender2() {
@@ -294218,7 +294887,7 @@ function _render() {
294218
294887
  if (tree) {
294219
294888
  ctx.setupTreeKeyboard(tree);
294220
294889
  }
294221
- ctx.registerFileTreeDnD({ renderLeftPanel: render7 });
294890
+ ctx.registerFileTreeDnD({ renderLeftPanel: render8 });
294222
294891
  return;
294223
294892
  }
294224
294893
  if (tab === "git") {
@@ -294230,7 +294899,7 @@ function _render() {
294230
294899
  if (tab === "blocks") {
294231
294900
  const content2 = renderElementsTemplate({
294232
294901
  defaultDef: ctx.defaultDef,
294233
- rerender: render7,
294902
+ rerender: render8,
294234
294903
  webdata: ctx.webdata
294235
294904
  });
294236
294905
  render2(html3`<div class="panel-body">${content2}</div>`, leftPanel);
@@ -294259,7 +294928,7 @@ function _render() {
294259
294928
  stylebookMeta: stylebook_meta_default
294260
294929
  }) : renderLayersTemplate({
294261
294930
  navigateToComponent: ctx.navigateToComponent,
294262
- rerender: render7
294931
+ rerender: render8
294263
294932
  });
294264
294933
  } else if (tab === "imports") {
294265
294934
  content = ctx.renderImportsTemplate({
@@ -294268,12 +294937,12 @@ function _render() {
294268
294937
  },
294269
294938
  documentElements: S.document.$elements || [],
294270
294939
  documentPath: S.documentPath,
294271
- renderLeftPanel: render7
294940
+ renderLeftPanel: render8
294272
294941
  });
294273
294942
  } else if (tab === "state") {
294274
294943
  content = ctx.renderSignalsTemplate(S, {
294275
294944
  renderCanvas: ctx.renderCanvas,
294276
- renderLeftPanel: render7,
294945
+ renderLeftPanel: render8,
294277
294946
  updateSession
294278
294947
  });
294279
294948
  } else if (tab === "data") {
@@ -294281,7 +294950,7 @@ function _render() {
294281
294950
  defBadgeLabel: ctx.defBadgeLabel,
294282
294951
  defCategory: ctx.defCategory,
294283
294952
  renderCanvas: ctx.renderCanvas,
294284
- renderLeftPanel: render7
294953
+ renderLeftPanel: render8
294285
294954
  });
294286
294955
  } else if (tab === "head") {
294287
294956
  const isContent = S.mode === "content";
@@ -294302,12 +294971,12 @@ function _render() {
294302
294971
  }
294303
294972
  const newHead = tmp.$head && tmp.$head.length > 0 ? tmp.$head : undefined;
294304
294973
  mutateUpdateFrontmatter(tabNow, "$head", newHead);
294305
- render7();
294974
+ render8();
294306
294975
  } : (fn) => {
294307
294976
  transact(activeTab.value, fn);
294308
294977
  },
294309
294978
  document: headDoc,
294310
- renderLeftPanel: render7
294979
+ renderLeftPanel: render8
294311
294980
  });
294312
294981
  } else {
294313
294982
  content = nothing;
@@ -294338,11 +295007,11 @@ function mount8(host) {
294338
295007
  tab.doc.dirty;
294339
295008
  tab.documentPath;
294340
295009
  }
294341
- render8();
295010
+ render9();
294342
295011
  });
294343
295012
  });
294344
295013
  }
294345
- function render8() {
295014
+ function render9() {
294346
295015
  if (!_host) {
294347
295016
  return;
294348
295017
  }
@@ -294394,8 +295063,8 @@ function tabLabel(tab) {
294394
295063
  if (!path) {
294395
295064
  return "Untitled";
294396
295065
  }
294397
- const parts = path.split("/");
294398
- return parts.at(-1);
295066
+ const parts2 = path.split("/");
295067
+ return parts2.at(-1);
294399
295068
  }
294400
295069
  async function requestClose(id) {
294401
295070
  const tab = workspace.tabs.get(id);
@@ -294436,11 +295105,11 @@ function mount9(host, ctx) {
294436
295105
  tab.session.ui.editingFunction;
294437
295106
  tab.session.ui.featureToggles;
294438
295107
  }
294439
- render9();
295108
+ render10();
294440
295109
  });
294441
295110
  });
294442
295111
  }
294443
- function render9() {
295112
+ function render10() {
294444
295113
  if (!_host2 || !_ctx15) {
294445
295114
  return;
294446
295115
  }
@@ -294839,9 +295508,9 @@ mount7({
294839
295508
  setupTreeKeyboard,
294840
295509
  webdata: webdata_default
294841
295510
  });
294842
- registerRenderer("leftPanel", () => render7());
295511
+ registerRenderer("leftPanel", () => render8());
294843
295512
  registerRenderer("canvas", () => renderCanvas());
294844
- registerRenderer("rightPanel", () => render6());
295513
+ registerRenderer("rightPanel", () => render7());
294845
295514
  registerRenderer("overlays", () => render4());
294846
295515
  setStatusbarRenderer(() => renderStatusbar());
294847
295516
  mountStatusbar();
@@ -294856,7 +295525,7 @@ canvasWrap.addEventListener("click", (e21) => {
294856
295525
  activeTab.value.session.selection = null;
294857
295526
  });
294858
295527
  function safeRenderRightPanel() {
294859
- render6();
295528
+ render7();
294860
295529
  }
294861
295530
  registerFunctionCompletions();
294862
295531
  var fsUnsub = null;
@@ -294896,6 +295565,7 @@ if (_projectParam) {
294896
295565
  searchQuery: "",
294897
295566
  selectedPath: siteCtx.fileRelPath || null
294898
295567
  });
295568
+ await ensureDependenciesInstalled();
294899
295569
  await loadComponentRegistry();
294900
295570
  const conventionalDirs = new Set([
294901
295571
  "pages",
@@ -294918,6 +295588,7 @@ if (_projectParam) {
294918
295588
  }
294919
295589
  }
294920
295590
  requireProjectState().projectDirs = foundDirs;
295591
+ maybePromptJxsuiteUpdate(siteCtx.sitePath);
294921
295592
  }
294922
295593
  const _fileParam = _urlParams.get("file");
294923
295594
  let fileRelPath = _fileParam || siteCtx.fileRelPath || _projectParam;
@@ -294980,7 +295651,7 @@ if (_projectParam) {
294980
295651
  ensureFsSync();
294981
295652
  }
294982
295653
  function renderLeftPanel() {
294983
- render7();
295654
+ render8();
294984
295655
  }
294985
295656
  function loadProject2() {
294986
295657
  return loadProject();
@@ -295021,6 +295692,7 @@ async function openRecentProject(root2) {
295021
295692
  searchQuery: "",
295022
295693
  selectedPath: null
295023
295694
  });
295695
+ await ensureDependenciesInstalled();
295024
295696
  await loadDirectory(".");
295025
295697
  await loadComponentRegistry();
295026
295698
  const conventionalDirs = new Set([
@@ -295046,6 +295718,7 @@ async function openRecentProject(root2) {
295046
295718
  statusMessage(`Opened project: ${requireProjectState().name}`);
295047
295719
  await openHomePage();
295048
295720
  ensureFsSync();
295721
+ maybePromptJxsuiteUpdate(root2);
295049
295722
  } catch (error) {
295050
295723
  statusMessage(`Error: ${errorMessage(error)}`);
295051
295724
  }
@@ -295114,5 +295787,5 @@ effect(() => {
295114
295787
  }
295115
295788
  });
295116
295789
 
295117
- //# debugId=2ADE09E3E44FD07B64756E2164756E21
295790
+ //# debugId=09F97332C94AC00E64756E2164756E21
295118
295791
  //# sourceMappingURL=studio.js.map