@sheetxl/utils-react 0.7.27 → 0.7.28-beta.2

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 (154) hide show
  1. package/browser/cjs/C7jPCqFJNiWyD2pr.cjs +1 -0
  2. package/browser/cjs/CyWMySHsu-RvsIGs.cjs +1 -0
  3. package/browser/cjs/DZSvmqU8nRas1uz6.cjs +1 -0
  4. package/browser/cjs/index.cjs +5 -7
  5. package/browser/esm/7-_IBNtjW6k90P9e.mjs +390 -0
  6. package/browser/esm/BgV0nMxx2V13JMAV.mjs +2171 -0
  7. package/browser/esm/index.mjs +6128 -1806
  8. package/browser/esm/sLI7RooaRwVJN8R1.mjs +139 -0
  9. package/licenses/dependencies.txt +246 -39
  10. package/node/esm/DxhVj6bgjkjclg0J.mjs +139 -0
  11. package/node/esm/index.mjs +5141 -1774
  12. package/node/esm/k3zNlJ7uOn8Nfx4T.mjs +2171 -0
  13. package/package.json +8 -5
  14. package/types/index.d.ts +2 -2043
  15. package/types/src/animation/AnimationModeContext.d.ts +10 -0
  16. package/types/src/animation/index.d.ts +3 -0
  17. package/types/src/animation/useAnimatedMeasure.d.ts +39 -0
  18. package/types/src/command/ActivationTracker.d.ts +53 -0
  19. package/types/src/command/CommandAnchorProvider.d.ts +64 -0
  20. package/types/src/command/CommandButtonEntryLabel.d.ts +25 -0
  21. package/types/src/command/CommandButtonRegistry.d.ts +159 -0
  22. package/types/src/command/CommandButtonRegistryContext.d.ts +35 -0
  23. package/types/src/command/CommandCatalog.d.ts +155 -0
  24. package/types/src/command/CommandCatalogResource.d.ts +7 -0
  25. package/types/src/command/CommandCatalogService.d.ts +61 -0
  26. package/types/src/command/CommandChainContext.d.ts +32 -0
  27. package/types/src/command/CommandFallbackContext.d.ts +30 -0
  28. package/types/src/command/CommandFocusContext.d.ts +21 -0
  29. package/types/src/command/CommandRegistry.d.ts +164 -0
  30. package/types/src/command/CommandRegistryContext.d.ts +16 -0
  31. package/types/src/command/CommandResolver.d.ts +162 -0
  32. package/types/src/command/CommandScope.d.ts +343 -0
  33. package/types/src/command/CommandScopeContext.d.ts +205 -0
  34. package/types/src/command/FocusActivation.d.ts +140 -0
  35. package/types/src/command/ICommand.d.ts +31 -0
  36. package/types/src/command/ICommandDefinition.d.ts +82 -0
  37. package/types/src/command/KeyBindingDispatcher.d.ts +150 -0
  38. package/types/src/command/LayerActivation.d.ts +45 -0
  39. package/types/src/command/Types.d.ts +80 -0
  40. package/types/src/command/createResolvedCommand.d.ts +91 -0
  41. package/types/src/command/index.d.ts +26 -0
  42. package/types/src/command/reduceDefinitions.d.ts +33 -0
  43. package/types/src/command/useCommands.d.ts +22 -0
  44. package/types/src/command/useContributeCommands.d.ts +18 -0
  45. package/types/src/components/FocusKeyNavigation.d.ts +22 -0
  46. package/types/src/components/ITooltip.d.ts +38 -0
  47. package/types/src/components/RoundedTab.d.ts +26 -0
  48. package/types/src/components/index.d.ts +4 -0
  49. package/types/src/error/ErrorPanel.d.ts +14 -0
  50. package/types/src/error/ReactErrorBoundary.d.ts +7 -0
  51. package/types/src/error/UncaughtErrorBoundary.d.ts +5 -0
  52. package/types/src/error/index.d.ts +4 -0
  53. package/types/src/float/FloatPanel.d.ts +57 -0
  54. package/types/src/float/FloatPopper.d.ts +85 -0
  55. package/types/src/float/FloatPopup.d.ts +19 -0
  56. package/types/src/float/FloatProvider.d.ts +60 -0
  57. package/types/src/float/FloatStackContext.d.ts +25 -0
  58. package/types/src/float/FloatTooltip.d.ts +22 -0
  59. package/types/src/float/FloatUtils.d.ts +55 -0
  60. package/types/src/float/_FloatUtils.d.ts +51 -0
  61. package/types/src/float/index.d.ts +9 -0
  62. package/types/src/float/useFloatStack.d.ts +92 -0
  63. package/types/src/hooks/LanguageState.d.ts +15 -0
  64. package/types/src/hooks/index.d.ts +19 -0
  65. package/types/src/hooks/useBoundSyncExternalStore.d.ts +23 -0
  66. package/types/src/hooks/useCallbackRef.d.ts +11 -0
  67. package/types/src/hooks/useDevicePixelRatio.d.ts +37 -0
  68. package/types/src/hooks/useEditMode.d.ts +66 -0
  69. package/types/src/hooks/useGlobalClipboard.d.ts +7 -0
  70. package/types/src/hooks/useId.d.ts +9 -0
  71. package/types/src/hooks/useImperativeElement.d.ts +3 -0
  72. package/types/src/hooks/useLanguage.d.ts +13 -0
  73. package/types/src/hooks/useMouseDownAndHoldListener.d.ts +13 -0
  74. package/types/src/hooks/useNotifier.d.ts +330 -0
  75. package/types/src/hooks/useOnClickOrFocusAway.d.ts +8 -0
  76. package/types/src/hooks/useOptionalBoundSyncExternalStore.d.ts +20 -0
  77. package/types/src/hooks/useOptionalSyncExternalStore.d.ts +18 -0
  78. package/types/src/hooks/useSynchronizedPointerHandler.d.ts +54 -0
  79. package/types/src/hooks/useTextareaCaretRect.d.ts +85 -0
  80. package/types/src/hooks/useTraceUpdate.d.ts +2 -0
  81. package/types/src/hooks/useTranslator.d.ts +32 -0
  82. package/types/src/icons/DynamicIcon.d.ts +17 -0
  83. package/types/src/icons/DynamicIconService.d.ts +39 -0
  84. package/types/src/icons/ErrorIcon.d.ts +6 -0
  85. package/types/src/icons/Types.d.ts +81 -0
  86. package/types/src/icons/WalkingIcon.d.ts +27 -0
  87. package/types/src/icons/_Utils.d.ts +3 -0
  88. package/types/src/icons/index.d.ts +5 -0
  89. package/types/src/icons/packs/Base.d.ts +4 -0
  90. package/types/src/icons/packs/Conditional.d.ts +4 -0
  91. package/types/src/index.d.ts +18 -0
  92. package/types/src/loading/LoadingPanel.d.ts +31 -0
  93. package/types/src/loading/index.d.ts +2 -0
  94. package/types/src/persistence/InMemoryStore.d.ts +12 -0
  95. package/types/src/persistence/LocalStorageStore.d.ts +15 -0
  96. package/types/src/persistence/PersistenceStateProvider.d.ts +3 -0
  97. package/types/src/persistence/Types.d.ts +95 -0
  98. package/types/src/persistence/_Context.d.ts +9 -0
  99. package/types/src/persistence/index.d.ts +6 -0
  100. package/types/src/persistence/usePersistenceState.d.ts +33 -0
  101. package/types/src/react-resizable/Resizable.d.ts +30 -0
  102. package/types/src/react-resizable/ResizableBox.d.ts +18 -0
  103. package/types/src/react-resizable/index.d.ts +11 -0
  104. package/types/src/react-resizable/propTypes.d.ts +56 -0
  105. package/types/src/react-resizable/utils.d.ts +3 -0
  106. package/types/src/scroll/AxisViewport.d.ts +73 -0
  107. package/types/src/scroll/IScrollPane.d.ts +63 -0
  108. package/types/src/scroll/IScrollbar.d.ts +94 -0
  109. package/types/src/scroll/NativeScrollbar.d.ts +7 -0
  110. package/types/src/scroll/ScrollButton.d.ts +29 -0
  111. package/types/src/scroll/ScrollPane.d.ts +4 -0
  112. package/types/src/scroll/Scrollbar.d.ts +4 -0
  113. package/types/src/scroll/TouchThumbContext.d.ts +93 -0
  114. package/types/src/scroll/TouchThumbHandle.d.ts +64 -0
  115. package/types/src/scroll/TrackDrag.d.ts +107 -0
  116. package/types/src/scroll/Utils.d.ts +8 -0
  117. package/types/src/scroll/Viewport.d.ts +285 -0
  118. package/types/src/scroll/VirtualScrollbar.d.ts +49 -0
  119. package/types/src/scroll/index.d.ts +14 -0
  120. package/types/src/scroll/scrollbarTheming.d.ts +27 -0
  121. package/types/src/scroll/useWheelScroll.d.ts +27 -0
  122. package/types/src/scroller/Scroller.d.ts +260 -0
  123. package/types/src/scroller/animate.d.ts +30 -0
  124. package/types/src/scroller/index.d.ts +2 -0
  125. package/types/src/singletonHook/components/SingleItemContainer.d.ts +6 -0
  126. package/types/src/singletonHook/components/SingletonHooksContainer.d.ts +7 -0
  127. package/types/src/singletonHook/index.d.ts +11 -0
  128. package/types/src/singletonHook/singletonHook.d.ts +6 -0
  129. package/types/src/singletonHook/utils/env.d.ts +4 -0
  130. package/types/src/singletonHook/utils/env.native.d.ts +1 -0
  131. package/types/src/singletonHook/utils/warning.d.ts +2 -0
  132. package/types/src/splitPane/SplitPane.d.ts +91 -0
  133. package/types/src/splitPane/SplitPaneResizer.d.ts +11 -0
  134. package/types/src/splitPane/index.d.ts +3 -0
  135. package/types/src/theme/TokenTheme.d.ts +196 -0
  136. package/types/src/theme/TokenThemeProvider.d.ts +97 -0
  137. package/types/src/theme/buildThemeCSS.d.ts +54 -0
  138. package/types/src/theme/createThemeVars.d.ts +15 -0
  139. package/types/src/theme/defaultTheme.d.ts +15 -0
  140. package/types/src/theme/index.d.ts +9 -0
  141. package/types/src/theme/resolveTokens.d.ts +21 -0
  142. package/types/src/theme/themeAttrs.d.ts +32 -0
  143. package/types/src/theme/useResolvedThemeMode.d.ts +17 -0
  144. package/types/src/types/Types.d.ts +71 -0
  145. package/types/src/types/index.d.ts +2 -0
  146. package/types/src/utils/FullScreenPortal.d.ts +6 -0
  147. package/types/src/utils/PinchZoom.d.ts +3 -0
  148. package/types/src/utils/ReactUtils.d.ts +134 -0
  149. package/types/src/utils/index.d.ts +4 -0
  150. package/types/src/utils/useFullScreen.d.ts +47 -0
  151. package/browser/cjs/DJJQOl0dYYJgXfru.cjs +0 -6
  152. package/browser/esm/Bh0xih0ZamA4MXkt.mjs +0 -12
  153. package/node/assets/style.css +0 -1
  154. package/node/esm/DdwriRgF582bPBWP.mjs +0 -12
