hazo_ui 3.0.1 → 3.1.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
@@ -1,11 +1,13 @@
1
1
  "use client";
2
- import * as React25 from 'react';
3
- import React25__default, { useRef, useState, useCallback, useEffect, useMemo, Fragment } from 'react';
4
- import { Slot } from '@radix-ui/react-slot';
5
- import { cva } from 'class-variance-authority';
6
2
  import { clsx } from 'clsx';
7
3
  import { twMerge } from 'tailwind-merge';
4
+ import * as React26 from 'react';
5
+ import React26__default, { useRef, useState, useCallback, useEffect, useMemo, Fragment } from 'react';
6
+ import { generateRequestId, createLogger } from 'hazo_core';
7
+ import { withContext, setBrowserCorrelationId } from 'hazo_core/client';
8
8
  import { jsx, jsxs, Fragment as Fragment$1 } from 'react/jsx-runtime';
9
+ import { Slot } from '@radix-ui/react-slot';
10
+ import { cva } from 'class-variance-authority';
9
11
  import * as DialogPrimitive from '@radix-ui/react-dialog';
10
12
  import { X, ChevronDown, ChevronUp, Check, Circle, ChevronRight, ChevronLeft, Filter, Plus, ArrowUpDown, Loader2, AlertTriangle, OctagonAlert, CheckCircle2, ChevronsUpDown, Download, Share2, Copy, GripVertical, ArrowUp, ArrowDown, Pencil, Calendar as Calendar$1 } from 'lucide-react';
11
13
  import * as PopoverPrimitive from '@radix-ui/react-popover';
@@ -127,6 +129,54 @@ var require_objectWithoutPropertiesLoose = __commonJS({
127
129
  module.exports = _objectWithoutPropertiesLoose10, module.exports.__esModule = true, module.exports["default"] = module.exports;
128
130
  }
129
131
  });
132
+ function cn(...inputs) {
133
+ return twMerge(clsx(inputs));
134
+ }
135
+ function HazoContextProvider({
136
+ correlationId,
137
+ userId,
138
+ children
139
+ }) {
140
+ const id = React26.useMemo(
141
+ () => correlationId ?? generateRequestId(),
142
+ [correlationId]
143
+ );
144
+ React26.useEffect(() => {
145
+ withContext({ correlationId: id, userId }, () => {
146
+ setBrowserCorrelationId(id);
147
+ });
148
+ return () => {
149
+ setBrowserCorrelationId(void 0);
150
+ };
151
+ }, [id, userId]);
152
+ return /* @__PURE__ */ jsx(Fragment$1, { children });
153
+ }
154
+ var console_logger = {
155
+ info: (m, d) => d ? console.log(`[hazo_ui] ${m}`, d) : console.log(`[hazo_ui] ${m}`),
156
+ debug: (m, d) => d ? console.debug(`[hazo_ui] ${m}`, d) : console.debug(`[hazo_ui] ${m}`),
157
+ warn: (m, d) => d ? console.warn(`[hazo_ui] ${m}`, d) : console.warn(`[hazo_ui] ${m}`),
158
+ error: (m, d) => d ? console.error(`[hazo_ui] ${m}`, d) : console.error(`[hazo_ui] ${m}`)
159
+ };
160
+ function build_default_logger() {
161
+ try {
162
+ return createLogger("hazo_ui");
163
+ } catch {
164
+ return console_logger;
165
+ }
166
+ }
167
+ var current_logger = null;
168
+ function set_logger(logger) {
169
+ current_logger = logger ?? null;
170
+ }
171
+ function get_logger() {
172
+ if (!current_logger) {
173
+ current_logger = build_default_logger();
174
+ }
175
+ return current_logger;
176
+ }
177
+ function generateUUID() {
178
+ return generateRequestId().slice(4);
179
+ }
130
180
 
131
181
  // src/lib/hazo_ui_config.ts
