@povio/ui 4.0.2 → 4.0.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 (109) hide show
  1. package/README.md +5 -1
  2. package/dist/{Breadcrumbs-BibAIBhY.js → Breadcrumbs-C-mZtdCc.js} +1 -1
  3. package/dist/{Calendar-kSEji28A.js → Calendar-BYcN64W5.js} +6 -136
  4. package/dist/{DatePicker-BbdtBAGN.js → DatePicker-DGlMtlvy.js} +12 -12
  5. package/dist/{DatePickerInput-eyHwzKPm.js → DatePickerInput-Nj_rVUyU.js} +8 -7
  6. package/dist/{DateRangePicker-Ct182qur.js → DateRangePicker-CE9XvAy9.js} +13 -185
  7. package/dist/{DateTimePicker-taYHMMYi.js → DateTimePicker-CtUPjVp1.js} +12 -12
  8. package/dist/{FileInput-B-ADr0B3.js → FileInput-BUs7wL0_.js} +1 -1
  9. package/dist/{FileUpload-3-4Vt4f1.js → FileUpload-C3HzeFeb.js} +1 -1
  10. package/dist/{FormField-CAcDJ4HC.js → FormField-DTO2cbXC.js} +1 -1
  11. package/dist/{FormFieldHeaderTooltip-C2IDI4ac.js → FormFieldHeaderTooltip-h6e5hq9V.js} +1 -1
  12. package/dist/{InlineTooltipWrapper-7HG-g2X3.js → InlineTooltipWrapper-Ct6zi24f.js} +1 -1
  13. package/dist/{InputItem-B3PlrjuD.js → InputItem-DAunP0iy.js} +9 -9
  14. package/dist/{Inputs-WZmrBWrL.js → Inputs-_IqA6JRE.js} +1 -1
  15. package/dist/NumberFormatter-CLDS_LRZ.js +265 -0
  16. package/dist/{NumberRangeInput-X8G1zfNM.js → NumberRangeInput-Bu-3Y0zf.js} +6 -5
  17. package/dist/{RadioGroup-DW_OQQDu.js → RadioGroup-DiF7ILto.js} +1 -1
  18. package/dist/{RichTextEditor-BOTitK7E.js → RichTextEditor-eM9d2umr.js} +2 -2
  19. package/dist/{Select-DmLkOMr1.js → Select-CyBtGHk9.js} +2 -2
  20. package/dist/{Slider-Q87Hg_V2.js → Slider-KkWtEm09.js} +1 -1
  21. package/dist/{TextArea-DZv6XaT0.js → TextArea-DvqDGp4M.js} +2 -2
  22. package/dist/{TimePicker-DAoHgk8U.js → TimePicker-WirUMDrH.js} +10 -9
  23. package/dist/{ToggleGroup-Cho_oRZh.js → ToggleGroup-BK6Ka7WA.js} +5 -66
  24. package/dist/{Tooltip-D94a1IQl.js → Tooltip--PSxkQA3.js} +2 -2
  25. package/dist/{TooltipWrapper-S2JC-w4e.js → TooltipWrapper-BVc_Aln-.js} +1 -1
  26. package/dist/components/autocomplete.js +2 -2
  27. package/dist/components/breadcrumbs.js +1 -1
  28. package/dist/components/checkbox-group.js +1 -1
  29. package/dist/components/date-picker.js +1 -1
  30. package/dist/components/date-range-picker.js +1 -1
  31. package/dist/components/date-time-picker.js +1 -1
  32. package/dist/components/file-input.js +1 -1
  33. package/dist/components/file-upload-container.js +1 -1
  34. package/dist/components/file-upload.js +1 -1
  35. package/dist/components/form-field.js +1 -1
  36. package/dist/components/icon-button.js +1 -1
  37. package/dist/components/input.js +4 -4
  38. package/dist/components/number-field.js +7 -6
  39. package/dist/components/number-range-input.js +1 -1
  40. package/dist/components/query-autocomplete.js +1 -1
  41. package/dist/components/query-select.js +2 -2
  42. package/dist/components/radio-group.js +1 -1
  43. package/dist/components/select.js +1 -1
  44. package/dist/components/slider.js +1 -1
  45. package/dist/components/text-area.js +1 -1
  46. package/dist/components/time-picker.js +1 -1
  47. package/dist/components/toggle-group.js +1 -1
  48. package/dist/components/tooltip-ellipsis.js +1 -1
  49. package/dist/components/tooltip.js +1 -1
  50. package/dist/config/ui-router.js +1 -1
  51. package/dist/{datePickerValue.utils-GADbSu7a.js → datePickerValue.utils-1z4mwZZs.js} +5 -5
  52. package/dist/hooks/use-filters.js +1 -1
  53. package/dist/index.js +15 -15
  54. package/dist/numberStatic.utils-BX50PSee.js +421 -0
  55. package/dist/rhf/date-picker.js +1 -1
  56. package/dist/rhf/date-range-picker.js +1 -1
  57. package/dist/rhf/date-time-picker.js +1 -1
  58. package/dist/rhf/file-input.js +1 -1
  59. package/dist/rhf/file-upload.js +1 -1
  60. package/dist/rhf/number-range-input.js +1 -1
  61. package/dist/rhf/radio-group.js +1 -1
  62. package/dist/rhf/rich-text-editor.js +1 -1
  63. package/dist/rhf/select.js +1 -1
  64. package/dist/rhf/slider.js +1 -1
  65. package/dist/rhf/text-area.js +1 -1
  66. package/dist/rhf/time-picker.js +1 -1
  67. package/dist/rhf/toggle-group.js +1 -1
  68. package/dist/rhf.js +15 -15
  69. package/dist/rich-text-editor.js +1 -1
  70. package/dist/{router.context-B0jTMtE0.js → router.context-B4FvsTim.js} +2 -2
  71. package/dist/staticDateTimeSegments-vP2f1woD.js +1763 -0
  72. package/dist/{staticSelect.utils-ad60elvT.js → staticSelect.utils-DOt6f-ck.js} +4 -143
  73. package/dist/tanstack/date-picker.js +1 -1
  74. package/dist/tanstack/date-range-picker.js +1 -1
  75. package/dist/tanstack/date-time-picker.js +1 -1
  76. package/dist/tanstack/file-input.js +1 -1
  77. package/dist/tanstack/file-upload.js +1 -1
  78. package/dist/tanstack/form.js +1 -1
  79. package/dist/tanstack/inputs.js +1 -1
  80. package/dist/tanstack/number-range-input.js +1 -1
  81. package/dist/tanstack/radio-group.js +1 -1
  82. package/dist/tanstack/rich-text-editor.js +1 -1
  83. package/dist/tanstack/select.js +1 -1
  84. package/dist/tanstack/slider.js +1 -1
  85. package/dist/tanstack/table.js +1 -1
  86. package/dist/tanstack/text-area.js +1 -1
  87. package/dist/tanstack/time-picker.js +1 -1
  88. package/dist/tanstack/toggle-group.js +1 -1
  89. package/dist/tanstack.js +24 -24
  90. package/dist/useControlledState-CzXkZCX8.js +30 -0
  91. package/dist/{useFieldAccessibility-CtTdRX2u.js → useFieldAccessibility-BTs_WC_5.js} +2 -2
  92. package/dist/{useFilters-kkEUFKmQ.js → useFilters-XNH27Md2.js} +1 -1
  93. package/dist/{useFormAutosave-DqP6lB4l.js → useFormAutosave-BRlM0nmq.js} +1 -1
  94. package/dist/{useStaticInputHandoff-BAaDW_0z.js → useStaticInputHandoff-_stbpoX4.js} +2 -2
  95. package/dist/{useTableColumnConfig-DVI_jVHz.js → useTableColumnConfig-CiAr7Dbi.js} +1 -1
  96. package/package.json +1 -1
  97. package/dist/FocusScope-CO9oJ1sc.js +0 -343
  98. package/dist/chain-DIXr2VAT.js +0 -10
  99. package/dist/focusSafely-DCGrr2bb.js +0 -447
  100. package/dist/getScrollParent-kSR7EtoT.js +0 -47
  101. package/dist/numberStatic.utils-BMgRzyd3.js +0 -902
  102. package/dist/openLink-CQhMhfzO.js +0 -121
  103. package/dist/platform-BXNIIAfU.js +0 -42
  104. package/dist/staticDateTimeSegments-BQoA94W-.js +0 -3603
  105. package/dist/useControlledState-DQxX6LMN.js +0 -189
  106. package/dist/useFocusable-Bd0UsrQ7.js +0 -63
  107. package/dist/useFormValidationState-D3z-gafz.js +0 -1341
  108. package/dist/useLayoutEffect-B2-1tbPJ.js +0 -83
  109. package/dist/useSyncRef-RGMv0rXK.js +0 -338
