@almadar/ui 2.25.4 → 2.27.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/avl/index.cjs +43 -43
- package/dist/avl/index.js +43 -43
- package/dist/components/atoms/AnimatedGraphic.d.ts +29 -0
- package/dist/components/atoms/AnimatedReveal.d.ts +24 -0
- package/dist/components/atoms/index.d.ts +2 -0
- package/dist/components/index.cjs +2272 -1924
- package/dist/components/index.js +1410 -1064
- package/dist/components/organisms/debug/RuntimeDebugger.d.ts +2 -2
- package/dist/components/organisms/game/three/index.cjs +41 -41
- package/dist/components/organisms/game/three/index.js +41 -41
- package/dist/docs/index.cjs +142 -142
- package/dist/docs/index.js +142 -142
- package/dist/illustrations/index.cjs +17 -17
- package/dist/illustrations/index.js +17 -17
- package/dist/lib/index.cjs +62 -50
- package/dist/lib/index.js +62 -50
- package/dist/marketing/index.cjs +452 -167
- package/dist/marketing/index.d.cts +54 -1
- package/dist/marketing/index.d.ts +4 -0
- package/dist/marketing/index.js +452 -169
- package/dist/providers/index.cjs +623 -327
- package/dist/providers/index.js +535 -239
- package/dist/runtime/index.cjs +2146 -1768
- package/dist/runtime/index.js +1387 -1009
- package/package.json +1 -1
- package/tailwind-preset.cjs +30 -188
package/dist/providers/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var React112 = require('react');
|
|
4
4
|
var jsxRuntime = require('react/jsx-runtime');
|
|
5
5
|
var providers = require('@almadar/ui/providers');
|
|
6
6
|
require('react-dom');
|
|
@@ -41,7 +41,7 @@ function _interopNamespace(e) {
|
|
|
41
41
|
return Object.freeze(n);
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
-
var
|
|
44
|
+
var React112__namespace = /*#__PURE__*/_interopNamespace(React112);
|
|
45
45
|
var LucideIcons__namespace = /*#__PURE__*/_interopNamespace(LucideIcons);
|
|
46
46
|
var L__default = /*#__PURE__*/_interopDefault(L);
|
|
47
47
|
var ReactMarkdown__default = /*#__PURE__*/_interopDefault(ReactMarkdown);
|
|
@@ -153,7 +153,7 @@ var BUILT_IN_THEMES = [
|
|
|
153
153
|
hasDarkMode: true
|
|
154
154
|
}
|
|
155
155
|
];
|
|
156
|
-
var ThemeContext =
|
|
156
|
+
var ThemeContext = React112.createContext(void 0);
|
|
157
157
|
var THEME_STORAGE_KEY = "theme";
|
|
158
158
|
var MODE_STORAGE_KEY = "theme-mode";
|
|
159
159
|
function getSystemMode() {
|
|
@@ -173,14 +173,14 @@ var ThemeProvider = ({
|
|
|
173
173
|
defaultMode = "system",
|
|
174
174
|
targetRef
|
|
175
175
|
}) => {
|
|
176
|
-
const availableThemes =
|
|
176
|
+
const availableThemes = React112.useMemo(() => {
|
|
177
177
|
const themeMap = /* @__PURE__ */ new Map();
|
|
178
178
|
BUILT_IN_THEMES.forEach((t) => themeMap.set(t.name, t));
|
|
179
179
|
themes.forEach((t) => themeMap.set(t.name, t));
|
|
180
180
|
return Array.from(themeMap.values());
|
|
181
181
|
}, [themes]);
|
|
182
182
|
const isScoped = !!targetRef;
|
|
183
|
-
const [theme, setThemeState] =
|
|
183
|
+
const [theme, setThemeState] = React112.useState(() => {
|
|
184
184
|
if (isScoped || typeof window === "undefined") return defaultTheme;
|
|
185
185
|
const stored = localStorage.getItem(THEME_STORAGE_KEY);
|
|
186
186
|
const validThemes = [
|
|
@@ -192,7 +192,7 @@ var ThemeProvider = ({
|
|
|
192
192
|
}
|
|
193
193
|
return defaultTheme;
|
|
194
194
|
});
|
|
195
|
-
const [mode, setModeState] =
|
|
195
|
+
const [mode, setModeState] = React112.useState(() => {
|
|
196
196
|
if (isScoped || typeof window === "undefined") return defaultMode;
|
|
197
197
|
const stored = localStorage.getItem(MODE_STORAGE_KEY);
|
|
198
198
|
if (stored === "light" || stored === "dark" || stored === "system") {
|
|
@@ -200,14 +200,14 @@ var ThemeProvider = ({
|
|
|
200
200
|
}
|
|
201
201
|
return defaultMode;
|
|
202
202
|
});
|
|
203
|
-
const [resolvedMode, setResolvedMode] =
|
|
203
|
+
const [resolvedMode, setResolvedMode] = React112.useState(
|
|
204
204
|
() => resolveMode(mode)
|
|
205
205
|
);
|
|
206
|
-
const appliedTheme =
|
|
206
|
+
const appliedTheme = React112.useMemo(
|
|
207
207
|
() => `${theme}-${resolvedMode}`,
|
|
208
208
|
[theme, resolvedMode]
|
|
209
209
|
);
|
|
210
|
-
|
|
210
|
+
React112.useEffect(() => {
|
|
211
211
|
const updateResolved = () => {
|
|
212
212
|
setResolvedMode(resolveMode(mode));
|
|
213
213
|
};
|
|
@@ -220,7 +220,7 @@ var ThemeProvider = ({
|
|
|
220
220
|
}
|
|
221
221
|
return void 0;
|
|
222
222
|
}, [mode]);
|
|
223
|
-
|
|
223
|
+
React112.useEffect(() => {
|
|
224
224
|
if (isScoped) {
|
|
225
225
|
if (targetRef?.current) {
|
|
226
226
|
targetRef.current.setAttribute("data-theme", appliedTheme);
|
|
@@ -234,7 +234,7 @@ var ThemeProvider = ({
|
|
|
234
234
|
root.classList.remove("light", "dark");
|
|
235
235
|
root.classList.add(resolvedMode);
|
|
236
236
|
}, [appliedTheme, resolvedMode, targetRef, isScoped]);
|
|
237
|
-
const setTheme =
|
|
237
|
+
const setTheme = React112.useCallback(
|
|
238
238
|
(newTheme) => {
|
|
239
239
|
const validTheme = availableThemes.find((t) => t.name === newTheme);
|
|
240
240
|
if (validTheme) {
|
|
@@ -250,17 +250,17 @@ var ThemeProvider = ({
|
|
|
250
250
|
},
|
|
251
251
|
[availableThemes]
|
|
252
252
|
);
|
|
253
|
-
const setMode =
|
|
253
|
+
const setMode = React112.useCallback((newMode) => {
|
|
254
254
|
setModeState(newMode);
|
|
255
255
|
if (!isScoped && typeof window !== "undefined") {
|
|
256
256
|
localStorage.setItem(MODE_STORAGE_KEY, newMode);
|
|
257
257
|
}
|
|
258
258
|
}, []);
|
|
259
|
-
const toggleMode =
|
|
259
|
+
const toggleMode = React112.useCallback(() => {
|
|
260
260
|
const newMode = resolvedMode === "dark" ? "light" : "dark";
|
|
261
261
|
setMode(newMode);
|
|
262
262
|
}, [resolvedMode, setMode]);
|
|
263
|
-
const contextValue =
|
|
263
|
+
const contextValue = React112.useMemo(
|
|
264
264
|
() => ({
|
|
265
265
|
theme,
|
|
266
266
|
mode,
|
|
@@ -356,15 +356,15 @@ var fallbackEventBus = {
|
|
|
356
356
|
}
|
|
357
357
|
};
|
|
358
358
|
function useEventBus() {
|
|
359
|
-
const context =
|
|
359
|
+
const context = React112.useContext(providers.EventBusContext);
|
|
360
360
|
return context ?? getGlobalEventBus() ?? fallbackEventBus;
|
|
361
361
|
}
|
|
362
|
-
var EventBusContext2 =
|
|
362
|
+
var EventBusContext2 = React112.createContext(null);
|
|
363
363
|
function EventBusProvider({ children, debug: debug2 = false }) {
|
|
364
|
-
const listenersRef =
|
|
365
|
-
const anyListenersRef =
|
|
366
|
-
const deprecationWarningShown =
|
|
367
|
-
const getSelectedEntity =
|
|
364
|
+
const listenersRef = React112.useRef(/* @__PURE__ */ new Map());
|
|
365
|
+
const anyListenersRef = React112.useRef(/* @__PURE__ */ new Set());
|
|
366
|
+
const deprecationWarningShown = React112.useRef(false);
|
|
367
|
+
const getSelectedEntity = React112.useCallback(() => {
|
|
368
368
|
if (!deprecationWarningShown.current) {
|
|
369
369
|
console.warn(
|
|
370
370
|
"[EventBus] getSelectedEntity is deprecated. Use SelectionProvider and useSelection hook instead. See SelectionProvider.tsx for migration guide."
|
|
@@ -373,7 +373,7 @@ function EventBusProvider({ children, debug: debug2 = false }) {
|
|
|
373
373
|
}
|
|
374
374
|
return null;
|
|
375
375
|
}, []);
|
|
376
|
-
const clearSelectedEntity =
|
|
376
|
+
const clearSelectedEntity = React112.useCallback(() => {
|
|
377
377
|
if (!deprecationWarningShown.current) {
|
|
378
378
|
console.warn(
|
|
379
379
|
"[EventBus] clearSelectedEntity is deprecated. Use SelectionProvider and useSelection hook instead. See SelectionProvider.tsx for migration guide."
|
|
@@ -381,14 +381,14 @@ function EventBusProvider({ children, debug: debug2 = false }) {
|
|
|
381
381
|
deprecationWarningShown.current = true;
|
|
382
382
|
}
|
|
383
383
|
}, []);
|
|
384
|
-
const emit =
|
|
384
|
+
const emit = React112.useCallback((type, payload) => {
|
|
385
385
|
const event = {
|
|
386
386
|
type,
|
|
387
387
|
payload,
|
|
388
388
|
timestamp: Date.now()
|
|
389
389
|
};
|
|
390
|
-
const
|
|
391
|
-
const listenerCount =
|
|
390
|
+
const listeners6 = listenersRef.current.get(type);
|
|
391
|
+
const listenerCount = listeners6?.size ?? 0;
|
|
392
392
|
if (debug2) {
|
|
393
393
|
if (listenerCount > 0) {
|
|
394
394
|
console.log(`[EventBus] Emit: ${type} \u2192 ${listenerCount} listener(s)`, payload);
|
|
@@ -396,8 +396,8 @@ function EventBusProvider({ children, debug: debug2 = false }) {
|
|
|
396
396
|
console.warn(`[EventBus] Emit: ${type} (NO LISTENERS - event may be lost!)`, payload);
|
|
397
397
|
}
|
|
398
398
|
}
|
|
399
|
-
if (
|
|
400
|
-
const listenersCopy = Array.from(
|
|
399
|
+
if (listeners6) {
|
|
400
|
+
const listenersCopy = Array.from(listeners6);
|
|
401
401
|
for (const listener of listenersCopy) {
|
|
402
402
|
try {
|
|
403
403
|
listener(event);
|
|
@@ -415,37 +415,37 @@ function EventBusProvider({ children, debug: debug2 = false }) {
|
|
|
415
415
|
}
|
|
416
416
|
}
|
|
417
417
|
}, [debug2]);
|
|
418
|
-
const on =
|
|
418
|
+
const on = React112.useCallback((type, listener) => {
|
|
419
419
|
if (!listenersRef.current.has(type)) {
|
|
420
420
|
listenersRef.current.set(type, /* @__PURE__ */ new Set());
|
|
421
421
|
}
|
|
422
|
-
const
|
|
423
|
-
|
|
422
|
+
const listeners6 = listenersRef.current.get(type);
|
|
423
|
+
listeners6.add(listener);
|
|
424
424
|
if (debug2) {
|
|
425
|
-
console.log(`[EventBus] Subscribed to '${type}', total: ${
|
|
425
|
+
console.log(`[EventBus] Subscribed to '${type}', total: ${listeners6.size}`);
|
|
426
426
|
}
|
|
427
427
|
return () => {
|
|
428
|
-
|
|
428
|
+
listeners6.delete(listener);
|
|
429
429
|
if (debug2) {
|
|
430
|
-
console.log(`[EventBus] Unsubscribed from '${type}', remaining: ${
|
|
430
|
+
console.log(`[EventBus] Unsubscribed from '${type}', remaining: ${listeners6.size}`);
|
|
431
431
|
}
|
|
432
|
-
if (
|
|
432
|
+
if (listeners6.size === 0) {
|
|
433
433
|
listenersRef.current.delete(type);
|
|
434
434
|
}
|
|
435
435
|
};
|
|
436
436
|
}, [debug2]);
|
|
437
|
-
const once =
|
|
437
|
+
const once = React112.useCallback((type, listener) => {
|
|
438
438
|
const wrappedListener = (event) => {
|
|
439
439
|
listenersRef.current.get(type)?.delete(wrappedListener);
|
|
440
440
|
listener(event);
|
|
441
441
|
};
|
|
442
442
|
return on(type, wrappedListener);
|
|
443
443
|
}, [on]);
|
|
444
|
-
const hasListeners =
|
|
445
|
-
const
|
|
446
|
-
return
|
|
444
|
+
const hasListeners = React112.useCallback((type) => {
|
|
445
|
+
const listeners6 = listenersRef.current.get(type);
|
|
446
|
+
return listeners6 !== void 0 && listeners6.size > 0;
|
|
447
447
|
}, []);
|
|
448
|
-
const onAny =
|
|
448
|
+
const onAny = React112.useCallback((listener) => {
|
|
449
449
|
anyListenersRef.current.add(listener);
|
|
450
450
|
if (debug2) {
|
|
451
451
|
console.log(`[EventBus] onAny subscribed, total: ${anyListenersRef.current.size}`);
|
|
@@ -457,7 +457,7 @@ function EventBusProvider({ children, debug: debug2 = false }) {
|
|
|
457
457
|
}
|
|
458
458
|
};
|
|
459
459
|
}, [debug2]);
|
|
460
|
-
const contextValue =
|
|
460
|
+
const contextValue = React112.useMemo(
|
|
461
461
|
() => ({
|
|
462
462
|
emit,
|
|
463
463
|
on,
|
|
@@ -469,7 +469,7 @@ function EventBusProvider({ children, debug: debug2 = false }) {
|
|
|
469
469
|
}),
|
|
470
470
|
[emit, on, once, hasListeners, onAny, getSelectedEntity, clearSelectedEntity]
|
|
471
471
|
);
|
|
472
|
-
|
|
472
|
+
React112.useEffect(() => {
|
|
473
473
|
setGlobalEventBus(contextValue);
|
|
474
474
|
return () => {
|
|
475
475
|
setGlobalEventBus(null);
|
|
@@ -477,7 +477,7 @@ function EventBusProvider({ children, debug: debug2 = false }) {
|
|
|
477
477
|
}, [contextValue]);
|
|
478
478
|
return /* @__PURE__ */ jsxRuntime.jsx(EventBusContext2.Provider, { value: contextValue, children });
|
|
479
479
|
}
|
|
480
|
-
var SelectionContext =
|
|
480
|
+
var SelectionContext = React112.createContext(null);
|
|
481
481
|
var defaultCompareEntities = (a, b) => {
|
|
482
482
|
if (a === b) return true;
|
|
483
483
|
if (!a || !b) return false;
|
|
@@ -494,8 +494,8 @@ function SelectionProvider({
|
|
|
494
494
|
compareEntities = defaultCompareEntities
|
|
495
495
|
}) {
|
|
496
496
|
const eventBus = useEventBus();
|
|
497
|
-
const [selected, setSelectedState] =
|
|
498
|
-
const setSelected =
|
|
497
|
+
const [selected, setSelectedState] = React112.useState(null);
|
|
498
|
+
const setSelected = React112.useCallback(
|
|
499
499
|
(entity) => {
|
|
500
500
|
setSelectedState(entity);
|
|
501
501
|
if (debug2) {
|
|
@@ -504,19 +504,19 @@ function SelectionProvider({
|
|
|
504
504
|
},
|
|
505
505
|
[debug2]
|
|
506
506
|
);
|
|
507
|
-
const clearSelection =
|
|
507
|
+
const clearSelection = React112.useCallback(() => {
|
|
508
508
|
setSelectedState(null);
|
|
509
509
|
if (debug2) {
|
|
510
510
|
console.log("[SelectionProvider] Selection cleared");
|
|
511
511
|
}
|
|
512
512
|
}, [debug2]);
|
|
513
|
-
const isSelected =
|
|
513
|
+
const isSelected = React112.useCallback(
|
|
514
514
|
(entity) => {
|
|
515
515
|
return compareEntities(selected, entity);
|
|
516
516
|
},
|
|
517
517
|
[selected, compareEntities]
|
|
518
518
|
);
|
|
519
|
-
|
|
519
|
+
React112.useEffect(() => {
|
|
520
520
|
const handleSelect = (event) => {
|
|
521
521
|
const row = event.payload?.row;
|
|
522
522
|
if (row) {
|
|
@@ -554,14 +554,14 @@ function SelectionProvider({
|
|
|
554
554
|
return /* @__PURE__ */ jsxRuntime.jsx(SelectionContext.Provider, { value: contextValue, children });
|
|
555
555
|
}
|
|
556
556
|
function useSelection() {
|
|
557
|
-
const context =
|
|
557
|
+
const context = React112.useContext(SelectionContext);
|
|
558
558
|
if (!context) {
|
|
559
559
|
throw new Error("useSelection must be used within a SelectionProvider");
|
|
560
560
|
}
|
|
561
561
|
return context;
|
|
562
562
|
}
|
|
563
563
|
function useSelectionOptional() {
|
|
564
|
-
const context =
|
|
564
|
+
const context = React112.useContext(SelectionContext);
|
|
565
565
|
return context;
|
|
566
566
|
}
|
|
567
567
|
function cn(...inputs) {
|
|
@@ -661,28 +661,28 @@ var marginYStyles = {
|
|
|
661
661
|
};
|
|
662
662
|
var bgStyles = {
|
|
663
663
|
transparent: "bg-transparent",
|
|
664
|
-
primary: "bg-
|
|
665
|
-
secondary: "bg-
|
|
666
|
-
muted: "bg-
|
|
667
|
-
accent: "bg-
|
|
668
|
-
surface: "bg-
|
|
669
|
-
overlay: "bg-
|
|
664
|
+
primary: "bg-primary text-primary-foreground",
|
|
665
|
+
secondary: "bg-secondary text-secondary-foreground",
|
|
666
|
+
muted: "bg-muted text-foreground",
|
|
667
|
+
accent: "bg-accent text-accent-foreground",
|
|
668
|
+
surface: "bg-card",
|
|
669
|
+
overlay: "bg-card/80 backdrop-blur-sm"
|
|
670
670
|
};
|
|
671
671
|
var roundedStyles = {
|
|
672
672
|
none: "rounded-none",
|
|
673
|
-
sm: "rounded-
|
|
674
|
-
md: "rounded-
|
|
675
|
-
lg: "rounded-
|
|
676
|
-
xl: "rounded-
|
|
677
|
-
"2xl": "rounded-
|
|
678
|
-
full: "rounded-
|
|
673
|
+
sm: "rounded-sm",
|
|
674
|
+
md: "rounded-md",
|
|
675
|
+
lg: "rounded-lg",
|
|
676
|
+
xl: "rounded-xl",
|
|
677
|
+
"2xl": "rounded-xl",
|
|
678
|
+
full: "rounded-full"
|
|
679
679
|
};
|
|
680
680
|
var shadowStyles = {
|
|
681
681
|
none: "shadow-none",
|
|
682
|
-
sm: "shadow-
|
|
683
|
-
md: "shadow
|
|
684
|
-
lg: "shadow-
|
|
685
|
-
xl: "shadow-
|
|
682
|
+
sm: "shadow-sm",
|
|
683
|
+
md: "shadow",
|
|
684
|
+
lg: "shadow-lg",
|
|
685
|
+
xl: "shadow-lg"
|
|
686
686
|
};
|
|
687
687
|
var displayStyles = {
|
|
688
688
|
block: "block",
|
|
@@ -704,7 +704,7 @@ var positionStyles = {
|
|
|
704
704
|
fixed: "fixed",
|
|
705
705
|
sticky: "sticky"
|
|
706
706
|
};
|
|
707
|
-
var Box =
|
|
707
|
+
var Box = React112__namespace.default.forwardRef(
|
|
708
708
|
({
|
|
709
709
|
padding,
|
|
710
710
|
paddingX,
|
|
@@ -733,20 +733,20 @@ var Box = React110__namespace.default.forwardRef(
|
|
|
733
733
|
...rest
|
|
734
734
|
}, ref) => {
|
|
735
735
|
const eventBus = useEventBus();
|
|
736
|
-
const handleClick =
|
|
736
|
+
const handleClick = React112.useCallback((e) => {
|
|
737
737
|
if (action) {
|
|
738
738
|
e.stopPropagation();
|
|
739
739
|
eventBus.emit(`UI:${action}`, actionPayload ?? {});
|
|
740
740
|
}
|
|
741
741
|
onClick?.(e);
|
|
742
742
|
}, [action, actionPayload, eventBus, onClick]);
|
|
743
|
-
const handleMouseEnter =
|
|
743
|
+
const handleMouseEnter = React112.useCallback((e) => {
|
|
744
744
|
if (hoverEvent) {
|
|
745
745
|
eventBus.emit(`UI:${hoverEvent}`, { hovered: true });
|
|
746
746
|
}
|
|
747
747
|
onMouseEnter?.(e);
|
|
748
748
|
}, [hoverEvent, eventBus, onMouseEnter]);
|
|
749
|
-
const handleMouseLeave =
|
|
749
|
+
const handleMouseLeave = React112.useCallback((e) => {
|
|
750
750
|
if (hoverEvent) {
|
|
751
751
|
eventBus.emit(`UI:${hoverEvent}`, { hovered: false });
|
|
752
752
|
}
|
|
@@ -770,7 +770,7 @@ var Box = React110__namespace.default.forwardRef(
|
|
|
770
770
|
// Background
|
|
771
771
|
bgStyles[bg],
|
|
772
772
|
// Border - uses theme variables
|
|
773
|
-
border && "border-[length:var(--border-width)] border-
|
|
773
|
+
border && "border-[length:var(--border-width)] border-border",
|
|
774
774
|
// Rounded
|
|
775
775
|
roundedStyles[rounded],
|
|
776
776
|
// Shadow
|
|
@@ -799,30 +799,30 @@ var Box = React110__namespace.default.forwardRef(
|
|
|
799
799
|
);
|
|
800
800
|
Box.displayName = "Box";
|
|
801
801
|
var variantStyles = {
|
|
802
|
-
h1: "text-4xl font-bold tracking-tight text-
|
|
803
|
-
h2: "text-3xl font-bold tracking-tight text-
|
|
804
|
-
h3: "text-2xl font-bold text-
|
|
805
|
-
h4: "text-xl font-bold text-
|
|
806
|
-
h5: "text-lg font-bold text-
|
|
807
|
-
h6: "text-base font-bold text-
|
|
808
|
-
heading: "text-2xl font-bold text-
|
|
809
|
-
subheading: "text-lg font-semibold text-
|
|
810
|
-
body1: "text-base font-normal text-
|
|
811
|
-
body2: "text-sm font-normal text-
|
|
812
|
-
body: "text-base font-normal text-
|
|
813
|
-
caption: "text-xs font-normal text-
|
|
814
|
-
overline: "text-xs uppercase tracking-wide font-bold text-
|
|
815
|
-
small: "text-sm font-normal text-
|
|
816
|
-
large: "text-lg font-medium text-
|
|
817
|
-
label: "text-sm font-medium text-
|
|
802
|
+
h1: "text-4xl font-bold tracking-tight text-foreground",
|
|
803
|
+
h2: "text-3xl font-bold tracking-tight text-foreground",
|
|
804
|
+
h3: "text-2xl font-bold text-foreground",
|
|
805
|
+
h4: "text-xl font-bold text-foreground",
|
|
806
|
+
h5: "text-lg font-bold text-foreground",
|
|
807
|
+
h6: "text-base font-bold text-foreground",
|
|
808
|
+
heading: "text-2xl font-bold text-foreground",
|
|
809
|
+
subheading: "text-lg font-semibold text-foreground",
|
|
810
|
+
body1: "text-base font-normal text-foreground",
|
|
811
|
+
body2: "text-sm font-normal text-foreground",
|
|
812
|
+
body: "text-base font-normal text-foreground",
|
|
813
|
+
caption: "text-xs font-normal text-muted-foreground",
|
|
814
|
+
overline: "text-xs uppercase tracking-wide font-bold text-muted-foreground",
|
|
815
|
+
small: "text-sm font-normal text-foreground",
|
|
816
|
+
large: "text-lg font-medium text-foreground",
|
|
817
|
+
label: "text-sm font-medium text-foreground"
|
|
818
818
|
};
|
|
819
819
|
var colorStyles = {
|
|
820
|
-
primary: "text-
|
|
821
|
-
secondary: "text-
|
|
822
|
-
muted: "text-
|
|
823
|
-
error: "text-
|
|
824
|
-
success: "text-
|
|
825
|
-
warning: "text-
|
|
820
|
+
primary: "text-foreground",
|
|
821
|
+
secondary: "text-muted-foreground",
|
|
822
|
+
muted: "text-muted-foreground",
|
|
823
|
+
error: "text-error",
|
|
824
|
+
success: "text-success",
|
|
825
|
+
warning: "text-warning",
|
|
826
826
|
inherit: "text-inherit"
|
|
827
827
|
};
|
|
828
828
|
var weightStyles = {
|
|
@@ -907,49 +907,49 @@ var Typography = ({
|
|
|
907
907
|
Typography.displayName = "Typography";
|
|
908
908
|
var variantStyles2 = {
|
|
909
909
|
primary: [
|
|
910
|
-
"bg-
|
|
910
|
+
"bg-primary text-primary-foreground",
|
|
911
911
|
"border-none",
|
|
912
|
-
"shadow-
|
|
913
|
-
"hover:bg-
|
|
914
|
-
"active:scale-[var(--active-scale)] active:shadow-
|
|
912
|
+
"shadow-sm",
|
|
913
|
+
"hover:bg-primary-hover hover:shadow-lg",
|
|
914
|
+
"active:scale-[var(--active-scale)] active:shadow-sm"
|
|
915
915
|
].join(" "),
|
|
916
916
|
secondary: [
|
|
917
|
-
"bg-transparent text-
|
|
918
|
-
"border border-
|
|
919
|
-
"hover:bg-
|
|
917
|
+
"bg-transparent text-accent",
|
|
918
|
+
"border border-accent",
|
|
919
|
+
"hover:bg-accent hover:text-white hover:border-accent",
|
|
920
920
|
"active:scale-[var(--active-scale)]"
|
|
921
921
|
].join(" "),
|
|
922
922
|
ghost: [
|
|
923
|
-
"bg-transparent text-
|
|
924
|
-
"hover:text-
|
|
923
|
+
"bg-transparent text-muted-foreground",
|
|
924
|
+
"hover:text-foreground hover:bg-muted",
|
|
925
925
|
"active:scale-[var(--active-scale)]"
|
|
926
926
|
].join(" "),
|
|
927
927
|
danger: [
|
|
928
|
-
"bg-
|
|
929
|
-
"border-[length:var(--border-width)] border-
|
|
930
|
-
"shadow-
|
|
931
|
-
"hover:bg-
|
|
932
|
-
"active:scale-[var(--active-scale)] active:shadow-
|
|
928
|
+
"bg-surface text-error",
|
|
929
|
+
"border-[length:var(--border-width)] border-error",
|
|
930
|
+
"shadow-sm",
|
|
931
|
+
"hover:bg-error hover:text-error-foreground hover:shadow-lg",
|
|
932
|
+
"active:scale-[var(--active-scale)] active:shadow-sm"
|
|
933
933
|
].join(" "),
|
|
934
934
|
success: [
|
|
935
|
-
"bg-
|
|
936
|
-
"border-[length:var(--border-width)] border-
|
|
937
|
-
"shadow-
|
|
938
|
-
"hover:bg-
|
|
939
|
-
"active:scale-[var(--active-scale)] active:shadow-
|
|
935
|
+
"bg-surface text-success",
|
|
936
|
+
"border-[length:var(--border-width)] border-success",
|
|
937
|
+
"shadow-sm",
|
|
938
|
+
"hover:bg-success hover:text-success-foreground hover:shadow-lg",
|
|
939
|
+
"active:scale-[var(--active-scale)] active:shadow-sm"
|
|
940
940
|
].join(" "),
|
|
941
941
|
warning: [
|
|
942
|
-
"bg-
|
|
943
|
-
"border-[length:var(--border-width)] border-
|
|
944
|
-
"shadow-
|
|
945
|
-
"hover:bg-
|
|
946
|
-
"active:scale-[var(--active-scale)] active:shadow-
|
|
942
|
+
"bg-surface text-warning",
|
|
943
|
+
"border-[length:var(--border-width)] border-warning",
|
|
944
|
+
"shadow-sm",
|
|
945
|
+
"hover:bg-warning hover:text-warning-foreground hover:shadow-lg",
|
|
946
|
+
"active:scale-[var(--active-scale)] active:shadow-sm"
|
|
947
947
|
].join(" "),
|
|
948
948
|
// "default" is an alias for secondary
|
|
949
949
|
default: [
|
|
950
|
-
"bg-
|
|
951
|
-
"border-[length:var(--border-width-thin)] border-
|
|
952
|
-
"hover:bg-
|
|
950
|
+
"bg-secondary text-secondary-foreground",
|
|
951
|
+
"border-[length:var(--border-width-thin)] border-border",
|
|
952
|
+
"hover:bg-secondary-hover",
|
|
953
953
|
"active:scale-[var(--active-scale)]"
|
|
954
954
|
].join(" ")
|
|
955
955
|
};
|
|
@@ -974,7 +974,7 @@ function resolveIconProp(value, sizeClass) {
|
|
|
974
974
|
const IconComp = value;
|
|
975
975
|
return /* @__PURE__ */ jsxRuntime.jsx(IconComp, { className: sizeClass });
|
|
976
976
|
}
|
|
977
|
-
if (
|
|
977
|
+
if (React112__namespace.default.isValidElement(value)) {
|
|
978
978
|
return value;
|
|
979
979
|
}
|
|
980
980
|
if (typeof value === "object" && value !== null && "render" in value) {
|
|
@@ -983,7 +983,7 @@ function resolveIconProp(value, sizeClass) {
|
|
|
983
983
|
}
|
|
984
984
|
return value;
|
|
985
985
|
}
|
|
986
|
-
var Button =
|
|
986
|
+
var Button = React112__namespace.default.forwardRef(
|
|
987
987
|
({
|
|
988
988
|
className,
|
|
989
989
|
variant = "primary",
|
|
@@ -1020,10 +1020,10 @@ var Button = React110__namespace.default.forwardRef(
|
|
|
1020
1020
|
className: cn(
|
|
1021
1021
|
"inline-flex items-center justify-center gap-2",
|
|
1022
1022
|
"font-[var(--font-weight-medium)]",
|
|
1023
|
-
"rounded-
|
|
1023
|
+
"rounded-sm",
|
|
1024
1024
|
"cursor-pointer",
|
|
1025
1025
|
"transition-all duration-[var(--transition-normal)]",
|
|
1026
|
-
"focus:outline-none focus:ring-[length:var(--focus-ring-width)] focus:ring-
|
|
1026
|
+
"focus:outline-none focus:ring-[length:var(--focus-ring-width)] focus:ring-ring focus:ring-offset-[length:var(--focus-ring-offset)]",
|
|
1027
1027
|
"disabled:opacity-50 disabled:cursor-not-allowed",
|
|
1028
1028
|
variantStyles2[variant],
|
|
1029
1029
|
sizeStyles2[size],
|
|
@@ -1044,34 +1044,34 @@ var Button = React110__namespace.default.forwardRef(
|
|
|
1044
1044
|
Button.displayName = "Button";
|
|
1045
1045
|
var variantStyles3 = {
|
|
1046
1046
|
default: [
|
|
1047
|
-
"bg-
|
|
1048
|
-
"border-[length:var(--border-width-thin)] border-
|
|
1047
|
+
"bg-muted text-foreground",
|
|
1048
|
+
"border-[length:var(--border-width-thin)] border-border"
|
|
1049
1049
|
].join(" "),
|
|
1050
|
-
primary: "bg-
|
|
1051
|
-
secondary: "bg-
|
|
1050
|
+
primary: "bg-primary text-primary-foreground",
|
|
1051
|
+
secondary: "bg-secondary text-secondary-foreground",
|
|
1052
1052
|
success: [
|
|
1053
|
-
"bg-
|
|
1054
|
-
"border-[length:var(--border-width)] border-
|
|
1053
|
+
"bg-surface text-success",
|
|
1054
|
+
"border-[length:var(--border-width)] border-success"
|
|
1055
1055
|
].join(" "),
|
|
1056
1056
|
warning: [
|
|
1057
|
-
"bg-
|
|
1058
|
-
"border-[length:var(--border-width)] border-
|
|
1057
|
+
"bg-surface text-warning",
|
|
1058
|
+
"border-[length:var(--border-width)] border-warning"
|
|
1059
1059
|
].join(" "),
|
|
1060
1060
|
danger: [
|
|
1061
|
-
"bg-
|
|
1062
|
-
"border-[length:var(--border-width)] border-
|
|
1061
|
+
"bg-surface text-error",
|
|
1062
|
+
"border-[length:var(--border-width)] border-error"
|
|
1063
1063
|
].join(" "),
|
|
1064
1064
|
error: [
|
|
1065
|
-
"bg-
|
|
1066
|
-
"border-[length:var(--border-width)] border-
|
|
1065
|
+
"bg-surface text-error",
|
|
1066
|
+
"border-[length:var(--border-width)] border-error"
|
|
1067
1067
|
].join(" "),
|
|
1068
1068
|
info: [
|
|
1069
|
-
"bg-
|
|
1070
|
-
"border-[length:var(--border-width)] border-
|
|
1069
|
+
"bg-surface text-info",
|
|
1070
|
+
"border-[length:var(--border-width)] border-info"
|
|
1071
1071
|
].join(" "),
|
|
1072
1072
|
neutral: [
|
|
1073
|
-
"bg-
|
|
1074
|
-
"border-[length:var(--border-width-thin)] border-
|
|
1073
|
+
"bg-muted text-muted-foreground",
|
|
1074
|
+
"border-[length:var(--border-width-thin)] border-border"
|
|
1075
1075
|
].join(" ")
|
|
1076
1076
|
};
|
|
1077
1077
|
var sizeStyles3 = {
|
|
@@ -1079,7 +1079,7 @@ var sizeStyles3 = {
|
|
|
1079
1079
|
md: "px-2.5 py-1 text-sm",
|
|
1080
1080
|
lg: "px-3 py-1.5 text-base"
|
|
1081
1081
|
};
|
|
1082
|
-
var Badge =
|
|
1082
|
+
var Badge = React112__namespace.default.forwardRef(
|
|
1083
1083
|
({ className, variant = "default", size = "sm", amount, label, icon, children, ...props }, ref) => {
|
|
1084
1084
|
const iconSizes2 = { sm: "w-3 h-3", md: "w-3.5 h-3.5", lg: "w-4 h-4" };
|
|
1085
1085
|
const resolvedIcon = typeof icon === "string" ? (() => {
|
|
@@ -1091,7 +1091,7 @@ var Badge = React110__namespace.default.forwardRef(
|
|
|
1091
1091
|
{
|
|
1092
1092
|
ref,
|
|
1093
1093
|
className: cn(
|
|
1094
|
-
"inline-flex items-center gap-1 font-bold rounded-
|
|
1094
|
+
"inline-flex items-center gap-1 font-bold rounded-sm",
|
|
1095
1095
|
variantStyles3[variant],
|
|
1096
1096
|
sizeStyles3[size],
|
|
1097
1097
|
className
|
|
@@ -1106,7 +1106,7 @@ var Badge = React110__namespace.default.forwardRef(
|
|
|
1106
1106
|
}
|
|
1107
1107
|
);
|
|
1108
1108
|
Badge.displayName = "Badge";
|
|
1109
|
-
var Input =
|
|
1109
|
+
var Input = React112__namespace.default.forwardRef(
|
|
1110
1110
|
({
|
|
1111
1111
|
className,
|
|
1112
1112
|
inputType,
|
|
@@ -1127,21 +1127,21 @@ var Input = React110__namespace.default.forwardRef(
|
|
|
1127
1127
|
const resolvedLeftIcon = leftIcon || IconComponent && /* @__PURE__ */ jsxRuntime.jsx(IconComponent, { className: "h-4 w-4" });
|
|
1128
1128
|
const showClearButton = clearable && value && String(value).length > 0;
|
|
1129
1129
|
const baseClassName = cn(
|
|
1130
|
-
"block w-full rounded-
|
|
1131
|
-
"border-[length:var(--border-width-thin)] border-
|
|
1130
|
+
"block w-full rounded-sm transition-all duration-[var(--transition-fast)]",
|
|
1131
|
+
"border-[length:var(--border-width-thin)] border-border",
|
|
1132
1132
|
"px-3 py-2 text-sm",
|
|
1133
|
-
"bg-
|
|
1134
|
-
"text-
|
|
1135
|
-
"focus:outline-none focus:ring-1 focus:ring-
|
|
1136
|
-
"disabled:opacity-50 disabled:cursor-not-allowed disabled:bg-
|
|
1137
|
-
error ? "border-
|
|
1133
|
+
"bg-card hover:bg-muted focus:bg-card",
|
|
1134
|
+
"text-foreground placeholder:text-muted-foreground",
|
|
1135
|
+
"focus:outline-none focus:ring-1 focus:ring-ring focus:border-ring",
|
|
1136
|
+
"disabled:opacity-50 disabled:cursor-not-allowed disabled:bg-muted",
|
|
1137
|
+
error ? "border-error focus:border-error focus:ring-error" : "",
|
|
1138
1138
|
resolvedLeftIcon && "pl-10",
|
|
1139
1139
|
(rightIcon || showClearButton) && "pr-10",
|
|
1140
1140
|
className
|
|
1141
1141
|
);
|
|
1142
1142
|
if (type === "select") {
|
|
1143
1143
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative", children: [
|
|
1144
|
-
resolvedLeftIcon && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none text-
|
|
1144
|
+
resolvedLeftIcon && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none text-muted-foreground", children: resolvedLeftIcon }),
|
|
1145
1145
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1146
1146
|
"select",
|
|
1147
1147
|
{
|
|
@@ -1156,7 +1156,7 @@ var Input = React110__namespace.default.forwardRef(
|
|
|
1156
1156
|
]
|
|
1157
1157
|
}
|
|
1158
1158
|
),
|
|
1159
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-y-0 right-0 pr-3 flex items-center pointer-events-none text-
|
|
1159
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-y-0 right-0 pr-3 flex items-center pointer-events-none text-muted-foreground", children: /* @__PURE__ */ jsxRuntime.jsx(LucideIcons.ChevronDown, { className: "h-4 w-4" }) })
|
|
1160
1160
|
] });
|
|
1161
1161
|
}
|
|
1162
1162
|
if (type === "textarea") {
|
|
@@ -1181,9 +1181,9 @@ var Input = React110__namespace.default.forwardRef(
|
|
|
1181
1181
|
checked: props.checked,
|
|
1182
1182
|
onChange,
|
|
1183
1183
|
className: cn(
|
|
1184
|
-
"h-4 w-4 rounded-
|
|
1185
|
-
"border-
|
|
1186
|
-
"text-
|
|
1184
|
+
"h-4 w-4 rounded-sm",
|
|
1185
|
+
"border-border",
|
|
1186
|
+
"text-primary focus:ring-ring",
|
|
1187
1187
|
"disabled:opacity-50 disabled:cursor-not-allowed",
|
|
1188
1188
|
className
|
|
1189
1189
|
),
|
|
@@ -1192,7 +1192,7 @@ var Input = React110__namespace.default.forwardRef(
|
|
|
1192
1192
|
);
|
|
1193
1193
|
}
|
|
1194
1194
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative", children: [
|
|
1195
|
-
resolvedLeftIcon && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none text-
|
|
1195
|
+
resolvedLeftIcon && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none text-muted-foreground", children: resolvedLeftIcon }),
|
|
1196
1196
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1197
1197
|
"input",
|
|
1198
1198
|
{
|
|
@@ -1209,50 +1209,50 @@ var Input = React110__namespace.default.forwardRef(
|
|
|
1209
1209
|
{
|
|
1210
1210
|
type: "button",
|
|
1211
1211
|
onClick: onClear,
|
|
1212
|
-
className: "absolute inset-y-0 right-0 pr-3 flex items-center text-
|
|
1212
|
+
className: "absolute inset-y-0 right-0 pr-3 flex items-center text-muted-foreground hover:text-foreground",
|
|
1213
1213
|
children: /* @__PURE__ */ jsxRuntime.jsx(LucideIcons.X, { className: "h-4 w-4" })
|
|
1214
1214
|
}
|
|
1215
1215
|
),
|
|
1216
|
-
rightIcon && !showClearButton && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-y-0 right-0 pr-3 flex items-center text-
|
|
1216
|
+
rightIcon && !showClearButton && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-y-0 right-0 pr-3 flex items-center text-muted-foreground", children: rightIcon })
|
|
1217
1217
|
] });
|
|
1218
1218
|
}
|
|
1219
1219
|
);
|
|
1220
1220
|
Input.displayName = "Input";
|
|
1221
|
-
var Label =
|
|
1221
|
+
var Label = React112__namespace.default.forwardRef(
|
|
1222
1222
|
({ className, required, children, ...props }, ref) => {
|
|
1223
1223
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1224
1224
|
"label",
|
|
1225
1225
|
{
|
|
1226
1226
|
ref,
|
|
1227
1227
|
className: cn(
|
|
1228
|
-
"block text-sm font-bold text-
|
|
1228
|
+
"block text-sm font-bold text-foreground",
|
|
1229
1229
|
className
|
|
1230
1230
|
),
|
|
1231
1231
|
...props,
|
|
1232
1232
|
children: [
|
|
1233
1233
|
children,
|
|
1234
|
-
required && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-
|
|
1234
|
+
required && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-error ml-1", children: "*" })
|
|
1235
1235
|
]
|
|
1236
1236
|
}
|
|
1237
1237
|
);
|
|
1238
1238
|
}
|
|
1239
1239
|
);
|
|
1240
1240
|
Label.displayName = "Label";
|
|
1241
|
-
var Textarea =
|
|
1241
|
+
var Textarea = React112__namespace.default.forwardRef(
|
|
1242
1242
|
({ className, error, ...props }, ref) => {
|
|
1243
1243
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1244
1244
|
"textarea",
|
|
1245
1245
|
{
|
|
1246
1246
|
ref,
|
|
1247
1247
|
className: cn(
|
|
1248
|
-
"block w-full border-[length:var(--border-width)] shadow-
|
|
1249
|
-
"px-3 py-2 text-sm text-
|
|
1250
|
-
"bg-
|
|
1248
|
+
"block w-full border-[length:var(--border-width)] shadow-sm",
|
|
1249
|
+
"px-3 py-2 text-sm text-foreground",
|
|
1250
|
+
"bg-card",
|
|
1251
1251
|
"placeholder:text-[var(--color-placeholder)]",
|
|
1252
|
-
"focus:outline-none focus:ring-2 focus:ring-offset-0 focus:ring-
|
|
1253
|
-
"disabled:bg-
|
|
1252
|
+
"focus:outline-none focus:ring-2 focus:ring-offset-0 focus:ring-ring",
|
|
1253
|
+
"disabled:bg-muted disabled:text-muted-foreground disabled:cursor-not-allowed",
|
|
1254
1254
|
"resize-y min-h-[80px]",
|
|
1255
|
-
error ? "border-
|
|
1255
|
+
error ? "border-error focus:border-error" : "border-border focus:border-primary",
|
|
1256
1256
|
className
|
|
1257
1257
|
),
|
|
1258
1258
|
...props
|
|
@@ -1261,7 +1261,7 @@ var Textarea = React110__namespace.default.forwardRef(
|
|
|
1261
1261
|
}
|
|
1262
1262
|
);
|
|
1263
1263
|
Textarea.displayName = "Textarea";
|
|
1264
|
-
var Select =
|
|
1264
|
+
var Select = React112__namespace.default.forwardRef(
|
|
1265
1265
|
({ className, options, placeholder, error, ...props }, ref) => {
|
|
1266
1266
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative", children: [
|
|
1267
1267
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -1269,12 +1269,12 @@ var Select = React110__namespace.default.forwardRef(
|
|
|
1269
1269
|
{
|
|
1270
1270
|
ref,
|
|
1271
1271
|
className: cn(
|
|
1272
|
-
"block w-full border-[length:var(--border-width)] shadow-
|
|
1273
|
-
"px-3 py-2 pr-10 text-sm text-
|
|
1274
|
-
"bg-
|
|
1275
|
-
"focus:outline-none focus:ring-2 focus:ring-offset-0 focus:ring-
|
|
1276
|
-
"disabled:bg-
|
|
1277
|
-
error ? "border-
|
|
1272
|
+
"block w-full border-[length:var(--border-width)] shadow-sm appearance-none",
|
|
1273
|
+
"px-3 py-2 pr-10 text-sm text-foreground font-medium",
|
|
1274
|
+
"bg-card",
|
|
1275
|
+
"focus:outline-none focus:ring-2 focus:ring-offset-0 focus:ring-ring",
|
|
1276
|
+
"disabled:bg-muted disabled:text-muted-foreground disabled:cursor-not-allowed",
|
|
1277
|
+
error ? "border-error focus:border-error" : "border-border focus:border-primary",
|
|
1278
1278
|
className
|
|
1279
1279
|
),
|
|
1280
1280
|
...props,
|
|
@@ -1292,12 +1292,12 @@ var Select = React110__namespace.default.forwardRef(
|
|
|
1292
1292
|
]
|
|
1293
1293
|
}
|
|
1294
1294
|
),
|
|
1295
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-y-0 right-0 pr-3 flex items-center pointer-events-none", children: /* @__PURE__ */ jsxRuntime.jsx(LucideIcons.ChevronDown, { className: "h-4 w-4 text-
|
|
1295
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-y-0 right-0 pr-3 flex items-center pointer-events-none", children: /* @__PURE__ */ jsxRuntime.jsx(LucideIcons.ChevronDown, { className: "h-4 w-4 text-foreground" }) })
|
|
1296
1296
|
] });
|
|
1297
1297
|
}
|
|
1298
1298
|
);
|
|
1299
1299
|
Select.displayName = "Select";
|
|
1300
|
-
var Checkbox =
|
|
1300
|
+
var Checkbox = React112__namespace.default.forwardRef(
|
|
1301
1301
|
({ className, label, id, ...props }, ref) => {
|
|
1302
1302
|
const inputId = id || `checkbox-${Math.random().toString(36).substr(2, 9)}`;
|
|
1303
1303
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center", children: [
|
|
@@ -1308,9 +1308,9 @@ var Checkbox = React110__namespace.default.forwardRef(
|
|
|
1308
1308
|
type: "checkbox",
|
|
1309
1309
|
id: inputId,
|
|
1310
1310
|
className: cn(
|
|
1311
|
-
"peer h-4 w-4 border-[length:var(--border-width)] border-
|
|
1312
|
-
"accent-
|
|
1313
|
-
"bg-
|
|
1311
|
+
"peer h-4 w-4 border-[length:var(--border-width)] border-border",
|
|
1312
|
+
"accent-primary focus:ring-ring focus:ring-offset-0",
|
|
1313
|
+
"bg-card checked:bg-primary",
|
|
1314
1314
|
"disabled:opacity-50 disabled:cursor-not-allowed",
|
|
1315
1315
|
className
|
|
1316
1316
|
),
|
|
@@ -1321,7 +1321,7 @@ var Checkbox = React110__namespace.default.forwardRef(
|
|
|
1321
1321
|
"label",
|
|
1322
1322
|
{
|
|
1323
1323
|
htmlFor: inputId,
|
|
1324
|
-
className: "ml-2 text-sm text-
|
|
1324
|
+
className: "ml-2 text-sm text-foreground font-medium cursor-pointer select-none",
|
|
1325
1325
|
children: label
|
|
1326
1326
|
}
|
|
1327
1327
|
)
|
|
@@ -1331,34 +1331,34 @@ var Checkbox = React110__namespace.default.forwardRef(
|
|
|
1331
1331
|
Checkbox.displayName = "Checkbox";
|
|
1332
1332
|
var variantStyles4 = {
|
|
1333
1333
|
default: [
|
|
1334
|
-
"bg-
|
|
1335
|
-
"border-[length:var(--border-width)] border-
|
|
1336
|
-
"shadow-
|
|
1334
|
+
"bg-card",
|
|
1335
|
+
"border-[length:var(--border-width)] border-border",
|
|
1336
|
+
"shadow-sm",
|
|
1337
1337
|
"transition-all duration-[var(--transition-normal)]",
|
|
1338
|
-
"hover:shadow-
|
|
1338
|
+
"hover:shadow-lg hover:-translate-y-0.5"
|
|
1339
1339
|
].join(" "),
|
|
1340
1340
|
bordered: [
|
|
1341
|
-
"bg-
|
|
1342
|
-
"border-[length:var(--border-width)] border-
|
|
1343
|
-
"shadow-
|
|
1341
|
+
"bg-card",
|
|
1342
|
+
"border-[length:var(--border-width)] border-border",
|
|
1343
|
+
"shadow-sm",
|
|
1344
1344
|
"transition-all duration-[var(--transition-normal)]",
|
|
1345
|
-
"hover:shadow-
|
|
1345
|
+
"hover:shadow-lg hover:-translate-y-0.5"
|
|
1346
1346
|
].join(" "),
|
|
1347
1347
|
elevated: [
|
|
1348
|
-
"bg-
|
|
1349
|
-
"border-[length:var(--border-width)] border-
|
|
1350
|
-
"shadow
|
|
1348
|
+
"bg-card",
|
|
1349
|
+
"border-[length:var(--border-width)] border-border",
|
|
1350
|
+
"shadow",
|
|
1351
1351
|
"transition-all duration-[var(--transition-normal)]",
|
|
1352
|
-
"hover:shadow-
|
|
1352
|
+
"hover:shadow-lg hover:-translate-y-0.5"
|
|
1353
1353
|
].join(" "),
|
|
1354
1354
|
// Interactive variant with theme-specific hover effects
|
|
1355
1355
|
interactive: [
|
|
1356
|
-
"bg-
|
|
1357
|
-
"border-[length:var(--border-width)] border-
|
|
1358
|
-
"shadow
|
|
1356
|
+
"bg-card",
|
|
1357
|
+
"border-[length:var(--border-width)] border-border",
|
|
1358
|
+
"shadow",
|
|
1359
1359
|
"cursor-pointer",
|
|
1360
1360
|
"transition-all duration-[var(--transition-normal)]",
|
|
1361
|
-
"hover:shadow-
|
|
1361
|
+
"hover:shadow-lg"
|
|
1362
1362
|
].join(" ")
|
|
1363
1363
|
};
|
|
1364
1364
|
var paddingStyles2 = {
|
|
@@ -1369,11 +1369,11 @@ var paddingStyles2 = {
|
|
|
1369
1369
|
};
|
|
1370
1370
|
var shadowStyles2 = {
|
|
1371
1371
|
none: "shadow-none",
|
|
1372
|
-
sm: "shadow-
|
|
1373
|
-
md: "shadow
|
|
1374
|
-
lg: "shadow-
|
|
1372
|
+
sm: "shadow-sm",
|
|
1373
|
+
md: "shadow",
|
|
1374
|
+
lg: "shadow-lg"
|
|
1375
1375
|
};
|
|
1376
|
-
var Card =
|
|
1376
|
+
var Card = React112__namespace.default.forwardRef(
|
|
1377
1377
|
({
|
|
1378
1378
|
className,
|
|
1379
1379
|
variant = "bordered",
|
|
@@ -1389,7 +1389,7 @@ var Card = React110__namespace.default.forwardRef(
|
|
|
1389
1389
|
{
|
|
1390
1390
|
ref,
|
|
1391
1391
|
className: cn(
|
|
1392
|
-
"rounded-
|
|
1392
|
+
"rounded-md",
|
|
1393
1393
|
"transition-all duration-[var(--transition-normal)]",
|
|
1394
1394
|
variantStyles4[variant],
|
|
1395
1395
|
paddingStyles2[padding],
|
|
@@ -1399,8 +1399,8 @@ var Card = React110__namespace.default.forwardRef(
|
|
|
1399
1399
|
...props,
|
|
1400
1400
|
children: [
|
|
1401
1401
|
(title || subtitle) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-4", children: [
|
|
1402
|
-
title && /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-lg text-
|
|
1403
|
-
subtitle && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-
|
|
1402
|
+
title && /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-lg text-card-foreground font-[var(--font-weight-bold)]", children: title }),
|
|
1403
|
+
subtitle && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground mt-1", children: subtitle })
|
|
1404
1404
|
] }),
|
|
1405
1405
|
children
|
|
1406
1406
|
]
|
|
@@ -1409,14 +1409,14 @@ var Card = React110__namespace.default.forwardRef(
|
|
|
1409
1409
|
}
|
|
1410
1410
|
);
|
|
1411
1411
|
Card.displayName = "Card";
|
|
1412
|
-
var CardHeader =
|
|
1412
|
+
var CardHeader = React112__namespace.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cn("mb-4", className), ...props }));
|
|
1413
1413
|
CardHeader.displayName = "CardHeader";
|
|
1414
|
-
var CardTitle =
|
|
1414
|
+
var CardTitle = React112__namespace.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1415
1415
|
"h3",
|
|
1416
1416
|
{
|
|
1417
1417
|
ref,
|
|
1418
1418
|
className: cn(
|
|
1419
|
-
"text-lg text-
|
|
1419
|
+
"text-lg text-card-foreground",
|
|
1420
1420
|
"font-[var(--font-weight-bold)]",
|
|
1421
1421
|
className
|
|
1422
1422
|
),
|
|
@@ -1424,11 +1424,11 @@ var CardTitle = React110__namespace.default.forwardRef(({ className, ...props },
|
|
|
1424
1424
|
}
|
|
1425
1425
|
));
|
|
1426
1426
|
CardTitle.displayName = "CardTitle";
|
|
1427
|
-
var CardContent =
|
|
1427
|
+
var CardContent = React112__namespace.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cn("", className), ...props }));
|
|
1428
1428
|
CardContent.displayName = "CardContent";
|
|
1429
1429
|
var CardBody = CardContent;
|
|
1430
1430
|
CardBody.displayName = "CardBody";
|
|
1431
|
-
var CardFooter =
|
|
1431
|
+
var CardFooter = React112__namespace.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1432
1432
|
"div",
|
|
1433
1433
|
{
|
|
1434
1434
|
ref,
|
|
@@ -1443,13 +1443,13 @@ var sizeStyles4 = {
|
|
|
1443
1443
|
md: "h-6 w-6",
|
|
1444
1444
|
lg: "h-8 w-8"
|
|
1445
1445
|
};
|
|
1446
|
-
var Spinner =
|
|
1446
|
+
var Spinner = React112__namespace.default.forwardRef(
|
|
1447
1447
|
({ className, size = "md", ...props }, ref) => {
|
|
1448
1448
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1449
1449
|
"div",
|
|
1450
1450
|
{
|
|
1451
1451
|
ref,
|
|
1452
|
-
className: cn("text-
|
|
1452
|
+
className: cn("text-foreground", className),
|
|
1453
1453
|
...props,
|
|
1454
1454
|
children: /* @__PURE__ */ jsxRuntime.jsx(LucideIcons.Loader2, { className: cn("animate-spin", sizeStyles4[size]) })
|
|
1455
1455
|
}
|
|
@@ -1457,7 +1457,7 @@ var Spinner = React110__namespace.default.forwardRef(
|
|
|
1457
1457
|
}
|
|
1458
1458
|
);
|
|
1459
1459
|
Spinner.displayName = "Spinner";
|
|
1460
|
-
var Radio =
|
|
1460
|
+
var Radio = React112__namespace.default.forwardRef(
|
|
1461
1461
|
({
|
|
1462
1462
|
label,
|
|
1463
1463
|
helperText,
|
|
@@ -1506,8 +1506,8 @@ var Radio = React110__namespace.default.forwardRef(
|
|
|
1506
1506
|
"flex items-center justify-center",
|
|
1507
1507
|
"border-[length:var(--border-width)] transition-all cursor-pointer",
|
|
1508
1508
|
sizeClasses6[size],
|
|
1509
|
-
hasError ? "border-
|
|
1510
|
-
checked ? hasError ? "border-
|
|
1509
|
+
hasError ? "border-error peer-focus:ring-error/20" : "border-border peer-focus:ring-ring/20",
|
|
1510
|
+
checked ? hasError ? "border-error" : "border-primary bg-primary" : "",
|
|
1511
1511
|
"peer-focus:outline-none peer-focus:ring-2 peer-focus:ring-offset-2",
|
|
1512
1512
|
disabled && "opacity-50 cursor-not-allowed",
|
|
1513
1513
|
!disabled && "hover:border-[var(--color-border-hover)]"
|
|
@@ -1518,7 +1518,7 @@ var Radio = React110__namespace.default.forwardRef(
|
|
|
1518
1518
|
className: cn(
|
|
1519
1519
|
"transition-all",
|
|
1520
1520
|
dotSizeClasses[size],
|
|
1521
|
-
hasError ? "bg-
|
|
1521
|
+
hasError ? "bg-error" : "bg-primary-foreground"
|
|
1522
1522
|
)
|
|
1523
1523
|
}
|
|
1524
1524
|
)
|
|
@@ -1531,7 +1531,7 @@ var Radio = React110__namespace.default.forwardRef(
|
|
|
1531
1531
|
htmlFor: radioId,
|
|
1532
1532
|
className: cn(
|
|
1533
1533
|
"block text-sm font-medium cursor-pointer select-none",
|
|
1534
|
-
hasError ? "text-
|
|
1534
|
+
hasError ? "text-error" : "text-foreground",
|
|
1535
1535
|
disabled && "opacity-50 cursor-not-allowed"
|
|
1536
1536
|
),
|
|
1537
1537
|
children: label
|
|
@@ -1543,7 +1543,7 @@ var Radio = React110__namespace.default.forwardRef(
|
|
|
1543
1543
|
"p",
|
|
1544
1544
|
{
|
|
1545
1545
|
id: `${radioId}-error`,
|
|
1546
|
-
className: "text-sm text-
|
|
1546
|
+
className: "text-sm text-error font-medium",
|
|
1547
1547
|
role: "alert",
|
|
1548
1548
|
children: error
|
|
1549
1549
|
}
|
|
@@ -1552,7 +1552,7 @@ var Radio = React110__namespace.default.forwardRef(
|
|
|
1552
1552
|
"p",
|
|
1553
1553
|
{
|
|
1554
1554
|
id: `${radioId}-helper`,
|
|
1555
|
-
className: "text-sm text-
|
|
1555
|
+
className: "text-sm text-muted-foreground",
|
|
1556
1556
|
children: helperText
|
|
1557
1557
|
}
|
|
1558
1558
|
)
|
|
@@ -1561,7 +1561,7 @@ var Radio = React110__namespace.default.forwardRef(
|
|
|
1561
1561
|
}
|
|
1562
1562
|
);
|
|
1563
1563
|
Radio.displayName = "Radio";
|
|
1564
|
-
var Switch =
|
|
1564
|
+
var Switch = React112__namespace.forwardRef(
|
|
1565
1565
|
({
|
|
1566
1566
|
checked,
|
|
1567
1567
|
defaultChecked = false,
|
|
@@ -1572,10 +1572,10 @@ var Switch = React110__namespace.forwardRef(
|
|
|
1572
1572
|
name,
|
|
1573
1573
|
className
|
|
1574
1574
|
}, ref) => {
|
|
1575
|
-
const [isChecked, setIsChecked] =
|
|
1575
|
+
const [isChecked, setIsChecked] = React112__namespace.useState(
|
|
1576
1576
|
checked !== void 0 ? checked : defaultChecked
|
|
1577
1577
|
);
|
|
1578
|
-
|
|
1578
|
+
React112__namespace.useEffect(() => {
|
|
1579
1579
|
if (checked !== void 0) {
|
|
1580
1580
|
setIsChecked(checked);
|
|
1581
1581
|
}
|
|
@@ -1713,27 +1713,27 @@ var Stack = ({
|
|
|
1713
1713
|
var VStack = (props) => /* @__PURE__ */ jsxRuntime.jsx(Stack, { direction: "vertical", ...props });
|
|
1714
1714
|
var HStack = (props) => /* @__PURE__ */ jsxRuntime.jsx(Stack, { direction: "horizontal", ...props });
|
|
1715
1715
|
var statusColors = {
|
|
1716
|
-
online: "bg-
|
|
1717
|
-
offline: "bg-
|
|
1718
|
-
away: "bg-
|
|
1719
|
-
busy: "bg-
|
|
1720
|
-
warning: "bg-
|
|
1721
|
-
critical: "bg-
|
|
1716
|
+
online: "bg-success",
|
|
1717
|
+
offline: "bg-muted-foreground",
|
|
1718
|
+
away: "bg-warning",
|
|
1719
|
+
busy: "bg-error",
|
|
1720
|
+
warning: "bg-warning",
|
|
1721
|
+
critical: "bg-error"
|
|
1722
1722
|
};
|
|
1723
1723
|
var pulseRingColors = {
|
|
1724
|
-
online: "ring-
|
|
1725
|
-
offline: "ring-
|
|
1726
|
-
away: "ring-
|
|
1727
|
-
busy: "ring-
|
|
1728
|
-
warning: "ring-
|
|
1729
|
-
critical: "ring-
|
|
1724
|
+
online: "ring-success",
|
|
1725
|
+
offline: "ring-muted-foreground",
|
|
1726
|
+
away: "ring-warning",
|
|
1727
|
+
busy: "ring-error",
|
|
1728
|
+
warning: "ring-warning",
|
|
1729
|
+
critical: "ring-error"
|
|
1730
1730
|
};
|
|
1731
1731
|
var sizeStyles5 = {
|
|
1732
1732
|
sm: "w-2 h-2",
|
|
1733
1733
|
md: "w-2.5 h-2.5",
|
|
1734
1734
|
lg: "w-3 h-3"
|
|
1735
1735
|
};
|
|
1736
|
-
var StatusDot =
|
|
1736
|
+
var StatusDot = React112__namespace.default.forwardRef(
|
|
1737
1737
|
({ className, status = "offline", pulse = false, size = "md", label, ...props }, ref) => {
|
|
1738
1738
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1739
1739
|
"span",
|
|
@@ -1770,17 +1770,17 @@ function resolveDirection(value, direction) {
|
|
|
1770
1770
|
return value > 0 ? "up" : "down";
|
|
1771
1771
|
}
|
|
1772
1772
|
function resolveColor(dir, invert) {
|
|
1773
|
-
if (dir === "flat") return "text-
|
|
1773
|
+
if (dir === "flat") return "text-muted-foreground";
|
|
1774
1774
|
const isPositive = dir === "up";
|
|
1775
1775
|
const isGood = invert ? !isPositive : isPositive;
|
|
1776
|
-
return isGood ? "text-
|
|
1776
|
+
return isGood ? "text-success" : "text-error";
|
|
1777
1777
|
}
|
|
1778
1778
|
var iconMap2 = {
|
|
1779
1779
|
up: LucideIcons.TrendingUp,
|
|
1780
1780
|
down: LucideIcons.TrendingDown,
|
|
1781
1781
|
flat: LucideIcons.ArrowRight
|
|
1782
1782
|
};
|
|
1783
|
-
var TrendIndicator =
|
|
1783
|
+
var TrendIndicator = React112__namespace.default.forwardRef(
|
|
1784
1784
|
({
|
|
1785
1785
|
className,
|
|
1786
1786
|
value,
|
|
@@ -1839,7 +1839,7 @@ var thumbSizes = {
|
|
|
1839
1839
|
md: "w-4 h-4",
|
|
1840
1840
|
lg: "w-5 h-5"
|
|
1841
1841
|
};
|
|
1842
|
-
var RangeSlider =
|
|
1842
|
+
var RangeSlider = React112__namespace.default.forwardRef(
|
|
1843
1843
|
({
|
|
1844
1844
|
className,
|
|
1845
1845
|
min = 0,
|
|
@@ -1857,14 +1857,14 @@ var RangeSlider = React110__namespace.default.forwardRef(
|
|
|
1857
1857
|
formatValue: formatValue5,
|
|
1858
1858
|
...props
|
|
1859
1859
|
}, ref) => {
|
|
1860
|
-
const [isDragging, setIsDragging] =
|
|
1861
|
-
const [showTip, setShowTip] =
|
|
1862
|
-
const inputRef =
|
|
1860
|
+
const [isDragging, setIsDragging] = React112.useState(false);
|
|
1861
|
+
const [showTip, setShowTip] = React112.useState(false);
|
|
1862
|
+
const inputRef = React112.useRef(null);
|
|
1863
1863
|
const eventBus = useSafeEventBus();
|
|
1864
1864
|
const percentage = max !== min ? (value - min) / (max - min) * 100 : 0;
|
|
1865
1865
|
const bufferedPercentage = buffered !== void 0 ? Math.min(buffered, 100) : void 0;
|
|
1866
1866
|
const displayValue = formatValue5 ? formatValue5(value) : String(value);
|
|
1867
|
-
const handleChange =
|
|
1867
|
+
const handleChange = React112.useCallback(
|
|
1868
1868
|
(e) => {
|
|
1869
1869
|
const newValue = Number(e.target.value);
|
|
1870
1870
|
onChange?.(newValue);
|
|
@@ -1891,7 +1891,7 @@ var RangeSlider = React110__namespace.default.forwardRef(
|
|
|
1891
1891
|
"div",
|
|
1892
1892
|
{
|
|
1893
1893
|
className: cn(
|
|
1894
|
-
"absolute inset-x-0 rounded-full bg-
|
|
1894
|
+
"absolute inset-x-0 rounded-full bg-muted",
|
|
1895
1895
|
trackSizes[size]
|
|
1896
1896
|
),
|
|
1897
1897
|
style: { top: "50%", transform: "translateY(-50%)" }
|
|
@@ -1901,7 +1901,7 @@ var RangeSlider = React110__namespace.default.forwardRef(
|
|
|
1901
1901
|
"div",
|
|
1902
1902
|
{
|
|
1903
1903
|
className: cn(
|
|
1904
|
-
"absolute rounded-full bg-
|
|
1904
|
+
"absolute rounded-full bg-muted-foreground opacity-30",
|
|
1905
1905
|
trackSizes[size]
|
|
1906
1906
|
),
|
|
1907
1907
|
style: {
|
|
@@ -1916,7 +1916,7 @@ var RangeSlider = React110__namespace.default.forwardRef(
|
|
|
1916
1916
|
"div",
|
|
1917
1917
|
{
|
|
1918
1918
|
className: cn(
|
|
1919
|
-
"absolute rounded-full bg-
|
|
1919
|
+
"absolute rounded-full bg-primary",
|
|
1920
1920
|
trackSizes[size]
|
|
1921
1921
|
),
|
|
1922
1922
|
style: {
|
|
@@ -1978,9 +1978,9 @@ var RangeSlider = React110__namespace.default.forwardRef(
|
|
|
1978
1978
|
"div",
|
|
1979
1979
|
{
|
|
1980
1980
|
className: cn(
|
|
1981
|
-
"absolute rounded-full bg-
|
|
1982
|
-
"border-2 border-
|
|
1983
|
-
"shadow-
|
|
1981
|
+
"absolute rounded-full bg-primary-foreground",
|
|
1982
|
+
"border-2 border-primary",
|
|
1983
|
+
"shadow-sm",
|
|
1984
1984
|
"pointer-events-none",
|
|
1985
1985
|
"transition-transform duration-100",
|
|
1986
1986
|
isDragging && "scale-110",
|
|
@@ -1998,7 +1998,7 @@ var RangeSlider = React110__namespace.default.forwardRef(
|
|
|
1998
1998
|
{
|
|
1999
1999
|
className: cn(
|
|
2000
2000
|
"absolute -top-8 px-2 py-0.5 rounded",
|
|
2001
|
-
"bg-
|
|
2001
|
+
"bg-foreground text-background",
|
|
2002
2002
|
"text-xs font-medium whitespace-nowrap",
|
|
2003
2003
|
"pointer-events-none"
|
|
2004
2004
|
),
|
|
@@ -2015,7 +2015,7 @@ var RangeSlider = React110__namespace.default.forwardRef(
|
|
|
2015
2015
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2016
2016
|
"div",
|
|
2017
2017
|
{
|
|
2018
|
-
className: "absolute w-px h-1.5 bg-
|
|
2018
|
+
className: "absolute w-px h-1.5 bg-muted-foreground",
|
|
2019
2019
|
style: { left: `${tickPercent}%` }
|
|
2020
2020
|
},
|
|
2021
2021
|
i
|
|
@@ -2029,8 +2029,8 @@ var RangeSlider = React110__namespace.default.forwardRef(
|
|
|
2029
2029
|
RangeSlider.displayName = "RangeSlider";
|
|
2030
2030
|
var backgroundClasses = {
|
|
2031
2031
|
default: "",
|
|
2032
|
-
alt: "bg-
|
|
2033
|
-
dark: "bg-
|
|
2032
|
+
alt: "bg-surface",
|
|
2033
|
+
dark: "bg-foreground text-background",
|
|
2034
2034
|
gradient: [
|
|
2035
2035
|
"bg-gradient-to-b",
|
|
2036
2036
|
"from-[var(--color-primary)]/5",
|
|
@@ -2042,7 +2042,7 @@ var paddingClasses = {
|
|
|
2042
2042
|
md: "py-16",
|
|
2043
2043
|
lg: "py-24"
|
|
2044
2044
|
};
|
|
2045
|
-
var ContentSection =
|
|
2045
|
+
var ContentSection = React112__namespace.default.forwardRef(
|
|
2046
2046
|
({ children, background = "default", padding = "lg", id, className }, ref) => {
|
|
2047
2047
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2048
2048
|
Box,
|
|
@@ -2061,6 +2061,289 @@ var ContentSection = React110__namespace.default.forwardRef(
|
|
|
2061
2061
|
}
|
|
2062
2062
|
);
|
|
2063
2063
|
ContentSection.displayName = "ContentSection";
|
|
2064
|
+
var initialStyles = {
|
|
2065
|
+
"fade-up": { opacity: 0, transform: "translateY(24px)" },
|
|
2066
|
+
"fade-down": { opacity: 0, transform: "translateY(-24px)" },
|
|
2067
|
+
"fade-in": { opacity: 0 },
|
|
2068
|
+
"fade-left": { opacity: 0, transform: "translateX(24px)" },
|
|
2069
|
+
"fade-right": { opacity: 0, transform: "translateX(-24px)" },
|
|
2070
|
+
"scale": { opacity: 0, transform: "scale(0.92)" },
|
|
2071
|
+
"scale-up": { opacity: 0, transform: "scale(0.92) translateY(16px)" },
|
|
2072
|
+
"none": {}
|
|
2073
|
+
};
|
|
2074
|
+
var animatedStyles = {
|
|
2075
|
+
"fade-up": { opacity: 1, transform: "translateY(0)" },
|
|
2076
|
+
"fade-down": { opacity: 1, transform: "translateY(0)" },
|
|
2077
|
+
"fade-in": { opacity: 1 },
|
|
2078
|
+
"fade-left": { opacity: 1, transform: "translateX(0)" },
|
|
2079
|
+
"fade-right": { opacity: 1, transform: "translateX(0)" },
|
|
2080
|
+
"scale": { opacity: 1, transform: "scale(1)" },
|
|
2081
|
+
"scale-up": { opacity: 1, transform: "scale(1) translateY(0)" },
|
|
2082
|
+
"none": {}
|
|
2083
|
+
};
|
|
2084
|
+
var AnimatedReveal = React112__namespace.default.forwardRef(
|
|
2085
|
+
({
|
|
2086
|
+
trigger = "scroll",
|
|
2087
|
+
animation = "fade-up",
|
|
2088
|
+
duration = 600,
|
|
2089
|
+
delay = 0,
|
|
2090
|
+
threshold = 0.15,
|
|
2091
|
+
once = true,
|
|
2092
|
+
animate: manualAnimate,
|
|
2093
|
+
easing = "cubic-bezier(0.16, 1, 0.3, 1)",
|
|
2094
|
+
children,
|
|
2095
|
+
className,
|
|
2096
|
+
style,
|
|
2097
|
+
...props
|
|
2098
|
+
}, forwardedRef) => {
|
|
2099
|
+
const [isAnimated, setIsAnimated] = React112.useState(false);
|
|
2100
|
+
const internalRef = React112.useRef(null);
|
|
2101
|
+
const hasAnimated = React112.useRef(false);
|
|
2102
|
+
const setRef = React112.useCallback(
|
|
2103
|
+
(node) => {
|
|
2104
|
+
internalRef.current = node;
|
|
2105
|
+
if (typeof forwardedRef === "function") forwardedRef(node);
|
|
2106
|
+
else if (forwardedRef) forwardedRef.current = node;
|
|
2107
|
+
},
|
|
2108
|
+
[forwardedRef]
|
|
2109
|
+
);
|
|
2110
|
+
React112.useEffect(() => {
|
|
2111
|
+
if (trigger !== "scroll") return;
|
|
2112
|
+
const el = internalRef.current;
|
|
2113
|
+
if (!el) return;
|
|
2114
|
+
const observer = new IntersectionObserver(
|
|
2115
|
+
([entry]) => {
|
|
2116
|
+
if (entry.isIntersecting) {
|
|
2117
|
+
if (once && hasAnimated.current) return;
|
|
2118
|
+
hasAnimated.current = true;
|
|
2119
|
+
setIsAnimated(true);
|
|
2120
|
+
} else if (!once) {
|
|
2121
|
+
setIsAnimated(false);
|
|
2122
|
+
}
|
|
2123
|
+
},
|
|
2124
|
+
{ threshold }
|
|
2125
|
+
);
|
|
2126
|
+
observer.observe(el);
|
|
2127
|
+
return () => observer.disconnect();
|
|
2128
|
+
}, [trigger, threshold, once]);
|
|
2129
|
+
const handleMouseEnter = trigger === "hover" ? () => setIsAnimated(true) : void 0;
|
|
2130
|
+
const handleMouseLeave = trigger === "hover" ? () => {
|
|
2131
|
+
if (!once || !hasAnimated.current) {
|
|
2132
|
+
hasAnimated.current = true;
|
|
2133
|
+
setIsAnimated(false);
|
|
2134
|
+
}
|
|
2135
|
+
} : void 0;
|
|
2136
|
+
React112.useEffect(() => {
|
|
2137
|
+
if (trigger === "manual" && manualAnimate !== void 0) {
|
|
2138
|
+
setIsAnimated(manualAnimate);
|
|
2139
|
+
}
|
|
2140
|
+
}, [trigger, manualAnimate]);
|
|
2141
|
+
const active = isAnimated;
|
|
2142
|
+
const currentStyle = active ? animatedStyles[animation] : initialStyles[animation];
|
|
2143
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2144
|
+
"div",
|
|
2145
|
+
{
|
|
2146
|
+
ref: setRef,
|
|
2147
|
+
className: cn("will-change-[opacity,transform]", className),
|
|
2148
|
+
style: {
|
|
2149
|
+
...currentStyle,
|
|
2150
|
+
transitionProperty: "opacity, transform",
|
|
2151
|
+
transitionDuration: `${duration}ms`,
|
|
2152
|
+
transitionDelay: `${delay}ms`,
|
|
2153
|
+
transitionTimingFunction: easing,
|
|
2154
|
+
...style
|
|
2155
|
+
},
|
|
2156
|
+
onMouseEnter: handleMouseEnter,
|
|
2157
|
+
onMouseLeave: handleMouseLeave,
|
|
2158
|
+
...props,
|
|
2159
|
+
children: typeof children === "function" ? children(active) : children
|
|
2160
|
+
}
|
|
2161
|
+
);
|
|
2162
|
+
}
|
|
2163
|
+
);
|
|
2164
|
+
AnimatedReveal.displayName = "AnimatedReveal";
|
|
2165
|
+
function useFetchedSvg(src) {
|
|
2166
|
+
const [svg, setSvg] = React112.useState(null);
|
|
2167
|
+
const cache = React112.useRef({});
|
|
2168
|
+
React112.useEffect(() => {
|
|
2169
|
+
if (!src) {
|
|
2170
|
+
setSvg(null);
|
|
2171
|
+
return;
|
|
2172
|
+
}
|
|
2173
|
+
if (cache.current[src]) {
|
|
2174
|
+
setSvg(cache.current[src]);
|
|
2175
|
+
return;
|
|
2176
|
+
}
|
|
2177
|
+
let cancelled = false;
|
|
2178
|
+
fetch(src).then((res) => {
|
|
2179
|
+
if (!res.ok) throw new Error(`Failed to fetch SVG: ${res.status}`);
|
|
2180
|
+
return res.text();
|
|
2181
|
+
}).then((text) => {
|
|
2182
|
+
if (cancelled) return;
|
|
2183
|
+
cache.current[src] = text;
|
|
2184
|
+
setSvg(text);
|
|
2185
|
+
}).catch(() => {
|
|
2186
|
+
if (!cancelled) setSvg(null);
|
|
2187
|
+
});
|
|
2188
|
+
return () => {
|
|
2189
|
+
cancelled = true;
|
|
2190
|
+
};
|
|
2191
|
+
}, [src]);
|
|
2192
|
+
return svg;
|
|
2193
|
+
}
|
|
2194
|
+
function applyDrawAnimation(container, animate, duration, delay, easing) {
|
|
2195
|
+
const paths = container.querySelectorAll("path, line, polyline, polygon, circle, ellipse, rect");
|
|
2196
|
+
paths.forEach((el) => {
|
|
2197
|
+
if ("getTotalLength" in el && typeof el.getTotalLength === "function") {
|
|
2198
|
+
const len = el.getTotalLength();
|
|
2199
|
+
el.style.strokeDasharray = `${len}`;
|
|
2200
|
+
el.style.strokeDashoffset = animate ? "0" : `${len}`;
|
|
2201
|
+
el.style.transition = `stroke-dashoffset ${duration}ms ${easing} ${delay}ms`;
|
|
2202
|
+
}
|
|
2203
|
+
});
|
|
2204
|
+
}
|
|
2205
|
+
function applyFillAnimation(container, animate, duration, delay, easing, fillColor) {
|
|
2206
|
+
const paths = container.querySelectorAll("path, circle, ellipse, rect, polygon");
|
|
2207
|
+
paths.forEach((el) => {
|
|
2208
|
+
if ("getTotalLength" in el && typeof el.getTotalLength === "function") {
|
|
2209
|
+
const geom = el;
|
|
2210
|
+
const len = geom.getTotalLength();
|
|
2211
|
+
geom.style.strokeDasharray = `${len}`;
|
|
2212
|
+
geom.style.strokeDashoffset = animate ? "0" : `${len}`;
|
|
2213
|
+
geom.style.transition = `stroke-dashoffset ${duration * 0.6}ms ${easing} ${delay}ms, fill-opacity ${duration * 0.4}ms ${easing} ${delay + duration * 0.6}ms`;
|
|
2214
|
+
}
|
|
2215
|
+
if (fillColor) el.style.fill = fillColor;
|
|
2216
|
+
el.style.fillOpacity = animate ? "1" : "0";
|
|
2217
|
+
});
|
|
2218
|
+
}
|
|
2219
|
+
function applyPulseAnimation(container, animate, duration) {
|
|
2220
|
+
const svg = container.querySelector("svg");
|
|
2221
|
+
if (!svg) return;
|
|
2222
|
+
if (animate) {
|
|
2223
|
+
svg.style.animation = `ag-pulse ${duration}ms ease-in-out infinite`;
|
|
2224
|
+
} else {
|
|
2225
|
+
svg.style.animation = "none";
|
|
2226
|
+
}
|
|
2227
|
+
}
|
|
2228
|
+
function applyMorphAnimation(container, animate, duration, delay, easing) {
|
|
2229
|
+
const paths = container.querySelectorAll("path, circle, ellipse, rect, polygon");
|
|
2230
|
+
paths.forEach((el) => {
|
|
2231
|
+
el.style.transition = `all ${duration}ms ${easing} ${delay}ms`;
|
|
2232
|
+
el.style.transform = animate ? "scale(1)" : "scale(0)";
|
|
2233
|
+
el.style.transformOrigin = "center";
|
|
2234
|
+
el.style.opacity = animate ? "1" : "0";
|
|
2235
|
+
});
|
|
2236
|
+
}
|
|
2237
|
+
var AnimatedGraphic = React112__namespace.default.forwardRef(
|
|
2238
|
+
({
|
|
2239
|
+
src,
|
|
2240
|
+
svgContent,
|
|
2241
|
+
animation = "draw",
|
|
2242
|
+
animate = false,
|
|
2243
|
+
duration = 1200,
|
|
2244
|
+
delay = 0,
|
|
2245
|
+
easing = "cubic-bezier(0.16, 1, 0.3, 1)",
|
|
2246
|
+
width,
|
|
2247
|
+
height,
|
|
2248
|
+
strokeColor,
|
|
2249
|
+
fillColor,
|
|
2250
|
+
alt,
|
|
2251
|
+
className,
|
|
2252
|
+
style,
|
|
2253
|
+
children,
|
|
2254
|
+
...props
|
|
2255
|
+
}, ref) => {
|
|
2256
|
+
const containerRef = React112.useRef(null);
|
|
2257
|
+
const fetchedSvg = useFetchedSvg(svgContent ? void 0 : src);
|
|
2258
|
+
const resolvedSvg = svgContent ?? fetchedSvg;
|
|
2259
|
+
const prevAnimateRef = React112.useRef(animate);
|
|
2260
|
+
const setRef = React112__namespace.default.useCallback(
|
|
2261
|
+
(node) => {
|
|
2262
|
+
containerRef.current = node;
|
|
2263
|
+
if (typeof ref === "function") ref(node);
|
|
2264
|
+
else if (ref) ref.current = node;
|
|
2265
|
+
},
|
|
2266
|
+
[ref]
|
|
2267
|
+
);
|
|
2268
|
+
React112.useEffect(() => {
|
|
2269
|
+
const el = containerRef.current;
|
|
2270
|
+
if (!el || !strokeColor) return;
|
|
2271
|
+
const paths = el.querySelectorAll("path, line, polyline, polygon, circle, ellipse, rect");
|
|
2272
|
+
paths.forEach((p2) => {
|
|
2273
|
+
p2.style.stroke = strokeColor;
|
|
2274
|
+
});
|
|
2275
|
+
}, [resolvedSvg, strokeColor]);
|
|
2276
|
+
React112.useEffect(() => {
|
|
2277
|
+
const el = containerRef.current;
|
|
2278
|
+
if (!el || !resolvedSvg) return;
|
|
2279
|
+
if (animation === "draw" || animation === "fill") {
|
|
2280
|
+
const paths = el.querySelectorAll("path, line, polyline, polygon, circle, ellipse, rect");
|
|
2281
|
+
paths.forEach((p2) => {
|
|
2282
|
+
if ("getTotalLength" in p2 && typeof p2.getTotalLength === "function") {
|
|
2283
|
+
const len = p2.getTotalLength();
|
|
2284
|
+
p2.style.strokeDasharray = `${len}`;
|
|
2285
|
+
p2.style.strokeDashoffset = `${len}`;
|
|
2286
|
+
}
|
|
2287
|
+
if (animation === "fill") {
|
|
2288
|
+
p2.style.fillOpacity = "0";
|
|
2289
|
+
}
|
|
2290
|
+
});
|
|
2291
|
+
}
|
|
2292
|
+
if (animation === "morph") {
|
|
2293
|
+
const paths = el.querySelectorAll("path, circle, ellipse, rect, polygon");
|
|
2294
|
+
paths.forEach((p2) => {
|
|
2295
|
+
p2.style.transform = "scale(0)";
|
|
2296
|
+
p2.style.transformOrigin = "center";
|
|
2297
|
+
p2.style.opacity = "0";
|
|
2298
|
+
});
|
|
2299
|
+
}
|
|
2300
|
+
}, [resolvedSvg, animation]);
|
|
2301
|
+
React112.useEffect(() => {
|
|
2302
|
+
const el = containerRef.current;
|
|
2303
|
+
if (!el) return;
|
|
2304
|
+
const id = requestAnimationFrame(() => {
|
|
2305
|
+
switch (animation) {
|
|
2306
|
+
case "draw":
|
|
2307
|
+
applyDrawAnimation(el, animate, duration, delay, easing);
|
|
2308
|
+
break;
|
|
2309
|
+
case "fill":
|
|
2310
|
+
applyFillAnimation(el, animate, duration, delay, easing, fillColor);
|
|
2311
|
+
break;
|
|
2312
|
+
case "pulse":
|
|
2313
|
+
applyPulseAnimation(el, animate, duration);
|
|
2314
|
+
break;
|
|
2315
|
+
case "morph":
|
|
2316
|
+
applyMorphAnimation(el, animate, duration, delay, easing);
|
|
2317
|
+
break;
|
|
2318
|
+
}
|
|
2319
|
+
});
|
|
2320
|
+
prevAnimateRef.current = animate;
|
|
2321
|
+
return () => cancelAnimationFrame(id);
|
|
2322
|
+
}, [animate, animation, duration, delay, easing, fillColor, resolvedSvg]);
|
|
2323
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
2324
|
+
/* @__PURE__ */ jsxRuntime.jsx("style", { children: `@keyframes ag-pulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.04); opacity: 0.85; } }` }),
|
|
2325
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2326
|
+
"div",
|
|
2327
|
+
{
|
|
2328
|
+
ref: setRef,
|
|
2329
|
+
className: cn("inline-flex items-center justify-center", className),
|
|
2330
|
+
style: { width, height, ...style },
|
|
2331
|
+
role: alt ? "img" : void 0,
|
|
2332
|
+
"aria-label": alt,
|
|
2333
|
+
...props,
|
|
2334
|
+
children: resolvedSvg ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
2335
|
+
"div",
|
|
2336
|
+
{
|
|
2337
|
+
className: "w-full h-full [&>svg]:w-full [&>svg]:h-full",
|
|
2338
|
+
dangerouslySetInnerHTML: { __html: resolvedSvg }
|
|
2339
|
+
}
|
|
2340
|
+
) : children
|
|
2341
|
+
}
|
|
2342
|
+
)
|
|
2343
|
+
] });
|
|
2344
|
+
}
|
|
2345
|
+
);
|
|
2346
|
+
AnimatedGraphic.displayName = "AnimatedGraphic";
|
|
2064
2347
|
|
|
2065
2348
|
// locales/en.json
|
|
2066
2349
|
var en_default = {
|
|
@@ -2171,7 +2454,7 @@ var en_default = {
|
|
|
2171
2454
|
// hooks/useTranslate.ts
|
|
2172
2455
|
var { $meta: _meta, ...coreMessages } = en_default;
|
|
2173
2456
|
var coreLocale = coreMessages;
|
|
2174
|
-
var I18nContext =
|
|
2457
|
+
var I18nContext = React112.createContext({
|
|
2175
2458
|
locale: "en",
|
|
2176
2459
|
direction: "ltr",
|
|
2177
2460
|
t: (key) => coreLocale[key] ?? key
|
|
@@ -2180,7 +2463,7 @@ var I18nContext = React110.createContext({
|
|
|
2180
2463
|
I18nContext.displayName = "I18nContext";
|
|
2181
2464
|
I18nContext.Provider;
|
|
2182
2465
|
function useTranslate() {
|
|
2183
|
-
return
|
|
2466
|
+
return React112.useContext(I18nContext);
|
|
2184
2467
|
}
|
|
2185
2468
|
var ErrorState = ({
|
|
2186
2469
|
title,
|
|
@@ -2207,16 +2490,16 @@ var ErrorState = ({
|
|
|
2207
2490
|
className
|
|
2208
2491
|
),
|
|
2209
2492
|
children: [
|
|
2210
|
-
/* @__PURE__ */ jsxRuntime.jsx(Box, { className: "mb-4 rounded-
|
|
2211
|
-
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "h3", className: "text-lg font-medium text-
|
|
2212
|
-
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "mt-1 text-
|
|
2493
|
+
/* @__PURE__ */ jsxRuntime.jsx(Box, { className: "mb-4 rounded-full bg-error/10 p-3", children: /* @__PURE__ */ jsxRuntime.jsx(LucideIcons.AlertCircle, { className: "h-8 w-8 text-error" }) }),
|
|
2494
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "h3", className: "text-lg font-medium text-foreground", children: resolvedTitle }),
|
|
2495
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "mt-1 text-muted-foreground max-w-sm", children: resolvedMessage }),
|
|
2213
2496
|
(onRetry || retryEvent) && /* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "secondary", className: "mt-4", onClick: handleRetry, children: t("error.retry") })
|
|
2214
2497
|
]
|
|
2215
2498
|
}
|
|
2216
2499
|
);
|
|
2217
2500
|
};
|
|
2218
2501
|
ErrorState.displayName = "ErrorState";
|
|
2219
|
-
var ErrorBoundary = class extends
|
|
2502
|
+
var ErrorBoundary = class extends React112__namespace.default.Component {
|
|
2220
2503
|
constructor(props) {
|
|
2221
2504
|
super(props);
|
|
2222
2505
|
__publicField(this, "reset", () => {
|
|
@@ -2315,7 +2598,7 @@ function executeNotify(message, options, config) {
|
|
|
2315
2598
|
function executeEmit(event, payload, config) {
|
|
2316
2599
|
config.eventBus.emit(event, payload);
|
|
2317
2600
|
}
|
|
2318
|
-
var ClientEffectConfigContext =
|
|
2601
|
+
var ClientEffectConfigContext = React112.createContext(null);
|
|
2319
2602
|
ClientEffectConfigContext.Provider;
|
|
2320
2603
|
var effectIdCounter = 0;
|
|
2321
2604
|
function generateEffectId() {
|
|
@@ -2554,14 +2837,14 @@ var OfflineExecutor = class {
|
|
|
2554
2837
|
}
|
|
2555
2838
|
};
|
|
2556
2839
|
function useOfflineExecutor(options) {
|
|
2557
|
-
const executorRef =
|
|
2558
|
-
const [state, setState] =
|
|
2840
|
+
const executorRef = React112.useRef(null);
|
|
2841
|
+
const [state, setState] = React112.useState({
|
|
2559
2842
|
isOffline: false,
|
|
2560
2843
|
syncQueue: [],
|
|
2561
2844
|
localEffectsProcessed: 0,
|
|
2562
2845
|
effectsSynced: 0
|
|
2563
2846
|
});
|
|
2564
|
-
|
|
2847
|
+
React112.useEffect(() => {
|
|
2565
2848
|
const executor = new OfflineExecutor({
|
|
2566
2849
|
...options,
|
|
2567
2850
|
onQueueChange: (queue) => {
|
|
@@ -2576,7 +2859,7 @@ function useOfflineExecutor(options) {
|
|
|
2576
2859
|
executorRef.current = null;
|
|
2577
2860
|
};
|
|
2578
2861
|
}, []);
|
|
2579
|
-
|
|
2862
|
+
React112.useEffect(() => {
|
|
2580
2863
|
if (!options.autoSync || !options.serverUrl) return;
|
|
2581
2864
|
const handleOnline = async () => {
|
|
2582
2865
|
if (executorRef.current) {
|
|
@@ -2590,13 +2873,13 @@ function useOfflineExecutor(options) {
|
|
|
2590
2873
|
window.addEventListener("online", handleOnline);
|
|
2591
2874
|
return () => window.removeEventListener("online", handleOnline);
|
|
2592
2875
|
}, [options.autoSync, options.serverUrl, options.authToken]);
|
|
2593
|
-
const executeEffects =
|
|
2876
|
+
const executeEffects = React112.useCallback((effects) => {
|
|
2594
2877
|
executorRef.current?.executeClientEffects(effects);
|
|
2595
2878
|
if (executorRef.current) {
|
|
2596
2879
|
setState(executorRef.current.getState());
|
|
2597
2880
|
}
|
|
2598
2881
|
}, []);
|
|
2599
|
-
const processEventOffline =
|
|
2882
|
+
const processEventOffline = React112.useCallback(
|
|
2600
2883
|
(event, payload, effects) => {
|
|
2601
2884
|
const result = executorRef.current?.processEventOffline(event, payload, effects);
|
|
2602
2885
|
if (executorRef.current) {
|
|
@@ -2606,7 +2889,7 @@ function useOfflineExecutor(options) {
|
|
|
2606
2889
|
},
|
|
2607
2890
|
[]
|
|
2608
2891
|
);
|
|
2609
|
-
const sync =
|
|
2892
|
+
const sync = React112.useCallback(async () => {
|
|
2610
2893
|
if (!executorRef.current || !options.serverUrl) return 0;
|
|
2611
2894
|
const count = await executorRef.current.syncPendingEffects(
|
|
2612
2895
|
options.serverUrl,
|
|
@@ -2615,7 +2898,7 @@ function useOfflineExecutor(options) {
|
|
|
2615
2898
|
setState(executorRef.current.getState());
|
|
2616
2899
|
return count;
|
|
2617
2900
|
}, [options.serverUrl, options.authToken]);
|
|
2618
|
-
const clearQueue =
|
|
2901
|
+
const clearQueue = React112.useCallback(() => {
|
|
2619
2902
|
executorRef.current?.clearQueue();
|
|
2620
2903
|
if (executorRef.current) {
|
|
2621
2904
|
setState(executorRef.current.getState());
|
|
@@ -2631,7 +2914,7 @@ function useOfflineExecutor(options) {
|
|
|
2631
2914
|
clearQueue
|
|
2632
2915
|
};
|
|
2633
2916
|
}
|
|
2634
|
-
|
|
2917
|
+
React112.createContext(null);
|
|
2635
2918
|
var defaultIcon = L__default.default.icon({
|
|
2636
2919
|
iconUrl: "https://unpkg.com/leaflet@1.9.4/dist/images/marker-icon.png",
|
|
2637
2920
|
iconRetinaUrl: "https://unpkg.com/leaflet@1.9.4/dist/images/marker-icon-2x.png",
|
|
@@ -2644,29 +2927,41 @@ var defaultIcon = L__default.default.icon({
|
|
|
2644
2927
|
L__default.default.Marker.prototype.options.icon = defaultIcon;
|
|
2645
2928
|
|
|
2646
2929
|
// lib/verificationRegistry.ts
|
|
2647
|
-
var checks = /* @__PURE__ */ new Map();
|
|
2648
|
-
var transitions = [];
|
|
2649
2930
|
var MAX_TRANSITIONS = 500;
|
|
2650
|
-
|
|
2931
|
+
function getState() {
|
|
2932
|
+
if (typeof window !== "undefined") {
|
|
2933
|
+
const w = window;
|
|
2934
|
+
if (!w.__verificationRegistryState) {
|
|
2935
|
+
w.__verificationRegistryState = {
|
|
2936
|
+
checks: /* @__PURE__ */ new Map(),
|
|
2937
|
+
transitions: [],
|
|
2938
|
+
bridgeHealth: null,
|
|
2939
|
+
listeners: /* @__PURE__ */ new Set()
|
|
2940
|
+
};
|
|
2941
|
+
}
|
|
2942
|
+
return w.__verificationRegistryState;
|
|
2943
|
+
}
|
|
2944
|
+
return { checks: /* @__PURE__ */ new Map(), transitions: [], bridgeHealth: null, listeners: /* @__PURE__ */ new Set() };
|
|
2945
|
+
}
|
|
2651
2946
|
function notifyListeners() {
|
|
2652
|
-
listeners.forEach((l) => l());
|
|
2947
|
+
getState().listeners.forEach((l) => l());
|
|
2653
2948
|
exposeOnWindow();
|
|
2654
2949
|
}
|
|
2655
2950
|
function registerCheck(id, label, status = "pending", details) {
|
|
2656
|
-
checks.set(id, { id, label, status, details, updatedAt: Date.now() });
|
|
2951
|
+
getState().checks.set(id, { id, label, status, details, updatedAt: Date.now() });
|
|
2657
2952
|
notifyListeners();
|
|
2658
2953
|
}
|
|
2659
2954
|
function getAllChecks() {
|
|
2660
|
-
return Array.from(checks.values());
|
|
2955
|
+
return Array.from(getState().checks.values());
|
|
2661
2956
|
}
|
|
2662
2957
|
function recordTransition(trace) {
|
|
2663
2958
|
const entry = {
|
|
2664
2959
|
...trace,
|
|
2665
2960
|
id: `t-${Date.now()}-${Math.random().toString(36).slice(2, 9)}`
|
|
2666
2961
|
};
|
|
2667
|
-
transitions.push(entry);
|
|
2668
|
-
if (transitions.length > MAX_TRANSITIONS) {
|
|
2669
|
-
transitions.shift();
|
|
2962
|
+
getState().transitions.push(entry);
|
|
2963
|
+
if (getState().transitions.length > MAX_TRANSITIONS) {
|
|
2964
|
+
getState().transitions.shift();
|
|
2670
2965
|
}
|
|
2671
2966
|
if (entry.event === "INIT") {
|
|
2672
2967
|
const hasFetch = entry.effects.some((e) => e.type === "fetch");
|
|
@@ -2701,10 +2996,11 @@ function recordTransition(trace) {
|
|
|
2701
2996
|
notifyListeners();
|
|
2702
2997
|
}
|
|
2703
2998
|
function getTransitions() {
|
|
2704
|
-
return [...transitions];
|
|
2999
|
+
return [...getState().transitions];
|
|
2705
3000
|
}
|
|
2706
3001
|
function getBridgeHealth() {
|
|
2707
|
-
|
|
3002
|
+
const bh = getState().bridgeHealth;
|
|
3003
|
+
return bh ? { ...bh } : null;
|
|
2708
3004
|
}
|
|
2709
3005
|
function getSummary() {
|
|
2710
3006
|
const allChecks = getAllChecks();
|
|
@@ -2725,8 +3021,8 @@ function getSnapshot() {
|
|
|
2725
3021
|
};
|
|
2726
3022
|
}
|
|
2727
3023
|
function subscribeToVerification(listener) {
|
|
2728
|
-
listeners.add(listener);
|
|
2729
|
-
return () => listeners.delete(listener);
|
|
3024
|
+
getState().listeners.add(listener);
|
|
3025
|
+
return () => getState().listeners.delete(listener);
|
|
2730
3026
|
}
|
|
2731
3027
|
function exposeOnWindow() {
|
|
2732
3028
|
if (typeof window === "undefined") return;
|
|
@@ -2743,7 +3039,7 @@ function exposeOnWindow() {
|
|
|
2743
3039
|
}
|
|
2744
3040
|
function waitForTransition(event, timeoutMs = 1e4) {
|
|
2745
3041
|
return new Promise((resolve) => {
|
|
2746
|
-
const existing = transitions.find((t) => t.event === event);
|
|
3042
|
+
const existing = getState().transitions.find((t) => t.event === event);
|
|
2747
3043
|
if (existing) {
|
|
2748
3044
|
resolve(existing);
|
|
2749
3045
|
return;
|
|
@@ -2753,7 +3049,7 @@ function waitForTransition(event, timeoutMs = 1e4) {
|
|
|
2753
3049
|
resolve(null);
|
|
2754
3050
|
}, timeoutMs);
|
|
2755
3051
|
const unsub = subscribeToVerification(() => {
|
|
2756
|
-
const found = transitions.find((t) => t.event === event);
|
|
3052
|
+
const found = getState().transitions.find((t) => t.event === event);
|
|
2757
3053
|
if (found) {
|
|
2758
3054
|
clearTimeout(timeout);
|
|
2759
3055
|
unsub();
|
|
@@ -2796,7 +3092,7 @@ function bindTraitStateGetter(getter) {
|
|
|
2796
3092
|
}
|
|
2797
3093
|
}
|
|
2798
3094
|
exposeOnWindow();
|
|
2799
|
-
var MarkdownContent =
|
|
3095
|
+
var MarkdownContent = React112__namespace.default.memo(
|
|
2800
3096
|
({ content, direction, className }) => {
|
|
2801
3097
|
const { t: _t } = useTranslate();
|
|
2802
3098
|
const safeContent = typeof content === "string" ? content : String(content ?? "");
|
|
@@ -2883,7 +3179,7 @@ var MarkdownContent = React110__namespace.default.memo(
|
|
|
2883
3179
|
"blockquote",
|
|
2884
3180
|
{
|
|
2885
3181
|
...props,
|
|
2886
|
-
className: "border-l-4 border-blue-500 pl-4 italic text-
|
|
3182
|
+
className: "border-l-4 border-blue-500 pl-4 italic text-foreground my-4",
|
|
2887
3183
|
children
|
|
2888
3184
|
}
|
|
2889
3185
|
);
|
|
@@ -2898,7 +3194,7 @@ var MarkdownContent = React110__namespace.default.memo(
|
|
|
2898
3194
|
(prev, next) => prev.content === next.content && prev.className === next.className && prev.direction === next.direction
|
|
2899
3195
|
);
|
|
2900
3196
|
MarkdownContent.displayName = "MarkdownContent";
|
|
2901
|
-
var CodeBlock =
|
|
3197
|
+
var CodeBlock = React112__namespace.default.memo(
|
|
2902
3198
|
({
|
|
2903
3199
|
code: rawCode,
|
|
2904
3200
|
language = "text",
|
|
@@ -2910,20 +3206,20 @@ var CodeBlock = React110__namespace.default.memo(
|
|
|
2910
3206
|
const code = typeof rawCode === "string" ? rawCode : String(rawCode ?? "");
|
|
2911
3207
|
const eventBus = useEventBus();
|
|
2912
3208
|
const { t: _t } = useTranslate();
|
|
2913
|
-
const scrollRef =
|
|
2914
|
-
const savedScrollLeftRef =
|
|
2915
|
-
const [copied, setCopied] =
|
|
2916
|
-
|
|
3209
|
+
const scrollRef = React112.useRef(null);
|
|
3210
|
+
const savedScrollLeftRef = React112.useRef(0);
|
|
3211
|
+
const [copied, setCopied] = React112.useState(false);
|
|
3212
|
+
React112.useLayoutEffect(() => {
|
|
2917
3213
|
const el = scrollRef.current;
|
|
2918
3214
|
return () => {
|
|
2919
3215
|
if (el) savedScrollLeftRef.current = el.scrollLeft;
|
|
2920
3216
|
};
|
|
2921
3217
|
}, [language, code]);
|
|
2922
|
-
|
|
3218
|
+
React112.useLayoutEffect(() => {
|
|
2923
3219
|
const el = scrollRef.current;
|
|
2924
3220
|
if (el) el.scrollLeft = savedScrollLeftRef.current;
|
|
2925
3221
|
}, [language, code]);
|
|
2926
|
-
|
|
3222
|
+
React112.useEffect(() => {
|
|
2927
3223
|
const el = scrollRef.current;
|
|
2928
3224
|
if (!el) return;
|
|
2929
3225
|
const handle = () => {
|
|
@@ -2958,7 +3254,7 @@ var CodeBlock = React110__namespace.default.memo(
|
|
|
2958
3254
|
variant: "ghost",
|
|
2959
3255
|
size: "sm",
|
|
2960
3256
|
onClick: handleCopy,
|
|
2961
|
-
className: "opacity-0 group-hover:opacity-100 focus:opacity-100 transition-opacity text-
|
|
3257
|
+
className: "opacity-0 group-hover:opacity-100 focus:opacity-100 transition-opacity text-muted-foreground hover:text-white",
|
|
2962
3258
|
"aria-label": "Copy code",
|
|
2963
3259
|
children: copied ? /* @__PURE__ */ jsxRuntime.jsx(LucideIcons.Check, { size: 16, className: "text-green-400" }) : /* @__PURE__ */ jsxRuntime.jsx(LucideIcons.Copy, { size: 16 })
|
|
2964
3260
|
}
|
|
@@ -3009,18 +3305,18 @@ CodeBlock.displayName = "CodeBlock";
|
|
|
3009
3305
|
|
|
3010
3306
|
// lib/debug.ts
|
|
3011
3307
|
typeof window !== "undefined" && (localStorage.getItem("debug") === "true" || process.env.NODE_ENV === "development");
|
|
3012
|
-
|
|
3013
|
-
var GameAudioContext =
|
|
3308
|
+
React112.lazy(() => import('react-markdown'));
|
|
3309
|
+
var GameAudioContext = React112.createContext(null);
|
|
3014
3310
|
GameAudioContext.displayName = "GameAudioContext";
|
|
3015
3311
|
|
|
3016
3312
|
// components/organisms/component-registry.generated.ts
|
|
3017
3313
|
function lazyThree(name, loader) {
|
|
3018
|
-
const Lazy =
|
|
3314
|
+
const Lazy = React112__namespace.default.lazy(() => loader().then((m) => ({ default: m[name] })));
|
|
3019
3315
|
function ThreeWrapper(props) {
|
|
3020
|
-
return
|
|
3021
|
-
|
|
3316
|
+
return React112__namespace.default.createElement(
|
|
3317
|
+
React112__namespace.default.Suspense,
|
|
3022
3318
|
{ fallback: null },
|
|
3023
|
-
|
|
3319
|
+
React112__namespace.default.createElement(Lazy, props)
|
|
3024
3320
|
);
|
|
3025
3321
|
}
|
|
3026
3322
|
ThreeWrapper.displayName = `Lazy(${name})`;
|
|
@@ -3041,13 +3337,13 @@ lazyThree("PhysicsObject3D", () => import('@almadar/ui/components/organisms/game
|
|
|
3041
3337
|
lazyThree("Scene3D", () => import('@almadar/ui/components/organisms/game/three'));
|
|
3042
3338
|
lazyThree("TileRenderer", () => import('@almadar/ui/components/organisms/game/three'));
|
|
3043
3339
|
lazyThree("UnitRenderer", () => import('@almadar/ui/components/organisms/game/three'));
|
|
3044
|
-
var SuspenseConfigContext =
|
|
3045
|
-
|
|
3340
|
+
var SuspenseConfigContext = React112.createContext({ enabled: false });
|
|
3341
|
+
React112.createContext(false);
|
|
3046
3342
|
function SuspenseConfigProvider({
|
|
3047
3343
|
config,
|
|
3048
3344
|
children
|
|
3049
3345
|
}) {
|
|
3050
|
-
return
|
|
3346
|
+
return React112__namespace.default.createElement(
|
|
3051
3347
|
SuspenseConfigContext.Provider,
|
|
3052
3348
|
{ value: config },
|
|
3053
3349
|
children
|
|
@@ -3092,8 +3388,8 @@ function VerificationProvider({
|
|
|
3092
3388
|
}) {
|
|
3093
3389
|
const isEnabled = enabled ?? (typeof process !== "undefined" && process.env?.NODE_ENV !== "production");
|
|
3094
3390
|
const eventBus = useEventBus();
|
|
3095
|
-
const pendingRef =
|
|
3096
|
-
|
|
3391
|
+
const pendingRef = React112.useRef(/* @__PURE__ */ new Map());
|
|
3392
|
+
React112.useEffect(() => {
|
|
3097
3393
|
if (!isEnabled) return;
|
|
3098
3394
|
if (!eventBus.onAny) return;
|
|
3099
3395
|
const unsub = eventBus.onAny((evt) => {
|
|
@@ -3120,7 +3416,7 @@ function VerificationProvider({
|
|
|
3120
3416
|
})) : [];
|
|
3121
3417
|
recordTransition({
|
|
3122
3418
|
traitName: parsed.traitName,
|
|
3123
|
-
from: pending?.from ?? "unknown",
|
|
3419
|
+
from: pending?.from ?? (parsed.event === "INIT" ? "init" : "unknown"),
|
|
3124
3420
|
to: newState,
|
|
3125
3421
|
event: parsed.event,
|
|
3126
3422
|
effects,
|
|
@@ -3154,7 +3450,7 @@ function VerificationProvider({
|
|
|
3154
3450
|
);
|
|
3155
3451
|
return unsub;
|
|
3156
3452
|
}, [isEnabled, eventBus]);
|
|
3157
|
-
|
|
3453
|
+
React112.useEffect(() => {
|
|
3158
3454
|
if (!isEnabled) return;
|
|
3159
3455
|
if (!runtimeManager) return;
|
|
3160
3456
|
runtimeManager.setObserver({
|
|
@@ -3176,11 +3472,11 @@ function VerificationProvider({
|
|
|
3176
3472
|
"pass"
|
|
3177
3473
|
);
|
|
3178
3474
|
}, [isEnabled, runtimeManager]);
|
|
3179
|
-
|
|
3475
|
+
React112.useEffect(() => {
|
|
3180
3476
|
if (!isEnabled) return;
|
|
3181
3477
|
bindEventBus(eventBus);
|
|
3182
3478
|
}, [isEnabled, eventBus]);
|
|
3183
|
-
|
|
3479
|
+
React112.useEffect(() => {
|
|
3184
3480
|
if (!isEnabled) return;
|
|
3185
3481
|
if (traitStateGetter) {
|
|
3186
3482
|
bindTraitStateGetter(traitStateGetter);
|
|
@@ -3204,7 +3500,7 @@ function OrbitalProvider({
|
|
|
3204
3500
|
suspense = false,
|
|
3205
3501
|
verification
|
|
3206
3502
|
}) {
|
|
3207
|
-
const suspenseConfig =
|
|
3503
|
+
const suspenseConfig = React112.useMemo(
|
|
3208
3504
|
() => ({ enabled: suspense }),
|
|
3209
3505
|
[suspense]
|
|
3210
3506
|
);
|
|
@@ -3224,43 +3520,43 @@ function OrbitalProvider({
|
|
|
3224
3520
|
);
|
|
3225
3521
|
}
|
|
3226
3522
|
OrbitalProvider.displayName = "OrbitalProvider";
|
|
3227
|
-
var FetchedDataContext =
|
|
3523
|
+
var FetchedDataContext = React112.createContext(null);
|
|
3228
3524
|
function FetchedDataProvider({
|
|
3229
3525
|
initialData,
|
|
3230
3526
|
children
|
|
3231
3527
|
}) {
|
|
3232
|
-
const [state, setState] =
|
|
3528
|
+
const [state, setState] = React112.useState(() => ({
|
|
3233
3529
|
data: initialData || {},
|
|
3234
3530
|
fetchedAt: {},
|
|
3235
3531
|
loading: false,
|
|
3236
3532
|
error: null
|
|
3237
3533
|
}));
|
|
3238
|
-
const getData =
|
|
3534
|
+
const getData = React112.useCallback(
|
|
3239
3535
|
(entityName) => {
|
|
3240
3536
|
return state.data[entityName] || [];
|
|
3241
3537
|
},
|
|
3242
3538
|
[state.data]
|
|
3243
3539
|
);
|
|
3244
|
-
const getById =
|
|
3540
|
+
const getById = React112.useCallback(
|
|
3245
3541
|
(entityName, id) => {
|
|
3246
3542
|
const records = state.data[entityName];
|
|
3247
3543
|
return records?.find((r) => r.id === id);
|
|
3248
3544
|
},
|
|
3249
3545
|
[state.data]
|
|
3250
3546
|
);
|
|
3251
|
-
const hasData =
|
|
3547
|
+
const hasData = React112.useCallback(
|
|
3252
3548
|
(entityName) => {
|
|
3253
3549
|
return entityName in state.data && state.data[entityName].length > 0;
|
|
3254
3550
|
},
|
|
3255
3551
|
[state.data]
|
|
3256
3552
|
);
|
|
3257
|
-
const getFetchedAt =
|
|
3553
|
+
const getFetchedAt = React112.useCallback(
|
|
3258
3554
|
(entityName) => {
|
|
3259
3555
|
return state.fetchedAt[entityName];
|
|
3260
3556
|
},
|
|
3261
3557
|
[state.fetchedAt]
|
|
3262
3558
|
);
|
|
3263
|
-
const setData =
|
|
3559
|
+
const setData = React112.useCallback((data) => {
|
|
3264
3560
|
const now = Date.now();
|
|
3265
3561
|
setState((prev) => ({
|
|
3266
3562
|
...prev,
|
|
@@ -3279,14 +3575,14 @@ function FetchedDataProvider({
|
|
|
3279
3575
|
error: null
|
|
3280
3576
|
}));
|
|
3281
3577
|
}, []);
|
|
3282
|
-
const clearData =
|
|
3578
|
+
const clearData = React112.useCallback(() => {
|
|
3283
3579
|
setState((prev) => ({
|
|
3284
3580
|
...prev,
|
|
3285
3581
|
data: {},
|
|
3286
3582
|
fetchedAt: {}
|
|
3287
3583
|
}));
|
|
3288
3584
|
}, []);
|
|
3289
|
-
const clearEntity =
|
|
3585
|
+
const clearEntity = React112.useCallback((entityName) => {
|
|
3290
3586
|
setState((prev) => {
|
|
3291
3587
|
const newData = { ...prev.data };
|
|
3292
3588
|
const newFetchedAt = { ...prev.fetchedAt };
|
|
@@ -3299,13 +3595,13 @@ function FetchedDataProvider({
|
|
|
3299
3595
|
};
|
|
3300
3596
|
});
|
|
3301
3597
|
}, []);
|
|
3302
|
-
const setLoading =
|
|
3598
|
+
const setLoading = React112.useCallback((loading) => {
|
|
3303
3599
|
setState((prev) => ({ ...prev, loading }));
|
|
3304
3600
|
}, []);
|
|
3305
|
-
const setError =
|
|
3601
|
+
const setError = React112.useCallback((error) => {
|
|
3306
3602
|
setState((prev) => ({ ...prev, error, loading: false }));
|
|
3307
3603
|
}, []);
|
|
3308
|
-
const contextValue =
|
|
3604
|
+
const contextValue = React112.useMemo(
|
|
3309
3605
|
() => ({
|
|
3310
3606
|
getData,
|
|
3311
3607
|
getById,
|
|
@@ -3336,10 +3632,10 @@ function FetchedDataProvider({
|
|
|
3336
3632
|
return /* @__PURE__ */ jsxRuntime.jsx(FetchedDataContext.Provider, { value: contextValue, children });
|
|
3337
3633
|
}
|
|
3338
3634
|
function useFetchedDataContext() {
|
|
3339
|
-
return
|
|
3635
|
+
return React112.useContext(FetchedDataContext);
|
|
3340
3636
|
}
|
|
3341
3637
|
function useFetchedData() {
|
|
3342
|
-
const context =
|
|
3638
|
+
const context = React112.useContext(FetchedDataContext);
|
|
3343
3639
|
if (!context) {
|
|
3344
3640
|
return {
|
|
3345
3641
|
getData: () => [],
|
|
@@ -3379,15 +3675,15 @@ function useFetchedEntity(entityName) {
|
|
|
3379
3675
|
error: context.error
|
|
3380
3676
|
};
|
|
3381
3677
|
}
|
|
3382
|
-
var OfflineModeContext =
|
|
3678
|
+
var OfflineModeContext = React112.createContext(null);
|
|
3383
3679
|
function OfflineModeProvider({
|
|
3384
3680
|
children,
|
|
3385
3681
|
...executorOptions
|
|
3386
3682
|
}) {
|
|
3387
|
-
const [forceOffline, setForceOffline] =
|
|
3683
|
+
const [forceOffline, setForceOffline] = React112.useState(false);
|
|
3388
3684
|
const executor = useOfflineExecutor(executorOptions);
|
|
3389
3685
|
const effectivelyOffline = executor.isOffline || forceOffline;
|
|
3390
|
-
const contextValue =
|
|
3686
|
+
const contextValue = React112.useMemo(
|
|
3391
3687
|
() => ({
|
|
3392
3688
|
...executor,
|
|
3393
3689
|
forceOffline,
|
|
@@ -3399,14 +3695,14 @@ function OfflineModeProvider({
|
|
|
3399
3695
|
return /* @__PURE__ */ jsxRuntime.jsx(OfflineModeContext.Provider, { value: contextValue, children });
|
|
3400
3696
|
}
|
|
3401
3697
|
function useOfflineMode() {
|
|
3402
|
-
const context =
|
|
3698
|
+
const context = React112.useContext(OfflineModeContext);
|
|
3403
3699
|
if (!context) {
|
|
3404
3700
|
throw new Error("useOfflineMode must be used within OfflineModeProvider");
|
|
3405
3701
|
}
|
|
3406
3702
|
return context;
|
|
3407
3703
|
}
|
|
3408
3704
|
function useOptionalOfflineMode() {
|
|
3409
|
-
return
|
|
3705
|
+
return React112.useContext(OfflineModeContext);
|
|
3410
3706
|
}
|
|
3411
3707
|
|
|
3412
3708
|
exports.EventBusContext = EventBusContext2;
|