@datum-cloud/datum-ui 1.6.1 → 1.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/dist/app-navigation/index.mjs +2 -2
  2. package/dist/{app-navigation--mry98XV.mjs → app-navigation-CNig4Maj.mjs} +32 -31
  3. package/dist/assistant/index.mjs +1 -1
  4. package/dist/autocomplete/index.mjs +1 -1
  5. package/dist/{autocomplete-G24AgvxU.mjs → autocomplete-DM6JYV4W.mjs} +1 -1
  6. package/dist/autosearch/index.mjs +4 -3
  7. package/dist/avatar-stack/index.mjs +1 -1
  8. package/dist/{avatar-stack-D1-BA7hA.mjs → avatar-stack-BZK6zUJr.mjs} +1 -1
  9. package/dist/{calendar-date-picker-C52Y05ZN.mjs → calendar-date-picker-AzvSqjeS.mjs} +6 -5
  10. package/dist/chart/index.mjs +1 -1
  11. package/dist/{chart-DeCrbcpY.mjs → chart-EgzTS28l.mjs} +6 -3
  12. package/dist/code-editor/index.mjs +1 -1
  13. package/dist/data-table/index.mjs +1 -1
  14. package/dist/{data-table-CfeovSJV.mjs → data-table-mByk373T.mjs} +11 -10
  15. package/dist/date-picker/index.mjs +3 -3
  16. package/dist/date-time-picker/index.mjs +1 -1
  17. package/dist/{date-time-picker-BbtA6JJJ.mjs → date-time-picker-D3-DeNo8.mjs} +1 -1
  18. package/dist/dropzone/index.mjs +1 -1
  19. package/dist/{dropzone-C_vA4q0u.mjs → dropzone-DrWVd7OI.mjs} +5 -3
  20. package/dist/empty-content/index.mjs +1 -1
  21. package/dist/{empty-content-BpS0PONb.mjs → empty-content-DvaelFpJ.mjs} +3 -2
  22. package/dist/form/adapters/rhf/index.mjs +6 -3
  23. package/dist/form/index.mjs +1 -1
  24. package/dist/form/stepper/index.mjs +23 -19
  25. package/dist/{form-2pTdgtYr.mjs → form-BUUNQfC9.mjs} +43 -34
  26. package/dist/grouped-table/index.mjs +1 -1
  27. package/dist/{grouped-table-CPF8Jijv.mjs → grouped-table-b2jDEPR6.mjs} +1 -1
  28. package/dist/index.mjs +26 -26
  29. package/dist/{layers-DJYz6fyE.mjs → layers-DWYdrGmC.mjs} +7 -3
  30. package/dist/logo/themed/index.mjs +1 -1
  31. package/dist/map/index.mjs +1 -1
  32. package/dist/more-actions/index.mjs +1 -1
  33. package/dist/{more-actions-G9hs0rpJ.mjs → more-actions-Bx443Ccx.mjs} +13 -12
  34. package/dist/multi-select/index.mjs +1 -1
  35. package/dist/{multi-select-DIWTdi0i.mjs → multi-select-PHaMEbY-.mjs} +1 -1
  36. package/dist/picker/index.mjs +1 -1
  37. package/dist/{picker-CRUSdzpo.mjs → picker-b5-x-EHs.mjs} +27 -22
  38. package/dist/rich-text-editor/index.mjs +1 -1
  39. package/dist/{rich-text-editor-DRIwcleW.mjs → rich-text-editor-CGuSn8xi.mjs} +1 -1
  40. package/dist/sidebar/index.mjs +1 -1
  41. package/dist/{sidebar-Df6Po0K8.mjs → sidebar-BRUNOqXi.mjs} +37 -36
  42. package/dist/stepper/index.mjs +1 -1
  43. package/dist/{stepper-DJkYcilu.mjs → stepper-dNvkipop.mjs} +2 -1
  44. package/dist/tag-input/index.mjs +1 -1
  45. package/dist/{tag-input-CSav22U5.mjs → tag-input-Ctxtcpwy.mjs} +37 -33
  46. package/dist/task-queue/index.mjs +1 -1
  47. package/dist/{task-queue-dropdown-DfdGiyfA.mjs → task-queue-dropdown-pqFd4rSf.mjs} +76 -75
  48. package/dist/theme/index.mjs +1 -1
  49. package/dist/{themes-BK5atywZ.mjs → themes-Ba2bajuF.mjs} +19 -17
  50. package/dist/time-picker/index.mjs +1 -1
  51. package/dist/{time-picker-Bgt6R1fU.mjs → time-picker-B_fN5vhO.mjs} +1 -1
  52. package/dist/{to-api-format-CgKtSuWO.mjs → to-api-format-43Boq7OR.mjs} +12 -8
  53. package/dist/tooltip/index.mjs +1 -1
  54. package/dist/{tooltip-BhatUaar.mjs → tooltip-C_SL1imw.mjs} +27 -23
  55. package/dist/{types-DrN0rei5.mjs → types-agDpVXBG.mjs} +5 -3
  56. package/dist/{use-option-picker-CV-9CyBV.mjs → use-option-picker-s2bUYwXC.mjs} +3 -2
  57. package/dist/utils/index.mjs +1 -1
  58. package/dist/{utils-U06Eu2KT.mjs → utils-CA4QEIJ8.mjs} +6 -2
  59. package/package.json +52 -52
