@almadar/ui 2.32.0 → 2.34.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (79) hide show
  1. package/dist/avl/index.cjs +1049 -1086
  2. package/dist/avl/index.d.cts +352 -78
  3. package/dist/avl/index.d.ts +18 -3
  4. package/dist/avl/index.js +1029 -1086
  5. package/dist/components/atoms/index.d.ts +0 -1
  6. package/dist/components/index.cjs +1156 -1857
  7. package/dist/components/index.js +276 -962
  8. package/dist/components/molecules/avl/AvlBackwardEdge.d.ts +8 -0
  9. package/dist/components/molecules/avl/AvlBindingEdge.d.ts +9 -0
  10. package/dist/components/molecules/avl/AvlEventWireEdge.d.ts +14 -0
  11. package/dist/components/molecules/avl/AvlOrbitalNode.d.ts +12 -0
  12. package/dist/components/molecules/avl/AvlPageEdge.d.ts +8 -0
  13. package/dist/components/molecules/avl/AvlTransitionEdge.d.ts +16 -0
  14. package/dist/components/molecules/avl/BehaviorView.d.ts +12 -0
  15. package/dist/components/molecules/avl/DetailView.d.ts +13 -0
  16. package/dist/components/molecules/avl/MiniStateMachine.d.ts +14 -0
  17. package/dist/components/molecules/avl/ModuleCard.d.ts +14 -0
  18. package/dist/components/molecules/avl/SystemNode.d.ts +12 -0
  19. package/dist/components/molecules/avl/avl-canvas-types.d.ts +36 -0
  20. package/dist/components/molecules/avl/avl-elk-layout.d.ts +55 -0
  21. package/dist/components/molecules/avl/avl-flow-converter.d.ts +17 -0
  22. package/dist/components/molecules/avl/avl-story-schemas.d.ts +34 -0
  23. package/dist/components/molecules/avl/avl-zoom-band.d.ts +19 -0
  24. package/dist/components/molecules/avl/index.d.ts +15 -0
  25. package/dist/components/molecules/index.d.ts +0 -1
  26. package/dist/components/organisms/avl/AvlCosmicZoom.d.ts +10 -7
  27. package/dist/components/organisms/avl/FlowCanvas.d.ts +32 -0
  28. package/dist/components/organisms/avl/ZoomBreadcrumb.d.ts +16 -0
  29. package/dist/components/organisms/avl/ZoomLegend.d.ts +10 -0
  30. package/dist/components/organisms/avl/index.d.ts +5 -2
  31. package/dist/providers/index.cjs +148 -149
  32. package/dist/providers/index.js +39 -40
  33. package/dist/runtime/index.cjs +1055 -1030
  34. package/dist/runtime/index.js +270 -245
  35. package/dist/scripts/audit-tailwind-safelist.d.ts +27 -0
  36. package/package.json +2 -6
  37. package/tailwind-preset.cjs +170 -1
  38. package/dist/components/atoms/flow/FlowLabel.d.ts +0 -23
  39. package/dist/components/atoms/flow/FlowMinimap.d.ts +0 -28
  40. package/dist/components/atoms/flow/FlowNodeShell.d.ts +0 -25
  41. package/dist/components/atoms/flow/FlowPort.d.ts +0 -26
  42. package/dist/components/atoms/flow/FlowWire.d.ts +0 -39
  43. package/dist/components/atoms/flow/index.d.ts +0 -13
  44. package/dist/components/molecules/flow/BehaviorNode.d.ts +0 -28
  45. package/dist/components/molecules/flow/EffectNode.d.ts +0 -26
  46. package/dist/components/molecules/flow/EventWireEdge.d.ts +0 -23
  47. package/dist/components/molecules/flow/ExprNode.d.ts +0 -27
  48. package/dist/components/molecules/flow/FlowStateNode.d.ts +0 -18
  49. package/dist/components/molecules/flow/NodePalette.d.ts +0 -36
  50. package/dist/components/molecules/flow/OrbitalNode.d.ts +0 -31
  51. package/dist/components/molecules/flow/TransitionEdge.d.ts +0 -26
  52. package/dist/components/molecules/flow/index.d.ts +0 -8
  53. package/dist/components/molecules/svg/AIGenerates.d.ts +0 -7
  54. package/dist/components/molecules/svg/ClosedCircuit.d.ts +0 -7
  55. package/dist/components/molecules/svg/CommunityOwnership.d.ts +0 -7
  56. package/dist/components/molecules/svg/CompileAnywhere.d.ts +0 -7
  57. package/dist/components/molecules/svg/ComposableModels.d.ts +0 -7
  58. package/dist/components/molecules/svg/DescribeProveDeploy.d.ts +0 -7
  59. package/dist/components/molecules/svg/DomainGrid.d.ts +0 -7
  60. package/dist/components/molecules/svg/EventBus.d.ts +0 -7
  61. package/dist/components/molecules/svg/OrbitalUnit.d.ts +0 -7
  62. package/dist/components/molecules/svg/PlanVerifyRemember.d.ts +0 -7
  63. package/dist/components/molecules/svg/ProveCorrect.d.ts +0 -7
  64. package/dist/components/molecules/svg/ServiceLayers.d.ts +0 -7
  65. package/dist/components/molecules/svg/SharedReality.d.ts +0 -7
  66. package/dist/components/molecules/svg/StandardLibrary.d.ts +0 -7
  67. package/dist/components/molecules/svg/StateMachine.d.ts +0 -7
  68. package/dist/components/molecules/svg/WorldModel.d.ts +0 -7
  69. package/dist/components/molecules/svg/index.d.ts +0 -16
  70. package/dist/components/organisms/avl/AvlApplicationScene.d.ts +0 -17
  71. package/dist/components/organisms/avl/AvlOrbitalScene.d.ts +0 -21
  72. package/dist/flow/index.cjs +0 -3832
  73. package/dist/flow/index.d.cts +0 -367
  74. package/dist/flow/index.d.ts +0 -10
  75. package/dist/flow/index.js +0 -3793
  76. package/dist/illustrations/index.cjs +0 -7651
  77. package/dist/illustrations/index.d.cts +0 -544
  78. package/dist/illustrations/index.d.ts +0 -59
  79. package/dist/illustrations/index.js +0 -7594
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var React114 = require('react');
3
+ var React113 = require('react');
4
4
  var jsxRuntime = require('react/jsx-runtime');
5
5
  var providers = require('@almadar/ui/providers');
6
6
  require('react-dom');
@@ -20,7 +20,6 @@ var remarkMath = require('remark-math');
20
20
  var rehypeKatex = require('rehype-katex');
21
21
  var SyntaxHighlighter = require('react-syntax-highlighter/dist/esm/prism');
22
22
  var dark = require('react-syntax-highlighter/dist/esm/styles/prism/vsc-dark-plus');
23
- require('@xyflow/react');
24
23
 
25
24
  function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
26
25
 
@@ -42,7 +41,7 @@ function _interopNamespace(e) {
42
41
  return Object.freeze(n);
43
42
  }
44
43
 
45
- var React114__namespace = /*#__PURE__*/_interopNamespace(React114);
44
+ var React113__namespace = /*#__PURE__*/_interopNamespace(React113);
46
45
  var LucideIcons__namespace = /*#__PURE__*/_interopNamespace(LucideIcons);
