@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.
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var React110 = require('react');
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 React110__namespace = /*#__PURE__*/_interopNamespace(React110);
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 = React110.createContext(void 0);
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 = React110.useMemo(() => {
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] = React110.useState(() => {
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] = React110.useState(() => {
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] = React110.useState(
203
+ const [resolvedMode, setResolvedMode] = React112.useState(
204
204
  () => resolveMode(mode)
205
205
  );
206
- const appliedTheme = React110.useMemo(
206
+ const appliedTheme = React112.useMemo(
207
207
  () => `${theme}-${resolvedMode}`,
208
208
  [theme, resolvedMode]
209
209
  );
210
- React110.useEffect(() => {
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
- React110.useEffect(() => {
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 = React110.useCallback(
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 = React110.useCallback((newMode) => {
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 = React110.useCallback(() => {
259
+ const toggleMode = React112.useCallback(() => {
260
260
  const newMode = resolvedMode === "dark" ? "light" : "dark";
261
261
  setMode(newMode);
262
262
  }, [resolvedMode, setMode]);
263
- const contextValue = React110.useMemo(
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 = React110.useContext(providers.EventBusContext);
359
+ const context = React112.useContext(providers.EventBusContext);
360
360
  return context ?? getGlobalEventBus() ?? fallbackEventBus;
361
361
  }
362
- var EventBusContext2 = React110.createContext(null);
362
+ var EventBusContext2 = React112.createContext(null);
363
363
  function EventBusProvider({ children, debug: debug2 = false }) {
364
- const listenersRef = React110.useRef(/* @__PURE__ */ new Map());
365
- const anyListenersRef = React110.useRef(/* @__PURE__ */ new Set());
366
- const deprecationWarningShown = React110.useRef(false);
367
- const getSelectedEntity = React110.useCallback(() => {
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 = React110.useCallback(() => {
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 = React110.useCallback((type, payload) => {
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 listeners7 = listenersRef.current.get(type);
391
- const listenerCount = listeners7?.size ?? 0;
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 (listeners7) {
400
- const listenersCopy = Array.from(listeners7);
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 = React110.useCallback((type, listener) => {
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 listeners7 = listenersRef.current.get(type);
423
- listeners7.add(listener);
422
+ const listeners6 = listenersRef.current.get(type);
423
+ listeners6.add(listener);
424
424
  if (debug2) {
425
- console.log(`[EventBus] Subscribed to '${type}', total: ${listeners7.size}`);
425
+ console.log(`[EventBus] Subscribed to '${type}', total: ${listeners6.size}`);
426
426
  }
427
427
  return () => {
428
- listeners7.delete(listener);
428
+ listeners6.delete(listener);
429
429
  if (debug2) {
430
- console.log(`[EventBus] Unsubscribed from '${type}', remaining: ${listeners7.size}`);
430
+ console.log(`[EventBus] Unsubscribed from '${type}', remaining: ${listeners6.size}`);
431
431
  }
432
- if (listeners7.size === 0) {
432
+ if (listeners6.size === 0) {
433
433
  listenersRef.current.delete(type);
434
434
  }
435
435
  };
436
436
  }, [debug2]);
437
- const once = React110.useCallback((type, listener) => {
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 = React110.useCallback((type) => {
445
- const listeners7 = listenersRef.current.get(type);
446
- return listeners7 !== void 0 && listeners7.size > 0;
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 = React110.useCallback((listener) => {
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 = React110.useMemo(
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
- React110.useEffect(() => {
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 = React110.createContext(null);
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] = React110.useState(null);
498
- const setSelected = React110.useCallback(
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 = React110.useCallback(() => {
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 = React110.useCallback(
513
+ const isSelected = React112.useCallback(
514
514
  (entity) => {
515
515
  return compareEntities(selected, entity);
516
516
  },
517
517
  [selected, compareEntities]
518
518
  );
519
- React110.useEffect(() => {
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 = React110.useContext(SelectionContext);
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 = React110.useContext(SelectionContext);
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-[var(--color-primary)] text-[var(--color-primary-foreground)]",
665
- secondary: "bg-[var(--color-secondary)] text-[var(--color-secondary-foreground)]",
666
- muted: "bg-[var(--color-muted)] text-[var(--color-foreground)]",
667
- accent: "bg-[var(--color-accent)] text-[var(--color-accent-foreground)]",
668
- surface: "bg-[var(--color-card)]",
669
- overlay: "bg-[var(--color-card)]/80 backdrop-blur-sm"
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-[var(--radius-sm)]",
674
- md: "rounded-[var(--radius-md)]",
675
- lg: "rounded-[var(--radius-lg)]",
676
- xl: "rounded-[var(--radius-xl)]",
677
- "2xl": "rounded-[var(--radius-xl)]",
678
- full: "rounded-[var(--radius-full)]"
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-[var(--shadow-sm)]",
683
- md: "shadow-[var(--shadow-main)]",
684
- lg: "shadow-[var(--shadow-lg)]",
685
- xl: "shadow-[var(--shadow-lg)]"
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 = React110__namespace.default.forwardRef(
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 = React110.useCallback((e) => {
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 = React110.useCallback((e) => {
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 = React110.useCallback((e) => {
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-[var(--color-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-[var(--color-foreground)]",
803
- h2: "text-3xl font-bold tracking-tight text-[var(--color-foreground)]",
804
- h3: "text-2xl font-bold text-[var(--color-foreground)]",
805
- h4: "text-xl font-bold text-[var(--color-foreground)]",
806
- h5: "text-lg font-bold text-[var(--color-foreground)]",
807
- h6: "text-base font-bold text-[var(--color-foreground)]",
808
- heading: "text-2xl font-bold text-[var(--color-foreground)]",
809
- subheading: "text-lg font-semibold text-[var(--color-foreground)]",
810
- body1: "text-base font-normal text-[var(--color-foreground)]",
811
- body2: "text-sm font-normal text-[var(--color-foreground)]",
812
- body: "text-base font-normal text-[var(--color-foreground)]",
813
- caption: "text-xs font-normal text-[var(--color-muted-foreground)]",
814
- overline: "text-xs uppercase tracking-wide font-bold text-[var(--color-muted-foreground)]",
815
- small: "text-sm font-normal text-[var(--color-foreground)]",
816
- large: "text-lg font-medium text-[var(--color-foreground)]",
817
- label: "text-sm font-medium text-[var(--color-foreground)]"
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-[var(--color-foreground)]",
821
- secondary: "text-[var(--color-muted-foreground)]",
822
- muted: "text-[var(--color-muted-foreground)]",
823
- error: "text-[var(--color-error)]",
824
- success: "text-[var(--color-success)]",
825
- warning: "text-[var(--color-warning)]",
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-[var(--color-primary)] text-[var(--color-primary-foreground)]",
910
+ "bg-primary text-primary-foreground",
911
911
  "border-none",
912
- "shadow-[var(--shadow-sm)]",
913
- "hover:bg-[var(--color-primary-hover)] hover:shadow-[var(--shadow-hover)]",
914
- "active:scale-[var(--active-scale)] active:shadow-[var(--shadow-active)]"
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-[var(--color-accent)]",
918
- "border border-[var(--color-accent)]",
919
- "hover:bg-[var(--color-accent)] hover:text-white hover:border-[var(--color-accent)]",
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-[var(--color-muted-foreground)]",
924
- "hover:text-[var(--color-foreground)] hover:bg-[var(--color-muted)]",
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-[var(--color-surface)] text-[var(--color-error)]",
929
- "border-[length:var(--border-width)] border-[var(--color-error)]",
930
- "shadow-[var(--shadow-sm)]",
931
- "hover:bg-[var(--color-error)] hover:text-[var(--color-error-foreground)] hover:shadow-[var(--shadow-hover)]",
932
- "active:scale-[var(--active-scale)] active:shadow-[var(--shadow-active)]"
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-[var(--color-surface)] text-[var(--color-success)]",
936
- "border-[length:var(--border-width)] border-[var(--color-success)]",
937
- "shadow-[var(--shadow-sm)]",
938
- "hover:bg-[var(--color-success)] hover:text-[var(--color-success-foreground)] hover:shadow-[var(--shadow-hover)]",
939
- "active:scale-[var(--active-scale)] active:shadow-[var(--shadow-active)]"
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-[var(--color-surface)] text-[var(--color-warning)]",
943
- "border-[length:var(--border-width)] border-[var(--color-warning)]",
944
- "shadow-[var(--shadow-sm)]",
945
- "hover:bg-[var(--color-warning)] hover:text-[var(--color-warning-foreground)] hover:shadow-[var(--shadow-hover)]",
946
- "active:scale-[var(--active-scale)] active:shadow-[var(--shadow-active)]"
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-[var(--color-secondary)] text-[var(--color-secondary-foreground)]",
951
- "border-[length:var(--border-width-thin)] border-[var(--color-border)]",
952
- "hover:bg-[var(--color-secondary-hover)]",
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 (React110__namespace.default.isValidElement(value)) {
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 = React110__namespace.default.forwardRef(
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-[var(--radius-sm)]",
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-[var(--color-ring)] focus:ring-offset-[length:var(--focus-ring-offset)]",
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-[var(--color-muted)] text-[var(--color-foreground)]",
1048
- "border-[length:var(--border-width-thin)] border-[var(--color-border)]"
1047
+ "bg-muted text-foreground",
1048
+ "border-[length:var(--border-width-thin)] border-border"
1049
1049
  ].join(" "),
1050
- primary: "bg-[var(--color-primary)] text-[var(--color-primary-foreground)]",
1051
- secondary: "bg-[var(--color-secondary)] text-[var(--color-secondary-foreground)]",
1050
+ primary: "bg-primary text-primary-foreground",
1051
+ secondary: "bg-secondary text-secondary-foreground",
1052
1052
  success: [
1053
- "bg-[var(--color-surface)] text-[var(--color-success)]",
1054
- "border-[length:var(--border-width)] border-[var(--color-success)]"
1053
+ "bg-surface text-success",
1054
+ "border-[length:var(--border-width)] border-success"
1055
1055
  ].join(" "),
1056
1056
  warning: [
1057
- "bg-[var(--color-surface)] text-[var(--color-warning)]",
1058
- "border-[length:var(--border-width)] border-[var(--color-warning)]"
1057
+ "bg-surface text-warning",
1058
+ "border-[length:var(--border-width)] border-warning"
1059
1059
  ].join(" "),
1060
1060
  danger: [
1061
- "bg-[var(--color-surface)] text-[var(--color-error)]",
1062
- "border-[length:var(--border-width)] border-[var(--color-error)]"
1061
+ "bg-surface text-error",
1062
+ "border-[length:var(--border-width)] border-error"
1063
1063
  ].join(" "),
1064
1064
  error: [
1065
- "bg-[var(--color-surface)] text-[var(--color-error)]",
1066
- "border-[length:var(--border-width)] border-[var(--color-error)]"
1065
+ "bg-surface text-error",
1066
+ "border-[length:var(--border-width)] border-error"
1067
1067
  ].join(" "),
1068
1068
  info: [
1069
- "bg-[var(--color-surface)] text-[var(--color-info)]",
1070
- "border-[length:var(--border-width)] border-[var(--color-info)]"
1069
+ "bg-surface text-info",
1070
+ "border-[length:var(--border-width)] border-info"
1071
1071
  ].join(" "),
1072
1072
  neutral: [
1073
- "bg-[var(--color-muted)] text-[var(--color-muted-foreground)]",
1074
- "border-[length:var(--border-width-thin)] border-[var(--color-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 = React110__namespace.default.forwardRef(
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-[var(--radius-sm)]",
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 = React110__namespace.default.forwardRef(
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-[var(--radius-sm)] transition-all duration-[var(--transition-fast)]",
1131
- "border-[length:var(--border-width-thin)] border-[var(--color-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-[var(--color-card)] hover:bg-[var(--color-muted)] focus:bg-[var(--color-card)]",
1134
- "text-[var(--color-foreground)] placeholder:text-[var(--color-muted-foreground)]",
1135
- "focus:outline-none focus:ring-1 focus:ring-[var(--color-ring)] focus:border-[var(--color-ring)]",
1136
- "disabled:opacity-50 disabled:cursor-not-allowed disabled:bg-[var(--color-muted)]",
1137
- error ? "border-[var(--color-error)] focus:border-[var(--color-error)] focus:ring-[var(--color-error)]" : "",
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-[var(--color-muted-foreground)]", children: resolvedLeftIcon }),
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-[var(--color-muted-foreground)]", children: /* @__PURE__ */ jsxRuntime.jsx(LucideIcons.ChevronDown, { className: "h-4 w-4" }) })
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-[var(--radius-sm)]",
1185
- "border-[var(--color-border)]",
1186
- "text-[var(--color-primary)] focus:ring-[var(--color-ring)]",
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-[var(--color-muted-foreground)]", children: resolvedLeftIcon }),
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-[var(--color-muted-foreground)] hover:text-[var(--color-foreground)]",
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-[var(--color-muted-foreground)]", children: rightIcon })
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 = React110__namespace.default.forwardRef(
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-[var(--color-foreground)]",
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-[var(--color-error)] ml-1", children: "*" })
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 = React110__namespace.default.forwardRef(
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-[var(--shadow-sm)]",
1249
- "px-3 py-2 text-sm text-[var(--color-foreground)]",
1250
- "bg-[var(--color-card)]",
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-[var(--color-ring)]",
1253
- "disabled:bg-[var(--color-muted)] disabled:text-[var(--color-muted-foreground)] disabled:cursor-not-allowed",
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-[var(--color-error)] focus:border-[var(--color-error)]" : "border-[var(--color-border)] focus:border-[var(--color-primary)]",
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 = React110__namespace.default.forwardRef(
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-[var(--shadow-sm)] appearance-none",
1273
- "px-3 py-2 pr-10 text-sm text-[var(--color-foreground)] font-medium",
1274
- "bg-[var(--color-card)]",
1275
- "focus:outline-none focus:ring-2 focus:ring-offset-0 focus:ring-[var(--color-ring)]",
1276
- "disabled:bg-[var(--color-muted)] disabled:text-[var(--color-muted-foreground)] disabled:cursor-not-allowed",
1277
- error ? "border-[var(--color-error)] focus:border-[var(--color-error)]" : "border-[var(--color-border)] focus:border-[var(--color-primary)]",
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-[var(--color-foreground)]" }) })
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 = React110__namespace.default.forwardRef(
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-[var(--color-border)]",
1312
- "accent-[var(--color-primary)] focus:ring-[var(--color-ring)] focus:ring-offset-0",
1313
- "bg-[var(--color-card)] checked:bg-[var(--color-primary)]",
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-[var(--color-foreground)] font-medium cursor-pointer select-none",
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-[var(--color-card)]",
1335
- "border-[length:var(--border-width)] border-[var(--color-border)]",
1336
- "shadow-[var(--shadow-sm)]",
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-[var(--shadow-hover)] hover:-translate-y-0.5"
1338
+ "hover:shadow-lg hover:-translate-y-0.5"
1339
1339
  ].join(" "),
1340
1340
  bordered: [
1341
- "bg-[var(--color-card)]",
1342
- "border-[length:var(--border-width)] border-[var(--color-border)]",
1343
- "shadow-[var(--shadow-sm)]",
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-[var(--shadow-hover)] hover:-translate-y-0.5"
1345
+ "hover:shadow-lg hover:-translate-y-0.5"
1346
1346
  ].join(" "),
1347
1347
  elevated: [
1348
- "bg-[var(--color-card)]",
1349
- "border-[length:var(--border-width)] border-[var(--color-border)]",
1350
- "shadow-[var(--shadow-main)]",
1348
+ "bg-card",
1349
+ "border-[length:var(--border-width)] border-border",
1350
+ "shadow",
1351
1351
  "transition-all duration-[var(--transition-normal)]",
1352
- "hover:shadow-[var(--shadow-hover)] hover:-translate-y-0.5"
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-[var(--color-card)]",
1357
- "border-[length:var(--border-width)] border-[var(--color-border)]",
1358
- "shadow-[var(--shadow-main)]",
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-[var(--shadow-hover)]"
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-[var(--shadow-sm)]",
1373
- md: "shadow-[var(--shadow-main)]",
1374
- lg: "shadow-[var(--shadow-lg)]"
1372
+ sm: "shadow-sm",
1373
+ md: "shadow",
1374
+ lg: "shadow-lg"
1375
1375
  };
1376
- var Card = React110__namespace.default.forwardRef(
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-[var(--radius-md)]",
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-[var(--color-card-foreground)] font-[var(--font-weight-bold)]", children: title }),
1403
- subtitle && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-[var(--color-muted-foreground)] mt-1", children: subtitle })
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 = React110__namespace.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cn("mb-4", className), ...props }));
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 = React110__namespace.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
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-[var(--color-card-foreground)]",
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 = React110__namespace.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cn("", className), ...props }));
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 = React110__namespace.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
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 = React110__namespace.default.forwardRef(
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-[var(--color-foreground)]", className),
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 = React110__namespace.default.forwardRef(
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-[var(--color-error)] peer-focus:ring-[var(--color-error)]/20" : "border-[var(--color-border)] peer-focus:ring-[var(--color-ring)]/20",
1510
- checked ? hasError ? "border-[var(--color-error)]" : "border-[var(--color-primary)] bg-[var(--color-primary)]" : "",
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-[var(--color-error)]" : "bg-[var(--color-primary-foreground)]"
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-[var(--color-error)]" : "text-[var(--color-foreground)]",
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-[var(--color-error)] font-medium",
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-[var(--color-muted-foreground)]",
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 = React110__namespace.forwardRef(
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] = React110__namespace.useState(
1575
+ const [isChecked, setIsChecked] = React112__namespace.useState(
1576
1576
  checked !== void 0 ? checked : defaultChecked
1577
1577
  );
1578
- React110__namespace.useEffect(() => {
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-[var(--color-success)]",
1717
- offline: "bg-[var(--color-muted-foreground)]",
1718
- away: "bg-[var(--color-warning)]",
1719
- busy: "bg-[var(--color-error)]",
1720
- warning: "bg-[var(--color-warning)]",
1721
- critical: "bg-[var(--color-error)]"
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-[var(--color-success)]",
1725
- offline: "ring-[var(--color-muted-foreground)]",
1726
- away: "ring-[var(--color-warning)]",
1727
- busy: "ring-[var(--color-error)]",
1728
- warning: "ring-[var(--color-warning)]",
1729
- critical: "ring-[var(--color-error)]"
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 = React110__namespace.default.forwardRef(
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-[var(--color-muted-foreground)]";
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-[var(--color-success)]" : "text-[var(--color-error)]";
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 = React110__namespace.default.forwardRef(
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 = React110__namespace.default.forwardRef(
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] = React110.useState(false);
1861
- const [showTip, setShowTip] = React110.useState(false);
1862
- const inputRef = React110.useRef(null);
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 = React110.useCallback(
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-[var(--color-muted)]",
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-[var(--color-muted-foreground)] opacity-30",
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-[var(--color-primary)]",
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-[var(--color-primary-foreground)]",
1982
- "border-2 border-[var(--color-primary)]",
1983
- "shadow-[var(--shadow-sm)]",
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-[var(--color-foreground)] text-[var(--color-background)]",
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-[var(--color-muted-foreground)]",
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-[var(--color-surface)]",
2033
- dark: "bg-[var(--color-foreground)] text-[var(--color-background)]",
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 = React110__namespace.default.forwardRef(
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 = React110.createContext({
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 React110.useContext(I18nContext);
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-[var(--radius-full)] bg-[var(--color-error)]/10 p-3", children: /* @__PURE__ */ jsxRuntime.jsx(LucideIcons.AlertCircle, { className: "h-8 w-8 text-[var(--color-error)]" }) }),
2211
- /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "h3", className: "text-lg font-medium text-[var(--color-foreground)]", children: resolvedTitle }),
2212
- /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "mt-1 text-[var(--color-muted-foreground)] max-w-sm", children: resolvedMessage }),
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 React110__namespace.default.Component {
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 = React110.createContext(null);
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 = React110.useRef(null);
2558
- const [state, setState] = React110.useState({
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
- React110.useEffect(() => {
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
- React110.useEffect(() => {
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 = React110.useCallback((effects) => {
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 = React110.useCallback(
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 = React110.useCallback(async () => {
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 = React110.useCallback(() => {
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
- React110.createContext(null);
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
- var listeners = /* @__PURE__ */ new Set();
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
- return null;
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 = React110__namespace.default.memo(
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-[var(--color-foreground)] my-4",
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 = React110__namespace.default.memo(
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 = React110.useRef(null);
2914
- const savedScrollLeftRef = React110.useRef(0);
2915
- const [copied, setCopied] = React110.useState(false);
2916
- React110.useLayoutEffect(() => {
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
- React110.useLayoutEffect(() => {
3218
+ React112.useLayoutEffect(() => {
2923
3219
  const el = scrollRef.current;
2924
3220
  if (el) el.scrollLeft = savedScrollLeftRef.current;
2925
3221
  }, [language, code]);
2926
- React110.useEffect(() => {
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-[var(--color-muted-foreground)] hover:text-white",
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
- React110.lazy(() => import('react-markdown'));
3013
- var GameAudioContext = React110.createContext(null);
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 = React110__namespace.default.lazy(() => loader().then((m) => ({ default: m[name] })));
3314
+ const Lazy = React112__namespace.default.lazy(() => loader().then((m) => ({ default: m[name] })));
3019
3315
  function ThreeWrapper(props) {
3020
- return React110__namespace.default.createElement(
3021
- React110__namespace.default.Suspense,
3316
+ return React112__namespace.default.createElement(
3317
+ React112__namespace.default.Suspense,
3022
3318
  { fallback: null },
3023
- React110__namespace.default.createElement(Lazy, props)
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 = React110.createContext({ enabled: false });
3045
- React110.createContext(false);
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 React110__namespace.default.createElement(
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 = React110.useRef(/* @__PURE__ */ new Map());
3096
- React110.useEffect(() => {
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
- React110.useEffect(() => {
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
- React110.useEffect(() => {
3475
+ React112.useEffect(() => {
3180
3476
  if (!isEnabled) return;
3181
3477
  bindEventBus(eventBus);
3182
3478
  }, [isEnabled, eventBus]);
3183
- React110.useEffect(() => {
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 = React110.useMemo(
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 = React110.createContext(null);
3523
+ var FetchedDataContext = React112.createContext(null);
3228
3524
  function FetchedDataProvider({
3229
3525
  initialData,
3230
3526
  children
3231
3527
  }) {
3232
- const [state, setState] = React110.useState(() => ({
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 = React110.useCallback(
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 = React110.useCallback(
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 = React110.useCallback(
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 = React110.useCallback(
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 = React110.useCallback((data) => {
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 = React110.useCallback(() => {
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 = React110.useCallback((entityName) => {
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 = React110.useCallback((loading) => {
3598
+ const setLoading = React112.useCallback((loading) => {
3303
3599
  setState((prev) => ({ ...prev, loading }));
3304
3600
  }, []);
3305
- const setError = React110.useCallback((error) => {
3601
+ const setError = React112.useCallback((error) => {
3306
3602
  setState((prev) => ({ ...prev, error, loading: false }));
3307
3603
  }, []);
3308
- const contextValue = React110.useMemo(
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 React110.useContext(FetchedDataContext);
3635
+ return React112.useContext(FetchedDataContext);
3340
3636
  }
3341
3637
  function useFetchedData() {
3342
- const context = React110.useContext(FetchedDataContext);
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 = React110.createContext(null);
3678
+ var OfflineModeContext = React112.createContext(null);
3383
3679
  function OfflineModeProvider({
3384
3680
  children,
3385
3681
  ...executorOptions
3386
3682
  }) {
3387
- const [forceOffline, setForceOffline] = React110.useState(false);
3683
+ const [forceOffline, setForceOffline] = React112.useState(false);
3388
3684
  const executor = useOfflineExecutor(executorOptions);
3389
3685
  const effectivelyOffline = executor.isOffline || forceOffline;
3390
- const contextValue = React110.useMemo(
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 = React110.useContext(OfflineModeContext);
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 React110.useContext(OfflineModeContext);
3705
+ return React112.useContext(OfflineModeContext);
3410
3706
  }
3411
3707
 
3412
3708
  exports.EventBusContext = EventBusContext2;