@@ -5,84 +5,12 @@ import { t as Button } from "./button-A1qTjZ8U.mjs";
5
5
  import { t as Icon } from "./icon-wrapper-DKfJlJd0.mjs";
6
6
  import { t as Dialog } from "./dialog-N2pkQIc4.mjs";
7
7
  import { t as ResponsiveDropdown } from "./responsive-dropdown-fCmduKaz.mjs";
8
- import { a as TooltipTrigger, n as Tooltip, r as TooltipContent, t as Tooltip$1 } from "./tooltip-BhatUaar.mjs";
8
+ import { a as TooltipTrigger, n as Tooltip, r as TooltipContent, t as Tooltip$1 } from "./tooltip-C_SL1imw.mjs";
9
9
  import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from "./table/index.mjs";
10
10
  import { Ban, CheckCircle2, CircleAlert, CircleCheck, CornerDownRightIcon, FileIcon, ListTodo, X, XCircle } from "lucide-react";
11
11
  import { createContext, use, useEffect, useMemo, useRef, useState, useSyncExternalStore } from "react";
12
12
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
13
13
  import { formatDistanceToNowStrict } from "date-fns";
14
- //#region src/components/features/task-queue/constants.ts
15
- const TASK_QUEUE_DEFAULTS = {
16
- concurrency: 3,
17
- errorStrategy: "continue",
18
- cancelable: true,
19
- retryable: true
20
- };
21
- const TASK_STORAGE_KEY = "datum-task-queue";
22
- //#endregion
23
- //#region src/components/features/task-queue/utils/index.ts
24
- /**
25
- * Check if code is running in a browser environment.
26
- * Used for SSR safety in storage and other browser-dependent code.
27
- */
28
- function isBrowser() {
29
- return typeof window !== "undefined" && typeof localStorage !== "undefined";
30
- }
31
- function generateTaskId() {
32
- if (typeof crypto !== "undefined" && typeof crypto.randomUUID === "function") return `task_${crypto.randomUUID()}`;
33
- return `task_${Date.now()}_${Math.random().toString(36).slice(2, 9)}`;
34
- }
35
- /**
36
- * Extract an ID from an item using common patterns.
37
- * Checks: primitives (string/number) → obj.id → obj.name → obj.key → obj.uuid
38
- */
39
- function extractItemId(item) {
40
- if (typeof item === "string" || typeof item === "number") return String(item);
41
- if (item && typeof item === "object") {
42
- const obj = item;
43
- if (typeof obj.id === "string" || typeof obj.id === "number") return String(obj.id);
44
- if (typeof obj.name === "string") return obj.name;
45
- if (typeof obj.key === "string") return obj.key;
46
- if (typeof obj.uuid === "string") return obj.uuid;
47
- }
48
- }
49
- /**
50
- * Create metadata for project-scoped tasks.
51
- * Use this when enqueueing tasks that operate on project resources.
52
- */
53
- function createProjectMetadata(project, org, extra) {
54
- return {
55
- scope: "project",
56
- projectId: project.id,
57
- projectName: project.name,
58
- orgId: org.id,
59
- orgName: org.name,
60
- ...extra
61
- };
62
- }
63
- /**
64
- * Create metadata for organization-scoped tasks.
65
- * Use this when enqueueing tasks that operate on org-level resources.
66
- */
67
- function createOrgMetadata(org, extra) {
68
- return {
69
- scope: "org",
70
- orgId: org.id,
71
- orgName: org.name,
72
- ...extra
73
- };
74
- }
75
- /**
76
- * Create metadata for user-scoped tasks.
77
- * Use this when enqueueing tasks that operate on user-level resources.
78
- */
79
- function createUserMetadata(extra) {
80
- return {
81
- scope: "user",
82
- ...extra
83
- };
84
- }
85
- //#endregion
86
14
  //#region src/components/features/task-queue/engine/executor.ts
