@xenosystem/blocks 0.11.1 → 0.11.3

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.
@@ -3038,270 +3038,7 @@ var InspectorPanelController = class {
3038
3038
 
3039
3039
  // src/edit/inspector/react/InspectorPanelView.tsx
3040
3040
  import { useCallback as useCallback3, useSyncExternalStore as useSyncExternalStore2 } from "react";
3041
-
3042
- // src/edit/inspector/react/styles.ts
3043
- var S2 = {
3044
- // ── Shell ──────────────────────────────────────────────────────────────────
3045
- root: {
3046
- display: "flex",
3047
- flexDirection: "column",
3048
- height: "100%",
3049
- minHeight: 0,
3050
- fontSize: 11,
3051
- color: "var(--xeno-text)",
3052
- background: "var(--xeno-canvas)"
3053
- },
3054
- header: {
3055
- display: "flex",
3056
- alignItems: "center",
3057
- gap: 6,
3058
- padding: "4px 6px",
3059
- background: "var(--xeno-panel-header)",
3060
- flex: "0 0 auto"
3061
- },
3062
- search: {
3063
- flex: "1 1 auto",
3064
- minWidth: 0,
3065
- height: 18,
3066
- background: "var(--xeno-canvas)",
3067
- color: "inherit",
3068
- border: "1px solid var(--xeno-border)",
3069
- borderRadius: 2,
3070
- fontSize: 11,
3071
- padding: "0 6px",
3072
- outline: "none"
3073
- },
3074
- targetChip: {
3075
- fontSize: 9,
3076
- color: "var(--xeno-muted)",
3077
- whiteSpace: "nowrap",
3078
- flex: "0 0 auto"
3079
- },
3080
- banner: {
3081
- padding: "3px 6px",
3082
- fontSize: 9,
3083
- color: "var(--xeno-muted)",
3084
- background: "var(--xeno-border-subtle)",
3085
- flex: "0 0 auto"
3086
- },
3087
- scroll: { flex: "1 1 auto", minHeight: 0, overflowY: "auto", overflowX: "hidden", outline: "none" },
3088
- empty: { padding: 12, fontSize: 10, opacity: 0.4, textTransform: "uppercase", letterSpacing: "0.08em" },
3089
- // ── Section ────────────────────────────────────────────────────────────────
3090
- sectionHeader: {
3091
- display: "flex",
3092
- alignItems: "center",
3093
- gap: 4,
3094
- height: 20,
3095
- padding: "0 6px",
3096
- background: "var(--xeno-border-subtle)",
3097
- cursor: "default",
3098
- userSelect: "none"
3099
- },
3100
- sectionTitle: {
3101
- fontSize: 9,
3102
- fontWeight: 600,
3103
- letterSpacing: "0.06em",
3104
- textTransform: "uppercase",
3105
- color: "var(--xeno-muted)",
3106
- flex: "1 1 auto",
3107
- minWidth: 0,
3108
- overflow: "hidden",
3109
- textOverflow: "ellipsis",
3110
- whiteSpace: "nowrap"
3111
- },
3112
- sectionBadge: {
3113
- fontSize: 8,
3114
- padding: "0 3px",
3115
- height: 12,
3116
- lineHeight: "12px",
3117
- borderRadius: 2,
3118
- background: "var(--xeno-border)",
3119
- color: "var(--xeno-muted)",
3120
- flex: "0 0 auto"
3121
- },
3122
- sectionBody: { padding: "3px 0" },
3123
- sectionBodyOff: { opacity: 0.4, pointerEvents: "none" },
3124
- emptyHint: { padding: "4px 8px", fontSize: 10, color: "var(--xeno-muted)" },
3125
- // ── Field row ──────────────────────────────────────────────────────────────
3126
- fieldRow: {
3127
- display: "flex",
3128
- alignItems: "center",
3129
- gap: 4,
3130
- minHeight: 20,
3131
- padding: "1px 6px",
3132
- boxSizing: "border-box"
3133
- },
3134
- fieldRowFocused: { background: "var(--xeno-border-subtle)" },
3135
- fieldLabel: {
3136
- fontSize: 10,
3137
- color: "var(--xeno-muted)",
3138
- flex: "0 0 auto",
3139
- overflow: "hidden",
3140
- textOverflow: "ellipsis",
3141
- whiteSpace: "nowrap"
3142
- },
3143
- fieldControl: { flex: "1 1 auto", minWidth: 0, display: "flex", alignItems: "center", gap: 3 },
3144
- description: { fontSize: 9, color: "var(--xeno-muted)", opacity: 0.8, padding: "0 6px 3px" },
3145
- // ── Inputs ─────────────────────────────────────────────────────────────────
3146
- input: {
3147
- width: "100%",
3148
- minWidth: 0,
3149
- height: 18,
3150
- background: "var(--xeno-canvas)",
3151
- color: "inherit",
3152
- border: "1px solid var(--xeno-border)",
3153
- borderRadius: 2,
3154
- fontSize: 11,
3155
- padding: "0 4px",
3156
- outline: "none",
3157
- fontVariantNumeric: "tabular-nums",
3158
- boxSizing: "border-box"
3159
- },
3160
- mixedInput: { fontStyle: "italic", color: "var(--xeno-muted)" },
3161
- readOnlyInput: { background: "transparent", border: "1px solid transparent", cursor: "default" },
3162
- textarea: { height: "auto", minHeight: 34, padding: "3px 4px", resize: "vertical", lineHeight: 1.4 },
3163
- mono: { fontFamily: "var(--xeno-font-mono)", fontSize: 10 },
3164
- numberCell: { display: "flex", alignItems: "center", gap: 2, flex: "1 1 0", minWidth: 0, position: "relative" },
3165
- axisLabel: {
3166
- fontSize: 9,
3167
- color: "var(--xeno-muted)",
3168
- width: 9,
3169
- textAlign: "center",
3170
- flex: "0 0 auto",
3171
- userSelect: "none"
3172
- },
3173
- sliderTrack: {
3174
- position: "absolute",
3175
- left: 0,
3176
- right: 0,
3177
- bottom: 0,
3178
- height: 1,
3179
- background: "var(--xeno-border)",
3180
- pointerEvents: "none"
3181
- },
3182
- sliderFill: { display: "block", height: "100%", background: "var(--xeno-active)" },
3183
- vectorRow: { display: "flex", alignItems: "center", gap: 3, flex: "1 1 auto", minWidth: 0 },
3184
- // ── Toggle (rectangle track + square knob) ─────────────────────────────────
3185
- toggleTrack: {
3186
- width: 22,
3187
- height: 12,
3188
- borderRadius: 2,
3189
- border: "none",
3190
- padding: 1,
3191
- cursor: "pointer",
3192
- flex: "0 0 auto",
3193
- display: "flex",
3194
- alignItems: "center"
3195
- },
3196
- toggleKnob: {
3197
- width: 10,
3198
- height: 10,
3199
- background: "var(--xeno-text)",
3200
- display: "block",
3201
- transition: "transform 80ms ease, border-radius 80ms ease"
3202
- },
3203
- // ── Segmented ──────────────────────────────────────────────────────────────
3204
- segmented: { display: "flex", gap: 1, flex: "1 1 auto", minWidth: 0 },
3205
- segment: {
3206
- flex: "1 1 0",
3207
- minWidth: 0,
3208
- height: 18,
3209
- background: "var(--xeno-border-subtle)",
3210
- color: "inherit",
3211
- border: "none",
3212
- borderRadius: 2,
3213
- fontSize: 10,
3214
- cursor: "pointer",
3215
- padding: "0 4px",
3216
- overflow: "hidden",
3217
- textOverflow: "ellipsis",
3218
- whiteSpace: "nowrap"
3219
- },
3220
- segmentActive: { background: "var(--xeno-control)" },
3221
- // ── Color ──────────────────────────────────────────────────────────────────
3222
- colorCell: {
3223
- display: "flex",
3224
- alignItems: "center",
3225
- gap: 4,
3226
- flex: "1 1 auto",
3227
- minWidth: 0,
3228
- height: 18,
3229
- background: "var(--xeno-canvas)",
3230
- border: "1px solid var(--xeno-border)",
3231
- borderRadius: 2,
3232
- padding: "0 4px",
3233
- color: "inherit",
3234
- cursor: "pointer"
3235
- },
3236
- swatch: { width: 10, height: 10, borderRadius: 2, flex: "0 0 auto" },
3237
- colorText: { fontSize: 10, fontVariantNumeric: "tabular-nums", overflow: "hidden", textOverflow: "ellipsis" },
3238
- // ── List ───────────────────────────────────────────────────────────────────
3239
- list: { display: "flex", flexDirection: "column", gap: 2, flex: "1 1 auto", minWidth: 0 },
3240
- listRow: { display: "flex", alignItems: "center", gap: 2 },
3241
- listLabel: { flex: "1 1 auto", minWidth: 0, overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap", fontSize: 10 },
3242
- infoValue: { fontSize: 10, color: "var(--xeno-text)", overflow: "hidden", textOverflow: "ellipsis" },
3243
- // ── Chrome ─────────────────────────────────────────────────────────────────
3244
- iconBtn: {
3245
- display: "flex",
3246
- alignItems: "center",
3247
- justifyContent: "center",
3248
- width: 14,
3249
- height: 14,
3250
- padding: 0,
3251
- border: "none",
3252
- borderRadius: 2,
3253
- background: "transparent",
3254
- color: "inherit",
3255
- cursor: "pointer",
3256
- flex: "0 0 auto"
3257
- },
3258
- miniBtn: {
3259
- width: 14,
3260
- height: 14,
3261
- padding: 0,
3262
- border: "none",
3263
- borderRadius: 2,
3264
- background: "var(--xeno-border-subtle)",
3265
- color: "inherit",
3266
- cursor: "pointer",
3267
- fontSize: 9,
3268
- flex: "0 0 auto"
3269
- },
3270
- textBtn: {
3271
- background: "transparent",
3272
- border: "none",
3273
- color: "var(--xeno-muted)",
3274
- cursor: "pointer",
3275
- fontSize: 10,
3276
- padding: 0,
3277
- textAlign: "left"
3278
- },
3279
- chip: {
3280
- fontSize: 8,
3281
- padding: "0 3px",
3282
- height: 12,
3283
- lineHeight: "12px",
3284
- borderRadius: 2,
3285
- background: "var(--xeno-border-subtle)",
3286
- color: "var(--xeno-muted)",
3287
- flex: "0 0 auto"
3288
- },
3289
- tokenChip: {
3290
- fontSize: 9,
3291
- padding: "0 4px",
3292
- height: 16,
3293
- lineHeight: "16px",
3294
- borderRadius: 2,
3295
- background: "var(--xeno-border)",
3296
- color: "inherit",
3297
- flex: "1 1 auto",
3298
- minWidth: 0,
3299
- overflow: "hidden",
3300
- textOverflow: "ellipsis",
3301
- whiteSpace: "nowrap"
3302
- },
3303
- keyframeRow: { display: "flex", alignItems: "center", gap: 1, flex: "0 0 auto" }
3304
- };
3041
+ import { Badge, Column, EmptyState, Field, FieldGroup, IconButton as IconButton2, ScrollArea, SearchField, Section, Select as Select2, Stack as Stack2, Text as Text2 } from "@xenosystem/components/chrome";
3305
3042
 
3306
3043
  // src/edit/inspector/react/icons.tsx
3307
3044
  import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
@@ -3316,9 +3053,6 @@ var base2 = (size) => ({
3316
3053
  strokeLinejoin: "round",
3317
3054
  "aria-hidden": true
3318
3055
  });
3319
- function ChevronIcon2({ size = 11 }) {
3320
- return /* @__PURE__ */ jsx4("svg", { ...base2(size), children: /* @__PURE__ */ jsx4("path", { d: "m9 18 6-6-6-6" }) });
3321
- }
3322
3056
  function StopwatchIcon({ size = 11 }) {
3323
3057
  return /* @__PURE__ */ jsxs3("svg", { ...base2(size), children: [
3324
3058
  /* @__PURE__ */ jsx4("path", { d: "M10 2h4" }),
@@ -3356,6 +3090,20 @@ function XIcon({ size = 10 }) {
3356
3090
 
3357
3091
  // src/edit/inspector/react/widgets.tsx
3358
3092
  import { useCallback as useCallback2, useRef as useRef3 } from "react";
3093
+ import {
3094
+ AxisLabel,
3095
+ IconButton,
3096
+ Input,
3097
+ ProportionBar,
3098
+ SegmentedControl,
3099
+ Select,
3100
+ Stack,
3101
+ Swatch,
3102
+ Text,
3103
+ TextArea,
3104
+ TextButton,
3105
+ Toggle
3106
+ } from "@xenosystem/components/chrome";
3359
3107
  import { Fragment, jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
3360
3108
  function displayText(field, controller) {
3361
3109
  const draft = controller.getDraft(field.id);
@@ -3381,10 +3129,7 @@ function useEditingHandlers(field, controller) {
3381
3129
  },
3382
3130
  [controller, field.id]
3383
3131
  );
3384
- const onChange = useCallback2(
3385
- (e) => controller.setDraft(field.id, e.target.value),
3386
- [controller, field.id]
3387
- );
3132
+ const onChange = useCallback2((value) => controller.setDraft(field.id, value), [controller, field.id]);
3388
3133
  const onBlur = useCallback2(() => controller.commitDraft(field.id), [controller, field.id]);
3389
3134
  const onKeyDown = useCallback2(
3390
3135
  (e) => {
@@ -3467,76 +3212,44 @@ function NumberWidget({ field, controller, component }) {
3467
3212
  const v = Array.isArray(raw) ? raw[component] : void 0;
3468
3213
  return typeof v === "number" ? formatNumeric(v, field) : "";
3469
3214
  })() : displayText(field, controller);
3470
- return /* @__PURE__ */ jsxs4("span", { style: S2.numberCell, children: [
3471
- component !== void 0 && field.components?.[component] && /* @__PURE__ */ jsx5(
3472
- "span",
3473
- {
3474
- style: { ...S2.axisLabel, cursor: editable ? "ew-resize" : "default" },
3475
- onPointerDown,
3476
- onPointerMove,
3477
- onPointerUp,
3478
- children: field.components[component]
3479
- }
3480
- ),
3215
+ const position = numericValue === null ? null : valueToPosition(numericValue, field);
3216
+ return /* @__PURE__ */ jsxs4(Stack, { direction: "row", gap: 2, pad: "none", children: [
3217
+ component !== void 0 && field.components?.[component] ? /* @__PURE__ */ jsx5(AxisLabel, { scrubbable: editable, onPointerDown, onPointerMove, onPointerUp, children: field.components[component] }) : null,
3481
3218
  /* @__PURE__ */ jsx5(
3482
- "input",
3219
+ Input,
3483
3220
  {
3484
- type: "text",
3485
3221
  inputMode: "decimal",
3486
3222
  value: text,
3487
3223
  placeholder: mixed ? controller.getMixedPlaceholder() : field.placeholder,
3224
+ mixed,
3488
3225
  readOnly: !editable,
3489
3226
  disabled: field.disabled,
3227
+ label: field.components?.[component ?? -1] ? `${field.label} ${field.components[component]}` : field.label,
3490
3228
  onFocus: handlers.onFocus,
3491
3229
  onChange: handlers.onChange,
3492
3230
  onBlur: handlers.onBlur,
3493
3231
  onKeyDown: handlers.onKeyDown,
3494
3232
  onWheel,
3495
- spellCheck: false,
3496
- style: {
3497
- ...S2.input,
3498
- ...mixed ? S2.mixedInput : null,
3499
- ...editable ? null : S2.readOnlyInput
3500
- },
3501
3233
  ...ariaSliderProps(field, numericValue)
3502
3234
  }
3503
3235
  ),
3504
- controller.getNumericMode() === "slider" && numericValue !== null && /* @__PURE__ */ jsx5("span", { style: S2.sliderTrack, "aria-hidden": true, children: /* @__PURE__ */ jsx5("span", { style: { ...S2.sliderFill, width: `${valueToPosition(numericValue, field).toFixed(4) === "NaN" ? 0 : valueToPosition(numericValue, field) * 100}%` } }) })
3236
+ controller.getNumericMode() === "slider" && position !== null && Number.isFinite(position) ? /* @__PURE__ */ jsx5(ProportionBar, { segments: [{ value: position, opacity: 0.9 }, { value: 1 - position, opacity: 0.08 }] }) : null
3505
3237
  ] });
3506
3238
  }
3507
3239
  function VectorWidget({ field, controller }) {
3508
3240
  const expanded = controller.isExpanded(field.id) || !controller.isUniformVector(field.id);
3509
3241
  const value = controller.getFieldValue(field.id);
3510
3242
  const count = Array.isArray(value) ? value.length : field.components?.length ?? 0;
3243
+ const toggle = (label, title) => /* @__PURE__ */ jsx5(IconButton, { size: "sm", icon: /* @__PURE__ */ jsx5("span", { "aria-hidden": true, children: "\u22EF" }), label, onClick: () => controller.toggleExpanded(field.id) });
3511
3244
  if (!expanded && field.expandable) {
3512
- return /* @__PURE__ */ jsxs4("span", { style: S2.vectorRow, children: [
3245
+ return /* @__PURE__ */ jsxs4(Stack, { direction: "row", gap: 3, pad: "none", children: [
3513
3246
  /* @__PURE__ */ jsx5(NumberWidget, { field, controller, component: 0 }),
3514
- /* @__PURE__ */ jsx5(
3515
- "button",
3516
- {
3517
- type: "button",
3518
- style: S2.miniBtn,
3519
- onClick: () => controller.toggleExpanded(field.id),
3520
- title: "Edit each axis separately",
3521
- "aria-label": "Expand",
3522
- children: "\u22EF"
3523
- }
3524
- )
3247
+ toggle("Expand", "Edit each axis separately")
3525
3248
  ] });
3526
3249
  }
3527
- return /* @__PURE__ */ jsxs4("span", { style: S2.vectorRow, children: [
3250
+ return /* @__PURE__ */ jsxs4(Stack, { direction: "row", gap: 3, pad: "none", children: [
3528
3251
  Array.from({ length: count }, (_, i) => /* @__PURE__ */ jsx5(NumberWidget, { field, controller, component: i }, i)),
3529
- field.expandable && controller.isUniformVector(field.id) && /* @__PURE__ */ jsx5(
3530
- "button",
3531
- {
3532
- type: "button",
3533
- style: S2.miniBtn,
3534
- onClick: () => controller.toggleExpanded(field.id),
3535
- title: "Link axes",
3536
- "aria-label": "Collapse",
3537
- children: "\u22EF"
3538
- }
3539
- )
3252
+ field.expandable && controller.isUniformVector(field.id) ? toggle("Collapse", "Link axes") : null
3540
3253
  ] });
3541
3254
  }
3542
3255
  function TextWidget({ field, controller }) {
@@ -3546,26 +3259,17 @@ function TextWidget({ field, controller }) {
3546
3259
  const shared = {
3547
3260
  value: displayText(field, controller),
3548
3261
  placeholder: mixed ? controller.getMixedPlaceholder() : field.placeholder,
3262
+ mixed,
3549
3263
  readOnly: !editable,
3550
3264
  disabled: field.disabled,
3265
+ label: field.label,
3551
3266
  onFocus: handlers.onFocus,
3552
3267
  onChange: handlers.onChange,
3553
3268
  onBlur: handlers.onBlur,
3554
- onKeyDown: handlers.onKeyDown,
3555
- spellCheck: false,
3556
- "aria-label": field.label
3269
+ onKeyDown: handlers.onKeyDown
3557
3270
  };
3558
- if (field.type === "textarea") {
3559
- return /* @__PURE__ */ jsx5(
3560
- "textarea",
3561
- {
3562
- ...shared,
3563
- rows: field.rows ?? 3,
3564
- style: { ...S2.input, ...S2.textarea, ...mixed ? S2.mixedInput : null }
3565
- }
3566
- );
3567
- }
3568
- return /* @__PURE__ */ jsx5("input", { type: "text", ...shared, style: { ...S2.input, ...mixed ? S2.mixedInput : null } });
3271
+ if (field.type === "textarea") return /* @__PURE__ */ jsx5(TextArea, { ...shared, rows: field.rows ?? 3 });
3272
+ return /* @__PURE__ */ jsx5(Input, { ...shared });
3569
3273
  }
3570
3274
  function CodeWidget({ field, controller }) {
3571
3275
  const editable = isFieldEditable(field);
@@ -3573,15 +3277,17 @@ function CodeWidget({ field, controller }) {
3573
3277
  const handlers = useEditingHandlers(field, controller);
3574
3278
  const expression = field.type === "expression";
3575
3279
  return /* @__PURE__ */ jsx5(
3576
- "textarea",
3280
+ TextArea,
3577
3281
  {
3282
+ variant: "mono",
3578
3283
  value: displayText(field, controller),
3579
3284
  placeholder: mixed ? controller.getMixedPlaceholder() : field.placeholder ?? (expression ? "= expression" : ""),
3285
+ mixed,
3580
3286
  readOnly: !editable,
3581
3287
  disabled: field.disabled,
3582
3288
  rows: field.rows ?? (expression ? 2 : 5),
3583
- spellCheck: false,
3584
- "aria-label": field.label,
3289
+ wrap: expression ? "off" : void 0,
3290
+ label: field.label,
3585
3291
  onFocus: handlers.onFocus,
3586
3292
  onChange: handlers.onChange,
3587
3293
  onBlur: handlers.onBlur,
@@ -3592,21 +3298,10 @@ function CodeWidget({ field, controller }) {
3592
3298
  const { selectionStart: start, selectionEnd: end, value } = el;
3593
3299
  el.value = `${value.slice(0, start)} ${value.slice(end)}`;
3594
3300
  el.selectionStart = el.selectionEnd = start + 2;
3595
- handlers.onChange?.({ currentTarget: el, target: el });
3301
+ handlers.onChange(el.value);
3596
3302
  return;
3597
3303
  }
3598
- handlers.onKeyDown?.(event);
3599
- },
3600
- style: {
3601
- ...S2.input,
3602
- ...S2.textarea,
3603
- fontFamily: "var(--xeno-font-mono)",
3604
- fontSize: 11,
3605
- lineHeight: "16px",
3606
- // An expression is a formula, not prose: never wrap it, so the structure stays readable.
3607
- whiteSpace: expression ? "pre" : "pre-wrap",
3608
- overflowX: expression ? "auto" : "hidden",
3609
- ...mixed ? S2.mixedInput : null
3304
+ handlers.onKeyDown(event);
3610
3305
  }
3611
3306
  }
3612
3307
  );
@@ -3615,29 +3310,7 @@ function BooleanWidget({ field, controller }) {
3615
3310
  const editable = isFieldEditable(field);
3616
3311
  const mixed = isFieldMixed(field);
3617
3312
  const on = controller.getFieldValue(field.id) === true;
3618
- return /* @__PURE__ */ jsx5(
3619
- "button",
3620
- {
3621
- type: "button",
3622
- role: "switch",
3623
- "aria-checked": mixed ? "mixed" : on,
3624
- "aria-label": field.label,
3625
- disabled: !editable,
3626
- onClick: () => controller.setValue(field.id, !on),
3627
- style: { ...S2.toggleTrack, background: on ? "var(--xeno-active)" : "var(--xeno-border)" },
3628
- children: /* @__PURE__ */ jsx5(
3629
- "span",
3630
- {
3631
- style: {
3632
- ...S2.toggleKnob,
3633
- transform: on ? "translateX(10px)" : "translateX(0)",
3634
- borderRadius: on ? 3 : 1,
3635
- opacity: mixed ? 0.4 : 1
3636
- }
3637
- }
3638
- )
3639
- }
3640
- );
3313
+ return /* @__PURE__ */ jsx5(Toggle, { size: "sm", checked: on, mixed, label: field.label, disabled: !editable, onChange: (next) => controller.setValue(field.id, next) });
3641
3314
  }
3642
3315
  function SelectWidget({ field, controller }) {
3643
3316
  const editable = isFieldEditable(field);
@@ -3645,70 +3318,41 @@ function SelectWidget({ field, controller }) {
3645
3318
  const current = controller.getFieldValue(field.id);
3646
3319
  const options = field.options ?? [];
3647
3320
  const value = mixed ? "" : String(current ?? "");
3648
- const hasCurrent = mixed || options.some((o) => o.value === value);
3649
- return /* @__PURE__ */ jsxs4(
3650
- "select",
3651
- {
3652
- value,
3653
- disabled: !editable,
3654
- "aria-label": field.label,
3655
- onChange: (e) => controller.setValue(field.id, e.target.value),
3656
- style: { ...S2.input, ...mixed ? S2.mixedInput : null },
3657
- children: [
3658
- mixed && /* @__PURE__ */ jsx5("option", { value: "", children: controller.getMixedPlaceholder() }),
3659
- !hasCurrent && /* @__PURE__ */ jsx5("option", { value, children: value || "\u2014" }),
3660
- options.map((o) => /* @__PURE__ */ jsx5("option", { value: o.value, disabled: o.disabled, children: o.label }, o.value))
3661
- ]
3662
- }
3663
- );
3321
+ const hasCurrent = mixed || value === "" || options.some((o) => o.value === value);
3322
+ const all = hasCurrent ? options : [{ value, label: value }, ...options];
3323
+ return /* @__PURE__ */ jsx5(Select, { options: all, value, mixed, disabled: !editable, label: field.label, onChange: (next) => controller.setValue(field.id, next) });
3664
3324
  }
3665
3325
  function SegmentedWidget({ field, controller }) {
3666
3326
  const editable = isFieldEditable(field);
3667
3327
  const current = String(controller.getFieldValue(field.id) ?? "");
3668
- return /* @__PURE__ */ jsx5("span", { style: S2.segmented, role: "radiogroup", "aria-label": field.label, children: (field.options ?? []).map((o) => {
3669
- const active = o.value === current;
3670
- return /* @__PURE__ */ jsx5(
3671
- "button",
3672
- {
3673
- type: "button",
3674
- role: "radio",
3675
- "aria-checked": active,
3676
- disabled: !editable || o.disabled,
3677
- onClick: () => controller.setValue(field.id, o.value),
3678
- style: { ...S2.segment, ...active ? S2.segmentActive : null },
3679
- children: o.label
3680
- },
3681
- o.value
3682
- );
3683
- }) });
3328
+ return /* @__PURE__ */ jsx5(
3329
+ SegmentedControl,
3330
+ {
3331
+ size: "sm",
3332
+ stretch: true,
3333
+ options: field.options ?? [],
3334
+ value: current,
3335
+ disabled: !editable,
3336
+ label: field.label,
3337
+ onChange: (next) => controller.setValue(field.id, next)
3338
+ }
3339
+ );
3684
3340
  }
3685
3341
  function ColorWidget({ field, controller }) {
3686
3342
  const mixed = isFieldMixed(field);
3687
3343
  const raw = controller.getFieldValue(field.id);
3688
3344
  const hex = typeof raw === "string" ? raw : typeof raw?.hex === "string" ? raw.hex : "";
3689
3345
  const editable = isFieldEditable(field);
3690
- return /* @__PURE__ */ jsxs4(
3691
- "button",
3346
+ return /* @__PURE__ */ jsx5(
3347
+ Swatch,
3692
3348
  {
3693
- type: "button",
3694
- style: S2.colorCell,
3349
+ color: hex || void 0,
3350
+ text: mixed ? controller.getMixedPlaceholder() : hex || "\u2014",
3351
+ mixed,
3695
3352
  disabled: !editable,
3696
3353
  onClick: () => controller.requestColorEditor(field.id),
3697
3354
  title: "Edit in the Color panel",
3698
- "aria-label": `${field.label}: ${mixed ? "mixed" : hex || "none"}`,
3699
- children: [
3700
- /* @__PURE__ */ jsx5(
3701
- "span",
3702
- {
3703
- style: {
3704
- ...S2.swatch,
3705
- background: mixed || !hex ? "transparent" : hex,
3706
- border: mixed || !hex ? "1px solid var(--xeno-control)" : "1px solid var(--xeno-control)"
3707
- }
3708
- }
3709
- ),
3710
- /* @__PURE__ */ jsx5("span", { style: { ...S2.colorText, ...mixed ? S2.mixedInput : null }, children: mixed ? controller.getMixedPlaceholder() : hex || "\u2014" })
3711
- ]
3355
+ label: `${field.label}: ${mixed ? "mixed" : hex || "none"}`
3712
3356
  }
3713
3357
  );
3714
3358
  }
@@ -3717,77 +3361,43 @@ function ListWidget({ field, controller }) {
3717
3361
  const raw = controller.getFieldValue(field.id);
3718
3362
  const items = Array.isArray(raw) ? raw : [];
3719
3363
  const write = (next) => void controller.setValue(field.id, next);
3720
- return /* @__PURE__ */ jsxs4("span", { style: S2.list, children: [
3721
- items.map((item, i) => /* @__PURE__ */ jsxs4("span", { style: S2.listRow, children: [
3722
- /* @__PURE__ */ jsx5("span", { style: S2.listLabel, children: typeof item === "string" ? item : JSON.stringify(item) }),
3723
- editable && /* @__PURE__ */ jsxs4(Fragment, { children: [
3724
- /* @__PURE__ */ jsx5(
3725
- "button",
3726
- {
3727
- type: "button",
3728
- style: S2.miniBtn,
3729
- disabled: i === 0,
3730
- onClick: () => {
3731
- const next = [...items];
3732
- const [moved] = next.splice(i, 1);
3733
- next.splice(i - 1, 0, moved);
3734
- write(next);
3735
- },
3736
- "aria-label": "Move up",
3737
- children: "\u2191"
3738
- }
3739
- ),
3740
- /* @__PURE__ */ jsx5(
3741
- "button",
3742
- {
3743
- type: "button",
3744
- style: S2.miniBtn,
3745
- disabled: i === items.length - 1,
3746
- onClick: () => {
3747
- const next = [...items];
3748
- const [moved] = next.splice(i, 1);
3749
- next.splice(i + 1, 0, moved);
3750
- write(next);
3751
- },
3752
- "aria-label": "Move down",
3753
- children: "\u2193"
3754
- }
3755
- ),
3756
- /* @__PURE__ */ jsx5(
3757
- "button",
3758
- {
3759
- type: "button",
3760
- style: S2.miniBtn,
3761
- onClick: () => write(items.filter((_, j) => j !== i)),
3762
- "aria-label": "Remove",
3763
- children: /* @__PURE__ */ jsx5(XIcon, {})
3764
- }
3765
- )
3766
- ] })
3364
+ const move = (i, to) => {
3365
+ const next = [...items];
3366
+ const [moved] = next.splice(i, 1);
3367
+ next.splice(to, 0, moved);
3368
+ write(next);
3369
+ };
3370
+ return /* @__PURE__ */ jsxs4(Stack, { gap: 2, pad: "none", children: [
3371
+ items.map((item, i) => /* @__PURE__ */ jsxs4(Stack, { direction: "row", gap: 2, pad: "none", children: [
3372
+ /* @__PURE__ */ jsx5(Text, { role: "meta", children: typeof item === "string" ? item : JSON.stringify(item) }),
3373
+ editable ? /* @__PURE__ */ jsxs4(Fragment, { children: [
3374
+ /* @__PURE__ */ jsx5(IconButton, { size: "sm", icon: /* @__PURE__ */ jsx5("span", { "aria-hidden": true, children: "\u2191" }), label: "Move up", disabled: i === 0, onClick: () => move(i, i - 1) }),
3375
+ /* @__PURE__ */ jsx5(IconButton, { size: "sm", icon: /* @__PURE__ */ jsx5("span", { "aria-hidden": true, children: "\u2193" }), label: "Move down", disabled: i === items.length - 1, onClick: () => move(i, i + 1) }),
3376
+ /* @__PURE__ */ jsx5(IconButton, { size: "sm", icon: /* @__PURE__ */ jsx5(XIcon, {}), label: "Remove", onClick: () => write(items.filter((_, j) => j !== i)) })
3377
+ ] }) : null
3767
3378
  ] }, i)),
3768
- editable && /* @__PURE__ */ jsx5("button", { type: "button", style: S2.textBtn, onClick: () => write([...items, ""]), children: "+ Add" })
3379
+ editable ? /* @__PURE__ */ jsx5(TextButton, { onClick: () => write([...items, ""]), children: "+ Add" }) : null
3769
3380
  ] });
3770
3381
  }
3771
3382
  function InfoWidget({ field, controller }) {
3772
3383
  const value = controller.getFieldValue(field.id);
3773
- return /* @__PURE__ */ jsx5("span", { style: S2.infoValue, children: value === void 0 || value === null ? "\u2014" : String(value) });
3384
+ return /* @__PURE__ */ jsx5(Text, { role: "meta", children: value === void 0 || value === null ? "\u2014" : String(value) });
3774
3385
  }
3775
3386
  function JsonWidget({ field, controller }) {
3776
3387
  const editable = isFieldEditable(field);
3777
3388
  const handlers = useEditingHandlers(field, controller);
3778
3389
  return /* @__PURE__ */ jsx5(
3779
- "textarea",
3390
+ TextArea,
3780
3391
  {
3392
+ variant: "mono",
3781
3393
  value: displayText(field, controller),
3782
3394
  readOnly: !editable,
3783
3395
  rows: field.rows ?? 2,
3396
+ label: field.label,
3784
3397
  onFocus: handlers.onFocus,
3785
3398
  onChange: handlers.onChange,
3786
3399
  onBlur: handlers.onBlur,
3787
- onKeyDown: handlers.onKeyDown,
3788
- spellCheck: false,
3789
- "aria-label": field.label,
3790
- style: { ...S2.input, ...S2.textarea, ...S2.mono }
3400
+ onKeyDown: handlers.onKeyDown
3791
3401
  }
3792
3402
  );
3793
3403
  }
@@ -3811,243 +3421,81 @@ function InspectorPanelView({ controller }) {
3811
3421
  );
3812
3422
  const multi = targets.length > 1;
3813
3423
  const blocked = multi && !controller.canEditTargets();
3814
- return /* @__PURE__ */ jsxs5("div", { style: S2.root, className: "xeno-inspector-panel", children: [
3815
- controller.isSearchShown() && /* @__PURE__ */ jsxs5("div", { style: S2.header, children: [
3816
- /* @__PURE__ */ jsx6(
3817
- "input",
3818
- {
3819
- type: "search",
3820
- value: controller.getFilter(),
3821
- placeholder: "Search properties",
3822
- onChange: (e) => controller.setFilter(e.target.value),
3823
- style: S2.search,
3824
- "aria-label": "Search properties",
3825
- spellCheck: false
3826
- }
3827
- ),
3828
- targets.length > 0 && /* @__PURE__ */ jsx6("span", { style: S2.targetChip, children: multi ? `${targets.length} selected` : targets[0]?.label ?? targets[0]?.id })
3829
- ] }),
3830
- multi && /* @__PURE__ */ jsx6("div", { style: S2.banner, children: blocked ? `${targets.length} selected \u2014 multi-editing is disabled` : `${targets.length} selected \xB7 shared values shown` }),
3831
- /* @__PURE__ */ jsxs5("div", { style: S2.scroll, onKeyDown, tabIndex: 0, role: "group", "aria-label": "Properties", children: [
3424
+ return /* @__PURE__ */ jsxs5(Column, { className: "xeno-inspector-panel", children: [
3425
+ controller.isSearchShown() ? /* @__PURE__ */ jsxs5(Stack2, { direction: "row", gap: 6, children: [
3426
+ /* @__PURE__ */ jsx6(SearchField, { value: controller.getFilter(), onChange: (v) => controller.setFilter(v), placeholder: "Search properties", label: "Search properties" }),
3427
+ targets.length > 0 ? /* @__PURE__ */ jsx6(Badge, { children: multi ? `${targets.length} selected` : targets[0]?.label ?? targets[0]?.id }) : null
3428
+ ] }) : null,
3429
+ multi ? /* @__PURE__ */ jsx6(Stack2, { pad: "inset", children: /* @__PURE__ */ jsx6(Text2, { role: "caption", children: blocked ? `${targets.length} selected \u2014 multi-editing is disabled` : `${targets.length} selected \xB7 shared values shown` }) }) : null,
3430
+ /* @__PURE__ */ jsx6(ScrollArea, { children: /* @__PURE__ */ jsxs5("div", { onKeyDown, tabIndex: 0, role: "group", "aria-label": "Properties", className: "xeno-inspector-properties", children: [
3832
3431
  sections.map((projected) => /* @__PURE__ */ jsx6(SectionView, { projected, controller }, projected.section.id)),
3833
- sections.length === 0 && /* @__PURE__ */ jsx6("div", { style: S2.empty, children: targets.length === 0 ? "Nothing selected" : "No properties" })
3834
- ] })
3432
+ sections.length === 0 ? /* @__PURE__ */ jsx6(EmptyState, { title: targets.length === 0 ? "Nothing selected" : "No properties" }) : null
3433
+ ] }) })
3835
3434
  ] });
3836
3435
  }
3837
- function SectionView({
3838
- projected,
3839
- controller
3840
- }) {
3841
- const { section, fields, collapsed, disabledByToggle, empty } = projected;
3842
- return /* @__PURE__ */ jsxs5("div", { children: [
3843
- /* @__PURE__ */ jsxs5("div", { style: S2.sectionHeader, children: [
3844
- section.collapsible && /* @__PURE__ */ jsx6(
3845
- "button",
3846
- {
3847
- type: "button",
3848
- style: { ...S2.iconBtn, transform: collapsed ? "none" : "rotate(90deg)" },
3849
- onClick: () => controller.toggleSectionCollapsed(section.id),
3850
- "aria-label": collapsed ? "Expand section" : "Collapse section",
3851
- "aria-expanded": !collapsed,
3852
- children: /* @__PURE__ */ jsx6(ChevronIcon2, {})
3853
- }
3854
- ),
3855
- section.enabled && /* @__PURE__ */ jsx6(
3856
- "button",
3857
- {
3858
- type: "button",
3859
- role: "switch",
3860
- "aria-checked": section.enabled.value,
3861
- "aria-label": `${section.title} enabled`,
3862
- onClick: () => controller.toggleSectionEnabled(section.id),
3863
- style: {
3864
- ...S2.toggleTrack,
3865
- width: 16,
3866
- height: 10,
3867
- background: section.enabled.value ? "var(--xeno-active)" : "var(--xeno-border)"
3868
- },
3869
- children: /* @__PURE__ */ jsx6(
3870
- "span",
3871
- {
3872
- style: {
3873
- ...S2.toggleKnob,
3874
- width: 8,
3875
- height: 8,
3876
- transform: section.enabled.value ? "translateX(6px)" : "translateX(0)"
3877
- }
3878
- }
3879
- )
3880
- }
3881
- ),
3882
- /* @__PURE__ */ jsx6("span", { style: S2.sectionTitle, children: section.title }),
3883
- section.badge && /* @__PURE__ */ jsx6("span", { style: S2.sectionBadge, children: section.badge }),
3884
- section.actions?.map((action) => /* @__PURE__ */ jsx6(
3885
- "button",
3886
- {
3887
- type: "button",
3888
- style: S2.miniBtn,
3889
- disabled: action.disabled,
3890
- onClick: () => controller.runAction(section.id, action.id),
3891
- title: action.label,
3892
- "aria-label": action.label,
3893
- children: action.label.slice(0, 1)
3894
- },
3895
- action.id
3896
- )),
3897
- section.addMenu && section.addMenu.length > 0 && /* @__PURE__ */ jsx6(AddMenu, { section, controller })
3898
- ] }),
3899
- !collapsed && /* @__PURE__ */ jsxs5("div", { style: { ...S2.sectionBody, ...disabledByToggle ? S2.sectionBodyOff : null }, children: [
3900
- empty && section.emptyHint && /* @__PURE__ */ jsx6("div", { style: S2.emptyHint, children: section.emptyHint }),
3901
- fields.map((field) => /* @__PURE__ */ jsx6(FieldRow, { field, controller }, field.id))
3902
- ] })
3903
- ] });
3904
- }
3905
- function AddMenu({
3906
- section,
3907
- controller
3908
- }) {
3436
+ function SectionView({ projected, controller }) {
3437
+ const { section, fields, collapsed, empty } = projected;
3909
3438
  return /* @__PURE__ */ jsxs5(
3910
- "select",
3439
+ Section,
3911
3440
  {
3912
- value: "",
3913
- onChange: (e) => {
3914
- if (e.target.value) controller.addItem(section.id, e.target.value);
3915
- },
3916
- style: { ...S2.miniBtn, width: "auto" },
3917
- "aria-label": `Add to ${section.title}`,
3918
- title: "Add",
3441
+ title: section.title,
3442
+ flush: true,
3443
+ collapsible: section.collapsible,
3444
+ collapsed,
3445
+ onCollapsedChange: () => controller.toggleSectionCollapsed(section.id),
3446
+ enabled: section.enabled?.value,
3447
+ onEnabledChange: section.enabled ? () => controller.toggleSectionEnabled(section.id) : void 0,
3448
+ badge: section.badge ? /* @__PURE__ */ jsx6(Badge, { children: section.badge }) : null,
3449
+ actions: /* @__PURE__ */ jsxs5(Fragment2, { children: [
3450
+ section.actions?.map((action) => /* @__PURE__ */ jsx6(IconButton2, { size: "sm", icon: /* @__PURE__ */ jsx6("span", { "aria-hidden": true, children: action.label.slice(0, 1) }), label: action.label, disabled: action.disabled, onClick: () => controller.runAction(section.id, action.id) }, action.id)),
3451
+ section.addMenu && section.addMenu.length > 0 ? /* @__PURE__ */ jsx6(AddMenu, { section, controller }) : null
3452
+ ] }),
3919
3453
  children: [
3920
- /* @__PURE__ */ jsx6("option", { value: "", children: "\uFF0B" }),
3921
- Object.entries(
3922
- (section.addMenu ?? []).reduce((groups, item) => {
3923
- const key = item.group ?? "";
3924
- (groups[key] ??= []).push(item);
3925
- return groups;
3926
- }, {})
3927
- ).map(
3928
- ([group, items]) => group ? /* @__PURE__ */ jsx6("optgroup", { label: group, children: (items ?? []).map((i) => /* @__PURE__ */ jsx6("option", { value: i.id, disabled: i.disabled, children: i.label }, i.id)) }, group) : (items ?? []).map((i) => /* @__PURE__ */ jsx6("option", { value: i.id, disabled: i.disabled, children: i.label }, i.id))
3929
- )
3454
+ empty && section.emptyHint ? /* @__PURE__ */ jsx6(Stack2, { pad: "inset", children: /* @__PURE__ */ jsx6(Text2, { role: "caption", children: section.emptyHint }) }) : null,
3455
+ /* @__PURE__ */ jsx6(FieldGroup, { labelWidth: controller.getLabelWidth(), children: fields.map((field) => /* @__PURE__ */ jsx6(FieldRow, { field, controller }, field.id)) })
3930
3456
  ]
3931
3457
  }
3932
3458
  );
3933
3459
  }
3934
- function FieldRow({
3935
- field,
3936
- controller
3937
- }) {
3460
+ function AddMenu({ section, controller }) {
3461
+ const options = (section.addMenu ?? []).map((i) => ({ value: i.id, label: i.label, disabled: i.disabled, group: i.group }));
3462
+ return /* @__PURE__ */ jsx6(Select2, { size: "sm", placeholder: "\uFF0B", options, value: "", label: `Add to ${section.title}`, onChange: (id) => controller.addItem(section.id, id) });
3463
+ }
3464
+ function FieldRow({ field, controller }) {
3938
3465
  const focused = controller.getFocused() === field.id;
3939
3466
  const bound = !!field.token?.tokenId;
3940
3467
  const anim = field.anim;
3941
3468
  const showKeyframes = controller.areKeyframesShown() && !!anim;
3469
+ const easingOptions = anim?.easingOptions ?? [];
3470
+ const easing = anim?.easing ?? "";
3471
+ const easingAll = easingOptions.some((o) => o.value === easing) ? easingOptions : [{ value: easing, label: easing || "\u2014" }, ...easingOptions];
3942
3472
  return /* @__PURE__ */ jsxs5(Fragment2, { children: [
3943
- /* @__PURE__ */ jsxs5(
3944
- "div",
3473
+ /* @__PURE__ */ jsx6(
3474
+ Field,
3945
3475
  {
3946
- style: { ...S2.fieldRow, ...focused ? S2.fieldRowFocused : null },
3947
- onContextMenu: (e) => {
3948
- e.preventDefault();
3949
- controller.requestContextMenu(field.id, e.clientX, e.clientY);
3950
- },
3951
- children: [
3952
- showKeyframes && /* @__PURE__ */ jsxs5("span", { style: S2.keyframeRow, children: [
3953
- /* @__PURE__ */ jsx6(
3954
- "button",
3955
- {
3956
- type: "button",
3957
- style: { ...S2.iconBtn, opacity: anim.animated ? 0.9 : 0.35 },
3958
- onClick: () => controller.keyframe(field.id, "toggleAnim"),
3959
- title: anim.animated ? "Disable animation" : "Animate this property",
3960
- "aria-label": "Toggle animation",
3961
- "aria-pressed": anim.animated,
3962
- children: /* @__PURE__ */ jsx6(StopwatchIcon, {})
3963
- }
3964
- ),
3965
- anim.animated && /* @__PURE__ */ jsxs5(Fragment2, { children: [
3966
- /* @__PURE__ */ jsx6(
3967
- "button",
3968
- {
3969
- type: "button",
3970
- style: { ...S2.iconBtn, width: 11, opacity: anim.canPrev === false ? 0.3 : 0.8 },
3971
- disabled: anim.canPrev === false,
3972
- onClick: () => controller.keyframe(field.id, "prev"),
3973
- "aria-label": "Previous keyframe",
3974
- children: /* @__PURE__ */ jsx6(PrevIcon, {})
3975
- }
3976
- ),
3977
- /* @__PURE__ */ jsx6(
3978
- "button",
3979
- {
3980
- type: "button",
3981
- style: S2.iconBtn,
3982
- onClick: () => controller.keyframe(field.id, anim.onKeyframe ? "remove" : "add"),
3983
- title: anim.onKeyframe ? "Remove keyframe" : "Add keyframe",
3984
- "aria-label": anim.onKeyframe ? "Remove keyframe" : "Add keyframe",
3985
- children: /* @__PURE__ */ jsx6(DiamondIcon, { filled: !!anim.onKeyframe })
3986
- }
3987
- ),
3988
- /* @__PURE__ */ jsx6(
3989
- "button",
3990
- {
3991
- type: "button",
3992
- style: { ...S2.iconBtn, width: 11, opacity: anim.canNext === false ? 0.3 : 0.8 },
3993
- disabled: anim.canNext === false,
3994
- onClick: () => controller.keyframe(field.id, "next"),
3995
- "aria-label": "Next keyframe",
3996
- children: /* @__PURE__ */ jsx6(NextIcon, {})
3997
- }
3998
- )
3999
- ] })
4000
- ] }),
4001
- /* @__PURE__ */ jsx6(
4002
- "span",
4003
- {
4004
- style: { ...S2.fieldLabel, width: controller.getLabelWidth() },
4005
- onClick: () => controller.focusField(field.id),
4006
- title: field.description ?? field.label,
4007
- children: field.label
4008
- }
4009
- ),
4010
- /* @__PURE__ */ jsx6("span", { style: S2.fieldControl, children: bound ? /* @__PURE__ */ jsx6("span", { style: S2.tokenChip, title: `Bound to ${field.token?.tokenName ?? field.token?.tokenId}`, children: field.token?.tokenName ?? field.token?.tokenId }) : /* @__PURE__ */ jsx6(FieldWidget, { field, controller }) }),
4011
- showKeyframes && anim.animated && anim.onKeyframe && /* @__PURE__ */ jsxs5(
4012
- "select",
4013
- {
4014
- value: anim.easing ?? "",
4015
- onChange: (e) => controller.keyframe(field.id, "setEasing", e.target.value),
4016
- style: { ...S2.miniBtn, width: "auto" },
4017
- "aria-label": "Easing",
4018
- children: [
4019
- !anim.easingOptions?.some((o) => o.value === (anim.easing ?? "")) && /* @__PURE__ */ jsx6("option", { value: anim.easing ?? "", children: anim.easing || "\u2014" }),
4020
- (anim.easingOptions ?? []).map((o) => /* @__PURE__ */ jsx6("option", { value: o.value, children: o.label }, o.value))
4021
- ]
4022
- }
4023
- ),
4024
- showKeyframes && /* @__PURE__ */ jsx6("span", { style: S2.chip, children: controller.keyframeChip(field.id) }),
4025
- controller.areTokensShown() && field.token?.bindable !== false && /* @__PURE__ */ jsx6(
4026
- "button",
4027
- {
4028
- type: "button",
4029
- style: { ...S2.iconBtn, opacity: bound ? 0.9 : 0.4 },
4030
- onClick: () => controller.bindToken(field.id, bound ? null : controller.getTokens()[0]?.id ?? null),
4031
- title: bound ? "Unbind token" : "Bind a design token",
4032
- "aria-label": bound ? "Unbind token" : "Bind token",
4033
- children: /* @__PURE__ */ jsx6(LinkIcon, {})
4034
- }
4035
- ),
4036
- field.defaultValue !== void 0 && isFieldEditable(field) && /* @__PURE__ */ jsx6(
4037
- "button",
4038
- {
4039
- type: "button",
4040
- style: { ...S2.iconBtn, opacity: 0.35 },
4041
- onClick: () => controller.resetField(field.id),
4042
- title: "Reset to default",
4043
- "aria-label": "Reset to default",
4044
- children: /* @__PURE__ */ jsx6(ResetIcon, {})
4045
- }
4046
- )
4047
- ]
3476
+ label: field.label,
3477
+ title: field.description ?? field.label,
3478
+ focused,
3479
+ onLabelClick: () => controller.focusField(field.id),
3480
+ onContextMenu: (x, y) => controller.requestContextMenu(field.id, x, y),
3481
+ leading: showKeyframes ? /* @__PURE__ */ jsxs5(Fragment2, { children: [
3482
+ /* @__PURE__ */ jsx6(IconButton2, { size: "sm", icon: /* @__PURE__ */ jsx6(StopwatchIcon, {}), label: "Toggle animation", active: anim.animated, onClick: () => controller.keyframe(field.id, "toggleAnim") }),
3483
+ anim.animated ? /* @__PURE__ */ jsxs5(Fragment2, { children: [
3484
+ /* @__PURE__ */ jsx6(IconButton2, { size: "sm", icon: /* @__PURE__ */ jsx6(PrevIcon, {}), label: "Previous keyframe", disabled: anim.canPrev === false, onClick: () => controller.keyframe(field.id, "prev") }),
3485
+ /* @__PURE__ */ jsx6(IconButton2, { size: "sm", icon: /* @__PURE__ */ jsx6(DiamondIcon, { filled: !!anim.onKeyframe }), label: anim.onKeyframe ? "Remove keyframe" : "Add keyframe", onClick: () => controller.keyframe(field.id, anim.onKeyframe ? "remove" : "add") }),
3486
+ /* @__PURE__ */ jsx6(IconButton2, { size: "sm", icon: /* @__PURE__ */ jsx6(NextIcon, {}), label: "Next keyframe", disabled: anim.canNext === false, onClick: () => controller.keyframe(field.id, "next") })
3487
+ ] }) : null
3488
+ ] }) : null,
3489
+ trailing: /* @__PURE__ */ jsxs5(Fragment2, { children: [
3490
+ showKeyframes && anim.animated && anim.onKeyframe ? /* @__PURE__ */ jsx6(Select2, { size: "sm", options: easingAll, value: easing, label: "Easing", onChange: (v) => controller.keyframe(field.id, "setEasing", v) }) : null,
3491
+ showKeyframes ? /* @__PURE__ */ jsx6(Badge, { size: "sm", children: controller.keyframeChip(field.id) }) : null,
3492
+ controller.areTokensShown() && field.token?.bindable !== false ? /* @__PURE__ */ jsx6(IconButton2, { size: "sm", icon: /* @__PURE__ */ jsx6(LinkIcon, {}), label: bound ? "Unbind token" : "Bind token", active: bound, onClick: () => controller.bindToken(field.id, bound ? null : controller.getTokens()[0]?.id ?? null) }) : null,
3493
+ field.defaultValue !== void 0 && isFieldEditable(field) ? /* @__PURE__ */ jsx6(IconButton2, { size: "sm", icon: /* @__PURE__ */ jsx6(ResetIcon, {}), label: "Reset to default", onClick: () => controller.resetField(field.id) }) : null
3494
+ ] }),
3495
+ children: bound ? /* @__PURE__ */ jsx6(Badge, { title: `Bound to ${field.token?.tokenName ?? field.token?.tokenId}`, children: field.token?.tokenName ?? field.token?.tokenId }) : /* @__PURE__ */ jsx6(FieldWidget, { field, controller })
4048
3496
  }
4049
3497
  ),
4050
- field.description && field.type === "info" && /* @__PURE__ */ jsx6("div", { style: S2.description, children: field.description })
3498
+ field.description && field.type === "info" ? /* @__PURE__ */ jsx6(Stack2, { pad: "inset", children: /* @__PURE__ */ jsx6(Text2, { role: "caption", children: field.description }) }) : null
4051
3499
  ] });
4052
3500
  }
4053
3501
  function FieldWidget({
@@ -5179,13 +4627,13 @@ function HistoryPanelView({ controller }) {
5179
4627
  },
5180
4628
  [controller]
5181
4629
  );
5182
- return /* @__PURE__ */ jsxs7("div", { style: S3.root, className: "xeno-history-panel", children: [
5183
- /* @__PURE__ */ jsxs7("div", { style: S3.header, children: [
4630
+ return /* @__PURE__ */ jsxs7("div", { style: S2.root, className: "xeno-history-panel", children: [
4631
+ /* @__PURE__ */ jsxs7("div", { style: S2.header, children: [
5184
4632
  /* @__PURE__ */ jsx8(
5185
4633
  "button",
5186
4634
  {
5187
4635
  type: "button",
5188
- style: { ...S3.iconBtn, opacity: controller.canUndo() ? 0.8 : 0.25 },
4636
+ style: { ...S2.iconBtn, opacity: controller.canUndo() ? 0.8 : 0.25 },
5189
4637
  disabled: !controller.canUndo(),
5190
4638
  onClick: () => controller.undo(),
5191
4639
  title: "Undo",
@@ -5197,7 +4645,7 @@ function HistoryPanelView({ controller }) {
5197
4645
  "button",
5198
4646
  {
5199
4647
  type: "button",
5200
- style: { ...S3.iconBtn, opacity: controller.canRedo() ? 0.8 : 0.25 },
4648
+ style: { ...S2.iconBtn, opacity: controller.canRedo() ? 0.8 : 0.25 },
5201
4649
  disabled: !controller.canRedo(),
5202
4650
  onClick: () => controller.redo(),
5203
4651
  title: "Redo",
@@ -5212,12 +4660,12 @@ function HistoryPanelView({ controller }) {
5212
4660
  value: controller.getFilter(),
5213
4661
  placeholder: "Search history",
5214
4662
  onChange: (e) => controller.setFilter(e.target.value),
5215
- style: S3.search,
4663
+ style: S2.search,
5216
4664
  "aria-label": "Search history",
5217
4665
  spellCheck: false
5218
4666
  }
5219
4667
  ),
5220
- /* @__PURE__ */ jsxs7("span", { style: S3.counter, children: [
4668
+ /* @__PURE__ */ jsxs7("span", { style: S2.counter, children: [
5221
4669
  controller.getAppliedCount(),
5222
4670
  " / ",
5223
4671
  controller.getTotalCount()
@@ -5226,7 +4674,7 @@ function HistoryPanelView({ controller }) {
5226
4674
  "button",
5227
4675
  {
5228
4676
  type: "button",
5229
- style: S3.iconBtn,
4677
+ style: S2.iconBtn,
5230
4678
  onClick: () => controller.requestClear(),
5231
4679
  title: "Clear history",
5232
4680
  "aria-label": "Clear history",
@@ -5234,19 +4682,19 @@ function HistoryPanelView({ controller }) {
5234
4682
  }
5235
4683
  )
5236
4684
  ] }),
5237
- controller.isConfirmingClear() && /* @__PURE__ */ jsxs7("div", { style: S3.confirmBar, role: "alertdialog", "aria-label": "Confirm clear history", children: [
4685
+ controller.isConfirmingClear() && /* @__PURE__ */ jsxs7("div", { style: S2.confirmBar, role: "alertdialog", "aria-label": "Confirm clear history", children: [
5238
4686
  /* @__PURE__ */ jsx8("span", { children: "Clear all history?" }),
5239
- /* @__PURE__ */ jsxs7("span", { style: S3.confirmActions, children: [
5240
- /* @__PURE__ */ jsx8("button", { type: "button", style: S3.textBtn, onClick: () => controller.confirmClearNow(), children: "Clear" }),
5241
- /* @__PURE__ */ jsx8("button", { type: "button", style: S3.textBtnDim, onClick: () => controller.cancelClear(), children: "Cancel" })
4687
+ /* @__PURE__ */ jsxs7("span", { style: S2.confirmActions, children: [
4688
+ /* @__PURE__ */ jsx8("button", { type: "button", style: S2.textBtn, onClick: () => controller.confirmClearNow(), children: "Clear" }),
4689
+ /* @__PURE__ */ jsx8("button", { type: "button", style: S2.textBtnDim, onClick: () => controller.cancelClear(), children: "Cancel" })
5242
4690
  ] })
5243
4691
  ] }),
5244
- controller.isPruned() && /* @__PURE__ */ jsx8("div", { style: S3.prunedNote, children: "Earlier history discarded (limit reached)" }),
4692
+ controller.isPruned() && /* @__PURE__ */ jsx8("div", { style: S2.prunedNote, children: "Earlier history discarded (limit reached)" }),
5245
4693
  /* @__PURE__ */ jsxs7(
5246
4694
  "div",
5247
4695
  {
5248
4696
  ref: scrollRef,
5249
- style: S3.scroll,
4697
+ style: S2.scroll,
5250
4698
  onScroll,
5251
4699
  onKeyDown,
5252
4700
  onMouseLeave: () => controller.setHovered(null),
@@ -5264,17 +4712,17 @@ function HistoryPanelView({ controller }) {
5264
4712
  },
5265
4713
  row.entryId ?? "__original__"
5266
4714
  )) }) }),
5267
- rows.length === 0 && /* @__PURE__ */ jsx8("div", { style: S3.empty, children: "No history" })
4715
+ rows.length === 0 && /* @__PURE__ */ jsx8("div", { style: S2.empty, children: "No history" })
5268
4716
  ]
5269
4717
  }
5270
4718
  ),
5271
- memory && /* @__PURE__ */ jsxs7("div", { style: S3.footer, children: [
4719
+ memory && /* @__PURE__ */ jsxs7("div", { style: S2.footer, children: [
5272
4720
  /* @__PURE__ */ jsxs7("span", { children: [
5273
4721
  memory.usedMB.toFixed(1),
5274
4722
  " MB",
5275
4723
  memory.limitMB ? ` / ${memory.limitMB} MB` : ""
5276
4724
  ] }),
5277
- memory.onDiskCount !== void 0 && /* @__PURE__ */ jsxs7("span", { style: S3.dim, children: [
4725
+ memory.onDiskCount !== void 0 && /* @__PURE__ */ jsxs7("span", { style: S2.dim, children: [
5278
4726
  memory.onDiskCount,
5279
4727
  " on disk"
5280
4728
  ] })
@@ -5287,7 +4735,7 @@ function HistoryRowView({ row, controller, rowHeight, focused }) {
5287
4735
  const failed = entry?.status === "failed";
5288
4736
  const jumpable = controller.isJumpAllowed() && entry?.caps?.jumpable !== false;
5289
4737
  const style = {
5290
- ...S3.row,
4738
+ ...S2.row,
5291
4739
  height: rowHeight,
5292
4740
  background: row.current ? "var(--xeno-border)" : "transparent",
5293
4741
  // FUTURE rows (after the cursor) are dimmed + struck through — the redoable region.
@@ -5311,22 +4759,22 @@ function HistoryRowView({ row, controller, rowHeight, focused }) {
5311
4759
  },
5312
4760
  title: row.label,
5313
4761
  children: [
5314
- controller.areIconsShown() && /* @__PURE__ */ jsx8("span", { style: S3.iconCell, children: /* @__PURE__ */ jsx8(EntryIcon, { name: row.kind === "original" ? "original" : controller.getIconName(entry?.kind) }) }),
5315
- /* @__PURE__ */ jsx8("span", { style: S3.ordinal, children: row.kind === "entry" ? row.ordinal : "" }),
5316
- /* @__PURE__ */ jsx8("span", { style: S3.label, children: row.label }),
4762
+ controller.areIconsShown() && /* @__PURE__ */ jsx8("span", { style: S2.iconCell, children: /* @__PURE__ */ jsx8(EntryIcon, { name: row.kind === "original" ? "original" : controller.getIconName(entry?.kind) }) }),
4763
+ /* @__PURE__ */ jsx8("span", { style: S2.ordinal, children: row.kind === "entry" ? row.ordinal : "" }),
4764
+ /* @__PURE__ */ jsx8("span", { style: S2.label, children: row.label }),
5317
4765
  pending && /* @__PURE__ */ jsx8(PendingGlyph, {}),
5318
- failed && /* @__PURE__ */ jsx8("span", { style: S3.failed, children: "failed" }),
5319
- controller.isSourceShown() && entry?.source && entry.source !== "user" && /* @__PURE__ */ jsx8("span", { style: S3.badge, title: `Source: ${entry.source}`, children: entry.source === "agent" ? "AI" : "S" }),
5320
- entry?.coalesced && entry.coalesced > 1 && /* @__PURE__ */ jsxs7("span", { style: S3.badge, title: `${entry.coalesced} actions coalesced`, children: [
4766
+ failed && /* @__PURE__ */ jsx8("span", { style: S2.failed, children: "failed" }),
4767
+ controller.isSourceShown() && entry?.source && entry.source !== "user" && /* @__PURE__ */ jsx8("span", { style: S2.badge, title: `Source: ${entry.source}`, children: entry.source === "agent" ? "AI" : "S" }),
4768
+ entry?.coalesced && entry.coalesced > 1 && /* @__PURE__ */ jsxs7("span", { style: S2.badge, title: `${entry.coalesced} actions coalesced`, children: [
5321
4769
  "\xD7",
5322
4770
  entry.coalesced
5323
4771
  ] }),
5324
- controller.areTimestampsShown() && entry?.at !== void 0 && /* @__PURE__ */ jsx8("span", { style: S3.time, children: formatTime(entry.at) }),
4772
+ controller.areTimestampsShown() && entry?.at !== void 0 && /* @__PURE__ */ jsx8("span", { style: S2.time, children: formatTime(entry.at) }),
5325
4773
  pending && /* @__PURE__ */ jsx8(
5326
4774
  "button",
5327
4775
  {
5328
4776
  type: "button",
5329
- style: S3.iconBtn,
4777
+ style: S2.iconBtn,
5330
4778
  onClick: (e) => {
5331
4779
  e.stopPropagation();
5332
4780
  controller.cancelPending(entry?.id);
@@ -5345,7 +4793,7 @@ function formatTime(at) {
5345
4793
  if (Number.isNaN(date.getTime())) return typeof at === "string" ? at : "";
5346
4794
  return date.toLocaleTimeString(void 0, { hour: "2-digit", minute: "2-digit" });
5347
4795
  }
5348
- var S3 = {
4796
+ var S2 = {
5349
4797
  root: {
5350
4798
  display: "flex",
5351
4799
  flexDirection: "column",
@@ -6667,14 +6115,14 @@ function ColorPanelView({ controller }) {
6667
6115
  );
6668
6116
  const componentLabels = COMPONENT_LABELS[space];
6669
6117
  const comps = value.components ?? [];
6670
- return /* @__PURE__ */ jsxs8("div", { style: S4.root, className: "xeno-color-panel", children: [
6671
- controller.getChannelsMode() === "fg-bg" && /* @__PURE__ */ jsxs8("div", { style: S4.channels, children: [
6118
+ return /* @__PURE__ */ jsxs8("div", { style: S3.root, className: "xeno-color-panel", children: [
6119
+ controller.getChannelsMode() === "fg-bg" && /* @__PURE__ */ jsxs8("div", { style: S3.channels, children: [
6672
6120
  /* @__PURE__ */ jsx9(
6673
6121
  "button",
6674
6122
  {
6675
6123
  type: "button",
6676
6124
  "aria-pressed": controller.getActiveChannel() === "fg",
6677
- style: { ...S4.chip, ...controller.getActiveChannel() === "fg" ? S4.chipActive : null, background: value.hex },
6125
+ style: { ...S3.chip, ...controller.getActiveChannel() === "fg" ? S3.chipActive : null, background: value.hex },
6678
6126
  onClick: () => controller.setChannel("fg"),
6679
6127
  title: "Foreground"
6680
6128
  }
@@ -6683,7 +6131,7 @@ function ColorPanelView({ controller }) {
6683
6131
  "button",
6684
6132
  {
6685
6133
  type: "button",
6686
- style: S4.swap,
6134
+ style: S3.swap,
6687
6135
  onClick: () => controller.swapChannels(),
6688
6136
  title: "Swap FG/BG (X)",
6689
6137
  children: "\u21C4"
@@ -6694,20 +6142,20 @@ function ColorPanelView({ controller }) {
6694
6142
  {
6695
6143
  type: "button",
6696
6144
  "aria-pressed": controller.getActiveChannel() === "bg",
6697
- style: { ...S4.chip, ...controller.getActiveChannel() === "bg" ? S4.chipActive : null },
6145
+ style: { ...S3.chip, ...controller.getActiveChannel() === "bg" ? S3.chipActive : null },
6698
6146
  onClick: () => controller.setChannel("bg"),
6699
6147
  title: "Background"
6700
6148
  }
6701
6149
  )
6702
6150
  ] }),
6703
- /* @__PURE__ */ jsxs8("div", { style: S4.pickerRow, children: [
6151
+ /* @__PURE__ */ jsxs8("div", { style: S3.pickerRow, children: [
6704
6152
  /* @__PURE__ */ jsx9(
6705
6153
  "canvas",
6706
6154
  {
6707
6155
  ref: spectrumRef,
6708
6156
  width: 200,
6709
6157
  height: 140,
6710
- style: { ...S4.spectrum, ...bound ? S4.disabled : null },
6158
+ style: { ...S3.spectrum, ...bound ? S3.disabled : null },
6711
6159
  onPointerDown: (e) => onSpectrumPointer(e, true),
6712
6160
  onPointerMove: (e) => onSpectrumPointer(e, false),
6713
6161
  onPointerUp: endDrag
@@ -6719,7 +6167,7 @@ function ColorPanelView({ controller }) {
6719
6167
  ref: hueRef,
6720
6168
  width: 14,
6721
6169
  height: 140,
6722
- style: { ...S4.strip, ...bound ? S4.disabled : null },
6170
+ style: { ...S3.strip, ...bound ? S3.disabled : null },
6723
6171
  onPointerDown: (e) => onHuePointer(e, true),
6724
6172
  onPointerMove: (e) => onHuePointer(e, false),
6725
6173
  onPointerUp: endDrag
@@ -6731,20 +6179,20 @@ function ColorPanelView({ controller }) {
6731
6179
  ref: alphaRef,
6732
6180
  width: 14,
6733
6181
  height: 140,
6734
- style: { ...S4.strip, ...bound ? S4.disabled : null },
6182
+ style: { ...S3.strip, ...bound ? S3.disabled : null },
6735
6183
  onPointerDown: (e) => onAlphaPointer(e, true),
6736
6184
  onPointerMove: (e) => onAlphaPointer(e, false),
6737
6185
  onPointerUp: endDrag
6738
6186
  }
6739
6187
  )
6740
6188
  ] }),
6741
- /* @__PURE__ */ jsxs8("div", { style: S4.controls, children: [
6189
+ /* @__PURE__ */ jsxs8("div", { style: S3.controls, children: [
6742
6190
  /* @__PURE__ */ jsx9(
6743
6191
  "select",
6744
6192
  {
6745
6193
  value: space,
6746
6194
  onChange: (e) => controller.setSpace(e.target.value),
6747
- style: S4.select,
6195
+ style: S3.select,
6748
6196
  "aria-label": "Color model",
6749
6197
  children: EDIT_SPACES.map((s) => /* @__PURE__ */ jsx9("option", { value: s, children: SPACE_LABEL[s] }, s))
6750
6198
  }
@@ -6756,12 +6204,12 @@ function ColorPanelView({ controller }) {
6756
6204
  value: value.hex,
6757
6205
  onChange: onHexInput,
6758
6206
  disabled: bound,
6759
- style: S4.hexInput,
6207
+ style: S3.hexInput,
6760
6208
  "aria-label": "Hex",
6761
6209
  spellCheck: false
6762
6210
  }
6763
- ) : /* @__PURE__ */ jsx9("div", { style: S4.componentRow, children: (componentLabels ?? []).map((label, i) => /* @__PURE__ */ jsxs8("label", { style: S4.componentField, children: [
6764
- /* @__PURE__ */ jsx9("span", { style: S4.componentLabel, children: label }),
6211
+ ) : /* @__PURE__ */ jsx9("div", { style: S3.componentRow, children: (componentLabels ?? []).map((label, i) => /* @__PURE__ */ jsxs8("label", { style: S3.componentField, children: [
6212
+ /* @__PURE__ */ jsx9("span", { style: S3.componentLabel, children: label }),
6765
6213
  /* @__PURE__ */ jsx9(
6766
6214
  "input",
6767
6215
  {
@@ -6769,12 +6217,12 @@ function ColorPanelView({ controller }) {
6769
6217
  value: roundForSpace(space, i, comps[i] ?? 0),
6770
6218
  onChange: (e) => onComponentInput(i, e.target.value),
6771
6219
  disabled: bound,
6772
- style: S4.numInput
6220
+ style: S3.numInput
6773
6221
  }
6774
6222
  )
6775
6223
  ] }, label)) }),
6776
- controller.isAlphaShown() && /* @__PURE__ */ jsxs8("label", { style: S4.alphaField, children: [
6777
- /* @__PURE__ */ jsx9("span", { style: S4.componentLabel, children: "A" }),
6224
+ controller.isAlphaShown() && /* @__PURE__ */ jsxs8("label", { style: S3.alphaField, children: [
6225
+ /* @__PURE__ */ jsx9("span", { style: S3.componentLabel, children: "A" }),
6778
6226
  /* @__PURE__ */ jsx9(
6779
6227
  "input",
6780
6228
  {
@@ -6784,20 +6232,20 @@ function ColorPanelView({ controller }) {
6784
6232
  value: Math.round(value.alpha * 100),
6785
6233
  onChange: (e) => controller.setAlpha(Number(e.target.value) / 100, { commit: true }),
6786
6234
  disabled: bound,
6787
- style: S4.numInput
6235
+ style: S3.numInput
6788
6236
  }
6789
6237
  )
6790
6238
  ] }),
6791
- /* @__PURE__ */ jsx9("button", { type: "button", style: S4.iconBtn, title: "Pick from screen", onClick: () => controller.requestEyedropper(), children: "\u29BF" })
6239
+ /* @__PURE__ */ jsx9("button", { type: "button", style: S3.iconBtn, title: "Pick from screen", onClick: () => controller.requestEyedropper(), children: "\u29BF" })
6792
6240
  ] }),
6793
- controller.hasTokens() && /* @__PURE__ */ jsxs8("div", { style: S4.tokenRow, children: [
6794
- /* @__PURE__ */ jsx9("span", { style: S4.componentLabel, children: "Token" }),
6241
+ controller.hasTokens() && /* @__PURE__ */ jsxs8("div", { style: S3.tokenRow, children: [
6242
+ /* @__PURE__ */ jsx9("span", { style: S3.componentLabel, children: "Token" }),
6795
6243
  /* @__PURE__ */ jsxs8(
6796
6244
  "select",
6797
6245
  {
6798
6246
  value: controller.getBoundTokenId() ?? "",
6799
6247
  onChange: (e) => e.target.value ? controller.bindToken(e.target.value) : controller.unbindToken(),
6800
- style: S4.select,
6248
+ style: S3.select,
6801
6249
  "aria-label": "Bind token",
6802
6250
  children: [
6803
6251
  /* @__PURE__ */ jsx9("option", { value: "", children: "\u2014 raw \u2014" }),
@@ -6805,17 +6253,17 @@ function ColorPanelView({ controller }) {
6805
6253
  ]
6806
6254
  }
6807
6255
  ),
6808
- bound && /* @__PURE__ */ jsx9("button", { type: "button", style: S4.textBtn, onClick: () => controller.unbindToken(), children: "Unbind" })
6256
+ bound && /* @__PURE__ */ jsx9("button", { type: "button", style: S3.textBtn, onClick: () => controller.unbindToken(), children: "Unbind" })
6809
6257
  ] }),
6810
- /* @__PURE__ */ jsxs8("div", { style: S4.swatchHeader, children: [
6811
- /* @__PURE__ */ jsx9("span", { style: S4.sectionLabel, children: "Swatches" }),
6812
- /* @__PURE__ */ jsx9("button", { type: "button", style: S4.textBtn, onClick: () => void controller.addSwatch(), children: "+ Save" })
6258
+ /* @__PURE__ */ jsxs8("div", { style: S3.swatchHeader, children: [
6259
+ /* @__PURE__ */ jsx9("span", { style: S3.sectionLabel, children: "Swatches" }),
6260
+ /* @__PURE__ */ jsx9("button", { type: "button", style: S3.textBtn, onClick: () => void controller.addSwatch(), children: "+ Save" })
6813
6261
  ] }),
6814
- /* @__PURE__ */ jsx9("div", { style: S4.swatchGrid, children: controller.getSwatches().map((hex) => /* @__PURE__ */ jsx9(
6262
+ /* @__PURE__ */ jsx9("div", { style: S3.swatchGrid, children: controller.getSwatches().map((hex) => /* @__PURE__ */ jsx9(
6815
6263
  "button",
6816
6264
  {
6817
6265
  type: "button",
6818
- style: { ...S4.swatch, background: hex },
6266
+ style: { ...S3.swatch, background: hex },
6819
6267
  title: hex,
6820
6268
  onClick: () => controller.selectColor(hex),
6821
6269
  onContextMenu: (e) => {
@@ -6826,12 +6274,12 @@ function ColorPanelView({ controller }) {
6826
6274
  hex
6827
6275
  )) }),
6828
6276
  controller.getRecent().length > 0 && /* @__PURE__ */ jsxs8(Fragment3, { children: [
6829
- /* @__PURE__ */ jsx9("div", { style: S4.sectionLabel, children: "Recent" }),
6830
- /* @__PURE__ */ jsx9("div", { style: S4.swatchGrid, children: controller.getRecent().map((hex, i) => /* @__PURE__ */ jsx9(
6277
+ /* @__PURE__ */ jsx9("div", { style: S3.sectionLabel, children: "Recent" }),
6278
+ /* @__PURE__ */ jsx9("div", { style: S3.swatchGrid, children: controller.getRecent().map((hex, i) => /* @__PURE__ */ jsx9(
6831
6279
  "button",
6832
6280
  {
6833
6281
  type: "button",
6834
- style: { ...S4.swatch, background: hex },
6282
+ style: { ...S3.swatch, background: hex },
6835
6283
  title: hex,
6836
6284
  onClick: () => controller.selectColor(hex)
6837
6285
  },
@@ -6847,7 +6295,7 @@ function roundForSpace(space, index, v) {
6847
6295
  if (space === "oklch") return Math.round(v * 10) / 10;
6848
6296
  return Math.round(v);
6849
6297
  }
6850
- var S4 = {
6298
+ var S3 = {
6851
6299
  root: { display: "flex", flexDirection: "column", gap: 8, padding: 8, fontSize: 11, color: "var(--xeno-text)", background: "var(--xeno-canvas)", minWidth: 232, userSelect: "none" },
6852
6300
  channels: { display: "flex", alignItems: "center", gap: 6 },
6853
6301
  chip: { width: 28, height: 20, borderRadius: 2, border: "1px solid var(--xeno-control)", background: "var(--xeno-canvas)", cursor: "pointer", padding: 0 },
@@ -8144,7 +7592,7 @@ var curveManifest = {
8144
7592
 
8145
7593
  // src/edit/curve/react/CurvePanelView.tsx
8146
7594
  import { useCallback as useCallback6, useEffect as useEffect5, useRef as useRef6, useSyncExternalStore as useSyncExternalStore5 } from "react";
8147
- import { EmptyState, StatusBar, Toolbar, ToolbarGroup } from "@xenosystem/components/chrome";
7595
+ import { EmptyState as EmptyState2, StatusBar, Toolbar, ToolbarGroup } from "@xenosystem/components/chrome";
8148
7596
  import { formatTick } from "@xenosystem/time-core";
8149
7597
  import { Fragment as Fragment4, jsx as jsx10, jsxs as jsxs9 } from "react/jsx-runtime";
8150
7598
  var DASHES = ["none", "4 2", "1 2", "6 2 1 2"];
@@ -8252,7 +7700,7 @@ function CurvePanelView({ controller, showPresets = true }) {
8252
7700
  )) })
8253
7701
  }
8254
7702
  ) : null,
8255
- channels.length === 0 ? /* @__PURE__ */ jsx10(EmptyState, { title: "No curves", hint: "Wire an animated property into this panel's input." }) : /* @__PURE__ */ jsx10(
7703
+ channels.length === 0 ? /* @__PURE__ */ jsx10(EmptyState2, { title: "No curves", hint: "Wire an animated property into this panel's input." }) : /* @__PURE__ */ jsx10(
8256
7704
  "div",
8257
7705
  {
8258
7706
  ref: containerRef,
@@ -9021,7 +8469,7 @@ var viewportManifest = {
9021
8469
 
9022
8470
  // src/edit/viewport/react/ViewportPanelView.tsx
9023
8471
  import { useEffect as useEffect6, useRef as useRef7, useSyncExternalStore as useSyncExternalStore6 } from "react";
9024
- import { Badge, StatusBar as StatusBar2 } from "@xenosystem/components/chrome";
8472
+ import { Badge as Badge2, StatusBar as StatusBar2 } from "@xenosystem/components/chrome";
9025
8473
  import { jsx as jsx11, jsxs as jsxs10 } from "react/jsx-runtime";
9026
8474
  var SLOT_STYLE = {
9027
8475
  "top-left": { top: 8, left: 8 },
@@ -9131,7 +8579,7 @@ function ViewportPanelView({
9131
8579
  fontSize: 11,
9132
8580
  zIndex: 20
9133
8581
  },
9134
- children: /* @__PURE__ */ jsx11(Badge, { tone: "error", children: "graphics context lost \u2014 restoring" })
8582
+ children: /* @__PURE__ */ jsx11(Badge2, { tone: "error", children: "graphics context lost \u2014 restoring" })
9135
8583
  }
9136
8584
  ) : null,
9137
8585
  showStats && state.stats ? /* @__PURE__ */ jsx11("div", { style: { position: "absolute", left: 0, right: 0, bottom: 0, zIndex: 10 }, children: /* @__PURE__ */ jsx11(
@@ -9788,16 +9236,16 @@ var findManifest = {
9788
9236
  // src/edit/find/react/FindPanelView.tsx
9789
9237
  import { useSyncExternalStore as useSyncExternalStore7 } from "react";
9790
9238
  import {
9791
- Badge as Badge2,
9792
- EmptyState as EmptyState2,
9793
- IconButton,
9239
+ Badge as Badge3,
9240
+ EmptyState as EmptyState3,
9241
+ IconButton as IconButton3,
9794
9242
  Row,
9795
9243
  RowList,
9796
- ScrollArea,
9797
- SearchField,
9798
- Section,
9244
+ ScrollArea as ScrollArea2,
9245
+ SearchField as SearchField2,
9246
+ Section as Section2,
9799
9247
  StatusBar as StatusBar3,
9800
- TextButton,
9248
+ TextButton as TextButton2,
9801
9249
  Toolbar as Toolbar2,
9802
9250
  ToolbarGroup as ToolbarGroup2
9803
9251
  } from "@xenosystem/components/chrome";
@@ -9840,12 +9288,12 @@ function StatusLine({
9840
9288
  hasText
9841
9289
  }) {
9842
9290
  if (status === "invalidPattern") {
9843
- return /* @__PURE__ */ jsx12(Badge2, { tone: "error", title: message ?? void 0, children: "invalid pattern" });
9291
+ return /* @__PURE__ */ jsx12(Badge3, { tone: "error", title: message ?? void 0, children: "invalid pattern" });
9844
9292
  }
9845
9293
  if (status === "failed") {
9846
- return /* @__PURE__ */ jsx12(Badge2, { tone: "error", title: message ?? void 0, children: "search failed" });
9294
+ return /* @__PURE__ */ jsx12(Badge3, { tone: "error", title: message ?? void 0, children: "search failed" });
9847
9295
  }
9848
- if (status === "searching") return /* @__PURE__ */ jsx12(Badge2, { children: "searching\u2026" });
9296
+ if (status === "searching") return /* @__PURE__ */ jsx12(Badge3, { children: "searching\u2026" });
9849
9297
  if (!hasText || status === "idle") return null;
9850
9298
  return /* @__PURE__ */ jsxs11("span", { style: { fontVariantNumeric: "tabular-nums", fontSize: 10, opacity: 0.55 }, children: [
9851
9299
  displayIndex,
@@ -9898,7 +9346,7 @@ function FindPanelView({
9898
9346
  Toolbar2,
9899
9347
  {
9900
9348
  left: /* @__PURE__ */ jsx12(
9901
- SearchField,
9349
+ SearchField2,
9902
9350
  {
9903
9351
  value: state.text,
9904
9352
  onChange: (value) => controller.setText(value),
@@ -9907,7 +9355,7 @@ function FindPanelView({
9907
9355
  ),
9908
9356
  right: /* @__PURE__ */ jsxs11(ToolbarGroup2, { end: true, children: [
9909
9357
  /* @__PURE__ */ jsx12(
9910
- IconButton,
9358
+ IconButton3,
9911
9359
  {
9912
9360
  label: "Match case",
9913
9361
  active: state.options.caseSensitive,
@@ -9916,7 +9364,7 @@ function FindPanelView({
9916
9364
  }
9917
9365
  ),
9918
9366
  /* @__PURE__ */ jsx12(
9919
- IconButton,
9367
+ IconButton3,
9920
9368
  {
9921
9369
  label: "Whole word",
9922
9370
  active: state.options.wholeWord,
@@ -9925,7 +9373,7 @@ function FindPanelView({
9925
9373
  }
9926
9374
  ),
9927
9375
  /* @__PURE__ */ jsx12(
9928
- IconButton,
9376
+ IconButton3,
9929
9377
  {
9930
9378
  label: "Regular expression",
9931
9379
  active: state.options.regex,
@@ -9953,7 +9401,7 @@ function FindPanelView({
9953
9401
  ),
9954
9402
  right: /* @__PURE__ */ jsxs11(ToolbarGroup2, { end: true, children: [
9955
9403
  /* @__PURE__ */ jsx12(
9956
- IconButton,
9404
+ IconButton3,
9957
9405
  {
9958
9406
  label: "Previous match",
9959
9407
  disabled: state.matches.length === 0,
@@ -9962,7 +9410,7 @@ function FindPanelView({
9962
9410
  }
9963
9411
  ),
9964
9412
  /* @__PURE__ */ jsx12(
9965
- IconButton,
9413
+ IconButton3,
9966
9414
  {
9967
9415
  label: "Next match",
9968
9416
  disabled: state.matches.length === 0,
@@ -9970,7 +9418,7 @@ function FindPanelView({
9970
9418
  icon: /* @__PURE__ */ jsx12(DownIcon, {})
9971
9419
  }
9972
9420
  ),
9973
- /* @__PURE__ */ jsx12(TextButton, { onClick: () => controller.setReplaceVisible(!state.replaceVisible), children: state.replaceVisible ? "Hide replace" : "Replace" })
9421
+ /* @__PURE__ */ jsx12(TextButton2, { onClick: () => controller.setReplaceVisible(!state.replaceVisible), children: state.replaceVisible ? "Hide replace" : "Replace" })
9974
9422
  ] })
9975
9423
  }
9976
9424
  ),
@@ -9979,7 +9427,7 @@ function FindPanelView({
9979
9427
  Toolbar2,
9980
9428
  {
9981
9429
  left: /* @__PURE__ */ jsx12(
9982
- SearchField,
9430
+ SearchField2,
9983
9431
  {
9984
9432
  value: state.replaceText,
9985
9433
  onChange: (value) => controller.setReplaceText(value),
@@ -9987,8 +9435,8 @@ function FindPanelView({
9987
9435
  }
9988
9436
  ),
9989
9437
  right: /* @__PURE__ */ jsxs11(ToolbarGroup2, { end: true, children: [
9990
- /* @__PURE__ */ jsx12(TextButton, { disabled: !state.canReplace, onClick: () => controller.replaceCurrent(), children: "Replace" }),
9991
- /* @__PURE__ */ jsxs11(TextButton, { disabled: !state.canReplace, onClick: () => controller.replaceAll(), children: [
9438
+ /* @__PURE__ */ jsx12(TextButton2, { disabled: !state.canReplace, onClick: () => controller.replaceCurrent(), children: "Replace" }),
9439
+ /* @__PURE__ */ jsxs11(TextButton2, { disabled: !state.canReplace, onClick: () => controller.replaceAll(), children: [
9992
9440
  "All (",
9993
9441
  state.matches.length,
9994
9442
  ")"
@@ -9996,18 +9444,18 @@ function FindPanelView({
9996
9444
  ] })
9997
9445
  }
9998
9446
  ) : null,
9999
- showResults ? /* @__PURE__ */ jsx12(ScrollArea, { children: state.status === "idle" ? /* @__PURE__ */ jsx12(EmptyState2, { title: "Find", hint: "Type to search. Enter goes to the next match." }) : state.status === "invalidPattern" ? /* @__PURE__ */ jsx12(
10000
- EmptyState2,
9447
+ showResults ? /* @__PURE__ */ jsx12(ScrollArea2, { children: state.status === "idle" ? /* @__PURE__ */ jsx12(EmptyState3, { title: "Find", hint: "Type to search. Enter goes to the next match." }) : state.status === "invalidPattern" ? /* @__PURE__ */ jsx12(
9448
+ EmptyState3,
10001
9449
  {
10002
9450
  title: "Invalid pattern",
10003
9451
  hint: state.message ?? "The expression could not be read. Fix it to search."
10004
9452
  }
10005
- ) : state.status === "failed" ? /* @__PURE__ */ jsx12(EmptyState2, { title: "Search failed", hint: state.message ?? "The host could not complete the search." }) : state.noResults ? /* @__PURE__ */ jsx12(EmptyState2, { title: "No matches", hint: `Nothing in scope matches \u201C${state.text}\u201D.` }) : state.groups.length === 1 && state.groups[0].id === "" ? /* @__PURE__ */ jsx12(RowList, { children: state.matches.map((m) => renderMatch(m, ++flatIndex)) }) : state.groups.map((group) => /* @__PURE__ */ jsx12(
10006
- Section,
9453
+ ) : state.status === "failed" ? /* @__PURE__ */ jsx12(EmptyState3, { title: "Search failed", hint: state.message ?? "The host could not complete the search." }) : state.noResults ? /* @__PURE__ */ jsx12(EmptyState3, { title: "No matches", hint: `Nothing in scope matches \u201C${state.text}\u201D.` }) : state.groups.length === 1 && state.groups[0].id === "" ? /* @__PURE__ */ jsx12(RowList, { children: state.matches.map((m) => renderMatch(m, ++flatIndex)) }) : state.groups.map((group) => /* @__PURE__ */ jsx12(
9454
+ Section2,
10007
9455
  {
10008
9456
  title: group.label || "Results",
10009
9457
  flush: true,
10010
- badge: /* @__PURE__ */ jsx12(Badge2, { children: group.matches.length }),
9458
+ badge: /* @__PURE__ */ jsx12(Badge3, { children: group.matches.length }),
10011
9459
  children: /* @__PURE__ */ jsx12(RowList, { children: group.matches.map((m) => renderMatch(m, ++flatIndex)) })
10012
9460
  },
10013
9461
  group.id
@@ -10663,13 +10111,13 @@ var commentsManifest = {
10663
10111
  // src/edit/comments/react/CommentsPanelView.tsx
10664
10112
  import { useSyncExternalStore as useSyncExternalStore8 } from "react";
10665
10113
  import {
10666
- Badge as Badge3,
10667
- EmptyState as EmptyState3,
10668
- ScrollArea as ScrollArea2,
10669
- Section as Section2,
10670
- SegmentedControl,
10114
+ Badge as Badge4,
10115
+ EmptyState as EmptyState4,
10116
+ ScrollArea as ScrollArea3,
10117
+ Section as Section3,
10118
+ SegmentedControl as SegmentedControl2,
10671
10119
  StatusBar as StatusBar4,
10672
- TextButton as TextButton2,
10120
+ TextButton as TextButton3,
10673
10121
  Toolbar as Toolbar3,
10674
10122
  ToolbarGroup as ToolbarGroup3
10675
10123
  } from "@xenosystem/components/chrome";
@@ -10713,8 +10161,8 @@ function ThreadCard({
10713
10161
  },
10714
10162
  children: /* @__PURE__ */ jsxs12("div", { style: { padding: "6px 8px", display: "flex", flexDirection: "column", gap: 4 }, children: [
10715
10163
  /* @__PURE__ */ jsxs12("div", { style: { display: "flex", alignItems: "center", gap: 4 }, children: [
10716
- badge ? /* @__PURE__ */ jsx13(Badge3, { tone: badge.tone, title: badge.title, children: badge.label }) : null,
10717
- thread.resolved ? /* @__PURE__ */ jsx13(Badge3, { children: "resolved" }) : null,
10164
+ badge ? /* @__PURE__ */ jsx13(Badge4, { tone: badge.tone, title: badge.title, children: badge.label }) : null,
10165
+ thread.resolved ? /* @__PURE__ */ jsx13(Badge4, { children: "resolved" }) : null,
10718
10166
  /* @__PURE__ */ jsx13("span", { style: { marginLeft: "auto", fontSize: 9, opacity: 0.4 }, children: formatAge(thread.createdAt, now) })
10719
10167
  ] }),
10720
10168
  thread.anchorLabel ? /* @__PURE__ */ jsx13(
@@ -10749,7 +10197,7 @@ function ThreadCard({
10749
10197
  /* @__PURE__ */ jsx13("p", { style: { fontSize: 11, opacity: 0.75, margin: 0, whiteSpace: "pre-wrap" }, children: message.body })
10750
10198
  ] }, message.id)),
10751
10199
  allowReactions && thread.reactions?.length ? /* @__PURE__ */ jsx13("div", { style: { display: "flex", gap: 4 }, children: thread.reactions.map((reaction) => /* @__PURE__ */ jsxs12(
10752
- TextButton2,
10200
+ TextButton3,
10753
10201
  {
10754
10202
  onClick: () => controller.react(
10755
10203
  thread.id,
@@ -10792,11 +10240,11 @@ function ThreadCard({
10792
10240
  }
10793
10241
  }
10794
10242
  ),
10795
- /* @__PURE__ */ jsx13(TextButton2, { onClick: () => controller.reply(thread.id), children: "Send" })
10243
+ /* @__PURE__ */ jsx13(TextButton3, { onClick: () => controller.reply(thread.id), children: "Send" })
10796
10244
  ] }) : /* @__PURE__ */ jsxs12("div", { style: { display: "flex", gap: 6 }, children: [
10797
- /* @__PURE__ */ jsx13(TextButton2, { onClick: () => controller.setReplyingTo(thread.id), children: "Reply" }),
10798
- /* @__PURE__ */ jsx13(TextButton2, { onClick: () => controller.resolve(thread.id, !thread.resolved), children: thread.resolved ? "Reopen" : "Resolve" }),
10799
- /* @__PURE__ */ jsx13(TextButton2, { onClick: () => controller.remove(thread.id), children: "Delete" })
10245
+ /* @__PURE__ */ jsx13(TextButton3, { onClick: () => controller.setReplyingTo(thread.id), children: "Reply" }),
10246
+ /* @__PURE__ */ jsx13(TextButton3, { onClick: () => controller.resolve(thread.id, !thread.resolved), children: thread.resolved ? "Reopen" : "Resolve" }),
10247
+ /* @__PURE__ */ jsx13(TextButton3, { onClick: () => controller.remove(thread.id), children: "Delete" })
10800
10248
  ] })
10801
10249
  ] })
10802
10250
  }
@@ -10817,7 +10265,7 @@ function CommentsPanelView({
10817
10265
  Toolbar3,
10818
10266
  {
10819
10267
  left: /* @__PURE__ */ jsx13(
10820
- SegmentedControl,
10268
+ SegmentedControl2,
10821
10269
  {
10822
10270
  label: "Show",
10823
10271
  value: state.filter.show ?? "open",
@@ -10830,7 +10278,7 @@ function CommentsPanelView({
10830
10278
  }
10831
10279
  ),
10832
10280
  right: /* @__PURE__ */ jsx13(ToolbarGroup3, { end: true, children: /* @__PURE__ */ jsx13(
10833
- SegmentedControl,
10281
+ SegmentedControl2,
10834
10282
  {
10835
10283
  label: "Sort",
10836
10284
  value: state.sort,
@@ -10851,20 +10299,20 @@ function CommentsPanelView({
10851
10299
  " lost the content",
10852
10300
  state.totals.orphaned === 1 ? " it was" : " they were",
10853
10301
  " about.",
10854
- state.filter.includeOrphaned === false ? /* @__PURE__ */ jsx13(TextButton2, { onClick: () => controller.setFilter({ includeOrphaned: true }), children: "Show" }) : null
10302
+ state.filter.includeOrphaned === false ? /* @__PURE__ */ jsx13(TextButton3, { onClick: () => controller.setFilter({ includeOrphaned: true }), children: "Show" }) : null
10855
10303
  ] }) : null,
10856
- /* @__PURE__ */ jsx13(ScrollArea2, { children: state.threads.length === 0 ? state.filteredEmpty ? (
10304
+ /* @__PURE__ */ jsx13(ScrollArea3, { children: state.threads.length === 0 ? state.filteredEmpty ? (
10857
10305
  // NOT "no comments". There are comments; this filter hides them, and telling a
10858
10306
  // reviewer their feedback is gone is worse than telling them nothing.
10859
10307
  /* @__PURE__ */ jsx13(
10860
- EmptyState3,
10308
+ EmptyState4,
10861
10309
  {
10862
10310
  title: "Nothing matches this filter",
10863
10311
  hint: `${state.totals.all} comment${state.totals.all === 1 ? "" : "s"} on this document.`
10864
10312
  }
10865
10313
  )
10866
10314
  ) : /* @__PURE__ */ jsx13(
10867
- EmptyState3,
10315
+ EmptyState4,
10868
10316
  {
10869
10317
  title: "No comments",
10870
10318
  hint: emptyHint ?? "Select something and add a comment."
@@ -10880,7 +10328,7 @@ function CommentsPanelView({
10880
10328
  },
10881
10329
  view.thread.id
10882
10330
  )),
10883
- showResolved && resolved.length > 0 ? /* @__PURE__ */ jsx13(Section2, { title: `Resolved (${resolved.length})`, flush: true, children: resolved.map((view) => /* @__PURE__ */ jsx13(
10331
+ showResolved && resolved.length > 0 ? /* @__PURE__ */ jsx13(Section3, { title: `Resolved (${resolved.length})`, flush: true, children: resolved.map((view) => /* @__PURE__ */ jsx13(
10884
10332
  ThreadCard,
10885
10333
  {
10886
10334
  view,
@@ -10921,7 +10369,7 @@ function CommentsPanelView({
10921
10369
  }
10922
10370
  ),
10923
10371
  /* @__PURE__ */ jsx13("div", { style: { display: "flex", justifyContent: "flex-end", marginTop: 2 }, children: /* @__PURE__ */ jsx13(
10924
- TextButton2,
10372
+ TextButton3,
10925
10373
  {
10926
10374
  strong: true,
10927
10375
  disabled: state.activeAnchor === null || state.draft.trim() === "",
@@ -12103,7 +11551,7 @@ var nodegraphManifest = {
12103
11551
 
12104
11552
  // src/edit/nodegraph/react/NodeGraphPanelView.tsx
12105
11553
  import { useCallback as useCallback7, useEffect as useEffect7, useRef as useRef8, useSyncExternalStore as useSyncExternalStore9 } from "react";
12106
- import { EmptyState as EmptyState4, StatusBar as StatusBar5, Toolbar as Toolbar4, ToolbarGroup as ToolbarGroup4 } from "@xenosystem/components/chrome";
11554
+ import { EmptyState as EmptyState5, StatusBar as StatusBar5, Toolbar as Toolbar4, ToolbarGroup as ToolbarGroup4 } from "@xenosystem/components/chrome";
12107
11555
  import { Fragment as Fragment6, jsx as jsx14, jsxs as jsxs13 } from "react/jsx-runtime";
12108
11556
  var HEADER_H2 = 24;
12109
11557
  var PORT_ROW_H2 = 18;
@@ -12193,7 +11641,7 @@ function NodeGraphPanelView({ controller }) {
12193
11641
  ] })
12194
11642
  }
12195
11643
  ),
12196
- total === 0 ? /* @__PURE__ */ jsx14(EmptyState4, { title: "Empty graph", hint: "Wire a host graph into this panel's input." }) : /* @__PURE__ */ jsxs13(
11644
+ total === 0 ? /* @__PURE__ */ jsx14(EmptyState5, { title: "Empty graph", hint: "Wire a host graph into this panel's input." }) : /* @__PURE__ */ jsxs13(
12197
11645
  "div",
12198
11646
  {
12199
11647
  ref: containerRef,
@@ -13632,14 +13080,14 @@ var treeManifest = {
13632
13080
  // src/edit/tree/react/TreePanelView.tsx
13633
13081
  import { useCallback as useCallback8, useEffect as useEffect8, useRef as useRef9, useState as useState2, useSyncExternalStore as useSyncExternalStore10 } from "react";
13634
13082
  import {
13635
- Badge as Badge4,
13636
- EmptyState as EmptyState5,
13083
+ Badge as Badge5,
13084
+ EmptyState as EmptyState6,
13637
13085
  ErrorState,
13638
- IconButton as IconButton2,
13086
+ IconButton as IconButton4,
13639
13087
  LoadingState,
13640
13088
  Row as Row2,
13641
- ScrollArea as ScrollArea3,
13642
- SearchField as SearchField2,
13089
+ ScrollArea as ScrollArea4,
13090
+ SearchField as SearchField3,
13643
13091
  StatusBar as StatusBar6,
13644
13092
  Toolbar as Toolbar5,
13645
13093
  ToolbarGroup as ToolbarGroup5
@@ -13775,7 +13223,7 @@ function TreePanelView({
13775
13223
  const sourceState = source?.sourceState ?? "idle";
13776
13224
  const body = (() => {
13777
13225
  if (!source || sourceState === "idle") {
13778
- return /* @__PURE__ */ jsx16(EmptyState5, { title: "No source", hint: emptyHint ?? "Connect a source to browse it." });
13226
+ return /* @__PURE__ */ jsx16(EmptyState6, { title: "No source", hint: emptyHint ?? "Connect a source to browse it." });
13779
13227
  }
13780
13228
  if (sourceState === "loading" && state.rows.length === 0) {
13781
13229
  return /* @__PURE__ */ jsx16(LoadingState, { label: source.sourceMessage ?? "Loading\u2026" });
@@ -13792,8 +13240,8 @@ function TreePanelView({
13792
13240
  );
13793
13241
  }
13794
13242
  if (state.rows.length === 0) {
13795
- return state.filter ? /* @__PURE__ */ jsx16(EmptyState5, { title: "No matches", hint: `Nothing matches \u201C${state.filter}\u201D.` }) : /* @__PURE__ */ jsx16(
13796
- EmptyState5,
13243
+ return state.filter ? /* @__PURE__ */ jsx16(EmptyState6, { title: "No matches", hint: `Nothing matches \u201C${state.filter}\u201D.` }) : /* @__PURE__ */ jsx16(
13244
+ EmptyState6,
13797
13245
  {
13798
13246
  title: "Nothing here",
13799
13247
  hint: emptyHint ?? source.sourceMessage ?? "This source has no items yet."
@@ -13808,7 +13256,7 @@ function TreePanelView({
13808
13256
  overscan
13809
13257
  });
13810
13258
  const slice = state.rows.slice(window2.startIndex, window2.endIndex);
13811
- return /* @__PURE__ */ jsx16(ScrollArea3, { children: /* @__PURE__ */ jsx16(
13259
+ return /* @__PURE__ */ jsx16(ScrollArea4, { children: /* @__PURE__ */ jsx16(
13812
13260
  "div",
13813
13261
  {
13814
13262
  ref: scrollRef,
@@ -13843,7 +13291,7 @@ function TreePanelView({
13843
13291
  Toolbar5,
13844
13292
  {
13845
13293
  left: showSearch ? /* @__PURE__ */ jsx16(
13846
- SearchField2,
13294
+ SearchField3,
13847
13295
  {
13848
13296
  value: state.filter,
13849
13297
  onChange: (term) => controller.setFilter(term),
@@ -13851,16 +13299,16 @@ function TreePanelView({
13851
13299
  }
13852
13300
  ) : void 0,
13853
13301
  right: /* @__PURE__ */ jsxs15(ToolbarGroup5, { end: true, children: [
13854
- /* @__PURE__ */ jsx16(IconButton2, { icon: /* @__PURE__ */ jsx16(ExpandGlyph, {}), label: "Expand all", onClick: () => controller.expandAll() }),
13302
+ /* @__PURE__ */ jsx16(IconButton4, { icon: /* @__PURE__ */ jsx16(ExpandGlyph, {}), label: "Expand all", onClick: () => controller.expandAll() }),
13855
13303
  /* @__PURE__ */ jsx16(
13856
- IconButton2,
13304
+ IconButton4,
13857
13305
  {
13858
13306
  icon: /* @__PURE__ */ jsx16(CollapseGlyph, {}),
13859
13307
  label: "Collapse all",
13860
13308
  onClick: () => controller.collapseAll()
13861
13309
  }
13862
13310
  ),
13863
- /* @__PURE__ */ jsx16(IconButton2, { icon: /* @__PURE__ */ jsx16(RefreshGlyph, {}), label: "Refresh", onClick: () => controller.refresh() })
13311
+ /* @__PURE__ */ jsx16(IconButton4, { icon: /* @__PURE__ */ jsx16(RefreshGlyph, {}), label: "Refresh", onClick: () => controller.refresh() })
13864
13312
  ] })
13865
13313
  }
13866
13314
  ),
@@ -13995,10 +13443,10 @@ function TreeRowView({
13995
13443
  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)),
13996
13444
  node.badges?.map((badge) => (
13997
13445
  // Opaque: the host formatted the text, the panel only places it.
13998
- /* @__PURE__ */ jsx16(Badge4, { tone: badge.tone, className: badge.title ? void 0 : void 0, children: badge.text }, badge.id)
13446
+ /* @__PURE__ */ jsx16(Badge5, { tone: badge.tone, className: badge.title ? void 0 : void 0, children: badge.text }, badge.id)
13999
13447
  )),
14000
13448
  node.actions?.map((action) => /* @__PURE__ */ jsx16(
14001
- IconButton2,
13449
+ IconButton4,
14002
13450
  {
14003
13451
  size: "sm",
14004
13452
  icon: /* @__PURE__ */ jsx16(NodeIcon, { icon: action.icon }),
@@ -14024,7 +13472,7 @@ function ChildStateChip({
14024
13472
  }
14025
13473
  if (row.childState === "error") {
14026
13474
  const error = row.node.error;
14027
- return /* @__PURE__ */ jsx16(Badge4, { tone: "error", children: error?.code === "denied" ? "no access" : error?.code ?? "failed" });
13475
+ return /* @__PURE__ */ jsx16(Badge5, { tone: "error", children: error?.code === "denied" ? "no access" : error?.code ?? "failed" });
14028
13476
  }
14029
13477
  if (row.node.hasMore && row.expanded) {
14030
13478
  return /* @__PURE__ */ jsx16(
@@ -14041,7 +13489,7 @@ function ChildStateChip({
14041
13489
  );
14042
13490
  }
14043
13491
  if (row.node.truncatedAt !== void 0) {
14044
- return /* @__PURE__ */ jsx16(Badge4, { tone: "warning", children: `first ${row.node.truncatedAt}` });
13492
+ return /* @__PURE__ */ jsx16(Badge5, { tone: "warning", children: `first ${row.node.truncatedAt}` });
14045
13493
  }
14046
13494
  if (row.expanded && isEmptyContainer(row.node)) {
14047
13495
  return /* @__PURE__ */ jsx16("span", { style: { opacity: 0.4, fontSize: 9 }, children: "empty" });