@almadar/ui 5.121.4 → 5.122.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,5 +1,5 @@
1
- import * as React81 from 'react';
2
- import React81__default, { createContext, useContext, useMemo, useRef, useEffect, useCallback, Suspense, useState, useSyncExternalStore, lazy, useLayoutEffect, useId } from 'react';
1
+ import * as React82 from 'react';
2
+ import React82__default, { createContext, useContext, useMemo, useRef, useEffect, useCallback, Suspense, useState, useSyncExternalStore, lazy, useLayoutEffect, useId } from 'react';
3
3
  import { EventBusContext, useTraitScopeChain, useEntitySchemaOptional, useEntitySchema, getAllPages, OrbitalProvider, TraitScopeProvider, ServerBridgeProvider, useCurrentPagePath, useGameAudioContextOptional, VerificationProvider, EntitySchemaProvider, OrbitalThemeProvider, useServerBridge } from '@almadar/ui/providers';
4
4
  export { EntitySchemaProvider, ServerBridgeProvider, TraitContext, TraitProvider, useEntitySchema, useEntitySchemaOptional, useServerBridge, useTrait, useTraitContext } from '@almadar/ui/providers';
5
5
  import { createLogger, setNamespaceLevel, isLogLevelEnabled } from '@almadar/logger';
@@ -878,7 +878,7 @@ var init_Box = __esm({
878
878
  fixed: "fixed",
879
879
  sticky: "sticky"
880
880
  };
881
- Box = React81__default.forwardRef(
881
+ Box = React82__default.forwardRef(
882
882
  ({
883
883
  padding,
884
884
  paddingX,
@@ -943,7 +943,7 @@ var init_Box = __esm({
943
943
  onPointerDown?.(e);
944
944
  }, [hoverEvent, tapReveal, triggerProps, onPointerDown]);
945
945
  const isClickable = action || onClick;
946
- return React81__default.createElement(
946
+ return React82__default.createElement(
947
947
  Component,
948
948
  {
949
949
  ref,
@@ -1160,7 +1160,7 @@ var init_Icon = __esm({
1160
1160
  const effectiveName = typeof icon === "string" && icon !== "" ? icon : name;
1161
1161
  const effectiveStrokeWidth = strokeWidth != null && strokeWidth > 0 ? strokeWidth : void 0;
1162
1162
  const family = useIconFamily();
1163
- const RenderedComponent = React81__default.useMemo(() => {
1163
+ const RenderedComponent = React82__default.useMemo(() => {
1164
1164
  if (directIcon) return null;
1165
1165
  return effectiveName ? resolveIconForFamily(effectiveName) : null;
1166
1166
  }, [directIcon, effectiveName, family]);
@@ -1280,7 +1280,7 @@ var init_atlasSlice = __esm({
1280
1280
  }
1281
1281
  });
1282
1282
  function useAtlasSliceDataUrl(asset) {
1283
- const [, bump] = React81.useReducer((x) => x + 1, 0);
1283
+ const [, bump] = React82.useReducer((x) => x + 1, 0);
1284
1284
  if (!isAtlasAsset(asset)) return void 0;
1285
1285
  const key = `${asset.atlas}#${asset.sprite}`;
1286
1286
  const cached = sliceDataUrlCache.get(key);
@@ -1343,13 +1343,13 @@ function AtlasImage({
1343
1343
  style,
1344
1344
  "aria-hidden": ariaHidden
1345
1345
  }) {
1346
- const [, bump] = React81.useReducer((x) => x + 1, 0);
1347
- const canvasRef = React81.useRef(null);
1346
+ const [, bump] = React82.useReducer((x) => x + 1, 0);
1347
+ const canvasRef = React82.useRef(null);
1348
1348
  const sliced = isAtlasAsset(asset);
1349
1349
  const atlas = sliced ? getAtlas(asset.atlas, bump) : void 0;
1350
1350
  const img = sliced && asset?.url ? getSheetImage(asset.url, bump) : null;
1351
1351
  const rect = sliced && atlas ? subRectFor(atlas, asset.sprite) : null;
1352
- React81.useEffect(() => {
1352
+ React82.useEffect(() => {
1353
1353
  const canvas = canvasRef.current;
1354
1354
  if (!canvas || !img || !rect) return;
1355
1355
  canvas.width = rect.sw;
@@ -1425,7 +1425,7 @@ function resolveIconProp(value, sizeClass) {
1425
1425
  const IconComp = value;
1426
1426
  return /* @__PURE__ */ jsx(IconComp, { className: sizeClass });
1427
1427
  }
1428
- if (React81__default.isValidElement(value)) {
1428
+ if (React82__default.isValidElement(value)) {
1429
1429
  return value;
1430
1430
  }
1431
1431
  if (typeof value === "object" && value !== null && isIconLike(value)) {
@@ -1502,7 +1502,7 @@ var init_Button = __esm({
1502
1502
  md: "h-icon-default w-icon-default",
1503
1503
  lg: "h-icon-default w-icon-default"
1504
1504
  };
1505
- Button = React81__default.forwardRef(
1505
+ Button = React82__default.forwardRef(
1506
1506
  ({
1507
1507
  className,
1508
1508
  variant = "primary",
@@ -1544,7 +1544,8 @@ var init_Button = __esm({
1544
1544
  "font-medium",
1545
1545
  "rounded-sm",
1546
1546
  "cursor-pointer",
1547
- "transition-all duration-[var(--transition-normal)]",
1547
+ "chrome-button",
1548
+ "transition-all duration-normal",
1548
1549
  "focus:outline-none focus:ring-[length:var(--focus-ring-width)] focus:ring-ring focus:ring-offset-[length:var(--focus-ring-offset)]",
1549
1550
  "disabled:opacity-50 disabled:cursor-not-allowed",
1550
1551
  variantStyles[variant],
@@ -1570,7 +1571,7 @@ var Dialog;
1570
1571
  var init_Dialog = __esm({
1571
1572
  "components/core/atoms/Dialog.tsx"() {
1572
1573
  init_cn();
1573
- Dialog = React81__default.forwardRef(
1574
+ Dialog = React82__default.forwardRef(
1574
1575
  ({
1575
1576
  role = "dialog",
1576
1577
  "aria-modal": ariaModal = true,
@@ -1688,7 +1689,7 @@ var init_Typography = __esm({
1688
1689
  }) => {
1689
1690
  const variant = variantProp ?? (level ? `h${level}` : "body1");
1690
1691
  const Component = as || defaultElements[variant];
1691
- return React81__default.createElement(
1692
+ return React82__default.createElement(
1692
1693
  Component,
1693
1694
  {
1694
1695
  id,
@@ -1940,12 +1941,84 @@ var init_Modal = __esm({
1940
1941
  Modal.displayName = "Modal";
1941
1942
  }
1942
1943
  });
1944
+ function isMotionEnabled() {
1945
+ if (typeof document === "undefined") return true;
1946
+ if (motionEnabledCache !== null) return motionEnabledCache;
1947
+ const v = getComputedStyle(document.documentElement).getPropertyValue("--motion-enable").trim().toLowerCase();
1948
+ motionEnabledCache = v !== "off";
1949
+ return motionEnabledCache;
1950
+ }
1951
+ function usePresence(show, opts) {
1952
+ const { animation, animate = true, onExited } = opts;
1953
+ const [mounted, setMounted] = useState(show);
1954
+ const [exiting, setExiting] = useState(false);
1955
+ const prev = useRef(show);
1956
+ const onExitedRef = useRef(onExited);
1957
+ onExitedRef.current = onExited;
1958
+ const safeTimer = useRef(null);
1959
+ const clearSafe = useCallback(() => {
1960
+ if (safeTimer.current) {
1961
+ clearTimeout(safeTimer.current);
1962
+ safeTimer.current = null;
1963
+ }
1964
+ }, []);
1965
+ const finishExit = useCallback(() => {
1966
+ clearSafe();
1967
+ setExiting(false);
1968
+ setMounted(false);
1969
+ onExitedRef.current?.();
1970
+ }, [clearSafe]);
1971
+ useEffect(() => {
1972
+ const moving = animate && isMotionEnabled();
1973
+ if (show && !prev.current) {
1974
+ setExiting(false);
1975
+ setMounted(true);
1976
+ } else if (!show && prev.current) {
1977
+ if (moving) {
1978
+ setExiting(true);
1979
+ clearSafe();
1980
+ safeTimer.current = setTimeout(finishExit, SAFE_EXIT_MS);
1981
+ } else {
1982
+ setMounted(false);
1983
+ setExiting(false);
1984
+ }
1985
+ }
1986
+ prev.current = show;
1987
+ }, [show, animate, clearSafe, finishExit]);
1988
+ useEffect(() => () => clearSafe(), [clearSafe]);
1989
+ const disabled = !animate || !isMotionEnabled();
1990
+ const className = disabled ? "" : exiting ? `animate-${animation}-out` : `animate-${animation}-in`;
1991
+ const onAnimationEnd = useCallback(
1992
+ (e) => {
1993
+ if (e.target !== e.currentTarget) return;
1994
+ if (exiting) finishExit();
1995
+ },
1996
+ [exiting, finishExit]
1997
+ );
1998
+ return { mounted, exiting, className, onAnimationEnd };
1999
+ }
2000
+ var SAFE_EXIT_MS, motionEnabledCache, Presence;
2001
+ var init_Presence = __esm({
2002
+ "components/core/atoms/Presence.tsx"() {
2003
+ "use client";
2004
+ init_cn();
2005
+ SAFE_EXIT_MS = 1e3;
2006
+ motionEnabledCache = null;
2007
+ Presence = ({ show, className, children, ...opts }) => {
2008
+ const { mounted, className: animClass, onAnimationEnd } = usePresence(show, opts);
2009
+ if (!mounted) return null;
2010
+ return /* @__PURE__ */ jsx("div", { className: cn(animClass, className), onAnimationEnd, children });
2011
+ };
2012
+ Presence.displayName = "Presence";
2013
+ }
2014
+ });
1943
2015
  var Overlay;
1944
2016
  var init_Overlay = __esm({
1945
2017
  "components/core/atoms/Overlay.tsx"() {
1946
2018
  "use client";
1947
2019
  init_cn();
1948
2020
  init_useEventBus();
2021
+ init_Presence();
1949
2022
  Overlay = ({
1950
2023
  isVisible = true,
1951
2024
  onClick,
@@ -1954,7 +2027,8 @@ var init_Overlay = __esm({
1954
2027
  action
1955
2028
  }) => {
1956
2029
  const eventBus = useEventBus();
1957
- if (!isVisible) return null;
2030
+ const { mounted, className: animClass, onAnimationEnd } = usePresence(isVisible, { animation: "overlay" });
2031
+ if (!mounted) return null;
1958
2032
  const handleClick = (e) => {
1959
2033
  if (action) {
1960
2034
  eventBus.emit(`UI:${action}`, {});
@@ -1967,11 +2041,12 @@ var init_Overlay = __esm({
1967
2041
  className: cn(
1968
2042
  "fixed inset-0 z-40",
1969
2043
  blur && "backdrop-blur-sm",
1970
- "animate-overlay-in",
2044
+ animClass,
1971
2045
  className
1972
2046
  ),
1973
2047
  style: { backgroundColor: "rgba(0, 0, 0, 0.6)" },
1974
2048
  onClick: action || onClick ? handleClick : void 0,
2049
+ onAnimationEnd,
1975
2050
  "aria-hidden": "true"
1976
2051
  }
1977
2052
  );
@@ -1986,6 +2061,7 @@ var init_Drawer = __esm({
1986
2061
  init_Button();
1987
2062
  init_Typography();
1988
2063
  init_Overlay();
2064
+ init_Presence();
1989
2065
  init_cn();
1990
2066
  init_useEventBus();
1991
2067
  sizeWidths = {
@@ -2039,6 +2115,7 @@ var init_Drawer = __esm({
2039
2115
  document.addEventListener("keydown", handleEscape);
2040
2116
  return () => document.removeEventListener("keydown", handleEscape);
2041
2117
  }, [isOpen, closeOnEscape, onClose, closeEvent, eventBus]);
2118
+ const { mounted, className: drawerAnim, onAnimationEnd } = usePresence(isOpen, { animation: "drawer" });
2042
2119
  useEffect(() => {
2043
2120
  if (isOpen) {
2044
2121
  document.body.style.overflow = "hidden";
@@ -2049,7 +2126,7 @@ var init_Drawer = __esm({
2049
2126
  document.body.style.overflow = "";
2050
2127
  };
2051
2128
  }, [isOpen]);
2052
- if (!isOpen) return null;
2129
+ if (!mounted) return null;
2053
2130
  const handleClose = () => {
2054
2131
  if (closeEvent) eventBus.emit(`UI:${closeEvent}`, {});
2055
2132
  onClose();
@@ -2062,7 +2139,7 @@ var init_Drawer = __esm({
2062
2139
  const widthClass = width in sizeWidths ? sizeWidths[width] : "";
2063
2140
  const widthStyle = width in sizeWidths ? void 0 : { width };
2064
2141
  const positionClasses = position === "right" ? "right-0 border-l" : "left-0 border-r";
2065
- const animationClasses2 = position === "right" ? "animate-slide-in-right" : "animate-slide-in-left";
2142
+ const drawerSign = position === "right" ? 1 : -1;
2066
2143
  return /* @__PURE__ */ jsxs(Fragment, { children: [
2067
2144
  /* @__PURE__ */ jsx(
2068
2145
  Overlay,
@@ -2084,12 +2161,13 @@ var init_Drawer = __esm({
2084
2161
  "flex flex-col max-h-screen",
2085
2162
  positionClasses,
2086
2163
  widthClass,
2087
- animationClasses2,
2164
+ drawerAnim,
2088
2165
  className
2089
2166
  ),
2090
- style: widthStyle,
2167
+ style: { ...widthStyle, "--motion-drawer-sign": drawerSign },
2091
2168
  role: "dialog",
2092
2169
  "aria-modal": "true",
2170
+ onAnimationEnd,
2093
2171
  ...title && { "aria-labelledby": "drawer-title" },
2094
2172
  children: [
2095
2173
  (title || showCloseButton) && /* @__PURE__ */ jsxs(
@@ -2128,31 +2206,7 @@ var init_Drawer = __esm({
2128
2206
  )
2129
2207
  ]
2130
2208
  }
2131
- ),
2132
- /* @__PURE__ */ jsx("style", { children: `
2133
- @keyframes slide-in-right {
2134
- from {
2135
- transform: translateX(100%);
2136
- }
2137
- to {
2138
- transform: translateX(0);
2139
- }
2140
- }
2141
- @keyframes slide-in-left {
2142
- from {
2143
- transform: translateX(-100%);
2144
- }
2145
- to {
2146
- transform: translateX(0);
2147
- }
2148
- }
2149
- .animate-slide-in-right {
2150
- animation: slide-in-right 0.3s ease-out;
2151
- }
2152
- .animate-slide-in-left {
2153
- animation: slide-in-left 0.3s ease-out;
2154
- }
2155
- ` })
2209
+ )
2156
2210
  ] });
2157
2211
  };
2158
2212
  Drawer.displayName = "Drawer";
@@ -2201,7 +2255,7 @@ var init_Badge = __esm({
2201
2255
  md: "px-2.5 py-1 text-sm",
2202
2256
  lg: "px-3 py-1.5 text-base"
2203
2257
  };
2204
- Badge = React81__default.forwardRef(
2258
+ Badge = React82__default.forwardRef(
2205
2259
  ({ className, variant = "default", size = "sm", amount, label, icon, iconAsset, children, onRemove, removeLabel, ...props }, ref) => {
2206
2260
  const iconSizes3 = {
2207
2261
  sm: "h-icon-default w-icon-default",
@@ -2296,14 +2350,23 @@ var init_Toast = __esm({
2296
2350
  }) => {
2297
2351
  const eventBus = useEventBus();
2298
2352
  const { t } = useTranslate();
2299
- const handleDismiss = () => {
2353
+ const [leaving, setLeaving] = useState(false);
2354
+ const doRealDismiss = () => {
2300
2355
  if (dismissEvent) eventBus.emit(`UI:${dismissEvent}`, {});
2301
2356
  onDismiss?.();
2302
2357
  };
2358
+ const handleDismiss = () => {
2359
+ if (leaving) return;
2360
+ setLeaving(true);
2361
+ };
2303
2362
  const handleAction = () => {
2304
2363
  if (actionEvent) eventBus.emit(`UI:${actionEvent}`, {});
2305
2364
  onAction?.();
2306
2365
  };
2366
+ const handleAnimEnd = (e) => {
2367
+ if (e.target !== e.currentTarget) return;
2368
+ if (leaving) doRealDismiss();
2369
+ };
2307
2370
  useEffect(() => {
2308
2371
  if (duration <= 0 || !onDismiss && !dismissEvent) {
2309
2372
  return;
@@ -2322,10 +2385,12 @@ var init_Toast = __esm({
2322
2385
  // edge. `max-w-[calc(100vw-2rem)]` clamps to viewport too.
2323
2386
  "border-l-4 p-4 shadow-elevation-toast min-w-0 sm:min-w-[300px] max-w-md max-w-[calc(100vw-2rem)]",
2324
2387
  "rounded-sm",
2388
+ leaving ? "animate-toast-out" : "animate-toast-in",
2325
2389
  variantClasses[variant],
2326
2390
  className
2327
2391
  ),
2328
2392
  role: "alert",
2393
+ onAnimationEnd: handleAnimEnd,
2329
2394
  children: /* @__PURE__ */ jsxs(Box, { className: "flex items-start gap-3", children: [
2330
2395
  /* @__PURE__ */ jsx(Box, { className: "flex-shrink-0 mt-0.5", children: /* @__PURE__ */ jsx(
2331
2396
  Icon,
@@ -2538,7 +2603,7 @@ var init_SvgFlow = __esm({
2538
2603
  width = 100,
2539
2604
  height = 100
2540
2605
  }) => {
2541
- const markerId = React81__default.useMemo(() => {
2606
+ const markerId = React82__default.useMemo(() => {
2542
2607
  flowIdCounter += 1;
2543
2608
  return `almadar-flow-arrow-${flowIdCounter}`;
2544
2609
  }, []);
@@ -3131,7 +3196,7 @@ var init_SvgRing = __esm({
3131
3196
  width = 100,
3132
3197
  height = 100
3133
3198
  }) => {
3134
- const gradientId = React81__default.useMemo(() => {
3199
+ const gradientId = React82__default.useMemo(() => {
3135
3200
  ringIdCounter += 1;
3136
3201
  return `almadar-ring-glow-${ringIdCounter}`;
3137
3202
  }, []);
@@ -3312,7 +3377,7 @@ var init_Input = __esm({
3312
3377
  init_cn();
3313
3378
  init_Icon();
3314
3379
  init_useEventBus();
3315
- Input = React81__default.forwardRef(
3380
+ Input = React82__default.forwardRef(
3316
3381
  ({
3317
3382
  className,
3318
3383
  inputType,
@@ -3347,7 +3412,7 @@ var init_Input = __esm({
3347
3412
  const showClearButton = clearable && value && String(value).length > 0;
3348
3413
  const isMultiline = type === "textarea";
3349
3414
  const baseClassName = cn(
3350
- "block w-full rounded-sm transition-all duration-[var(--transition-fast)]",
3415
+ "block w-full rounded-sm transition-all duration-fast",
3351
3416
  "border-[length:var(--border-width-thin)] border-border",
3352
3417
  isMultiline ? "px-3 py-2 text-sm" : "h-input-md px-3 text-sm",
3353
3418
  "bg-card hover:bg-muted focus:bg-card",
@@ -3480,7 +3545,7 @@ var Label;
3480
3545
  var init_Label = __esm({
3481
3546
  "components/core/atoms/Label.tsx"() {
3482
3547
  init_cn();
3483
- Label = React81__default.forwardRef(
3548
+ Label = React82__default.forwardRef(
3484
3549
  ({ className, required, children, ...props }, ref) => {
3485
3550
  return /* @__PURE__ */ jsxs(
3486
3551
  "label",
@@ -3507,7 +3572,7 @@ var init_Textarea = __esm({
3507
3572
  "components/core/atoms/Textarea.tsx"() {
3508
3573
  init_cn();
3509
3574
  init_useEventBus();
3510
- Textarea = React81__default.forwardRef(
3575
+ Textarea = React82__default.forwardRef(
3511
3576
  ({ className, error, onChange, ...props }, ref) => {
3512
3577
  const eventBus = useEventBus();
3513
3578
  const handleChange = (e) => {
@@ -3746,7 +3811,7 @@ var init_Select = __esm({
3746
3811
  init_cn();
3747
3812
  init_Icon();
3748
3813
  init_useEventBus();
3749
- Select = React81__default.forwardRef(
3814
+ Select = React82__default.forwardRef(
3750
3815
  (props, _ref) => {
3751
3816
  const { multiple, searchable, clearable } = props;
3752
3817
  if (multiple || searchable || clearable) {
@@ -3763,7 +3828,7 @@ var init_Checkbox = __esm({
3763
3828
  "components/core/atoms/Checkbox.tsx"() {
3764
3829
  init_cn();
3765
3830
  init_useEventBus();
3766
- Checkbox = React81__default.forwardRef(
3831
+ Checkbox = React82__default.forwardRef(
3767
3832
  ({ className, label, id, onChange, ...props }, ref) => {
3768
3833
  const inputId = id || `checkbox-${Math.random().toString(36).substr(2, 9)}`;
3769
3834
  const eventBus = useEventBus();
@@ -3817,7 +3882,7 @@ var init_Spinner = __esm({
3817
3882
  md: "h-6 w-6",
3818
3883
  lg: "h-8 w-8"
3819
3884
  };
3820
- Spinner = React81__default.forwardRef(
3885
+ Spinner = React82__default.forwardRef(
3821
3886
  ({ className, size = "md", overlay, ...props }, ref) => {
3822
3887
  if (overlay) {
3823
3888
  return /* @__PURE__ */ jsx(
@@ -3859,21 +3924,21 @@ var init_Card = __esm({
3859
3924
  "bg-card",
3860
3925
  "border-[length:var(--border-width)] border-border",
3861
3926
  "shadow-elevation-card",
3862
- "transition-all duration-[var(--transition-normal)]",
3927
+ "transition-all duration-normal",
3863
3928
  "hover:shadow-elevation-dialog hover:translate-y-[var(--hover-translate-y)]"
3864
3929
  ].join(" "),
3865
3930
  bordered: [
3866
3931
  "bg-card",
3867
3932
  "border-[length:var(--border-width)] border-border",
3868
3933
  "shadow-elevation-card",
3869
- "transition-all duration-[var(--transition-normal)]",
3934
+ "transition-all duration-normal",
3870
3935
  "hover:shadow-elevation-dialog hover:translate-y-[var(--hover-translate-y)]"
3871
3936
  ].join(" "),
3872
3937
  elevated: [
3873
3938
  "bg-card",
3874
3939
  "border-[length:var(--border-width)] border-border",
3875
3940
  "shadow",
3876
- "transition-all duration-[var(--transition-normal)]",
3941
+ "transition-all duration-normal",
3877
3942
  "hover:shadow-elevation-dialog hover:translate-y-[var(--hover-translate-y)]"
3878
3943
  ].join(" "),
3879
3944
  // Interactive variant with theme-specific hover effects
@@ -3882,7 +3947,7 @@ var init_Card = __esm({
3882
3947
  "border-[length:var(--border-width)] border-border",
3883
3948
  "shadow",
3884
3949
  "cursor-pointer",
3885
- "transition-all duration-[var(--transition-normal)]",
3950
+ "transition-all duration-normal",
3886
3951
  "hover:shadow-elevation-dialog"
3887
3952
  ].join(" ")
3888
3953
  };
@@ -3907,7 +3972,7 @@ var init_Card = __esm({
3907
3972
  chip: "shadow-none rounded-pill border-[length:var(--border-width)] border-border",
3908
3973
  "tile-image-first": "p-0 overflow-hidden"
3909
3974
  };
3910
- Card = React81__default.forwardRef(
3975
+ Card = React82__default.forwardRef(
3911
3976
  ({
3912
3977
  className,
3913
3978
  variant = "bordered",
@@ -3933,7 +3998,8 @@ var init_Card = __esm({
3933
3998
  ref,
3934
3999
  className: cn(
3935
4000
  "rounded-container relative",
3936
- "transition-all duration-[var(--transition-normal)]",
4001
+ "transition-all duration-normal",
4002
+ "chrome-panel",
3937
4003
  variantStyles4[variant],
3938
4004
  paddingStyles2[padding],
3939
4005
  lookStyles2[look],
@@ -3955,9 +4021,9 @@ var init_Card = __esm({
3955
4021
  }
3956
4022
  );
3957
4023
  Card.displayName = "Card";
3958
- CardHeader = React81__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("mb-4", className), ...props }));
4024
+ CardHeader = React82__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("mb-4", className), ...props }));
3959
4025
  CardHeader.displayName = "CardHeader";
3960
- CardTitle = React81__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
4026
+ CardTitle = React82__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
3961
4027
  "h3",
3962
4028
  {
3963
4029
  ref,
@@ -3970,11 +4036,11 @@ var init_Card = __esm({
3970
4036
  }
3971
4037
  ));
3972
4038
  CardTitle.displayName = "CardTitle";
3973
- CardContent = React81__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("", className), ...props }));
4039
+ CardContent = React82__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("", className), ...props }));
3974
4040
  CardContent.displayName = "CardContent";
3975
4041
  CardBody = CardContent;
3976
4042
  CardBody.displayName = "CardBody";
3977
- CardFooter = React81__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
4043
+ CardFooter = React82__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
3978
4044
  "div",
3979
4045
  {
3980
4046
  ref,
@@ -4061,7 +4127,7 @@ var init_FilterPill = __esm({
4061
4127
  md: "w-3.5 h-3.5",
4062
4128
  lg: "w-4 h-4"
4063
4129
  };
4064
- FilterPill = React81__default.forwardRef(
4130
+ FilterPill = React82__default.forwardRef(
4065
4131
  ({
4066
4132
  className,
4067
4133
  variant = "default",
@@ -4190,8 +4256,8 @@ var init_Avatar = __esm({
4190
4256
  actionPayload
4191
4257
  }) => {
4192
4258
  const eventBus = useEventBus();
4193
- const [imgFailed, setImgFailed] = React81__default.useState(false);
4194
- React81__default.useEffect(() => {
4259
+ const [imgFailed, setImgFailed] = React82__default.useState(false);
4260
+ React82__default.useEffect(() => {
4195
4261
  setImgFailed(false);
4196
4262
  }, [src]);
4197
4263
  const initials = providedInitials ?? (name ? generateInitials(name) : void 0);
@@ -4304,7 +4370,7 @@ var init_Center = __esm({
4304
4370
  as: Component = "div"
4305
4371
  }) => {
4306
4372
  const mergedStyle = minHeight ? { minHeight, ...style } : style;
4307
- return React81__default.createElement(Component, {
4373
+ return React82__default.createElement(Component, {
4308
4374
  className: cn(
4309
4375
  inline ? "inline-flex" : "flex",
4310
4376
  horizontal && "justify-center",
@@ -4572,7 +4638,7 @@ var init_Radio = __esm({
4572
4638
  md: "w-2.5 h-2.5",
4573
4639
  lg: "w-3 h-3"
4574
4640
  };
4575
- Radio = React81__default.forwardRef(
4641
+ Radio = React82__default.forwardRef(
4576
4642
  ({
4577
4643
  label,
4578
4644
  helperText,
@@ -4589,12 +4655,12 @@ var init_Radio = __esm({
4589
4655
  onChange,
4590
4656
  ...props
4591
4657
  }, ref) => {
4592
- const reactId = React81__default.useId();
4658
+ const reactId = React82__default.useId();
4593
4659
  const baseId = id || `radio-${reactId}`;
4594
4660
  const hasError = !!error;
4595
4661
  const eventBus = useEventBus();
4596
- const [selected, setSelected] = React81__default.useState(value);
4597
- React81__default.useEffect(() => {
4662
+ const [selected, setSelected] = React82__default.useState(value);
4663
+ React82__default.useEffect(() => {
4598
4664
  if (value !== void 0) setSelected(value);
4599
4665
  }, [value]);
4600
4666
  const pick = (next, e) => {
@@ -4776,7 +4842,7 @@ var init_Switch = __esm({
4776
4842
  "components/core/atoms/Switch.tsx"() {
4777
4843
  "use client";
4778
4844
  init_cn();
4779
- Switch = React81.forwardRef(
4845
+ Switch = React82.forwardRef(
4780
4846
  ({
4781
4847
  checked,
4782
4848
  defaultChecked = false,
@@ -4787,10 +4853,10 @@ var init_Switch = __esm({
4787
4853
  name,
4788
4854
  className
4789
4855
  }, ref) => {
4790
- const [isChecked, setIsChecked] = React81.useState(
4856
+ const [isChecked, setIsChecked] = React82.useState(
4791
4857
  checked !== void 0 ? checked : defaultChecked
4792
4858
  );
4793
- React81.useEffect(() => {
4859
+ React82.useEffect(() => {
4794
4860
  if (checked !== void 0) {
4795
4861
  setIsChecked(checked);
4796
4862
  }
@@ -4821,7 +4887,7 @@ var init_Switch = __esm({
4821
4887
  // redefine --space-11 to 68px, which makes w-11 enormous and leaves
4822
4888
  // the thumb stuck near the left edge. The switch geometry must stay
4823
4889
  // proportional regardless of a theme's density scale.
4824
- "relative inline-flex h-[1.5rem] w-[2.75rem] shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors",
4890
+ "relative inline-flex h-[1.5rem] w-[2.75rem] shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors duration-fast",
4825
4891
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",
4826
4892
  isChecked ? "bg-primary" : "bg-muted",
4827
4893
  disabled && "cursor-not-allowed opacity-50"
@@ -4830,7 +4896,7 @@ var init_Switch = __esm({
4830
4896
  "span",
4831
4897
  {
4832
4898
  className: cn(
4833
- "pointer-events-none block h-[1.25rem] w-[1.25rem] rounded-full bg-background shadow-lg ring-0 transition-transform",
4899
+ "pointer-events-none block h-[1.25rem] w-[1.25rem] rounded-full bg-background shadow-lg ring-0 transition-transform duration-fast",
4834
4900
  isChecked ? "translate-x-[1.25rem]" : "translate-x-0"
4835
4901
  )
4836
4902
  }
@@ -4953,7 +5019,7 @@ var init_Stack = __esm({
4953
5019
  };
4954
5020
  const isHorizontal = direction === "horizontal";
4955
5021
  const directionClass = responsive && isHorizontal ? reverse ? "flex-col-reverse md:flex-row-reverse" : "flex-col md:flex-row" : isHorizontal ? reverse ? "flex-row-reverse" : "flex-row" : reverse ? "flex-col-reverse" : "flex-col";
4956
- return React81__default.createElement(
5022
+ return React82__default.createElement(
4957
5023
  Component,
4958
5024
  {
4959
5025
  className: cn(
@@ -4998,7 +5064,7 @@ var init_TextHighlight = __esm({
4998
5064
  hoverEvent
4999
5065
  }) => {
5000
5066
  const eventBus = useEventBus();
5001
- const baseStyles = "cursor-pointer transition-all duration-150";
5067
+ const baseStyles = "cursor-pointer transition-all duration-fast";
5002
5068
  const typeStyles = {
5003
5069
  question: cn(
5004
5070
  // Blue border for questions
@@ -5153,7 +5219,7 @@ var Aside;
5153
5219
  var init_Aside = __esm({
5154
5220
  "components/core/atoms/Aside.tsx"() {
5155
5221
  init_cn();
5156
- Aside = React81__default.forwardRef(
5222
+ Aside = React82__default.forwardRef(
5157
5223
  ({ className, children, ...rest }, ref) => /* @__PURE__ */ jsx("aside", { ref, className: cn(className), ...rest, children })
5158
5224
  );
5159
5225
  Aside.displayName = "Aside";
@@ -5232,9 +5298,9 @@ var init_LawReferenceTooltip = __esm({
5232
5298
  className
5233
5299
  }) => {
5234
5300
  const { t } = useTranslate();
5235
- const [isVisible, setIsVisible] = React81__default.useState(false);
5236
- const timeoutRef = React81__default.useRef(null);
5237
- const triggerRef = React81__default.useRef(null);
5301
+ const [isVisible, setIsVisible] = React82__default.useState(false);
5302
+ const timeoutRef = React82__default.useRef(null);
5303
+ const triggerRef = React82__default.useRef(null);
5238
5304
  const handleMouseEnter = () => {
5239
5305
  if (timeoutRef.current) clearTimeout(timeoutRef.current);
5240
5306
  timeoutRef.current = setTimeout(() => setIsVisible(true), 200);
@@ -5245,7 +5311,7 @@ var init_LawReferenceTooltip = __esm({
5245
5311
  };
5246
5312
  const { revealed, triggerProps } = useTapReveal({ refs: [triggerRef] });
5247
5313
  const open = isVisible || revealed;
5248
- React81__default.useEffect(() => {
5314
+ React82__default.useEffect(() => {
5249
5315
  return () => {
5250
5316
  if (timeoutRef.current) clearTimeout(timeoutRef.current);
5251
5317
  };
@@ -5455,7 +5521,7 @@ var init_StatusDot = __esm({
5455
5521
  md: "w-2.5 h-2.5",
5456
5522
  lg: "w-3 h-3"
5457
5523
  };
5458
- StatusDot = React81__default.forwardRef(
5524
+ StatusDot = React82__default.forwardRef(
5459
5525
  ({ className, status = "offline", pulse = false, size = "md", label, ...props }, ref) => {
5460
5526
  return /* @__PURE__ */ jsx(
5461
5527
  "span",
@@ -5509,7 +5575,7 @@ var init_TrendIndicator = __esm({
5509
5575
  down: "trending-down",
5510
5576
  flat: "arrow-right"
5511
5577
  };
5512
- TrendIndicator = React81__default.forwardRef(
5578
+ TrendIndicator = React82__default.forwardRef(
5513
5579
  ({
5514
5580
  className,
5515
5581
  value,
@@ -5576,7 +5642,7 @@ var init_RangeSlider = __esm({
5576
5642
  md: "w-4 h-4",
5577
5643
  lg: "w-5 h-5"
5578
5644
  };
5579
- RangeSlider = React81__default.forwardRef(
5645
+ RangeSlider = React82__default.forwardRef(
5580
5646
  ({
5581
5647
  className,
5582
5648
  min = 0,
@@ -5719,7 +5785,7 @@ var init_RangeSlider = __esm({
5719
5785
  "border-2 border-primary",
5720
5786
  "shadow-sm",
5721
5787
  "pointer-events-none",
5722
- "transition-transform duration-100",
5788
+ "transition-transform duration-instant",
5723
5789
  isDragging && "scale-[var(--hover-scale)]",
5724
5790
  thumbSizes[size]
5725
5791
  ),
@@ -6152,7 +6218,7 @@ var init_ContentSection = __esm({
6152
6218
  md: "py-16",
6153
6219
  lg: "py-24"
6154
6220
  };
6155
- ContentSection = React81__default.forwardRef(
6221
+ ContentSection = React82__default.forwardRef(
6156
6222
  ({ children, background = "default", padding = "lg", id, className }, ref) => {
6157
6223
  return /* @__PURE__ */ jsx(
6158
6224
  Box,
@@ -6686,7 +6752,7 @@ var init_AnimatedReveal = __esm({
6686
6752
  "scale-up": { opacity: 1, transform: "scale(1) translateY(0)" },
6687
6753
  "none": {}
6688
6754
  };
6689
- AnimatedReveal = React81__default.forwardRef(
6755
+ AnimatedReveal = React82__default.forwardRef(
6690
6756
  ({
6691
6757
  trigger = "scroll",
6692
6758
  animation = "fade-up",
@@ -6846,7 +6912,7 @@ var init_AnimatedGraphic = __esm({
6846
6912
  "components/marketing/atoms/AnimatedGraphic.tsx"() {
6847
6913
  "use client";
6848
6914
  init_cn();
6849
- AnimatedGraphic = React81__default.forwardRef(
6915
+ AnimatedGraphic = React82__default.forwardRef(
6850
6916
  ({
6851
6917
  src,
6852
6918
  svgContent,
@@ -6869,7 +6935,7 @@ var init_AnimatedGraphic = __esm({
6869
6935
  const fetchedSvg = useFetchedSvg(svgContent ? void 0 : src);
6870
6936
  const resolvedSvg = svgContent ?? fetchedSvg;
6871
6937
  const prevAnimateRef = useRef(animate);
6872
- const setRef = React81__default.useCallback(
6938
+ const setRef = React82__default.useCallback(
6873
6939
  (node) => {
6874
6940
  containerRef.current = node;
6875
6941
  if (typeof ref === "function") ref(node);
@@ -7597,9 +7663,9 @@ function ControlButton({
7597
7663
  className
7598
7664
  }) {
7599
7665
  const eventBus = useEventBus();
7600
- const [isPressed, setIsPressed] = React81.useState(false);
7666
+ const [isPressed, setIsPressed] = React82.useState(false);
7601
7667
  const actualPressed = pressed ?? isPressed;
7602
- const handlePointerDown = React81.useCallback(
7668
+ const handlePointerDown = React82.useCallback(
7603
7669
  (e) => {
7604
7670
  e.preventDefault();
7605
7671
  if (disabled) return;
@@ -7609,7 +7675,7 @@ function ControlButton({
7609
7675
  },
7610
7676
  [disabled, pressEvent, eventBus, onPress]
7611
7677
  );
7612
- const handlePointerUp = React81.useCallback(
7678
+ const handlePointerUp = React82.useCallback(
7613
7679
  (e) => {
7614
7680
  e.preventDefault();
7615
7681
  if (disabled) return;
@@ -7619,7 +7685,7 @@ function ControlButton({
7619
7685
  },
7620
7686
  [disabled, releaseEvent, eventBus, onRelease]
7621
7687
  );
7622
- const handlePointerLeave = React81.useCallback(
7688
+ const handlePointerLeave = React82.useCallback(
7623
7689
  (e) => {
7624
7690
  if (isPressed) {
7625
7691
  setIsPressed(false);
@@ -7877,8 +7943,8 @@ function ControlGrid({
7877
7943
  className
7878
7944
  }) {
7879
7945
  const eventBus = useEventBus();
7880
- const [active, setActive] = React81.useState(/* @__PURE__ */ new Set());
7881
- const handlePress = React81.useCallback(
7946
+ const [active, setActive] = React82.useState(/* @__PURE__ */ new Set());
7947
+ const handlePress = React82.useCallback(
7882
7948
  (id) => {
7883
7949
  setActive((prev) => new Set(prev).add(id));
7884
7950
  if (actionEvent) eventBus.emit(`UI:${actionEvent}`, { id, pressed: true });
@@ -7892,7 +7958,7 @@ function ControlGrid({
7892
7958
  },
7893
7959
  [kind, actionEvent, directionEvent, directionEvents, eventBus, onAction, onDirection]
7894
7960
  );
7895
- const handleRelease = React81.useCallback(
7961
+ const handleRelease = React82.useCallback(
7896
7962
  (id) => {
7897
7963
  setActive((prev) => {
7898
7964
  const next = new Set(prev);
@@ -8185,17 +8251,18 @@ function GameHud({
8185
8251
  const mid = Math.ceil(stats.length / 2);
8186
8252
  const leftStats = stats.slice(0, mid);
8187
8253
  const rightStats = stats.slice(mid);
8188
- const isTop = position === "top";
8189
8254
  return /* @__PURE__ */ jsxs(
8190
- Box,
8255
+ Card,
8191
8256
  {
8257
+ variant: "bordered",
8258
+ padding: "none",
8192
8259
  className: cn(
8193
- "flex items-center justify-between w-full",
8260
+ "flex items-center justify-between w-full rounded-none bg-card",
8194
8261
  "px-4 py-2 gap-4",
8195
- !transparent && (isTop ? "border-b border-border/40 bg-surface/90 backdrop-blur-sm" : "border-t border-border/40 bg-surface/90 backdrop-blur-sm"),
8196
- transparent && (isTop ? "border-b border-white/10 bg-black/40 backdrop-blur-sm" : "border-t border-white/10 bg-black/40 backdrop-blur-sm"),
8262
+ transparent && "backdrop-blur-sm",
8197
8263
  className
8198
8264
  ),
8265
+ style: transparent ? { backgroundColor: "color-mix(in srgb, var(--color-card) 40%, transparent)" } : void 0,
8199
8266
  children: [
8200
8267
  /* @__PURE__ */ jsx(Box, { className: "flex items-center gap-3 flex-shrink-0", children: leftStats.map((stat, i) => /* @__PURE__ */ jsx(StatBadge, { ...stat, size }, i)) }),
8201
8268
  rightStats.length > 0 && /* @__PURE__ */ jsx(Box, { className: "flex items-center gap-3 flex-shrink-0", children: rightStats.map((stat, i) => /* @__PURE__ */ jsx(StatBadge, { ...stat, size }, i)) })
@@ -8204,14 +8271,16 @@ function GameHud({
8204
8271
  );
8205
8272
  }
8206
8273
  return /* @__PURE__ */ jsx(
8207
- Box,
8274
+ Card,
8208
8275
  {
8209
- position: "relative",
8276
+ variant: "bordered",
8277
+ padding: "sm",
8210
8278
  className: cn(
8211
- "z-10 flex items-center gap-4 px-4 py-2",
8212
- transparent ? "bg-black/30 backdrop-blur-sm" : "bg-surface/90 backdrop-blur-sm",
8279
+ "z-10 relative flex items-center gap-4 bg-card",
8280
+ transparent && "backdrop-blur-sm",
8213
8281
  className
8214
8282
  ),
8283
+ style: transparent ? { backgroundColor: "color-mix(in srgb, var(--color-card) 30%, transparent)" } : void 0,
8215
8284
  children: stats.map((stat, i) => /* @__PURE__ */ jsx(StatBadge, { ...stat, size }, i))
8216
8285
  }
8217
8286
  );
@@ -8221,6 +8290,7 @@ var init_GameHud = __esm({
8221
8290
  "components/game/molecules/GameHud.tsx"() {
8222
8291
  init_cn();
8223
8292
  init_Box();
8293
+ init_Card();
8224
8294
  init_StatBadge();
8225
8295
  positionMap = {
8226
8296
  corners: "inset-0 pointer-events-none"
@@ -8246,7 +8316,7 @@ function GameMenu({
8246
8316
  }) {
8247
8317
  const resolvedOptions = (options?.length ? options : void 0) ?? (menuItems?.length ? menuItems : void 0) ?? DEFAULT_MENU_OPTIONS;
8248
8318
  const eventBus = useEventBus();
8249
- const handleOptionClick = React81.useCallback(
8319
+ const handleOptionClick = React82.useCallback(
8250
8320
  (option) => {
8251
8321
  if (option.event) {
8252
8322
  eventBus.emit(`UI:${option.event}`, { option });
@@ -8265,39 +8335,48 @@ function GameMenu({
8265
8335
  {
8266
8336
  className: cn(
8267
8337
  "min-h-screen w-full flex flex-col items-center justify-center p-8",
8338
+ !background && "bg-background",
8268
8339
  className
8269
8340
  ),
8270
- style: {
8271
- background: background ?? "linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f0e17 100%)"
8272
- },
8341
+ style: background ? { background } : void 0,
8273
8342
  children: [
8274
- /* @__PURE__ */ jsxs(Box, { className: "text-center mb-12 animate-fade-in", children: [
8275
- logo && /* @__PURE__ */ jsx(GameIcon, { assetUrl: logo, icon: "image", size: 96, alt: title, className: "h-24 w-auto mx-auto mb-6 drop-shadow-2xl" }),
8276
- /* @__PURE__ */ jsx(
8277
- Typography,
8278
- {
8279
- variant: "h1",
8280
- className: "text-5xl md:text-7xl font-bold text-[var(--color-foreground)] tracking-tight",
8281
- style: {
8282
- textShadow: "0 4px 12px rgba(0,0,0,0.5)"
8283
- },
8284
- children: title
8285
- }
8286
- ),
8287
- subtitle && /* @__PURE__ */ jsx(Typography, { variant: "body", className: "mt-2 text-lg text-muted-foreground tracking-widest uppercase", children: subtitle })
8288
- ] }),
8289
- /* @__PURE__ */ jsx(Box, { className: "flex flex-col gap-4 w-full max-w-md", children: resolvedOptions.map((option, index) => /* @__PURE__ */ jsx(
8290
- ChoiceButton,
8343
+ /* @__PURE__ */ jsxs(
8344
+ Card,
8291
8345
  {
8292
- text: option.label,
8293
- index: index + 1,
8294
- disabled: option.disabled,
8295
- onClick: () => handleOptionClick(option),
8296
- className: "text-lg py-4 px-8"
8297
- },
8298
- index
8299
- )) }),
8300
- /* @__PURE__ */ jsxs(Box, { position: "absolute", className: "inset-0 pointer-events-none overflow-hidden", children: [
8346
+ variant: "bordered",
8347
+ padding: "lg",
8348
+ className: "bg-card flex flex-col items-center max-w-md w-full",
8349
+ children: [
8350
+ /* @__PURE__ */ jsxs(Box, { className: "text-center mb-8 animate-fade-in", children: [
8351
+ logo && /* @__PURE__ */ jsx(GameIcon, { assetUrl: logo, icon: "image", size: 96, alt: title, className: "h-24 w-auto mx-auto mb-6 drop-shadow-2xl" }),
8352
+ /* @__PURE__ */ jsx(
8353
+ Typography,
8354
+ {
8355
+ variant: "h1",
8356
+ className: "text-4xl md:text-5xl font-bold text-foreground tracking-tight",
8357
+ style: {
8358
+ textShadow: "0 4px 12px rgba(0,0,0,0.5)"
8359
+ },
8360
+ children: title
8361
+ }
8362
+ ),
8363
+ subtitle && /* @__PURE__ */ jsx(Typography, { variant: "body", className: "mt-2 text-lg text-muted-foreground tracking-widest uppercase", children: subtitle })
8364
+ ] }),
8365
+ /* @__PURE__ */ jsx(Box, { className: "flex flex-col gap-4 w-full", children: resolvedOptions.map((option, index) => /* @__PURE__ */ jsx(
8366
+ ChoiceButton,
8367
+ {
8368
+ text: option.label,
8369
+ index: index + 1,
8370
+ disabled: option.disabled,
8371
+ onClick: () => handleOptionClick(option),
8372
+ className: "text-lg py-4 px-8"
8373
+ },
8374
+ index
8375
+ )) })
8376
+ ]
8377
+ }
8378
+ ),
8379
+ /* @__PURE__ */ jsxs(Box, { position: "absolute", className: "inset-0 pointer-events-none overflow-hidden -z-10", children: [
8301
8380
  /* @__PURE__ */ jsx(Box, { position: "absolute", className: "top-1/4 left-1/4 w-64 h-64 bg-info/10 rounded-container blur-3xl" }),
8302
8381
  /* @__PURE__ */ jsx(Box, { position: "absolute", className: "bottom-1/4 right-1/4 w-96 h-96 bg-accent/10 rounded-container blur-3xl" })
8303
8382
  ] })
@@ -8312,6 +8391,7 @@ var init_GameMenu = __esm({
8312
8391
  init_cn();
8313
8392
  init_useEventBus();
8314
8393
  init_Box();
8394
+ init_Card();
8315
8395
  init_Typography();
8316
8396
  init_GameIcon();
8317
8397
  init_ChoiceButton();
@@ -8472,7 +8552,7 @@ function StateGraph({
8472
8552
  }) {
8473
8553
  const eventBus = useEventBus();
8474
8554
  const nodes = states ?? [];
8475
- const positions = React81.useMemo(() => layoutStates(nodes, width, height), [nodes, width, height]);
8555
+ const positions = React82.useMemo(() => layoutStates(nodes, width, height), [nodes, width, height]);
8476
8556
  return /* @__PURE__ */ jsxs(
8477
8557
  Box,
8478
8558
  {
@@ -8543,8 +8623,8 @@ function MiniMap({
8543
8623
  tileAssets,
8544
8624
  unitAssets
8545
8625
  }) {
8546
- const canvasRef = React81.useRef(null);
8547
- const imgCacheRef = React81.useRef(/* @__PURE__ */ new Map());
8626
+ const canvasRef = React82.useRef(null);
8627
+ const imgCacheRef = React82.useRef(/* @__PURE__ */ new Map());
8548
8628
  function loadImg(url) {
8549
8629
  const cached = imgCacheRef.current.get(url);
8550
8630
  if (cached) return cached.complete ? cached : null;
@@ -8559,7 +8639,7 @@ function MiniMap({
8559
8639
  imgCacheRef.current.set(url, img);
8560
8640
  return null;
8561
8641
  }
8562
- React81.useEffect(() => {
8642
+ React82.useEffect(() => {
8563
8643
  const canvas = canvasRef.current;
8564
8644
  if (!canvas) return;
8565
8645
  const ctx = canvas.getContext("2d");
@@ -9874,7 +9954,7 @@ function LinearView({
9874
9954
  /* @__PURE__ */ jsx(HStack, { className: "flex-wrap items-center", gap: "xs", children: trait.states.map((state, i) => {
9875
9955
  const isDone = i < currentIdx;
9876
9956
  const isCurrent = i === currentIdx;
9877
- return /* @__PURE__ */ jsxs(React81__default.Fragment, { children: [
9957
+ return /* @__PURE__ */ jsxs(React82__default.Fragment, { children: [
9878
9958
  i > 0 && /* @__PURE__ */ jsx(
9879
9959
  Typography,
9880
9960
  {
@@ -10409,7 +10489,7 @@ function SequenceBar({
10409
10489
  else onSlotRemove?.(index);
10410
10490
  }, [emit, slotRemoveEvent, onSlotRemove, playing]);
10411
10491
  const paddedSlots = Array.from({ length: maxSlots }, (_, i) => slots[i]);
10412
- return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(React81__default.Fragment, { children: [
10492
+ return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(React82__default.Fragment, { children: [
10413
10493
  i > 0 && /* @__PURE__ */ jsx(
10414
10494
  Typography,
10415
10495
  {
@@ -10496,6 +10576,7 @@ var init_GameShell = __esm({
10496
10576
  "components/game/templates/GameShell.tsx"() {
10497
10577
  init_cn();
10498
10578
  init_Box();
10579
+ init_Card();
10499
10580
  init_Typography();
10500
10581
  init_AtlasImage();
10501
10582
  FONT_BASE = "https://almadar-kflow-assets.web.app/shared/_shared/kenney-fonts/fonts";
@@ -10524,13 +10605,14 @@ var init_GameShell = __esm({
10524
10605
  showTopBar = true,
10525
10606
  children,
10526
10607
  backgroundAsset,
10527
- hudBackgroundAsset,
10528
- fontFamily = "future"
10608
+ fontFamily = "future",
10609
+ "data-theme": dataTheme
10529
10610
  }) => {
10530
10611
  const font = GAME_FONTS[fontFamily] ?? fontFamily;
10531
10612
  return /* @__PURE__ */ jsxs(
10532
10613
  Box,
10533
10614
  {
10615
+ "data-theme": dataTheme || void 0,
10534
10616
  className: cn("game-shell", className),
10535
10617
  style: {
10536
10618
  position: "relative",
@@ -10538,7 +10620,7 @@ var init_GameShell = __esm({
10538
10620
  height: "100vh",
10539
10621
  overflow: "hidden",
10540
10622
  background: "var(--color-background, #0a0a0f)",
10541
- color: "var(--color-text, #e0e0e0)",
10623
+ color: "var(--color-foreground, #e0e0e0)",
10542
10624
  fontFamily: `'${font}', system-ui, sans-serif`
10543
10625
  },
10544
10626
  children: [
@@ -10570,19 +10652,12 @@ var init_GameShell = __esm({
10570
10652
  },
10571
10653
  children: [
10572
10654
  showTopBar && /* @__PURE__ */ jsx(
10573
- AtlasPanel,
10655
+ Card,
10574
10656
  {
10575
- asset: hudBackgroundAsset,
10576
- borderSlice: 12,
10577
- borderWidth: 10,
10578
- className: "game-shell__title pointer-events-auto",
10579
- style: {
10580
- padding: "6px 16px",
10581
- background: hudBackgroundAsset ? void 0 : "rgba(18, 18, 31, 0.85)",
10582
- borderRadius: hudBackgroundAsset ? void 0 : 10,
10583
- boxShadow: "0 4px 14px rgba(0,0,0,0.45)",
10584
- flexShrink: 0
10585
- },
10657
+ variant: "bordered",
10658
+ padding: "none",
10659
+ className: "game-shell__title bg-card pointer-events-auto",
10660
+ style: { padding: "6px 16px", flexShrink: 0 },
10586
10661
  children: /* @__PURE__ */ jsx(
10587
10662
  Typography,
10588
10663
  {
@@ -11063,7 +11138,7 @@ var init_ErrorBoundary = __esm({
11063
11138
  }
11064
11139
  );
11065
11140
  };
11066
- ErrorBoundary = class extends React81__default.Component {
11141
+ ErrorBoundary = class extends React82__default.Component {
11067
11142
  constructor(props) {
11068
11143
  super(props);
11069
11144
  __publicField(this, "reset", () => {
@@ -11330,7 +11405,7 @@ var init_Container = __esm({
11330
11405
  as: Component = "div"
11331
11406
  }) => {
11332
11407
  const resolvedSize = maxWidth ?? size ?? "lg";
11333
- return React81__default.createElement(
11408
+ return React82__default.createElement(
11334
11409
  Component,
11335
11410
  {
11336
11411
  className: cn(
@@ -14157,7 +14232,7 @@ var init_CodeBlock = __esm({
14157
14232
  DIFF_STYLE_FALLBACK = { bg: "", prefix: " ", text: "text-foreground" };
14158
14233
  LINE_PROPS_FN = (n) => ({ "data-line": String(n - 1) });
14159
14234
  HIDDEN_LINE_NUMBERS = { display: "none" };
14160
- CodeBlock = React81__default.memo(
14235
+ CodeBlock = React82__default.memo(
14161
14236
  ({
14162
14237
  code: rawCode,
14163
14238
  language = "text",
@@ -14744,7 +14819,7 @@ var init_MarkdownContent = __esm({
14744
14819
  init_Box();
14745
14820
  init_CodeBlock();
14746
14821
  init_cn();
14747
- MarkdownContent = React81__default.memo(
14822
+ MarkdownContent = React82__default.memo(
14748
14823
  ({ content, direction = "ltr", className }) => {
14749
14824
  const { t: _t } = useTranslate();
14750
14825
  const safeContent = typeof content === "string" ? content : String(content ?? "");
@@ -15657,7 +15732,7 @@ var init_StateMachineView = __esm({
15657
15732
  Box,
15658
15733
  {
15659
15734
  className: cn(
15660
- "fixed z-50 animate-in fade-in-0 zoom-in-95 duration-150",
15735
+ "fixed z-50 animate-in fade-in-0 zoom-in-95 duration-fast",
15661
15736
  tooltip.pinned ? "pointer-events-auto" : "pointer-events-none"
15662
15737
  ),
15663
15738
  style: {
@@ -16021,7 +16096,7 @@ var init_StateMachineView = __esm({
16021
16096
  style: { top: title ? 30 : 0 },
16022
16097
  children: [
16023
16098
  entity && /* @__PURE__ */ jsx(EntityBox, { entity, config }),
16024
- states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(React81__default.Fragment, { children: renderStateNode(state, config) }, state.id) : /* @__PURE__ */ jsx(
16099
+ states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(React82__default.Fragment, { children: renderStateNode(state, config) }, state.id) : /* @__PURE__ */ jsx(
16025
16100
  StateNode2,
16026
16101
  {
16027
16102
  state,
@@ -18060,6 +18135,129 @@ var init_Breadcrumb = __esm({
18060
18135
  Breadcrumb.displayName = "Breadcrumb";
18061
18136
  }
18062
18137
  });
18138
+ function useSafeEventBus2() {
18139
+ try {
18140
+ return useEventBus();
18141
+ } catch {
18142
+ return { emit: () => {
18143
+ }, on: () => () => {
18144
+ }, once: () => {
18145
+ } };
18146
+ }
18147
+ }
18148
+ var log7, lookStyles4, ButtonGroup;
18149
+ var init_ButtonGroup = __esm({
18150
+ "components/core/molecules/ButtonGroup.tsx"() {
18151
+ "use client";
18152
+ init_cn();
18153
+ init_atoms();
18154
+ init_useEventBus();
18155
+ log7 = createLogger("almadar:ui:button-group");
18156
+ lookStyles4 = {
18157
+ "right-aligned-buttons": "",
18158
+ "floating-bar": "fixed bottom-section left-1/2 -translate-x-1/2 shadow-elevation-toast bg-card p-card-sm rounded-container",
18159
+ "inline-row": "gap-2 inline-flex",
18160
+ "dropdown-menu": "[&>button:not(:first-child)]:hidden",
18161
+ "command-palette-trigger": "[&>button:not(:first-child)]:hidden"
18162
+ };
18163
+ ButtonGroup = ({
18164
+ children,
18165
+ primary,
18166
+ secondary,
18167
+ variant = "default",
18168
+ orientation = "horizontal",
18169
+ className,
18170
+ // Filter-group pattern props (entity and filters are used for schema-driven filtering)
18171
+ entity: _entity,
18172
+ filters,
18173
+ look = "right-aligned-buttons"
18174
+ }) => {
18175
+ const eventBus = useSafeEventBus2();
18176
+ const variantClasses2 = {
18177
+ default: "gap-0",
18178
+ segmented: "gap-0 [&>button]:rounded-none [&>button:first-child]:rounded-l-lg [&>button:last-child]:rounded-r-lg [&>button:not(:first-child)]:border-l-0",
18179
+ toggle: "gap-0 [&>button]:rounded-none [&>button:first-child]:rounded-l-lg [&>button:last-child]:rounded-r-lg [&>button:not(:first-child)]:border-l-0"
18180
+ };
18181
+ const orientationClasses = {
18182
+ horizontal: "flex-row",
18183
+ vertical: "flex-col [&>button:first-child]:rounded-t-lg [&>button:last-child]:rounded-b-lg [&>button:not(:first-child)]:border-t-0 [&>button:not(:first-child)]:border-l"
18184
+ };
18185
+ const handleActionClick = (action) => {
18186
+ if (action.event) {
18187
+ eventBus.emit("UI:DISPATCH", { event: action.event });
18188
+ }
18189
+ if (action.navigatesTo) {
18190
+ eventBus.emit("UI:NAVIGATE", { url: action.navigatesTo });
18191
+ }
18192
+ };
18193
+ const renderFormActions = () => {
18194
+ const buttons = [];
18195
+ if (secondary) {
18196
+ secondary.forEach((action, index) => {
18197
+ buttons.push(
18198
+ /* @__PURE__ */ jsx(
18199
+ Button,
18200
+ {
18201
+ type: action.actionType === "submit" ? "submit" : "button",
18202
+ variant: action.variant || "ghost",
18203
+ onClick: () => handleActionClick(action),
18204
+ children: action.label
18205
+ },
18206
+ `secondary-${index}`
18207
+ )
18208
+ );
18209
+ });
18210
+ }
18211
+ if (primary) {
18212
+ const isSubmit = primary.actionType === "submit";
18213
+ buttons.push(
18214
+ /* @__PURE__ */ jsx(
18215
+ Button,
18216
+ {
18217
+ type: isSubmit ? "submit" : "button",
18218
+ variant: primary.variant || "primary",
18219
+ onClick: () => handleActionClick(primary),
18220
+ "data-testid": isSubmit ? "form-submit" : void 0,
18221
+ children: primary.label
18222
+ },
18223
+ "primary"
18224
+ )
18225
+ );
18226
+ }
18227
+ return buttons;
18228
+ };
18229
+ const renderFilters = () => {
18230
+ if (!filters || filters.length === 0) return null;
18231
+ return filters.map((filter, index) => /* @__PURE__ */ jsx(
18232
+ Button,
18233
+ {
18234
+ variant: "ghost",
18235
+ onClick: () => {
18236
+ log7.debug("Filter clicked", { field: filter.field });
18237
+ },
18238
+ children: filter.label
18239
+ },
18240
+ `filter-${filter.field}-${index}`
18241
+ ));
18242
+ };
18243
+ return /* @__PURE__ */ jsx(
18244
+ "div",
18245
+ {
18246
+ className: cn(
18247
+ "inline-flex gap-2",
18248
+ variantClasses2[variant],
18249
+ orientationClasses[orientation],
18250
+ lookStyles4[look],
18251
+ className
18252
+ ),
18253
+ role: "group",
18254
+ children: children || renderFilters() || renderFormActions()
18255
+ }
18256
+ );
18257
+ };
18258
+ ButtonGroup.displayName = "ButtonGroup";
18259
+ }
18260
+ });
18063
18261
  function dayWindowForViewport(width) {
18064
18262
  if (width <= 640) return 1;
18065
18263
  if (width <= 1024) return 3;
@@ -18802,7 +19000,7 @@ var init_CardGrid = __esm({
18802
19000
  CardGrid.displayName = "CardGrid";
18803
19001
  }
18804
19002
  });
18805
- function useSafeEventBus2() {
19003
+ function useSafeEventBus3() {
18806
19004
  try {
18807
19005
  return useEventBus();
18808
19006
  } catch {
@@ -18838,7 +19036,7 @@ var init_Carousel = __esm({
18838
19036
  const [activeIndex, setActiveIndex] = useState(0);
18839
19037
  const scrollRef = useRef(null);
18840
19038
  const autoPlayRef = useRef(null);
18841
- const eventBus = useSafeEventBus2();
19039
+ const eventBus = useSafeEventBus3();
18842
19040
  const { t } = useTranslate();
18843
19041
  const safeItems = items ?? [];
18844
19042
  const totalSlides = safeItems.length;
@@ -19200,7 +19398,7 @@ var init_Chart = __esm({
19200
19398
  return /* @__PURE__ */ jsx(
19201
19399
  Box,
19202
19400
  {
19203
- className: "h-full rounded-r-sm transition-all duration-500 ease-out min-w-[2px] cursor-pointer hover:opacity-80",
19401
+ className: "h-full rounded-r-sm transition-all duration-slow ease-standard min-w-[2px] cursor-pointer hover:opacity-80",
19204
19402
  style: {
19205
19403
  width: `${ratio}%`,
19206
19404
  backgroundColor: color
@@ -19256,7 +19454,7 @@ var init_Chart = __esm({
19256
19454
  Box,
19257
19455
  {
19258
19456
  className: cn(
19259
- "rounded-t-sm transition-all duration-500 ease-out min-h-[4px] cursor-pointer hover:opacity-80",
19457
+ "rounded-t-sm transition-all duration-slow ease-standard min-h-[4px] cursor-pointer hover:opacity-80",
19260
19458
  histogram ? "flex-1 mx-0" : "flex-1"
19261
19459
  ),
19262
19460
  style: {
@@ -19306,7 +19504,7 @@ var init_Chart = __esm({
19306
19504
  return /* @__PURE__ */ jsx(
19307
19505
  Box,
19308
19506
  {
19309
- className: "w-full transition-all duration-500 ease-out cursor-pointer hover:opacity-80",
19507
+ className: "w-full transition-all duration-slow ease-standard cursor-pointer hover:opacity-80",
19310
19508
  style: {
19311
19509
  height: `${ratio}%`,
19312
19510
  backgroundColor: color
@@ -19396,7 +19594,7 @@ var init_Chart = __esm({
19396
19594
  fill: seg.color,
19397
19595
  stroke: "var(--color-card)",
19398
19596
  strokeWidth: "2",
19399
- className: "transition-opacity duration-200 hover:opacity-80 cursor-pointer",
19597
+ className: "transition-opacity duration-fast hover:opacity-80 cursor-pointer",
19400
19598
  onClick: () => onPointClick?.(
19401
19599
  { label: seg.label, value: seg.value, color: seg.color },
19402
19600
  "default"
@@ -21595,8 +21793,8 @@ var init_Menu = __esm({
21595
21793
  "bottom-end": "bottom-start"
21596
21794
  };
21597
21795
  const effectivePosition = direction === "rtl" ? rtlMirror[position] ?? position : position;
21598
- const triggerChild = React81__default.isValidElement(trigger) ? trigger : /* @__PURE__ */ jsx(Typography, { variant: "small", as: "span", children: trigger });
21599
- const triggerElement = React81__default.cloneElement(
21796
+ const triggerChild = React82__default.isValidElement(trigger) ? trigger : /* @__PURE__ */ jsx(Typography, { variant: "small", as: "span", children: trigger });
21797
+ const triggerElement = React82__default.cloneElement(
21600
21798
  triggerChild,
21601
21799
  {
21602
21800
  ref: triggerRef,
@@ -21691,14 +21889,14 @@ function useDataDnd(args) {
21691
21889
  const isZone = Boolean(dragGroup || accepts || sortable);
21692
21890
  const enabled = isZone || Boolean(dndRoot);
21693
21891
  const eventBus = useEventBus();
21694
- const parentRoot = React81__default.useContext(RootCtx);
21892
+ const parentRoot = React82__default.useContext(RootCtx);
21695
21893
  const isRoot = enabled && parentRoot === null;
21696
- const zoneId = React81__default.useId();
21894
+ const zoneId = React82__default.useId();
21697
21895
  const ownGroup = dragGroup ?? accepts ?? zoneId;
21698
- const [optimisticOrders, setOptimisticOrders] = React81__default.useState(() => /* @__PURE__ */ new Map());
21699
- const optimisticOrdersRef = React81__default.useRef(optimisticOrders);
21896
+ const [optimisticOrders, setOptimisticOrders] = React82__default.useState(() => /* @__PURE__ */ new Map());
21897
+ const optimisticOrdersRef = React82__default.useRef(optimisticOrders);
21700
21898
  optimisticOrdersRef.current = optimisticOrders;
21701
- const clearOptimisticOrder = React81__default.useCallback((group) => {
21899
+ const clearOptimisticOrder = React82__default.useCallback((group) => {
21702
21900
  setOptimisticOrders((prev) => {
21703
21901
  if (!prev.has(group)) return prev;
21704
21902
  const next = new Map(prev);
@@ -21723,7 +21921,7 @@ function useDataDnd(args) {
21723
21921
  const raw = it[dndItemIdField];
21724
21922
  return raw != null ? String(raw) : `__idx_${idx}`;
21725
21923
  }).join("|");
21726
- const itemIds = React81__default.useMemo(
21924
+ const itemIds = React82__default.useMemo(
21727
21925
  () => orderedItems.map((it, idx) => {
21728
21926
  const raw = it[dndItemIdField];
21729
21927
  return raw != null ? String(raw) : `__idx_${idx}`;
@@ -21734,7 +21932,7 @@ function useDataDnd(args) {
21734
21932
  const raw = it[dndItemIdField];
21735
21933
  return raw != null ? String(raw) : `__${idx}`;
21736
21934
  }).join("|");
21737
- React81__default.useEffect(() => {
21935
+ React82__default.useEffect(() => {
21738
21936
  const root = isRoot ? null : parentRoot;
21739
21937
  if (root) {
21740
21938
  root.clearOptimisticOrder(ownGroup);
@@ -21742,20 +21940,20 @@ function useDataDnd(args) {
21742
21940
  clearOptimisticOrder(ownGroup);
21743
21941
  }
21744
21942
  }, [itemsContentSig, ownGroup]);
21745
- const zonesRef = React81__default.useRef(/* @__PURE__ */ new Map());
21746
- const registerZone = React81__default.useCallback((zoneId2, meta2) => {
21943
+ const zonesRef = React82__default.useRef(/* @__PURE__ */ new Map());
21944
+ const registerZone = React82__default.useCallback((zoneId2, meta2) => {
21747
21945
  zonesRef.current.set(zoneId2, meta2);
21748
21946
  }, []);
21749
- const unregisterZone = React81__default.useCallback((zoneId2) => {
21947
+ const unregisterZone = React82__default.useCallback((zoneId2) => {
21750
21948
  zonesRef.current.delete(zoneId2);
21751
21949
  }, []);
21752
- const [activeDrag, setActiveDrag] = React81__default.useState(null);
21753
- const [overZoneGroup, setOverZoneGroup] = React81__default.useState(null);
21754
- const meta = React81__default.useMemo(
21950
+ const [activeDrag, setActiveDrag] = React82__default.useState(null);
21951
+ const [overZoneGroup, setOverZoneGroup] = React82__default.useState(null);
21952
+ const meta = React82__default.useMemo(
21755
21953
  () => ({ group: ownGroup, dropEvent, reorderEvent, positionEvent, itemIds, rawItems: items, idField: dndItemIdField }),
21756
21954
  [ownGroup, dropEvent, reorderEvent, positionEvent, itemIds, items, dndItemIdField]
21757
21955
  );
21758
- React81__default.useEffect(() => {
21956
+ React82__default.useEffect(() => {
21759
21957
  const target = isRoot ? null : parentRoot;
21760
21958
  if (!target) {
21761
21959
  zonesRef.current.set(zoneId, meta);
@@ -21774,7 +21972,7 @@ function useDataDnd(args) {
21774
21972
  }, [parentRoot, isRoot, zoneId, meta]);
21775
21973
  const sensors = useAlmadarDndSensors(true);
21776
21974
  const collisionDetection = almadarDndCollisionDetection;
21777
- const findZoneByItem = React81__default.useCallback(
21975
+ const findZoneByItem = React82__default.useCallback(
21778
21976
  (id) => {
21779
21977
  for (const z of zonesRef.current.values()) {
21780
21978
  if (z.itemIds.includes(id)) return z;
@@ -21783,7 +21981,7 @@ function useDataDnd(args) {
21783
21981
  },
21784
21982
  []
21785
21983
  );
21786
- React81__default.useCallback(
21984
+ React82__default.useCallback(
21787
21985
  (group) => {
21788
21986
  for (const z of zonesRef.current.values()) {
21789
21987
  if (z.group === group) return z;
@@ -21792,7 +21990,7 @@ function useDataDnd(args) {
21792
21990
  },
21793
21991
  []
21794
21992
  );
21795
- const handleDragEnd = React81__default.useCallback(
21993
+ const handleDragEnd = React82__default.useCallback(
21796
21994
  (event) => {
21797
21995
  const { active, over } = event;
21798
21996
  const activeIdStr = String(active.id);
@@ -21883,8 +22081,8 @@ function useDataDnd(args) {
21883
22081
  },
21884
22082
  [eventBus]
21885
22083
  );
21886
- const sortableData = React81__default.useMemo(() => ({ dndGroup: ownGroup }), [ownGroup]);
21887
- const SortableItem = React81__default.useCallback(
22084
+ const sortableData = React82__default.useMemo(() => ({ dndGroup: ownGroup }), [ownGroup]);
22085
+ const SortableItem = React82__default.useCallback(
21888
22086
  ({ id, children }) => {
21889
22087
  const {
21890
22088
  attributes,
@@ -21924,7 +22122,7 @@ function useDataDnd(args) {
21924
22122
  id: droppableId,
21925
22123
  data: sortableData
21926
22124
  });
21927
- const ctx = React81__default.useContext(RootCtx);
22125
+ const ctx = React82__default.useContext(RootCtx);
21928
22126
  const activeDrag2 = ctx?.activeDrag ?? null;
21929
22127
  const overZoneGroup2 = ctx?.overZoneGroup ?? null;
21930
22128
  const isThisZoneOver = overZoneGroup2 === ownGroup;
@@ -21939,7 +22137,7 @@ function useDataDnd(args) {
21939
22137
  showForeignPlaceholder,
21940
22138
  ctxAvailable: ctx != null
21941
22139
  });
21942
- React81__default.useEffect(() => {
22140
+ React82__default.useEffect(() => {
21943
22141
  dndLog.info("dropzone:isOver:change", { droppableId, group: ownGroup, isOver, isThisZoneOver, showForeignPlaceholder, activeDragSourceGroup: activeDrag2?.sourceGroup ?? null });
21944
22142
  }, [droppableId, isOver, isThisZoneOver, showForeignPlaceholder]);
21945
22143
  return /* @__PURE__ */ jsx(
@@ -21953,11 +22151,11 @@ function useDataDnd(args) {
21953
22151
  }
21954
22152
  );
21955
22153
  };
21956
- const rootContextValue = React81__default.useMemo(
22154
+ const rootContextValue = React82__default.useMemo(
21957
22155
  () => ({ registerZone, unregisterZone, activeDrag, overZoneGroup, optimisticOrders, clearOptimisticOrder }),
21958
22156
  [registerZone, unregisterZone, activeDrag, overZoneGroup, optimisticOrders, clearOptimisticOrder]
21959
22157
  );
21960
- const handleDragStart = React81__default.useCallback((event) => {
22158
+ const handleDragStart = React82__default.useCallback((event) => {
21961
22159
  const sourceZone = findZoneByItem(event.active.id);
21962
22160
  const rect = event.active.rect.current.initial;
21963
22161
  const height = rect?.height && rect.height > 0 ? rect.height : 64;
@@ -21976,7 +22174,7 @@ function useDataDnd(args) {
21976
22174
  isRoot
21977
22175
  });
21978
22176
  }, [findZoneByItem, isRoot, zoneId]);
21979
- const handleDragOver = React81__default.useCallback((event) => {
22177
+ const handleDragOver = React82__default.useCallback((event) => {
21980
22178
  const { active, over } = event;
21981
22179
  const overData = over?.data?.current;
21982
22180
  const overGroup = overData?.dndGroup ?? null;
@@ -22046,7 +22244,7 @@ function useDataDnd(args) {
22046
22244
  return next;
22047
22245
  });
22048
22246
  }, []);
22049
- const handleDragCancel = React81__default.useCallback((event) => {
22247
+ const handleDragCancel = React82__default.useCallback((event) => {
22050
22248
  setActiveDrag(null);
22051
22249
  setOverZoneGroup(null);
22052
22250
  dndLog.warn("dragCancel", {
@@ -22054,12 +22252,12 @@ function useDataDnd(args) {
22054
22252
  reason: "dnd-kit cancelled the drag (escape key, pointer interrupted, or external)"
22055
22253
  });
22056
22254
  }, []);
22057
- const handleDragEndWithCleanup = React81__default.useCallback((event) => {
22255
+ const handleDragEndWithCleanup = React82__default.useCallback((event) => {
22058
22256
  handleDragEnd(event);
22059
22257
  setActiveDrag(null);
22060
22258
  setOverZoneGroup(null);
22061
22259
  }, [handleDragEnd]);
22062
- const wrapContainer = React81__default.useCallback(
22260
+ const wrapContainer = React82__default.useCallback(
22063
22261
  (children) => {
22064
22262
  if (!enabled) return children;
22065
22263
  const strategy = layout === "grid" ? rectSortingStrategy : verticalListSortingStrategy;
@@ -22113,7 +22311,7 @@ var init_useDataDnd = __esm({
22113
22311
  init_useAlmadarDndCollision();
22114
22312
  init_Box();
22115
22313
  dndLog = createLogger("almadar:ui:dnd");
22116
- RootCtx = React81__default.createContext(null);
22314
+ RootCtx = React82__default.createContext(null);
22117
22315
  }
22118
22316
  });
22119
22317
  function renderIconInput(icon, props) {
@@ -22310,7 +22508,7 @@ function DataGrid({
22310
22508
  /* @__PURE__ */ jsx(
22311
22509
  Box,
22312
22510
  {
22313
- className: cn("grid", gapStyles5[gap], scrollX ? "grid-flow-col overflow-x-auto" : colsClass, lookStyles4[look], className),
22511
+ className: cn("grid", gapStyles5[gap], scrollX ? "grid-flow-col overflow-x-auto" : colsClass, lookStyles5[look], className),
22314
22512
  style: scrollX ? { gridAutoFlow: "column", gridAutoColumns: `minmax(${minCardWidth}px, 1fr)` } : gridTemplateColumns ? { gridTemplateColumns } : void 0,
22315
22513
  children: data.map((item, index) => {
22316
22514
  const itemData = item;
@@ -22505,7 +22703,7 @@ function DataGrid({
22505
22703
  ] })
22506
22704
  );
22507
22705
  }
22508
- var dataGridLog, BADGE_VARIANTS, gapStyles5, lookStyles4;
22706
+ var dataGridLog, BADGE_VARIANTS, gapStyles5, lookStyles5;
22509
22707
  var init_DataGrid = __esm({
22510
22708
  "components/core/molecules/DataGrid.tsx"() {
22511
22709
  "use client";
@@ -22540,7 +22738,7 @@ var init_DataGrid = __esm({
22540
22738
  lg: "gap-6",
22541
22739
  xl: "gap-8"
22542
22740
  };
22543
- lookStyles4 = {
22741
+ lookStyles5 = {
22544
22742
  dense: "gap-2 [&>*]:p-card-sm",
22545
22743
  spacious: "gap-8 [&>*]:p-card-lg",
22546
22744
  striped: "[&>*:nth-child(even)]:bg-muted/30",
@@ -22640,7 +22838,7 @@ function DataList({
22640
22838
  }) {
22641
22839
  const eventBus = useEventBus();
22642
22840
  const { t } = useTranslate();
22643
- const [visibleCount, setVisibleCount] = React81__default.useState(pageSize || Infinity);
22841
+ const [visibleCount, setVisibleCount] = React82__default.useState(pageSize || Infinity);
22644
22842
  const fieldDefs = fields ?? columns ?? [];
22645
22843
  const allDataRaw = Array.isArray(entity) ? entity : entity ? [entity] : [];
22646
22844
  const dnd = useDataDnd({
@@ -22659,7 +22857,7 @@ function DataList({
22659
22857
  const data = pageSize > 0 ? allData.slice(0, visibleCount) : allData;
22660
22858
  const hasMoreLocal = pageSize > 0 && visibleCount < allData.length;
22661
22859
  const hasRenderProp = typeof children === "function";
22662
- React81__default.useEffect(() => {
22860
+ React82__default.useEffect(() => {
22663
22861
  const renderItemTypeOf = typeof schemaRenderItem;
22664
22862
  const childrenTypeOf = typeof children;
22665
22863
  if (data.length > 0 && !hasRenderProp) {
@@ -22763,7 +22961,7 @@ function DataList({
22763
22961
  const items2 = [...data];
22764
22962
  const groups2 = groupBy ? groupData(items2, groupBy) : [{ label: "", items: items2 }];
22765
22963
  const contentField = titleField?.name ?? fieldDefs[0]?.name ?? "";
22766
- return /* @__PURE__ */ jsx(VStack, { gap: "sm", className: cn("py-2", className), children: groups2.map((group, gi) => /* @__PURE__ */ jsxs(React81__default.Fragment, { children: [
22964
+ return /* @__PURE__ */ jsx(VStack, { gap: "sm", className: cn("py-2", className), children: groups2.map((group, gi) => /* @__PURE__ */ jsxs(React82__default.Fragment, { children: [
22767
22965
  group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: "my-2" }),
22768
22966
  group.items.map((itemData, index) => {
22769
22967
  const id = itemData.id || `${gi}-${index}`;
@@ -22904,7 +23102,7 @@ function DataList({
22904
23102
  className
22905
23103
  ),
22906
23104
  children: [
22907
- groups.map((group, gi) => /* @__PURE__ */ jsxs(React81__default.Fragment, { children: [
23105
+ groups.map((group, gi) => /* @__PURE__ */ jsxs(React82__default.Fragment, { children: [
22908
23106
  group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-4" : "mt-0" }),
22909
23107
  group.items.map(
22910
23108
  (itemData, index) => renderItem(itemData, index, gi === groups.length - 1 && index === group.items.length - 1)
@@ -22989,7 +23187,7 @@ var init_FormSection = __esm({
22989
23187
  columns = 1,
22990
23188
  className
22991
23189
  }) => {
22992
- const [collapsed, setCollapsed] = React81__default.useState(defaultCollapsed);
23190
+ const [collapsed, setCollapsed] = React82__default.useState(defaultCollapsed);
22993
23191
  const { t } = useTranslate();
22994
23192
  const eventBus = useEventBus();
22995
23193
  const gridClass = {
@@ -22997,7 +23195,7 @@ var init_FormSection = __esm({
22997
23195
  2: "grid-cols-1 md:grid-cols-2",
22998
23196
  3: "grid-cols-1 md:grid-cols-2 lg:grid-cols-3"
22999
23197
  }[columns];
23000
- React81__default.useCallback(() => {
23198
+ React82__default.useCallback(() => {
23001
23199
  if (collapsible) {
23002
23200
  setCollapsed((prev) => !prev);
23003
23201
  eventBus.emit("UI:TOGGLE_COLLAPSE", { collapsed: !collapsed });
@@ -23255,129 +23453,6 @@ var init_FormField = __esm({
23255
23453
  FormField.displayName = "FormField";
23256
23454
  }
23257
23455
  });
23258
- function useSafeEventBus3() {
23259
- try {
23260
- return useEventBus();
23261
- } catch {
23262
- return { emit: () => {
23263
- }, on: () => () => {
23264
- }, once: () => {
23265
- } };
23266
- }
23267
- }
23268
- var log7, lookStyles5, ButtonGroup;
23269
- var init_ButtonGroup = __esm({
23270
- "components/core/molecules/ButtonGroup.tsx"() {
23271
- "use client";
23272
- init_cn();
23273
- init_atoms();
23274
- init_useEventBus();
23275
- log7 = createLogger("almadar:ui:button-group");
23276
- lookStyles5 = {
23277
- "right-aligned-buttons": "",
23278
- "floating-bar": "fixed bottom-section left-1/2 -translate-x-1/2 shadow-elevation-toast bg-card p-card-sm rounded-container",
23279
- "inline-row": "gap-2 inline-flex",
23280
- "dropdown-menu": "[&>button:not(:first-child)]:hidden",
23281
- "command-palette-trigger": "[&>button:not(:first-child)]:hidden"
23282
- };
23283
- ButtonGroup = ({
23284
- children,
23285
- primary,
23286
- secondary,
23287
- variant = "default",
23288
- orientation = "horizontal",
23289
- className,
23290
- // Filter-group pattern props (entity and filters are used for schema-driven filtering)
23291
- entity: _entity,
23292
- filters,
23293
- look = "right-aligned-buttons"
23294
- }) => {
23295
- const eventBus = useSafeEventBus3();
23296
- const variantClasses2 = {
23297
- default: "gap-0",
23298
- segmented: "gap-0 [&>button]:rounded-none [&>button:first-child]:rounded-l-lg [&>button:last-child]:rounded-r-lg [&>button:not(:first-child)]:border-l-0",
23299
- toggle: "gap-0 [&>button]:rounded-none [&>button:first-child]:rounded-l-lg [&>button:last-child]:rounded-r-lg [&>button:not(:first-child)]:border-l-0"
23300
- };
23301
- const orientationClasses = {
23302
- horizontal: "flex-row",
23303
- vertical: "flex-col [&>button:first-child]:rounded-t-lg [&>button:last-child]:rounded-b-lg [&>button:not(:first-child)]:border-t-0 [&>button:not(:first-child)]:border-l"
23304
- };
23305
- const handleActionClick = (action) => {
23306
- if (action.event) {
23307
- eventBus.emit("UI:DISPATCH", { event: action.event });
23308
- }
23309
- if (action.navigatesTo) {
23310
- eventBus.emit("UI:NAVIGATE", { url: action.navigatesTo });
23311
- }
23312
- };
23313
- const renderFormActions = () => {
23314
- const buttons = [];
23315
- if (secondary) {
23316
- secondary.forEach((action, index) => {
23317
- buttons.push(
23318
- /* @__PURE__ */ jsx(
23319
- Button,
23320
- {
23321
- type: action.actionType === "submit" ? "submit" : "button",
23322
- variant: action.variant || "ghost",
23323
- onClick: () => handleActionClick(action),
23324
- children: action.label
23325
- },
23326
- `secondary-${index}`
23327
- )
23328
- );
23329
- });
23330
- }
23331
- if (primary) {
23332
- const isSubmit = primary.actionType === "submit";
23333
- buttons.push(
23334
- /* @__PURE__ */ jsx(
23335
- Button,
23336
- {
23337
- type: isSubmit ? "submit" : "button",
23338
- variant: primary.variant || "primary",
23339
- onClick: () => handleActionClick(primary),
23340
- "data-testid": isSubmit ? "form-submit" : void 0,
23341
- children: primary.label
23342
- },
23343
- "primary"
23344
- )
23345
- );
23346
- }
23347
- return buttons;
23348
- };
23349
- const renderFilters = () => {
23350
- if (!filters || filters.length === 0) return null;
23351
- return filters.map((filter, index) => /* @__PURE__ */ jsx(
23352
- Button,
23353
- {
23354
- variant: "ghost",
23355
- onClick: () => {
23356
- log7.debug("Filter clicked", { field: filter.field });
23357
- },
23358
- children: filter.label
23359
- },
23360
- `filter-${filter.field}-${index}`
23361
- ));
23362
- };
23363
- return /* @__PURE__ */ jsx(
23364
- "div",
23365
- {
23366
- className: cn(
23367
- "inline-flex gap-2",
23368
- variantClasses2[variant],
23369
- orientationClasses[orientation],
23370
- lookStyles5[look],
23371
- className
23372
- ),
23373
- role: "group",
23374
- children: children || renderFilters() || renderFormActions()
23375
- }
23376
- );
23377
- };
23378
- ButtonGroup.displayName = "ButtonGroup";
23379
- }
23380
- });
23381
23456
  var resolveFilterType, lookStyles6, FilterGroup;
23382
23457
  var init_FilterGroup = __esm({
23383
23458
  "components/core/molecules/FilterGroup.tsx"() {
@@ -23490,7 +23565,7 @@ var init_FilterGroup = __esm({
23490
23565
  type: "button",
23491
23566
  onClick: () => handleFilterSelect(filter.field, null),
23492
23567
  className: cn(
23493
- "px-3 py-1.5 text-sm font-medium transition-all duration-[var(--transition-fast)]",
23568
+ "px-3 py-1.5 text-sm font-medium transition-all duration-fast",
23494
23569
  !selectedValues[filter.field] ? "bg-primary text-primary-foreground" : "bg-card text-muted-foreground hover:bg-muted"
23495
23570
  ),
23496
23571
  children: t("filterGroup.all")
@@ -23502,7 +23577,7 @@ var init_FilterGroup = __esm({
23502
23577
  type: "button",
23503
23578
  onClick: () => handleFilterSelect(filter.field, option),
23504
23579
  className: cn(
23505
- "px-3 py-1.5 text-sm font-medium transition-all duration-[var(--transition-fast)]",
23580
+ "px-3 py-1.5 text-sm font-medium transition-all duration-fast",
23506
23581
  "border-l-[length:var(--border-width)] border-border",
23507
23582
  selectedValues[filter.field] === option ? "bg-primary text-primary-foreground" : "bg-card text-muted-foreground hover:bg-muted"
23508
23583
  ),
@@ -23883,7 +23958,7 @@ var init_Flex = __esm({
23883
23958
  flexStyle.flexBasis = typeof basis === "number" ? `${basis}px` : basis;
23884
23959
  }
23885
23960
  }
23886
- return React81__default.createElement(Component, {
23961
+ return React82__default.createElement(Component, {
23887
23962
  className: cn(
23888
23963
  inline ? "inline-flex" : "flex",
23889
23964
  directionStyles[direction],
@@ -24002,7 +24077,7 @@ var init_Grid = __esm({
24002
24077
  as: Component = "div"
24003
24078
  }) => {
24004
24079
  const mergedStyle = rows ? { gridTemplateRows: `repeat(${rows}, minmax(0, 1fr))`, ...style } : style;
24005
- return React81__default.createElement(
24080
+ return React82__default.createElement(
24006
24081
  Component,
24007
24082
  {
24008
24083
  className: cn(
@@ -24113,6 +24188,7 @@ var init_Popover = __esm({
24113
24188
  "components/core/molecules/Popover.tsx"() {
24114
24189
  "use client";
24115
24190
  init_Typography();
24191
+ init_Presence();
24116
24192
  init_cn();
24117
24193
  init_useTapReveal();
24118
24194
  arrowClasses = {
@@ -24136,6 +24212,7 @@ var init_Popover = __esm({
24136
24212
  const [popoverWidth, setPopoverWidth] = useState(0);
24137
24213
  const triggerRef = useRef(null);
24138
24214
  const popoverRef = useRef(null);
24215
+ const { mounted, className: panelAnim, onAnimationEnd } = usePresence(isOpen, { animation: "popover" });
24139
24216
  const updatePosition = () => {
24140
24217
  if (triggerRef.current) {
24141
24218
  setTriggerRect(triggerRef.current.getBoundingClientRect());
@@ -24161,10 +24238,11 @@ var init_Popover = __esm({
24161
24238
  useEffect(() => {
24162
24239
  if (isOpen) {
24163
24240
  updatePosition();
24164
- } else {
24165
- setPopoverWidth(0);
24166
24241
  }
24167
24242
  }, [isOpen]);
24243
+ useEffect(() => {
24244
+ if (!mounted) setPopoverWidth(0);
24245
+ }, [mounted]);
24168
24246
  useLayoutEffect(() => {
24169
24247
  if (isOpen && popoverRef.current) {
24170
24248
  const measured = popoverRef.current.offsetWidth;
@@ -24198,9 +24276,9 @@ var init_Popover = __esm({
24198
24276
  onMouseLeave: handleClose,
24199
24277
  onPointerDown: tapTriggerProps.onPointerDown
24200
24278
  };
24201
- const childElement = React81__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
24279
+ const childElement = React82__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
24202
24280
  const childPointerDown = childElement.props.onPointerDown;
24203
- const triggerElement = React81__default.cloneElement(
24281
+ const triggerElement = React82__default.cloneElement(
24204
24282
  childElement,
24205
24283
  {
24206
24284
  ref: triggerRef,
@@ -24213,13 +24291,14 @@ var init_Popover = __esm({
24213
24291
  } : void 0
24214
24292
  }
24215
24293
  );
24216
- const panel = isOpen && triggerRect ? /* @__PURE__ */ jsxs(
24294
+ const panel = mounted && triggerRect ? /* @__PURE__ */ jsxs(
24217
24295
  "div",
24218
24296
  {
24219
24297
  ref: popoverRef,
24220
24298
  className: cn(
24221
24299
  "fixed z-50 p-4",
24222
24300
  "bg-card border-2 border-border shadow-elevation-popover",
24301
+ panelAnim,
24223
24302
  className
24224
24303
  ),
24225
24304
  style: {
@@ -24227,6 +24306,7 @@ var init_Popover = __esm({
24227
24306
  ...popoverWidth === 0 ? { visibility: "hidden" } : void 0
24228
24307
  },
24229
24308
  role: "dialog",
24309
+ onAnimationEnd,
24230
24310
  onMouseEnter: trigger === "hover" ? handleOpen : void 0,
24231
24311
  onMouseLeave: trigger === "hover" ? handleClose : void 0,
24232
24312
  children: [
@@ -24640,6 +24720,7 @@ var init_SidePanel = __esm({
24640
24720
  init_Box();
24641
24721
  init_Button();
24642
24722
  init_Typography();
24723
+ init_Presence();
24643
24724
  init_cn();
24644
24725
  init_useEventBus();
24645
24726
  SidePanel = ({
@@ -24659,15 +24740,17 @@ var init_SidePanel = __esm({
24659
24740
  if (closeEvent) eventBus.emit(`UI:${closeEvent}`, {});
24660
24741
  onClose();
24661
24742
  };
24662
- if (!isOpen) return null;
24743
+ const { mounted, className: panelAnim, onAnimationEnd } = usePresence(isOpen, { animation: "drawer" });
24744
+ const drawerSign = position === "right" ? 1 : -1;
24745
+ if (!mounted) return null;
24663
24746
  return /* @__PURE__ */ jsxs(Fragment, { children: [
24664
- showOverlay && /* @__PURE__ */ jsx(
24747
+ showOverlay && /* @__PURE__ */ jsx(Presence, { show: isOpen, animation: "overlay", children: /* @__PURE__ */ jsx(
24665
24748
  Box,
24666
24749
  {
24667
24750
  className: "fixed inset-0 bg-white/80 backdrop-blur-sm z-40 lg:hidden",
24668
24751
  onClick: handleClose
24669
24752
  }
24670
- ),
24753
+ ) }),
24671
24754
  /* @__PURE__ */ jsxs(
24672
24755
  Aside,
24673
24756
  {
@@ -24677,11 +24760,13 @@ var init_SidePanel = __esm({
24677
24760
  "border-l-2 border-border",
24678
24761
  position === "left" && "border-l-0 border-r-2",
24679
24762
  "flex flex-col",
24680
- "transition-transform duration-normal ease-standard",
24763
+ panelAnim,
24681
24764
  width,
24682
24765
  position === "right" ? "right-0" : "left-0",
24683
24766
  className
24684
24767
  ),
24768
+ style: { "--motion-drawer-sign": drawerSign },
24769
+ onAnimationEnd,
24685
24770
  children: [
24686
24771
  /* @__PURE__ */ jsxs(Box, { className: "flex items-center justify-between p-4 border-b-2 border-border sticky top-0 bg-card z-10", children: [
24687
24772
  /* @__PURE__ */ jsx(Typography, { variant: "h6", children: title }),
@@ -24802,9 +24887,9 @@ var init_Tooltip = __esm({
24802
24887
  if (hideTimeoutRef.current) clearTimeout(hideTimeoutRef.current);
24803
24888
  };
24804
24889
  }, []);
24805
- const triggerElement = React81__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
24890
+ const triggerElement = React82__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
24806
24891
  const childPointerDown = triggerElement.props.onPointerDown;
24807
- const trigger = React81__default.cloneElement(triggerElement, {
24892
+ const trigger = React82__default.cloneElement(triggerElement, {
24808
24893
  ref: triggerRef,
24809
24894
  onMouseEnter: handleMouseEnter,
24810
24895
  onMouseLeave: handleMouseLeave,
@@ -24894,7 +24979,7 @@ var init_WizardProgress = __esm({
24894
24979
  children: /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: normalizedSteps.map((step, index) => {
24895
24980
  const isActive = index === currentStep;
24896
24981
  const isCompleted = index < currentStep;
24897
- return /* @__PURE__ */ jsxs(React81__default.Fragment, { children: [
24982
+ return /* @__PURE__ */ jsxs(React82__default.Fragment, { children: [
24898
24983
  /* @__PURE__ */ jsx(
24899
24984
  "button",
24900
24985
  {
@@ -25445,7 +25530,7 @@ var init_FormSectionHeader = __esm({
25445
25530
  name: "chevron-down",
25446
25531
  size: "sm",
25447
25532
  className: cn(
25448
- "text-muted-foreground transition-transform duration-200 shrink-0",
25533
+ "text-muted-foreground transition-transform duration-fast shrink-0",
25449
25534
  isCollapsed && "-rotate-90"
25450
25535
  )
25451
25536
  }
@@ -26455,13 +26540,13 @@ var init_MapView = __esm({
26455
26540
  shadowSize: [41, 41]
26456
26541
  });
26457
26542
  L.Marker.prototype.options.icon = defaultIcon;
26458
- const { useEffect: useEffect58, useRef: useRef58, useCallback: useCallback86, useState: useState87 } = React81__default;
26543
+ const { useEffect: useEffect59, useRef: useRef59, useCallback: useCallback87, useState: useState89 } = React82__default;
26459
26544
  const { Typography: Typography2 } = await Promise.resolve().then(() => (init_Typography(), Typography_exports));
26460
26545
  const { useEventBus: useEventBus2 } = await Promise.resolve().then(() => (init_useEventBus(), useEventBus_exports));
26461
26546
  function MapUpdater({ centerLat, centerLng, zoom }) {
26462
26547
  const map = useMap();
26463
- const prevRef = useRef58({ centerLat, centerLng, zoom });
26464
- useEffect58(() => {
26548
+ const prevRef = useRef59({ centerLat, centerLng, zoom });
26549
+ useEffect59(() => {
26465
26550
  const prev = prevRef.current;
26466
26551
  if (prev.centerLat !== centerLat || prev.centerLng !== centerLng || prev.zoom !== zoom) {
26467
26552
  map.setView([centerLat, centerLng], zoom);
@@ -26472,7 +26557,7 @@ var init_MapView = __esm({
26472
26557
  }
26473
26558
  function MapClickHandler({ onMapClick }) {
26474
26559
  const map = useMap();
26475
- useEffect58(() => {
26560
+ useEffect59(() => {
26476
26561
  if (!onMapClick) return;
26477
26562
  const handler = (e) => {
26478
26563
  onMapClick(e.latlng.lat, e.latlng.lng);
@@ -26500,8 +26585,8 @@ var init_MapView = __esm({
26500
26585
  showAttribution = true
26501
26586
  }) {
26502
26587
  const eventBus = useEventBus2();
26503
- const [clickedPosition, setClickedPosition] = useState87(null);
26504
- const handleMapClick = useCallback86((lat, lng) => {
26588
+ const [clickedPosition, setClickedPosition] = useState89(null);
26589
+ const handleMapClick = useCallback87((lat, lng) => {
26505
26590
  if (showClickedPin) {
26506
26591
  setClickedPosition({ lat, lng });
26507
26592
  }
@@ -26510,7 +26595,7 @@ var init_MapView = __esm({
26510
26595
  eventBus.emit(`UI:${mapClickEvent}`, { latitude: lat, longitude: lng });
26511
26596
  }
26512
26597
  }, [onMapClick, mapClickEvent, eventBus, showClickedPin]);
26513
- const handleMarkerClick = useCallback86((marker) => {
26598
+ const handleMarkerClick = useCallback87((marker) => {
26514
26599
  onMarkerClick?.(marker);
26515
26600
  if (markerClickEvent) {
26516
26601
  eventBus.emit(`UI:${markerClickEvent}`, { ...marker });
@@ -26710,7 +26795,7 @@ var init_NumberStepper = __esm({
26710
26795
  "text-foreground",
26711
26796
  "hover:bg-muted",
26712
26797
  "active:bg-muted",
26713
- "transition-colors duration-100",
26798
+ "transition-colors duration-instant",
26714
26799
  "disabled:opacity-40 disabled:cursor-not-allowed disabled:hover:bg-transparent",
26715
26800
  "focus:outline-none focus:ring-[length:var(--focus-ring-width)] focus:ring-ring focus:ring-inset",
26716
26801
  styles.button
@@ -26751,7 +26836,7 @@ var init_NumberStepper = __esm({
26751
26836
  "text-foreground",
26752
26837
  "hover:bg-muted",
26753
26838
  "active:bg-muted",
26754
- "transition-colors duration-100",
26839
+ "transition-colors duration-instant",
26755
26840
  "disabled:opacity-40 disabled:cursor-not-allowed disabled:hover:bg-transparent",
26756
26841
  "focus:outline-none focus:ring-[length:var(--focus-ring-width)] focus:ring-ring focus:ring-inset",
26757
26842
  styles.button
@@ -26875,7 +26960,7 @@ var init_StarRating = __esm({
26875
26960
  className: cn(
26876
26961
  styles.star,
26877
26962
  "text-foreground/30",
26878
- "transition-colors duration-100"
26963
+ "transition-colors duration-instant"
26879
26964
  ),
26880
26965
  strokeWidth: 1.5
26881
26966
  }
@@ -26888,7 +26973,7 @@ var init_StarRating = __esm({
26888
26973
  styles.star,
26889
26974
  "absolute inset-0",
26890
26975
  "text-warning fill-warning",
26891
- "transition-colors duration-100"
26976
+ "transition-colors duration-instant"
26892
26977
  ),
26893
26978
  strokeWidth: 1.5,
26894
26979
  style: isHalf ? { clipPath: "inset(0 50% 0 0)" } : void 0
@@ -27043,7 +27128,7 @@ var init_UploadDropZone = __esm({
27043
27128
  "relative flex flex-col items-center justify-center",
27044
27129
  "p-8 rounded-sm",
27045
27130
  "border-2 border-dashed",
27046
- "transition-colors duration-150",
27131
+ "transition-colors duration-fast",
27047
27132
  "cursor-pointer",
27048
27133
  isDragOver ? "border-primary bg-primary bg-opacity-5" : "border-border bg-surface",
27049
27134
  error && "border-error",
@@ -27370,8 +27455,8 @@ function TableView({
27370
27455
  }) {
27371
27456
  const eventBus = useEventBus();
27372
27457
  const { t } = useTranslate();
27373
- const [visibleCount, setVisibleCount] = React81__default.useState(pageSize > 0 ? pageSize : Infinity);
27374
- const [localSelected, setLocalSelected] = React81__default.useState(/* @__PURE__ */ new Set());
27458
+ const [visibleCount, setVisibleCount] = React82__default.useState(pageSize > 0 ? pageSize : Infinity);
27459
+ const [localSelected, setLocalSelected] = React82__default.useState(/* @__PURE__ */ new Set());
27375
27460
  const colDefs = columns ?? fields ?? [];
27376
27461
  const allDataRaw = Array.isArray(entity) ? entity : entity ? [entity] : [];
27377
27462
  const dnd = useDataDnd({
@@ -27451,7 +27536,7 @@ function TableView({
27451
27536
  className: cn(
27452
27537
  "grid items-center gap-3 sticky top-0 z-10",
27453
27538
  "bg-[var(--color-surface-subtle)] border-b border-[var(--color-border)]",
27454
- "text-[var(--color-text-muted)] uppercase text-xs font-semibold tracking-wide",
27539
+ "text-muted-foreground uppercase text-xs font-semibold tracking-wide",
27455
27540
  lk.headPad
27456
27541
  ),
27457
27542
  children: [
@@ -27566,12 +27651,12 @@ function TableView({
27566
27651
  ]
27567
27652
  }
27568
27653
  );
27569
- return dnd.isZone ? /* @__PURE__ */ jsx(dnd.SortableItem, { id: row[idField] ?? id, children: rowInner }, id) : /* @__PURE__ */ jsx(React81__default.Fragment, { children: rowInner }, id);
27654
+ return dnd.isZone ? /* @__PURE__ */ jsx(dnd.SortableItem, { id: row[idField] ?? id, children: rowInner }, id) : /* @__PURE__ */ jsx(React82__default.Fragment, { children: rowInner }, id);
27570
27655
  };
27571
27656
  const items = Array.from(data);
27572
27657
  const groups = groupBy ? groupData2(items, groupBy) : [{ label: "", items }];
27573
27658
  let runningIndex = 0;
27574
- const body = /* @__PURE__ */ jsx(Box, { role: "rowgroup", children: groups.map((group, gi) => /* @__PURE__ */ jsxs(React81__default.Fragment, { children: [
27659
+ const body = /* @__PURE__ */ jsx(Box, { role: "rowgroup", children: groups.map((group, gi) => /* @__PURE__ */ jsxs(React82__default.Fragment, { children: [
27575
27660
  group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-3" : "mt-0" }),
27576
27661
  group.items.map((row) => renderRow(row, runningIndex++))
27577
27662
  ] }, gi)) });
@@ -28234,7 +28319,7 @@ function SortableListInner({
28234
28319
  "flex items-center justify-center",
28235
28320
  "text-muted-foreground",
28236
28321
  "hover:text-foreground",
28237
- "transition-colors duration-100",
28322
+ "transition-colors duration-instant",
28238
28323
  "px-1"
28239
28324
  ),
28240
28325
  "aria-grabbed": ariaGrabbed,
@@ -28261,7 +28346,7 @@ function SortableListInner({
28261
28346
  gap: "sm",
28262
28347
  align: "center",
28263
28348
  className: cn(
28264
- "transition-opacity duration-150",
28349
+ "transition-opacity duration-fast",
28265
28350
  isBeingDragged && "opacity-50"
28266
28351
  ),
28267
28352
  children: [
@@ -28368,7 +28453,7 @@ var init_PullToRefresh = __esm({
28368
28453
  children: /* @__PURE__ */ jsx(
28369
28454
  Box,
28370
28455
  {
28371
- className: "transition-transform duration-150",
28456
+ className: "transition-transform duration-fast",
28372
28457
  style: {
28373
28458
  transform: `scale(${isRefreshing ? 1 : pullProgress})`,
28374
28459
  opacity: isRefreshing ? 1 : pullProgress
@@ -28790,7 +28875,7 @@ var init_StepFlow = __esm({
28790
28875
  className
28791
28876
  }) => {
28792
28877
  if (orientation === "vertical") {
28793
- return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(React81__default.Fragment, { children: /* @__PURE__ */ jsxs(HStack, { gap: "md", align: "start", className: "w-full", children: [
28878
+ return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(React82__default.Fragment, { children: /* @__PURE__ */ jsxs(HStack, { gap: "md", align: "start", className: "w-full", children: [
28794
28879
  /* @__PURE__ */ jsxs(VStack, { gap: "none", align: "center", children: [
28795
28880
  /* @__PURE__ */ jsx(StepCircle, { step, index }),
28796
28881
  showConnectors && index < steps.length - 1 && /* @__PURE__ */ jsx(Box, { className: "w-px h-8 bg-border" })
@@ -28801,7 +28886,7 @@ var init_StepFlow = __esm({
28801
28886
  ] })
28802
28887
  ] }) }, index)) });
28803
28888
  }
28804
- return /* @__PURE__ */ jsx(Box, { className: cn("w-full flex flex-col md:flex-row items-start gap-0", className), children: steps.map((step, index) => /* @__PURE__ */ jsxs(React81__default.Fragment, { children: [
28889
+ return /* @__PURE__ */ jsx(Box, { className: cn("w-full flex flex-col md:flex-row items-start gap-0", className), children: steps.map((step, index) => /* @__PURE__ */ jsxs(React82__default.Fragment, { children: [
28805
28890
  /* @__PURE__ */ jsxs(VStack, { gap: "sm", align: "center", className: "flex-1 w-full md:w-auto", children: [
28806
28891
  /* @__PURE__ */ jsx(StepCircle, { step, index }),
28807
28892
  /* @__PURE__ */ jsx(Typography, { variant: "h4", className: "text-center", children: step.title }),
@@ -29707,7 +29792,7 @@ var init_VoteStack = __esm({
29707
29792
  isUp ? "text-primary" : "text-muted-foreground",
29708
29793
  "hover:bg-muted",
29709
29794
  "active:bg-muted",
29710
- "transition-colors duration-100",
29795
+ "transition-colors duration-instant",
29711
29796
  "disabled:opacity-40 disabled:cursor-not-allowed disabled:hover:bg-transparent",
29712
29797
  "focus:outline-none focus:ring-[length:var(--focus-ring-width)] focus:ring-ring focus:ring-inset",
29713
29798
  styles.button
@@ -29744,7 +29829,7 @@ var init_VoteStack = __esm({
29744
29829
  isDown ? "text-primary" : "text-muted-foreground",
29745
29830
  "hover:bg-muted",
29746
29831
  "active:bg-muted",
29747
- "transition-colors duration-100",
29832
+ "transition-colors duration-instant",
29748
29833
  "disabled:opacity-40 disabled:cursor-not-allowed disabled:hover:bg-transparent",
29749
29834
  "focus:outline-none focus:ring-[length:var(--focus-ring-width)] focus:ring-ring focus:ring-inset",
29750
29835
  styles.button
@@ -29791,7 +29876,7 @@ var init_LikertScale = __esm({
29791
29876
  md: "text-base",
29792
29877
  lg: "text-lg"
29793
29878
  };
29794
- LikertScale = React81__default.forwardRef(
29879
+ LikertScale = React82__default.forwardRef(
29795
29880
  ({
29796
29881
  question,
29797
29882
  options = DEFAULT_LIKERT_OPTIONS,
@@ -29803,7 +29888,7 @@ var init_LikertScale = __esm({
29803
29888
  variant = "radios",
29804
29889
  className
29805
29890
  }, ref) => {
29806
- const groupId = React81__default.useId();
29891
+ const groupId = React82__default.useId();
29807
29892
  const eventBus = useEventBus();
29808
29893
  const handleSelect = useCallback(
29809
29894
  (next) => {
@@ -29856,7 +29941,7 @@ var init_LikertScale = __esm({
29856
29941
  disabled,
29857
29942
  onClick: () => handleSelect(opt.value),
29858
29943
  className: cn(
29859
- "flex-1 text-center font-medium transition-colors duration-100",
29944
+ "flex-1 text-center font-medium transition-colors duration-instant",
29860
29945
  "focus:outline-none focus:ring-[length:var(--focus-ring-width)] focus:ring-ring focus:ring-inset",
29861
29946
  "disabled:cursor-not-allowed",
29862
29947
  "rounded-none gap-0 shadow-none border-none",
@@ -32085,7 +32170,7 @@ var init_DocBreadcrumb = __esm({
32085
32170
  "aria-label": t("aria.breadcrumb"),
32086
32171
  children: /* @__PURE__ */ jsx(HStack, { gap: "xs", align: "center", wrap: true, children: items.map((item, idx) => {
32087
32172
  const isLast = idx === items.length - 1;
32088
- return /* @__PURE__ */ jsxs(React81__default.Fragment, { children: [
32173
+ return /* @__PURE__ */ jsxs(React82__default.Fragment, { children: [
32089
32174
  idx > 0 && /* @__PURE__ */ jsx(
32090
32175
  Icon,
32091
32176
  {
@@ -32954,7 +33039,7 @@ var init_MiniStateMachine = __esm({
32954
33039
  const x = 2 + i * (NODE_W + GAP + ARROW_W + GAP);
32955
33040
  const tc = transitionCounts[s.name] ?? 0;
32956
33041
  const role = getStateRole(s.name, s.isInitial ?? void 0, s.isTerminal ?? void 0, tc, maxTC);
32957
- return /* @__PURE__ */ jsxs(React81__default.Fragment, { children: [
33042
+ return /* @__PURE__ */ jsxs(React82__default.Fragment, { children: [
32958
33043
  /* @__PURE__ */ jsx(
32959
33044
  AvlState,
32960
33045
  {
@@ -33158,7 +33243,7 @@ var init_PageHeader = __esm({
33158
33243
  info: "bg-info/10 text-info"
33159
33244
  };
33160
33245
  return /* @__PURE__ */ jsxs(Box, { className: cn("mb-6", className), children: [
33161
- breadcrumbs && breadcrumbs.length > 0 && /* @__PURE__ */ jsx(Box, { as: "nav", className: "mb-4", children: /* @__PURE__ */ jsx(Box, { as: "ol", className: "flex items-center gap-2 text-sm", children: breadcrumbs.map((crumb, idx) => /* @__PURE__ */ jsxs(React81__default.Fragment, { children: [
33246
+ breadcrumbs && breadcrumbs.length > 0 && /* @__PURE__ */ jsx(Box, { as: "nav", className: "mb-4", children: /* @__PURE__ */ jsx(Box, { as: "ol", className: "flex items-center gap-2 text-sm", children: breadcrumbs.map((crumb, idx) => /* @__PURE__ */ jsxs(React82__default.Fragment, { children: [
33162
33247
  idx > 0 && /* @__PURE__ */ jsx(Typography, { variant: "small", color: "muted", children: "/" }),
33163
33248
  crumb.href ? /* @__PURE__ */ jsx(
33164
33249
  "a",
@@ -33516,7 +33601,7 @@ var init_Section = __esm({
33516
33601
  as: Component = "section"
33517
33602
  }) => {
33518
33603
  const hasHeader = title || description || action;
33519
- return React81__default.createElement(
33604
+ return React82__default.createElement(
33520
33605
  Component,
33521
33606
  {
33522
33607
  className: cn(
@@ -33583,7 +33668,7 @@ var init_Sidebar = __esm({
33583
33668
  variant: "ghost",
33584
33669
  onClick: item.onClick,
33585
33670
  className: cn(
33586
- "w-full flex items-center gap-3 px-3 py-2.5 transition-all duration-[var(--transition-fast)] group relative",
33671
+ "w-full flex items-center gap-3 px-3 py-2.5 transition-all duration-fast group relative",
33587
33672
  "rounded-sm border-[length:var(--border-width-thin)] border-transparent",
33588
33673
  isActive ? [
33589
33674
  "bg-primary text-primary-foreground",
@@ -33657,7 +33742,7 @@ var init_Sidebar = __esm({
33657
33742
  className: cn(
33658
33743
  "flex flex-col h-full",
33659
33744
  "bg-card border-e border-border",
33660
- "transition-all duration-300 ease-in-out",
33745
+ "transition-all duration-normal ease-standard",
33661
33746
  collapsed ? "w-20" : "w-64",
33662
33747
  className
33663
33748
  ),
@@ -33890,7 +33975,7 @@ var init_WizardContainer = __esm({
33890
33975
  const isCompleted = index < currentStep;
33891
33976
  const stepKey = step.id ?? step.tabId ?? `step-${index}`;
33892
33977
  const stepTitle = step.title ?? step.name ?? `Step ${index + 1}`;
33893
- return /* @__PURE__ */ jsxs(React81__default.Fragment, { children: [
33978
+ return /* @__PURE__ */ jsxs(React82__default.Fragment, { children: [
33894
33979
  /* @__PURE__ */ jsx(
33895
33980
  Button,
33896
33981
  {
@@ -36493,7 +36578,7 @@ var init_DetailPanel = __esm({
36493
36578
  }
36494
36579
  });
36495
36580
  function extractTitle(children) {
36496
- if (!React81__default.isValidElement(children)) return void 0;
36581
+ if (!React82__default.isValidElement(children)) return void 0;
36497
36582
  const props = children.props;
36498
36583
  if (typeof props.title === "string") {
36499
36584
  return props.title;
@@ -36843,12 +36928,12 @@ var init_Form = __esm({
36843
36928
  const isSchemaEntity = isOrbitalEntitySchema(entity);
36844
36929
  const resolvedEntity = isSchemaEntity ? entity : void 0;
36845
36930
  const entityName = typeof entity === "string" ? entity : resolvedEntity?.name;
36846
- const normalizedInitialData = React81__default.useMemo(() => {
36931
+ const normalizedInitialData = React82__default.useMemo(() => {
36847
36932
  const entityRowAsInitial = isPlainEntityRow(entity) ? entity : void 0;
36848
36933
  const callerInitial = initialData !== null && typeof initialData === "object" && !Array.isArray(initialData) ? initialData : {};
36849
36934
  return entityRowAsInitial !== void 0 ? { ...entityRowAsInitial, ...callerInitial } : callerInitial;
36850
36935
  }, [entity, initialData]);
36851
- const entityDerivedFields = React81__default.useMemo(() => {
36936
+ const entityDerivedFields = React82__default.useMemo(() => {
36852
36937
  if (fields && fields.length > 0) return void 0;
36853
36938
  if (!resolvedEntity) return void 0;
36854
36939
  return resolvedEntity.fields.map(
@@ -36869,16 +36954,16 @@ var init_Form = __esm({
36869
36954
  const conditionalFields = typeof conditionalFieldsRaw === "boolean" ? {} : conditionalFieldsRaw;
36870
36955
  const hiddenCalculations = typeof hiddenCalculationsRaw === "boolean" ? [] : hiddenCalculationsRaw;
36871
36956
  const violationTriggers = typeof violationTriggersRaw === "boolean" ? [] : violationTriggersRaw;
36872
- const [formData, setFormData] = React81__default.useState(
36957
+ const [formData, setFormData] = React82__default.useState(
36873
36958
  normalizedInitialData
36874
36959
  );
36875
- const [collapsedSections, setCollapsedSections] = React81__default.useState(
36960
+ const [collapsedSections, setCollapsedSections] = React82__default.useState(
36876
36961
  /* @__PURE__ */ new Set()
36877
36962
  );
36878
- const [submitError, setSubmitError] = React81__default.useState(null);
36879
- const formRef = React81__default.useRef(null);
36963
+ const [submitError, setSubmitError] = React82__default.useState(null);
36964
+ const formRef = React82__default.useRef(null);
36880
36965
  const formMode = props.mode;
36881
- const mountedRef = React81__default.useRef(false);
36966
+ const mountedRef = React82__default.useRef(false);
36882
36967
  if (!mountedRef.current) {
36883
36968
  mountedRef.current = true;
36884
36969
  debug("forms", "mount", {
@@ -36891,7 +36976,7 @@ var init_Form = __esm({
36891
36976
  });
36892
36977
  }
36893
36978
  const shouldShowCancel = showCancel ?? (fields && fields.length > 0);
36894
- const evalContext = React81__default.useMemo(
36979
+ const evalContext = React82__default.useMemo(
36895
36980
  () => ({
36896
36981
  formValues: formData,
36897
36982
  globalVariables: externalContext?.globalVariables ?? {},
@@ -36900,7 +36985,7 @@ var init_Form = __esm({
36900
36985
  }),
36901
36986
  [formData, externalContext]
36902
36987
  );
36903
- React81__default.useEffect(() => {
36988
+ React82__default.useEffect(() => {
36904
36989
  debug("forms", "initialData-sync", {
36905
36990
  mode: formMode,
36906
36991
  normalizedInitialData,
@@ -36911,7 +36996,7 @@ var init_Form = __esm({
36911
36996
  setFormData(normalizedInitialData);
36912
36997
  }
36913
36998
  }, [normalizedInitialData]);
36914
- const processCalculations = React81__default.useCallback(
36999
+ const processCalculations = React82__default.useCallback(
36915
37000
  (changedFieldId, newFormData) => {
36916
37001
  if (!hiddenCalculations.length) return;
36917
37002
  const context = {
@@ -36936,7 +37021,7 @@ var init_Form = __esm({
36936
37021
  },
36937
37022
  [hiddenCalculations, externalContext, eventBus]
36938
37023
  );
36939
- const checkViolations = React81__default.useCallback(
37024
+ const checkViolations = React82__default.useCallback(
36940
37025
  (changedFieldId, newFormData) => {
36941
37026
  if (!violationTriggers.length) return;
36942
37027
  const context = {
@@ -36974,7 +37059,7 @@ var init_Form = __esm({
36974
37059
  processCalculations(name, newFormData);
36975
37060
  checkViolations(name, newFormData);
36976
37061
  };
36977
- const isFieldVisible = React81__default.useCallback(
37062
+ const isFieldVisible = React82__default.useCallback(
36978
37063
  (fieldName) => {
36979
37064
  const condition = conditionalFields[fieldName];
36980
37065
  if (!condition) return true;
@@ -36982,7 +37067,7 @@ var init_Form = __esm({
36982
37067
  },
36983
37068
  [conditionalFields, evalContext]
36984
37069
  );
36985
- const isSectionVisible = React81__default.useCallback(
37070
+ const isSectionVisible = React82__default.useCallback(
36986
37071
  (section) => {
36987
37072
  if (!section.condition) return true;
36988
37073
  return Boolean(evaluateFormExpression(section.condition, evalContext));
@@ -37058,7 +37143,7 @@ var init_Form = __esm({
37058
37143
  eventBus.emit(`UI:${onCancel}`);
37059
37144
  }
37060
37145
  };
37061
- const renderField = React81__default.useCallback(
37146
+ const renderField = React82__default.useCallback(
37062
37147
  (field) => {
37063
37148
  const fieldName = field.name || field.field;
37064
37149
  if (!fieldName) return null;
@@ -37079,7 +37164,7 @@ var init_Form = __esm({
37079
37164
  [formData, isFieldVisible, relationsData, relationsLoading, isLoading]
37080
37165
  );
37081
37166
  const effectiveFields = entityDerivedFields ?? fields;
37082
- const normalizedFields = React81__default.useMemo(() => {
37167
+ const normalizedFields = React82__default.useMemo(() => {
37083
37168
  if (!effectiveFields || effectiveFields.length === 0) return [];
37084
37169
  return effectiveFields.map((field) => {
37085
37170
  if (typeof field === "string") {
@@ -37103,7 +37188,7 @@ var init_Form = __esm({
37103
37188
  return field;
37104
37189
  });
37105
37190
  }, [effectiveFields, resolvedEntity]);
37106
- const schemaFields = React81__default.useMemo(() => {
37191
+ const schemaFields = React82__default.useMemo(() => {
37107
37192
  if (normalizedFields.length === 0) return null;
37108
37193
  if (isDebugEnabled()) {
37109
37194
  debugGroup(`Form: ${entityName || "unknown"}`);
@@ -37113,7 +37198,7 @@ var init_Form = __esm({
37113
37198
  }
37114
37199
  return normalizedFields.map(renderField).filter(Boolean);
37115
37200
  }, [normalizedFields, renderField, entityName, conditionalFields]);
37116
- const sectionElements = React81__default.useMemo(() => {
37201
+ const sectionElements = React82__default.useMemo(() => {
37117
37202
  if (!sections || sections.length === 0) return null;
37118
37203
  return sections.map((section) => {
37119
37204
  if (!isSectionVisible(section)) {
@@ -37796,7 +37881,7 @@ var init_List = __esm({
37796
37881
  Box,
37797
37882
  {
37798
37883
  className: cn(
37799
- "h-full rounded-full transition-all duration-500",
37884
+ "h-full rounded-full transition-all duration-slow",
37800
37885
  clampedValue >= 100 ? "bg-success" : clampedValue >= 70 ? "bg-info" : clampedValue >= 40 ? "bg-warning" : "bg-muted-foreground"
37801
37886
  ),
37802
37887
  style: { width: `${clampedValue}%` }
@@ -37838,7 +37923,7 @@ var init_List = __esm({
37838
37923
  if (entity && typeof entity === "object" && "id" in entity) return [entity];
37839
37924
  return [];
37840
37925
  }, [entity]);
37841
- const getItemActions = React81__default.useCallback(
37926
+ const getItemActions = React82__default.useCallback(
37842
37927
  (item) => {
37843
37928
  if (!itemActions) return [];
37844
37929
  if (typeof itemActions === "function") {
@@ -37965,7 +38050,7 @@ var init_List = __esm({
37965
38050
  {
37966
38051
  className: cn(
37967
38052
  "group flex items-center gap-5 px-6 py-5",
37968
- "transition-all duration-300 ease-out",
38053
+ "transition-all duration-normal ease-standard",
37969
38054
  hasExplicitClick && "cursor-pointer",
37970
38055
  // Hover state
37971
38056
  "hover:bg-muted/80",
@@ -38072,7 +38157,7 @@ var init_List = __esm({
38072
38157
  variant: "ghost",
38073
38158
  action: editAction.event,
38074
38159
  className: cn(
38075
- "p-2 rounded-lg transition-all duration-200",
38160
+ "p-2 rounded-lg transition-all duration-fast",
38076
38161
  "hover:bg-primary/10 hover:text-primary",
38077
38162
  "text-muted-foreground",
38078
38163
  "active:scale-95"
@@ -38088,7 +38173,7 @@ var init_List = __esm({
38088
38173
  variant: "ghost",
38089
38174
  action: viewAction.event,
38090
38175
  className: cn(
38091
- "p-2 rounded-lg transition-all duration-200",
38176
+ "p-2 rounded-lg transition-all duration-fast",
38092
38177
  "hover:bg-muted hover:text-foreground",
38093
38178
  "text-muted-foreground",
38094
38179
  "active:scale-95"
@@ -38110,7 +38195,7 @@ var init_List = __esm({
38110
38195
  {
38111
38196
  variant: "ghost",
38112
38197
  className: cn(
38113
- "p-2 rounded-lg transition-all duration-200",
38198
+ "p-2 rounded-lg transition-all duration-fast",
38114
38199
  "hover:bg-muted hover:shadow-sm",
38115
38200
  "text-muted-foreground hover:text-foreground",
38116
38201
  "active:scale-95"
@@ -38322,7 +38407,7 @@ var init_MediaGallery = __esm({
38322
38407
  [selectable, selectedItems, selectionEvent, eventBus]
38323
38408
  );
38324
38409
  const entityData = Array.isArray(entity) ? entity : [];
38325
- const items = React81__default.useMemo(() => {
38410
+ const items = React82__default.useMemo(() => {
38326
38411
  if (propItems && propItems.length > 0) return propItems;
38327
38412
  if (entityData.length === 0) return [];
38328
38413
  return entityData.map((record, idx) => {
@@ -38400,7 +38485,7 @@ var init_MediaGallery = __esm({
38400
38485
  {
38401
38486
  className: cn(
38402
38487
  "group relative overflow-hidden rounded-md cursor-pointer",
38403
- "border-2 transition-all duration-200",
38488
+ "border-2 transition-all duration-fast",
38404
38489
  isSelected ? "border-primary ring-2 ring-primary/30" : "border-transparent hover:border-border",
38405
38490
  ASPECT_CLASSES[aspectRatio]
38406
38491
  ),
@@ -38421,14 +38506,14 @@ var init_MediaGallery = __esm({
38421
38506
  {
38422
38507
  className: cn(
38423
38508
  "absolute inset-0 bg-foreground/0 group-hover:bg-foreground/20",
38424
- "transition-colors duration-200 flex items-center justify-center"
38509
+ "transition-colors duration-fast flex items-center justify-center"
38425
38510
  ),
38426
38511
  children: /* @__PURE__ */ jsx(
38427
38512
  Icon,
38428
38513
  {
38429
38514
  icon: ZoomIn,
38430
38515
  size: "md",
38431
- className: "text-white opacity-0 group-hover:opacity-100 transition-opacity duration-200"
38516
+ className: "text-white opacity-0 group-hover:opacity-100 transition-opacity duration-fast"
38432
38517
  }
38433
38518
  )
38434
38519
  }
@@ -38486,7 +38571,7 @@ var init_MediaGallery = __esm({
38486
38571
  }
38487
38572
  });
38488
38573
  function extractTitle2(children) {
38489
- if (!React81__default.isValidElement(children)) return void 0;
38574
+ if (!React82__default.isValidElement(children)) return void 0;
38490
38575
  const props = children.props;
38491
38576
  if (typeof props.title === "string") {
38492
38577
  return props.title;
@@ -38760,7 +38845,7 @@ var init_debugRegistry = __esm({
38760
38845
  }
38761
38846
  });
38762
38847
  function useDebugData() {
38763
- const [data, setData] = React81.useState(() => ({
38848
+ const [data, setData] = React82.useState(() => ({
38764
38849
  traits: [],
38765
38850
  ticks: [],
38766
38851
  guards: [],
@@ -38774,7 +38859,7 @@ function useDebugData() {
38774
38859
  },
38775
38860
  lastUpdate: Date.now()
38776
38861
  }));
38777
- React81.useEffect(() => {
38862
+ React82.useEffect(() => {
38778
38863
  const updateData = () => {
38779
38864
  setData({
38780
38865
  traits: getAllTraits(),
@@ -38883,12 +38968,12 @@ function layoutGraph(states, transitions, initialState, width, height) {
38883
38968
  return positions;
38884
38969
  }
38885
38970
  function WalkMinimap() {
38886
- const [walkStep, setWalkStep] = React81.useState(null);
38887
- const [traits2, setTraits] = React81.useState([]);
38888
- const [coveredEdges, setCoveredEdges] = React81.useState([]);
38889
- const [completedTraits, setCompletedTraits] = React81.useState(/* @__PURE__ */ new Set());
38890
- const prevTraitRef = React81.useRef(null);
38891
- React81.useEffect(() => {
38971
+ const [walkStep, setWalkStep] = React82.useState(null);
38972
+ const [traits2, setTraits] = React82.useState([]);
38973
+ const [coveredEdges, setCoveredEdges] = React82.useState([]);
38974
+ const [completedTraits, setCompletedTraits] = React82.useState(/* @__PURE__ */ new Set());
38975
+ const prevTraitRef = React82.useRef(null);
38976
+ React82.useEffect(() => {
38892
38977
  const interval = setInterval(() => {
38893
38978
  const w = window;
38894
38979
  const step = w.__orbitalWalkStep;
@@ -39324,15 +39409,15 @@ var init_EntitiesTab = __esm({
39324
39409
  });
39325
39410
  function EventFlowTab({ events: events2 }) {
39326
39411
  const { t } = useTranslate();
39327
- const [filter, setFilter] = React81.useState("all");
39328
- const containerRef = React81.useRef(null);
39329
- const [autoScroll, setAutoScroll] = React81.useState(true);
39330
- React81.useEffect(() => {
39412
+ const [filter, setFilter] = React82.useState("all");
39413
+ const containerRef = React82.useRef(null);
39414
+ const [autoScroll, setAutoScroll] = React82.useState(true);
39415
+ React82.useEffect(() => {
39331
39416
  if (autoScroll && containerRef.current) {
39332
39417
  containerRef.current.scrollTop = containerRef.current.scrollHeight;
39333
39418
  }
39334
39419
  }, [events2.length, autoScroll]);
39335
- const filteredEvents = React81.useMemo(() => {
39420
+ const filteredEvents = React82.useMemo(() => {
39336
39421
  if (filter === "all") return events2;
39337
39422
  return events2.filter((e) => e.type === filter);
39338
39423
  }, [events2, filter]);
@@ -39448,7 +39533,7 @@ var init_EventFlowTab = __esm({
39448
39533
  });
39449
39534
  function GuardsPanel({ guards }) {
39450
39535
  const { t } = useTranslate();
39451
- const [filter, setFilter] = React81.useState("all");
39536
+ const [filter, setFilter] = React82.useState("all");
39452
39537
  if (guards.length === 0) {
39453
39538
  return /* @__PURE__ */ jsx(
39454
39539
  EmptyState,
@@ -39461,7 +39546,7 @@ function GuardsPanel({ guards }) {
39461
39546
  }
39462
39547
  const passedCount = guards.filter((g) => g.result).length;
39463
39548
  const failedCount = guards.length - passedCount;
39464
- const filteredGuards = React81.useMemo(() => {
39549
+ const filteredGuards = React82.useMemo(() => {
39465
39550
  if (filter === "all") return guards;
39466
39551
  if (filter === "passed") return guards.filter((g) => g.result);
39467
39552
  return guards.filter((g) => !g.result);
@@ -39624,10 +39709,10 @@ function EffectBadge({ effect }) {
39624
39709
  }
39625
39710
  function TransitionTimeline({ transitions }) {
39626
39711
  const { t } = useTranslate();
39627
- const containerRef = React81.useRef(null);
39628
- const [autoScroll, setAutoScroll] = React81.useState(true);
39629
- const [expandedId, setExpandedId] = React81.useState(null);
39630
- React81.useEffect(() => {
39712
+ const containerRef = React82.useRef(null);
39713
+ const [autoScroll, setAutoScroll] = React82.useState(true);
39714
+ const [expandedId, setExpandedId] = React82.useState(null);
39715
+ React82.useEffect(() => {
39631
39716
  if (autoScroll && containerRef.current) {
39632
39717
  containerRef.current.scrollTop = containerRef.current.scrollHeight;
39633
39718
  }
@@ -39907,9 +39992,9 @@ function getAllEvents(traits2) {
39907
39992
  function EventDispatcherTab({ traits: traits2, schema }) {
39908
39993
  const eventBus = useEventBus();
39909
39994
  const { t } = useTranslate();
39910
- const [log9, setLog] = React81.useState([]);
39911
- const prevStatesRef = React81.useRef(/* @__PURE__ */ new Map());
39912
- React81.useEffect(() => {
39995
+ const [log9, setLog] = React82.useState([]);
39996
+ const prevStatesRef = React82.useRef(/* @__PURE__ */ new Map());
39997
+ React82.useEffect(() => {
39913
39998
  for (const trait of traits2) {
39914
39999
  const prev = prevStatesRef.current.get(trait.id);
39915
40000
  if (prev && prev !== trait.currentState) {
@@ -40078,10 +40163,10 @@ function VerifyModePanel({
40078
40163
  localCount
40079
40164
  }) {
40080
40165
  const { t } = useTranslate();
40081
- const [expanded, setExpanded] = React81.useState(true);
40082
- const scrollRef = React81.useRef(null);
40083
- const prevCountRef = React81.useRef(0);
40084
- React81.useEffect(() => {
40166
+ const [expanded, setExpanded] = React82.useState(true);
40167
+ const scrollRef = React82.useRef(null);
40168
+ const prevCountRef = React82.useRef(0);
40169
+ React82.useEffect(() => {
40085
40170
  if (expanded && transitions.length > prevCountRef.current && scrollRef.current) {
40086
40171
  scrollRef.current.scrollTop = scrollRef.current.scrollHeight;
40087
40172
  }
@@ -40138,10 +40223,10 @@ function RuntimeDebugger({
40138
40223
  schema
40139
40224
  }) {
40140
40225
  const { t } = useTranslate();
40141
- const [isCollapsed, setIsCollapsed] = React81.useState(mode === "verify" ? true : defaultCollapsed);
40142
- const [isVisible, setIsVisible] = React81.useState(mode === "inline" || mode === "verify" || isDebugEnabled2());
40226
+ const [isCollapsed, setIsCollapsed] = React82.useState(mode === "verify" ? true : defaultCollapsed);
40227
+ const [isVisible, setIsVisible] = React82.useState(mode === "inline" || mode === "verify" || isDebugEnabled2());
40143
40228
  const debugData = useDebugData();
40144
- React81.useEffect(() => {
40229
+ React82.useEffect(() => {
40145
40230
  if (mode === "inline") return;
40146
40231
  return onDebugToggle((enabled) => {
40147
40232
  setIsVisible(enabled);
@@ -40150,7 +40235,7 @@ function RuntimeDebugger({
40150
40235
  }
40151
40236
  });
40152
40237
  }, [mode]);
40153
- React81.useEffect(() => {
40238
+ React82.useEffect(() => {
40154
40239
  if (mode === "inline") return;
40155
40240
  const handleKeyDown = (e) => {
40156
40241
  if (e.key === "`" && isVisible) {
@@ -40670,7 +40755,7 @@ var init_StatCard = __esm({
40670
40755
  const labelToUse = propLabel ?? propTitle;
40671
40756
  const eventBus = useEventBus();
40672
40757
  const { t } = useTranslate();
40673
- const handleActionClick = React81__default.useCallback(() => {
40758
+ const handleActionClick = React82__default.useCallback(() => {
40674
40759
  if (action?.event) {
40675
40760
  eventBus.emit(`UI:${action.event}`, {});
40676
40761
  }
@@ -40681,7 +40766,7 @@ var init_StatCard = __esm({
40681
40766
  const data = Array.isArray(entity) ? entity : entity ? [entity] : [];
40682
40767
  const isLoading = externalLoading ?? false;
40683
40768
  const error = externalError;
40684
- const computeMetricValue = React81__default.useCallback(
40769
+ const computeMetricValue = React82__default.useCallback(
40685
40770
  (metric, items) => {
40686
40771
  if (metric.value !== void 0) {
40687
40772
  return metric.value;
@@ -40720,7 +40805,7 @@ var init_StatCard = __esm({
40720
40805
  },
40721
40806
  []
40722
40807
  );
40723
- const schemaStats = React81__default.useMemo(() => {
40808
+ const schemaStats = React82__default.useMemo(() => {
40724
40809
  if (!metrics || metrics.length === 0) return null;
40725
40810
  return metrics.map((metric) => ({
40726
40811
  label: metric.label,
@@ -40728,7 +40813,7 @@ var init_StatCard = __esm({
40728
40813
  format: metric.format
40729
40814
  }));
40730
40815
  }, [metrics, data, computeMetricValue]);
40731
- const calculatedTrend = React81__default.useMemo(() => {
40816
+ const calculatedTrend = React82__default.useMemo(() => {
40732
40817
  if (manualTrend !== void 0) return manualTrend;
40733
40818
  if (previousValue === void 0 || currentValue === void 0)
40734
40819
  return void 0;
@@ -41368,8 +41453,8 @@ var init_SubagentTracePanel = __esm({
41368
41453
  ] });
41369
41454
  };
41370
41455
  InlineActivityStream = ({ activities, autoScroll = true, className }) => {
41371
- const endRef = React81__default.useRef(null);
41372
- React81__default.useEffect(() => {
41456
+ const endRef = React82__default.useRef(null);
41457
+ React82__default.useEffect(() => {
41373
41458
  if (!autoScroll) return;
41374
41459
  endRef.current?.scrollIntoView({ behavior: "smooth", block: "end" });
41375
41460
  }, [activities.length, autoScroll]);
@@ -41463,7 +41548,7 @@ var init_SubagentTracePanel = __esm({
41463
41548
  };
41464
41549
  SubagentRichCard = ({ subagent }) => {
41465
41550
  const { t } = useTranslate();
41466
- const activities = React81__default.useMemo(
41551
+ const activities = React82__default.useMemo(
41467
41552
  () => subagentMessagesToActivities(subagent.messages),
41468
41553
  [subagent.messages]
41469
41554
  );
@@ -41540,8 +41625,8 @@ var init_SubagentTracePanel = __esm({
41540
41625
  ] });
41541
41626
  };
41542
41627
  CoordinatorConversation = ({ messages, autoScroll = true, className }) => {
41543
- const endRef = React81__default.useRef(null);
41544
- React81__default.useEffect(() => {
41628
+ const endRef = React82__default.useRef(null);
41629
+ React82__default.useEffect(() => {
41545
41630
  if (!autoScroll) return;
41546
41631
  endRef.current?.scrollIntoView({ behavior: "smooth", block: "end" });
41547
41632
  }, [messages.length, autoScroll]);
@@ -41976,7 +42061,7 @@ var init_Timeline = __esm({
41976
42061
  }) => {
41977
42062
  const { t } = useTranslate();
41978
42063
  const entityData = entity ?? [];
41979
- const items = React81__default.useMemo(() => {
42064
+ const items = React82__default.useMemo(() => {
41980
42065
  if (propItems) return propItems;
41981
42066
  if (entityData.length === 0) return [];
41982
42067
  return entityData.map((record, idx) => {
@@ -42078,7 +42163,7 @@ var init_Timeline = __esm({
42078
42163
  }
42079
42164
  });
42080
42165
  function extractToastProps(children) {
42081
- if (!React81__default.isValidElement(children)) {
42166
+ if (!React82__default.isValidElement(children)) {
42082
42167
  if (typeof children === "string") {
42083
42168
  return { message: children };
42084
42169
  }
@@ -42120,7 +42205,7 @@ var init_ToastSlot = __esm({
42120
42205
  eventBus.emit(`${prefix}CLOSE`);
42121
42206
  };
42122
42207
  if (!isVisible) return null;
42123
- const isCustomContent = React81__default.isValidElement(children) && !message;
42208
+ const isCustomContent = React82__default.isValidElement(children) && !message;
42124
42209
  return /* @__PURE__ */ jsx(Box, { className: "fixed bottom-4 right-4 z-50", children: isCustomContent ? children : /* @__PURE__ */ jsx(
42125
42210
  Toast,
42126
42211
  {
@@ -42168,6 +42253,7 @@ var init_component_registry_generated = __esm({
42168
42253
  init_LayoutPatterns();
42169
42254
  init_BranchingLogicBuilder();
42170
42255
  init_Breadcrumb();
42256
+ init_ButtonGroup();
42171
42257
  init_CTABanner();
42172
42258
  init_CalendarGrid();
42173
42259
  init_Canvas();
@@ -42238,8 +42324,8 @@ var init_component_registry_generated = __esm({
42238
42324
  init_FlipContainer();
42239
42325
  init_FloatingActionButton();
42240
42326
  init_Form();
42241
- init_FormSection();
42242
42327
  init_FormField();
42328
+ init_FormSection();
42243
42329
  init_FormSectionHeader();
42244
42330
  init_GameAudioToggle();
42245
42331
  init_GameHud();
@@ -42425,6 +42511,7 @@ var init_component_registry_generated = __esm({
42425
42511
  "BranchingLogicBuilder": BranchingLogicBuilder,
42426
42512
  "Breadcrumb": Breadcrumb,
42427
42513
  "Button": ButtonPattern,
42514
+ "ButtonGroup": ButtonGroup,
42428
42515
  "ButtonPattern": ButtonPattern,
42429
42516
  "CTABanner": CTABanner,
42430
42517
  "CalendarGrid": CalendarGrid,
@@ -42498,7 +42585,6 @@ var init_component_registry_generated = __esm({
42498
42585
  "FlipContainer": FlipContainer,
42499
42586
  "FloatingActionButton": FloatingActionButton,
42500
42587
  "Form": Form,
42501
- "FormActions": FormActions,
42502
42588
  "FormField": FormField,
42503
42589
  "FormLayout": FormLayout,
42504
42590
  "FormSectionHeader": FormSectionHeader,
@@ -42678,7 +42764,7 @@ function SuspenseConfigProvider({
42678
42764
  config,
42679
42765
  children
42680
42766
  }) {
42681
- return React81__default.createElement(
42767
+ return React82__default.createElement(
42682
42768
  SuspenseConfigContext.Provider,
42683
42769
  { value: config },
42684
42770
  children
@@ -42720,7 +42806,7 @@ function enrichFormFields(fields, entityDef) {
42720
42806
  }
42721
42807
  return { name: field, label: field.replace(/([a-z])([A-Z])/g, "$1 $2").replace(/\b\w/g, (c) => c.toUpperCase()) };
42722
42808
  }
42723
- if (field && typeof field === "object" && !Array.isArray(field) && !React81__default.isValidElement(field) && !(field instanceof Date)) {
42809
+ if (field && typeof field === "object" && !Array.isArray(field) && !React82__default.isValidElement(field) && !(field instanceof Date)) {
42724
42810
  const obj = field;
42725
42811
  const fieldName = typeof obj.name === "string" ? obj.name : typeof obj.field === "string" ? obj.field : void 0;
42726
42812
  if (!fieldName) return field;
@@ -43173,7 +43259,7 @@ function renderPatternChildren(children, onDismiss, parentId = "root", parentPat
43173
43259
  const key = `${parentId}-${index}-trait:${traitName}`;
43174
43260
  return /* @__PURE__ */ jsx(TraitFrame, { traitName }, key);
43175
43261
  }
43176
- return /* @__PURE__ */ jsx(React81__default.Fragment, { children: child }, `${parentId}-${index}`);
43262
+ return /* @__PURE__ */ jsx(React82__default.Fragment, { children: child }, `${parentId}-${index}`);
43177
43263
  }
43178
43264
  if (!child || typeof child !== "object") return null;
43179
43265
  const childId = `${parentId}-${index}`;
@@ -43226,14 +43312,14 @@ function isPatternConfig(value) {
43226
43312
  if (value === null || value === void 0) return false;
43227
43313
  if (typeof value !== "object") return false;
43228
43314
  if (Array.isArray(value)) return false;
43229
- if (React81__default.isValidElement(value)) return false;
43315
+ if (React82__default.isValidElement(value)) return false;
43230
43316
  if (value instanceof Date) return false;
43231
43317
  if (typeof value === "function") return false;
43232
43318
  const record = value;
43233
43319
  return "type" in record && typeof record.type === "string" && getComponentForPattern$1(record.type) !== null;
43234
43320
  }
43235
43321
  function isPlainConfigObject(value) {
43236
- if (React81__default.isValidElement(value)) return false;
43322
+ if (React82__default.isValidElement(value)) return false;
43237
43323
  if (value instanceof Date) return false;
43238
43324
  const proto = Object.getPrototypeOf(value);
43239
43325
  return proto === Object.prototype || proto === null;
@@ -43361,7 +43447,7 @@ function SlotContentRenderer({
43361
43447
  for (const slotKey of CONTENT_NODE_SLOTS) {
43362
43448
  const slotVal = restProps[slotKey];
43363
43449
  if (slotVal === void 0 || slotVal === null) continue;
43364
- if (React81__default.isValidElement(slotVal) || typeof slotVal === "string" || typeof slotVal === "number" || typeof slotVal === "boolean") continue;
43450
+ if (React82__default.isValidElement(slotVal) || typeof slotVal === "string" || typeof slotVal === "number" || typeof slotVal === "boolean") continue;
43365
43451
  if (Array.isArray(slotVal) || typeof slotVal === "object" && "type" in slotVal) {
43366
43452
  nodeSlotOverrides[slotKey] = renderPatternChildren(
43367
43453
  slotVal,
@@ -43414,7 +43500,7 @@ function SlotContentRenderer({
43414
43500
  const resolvedItems = Array.isArray(entityVal) && entityVal[0] !== "fn" ? entityVal : null;
43415
43501
  if (resolvedItems && resolvedItems.length > 0 && !finalProps.fields && !finalProps.columns) {
43416
43502
  const sample = resolvedItems[0];
43417
- if (sample && typeof sample === "object" && !Array.isArray(sample) && !React81__default.isValidElement(sample) && !(sample instanceof Date)) {
43503
+ if (sample && typeof sample === "object" && !Array.isArray(sample) && !React82__default.isValidElement(sample) && !(sample instanceof Date)) {
43418
43504
  const keys = Object.keys(sample).filter((k) => k !== "id" && k !== "_id");
43419
43505
  finalProps.fields = keys.map((k, i) => ({ name: k, variant: i === 0 ? "h4" : "body" }));
43420
43506
  }
@@ -43785,7 +43871,7 @@ function resolveLambdaBindings(body, params, item, index) {
43785
43871
  }
43786
43872
  return substituted;
43787
43873
  }
43788
- if (body !== null && typeof body === "object" && !React81__default.isValidElement(body) && !(body instanceof Date) && typeof body !== "function") {
43874
+ if (body !== null && typeof body === "object" && !React82__default.isValidElement(body) && !(body instanceof Date) && typeof body !== "function") {
43789
43875
  const out = {};
43790
43876
  for (const [k, v] of Object.entries(body)) {
43791
43877
  out[k] = recur(v);
@@ -43804,7 +43890,7 @@ function getSlotContentRenderer2() {
43804
43890
  function makeLambdaFn(params, lambdaBody, callerKey) {
43805
43891
  return (item, index) => {
43806
43892
  const resolvedBody = resolveLambdaBindings(lambdaBody, params, item, index);
43807
- if (resolvedBody === null || typeof resolvedBody !== "object" || Array.isArray(resolvedBody) || typeof resolvedBody === "function" || React81__default.isValidElement(resolvedBody) || resolvedBody instanceof Date) {
43893
+ if (resolvedBody === null || typeof resolvedBody !== "object" || Array.isArray(resolvedBody) || typeof resolvedBody === "function" || React82__default.isValidElement(resolvedBody) || resolvedBody instanceof Date) {
43808
43894
  return null;
43809
43895
  }
43810
43896
  const record = resolvedBody;
@@ -43823,7 +43909,7 @@ function makeLambdaFn(params, lambdaBody, callerKey) {
43823
43909
  props: childProps,
43824
43910
  priority: 0
43825
43911
  };
43826
- return React81__default.createElement(SlotContentRenderer2, { content: childContent });
43912
+ return React82__default.createElement(SlotContentRenderer2, { content: childContent });
43827
43913
  };
43828
43914
  }
43829
43915
  function convertNode(node, callerKey) {
@@ -43842,7 +43928,7 @@ function convertNode(node, callerKey) {
43842
43928
  });
43843
43929
  return anyChanged ? mapped : node;
43844
43930
  }
43845
- if (typeof node === "object" && !React81__default.isValidElement(node) && !(node instanceof Date)) {
43931
+ if (typeof node === "object" && !React82__default.isValidElement(node) && !(node instanceof Date)) {
43846
43932
  return convertObjectProps(node);
43847
43933
  }
43848
43934
  return node;