@skygraph/react 0.5.1 → 0.5.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/README.md +70 -70
  2. package/dist/{Table-BmesoMje.d.ts → Table-CAay8MmA.d.ts} +8 -1
  3. package/dist/{Table-CpKMOH2x.d.cts → Table-CMKo6Pc3.d.cts} +8 -1
  4. package/dist/{chunk-ZJF6SJLP.js → chunk-45YW5VSP.js} +44 -10
  5. package/dist/chunk-45YW5VSP.js.map +1 -0
  6. package/dist/{chunk-Z5UGF7EO.js → chunk-EFDB2ENB.js} +87 -25
  7. package/dist/chunk-EFDB2ENB.js.map +1 -0
  8. package/dist/{chunk-UO6VJC3C.js → chunk-KGFFQGCM.js} +3 -3
  9. package/dist/{chunk-NXB3VAVF.js → chunk-P4J4PFBG.js} +54 -7
  10. package/dist/chunk-P4J4PFBG.js.map +1 -0
  11. package/dist/{chunk-FSV73JI4.js → chunk-PEX2UTNG.js} +2 -2
  12. package/dist/chunk-VLRLCHEL.js +184 -0
  13. package/dist/chunk-VLRLCHEL.js.map +1 -0
  14. package/dist/{chunk-MLEBVELO.js → chunk-YTPUWPWA.js} +51 -46
  15. package/dist/chunk-YTPUWPWA.js.map +1 -0
  16. package/dist/{chunk-GJDDPZH7.js → chunk-ZJC2QUWA.js} +12 -12
  17. package/dist/chunk-ZJC2QUWA.js.map +1 -0
  18. package/dist/datagrid.cjs +76 -21
  19. package/dist/datagrid.cjs.map +1 -1
  20. package/dist/datagrid.js +3 -3
  21. package/dist/devtools.cjs +11 -11
  22. package/dist/devtools.cjs.map +1 -1
  23. package/dist/devtools.js +1 -1
  24. package/dist/form.cjs +127 -86
  25. package/dist/form.cjs.map +1 -1
  26. package/dist/form.js +3 -3
  27. package/dist/index.cjs +1319 -945
  28. package/dist/index.cjs.map +1 -1
  29. package/dist/index.d.cts +153 -7
  30. package/dist/index.d.ts +153 -7
  31. package/dist/index.js +281 -141
  32. package/dist/index.js.map +1 -1
  33. package/dist/table.cjs +252 -169
  34. package/dist/table.cjs.map +1 -1
  35. package/dist/table.d.cts +1 -1
  36. package/dist/table.d.ts +1 -1
  37. package/dist/table.js +4 -4
  38. package/dist/tree.cjs.map +1 -1
  39. package/dist/tree.js +3 -3
  40. package/package.json +3 -3
  41. package/dist/chunk-2OCEO636.js +0 -91
  42. package/dist/chunk-2OCEO636.js.map +0 -1
  43. package/dist/chunk-GJDDPZH7.js.map +0 -1
  44. package/dist/chunk-MLEBVELO.js.map +0 -1
  45. package/dist/chunk-NXB3VAVF.js.map +0 -1
  46. package/dist/chunk-Z5UGF7EO.js.map +0 -1
  47. package/dist/chunk-ZJF6SJLP.js.map +0 -1
  48. /package/dist/{chunk-UO6VJC3C.js.map → chunk-KGFFQGCM.js.map} +0 -0
  49. /package/dist/{chunk-FSV73JI4.js.map → chunk-PEX2UTNG.js.map} +0 -0
package/dist/index.js CHANGED
@@ -22,7 +22,7 @@ import {
22
22
  zodRule,
23
23
  zodRules,
24
24
  zodToJsonSchema
25
- } from "./chunk-MLEBVELO.js";
25
+ } from "./chunk-YTPUWPWA.js";
26
26
  import {
27
27
  Pagination,
28
28
  Select,
@@ -31,28 +31,30 @@ import {
31
31
  buildPrintHtml,
32
32
  printElement,
33
33
  useTable
34
- } from "./chunk-NXB3VAVF.js";
34
+ } from "./chunk-P4J4PFBG.js";
35
35
  import {
36
36
  Button,
37
37
  Input,
38
38
  Transition
39
- } from "./chunk-ZJF6SJLP.js";
39
+ } from "./chunk-45YW5VSP.js";
40
40
  import {
41
41
  Tree,
42
42
  TreeSelect,
43
43
  useTree
44
- } from "./chunk-UO6VJC3C.js";
44
+ } from "./chunk-KGFFQGCM.js";
45
45
  import {
46
46
  DataGrid
47
- } from "./chunk-Z5UGF7EO.js";
47
+ } from "./chunk-EFDB2ENB.js";
48
48
  import {
49
49
  Checkbox
50
- } from "./chunk-FSV73JI4.js";
50
+ } from "./chunk-PEX2UTNG.js";
51
51
  import {
52
52
  ConfigProvider,
53
53
  Spin,
54
- useConfig
55
- } from "./chunk-2OCEO636.js";
54
+ buildThemeVars,
55
+ useConfig,
56
+ useConfigWithDefaults
57
+ } from "./chunk-VLRLCHEL.js";
56
58
  import {
57
59
  VirtualList
58
60
  } from "./chunk-BNMJSYI2.js";
@@ -62,7 +64,7 @@ import {
62
64
  import {
63
65
  HistoryPanel,
64
66
  useHistory
65
- } from "./chunk-GJDDPZH7.js";
67
+ } from "./chunk-ZJC2QUWA.js";
66
68
 
67
69
  // src/locales/en_US.ts