87
15
  /**
88
16
  * Shallow-clone a task into an engine-local working copy.
@@ -196,6 +124,78 @@ async function executeTask(inputTask, processor, callbacks) {
196
124
  };
197
125
  }
198
126
  //#endregion
127
+ //#region src/components/features/task-queue/constants.ts
128
+ const TASK_QUEUE_DEFAULTS = {
129
+ concurrency: 3,
130
+ errorStrategy: "continue",
131
+ cancelable: true,
132
+ retryable: true
133
+ };
134
+ const TASK_STORAGE_KEY = "datum-task-queue";
135
+ //#endregion
136
+ //#region src/components/features/task-queue/utils/index.ts
137
+ /**
138
+ * Check if code is running in a browser environment.
139
+ * Used for SSR safety in storage and other browser-dependent code.
140
+ */
141
+ function isBrowser() {
142
+ return typeof window !== "undefined" && typeof localStorage !== "undefined";
143
+ }
144
+ function generateTaskId() {
145
+ if (typeof crypto !== "undefined" && typeof crypto.randomUUID === "function") return `task_${crypto.randomUUID()}`;
146
+ return `task_${Date.now()}_${Math.random().toString(36).slice(2, 9)}`;
147
+ }
148
+ /**
149
+ * Extract an ID from an item using common patterns.
150
+ * Checks: primitives (string/number) → obj.id → obj.name → obj.key → obj.uuid
151
+ */
152
+ function extractItemId(item) {
153
+ if (typeof item === "string" || typeof item === "number") return String(item);
154
+ if (item && typeof item === "object") {
155
+ const obj = item;
156
+ if (typeof obj.id === "string" || typeof obj.id === "number") return String(obj.id);
157
+ if (typeof obj.name === "string") return obj.name;
158
+ if (typeof obj.key === "string") return obj.key;
159
+ if (typeof obj.uuid === "string") return obj.uuid;
160
+ }
161
+ }
162
+ /**
163
+ * Create metadata for project-scoped tasks.
164
+ * Use this when enqueueing tasks that operate on project resources.
165
+ */
166
+ function createProjectMetadata(project, org, extra) {
167
+ return {
168
+ scope: "project",
169
+ projectId: project.id,
170
+ projectName: project.name,
171
+ orgId: org.id,
172
+ orgName: org.name,
173
+ ...extra
174
+ };
175
+ }
176
+ /**
177
+ * Create metadata for organization-scoped tasks.
178
+ * Use this when enqueueing tasks that operate on org-level resources.
179
+ */
180
+ function createOrgMetadata(org, extra) {
181
+ return {
182
+ scope: "org",
183
+ orgId: org.id,
184
+ orgName: org.name,
185
+ ...extra
186
+ };
187
+ }
188
+ /**
189
+ * Create metadata for user-scoped tasks.
190
+ * Use this when enqueueing tasks that operate on user-level resources.
191
+ */
192
+ function createUserMetadata(extra) {
193
+ return {
194
+ scope: "user",
195
+ ...extra
196
+ };
197
+ }
198
+ //#endregion
199
199
  //#region src/components/features/task-queue/engine/storage/serialize.ts
200
200
  /**
201
201
  * Strip a task down to its JSON-serializable fields before persisting.
@@ -301,7 +301,7 @@ var MemoryTaskStorage = class {
301
301
  };
302
302
  //#endregion
303
303
  //#region src/components/features/task-queue/engine/storage/redis-storage.ts
304
- const DEFAULT_TTL = 3600 * 24 * 7;
304
+ const DEFAULT_TTL = 604800;
305
305
  function hasSetex(client) {
306
306
  return "setex" in client && typeof client.setex === "function";
307
307
  }
@@ -1026,8 +1026,9 @@ function TaskQueueProvider({ children, config }) {
1026
1026
  window.addEventListener("beforeunload", handleBeforeUnload);
1027
1027
  return () => window.removeEventListener("beforeunload", handleBeforeUnload);
1028
1028
  }, []);
1029
+ const value = useMemo(() => ({ queue: queueRef.current }), []);
1029
1030
  return /* @__PURE__ */ jsx(TaskQueueContext, {
1030
- value: useMemo(() => ({ queue: queueRef.current }), []),
1031
+ value,
1031
1032
  children
1032
1033
  });
1033
1034
  }
@@ -1,2 +1,2 @@
1
- import { i as ClientOnly, n as useTheme, r as ThemeScript, t as ThemeProvider } from "../themes-BK5atywZ.mjs";
1
+ import { i as ClientOnly, n as useTheme, r as ThemeScript, t as ThemeProvider } from "../themes-Ba2bajuF.mjs";
2
2
  export { ClientOnly, ThemeProvider, ThemeScript, useTheme };
@@ -132,7 +132,8 @@ function ThemeImpl({ forcedTheme, disableTransitionOnChange = false, enableSyste
132
132
  }
133
133
  }, [storageKey]);
