tempest-react-sdk 0.25.0 → 0.26.1
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.
- package/README.md +14 -1
- package/bin/lib/alias/collect.mjs +94 -0
- package/bin/lib/alias/collect.test.mjs +95 -0
- package/bin/lib/alias/discover.mjs +77 -0
- package/bin/lib/alias/discover.test.mjs +189 -0
- package/bin/lib/alias/index.mjs +88 -0
- package/bin/lib/alias/index.test.mjs +138 -0
- package/bin/lib/alias/rewrite-css.mjs +76 -0
- package/bin/lib/alias/rewrite-css.test.mjs +85 -0
- package/bin/lib/alias/rewrite.mjs +141 -0
- package/bin/lib/alias/rewrite.test.mjs +148 -0
- package/bin/lib/alias/specifier.mjs +49 -0
- package/bin/lib/alias/specifier.test.mjs +85 -0
- package/bin/lib/alias/tsconfig.mjs +116 -0
- package/bin/lib/alias/typescript.mjs +23 -0
- package/bin/lib/doctor/lucide.mjs +74 -0
- package/bin/lib/doctor/lucide.test.mjs +107 -0
- package/bin/lib/icons/generate.mjs +156 -0
- package/bin/lib/icons/generate.test.mjs +125 -0
- package/bin/tempest.mjs +174 -13
- package/dist/audio/use-audio.cjs +1 -1
- package/dist/audio/use-audio.cjs.map +1 -1
- package/dist/audio/use-audio.js +12 -12
- package/dist/audio/use-audio.js.map +1 -1
- package/dist/charts/palette.cjs +1 -1
- package/dist/charts/palette.cjs.map +1 -1
- package/dist/charts/palette.js +2 -2
- package/dist/charts/palette.js.map +1 -1
- package/dist/charts.d.ts +5 -3
- package/dist/components/ClickOutside/ClickOutside.cjs +1 -1
- package/dist/components/ClickOutside/ClickOutside.cjs.map +1 -1
- package/dist/components/ClickOutside/ClickOutside.js +3 -1
- package/dist/components/ClickOutside/ClickOutside.js.map +1 -1
- package/dist/components/DataTable/DataTable.cjs +1 -1
- package/dist/components/DataTable/DataTable.cjs.map +1 -1
- package/dist/components/DataTable/DataTable.js +21 -23
- package/dist/components/DataTable/DataTable.js.map +1 -1
- package/dist/components/Kanban/Kanban.cjs +2 -0
- package/dist/components/Kanban/Kanban.cjs.map +1 -0
- package/dist/components/Kanban/Kanban.js +102 -0
- package/dist/components/Kanban/Kanban.js.map +1 -0
- package/dist/components/Kanban/Kanban.module.cjs +2 -0
- package/dist/components/Kanban/Kanban.module.cjs.map +1 -0
- package/dist/components/Kanban/Kanban.module.js +19 -0
- package/dist/components/Kanban/Kanban.module.js.map +1 -0
- package/dist/components/NotificationCenter/NotificationCenter.cjs +2 -0
- package/dist/components/NotificationCenter/NotificationCenter.cjs.map +1 -0
- package/dist/components/NotificationCenter/NotificationCenter.js +83 -0
- package/dist/components/NotificationCenter/NotificationCenter.js.map +1 -0
- package/dist/components/NotificationCenter/NotificationCenter.module.cjs +2 -0
- package/dist/components/NotificationCenter/NotificationCenter.module.cjs.map +1 -0
- package/dist/components/NotificationCenter/NotificationCenter.module.js +21 -0
- package/dist/components/NotificationCenter/NotificationCenter.module.js.map +1 -0
- package/dist/components/NotificationCenter/use-notification-inbox.cjs +2 -0
- package/dist/components/NotificationCenter/use-notification-inbox.cjs.map +1 -0
- package/dist/components/NotificationCenter/use-notification-inbox.js +63 -0
- package/dist/components/NotificationCenter/use-notification-inbox.js.map +1 -0
- package/dist/components/RefreshIndicator/RefreshIndicator.cjs +1 -1
- package/dist/components/RefreshIndicator/RefreshIndicator.cjs.map +1 -1
- package/dist/components/RefreshIndicator/RefreshIndicator.js +17 -17
- package/dist/components/RefreshIndicator/RefreshIndicator.js.map +1 -1
- package/dist/components/Tooltip/Tooltip.cjs +1 -1
- package/dist/components/Tooltip/Tooltip.cjs.map +1 -1
- package/dist/components/Tooltip/Tooltip.js +26 -20
- package/dist/components/Tooltip/Tooltip.js.map +1 -1
- package/dist/components/VirtualTable/VirtualTable.cjs +2 -0
- package/dist/components/VirtualTable/VirtualTable.cjs.map +1 -0
- package/dist/components/VirtualTable/VirtualTable.js +116 -0
- package/dist/components/VirtualTable/VirtualTable.js.map +1 -0
- package/dist/components/VirtualTable/VirtualTable.module.cjs +2 -0
- package/dist/components/VirtualTable/VirtualTable.module.cjs.map +1 -0
- package/dist/components/VirtualTable/VirtualTable.module.js +20 -0
- package/dist/components/VirtualTable/VirtualTable.module.js.map +1 -0
- package/dist/components/Wizard/Wizard.cjs +1 -1
- package/dist/components/Wizard/Wizard.cjs.map +1 -1
- package/dist/components/Wizard/Wizard.js +53 -53
- package/dist/components/Wizard/Wizard.js.map +1 -1
- package/dist/geo/use-position-tracker.cjs +1 -1
- package/dist/geo/use-position-tracker.cjs.map +1 -1
- package/dist/geo/use-position-tracker.js +3 -1
- package/dist/geo/use-position-tracker.js.map +1 -1
- package/dist/hooks/use-async.cjs +1 -1
- package/dist/hooks/use-async.cjs.map +1 -1
- package/dist/hooks/use-async.js +3 -1
- package/dist/hooks/use-async.js.map +1 -1
- package/dist/hooks/use-click-outside.cjs +1 -1
- package/dist/hooks/use-click-outside.cjs.map +1 -1
- package/dist/hooks/use-click-outside.js +3 -1
- package/dist/hooks/use-click-outside.js.map +1 -1
- package/dist/hooks/use-deep-memo.cjs.map +1 -1
- package/dist/hooks/use-deep-memo.js.map +1 -1
- package/dist/hooks/use-event-listener.cjs +1 -1
- package/dist/hooks/use-event-listener.cjs.map +1 -1
- package/dist/hooks/use-event-listener.js +3 -1
- package/dist/hooks/use-event-listener.js.map +1 -1
- package/dist/hooks/use-interval.cjs +1 -1
- package/dist/hooks/use-interval.cjs.map +1 -1
- package/dist/hooks/use-interval.js +3 -1
- package/dist/hooks/use-interval.js.map +1 -1
- package/dist/hooks/use-is-first-render.cjs.map +1 -1
- package/dist/hooks/use-is-first-render.js.map +1 -1
- package/dist/hooks/use-long-press-handlers.cjs +1 -1
- package/dist/hooks/use-long-press-handlers.cjs.map +1 -1
- package/dist/hooks/use-long-press-handlers.js +25 -23
- package/dist/hooks/use-long-press-handlers.js.map +1 -1
- package/dist/hooks/use-long-press.cjs +1 -1
- package/dist/hooks/use-long-press.cjs.map +1 -1
- package/dist/hooks/use-long-press.js +3 -1
- package/dist/hooks/use-long-press.js.map +1 -1
- package/dist/hooks/use-online.cjs +1 -1
- package/dist/hooks/use-online.cjs.map +1 -1
- package/dist/hooks/use-online.js +6 -4
- package/dist/hooks/use-online.js.map +1 -1
- package/dist/hooks/use-previous.cjs.map +1 -1
- package/dist/hooks/use-previous.js.map +1 -1
- package/dist/hooks/use-service-worker-update.cjs +1 -1
- package/dist/hooks/use-service-worker-update.cjs.map +1 -1
- package/dist/hooks/use-service-worker-update.js +3 -1
- package/dist/hooks/use-service-worker-update.js.map +1 -1
- package/dist/hooks/use-sortable.cjs +2 -0
- package/dist/hooks/use-sortable.cjs.map +1 -0
- package/dist/hooks/use-sortable.js +169 -0
- package/dist/hooks/use-sortable.js.map +1 -0
- package/dist/hooks/use-stable-callback.cjs.map +1 -1
- package/dist/hooks/use-stable-callback.js.map +1 -1
- package/dist/hooks/use-timeout.cjs +1 -1
- package/dist/hooks/use-timeout.cjs.map +1 -1
- package/dist/hooks/use-timeout.js +3 -1
- package/dist/hooks/use-timeout.js.map +1 -1
- package/dist/icons/Icon.cjs +2 -0
- package/dist/icons/Icon.cjs.map +1 -0
- package/dist/icons/Icon.js +24 -0
- package/dist/icons/Icon.js.map +1 -0
- package/dist/icons/IconProvider.cjs +2 -0
- package/dist/icons/IconProvider.cjs.map +1 -0
- package/dist/icons/IconProvider.js +24 -0
- package/dist/icons/IconProvider.js.map +1 -0
- package/dist/icons/generated/aliases.cjs +2 -0
- package/dist/icons/generated/aliases.cjs.map +1 -0
- package/dist/icons/generated/aliases.js +255 -0
- package/dist/icons/generated/aliases.js.map +1 -0
- package/dist/icons/generated/icon-names.cjs +2 -0
- package/dist/icons/generated/icon-names.cjs.map +1 -0
- package/dist/icons/generated/icon-names.js +6 -0
- package/dist/icons/generated/icon-names.js.map +1 -0
- package/dist/icons/generated/loaders.cjs +2 -0
- package/dist/icons/generated/loaders.cjs.map +1 -0
- package/dist/icons/generated/loaders.js +32 -0
- package/dist/icons/generated/loaders.js.map +1 -0
- package/dist/icons/generated/shard-a.cjs +2 -0
- package/dist/icons/generated/shard-a.cjs.map +1 -0
- package/dist/icons/generated/shard-a.js +114 -0
- package/dist/icons/generated/shard-a.js.map +1 -0
- package/dist/icons/generated/shard-b.cjs +2 -0
- package/dist/icons/generated/shard-b.cjs.map +1 -0
- package/dist/icons/generated/shard-b.js +156 -0
- package/dist/icons/generated/shard-b.js.map +1 -0
- package/dist/icons/generated/shard-c.cjs +2 -0
- package/dist/icons/generated/shard-c.cjs.map +1 -0
- package/dist/icons/generated/shard-c.js +269 -0
- package/dist/icons/generated/shard-c.js.map +1 -0
- package/dist/icons/generated/shard-d.cjs +2 -0
- package/dist/icons/generated/shard-d.cjs.map +1 -0
- package/dist/icons/generated/shard-d.js +62 -0
- package/dist/icons/generated/shard-d.js.map +1 -0
- package/dist/icons/generated/shard-e.cjs +2 -0
- package/dist/icons/generated/shard-e.cjs.map +1 -0
- package/dist/icons/generated/shard-e.js +32 -0
- package/dist/icons/generated/shard-e.js.map +1 -0
- package/dist/icons/generated/shard-f.cjs +2 -0
- package/dist/icons/generated/shard-f.cjs.map +1 -0
- package/dist/icons/generated/shard-f.js +139 -0
- package/dist/icons/generated/shard-f.js.map +1 -0
- package/dist/icons/generated/shard-g.cjs +2 -0
- package/dist/icons/generated/shard-g.cjs.map +1 -0
- package/dist/icons/generated/shard-g.js +61 -0
- package/dist/icons/generated/shard-g.js.map +1 -0
- package/dist/icons/generated/shard-h.cjs +2 -0
- package/dist/icons/generated/shard-h.cjs.map +1 -0
- package/dist/icons/generated/shard-h.js +63 -0
- package/dist/icons/generated/shard-h.js.map +1 -0
- package/dist/icons/generated/shard-i.cjs +2 -0
- package/dist/icons/generated/shard-i.cjs.map +1 -0
- package/dist/icons/generated/shard-i.js +30 -0
- package/dist/icons/generated/shard-i.js.map +1 -0
- package/dist/icons/generated/shard-j.cjs +2 -0
- package/dist/icons/generated/shard-j.cjs.map +1 -0
- package/dist/icons/generated/shard-j.js +10 -0
- package/dist/icons/generated/shard-j.js.map +1 -0
- package/dist/icons/generated/shard-k.cjs +2 -0
- package/dist/icons/generated/shard-k.cjs.map +1 -0
- package/dist/icons/generated/shard-k.js +16 -0
- package/dist/icons/generated/shard-k.js.map +1 -0
- package/dist/icons/generated/shard-l.cjs +2 -0
- package/dist/icons/generated/shard-l.cjs.map +1 -0
- package/dist/icons/generated/shard-l.js +88 -0
- package/dist/icons/generated/shard-l.js.map +1 -0
- package/dist/icons/generated/shard-m.cjs +2 -0
- package/dist/icons/generated/shard-m.cjs.map +1 -0
- package/dist/icons/generated/shard-m.js +140 -0
- package/dist/icons/generated/shard-m.js.map +1 -0
- package/dist/icons/generated/shard-n.cjs +2 -0
- package/dist/icons/generated/shard-n.cjs.map +1 -0
- package/dist/icons/generated/shard-n.js +24 -0
- package/dist/icons/generated/shard-n.js.map +1 -0
- package/dist/icons/generated/shard-o.cjs +2 -0
- package/dist/icons/generated/shard-o.cjs.map +1 -0
- package/dist/icons/generated/shard-o.js +17 -0
- package/dist/icons/generated/shard-o.js.map +1 -0
- package/dist/icons/generated/shard-p.cjs +2 -0
- package/dist/icons/generated/shard-p.cjs.map +1 -0
- package/dist/icons/generated/shard-p.js +115 -0
- package/dist/icons/generated/shard-p.js.map +1 -0
- package/dist/icons/generated/shard-q.cjs +2 -0
- package/dist/icons/generated/shard-q.cjs.map +1 -0
- package/dist/icons/generated/shard-q.js +10 -0
- package/dist/icons/generated/shard-q.js.map +1 -0
- package/dist/icons/generated/shard-r.cjs +2 -0
- package/dist/icons/generated/shard-r.cjs.map +1 -0
- package/dist/icons/generated/shard-r.js +77 -0
- package/dist/icons/generated/shard-r.js.map +1 -0
- package/dist/icons/generated/shard-s.cjs +2 -0
- package/dist/icons/generated/shard-s.cjs.map +1 -0
- package/dist/icons/generated/shard-s.js +255 -0
- package/dist/icons/generated/shard-s.js.map +1 -0
- package/dist/icons/generated/shard-t.cjs +2 -0
- package/dist/icons/generated/shard-t.cjs.map +1 -0
- package/dist/icons/generated/shard-t.js +109 -0
- package/dist/icons/generated/shard-t.js.map +1 -0
- package/dist/icons/generated/shard-u.cjs +2 -0
- package/dist/icons/generated/shard-u.cjs.map +1 -0
- package/dist/icons/generated/shard-u.js +49 -0
- package/dist/icons/generated/shard-u.js.map +1 -0
- package/dist/icons/generated/shard-v.cjs +2 -0
- package/dist/icons/generated/shard-v.cjs.map +1 -0
- package/dist/icons/generated/shard-v.js +30 -0
- package/dist/icons/generated/shard-v.js.map +1 -0
- package/dist/icons/generated/shard-w.cjs +2 -0
- package/dist/icons/generated/shard-w.cjs.map +1 -0
- package/dist/icons/generated/shard-w.js +48 -0
- package/dist/icons/generated/shard-w.js.map +1 -0
- package/dist/icons/generated/shard-x.cjs +2 -0
- package/dist/icons/generated/shard-x.cjs.map +1 -0
- package/dist/icons/generated/shard-x.js +10 -0
- package/dist/icons/generated/shard-x.js.map +1 -0
- package/dist/icons/generated/shard-z.cjs +2 -0
- package/dist/icons/generated/shard-z.cjs.map +1 -0
- package/dist/icons/generated/shard-z.js +25 -0
- package/dist/icons/generated/shard-z.js.map +1 -0
- package/dist/icons/icon-context.cjs +2 -0
- package/dist/icons/icon-context.cjs.map +1 -0
- package/dist/icons/icon-context.js +13 -0
- package/dist/icons/icon-context.js.map +1 -0
- package/dist/icons/is-icon-name.cjs +2 -0
- package/dist/icons/is-icon-name.cjs.map +1 -0
- package/dist/icons/is-icon-name.js +10 -0
- package/dist/icons/is-icon-name.js.map +1 -0
- package/dist/icons/shard-cache.cjs +2 -0
- package/dist/icons/shard-cache.cjs.map +1 -0
- package/dist/icons/shard-cache.js +41 -0
- package/dist/icons/shard-cache.js.map +1 -0
- package/dist/icons/use-icon.cjs +2 -0
- package/dist/icons/use-icon.cjs.map +1 -0
- package/dist/icons/use-icon.js +20 -0
- package/dist/icons/use-icon.js.map +1 -0
- package/dist/icons-virtual.d.ts +22 -0
- package/dist/icons.cjs +1 -0
- package/dist/icons.d.ts +220 -0
- package/dist/icons.js +9 -0
- package/dist/offline/use-offline-sync.cjs +1 -1
- package/dist/offline/use-offline-sync.cjs.map +1 -1
- package/dist/offline/use-offline-sync.js +3 -1
- package/dist/offline/use-offline-sync.js.map +1 -1
- package/dist/push/use-push-subscription.cjs +1 -1
- package/dist/push/use-push-subscription.cjs.map +1 -1
- package/dist/push/use-push-subscription.js +3 -1
- package/dist/push/use-push-subscription.js.map +1 -1
- package/dist/sse/use-event-stream.cjs +1 -1
- package/dist/sse/use-event-stream.cjs.map +1 -1
- package/dist/sse/use-event-stream.js +3 -1
- package/dist/sse/use-event-stream.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/tempest-react-sdk.cjs +1 -1
- package/dist/tempest-react-sdk.d.ts +585 -3
- package/dist/tempest-react-sdk.js +189 -183
- package/dist/theme/ThemeProvider.cjs +1 -1
- package/dist/theme/ThemeProvider.cjs.map +1 -1
- package/dist/theme/ThemeProvider.js +6 -2
- package/dist/theme/ThemeProvider.js.map +1 -1
- package/dist/theme/color.cjs +1 -1
- package/dist/theme/color.cjs.map +1 -1
- package/dist/theme/color.js +77 -46
- package/dist/theme/color.js.map +1 -1
- package/dist/theme/create-theme.cjs +1 -1
- package/dist/theme/create-theme.cjs.map +1 -1
- package/dist/theme/create-theme.js +9 -3
- package/dist/theme/create-theme.js.map +1 -1
- package/dist/utils/compare-values.cjs +2 -0
- package/dist/utils/compare-values.cjs.map +1 -0
- package/dist/utils/compare-values.js +8 -0
- package/dist/utils/compare-values.js.map +1 -0
- package/dist/vision/use-camera-stream.cjs +1 -1
- package/dist/vision/use-camera-stream.cjs.map +1 -1
- package/dist/vision/use-camera-stream.js +3 -1
- package/dist/vision/use-camera-stream.js.map +1 -1
- package/dist/vite/create-vite-config.cjs +1 -1
- package/dist/vite/create-vite-config.cjs.map +1 -1
- package/dist/vite/create-vite-config.js +30 -22
- package/dist/vite/create-vite-config.js.map +1 -1
- package/dist/vite/tempest-icons.cjs +9 -0
- package/dist/vite/tempest-icons.cjs.map +1 -0
- package/dist/vite/tempest-icons.js +99 -0
- package/dist/vite/tempest-icons.js.map +1 -0
- package/dist/vite.cjs +1 -1
- package/dist/vite.d.ts +79 -0
- package/dist/vite.js +6 -5
- package/dist/ws/use-web-socket.cjs +1 -1
- package/dist/ws/use-web-socket.cjs.map +1 -1
- package/dist/ws/use-web-socket.js +3 -1
- package/dist/ws/use-web-socket.js.map +1 -1
- package/package.json +12 -3
- package/template/package.json +1 -1
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
import { useCallback as e, useEffect as t, useRef as n, useState as r } from "react";
|
|
2
|
+
//#region src/hooks/use-sortable.ts
|
|
3
|
+
function i(e, t, n) {
|
|
4
|
+
if (t === n || t < 0 || n < 0 || t >= e.length || n >= e.length) return e;
|
|
5
|
+
let r = e.slice(), [i] = r.splice(t, 1);
|
|
6
|
+
return r.splice(n, 0, i), r;
|
|
7
|
+
}
|
|
8
|
+
function a(e, t, n) {
|
|
9
|
+
if (!e) return null;
|
|
10
|
+
let r = (e) => {
|
|
11
|
+
let r = e.getBoundingClientRect();
|
|
12
|
+
return n >= r.top && n <= r.bottom && t >= r.left && t <= r.right;
|
|
13
|
+
};
|
|
14
|
+
for (let t of Array.from(e.querySelectorAll("[data-sortable-index]"))) {
|
|
15
|
+
if (!r(t)) continue;
|
|
16
|
+
let e = Number(t.dataset.sortableIndex);
|
|
17
|
+
return Number.isNaN(e) ? null : {
|
|
18
|
+
index: e,
|
|
19
|
+
group: t.dataset.sortableGroup
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
for (let t of Array.from(e.querySelectorAll("[data-sortable-empty]"))) if (r(t)) return {
|
|
23
|
+
index: 0,
|
|
24
|
+
group: t.dataset.sortableGroup
|
|
25
|
+
};
|
|
26
|
+
return null;
|
|
27
|
+
}
|
|
28
|
+
function o(i) {
|
|
29
|
+
let { itemCount: o, onReorder: s, disabled: c = !1, roleDescription: l = "Sortable item" } = i, [u, d] = r(null), [f, p] = r(null), m = n(null), h = n(s), g = n(null), _ = n(null), [v, y] = r(void 0), [b, x] = r(void 0), S = n(void 0), C = n(void 0), w = e((e) => {
|
|
30
|
+
S.current = e, y(e);
|
|
31
|
+
}, []), T = e((e) => {
|
|
32
|
+
C.current = e, x(e);
|
|
33
|
+
}, []), E = e((e) => {
|
|
34
|
+
g.current = e, d(e);
|
|
35
|
+
}, []), D = e((e) => {
|
|
36
|
+
_.current = e, p(e);
|
|
37
|
+
}, []);
|
|
38
|
+
t(() => {
|
|
39
|
+
h.current = s;
|
|
40
|
+
}, [s]);
|
|
41
|
+
let O = e(() => {
|
|
42
|
+
w(void 0), T(void 0), E(null), D(null);
|
|
43
|
+
}, [
|
|
44
|
+
w,
|
|
45
|
+
E,
|
|
46
|
+
T,
|
|
47
|
+
D
|
|
48
|
+
]);
|
|
49
|
+
t(() => {
|
|
50
|
+
O();
|
|
51
|
+
}, [o, O]);
|
|
52
|
+
let k = e((e, t, n, r) => {
|
|
53
|
+
(e !== t || n !== r) && h.current({
|
|
54
|
+
from: e,
|
|
55
|
+
to: t,
|
|
56
|
+
fromGroup: n,
|
|
57
|
+
toGroup: r
|
|
58
|
+
}), O();
|
|
59
|
+
}, [O]), A = e((e) => {
|
|
60
|
+
m.current = e;
|
|
61
|
+
}, []), j = e((e, t, n) => {
|
|
62
|
+
c || (n.currentTarget.setPointerCapture?.(n.pointerId), w(t), T(t), E(e), D(e));
|
|
63
|
+
}, [
|
|
64
|
+
c,
|
|
65
|
+
w,
|
|
66
|
+
E,
|
|
67
|
+
T,
|
|
68
|
+
D
|
|
69
|
+
]);
|
|
70
|
+
t(() => {
|
|
71
|
+
if (u === null) return;
|
|
72
|
+
function e(e) {
|
|
73
|
+
let t = a(m.current, e.clientX, e.clientY);
|
|
74
|
+
t && (T(t.group), D(t.index));
|
|
75
|
+
}
|
|
76
|
+
function t() {
|
|
77
|
+
let e = g.current, t = _.current;
|
|
78
|
+
e !== null && t !== null ? k(e, t, S.current, C.current) : O();
|
|
79
|
+
}
|
|
80
|
+
function n(e) {
|
|
81
|
+
e.key === "Escape" && O();
|
|
82
|
+
}
|
|
83
|
+
return window.addEventListener("pointermove", e), window.addEventListener("pointerup", t), window.addEventListener("pointercancel", O), window.addEventListener("keydown", n), () => {
|
|
84
|
+
window.removeEventListener("pointermove", e), window.removeEventListener("pointerup", t), window.removeEventListener("pointercancel", O), window.removeEventListener("keydown", n);
|
|
85
|
+
};
|
|
86
|
+
}, [
|
|
87
|
+
u,
|
|
88
|
+
k,
|
|
89
|
+
O,
|
|
90
|
+
T,
|
|
91
|
+
D
|
|
92
|
+
]);
|
|
93
|
+
let M = e((e, t, n) => {
|
|
94
|
+
if (c) return;
|
|
95
|
+
let r = u !== null;
|
|
96
|
+
switch (n.key) {
|
|
97
|
+
case " ":
|
|
98
|
+
case "Enter":
|
|
99
|
+
n.preventDefault(), r ? f !== null && k(u, f, v, b) : (w(t), T(t), E(e), D(e));
|
|
100
|
+
break;
|
|
101
|
+
case "ArrowDown":
|
|
102
|
+
case "ArrowRight":
|
|
103
|
+
if (!r) return;
|
|
104
|
+
n.preventDefault(), _.current !== null && D(Math.min(_.current + 1, o - 1));
|
|
105
|
+
break;
|
|
106
|
+
case "ArrowUp":
|
|
107
|
+
case "ArrowLeft":
|
|
108
|
+
if (!r) return;
|
|
109
|
+
n.preventDefault(), _.current !== null && D(Math.max(_.current - 1, 0));
|
|
110
|
+
break;
|
|
111
|
+
case "Escape":
|
|
112
|
+
if (!r) return;
|
|
113
|
+
n.preventDefault(), O();
|
|
114
|
+
break;
|
|
115
|
+
default: break;
|
|
116
|
+
}
|
|
117
|
+
}, [
|
|
118
|
+
v,
|
|
119
|
+
u,
|
|
120
|
+
k,
|
|
121
|
+
b,
|
|
122
|
+
c,
|
|
123
|
+
o,
|
|
124
|
+
f,
|
|
125
|
+
O,
|
|
126
|
+
w,
|
|
127
|
+
E,
|
|
128
|
+
T,
|
|
129
|
+
D
|
|
130
|
+
]);
|
|
131
|
+
return {
|
|
132
|
+
activeIndex: u,
|
|
133
|
+
overIndex: f,
|
|
134
|
+
activeGroup: v,
|
|
135
|
+
overGroup: b,
|
|
136
|
+
getItemProps: e((e, t) => ({
|
|
137
|
+
"data-sortable-index": e,
|
|
138
|
+
"data-sortable-group": t,
|
|
139
|
+
"data-sortable-active": u === e && v === t || void 0,
|
|
140
|
+
onPointerDown: (n) => j(e, t, n),
|
|
141
|
+
onKeyDown: (n) => M(e, t, n),
|
|
142
|
+
tabIndex: c ? -1 : 0,
|
|
143
|
+
role: "option",
|
|
144
|
+
"aria-roledescription": l,
|
|
145
|
+
"aria-selected": u === e && v === t
|
|
146
|
+
}), [
|
|
147
|
+
v,
|
|
148
|
+
u,
|
|
149
|
+
c,
|
|
150
|
+
M,
|
|
151
|
+
j,
|
|
152
|
+
l
|
|
153
|
+
]),
|
|
154
|
+
getEmptyGroupProps: e((e) => ({
|
|
155
|
+
"data-sortable-group": e,
|
|
156
|
+
"data-sortable-empty": !0
|
|
157
|
+
}), []),
|
|
158
|
+
getListProps: e(() => ({
|
|
159
|
+
role: "listbox",
|
|
160
|
+
"aria-orientation": "vertical"
|
|
161
|
+
}), []),
|
|
162
|
+
cancel: O,
|
|
163
|
+
setContainer: A
|
|
164
|
+
};
|
|
165
|
+
}
|
|
166
|
+
//#endregion
|
|
167
|
+
export { i as moveItem, o as useSortable };
|
|
168
|
+
|
|
169
|
+
//# sourceMappingURL=use-sortable.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-sortable.js","names":[],"sources":["../../src/hooks/use-sortable.ts"],"sourcesContent":["import { useCallback, useEffect, useRef, useState } from \"react\";\nimport type { KeyboardEvent as ReactKeyboardEvent, PointerEvent as ReactPointerEvent } from \"react\";\n\n/** Where a dragged item would land if dropped now. */\nexport interface SortableDropTarget {\n /** Index the item started at, within its own group. */\n from: number;\n /** Index it would move to, within the destination group. */\n to: number;\n /**\n * Group the item started in — a Kanban column, for instance. `undefined` for a\n * plain single-list sortable.\n */\n fromGroup?: string;\n /** Destination group. Equal to `fromGroup` when the move stays in one group. */\n toGroup?: string;\n}\n\n/** Props to spread on each sortable item. */\nexport interface SortableItemProps {\n /** Marks the item for hit-testing. */\n \"data-sortable-index\": number;\n /** Group the item belongs to, when the sortable spans several lists. */\n \"data-sortable-group\"?: string;\n /** `true` while this item is the one being moved. */\n \"data-sortable-active\"?: boolean;\n /** Grab handle wiring: starts a pointer drag. */\n onPointerDown: (event: ReactPointerEvent<HTMLElement>) => void;\n /** Keyboard reordering — see {@link UseSortableResult}. */\n onKeyDown: (event: ReactKeyboardEvent<HTMLElement>) => void;\n /** Puts the item in the tab order so the keyboard path is reachable. */\n tabIndex: number;\n role: \"option\";\n \"aria-roledescription\": string;\n \"aria-selected\": boolean;\n}\n\nexport interface UseSortableOptions {\n /**\n * How many items are in the sortable. Changing it cancels an in-flight drag.\n *\n * With groups, pass the **total** across groups: the number only has to change\n * whenever the indices the drag was based on stop being valid.\n */\n itemCount: number;\n /**\n * Called once, when a move is committed — on pointer release or on a keyboard\n * move. Never called mid-drag, so a controlled list re-renders once instead of\n * on every pointer frame.\n */\n onReorder: (target: SortableDropTarget) => void;\n /** Blocks all interaction. */\n disabled?: boolean;\n /**\n * Description announced for each item, so a screen reader user learns the\n * keyboard contract. Default is in English — override it to localize.\n */\n roleDescription?: string;\n}\n\nexport interface UseSortableResult {\n /** Index being dragged, or `null` when idle. */\n activeIndex: number | null;\n /** Index the item would land on, or `null` when idle. */\n overIndex: number | null;\n /** Group the dragged item came from, when using groups. */\n activeGroup?: string;\n /** Group the item is currently over, when using groups. */\n overGroup?: string;\n /**\n * Spread on each item. Pass `group` when the sortable spans several lists (a\n * Kanban column id), so a drop can land in a different group.\n */\n getItemProps: (index: number, group?: string) => SortableItemProps;\n /**\n * Spread on an **empty** group's drop area, so an item can be moved into a\n * column that has no cards yet — hit-testing works off item rects, and a group\n * with no items has none.\n */\n getEmptyGroupProps: (group: string) => {\n \"data-sortable-group\": string;\n \"data-sortable-empty\": true;\n };\n /** Spread on the list container (`role=\"listbox\"` + a label of your own). */\n getListProps: () => { role: \"listbox\"; \"aria-orientation\": \"vertical\" };\n /** Abort the current drag without reordering. */\n cancel: () => void;\n /**\n * Callback ref for the element that contains the sortable items — hit-testing\n * searches inside it.\n *\n * Named `setContainer` rather than `ref` because it is a **callback**, not a ref\n * object: `ref={sortable.setContainer}`. The old name also read as a readable\n * ref to the React Compiler rules, which flagged every consumer.\n */\n setContainer: (node: HTMLElement | null) => void;\n}\n\n/** Reorder helper: move `from` to `to`, returning a new array. */\nexport function moveItem<T>(items: T[], from: number, to: number): T[] {\n if (from === to || from < 0 || to < 0 || from >= items.length || to >= items.length) {\n return items;\n }\n const next = items.slice();\n const [moved] = next.splice(from, 1);\n next.splice(to, 0, moved);\n return next;\n}\n\n/** A hit-test result: the item (or empty group) under the pointer. */\ninterface HitTarget {\n index: number;\n group?: string;\n}\n\n/**\n * Find the sortable slot under a viewport point.\n *\n * Items are tried first; an empty group's drop area is only considered when no item\n * matched, since an empty column is a fallback target rather than a competing one.\n */\nfunction targetAtPoint(container: HTMLElement | null, x: number, y: number): HitTarget | null {\n if (!container) return null;\n const inside = (element: HTMLElement): boolean => {\n const rect = element.getBoundingClientRect();\n return y >= rect.top && y <= rect.bottom && x >= rect.left && x <= rect.right;\n };\n\n for (const item of Array.from(\n container.querySelectorAll<HTMLElement>(\"[data-sortable-index]\"),\n )) {\n if (!inside(item)) continue;\n const index = Number(item.dataset.sortableIndex);\n if (Number.isNaN(index)) return null;\n return { index, group: item.dataset.sortableGroup };\n }\n\n for (const empty of Array.from(\n container.querySelectorAll<HTMLElement>(\"[data-sortable-empty]\"),\n )) {\n if (inside(empty)) return { index: 0, group: empty.dataset.sortableGroup };\n }\n\n return null;\n}\n\n/**\n * Drag-to-reorder for a list, with a **keyboard path of equal standing**.\n *\n * Pointer events cover mouse, touch and stylus through one code path, and pointer\n * capture keeps the drag alive when the pointer leaves the item. `Space` picks an\n * item up, the arrows move it, `Space`/`Enter` drops it and `Escape` cancels —\n * because a reorder that only works by dragging excludes keyboard users\n * completely, which is where most drag-and-drop implementations fail.\n *\n * The hook owns interaction only: it never mutates your data. `onReorder` fires\n * once per committed move and you apply it, typically with {@link moveItem}. That\n * keeps the list a controlled value and avoids a re-render per pointer frame.\n *\n * Hit-testing reads the live DOM rects of `[data-sortable-index]` children rather\n * than assuming a fixed row height, so it works with rows of different sizes.\n *\n * A change in `itemCount` cancels an in-flight drag: the list no longer has the\n * indices the drag was based on, and committing anyway would move the wrong row.\n *\n * Note for consumers: the indices and groups are exposed as **state** (so rendering\n * from them is reactive) and mirrored into refs only so the window-level `pointerup`\n * listener can read both synchronously. Because the handlers returned by\n * `getItemProps` close over those mirrors, the React Compiler `refs` rule reports\n * the *call site* — a component spreading these props may need a file-level\n * exemption, as `Kanban` documents.\n *\n * @example\n * ```tsx\n * const [items, setItems] = useState([\"Alfa\", \"Bravo\", \"Charlie\"]);\n * const sortable = useSortable({\n * itemCount: items.length,\n * onReorder: ({ from, to }) => setItems((current) => moveItem(current, from, to)),\n * });\n *\n * <ul {...sortable.getListProps()} aria-label=\"Prioridade\" ref={sortable.setContainer}>\n * {items.map((item, index) => (\n * <li key={item} {...sortable.getItemProps(index)}>\n * {item}\n * </li>\n * ))}\n * </ul>\n * ```\n */\nexport function useSortable(options: UseSortableOptions): UseSortableResult {\n const { itemCount, onReorder, disabled = false, roleDescription = \"Sortable item\" } = options;\n\n const [activeIndex, setActiveIndexState] = useState<number | null>(null);\n const [overIndex, setOverIndexState] = useState<number | null>(null);\n const containerRef = useRef<HTMLElement | null>(null);\n const onReorderRef = useRef(onReorder);\n\n /**\n * Mirrors of the two indices.\n *\n * The window-level `pointerup` listener has to read both values *synchronously*\n * to know what to commit, and a state setter only exposes one of them. Mirroring\n * into refs keeps the commit readable instead of nesting setters to smuggle the\n * other value out.\n */\n const activeRef = useRef<number | null>(null);\n const overRef = useRef<number | null>(null);\n const [activeGroup, setActiveGroupState] = useState<string | undefined>(undefined);\n const [overGroup, setOverGroupState] = useState<string | undefined>(undefined);\n const activeGroupRef = useRef<string | undefined>(undefined);\n const overGroupRef = useRef<string | undefined>(undefined);\n\n const setActiveGroup = useCallback((value: string | undefined): void => {\n activeGroupRef.current = value;\n setActiveGroupState(value);\n }, []);\n\n const setOverGroup = useCallback((value: string | undefined): void => {\n overGroupRef.current = value;\n setOverGroupState(value);\n }, []);\n\n const setActiveIndex = useCallback((value: number | null): void => {\n activeRef.current = value;\n setActiveIndexState(value);\n }, []);\n\n const setOverIndex = useCallback((value: number | null): void => {\n overRef.current = value;\n setOverIndexState(value);\n }, []);\n\n useEffect(() => {\n onReorderRef.current = onReorder;\n }, [onReorder]);\n\n const reset = useCallback((): void => {\n setActiveGroup(undefined);\n setOverGroup(undefined);\n setActiveIndex(null);\n setOverIndex(null);\n }, [setActiveGroup, setActiveIndex, setOverGroup, setOverIndex]);\n\n useEffect(() => {\n reset();\n }, [itemCount, reset]);\n\n /**\n * Report a committed move and go back to idle.\n *\n * The groups are **arguments**, not reads of the mirror refs: `commit` ends up\n * inside the props returned by `getItemProps`, which render calls, and a ref read\n * anywhere in that closure chain is a render-time ref access. The pointer\n * listener reads the mirrors itself — it is an event handler, where reading is\n * fine — and hands the values over.\n *\n * A move that changes group counts even at the same index (the card lands in\n * another column), so only a same-group, same-index drop is \"nothing happened\".\n */\n const commit = useCallback(\n (from: number, to: number, fromGroup?: string, toGroup?: string): void => {\n if (from !== to || fromGroup !== toGroup) {\n onReorderRef.current({ from, to, fromGroup, toGroup });\n }\n reset();\n },\n [reset],\n );\n\n const setContainer = useCallback((node: HTMLElement | null): void => {\n containerRef.current = node;\n }, []);\n\n const handlePointerDown = useCallback(\n (index: number, group: string | undefined, event: ReactPointerEvent<HTMLElement>): void => {\n if (disabled) return;\n event.currentTarget.setPointerCapture?.(event.pointerId);\n setActiveGroup(group);\n setOverGroup(group);\n setActiveIndex(index);\n setOverIndex(index);\n },\n [disabled, setActiveGroup, setActiveIndex, setOverGroup, setOverIndex],\n );\n\n useEffect(() => {\n if (activeIndex === null) return;\n\n function onPointerMove(event: PointerEvent): void {\n const target = targetAtPoint(containerRef.current, event.clientX, event.clientY);\n if (!target) return;\n setOverGroup(target.group);\n setOverIndex(target.index);\n }\n\n function onPointerUp(): void {\n const from = activeRef.current;\n const to = overRef.current;\n if (from !== null && to !== null) {\n commit(from, to, activeGroupRef.current, overGroupRef.current);\n } else {\n reset();\n }\n }\n\n function onKeyDown(event: KeyboardEvent): void {\n if (event.key === \"Escape\") reset();\n }\n\n window.addEventListener(\"pointermove\", onPointerMove);\n window.addEventListener(\"pointerup\", onPointerUp);\n window.addEventListener(\"pointercancel\", reset);\n window.addEventListener(\"keydown\", onKeyDown);\n return () => {\n window.removeEventListener(\"pointermove\", onPointerMove);\n window.removeEventListener(\"pointerup\", onPointerUp);\n window.removeEventListener(\"pointercancel\", reset);\n window.removeEventListener(\"keydown\", onKeyDown);\n };\n }, [activeIndex, commit, reset, setOverGroup, setOverIndex]);\n\n const handleKeyDown = useCallback(\n (\n index: number,\n group: string | undefined,\n event: ReactKeyboardEvent<HTMLElement>,\n ): void => {\n if (disabled) return;\n const picked = activeIndex !== null;\n\n switch (event.key) {\n case \" \":\n case \"Enter\":\n event.preventDefault();\n if (!picked) {\n setActiveGroup(group);\n setOverGroup(group);\n setActiveIndex(index);\n setOverIndex(index);\n } else if (overIndex !== null) {\n commit(activeIndex, overIndex, activeGroup, overGroup);\n }\n break;\n case \"ArrowDown\":\n case \"ArrowRight\": {\n if (!picked) return;\n event.preventDefault();\n if (overRef.current !== null) {\n setOverIndex(Math.min(overRef.current + 1, itemCount - 1));\n }\n break;\n }\n case \"ArrowUp\":\n case \"ArrowLeft\": {\n if (!picked) return;\n event.preventDefault();\n if (overRef.current !== null) {\n setOverIndex(Math.max(overRef.current - 1, 0));\n }\n break;\n }\n case \"Escape\":\n if (!picked) return;\n event.preventDefault();\n reset();\n break;\n default:\n break;\n }\n },\n [\n activeGroup,\n activeIndex,\n commit,\n overGroup,\n disabled,\n itemCount,\n overIndex,\n reset,\n setActiveGroup,\n setActiveIndex,\n setOverGroup,\n setOverIndex,\n ],\n );\n\n const getItemProps = useCallback(\n (index: number, group?: string): SortableItemProps => ({\n \"data-sortable-index\": index,\n \"data-sortable-group\": group,\n \"data-sortable-active\": (activeIndex === index && activeGroup === group) || undefined,\n onPointerDown: (event) => handlePointerDown(index, group, event),\n onKeyDown: (event) => handleKeyDown(index, group, event),\n tabIndex: disabled ? -1 : 0,\n role: \"option\",\n \"aria-roledescription\": roleDescription,\n \"aria-selected\": activeIndex === index && activeGroup === group,\n }),\n [activeGroup, activeIndex, disabled, handleKeyDown, handlePointerDown, roleDescription],\n );\n\n const getEmptyGroupProps = useCallback(\n (group: string) => ({ \"data-sortable-group\": group, \"data-sortable-empty\": true as const }),\n [],\n );\n\n const getListProps = useCallback(\n () => ({ role: \"listbox\" as const, \"aria-orientation\": \"vertical\" as const }),\n [],\n );\n\n return {\n activeIndex,\n overIndex,\n activeGroup,\n overGroup,\n getItemProps,\n getEmptyGroupProps,\n getListProps,\n cancel: reset,\n setContainer,\n };\n}\n"],"mappings":";;AAmGA,SAAgB,EAAY,GAAY,GAAc,GAAiB;CACnE,IAAI,MAAS,KAAM,IAAO,KAAK,IAAK,KAAK,KAAQ,EAAM,UAAU,KAAM,EAAM,QACzE,OAAO;CAEX,IAAM,IAAO,EAAM,MAAM,GACnB,CAAC,KAAS,EAAK,OAAO,GAAM,CAAC;CAEnC,OADA,EAAK,OAAO,GAAI,GAAG,CAAK,GACjB;AACX;AAcA,SAAS,EAAc,GAA+B,GAAW,GAA6B;CAC1F,IAAI,CAAC,GAAW,OAAO;CACvB,IAAM,KAAU,MAAkC;EAC9C,IAAM,IAAO,EAAQ,sBAAsB;EAC3C,OAAO,KAAK,EAAK,OAAO,KAAK,EAAK,UAAU,KAAK,EAAK,QAAQ,KAAK,EAAK;CAC5E;CAEA,KAAK,IAAM,KAAQ,MAAM,KACrB,EAAU,iBAA8B,uBAAuB,CACnE,GAAG;EACC,IAAI,CAAC,EAAO,CAAI,GAAG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C9D,IACA;GAAC;GAAa;GAAa;GAAU;GAAe;GAAmB;EAAe,CAkBtF;EACA,oBAhBuB,GACtB,OAAmB;GAAE,uBAAuB;GAAO,uBAAuB;EAAc,IACzF,CAAC,CAcD;EACA,cAZiB,SACV;GAAE,MAAM;GAAoB,oBAAoB;EAAoB,IAC3E,CAAC,CAUD;EACA,QAAQ;EACR;CACJ;AACJ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-stable-callback.cjs","names":[],"sources":["../../src/hooks/use-stable-callback.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"use-stable-callback.cjs","names":[],"sources":["../../src/hooks/use-stable-callback.ts"],"sourcesContent":["/* eslint-disable react-hooks/refs -- writing at render time is deliberate; an effect would add a staleness window (see the docstring) */\nimport { useCallback, useRef } from \"react\";\n\n/**\n * Returns a stable function reference that always invokes the latest\n * `callback` argument. Use to break dependency cycles in effects without\n * triggering re-runs when the callback identity changes.\n *\n * The assignment happens **during render** on purpose. Moving it into an effect\n * would satisfy the React Compiler rules but open a one-commit staleness window:\n * an effect declared before this hook's own effect, in the same commit, would call\n * the previous render's callback. This is a primitive other hooks build on, so a\n * subtle staleness here is worse than the rule violation. Prefer React's\n * `useEffectEvent` once it ships as stable.\n */\nexport function useStableCallback<TArgs extends unknown[], TReturn>(\n callback: (...args: TArgs) => TReturn,\n): (...args: TArgs) => TReturn {\n const ref = useRef(callback);\n ref.current = callback;\n return useCallback((...args: TArgs) => ref.current(...args), []);\n}\n"],"mappings":"uBAeA,SAAgB,EACZ,EAC2B,CAC3B,IAAM,GAAA,EAAA,EAAA,OAAA,CAAa,CAAQ,EAE3B,MADA,GAAI,QAAU,GACd,EAAA,EAAA,YAAA,EAAoB,GAAG,IAAgB,EAAI,QAAQ,GAAG,CAAI,EAAG,CAAC,CAAC,CACnE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-stable-callback.js","names":[],"sources":["../../src/hooks/use-stable-callback.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"use-stable-callback.js","names":[],"sources":["../../src/hooks/use-stable-callback.ts"],"sourcesContent":["/* eslint-disable react-hooks/refs -- writing at render time is deliberate; an effect would add a staleness window (see the docstring) */\nimport { useCallback, useRef } from \"react\";\n\n/**\n * Returns a stable function reference that always invokes the latest\n * `callback` argument. Use to break dependency cycles in effects without\n * triggering re-runs when the callback identity changes.\n *\n * The assignment happens **during render** on purpose. Moving it into an effect\n * would satisfy the React Compiler rules but open a one-commit staleness window:\n * an effect declared before this hook's own effect, in the same commit, would call\n * the previous render's callback. This is a primitive other hooks build on, so a\n * subtle staleness here is worse than the rule violation. Prefer React's\n * `useEffectEvent` once it ships as stable.\n */\nexport function useStableCallback<TArgs extends unknown[], TReturn>(\n callback: (...args: TArgs) => TReturn,\n): (...args: TArgs) => TReturn {\n const ref = useRef(callback);\n ref.current = callback;\n return useCallback((...args: TArgs) => ref.current(...args), []);\n}\n"],"mappings":";;AAeA,SAAgB,EACZ,GAC2B;CAC3B,IAAM,IAAM,EAAO,CAAQ;CAE3B,OADA,EAAI,UAAU,GACP,GAAa,GAAG,MAAgB,EAAI,QAAQ,GAAG,CAAI,GAAG,CAAC,CAAC;AACnE"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
let e=require("react");function t(t,n){let r=(0,e.useRef)(t);r.current=t,(0,e.useEffect)(()=>{if(n===null)return;let e=setTimeout(()=>r.current(),n);return()=>clearTimeout(e)},[n])}exports.useTimeout=t;
|
|
1
|
+
let e=require("react");function t(t,n){let r=(0,e.useRef)(t);(0,e.useEffect)(()=>{r.current=t},[t]),(0,e.useEffect)(()=>{if(n===null)return;let e=setTimeout(()=>r.current(),n);return()=>clearTimeout(e)},[n])}exports.useTimeout=t;
|
|
2
2
|
//# sourceMappingURL=use-timeout.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-timeout.cjs","names":[],"sources":["../../src/hooks/use-timeout.ts"],"sourcesContent":["import { useEffect, useRef } from \"react\";\n\n/**\n * Run a callback after `delay` ms. Pass `null` to disable. Resets when\n * `delay` changes; the callback ref always points at the latest closure.\n *\n * @example\n * useTimeout(() => setShow(false), show ? 3000 : null);\n */\nexport function useTimeout(fn: () => void, delay: number | null): void {\n const fnRef = useRef(fn);\n fnRef.current = fn;\n\n useEffect(() => {\n if (delay === null) return;\n const id = setTimeout(() => fnRef.current(), delay);\n return () => clearTimeout(id);\n }, [delay]);\n}\n"],"mappings":"uBASA,SAAgB,EAAW,EAAgB,EAA4B,CACnE,IAAM,GAAA,EAAA,EAAA,OAAA,CAAe,CAAE,
|
|
1
|
+
{"version":3,"file":"use-timeout.cjs","names":[],"sources":["../../src/hooks/use-timeout.ts"],"sourcesContent":["import { useEffect, useRef } from \"react\";\n\n/**\n * Run a callback after `delay` ms. Pass `null` to disable. Resets when\n * `delay` changes; the callback ref always points at the latest closure.\n *\n * @example\n * useTimeout(() => setShow(false), show ? 3000 : null);\n */\nexport function useTimeout(fn: () => void, delay: number | null): void {\n const fnRef = useRef(fn);\n useEffect(() => {\n fnRef.current = fn;\n }, [fn]);\n\n useEffect(() => {\n if (delay === null) return;\n const id = setTimeout(() => fnRef.current(), delay);\n return () => clearTimeout(id);\n }, [delay]);\n}\n"],"mappings":"uBASA,SAAgB,EAAW,EAAgB,EAA4B,CACnE,IAAM,GAAA,EAAA,EAAA,OAAA,CAAe,CAAE,GACvB,EAAA,EAAA,UAAA,KAAgB,CACZ,EAAM,QAAU,CACpB,EAAG,CAAC,CAAE,CAAC,GAEP,EAAA,EAAA,UAAA,KAAgB,CACZ,GAAI,IAAU,KAAM,OACpB,IAAM,EAAK,eAAiB,EAAM,QAAQ,EAAG,CAAK,EAClD,UAAa,aAAa,CAAE,CAChC,EAAG,CAAC,CAAK,CAAC,CACd"}
|
|
@@ -2,7 +2,9 @@ import { useEffect as e, useRef as t } from "react";
|
|
|
2
2
|
//#region src/hooks/use-timeout.ts
|
|
3
3
|
function n(n, r) {
|
|
4
4
|
let i = t(n);
|
|
5
|
-
|
|
5
|
+
e(() => {
|
|
6
|
+
i.current = n;
|
|
7
|
+
}, [n]), e(() => {
|
|
6
8
|
if (r === null) return;
|
|
7
9
|
let e = setTimeout(() => i.current(), r);
|
|
8
10
|
return () => clearTimeout(e);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-timeout.js","names":[],"sources":["../../src/hooks/use-timeout.ts"],"sourcesContent":["import { useEffect, useRef } from \"react\";\n\n/**\n * Run a callback after `delay` ms. Pass `null` to disable. Resets when\n * `delay` changes; the callback ref always points at the latest closure.\n *\n * @example\n * useTimeout(() => setShow(false), show ? 3000 : null);\n */\nexport function useTimeout(fn: () => void, delay: number | null): void {\n const fnRef = useRef(fn);\n fnRef.current = fn;\n\n useEffect(() => {\n if (delay === null) return;\n const id = setTimeout(() => fnRef.current(), delay);\n return () => clearTimeout(id);\n }, [delay]);\n}\n"],"mappings":";;AASA,SAAgB,EAAW,GAAgB,GAA4B;CACnE,IAAM,IAAQ,EAAO,CAAE;
|
|
1
|
+
{"version":3,"file":"use-timeout.js","names":[],"sources":["../../src/hooks/use-timeout.ts"],"sourcesContent":["import { useEffect, useRef } from \"react\";\n\n/**\n * Run a callback after `delay` ms. Pass `null` to disable. Resets when\n * `delay` changes; the callback ref always points at the latest closure.\n *\n * @example\n * useTimeout(() => setShow(false), show ? 3000 : null);\n */\nexport function useTimeout(fn: () => void, delay: number | null): void {\n const fnRef = useRef(fn);\n useEffect(() => {\n fnRef.current = fn;\n }, [fn]);\n\n useEffect(() => {\n if (delay === null) return;\n const id = setTimeout(() => fnRef.current(), delay);\n return () => clearTimeout(id);\n }, [delay]);\n}\n"],"mappings":";;AASA,SAAgB,EAAW,GAAgB,GAA4B;CACnE,IAAM,IAAQ,EAAO,CAAE;CAKvB,AAJA,QAAgB;EACZ,EAAM,UAAU;CACpB,GAAG,CAAC,CAAE,CAAC,GAEP,QAAgB;EACZ,IAAI,MAAU,MAAM;EACpB,IAAM,IAAK,iBAAiB,EAAM,QAAQ,GAAG,CAAK;EAClD,aAAa,aAAa,CAAE;CAChC,GAAG,CAAC,CAAK,CAAC;AACd"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const e=require("./icon-context.cjs"),t=require("./shard-cache.cjs"),n=require("./use-icon.cjs");let r=require("react");function i({name:i,size:o,strokeWidth:c,fallback:l=null,...u}){let d=e.useIconContext(),f=n.useIcon(i);return f?(0,r.createElement)(f,{size:o??d?.size,strokeWidth:c??d?.strokeWidth,...u}):(a()&&t.iconStatus(i)===`missing`&&s(i),l)}function a(){return!1}var o=new Set;function s(e){o.has(e)||(o.add(e),console.warn(`[tempest-react-sdk] <Icon name="${e}" /> — no such lucide icon. Slugs are kebab-case ("circle-alert", not "CircleAlert"); check against \`iconNames\`.`))}exports.Icon=i;
|
|
2
|
+
//# sourceMappingURL=Icon.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Icon.cjs","names":[],"sources":["../../src/icons/Icon.tsx"],"sourcesContent":["import { createElement, type ReactNode, type SVGProps } from \"react\";\n\nimport type { IconName } from \"./generated/icon-name\";\nimport { useIconContext } from \"./icon-context\";\nimport { iconStatus } from \"./shard-cache\";\nimport { useIcon } from \"./use-icon\";\n\nexport interface IconProps extends Omit<SVGProps<SVGSVGElement>, \"ref\"> {\n /**\n * The lucide slug, kebab-case: `\"save\"`, `\"trash-2\"`, `\"circle-alert\"`.\n *\n * Typed as the union of every slug lucide ships, so a typo is a compile\n * error — while still accepting a plain `string` for the case this component\n * exists for: a name that arrives from an API, a CMS or a config table.\n */\n name: IconName | (string & {});\n /** Width and height in px. Defaults to the provider's value, then lucide's `24`. */\n size?: number | string;\n /** Stroke width. Defaults to the provider's value, then lucide's `2`. */\n strokeWidth?: number;\n /**\n * Rendered while the icon's shard is in flight, and for a slug that does not\n * exist at all. Defaults to nothing.\n *\n * Pass a same-sized placeholder when the surrounding layout would otherwise\n * shift. Note that a slug already in the registry or the cache never renders\n * this — it resolves during render.\n */\n fallback?: ReactNode;\n}\n\n/**\n * Render a lucide icon by slug.\n *\n * All ~2000 lucide icons are addressable, without the cost that makes\n * `lucide-react`'s own `DynamicIcon` unusable: its icon map holds a dynamic\n * `import()` per icon, so a bundler has to emit ~2000 chunk boundaries and the\n * browser floods with requests. Here a slug the app wrote as a literal is\n * resolved from a static registry, and a slug only known at runtime pulls a\n * single shard covering every icon sharing its initial letter.\n *\n * An unknown slug renders `fallback` (nothing, by default) and warns in dev only\n * — it never throws, because a bad name from an API must not take down the tree.\n *\n * @example\n * <Icon name=\"save\" size={18} />\n * <Icon name={row.iconSlug} fallback={<span className=\"skeleton\" />} />\n */\nexport function Icon({ name, size, strokeWidth, fallback = null, ...rest }: IconProps): ReactNode {\n const context = useIconContext();\n const resolved = useIcon(name);\n\n if (!resolved) {\n if (isDev() && iconStatus(name) === \"missing\") warnUnknownIcon(name);\n return fallback;\n }\n\n return createElement(resolved, {\n size: size ?? context?.size,\n strokeWidth: strokeWidth ?? context?.strokeWidth,\n ...rest,\n });\n}\n\n/**\n * Whether the bundle was built for development.\n *\n * Guarded because the SDK also runs where `import.meta.env` does not exist — a\n * service-worker context, a Node test runner, a build-time script.\n */\nfunction isDev(): boolean {\n return Boolean(import.meta.env?.DEV);\n}\n\nconst warnedSlugs = new Set<string>();\n\n/**\n * Warn once per unknown slug.\n *\n * Once, because `<Icon>` re-renders and a warning per render would bury the\n * console; the set is never cleared, since a slug that does not exist will not\n * start existing within the life of the page.\n *\n * @param name - The slug that resolved to nothing.\n */\nfunction warnUnknownIcon(name: string): void {\n if (warnedSlugs.has(name)) return;\n warnedSlugs.add(name);\n console.warn(\n `[tempest-react-sdk] <Icon name=\"${name}\" /> — no such lucide icon. ` +\n `Slugs are kebab-case (\"circle-alert\", not \"CircleAlert\"); check against \\`iconNames\\`.`,\n );\n}\n"],"mappings":"wHAgDA,SAAgB,EAAK,CAAE,OAAM,OAAM,cAAa,WAAW,KAAM,GAAG,GAA8B,CAC9F,IAAM,EAAU,EAAA,eAAe,EACzB,EAAW,EAAA,QAAQ,CAAI,EAO7B,OALK,GAKL,EAAA,EAAA,cAAA,CAAqB,EAAU,CAC3B,KAAM,GAAQ,GAAS,KACvB,YAAa,GAAe,GAAS,YACrC,GAAG,CACP,CAAC,GARO,EAAM,GAAK,EAAA,WAAW,CAAI,IAAM,WAAW,EAAgB,CAAI,EAC5D,EAQf,CAQA,SAAS,GAAiB,CACtB,MAAO,CAAA,CACX,CAEA,IAAM,EAAc,IAAI,IAWxB,SAAS,EAAgB,EAAoB,CACrC,EAAY,IAAI,CAAI,IACxB,EAAY,IAAI,CAAI,EACpB,QAAQ,KACJ,mCAAmC,EAAK,mHAE5C,EACJ"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { useIconContext as e } from "./icon-context.js";
|
|
2
|
+
import { iconStatus as t } from "./shard-cache.js";
|
|
3
|
+
import { useIcon as n } from "./use-icon.js";
|
|
4
|
+
import { createElement as r } from "react";
|
|
5
|
+
//#region src/icons/Icon.tsx
|
|
6
|
+
function i({ name: i, size: o, strokeWidth: c, fallback: l = null, ...u }) {
|
|
7
|
+
let d = e(), f = n(i);
|
|
8
|
+
return f ? r(f, {
|
|
9
|
+
size: o ?? d?.size,
|
|
10
|
+
strokeWidth: c ?? d?.strokeWidth,
|
|
11
|
+
...u
|
|
12
|
+
}) : (a() && t(i) === "missing" && s(i), l);
|
|
13
|
+
}
|
|
14
|
+
function a() {
|
|
15
|
+
return !1;
|
|
16
|
+
}
|
|
17
|
+
var o = /* @__PURE__ */ new Set();
|
|
18
|
+
function s(e) {
|
|
19
|
+
o.has(e) || (o.add(e), console.warn(`[tempest-react-sdk] <Icon name="${e}" /> — no such lucide icon. Slugs are kebab-case ("circle-alert", not "CircleAlert"); check against \`iconNames\`.`));
|
|
20
|
+
}
|
|
21
|
+
//#endregion
|
|
22
|
+
export { i as Icon };
|
|
23
|
+
|
|
24
|
+
//# sourceMappingURL=Icon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Icon.js","names":[],"sources":["../../src/icons/Icon.tsx"],"sourcesContent":["import { createElement, type ReactNode, type SVGProps } from \"react\";\n\nimport type { IconName } from \"./generated/icon-name\";\nimport { useIconContext } from \"./icon-context\";\nimport { iconStatus } from \"./shard-cache\";\nimport { useIcon } from \"./use-icon\";\n\nexport interface IconProps extends Omit<SVGProps<SVGSVGElement>, \"ref\"> {\n /**\n * The lucide slug, kebab-case: `\"save\"`, `\"trash-2\"`, `\"circle-alert\"`.\n *\n * Typed as the union of every slug lucide ships, so a typo is a compile\n * error — while still accepting a plain `string` for the case this component\n * exists for: a name that arrives from an API, a CMS or a config table.\n */\n name: IconName | (string & {});\n /** Width and height in px. Defaults to the provider's value, then lucide's `24`. */\n size?: number | string;\n /** Stroke width. Defaults to the provider's value, then lucide's `2`. */\n strokeWidth?: number;\n /**\n * Rendered while the icon's shard is in flight, and for a slug that does not\n * exist at all. Defaults to nothing.\n *\n * Pass a same-sized placeholder when the surrounding layout would otherwise\n * shift. Note that a slug already in the registry or the cache never renders\n * this — it resolves during render.\n */\n fallback?: ReactNode;\n}\n\n/**\n * Render a lucide icon by slug.\n *\n * All ~2000 lucide icons are addressable, without the cost that makes\n * `lucide-react`'s own `DynamicIcon` unusable: its icon map holds a dynamic\n * `import()` per icon, so a bundler has to emit ~2000 chunk boundaries and the\n * browser floods with requests. Here a slug the app wrote as a literal is\n * resolved from a static registry, and a slug only known at runtime pulls a\n * single shard covering every icon sharing its initial letter.\n *\n * An unknown slug renders `fallback` (nothing, by default) and warns in dev only\n * — it never throws, because a bad name from an API must not take down the tree.\n *\n * @example\n * <Icon name=\"save\" size={18} />\n * <Icon name={row.iconSlug} fallback={<span className=\"skeleton\" />} />\n */\nexport function Icon({ name, size, strokeWidth, fallback = null, ...rest }: IconProps): ReactNode {\n const context = useIconContext();\n const resolved = useIcon(name);\n\n if (!resolved) {\n if (isDev() && iconStatus(name) === \"missing\") warnUnknownIcon(name);\n return fallback;\n }\n\n return createElement(resolved, {\n size: size ?? context?.size,\n strokeWidth: strokeWidth ?? context?.strokeWidth,\n ...rest,\n });\n}\n\n/**\n * Whether the bundle was built for development.\n *\n * Guarded because the SDK also runs where `import.meta.env` does not exist — a\n * service-worker context, a Node test runner, a build-time script.\n */\nfunction isDev(): boolean {\n return Boolean(import.meta.env?.DEV);\n}\n\nconst warnedSlugs = new Set<string>();\n\n/**\n * Warn once per unknown slug.\n *\n * Once, because `<Icon>` re-renders and a warning per render would bury the\n * console; the set is never cleared, since a slug that does not exist will not\n * start existing within the life of the page.\n *\n * @param name - The slug that resolved to nothing.\n */\nfunction warnUnknownIcon(name: string): void {\n if (warnedSlugs.has(name)) return;\n warnedSlugs.add(name);\n console.warn(\n `[tempest-react-sdk] <Icon name=\"${name}\" /> — no such lucide icon. ` +\n `Slugs are kebab-case (\"circle-alert\", not \"CircleAlert\"); check against \\`iconNames\\`.`,\n );\n}\n"],"mappings":";;;;;AAgDA,SAAgB,EAAK,EAAE,SAAM,SAAM,gBAAa,cAAW,MAAM,GAAG,KAA8B;CAC9F,IAAM,IAAU,EAAe,GACzB,IAAW,EAAQ,CAAI;CAO7B,OALK,IAKE,EAAc,GAAU;EAC3B,MAAM,KAAQ,GAAS;EACvB,aAAa,KAAe,GAAS;EACrC,GAAG;CACP,CAAC,KARO,EAAM,KAAK,EAAW,CAAI,MAAM,aAAW,EAAgB,CAAI,GAC5D;AAQf;AAQA,SAAS,IAAiB;CACtB,OAAO,CAAA;AACX;AAEA,IAAM,oBAAc,IAAI,IAAY;AAWpC,SAAS,EAAgB,GAAoB;CACrC,EAAY,IAAI,CAAI,MACxB,EAAY,IAAI,CAAI,GACpB,QAAQ,KACJ,mCAAmC,EAAK,mHAE5C;AACJ"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const e=require("./icon-context.cjs");let t=require("react"),n=require("react/jsx-runtime");var r={};function i({registry:i=r,size:a,strokeWidth:o,children:s}){let c=(0,t.useMemo)(()=>({registry:i,size:a,strokeWidth:o}),[i,a,o]);return(0,n.jsx)(e.IconContext.Provider,{value:c,children:s})}exports.IconProvider=i;
|
|
2
|
+
//# sourceMappingURL=IconProvider.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IconProvider.cjs","names":[],"sources":["../../src/icons/IconProvider.tsx"],"sourcesContent":["import { type ReactNode, useMemo } from \"react\";\n\nimport { IconContext, type IconContextValue, type IconRegistry } from \"./icon-context\";\n\nexport interface IconProviderProps {\n /**\n * Icons resolved with zero extra requests.\n *\n * Pass `staticIcons` from the `virtual:tempest-icons` module the\n * `tempestIcons()` Vite plugin generates, or a table built by\n * `createIconRegistry`. Slugs found here never trigger a shard fetch.\n */\n registry?: IconRegistry;\n /** Default `size` for every `<Icon>` below. Lucide's own default is `24`. */\n size?: number | string;\n /** Default `strokeWidth` for every `<Icon>` below. Lucide's own default is `2`. */\n strokeWidth?: number;\n children: ReactNode;\n}\n\nconst EMPTY_REGISTRY: IconRegistry = {};\n\n/**\n * Provide a static icon registry and shared `<Icon>` defaults to a subtree.\n *\n * Entirely optional: without it `<Icon>` still resolves any of lucide's ~2000\n * slugs by fetching the shard that owns it. What the provider buys is the\n * zero-request path for the slugs an app actually uses, plus one place to set\n * `size`/`strokeWidth` instead of repeating them at every call site.\n *\n * @example\n * import { IconProvider } from \"tempest-react-sdk/icons\";\n * import { staticIcons } from \"virtual:tempest-icons\";\n *\n * <IconProvider registry={staticIcons} size={18}>\n * <App />\n * </IconProvider>\n */\nexport function IconProvider({\n registry = EMPTY_REGISTRY,\n size,\n strokeWidth,\n children,\n}: IconProviderProps): ReactNode {\n const value = useMemo<IconContextValue>(\n () => ({ registry, size, strokeWidth }),\n [registry, size, strokeWidth],\n );\n return <IconContext.Provider value={value}>{children}</IconContext.Provider>;\n}\n"],"mappings":"4FAoBA,IAAM,EAA+B,CAAC,EAkBtC,SAAgB,EAAa,CACzB,WAAW,EACX,OACA,cACA,YAC6B,CAC7B,IAAM,GAAA,EAAA,EAAA,QAAA,MACK,CAAE,WAAU,OAAM,aAAY,GACrC,CAAC,EAAU,EAAM,CAAW,CAChC,EACA,OAAO,EAAA,EAAA,IAAA,CAAC,EAAA,YAAY,SAAb,CAA6B,QAAQ,UAA+B,CAAA,CAC/E"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { IconContext as e } from "./icon-context.js";
|
|
2
|
+
import { useMemo as t } from "react";
|
|
3
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
4
|
+
//#region src/icons/IconProvider.tsx
|
|
5
|
+
var r = {};
|
|
6
|
+
function i({ registry: i = r, size: a, strokeWidth: o, children: s }) {
|
|
7
|
+
let c = t(() => ({
|
|
8
|
+
registry: i,
|
|
9
|
+
size: a,
|
|
10
|
+
strokeWidth: o
|
|
11
|
+
}), [
|
|
12
|
+
i,
|
|
13
|
+
a,
|
|
14
|
+
o
|
|
15
|
+
]);
|
|
16
|
+
return /* @__PURE__ */ n(e.Provider, {
|
|
17
|
+
value: c,
|
|
18
|
+
children: s
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
//#endregion
|
|
22
|
+
export { i as IconProvider };
|
|
23
|
+
|
|
24
|
+
//# sourceMappingURL=IconProvider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IconProvider.js","names":[],"sources":["../../src/icons/IconProvider.tsx"],"sourcesContent":["import { type ReactNode, useMemo } from \"react\";\n\nimport { IconContext, type IconContextValue, type IconRegistry } from \"./icon-context\";\n\nexport interface IconProviderProps {\n /**\n * Icons resolved with zero extra requests.\n *\n * Pass `staticIcons` from the `virtual:tempest-icons` module the\n * `tempestIcons()` Vite plugin generates, or a table built by\n * `createIconRegistry`. Slugs found here never trigger a shard fetch.\n */\n registry?: IconRegistry;\n /** Default `size` for every `<Icon>` below. Lucide's own default is `24`. */\n size?: number | string;\n /** Default `strokeWidth` for every `<Icon>` below. Lucide's own default is `2`. */\n strokeWidth?: number;\n children: ReactNode;\n}\n\nconst EMPTY_REGISTRY: IconRegistry = {};\n\n/**\n * Provide a static icon registry and shared `<Icon>` defaults to a subtree.\n *\n * Entirely optional: without it `<Icon>` still resolves any of lucide's ~2000\n * slugs by fetching the shard that owns it. What the provider buys is the\n * zero-request path for the slugs an app actually uses, plus one place to set\n * `size`/`strokeWidth` instead of repeating them at every call site.\n *\n * @example\n * import { IconProvider } from \"tempest-react-sdk/icons\";\n * import { staticIcons } from \"virtual:tempest-icons\";\n *\n * <IconProvider registry={staticIcons} size={18}>\n * <App />\n * </IconProvider>\n */\nexport function IconProvider({\n registry = EMPTY_REGISTRY,\n size,\n strokeWidth,\n children,\n}: IconProviderProps): ReactNode {\n const value = useMemo<IconContextValue>(\n () => ({ registry, size, strokeWidth }),\n [registry, size, strokeWidth],\n );\n return <IconContext.Provider value={value}>{children}</IconContext.Provider>;\n}\n"],"mappings":";;;;AAoBA,IAAM,IAA+B,CAAC;AAkBtC,SAAgB,EAAa,EACzB,cAAW,GACX,SACA,gBACA,eAC6B;CAC7B,IAAM,IAAQ,SACH;EAAE;EAAU;EAAM;CAAY,IACrC;EAAC;EAAU;EAAM;CAAW,CAChC;CACA,OAAO,kBAAC,EAAY,UAAb;EAA6B;EAAQ;CAA+B,CAAA;AAC/E"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var e={"activity-square":`square-activity`,"alarm-check":`alarm-clock-check`,"alarm-minus":`alarm-clock-minus`,"alarm-plus":`alarm-clock-plus`,"alert-circle":`circle-alert`,"alert-octagon":`octagon-alert`,"alert-triangle":`triangle-alert`,"align-center":`text-align-center`,"align-justify":`text-align-justify`,"align-left":`text-align-start`,"align-right":`text-align-end`,"area-chart":`chart-area`,"arrow-down-01":`arrow-down-0-1`,"arrow-down-10":`arrow-down-1-0`,"arrow-down-az":`arrow-down-a-z`,"arrow-down-circle":`circle-arrow-down`,"arrow-down-left-from-circle":`circle-arrow-out-down-left`,"arrow-down-left-from-square":`square-arrow-out-down-left`,"arrow-down-left-square":`square-arrow-down-left`,"arrow-down-right-from-circle":`circle-arrow-out-down-right`,"arrow-down-right-from-square":`square-arrow-out-down-right`,"arrow-down-right-square":`square-arrow-down-right`,"arrow-down-square":`square-arrow-down`,"arrow-down-za":`arrow-down-z-a`,"arrow-left-circle":`circle-arrow-left`,"arrow-left-square":`square-arrow-left`,"arrow-right-circle":`circle-arrow-right`,"arrow-right-square":`square-arrow-right`,"arrow-up-01":`arrow-up-0-1`,"arrow-up-10":`arrow-up-1-0`,"arrow-up-az":`arrow-up-a-z`,"arrow-up-circle":`circle-arrow-up`,"arrow-up-left-from-circle":`circle-arrow-out-up-left`,"arrow-up-left-from-square":`square-arrow-out-up-left`,"arrow-up-left-square":`square-arrow-up-left`,"arrow-up-right-from-circle":`circle-arrow-out-up-right`,"arrow-up-right-from-square":`square-arrow-out-up-right`,"arrow-up-right-square":`square-arrow-up-right`,"arrow-up-square":`square-arrow-up`,"arrow-up-za":`arrow-up-z-a`,"asterisk-square":`square-asterisk`,"axis-3-d":`axis-3d`,"badge-help":`badge-question-mark`,"bar-chart":`chart-no-axes-column-increasing`,"bar-chart-2":`chart-no-axes-column`,"bar-chart-3":`chart-column`,"bar-chart-4":`chart-column-increasing`,"bar-chart-big":`chart-column-big`,"bar-chart-horizontal":`chart-bar`,"bar-chart-horizontal-big":`chart-bar-big`,"between-horizonal-end":`between-horizontal-end`,"between-horizonal-start":`between-horizontal-start`,"book-template":`book-dashed`,"box-select":`square-dashed`,"candlestick-chart":`chart-candlestick`,"check-circle":`circle-check-big`,"check-circle-2":`circle-check`,"check-square":`square-check-big`,"check-square-2":`square-check`,"chevron-down-circle":`circle-chevron-down`,"chevron-down-square":`square-chevron-down`,"chevron-left-circle":`circle-chevron-left`,"chevron-left-square":`square-chevron-left`,"chevron-right-circle":`circle-chevron-right`,"chevron-right-square":`square-chevron-right`,"chevron-up-circle":`circle-chevron-up`,"chevron-up-square":`square-chevron-up`,"circle-help":`circle-question-mark`,"circle-slashed":`circle-slash-2`,"clipboard-edit":`clipboard-pen`,"clipboard-signature":`clipboard-pen-line`,"code-2":`code-xml`,"code-square":`square-code`,columns:`columns-2`,"columns-settings":`columns-3-cog`,"contact-2":`contact-round`,"curly-braces":`braces`,"divide-circle":`circle-divide`,"divide-square":`square-divide`,"dot-square":`square-dot`,"download-cloud":`cloud-download`,edit:`square-pen`,"edit-2":`pen`,"edit-3":`pen-line`,"equal-square":`square-equal`,"file-audio":`file-headphone`,"file-audio-2":`file-headphone`,"file-axis-3-d":`file-axis-3d`,"file-badge-2":`file-badge`,"file-bar-chart":`file-chart-column-increasing`,"file-bar-chart-2":`file-chart-column`,"file-check-2":`file-check-corner`,"file-code-2":`file-code-corner`,"file-cog-2":`file-cog`,"file-edit":`file-pen`,"file-json":`file-braces`,"file-json-2":`file-braces-corner`,"file-key-2":`file-key`,"file-line-chart":`file-chart-line`,"file-lock-2":`file-lock`,"file-minus-2":`file-minus-corner`,"file-pie-chart":`file-chart-pie`,"file-plus-2":`file-plus-corner`,"file-question":`file-question-mark`,"file-search-2":`file-search-corner`,"file-signature":`file-pen-line`,"file-type-2":`file-type-corner`,"file-video":`file-play`,"file-video-2":`file-video-camera`,"file-volume-2":`file-signal`,"file-warning":`file-exclamation-point`,"file-x-2":`file-x-corner`,filter:`funnel`,"filter-x":`funnel-x`,"flip-horizontal":`square-centerline-dashed-horizontal`,"flip-vertical":`square-centerline-dashed-vertical`,"folder-cog-2":`folder-cog`,"folder-edit":`folder-pen`,"fork-knife":`utensils`,"fork-knife-crossed":`utensils-crossed`,"form-input":`rectangle-ellipsis`,"function-square":`square-function`,"gantt-chart":`chart-no-axes-gantt`,"gantt-chart-square":`square-chart-gantt`,"gauge-circle":`circle-gauge`,"git-commit":`git-commit-horizontal`,"globe-2":`earth`,grab:`hand-grab`,grid:`grid-3x3`,"grid-2-x-2":`grid-2x2`,"grid-2-x-2-check":`grid-2x2-check`,"grid-2-x-2-plus":`grid-2x2-plus`,"grid-2-x-2-x":`grid-2x2-x`,"grid-3-x-3":`grid-3x3`,"help-circle":`circle-question-mark`,"helping-hand":`hand-helping`,home:`house`,"ice-cream":`ice-cream-cone`,"ice-cream-2":`ice-cream-bowl`,indent:`list-indent-increase`,"indent-decrease":`list-indent-decrease`,"indent-increase":`list-indent-increase`,inspect:`square-mouse-pointer`,"kanban-square":`square-kanban`,"kanban-square-dashed":`square-dashed-kanban`,"laptop-2":`laptop-minimal`,"layers-3":`layers`,layout:`panels-top-left`,"letter-text":`text-initial`,"library-square":`square-library`,"line-chart":`chart-line`,"loader-2":`loader-circle`,"location-edit":`map-pin-pen`,"m-square":`square-m`,"mail-question":`mail-question-mark`,"menu-square":`square-menu`,"message-circle-question":`message-circle-question-mark`,"mic-2":`mic-vocal`,"minus-circle":`circle-minus`,"minus-square":`square-minus`,"more-horizontal":`ellipsis`,"more-vertical":`ellipsis-vertical`,"mouse-pointer-square-dashed":`square-dashed-mouse-pointer`,"move-3-d":`move-3d`,outdent:`list-indent-decrease`,"paintbrush-2":`paintbrush-vertical`,palmtree:`tree-palm`,"panel-bottom-inactive":`panel-bottom-dashed`,"panel-left-inactive":`panel-left-dashed`,"panel-right-inactive":`panel-right-dashed`,"panel-top-inactive":`panel-top-dashed`,"panels-left-right":`columns-3`,"panels-top-bottom":`rows-3`,"parking-circle":`circle-parking`,"parking-circle-off":`circle-parking-off`,"parking-square":`square-parking`,"parking-square-off":`square-parking-off`,"pause-circle":`circle-pause`,"pause-octagon":`octagon-pause`,"pen-box":`square-pen`,"pen-square":`square-pen`,"percent-circle":`circle-percent`,"percent-diamond":`diamond-percent`,"percent-square":`square-percent`,"pi-square":`square-pi`,"pie-chart":`chart-pie`,"pilcrow-square":`square-pilcrow`,"play-circle":`circle-play`,"play-square":`square-play`,"plug-zap-2":`plug-zap`,"plus-circle":`circle-plus`,"plus-square":`square-plus`,"power-circle":`circle-power`,"power-square":`square-power`,"rotate-3-d":`rotate-3d`,rows:`rows-2`,"scale-3-d":`scale-3d`,"scatter-chart":`chart-scatter`,"school-2":`university`,"scissors-square":`square-scissors`,"scissors-square-dashed-bottom":`square-bottom-dashed-scissors`,"send-horizonal":`send-horizontal`,"shield-close":`shield-x`,"shield-question":`shield-question-mark`,sidebar:`panel-left`,"sidebar-close":`panel-left-close`,"sidebar-open":`panel-left-open`,"sigma-square":`square-sigma`,"slash-square":`square-slash`,sliders:`sliders-vertical`,"sort-asc":`arrow-up-narrow-wide`,"sort-desc":`arrow-down-wide-narrow`,"split-square-horizontal":`square-split-horizontal`,"split-square-vertical":`square-split-vertical`,"square-gantt-chart":`square-chart-gantt`,stars:`sparkles`,"stop-circle":`circle-stop`,subtitles:`captions`,"table-config":`columns-3-cog`,"terminal-square":`square-terminal`,"test-tube-2":`test-tube-diagonal`,text:`text-align-start`,"text-select":`square-dashed-text`,"text-selection":`square-dashed-text`,train:`tram-front`,"tv-2":`tv-minimal`,unlock:`lock-open`,"unlock-keyhole":`lock-keyhole-open`,"upload-cloud":`cloud-upload`,"user-2":`user-round`,"user-check-2":`user-round-check`,"user-circle":`circle-user`,"user-circle-2":`circle-user-round`,"user-cog-2":`user-round-cog`,"user-minus-2":`user-round-minus`,"user-plus-2":`user-round-plus`,"user-square":`square-user`,"user-square-2":`square-user-round`,"user-x-2":`user-round-x`,"users-2":`users-round`,verified:`badge-check`,"wallet-2":`wallet-minimal`,"wand-2":`wand-sparkles`,waves:`waves-horizontal`,"wrap-text":`text-wrap`,"x-circle":`circle-x`,"x-octagon":`octagon-x`,"x-square":`square-x`};exports.iconAliases=e;
|
|
2
|
+
//# sourceMappingURL=aliases.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"aliases.cjs","names":[],"sources":["../../../src/icons/generated/aliases.ts"],"sourcesContent":["// GENERATED by scripts/gen-icons.mjs — do not edit.\n// Run `npm run gen:icons` after bumping lucide-react.\n\n/**\n * Lucide's 248 deprecated slugs, mapped to the canonical slug that\n * replaced them (`alert-circle` → `circle-alert`).\n *\n * Kept so a name stored in a database years ago keeps rendering after a lucide\n * bump renames it. Resolution goes through here first, so an alias loads the\n * shard of its *canonical* slug.\n */\nexport const iconAliases: Record<string, string> = {\n \"activity-square\": \"square-activity\",\n \"alarm-check\": \"alarm-clock-check\",\n \"alarm-minus\": \"alarm-clock-minus\",\n \"alarm-plus\": \"alarm-clock-plus\",\n \"alert-circle\": \"circle-alert\",\n \"alert-octagon\": \"octagon-alert\",\n \"alert-triangle\": \"triangle-alert\",\n \"align-center\": \"text-align-center\",\n \"align-justify\": \"text-align-justify\",\n \"align-left\": \"text-align-start\",\n \"align-right\": \"text-align-end\",\n \"area-chart\": \"chart-area\",\n \"arrow-down-01\": \"arrow-down-0-1\",\n \"arrow-down-10\": \"arrow-down-1-0\",\n \"arrow-down-az\": \"arrow-down-a-z\",\n \"arrow-down-circle\": \"circle-arrow-down\",\n \"arrow-down-left-from-circle\": \"circle-arrow-out-down-left\",\n \"arrow-down-left-from-square\": \"square-arrow-out-down-left\",\n \"arrow-down-left-square\": \"square-arrow-down-left\",\n \"arrow-down-right-from-circle\": \"circle-arrow-out-down-right\",\n \"arrow-down-right-from-square\": \"square-arrow-out-down-right\",\n \"arrow-down-right-square\": \"square-arrow-down-right\",\n \"arrow-down-square\": \"square-arrow-down\",\n \"arrow-down-za\": \"arrow-down-z-a\",\n \"arrow-left-circle\": \"circle-arrow-left\",\n \"arrow-left-square\": \"square-arrow-left\",\n \"arrow-right-circle\": \"circle-arrow-right\",\n \"arrow-right-square\": \"square-arrow-right\",\n \"arrow-up-01\": \"arrow-up-0-1\",\n \"arrow-up-10\": \"arrow-up-1-0\",\n \"arrow-up-az\": \"arrow-up-a-z\",\n \"arrow-up-circle\": \"circle-arrow-up\",\n \"arrow-up-left-from-circle\": \"circle-arrow-out-up-left\",\n \"arrow-up-left-from-square\": \"square-arrow-out-up-left\",\n \"arrow-up-left-square\": \"square-arrow-up-left\",\n \"arrow-up-right-from-circle\": \"circle-arrow-out-up-right\",\n \"arrow-up-right-from-square\": \"square-arrow-out-up-right\",\n \"arrow-up-right-square\": \"square-arrow-up-right\",\n \"arrow-up-square\": \"square-arrow-up\",\n \"arrow-up-za\": \"arrow-up-z-a\",\n \"asterisk-square\": \"square-asterisk\",\n \"axis-3-d\": \"axis-3d\",\n \"badge-help\": \"badge-question-mark\",\n \"bar-chart\": \"chart-no-axes-column-increasing\",\n \"bar-chart-2\": \"chart-no-axes-column\",\n \"bar-chart-3\": \"chart-column\",\n \"bar-chart-4\": \"chart-column-increasing\",\n \"bar-chart-big\": \"chart-column-big\",\n \"bar-chart-horizontal\": \"chart-bar\",\n \"bar-chart-horizontal-big\": \"chart-bar-big\",\n \"between-horizonal-end\": \"between-horizontal-end\",\n \"between-horizonal-start\": \"between-horizontal-start\",\n \"book-template\": \"book-dashed\",\n \"box-select\": \"square-dashed\",\n \"candlestick-chart\": \"chart-candlestick\",\n \"check-circle\": \"circle-check-big\",\n \"check-circle-2\": \"circle-check\",\n \"check-square\": \"square-check-big\",\n \"check-square-2\": \"square-check\",\n \"chevron-down-circle\": \"circle-chevron-down\",\n \"chevron-down-square\": \"square-chevron-down\",\n \"chevron-left-circle\": \"circle-chevron-left\",\n \"chevron-left-square\": \"square-chevron-left\",\n \"chevron-right-circle\": \"circle-chevron-right\",\n \"chevron-right-square\": \"square-chevron-right\",\n \"chevron-up-circle\": \"circle-chevron-up\",\n \"chevron-up-square\": \"square-chevron-up\",\n \"circle-help\": \"circle-question-mark\",\n \"circle-slashed\": \"circle-slash-2\",\n \"clipboard-edit\": \"clipboard-pen\",\n \"clipboard-signature\": \"clipboard-pen-line\",\n \"code-2\": \"code-xml\",\n \"code-square\": \"square-code\",\n columns: \"columns-2\",\n \"columns-settings\": \"columns-3-cog\",\n \"contact-2\": \"contact-round\",\n \"curly-braces\": \"braces\",\n \"divide-circle\": \"circle-divide\",\n \"divide-square\": \"square-divide\",\n \"dot-square\": \"square-dot\",\n \"download-cloud\": \"cloud-download\",\n edit: \"square-pen\",\n \"edit-2\": \"pen\",\n \"edit-3\": \"pen-line\",\n \"equal-square\": \"square-equal\",\n \"file-audio\": \"file-headphone\",\n \"file-audio-2\": \"file-headphone\",\n \"file-axis-3-d\": \"file-axis-3d\",\n \"file-badge-2\": \"file-badge\",\n \"file-bar-chart\": \"file-chart-column-increasing\",\n \"file-bar-chart-2\": \"file-chart-column\",\n \"file-check-2\": \"file-check-corner\",\n \"file-code-2\": \"file-code-corner\",\n \"file-cog-2\": \"file-cog\",\n \"file-edit\": \"file-pen\",\n \"file-json\": \"file-braces\",\n \"file-json-2\": \"file-braces-corner\",\n \"file-key-2\": \"file-key\",\n \"file-line-chart\": \"file-chart-line\",\n \"file-lock-2\": \"file-lock\",\n \"file-minus-2\": \"file-minus-corner\",\n \"file-pie-chart\": \"file-chart-pie\",\n \"file-plus-2\": \"file-plus-corner\",\n \"file-question\": \"file-question-mark\",\n \"file-search-2\": \"file-search-corner\",\n \"file-signature\": \"file-pen-line\",\n \"file-type-2\": \"file-type-corner\",\n \"file-video\": \"file-play\",\n \"file-video-2\": \"file-video-camera\",\n \"file-volume-2\": \"file-signal\",\n \"file-warning\": \"file-exclamation-point\",\n \"file-x-2\": \"file-x-corner\",\n filter: \"funnel\",\n \"filter-x\": \"funnel-x\",\n \"flip-horizontal\": \"square-centerline-dashed-horizontal\",\n \"flip-vertical\": \"square-centerline-dashed-vertical\",\n \"folder-cog-2\": \"folder-cog\",\n \"folder-edit\": \"folder-pen\",\n \"fork-knife\": \"utensils\",\n \"fork-knife-crossed\": \"utensils-crossed\",\n \"form-input\": \"rectangle-ellipsis\",\n \"function-square\": \"square-function\",\n \"gantt-chart\": \"chart-no-axes-gantt\",\n \"gantt-chart-square\": \"square-chart-gantt\",\n \"gauge-circle\": \"circle-gauge\",\n \"git-commit\": \"git-commit-horizontal\",\n \"globe-2\": \"earth\",\n grab: \"hand-grab\",\n grid: \"grid-3x3\",\n \"grid-2-x-2\": \"grid-2x2\",\n \"grid-2-x-2-check\": \"grid-2x2-check\",\n \"grid-2-x-2-plus\": \"grid-2x2-plus\",\n \"grid-2-x-2-x\": \"grid-2x2-x\",\n \"grid-3-x-3\": \"grid-3x3\",\n \"help-circle\": \"circle-question-mark\",\n \"helping-hand\": \"hand-helping\",\n home: \"house\",\n \"ice-cream\": \"ice-cream-cone\",\n \"ice-cream-2\": \"ice-cream-bowl\",\n indent: \"list-indent-increase\",\n \"indent-decrease\": \"list-indent-decrease\",\n \"indent-increase\": \"list-indent-increase\",\n inspect: \"square-mouse-pointer\",\n \"kanban-square\": \"square-kanban\",\n \"kanban-square-dashed\": \"square-dashed-kanban\",\n \"laptop-2\": \"laptop-minimal\",\n \"layers-3\": \"layers\",\n layout: \"panels-top-left\",\n \"letter-text\": \"text-initial\",\n \"library-square\": \"square-library\",\n \"line-chart\": \"chart-line\",\n \"loader-2\": \"loader-circle\",\n \"location-edit\": \"map-pin-pen\",\n \"m-square\": \"square-m\",\n \"mail-question\": \"mail-question-mark\",\n \"menu-square\": \"square-menu\",\n \"message-circle-question\": \"message-circle-question-mark\",\n \"mic-2\": \"mic-vocal\",\n \"minus-circle\": \"circle-minus\",\n \"minus-square\": \"square-minus\",\n \"more-horizontal\": \"ellipsis\",\n \"more-vertical\": \"ellipsis-vertical\",\n \"mouse-pointer-square-dashed\": \"square-dashed-mouse-pointer\",\n \"move-3-d\": \"move-3d\",\n outdent: \"list-indent-decrease\",\n \"paintbrush-2\": \"paintbrush-vertical\",\n palmtree: \"tree-palm\",\n \"panel-bottom-inactive\": \"panel-bottom-dashed\",\n \"panel-left-inactive\": \"panel-left-dashed\",\n \"panel-right-inactive\": \"panel-right-dashed\",\n \"panel-top-inactive\": \"panel-top-dashed\",\n \"panels-left-right\": \"columns-3\",\n \"panels-top-bottom\": \"rows-3\",\n \"parking-circle\": \"circle-parking\",\n \"parking-circle-off\": \"circle-parking-off\",\n \"parking-square\": \"square-parking\",\n \"parking-square-off\": \"square-parking-off\",\n \"pause-circle\": \"circle-pause\",\n \"pause-octagon\": \"octagon-pause\",\n \"pen-box\": \"square-pen\",\n \"pen-square\": \"square-pen\",\n \"percent-circle\": \"circle-percent\",\n \"percent-diamond\": \"diamond-percent\",\n \"percent-square\": \"square-percent\",\n \"pi-square\": \"square-pi\",\n \"pie-chart\": \"chart-pie\",\n \"pilcrow-square\": \"square-pilcrow\",\n \"play-circle\": \"circle-play\",\n \"play-square\": \"square-play\",\n \"plug-zap-2\": \"plug-zap\",\n \"plus-circle\": \"circle-plus\",\n \"plus-square\": \"square-plus\",\n \"power-circle\": \"circle-power\",\n \"power-square\": \"square-power\",\n \"rotate-3-d\": \"rotate-3d\",\n rows: \"rows-2\",\n \"scale-3-d\": \"scale-3d\",\n \"scatter-chart\": \"chart-scatter\",\n \"school-2\": \"university\",\n \"scissors-square\": \"square-scissors\",\n \"scissors-square-dashed-bottom\": \"square-bottom-dashed-scissors\",\n \"send-horizonal\": \"send-horizontal\",\n \"shield-close\": \"shield-x\",\n \"shield-question\": \"shield-question-mark\",\n sidebar: \"panel-left\",\n \"sidebar-close\": \"panel-left-close\",\n \"sidebar-open\": \"panel-left-open\",\n \"sigma-square\": \"square-sigma\",\n \"slash-square\": \"square-slash\",\n sliders: \"sliders-vertical\",\n \"sort-asc\": \"arrow-up-narrow-wide\",\n \"sort-desc\": \"arrow-down-wide-narrow\",\n \"split-square-horizontal\": \"square-split-horizontal\",\n \"split-square-vertical\": \"square-split-vertical\",\n \"square-gantt-chart\": \"square-chart-gantt\",\n stars: \"sparkles\",\n \"stop-circle\": \"circle-stop\",\n subtitles: \"captions\",\n \"table-config\": \"columns-3-cog\",\n \"terminal-square\": \"square-terminal\",\n \"test-tube-2\": \"test-tube-diagonal\",\n text: \"text-align-start\",\n \"text-select\": \"square-dashed-text\",\n \"text-selection\": \"square-dashed-text\",\n train: \"tram-front\",\n \"tv-2\": \"tv-minimal\",\n unlock: \"lock-open\",\n \"unlock-keyhole\": \"lock-keyhole-open\",\n \"upload-cloud\": \"cloud-upload\",\n \"user-2\": \"user-round\",\n \"user-check-2\": \"user-round-check\",\n \"user-circle\": \"circle-user\",\n \"user-circle-2\": \"circle-user-round\",\n \"user-cog-2\": \"user-round-cog\",\n \"user-minus-2\": \"user-round-minus\",\n \"user-plus-2\": \"user-round-plus\",\n \"user-square\": \"square-user\",\n \"user-square-2\": \"square-user-round\",\n \"user-x-2\": \"user-round-x\",\n \"users-2\": \"users-round\",\n verified: \"badge-check\",\n \"wallet-2\": \"wallet-minimal\",\n \"wand-2\": \"wand-sparkles\",\n waves: \"waves-horizontal\",\n \"wrap-text\": \"text-wrap\",\n \"x-circle\": \"circle-x\",\n \"x-octagon\": \"octagon-x\",\n \"x-square\": \"square-x\",\n};\n"],"mappings":"AAWA,IAAa,EAAsC,CAC/C,kBAAmB,kBACnB,cAAe,oBACf,cAAe,oBACf,aAAc,mBACd,eAAgB,eAChB,gBAAiB,gBACjB,iBAAkB,iBAClB,eAAgB,oBAChB,gBAAiB,qBACjB,aAAc,mBACd,cAAe,iBACf,aAAc,aACd,gBAAiB,iBACjB,gBAAiB,iBACjB,gBAAiB,iBACjB,oBAAqB,oBACrB,8BAA+B,6BAC/B,8BAA+B,6BAC/B,yBAA0B,yBAC1B,+BAAgC,8BAChC,+BAAgC,8BAChC,0BAA2B,0BAC3B,oBAAqB,oBACrB,gBAAiB,iBACjB,oBAAqB,oBACrB,oBAAqB,oBACrB,qBAAsB,qBACtB,qBAAsB,qBACtB,cAAe,eACf,cAAe,eACf,cAAe,eACf,kBAAmB,kBACnB,4BAA6B,2BAC7B,4BAA6B,2BAC7B,uBAAwB,uBACxB,6BAA8B,4BAC9B,6BAA8B,4BAC9B,wBAAyB,wBACzB,kBAAmB,kBACnB,cAAe,eACf,kBAAmB,kBACnB,WAAY,UACZ,aAAc,sBACd,YAAa,kCACb,cAAe,uBACf,cAAe,eACf,cAAe,0BACf,gBAAiB,mBACjB,uBAAwB,YACxB,2BAA4B,gBAC5B,wBAAyB,yBACzB,0BAA2B,2BAC3B,gBAAiB,cACjB,aAAc,gBACd,oBAAqB,oBACrB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