47
46
  var L__default = /*#__PURE__*/_interopDefault(L);
48
47
  var ReactMarkdown__default = /*#__PURE__*/_interopDefault(ReactMarkdown);
@@ -154,7 +153,7 @@ var BUILT_IN_THEMES = [
154
153
  hasDarkMode: true
155
154
  }
156
155
  ];
157
- var ThemeContext = React114.createContext(void 0);
156
+ var ThemeContext = React113.createContext(void 0);
158
157
  var THEME_STORAGE_KEY = "theme";
159
158
  var MODE_STORAGE_KEY = "theme-mode";
160
159
  function getSystemMode() {
@@ -174,14 +173,14 @@ var ThemeProvider = ({
174
173
  defaultMode = "system",
175
174
  targetRef
176
175
  }) => {
177
- const availableThemes = React114.useMemo(() => {
176
+ const availableThemes = React113.useMemo(() => {
178
177
  const themeMap = /* @__PURE__ */ new Map();
179
178
  BUILT_IN_THEMES.forEach((t) => themeMap.set(t.name, t));
180
179
  themes.forEach((t) => themeMap.set(t.name, t));
181
180
  return Array.from(themeMap.values());
182
181
  }, [themes]);
183
182
  const isScoped = !!targetRef;
184
- const [theme, setThemeState] = React114.useState(() => {
183
+ const [theme, setThemeState] = React113.useState(() => {
185
184
  if (isScoped || typeof window === "undefined") return defaultTheme;
186
185
  const stored = localStorage.getItem(THEME_STORAGE_KEY);
187
186
  const validThemes = [
@@ -193,7 +192,7 @@ var ThemeProvider = ({
193
192
  }
194
193
  return defaultTheme;
195
194
  });
196
- const [mode, setModeState] = React114.useState(() => {
195
+ const [mode, setModeState] = React113.useState(() => {
197
196
  if (isScoped || typeof window === "undefined") return defaultMode;
198
197
  const stored = localStorage.getItem(MODE_STORAGE_KEY);
199
198
  if (stored === "light" || stored === "dark" || stored === "system") {
@@ -201,14 +200,14 @@ var ThemeProvider = ({
201
200
  }
202
201
  return defaultMode;
203
202
  });
204
- const [resolvedMode, setResolvedMode] = React114.useState(
203
+ const [resolvedMode, setResolvedMode] = React113.useState(
205
204
  () => resolveMode(mode)
206
205
  );
207
- const appliedTheme = React114.useMemo(
206
+ const appliedTheme = React113.useMemo(
208
207
  () => `${theme}-${resolvedMode}`,
209
208
  [theme, resolvedMode]
210
209
  );
211
- React114.useEffect(() => {
210
+ React113.useEffect(() => {
212
211
  const updateResolved = () => {
213
212
  setResolvedMode(resolveMode(mode));
214
213
  };
@@ -221,7 +220,7 @@ var ThemeProvider = ({
221
220
  }
222
221
  return void 0;
223
222
  }, [mode]);
224
- React114.useEffect(() => {
223
+ React113.useEffect(() => {
225
224
  if (isScoped) {
226
225
  if (targetRef?.current) {
227
226
  targetRef.current.setAttribute("data-theme", appliedTheme);
@@ -235,7 +234,7 @@ var ThemeProvider = ({
235
234
  root.classList.remove("light", "dark");
236
235
  root.classList.add(resolvedMode);
237
236
  }, [appliedTheme, resolvedMode, targetRef, isScoped]);
238
- const setTheme = React114.useCallback(
237
+ const setTheme = React113.useCallback(
239
238
  (newTheme) => {
240
239
  const validTheme = availableThemes.find((t) => t.name === newTheme);
241
240
  if (validTheme) {
@@ -251,17 +250,17 @@ var ThemeProvider = ({
251
250
  },
252
251
  [availableThemes]
253
252
  );
254
- const setMode = React114.useCallback((newMode) => {
253
+ const setMode = React113.useCallback((newMode) => {
255
254
  setModeState(newMode);
256
255
  if (!isScoped && typeof window !== "undefined") {
257
256
  localStorage.setItem(MODE_STORAGE_KEY, newMode);
258
257
  }
259
258
  }, []);
260
- const toggleMode = React114.useCallback(() => {
259
+ const toggleMode = React113.useCallback(() => {
261
260
  const newMode = resolvedMode === "dark" ? "light" : "dark";
262
261
  setMode(newMode);
263
262
  }, [resolvedMode, setMode]);
264
- const contextValue = React114.useMemo(
263
+ const contextValue = React113.useMemo(
265
264
  () => ({
266
265
  theme,
267
266
  mode,
@@ -329,9 +328,9 @@ function addWatch(entityType, callback) {
329
328
  };
330
329
  }
331
330
  function useEntityRef(entityType) {
332
- const versionRef = React114.useRef(0);
333
- const dataRef = React114.useRef([]);
334
- const getSnapshotStable = React114__namespace.default.useCallback(() => {
331
+ const versionRef = React113.useRef(0);
332
+ const dataRef = React113.useRef([]);
333
+ const getSnapshotStable = React113__namespace.default.useCallback(() => {
335
334
  const currentVersion = getVersion(entityType);
336
335
  if (currentVersion !== versionRef.current) {
337
336
  versionRef.current = currentVersion;
@@ -339,23 +338,23 @@ function useEntityRef(entityType) {
339
338
  }
340
339
  return dataRef.current;
341
340
  }, [entityType]);
342
- return React114.useSyncExternalStore(subscribeToStore, getSnapshotStable, () => []);
341
+ return React113.useSyncExternalStore(subscribeToStore, getSnapshotStable, () => []);
343
342
  }
344
343
  function useEntityWatch(entityType, callback) {
345
- const callbackRef = React114.useRef(callback);
344
+ const callbackRef = React113.useRef(callback);
346
345
  callbackRef.current = callback;
347
- React114.useEffect(() => {
346
+ React113.useEffect(() => {
348
347
  return addWatch(entityType, (oldData, newData) => {
349
348
  callbackRef.current(oldData, newData);
350
349
  });
351
350
  }, [entityType]);
352
351
  }
353
- var EntityStoreContext = React114.createContext({
352
+ var EntityStoreContext = React113.createContext({
354
353
  advance,
355
354
  getSnapshot
356
355
  });
357
356
  function useEntityStore() {
358
- return React114.useContext(EntityStoreContext);
357
+ return React113.useContext(EntityStoreContext);
359
358
  }
360
359
  function EntityStoreProvider({ children }) {
361
360
  return /* @__PURE__ */ jsxRuntime.jsx(EntityStoreContext.Provider, { value: { advance, getSnapshot }, children });
@@ -432,15 +431,15 @@ var fallbackEventBus = {
432
431
  }
433
432
  };
434
433
  function useEventBus() {
435
- const context = React114.useContext(providers.EventBusContext);
434
+ const context = React113.useContext(providers.EventBusContext);
436
435
  return context ?? getGlobalEventBus() ?? fallbackEventBus;
437
436
  }
438
- var EventBusContext2 = React114.createContext(null);
437
+ var EventBusContext2 = React113.createContext(null);
439
438
  function EventBusProvider({ children, debug: debug2 = false }) {
440
- const listenersRef = React114.useRef(/* @__PURE__ */ new Map());
441
- const anyListenersRef = React114.useRef(/* @__PURE__ */ new Set());
442
- const deprecationWarningShown = React114.useRef(false);
443
- const getSelectedEntity = React114.useCallback(() => {
439
+ const listenersRef = React113.useRef(/* @__PURE__ */ new Map());
440
+ const anyListenersRef = React113.useRef(/* @__PURE__ */ new Set());
441
+ const deprecationWarningShown = React113.useRef(false);
442
+ const getSelectedEntity = React113.useCallback(() => {
444
443
  if (!deprecationWarningShown.current) {
445
444
  console.warn(
446
445
  "[EventBus] getSelectedEntity is deprecated. Use SelectionProvider and useSelection hook instead. See SelectionProvider.tsx for migration guide."
@@ -449,7 +448,7 @@ function EventBusProvider({ children, debug: debug2 = false }) {
449
448
  }
450
449
  return null;
451
450
  }, []);
452
- const clearSelectedEntity = React114.useCallback(() => {
451
+ const clearSelectedEntity = React113.useCallback(() => {
453
452
  if (!deprecationWarningShown.current) {
454
453
  console.warn(
455
454
  "[EventBus] clearSelectedEntity is deprecated. Use SelectionProvider and useSelection hook instead. See SelectionProvider.tsx for migration guide."
@@ -457,7 +456,7 @@ function EventBusProvider({ children, debug: debug2 = false }) {
457
456
  deprecationWarningShown.current = true;
458
457
  }
459
458
  }, []);
460
- const emit = React114.useCallback((type, payload) => {
459
+ const emit = React113.useCallback((type, payload) => {
461
460
  const event = {
462
461
  type,
463
462
  payload,
@@ -491,7 +490,7 @@ function EventBusProvider({ children, debug: debug2 = false }) {
491
490
  }
492
491
  }
493
492
  }, [debug2]);
494
- const on = React114.useCallback((type, listener) => {
493
+ const on = React113.useCallback((type, listener) => {
495
494
  if (!listenersRef.current.has(type)) {
496
495
  listenersRef.current.set(type, /* @__PURE__ */ new Set());
497
496
  }
@@ -510,18 +509,18 @@ function EventBusProvider({ children, debug: debug2 = false }) {
510
509
  }
511
510
  };
512
511
  }, [debug2]);
513
- const once = React114.useCallback((type, listener) => {
512
+ const once = React113.useCallback((type, listener) => {
514
513
  const wrappedListener = (event) => {
515
514
  listenersRef.current.get(type)?.delete(wrappedListener);
516
515
  listener(event);
517
516
  };
518
517
  return on(type, wrappedListener);
519
518
  }, [on]);
520
- const hasListeners = React114.useCallback((type) => {
519
+ const hasListeners = React113.useCallback((type) => {
521
520
  const listeners6 = listenersRef.current.get(type);
522
521
  return listeners6 !== void 0 && listeners6.size > 0;
523
522
  }, []);
524
- const onAny = React114.useCallback((listener) => {
523
+ const onAny = React113.useCallback((listener) => {
525
524
  anyListenersRef.current.add(listener);
526
525
  if (debug2) {
527
526
  console.log(`[EventBus] onAny subscribed, total: ${anyListenersRef.current.size}`);
@@ -533,7 +532,7 @@ function EventBusProvider({ children, debug: debug2 = false }) {
533
532
  }
534
533
  };
535
534
  }, [debug2]);
536
- const contextValue = React114.useMemo(
535
+ const contextValue = React113.useMemo(
537
536
  () => ({
538
537
  emit,
539
538
  on,
@@ -545,7 +544,7 @@ function EventBusProvider({ children, debug: debug2 = false }) {
545
544
  }),
546
545
  [emit, on, once, hasListeners, onAny, getSelectedEntity, clearSelectedEntity]
547
546
  );
548
- React114.useEffect(() => {
547
+ React113.useEffect(() => {
549
548
  setGlobalEventBus(contextValue);
550
549
  return () => {
551
550
  setGlobalEventBus(null);
@@ -553,7 +552,7 @@ function EventBusProvider({ children, debug: debug2 = false }) {
553
552
  }, [contextValue]);
554
553
  return /* @__PURE__ */ jsxRuntime.jsx(EventBusContext2.Provider, { value: contextValue, children });
555
554
  }
556
- var SelectionContext = React114.createContext(null);
555
+ var SelectionContext = React113.createContext(null);
557
556
  var defaultCompareEntities = (a, b) => {
558
557
  if (a === b) return true;
559
558
  if (!a || !b) return false;
@@ -570,8 +569,8 @@ function SelectionProvider({
570
569
  compareEntities = defaultCompareEntities
571
570
  }) {
572
571
  const eventBus = useEventBus();
573
- const [selected, setSelectedState] = React114.useState(null);
574
- const setSelected = React114.useCallback(
572
+ const [selected, setSelectedState] = React113.useState(null);
573
+ const setSelected = React113.useCallback(
575
574
  (entity) => {
576
575
  setSelectedState(entity);
577
576
  if (debug2) {
@@ -580,19 +579,19 @@ function SelectionProvider({
580
579
  },
581
580
  [debug2]
582
581
  );
583
- const clearSelection = React114.useCallback(() => {
582
+ const clearSelection = React113.useCallback(() => {
584
583
  setSelectedState(null);
585
584
  if (debug2) {
586
585
  console.log("[SelectionProvider] Selection cleared");
587
586
  }
588
587
  }, [debug2]);
589
- const isSelected = React114.useCallback(
588
+ const isSelected = React113.useCallback(
590
589
  (entity) => {
591
590
  return compareEntities(selected, entity);
592
591
  },
593
592
  [selected, compareEntities]
594
593
  );
595
- React114.useEffect(() => {
594
+ React113.useEffect(() => {
596
595
  const handleSelect = (event) => {
597
596
  const row = event.payload?.row;
598
597
  if (row) {
@@ -630,14 +629,14 @@ function SelectionProvider({
630
629
  return /* @__PURE__ */ jsxRuntime.jsx(SelectionContext.Provider, { value: contextValue, children });
631
630
  }
632
631
  function useSelection() {
633
- const context = React114.useContext(SelectionContext);
632
+ const context = React113.useContext(SelectionContext);
634
633
  if (!context) {
635
634
  throw new Error("useSelection must be used within a SelectionProvider");
636
635
  }
637
636
  return context;
638
637
  }
639
638
  function useSelectionOptional() {
640
- const context = React114.useContext(SelectionContext);
639
+ const context = React113.useContext(SelectionContext);
641
640
  return context;
642
641
  }
643
642
  function cn(...inputs) {
@@ -780,7 +779,7 @@ var positionStyles = {
780
779
  fixed: "fixed",
781
780
  sticky: "sticky"
782
781
  };
783
- var Box = React114__namespace.default.forwardRef(
782
+ var Box = React113__namespace.default.forwardRef(
784
783
  ({
785
784
  padding,
786
785
  paddingX,
@@ -809,20 +808,20 @@ var Box = React114__namespace.default.forwardRef(
809
808
  ...rest
810
809
  }, ref) => {
811
810
  const eventBus = useEventBus();
812
- const handleClick = React114.useCallback((e) => {
811
+ const handleClick = React113.useCallback((e) => {
813
812
  if (action) {
814
813
  e.stopPropagation();
815
814
  eventBus.emit(`UI:${action}`, actionPayload ?? {});
816
815
  }
817
816
  onClick?.(e);
818
817
  }, [action, actionPayload, eventBus, onClick]);
819
- const handleMouseEnter = React114.useCallback((e) => {
818
+ const handleMouseEnter = React113.useCallback((e) => {
820
819
  if (hoverEvent) {
821
820
  eventBus.emit(`UI:${hoverEvent}`, { hovered: true });
822
821
  }
823
822
  onMouseEnter?.(e);
824
823
  }, [hoverEvent, eventBus, onMouseEnter]);
825
- const handleMouseLeave = React114.useCallback((e) => {
824
+ const handleMouseLeave = React113.useCallback((e) => {
826
825
  if (hoverEvent) {
827
826
  eventBus.emit(`UI:${hoverEvent}`, { hovered: false });
828
827
  }
@@ -949,7 +948,7 @@ var Typography = ({
949
948
  align,
950
949
  weight,
951
950
  size,
952
- truncate: truncate2 = false,
951
+ truncate = false,
953
952
  overflow,
954
953
  as,
955
954
  id,
@@ -971,7 +970,7 @@ var Typography = ({
971
970
  weight && weightStyles[weight],
972
971
  size && typographySizeStyles[size],
973
972
  align && `text-${align}`,
974
- truncate2 && "truncate overflow-hidden text-ellipsis",
973
+ truncate && "truncate overflow-hidden text-ellipsis",
975
974
  overflow && overflowStyles2[overflow],
976
975
  className
977
976
  ),
@@ -1051,7 +1050,7 @@ function resolveIconProp(value, sizeClass) {
1051
1050
  const IconComp = value;
1052
1051
  return /* @__PURE__ */ jsxRuntime.jsx(IconComp, { className: sizeClass });
1053
1052
  }
1054
- if (React114__namespace.default.isValidElement(value)) {
1053
+ if (React113__namespace.default.isValidElement(value)) {
1055
1054
  return value;
1056
1055
  }
1057
1056
  if (typeof value === "object" && value !== null && "render" in value) {
@@ -1060,7 +1059,7 @@ function resolveIconProp(value, sizeClass) {
1060
1059
  }
1061
1060
  return value;
1062
1061
  }
1063
- var Button = React114__namespace.default.forwardRef(
1062
+ var Button = React113__namespace.default.forwardRef(
1064
1063
  ({
1065
1064
  className,
1066
1065
  variant = "primary",
@@ -1156,7 +1155,7 @@ var sizeStyles3 = {
1156
1155
  md: "px-2.5 py-1 text-sm",
1157
1156
  lg: "px-3 py-1.5 text-base"
1158
1157
  };
1159
- var Badge = React114__namespace.default.forwardRef(
1158
+ var Badge = React113__namespace.default.forwardRef(
1160
1159
  ({ className, variant = "default", size = "sm", amount, label, icon, children, ...props }, ref) => {
1161
1160
  const iconSizes2 = { sm: "w-3 h-3", md: "w-3.5 h-3.5", lg: "w-4 h-4" };
1162
1161
  const resolvedIcon = typeof icon === "string" ? (() => {
@@ -1183,7 +1182,7 @@ var Badge = React114__namespace.default.forwardRef(
1183
1182
  }
1184
1183
  );
1185
1184
  Badge.displayName = "Badge";
1186
- var Input = React114__namespace.default.forwardRef(
1185
+ var Input = React113__namespace.default.forwardRef(
1187
1186
  ({
1188
1187
  className,
1189
1188
  inputType,
@@ -1295,7 +1294,7 @@ var Input = React114__namespace.default.forwardRef(
1295
1294
  }
1296
1295
  );
1297
1296
  Input.displayName = "Input";
1298
- var Label = React114__namespace.default.forwardRef(
1297
+ var Label = React113__namespace.default.forwardRef(
1299
1298
  ({ className, required, children, ...props }, ref) => {
1300
1299
  return /* @__PURE__ */ jsxRuntime.jsxs(
1301
1300
  "label",
@@ -1315,7 +1314,7 @@ var Label = React114__namespace.default.forwardRef(
1315
1314
  }
1316
1315
  );
1317
1316
  Label.displayName = "Label";
1318
- var Textarea = React114__namespace.default.forwardRef(
1317
+ var Textarea = React113__namespace.default.forwardRef(
1319
1318
  ({ className, error, ...props }, ref) => {
1320
1319
  return /* @__PURE__ */ jsxRuntime.jsx(
1321
1320
  "textarea",
@@ -1338,7 +1337,7 @@ var Textarea = React114__namespace.default.forwardRef(
1338
1337
  }
1339
1338
  );
1340
1339
  Textarea.displayName = "Textarea";
1341
- var Select = React114__namespace.default.forwardRef(
1340
+ var Select = React113__namespace.default.forwardRef(
1342
1341
  ({ className, options, placeholder, error, ...props }, ref) => {
1343
1342
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative", children: [
1344
1343
  /* @__PURE__ */ jsxRuntime.jsxs(
@@ -1374,7 +1373,7 @@ var Select = React114__namespace.default.forwardRef(
1374
1373
  }
1375
1374
  );
1376
1375
  Select.displayName = "Select";
1377
- var Checkbox = React114__namespace.default.forwardRef(
1376
+ var Checkbox = React113__namespace.default.forwardRef(
1378
1377
  ({ className, label, id, ...props }, ref) => {
1379
1378
  const inputId = id || `checkbox-${Math.random().toString(36).substr(2, 9)}`;
1380
1379
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center", children: [
@@ -1450,7 +1449,7 @@ var shadowStyles2 = {
1450
1449
  md: "shadow",
1451
1450
  lg: "shadow-lg"
1452
1451
  };
1453
- var Card = React114__namespace.default.forwardRef(
1452
+ var Card = React113__namespace.default.forwardRef(
1454
1453
  ({
1455
1454
  className,
1456
1455
  variant = "bordered",
@@ -1486,9 +1485,9 @@ var Card = React114__namespace.default.forwardRef(
1486
1485
  }
1487
1486
  );
1488
1487
  Card.displayName = "Card";
1489
- var CardHeader = React114__namespace.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cn("mb-4", className), ...props }));
1488
+ var CardHeader = React113__namespace.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cn("mb-4", className), ...props }));
1490
1489
  CardHeader.displayName = "CardHeader";
1491
- var CardTitle = React114__namespace.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
1490
+ var CardTitle = React113__namespace.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
1492
1491
  "h3",
1493
1492
  {
1494
1493
  ref,
@@ -1501,11 +1500,11 @@ var CardTitle = React114__namespace.default.forwardRef(({ className, ...props },
1501
1500
  }
1502
1501
  ));
1503
1502
  CardTitle.displayName = "CardTitle";
1504
- var CardContent = React114__namespace.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cn("", className), ...props }));
1503
+ var CardContent = React113__namespace.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cn("", className), ...props }));
1505
1504
  CardContent.displayName = "CardContent";
1506
1505
  var CardBody = CardContent;
1507
1506
  CardBody.displayName = "CardBody";
1508
- var CardFooter = React114__namespace.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
1507
+ var CardFooter = React113__namespace.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
1509
1508
  "div",
1510
1509
  {
1511
1510
  ref,
@@ -1520,7 +1519,7 @@ var sizeStyles4 = {
1520
1519
  md: "h-6 w-6",
1521
1520
  lg: "h-8 w-8"
1522
1521
  };
1523
- var Spinner = React114__namespace.default.forwardRef(
1522
+ var Spinner = React113__namespace.default.forwardRef(
1524
1523
  ({ className, size = "md", ...props }, ref) => {
1525
1524
  return /* @__PURE__ */ jsxRuntime.jsx(
1526
1525
  "div",
@@ -1534,7 +1533,7 @@ var Spinner = React114__namespace.default.forwardRef(
1534
1533
  }
1535
1534
  );
1536
1535
  Spinner.displayName = "Spinner";
1537
- var Radio = React114__namespace.default.forwardRef(
1536
+ var Radio = React113__namespace.default.forwardRef(
1538
1537
  ({
1539
1538
  label,
1540
1539
  helperText,
@@ -1638,7 +1637,7 @@ var Radio = React114__namespace.default.forwardRef(
1638
1637
  }
1639
1638
  );
1640
1639
  Radio.displayName = "Radio";
1641
- var Switch = React114__namespace.forwardRef(
1640
+ var Switch = React113__namespace.forwardRef(
1642
1641
  ({
1643
1642
  checked,
1644
1643
  defaultChecked = false,
@@ -1649,10 +1648,10 @@ var Switch = React114__namespace.forwardRef(
1649
1648
  name,
1650
1649
  className
1651
1650
  }, ref) => {
1652
- const [isChecked, setIsChecked] = React114__namespace.useState(
1651
+ const [isChecked, setIsChecked] = React113__namespace.useState(
1653
1652
  checked !== void 0 ? checked : defaultChecked
1654
1653
  );
1655
- React114__namespace.useEffect(() => {
1654
+ React113__namespace.useEffect(() => {
1656
1655
  if (checked !== void 0) {
1657
1656
  setIsChecked(checked);
1658
1657
  }
@@ -1810,7 +1809,7 @@ var sizeStyles5 = {
1810
1809
  md: "w-2.5 h-2.5",
1811
1810
  lg: "w-3 h-3"
1812
1811
  };
1813
- var StatusDot = React114__namespace.default.forwardRef(
1812
+ var StatusDot = React113__namespace.default.forwardRef(
1814
1813
  ({ className, status = "offline", pulse = false, size = "md", label, ...props }, ref) => {
1815
1814
  return /* @__PURE__ */ jsxRuntime.jsx(
1816
1815
  "span",
@@ -1857,7 +1856,7 @@ var iconMap2 = {
1857
1856
  down: LucideIcons.TrendingDown,
1858
1857
  flat: LucideIcons.ArrowRight
1859
1858
  };
1860
- var TrendIndicator = React114__namespace.default.forwardRef(
1859
+ var TrendIndicator = React113__namespace.default.forwardRef(
1861
1860
  ({
1862
1861
  className,
1863
1862
  value,
@@ -1916,7 +1915,7 @@ var thumbSizes = {
1916
1915
  md: "w-4 h-4",
1917
1916
  lg: "w-5 h-5"
1918
1917
  };
1919
- var RangeSlider = React114__namespace.default.forwardRef(
1918
+ var RangeSlider = React113__namespace.default.forwardRef(
1920
1919
  ({
1921
1920
  className,
1922
1921
  min = 0,
@@ -1934,14 +1933,14 @@ var RangeSlider = React114__namespace.default.forwardRef(
1934
1933
  formatValue: formatValue5,
1935
1934
  ...props
1936
1935
  }, ref) => {
1937
- const [isDragging, setIsDragging] = React114.useState(false);
1938
- const [showTip, setShowTip] = React114.useState(false);
1939
- const inputRef = React114.useRef(null);
1936
+ const [isDragging, setIsDragging] = React113.useState(false);
1937
+ const [showTip, setShowTip] = React113.useState(false);
1938
+ const inputRef = React113.useRef(null);
1940
1939
  const eventBus = useSafeEventBus();
1941
1940
  const percentage = max !== min ? (value - min) / (max - min) * 100 : 0;
1942
1941
  const bufferedPercentage = buffered !== void 0 ? Math.min(buffered, 100) : void 0;
1943
1942
  const displayValue = formatValue5 ? formatValue5(value) : String(value);
1944
- const handleChange = React114.useCallback(
1943
+ const handleChange = React113.useCallback(
1945
1944
  (e) => {
1946
1945
  const newValue = Number(e.target.value);
1947
1946
  onChange?.(newValue);
@@ -2119,7 +2118,7 @@ var paddingClasses = {
2119
2118
  md: "py-16",
2120
2119
  lg: "py-24"
2121
2120
  };
2122
- var ContentSection = React114__namespace.default.forwardRef(
2121
+ var ContentSection = React113__namespace.default.forwardRef(
2123
2122
  ({ children, background = "default", padding = "lg", id, className }, ref) => {
2124
2123
  return /* @__PURE__ */ jsxRuntime.jsx(
2125
2124
  Box,
@@ -2158,7 +2157,7 @@ var animatedStyles = {
2158
2157
  "scale-up": { opacity: 1, transform: "scale(1) translateY(0)" },
2159
2158
  "none": {}
2160
2159
  };
2161
- var AnimatedReveal = React114__namespace.default.forwardRef(
2160
+ var AnimatedReveal = React113__namespace.default.forwardRef(
2162
2161
  ({
2163
2162
  trigger = "scroll",
2164
2163
  animation = "fade-up",
@@ -2173,10 +2172,10 @@ var AnimatedReveal = React114__namespace.default.forwardRef(
2173
2172
  style,
2174
2173
  ...props
2175
2174
  }, forwardedRef) => {
2176
- const [isAnimated, setIsAnimated] = React114.useState(false);
2177
- const internalRef = React114.useRef(null);
2178
- const hasAnimated = React114.useRef(false);
2179
- const setRef = React114.useCallback(
2175
+ const [isAnimated, setIsAnimated] = React113.useState(false);
2176
+ const internalRef = React113.useRef(null);
2177
+ const hasAnimated = React113.useRef(false);
2178
+ const setRef = React113.useCallback(
2180
2179
  (node) => {
2181
2180
  internalRef.current = node;
2182
2181
  if (typeof forwardedRef === "function") forwardedRef(node);
@@ -2184,7 +2183,7 @@ var AnimatedReveal = React114__namespace.default.forwardRef(
2184
2183
  },
2185
2184
  [forwardedRef]
2186
2185
  );
2187
- React114.useEffect(() => {
2186
+ React113.useEffect(() => {
2188
2187
  if (trigger !== "scroll") return;
2189
2188
  const el = internalRef.current;
2190
2189
  if (!el) return;
@@ -2210,7 +2209,7 @@ var AnimatedReveal = React114__namespace.default.forwardRef(
2210
2209
  setIsAnimated(false);
2211
2210
  }
2212
2211
  } : void 0;
2213
- React114.useEffect(() => {
2212
+ React113.useEffect(() => {
2214
2213
  if (trigger === "manual" && manualAnimate !== void 0) {
2215
2214
  setIsAnimated(manualAnimate);
2216
2215
  }
@@ -2240,9 +2239,9 @@ var AnimatedReveal = React114__namespace.default.forwardRef(
2240
2239
  );
2241
2240
  AnimatedReveal.displayName = "AnimatedReveal";
2242
2241
  function useFetchedSvg(src) {
2243
- const [svg, setSvg] = React114.useState(null);
2244
- const cache = React114.useRef({});
2245
- React114.useEffect(() => {
2242
+ const [svg, setSvg] = React113.useState(null);
2243
+ const cache = React113.useRef({});
2244
+ React113.useEffect(() => {
2246
2245
  if (!src) {
2247
2246
  setSvg(null);
2248
2247
  return;
@@ -2311,7 +2310,7 @@ function applyMorphAnimation(container, animate, duration, delay, easing) {
2311
2310
  el.style.opacity = animate ? "1" : "0";
2312
2311
  });
2313
2312
  }
2314
- var AnimatedGraphic = React114__namespace.default.forwardRef(
2313
+ var AnimatedGraphic = React113__namespace.default.forwardRef(
2315
2314
  ({
2316
2315
  src,
2317
2316
  svgContent,
@@ -2330,11 +2329,11 @@ var AnimatedGraphic = React114__namespace.default.forwardRef(
2330
2329
  children,
2331
2330
  ...props
2332
2331
  }, ref) => {
2333
- const containerRef = React114.useRef(null);
2332
+ const containerRef = React113.useRef(null);
2334
2333
  const fetchedSvg = useFetchedSvg(svgContent ? void 0 : src);
2335
2334
  const resolvedSvg = svgContent ?? fetchedSvg;
2336
- const prevAnimateRef = React114.useRef(animate);
2337
- const setRef = React114__namespace.default.useCallback(
2335
+ const prevAnimateRef = React113.useRef(animate);
2336
+ const setRef = React113__namespace.default.useCallback(
2338
2337
  (node) => {
2339
2338
  containerRef.current = node;
2340
2339
  if (typeof ref === "function") ref(node);
@@ -2342,7 +2341,7 @@ var AnimatedGraphic = React114__namespace.default.forwardRef(
2342
2341
  },
2343
2342
  [ref]
2344
2343
  );
2345
- React114.useEffect(() => {
2344
+ React113.useEffect(() => {
2346
2345
  const el = containerRef.current;
2347
2346
  if (!el || !strokeColor) return;
2348
2347
  const paths = el.querySelectorAll("path, line, polyline, polygon, circle, ellipse, rect");
@@ -2350,7 +2349,7 @@ var AnimatedGraphic = React114__namespace.default.forwardRef(
2350
2349
  p2.style.stroke = strokeColor;
2351
2350
  });
2352
2351
  }, [resolvedSvg, strokeColor]);
2353
- React114.useEffect(() => {
2352
+ React113.useEffect(() => {
2354
2353
  const el = containerRef.current;
2355
2354
  if (!el || !resolvedSvg) return;
2356
2355
  if (animation === "draw" || animation === "fill") {
@@ -2375,7 +2374,7 @@ var AnimatedGraphic = React114__namespace.default.forwardRef(
2375
2374
  });
2376
2375
  }
2377
2376
  }, [resolvedSvg, animation]);
2378
- React114.useEffect(() => {
2377
+ React113.useEffect(() => {
2379
2378
  const el = containerRef.current;
2380
2379
  if (!el) return;
2381
2380
  const id = requestAnimationFrame(() => {
@@ -2531,7 +2530,7 @@ var en_default = {
2531
2530
  // hooks/useTranslate.ts
2532
2531
  var { $meta: _meta, ...coreMessages } = en_default;
2533
2532
  var coreLocale = coreMessages;
2534
- var I18nContext = React114.createContext({
2533
+ var I18nContext = React113.createContext({
2535
2534
  locale: "en",
2536
2535
  direction: "ltr",
2537
2536
  t: (key) => coreLocale[key] ?? key
@@ -2540,7 +2539,7 @@ var I18nContext = React114.createContext({
2540
2539
  I18nContext.displayName = "I18nContext";
2541
2540
  I18nContext.Provider;
2542
2541
  function useTranslate() {
2543
- return React114.useContext(I18nContext);
2542
+ return React113.useContext(I18nContext);
2544
2543
  }
2545
2544
  var ErrorState = ({
2546
2545
  title,
@@ -2576,7 +2575,7 @@ var ErrorState = ({
2576
2575
  );
2577
2576
  };
2578
2577
  ErrorState.displayName = "ErrorState";
2579
- var ErrorBoundary = class extends React114__namespace.default.Component {
2578
+ var ErrorBoundary = class extends React113__namespace.default.Component {
2580
2579
  constructor(props) {
2581
2580
  super(props);
2582
2581
  __publicField(this, "reset", () => {
@@ -2675,7 +2674,7 @@ function executeNotify(message, options, config) {
2675
2674
  function executeEmit(event, payload, config) {
2676
2675
  config.eventBus.emit(event, payload);
2677
2676
  }
2678
- var ClientEffectConfigContext = React114.createContext(null);
2677
+ var ClientEffectConfigContext = React113.createContext(null);
2679
2678
  ClientEffectConfigContext.Provider;
2680
2679
  var effectIdCounter = 0;
2681
2680
  function generateEffectId() {
@@ -2914,14 +2913,14 @@ var OfflineExecutor = class {
2914
2913
  }
2915
2914
  };
2916
2915
  function useOfflineExecutor(options) {
2917
- const executorRef = React114.useRef(null);
2918
- const [state, setState] = React114.useState({
2916
+ const executorRef = React113.useRef(null);
2917
+ const [state, setState] = React113.useState({
2919
2918
  isOffline: false,
2920
2919
  syncQueue: [],
2921
2920
  localEffectsProcessed: 0,
2922
2921
  effectsSynced: 0
2923
2922
  });
2924
- React114.useEffect(() => {
2923
+ React113.useEffect(() => {
2925
2924
  const executor = new OfflineExecutor({
2926
2925
  ...options,
2927
2926
  onQueueChange: (queue) => {
@@ -2936,7 +2935,7 @@ function useOfflineExecutor(options) {
2936
2935
  executorRef.current = null;
2937
2936
  };
2938
2937
  }, []);
2939
- React114.useEffect(() => {
2938
+ React113.useEffect(() => {
2940
2939
  if (!options.autoSync || !options.serverUrl) return;
2941
2940
  const handleOnline = async () => {
2942
2941
  if (executorRef.current) {
@@ -2950,13 +2949,13 @@ function useOfflineExecutor(options) {
2950
2949
  window.addEventListener("online", handleOnline);
2951
2950
  return () => window.removeEventListener("online", handleOnline);
2952
2951
  }, [options.autoSync, options.serverUrl, options.authToken]);
2953
- const executeEffects = React114.useCallback((effects) => {
2952
+ const executeEffects = React113.useCallback((effects) => {
2954
2953
  executorRef.current?.executeClientEffects(effects);
2955
2954
  if (executorRef.current) {
2956
2955
  setState(executorRef.current.getState());
2957
2956
  }
2958
2957
  }, []);
2959
- const processEventOffline = React114.useCallback(
2958
+ const processEventOffline = React113.useCallback(
2960
2959
  (event, payload, effects) => {
2961
2960
  const result = executorRef.current?.processEventOffline(event, payload, effects);
2962
2961
  if (executorRef.current) {
@@ -2966,7 +2965,7 @@ function useOfflineExecutor(options) {
2966
2965
  },
2967
2966
  []
2968
2967
  );
2969
- const sync = React114.useCallback(async () => {
2968
+ const sync = React113.useCallback(async () => {
2970
2969
  if (!executorRef.current || !options.serverUrl) return 0;
2971
2970
  const count = await executorRef.current.syncPendingEffects(
2972
2971
  options.serverUrl,
@@ -2975,7 +2974,7 @@ function useOfflineExecutor(options) {
2975
2974
  setState(executorRef.current.getState());
2976
2975
  return count;
2977
2976
  }, [options.serverUrl, options.authToken]);
2978
- const clearQueue = React114.useCallback(() => {
2977
+ const clearQueue = React113.useCallback(() => {
2979
2978
  executorRef.current?.clearQueue();
2980
2979
  if (executorRef.current) {
2981
2980
  setState(executorRef.current.getState());
@@ -2991,7 +2990,7 @@ function useOfflineExecutor(options) {
2991
2990
  clearQueue
2992
2991
  };
2993
2992
  }
2994
- React114.createContext(null);
2993
+ React113.createContext(null);
2995
2994
  var defaultIcon = L__default.default.icon({
2996
2995
  iconUrl: "https://unpkg.com/leaflet@1.9.4/dist/images/marker-icon.png",
2997
2996
  iconRetinaUrl: "https://unpkg.com/leaflet@1.9.4/dist/images/marker-icon-2x.png",
@@ -3169,7 +3168,7 @@ function bindTraitStateGetter(getter) {
3169
3168
  }
3170
3169
  }
3171
3170
  exposeOnWindow();
3172
- var MarkdownContent = React114__namespace.default.memo(
3171
+ var MarkdownContent = React113__namespace.default.memo(
3173
3172
  ({ content, direction, className }) => {
3174
3173
  const { t: _t } = useTranslate();
3175
3174
  const safeContent = typeof content === "string" ? content : String(content ?? "");
@@ -3271,7 +3270,7 @@ var MarkdownContent = React114__namespace.default.memo(
3271
3270
  (prev, next) => prev.content === next.content && prev.className === next.className && prev.direction === next.direction
3272
3271
  );
3273
3272
  MarkdownContent.displayName = "MarkdownContent";
3274
- var CodeBlock = React114__namespace.default.memo(
3273
+ var CodeBlock = React113__namespace.default.memo(
3275
3274
  ({
3276
3275
  code: rawCode,
3277
3276
  language = "text",
@@ -3283,20 +3282,20 @@ var CodeBlock = React114__namespace.default.memo(
3283
3282
  const code = typeof rawCode === "string" ? rawCode : String(rawCode ?? "");
3284
3283
  const eventBus = useEventBus();
3285
3284
  const { t: _t } = useTranslate();
3286
- const scrollRef = React114.useRef(null);
3287
- const savedScrollLeftRef = React114.useRef(0);
3288
- const [copied, setCopied] = React114.useState(false);
3289
- React114.useLayoutEffect(() => {
3285
+ const scrollRef = React113.useRef(null);
3286
+ const savedScrollLeftRef = React113.useRef(0);
3287
+ const [copied, setCopied] = React113.useState(false);
3288
+ React113.useLayoutEffect(() => {
3290
3289
  const el = scrollRef.current;
3291
3290
  return () => {
3292
3291
  if (el) savedScrollLeftRef.current = el.scrollLeft;
3293
3292
  };
3294
3293
  }, [language, code]);
3295
- React114.useLayoutEffect(() => {
3294
+ React113.useLayoutEffect(() => {
3296
3295
  const el = scrollRef.current;
3297
3296
  if (el) el.scrollLeft = savedScrollLeftRef.current;
3298
3297
  }, [language, code]);
3299
- React114.useEffect(() => {
3298
+ React113.useEffect(() => {
3300
3299
  const el = scrollRef.current;
3301
3300
  if (!el) return;
3302
3301
  const handle = () => {
@@ -3382,18 +3381,18 @@ CodeBlock.displayName = "CodeBlock";
3382
3381
 
3383
3382
  // lib/debug.ts
3384
3383
  typeof window !== "undefined" && (localStorage.getItem("debug") === "true" || process.env.NODE_ENV === "development");
3385
- React114.lazy(() => import('react-markdown'));
3386
- var GameAudioContext = React114.createContext(null);
3384
+ React113.lazy(() => import('react-markdown'));
3385
+ var GameAudioContext = React113.createContext(null);
3387
3386
  GameAudioContext.displayName = "GameAudioContext";
3388
3387
 
3389
3388
  // components/organisms/component-registry.generated.ts
3390
3389
  function lazyThree(name, loader) {
3391
- const Lazy = React114__namespace.default.lazy(() => loader().then((m) => ({ default: m[name] })));
3390
+ const Lazy = React113__namespace.default.lazy(() => loader().then((m) => ({ default: m[name] })));
3392
3391
  function ThreeWrapper(props) {
3393
- return React114__namespace.default.createElement(
3394
- React114__namespace.default.Suspense,
3392
+ return React113__namespace.default.createElement(
3393
+ React113__namespace.default.Suspense,
3395
3394
  { fallback: null },
3396
- React114__namespace.default.createElement(Lazy, props)
3395
+ React113__namespace.default.createElement(Lazy, props)
3397
3396
  );
3398
3397
  }
3399
3398
  ThreeWrapper.displayName = `Lazy(${name})`;
@@ -3414,13 +3413,13 @@ lazyThree("PhysicsObject3D", () => import('@almadar/ui/components/organisms/game
3414
3413
  lazyThree("Scene3D", () => import('@almadar/ui/components/organisms/game/three'));
3415
3414
  lazyThree("TileRenderer", () => import('@almadar/ui/components/organisms/game/three'));
3416
3415
  lazyThree("UnitRenderer", () => import('@almadar/ui/components/organisms/game/three'));
3417
- var SuspenseConfigContext = React114.createContext({ enabled: false });
3418
- React114.createContext(false);
3416
+ var SuspenseConfigContext = React113.createContext({ enabled: false });
3417
+ React113.createContext(false);
3419
3418
  function SuspenseConfigProvider({
3420
3419
  config,
3421
3420
  children
3422
3421
  }) {
3423
- return React114__namespace.default.createElement(
3422
+ return React113__namespace.default.createElement(
3424
3423
  SuspenseConfigContext.Provider,
3425
3424
  { value: config },
3426
3425
  children
@@ -3465,8 +3464,8 @@ function VerificationProvider({
3465
3464
  }) {
3466
3465
  const isEnabled = enabled ?? (typeof process !== "undefined" && process.env?.NODE_ENV !== "production");
3467
3466
  const eventBus = useEventBus();
3468
- const pendingRef = React114.useRef(/* @__PURE__ */ new Map());
3469
- React114.useEffect(() => {
3467
+ const pendingRef = React113.useRef(/* @__PURE__ */ new Map());
3468
+ React113.useEffect(() => {
3470
3469
  if (!isEnabled) return;
3471
3470
  if (!eventBus.onAny) return;
3472
3471
  const unsub = eventBus.onAny((evt) => {
@@ -3562,7 +3561,7 @@ function VerificationProvider({
3562
3561
  );
3563
3562
  return unsub;
3564
3563
  }, [isEnabled, eventBus]);
3565
- React114.useEffect(() => {
3564
+ React113.useEffect(() => {
3566
3565
  if (!isEnabled) return;
3567
3566
  if (!runtimeManager) return;
3568
3567
  runtimeManager.setObserver({
@@ -3584,11 +3583,11 @@ function VerificationProvider({
3584
3583
  "pass"
3585
3584
  );
3586
3585
  }, [isEnabled, runtimeManager]);
3587
- React114.useEffect(() => {
3586
+ React113.useEffect(() => {
3588
3587
  if (!isEnabled) return;
3589
3588
  bindEventBus(eventBus);
3590
3589
  }, [isEnabled, eventBus]);
3591
- React114.useEffect(() => {
3590
+ React113.useEffect(() => {
3592
3591
  if (!isEnabled) return;
3593
3592
  if (traitStateGetter) {
3594
3593
  bindTraitStateGetter(traitStateGetter);
@@ -3612,7 +3611,7 @@ function OrbitalProvider({
3612
3611
  suspense = false,
3613
3612
  verification
3614
3613
  }) {
3615
- const suspenseConfig = React114.useMemo(
3614
+ const suspenseConfig = React113.useMemo(
3616
3615
  () => ({ enabled: suspense }),
3617
3616
  [suspense]
3618
3617
  );
@@ -3632,43 +3631,43 @@ function OrbitalProvider({
3632
3631
  );
3633
3632
  }
3634
3633
  OrbitalProvider.displayName = "OrbitalProvider";
3635
- var FetchedDataContext = React114.createContext(null);
3634
+ var FetchedDataContext = React113.createContext(null);
3636
3635
  function FetchedDataProvider({
3637
3636
  initialData,
3638
3637
  children
3639
3638
  }) {
3640
- const [state, setState] = React114.useState(() => ({
3639
+ const [state, setState] = React113.useState(() => ({
3641
3640
  data: initialData || {},
3642
3641
  fetchedAt: {},
3643
3642
  loading: false,
3644
3643
  error: null
3645
3644
  }));
3646
- const getData = React114.useCallback(
3645
+ const getData = React113.useCallback(
3647
3646
  (entityName) => {
3648
3647
  return state.data[entityName] || [];
3649
3648
  },
3650
3649
  [state.data]
3651
3650
  );
3652
- const getById = React114.useCallback(
3651
+ const getById = React113.useCallback(
3653
3652
  (entityName, id) => {
3654
3653
  const records = state.data[entityName];
3655
3654
  return records?.find((r) => r.id === id);
3656
3655
  },
3657
3656
  [state.data]
3658
3657
  );
3659
- const hasData = React114.useCallback(
3658
+ const hasData = React113.useCallback(
3660
3659
  (entityName) => {
3661
3660
  return entityName in state.data && state.data[entityName].length > 0;
3662
3661
  },
3663
3662
  [state.data]
3664
3663
  );
3665
- const getFetchedAt = React114.useCallback(
3664
+ const getFetchedAt = React113.useCallback(
3666
3665
  (entityName) => {
3667
3666
  return state.fetchedAt[entityName];
3668
3667
  },
3669
3668
  [state.fetchedAt]
3670
3669
  );
3671
- const setData = React114.useCallback((data) => {
3670
+ const setData = React113.useCallback((data) => {
3672
3671
  const now = Date.now();
3673
3672
  setState((prev) => ({
3674
3673
  ...prev,
@@ -3687,14 +3686,14 @@ function FetchedDataProvider({
3687
3686
  error: null
3688
3687
  }));
3689
3688
  }, []);
3690
- const clearData = React114.useCallback(() => {
3689
+ const clearData = React113.useCallback(() => {
3691
3690
  setState((prev) => ({
3692
3691
  ...prev,
3693
3692
  data: {},
3694
3693
  fetchedAt: {}
3695
3694
  }));
3696
3695
  }, []);
3697
- const clearEntity = React114.useCallback((entityName) => {
3696
+ const clearEntity = React113.useCallback((entityName) => {
3698
3697
  setState((prev) => {
3699
3698
  const newData = { ...prev.data };
3700
3699
  const newFetchedAt = { ...prev.fetchedAt };
@@ -3707,13 +3706,13 @@ function FetchedDataProvider({
3707
3706
  };
3708
3707
  });
3709
3708
  }, []);
3710
- const setLoading = React114.useCallback((loading) => {
3709
+ const setLoading = React113.useCallback((loading) => {
3711
3710
  setState((prev) => ({ ...prev, loading }));
3712
3711
  }, []);
3713
- const setError = React114.useCallback((error) => {
3712
+ const setError = React113.useCallback((error) => {
3714
3713
  setState((prev) => ({ ...prev, error, loading: false }));
3715
3714
  }, []);
3716
- const contextValue = React114.useMemo(
3715
+ const contextValue = React113.useMemo(
3717
3716
  () => ({
3718
3717
  getData,
3719
3718
  getById,
@@ -3744,10 +3743,10 @@ function FetchedDataProvider({
3744
3743
  return /* @__PURE__ */ jsxRuntime.jsx(FetchedDataContext.Provider, { value: contextValue, children });
3745
3744
  }
3746
3745
  function useFetchedDataContext() {
3747
- return React114.useContext(FetchedDataContext);
3746
+ return React113.useContext(FetchedDataContext);
3748
3747
  }
3749
3748
  function useFetchedData() {
3750
- const context = React114.useContext(FetchedDataContext);
3749
+ const context = React113.useContext(FetchedDataContext);
3751
3750
  if (!context) {
3752
3751
  return {
3753
3752
  getData: () => [],
@@ -3787,15 +3786,15 @@ function useFetchedEntity(entityName) {
3787
3786
  error: context.error
3788
3787
  };
3789
3788
  }
3790
- var OfflineModeContext = React114.createContext(null);
3789
+ var OfflineModeContext = React113.createContext(null);
3791
3790
  function OfflineModeProvider({
3792
3791
  children,
3793
3792
  ...executorOptions
3794
3793
  }) {
3795
- const [forceOffline, setForceOffline] = React114.useState(false);
3794
+ const [forceOffline, setForceOffline] = React113.useState(false);
3796
3795
  const executor = useOfflineExecutor(executorOptions);
3797
3796
  const effectivelyOffline = executor.isOffline || forceOffline;
3798
- const contextValue = React114.useMemo(
3797
+ const contextValue = React113.useMemo(
3799
3798
  () => ({
3800
3799
  ...executor,
3801
3800
  forceOffline,
@@ -3807,14 +3806,14 @@ function OfflineModeProvider({
3807
3806
  return /* @__PURE__ */ jsxRuntime.jsx(OfflineModeContext.Provider, { value: contextValue, children });
3808
3807
  }
3809
3808
  function useOfflineMode() {
3810
- const context = React114.useContext(OfflineModeContext);
3809
+ const context = React113.useContext(OfflineModeContext);
3811
3810
  if (!context) {
3812
3811
  throw new Error("useOfflineMode must be used within OfflineModeProvider");
3813
3812
  }
3814
3813
  return context;
3815
3814
  }
3816
3815
  function useOptionalOfflineMode() {
3817
- return React114.useContext(OfflineModeContext);
3816
+ return React113.useContext(OfflineModeContext);
3818
3817
  }
3819
3818
 
3820
3819
  exports.EntityStoreContext = EntityStoreContext;