68
70
  var en_US = {
@@ -131,6 +133,9 @@ var en_US = {
131
133
  prevMonth: "Previous month",
132
134
  nextMonth: "Next month"
133
135
  },
136
+ input: {
137
+ clear: "Clear"
138
+ },
134
139
  inputPassword: {
135
140
  showPassword: "Show password",
136
141
  hidePassword: "Hide password"
@@ -294,6 +299,9 @@ var ru_RU = {
294
299
  prevMonth: "\u041F\u0440\u0435\u0434\u044B\u0434\u0443\u0449\u0438\u0439 \u043C\u0435\u0441\u044F\u0446",
295
300
  nextMonth: "\u0421\u043B\u0435\u0434\u0443\u044E\u0449\u0438\u0439 \u043C\u0435\u0441\u044F\u0446"
296
301
  },
302
+ input: {
303
+ clear: "\u041E\u0447\u0438\u0441\u0442\u0438\u0442\u044C"
304
+ },
297
305
  inputPassword: {
298
306
  showPassword: "\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u043F\u0430\u0440\u043E\u043B\u044C",
299
307
  hidePassword: "\u0421\u043A\u0440\u044B\u0442\u044C \u043F\u0430\u0440\u043E\u043B\u044C"
@@ -457,6 +465,9 @@ var zh_CN = {
457
465
  prevMonth: "\u4E0A\u4E2A\u6708",
458
466
  nextMonth: "\u4E0B\u4E2A\u6708"
459
467
  },
468
+ input: {
469
+ clear: "\u6E05\u9664"
470
+ },
460
471
  inputPassword: {
461
472
  showPassword: "\u663E\u793A\u5BC6\u7801",
462
473
  hidePassword: "\u9690\u85CF\u5BC6\u7801"
@@ -620,6 +631,9 @@ var de_DE = {
620
631
  prevMonth: "Vorheriger Monat",
621
632
  nextMonth: "N\xE4chster Monat"
622
633
  },
634
+ input: {
635
+ clear: "Leeren"
636
+ },
623
637
  inputPassword: {
624
638
  showPassword: "Passwort anzeigen",
625
639
  hidePassword: "Passwort verbergen"
@@ -783,6 +797,9 @@ var fr_FR = {
783
797
  prevMonth: "Mois pr\xE9c\xE9dent",
784
798
  nextMonth: "Mois suivant"
785
799
  },
800
+ input: {
801
+ clear: "Effacer"
802
+ },
786
803
  inputPassword: {
787
804
  showPassword: "Afficher le mot de passe",
788
805
  hidePassword: "Masquer le mot de passe"
@@ -946,6 +963,9 @@ var es_ES = {
946
963
  prevMonth: "Mes anterior",
947
964
  nextMonth: "Mes siguiente"
948
965
  },
966
+ input: {
967
+ clear: "Limpiar"
968
+ },
949
969
  inputPassword: {
950
970
  showPassword: "Mostrar contrase\xF1a",
951
971
  hidePassword: "Ocultar contrase\xF1a"
@@ -2063,7 +2083,9 @@ function Calendar(props) {
2063
2083
  "span",
2064
2084
  {
2065
2085
  className: "sg-calendar-event-dot",
2066
- style: { backgroundColor: ev.color ?? "var(--sg-primary, #1677ff)" },
2086
+ style: {
2087
+ backgroundColor: ev.color ?? "var(--sg-color-primary, #1677ff)"
2088
+ },
2067
2089
  title: ev.title
2068
2090
  },
2069
2091
  ev.key ?? ei
@@ -4270,15 +4292,21 @@ function Rate({
4270
4292
  }
4271
4293
 
4272
4294
  // src/components/ui/Upload.tsx
4273
- import { useRef as useRef8 } from "react";
4274
- import { jsx as jsx13, jsxs as jsxs12 } from "react/jsx-runtime";
4295
+ import { useRef as useRef8, useState as useState8 } from "react";
4296
+ import { Fragment as Fragment4, jsx as jsx13, jsxs as jsxs12 } from "react/jsx-runtime";
4275
4297
  function Upload({
4276
4298
  accept,
4277
4299
  multiple,
4278
4300
  disabled: disabledProp,
4279
4301
  loading,
4280
- fileList = [],
4302
+ fileList,
4281
4303
  maxCount,
4304
+ maxSize,
4305
+ beforeUpload,
4306
+ customRequest,
4307
+ listType = "text",
4308
+ showUploadList = true,
4309
+ drag = false,
4282
4310
  onUpload,
4283
4311
  onRemove,
4284
4312
  children,
@@ -4293,21 +4321,114 @@ function Upload({
4293
4321
  const removeLabel = uploadLocale?.removeFile ?? "Remove file";
4294
4322
  const uploadAriaLabel = uploadLocale?.uploadAriaLabel ?? "Upload file";
4295
4323
  const inputRef = useRef8(null);
4324
+ const isControlled = fileList !== void 0;
4325
+ const [internalList, setInternalList] = useState8(fileList ?? []);
4326
+ const list = isControlled ? fileList : internalList;
4327
+ const [isDragging, setIsDragging] = useState8(false);
4328
+ const updateList = (next) => {
4329
+ if (!isControlled) {
4330
+ setInternalList((prev) => typeof next === "function" ? next(prev) : next);
4331
+ }
4332
+ };
4333
+ const patchFile = (uid, patch) => {
4334
+ updateList((prev) => prev.map((f) => f.uid === uid ? { ...f, ...patch } : f));
4335
+ };
4296
4336
  const handleClick = () => {
4297
4337
  if (disabled || loading) return;
4298
4338
  inputRef.current?.click();
4299
4339
  };
4300
- const handleChange = (e) => {
4301
- const files = Array.from(e.target.files ?? []);
4340
+ const handleFiles = async (rawFiles) => {
4341
+ if (rawFiles.length === 0) return;
4342
+ const accepted = [];
4343
+ for (const file of rawFiles) {
4344
+ if (maxSize !== void 0 && file.size > maxSize) continue;
4345
+ if (beforeUpload) {
4346
+ const ok = await beforeUpload(file, rawFiles);
4347
+ if (ok === false) continue;
4348
+ }
4349
+ accepted.push(file);
4350
+ }
4351
+ if (accepted.length === 0) return;
4352
+ let trimmed = accepted;
4302
4353
  if (maxCount) {
4303
- const remaining = maxCount - fileList.length;
4304
- onUpload?.(files.slice(0, Math.max(0, remaining)));
4305
- } else {
4306
- onUpload?.(files);
4354
+ const remaining = maxCount - list.length;
4355
+ trimmed = accepted.slice(0, Math.max(0, remaining));
4356
+ }
4357
+ if (customRequest) {
4358
+ const newItems = trimmed.map((file) => ({
4359
+ uid: `sg-upl-${Date.now()}-${Math.random().toString(36).slice(2, 9)}`,
4360
+ name: file.name,
4361
+ size: file.size,
4362
+ status: "uploading",
4363
+ percent: 0,
4364
+ type: file.type,
4365
+ raw: file
4366
+ }));
4367
+ updateList((prev) => [...prev, ...newItems]);
4368
+ for (const item of newItems) {
4369
+ if (!item.raw) continue;
4370
+ customRequest({
4371
+ file: item.raw,
4372
+ onProgress: (percent) => patchFile(item.uid, { percent }),
4373
+ onSuccess: () => patchFile(item.uid, { status: "done", percent: 100 }),
4374
+ onError: () => patchFile(item.uid, { status: "error" })
4375
+ });
4376
+ }
4307
4377
  }
4378
+ onUpload?.(trimmed);
4379
+ };
4380
+ const handleChange = (e) => {
4381
+ const files = Array.from(e.target.files ?? []);
4382
+ void handleFiles(files);
4308
4383
  if (inputRef.current) inputRef.current.value = "";
4309
4384
  };
4310
- const wrapperClass = unstyled ? className ?? "" : ["sg-upload", loading ? "sg-upload-loading" : "", className].filter(Boolean).join(" ");
4385
+ const handleDrop = (e) => {
4386
+ e.preventDefault();
4387
+ setIsDragging(false);
4388
+ if (disabled || loading) return;
4389
+ const files = Array.from(e.dataTransfer.files ?? []);
4390
+ void handleFiles(files);
4391
+ };
4392
+ const handleDragOver = (e) => {
4393
+ e.preventDefault();
4394
+ if (disabled || loading) return;
4395
+ setIsDragging(true);
4396
+ };
4397
+ const handleDragLeave = () => setIsDragging(false);
4398
+ const handleRemove = (file) => {
4399
+ updateList((prev) => prev.filter((f) => f.uid !== file.uid));
4400
+ onRemove?.(file);
4401
+ };
4402
+ const wrapperClass = unstyled ? className ?? "" : [
4403
+ "sg-upload",
4404
+ `sg-upload-${listType}`,
4405
+ drag ? "sg-upload-drag" : "sg-upload-select",
4406
+ disabled ? "sg-upload-disabled" : "",
4407
+ loading ? "sg-upload-loading" : "",
4408
+ isDragging ? "sg-upload-dragging" : "",
4409
+ className
4410
+ ].filter(Boolean).join(" ");
4411
+ const renderTrigger = () => {
4412
+ if (drag) {
4413
+ return /* @__PURE__ */ jsx13(
4414
+ "div",
4415
+ {
4416
+ className: unstyled ? "" : "sg-upload-drag-area",
4417
+ role: "button",
4418
+ tabIndex: 0,
4419
+ onClick: handleClick,
4420
+ onDrop: handleDrop,
4421
+ onDragOver: handleDragOver,
4422
+ onDragLeave: handleDragLeave,
4423
+ children: children ?? /* @__PURE__ */ jsxs12(Fragment4, { children: [
4424
+ /* @__PURE__ */ jsx13("p", { className: unstyled ? "" : "sg-upload-drag-icon", children: "\u2B06" }),
4425
+ /* @__PURE__ */ jsx13("p", { className: unstyled ? "" : "sg-upload-drag-text", children: "Click or drag file to this area to upload" })
4426
+ ] })
4427
+ }
4428
+ );
4429
+ }
4430
+ return /* @__PURE__ */ jsx13("div", { className: unstyled ? "" : "sg-upload-select-trigger", onClick: handleClick, children: children ?? /* @__PURE__ */ jsx13(Button, { disabled, loading, children: uploadText }) });
4431
+ };
4311
4432
  return /* @__PURE__ */ jsxs12("div", { className: wrapperClass, style, children: [
4312
4433
  /* @__PURE__ */ jsx13(
4313
4434
  "input",
@@ -4321,8 +4442,8 @@ function Upload({
4321
4442
  onChange: handleChange
4322
4443
  }
4323
4444
  ),
4324
- /* @__PURE__ */ jsx13("div", { onClick: handleClick, children: children ?? /* @__PURE__ */ jsx13(Button, { disabled, loading, children: uploadText }) }),
4325
- fileList.length > 0 && /* @__PURE__ */ jsx13("div", { className: unstyled ? "" : "sg-upload-list", children: fileList.map((file) => /* @__PURE__ */ jsxs12(
4445
+ renderTrigger(),
4446
+ showUploadList && list.length > 0 && /* @__PURE__ */ jsx13("div", { className: unstyled ? "" : "sg-upload-list", children: list.map((file) => /* @__PURE__ */ jsxs12(
4326
4447
  "div",
4327
4448
  {
4328
4449
  className: unstyled ? "" : ["sg-upload-item", `sg-upload-item-${file.status}`].filter(Boolean).join(" "),
@@ -4331,12 +4452,16 @@ function Upload({
4331
4452
  file.status === "uploading" && /* @__PURE__ */ jsx13(Spin, { size: "small", unstyled }),
4332
4453
  file.name
4333
4454
  ] }),
4455
+ file.status === "uploading" && /* @__PURE__ */ jsxs12("span", { className: unstyled ? "" : "sg-upload-item-progress", children: [
4456
+ file.percent ?? 0,
4457
+ "%"
4458
+ ] }),
4334
4459
  file.status !== "uploading" && /* @__PURE__ */ jsx13(
4335
4460
  "button",
4336
4461
  {
4337
4462
  type: "button",
4338
4463
  className: unstyled ? "" : "sg-upload-item-remove",
4339
- onClick: () => onRemove?.(file),
4464
+ onClick: () => handleRemove(file),
4340
4465
  "aria-label": `${removeLabel}: ${file.name}`,
4341
4466
  children: "\xD7"
4342
4467
  }
@@ -4349,7 +4474,7 @@ function Upload({
4349
4474
  }
4350
4475
 
4351
4476
  // src/components/ui/Notification.tsx
4352
- import { useState as useState8, useEffect as useEffect9, useRef as useRef9 } from "react";
4477
+ import { useState as useState9, useEffect as useEffect9, useRef as useRef9 } from "react";
4353
4478
  import { jsx as jsx14, jsxs as jsxs13 } from "react/jsx-runtime";
4354
4479
  var listeners = /* @__PURE__ */ new Set();
4355
4480
  var items = [];
@@ -4392,7 +4517,7 @@ function NotificationContainer({
4392
4517
  placement = "topRight",
4393
4518
  unstyled
4394
4519
  }) {
4395
- const [list, setList] = useState8([]);
4520
+ const [list, setList] = useState9([]);
4396
4521
  const listenerRef = useRef9(void 0);
4397
4522
  useEffect9(() => {
4398
4523
  const fn = (newItems) => setList(newItems);
@@ -4552,7 +4677,7 @@ function Drawer({
4552
4677
  }
4553
4678
 
4554
4679
  // src/components/ui/Popconfirm.tsx
4555
- import { useState as useState9, useRef as useRef10, useEffect as useEffect11, useId as useId3 } from "react";
4680
+ import { useState as useState10, useRef as useRef10, useEffect as useEffect11, useId as useId3 } from "react";
4556
4681
  import { jsx as jsx16, jsxs as jsxs15 } from "react/jsx-runtime";
4557
4682
  function Popconfirm({
4558
4683
  title,
@@ -4570,7 +4695,7 @@ function Popconfirm({
4570
4695
  const popconfirmLocale = useConfig().locale?.popconfirm;
4571
4696
  const okText = okTextProp ?? popconfirmLocale?.okText ?? "Yes";
4572
4697
  const cancelText = cancelTextProp ?? popconfirmLocale?.cancelText ?? "No";
4573
- const [open, setOpen] = useState9(false);
4698
+ const [open, setOpen] = useState10(false);
4574
4699
  const ref = useRef10(null);
4575
4700
  const trapRef = useFocusTrap(open);
4576
4701
  const popconfirmId = useId3();
@@ -4842,7 +4967,7 @@ function Breadcrumb({
4842
4967
  }
4843
4968
 
4844
4969
  // src/components/ui/Dropdown.tsx
4845
- import { useState as useState10, useRef as useRef11, useEffect as useEffect12, useId as useId4 } from "react";
4970
+ import { useState as useState11, useRef as useRef11, useEffect as useEffect12, useId as useId4 } from "react";
4846
4971
  import { jsx as jsx21, jsxs as jsxs19 } from "react/jsx-runtime";
4847
4972
  function Dropdown({
4848
4973
  items: items2,
@@ -4856,8 +4981,8 @@ function Dropdown({
4856
4981
  }) {
4857
4982
  const config = useConfig();
4858
4983
  const disabled = disabledProp ?? config.disabled ?? false;
4859
- const [open, setOpen] = useState10(false);
4860
- const [focusedIndex, setFocusedIndex] = useState10(-1);
4984
+ const [open, setOpen] = useState11(false);
4985
+ const [focusedIndex, setFocusedIndex] = useState11(-1);
4861
4986
  const ref = useRef11(null);
4862
4987
  const timerRef = useRef11(void 0);
4863
4988
  const menuId = useId4();
@@ -4918,13 +5043,21 @@ function Dropdown({
4918
5043
  break;
4919
5044
  case "ArrowDown":
4920
5045
  e.preventDefault();
4921
- if (!open) setOpen(true);
4922
- else setFocusedIndex((i) => getNextMenuIndex(i, 1));
5046
+ if (!open) {
5047
+ setOpen(true);
5048
+ setFocusedIndex(getNextMenuIndex(-1, 1));
5049
+ } else {
5050
+ setFocusedIndex((i) => getNextMenuIndex(i, 1));
5051
+ }
4923
5052
  break;
4924
5053
  case "ArrowUp":
4925
5054
  e.preventDefault();
4926
- if (!open) setOpen(true);
4927
- else setFocusedIndex((i) => getNextMenuIndex(i, -1));
5055
+ if (!open) {
5056
+ setOpen(true);
5057
+ setFocusedIndex(getNextMenuIndex(items2.length, -1));
5058
+ } else {
5059
+ setFocusedIndex((i) => getNextMenuIndex(i, -1));
5060
+ }
4928
5061
  break;
4929
5062
  case "Home":
4930
5063
  if (open) {
@@ -4941,12 +5074,20 @@ function Dropdown({
4941
5074
  }
4942
5075
  };
4943
5076
  if (unstyled) {
4944
- return /* @__PURE__ */ jsxs19("div", { ref, className, style: { position: "relative", display: "inline-block" }, children: [
4945
- /* @__PURE__ */ jsx21("div", { onClick: handleClick, onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave, children }),
4946
- open && /* @__PURE__ */ jsx21("div", { onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave, children: items2.map(
4947
- (item) => item.divider ? /* @__PURE__ */ jsx21("hr", {}, item.key) : /* @__PURE__ */ jsx21("div", { onClick: () => handleSelect(item), children: item.label }, item.key)
4948
- ) })
4949
- ] });
5077
+ return /* @__PURE__ */ jsxs19(
5078
+ "div",
5079
+ {
5080
+ ref,
5081
+ className,
5082
+ style: { position: "relative", display: "inline-block" },
5083
+ children: [
5084
+ /* @__PURE__ */ jsx21("div", { onClick: handleClick, onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave, children }),
5085
+ open && /* @__PURE__ */ jsx21("div", { onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave, children: items2.map(
5086
+ (item) => item.divider ? /* @__PURE__ */ jsx21("hr", {}, item.key) : /* @__PURE__ */ jsx21("div", { onClick: () => handleSelect(item), children: item.label }, item.key)
5087
+ ) })
5088
+ ]
5089
+ }
5090
+ );
4950
5091
  }
4951
5092
  return /* @__PURE__ */ jsxs19(
4952
5093
  "div",
@@ -5115,7 +5256,7 @@ function Progress({
5115
5256
  }
5116
5257
 
5117
5258
  // src/components/ui/Menu.tsx
5118
- import { useState as useState11, useRef as useRef12, useEffect as useEffect13, useCallback as useCallback8 } from "react";
5259
+ import { useState as useState12, useRef as useRef12, useEffect as useEffect13, useCallback as useCallback8 } from "react";
5119
5260
  import { jsx as jsx23, jsxs as jsxs21 } from "react/jsx-runtime";
5120
5261
  function collectNavigableItems(items2, openKeys, mode, out = []) {
5121
5262
  for (const item of items2) {
@@ -5168,10 +5309,10 @@ function Menu({
5168
5309
  style,
5169
5310
  unstyled
5170
5311
  }) {
5171
- const [internalSelected, setInternalSelected] = useState11(
5312
+ const [internalSelected, setInternalSelected] = useState12(
5172
5313
  selectedKeys ?? defaultSelectedKeys
5173
5314
  );
5174
- const [internalOpen, setInternalOpen] = useState11(
5315
+ const [internalOpen, setInternalOpen] = useState12(
5175
5316
  openKeys ?? defaultOpenKeys
5176
5317
  );
5177
5318
  const rootRef = useRef12(null);
@@ -5179,7 +5320,7 @@ function Menu({
5179
5320
  const currentOpen = openKeys ?? internalOpen;
5180
5321
  const navigable = collectNavigableItems(items2, currentOpen, mode);
5181
5322
  const initialActive = currentSelected.find((k) => navigable.some((n) => n.key === k)) ?? navigable[0]?.key ?? "";
5182
- const [activeKey, setActiveKey] = useState11(initialActive);
5323
+ const [activeKey, setActiveKey] = useState12(initialActive);
5183
5324
  useEffect13(() => {
5184
5325
  if (!activeKey || !navigable.some((n) => n.key === activeKey)) {
5185
5326
  setActiveKey(navigable[0]?.key ?? "");
@@ -5451,7 +5592,7 @@ function StyledMenuItem({
5451
5592
  depth
5452
5593
  }) {
5453
5594
  const popoverRef = useRef12(null);
5454
- const [hoverOpen, setHoverOpen] = useState11(false);
5595
+ const [hoverOpen, setHoverOpen] = useState12(false);
5455
5596
  const timerRef = useRef12(void 0);
5456
5597
  useEffect13(() => {
5457
5598
  return () => clearTimeout(timerRef.current);
@@ -5600,7 +5741,7 @@ function StyledMenuItem({
5600
5741
  }
5601
5742
 
5602
5743
  // src/components/ui/Collapse.tsx
5603
- import { useState as useState12, useRef as useRef13, useEffect as useEffect14 } from "react";
5744
+ import { useState as useState13, useRef as useRef13, useEffect as useEffect14 } from "react";
5604
5745
  import { jsx as jsx24, jsxs as jsxs22 } from "react/jsx-runtime";
5605
5746
  function toArray(val) {
5606
5747
  if (val === void 0) return [];
@@ -5622,7 +5763,7 @@ function Collapse({
5622
5763
  }) {
5623
5764
  const config = useConfig();
5624
5765
  const size = sizeProp ?? config.size ?? "middle";
5625
- const [internalActive, setInternalActive] = useState12(
5766
+ const [internalActive, setInternalActive] = useState13(
5626
5767
  toArray(activeKey ?? defaultActiveKey)
5627
5768
  );
5628
5769
  const currentActive = activeKey !== void 0 ? toArray(activeKey) : internalActive;
@@ -5687,7 +5828,7 @@ function CollapsePanel({
5687
5828
  onToggle
5688
5829
  }) {
5689
5830
  const contentRef = useRef13(null);
5690
- const [height, setHeight] = useState12(void 0);
5831
+ const [height, setHeight] = useState13(void 0);
5691
5832
  const firstRender = useRef13(true);
5692
5833
  useEffect14(() => {
5693
5834
  if (firstRender.current) {
@@ -5763,7 +5904,7 @@ function CollapsePanel({
5763
5904
 
5764
5905
  // src/components/ui/ColorPicker.tsx
5765
5906
  import {
5766
- useState as useState13,
5907
+ useState as useState14,
5767
5908
  useRef as useRef14,
5768
5909
  useEffect as useEffect15,
5769
5910
  useCallback as useCallback9
@@ -5896,17 +6037,17 @@ function ColorPicker({
5896
6037
  const config = useConfig();
5897
6038
  const size = sizeProp ?? config.size ?? "middle";
5898
6039
  const disabled = disabledProp ?? config.disabled ?? false;
5899
- const [internalColor, setInternalColor] = useState13(
6040
+ const [internalColor, setInternalColor] = useState14(
5900
6041
  value ?? defaultValue ?? DEFAULT_COLOR
5901
6042
  );
5902
6043
  const currentHex = (value ?? internalColor).toLowerCase();
5903
- const [hsv, setHsv] = useState13(() => {
6044
+ const [hsv, setHsv] = useState14(() => {
5904
6045
  const [r, g, b] = hexToRgb(currentHex);
5905
6046
  return rgbToHsv(r, g, b);
5906
6047
  });
5907
- const [internalOpen, setInternalOpen] = useState13(false);
6048
+ const [internalOpen, setInternalOpen] = useState14(false);
5908
6049
  const isOpen = controlledOpen ?? internalOpen;
5909
- const [textInput, setTextInput] = useState13(formatColor(currentHex, format));
6050
+ const [textInput, setTextInput] = useState14(formatColor(currentHex, format));
5910
6051
  const wrapperRef = useRef14(null);
5911
6052
  const timerRef = useRef14(void 0);
5912
6053
  const satPanelRef = useRef14(null);
@@ -6189,7 +6330,7 @@ function ColorPicker({
6189
6330
  }
6190
6331
 
6191
6332
  // src/components/ui/Empty.tsx
6192
- import { jsx as jsx26, jsxs as jsxs24 } from "react/jsx-runtime";
6333
+ import { Fragment as Fragment5, jsx as jsx26, jsxs as jsxs24 } from "react/jsx-runtime";
6193
6334
  var DefaultImage = () => /* @__PURE__ */ jsx26("svg", { width: "64", height: "41", viewBox: "0 0 64 41", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsxs24("g", { fill: "none", fillRule: "evenodd", transform: "translate(0 1)", children: [
6194
6335
  /* @__PURE__ */ jsx26("ellipse", { cx: "32", cy: "33", rx: "32", ry: "7", fill: "currentColor", opacity: "0.08" }),
6195
6336
  /* @__PURE__ */ jsxs24("g", { fillRule: "nonzero", stroke: "currentColor", strokeOpacity: "0.25", children: [
@@ -6204,15 +6345,12 @@ var DefaultImage = () => /* @__PURE__ */ jsx26("svg", { width: "64", height: "41
6204
6345
  )
6205
6346
  ] })
6206
6347
  ] }) });
6207
- function Empty({
6208
- image,
6209
- description,
6210
- children,
6211
- className,
6212
- style,
6213
- unstyled
6214
- }) {
6215
- const localeDefault = useConfig().locale?.empty?.description ?? "No Data";
6348
+ function Empty({ image, description, children, className, style, unstyled }) {
6349
+ const config = useConfig();
6350
+ if (config.renderEmpty && image === void 0 && description === void 0 && children === void 0) {
6351
+ return /* @__PURE__ */ jsx26(Fragment5, { children: config.renderEmpty("Empty") });
6352
+ }
6353
+ const localeDefault = config.locale?.empty?.description ?? "No Data";
6216
6354
  const desc = description === void 0 ? localeDefault : description;
6217
6355
  if (unstyled) {
6218
6356
  return /* @__PURE__ */ jsxs24("div", { className, style, role: "status", children: [
@@ -6288,7 +6426,7 @@ function Result({
6288
6426
  }
6289
6427
 
6290
6428
  // src/components/ui/Skeleton.tsx
6291
- import { Fragment as Fragment4, jsx as jsx28, jsxs as jsxs26 } from "react/jsx-runtime";
6429
+ import { Fragment as Fragment6, jsx as jsx28, jsxs as jsxs26 } from "react/jsx-runtime";
6292
6430
  function Skeleton({
6293
6431
  active = false,
6294
6432
  avatar,
@@ -6301,7 +6439,7 @@ function Skeleton({
6301
6439
  unstyled
6302
6440
  }) {
6303
6441
  const loadingLabel = useConfig().locale?.skeleton?.loading ?? "Loading";
6304
- if (!loading) return /* @__PURE__ */ jsx28(Fragment4, { children });
6442
+ if (!loading) return /* @__PURE__ */ jsx28(Fragment6, { children });
6305
6443
  const avatarSize = typeof avatar === "object" ? avatar.size ?? 40 : 40;
6306
6444
  const avatarShape = typeof avatar === "object" ? avatar.shape ?? "circle" : "circle";
6307
6445
  const titleWidth = typeof title === "object" ? title.width ?? "38%" : "38%";
@@ -6360,7 +6498,7 @@ function Skeleton({
6360
6498
  }
6361
6499
 
6362
6500
  // src/components/ui/Segmented.tsx
6363
- import { useState as useState14 } from "react";
6501
+ import { useState as useState15 } from "react";
6364
6502
  import { jsx as jsx29, jsxs as jsxs27 } from "react/jsx-runtime";
6365
6503
  function normalizeOption(opt) {
6366
6504
  if (typeof opt === "string") return { label: opt, value: opt };
@@ -6382,7 +6520,7 @@ function Segmented({
6382
6520
  const size = sizeProp ?? config.size ?? "middle";
6383
6521
  const disabled = disabledProp ?? config.disabled ?? false;
6384
6522
  const normalized = options.map(normalizeOption);
6385
- const [internalValue, setInternalValue] = useState14(
6523
+ const [internalValue, setInternalValue] = useState15(
6386
6524
  value ?? defaultValue ?? normalized[0]?.value ?? ""
6387
6525
  );
6388
6526
  const currentValue = value ?? internalValue;
@@ -6605,7 +6743,7 @@ function Timeline({
6605
6743
  }
6606
6744
 
6607
6745
  // src/components/ui/Carousel.tsx
6608
- import { useState as useState15, useEffect as useEffect16, useCallback as useCallback10, Children } from "react";
6746
+ import { useState as useState16, useEffect as useEffect16, useCallback as useCallback10, Children } from "react";
6609
6747
  import { jsx as jsx32, jsxs as jsxs30 } from "react/jsx-runtime";
6610
6748
  function Carousel({
6611
6749
  autoplay = false,
@@ -6620,7 +6758,7 @@ function Carousel({
6620
6758
  }) {
6621
6759
  const slides = Children.toArray(children);
6622
6760
  const count = slides.length;
6623
- const [current, setCurrent] = useState15(0);
6761
+ const [current, setCurrent] = useState16(0);
6624
6762
  const slideLabel = useConfig().locale?.carousel?.slide ?? ((index) => `Slide ${index}`);
6625
6763
  const goTo = useCallback10(
6626
6764
  (index) => {
@@ -6788,7 +6926,7 @@ function Descriptions({
6788
6926
  }
6789
6927
 
6790
6928
  // src/components/complex/SchemaFormEditor/SchemaFormEditor.tsx
6791
- import { useEffect as useEffect17, useMemo as useMemo9, useState as useState17 } from "react";
6929
+ import { useEffect as useEffect17, useMemo as useMemo9, useState as useState18 } from "react";
6792
6930
 
6793
6931
  // src/components/complex/SchemaFormEditor/useSchemaEditor.ts
6794
6932
  import { useCallback as useCallback11, useMemo as useMemo5, useRef as useRef15, useSyncExternalStore } from "react";
@@ -7299,8 +7437,8 @@ function SchemaFormEditorPalette({
7299
7437
  }
7300
7438
 
7301
7439
  // src/components/complex/SchemaFormEditor/SchemaFormEditorCanvas.tsx
7302
- import { useCallback as useCallback12, useMemo as useMemo6, useRef as useRef16, useState as useState16 } from "react";
7303
- import { Fragment as Fragment5, jsx as jsx35, jsxs as jsxs33 } from "react/jsx-runtime";
7440
+ import { useCallback as useCallback12, useMemo as useMemo6, useRef as useRef16, useState as useState17 } from "react";
7441
+ import { Fragment as Fragment7, jsx as jsx35, jsxs as jsxs33 } from "react/jsx-runtime";
7304
7442
  function SchemaFormEditorCanvas({
7305
7443
  store,
7306
7444
  emptyText = "Drop a field here",
@@ -7326,7 +7464,7 @@ function SchemaFormEditorCanvas({
7326
7464
  () => fields.map((f) => `${f.id}:${f.name}:${f.type}:${String(f.defaultValue ?? "")}`).join("|"),
7327
7465
  [fields]
7328
7466
  );
7329
- const [dropIndicator, setDropIndicator] = useState16(null);
7467
+ const [dropIndicator, setDropIndicator] = useState17(null);
7330
7468
  const dragRef = useRef16(null);
7331
7469
  function handleDragOver(e) {
7332
7470
  if (e.dataTransfer.types.includes(PALETTE_DATA_TYPE) || e.dataTransfer.types.includes("text/plain") || dragRef.current !== null) {
@@ -7478,7 +7616,7 @@ function FieldOverlay({
7478
7616
  function handleDragLeave() {
7479
7617
  onIndicator(null);
7480
7618
  }
7481
- return /* @__PURE__ */ jsxs33(Fragment5, { children: [
7619
+ return /* @__PURE__ */ jsxs33(Fragment7, { children: [
7482
7620
  showIndicator && /* @__PURE__ */ jsx35("div", { className: "sg-sfe-canvas-drop-indicator", "data-testid": "sfe-drop-indicator" }),
7483
7621
  /* @__PURE__ */ jsxs33(
7484
7622
  "div",
@@ -7861,7 +7999,7 @@ function SchemaFormEditor({
7861
7999
  const internalOptions = { initialSchema, onChange };
7862
8000
  const internalStore = useSchemaEditor(internalOptions);
7863
8001
  const store = externalStore ?? internalStore;
7864
- const [bottomTab, setBottomTab] = useState17("preview");
8002
+ const [bottomTab, setBottomTab] = useState18("preview");
7865
8003
  useEffect17(() => {
7866
8004
  function onKey(e) {
7867
8005
  const target = e.target;
@@ -8012,7 +8150,7 @@ import {
8012
8150
  useImperativeHandle,
8013
8151
  useMemo as useMemo11,
8014
8152
  useRef as useRef18,
8015
- useState as useState18
8153
+ useState as useState19
8016
8154
  } from "react";
8017
8155
  import {
8018
8156
  routeOrthogonal,
@@ -8272,10 +8410,10 @@ function DiagramInner({
8272
8410
  nodes.forEach((n, i) => m.set(n.id, allBounds[i]));
8273
8411
  return m;
8274
8412
  }, [nodes, allBounds]);
8275
- const [view, setView] = useState18({ zoom: 1, panX: 0, panY: 0 });
8413
+ const [view, setView] = useState19({ zoom: 1, panX: 0, panY: 0 });
8276
8414
  const wrapperRef = useRef18(null);
8277
8415
  const isSelectionControlled = selection !== void 0;
8278
- const [internalSelection, setInternalSelection] = useState18(
8416
+ const [internalSelection, setInternalSelection] = useState19(
8279
8417
  () => defaultSelection ?? []
8280
8418
  );
8281
8419
  const currentSelection = isSelectionControlled ? selection : internalSelection;
@@ -8338,7 +8476,7 @@ function DiagramInner({
8338
8476
  height: "100%"
8339
8477
  };
8340
8478
  const dragRef = useRef18(null);
8341
- const [draggingId, setDraggingId] = useState18(null);
8479
+ const [draggingId, setDraggingId] = useState19(null);
8342
8480
  const DRAG_THRESHOLD_PX = 0.5;
8343
8481
  function applyMove(id, x, y) {
8344
8482
  let nx = x;
@@ -8451,7 +8589,7 @@ function DiagramInner({
8451
8589
  }));
8452
8590
  }
8453
8591
  }
8454
- const [lasso, setLasso] = useState18(null);
8592
+ const [lasso, setLasso] = useState19(null);
8455
8593
  const lassoRef = useRef18(null);
8456
8594
  const boundsByIdRef = useRef18(boundsById);
8457
8595
  useEffect18(() => {
@@ -8612,8 +8750,8 @@ function DiagramInner({
8612
8750
  onEdgeContextMenu(e, edge);
8613
8751
  };
8614
8752
  }
8615
- const [hoveredNode, setHoveredNode] = useState18(null);
8616
- const [hoveredEdge, setHoveredEdge] = useState18(null);
8753
+ const [hoveredNode, setHoveredNode] = useState19(null);
8754
+ const [hoveredEdge, setHoveredEdge] = useState19(null);
8617
8755
  const nodeHoverShowTimer = useRef18(null);
8618
8756
  const nodeHoverHideTimer = useRef18(null);
8619
8757
  const edgeHoverShowTimer = useRef18(null);
@@ -8916,7 +9054,7 @@ import {
8916
9054
  useEffect as useEffect19,
8917
9055
  useMemo as useMemo12,
8918
9056
  useRef as useRef19,
8919
- useState as useState19
9057
+ useState as useState20
8920
9058
  } from "react";
8921
9059
  import { jsx as jsx41, jsxs as jsxs37 } from "react/jsx-runtime";
8922
9060
  function Dashboard({
@@ -8931,7 +9069,7 @@ function Dashboard({
8931
9069
  onDashboardContextMenu
8932
9070
  }) {
8933
9071
  const dashboardLocale = useConfig().locale?.dashboard;
8934
- const [maximizedId, setMaximizedId] = useState19(null);
9072
+ const [maximizedId, setMaximizedId] = useState20(null);
8935
9073
  const wrapperClass = unstyled ? className : ["sg-dashboard", className].filter(Boolean).join(" ");
8936
9074
  const gridStyle = {
8937
9075
  display: "grid",
@@ -8980,8 +9118,8 @@ function DashboardWidgetView({
8980
9118
  defaultActions
8981
9119
  }) {
8982
9120
  const dashboardLocale = useConfig().locale?.dashboard;
8983
- const [hovered, setHovered] = useState19(false);
8984
- const [menuOpen, setMenuOpen] = useState19(false);
9121
+ const [hovered, setHovered] = useState20(false);
9122
+ const [menuOpen, setMenuOpen] = useState20(false);
8985
9123
  const widgetClass = unstyled ? widget.className : ["sg-dashboard-widget", widget.className].filter(Boolean).join(" ");
8986
9124
  const widgetStyle = isMaximized ? {
8987
9125
  gridColumn: `1 / span ${totalColumns}`,
@@ -9175,7 +9313,7 @@ function MoreIcon() {
9175
9313
  import {
9176
9314
  useMemo as useMemo13,
9177
9315
  useRef as useRef20,
9178
- useState as useState20
9316
+ useState as useState21
9179
9317
  } from "react";
9180
9318
  import { jsx as jsx42 } from "react/jsx-runtime";
9181
9319
  var MIN_W = 1;
@@ -9202,7 +9340,7 @@ function DashboardEditor({
9202
9340
  const dashboardLocale = useConfig().locale?.dashboard;
9203
9341
  const gridRef = useRef20(null);
9204
9342
  const dragRef = useRef20(null);
9205
- const [maximizedId, setMaximizedId] = useState20(null);
9343
+ const [maximizedId, setMaximizedId] = useState21(null);
9206
9344
  const widgetsRef = useRef20(widgets);
9207
9345
  widgetsRef.current = widgets;
9208
9346
  const onChangeRef = useRef20(onLayoutChange);
@@ -9841,7 +9979,7 @@ import {
9841
9979
  useEffect as useEffect20,
9842
9980
  useMemo as useMemo15,
9843
9981
  useRef as useRef22,
9844
- useState as useState21
9982
+ useState as useState22
9845
9983
  } from "react";
9846
9984
  import { detectConflicts, isAvailable } from "@skygraph/core";
9847
9985
  import { jsx as jsx44, jsxs as jsxs39 } from "react/jsx-runtime";
@@ -9931,7 +10069,7 @@ function ResourceCalendar({
9931
10069
  onChangeRef.current = onAssignmentChange;
9932
10070
  const onConflictRef = useRef22(onConflict);
9933
10071
  onConflictRef.current = onConflict;
9934
- const [ghost, setGhost] = useState21(null);
10072
+ const [ghost, setGhost] = useState22(null);
9935
10073
  const step = STEP_MS2[scale];
9936
10074
  const resolvedRange = useMemo15(
9937
10075
  () => resolveRange(assignments, step, range),
@@ -10387,8 +10525,8 @@ function ResourceCalendar({
10387
10525
  }
10388
10526
 
10389
10527
  // src/components/complex/Timeline/Timeline.tsx
10390
- import { Fragment as Fragment6, useMemo as useMemo16 } from "react";
10391
- import { Fragment as Fragment7, jsx as jsx45, jsxs as jsxs40 } from "react/jsx-runtime";
10528
+ import { Fragment as Fragment8, useMemo as useMemo16 } from "react";
10529
+ import { Fragment as Fragment9, jsx as jsx45, jsxs as jsxs40 } from "react/jsx-runtime";
10392
10530
  function toMs3(v) {
10393
10531
  return v instanceof Date ? v.getTime() : v;
10394
10532
  }
@@ -10469,7 +10607,7 @@ function EventTimeline({
10469
10607
  "aria-label": timelineLocale?.ariaLabel ?? "Timeline",
10470
10608
  "data-orientation": orientation,
10471
10609
  "data-group-by": groupBy ?? "none",
10472
- children: groups.map((group) => /* @__PURE__ */ jsxs40(Fragment6, { children: [
10610
+ children: groups.map((group) => /* @__PURE__ */ jsxs40(Fragment8, { children: [
10473
10611
  groupBy && /* @__PURE__ */ jsx45(
10474
10612
  "div",
10475
10613
  {
@@ -10487,7 +10625,7 @@ function EventTimeline({
10487
10625
  "aria-hidden": "true"
10488
10626
  }
10489
10627
  );
10490
- const body = renderEvent ? renderEvent(ev) : /* @__PURE__ */ jsxs40(Fragment7, { children: [
10628
+ const body = renderEvent ? renderEvent(ev) : /* @__PURE__ */ jsxs40(Fragment9, { children: [
10491
10629
  /* @__PURE__ */ jsx45("div", { className: unstyled ? void 0 : "sg-event-timeline-title", children: ev.title }),
10492
10630
  ev.description !== void 0 && /* @__PURE__ */ jsx45("div", { className: unstyled ? void 0 : "sg-event-timeline-description", children: ev.description })
10493
10631
  ] });
@@ -10628,7 +10766,7 @@ function ChartLegend({ series, className, style }) {
10628
10766
  }
10629
10767
 
10630
10768
  // src/components/complex/Charts/ChartCrosshair.tsx
10631
- import { Fragment as Fragment8 } from "react";
10769
+ import { Fragment as Fragment10 } from "react";
10632
10770
  import { jsx as jsx47, jsxs as jsxs42 } from "react/jsx-runtime";
10633
10771
  var TIP_WIDTH = 140;
10634
10772
  var TIP_LINE_HEIGHT = 14;
@@ -10722,7 +10860,7 @@ function ChartCrosshair({
10722
10860
  ),
10723
10861
  points.map((p, i) => {
10724
10862
  const rowY = tipY + TIP_PADDING + headerHeight + i * TIP_LINE_HEIGHT;
10725
- return /* @__PURE__ */ jsxs42(Fragment8, { children: [
10863
+ return /* @__PURE__ */ jsxs42(Fragment10, { children: [
10726
10864
  /* @__PURE__ */ jsx47(
10727
10865
  "rect",
10728
10866
  {
@@ -10767,7 +10905,7 @@ function ChartCrosshair({
10767
10905
  }
10768
10906
 
10769
10907
  // src/components/complex/Charts/ChartBrush.tsx
10770
- import { useMemo as useMemo17, useRef as useRef23, useState as useState22 } from "react";
10908
+ import { useMemo as useMemo17, useRef as useRef23, useState as useState23 } from "react";
10771
10909
  import { jsx as jsx48, jsxs as jsxs43 } from "react/jsx-runtime";
10772
10910
  function resolveBrushConfig(brush) {
10773
10911
  if (brush == null || brush === false) return null;
@@ -10803,7 +10941,7 @@ function ChartBrush({
10803
10941
  disabled
10804
10942
  }) {
10805
10943
  const overlayRef = useRef23(null);
10806
- const [drag, setDrag] = useState22(null);
10944
+ const [drag, setDrag] = useState23(null);
10807
10945
  const cls4 = (suffix) => unstyled ? void 0 : `sg-chart-brush-${suffix}`;
10808
10946
  const clientToCategoryIndex = (clientX) => {
10809
10947
  const overlay = overlayRef.current;
@@ -10948,10 +11086,10 @@ function ChartBrush({
10948
11086
  }
10949
11087
 
10950
11088
  // src/components/complex/Charts/LineChart.tsx
10951
- import { forwardRef as forwardRef2, useMemo as useMemo19, useRef as useRef26, useState as useState24 } from "react";
11089
+ import { forwardRef as forwardRef2, useMemo as useMemo19, useRef as useRef26, useState as useState25 } from "react";
10952
11090
 
10953
11091
  // src/components/complex/Charts/ChartAxes.tsx
10954
- import { Fragment as Fragment9 } from "react";
11092
+ import { Fragment as Fragment11 } from "react";
10955
11093
  import { jsx as jsx49, jsxs as jsxs44 } from "react/jsx-runtime";
10956
11094
  var DEFAULT_Y_TICKS = 5;
10957
11095
  var TICK_LEN = 4;
@@ -11046,7 +11184,7 @@ function ChartAxes({
11046
11184
  strokeWidth: 1
11047
11185
  }
11048
11186
  ),
11049
- yTicks.map((t, i) => /* @__PURE__ */ jsxs44(Fragment9, { children: [
11187
+ yTicks.map((t, i) => /* @__PURE__ */ jsxs44(Fragment11, { children: [
11050
11188
  /* @__PURE__ */ jsx49(
11051
11189
  "line",
11052
11190
  {
@@ -11106,7 +11244,7 @@ function ChartAxes({
11106
11244
  const cx = xFor(idx);
11107
11245
  const cat = categories[idx];
11108
11246
  const text = xFmt ? xFmt(cat, idx) : String(cat);
11109
- return /* @__PURE__ */ jsxs44(Fragment9, { children: [
11247
+ return /* @__PURE__ */ jsxs44(Fragment11, { children: [
11110
11248
  /* @__PURE__ */ jsx49(
11111
11249
  "line",
11112
11250
  {
@@ -11178,9 +11316,9 @@ function useChartPrint(forwardedRef, printable) {
11178
11316
  }
11179
11317
 
11180
11318
  // src/components/complex/Charts/useChartSize.ts
11181
- import { useEffect as useEffect21, useRef as useRef25, useState as useState23 } from "react";
11319
+ import { useEffect as useEffect21, useRef as useRef25, useState as useState24 } from "react";
11182
11320
  function useChartSize(ref, fallback) {
11183
- const [size, setSize] = useState23(fallback);
11321
+ const [size, setSize] = useState24(fallback);
11184
11322
  const lastRef = useRef25(size);
11185
11323
  useEffect21(() => {
11186
11324
  const el = ref.current;
@@ -11327,7 +11465,7 @@ function downloadSvgAsPng(svg, fileNameOrOpts = "chart.png") {
11327
11465
  }
11328
11466
 
11329
11467
  // src/components/complex/Charts/ChartHoverToolbar.tsx
11330
- import { Fragment as Fragment10, jsx as jsx50, jsxs as jsxs45 } from "react/jsx-runtime";
11468
+ import { Fragment as Fragment12, jsx as jsx50, jsxs as jsxs45 } from "react/jsx-runtime";
11331
11469
  function IconStroke(props) {
11332
11470
  return /* @__PURE__ */ jsxs45(
11333
11471
  "svg",
@@ -11352,7 +11490,7 @@ var PRINT_ICON = /* @__PURE__ */ jsx50(
11352
11490
  IconStroke,
11353
11491
  {
11354
11492
  d: "M4 6V2.5h8V6",
11355
- extra: /* @__PURE__ */ jsxs45(Fragment10, { children: [
11493
+ extra: /* @__PURE__ */ jsxs45(Fragment12, { children: [
11356
11494
  /* @__PURE__ */ jsx50("rect", { x: 3, y: 6, width: 10, height: 6, rx: 1 }),
11357
11495
  /* @__PURE__ */ jsx50("path", { d: "M4.5 10h7v3.5h-7z" })
11358
11496
  ] })
@@ -11362,7 +11500,7 @@ var SVG_ICON = /* @__PURE__ */ jsx50(
11362
11500
  IconStroke,
11363
11501
  {
11364
11502
  d: "M3 8.5v3.25A1.25 1.25 0 0 0 4.25 13h7.5A1.25 1.25 0 0 0 13 11.75V8.5",
11365
- extra: /* @__PURE__ */ jsxs45(Fragment10, { children: [
11503
+ extra: /* @__PURE__ */ jsxs45(Fragment12, { children: [
11366
11504
  /* @__PURE__ */ jsx50("path", { d: "M8 2.5v7" }),
11367
11505
  /* @__PURE__ */ jsx50("path", { d: "M5 6.5l3 3 3-3" })
11368
11506
  ] })
@@ -11372,7 +11510,7 @@ var PNG_ICON = /* @__PURE__ */ jsx50(
11372
11510
  IconStroke,
11373
11511
  {
11374
11512
  d: "M2.5 3.5h11v9h-11z",
11375
- extra: /* @__PURE__ */ jsxs45(Fragment10, { children: [
11513
+ extra: /* @__PURE__ */ jsxs45(Fragment12, { children: [
11376
11514
  /* @__PURE__ */ jsx50("circle", { cx: 5.5, cy: 6.5, r: 0.9 }),
11377
11515
  /* @__PURE__ */ jsx50("path", { d: "M2.5 11l3-3 2.5 2.5L10.5 8l3 3" })
11378
11516
  ] })
@@ -11382,7 +11520,7 @@ var RESET_ICON = /* @__PURE__ */ jsx50(
11382
11520
  IconStroke,
11383
11521
  {
11384
11522
  d: "M3 8a5 5 0 1 0 1.5-3.5",
11385
- extra: /* @__PURE__ */ jsx50(Fragment10, { children: /* @__PURE__ */ jsx50("path", { d: "M3 3v3h3" }) })
11523
+ extra: /* @__PURE__ */ jsx50(Fragment12, { children: /* @__PURE__ */ jsx50("path", { d: "M3 3v3h3" }) })
11386
11524
  }
11387
11525
  );
11388
11526
  function defaultChartActions(opts) {
@@ -11563,10 +11701,10 @@ function LineChartInner({
11563
11701
  const animClass = anim.enabled && !unstyled ? "sg-chart-line-animate" : void 0;
11564
11702
  const crosshairEnabled = crosshair !== false && categories.length > 0;
11565
11703
  const crosshairFmt = typeof crosshair === "object" && crosshair !== null ? crosshair.valueFormatter : void 0;
11566
- const [hoverIdx, setHoverIdx] = useState24(null);
11704
+ const [hoverIdx, setHoverIdx] = useState25(null);
11567
11705
  const brushConfig = resolveBrushConfig(brush);
11568
11706
  const isBrushControlled = brushConfig != null && "range" in brushConfig;
11569
- const [internalBrushRange, setInternalBrushRange] = useState24(
11707
+ const [internalBrushRange, setInternalBrushRange] = useState25(
11570
11708
  brushConfig?.defaultRange ?? null
11571
11709
  );
11572
11710
  const effectiveBrushRange = isBrushControlled ? brushConfig.range ?? null : internalBrushRange;
@@ -11614,7 +11752,7 @@ function LineChartInner({
11614
11752
  brushConfig.onRangeChange?.(null);
11615
11753
  } : void 0;
11616
11754
  const resolvedActions = resolveChartActions(actions, { fileName, brushReset });
11617
- const [toolbarVisible, setToolbarVisible] = useState24(false);
11755
+ const [toolbarVisible, setToolbarVisible] = useState25(false);
11618
11756
  const handleSvgContextMenu = makeChartContextMenuHandler(onChartContextMenu);
11619
11757
  const setSvgRef = (el) => {
11620
11758
  svgRef.current = el;
@@ -11786,7 +11924,7 @@ var LineChart = forwardRef2(LineChartInner);
11786
11924
  LineChart.displayName = "LineChart";
11787
11925
 
11788
11926
  // src/components/complex/Charts/BarChart.tsx
11789
- import { forwardRef as forwardRef3, useMemo as useMemo20, useRef as useRef27, useState as useState25 } from "react";
11927
+ import { forwardRef as forwardRef3, useMemo as useMemo20, useRef as useRef27, useState as useState26 } from "react";
11790
11928
  import { jsx as jsx52, jsxs as jsxs47 } from "react/jsx-runtime";
11791
11929
  function BarChartInner({
11792
11930
  categories,
@@ -11844,7 +11982,7 @@ function BarChartInner({
11844
11982
  const animClass = anim.enabled && !unstyled ? "sg-chart-bar-animate" : void 0;
11845
11983
  const brushConfig = resolveBrushConfig(brush);
11846
11984
  const isBrushControlled = brushConfig != null && "range" in brushConfig;
11847
- const [internalBrushRange, setInternalBrushRange] = useState25(
11985
+ const [internalBrushRange, setInternalBrushRange] = useState26(
11848
11986
  brushConfig?.defaultRange ?? null
11849
11987
  );
11850
11988
  const effectiveBrushRange = isBrushControlled ? brushConfig.range ?? null : internalBrushRange;
@@ -11857,7 +11995,7 @@ function BarChartInner({
11857
11995
  brushConfig.onRangeChange?.(null);
11858
11996
  } : void 0;
11859
11997
  const resolvedActions = resolveChartActions(actions, { fileName, brushReset });
11860
- const [toolbarVisible, setToolbarVisible] = useState25(false);
11998
+ const [toolbarVisible, setToolbarVisible] = useState26(false);
11861
11999
  const handleSvgContextMenu = makeChartContextMenuHandler(onChartContextMenu);
11862
12000
  const setSvgRef = (el) => {
11863
12001
  svgRef.current = el;
@@ -11994,7 +12132,7 @@ var BarChart = forwardRef3(BarChartInner);
11994
12132
  BarChart.displayName = "BarChart";
11995
12133
 
11996
12134
  // src/components/complex/Charts/AreaChart.tsx
11997
- import { forwardRef as forwardRef4, useMemo as useMemo21, useRef as useRef28, useState as useState26 } from "react";
12135
+ import { forwardRef as forwardRef4, useMemo as useMemo21, useRef as useRef28, useState as useState27 } from "react";
11998
12136
  import { jsx as jsx53, jsxs as jsxs48 } from "react/jsx-runtime";
11999
12137
  function AreaChartInner({
12000
12138
  categories,
@@ -12071,7 +12209,7 @@ function AreaChartInner({
12071
12209
  const animClass = anim.enabled && !unstyled ? "sg-chart-area-animate" : void 0;
12072
12210
  const brushConfig = resolveBrushConfig(brush);
12073
12211
  const isBrushControlled = brushConfig != null && "range" in brushConfig;
12074
- const [internalBrushRange, setInternalBrushRange] = useState26(
12212
+ const [internalBrushRange, setInternalBrushRange] = useState27(
12075
12213
  brushConfig?.defaultRange ?? null
12076
12214
  );
12077
12215
  const effectiveBrushRange = isBrushControlled ? brushConfig.range ?? null : internalBrushRange;
@@ -12084,7 +12222,7 @@ function AreaChartInner({
12084
12222
  brushConfig.onRangeChange?.(null);
12085
12223
  } : void 0;
12086
12224
  const resolvedActions = resolveChartActions(actions, { fileName, brushReset });
12087
- const [toolbarVisible, setToolbarVisible] = useState26(false);
12225
+ const [toolbarVisible, setToolbarVisible] = useState27(false);
12088
12226
  const handleSvgContextMenu = makeChartContextMenuHandler(onChartContextMenu);
12089
12227
  const setSvgRef = (el) => {
12090
12228
  svgRef.current = el;
@@ -12218,7 +12356,7 @@ var AreaChart = forwardRef4(AreaChartInner);
12218
12356
  AreaChart.displayName = "AreaChart";
12219
12357
 
12220
12358
  // src/components/complex/Charts/PieChart.tsx
12221
- import { forwardRef as forwardRef5, useMemo as useMemo22, useRef as useRef29, useState as useState27 } from "react";
12359
+ import { forwardRef as forwardRef5, useMemo as useMemo22, useRef as useRef29, useState as useState28 } from "react";
12222
12360
  import { jsx as jsx54, jsxs as jsxs49 } from "react/jsx-runtime";
12223
12361
  function PieChartInner({
12224
12362
  data,
@@ -12256,7 +12394,7 @@ function PieChartInner({
12256
12394
  animationDuration: `${anim.duration}ms`
12257
12395
  } : void 0;
12258
12396
  const resolvedActions = resolveChartActions(actions, { fileName });
12259
- const [toolbarVisible, setToolbarVisible] = useState27(false);
12397
+ const [toolbarVisible, setToolbarVisible] = useState28(false);
12260
12398
  const handleSvgContextMenu = makeChartContextMenuHandler(onChartContextMenu);
12261
12399
  const setSvgRef = (el) => {
12262
12400
  svgRef.current = el;
@@ -13137,7 +13275,7 @@ function Transfer({
13137
13275
  }
13138
13276
 
13139
13277
  // src/components/ui/Mentions.tsx
13140
- import { useState as useState28, useRef as useRef30, useEffect as useEffect22, useMemo as useMemo23, useCallback as useCallback18 } from "react";
13278
+ import { useState as useState29, useRef as useRef30, useEffect as useEffect22, useMemo as useMemo23, useCallback as useCallback18 } from "react";
13141
13279
  import { jsx as jsx58, jsxs as jsxs53 } from "react/jsx-runtime";
13142
13280
  function Mentions({
13143
13281
  value,
@@ -13163,10 +13301,10 @@ function Mentions({
13163
13301
  () => Array.isArray(prefixConfig) ? prefixConfig : [prefixConfig],
13164
13302
  [prefixConfig]
13165
13303
  );
13166
- const [internalValue, setInternalValue] = useState28(value ?? defaultValue);
13304
+ const [internalValue, setInternalValue] = useState29(value ?? defaultValue);
13167
13305
  const currentValue = value ?? internalValue;
13168
- const [mentionState, setMentionState] = useState28(null);
13169
- const [activeIndex, setActiveIndex] = useState28(0);
13306
+ const [mentionState, setMentionState] = useState29(null);
13307
+ const [activeIndex, setActiveIndex] = useState29(0);
13170
13308
  const textareaRef = useRef30(null);
13171
13309
  const dropdownRef = useRef30(null);
13172
13310
  const filteredOptions = useMemo23(() => {
@@ -13288,7 +13426,7 @@ function Mentions({
13288
13426
  }
13289
13427
 
13290
13428
  // src/components/ui/InputPassword.tsx
13291
- import { useState as useState29 } from "react";
13429
+ import { useState as useState30 } from "react";
13292
13430
  import { jsx as jsx59, jsxs as jsxs54 } from "react/jsx-runtime";
13293
13431
  function getStrength(password) {
13294
13432
  if (!password || password.length < 4) return "weak";
@@ -13331,8 +13469,8 @@ function InputPassword({
13331
13469
  const config = useConfig();
13332
13470
  const size = sizeProp ?? config.size ?? "middle";
13333
13471
  const disabled = disabledProp ?? config.disabled ?? false;
13334
- const [visible, setVisible] = useState29(false);
13335
- const [internal, setInternal] = useState29(defaultValue ?? "");
13472
+ const [visible, setVisible] = useState30(false);
13473
+ const [internal, setInternal] = useState30(defaultValue ?? "");
13336
13474
  const current = value ?? internal;
13337
13475
  const labels = { ...defaultStrengthLabels, ...strengthLabels };
13338
13476
  const handleChange = (v) => {
@@ -13413,7 +13551,7 @@ function InputPassword({
13413
13551
  }
13414
13552
 
13415
13553
  // src/components/ui/SearchInput.tsx
13416
- import { useState as useState30, useRef as useRef31 } from "react";
13554
+ import { useState as useState31, useRef as useRef31 } from "react";
13417
13555
  import { jsx as jsx60, jsxs as jsxs55 } from "react/jsx-runtime";
13418
13556
  function SearchInput({
13419
13557
  value,
@@ -13435,7 +13573,7 @@ function SearchInput({
13435
13573
  const config = useConfig();
13436
13574
  const size = sizeProp ?? config.size ?? "middle";
13437
13575
  const disabled = disabledProp ?? config.disabled ?? false;
13438
- const [internal, setInternal] = useState30(defaultValue ?? "");
13576
+ const [internal, setInternal] = useState31(defaultValue ?? "");
13439
13577
  const current = value ?? internal;
13440
13578
  const inputRef = useRef31(null);
13441
13579
  const handleChange = (v) => {
@@ -13521,7 +13659,7 @@ function SearchInput({
13521
13659
  }
13522
13660
 
13523
13661
  // src/components/ui/TagInput.tsx
13524
- import { useState as useState31, useRef as useRef32, useId as useId5 } from "react";
13662
+ import { useState as useState32, useRef as useRef32, useId as useId5 } from "react";
13525
13663
  import { jsx as jsx61, jsxs as jsxs56 } from "react/jsx-runtime";
13526
13664
  function TagInput({
13527
13665
  value,
@@ -13545,8 +13683,8 @@ function TagInput({
13545
13683
  const size = sizeProp ?? config.size ?? "middle";
13546
13684
  const disabled = disabledProp ?? config.disabled ?? false;
13547
13685
  const removeTagLabel = config.locale?.tagInput?.removeTag ?? ((tag) => `Remove ${tag}`);
13548
- const [internalTags, setInternalTags] = useState31(defaultValue);
13549
- const [inputValue, setInputValue] = useState31("");
13686
+ const [internalTags, setInternalTags] = useState32(defaultValue);
13687
+ const [inputValue, setInputValue] = useState32("");
13550
13688
  const inputRef = useRef32(null);
13551
13689
  const id = useId5();
13552
13690
  const tags = value ?? internalTags;
@@ -13658,7 +13796,7 @@ function TagInput({
13658
13796
  }
13659
13797
 
13660
13798
  // src/components/ui/PinInput.tsx
13661
- import { useState as useState32, useRef as useRef33, useCallback as useCallback19, useId as useId6 } from "react";
13799
+ import { useState as useState33, useRef as useRef33, useCallback as useCallback19, useId as useId6 } from "react";
13662
13800
  import { jsx as jsx62 } from "react/jsx-runtime";
13663
13801
  function PinInput({
13664
13802
  length = 6,
@@ -13683,7 +13821,7 @@ function PinInput({
13683
13821
  const disabled = disabledProp ?? config.disabled ?? false;
13684
13822
  const id = useId6();
13685
13823
  const pad2 = (s) => s.padEnd(length, "").slice(0, length);
13686
- const [internal, setInternal] = useState32(() => pad2(defaultValue));
13824
+ const [internal, setInternal] = useState33(() => pad2(defaultValue));
13687
13825
  const current = value !== void 0 ? pad2(value) : internal;
13688
13826
  const refs = useRef33([]);
13689
13827
  const pattern = type === "numeric" ? /^\d$/ : /^[a-zA-Z0-9]$/;
@@ -13794,8 +13932,8 @@ function PinInput({
13794
13932
  }
13795
13933
 
13796
13934
  // src/components/ui/InlineEdit.tsx
13797
- import { useState as useState33, useRef as useRef34, useEffect as useEffect23 } from "react";
13798
- import { Fragment as Fragment11, jsx as jsx63, jsxs as jsxs57 } from "react/jsx-runtime";
13935
+ import { useState as useState34, useRef as useRef34, useEffect as useEffect23 } from "react";
13936
+ import { Fragment as Fragment13, jsx as jsx63, jsxs as jsxs57 } from "react/jsx-runtime";
13799
13937
  function InlineEdit({
13800
13938
  value,
13801
13939
  defaultValue = "",
@@ -13816,9 +13954,9 @@ function InlineEdit({
13816
13954
  const config = useConfig();
13817
13955
  const size = sizeProp ?? config.size ?? "middle";
13818
13956
  const disabled = disabledProp ?? config.disabled ?? false;
13819
- const [editing, setEditing] = useState33(false);
13820
- const [internal, setInternal] = useState33(defaultValue);
13821
- const [draft, setDraft] = useState33("");
13957
+ const [editing, setEditing] = useState34(false);
13958
+ const [internal, setInternal] = useState34(defaultValue);
13959
+ const [draft, setDraft] = useState34("");
13822
13960
  const inputRef = useRef34(null);
13823
13961
  const current = value ?? internal;
13824
13962
  useEffect23(() => {
@@ -13851,7 +13989,7 @@ function InlineEdit({
13851
13989
  };
13852
13990
  if (!editing) {
13853
13991
  if (renderView) {
13854
- return /* @__PURE__ */ jsx63(Fragment11, { children: renderView(current, startEditing) });
13992
+ return /* @__PURE__ */ jsx63(Fragment13, { children: renderView(current, startEditing) });
13855
13993
  }
13856
13994
  if (unstyled) {
13857
13995
  return /* @__PURE__ */ jsx63(
@@ -13900,7 +14038,7 @@ function InlineEdit({
13900
14038
  onBlur: saveOnBlur ? save : void 0
13901
14039
  }
13902
14040
  ),
13903
- showButtons && /* @__PURE__ */ jsxs57(Fragment11, { children: [
14041
+ showButtons && /* @__PURE__ */ jsxs57(Fragment13, { children: [
13904
14042
  /* @__PURE__ */ jsx63("button", { type: "button", onClick: save, children: "\u2713" }),
13905
14043
  /* @__PURE__ */ jsx63("button", { type: "button", onClick: cancel, children: "\u2715" })
13906
14044
  ] })
@@ -14078,6 +14216,7 @@ export {
14078
14216
  VirtualList,
14079
14217
  buildPageRule,
14080
14218
  buildPrintHtml,
14219
+ buildThemeVars,
14081
14220
  chartDataKey,
14082
14221
  colorForSeries,
14083
14222
  createEmptyEditorSchema,
@@ -14110,6 +14249,7 @@ export {
14110
14249
  useChartSize,
14111
14250
  useComputed,
14112
14251
  useConfig,
14252
+ useConfigWithDefaults,
14113
14253
  useField,
14114
14254
  useFieldArray,
14115
14255
  useForm,