@@ -1,83 +0,0 @@
1
- import $ahdqC$react from "react";
2
- import { shadowDOM } from "react-stately/private/flags/flags";
3
- //#region ../../node_modules/.bun/react-aria@3.52.1+67f6792bdf102c28/node_modules/react-aria/dist/private/utils/domHelpers.mjs
4
- const $d447af545b77c9f1$export$b204af158042fbac = (target) => {
5
- if ($d447af545b77c9f1$var$isWindow(target)) return target.document;
6
- if ($d447af545b77c9f1$export$62858bae88b53fd0(target)) return target;
7
- return target?.ownerDocument ?? (typeof document !== "undefined" ? document : void 0);
8
- };
9
- const $d447af545b77c9f1$export$f21a1ffae260145a = (target) => {
10
- return $d447af545b77c9f1$export$b204af158042fbac(target)?.defaultView ?? (typeof window !== "undefined" ? window : void 0);
11
- };
12
- function $d447af545b77c9f1$export$8ee0fc9ee280b4ee(value) {
13
- return value !== null && typeof value === "object" && "nodeType" in value && typeof value.nodeType === "number";
14
- }
15
- /**
16
- * Type guard that checks if a value is a Window. Uses window self reference checks to
17
- * distinguish Window from other values.
18
- */ function $d447af545b77c9f1$var$isWindow(value) {
19
- return typeof value === "object" && value != null && "window" in value && value.window === value;
20
- }
21
- function $d447af545b77c9f1$export$62858bae88b53fd0(value) {
22
- return $d447af545b77c9f1$export$8ee0fc9ee280b4ee(value) && value.nodeType === 9;
23
- }
24
- function $d447af545b77c9f1$export$af51f0f06c0f328a(value) {
25
- return $d447af545b77c9f1$export$8ee0fc9ee280b4ee(value) && value.nodeType === 11 && "host" in value;
26
- }
27
- function $d447af545b77c9f1$export$f531f92e2a15358f(target, event, listener, options) {
28
- if (listener == null || target == null) return () => {};
29
- let eventTargets = Array.isArray(target) ? target : [target];
30
- for (let eventTarget of eventTargets) eventTarget.addEventListener(event, listener, options);
31
- return () => {
32
- for (let eventTarget of eventTargets) eventTarget.removeEventListener(event, listener, options);
33
- };
34
- }
35
- function $d447af545b77c9f1$export$37a5fde709c1db82(target, property, value, priority) {
36
- if (target == null) return () => {};
37
- let restore = new Array();
38
- let styleTargets = Array.isArray(target) ? target : [target];
39
- for (let styleTarget of styleTargets) {
40
- let initialValue = styleTarget.style.getPropertyValue(property);
41
- let initialPriority = styleTarget.style.getPropertyPriority(property);
42
- styleTarget.style.setProperty(property, value, priority);
43
- restore.unshift(() => {
44
- if (initialValue) styleTarget.style.setProperty(property, initialValue, initialPriority);
45
- else styleTarget.style.removeProperty(property);
46
- });
47
- }
48
- return () => {
49
- for (let cleanup of restore) cleanup();
50
- };
51
- }
52
- //#endregion
53
- //#region ../../node_modules/.bun/react-aria@3.52.1+67f6792bdf102c28/node_modules/react-aria/dist/private/utils/shadowdom/DOMFunctions.mjs
54
- function $23f2114a1b82827e$export$4282f70798064fe0(node, otherNode) {
55
- if (!shadowDOM()) return otherNode && node ? node.contains(otherNode) : false;
56
- if (!node || !otherNode) return false;
57
- let currentNode = otherNode;
58
- while (currentNode !== null) {
59
- if (currentNode === node) return true;
60
- if (typeof currentNode.assignedElements !== "function" && currentNode.assignedSlot?.parentNode) currentNode = currentNode.assignedSlot.parentNode;
61
- else if ($d447af545b77c9f1$export$af51f0f06c0f328a(currentNode)) currentNode = currentNode.host;
62
- else currentNode = currentNode.parentNode;
63
- }
64
- return false;
65
- }
66
- const $23f2114a1b82827e$export$cd4e5573fbe2b576 = (doc = document) => {
67
- if (!shadowDOM()) return doc.activeElement;
68
- let activeElement = doc.activeElement;
69
- while (activeElement && "shadowRoot" in activeElement && activeElement.shadowRoot?.activeElement) activeElement = activeElement.shadowRoot.activeElement;
70
- return activeElement;
71
- };
72
- function $23f2114a1b82827e$export$e58f029f0fbfdb29(event) {
73
- if (shadowDOM() && event.target instanceof Element && event.target.shadowRoot) {
74
- if ("composedPath" in event) return event.composedPath()[0] ?? null;
75
- else if ("composedPath" in event.nativeEvent) return event.nativeEvent.composedPath()[0] ?? null;
76
- }
77
- return event.target;
78
- }
79
- //#endregion
80
- //#region ../../node_modules/.bun/react-aria@3.52.1+67f6792bdf102c28/node_modules/react-aria/dist/private/utils/useLayoutEffect.mjs
81
- const $c4867b2f328c2698$export$e5c5a5f917a5871c = typeof document !== "undefined" ? $ahdqC$react.useLayoutEffect : () => {};
82
- //#endregion
83
- export { $d447af545b77c9f1$export$37a5fde709c1db82 as a, $d447af545b77c9f1$export$f21a1ffae260145a as c, $23f2114a1b82827e$export$e58f029f0fbfdb29 as i, $d447af545b77c9f1$export$f531f92e2a15358f as l, $23f2114a1b82827e$export$4282f70798064fe0 as n, $d447af545b77c9f1$export$af51f0f06c0f328a as o, $23f2114a1b82827e$export$cd4e5573fbe2b576 as r, $d447af545b77c9f1$export$b204af158042fbac as s, $c4867b2f328c2698$export$e5c5a5f917a5871c as t };
@@ -1,338 +0,0 @@
1
- import { t as clsx } from "./clsx-CnD0nOiA.js";
2
- import { i as $23f2114a1b82827e$export$e58f029f0fbfdb29, n as $23f2114a1b82827e$export$4282f70798064fe0, t as $c4867b2f328c2698$export$e5c5a5f917a5871c } from "./useLayoutEffect-B2-1tbPJ.js";
3
- import { a as $c7eafbbe1ea5834e$export$619500959fc48b26 } from "./focusSafely-DCGrr2bb.js";
4
- import { i as $2add3ce32c6007eb$export$9ac100e40613ea10 } from "./platform-BXNIIAfU.js";
5
- import { t as $a4e76a5424781910$export$e08e3b67e392101e } from "./chain-DIXr2VAT.js";
6
- import { useCallback, useEffect, useRef, useState } from "react";
7
- //#region ../../node_modules/.bun/react-aria@3.52.1+67f6792bdf102c28/node_modules/react-aria/dist/private/utils/useValueEffect.mjs
8
- function $1a716630a9e3a599$export$14d238f342723f25(defaultValue) {
9
- let [value, setValue] = useState(defaultValue);
10
- let currValue = useRef(value);
11
- let effect = useRef(null);
12
- let nextRef = useRef(() => {
13
- if (!effect.current) return;
14
- let newValue = effect.current.next();
15
- if (newValue.done) {
16
- effect.current = null;
17
- return;
18
- }
19
- if (currValue.current === newValue.value) nextRef.current();
20
- else setValue(newValue.value);
21
- });
22
- $c4867b2f328c2698$export$e5c5a5f917a5871c(() => {
23
- currValue.current = value;
24
- if (effect.current) nextRef.current();
25
- });
26
- return [value, useCallback((fn) => {
27
- effect.current = fn(currValue.current);
28
- nextRef.current();
29
- }, [nextRef])];
30
- }
31
- //#endregion
32
- //#region ../../node_modules/.bun/react-aria@3.52.1+67f6792bdf102c28/node_modules/react-aria/dist/private/utils/useId.mjs
33
- let $390e54f620492c70$var$canUseDOM = Boolean(typeof window !== "undefined" && window.document && window.document.createElement);
34
- let $390e54f620492c70$export$d41a04c74483c6ef = /* @__PURE__ */ new Map();
35
- let $390e54f620492c70$var$registry;
36
- if (typeof FinalizationRegistry !== "undefined") $390e54f620492c70$var$registry = new FinalizationRegistry((heldValue) => {
37
- $390e54f620492c70$export$d41a04c74483c6ef.delete(heldValue);
38
- });
39
- let $390e54f620492c70$var$registeredIds = /* @__PURE__ */ new WeakMap();
40
- function $390e54f620492c70$export$f680877a34711e37(defaultId) {
41
- let [value, setValue] = useState(defaultId);
42
- let nextId = useRef(null);
43
- let res = $c7eafbbe1ea5834e$export$619500959fc48b26(value);
44
- let cleanupRef = useRef(null);
45
- let registeredId = $390e54f620492c70$var$registeredIds.get(cleanupRef);
46
- if ($390e54f620492c70$var$registry && registeredId !== res) {
47
- if (registeredId != null) $390e54f620492c70$var$registry.unregister(cleanupRef);
48
- $390e54f620492c70$var$registry.register(cleanupRef, res, cleanupRef);
49
- $390e54f620492c70$var$registeredIds.set(cleanupRef, res);
50
- }
51
- if ($390e54f620492c70$var$canUseDOM) {
52
- const cacheIdRef = $390e54f620492c70$export$d41a04c74483c6ef.get(res);
53
- if (cacheIdRef && !cacheIdRef.includes(nextId)) cacheIdRef.push(nextId);
54
- else $390e54f620492c70$export$d41a04c74483c6ef.set(res, [nextId]);
55
- }
56
- $c4867b2f328c2698$export$e5c5a5f917a5871c(() => {
57
- let r = res;
58
- return () => {
59
- if ($390e54f620492c70$var$registry) {
60
- $390e54f620492c70$var$registry.unregister(cleanupRef);
61
- $390e54f620492c70$var$registeredIds.delete(cleanupRef);
62
- }
63
- $390e54f620492c70$export$d41a04c74483c6ef.delete(r);
64
- };
65
- }, [res]);
66
- useEffect(() => {
67
- let newId = nextId.current;
68
- if (newId) setValue(newId);
69
- return () => {
70
- if (newId) nextId.current = null;
71
- };
72
- });
73
- return res;
74
- }
75
- function $390e54f620492c70$export$cd8c9cb68f842629(idA, idB) {
76
- if (idA === idB) return idA;
77
- let setIdsA = $390e54f620492c70$export$d41a04c74483c6ef.get(idA);
78
- if (setIdsA) {
79
- setIdsA.forEach((ref) => ref.current = idB);
80
- return idB;
81
- }
82
- let setIdsB = $390e54f620492c70$export$d41a04c74483c6ef.get(idB);
83
- if (setIdsB) {
84
- setIdsB.forEach((ref) => ref.current = idA);
85
- return idA;
86
- }
87
- return idB;
88
- }
89
- function $390e54f620492c70$export$b4cc09c592e8fdb8(depArray = []) {
90
- let id = $390e54f620492c70$export$f680877a34711e37();
91
- let [resolvedId, setResolvedId] = $1a716630a9e3a599$export$14d238f342723f25(id);
92
- let updateId = useCallback(() => {
93
- setResolvedId(function* () {
94
- yield id;
95
- yield document.getElementById(id) ? id : void 0;
96
- });
97
- }, [id, setResolvedId]);
98
- $c4867b2f328c2698$export$e5c5a5f917a5871c(updateId, [
99
- id,
100
- updateId,
101
- ...depArray
102
- ]);
103
- return resolvedId;
104
- }
105
- //#endregion
106
- //#region ../../node_modules/.bun/react-aria@3.52.1+67f6792bdf102c28/node_modules/react-aria/dist/private/utils/mergeRefs.mjs
107
- function $4064df0d6f9620e1$export$c9058316764c140e(...refs) {
108
- if (refs.length === 1 && refs[0]) return refs[0];
109
- return (value) => {
110
- let hasCleanup = false;
111
- const cleanups = refs.map((ref) => {
112
- const cleanup = $4064df0d6f9620e1$var$setRef(ref, value);
113
- hasCleanup ||= typeof cleanup == "function";
114
- return cleanup;
115
- });
116
- if (hasCleanup) return () => {
117
- cleanups.forEach((cleanup, i) => {
118
- if (typeof cleanup === "function") cleanup();
119
- else $4064df0d6f9620e1$var$setRef(refs[i], null);
120
- });
121
- };
122
- };
123
- }
124
- function $4064df0d6f9620e1$var$setRef(ref, value) {
125
- if (typeof ref === "function") return ref(value);
126
- else if (ref != null) ref.current = value;
127
- }
128
- //#endregion
129
- //#region ../../node_modules/.bun/react-aria@3.52.1+67f6792bdf102c28/node_modules/react-aria/dist/private/utils/mergeProps.mjs
130
- function $bbaa08b3cd72f041$export$9d1611c77c2fe928(...args) {
131
- let result = { ...args[0] };
132
- for (let i = 1; i < args.length; i++) {
133
- let props = args[i];
134
- for (let key in props) {
135
- let a = result[key];
136
- let b = props[key];
137
- if (typeof a === "function" && typeof b === "function" && key[0] === "o" && key[1] === "n" && key.charCodeAt(2) >= 65 && key.charCodeAt(2) <= 90) result[key] = $a4e76a5424781910$export$e08e3b67e392101e(a, b);
138
- else if ((key === "className" || key === "UNSAFE_className") && typeof a === "string" && typeof b === "string") result[key] = clsx(a, b);
139
- else if (key === "id" && a && b) result.id = $390e54f620492c70$export$cd8c9cb68f842629(a, b);
140
- else if (key === "ref" && a && b) result.ref = $4064df0d6f9620e1$export$c9058316764c140e(a, b);
141
- else result[key] = b !== void 0 ? b : a;
142
- }
143
- }
144
- return result;
145
- }
146
- //#endregion
147
- //#region ../../node_modules/.bun/react-aria@3.52.1+67f6792bdf102c28/node_modules/react-aria/dist/private/interactions/createEventHandler.mjs
148
- function $8dba16319206abb6$export$48d1ea6320830260(handler) {
149
- if (!handler) return void 0;
150
- return (e) => {
151
- let shouldStopPropagation = true;
152
- handler({
153
- ...e,
154
- preventDefault() {
155
- e.preventDefault();
156
- },
157
- isDefaultPrevented() {
158
- return e.isDefaultPrevented();
159
- },
160
- stopPropagation() {
161
- if (shouldStopPropagation && true) console.error("stopPropagation is now the default behavior for events in React Spectrum. You can use continuePropagation() to revert this behavior.");
162
- else shouldStopPropagation = true;
163
- },
164
- continuePropagation() {
165
- shouldStopPropagation = false;
166
- if (typeof e.continuePropagation === "function") e.continuePropagation();
167
- },
168
- isPropagationStopped() {
169
- return shouldStopPropagation;
170
- }
171
- });
172
- if (shouldStopPropagation && !(typeof e.isPropagationStopped === "function" && e.isPropagationStopped())) e.stopPropagation();
173
- };
174
- }
175
- //#endregion
176
- //#region ../../node_modules/.bun/react-aria@3.52.1+67f6792bdf102c28/node_modules/react-aria/dist/private/interactions/createKeyboardShortcutHandler.mjs
177
- /** Modifier names in shortcut strings (case-insensitive). Order in the string does not matter. */ const $cbf729ad7eb217b0$var$MODIFIER_NAMES = /* @__PURE__ */ new Set([
178
- "shift",
179
- "alt",
180
- "control",
181
- "meta",
182
- "mod"
183
- ]);
184
- /** Canonical modifier order for stable keys (sorted, fixed order). */ const $cbf729ad7eb217b0$var$CANONICAL_MODIFIER_ORDER = [
185
- "Alt",
186
- "Control",
187
- "Meta",
188
- "Shift"
189
- ];
190
- function $cbf729ad7eb217b0$export$9932402e211e7315(parsed) {
191
- let set = /* @__PURE__ */ new Set();
192
- if (parsed.alt) set.add("Alt");
193
- if (parsed.shift) set.add("Shift");
194
- if (parsed.ctrl) set.add("Control");
195
- if (parsed.meta) set.add("Meta");
196
- if (parsed.mod) set.add($2add3ce32c6007eb$export$9ac100e40613ea10() ? "Meta" : "Control");
197
- return set;
198
- }
199
- function $cbf729ad7eb217b0$export$bf26c410e1f8fe6d(e) {
200
- let set = /* @__PURE__ */ new Set();
201
- if (e.altKey) set.add("Alt");
202
- if (e.ctrlKey) set.add("Control");
203
- if (e.metaKey) set.add("Meta");
204
- if (e.shiftKey) set.add("Shift");
205
- return set;
206
- }
207
- function $cbf729ad7eb217b0$var$sortedModifierTokens(set) {
208
- return $cbf729ad7eb217b0$var$CANONICAL_MODIFIER_ORDER.filter((name) => set.has(name));
209
- }
210
- function $cbf729ad7eb217b0$export$d636f01a2eaffd51(spec) {
211
- let parts = spec.split("+").reduce((prev, part) => {
212
- let lower = part.toLowerCase();
213
- if ($cbf729ad7eb217b0$var$MODIFIER_NAMES.has(lower)) {
214
- if (lower === "shift") prev.shift = true;
215
- else if (lower === "alt") prev.alt = true;
216
- else if (lower === "control") prev.ctrl = true;
217
- else if (lower === "meta") prev.meta = true;
218
- else if (lower === "mod") prev.mod = true;
219
- } else prev.key = part;
220
- return prev;
221
- }, {
222
- shift: false,
223
- alt: false,
224
- ctrl: false,
225
- meta: false,
226
- mod: false,
227
- key: ""
228
- });
229
- if (parts.key === "") throw new Error(`Invalid keyboard shortcut: "${spec}". Must include exactly one non-modifier key (e.g. "a", "Enter", "ArrowDown"). Combine any of Shift, Alt, Ctrl, Meta, and Mod.`);
230
- return parts;
231
- }
232
- function $cbf729ad7eb217b0$var$normalizeEventKey(key) {
233
- return key.toLowerCase();
234
- }
235
- /** Short aliases for common keys (shortcut side, before match). */ const $cbf729ad7eb217b0$var$KEY_ALIASES = {
236
- space: " ",
237
- esc: "escape",
238
- del: "delete",
239
- ins: "insert",
240
- left: "arrowleft",
241
- right: "arrowright",
242
- up: "arrowup",
243
- down: "arrowdown",
244
- pageup: "pageup",
245
- pagedown: "pagedown"
246
- };
247
- /** Canonical key segment (lowercase); aliases like `down` → `arrowdown`. */ function $cbf729ad7eb217b0$var$canonicalKeyFromSpecKey(specKey) {
248
- let k = $cbf729ad7eb217b0$var$normalizeEventKey(specKey);
249
- let aliased = $cbf729ad7eb217b0$var$KEY_ALIASES[k];
250
- return aliased != null ? aliased : k;
251
- }
252
- function $cbf729ad7eb217b0$export$6cfa2ace150c84a5(parsed) {
253
- let mods = $cbf729ad7eb217b0$var$sortedModifierTokens($cbf729ad7eb217b0$export$9932402e211e7315(parsed));
254
- let key = $cbf729ad7eb217b0$var$canonicalKeyFromSpecKey(parsed.key);
255
- return mods.length > 0 ? `${mods.join("+")}+${key}` : key;
256
- }
257
- function $cbf729ad7eb217b0$export$786304bda41dd69f(e) {
258
- let mods = $cbf729ad7eb217b0$var$sortedModifierTokens($cbf729ad7eb217b0$export$bf26c410e1f8fe6d(e));
259
- let key = $cbf729ad7eb217b0$var$normalizeEventKey(e.key);
260
- return (mods.length > 0 ? `${mods.join("+")}+` : "") + key;
261
- }
262
- function $cbf729ad7eb217b0$export$2fd1fc8039383ae1(bindings) {
263
- let map = /* @__PURE__ */ new Map();
264
- for (let [spec, action] of Object.entries(bindings)) {
265
- let parsed = $cbf729ad7eb217b0$export$d636f01a2eaffd51(spec);
266
- map.set($cbf729ad7eb217b0$export$6cfa2ace150c84a5(parsed), action);
267
- }
268
- return (e) => {
269
- let canonical = $cbf729ad7eb217b0$export$786304bda41dd69f(e);
270
- let action = map.get(canonical);
271
- let result = action?.(e);
272
- if (result === void 0 && action !== void 0) result = {
273
- shouldContinuePropagation: false,
274
- shouldPreventDefault: true
275
- };
276
- else if (typeof result === "boolean") result = {
277
- shouldContinuePropagation: !result,
278
- shouldPreventDefault: result
279
- };
280
- if (result?.shouldPreventDefault) e.preventDefault();
281
- if (!action || result?.shouldContinuePropagation) e.continuePropagation();
282
- };
283
- }
284
- //#endregion
285
- //#region ../../node_modules/.bun/react-aria@3.52.1+67f6792bdf102c28/node_modules/react-aria/dist/private/interactions/useKeyboard.mjs
286
- function $8296dad1a4c5e0dc$export$8f71654801c2f7cd(props) {
287
- let { shortcuts, allowRepeats = false, allowComposing = false } = props;
288
- let onKeyDown;
289
- let onKeyUp;
290
- if (shortcuts) {
291
- let shortcutHandler = $cbf729ad7eb217b0$export$2fd1fc8039383ae1(shortcuts);
292
- let shortcutOnKeyDown = $8dba16319206abb6$export$48d1ea6320830260((e) => {
293
- if (!$23f2114a1b82827e$export$4282f70798064fe0(e.currentTarget, $23f2114a1b82827e$export$e58f029f0fbfdb29(e))) {
294
- e.continuePropagation();
295
- return;
296
- }
297
- if (e.nativeEvent?.repeat && !allowRepeats || e.nativeEvent?.isComposing && !allowComposing) {
298
- e.continuePropagation();
299
- return;
300
- }
301
- shortcutHandler(e);
302
- });
303
- let shortcutOnKeyUp = $8dba16319206abb6$export$48d1ea6320830260((e) => {
304
- if (!$23f2114a1b82827e$export$4282f70798064fe0(e.currentTarget, $23f2114a1b82827e$export$e58f029f0fbfdb29(e))) {
305
- e.continuePropagation();
306
- return;
307
- }
308
- if (e.nativeEvent?.repeat && !allowRepeats || e.nativeEvent?.isComposing && !allowComposing) {
309
- e.continuePropagation();
310
- return;
311
- }
312
- e.continuePropagation();
313
- });
314
- onKeyDown = props.onKeyDown ? $a4e76a5424781910$export$e08e3b67e392101e(props.onKeyDown, shortcutOnKeyDown) : shortcutOnKeyDown;
315
- onKeyUp = props.onKeyUp ? $a4e76a5424781910$export$e08e3b67e392101e(props.onKeyUp, shortcutOnKeyUp) : shortcutOnKeyUp;
316
- } else {
317
- onKeyDown = $8dba16319206abb6$export$48d1ea6320830260(props.onKeyDown);
318
- onKeyUp = $8dba16319206abb6$export$48d1ea6320830260(props.onKeyUp);
319
- }
320
- return { keyboardProps: props.isDisabled ? {} : {
321
- onKeyDown,
322
- onKeyUp
323
- } };
324
- }
325
- //#endregion
326
- //#region ../../node_modules/.bun/react-aria@3.52.1+67f6792bdf102c28/node_modules/react-aria/dist/private/utils/useSyncRef.mjs
327
- function $b7115c395c64f7b5$export$4debdb1a3f0fa79e(context, ref) {
328
- $c4867b2f328c2698$export$e5c5a5f917a5871c(() => {
329
- if (context && context.ref && ref) {
330
- context.ref.current = ref.current;
331
- return () => {
332
- if (context.ref) context.ref.current = null;
333
- };
334
- }
335
- });
336
- }
337
- //#endregion
338
- export { $390e54f620492c70$export$f680877a34711e37 as a, $390e54f620492c70$export$b4cc09c592e8fdb8 as i, $8296dad1a4c5e0dc$export$8f71654801c2f7cd as n, $bbaa08b3cd72f041$export$9d1611c77c2fe928 as r, $b7115c395c64f7b5$export$4debdb1a3f0fa79e as t };