@xenosystem/blocks 0.11.5 → 0.12.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.
@@ -5586,7 +5586,29 @@ function drawAlphaStrip(ctx, w, h, hsv) {
5586
5586
  }
5587
5587
 
5588
5588
  // src/edit/color/react/ColorPanelView.tsx
5589
- import { Fragment as Fragment5, jsx as jsx9, jsxs as jsxs8 } from "react/jsx-runtime";
5589
+ import { CanvasSurface, ColorChip, Column as Column4, Field as Field2, IconButton as IconButton5, Input as Input3, NumberInput, Section as Section2, Select as Select3, Stack as Stack3, SwatchGrid, TextButton as TextButton2 } from "@xenosystem/components/chrome";
5590
+
5591
+ // src/edit/color/react/icons.tsx
5592
+ import { jsx as jsx9, jsxs as jsxs8 } from "react/jsx-runtime";
5593
+ var svg = { width: 11, height: 11, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 1.5, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true };
5594
+ function EyedropperIcon() {
5595
+ return /* @__PURE__ */ jsxs8("svg", { ...svg, children: [
5596
+ /* @__PURE__ */ jsx9("path", { d: "m2 22 1-1h3l9-9" }),
5597
+ /* @__PURE__ */ jsx9("path", { d: "M3 21v-3l9-9" }),
5598
+ /* @__PURE__ */ jsx9("path", { d: "m15 6 3.4-3.4a2.1 2.1 0 1 1 3 3L18 9l.4.4a2.1 2.1 0 1 1-3 3l-3.8-3.8a2.1 2.1 0 1 1 3-3l.4.4Z" })
5599
+ ] });
5600
+ }
5601
+ function SwapIcon() {
5602
+ return /* @__PURE__ */ jsxs8("svg", { ...svg, children: [
5603
+ /* @__PURE__ */ jsx9("path", { d: "m16 3 4 4-4 4" }),
5604
+ /* @__PURE__ */ jsx9("path", { d: "M20 7H4" }),
5605
+ /* @__PURE__ */ jsx9("path", { d: "m8 21-4-4 4-4" }),
5606
+ /* @__PURE__ */ jsx9("path", { d: "M4 17h16" })
5607
+ ] });
5608
+ }
5609
+
5610
+ // src/edit/color/react/ColorPanelView.tsx
5611
+ import { jsx as jsx10, jsxs as jsxs9 } from "react/jsx-runtime";
5590
5612
  var SPACE_LABEL = {
5591
5613
  hex: "HEX",
5592
5614
  rgb: "RGB",
@@ -5676,193 +5698,96 @@ function ColorPanelView({ controller }) {
5676
5698
  }
5677
5699
  }, [controller]);
