@wrdagency/blockout 0.0.18 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (167) hide show
  1. package/dist/2NBKRL7C-7XoDiJp9.js +85 -0
  2. package/dist/2RSXSRCN-qt84MtKs.js +61 -0
  3. package/dist/4CMBR7SL-BHIN8rB4.js +308 -0
  4. package/dist/5JTVDSTH-CG1NL6Fw.js +174 -0
  5. package/dist/5VQZOHHZ-CscZGerP.js +59 -0
  6. package/dist/6VRAQV3D-Clhw_nNS.js +201 -0
  7. package/dist/7PRQYBBV-91wrWGjk.js +17 -0
  8. package/dist/ArrowRight.es-xyNbtVOa.js +60 -0
  9. package/dist/DG5U6ZEL-CVj-Czp2.js +17 -0
  10. package/dist/F5MUBM3I-87B2_4WK.js +54 -0
  11. package/dist/LMDWO4NN--KEvZePp.js +610 -0
  12. package/dist/MTZPJQMC-DyCWBG18.js +14 -0
  13. package/dist/P7GR5CS5-BoOYUfSQ.js +19 -0
  14. package/dist/PFRGBC2K-BEg8ahbY.js +303 -0
  15. package/dist/RS7LB2H4-D0fWv5qu.js +15 -0
  16. package/dist/RZ4GPYOB-13-5LlEb.js +37 -0
  17. package/dist/S43UC3DV-Dn8EFLaT.js +22 -0
  18. package/dist/Square.es-KJLdY11q.js +72 -0
  19. package/dist/T7VMP3TM-DeRMoW8g.js +77 -0
  20. package/dist/TP7N7UIH-BHb1rEeb.js +34 -0
  21. package/dist/UQQRIHDV-Bu8e1bYU.js +69 -0
  22. package/dist/UYGDZTLQ-DcCmv5SE.js +12 -0
  23. package/dist/VIIRIBF3-D5DmZNtI.js +26 -0
  24. package/dist/WMYDSCNQ-DECXdiUT.js +1346 -0
  25. package/dist/WYCIER3C-8jmp2F15.js +175 -0
  26. package/dist/YV4JVR4I-LkUIiJWj.js +351 -0
  27. package/dist/assets/button.css +1 -1
  28. package/dist/assets/index.css +1 -1
  29. package/dist/assets/index10.css +1 -1
  30. package/dist/assets/index11.css +1 -1
  31. package/dist/assets/index12.css +1 -1
  32. package/dist/assets/index13.css +1 -1
  33. package/dist/assets/index14.css +1 -0
  34. package/dist/assets/index15.css +1 -0
  35. package/dist/assets/index16.css +1 -0
  36. package/dist/assets/index17.css +1 -0
  37. package/dist/assets/index18.css +1 -0
  38. package/dist/assets/index19.css +1 -0
  39. package/dist/assets/index2.css +1 -1
  40. package/dist/assets/index3.css +1 -1
  41. package/dist/assets/index4.css +1 -1
  42. package/dist/assets/index5.css +1 -1
  43. package/dist/assets/index6.css +1 -1
  44. package/dist/assets/index7.css +1 -1
  45. package/dist/assets/index8.css +1 -1
  46. package/dist/assets/index9.css +1 -1
  47. package/dist/assets/style.css +1 -1
  48. package/dist/assets/style2.css +1 -0
  49. package/dist/assets/style3.css +1 -0
  50. package/dist/assets/style4.css +1 -0
  51. package/dist/assets/styles.css +1 -1
  52. package/dist/components/block-editor/editor.d.ts +5 -0
  53. package/dist/components/block-editor/editor.js +6 -0
  54. package/dist/components/block-editor/index.d.ts +1 -0
  55. package/dist/components/block-editor/index.js +4 -0
  56. package/dist/components/breadcrumbs/index.js +87 -31
  57. package/dist/components/button/button.d.ts +1 -1
  58. package/dist/components/button/button.js +5 -5
  59. package/dist/components/button/icon.d.ts +1 -2
  60. package/dist/components/button/icon.js +10 -3
  61. package/dist/components/button/index.d.ts +4 -0
  62. package/dist/components/controls/base-control/affix.js +7 -7
  63. package/dist/components/controls/base-control/index.js +11 -11
  64. package/dist/components/controls/base-popover-control/index.d.ts +9 -0
  65. package/dist/components/controls/base-popover-control/index.js +47 -0
  66. package/dist/components/controls/checkbox-control/index.d.ts +8 -0
  67. package/dist/components/controls/checkbox-control/index.js +57 -0
  68. package/dist/components/controls/choice-control/choice.js +13 -11
  69. package/dist/components/controls/choice-control/index.js +1 -1
  70. package/dist/components/controls/index.d.ts +4 -1
  71. package/dist/components/controls/index.js +25 -16
  72. package/dist/components/controls/number-control/index.js +29 -27
  73. package/dist/components/controls/password-control/index.js +1 -1
  74. package/dist/components/controls/recurrence-control/index.d.ts +8 -0
  75. package/dist/components/controls/recurrence-control/index.js +208 -0
  76. package/dist/components/controls/select-control/component.d.ts +12 -0
  77. package/dist/components/controls/select-control/component.js +1879 -0
  78. package/dist/components/controls/select-control/index.d.ts +2 -12
  79. package/dist/components/controls/select-control/index.js +5 -1860
  80. package/dist/components/controls/select-control/options.d.ts +7 -0
  81. package/dist/components/controls/select-control/options.js +9 -0
  82. package/dist/components/controls/textarea-control/index.js +1 -1
  83. package/dist/components/controls/toggle-control/index.js +11 -9
  84. package/dist/components/controls/toggle-group-control/index.d.ts +19 -0
  85. package/dist/components/controls/toggle-group-control/index.js +50 -0
  86. package/dist/components/data-table/header.js +120 -171
  87. package/dist/components/data-table/index.js +1 -1
  88. package/dist/components/filesystem/file.d.ts +7 -0
  89. package/dist/components/filesystem/file.js +44 -0
  90. package/dist/components/filesystem/folder.d.ts +6 -0
  91. package/dist/components/filesystem/folder.js +160 -0
  92. package/dist/components/filesystem/icon.d.ts +7 -0
  93. package/dist/components/filesystem/icon.js +908 -0
  94. package/dist/components/filesystem/index.js +14 -0
  95. package/dist/components/filesystem/list.d.ts +4 -0
  96. package/dist/components/filesystem/list.js +18 -0
  97. package/dist/components/filesystem/root.d.ts +3 -0
  98. package/dist/components/filesystem/root.js +7 -0
  99. package/dist/components/form/components/index.js +12 -12
  100. package/dist/components/form/components/pagination.js +23 -16
  101. package/dist/components/index.d.ts +5 -0
  102. package/dist/components/index.js +50 -31
  103. package/dist/components/markdown/{index.d.ts → editor/component.d.ts} +2 -2
  104. package/dist/components/markdown/editor/component.js +25583 -0
  105. package/dist/components/markdown/editor/index.d.ts +1 -0
  106. package/dist/components/markdown/editor/index.js +4 -0
  107. package/dist/components/markdown/formats.js +29 -27
  108. package/dist/components/markdown/index.js +5 -25842
  109. package/dist/components/markdown/prose.d.ts +3 -0
  110. package/dist/components/markdown/prose.js +15 -0
  111. package/dist/components/menu/index.js +24 -23
  112. package/dist/components/menu/item.js +1 -1
  113. package/dist/components/menu/items/action.js +1 -1
  114. package/dist/components/menu/items/spacer.js +14 -42
  115. package/dist/components/menu/items/submenu.js +2 -2
  116. package/dist/components/menu/items/toggle.js +25 -91
  117. package/dist/components/progress/index.js +1 -1
  118. package/dist/components/tabs/index.js +12 -0
  119. package/dist/components/tabs/list.d.ts +7 -0
  120. package/dist/components/tabs/list.js +42 -0
  121. package/dist/components/tabs/panel.d.ts +8 -0
  122. package/dist/components/tabs/panel.js +132 -0
  123. package/dist/components/tabs/root.d.ts +9 -0
  124. package/dist/components/tabs/root.js +173 -0
  125. package/dist/components/tabs/tab.d.ts +7 -0
  126. package/dist/components/tabs/tab.js +81 -0
  127. package/dist/components/toolbar/index.js +27 -0
  128. package/dist/components/toolbar/root.d.ts +6 -0
  129. package/dist/components/toolbar/root.js +6 -0
  130. package/dist/composite-provider-DxKEAxsZ.js +10 -0
  131. package/dist/floating-ui.dom-BqewRPVB.js +1124 -0
  132. package/dist/hooks/state.d.ts +4 -0
  133. package/dist/hooks/state.js +7 -0
  134. package/dist/hooks/theme.js +7 -38
  135. package/dist/index-1AjPIqTN.js +73 -0
  136. package/dist/index-B5y9bioP.js +258 -0
  137. package/dist/index-BI5rPXbu.js +391 -0
  138. package/dist/index.js +63 -40
  139. package/dist/{item-D9r2-3fk.js → item-BrZqCoM7.js} +240 -234
  140. package/dist/options-Cfoqhxw2.js +96 -0
  141. package/dist/primitives/index.d.ts +2 -0
  142. package/dist/primitives/index.js +4 -0
  143. package/dist/primitives/resizable/index.js +1 -1
  144. package/dist/primitives/scroll-area/index.d.ts +7 -0
  145. package/dist/primitives/scroll-area/index.js +545 -0
  146. package/dist/primitives/truncate/index.d.ts +7 -0
  147. package/dist/primitives/truncate/index.js +46 -0
  148. package/dist/primitives/visually-hidden/index.d.ts +2 -2
  149. package/dist/primitives/visually-hidden/index.js +13 -3
  150. package/dist/root-CdR32nP9.js +73 -0
  151. package/dist/tslib.es6-DN7pKd6F.js +44 -0
  152. package/dist/types/date.d.ts +39 -0
  153. package/dist/types/date.js +1749 -0
  154. package/dist/types/options.d.ts +8 -6
  155. package/dist/utils/components.d.ts +5 -0
  156. package/dist/utils/components.js +14 -0
  157. package/dist/utils/date.d.ts +1 -0
  158. package/dist/utils/date.js +15 -0
  159. package/dist/utils/string.d.ts +4 -0
  160. package/dist/utils/string.js +18 -0
  161. package/package.json +4 -1
  162. package/dist/2NBKRL7C-D-Q0qGRV.js +0 -81
  163. package/dist/P7GR5CS5-qyeuZVEs.js +0 -640
  164. package/dist/T7VMP3TM-BxgFbvdx.js +0 -2106
  165. package/dist/UQQRIHDV-BGs025hb.js +0 -1046
  166. package/dist/VIIRIBF3-D9clDhln.js +0 -21
  167. package/dist/floating-ui.dom-9sqP7IwC.js +0 -1512
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Fixes a typing bug in @uidotdev/usehooks.
3
+ */
4
+ export declare function useObjectState<T>(initial: T): [T, (arg: Partial<T> | ((state: T) => Partial<T>)) => void];
@@ -0,0 +1,7 @@
1
+ import { b as e } from "../index-1AjPIqTN.js";
2
+ function o(t) {
3
+ return e(t);
4
+ }
5
+ export {
6
+ o as useObjectState
7
+ };
@@ -1,45 +1,14 @@
1
- import * as c from "react";
2
- import { useMemo as g, useEffect as d } from "react";
3
- function u(e, t) {
4
- window.dispatchEvent(new StorageEvent("storage", { key: e, newValue: t }));
5
- }
6
- const l = (e, t) => {
7
- const n = JSON.stringify(t);
8
- window.localStorage.setItem(e, n), u(e, n);
9
- }, m = (e) => {
10
- window.localStorage.removeItem(e), u(e, null);
11
- }, i = (e) => window.localStorage.getItem(e), S = (e) => (window.addEventListener("storage", e), () => window.removeEventListener("storage", e)), f = () => {
12
- throw Error("useLocalStorage is a client-only hook");
13
- };
14
- function w(e, t) {
15
- const n = () => i(e), r = c.useSyncExternalStore(
16
- S,
17
- n,
18
- f
19
- ), a = c.useCallback(
20
- (o) => {
21
- try {
22
- const s = typeof o == "function" ? o(JSON.parse(r)) : o;
23
- s == null ? m(e) : l(e, s);
24
- } catch (s) {
25
- console.warn(s);
26
- }
27
- },
28
- [e, r]
29
- );
30
- return c.useEffect(() => {
31
- i(e) === null && l(e, t);
32
- }, [e, t]), [r ? JSON.parse(r) : t, a];
33
- }
34
- function p() {
35
- const [e, t] = w("wrd__theme__dark", !1), n = g(() => e ? "dark" : "light", [e]), r = (o) => t(o === "dark"), a = () => t((o) => !o);
36
- return d(() => {
1
+ import { u as a } from "../index-1AjPIqTN.js";
2
+ import { useMemo as c, useEffect as u } from "react";
3
+ function h() {
4
+ const [e, o] = a("wrd__theme__dark", !1), r = c(() => e ? "dark" : "light", [e]), s = (t) => o(t === "dark"), m = () => o((t) => !t);
5
+ return u(() => {
37
6
  document && document.documentElement.setAttribute(
38
7
  "data-colour-scheme",
39
8
  e ? "dark" : "light"
40
9
  );
41
- }, [e]), { isDark: e, theme: n, setTheme: r, toggleDarkTheme: a };
10
+ }, [e]), { isDark: e, theme: r, setTheme: s, toggleDarkTheme: m };
42
11
  }
43
12
  export {
44
- p as useTheme
13
+ h as useTheme
45
14
  };
@@ -0,0 +1,73 @@
1
+ import * as s from "react";
2
+ function c(e) {
3
+ return Object.prototype.toString.call(e) === "[object Object]";
4
+ }
5
+ function S(e, t) {
6
+ window.dispatchEvent(new StorageEvent("storage", { key: e, newValue: t }));
7
+ }
8
+ const u = (e, t) => {
9
+ const n = JSON.stringify(t);
10
+ window.localStorage.setItem(e, n), S(e, n);
11
+ }, d = (e) => {
12
+ window.localStorage.removeItem(e), S(e, null);
13
+ }, l = (e) => window.localStorage.getItem(e), w = (e) => (window.addEventListener("storage", e), () => window.removeEventListener("storage", e)), f = () => {
14
+ throw Error("useLocalStorage is a client-only hook");
15
+ };
16
+ function g(e, t) {
17
+ const n = () => l(e), a = s.useSyncExternalStore(
18
+ w,
19
+ n,
20
+ f
21
+ ), i = s.useCallback(
22
+ (o) => {
23
+ try {
24
+ const r = typeof o == "function" ? o(JSON.parse(a)) : o;
25
+ r == null ? d(e) : u(e, r);
26
+ } catch (r) {
27
+ console.warn(r);
28
+ }
29
+ },
30
+ [e, a]
31
+ );
32
+ return s.useEffect(() => {
33
+ l(e) === null && u(e, t);
34
+ }, [e, t]), [a ? JSON.parse(a) : t, i];
35
+ }
36
+ function h(e) {
37
+ const [t, n] = s.useState(e), a = s.useCallback((i) => {
38
+ typeof i == "function" && n((o) => {
39
+ const r = i(o);
40
+ if (c(r))
41
+ return {
42
+ ...o,
43
+ ...r
44
+ };
45
+ }), c(i) && n((o) => ({
46
+ ...o,
47
+ ...i
48
+ }));
49
+ }, []);
50
+ return [t, a];
51
+ }
52
+ function p() {
53
+ const [e, t] = s.useState({
54
+ width: null,
55
+ height: null
56
+ });
57
+ return s.useLayoutEffect(() => {
58
+ const n = () => {
59
+ t({
60
+ width: window.innerWidth,
61
+ height: window.innerHeight
62
+ });
63
+ };
64
+ return n(), window.addEventListener("resize", n), () => {
65
+ window.removeEventListener("resize", n);
66
+ };
67
+ }, []), e;
68
+ }
69
+ export {
70
+ p as a,
71
+ h as b,
72
+ g as u
73
+ };
@@ -0,0 +1,258 @@
1
+ import * as i from "react";
2
+ import { r as E } from "./index-BI5rPXbu.js";
3
+ import { jsx as y, Fragment as M } from "react/jsx-runtime";
4
+ function v(e, n) {
5
+ if (typeof e == "function")
6
+ return e(n);
7
+ e != null && (e.current = n);
8
+ }
9
+ function P(...e) {
10
+ return (n) => {
11
+ let t = !1;
12
+ const o = e.map((r) => {
13
+ const s = v(r, n);
14
+ return !t && typeof s == "function" && (t = !0), s;
15
+ });
16
+ if (t)
17
+ return () => {
18
+ for (let r = 0; r < o.length; r++) {
19
+ const s = o[r];
20
+ typeof s == "function" ? s() : v(e[r], null);
21
+ }
22
+ };
23
+ };
24
+ }
25
+ function O(...e) {
26
+ return i.useCallback(P(...e), e);
27
+ }
28
+ // @__NO_SIDE_EFFECTS__
29
+ function R(e) {
30
+ const n = /* @__PURE__ */ w(e), t = i.forwardRef((o, r) => {
31
+ const { children: s, ...l } = o, c = i.Children.toArray(s), u = c.find(b);
32
+ if (u) {
33
+ const a = u.props.children, p = c.map((f) => f === u ? i.Children.count(a) > 1 ? i.Children.only(null) : i.isValidElement(a) ? a.props.children : null : f);
34
+ return /* @__PURE__ */ y(n, { ...l, ref: r, children: i.isValidElement(a) ? i.cloneElement(a, void 0, p) : null });
35
+ }
36
+ return /* @__PURE__ */ y(n, { ...l, ref: r, children: s });
37
+ });
38
+ return t.displayName = `${e}.Slot`, t;
39
+ }
40
+ // @__NO_SIDE_EFFECTS__
41
+ function w(e) {
42
+ const n = i.forwardRef((t, o) => {
43
+ const { children: r, ...s } = t;
44
+ if (i.isValidElement(r)) {
45
+ const l = _(r), c = T(s, r.props);
46
+ return r.type !== i.Fragment && (c.ref = o ? P(o, l) : l), i.cloneElement(r, c);
47
+ }
48
+ return i.Children.count(r) > 1 ? i.Children.only(null) : null;
49
+ });
50
+ return n.displayName = `${e}.SlotClone`, n;
51
+ }
52
+ var A = Symbol("radix.slottable");
53
+ // @__NO_SIDE_EFFECTS__
54
+ function B(e) {
55
+ const n = ({ children: t }) => /* @__PURE__ */ y(M, { children: t });
56
+ return n.displayName = `${e}.Slottable`, n.__radixId = A, n;
57
+ }
58
+ function b(e) {
59
+ return i.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === A;
60
+ }
61
+ function T(e, n) {
62
+ const t = { ...n };
63
+ for (const o in n) {
64
+ const r = e[o], s = n[o];
65
+ /^on[A-Z]/.test(o) ? r && s ? t[o] = (...c) => {
66
+ const u = s(...c);
67
+ return r(...c), u;
68
+ } : r && (t[o] = r) : o === "style" ? t[o] = { ...r, ...s } : o === "className" && (t[o] = [r, s].filter(Boolean).join(" "));
69
+ }
70
+ return { ...e, ...t };
71
+ }
72
+ function _(e) {
73
+ var o, r;
74
+ let n = (o = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : o.get, t = n && "isReactWarning" in n && n.isReactWarning;
75
+ return t ? e.ref : (n = (r = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : r.get, t = n && "isReactWarning" in n && n.isReactWarning, t ? e.props.ref : e.props.ref || e.ref);
76
+ }
77
+ var I = [
78
+ "a",
79
+ "button",
80
+ "div",
81
+ "form",
82
+ "h2",
83
+ "h3",
84
+ "img",
85
+ "input",
86
+ "label",
87
+ "li",
88
+ "nav",
89
+ "ol",
90
+ "p",
91
+ "select",
92
+ "span",
93
+ "svg",
94
+ "ul"
95
+ ], k = I.reduce((e, n) => {
96
+ const t = /* @__PURE__ */ R(`Primitive.${n}`), o = i.forwardRef((r, s) => {
97
+ const { asChild: l, ...c } = r, u = l ? t : n;
98
+ return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ y(u, { ...c, ref: s });
99
+ });
100
+ return o.displayName = `Primitive.${n}`, { ...e, [n]: o };
101
+ }, {});
102
+ function Z(e, n) {
103
+ e && E.flushSync(() => e.dispatchEvent(n));
104
+ }
105
+ var x = globalThis != null && globalThis.document ? i.useLayoutEffect : () => {
106
+ };
107
+ function D(e, n) {
108
+ return i.useReducer((t, o) => n[t][o] ?? t, e);
109
+ }
110
+ var U = (e) => {
111
+ const { present: n, children: t } = e, o = W(n), r = typeof t == "function" ? t({ present: o.isPresent }) : i.Children.only(t), s = O(o.ref, $(r));
112
+ return typeof t == "function" || o.isPresent ? i.cloneElement(r, { ref: s }) : null;
113
+ };
114
+ U.displayName = "Presence";
115
+ function W(e) {
116
+ const [n, t] = i.useState(), o = i.useRef(null), r = i.useRef(e), s = i.useRef("none"), l = e ? "mounted" : "unmounted", [c, u] = D(l, {
117
+ mounted: {
118
+ UNMOUNT: "unmounted",
119
+ ANIMATION_OUT: "unmountSuspended"
120
+ },
121
+ unmountSuspended: {
122
+ MOUNT: "mounted",
123
+ ANIMATION_END: "unmounted"
124
+ },
125
+ unmounted: {
126
+ MOUNT: "mounted"
127
+ }
128
+ });
129
+ return i.useEffect(() => {
130
+ const a = S(o.current);
131
+ s.current = c === "mounted" ? a : "none";
132
+ }, [c]), x(() => {
133
+ const a = o.current, p = r.current;
134
+ if (p !== e) {
135
+ const m = s.current, d = S(a);
136
+ e ? u("MOUNT") : d === "none" || (a == null ? void 0 : a.display) === "none" ? u("UNMOUNT") : u(p && m !== d ? "ANIMATION_OUT" : "UNMOUNT"), r.current = e;
137
+ }
138
+ }, [e, u]), x(() => {
139
+ if (n) {
140
+ let a;
141
+ const p = n.ownerDocument.defaultView ?? window, f = (d) => {
142
+ const h = S(o.current).includes(d.animationName);
143
+ if (d.target === n && h && (u("ANIMATION_END"), !r.current)) {
144
+ const C = n.style.animationFillMode;
145
+ n.style.animationFillMode = "forwards", a = p.setTimeout(() => {
146
+ n.style.animationFillMode === "forwards" && (n.style.animationFillMode = C);
147
+ });
148
+ }
149
+ }, m = (d) => {
150
+ d.target === n && (s.current = S(o.current));
151
+ };
152
+ return n.addEventListener("animationstart", m), n.addEventListener("animationcancel", f), n.addEventListener("animationend", f), () => {
153
+ p.clearTimeout(a), n.removeEventListener("animationstart", m), n.removeEventListener("animationcancel", f), n.removeEventListener("animationend", f);
154
+ };
155
+ } else
156
+ u("ANIMATION_END");
157
+ }, [n, u]), {
158
+ isPresent: ["mounted", "unmountSuspended"].includes(c),
159
+ ref: i.useCallback((a) => {
160
+ o.current = a ? getComputedStyle(a) : null, t(a);
161
+ }, [])
162
+ };
163
+ }
164
+ function S(e) {
165
+ return (e == null ? void 0 : e.animationName) || "none";
166
+ }
167
+ function $(e) {
168
+ var o, r;
169
+ let n = (o = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : o.get, t = n && "isReactWarning" in n && n.isReactWarning;
170
+ return t ? e.ref : (n = (r = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : r.get, t = n && "isReactWarning" in n && n.isReactWarning, t ? e.props.ref : e.props.ref || e.ref);
171
+ }
172
+ function q(e, n = []) {
173
+ let t = [];
174
+ function o(s, l) {
175
+ const c = i.createContext(l), u = t.length;
176
+ t = [...t, l];
177
+ const a = (f) => {
178
+ var g;
179
+ const { scope: m, children: d, ...N } = f, h = ((g = m == null ? void 0 : m[e]) == null ? void 0 : g[u]) || c, C = i.useMemo(() => N, Object.values(N));
180
+ return /* @__PURE__ */ y(h.Provider, { value: C, children: d });
181
+ };
182
+ a.displayName = s + "Provider";
183
+ function p(f, m) {
184
+ var h;
185
+ const d = ((h = m == null ? void 0 : m[e]) == null ? void 0 : h[u]) || c, N = i.useContext(d);
186
+ if (N) return N;
187
+ if (l !== void 0) return l;
188
+ throw new Error(`\`${f}\` must be used within \`${s}\``);
189
+ }
190
+ return [a, p];
191
+ }
192
+ const r = () => {
193
+ const s = t.map((l) => i.createContext(l));
194
+ return function(c) {
195
+ const u = (c == null ? void 0 : c[e]) || s;
196
+ return i.useMemo(
197
+ () => ({ [`__scope${e}`]: { ...c, [e]: u } }),
198
+ [c, u]
199
+ );
200
+ };
201
+ };
202
+ return r.scopeName = e, [o, L(r, ...n)];
203
+ }
204
+ function L(...e) {
205
+ const n = e[0];
206
+ if (e.length === 1) return n;
207
+ const t = () => {
208
+ const o = e.map((r) => ({
209
+ useScope: r(),
210
+ scopeName: r.scopeName
211
+ }));
212
+ return function(s) {
213
+ const l = o.reduce((c, { useScope: u, scopeName: a }) => {
214
+ const f = u(s)[`__scope${a}`];
215
+ return { ...c, ...f };
216
+ }, {});
217
+ return i.useMemo(() => ({ [`__scope${n.scopeName}`]: l }), [l]);
218
+ };
219
+ };
220
+ return t.scopeName = n.scopeName, t;
221
+ }
222
+ function z(e) {
223
+ const n = i.useRef(e);
224
+ return i.useEffect(() => {
225
+ n.current = e;
226
+ }), i.useMemo(() => (...t) => {
227
+ var o;
228
+ return (o = n.current) == null ? void 0 : o.call(n, ...t);
229
+ }, []);
230
+ }
231
+ var j = i.createContext(void 0);
232
+ function G(e) {
233
+ const n = i.useContext(j);
234
+ return e || n || "ltr";
235
+ }
236
+ function J(e, [n, t]) {
237
+ return Math.min(t, Math.max(n, e));
238
+ }
239
+ function K(e, n, { checkForDefaultPrevented: t = !0 } = {}) {
240
+ return function(r) {
241
+ if (e == null || e(r), t === !1 || !r.defaultPrevented)
242
+ return n == null ? void 0 : n(r);
243
+ };
244
+ }
245
+ export {
246
+ k as P,
247
+ G as a,
248
+ U as b,
249
+ q as c,
250
+ K as d,
251
+ z as e,
252
+ x as f,
253
+ J as g,
254
+ Z as h,
255
+ R as i,
256
+ B as j,
257
+ O as u
258
+ };