134
134
  const handleMediaQuery = React.useCallback((e) => {
135
- setResolvedTheme(getSystemTheme(e));
135
+ const resolved = getSystemTheme(e);
136
+ setResolvedTheme(resolved);
136
137
  if (theme === "system" && enableSystem && !forcedTheme) applyTheme("system");
137
138
  }, [
138
139
  applyTheme,
@@ -168,25 +169,26 @@ function ThemeImpl({ forcedTheme, disableTransitionOnChange = false, enableSyste
168
169
  forcedTheme,
169
170
  theme
170
171
  ]);
171
- return /* @__PURE__ */ jsxs(ThemeContext, {
172
- value: React.useMemo(() => {
173
- const effectiveTheme = forcedTheme ?? theme;
174
- return {
175
- theme,
176
- setTheme,
177
- forcedTheme,
178
- resolvedTheme: effectiveTheme === "system" ? resolvedTheme : effectiveTheme,
179
- themes: enableSystem ? [...themes, "system"] : themes,
180
- systemTheme: enableSystem ? resolvedTheme : void 0
181
- };
182
- }, [
172
+ const providerValue = React.useMemo(() => {
173
+ const effectiveTheme = forcedTheme ?? theme;
174
+ return {
183
175
  theme,
184
176
  setTheme,
185
177
  forcedTheme,
186
- resolvedTheme,
187
- enableSystem,
188
- themes
189
- ]),
178
+ resolvedTheme: effectiveTheme === "system" ? resolvedTheme : effectiveTheme,
179
+ themes: enableSystem ? [...themes, "system"] : themes,
180
+ systemTheme: enableSystem ? resolvedTheme : void 0
181
+ };
182
+ }, [
183
+ theme,
184
+ setTheme,
185
+ forcedTheme,
186
+ resolvedTheme,
187
+ enableSystem,
188
+ themes
189
+ ]);
190
+ return /* @__PURE__ */ jsxs(ThemeContext, {
191
+ value: providerValue,
190
192
  children: [/* @__PURE__ */ jsx(ThemeScript, {
191
193
  forcedTheme,
192
194
  storageKey,
@@ -1,2 +1,2 @@
1
- import { t as TimePicker } from "../time-picker-Bgt6R1fU.mjs";
1
+ import { t as TimePicker } from "../time-picker-B_fN5vhO.mjs";
2
2
  export { TimePicker };
@@ -1,4 +1,4 @@
1
- import { n as TimePicker$1 } from "./picker-CRUSdzpo.mjs";
1
+ import { n as TimePicker$1 } from "./picker-b5-x-EHs.mjs";
2
2
  import { t as useDeprecationWarning } from "./use-deprecation-warning-DXrGc0jX.mjs";
3
3
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
4
4
  //#region src/components/features/time-picker/time-picker.tsx
@@ -4,7 +4,7 @@ import { Calendar } from "./calendar/index.mjs";
4
4
  import { t as Input } from "./input-j4tbmYYz.mjs";
5
5
  import { t as ResponsivePopover } from "./responsive-popover-DJZgXWIE.mjs";
6
6
  import { i as SelectItem, l as SelectTrigger, n as SelectContent, t as Select, u as SelectValue } from "./select-DCU44UO6.mjs";
7
- import { G as getTimezoneOffset, K as isoToZonedDate, U as formatTimezoneLabel, W as getBrowserTimezone, nt as startOfDayInTz, q as zonedDateToIso, r as DateTimeRangePicker, tt as endOfDayInTz } from "./picker-CRUSdzpo.mjs";
7
+ import { G as getTimezoneOffset, K as isoToZonedDate, U as formatTimezoneLabel, W as getBrowserTimezone, nt as startOfDayInTz, q as zonedDateToIso, r as DateTimeRangePicker, tt as endOfDayInTz } from "./picker-b5-x-EHs.mjs";
8
8
  import { t as useDeprecationWarning } from "./use-deprecation-warning-DXrGc0jX.mjs";
9
9
  import { CalendarIcon, Globe } from "lucide-react";
10
10
  import { useCallback, useEffect, useId, useRef, useState } from "react";
@@ -55,14 +55,16 @@ function getShortTimezoneDisplay(timezone) {
55
55
  * @example utcToLocalInputString(new Date('2026-01-16T04:00:00Z'), 'Asia/Jakarta') => '2026-01-16T11:00'
56
56
  */
57
57
  function utcToLocalInputString(utcDate, timezone) {
58
- return format(toZonedTime(utcDate, timezone), "yyyy-MM-dd'T'HH:mm");
58
+ const zonedDate = toZonedTime(utcDate, timezone);
59
+ return format(zonedDate, "yyyy-MM-dd'T'HH:mm");
59
60
  }
60
61
  /**
61
62
  * Convert a local datetime-local input string to a UTC Date
62
63
  * @example localInputStringToUtc('2026-01-16T11:00', 'Asia/Jakarta') => Date('2026-01-16T04:00:00Z')
63
64
  */
64
65
  function localInputStringToUtc(localString, timezone) {
65
- return fromZonedTime(parse(localString, "yyyy-MM-dd'T'HH:mm", /* @__PURE__ */ new Date()), timezone);
66
+ const parsed = parse(localString, "yyyy-MM-dd'T'HH:mm", /* @__PURE__ */ new Date());
67
+ return fromZonedTime(parsed, timezone);
66
68
  }
67
69
  /**
68
70
  * Convert a UTC ISO string to a Date for display in user's timezone
@@ -81,7 +83,8 @@ function zonedDateToUtcString(zonedDate, timezone) {
81
83
  * @example formatUtcForDisplay('2026-01-16T04:00:00Z', 'Asia/Jakarta') => 'Jan 16, 2026 11:00'
82
84
  */
83
85
  function formatUtcForDisplay(utcString, timezone, formatString = "MMM d, yyyy HH:mm") {
84
- return format(utcStringToZonedDate(utcString, timezone), formatString);
86
+ const zonedDate = utcStringToZonedDate(utcString, timezone);
87
+ return format(zonedDate, formatString);
85
88
  }
86
89
  //#endregion
87
90
  //#region src/components/features/time-range-picker/components/absolute-range-panel.tsx
@@ -533,11 +536,12 @@ function getPresetRange(preset, timezone) {
533
536
  */
534
537
  function TimeRangePicker({ value, onChange, onClear: _onClear, timezone, presets, disableFuture, maxDate, minDate, className, disabled, placeholder = "Select time range", align: _align, side: _side }) {
535
538
  useDeprecationWarning("TimeRangePicker (legacy)", "DateTimeRangePicker");
539
+ const wrapperValue = value ? {
540
+ from: value.from,
541
+ to: value.to
542
+ } : null;
536
543
  return /* @__PURE__ */ jsx(DateTimeRangePicker, {
537
- value: value ? {
538
- from: value.from,
539
- to: value.to
540
- } : null,
544
+ value: wrapperValue,
541
545
  onChange: (next) => {
542
546
  if (next === null) {
543
547
  onChange({
@@ -1,2 +1,2 @@
1
- import { t as Tooltip } from "../tooltip-BhatUaar.mjs";
1
+ import { t as Tooltip } from "../tooltip-C_SL1imw.mjs";
2
2
  export { Tooltip };
@@ -76,31 +76,35 @@ function Tooltip({ message, children, delayDuration = 200, side, align, sideOffs
76
76
  }
77
77
  }, []);
78
78
  useEffect(() => () => clearTimers(), [clearTimers]);
79
+ const handleTouchStart = useCallback(() => {
80
+ clearTimers();
81
+ pressTimerRef.current = setTimeout(() => {
82
+ setLongPressVisible(true);
83
+ dismissTimerRef.current = setTimeout(() => {
84
+ setLongPressVisible(false);
85
+ }, AUTO_DISMISS_DURATION);
86
+ }, LONG_PRESS_DURATION);
87
+ }, [clearTimers]);
88
+ const handleTouchMove = useCallback(() => {
89
+ clearTimers();
90
+ setLongPressVisible(false);
91
+ }, [clearTimers]);
92
+ const handleTouchEnd = useCallback(() => {
93
+ if (pressTimerRef.current) {
94
+ clearTimeout(pressTimerRef.current);
95
+ pressTimerRef.current = null;
96
+ }
97
+ }, []);
98
+ const handleTouchCancel = useCallback(() => {
99
+ clearTimers();
100
+ setLongPressVisible(false);
101
+ }, [clearTimers]);
79
102
  return /* @__PURE__ */ jsxs("span", {
80
103
  className: "relative inline-flex",
81
- onTouchStart: useCallback(() => {
82
- clearTimers();
83
- pressTimerRef.current = setTimeout(() => {
84
- setLongPressVisible(true);
85
- dismissTimerRef.current = setTimeout(() => {
86
- setLongPressVisible(false);
87
- }, AUTO_DISMISS_DURATION);
88
- }, LONG_PRESS_DURATION);
89
- }, [clearTimers]),
90
- onTouchMove: useCallback(() => {
91
- clearTimers();
92
- setLongPressVisible(false);
93
- }, [clearTimers]),
94
- onTouchEnd: useCallback(() => {
95
- if (pressTimerRef.current) {
96
- clearTimeout(pressTimerRef.current);
97
- pressTimerRef.current = null;
98
- }
99
- }, []),
100
- onTouchCancel: useCallback(() => {
101
- clearTimers();
102
- setLongPressVisible(false);
103
- }, [clearTimers]),
104
+ onTouchStart: handleTouchStart,
105
+ onTouchMove: handleTouchMove,
106
+ onTouchEnd: handleTouchEnd,
107
+ onTouchCancel: handleTouchCancel,
104
108
  children: [/* @__PURE__ */ jsxs(Tooltip$1, {
105
109
  delayDuration,
106
110
  open,
@@ -1,6 +1,6 @@
1
1
  import { t as cn } from "./utils-Bu32wN-x.mjs";
2
2
  import { Tabs, TabsContent, TabsList, TabsTrigger } from "./tabs/index.mjs";
3
- import { n as useTheme } from "./themes-BK5atywZ.mjs";
3
+ import { n as useTheme } from "./themes-Ba2bajuF.mjs";
4
4
  import { t as toast } from "./toast-BUPlDkN3.mjs";
5
5
  import { useEffect, useRef, useState } from "react";
6
6
  import { jsx, jsxs } from "react/jsx-runtime";
@@ -178,7 +178,8 @@ function formatJson(jsonStr) {
178
178
  }
179
179
  function formatYaml(yamlStr) {
180
180
  try {
181
- return dump(load(yamlStr, { schema: FAILSAFE_SCHEMA }), {
181
+ const parsed = load(yamlStr, { schema: FAILSAFE_SCHEMA });
182
+ return dump(parsed, {
182
183
  indent: 2,
183
184
  lineWidth: -1,
184
185
  noRefs: true
@@ -189,7 +190,8 @@ function formatYaml(yamlStr) {
189
190
  }
190
191
  function jsonToYaml(jsonStr) {
191
192
  try {
192
- return dump(JSON.parse(jsonStr), {
193
+ const parsed = JSON.parse(jsonStr);
194
+ return dump(parsed, {
193
195
  indent: 2,
194
196
  lineWidth: -1,
195
197
  noRefs: true
@@ -136,10 +136,11 @@ function useOptionPicker(args) {
136
136
  const { options, multiple, value, defaultValue, onValueChange, onSearchChange, creatable = false, creatableLabel, closeOnSelect = true, onOpenChange, getOptionValue: getOptionValueProp, getOptionLabel: getOptionLabelProp } = args;
137
137
  const getOptionValue = useMemo(() => getOptionValueProp ?? ((o) => o.value), [getOptionValueProp]);
138
138
  const getOptionLabel = useMemo(() => getOptionLabelProp ?? ((o) => o.label), [getOptionLabelProp]);
139
- const [selection, setSelection] = useControllableState(useMemo(() => {
139
+ const controlledSelection = useMemo(() => {
140
140
  if (value === void 0) return void 0;
141
141
  return Array.isArray(value) ? value : [value];
142
- }, [value]), defaultValue === void 0 ? [] : Array.isArray(defaultValue) ? defaultValue : [defaultValue]);
142
+ }, [value]);
143
+ const [selection, setSelection] = useControllableState(controlledSelection, defaultValue === void 0 ? [] : Array.isArray(defaultValue) ? defaultValue : [defaultValue]);
143
144
  const selectionSet = useMemo(() => new Set(selection), [selection]);
144
145
  const [search, setSearchState] = useState("");
145
146
  const setSearch = useCallback((next) => {
@@ -1,3 +1,3 @@
1
1
  import { t as cn } from "../utils-Bu32wN-x.mjs";
2
- import { n as toUTCTimestampStartOfDay, t as toUTCTimestampEndOfDay } from "../utils-U06Eu2KT.mjs";
2
+ import { n as toUTCTimestampStartOfDay, t as toUTCTimestampEndOfDay } from "../utils-CA4QEIJ8.mjs";
3
3
  export { cn, toUTCTimestampEndOfDay, toUTCTimestampStartOfDay };
@@ -16,7 +16,9 @@ import { endOfDay, startOfDay } from "date-fns";
16
16
  * @returns Unix timestamp in seconds (UTC).
17
17
  */
18
18
  function toUTCTimestampStartOfDay(date, timezone) {
19
- const utcDate = fromZonedTime(startOfDay(toZonedTime(date, timezone)), timezone);
19
+ const zonedDate = toZonedTime(date, timezone);
20
+ const startOfDayInTz = startOfDay(zonedDate);
21
+ const utcDate = fromZonedTime(startOfDayInTz, timezone);
20
22
  return Math.floor(utcDate.getTime() / 1e3);
21
23
  }
22
24
  /**
@@ -28,7 +30,9 @@ function toUTCTimestampStartOfDay(date, timezone) {
28
30
  * @returns Unix timestamp in seconds (UTC).
29
31
  */
30
32
  function toUTCTimestampEndOfDay(date, timezone) {
31
- const utcDate = fromZonedTime(endOfDay(toZonedTime(date, timezone)), timezone);
33
+ const zonedDate = toZonedTime(date, timezone);
34
+ const endOfDayInTz = endOfDay(zonedDate);
35
+ const utcDate = fromZonedTime(endOfDayInTz, timezone);
32
36
  return Math.floor(utcDate.getTime() / 1e3);
33
37
  }
34
38
  //#endregion
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@datum-cloud/datum-ui",
3
3
  "type": "module",
4
- "version": "1.6.1",
4
+ "version": "1.7.0",
5
5
  "license": "MIT",
6
6
  "repository": {
7
7
  "url": "https://github.com/datum-cloud/datum-ui"
@@ -429,7 +429,7 @@
429
429
  "ai": ">=7 <8",
430
430
  "date-fns": ">=4.1.0 <5",
431
431
  "date-fns-tz": ">=3 <4",
432
- "js-yaml": ">=5 <6",
432
+ "js-yaml": ">=5.2.2 <6",
433
433
  "leaflet": ">=1.9 <2",
434
434
  "leaflet-draw": ">=1 <2",
435
435
  "leaflet.fullscreen": ">=5 <6",
@@ -442,7 +442,7 @@
442
442
  "react": ">=19.2.7 <20",
443
443
  "react-day-picker": ">=10 <11",
444
444
  "react-dom": ">=19.2.7 <20",
445
- "react-dropzone": ">=15 <16",
445
+ "react-dropzone": ">=15 <21",
446
446
  "react-hook-form": ">=7.80.0 <8",
447
447
  "react-leaflet": ">=5 <6",
448
448
  "react-leaflet-markercluster": ">=5.0.0-rc.0 <6",
@@ -572,87 +572,87 @@
572
572
  }
573
573
  },
574
574
  "dependencies": {
575
- "@radix-ui/react-avatar": "^1.2.0",
576
- "@radix-ui/react-checkbox": "^1.3.5",
577
- "@radix-ui/react-collapsible": "^1.1.14",
578
- "@radix-ui/react-dialog": "^1.1.17",
579
- "@radix-ui/react-dropdown-menu": "^2.1.18",
580
- "@radix-ui/react-hover-card": "^1.1.17",
581
- "@radix-ui/react-label": "^2.1.10",
582
- "@radix-ui/react-popover": "^1.1.17",
583
- "@radix-ui/react-radio-group": "^1.4.1",
584
- "@radix-ui/react-select": "^2.3.1",
585
- "@radix-ui/react-separator": "^1.1.10",
586
- "@radix-ui/react-slot": "^1.3.0",
587
- "@radix-ui/react-switch": "^1.3.1",
588
- "@radix-ui/react-tabs": "^1.1.15",
589
- "@radix-ui/react-tooltip": "^1.2.10",
590
- "@radix-ui/react-visually-hidden": "^1.2.6",
575
+ "@radix-ui/react-avatar": "^1.2.6",
576
+ "@radix-ui/react-checkbox": "^1.3.11",
577
+ "@radix-ui/react-collapsible": "^1.1.20",
578
+ "@radix-ui/react-dialog": "^1.1.23",
579
+ "@radix-ui/react-dropdown-menu": "^2.1.24",
580
+ "@radix-ui/react-hover-card": "^1.1.23",
581
+ "@radix-ui/react-label": "^2.1.15",
582
+ "@radix-ui/react-popover": "^1.1.23",
583
+ "@radix-ui/react-radio-group": "^1.4.7",
584
+ "@radix-ui/react-select": "^2.3.7",
585
+ "@radix-ui/react-separator": "^1.1.15",
586
+ "@radix-ui/react-slot": "^1.3.3",
587
+ "@radix-ui/react-switch": "^1.3.7",
588
+ "@radix-ui/react-tabs": "^1.1.21",
589
+ "@radix-ui/react-tooltip": "^1.2.16",
590
+ "@radix-ui/react-visually-hidden": "^1.2.11",
591
591
  "class-variance-authority": "^0.7.1",
592
592
  "clsx": "^2.1.1",
593
593
  "cmdk": "^1.1.1",
594
- "isomorphic-dompurify": "^3.18.0",
594
+ "isomorphic-dompurify": "^3.21.0",
595
595
  "tailwind-merge": "^3.6.0",
596
596
  "tw-animate-css": "^1.4.0"
597
597
  },
598
598
  "devDependencies": {
599
- "@conform-to/react": "^1.19.4",
600
- "@conform-to/zod": "^1.19.4",
599
+ "@conform-to/react": "^1.20.2",
600
+ "@conform-to/zod": "^1.20.2",
601
601
  "@dnd-kit/core": "^6.3.1",
602
602
  "@dnd-kit/sortable": "^10.0.0",
603
- "@hookform/resolvers": "^5.4.0",
603
+ "@hookform/resolvers": "^5.7.1",
604
604
  "@monaco-editor/react": "^4.7.0",
605
605
  "@stepperize/react": "^7.0.0",
606
606
  "@streamdown/code": "^1.1.1",
607
607
  "@tanstack/react-table": "^8.21.3",
608
- "@tanstack/react-virtual": "^3.14.3",
609
- "@testing-library/jest-dom": "^6.9.1",
608
+ "@tanstack/react-virtual": "^3.14.9",
609
+ "@testing-library/jest-dom": "^7.0.0",
610
610
  "@testing-library/react": "^16.3.2",
611
611
  "@testing-library/user-event": "^14.6.1",
612
- "@tiptap/extension-character-count": "^3.27.1",
613
- "@tiptap/extension-link": "^3.27.1",
614
- "@tiptap/extension-placeholder": "^3.27.1",
615
- "@tiptap/extension-underline": "^3.27.1",
616
- "@tiptap/react": "^3.27.1",
617
- "@tiptap/starter-kit": "^3.27.1",
618
- "@types/leaflet": "^1.9.21",
612
+ "@tiptap/extension-character-count": "^3.29.2",
613
+ "@tiptap/extension-link": "^3.29.2",
614
+ "@tiptap/extension-placeholder": "^3.29.2",
615
+ "@tiptap/extension-underline": "^3.29.2",
616
+ "@tiptap/react": "^3.29.2",
617
+ "@tiptap/starter-kit": "^3.29.2",
618
+ "@types/leaflet": "^1.9.22",
619
619
  "@types/leaflet-draw": "^1.0.13",
620
620
  "@types/leaflet.fullscreen": "^5.2.0",
621
621
  "@types/leaflet.markercluster": "^1.5.6",
622
622
  "@types/nprogress": "^0.2.3",
623
- "@types/react": "^19.2.17",
624
- "@types/react-dom": "^19.2.3",
625
- "@vitest/coverage-v8": "^4.1.9",
626
- "ai": "^7.0.0",
623
+ "@types/react": "^19.2.18",
624
+ "@types/react-dom": "^19.2.4",
625
+ "@vitest/coverage-v8": "^4.1.10",
626
+ "ai": "^7.0.48",
627
627
  "date-fns": "^4.4.0",
628
628
  "date-fns-tz": "^3.2.0",
629
- "eslint": "^10.5.0",
630
- "js-yaml": "^5.0.0",
631
- "jsdom": "^29.1.1",
629
+ "eslint": "^10.8.0",
630
+ "js-yaml": "^5.2.3",
631
+ "jsdom": "^30.0.1",
632
632
  "leaflet": "^1.9.4",
633
633
  "leaflet-draw": "^1.0.4",
634
- "leaflet.fullscreen": "^5.3.1",
634
+ "leaflet.fullscreen": "^5.3.3",
635
635
  "leaflet.markercluster": "^1.5.3",
636
- "lucide-react": "^1.21.0",
637
- "monaco-editor": "^0.55.1",
638
- "motion": "^12.40.0",
636
+ "lucide-react": "^1.28.0",
637
+ "monaco-editor": "^0.56.0",
638
+ "motion": "^12.43.0",
639
639
  "nprogress": "^0.2.0",
640
- "nuqs": "^2.8.9",
641
- "react": "^19.2.7",
640
+ "nuqs": "^2.9.4",
641
+ "react": "^19.2.8",
642
642
  "react-day-picker": "^10.0.1",
643
- "react-dom": "^19.2.7",
644
- "react-dropzone": "^15.0.0",
645
- "react-hook-form": "^7.80.0",
643
+ "react-dom": "^19.2.8",
644
+ "react-dropzone": "^20.0.0",
645
+ "react-hook-form": "^7.84.0",
646
646
  "react-leaflet": "^5.0.0",
647
647
  "react-leaflet-markercluster": "5.0.0-rc.0",
648
648
  "react-number-format": "^5.4.5",
649
- "recharts": "^3.8.1",
649
+ "recharts": "^3.10.1",
650
650
  "sonner": "^2.0.7",
651
651
  "streamdown": "^2.5.0",
652
- "tailwindcss": "^4.3.1",
653
- "tsdown": "^0.22.3",
652
+ "tailwindcss": "^4.3.3",
653
+ "tsdown": "^0.22.14",
654
654
  "typescript": "^6.0.3",
655
- "vitest": "^4.1.9",
655
+ "vitest": "^4.1.10",
656
656
  "zod": "^4.4.3"
657
657
  },
658
658
  "publishConfig": {