@@ -0,0 +1,390 @@
1
+ /**
2
+ * @license @sheetxl/utils-react - Utils React - Utilities for React capabilities needed for all SheetXL components. - v0.7.28-beta.2
3
+ *
4
+ * (C) 2026-present SheetXL Inc. & Michael T. Ford
5
+ * License: The license can be found at https://www.sheetxl.com/license.
6
+ */
7
+ import { CommonUtils as e } from "@sheetxl/utils";
8
+ import { memo as t, useEffect as n, useMemo as r, useState as i } from "react";
9
+ import { jsx as a } from "react/jsx-runtime";
10
+ function o(e) {
11
+ if (typeof e == "function") return e;
12
+ if (typeof e == "string") {
13
+ let t = e.trim();
14
+ if (t.startsWith("data:image/svg+xml")) {
15
+ let e = function(e) {
16
+ let t = /^data:image\/svg\+xml(;[^,]*)?,(.*)$/i.exec(e.trim());
17
+ if (!t) return null;
18
+ let n = t[1] || "", r = t[2] || "";
19
+ try {
20
+ if (/;base64/i.test(n)) {
21
+ if (typeof atob < "u") {
22
+ let e = atob(r), t = e.length;
23
+ if (typeof TextDecoder < "u") {
24
+ let n = new Uint8Array(t);
25
+ for (let r = 0; r < t; r++) n[r] = e.charCodeAt(r);
26
+ return new TextDecoder("utf-8").decode(n);
27
+ }
28
+ let n = "";
29
+ for (let r = 0; r < t; r++) n += `%${e.charCodeAt(r).toString(16).padStart(2, "0")}`;
30
+ return decodeURIComponent(n);
31
+ }
32
+ return globalThis.Buffer.from(r, "base64").toString("utf-8");
33
+ }
34
+ try {
35
+ return decodeURIComponent(r);
36
+ } catch {
37
+ return r;
38
+ }
39
+ } catch {
40
+ return null;
41
+ }
42
+ }(t);
43
+ if (e) return l(e);
44
+ }
45
+ if (t.startsWith("<")) {
46
+ if (/^<\s*svg\b/i.test(t)) return l(t);
47
+ if (/^<\s*path\b/i.test(t)) {
48
+ let e = s(t);
49
+ if (e) return { paths: [{ d: e }] };
50
+ }
51
+ return { paths: [{ d: t }] };
52
+ }
53
+ return { paths: [{ d: t }] };
54
+ }
55
+ if (Array.isArray(e)) {
56
+ let t = [];
57
+ for (let n of e) if (typeof n == "string") {
58
+ let e = String(n).trim();
59
+ if (e.startsWith("<path")) {
60
+ let n = s(e);
61
+ n && t.push({ d: n });
62
+ } else t.push({ d: e });
63
+ } else n && typeof n == "object" && "d" in n && typeof n.d == "string" && t.push({ ...n });
64
+ return { paths: t };
65
+ }
66
+ return e;
67
+ }
68
+ function s(e) {
69
+ let t = /\bd\s*=\s*(?:"([^"]+)"|'([^']+)')/i.exec(e);
70
+ return t ? t[1] ?? t[2] ?? null : null;
71
+ }
72
+ function c(e) {
73
+ if ("svg" in e) return {
74
+ ...e,
75
+ svg: o(e.svg)
76
+ };
77
+ if ("url" in e) {
78
+ let t = typeof e.url == "string" ? { src: e.url } : e.url;
79
+ return {
80
+ ...e,
81
+ url: t
82
+ };
83
+ }
84
+ if ("emoji" in e) {
85
+ let t = typeof e.emoji == "string" ? e.emoji : e.emoji.text;
86
+ return {
87
+ ...e,
88
+ emoji: t
89
+ };
90
+ }
91
+ return e;
92
+ }
93
+ function l(e) {
94
+ try {
95
+ if (typeof DOMParser < "u") {
96
+ let t = new DOMParser().parseFromString(e, "image/svg+xml"), n = t.querySelector("svg")?.getAttribute("viewBox") ?? void 0, r = [];
97
+ return t.querySelectorAll("path").forEach((e) => {
98
+ let t = e.getAttribute("d");
99
+ if (!t) return;
100
+ let n = { d: t }, i = e.getAttribute("class");
101
+ i && (n.className = i);
102
+ let a = e.getAttribute("fill");
103
+ a && a !== "none" && (n.fill = a);
104
+ let o = e.getAttribute("stroke");
105
+ o && (n.stroke = o);
106
+ let s = e.getAttribute("opacity");
107
+ s && (n.opacity = Number(s));
108
+ let c = e.getAttribute("fill-rule");
109
+ c && (n.fillRule = c);
110
+ let l = e.getAttribute("clip-rule");
111
+ l && (n.clipRule = l), r.push(n);
112
+ }), {
113
+ viewBox: n,
114
+ paths: r
115
+ };
116
+ }
117
+ } catch {}
118
+ let t = e.match(/viewBox="([^"]+)"/i), n = t ? t[1] : void 0, r = [], i = /<path\b[^>]*\sd="([^"]+)"[^>]*>/gi, a;
119
+ for (; a = i.exec(e);) r.push({ d: a[1] });
120
+ return {
121
+ viewBox: n,
122
+ paths: r
123
+ };
124
+ }
125
+ function u(e) {
126
+ let t = {};
127
+ for (let [n, r] of Object.entries(e.icons)) t[n] = c(r);
128
+ let n = {
129
+ label: e.meta?.label ?? "Unnamed",
130
+ version: e.meta?.version ?? "1.0.0",
131
+ license: e.meta?.license ?? "MIT",
132
+ defaultViewBox: "0 0 24 24",
133
+ extends: e.meta?.extends ?? []
134
+ };
135
+ n.extends.includes("base") || n.extends.push("base");
136
+ let r = {
137
+ meta: n,
138
+ icons: t
139
+ }, i = e.overrides;
140
+ if (i) {
141
+ let e = {};
142
+ for (let [t, n] of Object.entries(i)) {
143
+ let r = {};
144
+ for (let [e, t] of Object.entries(n)) r[e] = c(t);
145
+ e[t] = r;
146
+ }
147
+ r.__overrides = e;
148
+ }
149
+ return r;
150
+ }
151
+ function d() {
152
+ let e = /* @__PURE__ */ new Map(), t = /* @__PURE__ */ new Map(), n = "base", r = /* @__PURE__ */ new Map();
153
+ async function i(t) {
154
+ let r = e.get(t ?? n);
155
+ if (!r) throw Error(`Icon pack not registered: ${t}`);
156
+ if (!r.pack) {
157
+ if (!r.loading) {
158
+ if (!r.loader) throw Error(`No loader for icon pack: ${t}`);
159
+ r.loading = r.loader().then((e) => {
160
+ let t = e && typeof e == "object" && "default" in e ? e.default : e;
161
+ r.pack = u(t);
162
+ }).catch((e) => {
163
+ throw r.loading = void 0, e;
164
+ });
165
+ }
166
+ await r.loading;
167
+ }
168
+ }
169
+ function a(e) {
170
+ let t = e.indexOf(":");
171
+ return t > 0 ? {
172
+ ns: e.slice(0, t),
173
+ key: e.slice(t + 1)
174
+ } : { key: e };
175
+ }
176
+ function o(n, r) {
177
+ let i = [n, ...e.get(n)?.pack?.meta.extends ?? []];
178
+ for (let n of i) {
179
+ let i = e.get(n);
180
+ if (!i?.pack) continue;
181
+ let { icons: a } = i.pack, o = a[t.get(n)?.get(r) ?? r] ?? a[r];
182
+ if (o) return {
183
+ glyph: o,
184
+ pack: i.pack,
185
+ packKey: n
186
+ };
187
+ }
188
+ return null;
189
+ }
190
+ function s(t, r) {
191
+ let i = r?.packKey ?? n;
192
+ if (r?.packKey) return o(r.packKey, t);
193
+ if (!t) return null;
194
+ let { ns: s, key: c } = a(t);
195
+ if (s) {
196
+ let t = e.get(s)?.pack;
197
+ if (t) {
198
+ if (e.get(n)?.pack) {
199
+ let e = t.__overrides?.[n]?.[c];
200
+ if (e) return {
201
+ glyph: e,
202
+ pack: t,
203
+ packKey: s
204
+ };
205
+ }
206
+ let r = o(s, c);
207
+ if (r) return r;
208
+ }
209
+ return null;
210
+ }
211
+ return o(i, t);
212
+ }
213
+ return {
214
+ register: function(t, r) {
215
+ let i = e.get(t) ?? {};
216
+ typeof r == "function" ? i.loader = r : i.pack = u(r), e.set(t, i), n ||= t;
217
+ },
218
+ prefetch: async function(e = n) {
219
+ let t = Array.isArray(e) ? e : [e];
220
+ await Promise.all(t.map(i));
221
+ },
222
+ setActive: function(e) {
223
+ n = e;
224
+ for (let t of r.keys()) try {
225
+ t(e);
226
+ } catch {}
227
+ },
228
+ getActive: function() {
229
+ return n;
230
+ },
231
+ resolve: async function(t, r) {
232
+ let o = s(t, r);
233
+ if (o) return o;
234
+ let c = r?.packKey ?? n, { ns: l, key: u } = a(t);
235
+ if (r?.packKey) {
236
+ if (await i(c), o = s(t, r), o) return o;
237
+ let n = e.get(c)?.pack?.meta?.extends ?? [];
238
+ if (n.length && (await Promise.all(n.map(i)), o = s(t, r), o)) return o;
239
+ } else if (l) {
240
+ if (await i(l), o = s(t, r), o) return o;
241
+ let n = e.get(l)?.pack?.meta?.extends ?? [];
242
+ if (n.length && (await Promise.all(n.map(i)), o = s(t, r), o)) return o;
243
+ } else {
244
+ if (await i(c), o = s(t, r), o) return o;
245
+ let n = e.get(c)?.pack?.meta?.extends ?? [];
246
+ if (n.length && (await Promise.all(n.map(i)), o = s(t, r), o)) return o;
247
+ }
248
+ return null;
249
+ },
250
+ registerAlias: function(e, n, r) {
251
+ t.has(e) || t.set(e, /* @__PURE__ */ new Map()), t.get(e).set(n, r);
252
+ },
253
+ has: function(e, t) {
254
+ return !!s(e, t);
255
+ },
256
+ getPack: function(t) {
257
+ return e.get(t ?? n)?.pack;
258
+ },
259
+ hasPack: function(t) {
260
+ return !!e.get(t)?.pack;
261
+ },
262
+ listPacks: function() {
263
+ return Array.from(e.keys());
264
+ },
265
+ listIcons: function(t) {
266
+ let n = e.get(t)?.pack;
267
+ return n ? Object.keys(n.icons) : [];
268
+ },
269
+ addActiveListener: function(e) {
270
+ let t = r.get(e);
271
+ if (t) return t;
272
+ let n = () => {
273
+ r.delete(e);
274
+ };
275
+ return r.set(e, n), n;
276
+ }
277
+ };
278
+ }
279
+ var f = d();
280
+ f.register("base", () => import("./BgV0nMxx2V13JMAV.mjs")), f.register("cf", () => import("./sLI7RooaRwVJN8R1.mjs"));
281
+ var p = (e) => a("svg", {
282
+ ...e,
283
+ children: a("path", {})
284
+ }), m = {
285
+ Icon: "_Icon_16f7r_10",
286
+ "sxl-walk": "_sxl-walk_16f7r_1"
287
+ }, h = t((t) => {
288
+ let { iconKey: o, packKey: s, className: c, style: l, role: u, title: d, size: h, ariaHidden: g, propsSource: _, children: v, ...y } = t, [b, x] = i(null);
289
+ n(() => {
290
+ let t = !0, n = s, r = o;
291
+ if (!r) {
292
+ let t = f.getPack(n);
293
+ x({
294
+ glyph: t ? { svg: e.EmptyArray } : void 0,
295
+ pack: t ?? void 0,
296
+ packKey: n ?? f.getActive()
297
+ });
298
+ return;
299
+ }
300
+ if (r.includes(":")) {
301
+ let [e, t] = r.split(":");
302
+ n = e, r = t;
303
+ }
304
+ return f.resolve(r, { packKey: n }).then((e) => {
305
+ t && x(e);
306
+ }), () => {
307
+ t = !1;
308
+ };
309
+ }, [o, s]);
310
+ let S = b?.pack, C = b?.glyph, w = b?.packKey, T = C ? C.svg : void 0, E = C && !T ? C.url : void 0, D = !C || T || E ? void 0 : C.emoji, O = h == null ? void 0 : typeof h == "number" ? `${h}px` : h, k = r(() => [
311
+ m.Icon,
312
+ "icon",
313
+ c
314
+ ].filter(Boolean).join(" "), [c]), A = r(() => {
315
+ let e = { ...l };
316
+ return e["--icon-size"] = O, e;
317
+ }, [l, O]), j = u ?? (d ? "img" : "presentation"), M = g ?? (!d || void 0), N = (e) => a("span", {
318
+ className: k,
319
+ style: A,
320
+ role: j,
321
+ "aria-hidden": M,
322
+ title: d,
323
+ "data-icon-glyph": o,
324
+ "data-icon-pack": w,
325
+ ...y,
326
+ children: e
327
+ });
328
+ if (v) return N(v);
329
+ if (D) return N(a("span", { children: typeof D == "string" ? D : D.text }));
330
+ if (E) return N(a("img", {
331
+ src: E.src,
332
+ alt: d ?? ""
333
+ }));
334
+ if (C && "react" in C) {
335
+ let e = C.react;
336
+ return N(a(e, {
337
+ className: k,
338
+ style: A,
339
+ role: j,
340
+ "aria-hidden": M,
341
+ title: d,
342
+ ...y,
343
+ ..._
344
+ }));
345
+ }
346
+ let P = { viewBox: T?.viewBox ?? S?.meta.defaultViewBox ?? "0 0 24 24" };
347
+ if (typeof T == "function") return N(T(P) ?? a(p, { ...P }));
348
+ if (!T) return N(a(p, { ...P }));
349
+ let F = T.paths;
350
+ return N(a("svg", {
351
+ ...P,
352
+ children: F ? F.map((e, t) => a("path", {
353
+ d: e.d,
354
+ className: e.className,
355
+ fill: e.fill,
356
+ stroke: e.stroke,
357
+ opacity: e.opacity,
358
+ fillRule: e.fillRule,
359
+ clipRule: e.clipRule
360
+ }, t)) : null
361
+ }));
362
+ });
363
+ function g(e) {
364
+ let { isWalking: t = !1, themedType: n = "primary", speed: i = 120, dashGap: o = 3, dashLength: s = 5, iconKey: c, packKey: l, style: u, className: d, ...f } = e, p = r(() => {
365
+ if (!t) return;
366
+ let e = {
367
+ "--walk-duration": `${i * (o + s)}ms`,
368
+ "--walk-dash-length": `${s}px`,
369
+ "--walk-dash-gap": `${o}px`
370
+ };
371
+ return n && n !== "primary" && (e["--icon-primary"] = `var(--sxl-color-${n})`), e;
372
+ }, [
373
+ t,
374
+ i,
375
+ o,
376
+ s,
377
+ n
378
+ ]);
379
+ return a(h, {
380
+ iconKey: c,
381
+ packKey: l,
382
+ className: r(() => t ? d + " walking" : d, [t, d]),
383
+ style: {
384
+ ...u,
385
+ ...p
386
+ },
387
+ ...f
388
+ });
389
+ }
390
+ export { d as i, h as n, f as r, g as t };