@skygraph/react 0.5.2 → 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 +1293 -935
  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 +255 -131
  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 +2 -2
  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();
@@ -5131,7 +5256,7 @@ function Progress({
5131
5256
  }
5132
5257
 
5133
5258
  // src/components/ui/Menu.tsx
5134
- 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";
5135
5260
  import { jsx as jsx23, jsxs as jsxs21 } from "react/jsx-runtime";
5136
5261
  function collectNavigableItems(items2, openKeys, mode, out = []) {
5137
5262
  for (const item of items2) {
@@ -5184,10 +5309,10 @@ function Menu({
5184
5309
  style,
5185
5310
  unstyled
5186
5311
  }) {
5187
- const [internalSelected, setInternalSelected] = useState11(
5312
+ const [internalSelected, setInternalSelected] = useState12(
5188
5313
  selectedKeys ?? defaultSelectedKeys
5189
5314
  );
5190
- const [internalOpen, setInternalOpen] = useState11(
5315
+ const [internalOpen, setInternalOpen] = useState12(
5191
5316
  openKeys ?? defaultOpenKeys
5192
5317
  );
5193
5318
  const rootRef = useRef12(null);
@@ -5195,7 +5320,7 @@ function Menu({
5195
5320
  const currentOpen = openKeys ?? internalOpen;
5196
5321
  const navigable = collectNavigableItems(items2, currentOpen, mode);
5197
5322
  const initialActive = currentSelected.find((k) => navigable.some((n) => n.key === k)) ?? navigable[0]?.key ?? "";
5198
- const [activeKey, setActiveKey] = useState11(initialActive);
5323
+ const [activeKey, setActiveKey] = useState12(initialActive);
5199
5324
  useEffect13(() => {
5200
5325
  if (!activeKey || !navigable.some((n) => n.key === activeKey)) {
5201
5326
  setActiveKey(navigable[0]?.key ?? "");
@@ -5467,7 +5592,7 @@ function StyledMenuItem({
5467
5592
  depth
5468
5593
  }) {
5469
5594
  const popoverRef = useRef12(null);
5470
- const [hoverOpen, setHoverOpen] = useState11(false);
5595
+ const [hoverOpen, setHoverOpen] = useState12(false);
5471
5596
  const timerRef = useRef12(void 0);
5472
5597
  useEffect13(() => {
5473
5598
  return () => clearTimeout(timerRef.current);
@@ -5616,7 +5741,7 @@ function StyledMenuItem({
5616
5741
  }
5617
5742
 
5618
5743
  // src/components/ui/Collapse.tsx
5619
- 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";
5620
5745
  import { jsx as jsx24, jsxs as jsxs22 } from "react/jsx-runtime";
5621
5746
  function toArray(val) {
5622
5747
  if (val === void 0) return [];
@@ -5638,7 +5763,7 @@ function Collapse({
5638
5763
  }) {
5639
5764
  const config = useConfig();
5640
5765
  const size = sizeProp ?? config.size ?? "middle";
5641
- const [internalActive, setInternalActive] = useState12(
5766
+ const [internalActive, setInternalActive] = useState13(
5642
5767
  toArray(activeKey ?? defaultActiveKey)
5643
5768
  );
5644
5769
  const currentActive = activeKey !== void 0 ? toArray(activeKey) : internalActive;
@@ -5703,7 +5828,7 @@ function CollapsePanel({
5703
5828
  onToggle
5704
5829
  }) {
5705
5830
  const contentRef = useRef13(null);
5706
- const [height, setHeight] = useState12(void 0);
5831
+ const [height, setHeight] = useState13(void 0);
5707
5832
  const firstRender = useRef13(true);
5708
5833
  useEffect14(() => {
5709
5834
  if (firstRender.current) {
@@ -5779,7 +5904,7 @@ function CollapsePanel({
5779
5904
 
5780
5905
  // src/components/ui/ColorPicker.tsx
5781
5906
  import {
5782
- useState as useState13,
5907
+ useState as useState14,
5783
5908
  useRef as useRef14,
5784
5909
  useEffect as useEffect15,
5785
5910
  useCallback as useCallback9
@@ -5912,17 +6037,17 @@ function ColorPicker({
5912
6037
  const config = useConfig();
5913
6038
  const size = sizeProp ?? config.size ?? "middle";
5914
6039
  const disabled = disabledProp ?? config.disabled ?? false;
5915
- const [internalColor, setInternalColor] = useState13(
6040
+ const [internalColor, setInternalColor] = useState14(
5916
6041
  value ?? defaultValue ?? DEFAULT_COLOR
5917
6042
  );
5918
6043
  const currentHex = (value ?? internalColor).toLowerCase();
5919
- const [hsv, setHsv] = useState13(() => {
6044
+ const [hsv, setHsv] = useState14(() => {
5920
6045
  const [r, g, b] = hexToRgb(currentHex);
5921
6046
  return rgbToHsv(r, g, b);
5922
6047
  });
5923
- const [internalOpen, setInternalOpen] = useState13(false);
6048
+ const [internalOpen, setInternalOpen] = useState14(false);
5924
6049
  const isOpen = controlledOpen ?? internalOpen;
5925
- const [textInput, setTextInput] = useState13(formatColor(currentHex, format));
6050
+ const [textInput, setTextInput] = useState14(formatColor(currentHex, format));
5926
6051
  const wrapperRef = useRef14(null);
5927
6052
  const timerRef = useRef14(void 0);
5928
6053
  const satPanelRef = useRef14(null);
@@ -6205,7 +6330,7 @@ function ColorPicker({
6205
6330
  }
6206
6331
 
6207
6332
  // src/components/ui/Empty.tsx
6208
- 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";
6209
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: [
6210
6335
  /* @__PURE__ */ jsx26("ellipse", { cx: "32", cy: "33", rx: "32", ry: "7", fill: "currentColor", opacity: "0.08" }),
6211
6336
  /* @__PURE__ */ jsxs24("g", { fillRule: "nonzero", stroke: "currentColor", strokeOpacity: "0.25", children: [
@@ -6220,15 +6345,12 @@ var DefaultImage = () => /* @__PURE__ */ jsx26("svg", { width: "64", height: "41
6220
6345
  )
6221
6346
  ] })
6222
6347
  ] }) });
6223
- function Empty({
6224
- image,
6225
- description,
6226
- children,
6227
- className,
6228
- style,
6229
- unstyled
6230
- }) {
6231
- 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";
6232
6354
  const desc = description === void 0 ? localeDefault : description;
6233
6355
  if (unstyled) {
6234
6356
  return /* @__PURE__ */ jsxs24("div", { className, style, role: "status", children: [
@@ -6304,7 +6426,7 @@ function Result({
6304
6426
  }
6305
6427
 
6306
6428
  // src/components/ui/Skeleton.tsx
6307
- 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";
6308
6430
  function Skeleton({
6309
6431
  active = false,
6310
6432
  avatar,
@@ -6317,7 +6439,7 @@ function Skeleton({
6317
6439
  unstyled
6318
6440
  }) {
6319
6441
  const loadingLabel = useConfig().locale?.skeleton?.loading ?? "Loading";
6320
- if (!loading) return /* @__PURE__ */ jsx28(Fragment4, { children });
6442
+ if (!loading) return /* @__PURE__ */ jsx28(Fragment6, { children });
6321
6443
  const avatarSize = typeof avatar === "object" ? avatar.size ?? 40 : 40;
6322
6444
  const avatarShape = typeof avatar === "object" ? avatar.shape ?? "circle" : "circle";
6323
6445
  const titleWidth = typeof title === "object" ? title.width ?? "38%" : "38%";
@@ -6376,7 +6498,7 @@ function Skeleton({
6376
6498
  }
6377
6499
 
6378
6500
  // src/components/ui/Segmented.tsx
6379
- import { useState as useState14 } from "react";
6501
+ import { useState as useState15 } from "react";
6380
6502
  import { jsx as jsx29, jsxs as jsxs27 } from "react/jsx-runtime";
6381
6503
  function normalizeOption(opt) {
6382
6504
  if (typeof opt === "string") return { label: opt, value: opt };
@@ -6398,7 +6520,7 @@ function Segmented({
6398
6520
  const size = sizeProp ?? config.size ?? "middle";
6399
6521
  const disabled = disabledProp ?? config.disabled ?? false;
6400
6522
  const normalized = options.map(normalizeOption);
6401
- const [internalValue, setInternalValue] = useState14(
6523
+ const [internalValue, setInternalValue] = useState15(
6402
6524
  value ?? defaultValue ?? normalized[0]?.value ?? ""
6403
6525
  );
6404
6526
  const currentValue = value ?? internalValue;
@@ -6621,7 +6743,7 @@ function Timeline({
6621
6743
  }
6622
6744
 
6623
6745
  // src/components/ui/Carousel.tsx
6624
- 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";
6625
6747
  import { jsx as jsx32, jsxs as jsxs30 } from "react/jsx-runtime";
6626
6748
  function Carousel({
6627
6749
  autoplay = false,
@@ -6636,7 +6758,7 @@ function Carousel({
6636
6758
  }) {
6637
6759
  const slides = Children.toArray(children);
6638
6760
  const count = slides.length;
6639
- const [current, setCurrent] = useState15(0);
6761
+ const [current, setCurrent] = useState16(0);
6640
6762
  const slideLabel = useConfig().locale?.carousel?.slide ?? ((index) => `Slide ${index}`);
6641
6763
  const goTo = useCallback10(
6642
6764
  (index) => {
@@ -6804,7 +6926,7 @@ function Descriptions({
6804
6926
  }
6805
6927
 
6806
6928
  // src/components/complex/SchemaFormEditor/SchemaFormEditor.tsx
6807
- 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";
6808
6930
 
6809
6931
  // src/components/complex/SchemaFormEditor/useSchemaEditor.ts
6810
6932
  import { useCallback as useCallback11, useMemo as useMemo5, useRef as useRef15, useSyncExternalStore } from "react";
@@ -7315,8 +7437,8 @@ function SchemaFormEditorPalette({
7315
7437
  }
7316
7438
 
7317
7439
  // src/components/complex/SchemaFormEditor/SchemaFormEditorCanvas.tsx
7318
- import { useCallback as useCallback12, useMemo as useMemo6, useRef as useRef16, useState as useState16 } from "react";
7319
- 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";
7320
7442
  function SchemaFormEditorCanvas({
7321
7443
  store,
7322
7444
  emptyText = "Drop a field here",
@@ -7342,7 +7464,7 @@ function SchemaFormEditorCanvas({
7342
7464
  () => fields.map((f) => `${f.id}:${f.name}:${f.type}:${String(f.defaultValue ?? "")}`).join("|"),
7343
7465
  [fields]
7344
7466
  );
7345
- const [dropIndicator, setDropIndicator] = useState16(null);
7467
+ const [dropIndicator, setDropIndicator] = useState17(null);
7346
7468
  const dragRef = useRef16(null);
7347
7469
  function handleDragOver(e) {
7348
7470
  if (e.dataTransfer.types.includes(PALETTE_DATA_TYPE) || e.dataTransfer.types.includes("text/plain") || dragRef.current !== null) {
@@ -7494,7 +7616,7 @@ function FieldOverlay({
7494
7616
  function handleDragLeave() {
7495
7617
  onIndicator(null);
7496
7618
  }
7497
- return /* @__PURE__ */ jsxs33(Fragment5, { children: [
7619
+ return /* @__PURE__ */ jsxs33(Fragment7, { children: [
7498
7620
  showIndicator && /* @__PURE__ */ jsx35("div", { className: "sg-sfe-canvas-drop-indicator", "data-testid": "sfe-drop-indicator" }),
7499
7621
  /* @__PURE__ */ jsxs33(
7500
7622
  "div",
@@ -7877,7 +7999,7 @@ function SchemaFormEditor({
7877
7999
  const internalOptions = { initialSchema, onChange };
7878
8000
  const internalStore = useSchemaEditor(internalOptions);
7879
8001
  const store = externalStore ?? internalStore;
7880
- const [bottomTab, setBottomTab] = useState17("preview");
8002
+ const [bottomTab, setBottomTab] = useState18("preview");
7881
8003
  useEffect17(() => {
7882
8004
  function onKey(e) {
7883
8005
  const target = e.target;
@@ -8028,7 +8150,7 @@ import {
8028
8150
  useImperativeHandle,
8029
8151
  useMemo as useMemo11,
8030
8152
  useRef as useRef18,
8031
- useState as useState18
8153
+ useState as useState19
8032
8154
  } from "react";
8033
8155
  import {
8034
8156
  routeOrthogonal,
@@ -8288,10 +8410,10 @@ function DiagramInner({
8288
8410
  nodes.forEach((n, i) => m.set(n.id, allBounds[i]));
8289
8411
  return m;
8290
8412
  }, [nodes, allBounds]);
8291
- const [view, setView] = useState18({ zoom: 1, panX: 0, panY: 0 });
8413
+ const [view, setView] = useState19({ zoom: 1, panX: 0, panY: 0 });
8292
8414
  const wrapperRef = useRef18(null);
8293
8415
  const isSelectionControlled = selection !== void 0;
8294
- const [internalSelection, setInternalSelection] = useState18(
8416
+ const [internalSelection, setInternalSelection] = useState19(
8295
8417
  () => defaultSelection ?? []
8296
8418
  );
8297
8419
  const currentSelection = isSelectionControlled ? selection : internalSelection;
@@ -8354,7 +8476,7 @@ function DiagramInner({
8354
8476
  height: "100%"
8355
8477
  };
8356
8478
  const dragRef = useRef18(null);
8357
- const [draggingId, setDraggingId] = useState18(null);
8479
+ const [draggingId, setDraggingId] = useState19(null);
8358
8480
  const DRAG_THRESHOLD_PX = 0.5;
8359
8481
  function applyMove(id, x, y) {
8360
8482
  let nx = x;
@@ -8467,7 +8589,7 @@ function DiagramInner({
8467
8589
  }));
8468
8590
  }
8469
8591
  }
8470
- const [lasso, setLasso] = useState18(null);
8592
+ const [lasso, setLasso] = useState19(null);
8471
8593
  const lassoRef = useRef18(null);
8472
8594
  const boundsByIdRef = useRef18(boundsById);
8473
8595
  useEffect18(() => {
@@ -8628,8 +8750,8 @@ function DiagramInner({
8628
8750
  onEdgeContextMenu(e, edge);
8629
8751
  };
8630
8752
  }
8631
- const [hoveredNode, setHoveredNode] = useState18(null);
8632
- const [hoveredEdge, setHoveredEdge] = useState18(null);
8753
+ const [hoveredNode, setHoveredNode] = useState19(null);
8754
+ const [hoveredEdge, setHoveredEdge] = useState19(null);
8633
8755
  const nodeHoverShowTimer = useRef18(null);
8634
8756
  const nodeHoverHideTimer = useRef18(null);
8635
8757
  const edgeHoverShowTimer = useRef18(null);
@@ -8932,7 +9054,7 @@ import {
8932
9054
  useEffect as useEffect19,
8933
9055
  useMemo as useMemo12,
8934
9056
  useRef as useRef19,
8935
- useState as useState19
9057
+ useState as useState20
8936
9058
  } from "react";
8937
9059
  import { jsx as jsx41, jsxs as jsxs37 } from "react/jsx-runtime";
8938
9060
  function Dashboard({
@@ -8947,7 +9069,7 @@ function Dashboard({
8947
9069
  onDashboardContextMenu
8948
9070
  }) {
8949
9071
  const dashboardLocale = useConfig().locale?.dashboard;
8950
- const [maximizedId, setMaximizedId] = useState19(null);
9072
+ const [maximizedId, setMaximizedId] = useState20(null);
8951
9073
  const wrapperClass = unstyled ? className : ["sg-dashboard", className].filter(Boolean).join(" ");
8952
9074
  const gridStyle = {
8953
9075
  display: "grid",
@@ -8996,8 +9118,8 @@ function DashboardWidgetView({
8996
9118
  defaultActions
8997
9119
  }) {
8998
9120
  const dashboardLocale = useConfig().locale?.dashboard;
8999
- const [hovered, setHovered] = useState19(false);
9000
- const [menuOpen, setMenuOpen] = useState19(false);
9121
+ const [hovered, setHovered] = useState20(false);
9122
+ const [menuOpen, setMenuOpen] = useState20(false);
9001
9123
  const widgetClass = unstyled ? widget.className : ["sg-dashboard-widget", widget.className].filter(Boolean).join(" ");
9002
9124
  const widgetStyle = isMaximized ? {
9003
9125
  gridColumn: `1 / span ${totalColumns}`,
@@ -9191,7 +9313,7 @@ function MoreIcon() {
9191
9313
  import {
9192
9314
  useMemo as useMemo13,
9193
9315
  useRef as useRef20,
9194
- useState as useState20
9316
+ useState as useState21
9195
9317
  } from "react";
9196
9318
  import { jsx as jsx42 } from "react/jsx-runtime";
9197
9319
  var MIN_W = 1;
@@ -9218,7 +9340,7 @@ function DashboardEditor({
9218
9340
  const dashboardLocale = useConfig().locale?.dashboard;
9219
9341
  const gridRef = useRef20(null);
9220
9342
  const dragRef = useRef20(null);
9221
- const [maximizedId, setMaximizedId] = useState20(null);
9343
+ const [maximizedId, setMaximizedId] = useState21(null);
9222
9344
  const widgetsRef = useRef20(widgets);
9223
9345
  widgetsRef.current = widgets;
9224
9346
  const onChangeRef = useRef20(onLayoutChange);
@@ -9857,7 +9979,7 @@ import {
9857
9979
  useEffect as useEffect20,
9858
9980
  useMemo as useMemo15,
9859
9981
  useRef as useRef22,
9860
- useState as useState21
9982
+ useState as useState22
9861
9983
  } from "react";
9862
9984
  import { detectConflicts, isAvailable } from "@skygraph/core";
9863
9985
  import { jsx as jsx44, jsxs as jsxs39 } from "react/jsx-runtime";
@@ -9947,7 +10069,7 @@ function ResourceCalendar({
9947
10069
  onChangeRef.current = onAssignmentChange;
9948
10070
  const onConflictRef = useRef22(onConflict);
9949
10071
  onConflictRef.current = onConflict;
9950
- const [ghost, setGhost] = useState21(null);
10072
+ const [ghost, setGhost] = useState22(null);
9951
10073
  const step = STEP_MS2[scale];
9952
10074
  const resolvedRange = useMemo15(
9953
10075
  () => resolveRange(assignments, step, range),
@@ -10403,8 +10525,8 @@ function ResourceCalendar({
10403
10525
  }
10404
10526
 
10405
10527
  // src/components/complex/Timeline/Timeline.tsx
10406
- import { Fragment as Fragment6, useMemo as useMemo16 } from "react";
10407
- 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";
10408
10530
  function toMs3(v) {
10409
10531
  return v instanceof Date ? v.getTime() : v;
10410
10532
  }
@@ -10485,7 +10607,7 @@ function EventTimeline({
10485
10607
  "aria-label": timelineLocale?.ariaLabel ?? "Timeline",
10486
10608
  "data-orientation": orientation,
10487
10609
  "data-group-by": groupBy ?? "none",
10488
- children: groups.map((group) => /* @__PURE__ */ jsxs40(Fragment6, { children: [
10610
+ children: groups.map((group) => /* @__PURE__ */ jsxs40(Fragment8, { children: [
10489
10611
  groupBy && /* @__PURE__ */ jsx45(
10490
10612
  "div",
10491
10613
  {
@@ -10503,7 +10625,7 @@ function EventTimeline({
10503
10625
  "aria-hidden": "true"
10504
10626
  }
10505
10627
  );
10506
- const body = renderEvent ? renderEvent(ev) : /* @__PURE__ */ jsxs40(Fragment7, { children: [
10628
+ const body = renderEvent ? renderEvent(ev) : /* @__PURE__ */ jsxs40(Fragment9, { children: [
10507
10629
  /* @__PURE__ */ jsx45("div", { className: unstyled ? void 0 : "sg-event-timeline-title", children: ev.title }),
10508
10630
  ev.description !== void 0 && /* @__PURE__ */ jsx45("div", { className: unstyled ? void 0 : "sg-event-timeline-description", children: ev.description })
10509
10631
  ] });
@@ -10644,7 +10766,7 @@ function ChartLegend({ series, className, style }) {
10644
10766
  }
10645
10767
 
10646
10768
  // src/components/complex/Charts/ChartCrosshair.tsx
10647
- import { Fragment as Fragment8 } from "react";
10769
+ import { Fragment as Fragment10 } from "react";
10648
10770
  import { jsx as jsx47, jsxs as jsxs42 } from "react/jsx-runtime";
10649
10771
  var TIP_WIDTH = 140;
10650
10772
  var TIP_LINE_HEIGHT = 14;
@@ -10738,7 +10860,7 @@ function ChartCrosshair({
10738
10860
  ),
10739
10861
  points.map((p, i) => {
10740
10862
  const rowY = tipY + TIP_PADDING + headerHeight + i * TIP_LINE_HEIGHT;
10741
- return /* @__PURE__ */ jsxs42(Fragment8, { children: [
10863
+ return /* @__PURE__ */ jsxs42(Fragment10, { children: [
10742
10864
  /* @__PURE__ */ jsx47(
10743
10865
  "rect",
10744
10866
  {
@@ -10783,7 +10905,7 @@ function ChartCrosshair({
10783
10905
  }
10784
10906
 
10785
10907
  // src/components/complex/Charts/ChartBrush.tsx
10786
- 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";
10787
10909
  import { jsx as jsx48, jsxs as jsxs43 } from "react/jsx-runtime";
10788
10910
  function resolveBrushConfig(brush) {
10789
10911
  if (brush == null || brush === false) return null;
@@ -10819,7 +10941,7 @@ function ChartBrush({
10819
10941
  disabled
10820
10942
  }) {
10821
10943
  const overlayRef = useRef23(null);
10822
- const [drag, setDrag] = useState22(null);
10944
+ const [drag, setDrag] = useState23(null);
10823
10945
  const cls4 = (suffix) => unstyled ? void 0 : `sg-chart-brush-${suffix}`;
10824
10946
  const clientToCategoryIndex = (clientX) => {
10825
10947
  const overlay = overlayRef.current;
@@ -10964,10 +11086,10 @@ function ChartBrush({
10964
11086
  }
10965
11087
 
10966
11088
  // src/components/complex/Charts/LineChart.tsx
10967
- 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";
10968
11090
 
10969
11091
  // src/components/complex/Charts/ChartAxes.tsx
10970
- import { Fragment as Fragment9 } from "react";
11092
+ import { Fragment as Fragment11 } from "react";
10971
11093
  import { jsx as jsx49, jsxs as jsxs44 } from "react/jsx-runtime";
10972
11094
  var DEFAULT_Y_TICKS = 5;
10973
11095
  var TICK_LEN = 4;
@@ -11062,7 +11184,7 @@ function ChartAxes({
11062
11184
  strokeWidth: 1
11063
11185
  }
11064
11186
  ),
11065
- yTicks.map((t, i) => /* @__PURE__ */ jsxs44(Fragment9, { children: [
11187
+ yTicks.map((t, i) => /* @__PURE__ */ jsxs44(Fragment11, { children: [
11066
11188
  /* @__PURE__ */ jsx49(
11067
11189
  "line",
11068
11190
  {
@@ -11122,7 +11244,7 @@ function ChartAxes({
11122
11244
  const cx = xFor(idx);
11123
11245
  const cat = categories[idx];
11124
11246
  const text = xFmt ? xFmt(cat, idx) : String(cat);
11125
- return /* @__PURE__ */ jsxs44(Fragment9, { children: [
11247
+ return /* @__PURE__ */ jsxs44(Fragment11, { children: [
11126
11248
  /* @__PURE__ */ jsx49(
11127
11249
  "line",
11128
11250
  {
@@ -11194,9 +11316,9 @@ function useChartPrint(forwardedRef, printable) {
11194
11316
  }
11195
11317
 
11196
11318
  // src/components/complex/Charts/useChartSize.ts
11197
- 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";
11198
11320
  function useChartSize(ref, fallback) {
11199
- const [size, setSize] = useState23(fallback);
11321
+ const [size, setSize] = useState24(fallback);
11200
11322
  const lastRef = useRef25(size);
11201
11323
  useEffect21(() => {
11202
11324
  const el = ref.current;
@@ -11343,7 +11465,7 @@ function downloadSvgAsPng(svg, fileNameOrOpts = "chart.png") {
11343
11465
  }
11344
11466
 
11345
11467
  // src/components/complex/Charts/ChartHoverToolbar.tsx
11346
- 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";
11347
11469
  function IconStroke(props) {
11348
11470
  return /* @__PURE__ */ jsxs45(
11349
11471
  "svg",
@@ -11368,7 +11490,7 @@ var PRINT_ICON = /* @__PURE__ */ jsx50(
11368
11490
  IconStroke,
11369
11491
  {
11370
11492
  d: "M4 6V2.5h8V6",
11371
- extra: /* @__PURE__ */ jsxs45(Fragment10, { children: [
11493
+ extra: /* @__PURE__ */ jsxs45(Fragment12, { children: [
11372
11494
  /* @__PURE__ */ jsx50("rect", { x: 3, y: 6, width: 10, height: 6, rx: 1 }),
11373
11495
  /* @__PURE__ */ jsx50("path", { d: "M4.5 10h7v3.5h-7z" })
11374
11496
  ] })
@@ -11378,7 +11500,7 @@ var SVG_ICON = /* @__PURE__ */ jsx50(
11378
11500
  IconStroke,
11379
11501
  {
11380
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",
11381
- extra: /* @__PURE__ */ jsxs45(Fragment10, { children: [
11503
+ extra: /* @__PURE__ */ jsxs45(Fragment12, { children: [
11382
11504
  /* @__PURE__ */ jsx50("path", { d: "M8 2.5v7" }),
11383
11505
  /* @__PURE__ */ jsx50("path", { d: "M5 6.5l3 3 3-3" })
11384
11506
  ] })
@@ -11388,7 +11510,7 @@ var PNG_ICON = /* @__PURE__ */ jsx50(
11388
11510
  IconStroke,
11389
11511
  {
11390
11512
  d: "M2.5 3.5h11v9h-11z",
11391
- extra: /* @__PURE__ */ jsxs45(Fragment10, { children: [
11513
+ extra: /* @__PURE__ */ jsxs45(Fragment12, { children: [
11392
11514
  /* @__PURE__ */ jsx50("circle", { cx: 5.5, cy: 6.5, r: 0.9 }),
11393
11515
  /* @__PURE__ */ jsx50("path", { d: "M2.5 11l3-3 2.5 2.5L10.5 8l3 3" })
11394
11516
  ] })
@@ -11398,7 +11520,7 @@ var RESET_ICON = /* @__PURE__ */ jsx50(
11398
11520
  IconStroke,
11399
11521
  {
11400
11522
  d: "M3 8a5 5 0 1 0 1.5-3.5",
11401
- extra: /* @__PURE__ */ jsx50(Fragment10, { children: /* @__PURE__ */ jsx50("path", { d: "M3 3v3h3" }) })
11523
+ extra: /* @__PURE__ */ jsx50(Fragment12, { children: /* @__PURE__ */ jsx50("path", { d: "M3 3v3h3" }) })
11402
11524
  }
11403
11525
  );
11404
11526
  function defaultChartActions(opts) {
@@ -11579,10 +11701,10 @@ function LineChartInner({
11579
11701
  const animClass = anim.enabled && !unstyled ? "sg-chart-line-animate" : void 0;
11580
11702
  const crosshairEnabled = crosshair !== false && categories.length > 0;
11581
11703
  const crosshairFmt = typeof crosshair === "object" && crosshair !== null ? crosshair.valueFormatter : void 0;
11582
- const [hoverIdx, setHoverIdx] = useState24(null);
11704
+ const [hoverIdx, setHoverIdx] = useState25(null);
11583
11705
  const brushConfig = resolveBrushConfig(brush);
11584
11706
  const isBrushControlled = brushConfig != null && "range" in brushConfig;
11585
- const [internalBrushRange, setInternalBrushRange] = useState24(
11707
+ const [internalBrushRange, setInternalBrushRange] = useState25(
11586
11708
  brushConfig?.defaultRange ?? null
11587
11709
  );
11588
11710
  const effectiveBrushRange = isBrushControlled ? brushConfig.range ?? null : internalBrushRange;
@@ -11630,7 +11752,7 @@ function LineChartInner({
11630
11752
  brushConfig.onRangeChange?.(null);
11631
11753
  } : void 0;
11632
11754
  const resolvedActions = resolveChartActions(actions, { fileName, brushReset });
11633
- const [toolbarVisible, setToolbarVisible] = useState24(false);
11755
+ const [toolbarVisible, setToolbarVisible] = useState25(false);
11634
11756
  const handleSvgContextMenu = makeChartContextMenuHandler(onChartContextMenu);
11635
11757
  const setSvgRef = (el) => {
11636
11758
  svgRef.current = el;
@@ -11802,7 +11924,7 @@ var LineChart = forwardRef2(LineChartInner);
11802
11924
  LineChart.displayName = "LineChart";
11803
11925
 
11804
11926
  // src/components/complex/Charts/BarChart.tsx
11805
- 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";
11806
11928
  import { jsx as jsx52, jsxs as jsxs47 } from "react/jsx-runtime";
11807
11929
  function BarChartInner({
11808
11930
  categories,
@@ -11860,7 +11982,7 @@ function BarChartInner({
11860
11982
  const animClass = anim.enabled && !unstyled ? "sg-chart-bar-animate" : void 0;
11861
11983
  const brushConfig = resolveBrushConfig(brush);
11862
11984
  const isBrushControlled = brushConfig != null && "range" in brushConfig;
11863
- const [internalBrushRange, setInternalBrushRange] = useState25(
11985
+ const [internalBrushRange, setInternalBrushRange] = useState26(
11864
11986
  brushConfig?.defaultRange ?? null
11865
11987
  );
11866
11988
  const effectiveBrushRange = isBrushControlled ? brushConfig.range ?? null : internalBrushRange;
@@ -11873,7 +11995,7 @@ function BarChartInner({
11873
11995
  brushConfig.onRangeChange?.(null);
11874
11996
  } : void 0;
11875
11997
  const resolvedActions = resolveChartActions(actions, { fileName, brushReset });
11876
- const [toolbarVisible, setToolbarVisible] = useState25(false);
11998
+ const [toolbarVisible, setToolbarVisible] = useState26(false);
11877
11999
  const handleSvgContextMenu = makeChartContextMenuHandler(onChartContextMenu);
11878
12000
  const setSvgRef = (el) => {
11879
12001
  svgRef.current = el;
@@ -12010,7 +12132,7 @@ var BarChart = forwardRef3(BarChartInner);
12010
12132
  BarChart.displayName = "BarChart";
12011
12133
 
12012
12134
  // src/components/complex/Charts/AreaChart.tsx
12013
- 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";
12014
12136
  import { jsx as jsx53, jsxs as jsxs48 } from "react/jsx-runtime";
12015
12137
  function AreaChartInner({
12016
12138
  categories,
@@ -12087,7 +12209,7 @@ function AreaChartInner({
12087
12209
  const animClass = anim.enabled && !unstyled ? "sg-chart-area-animate" : void 0;
12088
12210
  const brushConfig = resolveBrushConfig(brush);
12089
12211
  const isBrushControlled = brushConfig != null && "range" in brushConfig;
12090
- const [internalBrushRange, setInternalBrushRange] = useState26(
12212
+ const [internalBrushRange, setInternalBrushRange] = useState27(
12091
12213
  brushConfig?.defaultRange ?? null
12092
12214
  );
12093
12215
  const effectiveBrushRange = isBrushControlled ? brushConfig.range ?? null : internalBrushRange;
@@ -12100,7 +12222,7 @@ function AreaChartInner({
12100
12222
  brushConfig.onRangeChange?.(null);
12101
12223
  } : void 0;
12102
12224
  const resolvedActions = resolveChartActions(actions, { fileName, brushReset });
12103
- const [toolbarVisible, setToolbarVisible] = useState26(false);
12225
+ const [toolbarVisible, setToolbarVisible] = useState27(false);
12104
12226
  const handleSvgContextMenu = makeChartContextMenuHandler(onChartContextMenu);
12105
12227
  const setSvgRef = (el) => {
12106
12228
  svgRef.current = el;
@@ -12234,7 +12356,7 @@ var AreaChart = forwardRef4(AreaChartInner);
12234
12356
  AreaChart.displayName = "AreaChart";
12235
12357
 
12236
12358
  // src/components/complex/Charts/PieChart.tsx
12237
- 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";
12238
12360
  import { jsx as jsx54, jsxs as jsxs49 } from "react/jsx-runtime";
12239
12361
  function PieChartInner({
12240
12362
  data,
@@ -12272,7 +12394,7 @@ function PieChartInner({
12272
12394
  animationDuration: `${anim.duration}ms`
12273
12395
  } : void 0;
12274
12396
  const resolvedActions = resolveChartActions(actions, { fileName });
12275
- const [toolbarVisible, setToolbarVisible] = useState27(false);
12397
+ const [toolbarVisible, setToolbarVisible] = useState28(false);
12276
12398
  const handleSvgContextMenu = makeChartContextMenuHandler(onChartContextMenu);
12277
12399
  const setSvgRef = (el) => {
12278
12400
  svgRef.current = el;
@@ -13153,7 +13275,7 @@ function Transfer({
13153
13275
  }
13154
13276
 
13155
13277
  // src/components/ui/Mentions.tsx
13156
- 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";
13157
13279
  import { jsx as jsx58, jsxs as jsxs53 } from "react/jsx-runtime";
13158
13280
  function Mentions({
13159
13281
  value,
@@ -13179,10 +13301,10 @@ function Mentions({
13179
13301
  () => Array.isArray(prefixConfig) ? prefixConfig : [prefixConfig],
13180
13302
  [prefixConfig]
13181
13303
  );
13182
- const [internalValue, setInternalValue] = useState28(value ?? defaultValue);
13304
+ const [internalValue, setInternalValue] = useState29(value ?? defaultValue);
13183
13305
  const currentValue = value ?? internalValue;
13184
- const [mentionState, setMentionState] = useState28(null);
13185
- const [activeIndex, setActiveIndex] = useState28(0);
13306
+ const [mentionState, setMentionState] = useState29(null);
13307
+ const [activeIndex, setActiveIndex] = useState29(0);
13186
13308
  const textareaRef = useRef30(null);
13187
13309
  const dropdownRef = useRef30(null);
13188
13310
  const filteredOptions = useMemo23(() => {
@@ -13304,7 +13426,7 @@ function Mentions({
13304
13426
  }
13305
13427
 
13306
13428
  // src/components/ui/InputPassword.tsx
13307
- import { useState as useState29 } from "react";
13429
+ import { useState as useState30 } from "react";
13308
13430
  import { jsx as jsx59, jsxs as jsxs54 } from "react/jsx-runtime";
13309
13431
  function getStrength(password) {
13310
13432
  if (!password || password.length < 4) return "weak";
@@ -13347,8 +13469,8 @@ function InputPassword({
13347
13469
  const config = useConfig();
13348
13470
  const size = sizeProp ?? config.size ?? "middle";
13349
13471
  const disabled = disabledProp ?? config.disabled ?? false;
13350
- const [visible, setVisible] = useState29(false);
13351
- const [internal, setInternal] = useState29(defaultValue ?? "");
13472
+ const [visible, setVisible] = useState30(false);
13473
+ const [internal, setInternal] = useState30(defaultValue ?? "");
13352
13474
  const current = value ?? internal;
13353
13475
  const labels = { ...defaultStrengthLabels, ...strengthLabels };
13354
13476
  const handleChange = (v) => {
@@ -13429,7 +13551,7 @@ function InputPassword({
13429
13551
  }
13430
13552
 
13431
13553
  // src/components/ui/SearchInput.tsx
13432
- import { useState as useState30, useRef as useRef31 } from "react";
13554
+ import { useState as useState31, useRef as useRef31 } from "react";
13433
13555
  import { jsx as jsx60, jsxs as jsxs55 } from "react/jsx-runtime";
13434
13556
  function SearchInput({
13435
13557
  value,
@@ -13451,7 +13573,7 @@ function SearchInput({
13451
13573
  const config = useConfig();
13452
13574
  const size = sizeProp ?? config.size ?? "middle";
13453
13575
  const disabled = disabledProp ?? config.disabled ?? false;
13454
- const [internal, setInternal] = useState30(defaultValue ?? "");
13576
+ const [internal, setInternal] = useState31(defaultValue ?? "");
13455
13577
  const current = value ?? internal;
13456
13578
  const inputRef = useRef31(null);
13457
13579
  const handleChange = (v) => {
@@ -13537,7 +13659,7 @@ function SearchInput({
13537
13659
  }
13538
13660
 
13539
13661
  // src/components/ui/TagInput.tsx
13540
- 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";
13541
13663
  import { jsx as jsx61, jsxs as jsxs56 } from "react/jsx-runtime";
13542
13664
  function TagInput({
13543
13665
  value,
@@ -13561,8 +13683,8 @@ function TagInput({
13561
13683
  const size = sizeProp ?? config.size ?? "middle";
13562
13684
  const disabled = disabledProp ?? config.disabled ?? false;
13563
13685
  const removeTagLabel = config.locale?.tagInput?.removeTag ?? ((tag) => `Remove ${tag}`);
13564
- const [internalTags, setInternalTags] = useState31(defaultValue);
13565
- const [inputValue, setInputValue] = useState31("");
13686
+ const [internalTags, setInternalTags] = useState32(defaultValue);
13687
+ const [inputValue, setInputValue] = useState32("");
13566
13688
  const inputRef = useRef32(null);
13567
13689
  const id = useId5();
13568
13690
  const tags = value ?? internalTags;
@@ -13674,7 +13796,7 @@ function TagInput({
13674
13796
  }
13675
13797
 
13676
13798
  // src/components/ui/PinInput.tsx
13677
- 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";
13678
13800
  import { jsx as jsx62 } from "react/jsx-runtime";
13679
13801
  function PinInput({
13680
13802
  length = 6,
@@ -13699,7 +13821,7 @@ function PinInput({
13699
13821
  const disabled = disabledProp ?? config.disabled ?? false;
13700
13822
  const id = useId6();
13701
13823
  const pad2 = (s) => s.padEnd(length, "").slice(0, length);
13702
- const [internal, setInternal] = useState32(() => pad2(defaultValue));
13824
+ const [internal, setInternal] = useState33(() => pad2(defaultValue));
13703
13825
  const current = value !== void 0 ? pad2(value) : internal;
13704
13826
  const refs = useRef33([]);
13705
13827
  const pattern = type === "numeric" ? /^\d$/ : /^[a-zA-Z0-9]$/;
@@ -13810,8 +13932,8 @@ function PinInput({
13810
13932
  }
13811
13933
 
13812
13934
  // src/components/ui/InlineEdit.tsx
13813
- import { useState as useState33, useRef as useRef34, useEffect as useEffect23 } from "react";
13814
- 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";
13815
13937
  function InlineEdit({
13816
13938
  value,
13817
13939
  defaultValue = "",
@@ -13832,9 +13954,9 @@ function InlineEdit({
13832
13954
  const config = useConfig();
13833
13955
  const size = sizeProp ?? config.size ?? "middle";
13834
13956
  const disabled = disabledProp ?? config.disabled ?? false;
13835
- const [editing, setEditing] = useState33(false);
13836
- const [internal, setInternal] = useState33(defaultValue);
13837
- const [draft, setDraft] = useState33("");
13957
+ const [editing, setEditing] = useState34(false);
13958
+ const [internal, setInternal] = useState34(defaultValue);
13959
+ const [draft, setDraft] = useState34("");
13838
13960
  const inputRef = useRef34(null);
13839
13961
  const current = value ?? internal;
13840
13962
  useEffect23(() => {
@@ -13867,7 +13989,7 @@ function InlineEdit({
13867
13989
  };
13868
13990
  if (!editing) {
13869
13991
  if (renderView) {
13870
- return /* @__PURE__ */ jsx63(Fragment11, { children: renderView(current, startEditing) });
13992
+ return /* @__PURE__ */ jsx63(Fragment13, { children: renderView(current, startEditing) });
13871
13993
  }
13872
13994
  if (unstyled) {
13873
13995
  return /* @__PURE__ */ jsx63(
@@ -13916,7 +14038,7 @@ function InlineEdit({
13916
14038
  onBlur: saveOnBlur ? save : void 0
13917
14039
  }
13918
14040
  ),
13919
- showButtons && /* @__PURE__ */ jsxs57(Fragment11, { children: [
14041
+ showButtons && /* @__PURE__ */ jsxs57(Fragment13, { children: [
13920
14042
  /* @__PURE__ */ jsx63("button", { type: "button", onClick: save, children: "\u2713" }),
13921
14043
  /* @__PURE__ */ jsx63("button", { type: "button", onClick: cancel, children: "\u2715" })
13922
14044
  ] })
@@ -14094,6 +14216,7 @@ export {
14094
14216
  VirtualList,
14095
14217
  buildPageRule,
14096
14218
  buildPrintHtml,
14219
+ buildThemeVars,
14097
14220
  chartDataKey,
14098
14221
  colorForSeries,
14099
14222
  createEmptyEditorSchema,
@@ -14126,6 +14249,7 @@ export {
14126
14249
  useChartSize,
14127
14250
  useComputed,
14128
14251
  useConfig,
14252
+ useConfigWithDefaults,
14129
14253
  useField,
14130
14254
  useFieldArray,
14131
14255
  useForm,