@nextlyhq/ui 0.0.2-alpha.56 → 0.0.2-alpha.58

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.cjs CHANGED
@@ -65,6 +65,7 @@ __export(src_exports, {
65
65
  Collapsible: () => Collapsible,
66
66
  CollapsibleContent: () => CollapsibleContent2,
67
67
  CollapsibleTrigger: () => CollapsibleTrigger2,
68
+ ColorPicker: () => ColorPicker,
68
69
  Command: () => Command,
69
70
  CommandDialog: () => CommandDialog,
70
71
  CommandEmpty: () => CommandEmpty,
@@ -186,6 +187,7 @@ __export(src_exports, {
186
187
  badgeVariants: () => badgeVariants,
187
188
  buttonVariants: () => buttonVariants,
188
189
  cardVariants: () => cardVariants,
190
+ commandDefaultFilter: () => commandDefaultFilter,
189
191
  createShortcutManager: () => createShortcutManager,
190
192
  dialogContentVariants: () => dialogContentVariants,
191
193
  inputVariants: () => inputVariants,
@@ -235,8 +237,9 @@ var buttonVariants = (0, import_class_variance_authority.cva)(
235
237
  destructive: "bg-destructive-solid text-destructive-foreground border border-transparent hover:bg-destructive-600",
236
238
  // border-border is the decorative separator token, and it is the right
237
239
  // one here: a button is identified by its label and fill, so its edge
238
- // carries no meaning on its own and is not held to the 3:1 minimum that
239
- // border-input meets for controls identified by their boundary. It is
240
+ // carries no meaning on its own, unlike border-input, which is the
241
+ // token for controls identified by their boundary (that token is now
242
+ // below 1.4.11's 3:1 in light mode; see contrast/accepted.ts). It is
240
243
  // still used in preference to a faint primary alpha, which reads as a
241
244
  // tint of the brand colour rather than as an edge.
242
245
  outline: "border border-border text-foreground hover-unified bg-background",
@@ -293,11 +296,22 @@ var import_class_variance_authority2 = require("class-variance-authority");
293
296
  var import_react2 = require("react");
294
297
  var import_jsx_runtime2 = require("react/jsx-runtime");
295
298
  var inputVariants = (0, import_class_variance_authority2.cva)(
296
- "file:text-foreground placeholder:text-muted-foreground placeholder:opacity-50 selection:bg-primary selection:text-primary-foreground w-full min-w-0 rounded-md border border-input bg-background text-sm transition-all duration-150 outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 focus:ring-0 focus:ring-offset-0 focus:outline-none focus:border-primary! focus-visible:border-primary! aria-invalid:border-destructive aria-invalid:focus:border-destructive! data-[invalid=true]:border-destructive data-[invalid=true]:focus:border-destructive!",
299
+ // `text-foreground` is explicit rather than inherited. Tailwind's preflight
300
+ // sets `color: inherit` on form controls, so without it the typed value takes
301
+ // whatever colour an ancestor happens to carry -- muted inside a
302
+ // `text-muted-foreground` block, red inside a `text-destructive` one. Select
303
+ // and Textarea have always pinned it; Input was the one control that did not,
304
+ // and callers were compensating by putting the token on a wrapper.
305
+ "file:text-foreground text-foreground placeholder:text-muted-foreground placeholder:opacity-50 selection:bg-primary selection:text-primary-foreground w-full min-w-0 rounded-md border border-input bg-background text-sm transition-all duration-150 outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 focus:ring-0 focus:ring-offset-0 focus:outline-none focus:border-primary! focus-visible:border-primary! aria-invalid:border-destructive aria-invalid:focus:border-destructive! data-[invalid=true]:border-destructive data-[invalid=true]:focus:border-destructive!",
297
306
  {
298
307
  variants: {
299
308
  size: {
300
- sm: "h-[var(--nx-control-height-sm)] px-2.5 py-2 text-sm",
309
+ // `-md` rather than `-sm`, so that a small input is the same height as
310
+ // a small button standing beside it in a toolbar or a filter row.
311
+ // Button's `sm` has always used this step; an input reading `-sm` made
312
+ // `size="sm"` mean 36px on one control and 32px on another, and a form
313
+ // row mixing them sat 4px out of line.
314
+ sm: "h-[var(--nx-control-height-md)] px-2.5 py-2 text-sm",
301
315
  default: "h-[var(--nx-control-height)] px-3 py-2.5 text-sm",
302
316
  lg: "h-[var(--nx-control-height-lg)] px-4 py-3 text-base"
303
317
  }
@@ -873,9 +887,12 @@ var Checkbox = (0, import_react9.forwardRef)(({ className, indeterminate, ...pro
873
887
  ref,
874
888
  "data-slot": "checkbox",
875
889
  className: cn(
876
- // Resting border uses border-input (a visible 3:1 boundary); the checked
877
- // state switches to border-primary below, keeping the two states distinct.
878
- "peer relative h-4 w-4 shrink-0 rounded-sm border border-input ring-offset-background before:absolute before:left-1/2 before:top-1/2 before:h-6 before:w-6 before:-translate-x-1/2 before:-translate-y-1/2 before:content-[''] focus:border-primary! focus-visible:border-primary! focus:outline-none focus-visible:outline-none aria-invalid:border-destructive aria-invalid:focus:border-destructive! aria-invalid:focus-visible:border-destructive! disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground data-[state=checked]:border-primary data-[state=indeterminate]:bg-primary data-[state=indeterminate]:text-primary-foreground data-[state=indeterminate]:border-primary transition-all duration-200",
890
+ // Resting border uses border-control-border, NOT border-input. An
891
+ // unchecked box has no label, value or focus ring to identify it -- the
892
+ // border is the whole control -- so it is held to 1.4.11's 3:1, which
893
+ // border-input deliberately no longer meets. The checked state switches
894
+ // to border-primary below, keeping the two states distinct.
895
+ "peer relative h-4 w-4 shrink-0 rounded-sm border border-control-border ring-offset-background before:absolute before:left-1/2 before:top-1/2 before:h-6 before:w-6 before:-translate-x-1/2 before:-translate-y-1/2 before:content-[''] focus:border-primary! focus-visible:border-primary! focus:outline-none focus-visible:outline-none aria-invalid:border-destructive aria-invalid:focus:border-destructive! aria-invalid:focus-visible:border-destructive! disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground data-[state=checked]:border-primary data-[state=indeterminate]:bg-primary data-[state=indeterminate]:text-primary-foreground data-[state=indeterminate]:border-primary transition-all duration-200",
879
896
  className
880
897
  ),
881
898
  ...props,
@@ -915,13 +932,15 @@ var RadioGroupItem = (0, import_react10.forwardRef)(({ className, ...props }, re
915
932
  className: cn(
916
933
  // Unchecked outline uses primary/40 (clearly visible) instead of primary/5
917
934
  // (~5% opacity, effectively invisible); hover strengthens above the resting state.
918
- // Resting border uses border-input (a visible 3:1 boundary); the checked
919
- // state switches to border-primary below, keeping the two states distinct.
935
+ // Resting border uses border-control-border, NOT border-input. An
936
+ // unchecked radio is only its ring, with nothing else to identify it,
937
+ // so it is held to 1.4.11's 3:1 -- which border-input deliberately no
938
+ // longer meets. The checked state switches to border-primary below.
920
939
  // rounded-full is fixed rather than derived from --radius: the circle is
921
940
  // what tells the user only one option can be chosen. The thick checked
922
941
  // border leaves a background-coloured core, and because the border's
923
942
  // inner edge is curved too that core reads as a round dot.
924
- "peer h-4 w-4 shrink-0 rounded-full border border-input bg-background cursor-pointer transition-all duration-150 focus:border-primary! focus-visible:border-primary! focus:outline-none focus-visible:outline-none aria-invalid:border-destructive aria-invalid:focus:border-destructive! aria-invalid:focus-visible:border-destructive! disabled:cursor-not-allowed disabled:opacity-50 hover:border-primary/70 data-[state=checked]:border-primary data-[state=checked]:border-[5px]",
943
+ "peer h-4 w-4 shrink-0 rounded-full border border-control-border bg-background cursor-pointer transition-all duration-150 focus:border-primary! focus-visible:border-primary! focus:outline-none focus-visible:outline-none aria-invalid:border-destructive aria-invalid:focus:border-destructive! aria-invalid:focus-visible:border-destructive! disabled:cursor-not-allowed disabled:opacity-50 hover:border-primary/70 data-[state=checked]:border-primary data-[state=checked]:border-[5px]",
925
944
  className
926
945
  ),
927
946
  ...props,
@@ -942,7 +961,21 @@ function Switch({ className, ...props }) {
942
961
  className: cn(
943
962
  "peer inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-border transition-all outline-none focus-visible:border-primary aria-invalid:border-destructive aria-invalid:focus-visible:border-destructive! disabled:cursor-not-allowed disabled:opacity-50",
944
963
  "data-[state=checked]:bg-primary data-[state=checked]:border-primary!",
945
- "data-[state=unchecked]:bg-input data-[state=unchecked]:border-border dark:data-[state=unchecked]:bg-input/80",
964
+ // An unchecked switch is a track and a thumb and nothing else -- no
965
+ // label inside it, no value, no glyph -- so 1.4.11 applies to both the
966
+ // track against the page and the thumb against the track. `bg-input`
967
+ // cannot serve here: it is the FIELD border weight, deliberately below
968
+ // the minimum, and at that value the pill and its thumb both vanish
969
+ // into a light page. The control token is the same answer used for the
970
+ // checkbox and radio boundary, for the same reason.
971
+ // At full strength in both modes. A `/80` here read as a softening of
972
+ // the dark track and was in fact a removal of the guarantee the token
973
+ // carries: composited over the surfaces the switch renders on it
974
+ // measures 3.02 on the page, 2.94 on a card, 2.85 on a popover or the
975
+ // sidebar and 2.65 on muted, so three of the four fall under the 3:1
976
+ // this token exists to hold. Opaque, the same four are 4.23, 4.01,
977
+ // 3.79 and 3.40.
978
+ "data-[state=unchecked]:bg-control-border data-[state=unchecked]:border-control-border",
946
979
  className
947
980
  ),
948
981
  ...props,
@@ -1103,41 +1136,57 @@ AvatarFallback.displayName = "AvatarFallback";
1103
1136
 
1104
1137
  // src/components/tabs.tsx
1105
1138
  var import_react_tabs = require("@radix-ui/react-tabs");
1139
+ var import_class_variance_authority8 = require("class-variance-authority");
1106
1140
  var import_react13 = require("react");
1107
1141
  var import_jsx_runtime20 = require("react/jsx-runtime");
1108
1142
  var Tabs = import_react_tabs.Root;
1109
- var TabsList = (0, import_react13.forwardRef)(
1110
- ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
1111
- import_react_tabs.List,
1112
- {
1113
- ref,
1114
- "data-slot": "tabs-list",
1115
- className: cn(
1116
- // Square corners: underline tabs, so the list never draws a rounded surface.
1117
- "inline-flex h-10 items-center justify-center gap-1 rounded-none p-0 text-muted-foreground",
1118
- className
1119
- ),
1120
- ...props
1121
- }
1122
- )
1143
+ var TABS_LIST_VARIANTS = {
1144
+ default: "h-10",
1145
+ ghost: "h-8 bg-transparent"
1146
+ };
1147
+ var tabsListVariants = (0, import_class_variance_authority8.cva)(
1148
+ // Square corners: underline tabs, so the list never draws a rounded surface.
1149
+ // `gap-1` and `p-0` are invariant across the variants, so they belong here —
1150
+ // repeating them in each arm gives any future adjustment two sites to change
1151
+ // and one to forget.
1152
+ "inline-flex items-center justify-center gap-1 rounded-none p-0 text-muted-foreground",
1153
+ {
1154
+ variants: { variant: TABS_LIST_VARIANTS },
1155
+ defaultVariants: { variant: "default" }
1156
+ }
1123
1157
  );
1158
+ var TabsList = (0, import_react13.forwardRef)(({ className, variant, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
1159
+ import_react_tabs.List,
1160
+ {
1161
+ ref,
1162
+ "data-slot": "tabs-list",
1163
+ className: cn(tabsListVariants({ variant }), className),
1164
+ ...props
1165
+ }
1166
+ ));
1124
1167
  TabsList.displayName = import_react_tabs.List.displayName;
1125
- var TabsTrigger = (0, import_react13.forwardRef)(
1126
- ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
1127
- import_react_tabs.Trigger,
1128
- {
1129
- ref,
1130
- "data-slot": "tabs-trigger",
1131
- className: cn(
1132
- // Square corners: the active state is a 2px bottom border that has to
1133
- // run the full width of the trigger.
1134
- "inline-flex items-center justify-center whitespace-nowrap rounded-none bg-transparent px-4 py-2 text-sm font-medium cursor-pointer transition-all duration-200 border-b-2 relative -mb-0.5 data-[state=active]:border-b-primary! data-[state=active]:text-primary data-[state=inactive]:border-transparent data-[state=inactive]:text-muted-foreground hover:text-primary hover:border-primary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 disabled:cursor-not-allowed",
1135
- className
1136
- ),
1137
- ...props
1138
- }
1139
- )
1168
+ var TABS_TRIGGER_SIZES = {
1169
+ default: "text-sm",
1170
+ sm: "text-xs"
1171
+ };
1172
+ var tabsTriggerVariants = (0, import_class_variance_authority8.cva)(
1173
+ // Square corners: the active state is a 2px bottom border that has to run the
1174
+ // full width of the trigger.
1175
+ "inline-flex items-center justify-center whitespace-nowrap rounded-none bg-transparent px-4 py-2 font-medium cursor-pointer transition-all duration-200 border-b-2 relative -mb-0.5 data-[state=active]:border-b-primary! data-[state=active]:text-primary data-[state=inactive]:border-transparent data-[state=inactive]:text-muted-foreground hover:text-primary hover:border-primary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 disabled:cursor-not-allowed",
1176
+ {
1177
+ variants: { size: TABS_TRIGGER_SIZES },
1178
+ defaultVariants: { size: "default" }
1179
+ }
1140
1180
  );
1181
+ var TabsTrigger = (0, import_react13.forwardRef)(({ className, size, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
1182
+ import_react_tabs.Trigger,
1183
+ {
1184
+ ref,
1185
+ "data-slot": "tabs-trigger",
1186
+ className: cn(tabsTriggerVariants({ size }), className),
1187
+ ...props
1188
+ }
1189
+ ));
1141
1190
  TabsTrigger.displayName = import_react_tabs.Trigger.displayName;
1142
1191
  var TabsContent = (0, import_react13.forwardRef)(
1143
1192
  ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
@@ -1183,7 +1232,7 @@ PopoverContent.displayName = PopoverPrimitive.Content.displayName;
1183
1232
 
1184
1233
  // src/components/dialog.tsx
1185
1234
  var DialogPrimitive = __toESM(require("@radix-ui/react-dialog"), 1);
1186
- var import_class_variance_authority8 = require("class-variance-authority");
1235
+ var import_class_variance_authority9 = require("class-variance-authority");
1187
1236
  var import_lucide_react4 = require("lucide-react");
1188
1237
  var import_react14 = require("react");
1189
1238
  var import_jsx_runtime22 = require("react/jsx-runtime");
@@ -1209,7 +1258,7 @@ var DialogOverlay = (0, import_react14.forwardRef)(({ className, ...props }, ref
1209
1258
  }
1210
1259
  ));
1211
1260
  DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
1212
- var dialogContentVariants = (0, import_class_variance_authority8.cva)("", {
1261
+ var dialogContentVariants = (0, import_class_variance_authority9.cva)("", {
1213
1262
  variants: {
1214
1263
  size: {
1215
1264
  sm: "max-w-sm",
@@ -1566,7 +1615,7 @@ DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
1566
1615
 
1567
1616
  // src/components/select.tsx
1568
1617
  var SelectPrimitive = __toESM(require("@radix-ui/react-select"), 1);
1569
- var import_class_variance_authority9 = require("class-variance-authority");
1618
+ var import_class_variance_authority10 = require("class-variance-authority");
1570
1619
  var import_lucide_react6 = require("lucide-react");
1571
1620
  var import_react16 = require("react");
1572
1621
  var import_jsx_runtime25 = require("react/jsx-runtime");
@@ -1583,14 +1632,17 @@ function SelectValue({
1583
1632
  }) {
1584
1633
  return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(SelectPrimitive.Value, { "data-slot": "select-value", ...props });
1585
1634
  }
1586
- var selectTriggerVariants = (0, import_class_variance_authority9.cva)(
1635
+ var selectTriggerVariants = (0, import_class_variance_authority10.cva)(
1587
1636
  // hover:border-primary (full strength) keeps the hover boundary more visible
1588
1637
  // than the resting border-input, not a fainter alpha of it.
1589
1638
  "flex w-full items-center justify-between gap-2 rounded-md border border-input bg-background px-3 text-sm text-foreground cursor-pointer transition-all duration-150 focus:border-primary! focus-visible:border-primary! focus:outline-none hover:border-primary disabled:cursor-not-allowed disabled:opacity-50 disabled:bg-primary/5 data-[placeholder]:text-muted-foreground aria-[invalid=true]:border-destructive aria-[invalid=true]:focus:border-destructive! [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg]:size-4",
1590
1639
  {
1591
1640
  variants: {
1592
1641
  size: {
1593
- sm: "h-[var(--nx-control-height-sm)] text-sm",
1642
+ // `-md`, matching Button and Input: one height for one size name. A
1643
+ // select sitting beside a small button in a filter row is the case that
1644
+ // makes a 4px difference visible.
1645
+ sm: "h-[var(--nx-control-height-md)] text-sm",
1594
1646
  default: "h-[var(--nx-control-height)] text-sm",
1595
1647
  lg: "h-[var(--nx-control-height-lg)] text-base"
1596
1648
  }
@@ -1735,7 +1787,7 @@ function SelectScrollDownButton({
1735
1787
 
1736
1788
  // src/components/sheet.tsx
1737
1789
  var DialogPrimitive2 = __toESM(require("@radix-ui/react-dialog"), 1);
1738
- var import_class_variance_authority10 = require("class-variance-authority");
1790
+ var import_class_variance_authority11 = require("class-variance-authority");
1739
1791
  var React7 = __toESM(require("react"), 1);
1740
1792
  var import_jsx_runtime26 = require("react/jsx-runtime");
1741
1793
  var Sheet = DialogPrimitive2.Root;
@@ -1761,7 +1813,7 @@ var SheetOverlay = React7.forwardRef(({ className, ...props }, ref) => /* @__PUR
1761
1813
  }
1762
1814
  ));
1763
1815
  SheetOverlay.displayName = DialogPrimitive2.Overlay.displayName;
1764
- var sheetVariants = (0, import_class_variance_authority10.cva)(
1816
+ var sheetVariants = (0, import_class_variance_authority11.cva)(
1765
1817
  "fixed z-50 gap-4 bg-background p-6 shadow-lg will-change-transform transition ease-in-out data-[state=closed]:duration-150 data-[state=open]:duration-150 data-[state=open]:animate-in data-[state=closed]:animate-out",
1766
1818
  {
1767
1819
  variants: {
@@ -1881,13 +1933,19 @@ var CommandDialogOverlay = (0, import_react17.forwardRef)(({ className, ...props
1881
1933
  }
1882
1934
  ));
1883
1935
  CommandDialogOverlay.displayName = "CommandDialogOverlay";
1884
- var CommandDialog = ({ children, ...props }) => {
1936
+ var CommandDialog = ({
1937
+ children,
1938
+ commandProps,
1939
+ contentProps,
1940
+ ...props
1941
+ }) => {
1885
1942
  const portalContainer = usePortalContainer();
1886
1943
  return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(DialogPrimitive3.Root, { ...props, children: /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(DialogPrimitive3.Portal, { container: portalContainer, children: [
1887
1944
  /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(CommandDialogOverlay, {}),
1888
1945
  /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
1889
1946
  DialogPrimitive3.Content,
1890
1947
  {
1948
+ ...contentProps,
1891
1949
  "data-slot": "command-content",
1892
1950
  className: cn(
1893
1951
  // Position
@@ -1913,7 +1971,19 @@ var CommandDialog = ({ children, ...props }) => {
1913
1971
  "data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",
1914
1972
  "data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-top-[48%]"
1915
1973
  ),
1916
- children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Command, { className: "[&_[cmdk-group-heading]]:px-3 [&_[cmdk-group-heading]]:py-2 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-semibold [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group-heading]]:uppercase [&_[cmdk-group-heading]]:tracking-wide [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:mb-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-3 [&_[cmdk-item]]:py-2 [&_[cmdk-item]_svg]:h-4 [&_[cmdk-item]_svg]:w-4", children })
1974
+ children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
1975
+ Command,
1976
+ {
1977
+ ...commandProps,
1978
+ className: cn(
1979
+ "[&_[cmdk-group-heading]]:px-3 [&_[cmdk-group-heading]]:py-2 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-semibold [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group-heading]]:uppercase [&_[cmdk-group-heading]]:tracking-wide [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:mb-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-3 [&_[cmdk-item]]:py-2 [&_[cmdk-item]_svg]:h-4 [&_[cmdk-item]_svg]:w-4",
1980
+ // Merged rather than overridden: a caller passing `className` for its own reason
1981
+ // would otherwise silently drop every layout rule this dialog depends on.
1982
+ commandProps?.className
1983
+ ),
1984
+ children
1985
+ }
1986
+ )
1917
1987
  }
1918
1988
  )
1919
1989
  ] }) });
@@ -2051,13 +2121,14 @@ var CommandShortcut = (0, import_react17.forwardRef)(
2051
2121
  }
2052
2122
  );
2053
2123
  CommandShortcut.displayName = "CommandShortcut";
2124
+ var commandDefaultFilter = import_cmdk.defaultFilter;
2054
2125
 
2055
2126
  // src/components/spinner.tsx
2056
- var import_class_variance_authority11 = require("class-variance-authority");
2127
+ var import_class_variance_authority12 = require("class-variance-authority");
2057
2128
  var import_lucide_react8 = require("lucide-react");
2058
2129
  var import_react18 = require("react");
2059
2130
  var import_jsx_runtime28 = require("react/jsx-runtime");
2060
- var spinnerVariants = (0, import_class_variance_authority11.cva)("animate-spin motion-reduce:animate-none", {
2131
+ var spinnerVariants = (0, import_class_variance_authority12.cva)("animate-spin motion-reduce:animate-none", {
2061
2132
  variants: {
2062
2133
  size: {
2063
2134
  sm: "h-4 w-4",
@@ -2292,7 +2363,7 @@ var TableSkeleton = ({
2292
2363
  ] })
2293
2364
  ] }) : /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(GrayBar, { className: "h-4 w-[60%] max-w-[120px]" }) }, colIdx)) }, rowIdx)) })
2294
2365
  ] }) }),
2295
- !hideFooter && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "table-footer border-t border-border", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "flex items-center justify-between px-2 py-4 p-4", children: [
2366
+ !hideFooter && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "table-footer border-t border-border", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "flex items-center justify-between px-2 py-4", children: [
2296
2367
  /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "flex items-center gap-2 text-sm", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(GrayBar, { className: "h-4 w-[120px]" }) }),
2297
2368
  /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "flex items-center gap-6", children: [
2298
2369
  /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "flex items-center gap-2", children: [
@@ -2317,11 +2388,353 @@ var TableSkeleton = ({
2317
2388
  };
2318
2389
  TableSkeleton.displayName = "TableSkeleton";
2319
2390
 
2320
- // src/components/context-menu.tsx
2321
- var ContextMenuPrimitive = __toESM(require("@radix-ui/react-context-menu"), 1);
2391
+ // src/components/color-picker.tsx
2322
2392
  var import_lucide_react12 = require("lucide-react");
2323
2393
  var React9 = __toESM(require("react"), 1);
2394
+
2395
+ // src/lib/color/convert.ts
2396
+ var clamp01 = (n) => n < 0 ? 0 : n > 1 ? 1 : n;
2397
+ function normalizeHue(hue) {
2398
+ if (!Number.isFinite(hue)) return 0;
2399
+ const wrapped = hue % 360;
2400
+ return wrapped < 0 ? wrapped + 360 : wrapped;
2401
+ }
2402
+ function hsvToRgb({ h, s, v }) {
2403
+ const hue = normalizeHue(h);
2404
+ const sat = clamp01(s);
2405
+ const val = clamp01(v);
2406
+ const sector = hue / 60;
2407
+ const chroma = val * sat;
2408
+ const x = chroma * (1 - Math.abs(sector % 2 - 1));
2409
+ const base = val - chroma;
2410
+ let rgb;
2411
+ if (sector < 1) rgb = [chroma, x, 0];
2412
+ else if (sector < 2) rgb = [x, chroma, 0];
2413
+ else if (sector < 3) rgb = [0, chroma, x];
2414
+ else if (sector < 4) rgb = [0, x, chroma];
2415
+ else if (sector < 5) rgb = [x, 0, chroma];
2416
+ else rgb = [chroma, 0, x];
2417
+ return { r: rgb[0] + base, g: rgb[1] + base, b: rgb[2] + base };
2418
+ }
2419
+ function rgbToHsv({ r, g, b }) {
2420
+ const red = clamp01(r);
2421
+ const green = clamp01(g);
2422
+ const blue = clamp01(b);
2423
+ const max = Math.max(red, green, blue);
2424
+ const min = Math.min(red, green, blue);
2425
+ const chroma = max - min;
2426
+ let hue = 0;
2427
+ if (chroma !== 0) {
2428
+ if (max === red) hue = (green - blue) / chroma % 6;
2429
+ else if (max === green) hue = (blue - red) / chroma + 2;
2430
+ else hue = (red - green) / chroma + 4;
2431
+ hue *= 60;
2432
+ }
2433
+ return {
2434
+ h: normalizeHue(hue),
2435
+ s: max === 0 ? 0 : chroma / max,
2436
+ v: max
2437
+ };
2438
+ }
2439
+
2440
+ // src/lib/color/hex.ts
2441
+ var HEX = /^#?(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/i;
2442
+ var clamp012 = (n) => n < 0 ? 0 : n > 1 ? 1 : n;
2443
+ function pair(channel) {
2444
+ const value = Number.isFinite(channel) ? clamp012(channel) : 0;
2445
+ return Math.round(value * 255).toString(16).padStart(2, "0");
2446
+ }
2447
+ function parseHex(input) {
2448
+ const text = input.trim();
2449
+ if (!HEX.test(text)) return null;
2450
+ const digits = text.replace("#", "");
2451
+ const short = digits.length < 6;
2452
+ const size = short ? 1 : 2;
2453
+ const channel = (index) => {
2454
+ const slice = digits.slice(index * size, index * size + size);
2455
+ return parseInt(short ? slice + slice : slice, 16) / 255;
2456
+ };
2457
+ const hasAlpha = digits.length === 4 || digits.length === 8;
2458
+ return {
2459
+ r: channel(0),
2460
+ g: channel(1),
2461
+ b: channel(2),
2462
+ alpha: hasAlpha ? channel(3) : 1
2463
+ };
2464
+ }
2465
+ function toHex(color, alpha = 1) {
2466
+ const opacity = Number.isFinite(alpha) ? clamp012(alpha) : 1;
2467
+ const opaque = `#${pair(color.r)}${pair(color.g)}${pair(color.b)}`;
2468
+ return opacity === 1 ? opaque : `${opaque}${pair(opacity)}`;
2469
+ }
2470
+
2471
+ // src/lib/color/picker-geometry.ts
2472
+ var clamp013 = (n) => n < 0 ? 0 : n > 1 ? 1 : n;
2473
+ function pointOnSurface(clientX, clientY, rect) {
2474
+ return {
2475
+ x: rect.width === 0 ? 0 : clamp013((clientX - rect.left) / rect.width),
2476
+ y: rect.height === 0 ? 0 : clamp013((clientY - rect.top) / rect.height)
2477
+ };
2478
+ }
2479
+ function saturationValueAt(point) {
2480
+ return { s: clamp013(point.x), v: 1 - clamp013(point.y) };
2481
+ }
2482
+ function surfacePointFor(s, v) {
2483
+ return { x: clamp013(s), y: 1 - clamp013(v) };
2484
+ }
2485
+ function hueAt(fraction) {
2486
+ const hue = clamp013(fraction) * 360;
2487
+ return hue >= 360 ? 0 : hue;
2488
+ }
2489
+ function huePosition(hue) {
2490
+ const wrapped = (hue % 360 + 360) % 360;
2491
+ return wrapped / 360;
2492
+ }
2493
+ function hueSliderValue(hue, max) {
2494
+ const step = Math.round(huePosition(hue) * (max + 1));
2495
+ return step > max ? max : step;
2496
+ }
2497
+
2498
+ // src/components/color-picker.tsx
2324
2499
  var import_jsx_runtime34 = require("react/jsx-runtime");
2500
+ function toHsva(hex) {
2501
+ const parsed = parseHex(hex);
2502
+ if (!parsed) return { h: 0, s: 0, v: 0, a: 1 };
2503
+ const { r, g, b, alpha } = parsed;
2504
+ return { ...rgbToHsv({ r, g, b }), a: alpha };
2505
+ }
2506
+ function toHexString(hsva, withAlpha) {
2507
+ return toHex(hsvToRgb(hsva), withAlpha ? hsva.a : 1);
2508
+ }
2509
+ var HUE_MAX = 359;
2510
+ function hsvaFrom(color, alpha, currentHue) {
2511
+ const hsv = rgbToHsv(color);
2512
+ return { ...hsv, h: hsv.s === 0 ? currentHue : hsv.h, a: alpha };
2513
+ }
2514
+ var SLIDER = "h-3 w-full cursor-pointer appearance-none rounded-full";
2515
+ var CHECKERBOARD = "repeating-conic-gradient(#c8c8c8 0% 25%, #ffffff 0% 50%)";
2516
+ function eyeDropperSupported() {
2517
+ return typeof window !== "undefined" && "EyeDropper" in window;
2518
+ }
2519
+ function ColorPicker({
2520
+ color,
2521
+ onColorChange,
2522
+ swatches = [],
2523
+ onSwatchSelect,
2524
+ recentColors = [],
2525
+ showAlpha = false,
2526
+ className
2527
+ }) {
2528
+ const fieldId = React9.useId();
2529
+ const surfaceRef = React9.useRef(null);
2530
+ const [hsva, setHsva] = React9.useState(() => toHsva(color));
2531
+ const [draftHex, setDraftHex] = React9.useState(null);
2532
+ const rendered = toHexString(hsva, showAlpha);
2533
+ React9.useEffect(() => {
2534
+ const incoming = parseHex(color);
2535
+ if (incoming && toHex(incoming, showAlpha ? incoming.alpha : 1) !== rendered) {
2536
+ setHsva((prev) => hsvaFrom(incoming, incoming.alpha, prev.h));
2537
+ }
2538
+ }, [color, rendered, showAlpha]);
2539
+ const commit = (next) => {
2540
+ setHsva(next);
2541
+ setDraftHex(null);
2542
+ onColorChange(toHexString(next, showAlpha));
2543
+ };
2544
+ const trackPointer = (event) => {
2545
+ const rect = surfaceRef.current?.getBoundingClientRect();
2546
+ if (!rect) return;
2547
+ const { s, v } = saturationValueAt(
2548
+ pointOnSurface(event.clientX, event.clientY, rect)
2549
+ );
2550
+ commit({ ...hsva, s, v });
2551
+ };
2552
+ const nudge = (ds, dv) => {
2553
+ const { s, v } = saturationValueAt(
2554
+ surfacePointFor(hsva.s + ds, hsva.v + dv)
2555
+ );
2556
+ commit({ ...hsva, s, v });
2557
+ };
2558
+ const handleSurfaceKey = (event) => {
2559
+ const step = event.shiftKey ? 0.1 : 0.01;
2560
+ const moves = {
2561
+ ArrowLeft: [-step, 0],
2562
+ ArrowRight: [step, 0],
2563
+ ArrowUp: [0, step],
2564
+ ArrowDown: [0, -step]
2565
+ };
2566
+ const move = moves[event.key];
2567
+ if (!move) return;
2568
+ event.preventDefault();
2569
+ nudge(move[0], move[1]);
2570
+ };
2571
+ const [canPickFromScreen, setCanPickFromScreen] = React9.useState(false);
2572
+ React9.useEffect(() => {
2573
+ setCanPickFromScreen(eyeDropperSupported());
2574
+ }, []);
2575
+ const handle = surfacePointFor(hsva.s, hsva.v);
2576
+ const hueOnly = toHex(hsvToRgb({ h: hsva.h, s: 1, v: 1 }));
2577
+ const pickFromScreen = async () => {
2578
+ const ctor = window.EyeDropper;
2579
+ if (!ctor) return;
2580
+ let sampled;
2581
+ try {
2582
+ sampled = (await new ctor().open()).sRGBHex;
2583
+ } catch {
2584
+ return;
2585
+ }
2586
+ const parsed = parseHex(sampled);
2587
+ if (parsed) commit(hsvaFrom(parsed, hsva.a, hsva.h));
2588
+ };
2589
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: cn("w-64 space-y-3", className), children: [
2590
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
2591
+ "div",
2592
+ {
2593
+ ref: surfaceRef,
2594
+ role: "application",
2595
+ tabIndex: 0,
2596
+ "aria-label": `Saturation and brightness: ${Math.round(hsva.s * 100)}% saturation, ${Math.round(hsva.v * 100)}% brightness. Arrow keys adjust.`,
2597
+ className: "ring-offset-background focus-visible:ring-ring relative h-40 w-full cursor-crosshair touch-none rounded-md focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none",
2598
+ style: {
2599
+ backgroundColor: hueOnly,
2600
+ // Value on TOP of saturation. CSS paints the first layer nearest the
2601
+ // viewer, so the reverse order lets the opaque white end of the
2602
+ // saturation ramp cover the black end of the value ramp: the
2603
+ // bottom-left corner displays white while selecting black.
2604
+ backgroundImage: "linear-gradient(to top, #000, transparent), linear-gradient(to right, #fff, transparent)"
2605
+ },
2606
+ onKeyDown: handleSurfaceKey,
2607
+ onPointerDown: (event) => {
2608
+ event.currentTarget.setPointerCapture(event.pointerId);
2609
+ trackPointer(event);
2610
+ },
2611
+ onPointerMove: (event) => {
2612
+ if (event.buttons === 1) trackPointer(event);
2613
+ },
2614
+ children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
2615
+ "span",
2616
+ {
2617
+ "aria-hidden": "true",
2618
+ className: "pointer-events-none absolute size-3 -translate-x-1/2 -translate-y-1/2 rounded-full border-2 border-white shadow-sm ring-1 ring-black/60",
2619
+ style: { left: `${handle.x * 100}%`, top: `${handle.y * 100}%` }
2620
+ }
2621
+ )
2622
+ }
2623
+ ),
2624
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("label", { className: "sr-only", htmlFor: `${fieldId}-hue`, children: "Hue" }),
2625
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
2626
+ "input",
2627
+ {
2628
+ id: `${fieldId}-hue`,
2629
+ type: "range",
2630
+ min: 0,
2631
+ max: HUE_MAX,
2632
+ step: 1,
2633
+ value: hueSliderValue(hsva.h, HUE_MAX),
2634
+ onChange: (event) => commit({ ...hsva, h: hueAt(+event.target.value / (HUE_MAX + 1)) }),
2635
+ className: SLIDER,
2636
+ style: {
2637
+ backgroundImage: "linear-gradient(to right, #f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00)"
2638
+ }
2639
+ }
2640
+ ),
2641
+ showAlpha && /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_jsx_runtime34.Fragment, { children: [
2642
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("label", { className: "sr-only", htmlFor: `${fieldId}-alpha`, children: "Opacity" }),
2643
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
2644
+ "input",
2645
+ {
2646
+ id: `${fieldId}-alpha`,
2647
+ type: "range",
2648
+ min: 0,
2649
+ max: 100,
2650
+ step: 1,
2651
+ value: Math.round(hsva.a * 100),
2652
+ onChange: (event) => commit({ ...hsva, a: +event.target.value / 100 }),
2653
+ className: SLIDER,
2654
+ style: {
2655
+ // The ramp runs to the colour being edited, over a chequerboard,
2656
+ // so the track shows what the slider actually controls. Without
2657
+ // any background this rendered as a blank 12px strip whose only
2658
+ // label was screen-reader-only.
2659
+ backgroundImage: `linear-gradient(to right, transparent, ${toHexString({ ...hsva, a: 1 }, false)}), ${CHECKERBOARD}`,
2660
+ backgroundSize: "100% 100%, 8px 8px"
2661
+ }
2662
+ }
2663
+ )
2664
+ ] }),
2665
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "flex items-center gap-2", children: [
2666
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("label", { className: "sr-only", htmlFor: `${fieldId}-hex`, children: "Hex colour" }),
2667
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
2668
+ Input,
2669
+ {
2670
+ id: `${fieldId}-hex`,
2671
+ className: "font-mono",
2672
+ value: draftHex ?? rendered,
2673
+ onChange: (event) => {
2674
+ const text = event.target.value;
2675
+ setDraftHex(text);
2676
+ const parsed = parseHex(text);
2677
+ if (parsed) {
2678
+ setHsva(hsvaFrom(parsed, parsed.alpha, hsva.h));
2679
+ onColorChange(toHex(parsed, showAlpha ? parsed.alpha : 1));
2680
+ }
2681
+ },
2682
+ onBlur: () => setDraftHex(null)
2683
+ }
2684
+ ),
2685
+ canPickFromScreen && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
2686
+ Button,
2687
+ {
2688
+ type: "button",
2689
+ variant: "outline",
2690
+ size: "icon",
2691
+ "aria-label": "Pick a colour from the screen",
2692
+ onClick: () => void pickFromScreen(),
2693
+ children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_lucide_react12.Pipette, { className: "size-4" })
2694
+ }
2695
+ )
2696
+ ] }),
2697
+ swatches.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { children: [
2698
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("p", { className: "text-muted-foreground mb-1 text-xs", children: "Presets" }),
2699
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "flex flex-wrap gap-1", children: swatches.map((swatch) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
2700
+ "button",
2701
+ {
2702
+ type: "button",
2703
+ title: swatch.label,
2704
+ "aria-label": swatch.label,
2705
+ className: "size-6 rounded border shadow-sm",
2706
+ style: { backgroundColor: swatch.color },
2707
+ onClick: () => onSwatchSelect?.(swatch)
2708
+ },
2709
+ swatch.id
2710
+ )) })
2711
+ ] }),
2712
+ recentColors.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { children: [
2713
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("p", { className: "text-muted-foreground mb-1 text-xs", children: "Recent" }),
2714
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "flex flex-wrap gap-1", children: recentColors.map((recent) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
2715
+ "button",
2716
+ {
2717
+ type: "button",
2718
+ title: recent,
2719
+ "aria-label": recent,
2720
+ className: "size-6 rounded border shadow-sm",
2721
+ style: { backgroundColor: recent },
2722
+ onClick: () => {
2723
+ const parsed = parseHex(recent);
2724
+ if (parsed) commit(hsvaFrom(parsed, parsed.alpha, hsva.h));
2725
+ }
2726
+ },
2727
+ recent
2728
+ )) })
2729
+ ] })
2730
+ ] });
2731
+ }
2732
+
2733
+ // src/components/context-menu.tsx
2734
+ var ContextMenuPrimitive = __toESM(require("@radix-ui/react-context-menu"), 1);
2735
+ var import_lucide_react13 = require("lucide-react");
2736
+ var React10 = __toESM(require("react"), 1);
2737
+ var import_jsx_runtime35 = require("react/jsx-runtime");
2325
2738
  var menuItemBase2 = "cursor-pointer transition-colors data-[highlighted]:bg-muted data-[highlighted]:text-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50";
2326
2739
  var menuSurface = "z-50 max-h-[var(--radix-context-menu-content-available-height)] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-lg border border-border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 origin-[--radix-context-menu-content-transform-origin]";
2327
2740
  var ContextMenu = ContextMenuPrimitive.Root;
@@ -2329,7 +2742,7 @@ var ContextMenuTrigger = ContextMenuPrimitive.Trigger;
2329
2742
  var ContextMenuGroup = ContextMenuPrimitive.Group;
2330
2743
  var ContextMenuSub = ContextMenuPrimitive.Sub;
2331
2744
  var ContextMenuRadioGroup = ContextMenuPrimitive.RadioGroup;
2332
- var ContextMenuSubTrigger = React9.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
2745
+ var ContextMenuSubTrigger = React10.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
2333
2746
  ContextMenuPrimitive.SubTrigger,
2334
2747
  {
2335
2748
  ref,
@@ -2342,14 +2755,14 @@ var ContextMenuSubTrigger = React9.forwardRef(({ className, inset, children, ...
2342
2755
  ...props,
2343
2756
  children: [
2344
2757
  children,
2345
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_lucide_react12.ChevronRight, { className: "ml-auto" })
2758
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_lucide_react13.ChevronRight, { className: "ml-auto" })
2346
2759
  ]
2347
2760
  }
2348
2761
  ));
2349
2762
  ContextMenuSubTrigger.displayName = ContextMenuPrimitive.SubTrigger.displayName;
2350
- var ContextMenuSubContent = React9.forwardRef(({ className, ...props }, ref) => {
2763
+ var ContextMenuSubContent = React10.forwardRef(({ className, ...props }, ref) => {
2351
2764
  const portalContainer = usePortalContainer();
2352
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(ContextMenuPrimitive.Portal, { container: portalContainer, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
2765
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(ContextMenuPrimitive.Portal, { container: portalContainer, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
2353
2766
  ContextMenuPrimitive.SubContent,
2354
2767
  {
2355
2768
  ref,
@@ -2359,9 +2772,9 @@ var ContextMenuSubContent = React9.forwardRef(({ className, ...props }, ref) =>
2359
2772
  ) });
2360
2773
  });
2361
2774
  ContextMenuSubContent.displayName = ContextMenuPrimitive.SubContent.displayName;
2362
- var ContextMenuContent = React9.forwardRef(({ className, ...props }, ref) => {
2775
+ var ContextMenuContent = React10.forwardRef(({ className, ...props }, ref) => {
2363
2776
  const portalContainer = usePortalContainer();
2364
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(ContextMenuPrimitive.Portal, { container: portalContainer, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
2777
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(ContextMenuPrimitive.Portal, { container: portalContainer, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
2365
2778
  ContextMenuPrimitive.Content,
2366
2779
  {
2367
2780
  ref,
@@ -2371,7 +2784,7 @@ var ContextMenuContent = React9.forwardRef(({ className, ...props }, ref) => {
2371
2784
  ) });
2372
2785
  });
2373
2786
  ContextMenuContent.displayName = ContextMenuPrimitive.Content.displayName;
2374
- var ContextMenuItem = React9.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
2787
+ var ContextMenuItem = React10.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
2375
2788
  ContextMenuPrimitive.Item,
2376
2789
  {
2377
2790
  ref,
@@ -2385,7 +2798,7 @@ var ContextMenuItem = React9.forwardRef(({ className, inset, ...props }, ref) =>
2385
2798
  }
2386
2799
  ));
2387
2800
  ContextMenuItem.displayName = ContextMenuPrimitive.Item.displayName;
2388
- var ContextMenuCheckboxItem = React9.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
2801
+ var ContextMenuCheckboxItem = React10.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
2389
2802
  ContextMenuPrimitive.CheckboxItem,
2390
2803
  {
2391
2804
  ref,
@@ -2397,13 +2810,13 @@ var ContextMenuCheckboxItem = React9.forwardRef(({ className, children, checked,
2397
2810
  checked,
2398
2811
  ...props,
2399
2812
  children: [
2400
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(ContextMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_lucide_react12.Check, { className: "h-4 w-4" }) }) }),
2813
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(ContextMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_lucide_react13.Check, { className: "h-4 w-4" }) }) }),
2401
2814
  children
2402
2815
  ]
2403
2816
  }
2404
2817
  ));
2405
2818
  ContextMenuCheckboxItem.displayName = ContextMenuPrimitive.CheckboxItem.displayName;
2406
- var ContextMenuRadioItem = React9.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
2819
+ var ContextMenuRadioItem = React10.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
2407
2820
  ContextMenuPrimitive.RadioItem,
2408
2821
  {
2409
2822
  ref,
@@ -2414,13 +2827,13 @@ var ContextMenuRadioItem = React9.forwardRef(({ className, children, ...props },
2414
2827
  ),
2415
2828
  ...props,
2416
2829
  children: [
2417
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(ContextMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_lucide_react12.Circle, { className: "h-2 w-2 fill-current" }) }) }),
2830
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(ContextMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_lucide_react13.Circle, { className: "h-2 w-2 fill-current" }) }) }),
2418
2831
  children
2419
2832
  ]
2420
2833
  }
2421
2834
  ));
2422
2835
  ContextMenuRadioItem.displayName = ContextMenuPrimitive.RadioItem.displayName;
2423
- var ContextMenuLabel = React9.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
2836
+ var ContextMenuLabel = React10.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
2424
2837
  ContextMenuPrimitive.Label,
2425
2838
  {
2426
2839
  ref,
@@ -2433,7 +2846,7 @@ var ContextMenuLabel = React9.forwardRef(({ className, inset, ...props }, ref) =
2433
2846
  }
2434
2847
  ));
2435
2848
  ContextMenuLabel.displayName = ContextMenuPrimitive.Label.displayName;
2436
- var ContextMenuSeparator = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
2849
+ var ContextMenuSeparator = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
2437
2850
  ContextMenuPrimitive.Separator,
2438
2851
  {
2439
2852
  ref,
@@ -2445,7 +2858,7 @@ ContextMenuSeparator.displayName = ContextMenuPrimitive.Separator.displayName;
2445
2858
  var ContextMenuShortcut = ({
2446
2859
  className,
2447
2860
  ...props
2448
- }) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
2861
+ }) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
2449
2862
  "span",
2450
2863
  {
2451
2864
  className: cn(
@@ -2458,13 +2871,13 @@ var ContextMenuShortcut = ({
2458
2871
  ContextMenuShortcut.displayName = "ContextMenuShortcut";
2459
2872
 
2460
2873
  // src/components/resizable.tsx
2461
- var import_lucide_react13 = require("lucide-react");
2874
+ var import_lucide_react14 = require("lucide-react");
2462
2875
  var ResizablePrimitive = __toESM(require("react-resizable-panels"), 1);
2463
- var import_jsx_runtime35 = require("react/jsx-runtime");
2876
+ var import_jsx_runtime36 = require("react/jsx-runtime");
2464
2877
  var ResizablePanelGroup = ({
2465
2878
  className,
2466
2879
  ...props
2467
- }) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
2880
+ }) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
2468
2881
  ResizablePrimitive.Group,
2469
2882
  {
2470
2883
  className: cn("h-full w-full", className),
@@ -2477,7 +2890,7 @@ var ResizableHandle = ({
2477
2890
  className,
2478
2891
  children,
2479
2892
  ...props
2480
- }) => /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
2893
+ }) => /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
2481
2894
  ResizablePrimitive.Separator,
2482
2895
  {
2483
2896
  className: cn(
@@ -2497,7 +2910,7 @@ var ResizableHandle = ({
2497
2910
  ),
2498
2911
  ...props,
2499
2912
  children: [
2500
- withGrip ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "z-10 flex h-4 w-3 items-center justify-center rounded-sm border border-border bg-border", children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_lucide_react13.GripVertical, { className: "h-2.5 w-2.5 text-muted-foreground" }) }) : null,
2913
+ withGrip ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "z-10 flex h-4 w-3 items-center justify-center rounded-sm border border-border bg-border", children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_lucide_react14.GripVertical, { className: "h-2.5 w-2.5 text-muted-foreground" }) }) : null,
2501
2914
  children
2502
2915
  ]
2503
2916
  }
@@ -2505,9 +2918,9 @@ var ResizableHandle = ({
2505
2918
 
2506
2919
  // src/components/tree-view.tsx
2507
2920
  var import_react_virtual = require("@tanstack/react-virtual");
2508
- var import_lucide_react14 = require("lucide-react");
2509
- var React10 = __toESM(require("react"), 1);
2510
- var import_jsx_runtime36 = require("react/jsx-runtime");
2921
+ var import_lucide_react15 = require("lucide-react");
2922
+ var React11 = __toESM(require("react"), 1);
2923
+ var import_jsx_runtime37 = require("react/jsx-runtime");
2511
2924
  var ROW_HEIGHT = 28;
2512
2925
  var INDENT_PER_LEVEL = 12;
2513
2926
  function textOf(node) {
@@ -2548,13 +2961,13 @@ function flatten(nodes, expanded) {
2548
2961
  return rows;
2549
2962
  }
2550
2963
  function useControllable(controlled, fallback) {
2551
- const [uncontrolled, setUncontrolled] = React10.useState(fallback);
2964
+ const [uncontrolled, setUncontrolled] = React11.useState(fallback);
2552
2965
  return [
2553
2966
  controlled === void 0 ? uncontrolled : controlled,
2554
2967
  setUncontrolled
2555
2968
  ];
2556
2969
  }
2557
- var TreeView = React10.forwardRef(
2970
+ var TreeView = React11.forwardRef(
2558
2971
  ({
2559
2972
  nodes,
2560
2973
  expandedIds,
@@ -2569,8 +2982,8 @@ var TreeView = React10.forwardRef(
2569
2982
  "aria-describedby": ariaDescribedBy,
2570
2983
  ...props
2571
2984
  }, forwardedRef) => {
2572
- const scrollRef = React10.useRef(null);
2573
- const attachScroll = React10.useCallback(
2985
+ const scrollRef = React11.useRef(null);
2986
+ const attachScroll = React11.useCallback(
2574
2987
  (node) => {
2575
2988
  scrollRef.current = node;
2576
2989
  if (typeof forwardedRef === "function") forwardedRef(node);
@@ -2584,7 +2997,7 @@ var TreeView = React10.forwardRef(
2584
2997
  expandedIds === void 0 ? void 0 : [...expandedIds],
2585
2998
  [...defaultExpandedIds ?? []]
2586
2999
  );
2587
- const expanded = React10.useMemo(
3000
+ const expanded = React11.useMemo(
2588
3001
  () => new Set(expandedIds ?? expandedState),
2589
3002
  [expandedIds, expandedState]
2590
3003
  );
@@ -2592,11 +3005,11 @@ var TreeView = React10.forwardRef(
2592
3005
  selectedId === void 0 ? void 0 : selectedId,
2593
3006
  defaultSelectedId ?? null
2594
3007
  );
2595
- const rows = React10.useMemo(
3008
+ const rows = React11.useMemo(
2596
3009
  () => flatten(nodes, expanded),
2597
3010
  [nodes, expanded]
2598
3011
  );
2599
- const [activeId, setActiveId] = React10.useState(null);
3012
+ const [activeId, setActiveId] = React11.useState(null);
2600
3013
  const activeIndex = Math.max(
2601
3014
  0,
2602
3015
  rows.findIndex((row) => row.node.id === (activeId ?? selected))
@@ -2640,7 +3053,7 @@ var TreeView = React10.forwardRef(
2640
3053
  }
2641
3054
  return from;
2642
3055
  };
2643
- const typeahead = React10.useRef({ query: "", at: 0 });
3056
+ const typeahead = React11.useRef({ query: "", at: 0 });
2644
3057
  const onKeyDown = (event) => {
2645
3058
  const index = activeIndex;
2646
3059
  const row = rows[index];
@@ -2737,13 +3150,13 @@ var TreeView = React10.forwardRef(
2737
3150
  const virtualItems = virtualizer.getVirtualItems();
2738
3151
  const usable = (index) => rows[index]?.node.disabled !== true;
2739
3152
  const tabStopIndex = virtualItems.some((item) => item.index === activeIndex) && usable(activeIndex) ? activeIndex : virtualItems.find((item) => usable(item.index))?.index ?? -1;
2740
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
3153
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
2741
3154
  "div",
2742
3155
  {
2743
3156
  ref: attachScroll,
2744
3157
  className: cn("overflow-auto", className),
2745
3158
  ...props,
2746
- children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
3159
+ children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
2747
3160
  "div",
2748
3161
  {
2749
3162
  role: "tree",
@@ -2756,7 +3169,7 @@ var TreeView = React10.forwardRef(
2756
3169
  const row = rows[item.index];
2757
3170
  if (row === void 0) return null;
2758
3171
  const isSelected = selected === row.node.id;
2759
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
3172
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
2760
3173
  "div",
2761
3174
  {
2762
3175
  "data-tree-index": item.index,
@@ -2786,7 +3199,7 @@ var TreeView = React10.forwardRef(
2786
3199
  paddingLeft: 4 + row.level * INDENT_PER_LEVEL
2787
3200
  },
2788
3201
  children: [
2789
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
3202
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
2790
3203
  "span",
2791
3204
  {
2792
3205
  "aria-hidden": "true",
@@ -2796,8 +3209,8 @@ var TreeView = React10.forwardRef(
2796
3209
  event.stopPropagation();
2797
3210
  setExpansion(row.node.id, !expanded.has(row.node.id));
2798
3211
  },
2799
- children: row.hasChildren ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
2800
- import_lucide_react14.ChevronRight,
3212
+ children: row.hasChildren ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
3213
+ import_lucide_react15.ChevronRight,
2801
3214
  {
2802
3215
  className: cn(
2803
3216
  "size-3.5 text-muted-foreground transition-transform",
@@ -2807,8 +3220,8 @@ var TreeView = React10.forwardRef(
2807
3220
  ) : null
2808
3221
  }
2809
3222
  ),
2810
- row.node.icon !== void 0 ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "flex size-4 shrink-0 items-center justify-center text-muted-foreground", children: row.node.icon }) : null,
2811
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "truncate", children: row.node.label })
3223
+ row.node.icon !== void 0 ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: "flex size-4 shrink-0 items-center justify-center text-muted-foreground", children: row.node.icon }) : null,
3224
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: "truncate", children: row.node.label })
2812
3225
  ]
2813
3226
  },
2814
3227
  row.node.id
@@ -2824,7 +3237,7 @@ TreeView.displayName = "TreeView";
2824
3237
 
2825
3238
  // src/components/slider.tsx
2826
3239
  var SliderPrimitive = __toESM(require("@radix-ui/react-slider"), 1);
2827
- var React11 = __toESM(require("react"), 1);
3240
+ var React12 = __toESM(require("react"), 1);
2828
3241
 
2829
3242
  // src/lib/dev-warn.ts
2830
3243
  var emitted = /* @__PURE__ */ new Set();
@@ -2843,7 +3256,7 @@ function devWarnOnce(condition, message) {
2843
3256
  }
2844
3257
 
2845
3258
  // src/components/slider.tsx
2846
- var import_jsx_runtime37 = (
3259
+ var import_jsx_runtime38 = (
2847
3260
  // `aria-label`/`aria-labelledby` are destructured out above rather than
2848
3261
  // spread here: left on the root they would be a second, roleless copy
2849
3262
  // of a name only the thumb is read for.
@@ -2855,7 +3268,7 @@ function thumbCount(value, defaultValue) {
2855
3268
  function hasAccessibleName(value) {
2856
3269
  return value !== void 0 && value.trim() !== "";
2857
3270
  }
2858
- var Slider = React11.forwardRef(
3271
+ var Slider = React12.forwardRef(
2859
3272
  ({
2860
3273
  className,
2861
3274
  value,
@@ -2866,7 +3279,7 @@ var Slider = React11.forwardRef(
2866
3279
  "aria-labelledby": ariaLabelledBy,
2867
3280
  ...props
2868
3281
  }, ref) => {
2869
- const initialUncontrolledCount = React11.useRef(
3282
+ const initialUncontrolledCount = React12.useRef(
2870
3283
  thumbCount(void 0, defaultValue)
2871
3284
  ).current;
2872
3285
  const count = value?.length ?? initialUncontrolledCount;
@@ -2907,7 +3320,7 @@ var Slider = React11.forwardRef(
2907
3320
  };
2908
3321
  };
2909
3322
  const isVertical = orientation === "vertical";
2910
- return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
3323
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
2911
3324
  SliderPrimitive.Root,
2912
3325
  {
2913
3326
  ref,
@@ -2935,14 +3348,14 @@ var Slider = React11.forwardRef(
2935
3348
  defaultValue: isEmptyDefault ? void 0 : defaultValue,
2936
3349
  ...props,
2937
3350
  children: [
2938
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
3351
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
2939
3352
  SliderPrimitive.Track,
2940
3353
  {
2941
3354
  className: cn(
2942
3355
  "bg-secondary relative grow overflow-hidden rounded-full",
2943
3356
  isVertical ? "h-full w-1.5" : "h-1.5 w-full"
2944
3357
  ),
2945
- children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
3358
+ children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
2946
3359
  SliderPrimitive.Range,
2947
3360
  {
2948
3361
  className: cn(
@@ -2953,7 +3366,7 @@ var Slider = React11.forwardRef(
2953
3366
  )
2954
3367
  }
2955
3368
  ),
2956
- Array.from({ length: count }, (_, i) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
3369
+ Array.from({ length: count }, (_, i) => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
2957
3370
  SliderPrimitive.Thumb,
2958
3371
  {
2959
3372
  ...ariaFor(i),
@@ -2975,7 +3388,7 @@ var Slider = React11.forwardRef(
2975
3388
  Slider.displayName = SliderPrimitive.Root.displayName;
2976
3389
 
2977
3390
  // src/lib/shortcuts/react.tsx
2978
- var React12 = __toESM(require("react"), 1);
3391
+ var React13 = __toESM(require("react"), 1);
2979
3392
 
2980
3393
  // src/lib/shortcuts/key-spec.ts
2981
3394
  function normalizeKey(key) {
@@ -3161,7 +3574,7 @@ function createShortcutManager(options = {}) {
3161
3574
  let pendingKey = null;
3162
3575
  function layerShape(bindings, options2) {
3163
3576
  const keys = bindings.map((b) => b.binding.keys).join("\0");
3164
- return `${keys}${options2.depth}${options2.blocking === true}${options2.enabled !== false}`;
3577
+ return `${keys}${options2.depth}${options2.priority ?? 0}${options2.blocking === true}${options2.enabled !== false}`;
3165
3578
  }
3166
3579
  function blocking() {
3167
3580
  return ordered().some((layer) => layer.options.blocking === true);
@@ -3180,7 +3593,7 @@ function createShortcutManager(options = {}) {
3180
3593
  }
3181
3594
  function ordered() {
3182
3595
  return [...layers].filter((layer) => layer.options.enabled !== false).sort(
3183
- (a, b) => b.options.depth - a.options.depth || b.sequence - a.sequence
3596
+ (a, b) => (b.options.priority ?? 0) - (a.options.priority ?? 0) || b.options.depth - a.options.depth || b.sequence - a.sequence
3184
3597
  );
3185
3598
  }
3186
3599
  function matchDepth(prepared, pressed) {
@@ -3309,6 +3722,7 @@ function createShortcutManager(options = {}) {
3309
3722
  }
3310
3723
  }
3311
3724
  function handle(event) {
3725
+ if (typeof event.key !== "string") return false;
3312
3726
  if (event.defaultPrevented) {
3313
3727
  abandonSequence();
3314
3728
  return true;
@@ -3502,10 +3916,10 @@ var FIELD_KEYS = /* @__PURE__ */ new Set([
3502
3916
  ]);
3503
3917
 
3504
3918
  // src/lib/shortcuts/react.tsx
3505
- var import_jsx_runtime38 = require("react/jsx-runtime");
3506
- var ShortcutContext = React12.createContext(null);
3919
+ var import_jsx_runtime39 = require("react/jsx-runtime");
3920
+ var ShortcutContext = React13.createContext(null);
3507
3921
  var ownersByTarget = /* @__PURE__ */ new WeakMap();
3508
- var useIsomorphicLayoutEffect = typeof document === "undefined" ? React12.useEffect : React12.useLayoutEffect;
3922
+ var useIsomorphicLayoutEffect = typeof document === "undefined" ? React13.useEffect : React13.useLayoutEffect;
3509
3923
  function optionsFingerprint(options) {
3510
3924
  return [
3511
3925
  options.isApple ?? "auto",
@@ -3518,13 +3932,13 @@ function ShortcutProvider({
3518
3932
  target,
3519
3933
  ...managerOptions
3520
3934
  }) {
3521
- const parent = React12.useContext(ShortcutContext);
3935
+ const parent = React13.useContext(ShortcutContext);
3522
3936
  const resolvedTarget = target === null ? null : target ?? (typeof document === "undefined" ? null : document);
3523
3937
  const nestedOnSameTarget = parent !== null && parent.target === resolvedTarget;
3524
- const optionsRef = React12.useRef(managerOptions);
3525
- const ownManagers = React12.useRef(/* @__PURE__ */ new WeakMap());
3526
- const ownDetached = React12.useRef(null);
3527
- const detached = React12.useMemo(() => {
3938
+ const optionsRef = React13.useRef(managerOptions);
3939
+ const ownManagers = React13.useRef(/* @__PURE__ */ new WeakMap());
3940
+ const ownDetached = React13.useRef(null);
3941
+ const detached = React13.useMemo(() => {
3528
3942
  if (resolvedTarget === null) {
3529
3943
  ownDetached.current ??= createShortcutManager(optionsRef.current);
3530
3944
  return ownDetached.current;
@@ -3580,20 +3994,20 @@ function ShortcutProvider({
3580
3994
  };
3581
3995
  }, [resolvedTarget, manager]);
3582
3996
  const depth = nestedOnSameTarget && parent ? parent.depth : 0;
3583
- const value = React12.useMemo(
3997
+ const value = React13.useMemo(
3584
3998
  () => ({ manager, depth, target: resolvedTarget, options: fingerprint }),
3585
3999
  [manager, depth, resolvedTarget, fingerprint]
3586
4000
  );
3587
- return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(ShortcutContext.Provider, { value, children });
4001
+ return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(ShortcutContext.Provider, { value, children });
3588
4002
  }
3589
4003
  function ShortcutScope({
3590
4004
  children
3591
4005
  }) {
3592
- const parent = React12.useContext(ShortcutContext);
4006
+ const parent = React13.useContext(ShortcutContext);
3593
4007
  if (!parent) {
3594
4008
  throw new Error("ShortcutScope must be rendered inside a ShortcutProvider");
3595
4009
  }
3596
- const value = React12.useMemo(
4010
+ const value = React13.useMemo(
3597
4011
  () => ({
3598
4012
  manager: parent.manager,
3599
4013
  depth: parent.depth + 1,
@@ -3604,16 +4018,16 @@ function ShortcutScope({
3604
4018
  }),
3605
4019
  [parent.manager, parent.depth, parent.target, parent.options]
3606
4020
  );
3607
- return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(ShortcutContext.Provider, { value, children });
4021
+ return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(ShortcutContext.Provider, { value, children });
3608
4022
  }
3609
4023
  function useShortcuts(bindings, options) {
3610
- const context = React12.useContext(ShortcutContext);
4024
+ const context = React13.useContext(ShortcutContext);
3611
4025
  if (!context) {
3612
4026
  throw new Error("useShortcuts must be called inside a ShortcutProvider");
3613
4027
  }
3614
4028
  const { manager, depth } = context;
3615
- const registration = React12.useRef(null);
3616
- const latest = React12.useRef({ bindings, options });
4029
+ const registration = React13.useRef(null);
4030
+ const latest = React13.useRef({ bindings, options });
3617
4031
  useIsomorphicLayoutEffect(() => {
3618
4032
  registration.current = manager.register([], {
3619
4033
  name: latest.current.options.name,
@@ -3630,12 +4044,13 @@ function useShortcuts(bindings, options) {
3630
4044
  name: options.name,
3631
4045
  depth,
3632
4046
  enabled: options.enabled,
3633
- blocking: options.blocking
4047
+ blocking: options.blocking,
4048
+ priority: options.priority
3634
4049
  });
3635
4050
  });
3636
4051
  }
3637
4052
  function useShortcutManager() {
3638
- const context = React12.useContext(ShortcutContext);
4053
+ const context = React13.useContext(ShortcutContext);
3639
4054
  if (!context) {
3640
4055
  throw new Error(
3641
4056
  "useShortcutManager must be called inside a ShortcutProvider"
@@ -3645,7 +4060,7 @@ function useShortcutManager() {
3645
4060
  }
3646
4061
  function useActiveShortcuts() {
3647
4062
  const manager = useShortcutManager();
3648
- return React12.useSyncExternalStore(
4063
+ return React13.useSyncExternalStore(
3649
4064
  manager.subscribe,
3650
4065
  manager.activeBindings,
3651
4066
  manager.activeBindings
@@ -3687,6 +4102,7 @@ function useActiveShortcuts() {
3687
4102
  Collapsible,
3688
4103
  CollapsibleContent,
3689
4104
  CollapsibleTrigger,
4105
+ ColorPicker,
3690
4106
  Command,
3691
4107
  CommandDialog,
3692
4108
  CommandEmpty,
@@ -3808,6 +4224,7 @@ function useActiveShortcuts() {
3808
4224
  badgeVariants,
3809
4225
  buttonVariants,
3810
4226
  cardVariants,
4227
+ commandDefaultFilter,
3811
4228
  createShortcutManager,
3812
4229
  dialogContentVariants,
3813
4230
  inputVariants,