@petrarca/sonnet-ui 0.2.0 → 0.4.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.
package/dist/index.js CHANGED
@@ -889,21 +889,55 @@ var Separator2 = React14.forwardRef(
889
889
  );
890
890
  Separator2.displayName = SeparatorPrimitive.Root.displayName;
891
891
 
892
- // src/sheet.tsx
892
+ // src/resize-handle.tsx
893
893
  import * as React15 from "react";
894
+ import { cn as cn17 } from "@petrarca/sonnet-core";
895
+ import { jsx as jsx17 } from "react/jsx-runtime";
896
+ var ResizeHandle = React15.forwardRef(
897
+ ({ orientation = "vertical", gripLength = 48, className, style, ...props }, ref) => {
898
+ const isVertical = orientation === "vertical";
899
+ return /* @__PURE__ */ jsx17(
900
+ "div",
901
+ {
902
+ ref,
903
+ role: "separator",
904
+ "aria-orientation": orientation,
905
+ className: cn17(
906
+ "group relative flex shrink-0 select-none touch-none items-center justify-center rounded-sm",
907
+ "focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",
908
+ isVertical ? "mx-1 w-2 cursor-col-resize" : "my-1 h-2 cursor-row-resize",
909
+ className
910
+ ),
911
+ style,
912
+ ...props,
913
+ children: /* @__PURE__ */ jsx17(
914
+ "div",
915
+ {
916
+ className: "pointer-events-none absolute rounded-full bg-border transition-colors group-hover:bg-border-strong",
917
+ style: isVertical ? { width: 4, height: gripLength } : { height: 4, width: gripLength }
918
+ }
919
+ )
920
+ }
921
+ );
922
+ }
923
+ );
924
+ ResizeHandle.displayName = "ResizeHandle";
925
+
926
+ // src/sheet.tsx
927
+ import * as React16 from "react";
894
928
  import * as DialogPrimitive2 from "@radix-ui/react-dialog";
895
929
  import { X as X2 } from "lucide-react";
896
- import { cn as cn17 } from "@petrarca/sonnet-core";
897
- import { jsx as jsx17, jsxs as jsxs5 } from "react/jsx-runtime";
930
+ import { cn as cn18 } from "@petrarca/sonnet-core";
931
+ import { jsx as jsx18, jsxs as jsxs5 } from "react/jsx-runtime";
898
932
  var Sheet = DialogPrimitive2.Root;
899
933
  var SheetTrigger = DialogPrimitive2.Trigger;
900
934
  var SheetClose = DialogPrimitive2.Close;
901
935
  var SheetPortal = DialogPrimitive2.Portal;