132
182
  var default_config = {
@@ -158,9 +208,6 @@ function set_hazo_ui_config(config) {
158
208
  function reset_hazo_ui_config() {
159
209
  global_config = { ...default_config };
160
210
  }
161
- function cn(...inputs) {
162
- return twMerge(clsx(inputs));
163
- }
164
211
  var buttonVariants = cva(
165
212
  "inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",
166
213
  {
@@ -207,7 +254,7 @@ var variant_styles = {
207
254
  color: "hsl(var(--secondary-foreground))"
208
255
  }
209
256
  };
210
- var Button = React25.forwardRef(
257
+ var Button = React26.forwardRef(
211
258
  ({ className, variant, size, asChild = false, style, ...props }, ref) => {
212
259
  const Comp = asChild ? Slot : "button";
213
260
  const fallback_styles = variant_styles[variant ?? "default"] ?? {};
@@ -227,7 +274,7 @@ var Dialog = DialogPrimitive.Root;
227
274
  var DialogTrigger = DialogPrimitive.Trigger;
228
275
  var DialogPortal = DialogPrimitive.Portal;
229
276
  var DialogClose = DialogPrimitive.Close;
230
- var DialogOverlay = React25.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
277
+ var DialogOverlay = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
231
278
  DialogPrimitive.Overlay,
232
279
  {
233
280
  ref,
@@ -239,7 +286,7 @@ var DialogOverlay = React25.forwardRef(({ className, ...props }, ref) => /* @__P
239
286
  }
240
287
  ));
241
288
  DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
242
- var DialogContent = React25.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(DialogPortal, { children: [
289
+ var DialogContent = React26.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(DialogPortal, { children: [
243
290
  /* @__PURE__ */ jsx(DialogOverlay, {}),
244
291
  /* @__PURE__ */ jsxs(
245
292
  DialogPrimitive.Content,
@@ -289,7 +336,7 @@ var DialogFooter = ({
289
336
  }
290
337
  );
291
338
  DialogFooter.displayName = "DialogFooter";
292
- var DialogTitle = React25.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
339
+ var DialogTitle = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
293
340
  DialogPrimitive.Title,
294
341
  {
295
342
  ref,
@@ -302,7 +349,7 @@ var DialogTitle = React25.forwardRef(({ className, ...props }, ref) => /* @__PUR
302
349
  }
303
350
  ));
304
351
  DialogTitle.displayName = DialogPrimitive.Title.displayName;
305
- var DialogDescription = React25.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
352
+ var DialogDescription = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
306
353
  DialogPrimitive.Description,
307
354
  {
308
355
  ref,
@@ -311,7 +358,7 @@ var DialogDescription = React25.forwardRef(({ className, ...props }, ref) => /*
311
358
  }
312
359
  ));
313
360
  DialogDescription.displayName = DialogPrimitive.Description.displayName;
314
- var Command = React25.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
361
+ var Command = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
315
362
  "div",
316
363
  {
317
364
  ref,
@@ -323,7 +370,7 @@ var Command = React25.forwardRef(({ className, ...props }, ref) => /* @__PURE__
323
370
  }
324
371
  ));
325
372
  Command.displayName = "Command";
326
- var CommandInput = React25.forwardRef(({ className, onValueChange, onChange, ...props }, ref) => /* @__PURE__ */ jsx(
373
+ var CommandInput = React26.forwardRef(({ className, onValueChange, onChange, ...props }, ref) => /* @__PURE__ */ jsx(
327
374
  "input",
328
375
  {
329
376
  ref,
@@ -339,7 +386,7 @@ var CommandInput = React25.forwardRef(({ className, onValueChange, onChange, ...
339
386
  }
340
387
  ));
341
388
  CommandInput.displayName = "CommandInput";
342
- var CommandList = React25.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
389
+ var CommandList = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
343
390
  "div",
344
391
  {
345
392
  ref,
@@ -348,7 +395,7 @@ var CommandList = React25.forwardRef(({ className, ...props }, ref) => /* @__PUR
348
395
  }
349
396
  ));
350
397
  CommandList.displayName = "CommandList";
351
- var CommandEmpty = React25.forwardRef((props, ref) => /* @__PURE__ */ jsx(
398
+ var CommandEmpty = React26.forwardRef((props, ref) => /* @__PURE__ */ jsx(
352
399
  "div",
353
400
  {
354
401
  ref,
@@ -357,7 +404,7 @@ var CommandEmpty = React25.forwardRef((props, ref) => /* @__PURE__ */ jsx(
357
404
  }
358
405
  ));
359
406
  CommandEmpty.displayName = "CommandEmpty";
360
- var CommandGroup = React25.forwardRef(({ className, heading, children, ...props }, ref) => /* @__PURE__ */ jsxs(
407
+ var CommandGroup = React26.forwardRef(({ className, heading, children, ...props }, ref) => /* @__PURE__ */ jsxs(
361
408
  "div",
362
409
  {
363
410
  ref,
@@ -373,7 +420,7 @@ var CommandGroup = React25.forwardRef(({ className, heading, children, ...props
373
420
  }
374
421
  ));
375
422
  CommandGroup.displayName = "CommandGroup";
376
- var CommandItem = React25.forwardRef(({ className, onSelect, value, selected, style, ...props }, ref) => {
423
+ var CommandItem = React26.forwardRef(({ className, onSelect, value, selected, style, ...props }, ref) => {
377
424
  const handleClick = () => {
378
425
  if (onSelect && value) {
379
426
  onSelect(value);
@@ -404,7 +451,7 @@ var CommandItem = React25.forwardRef(({ className, onSelect, value, selected, st
404
451
  CommandItem.displayName = "CommandItem";
405
452
  var Popover = PopoverPrimitive.Root;
406
453
  var PopoverTrigger = PopoverPrimitive.Trigger;
407
- var PopoverContent = React25.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsx(
454
+ var PopoverContent = React26.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsx(
408
455
  PopoverPrimitive.Content,
409
456
  {
410
457
  ref,
@@ -418,7 +465,7 @@ var PopoverContent = React25.forwardRef(({ className, align = "center", sideOffs
418
465
  }
419
466
  ) }));
420
467
  PopoverContent.displayName = PopoverPrimitive.Content.displayName;
421
- var Input = React25.forwardRef(
468
+ var Input = React26.forwardRef(
422
469
  ({ className, type, ...props }, ref) => {
423
470
  return /* @__PURE__ */ jsx(
424
471
  "input",
@@ -438,7 +485,7 @@ Input.displayName = "Input";
438
485
  var Select = SelectPrimitive.Root;
439
486
  var SelectGroup = SelectPrimitive.Group;
440
487
  var SelectValue = SelectPrimitive.Value;
441
- var SelectTrigger = React25.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
488
+ var SelectTrigger = React26.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
442
489
  SelectPrimitive.Trigger,
443
490
  {
444
491
  ref,
@@ -454,7 +501,7 @@ var SelectTrigger = React25.forwardRef(({ className, children, ...props }, ref)
454
501
  }
455
502
  ));
456
503
  SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
457
- var SelectScrollUpButton = React25.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
504
+ var SelectScrollUpButton = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
458
505
  SelectPrimitive.ScrollUpButton,
459
506
  {
460
507
  ref,
@@ -467,7 +514,7 @@ var SelectScrollUpButton = React25.forwardRef(({ className, ...props }, ref) =>
467
514
  }
468
515
  ));
469
516
  SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
470
- var SelectScrollDownButton = React25.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
517
+ var SelectScrollDownButton = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
471
518
  SelectPrimitive.ScrollDownButton,
472
519
  {
473
520
  ref,
@@ -480,7 +527,7 @@ var SelectScrollDownButton = React25.forwardRef(({ className, ...props }, ref) =
480
527
  }
481
528
  ));
482
529
  SelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;
483
- var SelectContent = React25.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ jsx(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsxs(
530
+ var SelectContent = React26.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ jsx(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsxs(
484
531
  SelectPrimitive.Content,
485
532
  {
486
533
  ref,
@@ -508,7 +555,7 @@ var SelectContent = React25.forwardRef(({ className, children, position = "poppe
508
555
  }
509
556
  ) }));
510
557
  SelectContent.displayName = SelectPrimitive.Content.displayName;
511
- var SelectLabel = React25.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
558
+ var SelectLabel = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
512
559
  SelectPrimitive.Label,
513
560
  {
514
561
  ref,
@@ -517,7 +564,7 @@ var SelectLabel = React25.forwardRef(({ className, ...props }, ref) => /* @__PUR
517
564
  }
518
565
  ));
519
566
  SelectLabel.displayName = SelectPrimitive.Label.displayName;
520
- var SelectItem = React25.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
567
+ var SelectItem = React26.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
521
568
  SelectPrimitive.Item,
522
569
  {
523
570
  ref,
@@ -533,7 +580,7 @@ var SelectItem = React25.forwardRef(({ className, children, ...props }, ref) =>
533
580
  }
534
581
  ));
535
582
  SelectItem.displayName = SelectPrimitive.Item.displayName;
536
- var SelectSeparator = React25.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
583
+ var SelectSeparator = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
537
584
  SelectPrimitive.Separator,
538
585
  {
539
586
  ref,
@@ -545,7 +592,7 @@ SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
545
592
  var TooltipProvider = TooltipPrimitive.Provider;
546
593
  var Tooltip = TooltipPrimitive.Root;
547
594
  var TooltipTrigger = TooltipPrimitive.Trigger;
548
- var TooltipContent = React25.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(
595
+ var TooltipContent = React26.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(
549
596
  TooltipPrimitive.Content,
550
597
  {
551
598
  ref,
@@ -1407,7 +1454,7 @@ function HazoUiMultiSortDialog({
1407
1454
  ] })
1408
1455
  ] });
1409
1456
  }
1410
- var RadioGroup = React25.forwardRef(({ className, ...props }, ref) => {
1457
+ var RadioGroup = React26.forwardRef(({ className, ...props }, ref) => {
1411
1458
  return /* @__PURE__ */ jsx(
1412
1459
  RadioGroupPrimitive.Root,
1413
1460
  {
@@ -1418,7 +1465,7 @@ var RadioGroup = React25.forwardRef(({ className, ...props }, ref) => {
1418
1465
  );
1419
1466
  });
1420
1467
  RadioGroup.displayName = RadioGroupPrimitive.Root.displayName;
1421
- var RadioGroupItem = React25.forwardRef(({ className, ...props }, ref) => {
1468
+ var RadioGroupItem = React26.forwardRef(({ className, ...props }, ref) => {
1422
1469
  return /* @__PURE__ */ jsx(
1423
1470
  RadioGroupPrimitive.Item,
1424
1471
  {
@@ -1875,7 +1922,7 @@ function filterInputValue(value, input_type, num_decimals) {
1875
1922
  }
1876
1923
  }
1877
1924
  }
1878
- var HazoUiFlexInput = React25.forwardRef(
1925
+ var HazoUiFlexInput = React26.forwardRef(
1879
1926
  ({
1880
1927
  className,
1881
1928
  input_type = "mixed",
@@ -1892,13 +1939,13 @@ var HazoUiFlexInput = React25.forwardRef(
1892
1939
  onBlur,
1893
1940
  ...props
1894
1941
  }, ref) => {
1895
- const [internalValue, setInternalValue] = React25.useState(
1942
+ const [internalValue, setInternalValue] = React26.useState(
1896
1943
  typeof controlledValue === "string" ? controlledValue : typeof controlledValue === "number" ? String(controlledValue) : ""
1897
1944
  );
1898
- const [errorMessage, setErrorMessage] = React25.useState();
1945
+ const [errorMessage, setErrorMessage] = React26.useState();
1899
1946
  const isControlled = controlledValue !== void 0;
1900
1947
  const currentValue = isControlled ? typeof controlledValue === "string" ? controlledValue : String(controlledValue || "") : internalValue;
1901
- React25.useEffect(() => {
1948
+ React26.useEffect(() => {
1902
1949
  if (isControlled) {
1903
1950
  const newValue = typeof controlledValue === "string" ? controlledValue : String(controlledValue || "");
1904
1951
  if (newValue !== internalValue) {
@@ -1978,7 +2025,7 @@ var HazoUiFlexInput = React25.forwardRef(
1978
2025
  }
1979
2026
  );
1980
2027
  HazoUiFlexInput.displayName = "HazoUiFlexInput";
1981
- var ToolbarButton = React25.forwardRef(
2028
+ var ToolbarButton = React26.forwardRef(
1982
2029
  ({ onClick, is_active = false, disabled = false, tooltip, className, children }, ref) => {
1983
2030
  const button = /* @__PURE__ */ jsx(
1984
2031
  "button",
@@ -2016,25 +2063,20 @@ var ToolbarButton = React25.forwardRef(
2016
2063
  );
2017
2064
  ToolbarButton.displayName = "ToolbarButton";
2018
2065
 
2019
- // node_modules/@uiw/react-color-sketch/esm/index.js
2066
+ // ../node_modules/@uiw/react-color-sketch/esm/index.js
2020
2067
  var import_extends10 = __toESM(require_extends());
2021
2068
  var import_objectWithoutPropertiesLoose9 = __toESM(require_objectWithoutPropertiesLoose());
2022
2069
 
2023
- // node_modules/@uiw/react-color-saturation/esm/index.js
2070
+ // ../node_modules/@uiw/react-color-saturation/esm/index.js
2024
2071
  var import_extends3 = __toESM(require_extends());
2025
2072
  var import_objectWithoutPropertiesLoose2 = __toESM(require_objectWithoutPropertiesLoose());
2026
2073
 
2027
- // node_modules/@uiw/color-convert/esm/index.js
2074
+ // ../node_modules/@uiw/color-convert/esm/index.js
2028
2075
  var import_extends = __toESM(require_extends());
2029
2076
  var RGB_MAX = 255;
2030
2077
  var SV_MAX = 100;
2031
2078
  var rgbaToHsva = (_ref) => {
2032
- var {
2033
- r,
2034
- g,
2035
- b,
2036
- a
2037
- } = _ref;
2079
+ var r = _ref.r, g = _ref.g, b = _ref.b, a = _ref.a;
2038
2080
  var max = Math.max(r, g, b);
2039
2081
  var delta = max - Math.min(r, g, b);
2040
2082
  var hh = delta ? max === r ? (g - b) / delta : max === g ? 2 + (b - r) / delta : 4 + (r - g) / delta : 0;
@@ -2046,21 +2088,11 @@ var rgbaToHsva = (_ref) => {
2046
2088
  };
2047
2089
  };
2048
2090
  var hsvaToHslaString = (hsva) => {
2049
- var {
2050
- h,
2051
- s,
2052
- l,
2053
- a
2054
- } = hsvaToHsla(hsva);
2091
+ var _hsvaToHsla2 = hsvaToHsla(hsva), h = _hsvaToHsla2.h, s = _hsvaToHsla2.s, l = _hsvaToHsla2.l, a = _hsvaToHsla2.a;
2055
2092
  return "hsla(" + h + ", " + s + "%, " + l + "%, " + a + ")";
2056
2093
  };
2057
2094
  var hsvaToHsla = (_ref5) => {
2058
- var {
2059
- h,
2060
- s,
2061
- v,
2062
- a
2063
- } = _ref5;
2095
+ var h = _ref5.h, s = _ref5.s, v = _ref5.v, a = _ref5.a;
2064
2096
  var hh = (200 - s) * v / SV_MAX;
2065
2097
  return {
2066
2098
  h,
@@ -2070,21 +2102,12 @@ var hsvaToHsla = (_ref5) => {
2070
2102
  };
2071
2103
  };
2072
2104
  var rgbToHex = (_ref7) => {
2073
- var {
2074
- r,
2075
- g,
2076
- b
2077
- } = _ref7;
2105
+ var r = _ref7.r, g = _ref7.g, b = _ref7.b;
2078
2106
  var bin = r << 16 | g << 8 | b;
2079
2107
  return "#" + ((h) => new Array(7 - h.length).join("0") + h)(bin.toString(16));
2080
2108
  };
2081
2109
  var rgbaToHexa = (_ref8) => {
2082
- var {
2083
- r,
2084
- g,
2085
- b,
2086
- a
2087
- } = _ref8;
2110
+ var r = _ref8.r, g = _ref8.g, b = _ref8.b, a = _ref8.a;
2088
2111
  var alpha = typeof a === "number" && (a * 255 | 1 << 8).toString(16).slice(1);
2089
2112
  return "" + rgbToHex({
2090
2113
  r,
@@ -2099,7 +2122,7 @@ var hexToRgba = (hex) => {
2099
2122
  hex = "#" + htemp.charAt(0) + htemp.charAt(0) + htemp.charAt(1) + htemp.charAt(1) + htemp.charAt(2) + htemp.charAt(2);
2100
2123
  }
2101
2124
  var reg = new RegExp("[A-Za-z0-9]{2}", "g");
2102
- var [r, g, b = 0, a] = hex.match(reg).map((v) => parseInt(v, 16));
2125
+ var _map2 = hex.match(reg).map((v) => parseInt(v, 16)), r = _map2[0], g = _map2[1], _map2$ = _map2[2], b = _map2$ === void 0 ? 0 : _map2$, a = _map2[3];
2103
2126
  return {
2104
2127
  r,
2105
2128
  g,
@@ -2108,12 +2131,7 @@ var hexToRgba = (hex) => {
2108
2131
  };
2109
2132
  };
2110
2133
  var hsvaToRgba = (_ref9) => {
2111
- var {
2112
- h,
2113
- s,
2114
- v,
2115
- a
2116
- } = _ref9;
2134
+ var h = _ref9.h, s = _ref9.s, v = _ref9.v, a = _ref9.a;
2117
2135
  var _h = h / 60, _s = s / SV_MAX, _v = v / SV_MAX, hi = Math.floor(_h) % 6;
2118
2136
  var f = _h - Math.floor(_h), _p = RGB_MAX * _v * (1 - _s), _q = RGB_MAX * _v * (1 - _s * f), _t = RGB_MAX * _v * (1 - _s * (1 - f));
2119
2137
  _v *= RGB_MAX;
@@ -2158,20 +2176,11 @@ var hsvaToRgba = (_ref9) => {
2158
2176
  });
2159
2177
  };
2160
2178
  var hsvaToRgbaString = (hsva) => {
2161
- var {
2162
- r,
2163
- g,
2164
- b,
2165
- a
2166
- } = hsvaToRgba(hsva);
2179
+ var _hsvaToRgba2 = hsvaToRgba(hsva), r = _hsvaToRgba2.r, g = _hsvaToRgba2.g, b = _hsvaToRgba2.b, a = _hsvaToRgba2.a;
2167
2180
  return "rgba(" + r + ", " + g + ", " + b + ", " + a + ")";
2168
2181
  };
2169
2182
  var rgbaToRgb = (_ref0) => {
2170
- var {
2171
- r,
2172
- g,
2173
- b
2174
- } = _ref0;
2183
+ var r = _ref0.r, g = _ref0.g, b = _ref0.b;
2175
2184
  return {
2176
2185
  r,
2177
2186
  g,
@@ -2179,11 +2188,7 @@ var rgbaToRgb = (_ref0) => {
2179
2188
  };
2180
2189
  };
2181
2190
  var hslaToHsl = (_ref1) => {
2182
- var {
2183
- h,
2184
- s,
2185
- l
2186
- } = _ref1;
2191
+ var h = _ref1.h, s = _ref1.s, l = _ref1.l;
2187
2192
  return {
2188
2193
  h,
2189
2194
  s,
@@ -2192,11 +2197,7 @@ var hslaToHsl = (_ref1) => {
2192
2197
  };
2193
2198
  var hsvaToHex = (hsva) => rgbToHex(hsvaToRgba(hsva));
2194
2199
  var hsvaToHsv = (_ref10) => {
2195
- var {
2196
- h,
2197
- s,
2198
- v
2199
- } = _ref10;
2200
+ var h = _ref10.h, s = _ref10.s, v = _ref10.v;
2200
2201
  return {
2201
2202
  h,
2202
2203
  s,
@@ -2204,11 +2205,7 @@ var hsvaToHsv = (_ref10) => {
2204
2205
  };
2205
2206
  };
2206
2207
  var rgbToXY = (_ref12) => {
2207
- var {
2208
- r,
2209
- g,
2210
- b
2211
- } = _ref12;
2208
+ var r = _ref12.r, g = _ref12.g, b = _ref12.b;
2212
2209
  var translateColor = function translateColor2(color2) {
2213
2210
  return color2 <= 0.04045 ? color2 / 12.92 : Math.pow((color2 + 0.055) / 1.055, 2.4);
2214
2211
  };
@@ -2261,7 +2258,7 @@ var color = (str) => {
2261
2258
  };
2262
2259
  var validHex = (hex) => /^#?([A-Fa-f0-9]{3,4}){1,2}$/.test(hex);
2263
2260
 
2264
- // node_modules/@uiw/react-drag-event-interactive/esm/index.js
2261
+ // ../node_modules/@uiw/react-drag-event-interactive/esm/index.js
2265
2262
  var import_extends2 = __toESM(require_extends());
2266
2263
  var import_objectWithoutPropertiesLoose = __toESM(require_objectWithoutPropertiesLoose());
2267
2264
  function useEventCallback(handler) {
@@ -2297,16 +2294,11 @@ var getRelativePosition = (node, event) => {
2297
2294
  };
2298
2295
  };
2299
2296
  var _excluded = ["prefixCls", "className", "onMove", "onDown"];
2300
- var Interactive = /* @__PURE__ */ React25__default.forwardRef((props, ref) => {
2301
- var {
2302
- prefixCls = "w-color-interactive",
2303
- className,
2304
- onMove,
2305
- onDown
2306
- } = props, reset = (0, import_objectWithoutPropertiesLoose.default)(props, _excluded);
2297
+ var Interactive = /* @__PURE__ */ React26__default.forwardRef((props, ref) => {
2298
+ var _props$prefixCls = props.prefixCls, prefixCls = _props$prefixCls === void 0 ? "w-color-interactive" : _props$prefixCls, className = props.className, onMove = props.onMove, onDown = props.onDown, reset = (0, import_objectWithoutPropertiesLoose.default)(props, _excluded);
2307
2299
  var container = useRef(null);
2308
2300
  var hasTouched = useRef(false);
2309
- var [isDragging, setDragging] = useState(false);
2301
+ var _useState = useState(false), isDragging = _useState[0], setDragging = _useState[1];
2310
2302
  var onMoveCallback = useEventCallback(onMove);
2311
2303
  var onKeyCallback = useEventCallback(onDown);
2312
2304
  var isValid = (event) => {
@@ -2365,13 +2357,7 @@ var Interactive = /* @__PURE__ */ React25__default.forwardRef((props, ref) => {
2365
2357
  Interactive.displayName = "Interactive";
2366
2358
  var esm_default = Interactive;
2367
2359
  var Pointer = (_ref) => {
2368
- var {
2369
- className,
2370
- color: color2,
2371
- left,
2372
- top,
2373
- prefixCls
2374
- } = _ref;
2360
+ var className = _ref.className, color2 = _ref.color, left = _ref.left, top = _ref.top, prefixCls = _ref.prefixCls;
2375
2361
  var style = {
2376
2362
  position: "absolute",
2377
2363
  top,
@@ -2396,18 +2382,9 @@ var Pointer = (_ref) => {
2396
2382
  }), [top, left, color2, className, prefixCls]);
2397
2383
  };
2398
2384
  var _excluded2 = ["prefixCls", "radius", "pointer", "className", "hue", "style", "hsva", "onChange"];
2399
- var Saturation = /* @__PURE__ */ React25__default.forwardRef((props, ref) => {
2385
+ var Saturation = /* @__PURE__ */ React26__default.forwardRef((props, ref) => {
2400
2386
  var _hsva$h;
2401
- var {
2402
- prefixCls = "w-color-saturation",
2403
- radius = 0,
2404
- pointer,
2405
- className,
2406
- hue = 0,
2407
- style,
2408
- hsva,
2409
- onChange
2410
- } = props, other = (0, import_objectWithoutPropertiesLoose2.default)(props, _excluded2);
2387
+ var _props$prefixCls = props.prefixCls, prefixCls = _props$prefixCls === void 0 ? "w-color-saturation" : _props$prefixCls, _props$radius = props.radius, radius = _props$radius === void 0 ? 0 : _props$radius, pointer = props.pointer, className = props.className, _props$hue = props.hue, hue = _props$hue === void 0 ? 0 : _props$hue, style = props.style, hsva = props.hsva, onChange = props.onChange, other = (0, import_objectWithoutPropertiesLoose2.default)(props, _excluded2);
2411
2388
  var containerStyle = (0, import_extends3.default)({
2412
2389
  width: 200,
2413
2390
  height: 200,
@@ -2415,7 +2392,16 @@ var Saturation = /* @__PURE__ */ React25__default.forwardRef((props, ref) => {
2415
2392
  }, style, {
2416
2393
  position: "relative"
2417
2394
  });
2418
- var handleChange = (interaction, event) => {
2395
+ var containerRef = useRef(null);
2396
+ var combinedRef = useCallback((node) => {
2397
+ containerRef.current = node;
2398
+ if (typeof ref === "function") {
2399
+ ref(node);
2400
+ } else if (ref && "current" in ref) {
2401
+ ref.current = node;
2402
+ }
2403
+ }, [ref]);
2404
+ var handleChange = useCallback((interaction, event) => {
2419
2405
  onChange && hsva && onChange({
2420
2406
  h: hsva.h,
2421
2407
  s: interaction.left * 100,
@@ -2423,7 +2409,11 @@ var Saturation = /* @__PURE__ */ React25__default.forwardRef((props, ref) => {
2423
2409
  a: hsva.a
2424
2410
  // source: 'hsv',
2425
2411
  });
2426
- };
2412
+ var element = containerRef.current;
2413
+ if (element) {
2414
+ element.focus();
2415
+ }
2416
+ }, [hsva, onChange]);
2427
2417
  var handleKeyDown = useCallback((event) => {
2428
2418
  if (!hsva || !onChange) return;
2429
2419
  var step = 1;
@@ -2493,7 +2483,7 @@ var Saturation = /* @__PURE__ */ React25__default.forwardRef((props, ref) => {
2493
2483
  }, containerStyle, {
2494
2484
  outline: "none"
2495
2485
  }),
2496
- ref,
2486
+ ref: combinedRef,
2497
2487
  onMove: handleChange,
2498
2488
  onDown: handleChange,
2499
2489
  onKeyDown: handleKeyDown,
@@ -2504,23 +2494,16 @@ var Saturation = /* @__PURE__ */ React25__default.forwardRef((props, ref) => {
2504
2494
  Saturation.displayName = "Saturation";
2505
2495
  var esm_default2 = Saturation;
2506
2496
 
2507
- // node_modules/@uiw/react-color-alpha/esm/index.js
2497
+ // ../node_modules/@uiw/react-color-alpha/esm/index.js
2508
2498
  var import_extends5 = __toESM(require_extends());
2509
2499
  var import_objectWithoutPropertiesLoose4 = __toESM(require_objectWithoutPropertiesLoose());
2510
2500
 
2511
- // node_modules/@uiw/react-color-alpha/esm/Pointer.js
2501
+ // ../node_modules/@uiw/react-color-alpha/esm/Pointer.js
2512
2502
  var import_extends4 = __toESM(require_extends());
2513
2503
  var import_objectWithoutPropertiesLoose3 = __toESM(require_objectWithoutPropertiesLoose());
2514
2504
  var _excluded3 = ["className", "prefixCls", "left", "top", "style", "fillProps"];
2515
2505
  var Pointer2 = (_ref) => {
2516
- var {
2517
- className,
2518
- prefixCls,
2519
- left,
2520
- top,
2521
- style,
2522
- fillProps
2523
- } = _ref, reset = (0, import_objectWithoutPropertiesLoose3.default)(_ref, _excluded3);
2506
+ var className = _ref.className, prefixCls = _ref.prefixCls, left = _ref.left, top = _ref.top, style = _ref.style, fillProps = _ref.fillProps, reset = (0, import_objectWithoutPropertiesLoose3.default)(_ref, _excluded3);
2524
2507
  var styleWrapper = (0, import_extends4.default)({}, style, {
2525
2508
  position: "absolute",
2526
2509
  left,
@@ -2546,39 +2529,40 @@ var Pointer2 = (_ref) => {
2546
2529
  }))
2547
2530
  }));
2548
2531
  };
2549
- var _excluded4 = ["prefixCls", "className", "hsva", "background", "bgProps", "innerProps", "pointerProps", "radius", "width", "height", "direction", "style", "onChange", "pointer"];
2532
+ var _excluded4 = ["prefixCls", "className", "hsva", "background", "bgProps", "innerProps", "pointerProps", "radius", "width", "height", "direction", "reverse", "style", "onChange", "pointer"];
2550
2533
  var BACKGROUND_IMG = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAMUlEQVQ4T2NkYGAQYcAP3uCTZhw1gGGYhAGBZIA/nYDCgBDAm9BGDWAAJyRCgLaBCAAgXwixzAS0pgAAAABJRU5ErkJggg==";
2551
- var Alpha = /* @__PURE__ */ React25__default.forwardRef((props, ref) => {
2552
- var {
2553
- prefixCls = "w-color-alpha",
2554
- className,
2555
- hsva,
2556
- background,
2557
- bgProps = {},
2558
- innerProps = {},
2559
- pointerProps = {},
2560
- radius = 0,
2561
- width,
2562
- height = 16,
2563
- direction = "horizontal",
2564
- style,
2565
- onChange,
2566
- pointer
2567
- } = props, other = (0, import_objectWithoutPropertiesLoose4.default)(props, _excluded4);
2534
+ var Alpha = /* @__PURE__ */ React26__default.forwardRef((props, ref) => {
2535
+ var _props$prefixCls = props.prefixCls, prefixCls = _props$prefixCls === void 0 ? "w-color-alpha" : _props$prefixCls, className = props.className, hsva = props.hsva, background = props.background, _props$bgProps = props.bgProps, bgProps = _props$bgProps === void 0 ? {} : _props$bgProps, _props$innerProps = props.innerProps, innerProps = _props$innerProps === void 0 ? {} : _props$innerProps, _props$pointerProps = props.pointerProps, pointerProps = _props$pointerProps === void 0 ? {} : _props$pointerProps, _props$radius = props.radius, radius = _props$radius === void 0 ? 0 : _props$radius, width = props.width, _props$height = props.height, height = _props$height === void 0 ? 16 : _props$height, _props$direction = props.direction, direction = _props$direction === void 0 ? "horizontal" : _props$direction, _props$reverse = props.reverse, reverse = _props$reverse === void 0 ? false : _props$reverse, style = props.style, onChange = props.onChange, pointer = props.pointer, other = (0, import_objectWithoutPropertiesLoose4.default)(props, _excluded4);
2536
+ var offsetToAlpha = useCallback((offset) => {
2537
+ var value = direction === "horizontal" ? offset.left : offset.top;
2538
+ if (direction === "horizontal") {
2539
+ return reverse ? 1 - value : value;
2540
+ }
2541
+ return reverse ? value : 1 - value;
2542
+ }, [direction, reverse]);
2543
+ var alphaToOffset = useCallback((alpha) => {
2544
+ if (direction === "horizontal") {
2545
+ return reverse ? 1 - alpha : alpha;
2546
+ }
2547
+ return reverse ? alpha : 1 - alpha;
2548
+ }, [direction, reverse]);
2568
2549
  var handleChange = (offset) => {
2550
+ var alpha = offsetToAlpha(offset);
2569
2551
  onChange && onChange((0, import_extends5.default)({}, hsva, {
2570
- a: direction === "horizontal" ? offset.left : offset.top
2552
+ a: alpha
2571
2553
  }), offset);
2572
2554
  };
2573
2555
  var colorTo = hsvaToHslaString(Object.assign({}, hsva, {
2574
2556
  a: 1
2575
2557
  }));
2576
- var innerBackground = "linear-gradient(to " + (direction === "horizontal" ? "right" : "bottom") + ", rgba(244, 67, 54, 0) 0%, " + colorTo + " 100%)";
2558
+ var horizontalGradient = reverse ? "linear-gradient(to right, " + colorTo + " 0%, rgba(244, 67, 54, 0) 100%)" : "linear-gradient(to right, rgba(244, 67, 54, 0) 0%, " + colorTo + " 100%)";
2559
+ var verticalGradient = reverse ? "linear-gradient(to bottom, rgba(244, 67, 54, 0) 0%, " + colorTo + " 100%)" : "linear-gradient(to bottom, " + colorTo + " 0%, rgba(244, 67, 54, 0) 100%)";
2560
+ var innerBackground = direction === "horizontal" ? horizontalGradient : verticalGradient;
2577
2561
  var comProps = {};
2578
2562
  if (direction === "horizontal") {
2579
- comProps.left = hsva.a * 100 + "%";
2563
+ comProps.left = alphaToOffset(hsva.a) * 100 + "%";
2580
2564
  } else {
2581
- comProps.top = hsva.a * 100 + "%";
2565
+ comProps.top = alphaToOffset(hsva.a) * 100 + "%";
2582
2566
  }
2583
2567
  var styleWrapper = (0, import_extends5.default)({
2584
2568
  "--alpha-background-color": "#fff",
@@ -2600,25 +2584,25 @@ var Alpha = /* @__PURE__ */ React25__default.forwardRef((props, ref) => {
2600
2584
  switch (event.key) {
2601
2585
  case "ArrowLeft":
2602
2586
  if (direction === "horizontal") {
2603
- newAlpha = Math.max(0, currentAlpha - step);
2587
+ newAlpha = reverse ? Math.min(1, currentAlpha + step) : Math.max(0, currentAlpha - step);
2604
2588
  event.preventDefault();
2605
2589
  }
2606
2590
  break;
2607
2591
  case "ArrowRight":
2608
2592
  if (direction === "horizontal") {
2609
- newAlpha = Math.min(1, currentAlpha + step);
2593
+ newAlpha = reverse ? Math.max(0, currentAlpha - step) : Math.min(1, currentAlpha + step);
2610
2594
  event.preventDefault();
2611
2595
  }
2612
2596
  break;
2613
2597
  case "ArrowUp":
2614
2598
  if (direction === "vertical") {
2615
- newAlpha = Math.max(0, currentAlpha - step);
2599
+ newAlpha = reverse ? Math.max(0, currentAlpha - step) : Math.min(1, currentAlpha + step);
2616
2600
  event.preventDefault();
2617
2601
  }
2618
2602
  break;
2619
2603
  case "ArrowDown":
2620
2604
  if (direction === "vertical") {
2621
- newAlpha = Math.min(1, currentAlpha + step);
2605
+ newAlpha = reverse ? Math.min(1, currentAlpha + step) : Math.max(0, currentAlpha - step);
2622
2606
  event.preventDefault();
2623
2607
  }
2624
2608
  break;
@@ -2626,9 +2610,10 @@ var Alpha = /* @__PURE__ */ React25__default.forwardRef((props, ref) => {
2626
2610
  return;
2627
2611
  }
2628
2612
  if (newAlpha !== currentAlpha) {
2613
+ var syntheticAxisOffset = alphaToOffset(newAlpha);
2629
2614
  var syntheticOffset = {
2630
- left: direction === "horizontal" ? newAlpha : hsva.a,
2631
- top: direction === "vertical" ? newAlpha : hsva.a,
2615
+ left: direction === "horizontal" ? syntheticAxisOffset : hsva.a,
2616
+ top: direction === "vertical" ? syntheticAxisOffset : hsva.a,
2632
2617
  width: 0,
2633
2618
  height: 0,
2634
2619
  x: 0,
@@ -2638,7 +2623,7 @@ var Alpha = /* @__PURE__ */ React25__default.forwardRef((props, ref) => {
2638
2623
  a: newAlpha
2639
2624
  }), syntheticOffset);
2640
2625
  }
2641
- }, [hsva, direction, onChange]);
2626
+ }, [alphaToOffset, hsva, direction, onChange, reverse]);
2642
2627
  var handleClick = useCallback((event) => {
2643
2628
  event.target.focus();
2644
2629
  }, []);
@@ -2676,28 +2661,18 @@ var Alpha = /* @__PURE__ */ React25__default.forwardRef((props, ref) => {
2676
2661
  Alpha.displayName = "Alpha";
2677
2662
  var esm_default3 = Alpha;
2678
2663
 
2679
- // node_modules/@uiw/react-color-editable-input/esm/index.js
2664
+ // ../node_modules/@uiw/react-color-editable-input/esm/index.js
2680
2665
  var import_extends6 = __toESM(require_extends());
2681
2666
  var import_objectWithoutPropertiesLoose5 = __toESM(require_objectWithoutPropertiesLoose());
2682
2667
  var _excluded5 = ["prefixCls", "placement", "label", "value", "className", "style", "labelStyle", "inputStyle", "onChange", "onBlur", "renderInput"];
2683
2668
  var validHex2 = (hex) => /^#?([A-Fa-f0-9]{3,4}){1,2}$/.test(hex);
2684
2669
  var getNumberValue = (value) => Number(String(value).replace(/%/g, ""));
2685
- var EditableInput = /* @__PURE__ */ React25__default.forwardRef((props, ref) => {
2686
- var {
2687
- prefixCls = "w-color-editable-input",
2688
- placement = "bottom",
2689
- label,
2690
- value: initValue,
2691
- className,
2692
- style,
2693
- labelStyle,
2694
- inputStyle,
2695
- onChange,
2696
- onBlur,
2697
- renderInput
2698
- } = props, other = (0, import_objectWithoutPropertiesLoose5.default)(props, _excluded5);
2699
- var [value, setValue] = useState(initValue);
2670
+ var EditableInput = /* @__PURE__ */ React26__default.forwardRef((props, ref) => {
2671
+ var _props$prefixCls = props.prefixCls, prefixCls = _props$prefixCls === void 0 ? "w-color-editable-input" : _props$prefixCls, _props$placement = props.placement, placement = _props$placement === void 0 ? "bottom" : _props$placement, label = props.label, initValue = props.value, className = props.className, style = props.style, labelStyle = props.labelStyle, inputStyle = props.inputStyle, onChange = props.onChange, onBlur = props.onBlur, renderInput = props.renderInput, other = (0, import_objectWithoutPropertiesLoose5.default)(props, _excluded5);
2672
+ var _useState = useState(initValue), value = _useState[0], setValue = _useState[1];
2700
2673
  var isFocus = useRef(false);
2674
+ var inputIdRef = useRef(other.id || prefixCls + "-" + Math.random().toString(36).slice(2, 11));
2675
+ var inputId = other.id || inputIdRef.current;
2701
2676
  useEffect(() => {
2702
2677
  if (props.value !== value) {
2703
2678
  if (!isFocus.current) {
@@ -2760,6 +2735,7 @@ var EditableInput = /* @__PURE__ */ React25__default.forwardRef((props, ref) =>
2760
2735
  autoComplete: "off",
2761
2736
  onFocus: () => isFocus.current = true
2762
2737
  }, other, {
2738
+ id: inputId,
2763
2739
  style: editableStyle,
2764
2740
  onFocusCapture: (e) => {
2765
2741
  var elm = e.target;
@@ -2771,7 +2747,8 @@ var EditableInput = /* @__PURE__ */ React25__default.forwardRef((props, ref) =>
2771
2747
  style: wrapperStyle,
2772
2748
  children: [renderInput ? renderInput(inputProps, ref) : /* @__PURE__ */ jsx("input", (0, import_extends6.default)({
2773
2749
  ref
2774
- }, inputProps)), label && /* @__PURE__ */ jsx("span", {
2750
+ }, inputProps)), label && /* @__PURE__ */ jsx("label", {
2751
+ htmlFor: inputId,
2775
2752
  style: (0, import_extends6.default)({
2776
2753
  color: "var(--editable-input-label-color)",
2777
2754
  textTransform: "capitalize"
@@ -2783,23 +2760,12 @@ var EditableInput = /* @__PURE__ */ React25__default.forwardRef((props, ref) =>
2783
2760
  EditableInput.displayName = "EditableInput";
2784
2761
  var esm_default4 = EditableInput;
2785
2762
 
2786
- // node_modules/@uiw/react-color-editable-input-rgba/esm/index.js
2763
+ // ../node_modules/@uiw/react-color-editable-input-rgba/esm/index.js
2787
2764
  var import_extends7 = __toESM(require_extends());
2788
2765
  var import_objectWithoutPropertiesLoose6 = __toESM(require_objectWithoutPropertiesLoose());
2789
2766
  var _excluded6 = ["prefixCls", "hsva", "placement", "rProps", "gProps", "bProps", "aProps", "className", "style", "onChange"];
2790
- var EditableInputRGBA = /* @__PURE__ */ React25__default.forwardRef((props, ref) => {
2791
- var {
2792
- prefixCls = "w-color-editable-input-rgba",
2793
- hsva,
2794
- placement = "bottom",
2795
- rProps = {},
2796
- gProps = {},
2797
- bProps = {},
2798
- aProps = {},
2799
- className,
2800
- style,
2801
- onChange
2802
- } = props, other = (0, import_objectWithoutPropertiesLoose6.default)(props, _excluded6);
2767
+ var EditableInputRGBA = /* @__PURE__ */ React26__default.forwardRef((props, ref) => {
2768
+ var _props$prefixCls = props.prefixCls, prefixCls = _props$prefixCls === void 0 ? "w-color-editable-input-rgba" : _props$prefixCls, hsva = props.hsva, _props$placement = props.placement, placement = _props$placement === void 0 ? "bottom" : _props$placement, _props$rProps = props.rProps, rProps = _props$rProps === void 0 ? {} : _props$rProps, _props$gProps = props.gProps, gProps = _props$gProps === void 0 ? {} : _props$gProps, _props$bProps = props.bProps, bProps = _props$bProps === void 0 ? {} : _props$bProps, _props$aProps = props.aProps, aProps = _props$aProps === void 0 ? {} : _props$aProps, className = props.className, style = props.style, onChange = props.onChange, other = (0, import_objectWithoutPropertiesLoose6.default)(props, _excluded6);
2803
2769
  var rgba = hsva ? hsvaToRgba(hsva) : {};
2804
2770
  function handleBlur(evn) {
2805
2771
  var value = Number(evn.target.value);
@@ -2879,7 +2845,7 @@ var EditableInputRGBA = /* @__PURE__ */ React25__default.forwardRef((props, ref)
2879
2845
  }, gProps, {
2880
2846
  style: (0, import_extends7.default)({
2881
2847
  marginLeft: 5
2882
- }, rProps.style)
2848
+ }, gProps.style)
2883
2849
  })), /* @__PURE__ */ jsx(esm_default4, (0, import_extends7.default)({
2884
2850
  label: "B",
2885
2851
  value: rgba.b || 0,
@@ -2906,24 +2872,43 @@ var EditableInputRGBA = /* @__PURE__ */ React25__default.forwardRef((props, ref)
2906
2872
  EditableInputRGBA.displayName = "EditableInputRGBA";
2907
2873
  var esm_default5 = EditableInputRGBA;
2908
2874
 
2909
- // node_modules/@uiw/react-color-hue/esm/index.js
2875
+ // ../node_modules/@uiw/react-color-hue/esm/index.js
2910
2876
  var import_extends8 = __toESM(require_extends());
2911
2877
  var import_objectWithoutPropertiesLoose7 = __toESM(require_objectWithoutPropertiesLoose());
2912
- var _excluded7 = ["prefixCls", "className", "hue", "onChange", "direction"];
2913
- var Hue = /* @__PURE__ */ React25__default.forwardRef((props, ref) => {
2914
- var {
2915
- prefixCls = "w-color-hue",
2916
- className,
2917
- hue = 0,
2918
- onChange: _onChange,
2919
- direction = "horizontal"
2920
- } = props, other = (0, import_objectWithoutPropertiesLoose7.default)(props, _excluded7);
2878
+ var _excluded7 = ["prefixCls", "className", "hue", "onChange", "direction", "reverse"];
2879
+ var NORMAL_COLORS = "rgb(255, 0, 0) 0%, rgb(255, 255, 0) 17%, rgb(0, 255, 0) 33%, rgb(0, 255, 255) 50%, rgb(0, 0, 255) 67%, rgb(255, 0, 255) 83%, rgb(255, 0, 0) 100%";
2880
+ var REVERSED_COLORS = "rgb(255, 0, 0) 0%, rgb(255, 0, 255) 17%, rgb(0, 0, 255) 33%, rgb(0, 255, 255) 50%, rgb(0, 255, 0) 67%, rgb(255, 255, 0) 83%, rgb(255, 0, 0) 100%";
2881
+ var Hue = /* @__PURE__ */ React26__default.forwardRef((props, ref) => {
2882
+ var _props$prefixCls = props.prefixCls, prefixCls = _props$prefixCls === void 0 ? "w-color-hue" : _props$prefixCls, className = props.className, _props$hue = props.hue, hue = _props$hue === void 0 ? 0 : _props$hue, _onChange = props.onChange, _props$direction = props.direction, direction = _props$direction === void 0 ? "horizontal" : _props$direction, _props$reverse = props.reverse, reverse = _props$reverse === void 0 ? false : _props$reverse, other = (0, import_objectWithoutPropertiesLoose7.default)(props, _excluded7);
2883
+ var getGradientBackground = useCallback(() => {
2884
+ if (direction === "horizontal") {
2885
+ var colors = reverse ? REVERSED_COLORS : NORMAL_COLORS;
2886
+ var gradientDirection = "right";
2887
+ return "linear-gradient(to " + gradientDirection + ", " + colors + ")";
2888
+ } else {
2889
+ var _colors = reverse ? NORMAL_COLORS : REVERSED_COLORS;
2890
+ var _gradientDirection = "bottom";
2891
+ return "linear-gradient(to " + _gradientDirection + ", " + _colors + ")";
2892
+ }
2893
+ }, [direction, reverse]);
2894
+ var getHueFromInteraction = useCallback((interaction) => {
2895
+ var value = direction === "horizontal" ? interaction.left : interaction.top;
2896
+ var normalizedValue;
2897
+ if (direction === "horizontal") {
2898
+ normalizedValue = reverse ? 1 - value : value;
2899
+ } else {
2900
+ normalizedValue = reverse ? value : 1 - value;
2901
+ }
2902
+ return 360 * normalizedValue;
2903
+ }, [direction, reverse]);
2904
+ var gradientBackground = useMemo(() => getGradientBackground(), [getGradientBackground]);
2921
2905
  return /* @__PURE__ */ jsx(esm_default3, (0, import_extends8.default)({
2922
2906
  ref,
2923
2907
  className: prefixCls + " " + (className || "")
2924
2908
  }, other, {
2925
2909
  direction,
2926
- background: "linear-gradient(to " + (direction === "horizontal" ? "right" : "bottom") + ", rgb(255, 0, 0) 0%, rgb(255, 255, 0) 17%, rgb(0, 255, 0) 33%, rgb(0, 255, 255) 50%, rgb(0, 0, 255) 67%, rgb(255, 0, 255) 83%, rgb(255, 0, 0) 100%)",
2910
+ reverse,
2911
+ background: gradientBackground,
2927
2912
  hsva: {
2928
2913
  h: hue,
2929
2914
  s: 100,
@@ -2932,7 +2917,7 @@ var Hue = /* @__PURE__ */ React25__default.forwardRef((props, ref) => {
2932
2917
  },
2933
2918
  onChange: (_, interaction) => {
2934
2919
  _onChange && _onChange({
2935
- h: direction === "horizontal" ? 360 * interaction.left : 360 * interaction.top
2920
+ h: getHueFromInteraction(interaction)
2936
2921
  });
2937
2922
  }
2938
2923
  }));
@@ -2940,23 +2925,12 @@ var Hue = /* @__PURE__ */ React25__default.forwardRef((props, ref) => {
2940
2925
  Hue.displayName = "Hue";
2941
2926
  var esm_default6 = Hue;
2942
2927
 
2943
- // node_modules/@uiw/react-color-swatch/esm/index.js
2928
+ // ../node_modules/@uiw/react-color-swatch/esm/index.js
2944
2929
  var import_extends9 = __toESM(require_extends());
2945
2930
  var import_objectWithoutPropertiesLoose8 = __toESM(require_objectWithoutPropertiesLoose());
2946
2931
  var _excluded8 = ["prefixCls", "className", "color", "colors", "style", "rectProps", "onChange", "addonAfter", "addonBefore", "rectRender"];
2947
- var Swatch = /* @__PURE__ */ React25__default.forwardRef((props, ref) => {
2948
- var {
2949
- prefixCls = "w-color-swatch",
2950
- className,
2951
- color: color2,
2952
- colors = [],
2953
- style,
2954
- rectProps = {},
2955
- onChange,
2956
- addonAfter,
2957
- addonBefore,
2958
- rectRender
2959
- } = props, other = (0, import_objectWithoutPropertiesLoose8.default)(props, _excluded8);
2932
+ var Swatch = /* @__PURE__ */ React26__default.forwardRef((props, ref) => {
2933
+ var _props$prefixCls = props.prefixCls, prefixCls = _props$prefixCls === void 0 ? "w-color-swatch" : _props$prefixCls, className = props.className, color2 = props.color, _props$colors = props.colors, colors = _props$colors === void 0 ? [] : _props$colors, style = props.style, _props$rectProps = props.rectProps, rectProps = _props$rectProps === void 0 ? {} : _props$rectProps, onChange = props.onChange, addonAfter = props.addonAfter, addonBefore = props.addonBefore, rectRender = props.rectRender, other = (0, import_objectWithoutPropertiesLoose8.default)(props, _excluded8);
2960
2934
  var rectStyle = (0, import_extends9.default)({
2961
2935
  "--swatch-background-color": "rgb(144, 19, 254)",
2962
2936
  background: "var(--swatch-background-color)",
@@ -2981,7 +2955,7 @@ var Swatch = /* @__PURE__ */ React25__default.forwardRef((props, ref) => {
2981
2955
  flexWrap: "wrap",
2982
2956
  position: "relative"
2983
2957
  }, style),
2984
- children: [addonBefore && /* @__PURE__ */ React25__default.isValidElement(addonBefore) && addonBefore, colors && Array.isArray(colors) && colors.map((item, idx) => {
2958
+ children: [addonBefore && /* @__PURE__ */ React26__default.isValidElement(addonBefore) && addonBefore, colors && Array.isArray(colors) && colors.map((item, idx) => {
2985
2959
  var title = "";
2986
2960
  var background = "";
2987
2961
  if (typeof item === "string") {
@@ -3007,7 +2981,7 @@ var Swatch = /* @__PURE__ */ React25__default.forwardRef((props, ref) => {
3007
2981
  children: render
3008
2982
  }, idx);
3009
2983
  }
3010
- var child = rectProps.children && /* @__PURE__ */ React25__default.isValidElement(rectProps.children) ? /* @__PURE__ */ React25__default.cloneElement(rectProps.children, {
2984
+ var child = rectProps.children && /* @__PURE__ */ React26__default.isValidElement(rectProps.children) ? /* @__PURE__ */ React26__default.cloneElement(rectProps.children, {
3011
2985
  color: background,
3012
2986
  checked
3013
2987
  }) : null;
@@ -3021,7 +2995,7 @@ var Swatch = /* @__PURE__ */ React25__default.forwardRef((props, ref) => {
3021
2995
  background
3022
2996
  })
3023
2997
  }), idx);
3024
- }), addonAfter && /* @__PURE__ */ React25__default.isValidElement(addonAfter) && addonAfter]
2998
+ }), addonAfter && /* @__PURE__ */ React26__default.isValidElement(addonAfter) && addonAfter]
3025
2999
  }));
3026
3000
  });
3027
3001
  Swatch.displayName = "Swatch";
@@ -3040,24 +3014,14 @@ var Bar = (props) => /* @__PURE__ */ jsx("div", {
3040
3014
  backgroundColor: "#fff"
3041
3015
  }
3042
3016
  });
3043
- var Sketch = /* @__PURE__ */ React25__default.forwardRef((props, ref) => {
3044
- var {
3045
- prefixCls = "w-color-sketch",
3046
- className,
3047
- onChange,
3048
- width = 218,
3049
- presetColors = PRESET_COLORS,
3050
- color: color2,
3051
- editableDisable = true,
3052
- disableAlpha = false,
3053
- style
3054
- } = props, other = (0, import_objectWithoutPropertiesLoose9.default)(props, _excluded9);
3055
- var [hsva, setHsva] = useState({
3017
+ var Sketch = /* @__PURE__ */ React26__default.forwardRef((props, ref) => {
3018
+ var _props$prefixCls = props.prefixCls, prefixCls = _props$prefixCls === void 0 ? "w-color-sketch" : _props$prefixCls, className = props.className, onChange = props.onChange, _props$width = props.width, width = _props$width === void 0 ? 218 : _props$width, _props$presetColors = props.presetColors, presetColors = _props$presetColors === void 0 ? PRESET_COLORS : _props$presetColors, color2 = props.color, _props$editableDisabl = props.editableDisable, editableDisable = _props$editableDisabl === void 0 ? true : _props$editableDisabl, _props$disableAlpha = props.disableAlpha, disableAlpha = _props$disableAlpha === void 0 ? false : _props$disableAlpha, style = props.style, other = (0, import_objectWithoutPropertiesLoose9.default)(props, _excluded9);
3019
+ var _useState = useState({
3056
3020
  h: 209,
3057
3021
  s: 36,
3058
3022
  v: 90,
3059
3023
  a: 1
3060
- });
3024
+ }), hsva = _useState[0], setHsva = _useState[1];
3061
3025
  useEffect(() => {
3062
3026
  if (typeof color2 === "string" && validHex(color2)) {
3063
3027
  setHsva(hexToHsva(color2));
@@ -3291,19 +3255,19 @@ var Toolbar = ({
3291
3255
  on_attachments_change,
3292
3256
  disabled = false
3293
3257
  }) => {
3294
- const [link_url, set_link_url] = React25.useState("https://");
3295
- const [link_popover_open, set_link_popover_open] = React25.useState(false);
3296
- const [text_color_open, set_text_color_open] = React25.useState(false);
3297
- const [highlight_color_open, set_highlight_color_open] = React25.useState(false);
3298
- const [variables_menu_open, set_variables_menu_open] = React25.useState(false);
3299
- const [table_menu_open, set_table_menu_open] = React25.useState(false);
3300
- const [text_color, set_text_color] = React25.useState("#000000");
3301
- const [highlight_color, set_highlight_color] = React25.useState("#ffff00");
3302
- const [table_rows, set_table_rows] = React25.useState(3);
3303
- const [table_cols, set_table_cols] = React25.useState(3);
3304
- const [hovered_cell, set_hovered_cell] = React25.useState(null);
3305
- const file_input_ref = React25.useRef(null);
3306
- const image_input_ref = React25.useRef(null);
3258
+ const [link_url, set_link_url] = React26.useState("https://");
3259
+ const [link_popover_open, set_link_popover_open] = React26.useState(false);
3260
+ const [text_color_open, set_text_color_open] = React26.useState(false);
3261
+ const [highlight_color_open, set_highlight_color_open] = React26.useState(false);
3262
+ const [variables_menu_open, set_variables_menu_open] = React26.useState(false);
3263
+ const [table_menu_open, set_table_menu_open] = React26.useState(false);
3264
+ const [text_color, set_text_color] = React26.useState("#000000");
3265
+ const [highlight_color, set_highlight_color] = React26.useState("#ffff00");
3266
+ const [table_rows, set_table_rows] = React26.useState(3);
3267
+ const [table_cols, set_table_cols] = React26.useState(3);
3268
+ const [hovered_cell, set_hovered_cell] = React26.useState(null);
3269
+ const file_input_ref = React26.useRef(null);
3270
+ const image_input_ref = React26.useRef(null);
3307
3271
  if (!editor) {
3308
3272
  return null;
3309
3273
  }
@@ -4236,7 +4200,7 @@ var VariableExtension = Node.create({
4236
4200
  }
4237
4201
  });
4238
4202
  var Tabs = TabsPrimitive.Root;
4239
- var TabsList = React25.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
4203
+ var TabsList = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
4240
4204
  TabsPrimitive.List,
4241
4205
  {
4242
4206
  ref,
@@ -4248,7 +4212,7 @@ var TabsList = React25.forwardRef(({ className, ...props }, ref) => /* @__PURE__
4248
4212
  }
4249
4213
  ));
4250
4214
  TabsList.displayName = TabsPrimitive.List.displayName;
4251
- var TabsTrigger = React25.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
4215
+ var TabsTrigger = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
4252
4216
  TabsPrimitive.Trigger,
4253
4217
  {
4254
4218
  ref,
@@ -4260,7 +4224,7 @@ var TabsTrigger = React25.forwardRef(({ className, ...props }, ref) => /* @__PUR
4260
4224
  }
4261
4225
  ));
4262
4226
  TabsTrigger.displayName = TabsPrimitive.Trigger.displayName;
4263
- var TabsContent = React25.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
4227
+ var TabsContent = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
4264
4228
  TabsPrimitive.Content,
4265
4229
  {
4266
4230
  ref,
@@ -4295,14 +4259,14 @@ var HazoUiRte = ({
4295
4259
  className,
4296
4260
  show_output_viewer = false
4297
4261
  }) => {
4298
- const [attachments, set_attachments] = React25.useState(
4262
+ const [attachments, set_attachments] = React26.useState(
4299
4263
  initial_attachments
4300
4264
  );
4301
- const [active_tab, set_active_tab] = React25.useState("html");
4265
+ const [active_tab, set_active_tab] = React26.useState("html");
4302
4266
  const is_view_only = active_tab !== "html";
4303
- const attachments_ref = React25.useRef(attachments);
4267
+ const attachments_ref = React26.useRef(attachments);
4304
4268
  attachments_ref.current = attachments;
4305
- const debounced_on_change = React25.useMemo(
4269
+ const debounced_on_change = React26.useMemo(
4306
4270
  () => debounce_fn((output) => {
4307
4271
  if (on_change) {
4308
4272
  on_change(output);
@@ -4401,7 +4365,7 @@ var HazoUiRte = ({
4401
4365
  debounced_on_change(output);
4402
4366
  }
4403
4367
  });
4404
- React25.useEffect(() => {
4368
+ React26.useEffect(() => {
4405
4369
  if (editor && html !== void 0) {
4406
4370
  const current_html = editor.getHTML();
4407
4371
  if (html !== current_html && !editor.isFocused) {
@@ -4409,21 +4373,21 @@ var HazoUiRte = ({
4409
4373
  }
4410
4374
  }
4411
4375
  }, [html, editor]);
4412
- React25.useEffect(() => {
4376
+ React26.useEffect(() => {
4413
4377
  if (editor) {
4414
4378
  editor.setEditable(!disabled);
4415
4379
  }
4416
4380
  }, [disabled, editor]);
4417
- const attachments_from_props_ref = React25.useRef(false);
4418
- const prev_initial_attachments_ref = React25.useRef(initial_attachments);
4419
- React25.useEffect(() => {
4381
+ const attachments_from_props_ref = React26.useRef(false);
4382
+ const prev_initial_attachments_ref = React26.useRef(initial_attachments);
4383
+ React26.useEffect(() => {
4420
4384
  if (JSON.stringify(initial_attachments) !== JSON.stringify(prev_initial_attachments_ref.current)) {
4421
4385
  prev_initial_attachments_ref.current = initial_attachments;
4422
4386
  attachments_from_props_ref.current = true;
4423
4387
  set_attachments(initial_attachments);
4424
4388
  }
4425
4389
  }, [initial_attachments]);
4426
- React25.useEffect(() => {
4390
+ React26.useEffect(() => {
4427
4391
  if (attachments_from_props_ref.current) {
4428
4392
  attachments_from_props_ref.current = false;
4429
4393
  return;
@@ -4925,12 +4889,12 @@ var CommandPopover = ({
4925
4889
  on_selection_change: _on_selection_change,
4926
4890
  prefix_color
4927
4891
  }) => {
4928
- const container_ref = React25.useRef(null);
4929
- const grouped_commands = React25.useMemo(
4892
+ const container_ref = React26.useRef(null);
4893
+ const grouped_commands = React26.useMemo(
4930
4894
  () => group_commands(commands),
4931
4895
  [commands]
4932
4896
  );
4933
- React25.useEffect(() => {
4897
+ React26.useEffect(() => {
4934
4898
  const handle_click_outside = (e) => {
4935
4899
  if (container_ref.current && !container_ref.current.contains(e.target)) {
4936
4900
  on_close();
@@ -4943,8 +4907,8 @@ var CommandPopover = ({
4943
4907
  };
4944
4908
  }
4945
4909
  }, [is_open, on_close]);
4946
- const [mounted, set_mounted] = React25.useState(false);
4947
- React25.useEffect(() => {
4910
+ const [mounted, set_mounted] = React26.useState(false);
4911
+ React26.useEffect(() => {
4948
4912
  set_mounted(true);
4949
4913
  }, []);
4950
4914
  if (!is_open || !mounted) return null;
@@ -5254,21 +5218,21 @@ var HazoUiTextbox = ({
5254
5218
  on_command_change,
5255
5219
  on_command_remove
5256
5220
  }) => {
5257
- const generated_instance_id = React25.useId();
5221
+ const generated_instance_id = React26.useId();
5258
5222
  const instance_id = provided_instance_id || generated_instance_id;
5259
- const [suggestion_state, set_suggestion_state] = React25.useState(null);
5260
- const [selected_index, set_selected_index] = React25.useState(0);
5261
- const [popover_position, set_popover_position] = React25.useState({ top: 0, left: 0 });
5262
- const [edit_context, set_edit_context] = React25.useState(null);
5263
- const [edit_selected_index, set_edit_selected_index] = React25.useState(0);
5223
+ const [suggestion_state, set_suggestion_state] = React26.useState(null);
5224
+ const [selected_index, set_selected_index] = React26.useState(0);
5225
+ const [popover_position, set_popover_position] = React26.useState({ top: 0, left: 0 });
5226
+ const [edit_context, set_edit_context] = React26.useState(null);
5227
+ const [edit_selected_index, set_edit_selected_index] = React26.useState(0);
5264
5228
  const is_controlled = value !== void 0;
5265
- const editor_container_ref = React25.useRef(null);
5266
- const edit_popover_ref = React25.useRef(null);
5267
- const [mounted, set_mounted] = React25.useState(false);
5268
- React25.useEffect(() => {
5229
+ const editor_container_ref = React26.useRef(null);
5230
+ const edit_popover_ref = React26.useRef(null);
5231
+ const [mounted, set_mounted] = React26.useState(false);
5232
+ React26.useEffect(() => {
5269
5233
  set_mounted(true);
5270
5234
  }, []);
5271
- const suggestion_extensions = React25.useMemo(() => {
5235
+ const suggestion_extensions = React26.useMemo(() => {
5272
5236
  return create_command_suggestion_extension({
5273
5237
  prefixes,
5274
5238
  instance_id,
@@ -5319,7 +5283,7 @@ var HazoUiTextbox = ({
5319
5283
  }
5320
5284
  }
5321
5285
  });
5322
- React25.useEffect(() => {
5286
+ React26.useEffect(() => {
5323
5287
  if (suggestion_state?.is_active && editor) {
5324
5288
  requestAnimationFrame(() => {
5325
5289
  const { from } = suggestion_state.range;
@@ -5343,7 +5307,7 @@ var HazoUiTextbox = ({
5343
5307
  });
5344
5308
  }
5345
5309
  }, [suggestion_state, editor]);
5346
- React25.useEffect(() => {
5310
+ React26.useEffect(() => {
5347
5311
  if (is_controlled && editor && !editor.isFocused) {
5348
5312
  const current_text = editor.getText();
5349
5313
  if (value !== current_text) {
@@ -5352,12 +5316,12 @@ var HazoUiTextbox = ({
5352
5316
  }
5353
5317
  }
5354
5318
  }, [value, editor, is_controlled, prefixes, pill_variant]);
5355
- React25.useEffect(() => {
5319
+ React26.useEffect(() => {
5356
5320
  if (editor) {
5357
5321
  editor.setEditable(!disabled);
5358
5322
  }
5359
5323
  }, [disabled, editor]);
5360
- const handle_command_select = React25.useCallback(
5324
+ const handle_command_select = React26.useCallback(
5361
5325
  (command) => {
5362
5326
  if (!editor || !suggestion_state) return;
5363
5327
  const prefix_config = prefixes.find((p) => p.char === suggestion_state.prefix);
@@ -5377,15 +5341,15 @@ var HazoUiTextbox = ({
5377
5341
  },
5378
5342
  [editor, suggestion_state, pill_variant, on_command_insert, prefixes]
5379
5343
  );
5380
- const handle_popover_close = React25.useCallback(() => {
5344
+ const handle_popover_close = React26.useCallback(() => {
5381
5345
  set_suggestion_state(null);
5382
5346
  editor?.commands.focus();
5383
5347
  }, [editor]);
5384
- const handle_edit_close = React25.useCallback(() => {
5348
+ const handle_edit_close = React26.useCallback(() => {
5385
5349
  set_edit_context(null);
5386
5350
  editor?.commands.focus();
5387
5351
  }, [editor]);
5388
- const handle_command_update = React25.useCallback(
5352
+ const handle_command_update = React26.useCallback(
5389
5353
  (new_command) => {
5390
5354
  if (!editor || !edit_context) return;
5391
5355
  const old_command = edit_context.command;
@@ -5401,7 +5365,7 @@ var HazoUiTextbox = ({
5401
5365
  },
5402
5366
  [editor, edit_context, on_command_change]
5403
5367
  );
5404
- const handle_command_remove = React25.useCallback(() => {
5368
+ const handle_command_remove = React26.useCallback(() => {
5405
5369
  if (!editor || !edit_context) return;
5406
5370
  const command = edit_context.command;
5407
5371
  editor.state.doc.descendants((node, pos) => {
@@ -5415,7 +5379,7 @@ var HazoUiTextbox = ({
5415
5379
  }
5416
5380
  set_edit_context(null);
5417
5381
  }, [editor, edit_context, on_command_remove]);
5418
- const filtered_commands = React25.useMemo(() => {
5382
+ const filtered_commands = React26.useMemo(() => {
5419
5383
  if (!suggestion_state) return [];
5420
5384
  const query = suggestion_state.query.toLowerCase();
5421
5385
  if (!query) return suggestion_state.commands;
@@ -5423,7 +5387,7 @@ var HazoUiTextbox = ({
5423
5387
  (cmd) => cmd.action_label.toLowerCase().includes(query) || cmd.action.toLowerCase().includes(query) || cmd.action_description?.toLowerCase().includes(query)
5424
5388
  );
5425
5389
  }, [suggestion_state]);
5426
- React25.useEffect(() => {
5390
+ React26.useEffect(() => {
5427
5391
  if (!suggestion_state?.is_active) return;
5428
5392
  const handle_keydown = (e) => {
5429
5393
  switch (e.key) {
@@ -5458,7 +5422,7 @@ var HazoUiTextbox = ({
5458
5422
  handle_command_select,
5459
5423
  handle_popover_close
5460
5424
  ]);
5461
- React25.useEffect(() => {
5425
+ React26.useEffect(() => {
5462
5426
  if (!edit_context) return;
5463
5427
  const handle_click_outside = (e) => {
5464
5428
  if (edit_popover_ref.current && !edit_popover_ref.current.contains(e.target)) {
@@ -5473,12 +5437,12 @@ var HazoUiTextbox = ({
5473
5437
  document.removeEventListener("mousedown", handle_click_outside);
5474
5438
  };
5475
5439
  }, [edit_context]);
5476
- const edit_commands = React25.useMemo(() => {
5440
+ const edit_commands = React26.useMemo(() => {
5477
5441
  if (!edit_context) return [];
5478
5442
  const prefix_config = prefixes.find((p) => p.char === edit_context.command.prefix);
5479
5443
  return prefix_config?.commands || [];
5480
5444
  }, [edit_context, prefixes]);
5481
- React25.useEffect(() => {
5445
+ React26.useEffect(() => {
5482
5446
  if (!edit_context) return;
5483
5447
  const handle_keydown = (e) => {
5484
5448
  switch (e.key) {
@@ -5516,7 +5480,7 @@ var HazoUiTextbox = ({
5516
5480
  handle_command_remove,
5517
5481
  handle_edit_close
5518
5482
  ]);
5519
- React25.useEffect(() => {
5483
+ React26.useEffect(() => {
5520
5484
  const handle_pill_click = (e) => {
5521
5485
  const detail = e.detail;
5522
5486
  const { id, prefix, action, action_label, node_pos } = detail;
@@ -5799,22 +5763,22 @@ var HazoUiTextarea = ({
5799
5763
  on_command_change,
5800
5764
  on_command_remove
5801
5765
  }) => {
5802
- const generated_instance_id = React25.useId();
5766
+ const generated_instance_id = React26.useId();
5803
5767
  const instance_id = provided_instance_id || generated_instance_id;
5804
- const [suggestion_state, set_suggestion_state] = React25.useState(null);
5805
- const [selected_index, set_selected_index] = React25.useState(0);
5806
- const [popover_position, set_popover_position] = React25.useState({ top: 0, left: 0 });
5807
- const [edit_context, set_edit_context] = React25.useState(null);
5808
- const [edit_selected_index, set_edit_selected_index] = React25.useState(0);
5768
+ const [suggestion_state, set_suggestion_state] = React26.useState(null);
5769
+ const [selected_index, set_selected_index] = React26.useState(0);
5770
+ const [popover_position, set_popover_position] = React26.useState({ top: 0, left: 0 });
5771
+ const [edit_context, set_edit_context] = React26.useState(null);
5772
+ const [edit_selected_index, set_edit_selected_index] = React26.useState(0);
5809
5773
  const is_controlled = value !== void 0;
5810
- const editor_container_ref = React25.useRef(null);
5811
- const edit_popover_ref = React25.useRef(null);
5812
- const [mounted, set_mounted] = React25.useState(false);
5813
- React25.useEffect(() => {
5774
+ const editor_container_ref = React26.useRef(null);
5775
+ const edit_popover_ref = React26.useRef(null);
5776
+ const [mounted, set_mounted] = React26.useState(false);
5777
+ React26.useEffect(() => {
5814
5778
  set_mounted(true);
5815
5779
  }, []);
5816
5780
  const calculated_min_height = rows ? `${rows * 1.5}em` : min_height;
5817
- const suggestion_extensions = React25.useMemo(() => {
5781
+ const suggestion_extensions = React26.useMemo(() => {
5818
5782
  return create_command_suggestion_extension({
5819
5783
  prefixes,
5820
5784
  instance_id,
@@ -5863,7 +5827,7 @@ var HazoUiTextarea = ({
5863
5827
  }
5864
5828
  }
5865
5829
  });
5866
- React25.useEffect(() => {
5830
+ React26.useEffect(() => {
5867
5831
  if (suggestion_state?.is_active && editor) {
5868
5832
  requestAnimationFrame(() => {
5869
5833
  const { from } = suggestion_state.range;
@@ -5887,7 +5851,7 @@ var HazoUiTextarea = ({
5887
5851
  });
5888
5852
  }
5889
5853
  }, [suggestion_state, editor]);
5890
- React25.useEffect(() => {
5854
+ React26.useEffect(() => {
5891
5855
  if (is_controlled && editor && !editor.isFocused) {
5892
5856
  const current_text = editor.getText();
5893
5857
  if (value !== current_text) {
@@ -5900,12 +5864,12 @@ var HazoUiTextarea = ({
5900
5864
  }
5901
5865
  }
5902
5866
  }, [value, editor, is_controlled, prefixes, pill_variant]);
5903
- React25.useEffect(() => {
5867
+ React26.useEffect(() => {
5904
5868
  if (editor) {
5905
5869
  editor.setEditable(!disabled);
5906
5870
  }
5907
5871
  }, [disabled, editor]);
5908
- const handle_command_select = React25.useCallback(
5872
+ const handle_command_select = React26.useCallback(
5909
5873
  (command) => {
5910
5874
  if (!editor || !suggestion_state) return;
5911
5875
  const prefix_config = prefixes.find((p) => p.char === suggestion_state.prefix);
@@ -5925,15 +5889,15 @@ var HazoUiTextarea = ({
5925
5889
  },
5926
5890
  [editor, suggestion_state, pill_variant, on_command_insert, prefixes]
5927
5891
  );
5928
- const handle_popover_close = React25.useCallback(() => {
5892
+ const handle_popover_close = React26.useCallback(() => {
5929
5893
  set_suggestion_state(null);
5930
5894
  editor?.commands.focus();
5931
5895
  }, [editor]);
5932
- const handle_edit_close = React25.useCallback(() => {
5896
+ const handle_edit_close = React26.useCallback(() => {
5933
5897
  set_edit_context(null);
5934
5898
  editor?.commands.focus();
5935
5899
  }, [editor]);
5936
- const handle_command_update = React25.useCallback(
5900
+ const handle_command_update = React26.useCallback(
5937
5901
  (new_command) => {
5938
5902
  if (!editor || !edit_context) return;
5939
5903
  const old_command = edit_context.command;
@@ -5949,7 +5913,7 @@ var HazoUiTextarea = ({
5949
5913
  },
5950
5914
  [editor, edit_context, on_command_change]
5951
5915
  );
5952
- const handle_command_remove = React25.useCallback(() => {
5916
+ const handle_command_remove = React26.useCallback(() => {
5953
5917
  if (!editor || !edit_context) return;
5954
5918
  const command = edit_context.command;
5955
5919
  editor.state.doc.descendants((node, pos) => {
@@ -5963,7 +5927,7 @@ var HazoUiTextarea = ({
5963
5927
  }
5964
5928
  set_edit_context(null);
5965
5929
  }, [editor, edit_context, on_command_remove]);
5966
- const filtered_commands = React25.useMemo(() => {
5930
+ const filtered_commands = React26.useMemo(() => {
5967
5931
  if (!suggestion_state) return [];
5968
5932
  const query = suggestion_state.query.toLowerCase();
5969
5933
  if (!query) return suggestion_state.commands;
@@ -5971,7 +5935,7 @@ var HazoUiTextarea = ({
5971
5935
  (cmd) => cmd.action_label.toLowerCase().includes(query) || cmd.action.toLowerCase().includes(query) || cmd.action_description?.toLowerCase().includes(query)
5972
5936
  );
5973
5937
  }, [suggestion_state]);
5974
- React25.useEffect(() => {
5938
+ React26.useEffect(() => {
5975
5939
  if (!suggestion_state?.is_active) return;
5976
5940
  const handle_keydown = (e) => {
5977
5941
  switch (e.key) {
@@ -6006,7 +5970,7 @@ var HazoUiTextarea = ({
6006
5970
  handle_command_select,
6007
5971
  handle_popover_close
6008
5972
  ]);
6009
- React25.useEffect(() => {
5973
+ React26.useEffect(() => {
6010
5974
  if (!edit_context) return;
6011
5975
  const handle_click_outside = (e) => {
6012
5976
  if (edit_popover_ref.current && !edit_popover_ref.current.contains(e.target)) {
@@ -6021,12 +5985,12 @@ var HazoUiTextarea = ({
6021
5985
  document.removeEventListener("mousedown", handle_click_outside);
6022
5986
  };
6023
5987
  }, [edit_context]);
6024
- const edit_commands = React25.useMemo(() => {
5988
+ const edit_commands = React26.useMemo(() => {
6025
5989
  if (!edit_context) return [];
6026
5990
  const prefix_config = prefixes.find((p) => p.char === edit_context.command.prefix);
6027
5991
  return prefix_config?.commands || [];
6028
5992
  }, [edit_context, prefixes]);
6029
- React25.useEffect(() => {
5993
+ React26.useEffect(() => {
6030
5994
  if (!edit_context) return;
6031
5995
  const handle_keydown = (e) => {
6032
5996
  switch (e.key) {
@@ -6064,7 +6028,7 @@ var HazoUiTextarea = ({
6064
6028
  handle_command_remove,
6065
6029
  handle_edit_close
6066
6030
  ]);
6067
- React25.useEffect(() => {
6031
+ React26.useEffect(() => {
6068
6032
  const handle_pill_click = (e) => {
6069
6033
  const detail = e.detail;
6070
6034
  const { id, prefix, action, action_label, node_pos } = detail;
@@ -6611,7 +6575,7 @@ function HazoUiConfirmDialog({
6611
6575
  openAnimation = "zoom",
6612
6576
  closeAnimation = "zoom"
6613
6577
  }) {
6614
- const [internal_loading, set_internal_loading] = React25.useState(false);
6578
+ const [internal_loading, set_internal_loading] = React26.useState(false);
6615
6579
  const config = get_hazo_ui_config();
6616
6580
  const variant_preset = variant !== "default" ? CONFIRM_VARIANT_PRESETS[variant] : void 0;
6617
6581
  const is_loading = external_loading ?? internal_loading;
@@ -6648,7 +6612,7 @@ function HazoUiConfirmDialog({
6648
6612
  onCancel?.();
6649
6613
  onOpenChange(false);
6650
6614
  };
6651
- const cancel_ref = React25.useRef(null);
6615
+ const cancel_ref = React26.useRef(null);
6652
6616
  return /* @__PURE__ */ jsx(Dialog, { open, onOpenChange, children: /* @__PURE__ */ jsxs(DialogPortal, { children: [
6653
6617
  /* @__PURE__ */ jsx(
6654
6618
  DialogOverlay,
@@ -6733,7 +6697,7 @@ Drawer.displayName = "Drawer";
6733
6697
  var DrawerTrigger = Drawer$1.Trigger;
6734
6698
  var DrawerPortal = Drawer$1.Portal;
6735
6699
  var DrawerClose = Drawer$1.Close;
6736
- var DrawerOverlay = React25.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
6700
+ var DrawerOverlay = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
6737
6701
  Drawer$1.Overlay,
6738
6702
  {
6739
6703
  ref,
@@ -6745,7 +6709,7 @@ var DrawerOverlay = React25.forwardRef(({ className, ...props }, ref) => /* @__P
6745
6709
  }
6746
6710
  ));
6747
6711
  DrawerOverlay.displayName = "DrawerOverlay";
6748
- var DrawerContent = React25.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(DrawerPortal, { children: [
6712
+ var DrawerContent = React26.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(DrawerPortal, { children: [
6749
6713
  /* @__PURE__ */ jsx(DrawerOverlay, {}),
6750
6714
  /* @__PURE__ */ jsxs(
6751
6715
  Drawer$1.Content,
@@ -6786,7 +6750,7 @@ var DrawerFooter = ({
6786
6750
  }
6787
6751
  );
6788
6752
  DrawerFooter.displayName = "DrawerFooter";
6789
- var DrawerTitle = React25.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
6753
+ var DrawerTitle = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
6790
6754
  Drawer$1.Title,
6791
6755
  {
6792
6756
  ref,
@@ -6798,7 +6762,7 @@ var DrawerTitle = React25.forwardRef(({ className, ...props }, ref) => /* @__PUR
6798
6762
  }
6799
6763
  ));
6800
6764
  DrawerTitle.displayName = "DrawerTitle";
6801
- var DrawerDescription = React25.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
6765
+ var DrawerDescription = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
6802
6766
  Drawer$1.Description,
6803
6767
  {
6804
6768
  ref,
@@ -6808,14 +6772,14 @@ var DrawerDescription = React25.forwardRef(({ className, ...props }, ref) => /*
6808
6772
  ));
6809
6773
  DrawerDescription.displayName = "DrawerDescription";
6810
6774
  function useMediaQuery(query) {
6811
- const get_match = React25.useCallback(() => {
6775
+ const get_match = React26.useCallback(() => {
6812
6776
  if (typeof window === "undefined" || typeof window.matchMedia !== "function") {
6813
6777
  return false;
6814
6778
  }
6815
6779
  return window.matchMedia(query).matches;
6816
6780
  }, [query]);
6817
- const [matches, set_matches] = React25.useState(false);
6818
- React25.useEffect(() => {
6781
+ const [matches, set_matches] = React26.useState(false);
6782
+ React26.useEffect(() => {
6819
6783
  if (typeof window === "undefined" || typeof window.matchMedia !== "function") {
6820
6784
  return;
6821
6785
  }
@@ -6832,7 +6796,7 @@ function useMediaQuery(query) {
6832
6796
  return matches;
6833
6797
  }
6834
6798
  var Accordion = AccordionPrimitive.Root;
6835
- var AccordionItem = React25.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
6799
+ var AccordionItem = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
6836
6800
  AccordionPrimitive.Item,
6837
6801
  {
6838
6802
  ref,
@@ -6841,7 +6805,7 @@ var AccordionItem = React25.forwardRef(({ className, ...props }, ref) => /* @__P
6841
6805
  }
6842
6806
  ));
6843
6807
  AccordionItem.displayName = "AccordionItem";
6844
- var AccordionTrigger = React25.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx(AccordionPrimitive.Header, { className: "flex", children: /* @__PURE__ */ jsxs(
6808
+ var AccordionTrigger = React26.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx(AccordionPrimitive.Header, { className: "flex", children: /* @__PURE__ */ jsxs(
6845
6809
  AccordionPrimitive.Trigger,
6846
6810
  {
6847
6811
  ref,
@@ -6857,7 +6821,7 @@ var AccordionTrigger = React25.forwardRef(({ className, children, ...props }, re
6857
6821
  }
6858
6822
  ) }));
6859
6823
  AccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName;
6860
- var AccordionContent = React25.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx(
6824
+ var AccordionContent = React26.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx(
6861
6825
  AccordionPrimitive.Content,
6862
6826
  {
6863
6827
  ref,
@@ -6867,7 +6831,7 @@ var AccordionContent = React25.forwardRef(({ className, children, ...props }, re
6867
6831
  }
6868
6832
  ));
6869
6833
  AccordionContent.displayName = AccordionPrimitive.Content.displayName;
6870
- var Checkbox = React25.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
6834
+ var Checkbox = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
6871
6835
  CheckboxPrimitive.Root,
6872
6836
  {
6873
6837
  ref,
@@ -6892,7 +6856,7 @@ var DropdownMenuGroup = DropdownMenuPrimitive.Group;
6892
6856
  var DropdownMenuPortal = DropdownMenuPrimitive.Portal;
6893
6857
  var DropdownMenuSub = DropdownMenuPrimitive.Sub;
6894
6858
  var DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
6895
- var DropdownMenuSubTrigger = React25.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxs(
6859
+ var DropdownMenuSubTrigger = React26.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxs(
6896
6860
  DropdownMenuPrimitive.SubTrigger,
6897
6861
  {
6898
6862
  ref,
@@ -6909,7 +6873,7 @@ var DropdownMenuSubTrigger = React25.forwardRef(({ className, inset, children, .
6909
6873
  }
6910
6874
  ));
6911
6875
  DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;
6912
- var DropdownMenuSubContent = React25.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
6876
+ var DropdownMenuSubContent = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
6913
6877
  DropdownMenuPrimitive.SubContent,
6914
6878
  {
6915
6879
  ref,
@@ -6921,7 +6885,7 @@ var DropdownMenuSubContent = React25.forwardRef(({ className, ...props }, ref) =
6921
6885
  }
6922
6886
  ));
6923
6887
  DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;
6924
- var DropdownMenuContent = React25.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx(
6888
+ var DropdownMenuContent = React26.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx(
6925
6889
  DropdownMenuPrimitive.Content,
6926
6890
  {
6927
6891
  ref,
@@ -6934,7 +6898,7 @@ var DropdownMenuContent = React25.forwardRef(({ className, sideOffset = 4, ...pr
6934
6898
  }
6935
6899
  ) }));
6936
6900
  DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
6937
- var DropdownMenuItem = React25.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(
6901
+ var DropdownMenuItem = React26.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(
6938
6902
  DropdownMenuPrimitive.Item,
6939
6903
  {
6940
6904
  ref,
@@ -6947,7 +6911,7 @@ var DropdownMenuItem = React25.forwardRef(({ className, inset, ...props }, ref)
6947
6911
  }
6948
6912
  ));
6949
6913
  DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
6950
- var DropdownMenuCheckboxItem = React25.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ jsxs(
6914
+ var DropdownMenuCheckboxItem = React26.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ jsxs(
6951
6915
  DropdownMenuPrimitive.CheckboxItem,
6952
6916
  {
6953
6917
  ref,
@@ -6964,7 +6928,7 @@ var DropdownMenuCheckboxItem = React25.forwardRef(({ className, children, checke
6964
6928
  }
6965
6929
  ));
6966
6930
  DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;
6967
- var DropdownMenuRadioItem = React25.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
6931
+ var DropdownMenuRadioItem = React26.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
6968
6932
  DropdownMenuPrimitive.RadioItem,
6969
6933
  {
6970
6934
  ref,
@@ -6980,7 +6944,7 @@ var DropdownMenuRadioItem = React25.forwardRef(({ className, children, ...props
6980
6944
  }
6981
6945
  ));
6982
6946
  DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;
6983
- var DropdownMenuLabel = React25.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(
6947
+ var DropdownMenuLabel = React26.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(
6984
6948
  DropdownMenuPrimitive.Label,
6985
6949
  {
6986
6950
  ref,
@@ -6993,7 +6957,7 @@ var DropdownMenuLabel = React25.forwardRef(({ className, inset, ...props }, ref)
6993
6957
  }
6994
6958
  ));
6995
6959
  DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
6996
- var DropdownMenuSeparator = React25.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
6960
+ var DropdownMenuSeparator = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
6997
6961
  DropdownMenuPrimitive.Separator,
6998
6962
  {
6999
6963
  ref,
@@ -7017,7 +6981,7 @@ var DropdownMenuShortcut = ({
7017
6981
  DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
7018
6982
  var HoverCard = HoverCardPrimitive.Root;
7019
6983
  var HoverCardTrigger = HoverCardPrimitive.Trigger;
7020
- var HoverCardContent = React25.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(
6984
+ var HoverCardContent = React26.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(
7021
6985
  HoverCardPrimitive.Content,
7022
6986
  {
7023
6987
  ref,
@@ -7031,7 +6995,7 @@ var HoverCardContent = React25.forwardRef(({ className, align = "center", sideOf
7031
6995
  }
7032
6996
  ));
7033
6997
  HoverCardContent.displayName = HoverCardPrimitive.Content.displayName;
7034
- var Label3 = React25.forwardRef(
6998
+ var Label3 = React26.forwardRef(
7035
6999
  ({ className, ...props }, ref) => {
7036
7000
  return /* @__PURE__ */ jsx(
7037
7001
  "label",
@@ -7047,7 +7011,7 @@ var Label3 = React25.forwardRef(
7047
7011
  }
7048
7012
  );
7049
7013
  Label3.displayName = "Label";
7050
- var Switch = React25.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
7014
+ var Switch = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
7051
7015
  SwitchPrimitives.Root,
7052
7016
  {
7053
7017
  className: cn(
@@ -7067,7 +7031,7 @@ var Switch = React25.forwardRef(({ className, ...props }, ref) => /* @__PURE__ *
7067
7031
  }
7068
7032
  ));
7069
7033
  Switch.displayName = SwitchPrimitives.Root.displayName;
7070
- var Textarea = React25.forwardRef(
7034
+ var Textarea = React26.forwardRef(
7071
7035
  ({ className, ...props }, ref) => {
7072
7036
  return /* @__PURE__ */ jsx(
7073
7037
  "textarea",
@@ -7087,7 +7051,7 @@ var Textarea = React25.forwardRef(
7087
7051
  }
7088
7052
  );
7089
7053
  Textarea.displayName = "Textarea";
7090
- var Separator3 = React25.forwardRef(({ className, orientation = "horizontal", decorative = true, ...props }, ref) => /* @__PURE__ */ jsx(
7054
+ var Separator3 = React26.forwardRef(({ className, orientation = "horizontal", decorative = true, ...props }, ref) => /* @__PURE__ */ jsx(
7091
7055
  SeparatorPrimitive.Root,
7092
7056
  {
7093
7057
  ref,
@@ -7105,7 +7069,7 @@ Separator3.displayName = SeparatorPrimitive.Root.displayName;
7105
7069
  var Collapsible = CollapsiblePrimitive.Root;
7106
7070
  var CollapsibleTrigger2 = CollapsiblePrimitive.CollapsibleTrigger;
7107
7071
  var CollapsibleContent2 = CollapsiblePrimitive.CollapsibleContent;
7108
- var ScrollArea = React25.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
7072
+ var ScrollArea = React26.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
7109
7073
  ScrollAreaPrimitive.Root,
7110
7074
  {
7111
7075
  ref,
@@ -7119,7 +7083,7 @@ var ScrollArea = React25.forwardRef(({ className, children, ...props }, ref) =>
7119
7083
  }
7120
7084
  ));
7121
7085
  ScrollArea.displayName = ScrollAreaPrimitive.Root.displayName;
7122
- var ScrollBar = React25.forwardRef(({ className, orientation = "vertical", ...props }, ref) => /* @__PURE__ */ jsx(
7086
+ var ScrollBar = React26.forwardRef(({ className, orientation = "vertical", ...props }, ref) => /* @__PURE__ */ jsx(
7123
7087
  ScrollAreaPrimitive.ScrollAreaScrollbar,
7124
7088
  {
7125
7089
  ref,
@@ -7135,27 +7099,27 @@ var ScrollBar = React25.forwardRef(({ className, orientation = "vertical", ...pr
7135
7099
  }
7136
7100
  ));
7137
7101
  ScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName;
7138
- var Card = React25.forwardRef(
7102
+ var Card = React26.forwardRef(
7139
7103
  ({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("rounded-lg border bg-card text-card-foreground shadow-sm", className), ...props })
7140
7104
  );
7141
7105
  Card.displayName = "Card";
7142
- var CardHeader = React25.forwardRef(
7106
+ var CardHeader = React26.forwardRef(
7143
7107
  ({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("flex flex-col space-y-1.5 p-6", className), ...props })
7144
7108
  );
7145
7109
  CardHeader.displayName = "CardHeader";
7146
- var CardTitle = React25.forwardRef(
7110
+ var CardTitle = React26.forwardRef(
7147
7111
  ({ className, ...props }, ref) => /* @__PURE__ */ jsx("h3", { ref, className: cn("text-2xl font-semibold leading-none tracking-tight", className), ...props })
7148
7112
  );
7149
7113
  CardTitle.displayName = "CardTitle";
7150
- var CardDescription = React25.forwardRef(
7114
+ var CardDescription = React26.forwardRef(
7151
7115
  ({ className, ...props }, ref) => /* @__PURE__ */ jsx("p", { ref, className: cn("text-sm text-muted-foreground", className), ...props })
7152
7116
  );
7153
7117
  CardDescription.displayName = "CardDescription";
7154
- var CardContent = React25.forwardRef(
7118
+ var CardContent = React26.forwardRef(
7155
7119
  ({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("p-6 pt-0", className), ...props })
7156
7120
  );
7157
7121
  CardContent.displayName = "CardContent";
7158
- var CardFooter = React25.forwardRef(
7122
+ var CardFooter = React26.forwardRef(
7159
7123
  ({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("flex items-center p-6 pt-0", className), ...props })
7160
7124
  );
7161
7125
  CardFooter.displayName = "CardFooter";
@@ -7188,16 +7152,16 @@ var toggleVariants = cva(
7188
7152
  defaultVariants: { variant: "default", size: "default" }
7189
7153
  }
7190
7154
  );
7191
- var Toggle = React25.forwardRef(({ className, variant, size, ...props }, ref) => /* @__PURE__ */ jsx(TogglePrimitive.Root, { ref, className: cn(toggleVariants({ variant, size, className })), ...props }));
7155
+ var Toggle = React26.forwardRef(({ className, variant, size, ...props }, ref) => /* @__PURE__ */ jsx(TogglePrimitive.Root, { ref, className: cn(toggleVariants({ variant, size, className })), ...props }));
7192
7156
  Toggle.displayName = TogglePrimitive.Root.displayName;
7193
- var ToggleGroupContext = React25.createContext({
7157
+ var ToggleGroupContext = React26.createContext({
7194
7158
  size: "default",
7195
7159
  variant: "default"
7196
7160
  });
7197
- var ToggleGroup = React25.forwardRef(({ className, variant, size, children, ...props }, ref) => /* @__PURE__ */ jsx(ToggleGroupPrimitive.Root, { ref, className: cn("flex items-center justify-center gap-1", className), ...props, children: /* @__PURE__ */ jsx(ToggleGroupContext.Provider, { value: { variant, size }, children }) }));
7161
+ var ToggleGroup = React26.forwardRef(({ className, variant, size, children, ...props }, ref) => /* @__PURE__ */ jsx(ToggleGroupPrimitive.Root, { ref, className: cn("flex items-center justify-center gap-1", className), ...props, children: /* @__PURE__ */ jsx(ToggleGroupContext.Provider, { value: { variant, size }, children }) }));
7198
7162
  ToggleGroup.displayName = ToggleGroupPrimitive.Root.displayName;
7199
- var ToggleGroupItem = React25.forwardRef(({ className, children, variant, size, ...props }, ref) => {
7200
- const context = React25.useContext(ToggleGroupContext);
7163
+ var ToggleGroupItem = React26.forwardRef(({ className, children, variant, size, ...props }, ref) => {
7164
+ const context = React26.useContext(ToggleGroupContext);
7201
7165
  return /* @__PURE__ */ jsx(
7202
7166
  ToggleGroupPrimitive.Item,
7203
7167
  {
@@ -7212,7 +7176,7 @@ ToggleGroupItem.displayName = ToggleGroupPrimitive.Item.displayName;
7212
7176
  var AlertDialog = AlertDialogPrimitive.Root;
7213
7177
  var AlertDialogTrigger = AlertDialogPrimitive.Trigger;
7214
7178
  var AlertDialogPortal = AlertDialogPrimitive.Portal;
7215
- var AlertDialogOverlay = React25.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
7179
+ var AlertDialogOverlay = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
7216
7180
  AlertDialogPrimitive.Overlay,
7217
7181
  {
7218
7182
  ref,
@@ -7221,7 +7185,7 @@ var AlertDialogOverlay = React25.forwardRef(({ className, ...props }, ref) => /*
7221
7185
  }
7222
7186
  ));
7223
7187
  AlertDialogOverlay.displayName = AlertDialogPrimitive.Overlay.displayName;
7224
- var AlertDialogContent = React25.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxs(AlertDialogPortal, { children: [
7188
+ var AlertDialogContent = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxs(AlertDialogPortal, { children: [
7225
7189
  /* @__PURE__ */ jsx(AlertDialogOverlay, {}),
7226
7190
  /* @__PURE__ */ jsx(
7227
7191
  AlertDialogPrimitive.Content,
@@ -7237,13 +7201,13 @@ var AlertDialogHeader = ({ className, ...props }) => /* @__PURE__ */ jsx("div",
7237
7201
  AlertDialogHeader.displayName = "AlertDialogHeader";
7238
7202
  var AlertDialogFooter = ({ className, ...props }) => /* @__PURE__ */ jsx("div", { className: cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", className), ...props });
7239
7203
  AlertDialogFooter.displayName = "AlertDialogFooter";
7240
- var AlertDialogTitle = React25.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(AlertDialogPrimitive.Title, { ref, className: cn("text-lg font-semibold", className), ...props }));
7204
+ var AlertDialogTitle = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(AlertDialogPrimitive.Title, { ref, className: cn("text-lg font-semibold", className), ...props }));
7241
7205
  AlertDialogTitle.displayName = AlertDialogPrimitive.Title.displayName;
7242
- var AlertDialogDescription = React25.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(AlertDialogPrimitive.Description, { ref, className: cn("text-sm text-muted-foreground", className), ...props }));
7206
+ var AlertDialogDescription = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(AlertDialogPrimitive.Description, { ref, className: cn("text-sm text-muted-foreground", className), ...props }));
7243
7207
  AlertDialogDescription.displayName = AlertDialogPrimitive.Description.displayName;
7244
- var AlertDialogAction = React25.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(AlertDialogPrimitive.Action, { ref, className: cn(buttonVariants(), className), ...props }));
7208
+ var AlertDialogAction = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(AlertDialogPrimitive.Action, { ref, className: cn(buttonVariants(), className), ...props }));
7245
7209
  AlertDialogAction.displayName = AlertDialogPrimitive.Action.displayName;
7246
- var AlertDialogCancel = React25.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(AlertDialogPrimitive.Cancel, { ref, className: cn(buttonVariants({ variant: "outline" }), "mt-2 sm:mt-0", className), ...props }));
7210
+ var AlertDialogCancel = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(AlertDialogPrimitive.Cancel, { ref, className: cn(buttonVariants({ variant: "outline" }), "mt-2 sm:mt-0", className), ...props }));
7247
7211
  AlertDialogCancel.displayName = AlertDialogPrimitive.Cancel.displayName;
7248
7212
  var buttonGroupVariants = cva(
7249
7213
  "flex w-fit items-stretch [&>*]:focus-visible:relative [&>*]:focus-visible:z-10",
@@ -7271,7 +7235,7 @@ function ButtonGroupText({ className, asChild = false, ...props }) {
7271
7235
  function ButtonGroupSeparator({ className, orientation = "vertical", ...props }) {
7272
7236
  return /* @__PURE__ */ jsx(Separator3, { orientation, className: cn("bg-input relative !m-0 self-stretch data-[orientation=vertical]:h-auto", className), ...props });
7273
7237
  }
7274
- var SkeletonBase = React25.forwardRef(
7238
+ var SkeletonBase = React26.forwardRef(
7275
7239
  ({ className, ...rest }, ref) => /* @__PURE__ */ jsx(
7276
7240
  "div",
7277
7241
  {
@@ -7447,8 +7411,8 @@ function LoadingTimeout({
7447
7411
  firm: thresholds?.firm ?? 15e3,
7448
7412
  expired: thresholds?.expired ?? 3e4
7449
7413
  };
7450
- const [phase, setPhase] = React25.useState(active ? "silent" : "idle");
7451
- React25.useEffect(() => {
7414
+ const [phase, setPhase] = React26.useState(active ? "silent" : "idle");
7415
+ React26.useEffect(() => {
7452
7416
  if (!active) {
7453
7417
  setPhase("idle");
7454
7418
  return;
@@ -7507,7 +7471,7 @@ function ProgressiveImage({
7507
7471
  onLoad,
7508
7472
  onError
7509
7473
  }) {
7510
- const [loaded, setLoaded] = React25.useState(false);
7474
+ const [loaded, setLoaded] = React26.useState(false);
7511
7475
  return /* @__PURE__ */ jsxs(
7512
7476
  "div",
7513
7477
  {
@@ -7962,29 +7926,29 @@ function KanbanEditor({
7962
7926
  onSave,
7963
7927
  onClose
7964
7928
  }) {
7965
- const [draft, set_draft] = React25.useState(item);
7966
- const [saving, set_saving] = React25.useState(false);
7967
- const [error, set_error] = React25.useState(null);
7929
+ const [draft, set_draft] = React26.useState(item);
7930
+ const [saving, set_saving] = React26.useState(false);
7931
+ const [error, set_error] = React26.useState(null);
7968
7932
  const item_id = item?.id ?? null;
7969
- React25.useEffect(() => {
7933
+ React26.useEffect(() => {
7970
7934
  set_draft(item);
7971
7935
  set_error(null);
7972
7936
  set_saving(false);
7973
7937
  }, [item_id]);
7974
7938
  const resolved_columns = columns ?? [];
7975
7939
  const resolved_priorities = priorities ?? DEFAULT_PRIORITIES;
7976
- const resolved_fields = React25.useMemo(() => {
7940
+ const resolved_fields = React26.useMemo(() => {
7977
7941
  if (fields) return fields;
7978
7942
  if (!item) return [];
7979
7943
  return auto_detect_fields(item, resolved_columns);
7980
7944
  }, [fields, item, resolved_columns]);
7981
- const required_keys = React25.useMemo(
7945
+ const required_keys = React26.useMemo(
7982
7946
  () => resolved_fields.filter(
7983
7947
  (f) => f.required && (f.type === "text" || f.type === "textarea" || f.type === "number")
7984
7948
  ).map((f) => f.key),
7985
7949
  [resolved_fields]
7986
7950
  );
7987
- const all_required_filled = React25.useMemo(() => {
7951
+ const all_required_filled = React26.useMemo(() => {
7988
7952
  if (!draft) return false;
7989
7953
  for (const key of required_keys) {
7990
7954
  const v = draft[key];
@@ -7993,7 +7957,7 @@ function KanbanEditor({
7993
7957
  }
7994
7958
  return true;
7995
7959
  }, [draft, required_keys]);
7996
- const is_dirty = React25.useMemo(() => {
7960
+ const is_dirty = React26.useMemo(() => {
7997
7961
  if (!draft || !item) return false;
7998
7962
  try {
7999
7963
  return JSON.stringify(draft) !== JSON.stringify(item);
@@ -8001,7 +7965,7 @@ function KanbanEditor({
8001
7965
  return draft !== item;
8002
7966
  }
8003
7967
  }, [draft, item]);
8004
- const handle_save = React25.useCallback(async () => {
7968
+ const handle_save = React26.useCallback(async () => {
8005
7969
  if (!draft || !item) return;
8006
7970
  if (saving) return;
8007
7971
  set_error(null);
@@ -8220,11 +8184,11 @@ function HazoUiKanbanFilter({
8220
8184
  className
8221
8185
  }) {
8222
8186
  const is_controlled = value !== void 0;
8223
- const [internal, set_internal] = React25.useState(
8187
+ const [internal, set_internal] = React26.useState(
8224
8188
  defaultValue ?? EMPTY_FILTER
8225
8189
  );
8226
8190
  const current = is_controlled ? value : internal;
8227
- const update = React25.useCallback(
8191
+ const update = React26.useCallback(
8228
8192
  (next) => {
8229
8193
  if (!is_controlled) set_internal(next);
8230
8194
  onChange?.(next);
@@ -8387,29 +8351,29 @@ function HazoUiKanban({
8387
8351
  onCardSave,
8388
8352
  disableEdit = false
8389
8353
  }) {
8390
- const label_fn = React25.useCallback(
8354
+ const label_fn = React26.useCallback(
8391
8355
  (item) => itemLabel ? itemLabel(item) : item.id,
8392
8356
  [itemLabel]
8393
8357
  );
8394
- const dnd_context_id = React25.useId();
8395
- const [overlay, set_overlay] = React25.useState(
8358
+ const dnd_context_id = React26.useId();
8359
+ const [overlay, set_overlay] = React26.useState(
8396
8360
  /* @__PURE__ */ new Map()
8397
8361
  );
8398
- const [active_id, set_active_id] = React25.useState(null);
8399
- const [active_tab, set_active_tab] = React25.useState(columns[0]?.key ?? "");
8400
- const [editing_item, set_editing_item] = React25.useState(null);
8362
+ const [active_id, set_active_id] = React26.useState(null);
8363
+ const [active_tab, set_active_tab] = React26.useState(columns[0]?.key ?? "");
8364
+ const [editing_item, set_editing_item] = React26.useState(null);
8401
8365
  const show_edit = !disableEdit && typeof onCardSave === "function";
8402
- const handle_edit_request = React25.useCallback(
8366
+ const handle_edit_request = React26.useCallback(
8403
8367
  (it) => {
8404
8368
  const typed = items.find((x) => x.id === it.id);
8405
8369
  if (typed) set_editing_item(typed);
8406
8370
  },
8407
8371
  [items]
8408
8372
  );
8409
- const handle_editor_close = React25.useCallback(() => {
8373
+ const handle_editor_close = React26.useCallback(() => {
8410
8374
  set_editing_item(null);
8411
8375
  }, []);
8412
- React25.useEffect(() => {
8376
+ React26.useEffect(() => {
8413
8377
  if (overlay.size === 0) return;
8414
8378
  set_overlay((prev) => {
8415
8379
  let changed = false;
@@ -8424,11 +8388,11 @@ function HazoUiKanban({
8424
8388
  return changed ? next : prev;
8425
8389
  });
8426
8390
  }, [items, overlay]);
8427
- const grouped = React25.useMemo(
8391
+ const grouped = React26.useMemo(
8428
8392
  () => group_items_by_column(items, overlay, columns),
8429
8393
  [items, overlay, columns]
8430
8394
  );
8431
- const find_item = React25.useCallback(
8395
+ const find_item = React26.useCallback(
8432
8396
  (id) => items.find((i) => i.id === id),
8433
8397
  [items]
8434
8398
  );
@@ -8436,7 +8400,7 @@ function HazoUiKanban({
8436
8400
  useSensor(PointerSensor, { activationConstraint: { distance: 5 } }),
8437
8401
  useSensor(KeyboardSensor, { coordinateGetter: sortableKeyboardCoordinates })
8438
8402
  );
8439
- const merged_announcements = React25.useMemo(() => {
8403
+ const merged_announcements = React26.useMemo(() => {
8440
8404
  const defaults = default_announcements(label_fn);
8441
8405
  return {
8442
8406
  onDragStart: announcements?.onDragStart ?? defaults.onDragStart,
@@ -8445,7 +8409,7 @@ function HazoUiKanban({
8445
8409
  onDragCancel: announcements?.onDragCancel ?? defaults.onDragCancel
8446
8410
  };
8447
8411
  }, [announcements, label_fn]);
8448
- const dnd_announcements = React25.useMemo(
8412
+ const dnd_announcements = React26.useMemo(
8449
8413
  () => ({
8450
8414
  onDragStart({ active }) {
8451
8415
  const id = String(active.id);
@@ -8503,10 +8467,10 @@ function HazoUiKanban({
8503
8467
  }),
8504
8468
  [find_item, columns, grouped, merged_announcements]
8505
8469
  );
8506
- const handle_drag_start = React25.useCallback((event) => {
8470
+ const handle_drag_start = React26.useCallback((event) => {
8507
8471
  set_active_id(String(event.active.id));
8508
8472
  }, []);
8509
- const make_revert_handle = React25.useCallback(
8473
+ const make_revert_handle = React26.useCallback(
8510
8474
  (item_id) => ({
8511
8475
  revert: () => {
8512
8476
  set_overlay((prev) => {
@@ -8519,7 +8483,7 @@ function HazoUiKanban({
8519
8483
  }),
8520
8484
  []
8521
8485
  );
8522
- const handle_drag_end = React25.useCallback(
8486
+ const handle_drag_end = React26.useCallback(
8523
8487
  (event) => {
8524
8488
  const active_id_str = String(event.active.id);
8525
8489
  set_active_id(null);
@@ -8581,7 +8545,7 @@ function HazoUiKanban({
8581
8545
  },
8582
8546
  [find_item, columns, grouped, onMove, onReorder, make_revert_handle]
8583
8547
  );
8584
- const handle_drag_cancel = React25.useCallback(() => {
8548
+ const handle_drag_cancel = React26.useCallback(() => {
8585
8549
  set_active_id(null);
8586
8550
  }, []);
8587
8551
  const active_item = active_id ? find_item(active_id) : null;
@@ -8672,7 +8636,7 @@ function HazoUiKanban({
8672
8636
  }
8673
8637
  );
8674
8638
  }
8675
- var Table2 = React25.forwardRef(
8639
+ var Table2 = React26.forwardRef(
8676
8640
  ({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { className: "cls_table_wrap relative w-full overflow-auto", children: /* @__PURE__ */ jsx(
8677
8641
  "table",
8678
8642
  {
@@ -8683,11 +8647,11 @@ var Table2 = React25.forwardRef(
8683
8647
  ) })
8684
8648
  );
8685
8649
  Table2.displayName = "Table";
8686
- var TableHeader2 = React25.forwardRef(
8650
+ var TableHeader2 = React26.forwardRef(
8687
8651
  ({ className, ...props }, ref) => /* @__PURE__ */ jsx("thead", { ref, className: cn("[&_tr]:border-b", className), ...props })
8688
8652
  );
8689
8653
  TableHeader2.displayName = "TableHeader";
8690
- var TableBody = React25.forwardRef(
8654
+ var TableBody = React26.forwardRef(
8691
8655
  ({ className, ...props }, ref) => /* @__PURE__ */ jsx(
8692
8656
  "tbody",
8693
8657
  {
@@ -8698,7 +8662,7 @@ var TableBody = React25.forwardRef(
8698
8662
  )
8699
8663
  );
8700
8664
  TableBody.displayName = "TableBody";
8701
- var TableFooter = React25.forwardRef(
8665
+ var TableFooter = React26.forwardRef(
8702
8666
  ({ className, ...props }, ref) => /* @__PURE__ */ jsx(
8703
8667
  "tfoot",
8704
8668
  {
@@ -8709,7 +8673,7 @@ var TableFooter = React25.forwardRef(
8709
8673
  )
8710
8674
  );
8711
8675
  TableFooter.displayName = "TableFooter";
8712
- var TableRow2 = React25.forwardRef(
8676
+ var TableRow2 = React26.forwardRef(
8713
8677
  ({ className, ...props }, ref) => /* @__PURE__ */ jsx(
8714
8678
  "tr",
8715
8679
  {
@@ -8723,7 +8687,7 @@ var TableRow2 = React25.forwardRef(
8723
8687
  )
8724
8688
  );
8725
8689
  TableRow2.displayName = "TableRow";
8726
- var TableHead = React25.forwardRef(
8690
+ var TableHead = React26.forwardRef(
8727
8691
  ({ className, ...props }, ref) => /* @__PURE__ */ jsx(
8728
8692
  "th",
8729
8693
  {
@@ -8737,7 +8701,7 @@ var TableHead = React25.forwardRef(
8737
8701
  )
8738
8702
  );
8739
8703
  TableHead.displayName = "TableHead";
8740
- var TableCell2 = React25.forwardRef(
8704
+ var TableCell2 = React26.forwardRef(
8741
8705
  ({ className, ...props }, ref) => /* @__PURE__ */ jsx(
8742
8706
  "td",
8743
8707
  {
@@ -8748,7 +8712,7 @@ var TableCell2 = React25.forwardRef(
8748
8712
  )
8749
8713
  );
8750
8714
  TableCell2.displayName = "TableCell";
8751
- var TableCaption = React25.forwardRef(
8715
+ var TableCaption = React26.forwardRef(
8752
8716
  ({ className, ...props }, ref) => /* @__PURE__ */ jsx(
8753
8717
  "caption",
8754
8718
  {
@@ -9320,18 +9284,18 @@ function Toolbar2(props) {
9320
9284
  enableFilterDialog,
9321
9285
  searchPlaceholder
9322
9286
  } = props;
9323
- const sortFields = React25.useMemo(
9287
+ const sortFields = React26.useMemo(
9324
9288
  () => deriveSortFields(columns),
9325
9289
  [columns]
9326
9290
  );
9327
- const filterFields = React25.useMemo(
9291
+ const filterFields = React26.useMemo(
9328
9292
  () => deriveFilterFields(columns),
9329
9293
  [columns]
9330
9294
  );
9331
- const [searchValue, setSearchValue] = React25.useState(
9295
+ const [searchValue, setSearchValue] = React26.useState(
9332
9296
  filter.search ?? ""
9333
9297
  );
9334
- React25.useEffect(() => {
9298
+ React26.useEffect(() => {
9335
9299
  setSearchValue(filter.search ?? "");
9336
9300
  }, [filter.search]);
9337
9301
  return /* @__PURE__ */ jsxs("div", { className: "cls_hazo_ui_table_toolbar flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between", children: [
@@ -9587,9 +9551,9 @@ function LineChart({
9587
9551
  className
9588
9552
  }) {
9589
9553
  const geo = compute_geometry(data, width, height);
9590
- const svg_ref = React25.useRef(null);
9591
- const [hover_idx, set_hover_idx] = React25.useState(null);
9592
- const handle_mouse_move = React25.useCallback(
9554
+ const svg_ref = React26.useRef(null);
9555
+ const [hover_idx, set_hover_idx] = React26.useState(null);
9556
+ const handle_mouse_move = React26.useCallback(
9593
9557
  (e) => {
9594
9558
  if (!geo) return;
9595
9559
  const rect = e.currentTarget.getBoundingClientRect();
@@ -9622,7 +9586,7 @@ function LineChart({
9622
9586
  },
9623
9587
  [geo, data]
9624
9588
  );
9625
- const handle_mouse_leave = React25.useCallback(() => set_hover_idx(null), []);
9589
+ const handle_mouse_leave = React26.useCallback(() => set_hover_idx(null), []);
9626
9590
  if (!geo) {
9627
9591
  return /* @__PURE__ */ jsx(
9628
9592
  "svg",
@@ -9849,8 +9813,8 @@ function MultiLineChart({
9849
9813
  className
9850
9814
  }) {
9851
9815
  const geo = compute_geometry2(series, width, height);
9852
- const [hover_idx, set_hover_idx] = React25.useState(null);
9853
- const handle_mouse_move = React25.useCallback(
9816
+ const [hover_idx, set_hover_idx] = React26.useState(null);
9817
+ const handle_mouse_move = React26.useCallback(
9854
9818
  (e) => {
9855
9819
  if (!geo) return;
9856
9820
  const rect = e.currentTarget.getBoundingClientRect();
@@ -9867,7 +9831,7 @@ function MultiLineChart({
9867
9831
  },
9868
9832
  [geo]
9869
9833
  );
9870
- const handle_mouse_leave = React25.useCallback(() => set_hover_idx(null), []);
9834
+ const handle_mouse_leave = React26.useCallback(() => set_hover_idx(null), []);
9871
9835
  if (!geo) {
9872
9836
  return /* @__PURE__ */ jsx(
9873
9837
  "svg",
@@ -10249,21 +10213,21 @@ function celebrate(payload) {
10249
10213
  _enqueue(payload);
10250
10214
  }
10251
10215
  function CelebrationProvider({ children }) {
10252
- const [queue, set_queue] = React25.useState([]);
10253
- const enqueue = React25.useCallback((payload) => {
10216
+ const [queue, set_queue] = React26.useState([]);
10217
+ const enqueue = React26.useCallback((payload) => {
10254
10218
  const storage_key = `hazo_ui_celebration_${payload.id}`;
10255
10219
  if (typeof window !== "undefined" && sessionStorage.getItem(storage_key)) {
10256
10220
  return;
10257
10221
  }
10258
10222
  set_queue((q) => [...q, payload]);
10259
10223
  }, []);
10260
- React25.useEffect(() => {
10224
+ React26.useEffect(() => {
10261
10225
  _enqueue = enqueue;
10262
10226
  return () => {
10263
10227
  _enqueue = null;
10264
10228
  };
10265
10229
  }, [enqueue]);
10266
- const handle_close = React25.useCallback(() => {
10230
+ const handle_close = React26.useCallback(() => {
10267
10231
  set_queue((q) => q.slice(1));
10268
10232
  }, []);
10269
10233
  const current = queue[0] ?? null;
@@ -10292,14 +10256,14 @@ function CelebrationModalInner({
10292
10256
  autoDismissDelay = 8e3,
10293
10257
  audioChime = false
10294
10258
  } = payload;
10295
- const [visible, set_visible] = React25.useState(true);
10296
- const [is_downloading, set_is_downloading] = React25.useState(false);
10297
- const canvas_ref = React25.useRef(null);
10298
- const card_ref = React25.useRef(null);
10299
- React25.useEffect(() => {
10259
+ const [visible, set_visible] = React26.useState(true);
10260
+ const [is_downloading, set_is_downloading] = React26.useState(false);
10261
+ const canvas_ref = React26.useRef(null);
10262
+ const card_ref = React26.useRef(null);
10263
+ React26.useEffect(() => {
10300
10264
  sessionStorage.setItem(`hazo_ui_celebration_${id}`, "1");
10301
10265
  }, [id]);
10302
- React25.useEffect(() => {
10266
+ React26.useEffect(() => {
10303
10267
  if (!canvas_ref.current) return;
10304
10268
  let confetti_instance = null;
10305
10269
  import('canvas-confetti').then(({ default: confetti }) => {
@@ -10316,18 +10280,18 @@ function CelebrationModalInner({
10316
10280
  confetti_instance?.reset();
10317
10281
  };
10318
10282
  }, []);
10319
- React25.useEffect(() => {
10283
+ React26.useEffect(() => {
10320
10284
  if (!audioChime) return;
10321
10285
  const audio = new Audio(celebration_chime_default);
10322
10286
  audio.play().catch(() => {
10323
10287
  });
10324
10288
  }, [audioChime]);
10325
- React25.useEffect(() => {
10289
+ React26.useEffect(() => {
10326
10290
  if (!autoDismiss) return;
10327
10291
  const timer = window.setTimeout(close_modal, autoDismissDelay);
10328
10292
  return () => window.clearTimeout(timer);
10329
10293
  }, [autoDismiss, autoDismissDelay]);
10330
- React25.useEffect(() => {
10294
+ React26.useEffect(() => {
10331
10295
  const on_key = (e) => {
10332
10296
  if (e.key === "Escape") close_modal();
10333
10297
  };
@@ -10515,6 +10479,6 @@ function CelebrationModalInner({
10515
10479
  );
10516
10480
  }
10517
10481
 
10518
- export { ANIMATION_PRESETS, Accordion, AccordionContent, AccordionItem, AccordionTrigger, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, CELEBRATION_GRADIENT, Calendar, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, CelebrationProvider, Checkbox, Collapsible, CollapsibleContent2 as CollapsibleContent, CollapsibleTrigger2 as CollapsibleTrigger, CommandNodeExtension, CommandPill, CommandPopover, DateRangeSelector, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyState, ErrorBanner, ErrorPage, HazoUiConfirmDialog, HazoUiDialog, DialogClose as HazoUiDialogClose, DialogContent as HazoUiDialogContent, DialogDescription as HazoUiDialogDescription, DialogFooter as HazoUiDialogFooter, DialogHeader as HazoUiDialogHeader, DialogOverlay as HazoUiDialogOverlay, DialogPortal as HazoUiDialogPortal, Dialog as HazoUiDialogRoot, DialogTitle as HazoUiDialogTitle, DialogTrigger as HazoUiDialogTrigger, HazoUiFlexInput, HazoUiFlexRadio, HazoUiKanban, HazoUiKanbanFilter, HazoUiMultiFilterDialog, HazoUiMultiSortDialog, HazoUiPillRadio, HazoUiRte, HazoUiTable, HazoUiTextarea, HazoUiTextbox, HazoUiToaster, HoverCard, HoverCardContent, HoverCardTrigger, Input, InverseSparkline, Label3 as Label, LineChart, LoadingTimeout, MultiLineChart, Popover, PopoverContent, PopoverTrigger, ProgressiveImage, RadioGroup, RadioGroupItem, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator3 as Separator, Command as ShadcnCommand, CommandEmpty as ShadcnCommandEmpty, CommandGroup as ShadcnCommandGroup, CommandInput as ShadcnCommandInput, CommandItem as ShadcnCommandItem, CommandList as ShadcnCommandList, Skeleton, SkeletonBar, SkeletonCircle, SkeletonGroup, SkeletonRect, Sparkline, Spinner, StackedBars, Switch, Table2 as Table, TableBody, TableCaption, TableCell2 as TableCell, TableFooter, TableHead, TableHeader2 as TableHeader, TableRow2 as TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, applyKanbanFilter, buttonGroupVariants, celebrate, create_command_suggestion_extension, errorToast, format_num, get_hazo_ui_config, parse_commands_from_text, pick_x_label_indices, reset_hazo_ui_config, resolve_animation_classes, set_hazo_ui_config, successToast, text_to_tiptap_content, toggleVariants, useClickOutside, useCopyToClipboard, useDebounce, useErrorDisplay, useFullscreen, useIsMobile, useLoadingState, useLocalStorage, useMediaQuery, useSessionStorage, useViewport, useWakeLock };
10482
+ export { ANIMATION_PRESETS, Accordion, AccordionContent, AccordionItem, AccordionTrigger, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, CELEBRATION_GRADIENT, Calendar, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, CelebrationProvider, Checkbox, Collapsible, CollapsibleContent2 as CollapsibleContent, CollapsibleTrigger2 as CollapsibleTrigger, CommandNodeExtension, CommandPill, CommandPopover, DateRangeSelector, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyState, ErrorBanner, ErrorPage, HazoContextProvider, HazoUiConfirmDialog, HazoUiDialog, DialogClose as HazoUiDialogClose, DialogContent as HazoUiDialogContent, DialogDescription as HazoUiDialogDescription, DialogFooter as HazoUiDialogFooter, DialogHeader as HazoUiDialogHeader, DialogOverlay as HazoUiDialogOverlay, DialogPortal as HazoUiDialogPortal, Dialog as HazoUiDialogRoot, DialogTitle as HazoUiDialogTitle, DialogTrigger as HazoUiDialogTrigger, HazoUiFlexInput, HazoUiFlexRadio, HazoUiKanban, HazoUiKanbanFilter, HazoUiMultiFilterDialog, HazoUiMultiSortDialog, HazoUiPillRadio, HazoUiRte, HazoUiTable, HazoUiTextarea, HazoUiTextbox, HazoUiToaster, HoverCard, HoverCardContent, HoverCardTrigger, Input, InverseSparkline, Label3 as Label, LineChart, LoadingTimeout, MultiLineChart, Popover, PopoverContent, PopoverTrigger, ProgressiveImage, RadioGroup, RadioGroupItem, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator3 as Separator, Command as ShadcnCommand, CommandEmpty as ShadcnCommandEmpty, CommandGroup as ShadcnCommandGroup, CommandInput as ShadcnCommandInput, CommandItem as ShadcnCommandItem, CommandList as ShadcnCommandList, Skeleton, SkeletonBar, SkeletonCircle, SkeletonGroup, SkeletonRect, Sparkline, Spinner, StackedBars, Switch, Table2 as Table, TableBody, TableCaption, TableCell2 as TableCell, TableFooter, TableHead, TableHeader2 as TableHeader, TableRow2 as TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, applyKanbanFilter, buttonGroupVariants, celebrate, cn, create_command_suggestion_extension, errorToast, format_num, generateUUID, get_hazo_ui_config, get_logger, parse_commands_from_text, pick_x_label_indices, reset_hazo_ui_config, resolve_animation_classes, set_hazo_ui_config, set_logger, successToast, text_to_tiptap_content, toggleVariants, useClickOutside, useCopyToClipboard, useDebounce, useErrorDisplay, useFullscreen, useIsMobile, useLoadingState, useLocalStorage, useMediaQuery, useSessionStorage, useViewport, useWakeLock };
10519
10483
  //# sourceMappingURL=index.js.map
10520
10484
  //# sourceMappingURL=index.js.map