5678
5700
  const onHexInput = useCallback5(
5679
- (e) => {
5680
- controller.setFromColor(e.target.value, void 0, { commit: true });
5701
+ (raw) => {
5702
+ controller.setFromColor(raw, void 0, { commit: true });
5681
5703
  },
5682
5704
  [controller]
5683
5705
  );
5684
5706
  const onComponentInput = useCallback5(
5685
- (index, raw) => {
5707
+ (index, n) => {
5686
5708
  const comps2 = [...value.components ?? [0, 0, 0]];
5687
- comps2[index] = Number(raw);
5709
+ comps2[index] = n;
5688
5710
  controller.setFromComponents(space, comps2, { commit: true });
5689
5711
  },
5690
5712
  [controller, space, value.components]
5691
5713
  );
5692
5714
  const componentLabels = COMPONENT_LABELS[space];
5693
5715
  const comps = value.components ?? [];
5694
- return /* @__PURE__ */ jsxs8("div", { style: S.root, className: "xeno-color-panel", children: [
5695
- controller.getChannelsMode() === "fg-bg" && /* @__PURE__ */ jsxs8("div", { style: S.channels, children: [
5696
- /* @__PURE__ */ jsx9(
5697
- "button",
5698
- {
5699
- type: "button",
5700
- "aria-pressed": controller.getActiveChannel() === "fg",
5701
- style: { ...S.chip, ...controller.getActiveChannel() === "fg" ? S.chipActive : null, background: value.hex },
5702
- onClick: () => controller.setChannel("fg"),
5703
- title: "Foreground"
5704
- }
5705
- ),
5706
- /* @__PURE__ */ jsx9(
5707
- "button",
5708
- {
5709
- type: "button",
5710
- style: S.swap,
5711
- onClick: () => controller.swapChannels(),
5712
- title: "Swap FG/BG (X)",
5713
- children: "\u21C4"
5714
- }
5715
- ),
5716
- /* @__PURE__ */ jsx9(
5717
- "button",
5718
- {
5719
- type: "button",
5720
- "aria-pressed": controller.getActiveChannel() === "bg",
5721
- style: { ...S.chip, ...controller.getActiveChannel() === "bg" ? S.chipActive : null },
5722
- onClick: () => controller.setChannel("bg"),
5723
- title: "Background"
5724
- }
5725
- )
5726
- ] }),
5727
- /* @__PURE__ */ jsxs8("div", { style: S.pickerRow, children: [
5728
- /* @__PURE__ */ jsx9(
5729
- "canvas",
5716
+ const activeChannel = controller.getActiveChannel();
5717
+ return /* @__PURE__ */ jsx10(Column4, { className: "xeno-color-panel", children: /* @__PURE__ */ jsxs9(Stack3, { gap: 8, children: [
5718
+ controller.getChannelsMode() === "fg-bg" ? /* @__PURE__ */ jsxs9(Stack3, { direction: "row", pad: "none", children: [
5719
+ /* @__PURE__ */ jsx10(ColorChip, { color: value.hex, label: "Foreground", pressed: activeChannel === "fg", onClick: () => controller.setChannel("fg") }),
5720
+ /* @__PURE__ */ jsx10(IconButton5, { size: "sm", icon: /* @__PURE__ */ jsx10(SwapIcon, {}), label: "Swap FG/BG (X)", onClick: () => controller.swapChannels() }),
5721
+ /* @__PURE__ */ jsx10(ColorChip, { color: null, label: "Background", pressed: activeChannel === "bg", onClick: () => controller.setChannel("bg") })
5722
+ ] }) : null,
5723
+ /* @__PURE__ */ jsxs9(Stack3, { direction: "row", pad: "none", children: [
5724
+ /* @__PURE__ */ jsx10(
5725
+ CanvasSurface,
5730
5726
  {
5731
5727
  ref: spectrumRef,
5732
5728
  width: 200,
5733
5729
  height: 140,
5734
- style: { ...S.spectrum, ...bound ? S.disabled : null },
5730
+ grow: true,
5731
+ cursor: "crosshair",
5732
+ disabled: bound,
5733
+ "aria-label": "Saturation and value",
5735
5734
  onPointerDown: (e) => onSpectrumPointer(e, true),
5736
5735
  onPointerMove: (e) => onSpectrumPointer(e, false),
5737
5736
  onPointerUp: endDrag
5738
5737
  }
5739
5738
  ),
5740
- /* @__PURE__ */ jsx9(
5741
- "canvas",
5739
+ /* @__PURE__ */ jsx10(
5740
+ CanvasSurface,
5742
5741
  {
5743
5742
  ref: hueRef,
5744
5743
  width: 14,
5745
5744
  height: 140,
5746
- style: { ...S.strip, ...bound ? S.disabled : null },
5745
+ cursor: "ns-resize",
5746
+ disabled: bound,
5747
+ "aria-label": "Hue",
5747
5748
  onPointerDown: (e) => onHuePointer(e, true),
5748
5749
  onPointerMove: (e) => onHuePointer(e, false),
5749
5750
  onPointerUp: endDrag
5750
5751
  }
5751
5752
  ),
5752
- controller.isAlphaShown() && /* @__PURE__ */ jsx9(
5753
- "canvas",
5753
+ controller.isAlphaShown() ? /* @__PURE__ */ jsx10(
5754
+ CanvasSurface,
5754
5755
  {
5755
5756
  ref: alphaRef,
5756
5757
  width: 14,
5757
5758
  height: 140,
5758
- style: { ...S.strip, ...bound ? S.disabled : null },
5759
+ cursor: "ns-resize",
5760
+ disabled: bound,
5761
+ "aria-label": "Alpha",
5759
5762
  onPointerDown: (e) => onAlphaPointer(e, true),
5760
5763
  onPointerMove: (e) => onAlphaPointer(e, false),
5761
5764
  onPointerUp: endDrag
5762
5765
  }
5763
- )
5766
+ ) : null
5764
5767
  ] }),
5765
- /* @__PURE__ */ jsxs8("div", { style: S.controls, children: [
5766
- /* @__PURE__ */ jsx9(
5767
- "select",
5768
- {
5769
- value: space,
5770
- onChange: (e) => controller.setSpace(e.target.value),
5771
- style: S.select,
5772
- "aria-label": "Color model",
5773
- children: EDIT_SPACES.map((s) => /* @__PURE__ */ jsx9("option", { value: s, children: SPACE_LABEL[s] }, s))
5774
- }
5775
- ),
5776
- space === "hex" ? /* @__PURE__ */ jsx9(
5777
- "input",
5778
- {
5779
- type: "text",
5780
- value: value.hex,
5781
- onChange: onHexInput,
5782
- disabled: bound,
5783
- style: S.hexInput,
5784
- "aria-label": "Hex",
5785
- spellCheck: false
5786
- }
5787
- ) : /* @__PURE__ */ jsx9("div", { style: S.componentRow, children: (componentLabels ?? []).map((label, i) => /* @__PURE__ */ jsxs8("label", { style: S.componentField, children: [
5788
- /* @__PURE__ */ jsx9("span", { style: S.componentLabel, children: label }),
5789
- /* @__PURE__ */ jsx9(
5790
- "input",
5791
- {
5792
- type: "number",
5793
- value: roundForSpace(space, i, comps[i] ?? 0),
5794
- onChange: (e) => onComponentInput(i, e.target.value),
5795
- disabled: bound,
5796
- style: S.numInput
5797
- }
5798
- )
5799
- ] }, label)) }),
5800
- controller.isAlphaShown() && /* @__PURE__ */ jsxs8("label", { style: S.alphaField, children: [
5801
- /* @__PURE__ */ jsx9("span", { style: S.componentLabel, children: "A" }),
5802
- /* @__PURE__ */ jsx9(
5803
- "input",
5804
- {
5805
- type: "number",
5806
- min: 0,
5807
- max: 100,
5808
- value: Math.round(value.alpha * 100),
5809
- onChange: (e) => controller.setAlpha(Number(e.target.value) / 100, { commit: true }),
5810
- disabled: bound,
5811
- style: S.numInput
5812
- }
5813
- )
5814
- ] }),
5815
- /* @__PURE__ */ jsx9("button", { type: "button", style: S.iconBtn, title: "Pick from screen", onClick: () => controller.requestEyedropper(), children: "\u29BF" })
5768
+ /* @__PURE__ */ jsxs9(Stack3, { direction: "row", pad: "none", gap: 4, children: [
5769
+ /* @__PURE__ */ jsx10(Select3, { size: "sm", label: "Color model", value: space, options: EDIT_SPACES.map((sp) => ({ value: sp, label: SPACE_LABEL[sp] })), onChange: (v) => controller.setSpace(v) }),
5770
+ space === "hex" ? /* @__PURE__ */ jsx10(Input3, { variant: "mono", label: "Hex", value: value.hex, onChange: onHexInput, disabled: bound }) : (componentLabels ?? []).map((label, i) => /* @__PURE__ */ jsx10(NumberInput, { caption: label, value: roundForSpace(space, i, comps[i] ?? 0), onChange: (n) => onComponentInput(i, n), disabled: bound }, label)),
5771
+ controller.isAlphaShown() ? /* @__PURE__ */ jsx10(NumberInput, { caption: "A", label: "Alpha", min: 0, max: 100, value: Math.round(value.alpha * 100), onChange: (n) => controller.setAlpha(n / 100, { commit: true }), disabled: bound }) : null,
5772
+ /* @__PURE__ */ jsx10(IconButton5, { size: "sm", icon: /* @__PURE__ */ jsx10(EyedropperIcon, {}), label: "Pick from screen", onClick: () => controller.requestEyedropper() })
5816
5773
  ] }),
5817
- controller.hasTokens() && /* @__PURE__ */ jsxs8("div", { style: S.tokenRow, children: [
5818
- /* @__PURE__ */ jsx9("span", { style: S.componentLabel, children: "Token" }),
5819
- /* @__PURE__ */ jsxs8(
5820
- "select",
5774
+ controller.hasTokens() ? /* @__PURE__ */ jsx10(Field2, { label: "Token", htmlFor: "xeno-color-token", children: /* @__PURE__ */ jsxs9(Stack3, { direction: "row", pad: "none", gap: 4, children: [
5775
+ /* @__PURE__ */ jsx10(
5776
+ Select3,
5821
5777
  {
5778
+ size: "sm",
5779
+ label: "Bind token",
5822
5780
  value: controller.getBoundTokenId() ?? "",
5823
- onChange: (e) => e.target.value ? controller.bindToken(e.target.value) : controller.unbindToken(),
5824
- style: S.select,
5825
- "aria-label": "Bind token",
5826
- children: [
5827
- /* @__PURE__ */ jsx9("option", { value: "", children: "\u2014 raw \u2014" }),
5828
- controller.getTokens().map((t) => /* @__PURE__ */ jsx9("option", { value: t.id, children: t.name }, t.id))
5829
- ]
5781
+ placeholder: "\u2014 raw \u2014",
5782
+ options: controller.getTokens().map((t) => ({ value: t.id, label: t.name })),
5783
+ onChange: (id) => id ? controller.bindToken(id) : controller.unbindToken()
5830
5784
  }
5831
5785
  ),
5832
- bound && /* @__PURE__ */ jsx9("button", { type: "button", style: S.textBtn, onClick: () => controller.unbindToken(), children: "Unbind" })
5833
- ] }),
5834
- /* @__PURE__ */ jsxs8("div", { style: S.swatchHeader, children: [
5835
- /* @__PURE__ */ jsx9("span", { style: S.sectionLabel, children: "Swatches" }),
5836
- /* @__PURE__ */ jsx9("button", { type: "button", style: S.textBtn, onClick: () => void controller.addSwatch(), children: "+ Save" })
5837
- ] }),
5838
- /* @__PURE__ */ jsx9("div", { style: S.swatchGrid, children: controller.getSwatches().map((hex) => /* @__PURE__ */ jsx9(
5839
- "button",
5840
- {
5841
- type: "button",
5842
- style: { ...S.swatch, background: hex },
5843
- title: hex,
5844
- onClick: () => controller.selectColor(hex),
5845
- onContextMenu: (e) => {
5846
- e.preventDefault();
5847
- void controller.removeSwatch(hex);
5848
- }
5849
- },
5850
- hex
5851
- )) }),
5852
- controller.getRecent().length > 0 && /* @__PURE__ */ jsxs8(Fragment5, { children: [
5853
- /* @__PURE__ */ jsx9("div", { style: S.sectionLabel, children: "Recent" }),
5854
- /* @__PURE__ */ jsx9("div", { style: S.swatchGrid, children: controller.getRecent().map((hex, i) => /* @__PURE__ */ jsx9(
5855
- "button",
5856
- {
5857
- type: "button",
5858
- style: { ...S.swatch, background: hex },
5859
- title: hex,
5860
- onClick: () => controller.selectColor(hex)
5861
- },
5862
- `${hex}-${i}`
5863
- )) })
5864
- ] })
5865
- ] });
5786
+ bound ? /* @__PURE__ */ jsx10(TextButton2, { onClick: () => controller.unbindToken(), children: "Unbind" }) : null
5787
+ ] }) }) : null,
5788
+ /* @__PURE__ */ jsx10(Section2, { title: "Swatches", flush: true, actions: /* @__PURE__ */ jsx10(TextButton2, { onClick: () => void controller.addSwatch(), children: "+ Save" }), children: /* @__PURE__ */ jsx10(SwatchGrid, { label: "Swatches", children: controller.getSwatches().map((hex) => /* @__PURE__ */ jsx10(ColorChip, { size: "grid", color: hex, label: hex, onClick: () => controller.selectColor(hex), onContextMenu: () => void controller.removeSwatch(hex) }, hex)) }) }),
5789
+ controller.getRecent().length > 0 ? /* @__PURE__ */ jsx10(Section2, { title: "Recent", flush: true, children: /* @__PURE__ */ jsx10(SwatchGrid, { label: "Recent", children: controller.getRecent().map((hex, i) => /* @__PURE__ */ jsx10(ColorChip, { size: "grid", color: hex, label: hex, onClick: () => controller.selectColor(hex) }, `${hex}-${i}`)) }) }) : null
5790
+ ] }) });
5866
5791
  }
5867
5792
  function clamp01(n) {
5868
5793
  return Math.max(0, Math.min(1, Number.isFinite(n) ? n : 0));
@@ -5871,32 +5796,6 @@ function roundForSpace(space, index, v) {
5871
5796
  if (space === "oklch") return Math.round(v * 10) / 10;
5872
5797
  return Math.round(v);
5873
5798
  }
5874
- var S = {
5875
- root: { display: "flex", flexDirection: "column", gap: 8, padding: 8, fontSize: 11, color: "var(--xeno-text)", background: "var(--xeno-canvas)", minWidth: 232, userSelect: "none" },
5876
- channels: { display: "flex", alignItems: "center", gap: 6 },
5877
- chip: { width: 28, height: 20, borderRadius: 2, border: "1px solid var(--xeno-control)", background: "var(--xeno-canvas)", cursor: "pointer", padding: 0 },
5878
- chipActive: { outline: "1px solid var(--xeno-text)" },
5879
- swap: { width: 18, height: 18, borderRadius: 2, border: "1px solid var(--xeno-control)", background: "transparent", color: "inherit", cursor: "pointer", fontSize: 11, lineHeight: "16px", padding: 0 },
5880
- pickerRow: { display: "flex", gap: 6 },
5881
- spectrum: { borderRadius: 2, cursor: "crosshair", flex: 1, touchAction: "none" },
5882
- strip: { borderRadius: 2, cursor: "ns-resize", touchAction: "none" },
5883
- disabled: { opacity: 0.4, cursor: "not-allowed" },
5884
- controls: { display: "flex", alignItems: "center", gap: 4, flexWrap: "wrap" },
5885
- select: { background: "var(--xeno-border-subtle)", color: "inherit", border: "1px solid var(--xeno-control)", borderRadius: 2, fontSize: 11, padding: "2px 4px" },
5886
- hexInput: { flex: 1, minWidth: 72, background: "var(--xeno-border-subtle)", color: "inherit", border: "1px solid var(--xeno-control)", borderRadius: 2, fontSize: 11, padding: "2px 4px", fontVariantNumeric: "tabular-nums" },
5887
- componentRow: { display: "flex", gap: 4, flex: 1 },
5888
- componentField: { display: "flex", flexDirection: "column", alignItems: "center", gap: 1 },
5889
- componentLabel: { fontSize: 9, opacity: 0.6 },
5890
- sectionLabel: { fontSize: 9, opacity: 0.6, textTransform: "uppercase", letterSpacing: 0.4 },
5891
- numInput: { width: 40, background: "var(--xeno-border-subtle)", color: "inherit", border: "1px solid var(--xeno-control)", borderRadius: 2, fontSize: 11, padding: "2px 3px", textAlign: "center", fontVariantNumeric: "tabular-nums" },
5892
- alphaField: { display: "flex", flexDirection: "column", alignItems: "center", gap: 1 },
5893
- iconBtn: { width: 22, height: 22, borderRadius: 2, border: "1px solid var(--xeno-control)", background: "var(--xeno-border-subtle)", color: "inherit", cursor: "pointer", fontSize: 12, padding: 0 },
5894
- tokenRow: { display: "flex", alignItems: "center", gap: 6 },
5895
- swatchHeader: { display: "flex", alignItems: "center", justifyContent: "space-between" },
5896
- textBtn: { background: "transparent", border: "none", color: "inherit", opacity: 0.7, cursor: "pointer", fontSize: 10, padding: 0 },
5897
- swatchGrid: { display: "grid", gridTemplateColumns: "repeat(8, 1fr)", gap: 3 },
5898
- swatch: { width: "100%", aspectRatio: "1 / 1", borderRadius: 2, border: "1px solid var(--xeno-control)", cursor: "pointer", padding: 0 }
5899
- };
5900
5799
 
5901
5800
  // src/edit/color/panel.ts
5902
5801
  function createColorPanel(options = {}) {
@@ -7170,7 +7069,7 @@ var curveManifest = {
7170
7069
  import { useCallback as useCallback6, useEffect as useEffect5, useRef as useRef6, useSyncExternalStore as useSyncExternalStore5 } from "react";
7171
7070
  import { EmptyState as EmptyState4, StatusBar as StatusBar3, Toolbar as Toolbar3, ToolbarGroup } from "@xenosystem/components/chrome";
7172
7071
  import { formatTick } from "@xenosystem/time-core";
7173
- import { Fragment as Fragment6, jsx as jsx10, jsxs as jsxs9 } from "react/jsx-runtime";
7072
+ import { Fragment as Fragment5, jsx as jsx11, jsxs as jsxs10 } from "react/jsx-runtime";
7174
7073
  var DASHES = ["none", "4 2", "1 2", "6 2 1 2"];
7175
7074
  function CurvePanelView({ controller, showPresets = true }) {
7176
7075
  const state = useSyncExternalStore5(controller.subscribe, controller.getState, controller.getState);
@@ -7249,21 +7148,21 @@ function CurvePanelView({ controller, showPresets = true }) {
7249
7148
  const preview = state.preview;
7250
7149
  const selected = new Set(state.selection.keys.map(keyRefId));
7251
7150
  const channels = state.curves?.channels ?? [];
7252
- return /* @__PURE__ */ jsxs9("div", { style: SHELL, children: [
7253
- /* @__PURE__ */ jsx10(
7151
+ return /* @__PURE__ */ jsxs10("div", { style: SHELL, children: [
7152
+ /* @__PURE__ */ jsx11(
7254
7153
  Toolbar3,
7255
7154
  {
7256
- left: /* @__PURE__ */ jsx10(ToolbarGroup, { children: ["linear", "bezier", "hold", "step"].map((mode) => /* @__PURE__ */ jsx10("button", { type: "button", style: button(), onClick: () => controller.setInterpolation(mode), children: mode }, mode)) }),
7257
- right: /* @__PURE__ */ jsxs9(ToolbarGroup, { end: true, children: [
7258
- ["aligned", "broken", "flat"].map((mode) => /* @__PURE__ */ jsx10("button", { type: "button", style: button(), onClick: () => controller.setTangentMode(mode), children: mode }, mode)),
7259
- /* @__PURE__ */ jsx10("button", { type: "button", style: button(), onClick: () => controller.fitAll(), children: "Fit" })
7155
+ left: /* @__PURE__ */ jsx11(ToolbarGroup, { children: ["linear", "bezier", "hold", "step"].map((mode) => /* @__PURE__ */ jsx11("button", { type: "button", style: button(), onClick: () => controller.setInterpolation(mode), children: mode }, mode)) }),
7156
+ right: /* @__PURE__ */ jsxs10(ToolbarGroup, { end: true, children: [
7157
+ ["aligned", "broken", "flat"].map((mode) => /* @__PURE__ */ jsx11("button", { type: "button", style: button(), onClick: () => controller.setTangentMode(mode), children: mode }, mode)),
7158
+ /* @__PURE__ */ jsx11("button", { type: "button", style: button(), onClick: () => controller.fitAll(), children: "Fit" })
7260
7159
  ] })
7261
7160
  }
7262
7161
  ),
7263
- showPresets ? /* @__PURE__ */ jsx10(
7162
+ showPresets ? /* @__PURE__ */ jsx11(
7264
7163
  Toolbar3,
7265
7164
  {
7266
- left: /* @__PURE__ */ jsx10(ToolbarGroup, { children: EASING_PRESETS.slice(0, 6).map((preset) => /* @__PURE__ */ jsx10(
7165
+ left: /* @__PURE__ */ jsx11(ToolbarGroup, { children: EASING_PRESETS.slice(0, 6).map((preset) => /* @__PURE__ */ jsx11(
7267
7166
  "button",
7268
7167
  {
7269
7168
  type: "button",
@@ -7276,7 +7175,7 @@ function CurvePanelView({ controller, showPresets = true }) {
7276
7175
  )) })
7277
7176
  }
7278
7177
  ) : null,
7279
- channels.length === 0 ? /* @__PURE__ */ jsx10(EmptyState4, { title: "No curves", hint: "Wire an animated property into this panel's input." }) : /* @__PURE__ */ jsx10(
7178
+ channels.length === 0 ? /* @__PURE__ */ jsx11(EmptyState4, { title: "No curves", hint: "Wire an animated property into this panel's input." }) : /* @__PURE__ */ jsx11(
7280
7179
  "div",
7281
7180
  {
7282
7181
  ref: containerRef,
@@ -7290,7 +7189,7 @@ function CurvePanelView({ controller, showPresets = true }) {
7290
7189
  onPointerUp,
7291
7190
  onPointerCancel: onPointerUp,
7292
7191
  onKeyDown,
7293
- children: /* @__PURE__ */ jsxs9(
7192
+ children: /* @__PURE__ */ jsxs10(
7294
7193
  "svg",
7295
7194
  {
7296
7195
  "data-canvas": "curve-plot",
@@ -7298,7 +7197,7 @@ function CurvePanelView({ controller, showPresets = true }) {
7298
7197
  height: "100%",
7299
7198
  style: { position: "absolute", inset: 0, display: "block" },
7300
7199
  children: [
7301
- /* @__PURE__ */ jsx10(
7200
+ /* @__PURE__ */ jsx11(
7302
7201
  "line",
7303
7202
  {
7304
7203
  x1: scale.gutterPx,
@@ -7308,7 +7207,7 @@ function CurvePanelView({ controller, showPresets = true }) {
7308
7207
  stroke: "var(--xeno-control)"
7309
7208
  }
7310
7209
  ),
7311
- scale.minValue < 0 && scale.maxValue > 0 ? /* @__PURE__ */ jsx10(
7210
+ scale.minValue < 0 && scale.maxValue > 0 ? /* @__PURE__ */ jsx11(
7312
7211
  "line",
7313
7212
  {
7314
7213
  x1: scale.gutterPx,
@@ -7323,7 +7222,7 @@ function CurvePanelView({ controller, showPresets = true }) {
7323
7222
  const channel = channels.find((c) => c.id === series.channelId);
7324
7223
  if (!channel || series.points.length === 0) return null;
7325
7224
  const d = series.points.map((p, i) => `${i === 0 ? "M" : "L"}${scale.tickToX(p.tick).toFixed(2)},${scale.valueToY(p.value).toFixed(2)}`).join(" ");
7326
- return /* @__PURE__ */ jsx10(
7225
+ return /* @__PURE__ */ jsx11(
7327
7226
  "path",
7328
7227
  {
7329
7228
  d,
@@ -7343,9 +7242,9 @@ function CurvePanelView({ controller, showPresets = true }) {
7343
7242
  const x = scale.tickToX(shown.tick);
7344
7243
  const y = scale.valueToY(shown.value);
7345
7244
  const isSelected = selected.has(id);
7346
- return /* @__PURE__ */ jsxs9("g", { children: [
7347
- isSelected ? /* @__PURE__ */ jsx10(Handles, { keyframe: key, x, y, scale }) : null,
7348
- /* @__PURE__ */ jsx10(
7245
+ return /* @__PURE__ */ jsxs10("g", { children: [
7246
+ isSelected ? /* @__PURE__ */ jsx11(Handles, { keyframe: key, x, y, scale }) : null,
7247
+ /* @__PURE__ */ jsx11(
7349
7248
  "rect",
7350
7249
  {
7351
7250
  x: x - 3,
@@ -7361,7 +7260,7 @@ function CurvePanelView({ controller, showPresets = true }) {
7361
7260
  ] }, id);
7362
7261
  })
7363
7262
  ),
7364
- preview?.marquee ? /* @__PURE__ */ jsx10(
7263
+ preview?.marquee ? /* @__PURE__ */ jsx11(
7365
7264
  "rect",
7366
7265
  {
7367
7266
  x: Math.min(scale.tickToX(preview.marquee.fromTick), scale.tickToX(preview.marquee.toTick)),
@@ -7374,7 +7273,7 @@ function CurvePanelView({ controller, showPresets = true }) {
7374
7273
  stroke: "var(--xeno-active)"
7375
7274
  }
7376
7275
  ) : null,
7377
- state.playheadTick !== null ? /* @__PURE__ */ jsx10(
7276
+ state.playheadTick !== null ? /* @__PURE__ */ jsx11(
7378
7277
  "line",
7379
7278
  {
7380
7279
  x1: scale.tickToX(state.playheadTick),
@@ -7389,11 +7288,11 @@ function CurvePanelView({ controller, showPresets = true }) {
7389
7288
  )
7390
7289
  }
7391
7290
  ),
7392
- /* @__PURE__ */ jsx10(
7291
+ /* @__PURE__ */ jsx11(
7393
7292
  StatusBar3,
7394
7293
  {
7395
7294
  left: `${channels.length} channel${channels.length === 1 ? "" : "s"}`,
7396
- right: /* @__PURE__ */ jsx10("span", { className: "tabular-nums", children: state.playheadTick !== null ? formatTick(state.playheadTick, state.timebase) : "" })
7295
+ right: /* @__PURE__ */ jsx11("span", { className: "tabular-nums", children: state.playheadTick !== null ? formatTick(state.playheadTick, state.timebase) : "" })
7397
7296
  }
7398
7297
  )
7399
7298
  ] });
@@ -7405,14 +7304,14 @@ function Handles({
7405
7304
  scale
7406
7305
  }) {
7407
7306
  const sides = ["in", "out"];
7408
- return /* @__PURE__ */ jsx10(Fragment6, { children: sides.map((side) => {
7307
+ return /* @__PURE__ */ jsx11(Fragment5, { children: sides.map((side) => {
7409
7308
  const tangent = side === "in" ? keyframe.tangentIn : keyframe.tangentOut;
7410
7309
  if (!tangent) return null;
7411
7310
  const hx = scale.tickToX(keyframe.tick + tangent.x);
7412
7311
  const hy = scale.valueToY(keyframe.value + tangent.y);
7413
- return /* @__PURE__ */ jsxs9("g", { children: [
7414
- /* @__PURE__ */ jsx10("line", { x1: x, y1: y, x2: hx, y2: hy, stroke: "var(--xeno-active)", strokeWidth: 1 }),
7415
- /* @__PURE__ */ jsx10("rect", { x: hx - 2, y: hy - 2, width: 4, height: 4, fill: "var(--xeno-text)" })
7312
+ return /* @__PURE__ */ jsxs10("g", { children: [
7313
+ /* @__PURE__ */ jsx11("line", { x1: x, y1: y, x2: hx, y2: hy, stroke: "var(--xeno-active)", strokeWidth: 1 }),
7314
+ /* @__PURE__ */ jsx11("rect", { x: hx - 2, y: hy - 2, width: 4, height: 4, fill: "var(--xeno-text)" })
7416
7315
  ] }, side);
7417
7316
  }) });
7418
7317
  }
@@ -8046,7 +7945,7 @@ var viewportManifest = {
8046
7945
  // src/edit/viewport/react/ViewportPanelView.tsx
8047
7946
  import { useEffect as useEffect6, useRef as useRef7, useSyncExternalStore as useSyncExternalStore6 } from "react";
8048
7947
  import { Badge as Badge4, StatusBar as StatusBar4 } from "@xenosystem/components/chrome";
8049
- import { jsx as jsx11, jsxs as jsxs10 } from "react/jsx-runtime";
7948
+ import { jsx as jsx12, jsxs as jsxs11 } from "react/jsx-runtime";
8050
7949
  var SLOT_STYLE = {
8051
7950
  "top-left": { top: 8, left: 8 },
8052
7951
  "top-center": { top: 8, left: "50%", transform: "translateX(-50%)" },
@@ -8074,7 +7973,7 @@ function ViewportPanelView({
8074
7973
  return controller.mount(canvas, container);
8075
7974
  }, [controller]);
8076
7975
  const hidden = new Set(state.hiddenSlots);
8077
- return /* @__PURE__ */ jsxs10(
7976
+ return /* @__PURE__ */ jsxs11(
8078
7977
  "div",
8079
7978
  {
8080
7979
  ref: containerRef,
@@ -8113,7 +8012,7 @@ function ViewportPanelView({
8113
8012
  touchAction: "none"
8114
8013
  },
8115
8014
  children: [
8116
- /* @__PURE__ */ jsx11(
8015
+ /* @__PURE__ */ jsx12(
8117
8016
  "canvas",
8118
8017
  {
8119
8018
  ref: canvasRef,
@@ -8124,7 +8023,7 @@ function ViewportPanelView({
8124
8023
  VIEWPORT_SLOTS.map((slot) => {
8125
8024
  const content = overlays?.[slot];
8126
8025
  if (!content || hidden.has(slot)) return null;
8127
- return /* @__PURE__ */ jsx11(
8026
+ return /* @__PURE__ */ jsx12(
8128
8027
  "div",
8129
8028
  {
8130
8029
  "data-viewport-slot": slot,
@@ -8142,7 +8041,7 @@ function ViewportPanelView({
8142
8041
  slot
8143
8042
  );
8144
8043
  }),
8145
- state.contextLost ? /* @__PURE__ */ jsx11(
8044
+ state.contextLost ? /* @__PURE__ */ jsx12(
8146
8045
  "div",
8147
8046
  {
8148
8047
  style: {
@@ -8155,10 +8054,10 @@ function ViewportPanelView({
8155
8054
  fontSize: 11,
8156
8055
  zIndex: 20
8157
8056
  },
8158
- children: /* @__PURE__ */ jsx11(Badge4, { tone: "error", children: "graphics context lost \u2014 restoring" })
8057
+ children: /* @__PURE__ */ jsx12(Badge4, { tone: "error", children: "graphics context lost \u2014 restoring" })
8159
8058
  }
8160
8059
  ) : null,
8161
- showStats && state.stats ? /* @__PURE__ */ jsx11("div", { style: { position: "absolute", left: 0, right: 0, bottom: 0, zIndex: 10 }, children: /* @__PURE__ */ jsx11(
8060
+ showStats && state.stats ? /* @__PURE__ */ jsx12("div", { style: { position: "absolute", left: 0, right: 0, bottom: 0, zIndex: 10 }, children: /* @__PURE__ */ jsx12(
8162
8061
  StatusBar4,
8163
8062
  {
8164
8063
  left: state.stats.fps !== void 0 ? `${Math.round(state.stats.fps)} fps` : void 0,
@@ -8814,46 +8713,46 @@ import { useSyncExternalStore as useSyncExternalStore7 } from "react";
8814
8713
  import {
8815
8714
  Badge as Badge5,
8816
8715
  EmptyState as EmptyState5,
8817
- IconButton as IconButton5,
8716
+ IconButton as IconButton6,
8818
8717
  Row as Row3,
8819
8718
  RowList as RowList3,
8820
8719
  ScrollArea as ScrollArea4,
8821
8720
  SearchField as SearchField4,
8822
- Section as Section2,
8721
+ Section as Section3,
8823
8722
  StatusBar as StatusBar5,
8824
- TextButton as TextButton2,
8723
+ TextButton as TextButton3,
8825
8724
  Toolbar as Toolbar4,
8826
8725
  ToolbarGroup as ToolbarGroup2
8827
8726
  } from "@xenosystem/components/chrome";
8828
- import { jsx as jsx12, jsxs as jsxs11 } from "react/jsx-runtime";
8727
+ import { jsx as jsx13, jsxs as jsxs12 } from "react/jsx-runtime";
8829
8728
  function CaseIcon() {
8830
- return /* @__PURE__ */ jsxs11("svg", { width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", children: [
8831
- /* @__PURE__ */ jsx12("path", { d: "m3 15 4-8 4 8" }),
8832
- /* @__PURE__ */ jsx12("path", { d: "M4 13h6" }),
8833
- /* @__PURE__ */ jsx12("circle", { cx: "18", cy: "12", r: "3" }),
8834
- /* @__PURE__ */ jsx12("path", { d: "M21 9v6" })
8729
+ return /* @__PURE__ */ jsxs12("svg", { width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", children: [
8730
+ /* @__PURE__ */ jsx13("path", { d: "m3 15 4-8 4 8" }),
8731
+ /* @__PURE__ */ jsx13("path", { d: "M4 13h6" }),
8732
+ /* @__PURE__ */ jsx13("circle", { cx: "18", cy: "12", r: "3" }),
8733
+ /* @__PURE__ */ jsx13("path", { d: "M21 9v6" })
8835
8734
  ] });
8836
8735
  }
8837
8736
  function WordIcon() {
8838
- return /* @__PURE__ */ jsxs11("svg", { width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", children: [
8839
- /* @__PURE__ */ jsx12("path", { d: "M7 12h10" }),
8840
- /* @__PURE__ */ jsx12("path", { d: "M3 7v10" }),
8841
- /* @__PURE__ */ jsx12("path", { d: "M21 7v10" })
8737
+ return /* @__PURE__ */ jsxs12("svg", { width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", children: [
8738
+ /* @__PURE__ */ jsx13("path", { d: "M7 12h10" }),
8739
+ /* @__PURE__ */ jsx13("path", { d: "M3 7v10" }),
8740
+ /* @__PURE__ */ jsx13("path", { d: "M21 7v10" })
8842
8741
  ] });
8843
8742
  }
8844
8743
  function RegexIcon() {
8845
- return /* @__PURE__ */ jsxs11("svg", { width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", children: [
8846
- /* @__PURE__ */ jsx12("path", { d: "M12 4v8" }),
8847
- /* @__PURE__ */ jsx12("path", { d: "m8.5 6 7 4" }),
8848
- /* @__PURE__ */ jsx12("path", { d: "m8.5 10 7-4" }),
8849
- /* @__PURE__ */ jsx12("path", { d: "M5 18h2" })
8744
+ return /* @__PURE__ */ jsxs12("svg", { width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", children: [
8745
+ /* @__PURE__ */ jsx13("path", { d: "M12 4v8" }),
8746
+ /* @__PURE__ */ jsx13("path", { d: "m8.5 6 7 4" }),
8747
+ /* @__PURE__ */ jsx13("path", { d: "m8.5 10 7-4" }),
8748
+ /* @__PURE__ */ jsx13("path", { d: "M5 18h2" })
8850
8749
  ] });
8851
8750
  }
8852
8751
  function UpIcon() {
8853
- return /* @__PURE__ */ jsx12("svg", { width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", children: /* @__PURE__ */ jsx12("path", { d: "m18 15-6-6-6 6" }) });
8752
+ return /* @__PURE__ */ jsx13("svg", { width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", children: /* @__PURE__ */ jsx13("path", { d: "m18 15-6-6-6 6" }) });
8854
8753
  }
8855
8754
  function DownIcon() {
8856
- return /* @__PURE__ */ jsx12("svg", { width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", children: /* @__PURE__ */ jsx12("path", { d: "m6 9 6 6 6-6" }) });
8755
+ return /* @__PURE__ */ jsx13("svg", { width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", children: /* @__PURE__ */ jsx13("path", { d: "m6 9 6 6 6-6" }) });
8857
8756
  }
8858
8757
  function StatusLine({
8859
8758
  status,
@@ -8864,14 +8763,14 @@ function StatusLine({
8864
8763
  hasText
8865
8764
  }) {
8866
8765
  if (status === "invalidPattern") {
8867
- return /* @__PURE__ */ jsx12(Badge5, { tone: "error", title: message ?? void 0, children: "invalid pattern" });
8766
+ return /* @__PURE__ */ jsx13(Badge5, { tone: "error", title: message ?? void 0, children: "invalid pattern" });
8868
8767
  }
8869
8768
  if (status === "failed") {
8870
- return /* @__PURE__ */ jsx12(Badge5, { tone: "error", title: message ?? void 0, children: "search failed" });
8769
+ return /* @__PURE__ */ jsx13(Badge5, { tone: "error", title: message ?? void 0, children: "search failed" });
8871
8770
  }
8872
- if (status === "searching") return /* @__PURE__ */ jsx12(Badge5, { children: "searching\u2026" });
8771
+ if (status === "searching") return /* @__PURE__ */ jsx13(Badge5, { children: "searching\u2026" });
8873
8772
  if (!hasText || status === "idle") return null;
8874
- return /* @__PURE__ */ jsxs11("span", { style: { fontVariantNumeric: "tabular-nums", fontSize: 10, opacity: 0.55 }, children: [
8773
+ return /* @__PURE__ */ jsxs12("span", { style: { fontVariantNumeric: "tabular-nums", fontSize: 10, opacity: 0.55 }, children: [
8875
8774
  displayIndex,
8876
8775
  "/",
8877
8776
  count,
@@ -8894,7 +8793,7 @@ function FindPanelView({
8894
8793
  controller.clear();
8895
8794
  }
8896
8795
  };
8897
- const renderMatch = (match, index) => /* @__PURE__ */ jsx12(
8796
+ const renderMatch = (match, index) => /* @__PURE__ */ jsx13(
8898
8797
  Row3,
8899
8798
  {
8900
8799
  noIcon: true,
@@ -8904,7 +8803,7 @@ function FindPanelView({
8904
8803
  event.preventDefault();
8905
8804
  controller.requestContextMenu?.(match.id, event.clientX, event.clientY);
8906
8805
  },
8907
- label: /* @__PURE__ */ jsx12("span", { children: highlightSegments(match.snippet ?? "", match.ranges).map((segment, i) => /* @__PURE__ */ jsx12(
8806
+ label: /* @__PURE__ */ jsx13("span", { children: highlightSegments(match.snippet ?? "", match.ranges).map((segment, i) => /* @__PURE__ */ jsx13(
8908
8807
  "span",
8909
8808
  {
8910
8809
  style: segment.hit ? { background: "var(--xeno-control)", borderRadius: 2 } : void 0,
@@ -8917,11 +8816,11 @@ function FindPanelView({
8917
8816
  match.id
8918
8817
  );
8919
8818
  let flatIndex = -1;
8920
- return /* @__PURE__ */ jsxs11("div", { style: { display: "flex", flexDirection: "column", height: "100%", minHeight: 0 }, onKeyDown, children: [
8921
- /* @__PURE__ */ jsx12(
8819
+ return /* @__PURE__ */ jsxs12("div", { style: { display: "flex", flexDirection: "column", height: "100%", minHeight: 0 }, onKeyDown, children: [
8820
+ /* @__PURE__ */ jsx13(
8922
8821
  Toolbar4,
8923
8822
  {
8924
- left: /* @__PURE__ */ jsx12(
8823
+ left: /* @__PURE__ */ jsx13(
8925
8824
  SearchField4,
8926
8825
  {
8927
8826
  value: state.text,
@@ -8929,42 +8828,42 @@ function FindPanelView({
8929
8828
  placeholder
8930
8829
  }
8931
8830
  ),
8932
- right: /* @__PURE__ */ jsxs11(ToolbarGroup2, { end: true, children: [
8933
- /* @__PURE__ */ jsx12(
8934
- IconButton5,
8831
+ right: /* @__PURE__ */ jsxs12(ToolbarGroup2, { end: true, children: [
8832
+ /* @__PURE__ */ jsx13(
8833
+ IconButton6,
8935
8834
  {
8936
8835
  label: "Match case",
8937
8836
  active: state.options.caseSensitive,
8938
8837
  onClick: () => controller.setOptions({ caseSensitive: !state.options.caseSensitive }),
8939
- icon: /* @__PURE__ */ jsx12(CaseIcon, {})
8838
+ icon: /* @__PURE__ */ jsx13(CaseIcon, {})
8940
8839
  }
8941
8840
  ),
8942
- /* @__PURE__ */ jsx12(
8943
- IconButton5,
8841
+ /* @__PURE__ */ jsx13(
8842
+ IconButton6,
8944
8843
  {
8945
8844
  label: "Whole word",
8946
8845
  active: state.options.wholeWord,
8947
8846
  onClick: () => controller.setOptions({ wholeWord: !state.options.wholeWord }),
8948
- icon: /* @__PURE__ */ jsx12(WordIcon, {})
8847
+ icon: /* @__PURE__ */ jsx13(WordIcon, {})
8949
8848
  }
8950
8849
  ),
8951
- /* @__PURE__ */ jsx12(
8952
- IconButton5,
8850
+ /* @__PURE__ */ jsx13(
8851
+ IconButton6,
8953
8852
  {
8954
8853
  label: "Regular expression",
8955
8854
  active: state.options.regex,
8956
8855
  onClick: () => controller.setOptions({ regex: !state.options.regex }),
8957
- icon: /* @__PURE__ */ jsx12(RegexIcon, {})
8856
+ icon: /* @__PURE__ */ jsx13(RegexIcon, {})
8958
8857
  }
8959
8858
  )
8960
8859
  ] })
8961
8860
  }
8962
8861
  ),
8963
- /* @__PURE__ */ jsx12(
8862
+ /* @__PURE__ */ jsx13(
8964
8863
  Toolbar4,
8965
8864
  {
8966
8865
  divided: false,
8967
- left: /* @__PURE__ */ jsx12(
8866
+ left: /* @__PURE__ */ jsx13(
8968
8867
  StatusLine,
8969
8868
  {
8970
8869
  status: state.status,
@@ -8975,34 +8874,34 @@ function FindPanelView({
8975
8874
  hasText: state.text !== ""
8976
8875
  }
8977
8876
  ),
8978
- right: /* @__PURE__ */ jsxs11(ToolbarGroup2, { end: true, children: [
8979
- /* @__PURE__ */ jsx12(
8980
- IconButton5,
8877
+ right: /* @__PURE__ */ jsxs12(ToolbarGroup2, { end: true, children: [
8878
+ /* @__PURE__ */ jsx13(
8879
+ IconButton6,
8981
8880
  {
8982
8881
  label: "Previous match",
8983
8882
  disabled: state.matches.length === 0,
8984
8883
  onClick: () => controller.previous(),
8985
- icon: /* @__PURE__ */ jsx12(UpIcon, {})
8884
+ icon: /* @__PURE__ */ jsx13(UpIcon, {})
8986
8885
  }
8987
8886
  ),
8988
- /* @__PURE__ */ jsx12(
8989
- IconButton5,
8887
+ /* @__PURE__ */ jsx13(
8888
+ IconButton6,
8990
8889
  {
8991
8890
  label: "Next match",
8992
8891
  disabled: state.matches.length === 0,
8993
8892
  onClick: () => controller.next(),
8994
- icon: /* @__PURE__ */ jsx12(DownIcon, {})
8893
+ icon: /* @__PURE__ */ jsx13(DownIcon, {})
8995
8894
  }
8996
8895
  ),
8997
- /* @__PURE__ */ jsx12(TextButton2, { onClick: () => controller.setReplaceVisible(!state.replaceVisible), children: state.replaceVisible ? "Hide replace" : "Replace" })
8896
+ /* @__PURE__ */ jsx13(TextButton3, { onClick: () => controller.setReplaceVisible(!state.replaceVisible), children: state.replaceVisible ? "Hide replace" : "Replace" })
8998
8897
  ] })
8999
8898
  }
9000
8899
  ),
9001
- state.message && state.status === "invalidPattern" ? /* @__PURE__ */ jsx12("div", { style: { padding: "2px 8px 4px", fontSize: 9, opacity: 0.6 }, children: state.message }) : null,
9002
- state.replaceVisible ? /* @__PURE__ */ jsx12(
8900
+ state.message && state.status === "invalidPattern" ? /* @__PURE__ */ jsx13("div", { style: { padding: "2px 8px 4px", fontSize: 9, opacity: 0.6 }, children: state.message }) : null,
8901
+ state.replaceVisible ? /* @__PURE__ */ jsx13(
9003
8902
  Toolbar4,
9004
8903
  {
9005
- left: /* @__PURE__ */ jsx12(
8904
+ left: /* @__PURE__ */ jsx13(
9006
8905
  SearchField4,
9007
8906
  {
9008
8907
  value: state.replaceText,
@@ -9010,9 +8909,9 @@ function FindPanelView({
9010
8909
  placeholder: "Replace with"
9011
8910
  }
9012
8911
  ),
9013
- right: /* @__PURE__ */ jsxs11(ToolbarGroup2, { end: true, children: [
9014
- /* @__PURE__ */ jsx12(TextButton2, { disabled: !state.canReplace, onClick: () => controller.replaceCurrent(), children: "Replace" }),
9015
- /* @__PURE__ */ jsxs11(TextButton2, { disabled: !state.canReplace, onClick: () => controller.replaceAll(), children: [
8912
+ right: /* @__PURE__ */ jsxs12(ToolbarGroup2, { end: true, children: [
8913
+ /* @__PURE__ */ jsx13(TextButton3, { disabled: !state.canReplace, onClick: () => controller.replaceCurrent(), children: "Replace" }),
8914
+ /* @__PURE__ */ jsxs12(TextButton3, { disabled: !state.canReplace, onClick: () => controller.replaceAll(), children: [
9016
8915
  "All (",
9017
8916
  state.matches.length,
9018
8917
  ")"
@@ -9020,23 +8919,23 @@ function FindPanelView({
9020
8919
  ] })
9021
8920
  }
9022
8921
  ) : null,
9023
- showResults ? /* @__PURE__ */ jsx12(ScrollArea4, { children: state.status === "idle" ? /* @__PURE__ */ jsx12(EmptyState5, { title: "Find", hint: "Type to search. Enter goes to the next match." }) : state.status === "invalidPattern" ? /* @__PURE__ */ jsx12(
8922
+ showResults ? /* @__PURE__ */ jsx13(ScrollArea4, { children: state.status === "idle" ? /* @__PURE__ */ jsx13(EmptyState5, { title: "Find", hint: "Type to search. Enter goes to the next match." }) : state.status === "invalidPattern" ? /* @__PURE__ */ jsx13(
9024
8923
  EmptyState5,
9025
8924
  {
9026
8925
  title: "Invalid pattern",
9027
8926
  hint: state.message ?? "The expression could not be read. Fix it to search."
9028
8927
  }
9029
- ) : state.status === "failed" ? /* @__PURE__ */ jsx12(EmptyState5, { title: "Search failed", hint: state.message ?? "The host could not complete the search." }) : state.noResults ? /* @__PURE__ */ jsx12(EmptyState5, { title: "No matches", hint: `Nothing in scope matches \u201C${state.text}\u201D.` }) : state.groups.length === 1 && state.groups[0].id === "" ? /* @__PURE__ */ jsx12(RowList3, { children: state.matches.map((m) => renderMatch(m, ++flatIndex)) }) : state.groups.map((group) => /* @__PURE__ */ jsx12(
9030
- Section2,
8928
+ ) : state.status === "failed" ? /* @__PURE__ */ jsx13(EmptyState5, { title: "Search failed", hint: state.message ?? "The host could not complete the search." }) : state.noResults ? /* @__PURE__ */ jsx13(EmptyState5, { title: "No matches", hint: `Nothing in scope matches \u201C${state.text}\u201D.` }) : state.groups.length === 1 && state.groups[0].id === "" ? /* @__PURE__ */ jsx13(RowList3, { children: state.matches.map((m) => renderMatch(m, ++flatIndex)) }) : state.groups.map((group) => /* @__PURE__ */ jsx13(
8929
+ Section3,
9031
8930
  {
9032
8931
  title: group.label || "Results",
9033
8932
  flush: true,
9034
- badge: /* @__PURE__ */ jsx12(Badge5, { children: group.matches.length }),
9035
- children: /* @__PURE__ */ jsx12(RowList3, { children: group.matches.map((m) => renderMatch(m, ++flatIndex)) })
8933
+ badge: /* @__PURE__ */ jsx13(Badge5, { children: group.matches.length }),
8934
+ children: /* @__PURE__ */ jsx13(RowList3, { children: group.matches.map((m) => renderMatch(m, ++flatIndex)) })
9036
8935
  },
9037
8936
  group.id
9038
8937
  )) }) : null,
9039
- /* @__PURE__ */ jsx12(
8938
+ /* @__PURE__ */ jsx13(
9040
8939
  StatusBar5,
9041
8940
  {
9042
8941
  left: state.truncated ? `showing first ${state.matches.length}` : void 0,
@@ -9690,14 +9589,14 @@ import {
9690
9589
  Badge as Badge6,
9691
9590
  EmptyState as EmptyState6,
9692
9591
  ScrollArea as ScrollArea5,
9693
- Section as Section3,
9592
+ Section as Section4,
9694
9593
  SegmentedControl as SegmentedControl2,
9695
9594
  StatusBar as StatusBar6,
9696
- TextButton as TextButton3,
9595
+ TextButton as TextButton4,
9697
9596
  Toolbar as Toolbar5,
9698
9597
  ToolbarGroup as ToolbarGroup3
9699
9598
  } from "@xenosystem/components/chrome";
9700
- import { Fragment as Fragment7, jsx as jsx13, jsxs as jsxs12 } from "react/jsx-runtime";
9599
+ import { Fragment as Fragment6, jsx as jsx14, jsxs as jsxs13 } from "react/jsx-runtime";
9701
9600
  var ANCHOR_BADGE = {
9702
9601
  live: null,
9703
9602
  stale: {
@@ -9721,7 +9620,7 @@ function ThreadCard({
9721
9620
  const badge = ANCHOR_BADGE[anchorState];
9722
9621
  const replying = controller.getState().replyingTo === thread.id;
9723
9622
  const orphaned = anchorState === "orphaned";
9724
- return /* @__PURE__ */ jsx13(
9623
+ return /* @__PURE__ */ jsx14(
9725
9624
  "div",
9726
9625
  {
9727
9626
  style: {
@@ -9735,13 +9634,13 @@ function ThreadCard({
9735
9634
  event.preventDefault();
9736
9635
  controller.requestContextMenu(thread.id, event.clientX, event.clientY);
9737
9636
  },
9738
- children: /* @__PURE__ */ jsxs12("div", { style: { padding: "6px 8px", display: "flex", flexDirection: "column", gap: 4 }, children: [
9739
- /* @__PURE__ */ jsxs12("div", { style: { display: "flex", alignItems: "center", gap: 4 }, children: [
9740
- badge ? /* @__PURE__ */ jsx13(Badge6, { tone: badge.tone, title: badge.title, children: badge.label }) : null,
9741
- thread.resolved ? /* @__PURE__ */ jsx13(Badge6, { children: "resolved" }) : null,
9742
- /* @__PURE__ */ jsx13("span", { style: { marginLeft: "auto", fontSize: 9, opacity: 0.4 }, children: formatAge(thread.createdAt, now) })
9637
+ children: /* @__PURE__ */ jsxs13("div", { style: { padding: "6px 8px", display: "flex", flexDirection: "column", gap: 4 }, children: [
9638
+ /* @__PURE__ */ jsxs13("div", { style: { display: "flex", alignItems: "center", gap: 4 }, children: [
9639
+ badge ? /* @__PURE__ */ jsx14(Badge6, { tone: badge.tone, title: badge.title, children: badge.label }) : null,
9640
+ thread.resolved ? /* @__PURE__ */ jsx14(Badge6, { children: "resolved" }) : null,
9641
+ /* @__PURE__ */ jsx14("span", { style: { marginLeft: "auto", fontSize: 9, opacity: 0.4 }, children: formatAge(thread.createdAt, now) })
9743
9642
  ] }),
9744
- thread.anchorLabel ? /* @__PURE__ */ jsx13(
9643
+ thread.anchorLabel ? /* @__PURE__ */ jsx14(
9745
9644
  "button",
9746
9645
  {
9747
9646
  type: "button",
@@ -9764,16 +9663,16 @@ function ThreadCard({
9764
9663
  children: thread.anchorLabel
9765
9664
  }
9766
9665
  ) : null,
9767
- view.messages.map((message) => /* @__PURE__ */ jsxs12("div", { style: { display: "flex", flexDirection: "column", gap: 1 }, children: [
9768
- /* @__PURE__ */ jsxs12("div", { style: { display: "flex", alignItems: "baseline", gap: 4 }, children: [
9769
- /* @__PURE__ */ jsx13("span", { style: { fontSize: 10, fontWeight: 600 }, children: message.authorName ?? message.authorId }),
9770
- /* @__PURE__ */ jsx13("span", { style: { fontSize: 9, opacity: 0.35 }, children: formatAge(message.createdAt, now) }),
9771
- message.editedAt ? /* @__PURE__ */ jsx13("span", { style: { fontSize: 9, opacity: 0.3 }, children: "edited" }) : null
9666
+ view.messages.map((message) => /* @__PURE__ */ jsxs13("div", { style: { display: "flex", flexDirection: "column", gap: 1 }, children: [
9667
+ /* @__PURE__ */ jsxs13("div", { style: { display: "flex", alignItems: "baseline", gap: 4 }, children: [
9668
+ /* @__PURE__ */ jsx14("span", { style: { fontSize: 10, fontWeight: 600 }, children: message.authorName ?? message.authorId }),
9669
+ /* @__PURE__ */ jsx14("span", { style: { fontSize: 9, opacity: 0.35 }, children: formatAge(message.createdAt, now) }),
9670
+ message.editedAt ? /* @__PURE__ */ jsx14("span", { style: { fontSize: 9, opacity: 0.3 }, children: "edited" }) : null
9772
9671
  ] }),
9773
- /* @__PURE__ */ jsx13("p", { style: { fontSize: 11, opacity: 0.75, margin: 0, whiteSpace: "pre-wrap" }, children: message.body })
9672
+ /* @__PURE__ */ jsx14("p", { style: { fontSize: 11, opacity: 0.75, margin: 0, whiteSpace: "pre-wrap" }, children: message.body })
9774
9673
  ] }, message.id)),
9775
- allowReactions && thread.reactions?.length ? /* @__PURE__ */ jsx13("div", { style: { display: "flex", gap: 4 }, children: thread.reactions.map((reaction) => /* @__PURE__ */ jsxs12(
9776
- TextButton3,
9674
+ allowReactions && thread.reactions?.length ? /* @__PURE__ */ jsx14("div", { style: { display: "flex", gap: 4 }, children: thread.reactions.map((reaction) => /* @__PURE__ */ jsxs13(
9675
+ TextButton4,
9777
9676
  {
9778
9677
  onClick: () => controller.react(
9779
9678
  thread.id,
@@ -9788,8 +9687,8 @@ function ThreadCard({
9788
9687
  },
9789
9688
  reaction.emoji
9790
9689
  )) }) : null,
9791
- replying ? /* @__PURE__ */ jsxs12("div", { style: { display: "flex", gap: 4 }, children: [
9792
- /* @__PURE__ */ jsx13(
9690
+ replying ? /* @__PURE__ */ jsxs13("div", { style: { display: "flex", gap: 4 }, children: [
9691
+ /* @__PURE__ */ jsx14(
9793
9692
  "input",
9794
9693
  {
9795
9694
  value: controller.getState().replyDraft,
@@ -9816,11 +9715,11 @@ function ThreadCard({
9816
9715
  }
9817
9716
  }
9818
9717
  ),
9819
- /* @__PURE__ */ jsx13(TextButton3, { onClick: () => controller.reply(thread.id), children: "Send" })
9820
- ] }) : /* @__PURE__ */ jsxs12("div", { style: { display: "flex", gap: 6 }, children: [
9821
- /* @__PURE__ */ jsx13(TextButton3, { onClick: () => controller.setReplyingTo(thread.id), children: "Reply" }),
9822
- /* @__PURE__ */ jsx13(TextButton3, { onClick: () => controller.resolve(thread.id, !thread.resolved), children: thread.resolved ? "Reopen" : "Resolve" }),
9823
- /* @__PURE__ */ jsx13(TextButton3, { onClick: () => controller.remove(thread.id), children: "Delete" })
9718
+ /* @__PURE__ */ jsx14(TextButton4, { onClick: () => controller.reply(thread.id), children: "Send" })
9719
+ ] }) : /* @__PURE__ */ jsxs13("div", { style: { display: "flex", gap: 6 }, children: [
9720
+ /* @__PURE__ */ jsx14(TextButton4, { onClick: () => controller.setReplyingTo(thread.id), children: "Reply" }),
9721
+ /* @__PURE__ */ jsx14(TextButton4, { onClick: () => controller.resolve(thread.id, !thread.resolved), children: thread.resolved ? "Reopen" : "Resolve" }),
9722
+ /* @__PURE__ */ jsx14(TextButton4, { onClick: () => controller.remove(thread.id), children: "Delete" })
9824
9723
  ] })
9825
9724
  ] })
9826
9725
  }
@@ -9836,11 +9735,11 @@ function CommentsPanelView({
9836
9735
  const now = controller.clock();
9837
9736
  const open = state.threads.filter((t) => !t.thread.resolved);
9838
9737
  const resolved = state.threads.filter((t) => t.thread.resolved);
9839
- return /* @__PURE__ */ jsxs12("div", { style: { display: "flex", flexDirection: "column", height: "100%", minHeight: 0 }, children: [
9840
- /* @__PURE__ */ jsx13(
9738
+ return /* @__PURE__ */ jsxs13("div", { style: { display: "flex", flexDirection: "column", height: "100%", minHeight: 0 }, children: [
9739
+ /* @__PURE__ */ jsx14(
9841
9740
  Toolbar5,
9842
9741
  {
9843
- left: /* @__PURE__ */ jsx13(
9742
+ left: /* @__PURE__ */ jsx14(
9844
9743
  SegmentedControl2,
9845
9744
  {
9846
9745
  label: "Show",
@@ -9853,7 +9752,7 @@ function CommentsPanelView({
9853
9752
  ]
9854
9753
  }
9855
9754
  ),
9856
- right: /* @__PURE__ */ jsx13(ToolbarGroup3, { end: true, children: /* @__PURE__ */ jsx13(
9755
+ right: /* @__PURE__ */ jsx14(ToolbarGroup3, { end: true, children: /* @__PURE__ */ jsx14(
9857
9756
  SegmentedControl2,
9858
9757
  {
9859
9758
  label: "Sort",
@@ -9868,33 +9767,33 @@ function CommentsPanelView({
9868
9767
  ) })
9869
9768
  }
9870
9769
  ),
9871
- state.totals.orphaned > 0 ? /* @__PURE__ */ jsxs12("div", { style: { padding: "2px 8px", fontSize: 9, opacity: 0.6 }, children: [
9770
+ state.totals.orphaned > 0 ? /* @__PURE__ */ jsxs13("div", { style: { padding: "2px 8px", fontSize: 9, opacity: 0.6 }, children: [
9872
9771
  state.totals.orphaned,
9873
9772
  " comment",
9874
9773
  state.totals.orphaned === 1 ? "" : "s",
9875
9774
  " lost the content",
9876
9775
  state.totals.orphaned === 1 ? " it was" : " they were",
9877
9776
  " about.",
9878
- state.filter.includeOrphaned === false ? /* @__PURE__ */ jsx13(TextButton3, { onClick: () => controller.setFilter({ includeOrphaned: true }), children: "Show" }) : null
9777
+ state.filter.includeOrphaned === false ? /* @__PURE__ */ jsx14(TextButton4, { onClick: () => controller.setFilter({ includeOrphaned: true }), children: "Show" }) : null
9879
9778
  ] }) : null,
9880
- /* @__PURE__ */ jsx13(ScrollArea5, { children: state.threads.length === 0 ? state.filteredEmpty ? (
9779
+ /* @__PURE__ */ jsx14(ScrollArea5, { children: state.threads.length === 0 ? state.filteredEmpty ? (
9881
9780
  // NOT "no comments". There are comments; this filter hides them, and telling a
9882
9781
  // reviewer their feedback is gone is worse than telling them nothing.
9883
- /* @__PURE__ */ jsx13(
9782
+ /* @__PURE__ */ jsx14(
9884
9783
  EmptyState6,
9885
9784
  {
9886
9785
  title: "Nothing matches this filter",
9887
9786
  hint: `${state.totals.all} comment${state.totals.all === 1 ? "" : "s"} on this document.`
9888
9787
  }
9889
9788
  )
9890
- ) : /* @__PURE__ */ jsx13(
9789
+ ) : /* @__PURE__ */ jsx14(
9891
9790
  EmptyState6,
9892
9791
  {
9893
9792
  title: "No comments",
9894
9793
  hint: emptyHint ?? "Select something and add a comment."
9895
9794
  }
9896
- ) : /* @__PURE__ */ jsxs12(Fragment7, { children: [
9897
- open.map((view) => /* @__PURE__ */ jsx13(
9795
+ ) : /* @__PURE__ */ jsxs13(Fragment6, { children: [
9796
+ open.map((view) => /* @__PURE__ */ jsx14(
9898
9797
  ThreadCard,
9899
9798
  {
9900
9799
  view,
@@ -9904,7 +9803,7 @@ function CommentsPanelView({
9904
9803
  },
9905
9804
  view.thread.id
9906
9805
  )),
9907
- showResolved && resolved.length > 0 ? /* @__PURE__ */ jsx13(Section3, { title: `Resolved (${resolved.length})`, flush: true, children: resolved.map((view) => /* @__PURE__ */ jsx13(
9806
+ showResolved && resolved.length > 0 ? /* @__PURE__ */ jsx14(Section4, { title: `Resolved (${resolved.length})`, flush: true, children: resolved.map((view) => /* @__PURE__ */ jsx14(
9908
9807
  ThreadCard,
9909
9808
  {
9910
9809
  view,
@@ -9915,8 +9814,8 @@ function CommentsPanelView({
9915
9814
  view.thread.id
9916
9815
  )) }) : null
9917
9816
  ] }) }),
9918
- /* @__PURE__ */ jsxs12("div", { style: { borderTop: "1px solid var(--xeno-border-subtle)", padding: 6 }, children: [
9919
- /* @__PURE__ */ jsx13(
9817
+ /* @__PURE__ */ jsxs13("div", { style: { borderTop: "1px solid var(--xeno-border-subtle)", padding: 6 }, children: [
9818
+ /* @__PURE__ */ jsx14(
9920
9819
  "textarea",
9921
9820
  {
9922
9821
  value: state.draft,
@@ -9944,8 +9843,8 @@ function CommentsPanelView({
9944
9843
  }
9945
9844
  }
9946
9845
  ),
9947
- /* @__PURE__ */ jsx13("div", { style: { display: "flex", justifyContent: "flex-end", marginTop: 2 }, children: /* @__PURE__ */ jsx13(
9948
- TextButton3,
9846
+ /* @__PURE__ */ jsx14("div", { style: { display: "flex", justifyContent: "flex-end", marginTop: 2 }, children: /* @__PURE__ */ jsx14(
9847
+ TextButton4,
9949
9848
  {
9950
9849
  strong: true,
9951
9850
  disabled: state.activeAnchor === null || state.draft.trim() === "",
@@ -9954,7 +9853,7 @@ function CommentsPanelView({
9954
9853
  }
9955
9854
  ) })
9956
9855
  ] }),
9957
- /* @__PURE__ */ jsx13(
9856
+ /* @__PURE__ */ jsx14(
9958
9857
  StatusBar6,
9959
9858
  {
9960
9859
  left: `${state.totals.open} open`,
@@ -11128,7 +11027,7 @@ var nodegraphManifest = {
11128
11027
  // src/edit/nodegraph/react/NodeGraphPanelView.tsx
11129
11028
  import { useCallback as useCallback7, useEffect as useEffect7, useRef as useRef8, useSyncExternalStore as useSyncExternalStore9 } from "react";
11130
11029
  import { EmptyState as EmptyState7, StatusBar as StatusBar7, Toolbar as Toolbar6, ToolbarGroup as ToolbarGroup4 } from "@xenosystem/components/chrome";
11131
- import { Fragment as Fragment8, jsx as jsx14, jsxs as jsxs13 } from "react/jsx-runtime";
11030
+ import { Fragment as Fragment7, jsx as jsx15, jsxs as jsxs14 } from "react/jsx-runtime";
11132
11031
  var HEADER_H2 = 24;
11133
11032
  var PORT_ROW_H2 = 18;
11134
11033
  function NodeGraphPanelView({ controller }) {
@@ -11207,17 +11106,17 @@ function NodeGraphPanelView({ controller }) {
11207
11106
  const selectedNodes = new Set(state.selection.nodeIds);
11208
11107
  const selectedEdges = new Set(state.selection.edgeIds);
11209
11108
  const total = state.graph?.nodes.length ?? 0;
11210
- return /* @__PURE__ */ jsxs13("div", { style: SHELL2, children: [
11211
- /* @__PURE__ */ jsx14(
11109
+ return /* @__PURE__ */ jsxs14("div", { style: SHELL2, children: [
11110
+ /* @__PURE__ */ jsx15(
11212
11111
  Toolbar6,
11213
11112
  {
11214
- right: /* @__PURE__ */ jsxs13(ToolbarGroup4, { end: true, children: [
11215
- /* @__PURE__ */ jsx14("button", { type: "button", style: button2(), onClick: () => controller.fit(false), children: "Fit" }),
11216
- /* @__PURE__ */ jsx14("button", { type: "button", style: button2(), onClick: () => controller.fit(true), children: "Fit selection" })
11113
+ right: /* @__PURE__ */ jsxs14(ToolbarGroup4, { end: true, children: [
11114
+ /* @__PURE__ */ jsx15("button", { type: "button", style: button2(), onClick: () => controller.fit(false), children: "Fit" }),
11115
+ /* @__PURE__ */ jsx15("button", { type: "button", style: button2(), onClick: () => controller.fit(true), children: "Fit selection" })
11217
11116
  ] })
11218
11117
  }
11219
11118
  ),
11220
- total === 0 ? /* @__PURE__ */ jsx14(EmptyState7, { title: "Empty graph", hint: "Wire a host graph into this panel's input." }) : /* @__PURE__ */ jsxs13(
11119
+ total === 0 ? /* @__PURE__ */ jsx15(EmptyState7, { title: "Empty graph", hint: "Wire a host graph into this panel's input." }) : /* @__PURE__ */ jsxs14(
11221
11120
  "div",
11222
11121
  {
11223
11122
  ref: containerRef,
@@ -11232,15 +11131,15 @@ function NodeGraphPanelView({ controller }) {
11232
11131
  onPointerCancel: onPointerUp,
11233
11132
  onKeyDown,
11234
11133
  children: [
11235
- /* @__PURE__ */ jsx14(
11134
+ /* @__PURE__ */ jsx15(
11236
11135
  "svg",
11237
11136
  {
11238
11137
  "data-canvas": "nodegraph-surface",
11239
11138
  width: "100%",
11240
11139
  height: "100%",
11241
11140
  style: { position: "absolute", inset: 0, display: "block" },
11242
- children: /* @__PURE__ */ jsxs13("g", { transform: `translate(${-scale.x * scale.zoom} ${-scale.y * scale.zoom}) scale(${scale.zoom})`, children: [
11243
- state.edges.map(({ edge, from, to }) => /* @__PURE__ */ jsx14(
11141
+ children: /* @__PURE__ */ jsxs14("g", { transform: `translate(${-scale.x * scale.zoom} ${-scale.y * scale.zoom}) scale(${scale.zoom})`, children: [
11142
+ state.edges.map(({ edge, from, to }) => /* @__PURE__ */ jsx15(
11244
11143
  "path",
11245
11144
  {
11246
11145
  d: edgePath(from, to),
@@ -11251,8 +11150,8 @@ function NodeGraphPanelView({ controller }) {
11251
11150
  },
11252
11151
  edge.id
11253
11152
  )),
11254
- preview?.connection ? /* @__PURE__ */ jsx14(PendingWire, { controller, preview, zoom: scale.zoom }) : null,
11255
- state.nodes.map((node) => /* @__PURE__ */ jsx14(
11153
+ preview?.connection ? /* @__PURE__ */ jsx15(PendingWire, { controller, preview, zoom: scale.zoom }) : null,
11154
+ state.nodes.map((node) => /* @__PURE__ */ jsx15(
11256
11155
  NodeRect,
11257
11156
  {
11258
11157
  node,
@@ -11261,7 +11160,7 @@ function NodeGraphPanelView({ controller }) {
11261
11160
  },
11262
11161
  node.id
11263
11162
  )),
11264
- preview?.marquee ? /* @__PURE__ */ jsx14(
11163
+ preview?.marquee ? /* @__PURE__ */ jsx15(
11265
11164
  "rect",
11266
11165
  {
11267
11166
  x: preview.marquee.x,
@@ -11276,15 +11175,15 @@ function NodeGraphPanelView({ controller }) {
11276
11175
  ] })
11277
11176
  }
11278
11177
  ),
11279
- preview?.connection && !preview.connection.verdict.ok && preview.connection.target ? /* @__PURE__ */ jsx14("div", { style: REASON, children: preview.connection.verdict.reason }) : null
11178
+ preview?.connection && !preview.connection.verdict.ok && preview.connection.target ? /* @__PURE__ */ jsx15("div", { style: REASON, children: preview.connection.verdict.reason }) : null
11280
11179
  ]
11281
11180
  }
11282
11181
  ),
11283
- /* @__PURE__ */ jsx14(
11182
+ /* @__PURE__ */ jsx15(
11284
11183
  StatusBar7,
11285
11184
  {
11286
11185
  left: `${total} node${total === 1 ? "" : "s"}`,
11287
- right: /* @__PURE__ */ jsxs13("span", { className: "tabular-nums", children: [
11186
+ right: /* @__PURE__ */ jsxs14("span", { className: "tabular-nums", children: [
11288
11187
  Math.round(scale.zoom * 100),
11289
11188
  "%"
11290
11189
  ] })
@@ -11302,7 +11201,7 @@ function PendingWire({
11302
11201
  const from = controller.portPosition(connection.source.nodeId, connection.source.portId);
11303
11202
  if (!from) return null;
11304
11203
  const ok = connection.verdict.ok;
11305
- return /* @__PURE__ */ jsx14(
11204
+ return /* @__PURE__ */ jsx15(
11306
11205
  "path",
11307
11206
  {
11308
11207
  d: edgePath(from, connection.to),
@@ -11315,8 +11214,8 @@ function PendingWire({
11315
11214
  }
11316
11215
  function NodeRect({ node, selected, zoom }) {
11317
11216
  const height = node.collapsed ? HEADER_H2 : node.height;
11318
- return /* @__PURE__ */ jsxs13("g", { opacity: node.disabled ? 0.45 : 1, children: [
11319
- /* @__PURE__ */ jsx14(
11217
+ return /* @__PURE__ */ jsxs14("g", { opacity: node.disabled ? 0.45 : 1, children: [
11218
+ /* @__PURE__ */ jsx15(
11320
11219
  "rect",
11321
11220
  {
11322
11221
  x: node.x,
@@ -11329,7 +11228,7 @@ function NodeRect({ node, selected, zoom }) {
11329
11228
  strokeWidth: (selected ? 1.5 : 1) / zoom
11330
11229
  }
11331
11230
  ),
11332
- /* @__PURE__ */ jsx14(
11231
+ /* @__PURE__ */ jsx15(
11333
11232
  "rect",
11334
11233
  {
11335
11234
  x: node.x,
@@ -11340,7 +11239,7 @@ function NodeRect({ node, selected, zoom }) {
11340
11239
  fill: node.color ?? "var(--xeno-border)"
11341
11240
  }
11342
11241
  ),
11343
- /* @__PURE__ */ jsx14(
11242
+ /* @__PURE__ */ jsx15(
11344
11243
  "text",
11345
11244
  {
11346
11245
  x: node.x + 8,
@@ -11351,8 +11250,8 @@ function NodeRect({ node, selected, zoom }) {
11351
11250
  children: node.title
11352
11251
  }
11353
11252
  ),
11354
- node.collapsed ? null : /* @__PURE__ */ jsxs13(Fragment8, { children: [
11355
- node.inputs.map((port, i) => /* @__PURE__ */ jsx14(
11253
+ node.collapsed ? null : /* @__PURE__ */ jsxs14(Fragment7, { children: [
11254
+ node.inputs.map((port, i) => /* @__PURE__ */ jsx15(
11356
11255
  Port,
11357
11256
  {
11358
11257
  x: node.x,
@@ -11363,7 +11262,7 @@ function NodeRect({ node, selected, zoom }) {
11363
11262
  },
11364
11263
  port.id
11365
11264
  )),
11366
- node.outputs.map((port, i) => /* @__PURE__ */ jsx14(
11265
+ node.outputs.map((port, i) => /* @__PURE__ */ jsx15(
11367
11266
  Port,
11368
11267
  {
11369
11268
  x: node.x + node.width,
@@ -11384,8 +11283,8 @@ function Port({
11384
11283
  align,
11385
11284
  disabled
11386
11285
  }) {
11387
- return /* @__PURE__ */ jsxs13("g", { opacity: disabled ? 0.4 : 1, children: [
11388
- /* @__PURE__ */ jsx14(
11286
+ return /* @__PURE__ */ jsxs14("g", { opacity: disabled ? 0.4 : 1, children: [
11287
+ /* @__PURE__ */ jsx15(
11389
11288
  "rect",
11390
11289
  {
11391
11290
  x: x - 3,
@@ -11397,7 +11296,7 @@ function Port({
11397
11296
  strokeWidth: 0.5
11398
11297
  }
11399
11298
  ),
11400
- /* @__PURE__ */ jsx14(
11299
+ /* @__PURE__ */ jsx15(
11401
11300
  "text",
11402
11301
  {
11403
11302
  x: align === "left" ? x + 8 : x - 8,
@@ -12659,7 +12558,7 @@ import {
12659
12558
  Badge as Badge7,
12660
12559
  EmptyState as EmptyState8,
12661
12560
  ErrorState,
12662
- IconButton as IconButton6,
12561
+ IconButton as IconButton7,
12663
12562
  LoadingState,
12664
12563
  Row as Row4,
12665
12564
  ScrollArea as ScrollArea6,
@@ -12671,9 +12570,9 @@ import {
12671
12570
  import { computeWindow as computeWindow3 } from "@xenosystem/tree-core";
12672
12571
 
12673
12572
  // src/edit/tree/react/icons.tsx
12674
- import { Fragment as Fragment9, jsx as jsx15, jsxs as jsxs14 } from "react/jsx-runtime";
12573
+ import { Fragment as Fragment8, jsx as jsx16, jsxs as jsxs15 } from "react/jsx-runtime";
12675
12574
  function Svg({ children, size = 11 }) {
12676
- return /* @__PURE__ */ jsx15(
12575
+ return /* @__PURE__ */ jsx16(
12677
12576
  "svg",
12678
12577
  {
12679
12578
  width: size,
@@ -12690,84 +12589,84 @@ function Svg({ children, size = 11 }) {
12690
12589
  );
12691
12590
  }
12692
12591
  function ChevronGlyph() {
12693
- return /* @__PURE__ */ jsx15(Svg, { size: 9, children: /* @__PURE__ */ jsx15("path", { d: "m9 18 6-6-6-6" }) });
12592
+ return /* @__PURE__ */ jsx16(Svg, { size: 9, children: /* @__PURE__ */ jsx16("path", { d: "m9 18 6-6-6-6" }) });
12694
12593
  }
12695
12594
  function ExpandGlyph() {
12696
- return /* @__PURE__ */ jsxs14(Svg, { children: [
12697
- /* @__PURE__ */ jsx15("path", { d: "M12 22v-6" }),
12698
- /* @__PURE__ */ jsx15("path", { d: "M12 8V2" }),
12699
- /* @__PURE__ */ jsx15("path", { d: "m9 5 3-3 3 3" }),
12700
- /* @__PURE__ */ jsx15("path", { d: "m9 19 3 3 3-3" }),
12701
- /* @__PURE__ */ jsx15("path", { d: "M4 12H2" }),
12702
- /* @__PURE__ */ jsx15("path", { d: "M10 12H8" }),
12703
- /* @__PURE__ */ jsx15("path", { d: "M16 12h-2" }),
12704
- /* @__PURE__ */ jsx15("path", { d: "M22 12h-2" })
12595
+ return /* @__PURE__ */ jsxs15(Svg, { children: [
12596
+ /* @__PURE__ */ jsx16("path", { d: "M12 22v-6" }),
12597
+ /* @__PURE__ */ jsx16("path", { d: "M12 8V2" }),
12598
+ /* @__PURE__ */ jsx16("path", { d: "m9 5 3-3 3 3" }),
12599
+ /* @__PURE__ */ jsx16("path", { d: "m9 19 3 3 3-3" }),
12600
+ /* @__PURE__ */ jsx16("path", { d: "M4 12H2" }),
12601
+ /* @__PURE__ */ jsx16("path", { d: "M10 12H8" }),
12602
+ /* @__PURE__ */ jsx16("path", { d: "M16 12h-2" }),
12603
+ /* @__PURE__ */ jsx16("path", { d: "M22 12h-2" })
12705
12604
  ] });
12706
12605
  }
12707
12606
  function CollapseGlyph() {
12708
- return /* @__PURE__ */ jsxs14(Svg, { children: [
12709
- /* @__PURE__ */ jsx15("path", { d: "M12 22v-6" }),
12710
- /* @__PURE__ */ jsx15("path", { d: "M12 8V2" }),
12711
- /* @__PURE__ */ jsx15("path", { d: "m9 13 3 3 3-3" }),
12712
- /* @__PURE__ */ jsx15("path", { d: "m9 11 3-3 3 3" }),
12713
- /* @__PURE__ */ jsx15("path", { d: "M4 12H2" }),
12714
- /* @__PURE__ */ jsx15("path", { d: "M22 12h-2" })
12607
+ return /* @__PURE__ */ jsxs15(Svg, { children: [
12608
+ /* @__PURE__ */ jsx16("path", { d: "M12 22v-6" }),
12609
+ /* @__PURE__ */ jsx16("path", { d: "M12 8V2" }),
12610
+ /* @__PURE__ */ jsx16("path", { d: "m9 13 3 3 3-3" }),
12611
+ /* @__PURE__ */ jsx16("path", { d: "m9 11 3-3 3 3" }),
12612
+ /* @__PURE__ */ jsx16("path", { d: "M4 12H2" }),
12613
+ /* @__PURE__ */ jsx16("path", { d: "M22 12h-2" })
12715
12614
  ] });
12716
12615
  }
12717
12616
  function RefreshGlyph() {
12718
- return /* @__PURE__ */ jsxs14(Svg, { children: [
12719
- /* @__PURE__ */ jsx15("path", { d: "M21 12a9 9 0 0 0-9-9 9.75 9.75 0 0 0-6.74 2.74L3 8" }),
12720
- /* @__PURE__ */ jsx15("path", { d: "M3 3v5h5" }),
12721
- /* @__PURE__ */ jsx15("path", { d: "M3 12a9 9 0 0 0 9 9 9.75 9.75 0 0 0 6.74-2.74L21 16" }),
12722
- /* @__PURE__ */ jsx15("path", { d: "M16 16h5v5" })
12617
+ return /* @__PURE__ */ jsxs15(Svg, { children: [
12618
+ /* @__PURE__ */ jsx16("path", { d: "M21 12a9 9 0 0 0-9-9 9.75 9.75 0 0 0-6.74 2.74L3 8" }),
12619
+ /* @__PURE__ */ jsx16("path", { d: "M3 3v5h5" }),
12620
+ /* @__PURE__ */ jsx16("path", { d: "M3 12a9 9 0 0 0 9 9 9.75 9.75 0 0 0 6.74-2.74L21 16" }),
12621
+ /* @__PURE__ */ jsx16("path", { d: "M16 16h5v5" })
12723
12622
  ] });
12724
12623
  }
12725
12624
  var PATHS = {
12726
- folder: /* @__PURE__ */ jsx15("path", { d: "M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z" }),
12727
- file: /* @__PURE__ */ jsxs14(Fragment9, { children: [
12728
- /* @__PURE__ */ jsx15("path", { d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z" }),
12729
- /* @__PURE__ */ jsx15("path", { d: "M14 2v4a2 2 0 0 0 2 2h4" })
12625
+ folder: /* @__PURE__ */ jsx16("path", { d: "M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z" }),
12626
+ file: /* @__PURE__ */ jsxs15(Fragment8, { children: [
12627
+ /* @__PURE__ */ jsx16("path", { d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z" }),
12628
+ /* @__PURE__ */ jsx16("path", { d: "M14 2v4a2 2 0 0 0 2 2h4" })
12730
12629
  ] }),
12731
- "folder-tree": /* @__PURE__ */ jsxs14(Fragment9, { children: [
12732
- /* @__PURE__ */ jsx15("path", { d: "M20 10a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1h-2.5a1 1 0 0 1-.8-.4l-.9-1.2A1 1 0 0 0 15 3h-2a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z" }),
12733
- /* @__PURE__ */ jsx15("path", { d: "M20 21a1 1 0 0 0 1-1v-3a1 1 0 0 0-1-1h-2.5a1 1 0 0 1-.8-.4l-.9-1.2a1 1 0 0 0-.8-.4h-2a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z" }),
12734
- /* @__PURE__ */ jsx15("path", { d: "M3 5a2 2 0 0 0 2 2h3" }),
12735
- /* @__PURE__ */ jsx15("path", { d: "M3 3v13a2 2 0 0 0 2 2h3" })
12630
+ "folder-tree": /* @__PURE__ */ jsxs15(Fragment8, { children: [
12631
+ /* @__PURE__ */ jsx16("path", { d: "M20 10a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1h-2.5a1 1 0 0 1-.8-.4l-.9-1.2A1 1 0 0 0 15 3h-2a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z" }),
12632
+ /* @__PURE__ */ jsx16("path", { d: "M20 21a1 1 0 0 0 1-1v-3a1 1 0 0 0-1-1h-2.5a1 1 0 0 1-.8-.4l-.9-1.2a1 1 0 0 0-.8-.4h-2a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z" }),
12633
+ /* @__PURE__ */ jsx16("path", { d: "M3 5a2 2 0 0 0 2 2h3" }),
12634
+ /* @__PURE__ */ jsx16("path", { d: "M3 3v13a2 2 0 0 0 2 2h3" })
12736
12635
  ] }),
12737
- box: /* @__PURE__ */ jsxs14(Fragment9, { children: [
12738
- /* @__PURE__ */ jsx15("path", { d: "M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z" }),
12739
- /* @__PURE__ */ jsx15("path", { d: "m3.3 7 8.7 5 8.7-5" }),
12740
- /* @__PURE__ */ jsx15("path", { d: "M12 22V12" })
12636
+ box: /* @__PURE__ */ jsxs15(Fragment8, { children: [
12637
+ /* @__PURE__ */ jsx16("path", { d: "M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z" }),
12638
+ /* @__PURE__ */ jsx16("path", { d: "m3.3 7 8.7 5 8.7-5" }),
12639
+ /* @__PURE__ */ jsx16("path", { d: "M12 22V12" })
12741
12640
  ] }),
12742
- component: /* @__PURE__ */ jsx15("path", { d: "m12 2 4 4-4 4-4-4Zm0 12 4 4-4 4-4-4ZM2 12l4-4 4 4-4 4Zm12 0 4-4 4 4-4 4Z" }),
12743
- "file-text": /* @__PURE__ */ jsxs14(Fragment9, { children: [
12744
- /* @__PURE__ */ jsx15("path", { d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z" }),
12745
- /* @__PURE__ */ jsx15("path", { d: "M14 2v4a2 2 0 0 0 2 2h4" }),
12746
- /* @__PURE__ */ jsx15("path", { d: "M8 13h8M8 17h5" })
12641
+ component: /* @__PURE__ */ jsx16("path", { d: "m12 2 4 4-4 4-4-4Zm0 12 4 4-4 4-4-4ZM2 12l4-4 4 4-4 4Zm12 0 4-4 4 4-4 4Z" }),
12642
+ "file-text": /* @__PURE__ */ jsxs15(Fragment8, { children: [
12643
+ /* @__PURE__ */ jsx16("path", { d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z" }),
12644
+ /* @__PURE__ */ jsx16("path", { d: "M14 2v4a2 2 0 0 0 2 2h4" }),
12645
+ /* @__PURE__ */ jsx16("path", { d: "M8 13h8M8 17h5" })
12747
12646
  ] }),
12748
- heading: /* @__PURE__ */ jsx15(Fragment9, { children: /* @__PURE__ */ jsx15("path", { d: "M6 4v16M18 4v16M6 12h12" }) }),
12749
- bot: /* @__PURE__ */ jsxs14(Fragment9, { children: [
12750
- /* @__PURE__ */ jsx15("rect", { x: "3", y: "8", width: "18", height: "12", rx: "2" }),
12751
- /* @__PURE__ */ jsx15("path", { d: "M12 4v4M8 14h.01M16 14h.01" })
12647
+ heading: /* @__PURE__ */ jsx16(Fragment8, { children: /* @__PURE__ */ jsx16("path", { d: "M6 4v16M18 4v16M6 12h12" }) }),
12648
+ bot: /* @__PURE__ */ jsxs15(Fragment8, { children: [
12649
+ /* @__PURE__ */ jsx16("rect", { x: "3", y: "8", width: "18", height: "12", rx: "2" }),
12650
+ /* @__PURE__ */ jsx16("path", { d: "M12 4v4M8 14h.01M16 14h.01" })
12752
12651
  ] }),
12753
- link: /* @__PURE__ */ jsxs14(Fragment9, { children: [
12754
- /* @__PURE__ */ jsx15("path", { d: "M10 13a5 5 0 0 0 7.5.5l3-3a5 5 0 0 0-7-7l-1.8 1.7" }),
12755
- /* @__PURE__ */ jsx15("path", { d: "M14 11a5 5 0 0 0-7.5-.5l-3 3a5 5 0 0 0 7 7l1.8-1.7" })
12652
+ link: /* @__PURE__ */ jsxs15(Fragment8, { children: [
12653
+ /* @__PURE__ */ jsx16("path", { d: "M10 13a5 5 0 0 0 7.5.5l3-3a5 5 0 0 0-7-7l-1.8 1.7" }),
12654
+ /* @__PURE__ */ jsx16("path", { d: "M14 11a5 5 0 0 0-7.5-.5l-3 3a5 5 0 0 0 7 7l1.8-1.7" })
12756
12655
  ] }),
12757
- "link-2-off": /* @__PURE__ */ jsxs14(Fragment9, { children: [
12758
- /* @__PURE__ */ jsx15("path", { d: "M9 17H7A5 5 0 0 1 7 7" }),
12759
- /* @__PURE__ */ jsx15("path", { d: "M15 7h2a5 5 0 0 1 4 8" }),
12760
- /* @__PURE__ */ jsx15("path", { d: "M8 12h4" }),
12761
- /* @__PURE__ */ jsx15("path", { d: "m2 2 20 20" })
12656
+ "link-2-off": /* @__PURE__ */ jsxs15(Fragment8, { children: [
12657
+ /* @__PURE__ */ jsx16("path", { d: "M9 17H7A5 5 0 0 1 7 7" }),
12658
+ /* @__PURE__ */ jsx16("path", { d: "M15 7h2a5 5 0 0 1 4 8" }),
12659
+ /* @__PURE__ */ jsx16("path", { d: "M8 12h4" }),
12660
+ /* @__PURE__ */ jsx16("path", { d: "m2 2 20 20" })
12762
12661
  ] }),
12763
- "circle-dot": /* @__PURE__ */ jsx15("rect", { x: "9", y: "9", width: "6", height: "6", rx: "1" })
12662
+ "circle-dot": /* @__PURE__ */ jsx16("rect", { x: "9", y: "9", width: "6", height: "6", rx: "1" })
12764
12663
  };
12765
12664
  function TreeIcon({ name, size = 11 }) {
12766
- return /* @__PURE__ */ jsx15(Svg, { size, children: PATHS[name] ?? PATHS["circle-dot"] });
12665
+ return /* @__PURE__ */ jsx16(Svg, { size, children: PATHS[name] ?? PATHS["circle-dot"] });
12767
12666
  }
12768
12667
 
12769
12668
  // src/edit/tree/react/TreePanelView.tsx
12770
- import { Fragment as Fragment10, jsx as jsx16, jsxs as jsxs15 } from "react/jsx-runtime";
12669
+ import { Fragment as Fragment9, jsx as jsx17, jsxs as jsxs16 } from "react/jsx-runtime";
12771
12670
  function TreePanelView({
12772
12671
  controller,
12773
12672
  rowHeight = 24,
@@ -12799,13 +12698,13 @@ function TreePanelView({
12799
12698
  const sourceState = source?.sourceState ?? "idle";
12800
12699
  const body = (() => {
12801
12700
  if (!source || sourceState === "idle") {
12802
- return /* @__PURE__ */ jsx16(EmptyState8, { title: "No source", hint: emptyHint ?? "Connect a source to browse it." });
12701
+ return /* @__PURE__ */ jsx17(EmptyState8, { title: "No source", hint: emptyHint ?? "Connect a source to browse it." });
12803
12702
  }
12804
12703
  if (sourceState === "loading" && state.rows.length === 0) {
12805
- return /* @__PURE__ */ jsx16(LoadingState, { label: source.sourceMessage ?? "Loading\u2026" });
12704
+ return /* @__PURE__ */ jsx17(LoadingState, { label: source.sourceMessage ?? "Loading\u2026" });
12806
12705
  }
12807
12706
  if (sourceState === "error" || sourceState === "denied") {
12808
- return /* @__PURE__ */ jsx16(
12707
+ return /* @__PURE__ */ jsx17(
12809
12708
  ErrorState,
12810
12709
  {
12811
12710
  title: sourceState === "denied" ? "Access not granted" : "Could not read this source",
@@ -12816,7 +12715,7 @@ function TreePanelView({
12816
12715
  );
12817
12716
  }
12818
12717
  if (state.rows.length === 0) {
12819
- return state.filter ? /* @__PURE__ */ jsx16(EmptyState8, { title: "No matches", hint: `Nothing matches \u201C${state.filter}\u201D.` }) : /* @__PURE__ */ jsx16(
12718
+ return state.filter ? /* @__PURE__ */ jsx17(EmptyState8, { title: "No matches", hint: `Nothing matches \u201C${state.filter}\u201D.` }) : /* @__PURE__ */ jsx17(
12820
12719
  EmptyState8,
12821
12720
  {
12822
12721
  title: "Nothing here",
@@ -12832,7 +12731,7 @@ function TreePanelView({
12832
12731
  overscan
12833
12732
  });
12834
12733
  const slice = state.rows.slice(window2.startIndex, window2.endIndex);
12835
- return /* @__PURE__ */ jsx16(ScrollArea6, { children: /* @__PURE__ */ jsx16(
12734
+ return /* @__PURE__ */ jsx17(ScrollArea6, { children: /* @__PURE__ */ jsx17(
12836
12735
  "div",
12837
12736
  {
12838
12737
  ref: scrollRef,
@@ -12846,7 +12745,7 @@ function TreePanelView({
12846
12745
  e.preventDefault();
12847
12746
  }
12848
12747
  },
12849
- children: /* @__PURE__ */ jsx16("div", { style: { height: window2.totalHeight, position: "relative" }, children: /* @__PURE__ */ jsx16("div", { style: { transform: `translateY(${window2.offsetTop}px)` }, children: slice.map((row) => /* @__PURE__ */ jsx16(
12748
+ children: /* @__PURE__ */ jsx17("div", { style: { height: window2.totalHeight, position: "relative" }, children: /* @__PURE__ */ jsx17("div", { style: { transform: `translateY(${window2.offsetTop}px)` }, children: slice.map((row) => /* @__PURE__ */ jsx17(
12850
12749
  TreeRowView,
12851
12750
  {
12852
12751
  row,
@@ -12862,11 +12761,11 @@ function TreePanelView({
12862
12761
  }
12863
12762
  ) });
12864
12763
  })();
12865
- return /* @__PURE__ */ jsxs15("div", { style: { display: "flex", flexDirection: "column", height: "100%", minHeight: 0 }, children: [
12866
- /* @__PURE__ */ jsx16(
12764
+ return /* @__PURE__ */ jsxs16("div", { style: { display: "flex", flexDirection: "column", height: "100%", minHeight: 0 }, children: [
12765
+ /* @__PURE__ */ jsx17(
12867
12766
  Toolbar7,
12868
12767
  {
12869
- left: showSearch ? /* @__PURE__ */ jsx16(
12768
+ left: showSearch ? /* @__PURE__ */ jsx17(
12870
12769
  SearchField5,
12871
12770
  {
12872
12771
  value: state.filter,
@@ -12874,22 +12773,22 @@ function TreePanelView({
12874
12773
  placeholder: "Filter\u2026"
12875
12774
  }
12876
12775
  ) : void 0,
12877
- right: /* @__PURE__ */ jsxs15(ToolbarGroup5, { end: true, children: [
12878
- /* @__PURE__ */ jsx16(IconButton6, { icon: /* @__PURE__ */ jsx16(ExpandGlyph, {}), label: "Expand all", onClick: () => controller.expandAll() }),
12879
- /* @__PURE__ */ jsx16(
12880
- IconButton6,
12776
+ right: /* @__PURE__ */ jsxs16(ToolbarGroup5, { end: true, children: [
12777
+ /* @__PURE__ */ jsx17(IconButton7, { icon: /* @__PURE__ */ jsx17(ExpandGlyph, {}), label: "Expand all", onClick: () => controller.expandAll() }),
12778
+ /* @__PURE__ */ jsx17(
12779
+ IconButton7,
12881
12780
  {
12882
- icon: /* @__PURE__ */ jsx16(CollapseGlyph, {}),
12781
+ icon: /* @__PURE__ */ jsx17(CollapseGlyph, {}),
12883
12782
  label: "Collapse all",
12884
12783
  onClick: () => controller.collapseAll()
12885
12784
  }
12886
12785
  ),
12887
- /* @__PURE__ */ jsx16(IconButton6, { icon: /* @__PURE__ */ jsx16(RefreshGlyph, {}), label: "Refresh", onClick: () => controller.refresh() })
12786
+ /* @__PURE__ */ jsx17(IconButton7, { icon: /* @__PURE__ */ jsx17(RefreshGlyph, {}), label: "Refresh", onClick: () => controller.refresh() })
12888
12787
  ] })
12889
12788
  }
12890
12789
  ),
12891
12790
  body,
12892
- /* @__PURE__ */ jsx16(
12791
+ /* @__PURE__ */ jsx17(
12893
12792
  StatusBar8,
12894
12793
  {
12895
12794
  left: `${state.rows.length} item${state.rows.length === 1 ? "" : "s"}`,
@@ -12911,7 +12810,7 @@ function TreeRowView({
12911
12810
  const selected = state.selection.includes(row.id);
12912
12811
  const renaming = state.renaming?.id === row.id ? state.renaming : null;
12913
12812
  const drop = state.drag?.targetId === row.id ? state.drag : null;
12914
- const twisty = row.container ? /* @__PURE__ */ jsx16(
12813
+ const twisty = row.container ? /* @__PURE__ */ jsx17(
12915
12814
  "span",
12916
12815
  {
12917
12816
  role: "button",
@@ -12931,13 +12830,13 @@ function TreeRowView({
12931
12830
  transition: "transform 80ms ease",
12932
12831
  opacity: 0.7
12933
12832
  },
12934
- children: /* @__PURE__ */ jsx16(ChevronGlyph, {})
12833
+ children: /* @__PURE__ */ jsx17(ChevronGlyph, {})
12935
12834
  }
12936
12835
  ) : (
12937
12836
  // A leaf still reserves the twisty column, so labels stay in ONE column across mixed rows.
12938
- /* @__PURE__ */ jsx16("span", { style: { width: 12, flex: "0 0 auto" } })
12837
+ /* @__PURE__ */ jsx17("span", { style: { width: 12, flex: "0 0 auto" } })
12939
12838
  );
12940
- return /* @__PURE__ */ jsx16(
12839
+ return /* @__PURE__ */ jsx17(
12941
12840
  "div",
12942
12841
  {
12943
12842
  style: {
@@ -12948,7 +12847,7 @@ function TreeRowView({
12948
12847
  boxShadow: drop?.position === "into" ? "inset 0 0 0 1px var(--xeno-active)" : drop?.position === "before" ? "inset 0 1px 0 0 var(--xeno-active)" : drop?.position === "after" ? "inset 0 -1px 0 0 var(--xeno-active)" : void 0
12949
12848
  },
12950
12849
  title: drop?.reason,
12951
- children: /* @__PURE__ */ jsx16(
12850
+ children: /* @__PURE__ */ jsx17(
12952
12851
  Row4,
12953
12852
  {
12954
12853
  role: "treeitem",
@@ -12984,11 +12883,11 @@ function TreeRowView({
12984
12883
  onPointerUp: () => {
12985
12884
  if (state.drag) controller.endDrag();
12986
12885
  },
12987
- icon: /* @__PURE__ */ jsxs15(Fragment10, { children: [
12886
+ icon: /* @__PURE__ */ jsxs16(Fragment9, { children: [
12988
12887
  twisty,
12989
- /* @__PURE__ */ jsx16(NodeIcon, { icon: node.icon ?? defaultIconFor(node.kind) })
12888
+ /* @__PURE__ */ jsx17(NodeIcon, { icon: node.icon ?? defaultIconFor(node.kind) })
12990
12889
  ] }),
12991
- label: renaming ? /* @__PURE__ */ jsx16(
12890
+ label: renaming ? /* @__PURE__ */ jsx17(
12992
12891
  "input",
12993
12892
  {
12994
12893
  autoFocus: true,
@@ -13013,19 +12912,19 @@ function TreeRowView({
13013
12912
  }
13014
12913
  }
13015
12914
  ) : node.label,
13016
- meta: /* @__PURE__ */ jsx16(ChildStateChip, { row, controller }),
13017
- trailing: /* @__PURE__ */ jsxs15(Fragment10, { children: [
13018
- columns?.map((columnId) => /* @__PURE__ */ jsx16("span", { style: { opacity: 0.7, fontVariantNumeric: "tabular-nums" }, children: node.columns?.[columnId] ?? "" }, columnId)),
13019
- node.glyphs?.map((glyph) => /* @__PURE__ */ jsx16("span", { title: glyph.title, style: { display: "flex", opacity: 0.7 }, children: /* @__PURE__ */ jsx16(NodeIcon, { icon: glyph.icon }) }, glyph.id)),
12915
+ meta: /* @__PURE__ */ jsx17(ChildStateChip, { row, controller }),
12916
+ trailing: /* @__PURE__ */ jsxs16(Fragment9, { children: [
12917
+ columns?.map((columnId) => /* @__PURE__ */ jsx17("span", { style: { opacity: 0.7, fontVariantNumeric: "tabular-nums" }, children: node.columns?.[columnId] ?? "" }, columnId)),
12918
+ node.glyphs?.map((glyph) => /* @__PURE__ */ jsx17("span", { title: glyph.title, style: { display: "flex", opacity: 0.7 }, children: /* @__PURE__ */ jsx17(NodeIcon, { icon: glyph.icon }) }, glyph.id)),
13020
12919
  node.badges?.map((badge) => (
13021
12920
  // Opaque: the host formatted the text, the panel only places it.
13022
- /* @__PURE__ */ jsx16(Badge7, { tone: badge.tone, className: badge.title ? void 0 : void 0, children: badge.text }, badge.id)
12921
+ /* @__PURE__ */ jsx17(Badge7, { tone: badge.tone, className: badge.title ? void 0 : void 0, children: badge.text }, badge.id)
13023
12922
  )),
13024
- node.actions?.map((action) => /* @__PURE__ */ jsx16(
13025
- IconButton6,
12923
+ node.actions?.map((action) => /* @__PURE__ */ jsx17(
12924
+ IconButton7,
13026
12925
  {
13027
12926
  size: "sm",
13028
- icon: /* @__PURE__ */ jsx16(NodeIcon, { icon: action.icon }),
12927
+ icon: /* @__PURE__ */ jsx17(NodeIcon, { icon: action.icon }),
13029
12928
  label: action.label,
13030
12929
  disabled: action.disabled,
13031
12930
  onClick: () => controller.runAction(row.id, action.id)
@@ -13044,14 +12943,14 @@ function ChildStateChip({
13044
12943
  }) {
13045
12944
  if (!row.container) return null;
13046
12945
  if (row.childState === "loading") {
13047
- return /* @__PURE__ */ jsx16("span", { style: { opacity: 0.5, fontSize: 9 }, children: "loading\u2026" });
12946
+ return /* @__PURE__ */ jsx17("span", { style: { opacity: 0.5, fontSize: 9 }, children: "loading\u2026" });
13048
12947
  }
13049
12948
  if (row.childState === "error") {
13050
12949
  const error = row.node.error;
13051
- return /* @__PURE__ */ jsx16(Badge7, { tone: "error", children: error?.code === "denied" ? "no access" : error?.code ?? "failed" });
12950
+ return /* @__PURE__ */ jsx17(Badge7, { tone: "error", children: error?.code === "denied" ? "no access" : error?.code ?? "failed" });
13052
12951
  }
13053
12952
  if (row.node.hasMore && row.expanded) {
13054
- return /* @__PURE__ */ jsx16(
12953
+ return /* @__PURE__ */ jsx17(
13055
12954
  "span",
13056
12955
  {
13057
12956
  role: "button",
@@ -13065,18 +12964,18 @@ function ChildStateChip({
13065
12964
  );
13066
12965
  }
13067
12966
  if (row.node.truncatedAt !== void 0) {
13068
- return /* @__PURE__ */ jsx16(Badge7, { tone: "warning", children: `first ${row.node.truncatedAt}` });
12967
+ return /* @__PURE__ */ jsx17(Badge7, { tone: "warning", children: `first ${row.node.truncatedAt}` });
13069
12968
  }
13070
12969
  if (row.expanded && isEmptyContainer(row.node)) {
13071
- return /* @__PURE__ */ jsx16("span", { style: { opacity: 0.4, fontSize: 9 }, children: "empty" });
12970
+ return /* @__PURE__ */ jsx17("span", { style: { opacity: 0.4, fontSize: 9 }, children: "empty" });
13072
12971
  }
13073
12972
  return null;
13074
12973
  }
13075
12974
  function NodeIcon({ icon }) {
13076
12975
  if (icon.kind === "text") {
13077
- return /* @__PURE__ */ jsx16("span", { style: { fontSize: 11, lineHeight: 1, display: "flex", alignItems: "center" }, children: icon.value });
12976
+ return /* @__PURE__ */ jsx17("span", { style: { fontSize: 11, lineHeight: 1, display: "flex", alignItems: "center" }, children: icon.value });
13078
12977
  }
13079
- return /* @__PURE__ */ jsx16(TreeIcon, { name: icon.name });
12978
+ return /* @__PURE__ */ jsx17(TreeIcon, { name: icon.name });
13080
12979
  }
13081
12980
 
13082
12981
  // src/edit/tree/panel.ts