902
- var SheetOverlay = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx17(
936
+ var SheetOverlay = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx18(
903
937
  DialogPrimitive2.Overlay,
904
938
  {
905
939
  ref,
906
- className: cn17(
940
+ className: cn18(
907
941
  "fixed inset-0 z-50 bg-black/50 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
908
942
  className
909
943
  ),
@@ -911,27 +945,27 @@ var SheetOverlay = React15.forwardRef(({ className, ...props }, ref) => /* @__PU
911
945
  }
912
946
  ));
913
947
  SheetOverlay.displayName = "SheetOverlay";
914
- var SheetContent = React15.forwardRef(
915
- ({ className, children, side = "right", offsetTop = "0px", ...props }, ref) => /* @__PURE__ */ jsxs5(SheetPortal, { children: [
916
- /* @__PURE__ */ jsx17(SheetOverlay, {}),
948
+ var SheetContent = React16.forwardRef(
949
+ ({ className, children, side = "right", offsetTop = "0px", style, ...props }, ref) => /* @__PURE__ */ jsxs5(SheetPortal, { children: [
950
+ /* @__PURE__ */ jsx18(SheetOverlay, {}),
917
951
  /* @__PURE__ */ jsxs5(
918
952
  DialogPrimitive2.Content,
919
953
  {
920
954
  ref,
921
- className: cn17(
955
+ className: cn18(
922
956
  "fixed z-50 flex flex-col bg-background shadow-xl transition-transform duration-300 ease-in-out",
923
957
  "bottom-0 w-[480px] max-w-[90vw] border-l",
924
958
  side === "right" && "right-0 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right",
925
959
  side === "left" && "left-0 border-l-0 border-r data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left",
926
960
  className
927
961
  ),
928
- style: { top: offsetTop },
962
+ style: { top: offsetTop, ...style },
929
963
  ...props,
930
964
  children: [
931
965
  children,
932
966
  /* @__PURE__ */ jsxs5(DialogPrimitive2.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2", children: [
933
- /* @__PURE__ */ jsx17(X2, { className: "h-4 w-4" }),
934
- /* @__PURE__ */ jsx17("span", { className: "sr-only", children: "Close" })
967
+ /* @__PURE__ */ jsx18(X2, { className: "h-4 w-4" }),
968
+ /* @__PURE__ */ jsx18("span", { className: "sr-only", children: "Close" })
935
969
  ] })
936
970
  ]
937
971
  }
@@ -942,21 +976,21 @@ SheetContent.displayName = "SheetContent";
942
976
  var SheetHeader = ({
943
977
  className,
944
978
  ...props
945
- }) => /* @__PURE__ */ jsx17("div", { className: cn17("shrink-0 border-b px-6 py-4", className), ...props });
946
- var SheetTitle = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx17(
979
+ }) => /* @__PURE__ */ jsx18("div", { className: cn18("shrink-0 border-b px-6 py-4", className), ...props });
980
+ var SheetTitle = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx18(
947
981
  DialogPrimitive2.Title,
948
982
  {
949
983
  ref,
950
- className: cn17("text-lg font-semibold", className),
984
+ className: cn18("text-lg font-semibold", className),
951
985
  ...props
952
986
  }
953
987
  ));
954
988
  SheetTitle.displayName = "SheetTitle";
955
- var SheetDescription = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx17(
989
+ var SheetDescription = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx18(
956
990
  DialogPrimitive2.Description,
957
991
  {
958
992
  ref,
959
- className: cn17("text-sm text-muted-foreground mt-1", className),
993
+ className: cn18("text-sm text-muted-foreground mt-1", className),
960
994
  ...props
961
995
  }
962
996
  ));
@@ -964,20 +998,20 @@ SheetDescription.displayName = "SheetDescription";
964
998
  var SheetBody = ({
965
999
  className,
966
1000
  ...props
967
- }) => /* @__PURE__ */ jsx17(
1001
+ }) => /* @__PURE__ */ jsx18(
968
1002
  "div",
969
1003
  {
970
- className: cn17("flex-1 overflow-y-auto px-6 py-4", className),
1004
+ className: cn18("flex-1 overflow-y-auto px-6 py-4", className),
971
1005
  ...props
972
1006
  }
973
1007
  );
974
1008
  var SheetFooter = ({
975
1009
  className,
976
1010
  ...props
977
- }) => /* @__PURE__ */ jsx17(
1011
+ }) => /* @__PURE__ */ jsx18(
978
1012
  "div",
979
1013
  {
980
- className: cn17(
1014
+ className: cn18(
981
1015
  "shrink-0 border-t px-6 py-4 flex justify-end gap-2",
982
1016
  className
983
1017
  ),
@@ -986,8 +1020,8 @@ var SheetFooter = ({
986
1020
  );
987
1021
 
988
1022
  // src/simple-group.tsx
989
- import { cn as cn18 } from "@petrarca/sonnet-core";
990
- import { jsx as jsx18 } from "react/jsx-runtime";
1023
+ import { cn as cn19 } from "@petrarca/sonnet-core";
1024
+ import { jsx as jsx19 } from "react/jsx-runtime";
991
1025
  var gapMap = {
992
1026
  0: "gap-0",
993
1027
  xs: "gap-1",
@@ -1049,10 +1083,10 @@ function SimpleGroup({
1049
1083
  const wrapClass = wrap ? wrapMap[wrap] : void 0;
1050
1084
  const growClass = grow ? "[&>*]:flex-1" : void 0;
1051
1085
  const mtClass = mt ? mtMap[mt] : void 0;
1052
- return /* @__PURE__ */ jsx18(
1086
+ return /* @__PURE__ */ jsx19(
1053
1087
  "div",
1054
1088
  {
1055
- className: cn18(
1089
+ className: cn19(
1056
1090
  "flex flex-row",
1057
1091
  gapClass,
1058
1092
  alignClass,
@@ -1070,8 +1104,8 @@ function SimpleGroup({
1070
1104
  }
1071
1105
 
1072
1106
  // src/simple-stack.tsx
1073
- import { cn as cn19 } from "@petrarca/sonnet-core";
1074
- import { jsx as jsx19 } from "react/jsx-runtime";
1107
+ import { cn as cn20 } from "@petrarca/sonnet-core";
1108
+ import { jsx as jsx20 } from "react/jsx-runtime";
1075
1109
  var gapMap2 = {
1076
1110
  0: "gap-0",
1077
1111
  xs: "gap-1",
@@ -1111,10 +1145,10 @@ function SimpleStack({
1111
1145
  const alignClass = align ? alignMap2[align] : void 0;
1112
1146
  const justifyClass = justify ? justifyMap2[justify] : void 0;
1113
1147
  const heightStyle = h !== void 0 ? { height: typeof h === "number" ? `${h}px` : h } : void 0;
1114
- return /* @__PURE__ */ jsx19(
1148
+ return /* @__PURE__ */ jsx20(
1115
1149
  "div",
1116
1150
  {
1117
- className: cn19(
1151
+ className: cn20(
1118
1152
  "flex flex-col",
1119
1153
  gapClass,
1120
1154
  alignClass,
@@ -1128,19 +1162,19 @@ function SimpleStack({
1128
1162
  }
1129
1163
 
1130
1164
  // src/tooltip.tsx
1131
- import * as React16 from "react";
1165
+ import * as React17 from "react";
1132
1166
  import * as TooltipPrimitive from "@radix-ui/react-tooltip";
1133
- import { cn as cn20 } from "@petrarca/sonnet-core";
1134
- import { jsx as jsx20 } from "react/jsx-runtime";
1167
+ import { cn as cn21 } from "@petrarca/sonnet-core";
1168
+ import { jsx as jsx21 } from "react/jsx-runtime";
1135
1169
  var TooltipProvider = TooltipPrimitive.Provider;
1136
1170
  var Tooltip = TooltipPrimitive.Root;
1137
1171
  var TooltipTrigger = TooltipPrimitive.Trigger;
1138
- var TooltipContent = React16.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx20(
1172
+ var TooltipContent = React17.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx21(
1139
1173
  TooltipPrimitive.Content,
1140
1174
  {
1141
1175
  ref,
1142
1176
  sideOffset,
1143
- className: cn20(
1177
+ className: cn21(
1144
1178
  "z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-tooltip-content-transform-origin]",
1145
1179
  className
1146
1180
  ),
@@ -1150,7 +1184,7 @@ var TooltipContent = React16.forwardRef(({ className, sideOffset = 4, ...props }
1150
1184
  TooltipContent.displayName = TooltipPrimitive.Content.displayName;
1151
1185
 
1152
1186
  // src/simple-tooltip.tsx
1153
- import { jsx as jsx21, jsxs as jsxs6 } from "react/jsx-runtime";
1187
+ import { jsx as jsx22, jsxs as jsxs6 } from "react/jsx-runtime";
1154
1188
  function SimpleTooltip({
1155
1189
  label,
1156
1190
  children,
@@ -1159,64 +1193,64 @@ function SimpleTooltip({
1159
1193
  delayDuration = 700,
1160
1194
  sideOffset
1161
1195
  }) {
1162
- return /* @__PURE__ */ jsx21(TooltipProvider, { delayDuration, children: /* @__PURE__ */ jsxs6(Tooltip, { children: [
1163
- /* @__PURE__ */ jsx21(TooltipTrigger, { asChild: true, children }),
1164
- /* @__PURE__ */ jsx21(TooltipContent, { side, align, sideOffset, children: label })
1196
+ return /* @__PURE__ */ jsx22(TooltipProvider, { delayDuration, children: /* @__PURE__ */ jsxs6(Tooltip, { children: [
1197
+ /* @__PURE__ */ jsx22(TooltipTrigger, { asChild: true, children }),
1198
+ /* @__PURE__ */ jsx22(TooltipContent, { side, align, sideOffset, children: label })
1165
1199
  ] }) });
1166
1200
  }
1167
1201
 
1168
1202
  // src/skeleton.tsx
1169
- import { cn as cn21 } from "@petrarca/sonnet-core";
1170
- import { jsx as jsx22 } from "react/jsx-runtime";
1203
+ import { cn as cn22 } from "@petrarca/sonnet-core";
1204
+ import { jsx as jsx23 } from "react/jsx-runtime";
1171
1205
  function Skeleton({
1172
1206
  className,
1173
1207
  ...props
1174
1208
  }) {
1175
- return /* @__PURE__ */ jsx22(
1209
+ return /* @__PURE__ */ jsx23(
1176
1210
  "div",
1177
1211
  {
1178
- className: cn21("animate-pulse rounded-md bg-muted", className),
1212
+ className: cn22("animate-pulse rounded-md bg-muted", className),
1179
1213
  ...props
1180
1214
  }
1181
1215
  );
1182
1216
  }
1183
1217
 
1184
1218
  // src/spinner.tsx
1185
- import { cn as cn22 } from "@petrarca/sonnet-core";
1186
- import { jsx as jsx23 } from "react/jsx-runtime";
1219
+ import { cn as cn23 } from "@petrarca/sonnet-core";
1220
+ import { jsx as jsx24 } from "react/jsx-runtime";
1187
1221
  var sizeClasses = {
1188
1222
  sm: "h-4 w-4 border-2",
1189
1223
  md: "h-8 w-8 border-2",
1190
1224
  lg: "h-12 w-12 border-3"
1191
1225
  };
1192
1226
  function Spinner({ className, size = "md" }) {
1193
- return /* @__PURE__ */ jsx23(
1227
+ return /* @__PURE__ */ jsx24(
1194
1228
  "div",
1195
1229
  {
1196
- className: cn22(
1230
+ className: cn23(
1197
1231
  "inline-block animate-spin rounded-full border-solid border-current border-r-transparent align-[-0.125em] motion-reduce:animate-[spin_1.5s_linear_infinite]",
1198
1232
  sizeClasses[size],
1199
1233
  className
1200
1234
  ),
1201
1235
  role: "status",
1202
- children: /* @__PURE__ */ jsx23("span", { className: "!absolute !-m-px !h-px !w-px !overflow-hidden !whitespace-nowrap !border-0 !p-0 ![clip:rect(0,0,0,0)]", children: "Loading..." })
1236
+ children: /* @__PURE__ */ jsx24("span", { className: "!absolute !-m-px !h-px !w-px !overflow-hidden !whitespace-nowrap !border-0 !p-0 ![clip:rect(0,0,0,0)]", children: "Loading..." })
1203
1237
  }
1204
1238
  );
1205
1239
  }
1206
1240
 
1207
1241
  // src/tabs.tsx
1208
- import * as React17 from "react";
1242
+ import * as React18 from "react";
1209
1243
  import * as TabsPrimitive from "@radix-ui/react-tabs";
1210
- import { cn as cn23 } from "@petrarca/sonnet-core";
1211
- import { jsx as jsx24 } from "react/jsx-runtime";
1244
+ import { cn as cn24 } from "@petrarca/sonnet-core";
1245
+ import { jsx as jsx25 } from "react/jsx-runtime";
1212
1246
  var Tabs = TabsPrimitive.Root;
1213
- var TabsList = React17.forwardRef(({ className, align = "start", ...props }, ref) => {
1247
+ var TabsList = React18.forwardRef(({ className, align = "start", ...props }, ref) => {
1214
1248
  const alignClass = align === "center" ? "justify-center" : align === "end" ? "justify-end" : "justify-start";
1215
- return /* @__PURE__ */ jsx24(
1249
+ return /* @__PURE__ */ jsx25(
1216
1250
  TabsPrimitive.List,
1217
1251
  {
1218
1252
  ref,
1219
- className: cn23(
1253
+ className: cn24(
1220
1254
  "inline-flex h-10 items-center rounded-md bg-muted p-1 text-muted-foreground",
1221
1255
  alignClass,
1222
1256
  className
@@ -1226,11 +1260,11 @@ var TabsList = React17.forwardRef(({ className, align = "start", ...props }, ref
1226
1260
  );
1227
1261
  });
1228
1262
  TabsList.displayName = TabsPrimitive.List.displayName;
1229
- var TabsTrigger = React17.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx24(
1263
+ var TabsTrigger = React18.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx25(
1230
1264
  TabsPrimitive.Trigger,
1231
1265
  {
1232
1266
  ref,
1233
- className: cn23(
1267
+ className: cn24(
1234
1268
  "inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",
1235
1269
  className
1236
1270
  ),
@@ -1238,11 +1272,11 @@ var TabsTrigger = React17.forwardRef(({ className, ...props }, ref) => /* @__PUR
1238
1272
  }
1239
1273
  ));
1240
1274
  TabsTrigger.displayName = TabsPrimitive.Trigger.displayName;
1241
- var TabsContent = React17.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx24(
1275
+ var TabsContent = React18.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx25(
1242
1276
  TabsPrimitive.Content,
1243
1277
  {
1244
1278
  ref,
1245
- className: cn23(
1279
+ className: cn24(
1246
1280
  "mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
1247
1281
  "data-[state=inactive]:hidden",
1248
1282
  className
@@ -1258,20 +1292,20 @@ import {
1258
1292
  Direction as DirectionPrimitive,
1259
1293
  Slot as SlotPrimitive
1260
1294
  } from "radix-ui";
1261
- import * as React21 from "react";
1295
+ import * as React22 from "react";
1262
1296
  import { useComposedRefs } from "@petrarca/sonnet-core";
1263
- import { cn as cn24 } from "@petrarca/sonnet-core";
1297
+ import { cn as cn25 } from "@petrarca/sonnet-core";
1264
1298
 
1265
1299
  // src/radix/hooks/use-as-ref.ts
1266
- import * as React19 from "react";
1300
+ import * as React20 from "react";
1267
1301
 
1268
1302
  // src/radix/hooks/use-isomorphic-layout-effect.ts
1269
- import * as React18 from "react";
1270
- var useIsomorphicLayoutEffect = typeof window !== "undefined" ? React18.useLayoutEffect : React18.useEffect;
1303
+ import * as React19 from "react";
1304
+ var useIsomorphicLayoutEffect = typeof window !== "undefined" ? React19.useLayoutEffect : React19.useEffect;
1271
1305
 
1272
1306
  // src/radix/hooks/use-as-ref.ts
1273
1307
  function useAsRef(props) {
1274
- const ref = React19.useRef(props);
1308
+ const ref = React20.useRef(props);
1275
1309
  useIsomorphicLayoutEffect(() => {
1276
1310
  ref.current = props;
1277
1311
  });
@@ -1279,9 +1313,9 @@ function useAsRef(props) {
1279
1313
  }
1280
1314
 
1281
1315
  // src/radix/hooks/use-lazy-ref.ts
1282
- import * as React20 from "react";
1316
+ import * as React21 from "react";
1283
1317
  function useLazyRef(fn) {
1284
- const ref = React20.useRef(null);
1318
+ const ref = React21.useRef(null);
1285
1319
  if (ref.current === null) {
1286
1320
  ref.current = fn();
1287
1321
  }
@@ -1289,7 +1323,7 @@ function useLazyRef(fn) {
1289
1323
  }
1290
1324
 
1291
1325
  // src/stepper.tsx
1292
- import { jsx as jsx25 } from "react/jsx-runtime";
1326
+ import { jsx as jsx26 } from "react/jsx-runtime";
1293
1327
  var ROOT_NAME = "Stepper";
1294
1328
  var LIST_NAME = "StepperList";
1295
1329
  var ITEM_NAME = "StepperItem";
@@ -1408,9 +1442,9 @@ function getDataState(value, itemValue, stepState, steps, variant = "item") {
1408
1442
  }
1409
1443
  return "inactive";
1410
1444
  }
1411
- var StoreContext = React21.createContext(null);
1445
+ var StoreContext = React22.createContext(null);
1412
1446
  function useStoreContext(consumerName) {
1413
- const context = React21.useContext(StoreContext);
1447
+ const context = React22.useContext(StoreContext);
1414
1448
  if (!context) {
1415
1449
  throw new Error(`\`${consumerName}\` must be used within \`${ROOT_NAME}\``);
1416
1450
  }
@@ -1418,15 +1452,15 @@ function useStoreContext(consumerName) {
1418
1452
  }
1419
1453
  function useStore(selector) {
1420
1454
  const store = useStoreContext("useStore");
1421
- const getSnapshot = React21.useCallback(
1455
+ const getSnapshot = React22.useCallback(
1422
1456
  () => selector(store.getState()),
1423
1457
  [store, selector]
1424
1458
  );
1425
- return React21.useSyncExternalStore(store.subscribe, getSnapshot, getSnapshot);
1459
+ return React22.useSyncExternalStore(store.subscribe, getSnapshot, getSnapshot);
1426
1460
  }
1427
- var StepperContext = React21.createContext(null);
1461
+ var StepperContext = React22.createContext(null);
1428
1462
  function useStepperContext(consumerName) {
1429
- const context = React21.useContext(StepperContext);
1463
+ const context = React22.useContext(StepperContext);
1430
1464
  if (!context) {
1431
1465
  throw new Error(`\`${consumerName}\` must be used within \`${ROOT_NAME}\``);
1432
1466
  }
@@ -1464,7 +1498,7 @@ function Stepper(props) {
1464
1498
  onValueRemove,
1465
1499
  onValidate
1466
1500
  });
1467
- const store = React21.useMemo(() => {
1501
+ const store = React22.useMemo(() => {
1468
1502
  return {
1469
1503
  subscribe: (cb) => {
1470
1504
  listenersRef.current.add(cb);
@@ -1499,12 +1533,16 @@ function Stepper(props) {
1499
1533
  hasValidation: () => !!propsRef.current.onValidate,
1500
1534
  addStep: (value2, completed, disabled2) => {
1501
1535
  const newStep = { value: value2, completed, disabled: disabled2 };
1502
- stateRef.current.steps.set(value2, newStep);
1536
+ const next = new Map(stateRef.current.steps);
1537
+ next.set(value2, newStep);
1538
+ stateRef.current.steps = next;
1503
1539
  propsRef.current.onValueAdd?.(value2);
1504
1540
  store.notify();
1505
1541
  },
1506
1542
  removeStep: (value2) => {
1507
- stateRef.current.steps.delete(value2);
1543
+ const next = new Map(stateRef.current.steps);
1544
+ next.delete(value2);
1545
+ stateRef.current.steps = next;
1508
1546
  propsRef.current.onValueRemove?.(value2);
1509
1547
  store.notify();
1510
1548
  },
@@ -1512,7 +1550,9 @@ function Stepper(props) {
1512
1550
  const step = stateRef.current.steps.get(value2);
1513
1551
  if (step) {
1514
1552
  const updatedStep = { ...step, completed, disabled: disabled2 };
1515
- stateRef.current.steps.set(value2, updatedStep);
1553
+ const next = new Map(stateRef.current.steps);
1554
+ next.set(value2, updatedStep);
1555
+ stateRef.current.steps = next;
1516
1556
  if (completed !== step.completed) {
1517
1557
  propsRef.current.onValueComplete?.(value2, completed);
1518
1558
  }
@@ -1532,9 +1572,9 @@ function Stepper(props) {
1532
1572
  }
1533
1573
  }, [value]);
1534
1574
  const dir = DirectionPrimitive.useDirection(dirProp);
1535
- const instanceId = React21.useId();
1575
+ const instanceId = React22.useId();
1536
1576
  const rootId = id ?? instanceId;
1537
- const contextValue = React21.useMemo(
1577
+ const contextValue = React22.useMemo(
1538
1578
  () => ({
1539
1579
  rootId,
1540
1580
  dir,
@@ -1547,7 +1587,7 @@ function Stepper(props) {
1547
1587
  [rootId, dir, orientation, activationMode, disabled, nonInteractive, loop]
1548
1588
  );
1549
1589
  const RootPrimitive = asChild ? SlotPrimitive.Slot : "div";
1550
- return /* @__PURE__ */ jsx25(StoreContext.Provider, { value: store, children: /* @__PURE__ */ jsx25(StepperContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx25(
1590
+ return /* @__PURE__ */ jsx26(StoreContext.Provider, { value: store, children: /* @__PURE__ */ jsx26(StepperContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx26(
1551
1591
  RootPrimitive,
1552
1592
  {
1553
1593
  id: rootId,
@@ -1556,17 +1596,17 @@ function Stepper(props) {
1556
1596
  "data-slot": "stepper",
1557
1597
  dir,
1558
1598
  ...rootProps,
1559
- className: cn24(
1560
- "flex gap-6",
1599
+ className: cn25(
1600
+ "flex gap-3",
1561
1601
  orientation === "horizontal" ? "w-full flex-col" : "flex-row",
1562
1602
  className
1563
1603
  )
1564
1604
  }
1565
1605
  ) }) });
1566
1606
  }
1567
- var FocusContext = React21.createContext(null);
1607
+ var FocusContext = React22.createContext(null);
1568
1608
  function useFocusContext(consumerName) {
1569
- const context = React21.useContext(FocusContext);
1609
+ const context = React22.useContext(FocusContext);
1570
1610
  if (!context) {
1571
1611
  throw new Error(
1572
1612
  `\`${consumerName}\` must be used within \`FocusProvider\``
@@ -1593,32 +1633,32 @@ function StepperList(props) {
1593
1633
  onFocus: onFocusProp,
1594
1634
  onMouseDown: onMouseDownProp
1595
1635
  });
1596
- const [tabStopId, setTabStopId] = React21.useState(null);
1597
- const [isTabbingBackOut, setIsTabbingBackOut] = React21.useState(false);
1598
- const [focusableItemCount, setFocusableItemCount] = React21.useState(0);
1599
- const isClickFocusRef = React21.useRef(false);
1600
- const itemsRef = React21.useRef(/* @__PURE__ */ new Map());
1601
- const listRef = React21.useRef(null);
1636
+ const [tabStopId, setTabStopId] = React22.useState(null);
1637
+ const [isTabbingBackOut, setIsTabbingBackOut] = React22.useState(false);
1638
+ const [focusableItemCount, setFocusableItemCount] = React22.useState(0);
1639
+ const isClickFocusRef = React22.useRef(false);
1640
+ const itemsRef = React22.useRef(/* @__PURE__ */ new Map());
1641
+ const listRef = React22.useRef(null);
1602
1642
  const composedRef = useComposedRefs(ref, listRef);
1603
- const onItemFocus = React21.useCallback((tabStopId2) => {
1643
+ const onItemFocus = React22.useCallback((tabStopId2) => {
1604
1644
  setTabStopId(tabStopId2);
1605
1645
  }, []);
1606
- const onItemShiftTab = React21.useCallback(() => {
1646
+ const onItemShiftTab = React22.useCallback(() => {
1607
1647
  setIsTabbingBackOut(true);
1608
1648
  }, []);
1609
- const onFocusableItemAdd = React21.useCallback(() => {
1649
+ const onFocusableItemAdd = React22.useCallback(() => {
1610
1650
  setFocusableItemCount((prevCount) => prevCount + 1);
1611
1651
  }, []);
1612
- const onFocusableItemRemove = React21.useCallback(() => {
1652
+ const onFocusableItemRemove = React22.useCallback(() => {
1613
1653
  setFocusableItemCount((prevCount) => prevCount - 1);
1614
1654
  }, []);
1615
- const onItemRegister = React21.useCallback((item) => {
1655
+ const onItemRegister = React22.useCallback((item) => {
1616
1656
  itemsRef.current.set(item.id, item);
1617
1657
  }, []);
1618
- const onItemUnregister = React21.useCallback((id) => {
1658
+ const onItemUnregister = React22.useCallback((id) => {
1619
1659
  itemsRef.current.delete(id);
1620
1660
  }, []);
1621
- const getItems = React21.useCallback(() => {
1661
+ const getItems = React22.useCallback(() => {
1622
1662
  return Array.from(itemsRef.current.values()).filter((item) => item.ref.current).sort((a, b) => {
1623
1663
  const elementA = a.ref.current;
1624
1664
  const elementB = b.ref.current;
@@ -1633,7 +1673,7 @@ function StepperList(props) {
1633
1673
  return 0;
1634
1674
  });
1635
1675
  }, []);
1636
- const onBlur = React21.useCallback(
1676
+ const onBlur = React22.useCallback(
1637
1677
  (event) => {
1638
1678
  propsRef.current.onBlur?.(event);
1639
1679
  if (event.defaultPrevented) return;
@@ -1641,7 +1681,7 @@ function StepperList(props) {
1641
1681
  },
1642
1682
  [propsRef]
1643
1683
  );
1644
- const onFocus = React21.useCallback(
1684
+ const onFocus = React22.useCallback(
1645
1685
  (event) => {
1646
1686
  propsRef.current.onFocus?.(event);
1647
1687
  if (event.defaultPrevented) return;
@@ -1670,7 +1710,7 @@ function StepperList(props) {
1670
1710
  },
1671
1711
  [propsRef, isTabbingBackOut, currentValue, tabStopId]
1672
1712
  );
1673
- const onMouseDown = React21.useCallback(
1713
+ const onMouseDown = React22.useCallback(
1674
1714
  (event) => {
1675
1715
  propsRef.current.onMouseDown?.(event);
1676
1716
  if (event.defaultPrevented) return;
@@ -1678,7 +1718,7 @@ function StepperList(props) {
1678
1718
  },
1679
1719
  [propsRef]
1680
1720
  );
1681
- const focusContextValue = React21.useMemo(
1721
+ const focusContextValue = React22.useMemo(
1682
1722
  () => ({
1683
1723
  tabStopId,
1684
1724
  onItemFocus,
@@ -1701,7 +1741,7 @@ function StepperList(props) {
1701
1741
  ]
1702
1742
  );
1703
1743
  const ListPrimitive = asChild ? SlotPrimitive.Slot : "div";
1704
- return /* @__PURE__ */ jsx25(FocusContext.Provider, { value: focusContextValue, children: /* @__PURE__ */ jsx25(
1744
+ return /* @__PURE__ */ jsx26(FocusContext.Provider, { value: focusContextValue, children: /* @__PURE__ */ jsx26(
1705
1745
  ListPrimitive,
1706
1746
  {
1707
1747
  role: "tablist",
@@ -1712,7 +1752,7 @@ function StepperList(props) {
1712
1752
  tabIndex: isTabbingBackOut || focusableItemCount === 0 ? -1 : 0,
1713
1753
  ...listProps,
1714
1754
  ref: composedRef,
1715
- className: cn24(
1755
+ className: cn25(
1716
1756
  "flex outline-none",
1717
1757
  orientation === "horizontal" ? "flex-row items-center" : "flex-col items-start",
1718
1758
  className
@@ -1724,11 +1764,11 @@ function StepperList(props) {
1724
1764
  }
1725
1765
  ) });
1726
1766
  }
1727
- var StepperItemContext = React21.createContext(
1767
+ var StepperItemContext = React22.createContext(
1728
1768
  null
1729
1769
  );
1730
1770
  function useStepperItemContext(consumerName) {
1731
- const context = React21.useContext(StepperItemContext);
1771
+ const context = React22.useContext(StepperItemContext);
1732
1772
  if (!context) {
1733
1773
  throw new Error(`\`${consumerName}\` must be used within \`${ITEM_NAME}\``);
1734
1774
  }
@@ -1761,7 +1801,7 @@ function StepperItem(props) {
1761
1801
  const stepState = useStore((state) => state.steps.get(itemValue));
1762
1802
  const steps = useStore((state) => state.steps);
1763
1803
  const dataState = getDataState(value, itemValue, stepState, steps);
1764
- const itemContextValue = React21.useMemo(
1804
+ const itemContextValue = React22.useMemo(
1765
1805
  () => ({
1766
1806
  value: itemValue,
1767
1807
  stepState
@@ -1769,7 +1809,7 @@ function StepperItem(props) {
1769
1809
  [itemValue, stepState]
1770
1810
  );
1771
1811
  const ItemPrimitive = asChild ? SlotPrimitive.Slot : "div";
1772
- return /* @__PURE__ */ jsx25(StepperItemContext.Provider, { value: itemContextValue, children: /* @__PURE__ */ jsx25(
1812
+ return /* @__PURE__ */ jsx26(StepperItemContext.Provider, { value: itemContextValue, children: /* @__PURE__ */ jsx26(
1773
1813
  ItemPrimitive,
1774
1814
  {
1775
1815
  "data-disabled": stepState?.disabled ? "" : void 0,
@@ -1779,7 +1819,7 @@ function StepperItem(props) {
1779
1819
  dir: context.dir,
1780
1820
  ...itemProps,
1781
1821
  ref,
1782
- className: cn24(
1822
+ className: cn25(
1783
1823
  "relative flex not-last:flex-1 items-center",
1784
1824
  orientation === "horizontal" ? "flex-row" : "flex-col",
1785
1825
  className
@@ -1828,11 +1868,11 @@ function StepperTrigger(props) {
1828
1868
  const isActive = value === itemValue;
1829
1869
  const isTabStop = focusContext.tabStopId === triggerId;
1830
1870
  const dataState = getDataState(value, itemValue, stepState, steps);
1831
- const triggerRef = React21.useRef(null);
1871
+ const triggerRef = React22.useRef(null);
1832
1872
  const composedRef = useComposedRefs(ref, triggerRef);
1833
- const isArrowKeyPressedRef = React21.useRef(false);
1834
- const isMouseClickRef = React21.useRef(false);
1835
- React21.useEffect(() => {
1873
+ const isArrowKeyPressedRef = React22.useRef(false);
1874
+ const isMouseClickRef = React22.useRef(false);
1875
+ React22.useEffect(() => {
1836
1876
  function onKeyDown2(event) {
1837
1877
  if (ARROW_KEYS.includes(event.key)) {
1838
1878
  isArrowKeyPressedRef.current = true;
@@ -1866,7 +1906,7 @@ function StepperTrigger(props) {
1866
1906
  }
1867
1907
  };
1868
1908
  }, [focusContext, triggerId, itemValue, isTabStop, isDisabled]);
1869
- const onClick = React21.useCallback(
1909
+ const onClick = React22.useCallback(
1870
1910
  async (event) => {
1871
1911
  propsRef.current.onClick?.(event);
1872
1912
  if (event.defaultPrevented) return;
@@ -1887,7 +1927,7 @@ function StepperTrigger(props) {
1887
1927
  propsRef
1888
1928
  ]
1889
1929
  );
1890
- const onFocus = React21.useCallback(
1930
+ const onFocus = React22.useCallback(
1891
1931
  async (event) => {
1892
1932
  propsRef.current.onFocus?.(event);
1893
1933
  if (event.defaultPrevented) return;
@@ -1915,7 +1955,7 @@ function StepperTrigger(props) {
1915
1955
  propsRef
1916
1956
  ]
1917
1957
  );
1918
- const onKeyDown = React21.useCallback(
1958
+ const onKeyDown = React22.useCallback(
1919
1959
  async (event) => {
1920
1960
  propsRef.current.onKeyDown?.(event);
1921
1961
  if (event.defaultPrevented) return;
@@ -1970,7 +2010,7 @@ function StepperTrigger(props) {
1970
2010
  steps
1971
2011
  ]
1972
2012
  );
1973
- const onMouseDown = React21.useCallback(
2013
+ const onMouseDown = React22.useCallback(
1974
2014
  (event) => {
1975
2015
  propsRef.current.onMouseDown?.(event);
1976
2016
  if (event.defaultPrevented) return;
@@ -1984,7 +2024,7 @@ function StepperTrigger(props) {
1984
2024
  [focusContext, triggerId, isDisabled, propsRef]
1985
2025
  );
1986
2026
  const TriggerPrimitive = asChild ? SlotPrimitive.Slot : "button";
1987
- return /* @__PURE__ */ jsx25(
2027
+ return /* @__PURE__ */ jsx26(
1988
2028
  TriggerPrimitive,
1989
2029
  {
1990
2030
  id: triggerId,
@@ -2003,7 +2043,7 @@ function StepperTrigger(props) {
2003
2043
  tabIndex: isTabStop ? 0 : -1,
2004
2044
  ...triggerProps,
2005
2045
  ref: composedRef,
2006
- className: cn24(
2046
+ className: cn25(
2007
2047
  "inline-flex items-center justify-center gap-3 rounded-md text-left outline-none transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",
2008
2048
  "not-has-data-[slot=description]:rounded-full not-has-data-[slot=title]:rounded-full",
2009
2049
  className
@@ -2026,7 +2066,7 @@ function StepperIndicator(props) {
2026
2066
  const stepPosition = Array.from(steps.keys()).indexOf(itemValue) + 1;
2027
2067
  const dataState = getDataState(value, itemValue, stepState, steps);
2028
2068
  const IndicatorPrimitive = asChild ? SlotPrimitive.Slot : "div";
2029
- return /* @__PURE__ */ jsx25(
2069
+ return /* @__PURE__ */ jsx26(
2030
2070
  IndicatorPrimitive,
2031
2071
  {
2032
2072
  "data-state": dataState,
@@ -2034,11 +2074,11 @@ function StepperIndicator(props) {
2034
2074
  dir: context.dir,
2035
2075
  ...indicatorProps,
2036
2076
  ref,
2037
- className: cn24(
2077
+ className: cn25(
2038
2078
  "flex size-7 shrink-0 items-center justify-center rounded-full border-2 border-muted bg-background font-medium text-muted-foreground text-sm transition-colors data-[state=active]:border-primary data-[state=completed]:border-primary data-[state=active]:bg-primary data-[state=completed]:bg-primary data-[state=active]:text-primary-foreground data-[state=completed]:text-primary-foreground",
2039
2079
  className
2040
2080
  ),
2041
- children: typeof children === "function" ? children(dataState) : children ? children : dataState === "completed" ? /* @__PURE__ */ jsx25(Check3, { className: "size-4" }) : stepPosition
2081
+ children: typeof children === "function" ? children(dataState) : children ? children : dataState === "completed" ? /* @__PURE__ */ jsx26(Check3, { className: "size-4" }) : stepPosition
2042
2082
  }
2043
2083
  );
2044
2084
  }
@@ -2066,7 +2106,7 @@ function StepperSeparator(props) {
2066
2106
  "separator"
2067
2107
  );
2068
2108
  const SeparatorPrimitive2 = asChild ? SlotPrimitive.Slot : "div";
2069
- return /* @__PURE__ */ jsx25(
2109
+ return /* @__PURE__ */ jsx26(
2070
2110
  SeparatorPrimitive2,
2071
2111
  {
2072
2112
  role: "separator",
@@ -2078,7 +2118,7 @@ function StepperSeparator(props) {
2078
2118
  dir: context.dir,
2079
2119
  ...separatorProps,
2080
2120
  ref,
2081
- className: cn24(
2121
+ className: cn25(
2082
2122
  "bg-border transition-colors data-[state=active]:bg-primary data-[state=completed]:bg-primary",
2083
2123
  orientation === "horizontal" ? "h-px flex-1" : "h-10 w-px",
2084
2124
  className
@@ -2092,7 +2132,7 @@ function StepperTitle(props) {
2092
2132
  const itemContext = useStepperItemContext(TITLE_NAME);
2093
2133
  const titleId = getId(context.rootId, "title", itemContext.value);
2094
2134
  const TitlePrimitive = asChild ? SlotPrimitive.Slot : "span";
2095
- return /* @__PURE__ */ jsx25(
2135
+ return /* @__PURE__ */ jsx26(
2096
2136
  TitlePrimitive,
2097
2137
  {
2098
2138
  id: titleId,
@@ -2100,7 +2140,7 @@ function StepperTitle(props) {
2100
2140
  dir: context.dir,
2101
2141
  ...titleProps,
2102
2142
  ref,
2103
- className: cn24("font-medium text-sm", className)
2143
+ className: cn25("font-medium text-sm", className)
2104
2144
  }
2105
2145
  );
2106
2146
  }
@@ -2110,7 +2150,7 @@ function StepperDescription(props) {
2110
2150
  const itemContext = useStepperItemContext(DESCRIPTION_NAME);
2111
2151
  const descriptionId = getId(context.rootId, "description", itemContext.value);
2112
2152
  const DescriptionPrimitive = asChild ? SlotPrimitive.Slot : "span";
2113
- return /* @__PURE__ */ jsx25(
2153
+ return /* @__PURE__ */ jsx26(
2114
2154
  DescriptionPrimitive,
2115
2155
  {
2116
2156
  id: descriptionId,
@@ -2118,7 +2158,7 @@ function StepperDescription(props) {
2118
2158
  dir: context.dir,
2119
2159
  ...descriptionProps,
2120
2160
  ref,
2121
- className: cn24("text-muted-foreground text-xs", className)
2161
+ className: cn25("text-muted-foreground text-xs", className)
2122
2162
  }
2123
2163
  );
2124
2164
  }
@@ -2137,7 +2177,7 @@ function StepperContent(props) {
2137
2177
  const triggerId = getId(context.rootId, "trigger", valueProp);
2138
2178
  if (valueProp !== value && !forceMount) return null;
2139
2179
  const ContentPrimitive = asChild ? SlotPrimitive.Slot : "div";
2140
- return /* @__PURE__ */ jsx25(
2180
+ return /* @__PURE__ */ jsx26(
2141
2181
  ContentPrimitive,
2142
2182
  {
2143
2183
  id: contentId,
@@ -2147,7 +2187,7 @@ function StepperContent(props) {
2147
2187
  dir: context.dir,
2148
2188
  ...contentProps,
2149
2189
  ref,
2150
- className: cn24("flex-1 outline-none", className)
2190
+ className: cn25("flex-1 outline-none", className)
2151
2191
  }
2152
2192
  );
2153
2193
  }
@@ -2160,9 +2200,9 @@ function StepperPrev(props) {
2160
2200
  onClick: onClickProp
2161
2201
  });
2162
2202
  const stepKeys = Array.from(steps.keys());
2163
- const currentIndex = value ? stepKeys.indexOf(value) : -1;
2203
+ const currentIndex = stepKeys.length > 0 ? stepKeys.indexOf(value ?? "") : -1;
2164
2204
  const isDisabled = disabled || currentIndex <= 0;
2165
- const onClick = React21.useCallback(
2205
+ const onClick = React22.useCallback(
2166
2206
  async (event) => {
2167
2207
  propsRef.current.onClick?.(event);
2168
2208
  if (event.defaultPrevented || isDisabled) return;
@@ -2175,7 +2215,7 @@ function StepperPrev(props) {
2175
2215
  [propsRef, isDisabled, currentIndex, stepKeys, store]
2176
2216
  );
2177
2217
  const PrevPrimitive = asChild ? SlotPrimitive.Slot : "button";
2178
- return /* @__PURE__ */ jsx25(
2218
+ return /* @__PURE__ */ jsx26(
2179
2219
  PrevPrimitive,
2180
2220
  {
2181
2221
  type: "button",
@@ -2195,9 +2235,9 @@ function StepperNext(props) {
2195
2235
  onClick: onClickProp
2196
2236
  });
2197
2237
  const stepKeys = Array.from(steps.keys());
2198
- const currentIndex = value ? stepKeys.indexOf(value) : -1;
2199
- const isDisabled = disabled || currentIndex >= stepKeys.length - 1;
2200
- const onClick = React21.useCallback(
2238
+ const currentIndex = stepKeys.length > 0 ? stepKeys.indexOf(value ?? "") : -1;
2239
+ const isDisabled = disabled || stepKeys.length === 0 || currentIndex >= stepKeys.length - 1;
2240
+ const onClick = React22.useCallback(
2201
2241
  async (event) => {
2202
2242
  propsRef.current.onClick?.(event);
2203
2243
  if (event.defaultPrevented || isDisabled) return;
@@ -2210,7 +2250,7 @@ function StepperNext(props) {
2210
2250
  [propsRef, isDisabled, currentIndex, stepKeys, store]
2211
2251
  );
2212
2252
  const NextPrimitive = asChild ? SlotPrimitive.Slot : "button";
2213
- return /* @__PURE__ */ jsx25(
2253
+ return /* @__PURE__ */ jsx26(
2214
2254
  NextPrimitive,
2215
2255
  {
2216
2256
  type: "button",
@@ -2236,7 +2276,7 @@ import {
2236
2276
  useReactTable
2237
2277
  } from "@tanstack/react-table";
2238
2278
  import { ChevronRight as ChevronRight2 } from "lucide-react";
2239
- import { cn as cn25 } from "@petrarca/sonnet-core";
2279
+ import { cn as cn26 } from "@petrarca/sonnet-core";
2240
2280
 
2241
2281
  // src/EntityTable/tableSchema/mergeUiSchema.ts
2242
2282
  function resolveCellRenderer(property, uiEntry) {
@@ -2266,12 +2306,12 @@ function mergeColumnConfig(key, property, uiSchema) {
2266
2306
  }
2267
2307
 
2268
2308
  // src/EntityTable/tableSchema/cellRegistry.ts
2269
- import React22 from "react";
2309
+ import React23 from "react";
2270
2310
  import { warnLog } from "@petrarca/sonnet-core";
2271
2311
 
2272
2312
  // src/EntityTable/tableSchema/cellRenderers.tsx
2273
2313
  import { formatDate, formatDateTime } from "@petrarca/sonnet-core";
2274
- import { Fragment, jsx as jsx26, jsxs as jsxs7 } from "react/jsx-runtime";
2314
+ import { Fragment, jsx as jsx27, jsxs as jsxs7 } from "react/jsx-runtime";
2275
2315
  function resolveValue(value, options) {
2276
2316
  const key = options.valueKey;
2277
2317
  if (key && value != null && typeof value === "object") {
@@ -2287,60 +2327,60 @@ function TextCell({
2287
2327
  options
2288
2328
  }) {
2289
2329
  const text = resolveValue(value, options);
2290
- return /* @__PURE__ */ jsx26("span", { className: cx("", options), children: text == null ? "\u2014" : String(text) });
2330
+ return /* @__PURE__ */ jsx27("span", { className: cx("", options), children: text == null ? "\u2014" : String(text) });
2291
2331
  }
2292
2332
  function MutedCell({
2293
2333
  value,
2294
2334
  options
2295
2335
  }) {
2296
2336
  const text = resolveValue(value, options);
2297
- return /* @__PURE__ */ jsx26("span", { className: cx("text-muted-foreground", options), children: text == null ? "\u2014" : String(text) });
2337
+ return /* @__PURE__ */ jsx27("span", { className: cx("text-muted-foreground", options), children: text == null ? "\u2014" : String(text) });
2298
2338
  }
2299
2339
  function BoldCell({
2300
2340
  value,
2301
2341
  options
2302
2342
  }) {
2303
2343
  const text = resolveValue(value, options);
2304
- return /* @__PURE__ */ jsx26("span", { className: cx("font-medium", options), children: text == null ? "\u2014" : String(text) });
2344
+ return /* @__PURE__ */ jsx27("span", { className: cx("font-medium", options), children: text == null ? "\u2014" : String(text) });
2305
2345
  }
2306
2346
  function CodeCell({
2307
2347
  value,
2308
2348
  options
2309
2349
  }) {
2310
2350
  const text = resolveValue(value, options);
2311
- return /* @__PURE__ */ jsx26("span", { className: cx("font-mono text-xs", options), children: text == null ? "\u2014" : String(text) });
2351
+ return /* @__PURE__ */ jsx27("span", { className: cx("font-mono text-xs", options), children: text == null ? "\u2014" : String(text) });
2312
2352
  }
2313
2353
  function BadgeCell({
2314
2354
  value,
2315
2355
  options
2316
2356
  }) {
2317
2357
  if (value == null)
2318
- return /* @__PURE__ */ jsx26("span", { className: "text-muted-foreground", children: "\u2014" });
2358
+ return /* @__PURE__ */ jsx27("span", { className: "text-muted-foreground", children: "\u2014" });
2319
2359
  const key = String(value);
2320
2360
  const colors = options.colors;
2321
2361
  const labels = options.labels;
2322
2362
  const color = colors?.[key];
2323
2363
  const label = labels?.[key] ?? key;
2324
- return /* @__PURE__ */ jsx26(Badge, { badgeColor: color, children: label });
2364
+ return /* @__PURE__ */ jsx27(Badge, { badgeColor: color, children: label });
2325
2365
  }
2326
2366
  function DateCell({
2327
2367
  value,
2328
2368
  options
2329
2369
  }) {
2330
- return /* @__PURE__ */ jsx26("span", { className: cx("text-muted-foreground", options), children: formatDate(value) });
2370
+ return /* @__PURE__ */ jsx27("span", { className: cx("text-muted-foreground", options), children: formatDate(value) });
2331
2371
  }
2332
2372
  function DateTimeCell({
2333
2373
  value,
2334
2374
  options
2335
2375
  }) {
2336
- return /* @__PURE__ */ jsx26("span", { className: cx("text-muted-foreground", options), children: formatDateTime(value) });
2376
+ return /* @__PURE__ */ jsx27("span", { className: cx("text-muted-foreground", options), children: formatDateTime(value) });
2337
2377
  }
2338
2378
  function BooleanCell({ value }) {
2339
- return /* @__PURE__ */ jsx26("span", { className: value ? "text-green-600" : "text-muted-foreground", children: value ? "Yes" : "No" });
2379
+ return /* @__PURE__ */ jsx27("span", { className: value ? "text-green-600" : "text-muted-foreground", children: value ? "Yes" : "No" });
2340
2380
  }
2341
2381
  function NumberCell({ value }) {
2342
2382
  const text = value == null ? "\u2014" : String(value);
2343
- return /* @__PURE__ */ jsx26("span", { className: "tabular-nums", children: text });
2383
+ return /* @__PURE__ */ jsx27("span", { className: "tabular-nums", children: text });
2344
2384
  }
2345
2385
  function TruncateCell({
2346
2386
  value,
@@ -2348,7 +2388,7 @@ function TruncateCell({
2348
2388
  }) {
2349
2389
  const resolved = resolveValue(value, options);
2350
2390
  const text = resolved == null ? "\u2014" : String(resolved);
2351
- return /* @__PURE__ */ jsx26("span", { className: "block truncate max-w-xs", title: text, children: text });
2391
+ return /* @__PURE__ */ jsx27("span", { className: "block truncate max-w-xs", title: text, children: text });
2352
2392
  }
2353
2393
  function OverflowListCell({
2354
2394
  value,
@@ -2356,7 +2396,7 @@ function OverflowListCell({
2356
2396
  }) {
2357
2397
  const items = Array.isArray(value) ? value : [];
2358
2398
  if (items.length === 0)
2359
- return /* @__PURE__ */ jsx26("span", { className: "text-muted-foreground", children: "\u2014" });
2399
+ return /* @__PURE__ */ jsx27("span", { className: "text-muted-foreground", children: "\u2014" });
2360
2400
  const displayKey = options.displayKey;
2361
2401
  const fallbackKey = options.fallbackKey;
2362
2402
  const prefixKey = options.prefixKey;
@@ -2381,8 +2421,8 @@ function JoinCell({
2381
2421
  }) {
2382
2422
  const sep = options.separator ?? ", ";
2383
2423
  if (!Array.isArray(value) || value.length === 0)
2384
- return /* @__PURE__ */ jsx26("span", { className: "text-muted-foreground", children: "\u2014" });
2385
- return /* @__PURE__ */ jsx26("span", { className: "text-muted-foreground", children: value.join(sep) });
2424
+ return /* @__PURE__ */ jsx27("span", { className: "text-muted-foreground", children: "\u2014" });
2425
+ return /* @__PURE__ */ jsx27("span", { className: "text-muted-foreground", children: value.join(sep) });
2386
2426
  }
2387
2427
 
2388
2428
  // src/EntityTable/tableSchema/cellRegistry.ts
@@ -2413,7 +2453,7 @@ function resolveCellRenderer2(name, localRenderers) {
2413
2453
  return localRenderers?.[name] ?? CELL_RENDERERS[name] ?? TextCell;
2414
2454
  }
2415
2455
  function createRenderer(render) {
2416
- return ({ row, options }) => React22.createElement(React22.Fragment, null, render(row, options));
2456
+ return ({ row, options }) => React23.createElement(React23.Fragment, null, render(row, options));
2417
2457
  }
2418
2458
  function validateRendererNames(renderers) {
2419
2459
  for (const name of Object.keys(renderers)) {
@@ -2454,7 +2494,7 @@ function keyToLabel(key) {
2454
2494
  }
2455
2495
 
2456
2496
  // src/EntityTable/EntityTable.tsx
2457
- import { jsx as jsx27, jsxs as jsxs8 } from "react/jsx-runtime";
2497
+ import { jsx as jsx28, jsxs as jsxs8 } from "react/jsx-runtime";
2458
2498
  var coreRowModel = getCoreRowModel();
2459
2499
  function resolveTableDefaults(props) {
2460
2500
  return {
@@ -2473,7 +2513,7 @@ function buildColumnDefs(resolved, localRenderers) {
2473
2513
  cell: ({
2474
2514
  getValue,
2475
2515
  row
2476
- }) => /* @__PURE__ */ jsx27(
2516
+ }) => /* @__PURE__ */ jsx28(
2477
2517
  Renderer,
2478
2518
  {
2479
2519
  value: getValue(),
@@ -2491,7 +2531,7 @@ function buildSelectColumn() {
2491
2531
  return {
2492
2532
  id: "_select",
2493
2533
  size: 40,
2494
- header: ({ table: t }) => /* @__PURE__ */ jsx27(
2534
+ header: ({ table: t }) => /* @__PURE__ */ jsx28(
2495
2535
  Checkbox,
2496
2536
  {
2497
2537
  checked: t.getIsAllPageRowsSelected() || (t.getIsSomePageRowsSelected() ? "indeterminate" : false),
@@ -2499,7 +2539,7 @@ function buildSelectColumn() {
2499
2539
  "aria-label": "Select all"
2500
2540
  }
2501
2541
  ),
2502
- cell: ({ row }) => /* @__PURE__ */ jsx27(
2542
+ cell: ({ row }) => /* @__PURE__ */ jsx28(
2503
2543
  Checkbox,
2504
2544
  {
2505
2545
  checked: row.getIsSelected(),
@@ -2673,7 +2713,7 @@ function StatusRows({
2673
2713
  colCount
2674
2714
  }) {
2675
2715
  if (isLoading) {
2676
- return /* @__PURE__ */ jsx27("tr", { children: /* @__PURE__ */ jsx27(
2716
+ return /* @__PURE__ */ jsx28("tr", { children: /* @__PURE__ */ jsx28(
2677
2717
  "td",
2678
2718
  {
2679
2719
  colSpan: colCount,
@@ -2683,7 +2723,7 @@ function StatusRows({
2683
2723
  ) });
2684
2724
  }
2685
2725
  if (isError) {
2686
- return /* @__PURE__ */ jsx27("tr", { children: /* @__PURE__ */ jsx27(
2726
+ return /* @__PURE__ */ jsx28("tr", { children: /* @__PURE__ */ jsx28(
2687
2727
  "td",
2688
2728
  {
2689
2729
  colSpan: colCount,
@@ -2693,7 +2733,7 @@ function StatusRows({
2693
2733
  ) });
2694
2734
  }
2695
2735
  if (isEmpty) {
2696
- return /* @__PURE__ */ jsx27("tr", { children: /* @__PURE__ */ jsx27(
2736
+ return /* @__PURE__ */ jsx28("tr", { children: /* @__PURE__ */ jsx28(
2697
2737
  "td",
2698
2738
  {
2699
2739
  colSpan: colCount,
@@ -2713,7 +2753,7 @@ function RowActionCell({
2713
2753
  actions,
2714
2754
  rowOriginal
2715
2755
  }) {
2716
- return /* @__PURE__ */ jsx27("td", { className: "px-4 py-3 w-24 text-right", children: /* @__PURE__ */ jsx27("div", { className: "flex items-center justify-end gap-1", children: actions.map((action) => /* @__PURE__ */ jsx27(
2756
+ return /* @__PURE__ */ jsx28("td", { className: "px-4 py-3 w-24 text-right", children: /* @__PURE__ */ jsx28("div", { className: "flex items-center justify-end gap-1", children: actions.map((action) => /* @__PURE__ */ jsx28(
2717
2757
  ActionButton,
2718
2758
  {
2719
2759
  action,
@@ -2730,7 +2770,7 @@ function ActionButton({
2730
2770
  if (isHidden) return null;
2731
2771
  const isDisabled = action.disabled?.(rowOriginal);
2732
2772
  const Icon = action.icon;
2733
- return /* @__PURE__ */ jsx27(
2773
+ return /* @__PURE__ */ jsx28(
2734
2774
  "button",
2735
2775
  {
2736
2776
  title: action.label,
@@ -2739,12 +2779,12 @@ function ActionButton({
2739
2779
  e.stopPropagation();
2740
2780
  action.onClick(rowOriginal);
2741
2781
  },
2742
- className: cn25(
2782
+ className: cn26(
2743
2783
  "inline-flex items-center justify-center h-7 w-7 rounded-md transition-colors",
2744
2784
  action.variant === "destructive" ? "text-destructive hover:bg-destructive/10" : "text-muted-foreground hover:bg-accent",
2745
2785
  isDisabled ? "opacity-30 cursor-not-allowed group-hover/row:opacity-30" : "opacity-0 group-hover/row:opacity-100 focus:opacity-100"
2746
2786
  ),
2747
- children: Icon ? /* @__PURE__ */ jsx27(Icon, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ jsx27("span", { className: "text-xs", children: action.label })
2787
+ children: Icon ? /* @__PURE__ */ jsx28(Icon, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ jsx28("span", { className: "text-xs", children: action.label })
2748
2788
  },
2749
2789
  action.label
2750
2790
  );
@@ -2774,7 +2814,7 @@ function DataRow({
2774
2814
  containerRef
2775
2815
  );
2776
2816
  },
2777
- className: cn25(
2817
+ className: cn26(
2778
2818
  "border-b last:border-b-0 transition-colors group/row",
2779
2819
  onRowClick && !selectionMode && "hover:bg-accent/50 cursor-pointer",
2780
2820
  selectionMode && "cursor-default",
@@ -2782,9 +2822,9 @@ function DataRow({
2782
2822
  index === activeRowIndex && selectionMode && "bg-accent"
2783
2823
  ),
2784
2824
  children: [
2785
- row.getVisibleCells().map((cell) => /* @__PURE__ */ jsx27("td", { className: "px-4 py-3", children: flexRender(cell.column.columnDef.cell, cell.getContext()) }, cell.id)),
2786
- hasRowActions && /* @__PURE__ */ jsx27(RowActionCell, { actions: rowActions, rowOriginal: row.original }),
2787
- hasChevron && /* @__PURE__ */ jsx27("td", { className: "px-4 py-3 w-10", children: /* @__PURE__ */ jsx27(ChevronRight2, { className: "h-4 w-4 text-muted-foreground" }) })
2825
+ row.getVisibleCells().map((cell) => /* @__PURE__ */ jsx28("td", { className: "px-4 py-3", children: flexRender(cell.column.columnDef.cell, cell.getContext()) }, cell.id)),
2826
+ hasRowActions && /* @__PURE__ */ jsx28(RowActionCell, { actions: rowActions, rowOriginal: row.original }),
2827
+ hasChevron && /* @__PURE__ */ jsx28("td", { className: "px-4 py-3 w-10", children: /* @__PURE__ */ jsx28(ChevronRight2, { className: "h-4 w-4 text-muted-foreground" }) })
2788
2828
  ]
2789
2829
  },
2790
2830
  row.id
@@ -2808,7 +2848,7 @@ function TableFooter({
2808
2848
  }) {
2809
2849
  if (!data?.meta) return null;
2810
2850
  if (isPaginated) {
2811
- return /* @__PURE__ */ jsx27(PaginationFooter, { table, entityLabel });
2851
+ return /* @__PURE__ */ jsx28(PaginationFooter, { table, entityLabel });
2812
2852
  }
2813
2853
  return /* @__PURE__ */ jsxs8("p", { className: "text-xs text-muted-foreground mt-3", children: [
2814
2854
  "Showing ",
@@ -2853,16 +2893,16 @@ function EntityTable(props) {
2853
2893
  );
2854
2894
  const colCount = columns.length + (hasTrailingCol ? 1 : 0);
2855
2895
  return /* @__PURE__ */ jsxs8("div", { children: [
2856
- /* @__PURE__ */ jsx27(
2896
+ /* @__PURE__ */ jsx28(
2857
2897
  "div",
2858
2898
  {
2859
2899
  ref: selectionMode ? containerRef : void 0,
2860
2900
  tabIndex: selectionMode ? 0 : void 0,
2861
2901
  onKeyDown: selectionMode ? handleKeyDown : void 0,
2862
- className: cn25("rounded-lg border", selectionMode && "outline-none"),
2902
+ className: cn26("rounded-lg border", selectionMode && "outline-none"),
2863
2903
  children: /* @__PURE__ */ jsxs8("table", { className: "w-full text-sm", children: [
2864
- /* @__PURE__ */ jsx27("thead", { children: /* @__PURE__ */ jsxs8("tr", { className: "border-b bg-muted/40", children: [
2865
- table.getFlatHeaders().map((header) => /* @__PURE__ */ jsx27(
2904
+ /* @__PURE__ */ jsx28("thead", { children: /* @__PURE__ */ jsxs8("tr", { className: "border-b bg-muted/40", children: [
2905
+ table.getFlatHeaders().map((header) => /* @__PURE__ */ jsx28(
2866
2906
  "th",
2867
2907
  {
2868
2908
  className: "text-left text-xs font-medium text-muted-foreground px-4 py-2.5",
@@ -2874,7 +2914,7 @@ function EntityTable(props) {
2874
2914
  },
2875
2915
  header.id
2876
2916
  )),
2877
- hasRowActions && /* @__PURE__ */ jsx27(
2917
+ hasRowActions && /* @__PURE__ */ jsx28(
2878
2918
  "th",
2879
2919
  {
2880
2920
  "aria-label": "Actions",
@@ -2882,10 +2922,10 @@ function EntityTable(props) {
2882
2922
  className: "w-24 text-right text-xs font-medium text-muted-foreground px-4 py-2.5"
2883
2923
  }
2884
2924
  ),
2885
- hasChevron && /* @__PURE__ */ jsx27("th", { "aria-label": "Open", scope: "col", className: "w-10" })
2925
+ hasChevron && /* @__PURE__ */ jsx28("th", { "aria-label": "Open", scope: "col", className: "w-10" })
2886
2926
  ] }) }),
2887
2927
  /* @__PURE__ */ jsxs8("tbody", { children: [
2888
- /* @__PURE__ */ jsx27(
2928
+ /* @__PURE__ */ jsx28(
2889
2929
  StatusRows,
2890
2930
  {
2891
2931
  isLoading,
@@ -2898,7 +2938,7 @@ function EntityTable(props) {
2898
2938
  colCount
2899
2939
  }
2900
2940
  ),
2901
- table.getRowModel().rows.map((row, index) => /* @__PURE__ */ jsx27(
2941
+ table.getRowModel().rows.map((row, index) => /* @__PURE__ */ jsx28(
2902
2942
  DataRow,
2903
2943
  {
2904
2944
  row,
@@ -2918,7 +2958,7 @@ function EntityTable(props) {
2918
2958
  ] })
2919
2959
  }
2920
2960
  ),
2921
- /* @__PURE__ */ jsx27(
2961
+ /* @__PURE__ */ jsx28(
2922
2962
  TableFooter,
2923
2963
  {
2924
2964
  isPaginated,
@@ -2940,9 +2980,9 @@ function PaginationFooter({
2940
2980
  const from = rowCount === 0 ? 0 : pageIndex * pageSize + 1;
2941
2981
  const to = Math.min((pageIndex + 1) * pageSize, rowCount);
2942
2982
  return /* @__PURE__ */ jsxs8("div", { className: "flex items-center justify-between mt-3", children: [
2943
- /* @__PURE__ */ jsx27("p", { className: "text-xs text-muted-foreground", children: rowCount === 0 ? `No ${entityLabel}` : `Showing ${from}\u2013${to} of ${rowCount} ${entityLabel}` }),
2983
+ /* @__PURE__ */ jsx28("p", { className: "text-xs text-muted-foreground", children: rowCount === 0 ? `No ${entityLabel}` : `Showing ${from}\u2013${to} of ${rowCount} ${entityLabel}` }),
2944
2984
  /* @__PURE__ */ jsxs8("div", { className: "flex items-center gap-1", children: [
2945
- /* @__PURE__ */ jsx27(
2985
+ /* @__PURE__ */ jsx28(
2946
2986
  "button",
2947
2987
  {
2948
2988
  type: "button",
@@ -2952,8 +2992,8 @@ function PaginationFooter({
2952
2992
  children: "Previous"
2953
2993
  }
2954
2994
  ),
2955
- /* @__PURE__ */ jsx27("span", { className: "text-xs text-muted-foreground px-2", children: pageCount > 0 ? `${pageIndex + 1} / ${pageCount}` : "--" }),
2956
- /* @__PURE__ */ jsx27(
2995
+ /* @__PURE__ */ jsx28("span", { className: "text-xs text-muted-foreground px-2", children: pageCount > 0 ? `${pageIndex + 1} / ${pageCount}` : "--" }),
2996
+ /* @__PURE__ */ jsx28(
2957
2997
  "button",
2958
2998
  {
2959
2999
  type: "button",
@@ -2968,13 +3008,13 @@ function PaginationFooter({
2968
3008
  }
2969
3009
 
2970
3010
  // src/EntitySelect/EntitySelect.tsx
2971
- import * as React24 from "react";
3011
+ import * as React25 from "react";
2972
3012
  import { Check as Check4, ChevronsUpDown, Loader2 } from "lucide-react";
2973
- import { cn as cn26 } from "@petrarca/sonnet-core";
3013
+ import { cn as cn27 } from "@petrarca/sonnet-core";
2974
3014
  import {
2975
3015
  useEntityOptions
2976
3016
  } from "@petrarca/sonnet-core/hooks";
2977
- import { Fragment as Fragment2, jsx as jsx28, jsxs as jsxs9 } from "react/jsx-runtime";
3017
+ import { Fragment as Fragment2, jsx as jsx29, jsxs as jsxs9 } from "react/jsx-runtime";
2978
3018
  function emptyStateMessage({
2979
3019
  mode,
2980
3020
  search,
@@ -2992,8 +3032,8 @@ function emptyStateMessage({
2992
3032
  return emptyMessage;
2993
3033
  }
2994
3034
  function useHasSearched(submit) {
2995
- const [hasSearched, setHasSearched] = React24.useState(false);
2996
- const wrappedSubmit = React24.useCallback(() => {
3035
+ const [hasSearched, setHasSearched] = React25.useState(false);
3036
+ const wrappedSubmit = React25.useCallback(() => {
2997
3037
  setHasSearched(true);
2998
3038
  submit();
2999
3039
  }, [submit]);
@@ -3024,11 +3064,11 @@ function EntitySelectLabel({
3024
3064
  className: "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",
3025
3065
  children: [
3026
3066
  label,
3027
- required && /* @__PURE__ */ jsx28("span", { className: "ml-1 text-destructive", children: "*" })
3067
+ required && /* @__PURE__ */ jsx29("span", { className: "ml-1 text-destructive", children: "*" })
3028
3068
  ]
3029
3069
  }
3030
3070
  ),
3031
- description && /* @__PURE__ */ jsx28("p", { className: "text-sm text-muted-foreground", children: description })
3071
+ description && /* @__PURE__ */ jsx29("p", { className: "text-sm text-muted-foreground", children: description })
3032
3072
  ] });
3033
3073
  }
3034
3074
  function EntitySelectDropdown({
@@ -3046,7 +3086,7 @@ function EntitySelectDropdown({
3046
3086
  handleSelect
3047
3087
  }) {
3048
3088
  return /* @__PURE__ */ jsxs9(Command, { shouldFilter: false, children: [
3049
- /* @__PURE__ */ jsx28(
3089
+ /* @__PURE__ */ jsx29(
3050
3090
  CommandInput,
3051
3091
  {
3052
3092
  placeholder: searchPlaceholder,
@@ -3061,7 +3101,7 @@ function EntitySelectDropdown({
3061
3101
  }
3062
3102
  ),
3063
3103
  /* @__PURE__ */ jsxs9(CommandList, { children: [
3064
- /* @__PURE__ */ jsx28(CommandEmpty, { children: emptyStateMessage({
3104
+ /* @__PURE__ */ jsx29(CommandEmpty, { children: emptyStateMessage({
3065
3105
  mode,
3066
3106
  search,
3067
3107
  minChars,
@@ -3069,16 +3109,16 @@ function EntitySelectDropdown({
3069
3109
  hasSearched,
3070
3110
  emptyMessage
3071
3111
  }) }),
3072
- /* @__PURE__ */ jsx28(CommandGroup, { children: options.map((option) => /* @__PURE__ */ jsxs9(
3112
+ /* @__PURE__ */ jsx29(CommandGroup, { children: options.map((option) => /* @__PURE__ */ jsxs9(
3073
3113
  CommandItem,
3074
3114
  {
3075
3115
  value: option.value,
3076
3116
  onSelect: handleSelect,
3077
3117
  children: [
3078
- /* @__PURE__ */ jsx28(
3118
+ /* @__PURE__ */ jsx29(
3079
3119
  Check4,
3080
3120
  {
3081
- className: cn26(
3121
+ className: cn27(
3082
3122
  "mr-2 h-4 w-4",
3083
3123
  value === option.value ? "opacity-100" : "opacity-0"
3084
3124
  )
@@ -3115,8 +3155,8 @@ function EntitySelect(props) {
3115
3155
  emptyMessage,
3116
3156
  disabled
3117
3157
  } = resolveEntitySelectDefaults(props);
3118
- const [open, setOpen] = React24.useState(false);
3119
- const [selectedLabel, setSelectedLabel] = React24.useState(null);
3158
+ const [open, setOpen] = React25.useState(false);
3159
+ const [selectedLabel, setSelectedLabel] = React25.useState(null);
3120
3160
  const {
3121
3161
  options,
3122
3162
  isLoading,
@@ -3125,7 +3165,7 @@ function EntitySelect(props) {
3125
3165
  submit: rawSubmit
3126
3166
  } = useEntityOptions({ fetcher, queryKey, mode, minChars });
3127
3167
  const [hasSearched, submit] = useHasSearched(rawSubmit);
3128
- React24.useEffect(() => {
3168
+ React25.useEffect(() => {
3129
3169
  if (!value) {
3130
3170
  setSelectedLabel(null);
3131
3171
  return;
@@ -3135,7 +3175,7 @@ function EntitySelect(props) {
3135
3175
  setSelectedLabel(found.label);
3136
3176
  }
3137
3177
  }, [value, options]);
3138
- const handleSelect = React24.useCallback(
3178
+ const handleSelect = React25.useCallback(
3139
3179
  (selectedValue) => {
3140
3180
  const opt = options.find((o) => o.value === selectedValue);
3141
3181
  if (opt) setSelectedLabel(opt.label);
@@ -3148,7 +3188,7 @@ function EntitySelect(props) {
3148
3188
  },
3149
3189
  [options, value, onChange, onChangeOption, setSearch]
3150
3190
  );
3151
- const handleOpenChange = React24.useCallback(
3191
+ const handleOpenChange = React25.useCallback(
3152
3192
  (newOpen) => {
3153
3193
  setOpen(newOpen);
3154
3194
  if (!newOpen) {
@@ -3158,8 +3198,8 @@ function EntitySelect(props) {
3158
3198
  },
3159
3199
  [onBlur, setSearch]
3160
3200
  );
3161
- return /* @__PURE__ */ jsxs9("div", { className: cn26("space-y-2", className), children: [
3162
- /* @__PURE__ */ jsx28(
3201
+ return /* @__PURE__ */ jsxs9("div", { className: cn27("space-y-2", className), children: [
3202
+ /* @__PURE__ */ jsx29(
3163
3203
  EntitySelectLabel,
3164
3204
  {
3165
3205
  id,
@@ -3169,34 +3209,34 @@ function EntitySelect(props) {
3169
3209
  }
3170
3210
  ),
3171
3211
  /* @__PURE__ */ jsxs9(Popover, { open, onOpenChange: handleOpenChange, children: [
3172
- /* @__PURE__ */ jsx28(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs9(
3212
+ /* @__PURE__ */ jsx29(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs9(
3173
3213
  Button,
3174
3214
  {
3175
3215
  id,
3176
3216
  variant: "outline",
3177
3217
  role: "combobox",
3178
3218
  "aria-expanded": open,
3179
- className: cn26(
3219
+ className: cn27(
3180
3220
  "w-full justify-between",
3181
3221
  !selectedLabel && "text-muted-foreground",
3182
3222
  error && "border-destructive"
3183
3223
  ),
3184
3224
  disabled,
3185
3225
  children: [
3186
- /* @__PURE__ */ jsx28("span", { className: "truncate", children: selectedLabel ?? placeholder }),
3226
+ /* @__PURE__ */ jsx29("span", { className: "truncate", children: selectedLabel ?? placeholder }),
3187
3227
  /* @__PURE__ */ jsxs9("div", { className: "flex items-center gap-1", children: [
3188
- isLoading && /* @__PURE__ */ jsx28(Loader2, { className: "h-4 w-4 animate-spin opacity-50" }),
3189
- /* @__PURE__ */ jsx28(ChevronsUpDown, { className: "h-4 w-4 shrink-0 opacity-50" })
3228
+ isLoading && /* @__PURE__ */ jsx29(Loader2, { className: "h-4 w-4 animate-spin opacity-50" }),
3229
+ /* @__PURE__ */ jsx29(ChevronsUpDown, { className: "h-4 w-4 shrink-0 opacity-50" })
3190
3230
  ] })
3191
3231
  ]
3192
3232
  }
3193
3233
  ) }),
3194
- /* @__PURE__ */ jsx28(
3234
+ /* @__PURE__ */ jsx29(
3195
3235
  PopoverContent,
3196
3236
  {
3197
3237
  className: "w-[--radix-popover-trigger-width] p-0",
3198
3238
  align: "start",
3199
- children: /* @__PURE__ */ jsx28(
3239
+ children: /* @__PURE__ */ jsx29(
3200
3240
  EntitySelectDropdown,
3201
3241
  {
3202
3242
  searchPlaceholder,
@@ -3216,23 +3256,23 @@ function EntitySelect(props) {
3216
3256
  }
3217
3257
  )
3218
3258
  ] }),
3219
- error && /* @__PURE__ */ jsx28("p", { className: "text-sm font-medium text-destructive", children: error })
3259
+ error && /* @__PURE__ */ jsx29("p", { className: "text-sm font-medium text-destructive", children: error })
3220
3260
  ] });
3221
3261
  }
3222
3262
 
3223
3263
  // src/EntityTree/EntityTree.tsx
3224
3264
  import {
3225
- forwardRef as forwardRef19,
3265
+ forwardRef as forwardRef20,
3226
3266
  useImperativeHandle as useImperativeHandle2,
3227
3267
  useMemo as useMemo4,
3228
3268
  useRef as useRef6
3229
3269
  } from "react";
3230
3270
  import { Pencil } from "lucide-react";
3231
- import { cn as cn28 } from "@petrarca/sonnet-core";
3271
+ import { cn as cn29 } from "@petrarca/sonnet-core";
3232
3272
 
3233
3273
  // src/TreeView/TreeView.tsx
3234
3274
  import {
3235
- forwardRef as forwardRef18,
3275
+ forwardRef as forwardRef19,
3236
3276
  useCallback as useCallback4,
3237
3277
  useEffect as useEffect5,
3238
3278
  useId as useId2,
@@ -3242,8 +3282,8 @@ import {
3242
3282
  useState as useState4
3243
3283
  } from "react";
3244
3284
  import { ChevronRight as ChevronRight3 } from "lucide-react";
3245
- import { cn as cn27 } from "@petrarca/sonnet-core";
3246
- import { jsx as jsx29, jsxs as jsxs10 } from "react/jsx-runtime";
3285
+ import { cn as cn28 } from "@petrarca/sonnet-core";
3286
+ import { jsx as jsx30, jsxs as jsxs10 } from "react/jsx-runtime";
3247
3287
  function flatten(nodes, expandedIds, depth = 0, parentId = null, result = []) {
3248
3288
  for (const node of nodes) {
3249
3289
  result.push({ node, depth, parentId });
@@ -3260,15 +3300,15 @@ function ToggleIcon({
3260
3300
  isExpanded
3261
3301
  }) {
3262
3302
  if (!hasChildren) {
3263
- return /* @__PURE__ */ jsx29("span", { className: "block w-1.5 h-1.5 rounded-full bg-border mx-auto" });
3303
+ return /* @__PURE__ */ jsx30("span", { className: "block w-1.5 h-1.5 rounded-full bg-border mx-auto" });
3264
3304
  }
3265
3305
  if (isLoading) {
3266
- return /* @__PURE__ */ jsx29("span", { className: "block w-3 h-3 rounded-full border-2 border-muted-foreground/40 border-t-foreground animate-spin" });
3306
+ return /* @__PURE__ */ jsx30("span", { className: "block w-3 h-3 rounded-full border-2 border-muted-foreground/40 border-t-foreground animate-spin" });
3267
3307
  }
3268
- return /* @__PURE__ */ jsx29(
3308
+ return /* @__PURE__ */ jsx30(
3269
3309
  ChevronRight3,
3270
3310
  {
3271
- className: cn27(
3311
+ className: cn28(
3272
3312
  "h-3.5 w-3.5 text-muted-foreground transition-transform",
3273
3313
  isExpanded && "rotate-90"
3274
3314
  )
@@ -3323,7 +3363,7 @@ function NodeRow({
3323
3363
  "aria-selected": onSelectionChange ? isSelected : void 0,
3324
3364
  "aria-busy": node.isLoading,
3325
3365
  tabIndex: isFocused ? 0 : -1,
3326
- className: cn27(
3366
+ className: cn28(
3327
3367
  "flex items-center gap-1 px-2 py-1.5 rounded-sm text-sm select-none",
3328
3368
  "cursor-pointer transition-colors",
3329
3369
  "hover:bg-accent/60",
@@ -3333,13 +3373,13 @@ function NodeRow({
3333
3373
  style: { paddingLeft: depth * indentPx + 8 },
3334
3374
  onClick: handleClick,
3335
3375
  children: [
3336
- /* @__PURE__ */ jsx29(
3376
+ /* @__PURE__ */ jsx30(
3337
3377
  "span",
3338
3378
  {
3339
3379
  className: "shrink-0 flex items-center justify-center w-4 h-4",
3340
3380
  onClick: handleToggle,
3341
3381
  "aria-hidden": true,
3342
- children: /* @__PURE__ */ jsx29(
3382
+ children: /* @__PURE__ */ jsx30(
3343
3383
  ToggleIcon,
3344
3384
  {
3345
3385
  hasChildren: node.hasChildren,
@@ -3349,7 +3389,7 @@ function NodeRow({
3349
3389
  )
3350
3390
  }
3351
3391
  ),
3352
- onSelectionChange && isSelectable && /* @__PURE__ */ jsx29(
3392
+ onSelectionChange && isSelectable && /* @__PURE__ */ jsx30(
3353
3393
  "input",
3354
3394
  {
3355
3395
  type: "checkbox",
@@ -3361,8 +3401,8 @@ function NodeRow({
3361
3401
  tabIndex: -1
3362
3402
  }
3363
3403
  ),
3364
- /* @__PURE__ */ jsx29("span", { className: "flex-1 min-w-0", children: renderNode(node, depth) }),
3365
- node.isError && /* @__PURE__ */ jsx29("span", { className: "shrink-0 text-xs text-destructive", "aria-live": "polite", children: "Failed to load" })
3404
+ /* @__PURE__ */ jsx30("span", { className: "flex-1 min-w-0", children: renderNode(node, depth) }),
3405
+ node.isError && /* @__PURE__ */ jsx30("span", { className: "shrink-0 text-xs text-destructive", "aria-live": "polite", children: "Failed to load" })
3366
3406
  ]
3367
3407
  }
3368
3408
  );
@@ -3538,10 +3578,10 @@ function TreeViewInner({
3538
3578
  ]
3539
3579
  );
3540
3580
  if (nodes.length === 0) {
3541
- return /* @__PURE__ */ jsx29(
3581
+ return /* @__PURE__ */ jsx30(
3542
3582
  "div",
3543
3583
  {
3544
- className: cn27(
3584
+ className: cn28(
3545
3585
  "py-8 text-center text-sm text-muted-foreground",
3546
3586
  className
3547
3587
  ),
@@ -3549,15 +3589,15 @@ function TreeViewInner({
3549
3589
  }
3550
3590
  );
3551
3591
  }
3552
- return /* @__PURE__ */ jsx29(
3592
+ return /* @__PURE__ */ jsx30(
3553
3593
  "ul",
3554
3594
  {
3555
3595
  ref: listRef,
3556
3596
  role: "tree",
3557
3597
  "aria-label": "Tree",
3558
- className: cn27("outline-none", className),
3598
+ className: cn28("outline-none", className),
3559
3599
  onKeyDown: handleKeyDown,
3560
- children: flatNodes.map((flat) => /* @__PURE__ */ jsx29(
3600
+ children: flatNodes.map((flat) => /* @__PURE__ */ jsx30(
3561
3601
  NodeRow,
3562
3602
  {
3563
3603
  flat,
@@ -3579,10 +3619,10 @@ function TreeViewInner({
3579
3619
  }
3580
3620
  );
3581
3621
  }
3582
- var TreeView = forwardRef18(TreeViewInner);
3622
+ var TreeView = forwardRef19(TreeViewInner);
3583
3623
 
3584
3624
  // src/EntityTree/EntityTree.tsx
3585
- import { jsx as jsx30, jsxs as jsxs11 } from "react/jsx-runtime";
3625
+ import { jsx as jsx31, jsxs as jsxs11 } from "react/jsx-runtime";
3586
3626
  function buildCellRow(resolved, activeNodeIdRef, onNodeEdit, localRenderers) {
3587
3627
  return function renderCells(node) {
3588
3628
  const isActive = node.id === activeNodeIdRef.current;
@@ -3593,12 +3633,12 @@ function buildCellRow(resolved, activeNodeIdRef, onNodeEdit, localRenderers) {
3593
3633
  localRenderers
3594
3634
  );
3595
3635
  const value = node.data[col.key];
3596
- return /* @__PURE__ */ jsx30(
3636
+ return /* @__PURE__ */ jsx31(
3597
3637
  "span",
3598
3638
  {
3599
3639
  className: "shrink-0",
3600
3640
  style: col.width !== void 0 ? { width: col.width } : void 0,
3601
- children: /* @__PURE__ */ jsx30(
3641
+ children: /* @__PURE__ */ jsx31(
3602
3642
  Renderer,
3603
3643
  {
3604
3644
  value,
@@ -3610,7 +3650,7 @@ function buildCellRow(resolved, activeNodeIdRef, onNodeEdit, localRenderers) {
3610
3650
  col.key
3611
3651
  );
3612
3652
  }),
3613
- onNodeEdit && /* @__PURE__ */ jsx30("span", { className: "ml-auto shrink-0", children: /* @__PURE__ */ jsx30(
3653
+ onNodeEdit && /* @__PURE__ */ jsx31("span", { className: "ml-auto shrink-0", children: /* @__PURE__ */ jsx31(
3614
3654
  "button",
3615
3655
  {
3616
3656
  type: "button",
@@ -3619,11 +3659,11 @@ function buildCellRow(resolved, activeNodeIdRef, onNodeEdit, localRenderers) {
3619
3659
  onNodeEdit(node);
3620
3660
  },
3621
3661
  "aria-label": "Edit",
3622
- className: cn28(
3662
+ className: cn29(
3623
3663
  "p-1 rounded hover:bg-background text-muted-foreground hover:text-foreground transition-colors",
3624
3664
  isActive ? "opacity-100" : "opacity-0 group-hover/row:opacity-100"
3625
3665
  ),
3626
- children: /* @__PURE__ */ jsx30(Pencil, { className: "h-3.5 w-3.5" })
3666
+ children: /* @__PURE__ */ jsx31(Pencil, { className: "h-3.5 w-3.5" })
3627
3667
  }
3628
3668
  ) })
3629
3669
  ] });
@@ -3646,10 +3686,10 @@ function renderTreeStatus({
3646
3686
  className
3647
3687
  }) {
3648
3688
  if (isLoading && nodes.length === 0) {
3649
- return /* @__PURE__ */ jsx30(
3689
+ return /* @__PURE__ */ jsx31(
3650
3690
  "div",
3651
3691
  {
3652
- className: cn28(
3692
+ className: cn29(
3653
3693
  "py-8 text-center text-sm text-muted-foreground",
3654
3694
  className
3655
3695
  ),
@@ -3658,10 +3698,10 @@ function renderTreeStatus({
3658
3698
  );
3659
3699
  }
3660
3700
  if (isError) {
3661
- return /* @__PURE__ */ jsx30(
3701
+ return /* @__PURE__ */ jsx31(
3662
3702
  "div",
3663
3703
  {
3664
- className: cn28("py-8 text-center text-sm text-destructive", className),
3704
+ className: cn29("py-8 text-center text-sm text-destructive", className),
3665
3705
  children: errorMessage ?? `Failed to load ${entityLabel}.`
3666
3706
  }
3667
3707
  );
@@ -3670,7 +3710,7 @@ function renderTreeStatus({
3670
3710
  return /* @__PURE__ */ jsxs11(
3671
3711
  "div",
3672
3712
  {
3673
- className: cn28(
3713
+ className: cn29(
3674
3714
  "py-8 text-center text-sm text-muted-foreground",
3675
3715
  className
3676
3716
  ),
@@ -3762,7 +3802,7 @@ function EntityTreeInner(props, ref) {
3762
3802
  className
3763
3803
  });
3764
3804
  if (statusView) return statusView;
3765
- return /* @__PURE__ */ jsx30("div", { className: cn28("rounded-lg border", className), children: /* @__PURE__ */ jsx30(
3805
+ return /* @__PURE__ */ jsx31("div", { className: cn29("rounded-lg border", className), children: /* @__PURE__ */ jsx31(
3766
3806
  TreeView,
3767
3807
  {
3768
3808
  ref: treeRef,
@@ -3781,12 +3821,12 @@ function EntityTreeInner(props, ref) {
3781
3821
  }
3782
3822
  ) });
3783
3823
  }
3784
- var EntityTree = forwardRef19(EntityTreeInner);
3824
+ var EntityTree = forwardRef20(EntityTreeInner);
3785
3825
 
3786
3826
  // src/SearchInput/SearchInput.tsx
3787
- import React29, { useMemo as useMemo6, useRef as useRef9, useState as useState7, useEffect as useEffect9 } from "react";
3827
+ import React30, { useMemo as useMemo6, useRef as useRef9, useState as useState7, useEffect as useEffect9 } from "react";
3788
3828
  import { Search as Search2, X as X3, ChevronDown } from "lucide-react";
3789
- import { cn as cn30 } from "@petrarca/sonnet-core";
3829
+ import { cn as cn31 } from "@petrarca/sonnet-core";
3790
3830
  import { getFieldTitle as getFieldTitle2 } from "@petrarca/sonnet-core/schema";
3791
3831
  import { isEmptyFilterExpr } from "@petrarca/sonnet-core/search";
3792
3832
 
@@ -4094,7 +4134,7 @@ function useSearchInput({
4094
4134
 
4095
4135
  // src/SearchInput/widgets/TextSearchWidget.tsx
4096
4136
  import { useRef as useRef8, useEffect as useEffect7 } from "react";
4097
- import { jsx as jsx31 } from "react/jsx-runtime";
4137
+ import { jsx as jsx32 } from "react/jsx-runtime";
4098
4138
  function TextSearchWidget({
4099
4139
  value,
4100
4140
  onChange,
@@ -4107,7 +4147,7 @@ function TextSearchWidget({
4107
4147
  useEffect7(() => {
4108
4148
  if (autoFocus) inputRef.current?.focus();
4109
4149
  }, [autoFocus]);
4110
- return /* @__PURE__ */ jsx31(
4150
+ return /* @__PURE__ */ jsx32(
4111
4151
  Input,
4112
4152
  {
4113
4153
  ref: inputRef,
@@ -4134,8 +4174,8 @@ function TextSearchWidget({
4134
4174
 
4135
4175
  // src/SearchInput/widgets/EnumSearchWidget.tsx
4136
4176
  import { useEffect as useEffect8, useState as useState6 } from "react";
4137
- import { cn as cn29 } from "@petrarca/sonnet-core";
4138
- import { jsx as jsx32, jsxs as jsxs12 } from "react/jsx-runtime";
4177
+ import { cn as cn30 } from "@petrarca/sonnet-core";
4178
+ import { jsx as jsx33, jsxs as jsxs12 } from "react/jsx-runtime";
4139
4179
  function EnumSearchWidget({
4140
4180
  property,
4141
4181
  options: widgetOptions,
@@ -4200,7 +4240,7 @@ function EnumSearchWidget({
4200
4240
  }
4201
4241
  }
4202
4242
  return /* @__PURE__ */ jsxs12(Popover, { open, onOpenChange: handleOpenChange, children: [
4203
- /* @__PURE__ */ jsx32(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx32(
4243
+ /* @__PURE__ */ jsx33(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx33(
4204
4244
  "button",
4205
4245
  {
4206
4246
  type: "button",
@@ -4216,7 +4256,7 @@ function EnumSearchWidget({
4216
4256
  align: "start",
4217
4257
  onOpenAutoFocus: (e) => e.preventDefault(),
4218
4258
  children: [
4219
- /* @__PURE__ */ jsx32(
4259
+ /* @__PURE__ */ jsx33(
4220
4260
  "input",
4221
4261
  {
4222
4262
  autoFocus: true,
@@ -4228,12 +4268,12 @@ function EnumSearchWidget({
4228
4268
  }
4229
4269
  ),
4230
4270
  /* @__PURE__ */ jsxs12("div", { children: [
4231
- filtered.length === 0 && /* @__PURE__ */ jsx32("p", { className: "px-2 py-1.5 text-sm text-muted-foreground", children: "No matches" }),
4232
- filtered.map((item, i) => /* @__PURE__ */ jsx32(
4271
+ filtered.length === 0 && /* @__PURE__ */ jsx33("p", { className: "px-2 py-1.5 text-sm text-muted-foreground", children: "No matches" }),
4272
+ filtered.map((item, i) => /* @__PURE__ */ jsx33(
4233
4273
  "button",
4234
4274
  {
4235
4275
  type: "button",
4236
- className: cn29(
4276
+ className: cn30(
4237
4277
  "w-full text-left px-2 py-1.5 text-sm rounded transition-colors",
4238
4278
  i === highlightedIndex ? "bg-accent text-accent-foreground" : "hover:bg-accent hover:text-accent-foreground"
4239
4279
  ),
@@ -4272,7 +4312,7 @@ var DEFAULT_SEARCH_WIDGETS = {
4272
4312
  };
4273
4313
 
4274
4314
  // src/SearchInput/SearchInput.tsx
4275
- import { Fragment as Fragment3, jsx as jsx33, jsxs as jsxs13 } from "react/jsx-runtime";
4315
+ import { Fragment as Fragment3, jsx as jsx34, jsxs as jsxs13 } from "react/jsx-runtime";
4276
4316
  function resolveSearchDefaults(props) {
4277
4317
  return {
4278
4318
  mode: props.mode ?? "explicit",
@@ -4293,7 +4333,7 @@ function FacetPicker({
4293
4333
  inputRef
4294
4334
  }) {
4295
4335
  return /* @__PURE__ */ jsxs13(Popover, { open: pickerVisible, onOpenChange: setPickerOpen, modal: false, children: [
4296
- /* @__PURE__ */ jsx33(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx33(
4336
+ /* @__PURE__ */ jsx34(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx34(
4297
4337
  "button",
4298
4338
  {
4299
4339
  type: "button",
@@ -4304,21 +4344,21 @@ function FacetPicker({
4304
4344
  setPickerOpen((o) => !o);
4305
4345
  inputRef.current?.focus();
4306
4346
  },
4307
- children: /* @__PURE__ */ jsx33(ChevronDown, { className: "h-3 w-3" })
4347
+ children: /* @__PURE__ */ jsx34(ChevronDown, { className: "h-3 w-3" })
4308
4348
  }
4309
4349
  ) }),
4310
- /* @__PURE__ */ jsx33(
4350
+ /* @__PURE__ */ jsx34(
4311
4351
  PopoverContent,
4312
4352
  {
4313
- className: cn30("w-44 p-1", !hasFacetsToShow && "hidden"),
4353
+ className: cn31("w-44 p-1", !hasFacetsToShow && "hidden"),
4314
4354
  align: "start",
4315
4355
  onOpenAutoFocus: (e) => e.preventDefault(),
4316
4356
  onFocusOutside: (e) => e.preventDefault(),
4317
- children: filteredFacets.map((facet, i) => /* @__PURE__ */ jsx33(
4357
+ children: filteredFacets.map((facet, i) => /* @__PURE__ */ jsx34(
4318
4358
  "button",
4319
4359
  {
4320
4360
  type: "button",
4321
- className: cn30(
4361
+ className: cn31(
4322
4362
  "w-full text-left px-2 py-1.5 text-sm rounded transition-colors",
4323
4363
  i === highlightedIndex ? "bg-accent text-accent-foreground" : "hover:bg-accent hover:text-accent-foreground"
4324
4364
  ),
@@ -4352,7 +4392,7 @@ function ValueEntry({
4352
4392
  onInputFocus
4353
4393
  }) {
4354
4394
  if (pendingFacet && PendingWidget) {
4355
- return /* @__PURE__ */ jsx33(
4395
+ return /* @__PURE__ */ jsx34(
4356
4396
  PendingWidget,
4357
4397
  {
4358
4398
  property: pendingFacet.property,
@@ -4374,7 +4414,7 @@ function ValueEntry({
4374
4414
  }
4375
4415
  );
4376
4416
  }
4377
- return /* @__PURE__ */ jsx33(
4417
+ return /* @__PURE__ */ jsx34(
4378
4418
  Input,
4379
4419
  {
4380
4420
  ref: inputRef,
@@ -4443,10 +4483,10 @@ function ActiveChips({
4443
4483
  schema,
4444
4484
  onRemove
4445
4485
  }) {
4446
- return /* @__PURE__ */ jsx33(Fragment3, { children: terms.map((term, i) => {
4486
+ return /* @__PURE__ */ jsx34(Fragment3, { children: terms.map((term, i) => {
4447
4487
  const property = schema?.properties?.[term.key];
4448
4488
  const label = property ? getFieldTitle2(term.key, property) : term.key;
4449
- return /* @__PURE__ */ jsx33(
4489
+ return /* @__PURE__ */ jsx34(
4450
4490
  FilterChip,
4451
4491
  {
4452
4492
  label: `${label}: ${term.value}`,
@@ -4471,7 +4511,7 @@ function SearchActions({
4471
4511
  onCommit
4472
4512
  }) {
4473
4513
  return /* @__PURE__ */ jsxs13(Fragment3, { children: [
4474
- !isEmpty && /* @__PURE__ */ jsx33(
4514
+ !isEmpty && /* @__PURE__ */ jsx34(
4475
4515
  "button",
4476
4516
  {
4477
4517
  type: "button",
@@ -4481,10 +4521,10 @@ function SearchActions({
4481
4521
  },
4482
4522
  className: "text-muted-foreground hover:text-foreground transition-colors shrink-0",
4483
4523
  "aria-label": "Clear search",
4484
- children: /* @__PURE__ */ jsx33(X3, { className: "h-4 w-4" })
4524
+ children: /* @__PURE__ */ jsx34(X3, { className: "h-4 w-4" })
4485
4525
  }
4486
4526
  ),
4487
- showSearchButton && mode === "explicit" && /* @__PURE__ */ jsx33(
4527
+ showSearchButton && mode === "explicit" && /* @__PURE__ */ jsx34(
4488
4528
  Button,
4489
4529
  {
4490
4530
  type: "button",
@@ -4569,7 +4609,7 @@ function SearchInput(props) {
4569
4609
  const showFacetControls = isFaceted && !pendingFacet;
4570
4610
  const pickerVisible = showFacetControls && pickerOpen;
4571
4611
  const hasFacetsToShow = pickerVisible && filteredFacets.length > 0;
4572
- const acceptFacet = React29.useCallback(
4612
+ const acceptFacet = React30.useCallback(
4573
4613
  (facet) => {
4574
4614
  selectFacet(facet);
4575
4615
  setPickerOpen(false);
@@ -4597,7 +4637,7 @@ function SearchInput(props) {
4597
4637
  "div",
4598
4638
  {
4599
4639
  ref: containerRef,
4600
- className: cn30(
4640
+ className: cn31(
4601
4641
  "flex flex-wrap items-center gap-1.5 rounded-md border border-input bg-background px-2 py-1.5 text-sm min-h-9",
4602
4642
  disabled ? "opacity-50 cursor-not-allowed" : "cursor-text",
4603
4643
  className
@@ -4610,8 +4650,8 @@ function SearchInput(props) {
4610
4650
  }
4611
4651
  },
4612
4652
  children: [
4613
- /* @__PURE__ */ jsx33(Search2, { className: "h-4 w-4 text-muted-foreground shrink-0" }),
4614
- isFaceted && /* @__PURE__ */ jsx33(
4653
+ /* @__PURE__ */ jsx34(Search2, { className: "h-4 w-4 text-muted-foreground shrink-0" }),
4654
+ isFaceted && /* @__PURE__ */ jsx34(
4615
4655
  ActiveChips,
4616
4656
  {
4617
4657
  terms: activeTerms,
@@ -4624,7 +4664,7 @@ function SearchInput(props) {
4624
4664
  ":"
4625
4665
  ] }),
4626
4666
  /* @__PURE__ */ jsxs13("div", { className: "flex items-center gap-1 flex-1 min-w-[120px]", children: [
4627
- showFacetControls && /* @__PURE__ */ jsx33(
4667
+ showFacetControls && /* @__PURE__ */ jsx34(
4628
4668
  FacetPicker,
4629
4669
  {
4630
4670
  pickerVisible,
@@ -4637,7 +4677,7 @@ function SearchInput(props) {
4637
4677
  inputRef
4638
4678
  }
4639
4679
  ),
4640
- /* @__PURE__ */ jsx33(
4680
+ /* @__PURE__ */ jsx34(
4641
4681
  ValueEntry,
4642
4682
  {
4643
4683
  pendingFacet,
@@ -4661,7 +4701,7 @@ function SearchInput(props) {
4661
4701
  }
4662
4702
  )
4663
4703
  ] }),
4664
- /* @__PURE__ */ jsx33(
4704
+ /* @__PURE__ */ jsx34(
4665
4705
  SearchActions,
4666
4706
  {
4667
4707
  isEmpty,
@@ -4683,7 +4723,7 @@ function FilterChip({ label, onRemove }) {
4683
4723
  className: "inline-flex items-center gap-1 px-2 py-0.5 text-xs font-medium rounded-full",
4684
4724
  children: [
4685
4725
  label,
4686
- /* @__PURE__ */ jsx33(
4726
+ /* @__PURE__ */ jsx34(
4687
4727
  "button",
4688
4728
  {
4689
4729
  type: "button",
@@ -4693,7 +4733,7 @@ function FilterChip({ label, onRemove }) {
4693
4733
  },
4694
4734
  className: "ml-0.5 hover:text-destructive transition-colors",
4695
4735
  "aria-label": `Remove filter ${label}`,
4696
- children: /* @__PURE__ */ jsx33(X3, { className: "h-3 w-3" })
4736
+ children: /* @__PURE__ */ jsx34(X3, { className: "h-3 w-3" })
4697
4737
  }
4698
4738
  )
4699
4739
  ]
@@ -4703,9 +4743,9 @@ function FilterChip({ label, onRemove }) {
4703
4743
 
4704
4744
  // src/Clipboard/ClipboardButton.tsx
4705
4745
  import { Copy } from "lucide-react";
4706
- import { jsx as jsx34 } from "react/jsx-runtime";
4746
+ import { jsx as jsx35 } from "react/jsx-runtime";
4707
4747
  function ClipboardButton({ hasItems, onClick }) {
4708
- return /* @__PURE__ */ jsx34(
4748
+ return /* @__PURE__ */ jsx35(
4709
4749
  Button,
4710
4750
  {
4711
4751
  variant: "ghost",
@@ -4716,7 +4756,7 @@ function ClipboardButton({ hasItems, onClick }) {
4716
4756
  opacity: hasItems ? 1 : 0.4,
4717
4757
  cursor: hasItems ? "pointer" : "not-allowed"
4718
4758
  },
4719
- children: /* @__PURE__ */ jsx34(Copy, { size: 16 })
4759
+ children: /* @__PURE__ */ jsx35(Copy, { size: 16 })
4720
4760
  }
4721
4761
  );
4722
4762
  }
@@ -4724,13 +4764,13 @@ var ClipboardButton_default = ClipboardButton;
4724
4764
 
4725
4765
  // src/Clipboard/ClipboardItem.tsx
4726
4766
  import { X as X4, Plus } from "lucide-react";
4727
- import { jsx as jsx35, jsxs as jsxs14 } from "react/jsx-runtime";
4767
+ import { jsx as jsx36, jsxs as jsxs14 } from "react/jsx-runtime";
4728
4768
  function ClipboardItemComponent({ item, onAddItem, onRemove }) {
4729
4769
  const handleAddClick = (e) => {
4730
4770
  const keepInClipboard = e.shiftKey;
4731
4771
  onAddItem(item, keepInClipboard);
4732
4772
  };
4733
- return /* @__PURE__ */ jsx35(
4773
+ return /* @__PURE__ */ jsx36(
4734
4774
  "div",
4735
4775
  {
4736
4776
  className: "p-3 rounded mb-2",
@@ -4740,8 +4780,8 @@ function ClipboardItemComponent({ item, onAddItem, onRemove }) {
4740
4780
  },
4741
4781
  children: /* @__PURE__ */ jsxs14(SimpleGroup, { justify: "space-between", wrap: "nowrap", align: "flex-start", children: [
4742
4782
  /* @__PURE__ */ jsxs14("div", { className: "flex-1 min-w-0 overflow-hidden", children: [
4743
- /* @__PURE__ */ jsx35("p", { className: "text-sm font-semibold truncate", children: item.label }),
4744
- /* @__PURE__ */ jsx35("p", { className: "text-xs text-muted-foreground truncate", children: item.displayName }),
4783
+ /* @__PURE__ */ jsx36("p", { className: "text-sm font-semibold truncate", children: item.label }),
4784
+ /* @__PURE__ */ jsx36("p", { className: "text-xs text-muted-foreground truncate", children: item.displayName }),
4745
4785
  /* @__PURE__ */ jsxs14("p", { className: "text-xs text-muted-foreground font-mono", children: [
4746
4786
  "#",
4747
4787
  item.entityId
@@ -4756,19 +4796,19 @@ function ClipboardItemComponent({ item, onAddItem, onRemove }) {
4756
4796
  onClick: handleAddClick,
4757
4797
  title: "Click to add and remove from clipboard, Shift+Click to keep in clipboard",
4758
4798
  children: [
4759
- /* @__PURE__ */ jsx35(Plus, { size: 16 }),
4799
+ /* @__PURE__ */ jsx36(Plus, { size: 16 }),
4760
4800
  "Add"
4761
4801
  ]
4762
4802
  }
4763
4803
  ),
4764
- /* @__PURE__ */ jsx35(
4804
+ /* @__PURE__ */ jsx36(
4765
4805
  Button,
4766
4806
  {
4767
4807
  size: "sm",
4768
4808
  variant: "ghost",
4769
4809
  onClick: () => onRemove(item.id),
4770
4810
  title: "Remove from clipboard",
4771
- children: /* @__PURE__ */ jsx35(X4, { size: 16 })
4811
+ children: /* @__PURE__ */ jsx36(X4, { size: 16 })
4772
4812
  }
4773
4813
  )
4774
4814
  ] })
@@ -4866,13 +4906,13 @@ var useClipboard = create()(
4866
4906
  var clipboardStore_default = useClipboard;
4867
4907
 
4868
4908
  // src/Clipboard/ClipboardMenu.tsx
4869
- import { jsx as jsx36, jsxs as jsxs15 } from "react/jsx-runtime";
4909
+ import { jsx as jsx37, jsxs as jsxs15 } from "react/jsx-runtime";
4870
4910
  function ClipboardMenu({ onAddItem }) {
4871
4911
  const { items, removeItem, clear } = clipboardStore_default();
4872
4912
  if (items.length === 0) {
4873
4913
  return /* @__PURE__ */ jsxs15("div", { style: { padding: "16px", textAlign: "center", width: "300px" }, children: [
4874
- /* @__PURE__ */ jsx36("p", { className: "text-sm text-muted-foreground", children: "No items in clipboard" }),
4875
- /* @__PURE__ */ jsx36("p", { className: "text-xs text-muted-foreground mt-1", children: 'Right-click a node and select "Copy"' })
4914
+ /* @__PURE__ */ jsx37("p", { className: "text-sm text-muted-foreground", children: "No items in clipboard" }),
4915
+ /* @__PURE__ */ jsx37("p", { className: "text-xs text-muted-foreground mt-1", children: 'Right-click a node and select "Copy"' })
4876
4916
  ] });
4877
4917
  }
4878
4918
  return /* @__PURE__ */ jsxs15(
@@ -4886,7 +4926,7 @@ function ClipboardMenu({ onAddItem }) {
4886
4926
  maxHeight: "500px"
4887
4927
  },
4888
4928
  children: [
4889
- /* @__PURE__ */ jsx36(ScrollArea, { className: "flex-1 p-3 min-h-0", children: /* @__PURE__ */ jsx36(SimpleStack, { gap: 0, children: items.map((item) => /* @__PURE__ */ jsx36(
4929
+ /* @__PURE__ */ jsx37(ScrollArea, { className: "flex-1 p-3 min-h-0", children: /* @__PURE__ */ jsx37(SimpleStack, { gap: 0, children: items.map((item) => /* @__PURE__ */ jsx37(
4890
4930
  ClipboardItem_default,
4891
4931
  {
4892
4932
  item,
@@ -4895,8 +4935,8 @@ function ClipboardMenu({ onAddItem }) {
4895
4935
  },
4896
4936
  item.id
4897
4937
  )) }) }),
4898
- /* @__PURE__ */ jsx36(Separator2, {}),
4899
- /* @__PURE__ */ jsx36("div", { style: { padding: "8px 12px", flexShrink: 0 }, children: /* @__PURE__ */ jsxs15(
4938
+ /* @__PURE__ */ jsx37(Separator2, {}),
4939
+ /* @__PURE__ */ jsx37("div", { style: { padding: "8px 12px", flexShrink: 0 }, children: /* @__PURE__ */ jsxs15(
4900
4940
  Button,
4901
4941
  {
4902
4942
  className: "w-full",
@@ -4904,7 +4944,7 @@ function ClipboardMenu({ onAddItem }) {
4904
4944
  size: "sm",
4905
4945
  onClick: clear,
4906
4946
  children: [
4907
- /* @__PURE__ */ jsx36(Trash2, { size: 16 }),
4947
+ /* @__PURE__ */ jsx37(Trash2, { size: 16 }),
4908
4948
  "Clear All (",
4909
4949
  items.length,
4910
4950
  ")"
@@ -4987,6 +5027,7 @@ export {
4987
5027
  Popover,
4988
5028
  PopoverContent,
4989
5029
  PopoverTrigger,
5030
+ ResizeHandle,
4990
5031
  ScrollArea,
4991
5032
  ScrollBar,
4992
5033
  SearchInput,