@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,6 +1,6 @@
1
1
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
2
- import * as React73 from 'react';
3
- import React73__default, { createContext, useContext, useMemo, useRef, useEffect, useCallback, useState, Suspense, lazy, useSyncExternalStore, useLayoutEffect, useId } from 'react';
2
+ import * as React74 from 'react';
3
+ import React74__default, { createContext, useContext, useMemo, useRef, useEffect, useCallback, useState, Suspense, lazy, useSyncExternalStore, useLayoutEffect, useId } from 'react';
4
4
  import { clsx } from 'clsx';
5
5
  import { twMerge } from 'tailwind-merge';
6
6
  import { EventBusContext, useTraitScopeChain, useCurrentPagePath, useGameAudioContextOptional, useEntitySchemaOptional, TraitScopeProvider } from '@almadar/ui/providers';
@@ -230,7 +230,7 @@ var init_SvgFlow = __esm({
230
230
  width = 100,
231
231
  height = 100
232
232
  }) => {
233
- const markerId = React73__default.useMemo(() => {
233
+ const markerId = React74__default.useMemo(() => {
234
234
  flowIdCounter += 1;
235
235
  return `almadar-flow-arrow-${flowIdCounter}`;
236
236
  }, []);
@@ -823,7 +823,7 @@ var init_SvgRing = __esm({
823
823
  width = 100,
824
824
  height = 100
825
825
  }) => {
826
- const gradientId = React73__default.useMemo(() => {
826
+ const gradientId = React74__default.useMemo(() => {
827
827
  ringIdCounter += 1;
828
828
  return `almadar-ring-glow-${ringIdCounter}`;
829
829
  }, []);
@@ -1365,7 +1365,7 @@ var init_Icon = __esm({
1365
1365
  const effectiveName = typeof icon === "string" && icon !== "" ? icon : name;
1366
1366
  const effectiveStrokeWidth = strokeWidth != null && strokeWidth > 0 ? strokeWidth : void 0;
1367
1367
  const family = useIconFamily();
1368
- const RenderedComponent = React73__default.useMemo(() => {
1368
+ const RenderedComponent = React74__default.useMemo(() => {
1369
1369
  if (directIcon) return null;
1370
1370
  return effectiveName ? resolveIconForFamily(effectiveName) : null;
1371
1371
  }, [directIcon, effectiveName, family]);
@@ -1485,7 +1485,7 @@ var init_atlasSlice = __esm({
1485
1485
  }
1486
1486
  });
1487
1487
  function useAtlasSliceDataUrl(asset) {
1488
- const [, bump] = React73.useReducer((x) => x + 1, 0);
1488
+ const [, bump] = React74.useReducer((x) => x + 1, 0);
1489
1489
  if (!isAtlasAsset(asset)) return void 0;
1490
1490
  const key = `${asset.atlas}#${asset.sprite}`;
1491
1491
  const cached = sliceDataUrlCache.get(key);
@@ -1548,13 +1548,13 @@ function AtlasImage({
1548
1548
  style,
1549
1549
  "aria-hidden": ariaHidden
1550
1550
  }) {
1551
- const [, bump] = React73.useReducer((x) => x + 1, 0);
1552
- const canvasRef = React73.useRef(null);
1551
+ const [, bump] = React74.useReducer((x) => x + 1, 0);
1552
+ const canvasRef = React74.useRef(null);
1553
1553
  const sliced = isAtlasAsset(asset);
1554
1554
  const atlas = sliced ? getAtlas(asset.atlas, bump) : void 0;
1555
1555
  const img = sliced && asset?.url ? getSheetImage(asset.url, bump) : null;
1556
1556
  const rect = sliced && atlas ? subRectFor(atlas, asset.sprite) : null;
1557
- React73.useEffect(() => {
1557
+ React74.useEffect(() => {
1558
1558
  const canvas = canvasRef.current;
1559
1559
  if (!canvas || !img || !rect) return;
1560
1560
  canvas.width = rect.sw;
@@ -1630,7 +1630,7 @@ function resolveIconProp(value, sizeClass) {
1630
1630
  const IconComp = value;
1631
1631
  return /* @__PURE__ */ jsx(IconComp, { className: sizeClass });
1632
1632
  }
1633
- if (React73__default.isValidElement(value)) {
1633
+ if (React74__default.isValidElement(value)) {
1634
1634
  return value;
1635
1635
  }
1636
1636
  if (typeof value === "object" && value !== null && isIconLike(value)) {
@@ -1707,7 +1707,7 @@ var init_Button = __esm({
1707
1707
  md: "h-icon-default w-icon-default",
1708
1708
  lg: "h-icon-default w-icon-default"
1709
1709
  };
1710
- Button = React73__default.forwardRef(
1710
+ Button = React74__default.forwardRef(
1711
1711
  ({
1712
1712
  className,
1713
1713
  variant = "primary",
@@ -1749,7 +1749,8 @@ var init_Button = __esm({
1749
1749
  "font-medium",
1750
1750
  "rounded-sm",
1751
1751
  "cursor-pointer",
1752
- "transition-all duration-[var(--transition-normal)]",
1752
+ "chrome-button",
1753
+ "transition-all duration-normal",
1753
1754
  "focus:outline-none focus:ring-[length:var(--focus-ring-width)] focus:ring-ring focus:ring-offset-[length:var(--focus-ring-offset)]",
1754
1755
  "disabled:opacity-50 disabled:cursor-not-allowed",
1755
1756
  variantStyles[variant],
@@ -1777,7 +1778,7 @@ var init_Input = __esm({
1777
1778
  init_cn();
1778
1779
  init_Icon();
1779
1780
  init_useEventBus();
1780
- Input = React73__default.forwardRef(
1781
+ Input = React74__default.forwardRef(
1781
1782
  ({
1782
1783
  className,
1783
1784
  inputType,
@@ -1812,7 +1813,7 @@ var init_Input = __esm({
1812
1813
  const showClearButton = clearable && value && String(value).length > 0;
1813
1814
  const isMultiline = type === "textarea";
1814
1815
  const baseClassName = cn(
1815
- "block w-full rounded-sm transition-all duration-[var(--transition-fast)]",
1816
+ "block w-full rounded-sm transition-all duration-fast",
1816
1817
  "border-[length:var(--border-width-thin)] border-border",
1817
1818
  isMultiline ? "px-3 py-2 text-sm" : "h-input-md px-3 text-sm",
1818
1819
  "bg-card hover:bg-muted focus:bg-card",
@@ -1945,7 +1946,7 @@ var Label;
1945
1946
  var init_Label = __esm({
1946
1947
  "components/core/atoms/Label.tsx"() {
1947
1948
  init_cn();
1948
- Label = React73__default.forwardRef(
1949
+ Label = React74__default.forwardRef(
1949
1950
  ({ className, required, children, ...props }, ref) => {
1950
1951
  return /* @__PURE__ */ jsxs(
1951
1952
  "label",
@@ -1972,7 +1973,7 @@ var init_Textarea = __esm({
1972
1973
  "components/core/atoms/Textarea.tsx"() {
1973
1974
  init_cn();
1974
1975
  init_useEventBus();
1975
- Textarea = React73__default.forwardRef(
1976
+ Textarea = React74__default.forwardRef(
1976
1977
  ({ className, error, onChange, ...props }, ref) => {
1977
1978
  const eventBus = useEventBus();
1978
1979
  const handleChange = (e) => {
@@ -2211,7 +2212,7 @@ var init_Select = __esm({
2211
2212
  init_cn();
2212
2213
  init_Icon();
2213
2214
  init_useEventBus();
2214
- Select = React73__default.forwardRef(
2215
+ Select = React74__default.forwardRef(
2215
2216
  (props, _ref) => {
2216
2217
  const { multiple, searchable, clearable } = props;
2217
2218
  if (multiple || searchable || clearable) {
@@ -2228,7 +2229,7 @@ var init_Checkbox = __esm({
2228
2229
  "components/core/atoms/Checkbox.tsx"() {
2229
2230
  init_cn();
2230
2231
  init_useEventBus();
2231
- Checkbox = React73__default.forwardRef(
2232
+ Checkbox = React74__default.forwardRef(
2232
2233
  ({ className, label, id, onChange, ...props }, ref) => {
2233
2234
  const inputId = id || `checkbox-${Math.random().toString(36).substr(2, 9)}`;
2234
2235
  const eventBus = useEventBus();
@@ -2282,7 +2283,7 @@ var init_Spinner = __esm({
2282
2283
  md: "h-6 w-6",
2283
2284
  lg: "h-8 w-8"
2284
2285
  };
2285
- Spinner = React73__default.forwardRef(
2286
+ Spinner = React74__default.forwardRef(
2286
2287
  ({ className, size = "md", overlay, ...props }, ref) => {
2287
2288
  if (overlay) {
2288
2289
  return /* @__PURE__ */ jsx(
@@ -2324,21 +2325,21 @@ var init_Card = __esm({
2324
2325
  "bg-card",
2325
2326
  "border-[length:var(--border-width)] border-border",
2326
2327
  "shadow-elevation-card",
2327
- "transition-all duration-[var(--transition-normal)]",
2328
+ "transition-all duration-normal",
2328
2329
  "hover:shadow-elevation-dialog hover:translate-y-[var(--hover-translate-y)]"
2329
2330
  ].join(" "),
2330
2331
  bordered: [
2331
2332
  "bg-card",
2332
2333
  "border-[length:var(--border-width)] border-border",
2333
2334
  "shadow-elevation-card",
2334
- "transition-all duration-[var(--transition-normal)]",
2335
+ "transition-all duration-normal",
2335
2336
  "hover:shadow-elevation-dialog hover:translate-y-[var(--hover-translate-y)]"
2336
2337
  ].join(" "),
2337
2338
  elevated: [
2338
2339
  "bg-card",
2339
2340
  "border-[length:var(--border-width)] border-border",
2340
2341
  "shadow",
2341
- "transition-all duration-[var(--transition-normal)]",
2342
+ "transition-all duration-normal",
2342
2343
  "hover:shadow-elevation-dialog hover:translate-y-[var(--hover-translate-y)]"
2343
2344
  ].join(" "),
2344
2345
  // Interactive variant with theme-specific hover effects
@@ -2347,7 +2348,7 @@ var init_Card = __esm({
2347
2348
  "border-[length:var(--border-width)] border-border",
2348
2349
  "shadow",
2349
2350
  "cursor-pointer",
2350
- "transition-all duration-[var(--transition-normal)]",
2351
+ "transition-all duration-normal",
2351
2352
  "hover:shadow-elevation-dialog"
2352
2353
  ].join(" ")
2353
2354
  };
@@ -2372,7 +2373,7 @@ var init_Card = __esm({
2372
2373
  chip: "shadow-none rounded-pill border-[length:var(--border-width)] border-border",
2373
2374
  "tile-image-first": "p-0 overflow-hidden"
2374
2375
  };
2375
- Card = React73__default.forwardRef(
2376
+ Card = React74__default.forwardRef(
2376
2377
  ({
2377
2378
  className,
2378
2379
  variant = "bordered",
@@ -2398,7 +2399,8 @@ var init_Card = __esm({
2398
2399
  ref,
2399
2400
  className: cn(
2400
2401
  "rounded-container relative",
2401
- "transition-all duration-[var(--transition-normal)]",
2402
+ "transition-all duration-normal",
2403
+ "chrome-panel",
2402
2404
  variantStyles2[variant],
2403
2405
  paddingStyles[padding],
2404
2406
  lookStyles[look],
@@ -2420,9 +2422,9 @@ var init_Card = __esm({
2420
2422
  }
2421
2423
  );
2422
2424
  Card.displayName = "Card";
2423
- CardHeader = React73__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("mb-4", className), ...props }));
2425
+ CardHeader = React74__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("mb-4", className), ...props }));
2424
2426
  CardHeader.displayName = "CardHeader";
2425
- CardTitle = React73__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
2427
+ CardTitle = React74__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
2426
2428
  "h3",
2427
2429
  {
2428
2430
  ref,
@@ -2435,11 +2437,11 @@ var init_Card = __esm({
2435
2437
  }
2436
2438
  ));
2437
2439
  CardTitle.displayName = "CardTitle";
2438
- CardContent = React73__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("", className), ...props }));
2440
+ CardContent = React74__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("", className), ...props }));
2439
2441
  CardContent.displayName = "CardContent";
2440
2442
  CardBody = CardContent;
2441
2443
  CardBody.displayName = "CardBody";
2442
- CardFooter = React73__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
2444
+ CardFooter = React74__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
2443
2445
  "div",
2444
2446
  {
2445
2447
  ref,
@@ -2493,7 +2495,7 @@ var init_Badge = __esm({
2493
2495
  md: "px-2.5 py-1 text-sm",
2494
2496
  lg: "px-3 py-1.5 text-base"
2495
2497
  };
2496
- Badge = React73__default.forwardRef(
2498
+ Badge = React74__default.forwardRef(
2497
2499
  ({ className, variant = "default", size = "sm", amount, label, icon, iconAsset, children, onRemove, removeLabel, ...props }, ref) => {
2498
2500
  const iconSizes3 = {
2499
2501
  sm: "h-icon-default w-icon-default",
@@ -2619,7 +2621,7 @@ var init_FilterPill = __esm({
2619
2621
  md: "w-3.5 h-3.5",
2620
2622
  lg: "w-4 h-4"
2621
2623
  };
2622
- FilterPill = React73__default.forwardRef(
2624
+ FilterPill = React74__default.forwardRef(
2623
2625
  ({
2624
2626
  className,
2625
2627
  variant = "default",
@@ -2748,8 +2750,8 @@ var init_Avatar = __esm({
2748
2750
  actionPayload
2749
2751
  }) => {
2750
2752
  const eventBus = useEventBus();
2751
- const [imgFailed, setImgFailed] = React73__default.useState(false);
2752
- React73__default.useEffect(() => {
2753
+ const [imgFailed, setImgFailed] = React74__default.useState(false);
2754
+ React74__default.useEffect(() => {
2753
2755
  setImgFailed(false);
2754
2756
  }, [src]);
2755
2757
  const initials = providedInitials ?? (name ? generateInitials(name) : void 0);
@@ -3001,7 +3003,7 @@ var init_Box = __esm({
3001
3003
  fixed: "fixed",
3002
3004
  sticky: "sticky"
3003
3005
  };
3004
- Box = React73__default.forwardRef(
3006
+ Box = React74__default.forwardRef(
3005
3007
  ({
3006
3008
  padding,
3007
3009
  paddingX,
@@ -3066,7 +3068,7 @@ var init_Box = __esm({
3066
3068
  onPointerDown?.(e);
3067
3069
  }, [hoverEvent, tapReveal, triggerProps, onPointerDown]);
3068
3070
  const isClickable = action || onClick;
3069
- return React73__default.createElement(
3071
+ return React74__default.createElement(
3070
3072
  Component,
3071
3073
  {
3072
3074
  ref,
@@ -3120,7 +3122,7 @@ var init_Center = __esm({
3120
3122
  as: Component = "div"
3121
3123
  }) => {
3122
3124
  const mergedStyle = minHeight ? { minHeight, ...style } : style;
3123
- return React73__default.createElement(Component, {
3125
+ return React74__default.createElement(Component, {
3124
3126
  className: cn(
3125
3127
  inline ? "inline-flex" : "flex",
3126
3128
  horizontal && "justify-center",
@@ -3388,7 +3390,7 @@ var init_Radio = __esm({
3388
3390
  md: "w-2.5 h-2.5",
3389
3391
  lg: "w-3 h-3"
3390
3392
  };
3391
- Radio = React73__default.forwardRef(
3393
+ Radio = React74__default.forwardRef(
3392
3394
  ({
3393
3395
  label,
3394
3396
  helperText,
@@ -3405,12 +3407,12 @@ var init_Radio = __esm({
3405
3407
  onChange,
3406
3408
  ...props
3407
3409
  }, ref) => {
3408
- const reactId = React73__default.useId();
3410
+ const reactId = React74__default.useId();
3409
3411
  const baseId = id || `radio-${reactId}`;
3410
3412
  const hasError = !!error;
3411
3413
  const eventBus = useEventBus();
3412
- const [selected, setSelected] = React73__default.useState(value);
3413
- React73__default.useEffect(() => {
3414
+ const [selected, setSelected] = React74__default.useState(value);
3415
+ React74__default.useEffect(() => {
3414
3416
  if (value !== void 0) setSelected(value);
3415
3417
  }, [value]);
3416
3418
  const pick = (next, e) => {
@@ -3592,7 +3594,7 @@ var init_Switch = __esm({
3592
3594
  "components/core/atoms/Switch.tsx"() {
3593
3595
  "use client";
3594
3596
  init_cn();
3595
- Switch = React73.forwardRef(
3597
+ Switch = React74.forwardRef(
3596
3598
  ({
3597
3599
  checked,
3598
3600
  defaultChecked = false,
@@ -3603,10 +3605,10 @@ var init_Switch = __esm({
3603
3605
  name,
3604
3606
  className
3605
3607
  }, ref) => {
3606
- const [isChecked, setIsChecked] = React73.useState(
3608
+ const [isChecked, setIsChecked] = React74.useState(
3607
3609
  checked !== void 0 ? checked : defaultChecked
3608
3610
  );
3609
- React73.useEffect(() => {
3611
+ React74.useEffect(() => {
3610
3612
  if (checked !== void 0) {
3611
3613
  setIsChecked(checked);
3612
3614
  }
@@ -3637,7 +3639,7 @@ var init_Switch = __esm({
3637
3639
  // redefine --space-11 to 68px, which makes w-11 enormous and leaves
3638
3640
  // the thumb stuck near the left edge. The switch geometry must stay
3639
3641
  // proportional regardless of a theme's density scale.
3640
- "relative inline-flex h-[1.5rem] w-[2.75rem] shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors",
3642
+ "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",
3641
3643
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",
3642
3644
  isChecked ? "bg-primary" : "bg-muted",
3643
3645
  disabled && "cursor-not-allowed opacity-50"
@@ -3646,7 +3648,7 @@ var init_Switch = __esm({
3646
3648
  "span",
3647
3649
  {
3648
3650
  className: cn(
3649
- "pointer-events-none block h-[1.25rem] w-[1.25rem] rounded-full bg-background shadow-lg ring-0 transition-transform",
3651
+ "pointer-events-none block h-[1.25rem] w-[1.25rem] rounded-full bg-background shadow-lg ring-0 transition-transform duration-fast",
3650
3652
  isChecked ? "translate-x-[1.25rem]" : "translate-x-0"
3651
3653
  )
3652
3654
  }
@@ -3769,7 +3771,7 @@ var init_Stack = __esm({
3769
3771
  };
3770
3772
  const isHorizontal = direction === "horizontal";
3771
3773
  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";
3772
- return React73__default.createElement(
3774
+ return React74__default.createElement(
3773
3775
  Component,
3774
3776
  {
3775
3777
  className: cn(
@@ -3814,7 +3816,7 @@ var init_TextHighlight = __esm({
3814
3816
  hoverEvent
3815
3817
  }) => {
3816
3818
  const eventBus = useEventBus();
3817
- const baseStyles = "cursor-pointer transition-all duration-150";
3819
+ const baseStyles = "cursor-pointer transition-all duration-fast";
3818
3820
  const typeStyles = {
3819
3821
  question: cn(
3820
3822
  // Blue border for questions
@@ -3965,7 +3967,7 @@ var init_Typography = __esm({
3965
3967
  }) => {
3966
3968
  const variant = variantProp ?? (level ? `h${level}` : "body1");
3967
3969
  const Component = as || defaultElements[variant];
3968
- return React73__default.createElement(
3970
+ return React74__default.createElement(
3969
3971
  Component,
3970
3972
  {
3971
3973
  id,
@@ -4048,12 +4050,84 @@ var init_ThemeToggle = __esm({
4048
4050
  ThemeToggle.displayName = "ThemeToggle";
4049
4051
  }
4050
4052
  });
4053
+ function isMotionEnabled() {
4054
+ if (typeof document === "undefined") return true;
4055
+ if (motionEnabledCache !== null) return motionEnabledCache;
4056
+ const v = getComputedStyle(document.documentElement).getPropertyValue("--motion-enable").trim().toLowerCase();
4057
+ motionEnabledCache = v !== "off";
4058
+ return motionEnabledCache;
4059
+ }
4060
+ function usePresence(show, opts) {
4061
+ const { animation, animate = true, onExited } = opts;
4062
+ const [mounted, setMounted] = useState(show);
4063
+ const [exiting, setExiting] = useState(false);
4064
+ const prev = useRef(show);
4065
+ const onExitedRef = useRef(onExited);
4066
+ onExitedRef.current = onExited;
4067
+ const safeTimer = useRef(null);
4068
+ const clearSafe = useCallback(() => {
4069
+ if (safeTimer.current) {
4070
+ clearTimeout(safeTimer.current);
4071
+ safeTimer.current = null;
4072
+ }
4073
+ }, []);
4074
+ const finishExit = useCallback(() => {
4075
+ clearSafe();
4076
+ setExiting(false);
4077
+ setMounted(false);
4078
+ onExitedRef.current?.();
4079
+ }, [clearSafe]);
4080
+ useEffect(() => {
4081
+ const moving = animate && isMotionEnabled();
4082
+ if (show && !prev.current) {
4083
+ setExiting(false);
4084
+ setMounted(true);
4085
+ } else if (!show && prev.current) {
4086
+ if (moving) {
4087
+ setExiting(true);
4088
+ clearSafe();
4089
+ safeTimer.current = setTimeout(finishExit, SAFE_EXIT_MS);
4090
+ } else {
4091
+ setMounted(false);
4092
+ setExiting(false);
4093
+ }
4094
+ }
4095
+ prev.current = show;
4096
+ }, [show, animate, clearSafe, finishExit]);
4097
+ useEffect(() => () => clearSafe(), [clearSafe]);
4098
+ const disabled = !animate || !isMotionEnabled();
4099
+ const className = disabled ? "" : exiting ? `animate-${animation}-out` : `animate-${animation}-in`;
4100
+ const onAnimationEnd = useCallback(
4101
+ (e) => {
4102
+ if (e.target !== e.currentTarget) return;
4103
+ if (exiting) finishExit();
4104
+ },
4105
+ [exiting, finishExit]
4106
+ );
4107
+ return { mounted, exiting, className, onAnimationEnd };
4108
+ }
4109
+ var SAFE_EXIT_MS, motionEnabledCache, Presence;
4110
+ var init_Presence = __esm({
4111
+ "components/core/atoms/Presence.tsx"() {
4112
+ "use client";
4113
+ init_cn();
4114
+ SAFE_EXIT_MS = 1e3;
4115
+ motionEnabledCache = null;
4116
+ Presence = ({ show, className, children, ...opts }) => {
4117
+ const { mounted, className: animClass, onAnimationEnd } = usePresence(show, opts);
4118
+ if (!mounted) return null;
4119
+ return /* @__PURE__ */ jsx("div", { className: cn(animClass, className), onAnimationEnd, children });
4120
+ };
4121
+ Presence.displayName = "Presence";
4122
+ }
4123
+ });
4051
4124
  var Overlay;
4052
4125
  var init_Overlay = __esm({
4053
4126
  "components/core/atoms/Overlay.tsx"() {
4054
4127
  "use client";
4055
4128
  init_cn();
4056
4129
  init_useEventBus();
4130
+ init_Presence();
4057
4131
  Overlay = ({
4058
4132
  isVisible = true,
4059
4133
  onClick,
@@ -4062,7 +4136,8 @@ var init_Overlay = __esm({
4062
4136
  action
4063
4137
  }) => {
4064
4138
  const eventBus = useEventBus();
4065
- if (!isVisible) return null;
4139
+ const { mounted, className: animClass, onAnimationEnd } = usePresence(isVisible, { animation: "overlay" });
4140
+ if (!mounted) return null;
4066
4141
  const handleClick = (e) => {
4067
4142
  if (action) {
4068
4143
  eventBus.emit(`UI:${action}`, {});
@@ -4075,11 +4150,12 @@ var init_Overlay = __esm({
4075
4150
  className: cn(
4076
4151
  "fixed inset-0 z-40",
4077
4152
  blur && "backdrop-blur-sm",
4078
- "animate-overlay-in",
4153
+ animClass,
4079
4154
  className
4080
4155
  ),
4081
4156
  style: { backgroundColor: "rgba(0, 0, 0, 0.6)" },
4082
4157
  onClick: action || onClick ? handleClick : void 0,
4158
+ onAnimationEnd,
4083
4159
  "aria-hidden": "true"
4084
4160
  }
4085
4161
  );
@@ -4125,7 +4201,7 @@ var Dialog;
4125
4201
  var init_Dialog = __esm({
4126
4202
  "components/core/atoms/Dialog.tsx"() {
4127
4203
  init_cn();
4128
- Dialog = React73__default.forwardRef(
4204
+ Dialog = React74__default.forwardRef(
4129
4205
  ({
4130
4206
  role = "dialog",
4131
4207
  "aria-modal": ariaModal = true,
@@ -4151,7 +4227,7 @@ var Aside;
4151
4227
  var init_Aside = __esm({
4152
4228
  "components/core/atoms/Aside.tsx"() {
4153
4229
  init_cn();
4154
- Aside = React73__default.forwardRef(
4230
+ Aside = React74__default.forwardRef(
4155
4231
  ({ className, children, ...rest }, ref) => /* @__PURE__ */ jsx("aside", { ref, className: cn(className), ...rest, children })
4156
4232
  );
4157
4233
  Aside.displayName = "Aside";
@@ -4230,9 +4306,9 @@ var init_LawReferenceTooltip = __esm({
4230
4306
  className
4231
4307
  }) => {
4232
4308
  const { t } = useTranslate();
4233
- const [isVisible, setIsVisible] = React73__default.useState(false);
4234
- const timeoutRef = React73__default.useRef(null);
4235
- const triggerRef = React73__default.useRef(null);
4309
+ const [isVisible, setIsVisible] = React74__default.useState(false);
4310
+ const timeoutRef = React74__default.useRef(null);
4311
+ const triggerRef = React74__default.useRef(null);
4236
4312
  const handleMouseEnter = () => {
4237
4313
  if (timeoutRef.current) clearTimeout(timeoutRef.current);
4238
4314
  timeoutRef.current = setTimeout(() => setIsVisible(true), 200);
@@ -4243,7 +4319,7 @@ var init_LawReferenceTooltip = __esm({
4243
4319
  };
4244
4320
  const { revealed, triggerProps } = useTapReveal({ refs: [triggerRef] });
4245
4321
  const open = isVisible || revealed;
4246
- React73__default.useEffect(() => {
4322
+ React74__default.useEffect(() => {
4247
4323
  return () => {
4248
4324
  if (timeoutRef.current) clearTimeout(timeoutRef.current);
4249
4325
  };
@@ -4453,7 +4529,7 @@ var init_StatusDot = __esm({
4453
4529
  md: "w-2.5 h-2.5",
4454
4530
  lg: "w-3 h-3"
4455
4531
  };
4456
- StatusDot = React73__default.forwardRef(
4532
+ StatusDot = React74__default.forwardRef(
4457
4533
  ({ className, status = "offline", pulse = false, size = "md", label, ...props }, ref) => {
4458
4534
  return /* @__PURE__ */ jsx(
4459
4535
  "span",
@@ -4507,7 +4583,7 @@ var init_TrendIndicator = __esm({
4507
4583
  down: "trending-down",
4508
4584
  flat: "arrow-right"
4509
4585
  };
4510
- TrendIndicator = React73__default.forwardRef(
4586
+ TrendIndicator = React74__default.forwardRef(
4511
4587
  ({
4512
4588
  className,
4513
4589
  value,
@@ -4574,7 +4650,7 @@ var init_RangeSlider = __esm({
4574
4650
  md: "w-4 h-4",
4575
4651
  lg: "w-5 h-5"
4576
4652
  };
4577
- RangeSlider = React73__default.forwardRef(
4653
+ RangeSlider = React74__default.forwardRef(
4578
4654
  ({
4579
4655
  className,
4580
4656
  min = 0,
@@ -4717,7 +4793,7 @@ var init_RangeSlider = __esm({
4717
4793
  "border-2 border-primary",
4718
4794
  "shadow-sm",
4719
4795
  "pointer-events-none",
4720
- "transition-transform duration-100",
4796
+ "transition-transform duration-instant",
4721
4797
  isDragging && "scale-[var(--hover-scale)]",
4722
4798
  thumbSizes[size]
4723
4799
  ),
@@ -5185,7 +5261,7 @@ var init_ContentSection = __esm({
5185
5261
  md: "py-16",
5186
5262
  lg: "py-24"
5187
5263
  };
5188
- ContentSection = React73__default.forwardRef(
5264
+ ContentSection = React74__default.forwardRef(
5189
5265
  ({ children, background = "default", padding = "lg", id, className }, ref) => {
5190
5266
  return /* @__PURE__ */ jsx(
5191
5267
  Box,
@@ -5719,7 +5795,7 @@ var init_AnimatedReveal = __esm({
5719
5795
  "scale-up": { opacity: 1, transform: "scale(1) translateY(0)" },
5720
5796
  "none": {}
5721
5797
  };
5722
- AnimatedReveal = React73__default.forwardRef(
5798
+ AnimatedReveal = React74__default.forwardRef(
5723
5799
  ({
5724
5800
  trigger = "scroll",
5725
5801
  animation = "fade-up",
@@ -5879,7 +5955,7 @@ var init_AnimatedGraphic = __esm({
5879
5955
  "components/marketing/atoms/AnimatedGraphic.tsx"() {
5880
5956
  "use client";
5881
5957
  init_cn();
5882
- AnimatedGraphic = React73__default.forwardRef(
5958
+ AnimatedGraphic = React74__default.forwardRef(
5883
5959
  ({
5884
5960
  src,
5885
5961
  svgContent,
@@ -5902,7 +5978,7 @@ var init_AnimatedGraphic = __esm({
5902
5978
  const fetchedSvg = useFetchedSvg(svgContent ? void 0 : src);
5903
5979
  const resolvedSvg = svgContent ?? fetchedSvg;
5904
5980
  const prevAnimateRef = useRef(animate);
5905
- const setRef = React73__default.useCallback(
5981
+ const setRef = React74__default.useCallback(
5906
5982
  (node) => {
5907
5983
  containerRef.current = node;
5908
5984
  if (typeof ref === "function") ref(node);
@@ -6229,6 +6305,7 @@ var init_Drawer = __esm({
6229
6305
  init_Button();
6230
6306
  init_Typography();
6231
6307
  init_Overlay();
6308
+ init_Presence();
6232
6309
  init_cn();
6233
6310
  init_useEventBus();
6234
6311
  sizeWidths = {
@@ -6282,6 +6359,7 @@ var init_Drawer = __esm({
6282
6359
  document.addEventListener("keydown", handleEscape);
6283
6360
  return () => document.removeEventListener("keydown", handleEscape);
6284
6361
  }, [isOpen, closeOnEscape, onClose, closeEvent, eventBus]);
6362
+ const { mounted, className: drawerAnim, onAnimationEnd } = usePresence(isOpen, { animation: "drawer" });
6285
6363
  useEffect(() => {
6286
6364
  if (isOpen) {
6287
6365
  document.body.style.overflow = "hidden";
@@ -6292,7 +6370,7 @@ var init_Drawer = __esm({
6292
6370
  document.body.style.overflow = "";
6293
6371
  };
6294
6372
  }, [isOpen]);
6295
- if (!isOpen) return null;
6373
+ if (!mounted) return null;
6296
6374
  const handleClose = () => {
6297
6375
  if (closeEvent) eventBus.emit(`UI:${closeEvent}`, {});
6298
6376
  onClose();
@@ -6305,7 +6383,7 @@ var init_Drawer = __esm({
6305
6383
  const widthClass = width in sizeWidths ? sizeWidths[width] : "";
6306
6384
  const widthStyle = width in sizeWidths ? void 0 : { width };
6307
6385
  const positionClasses = position === "right" ? "right-0 border-l" : "left-0 border-r";
6308
- const animationClasses2 = position === "right" ? "animate-slide-in-right" : "animate-slide-in-left";
6386
+ const drawerSign = position === "right" ? 1 : -1;
6309
6387
  return /* @__PURE__ */ jsxs(Fragment, { children: [
6310
6388
  /* @__PURE__ */ jsx(
6311
6389
  Overlay,
@@ -6327,12 +6405,13 @@ var init_Drawer = __esm({
6327
6405
  "flex flex-col max-h-screen",
6328
6406
  positionClasses,
6329
6407
  widthClass,
6330
- animationClasses2,
6408
+ drawerAnim,
6331
6409
  className
6332
6410
  ),
6333
- style: widthStyle,
6411
+ style: { ...widthStyle, "--motion-drawer-sign": drawerSign },
6334
6412
  role: "dialog",
6335
6413
  "aria-modal": "true",
6414
+ onAnimationEnd,
6336
6415
  ...title && { "aria-labelledby": "drawer-title" },
6337
6416
  children: [
6338
6417
  (title || showCloseButton) && /* @__PURE__ */ jsxs(
@@ -6371,31 +6450,7 @@ var init_Drawer = __esm({
6371
6450
  )
6372
6451
  ]
6373
6452
  }
6374
- ),
6375
- /* @__PURE__ */ jsx("style", { children: `
6376
- @keyframes slide-in-right {
6377
- from {
6378
- transform: translateX(100%);
6379
- }
6380
- to {
6381
- transform: translateX(0);
6382
- }
6383
- }
6384
- @keyframes slide-in-left {
6385
- from {
6386
- transform: translateX(-100%);
6387
- }
6388
- to {
6389
- transform: translateX(0);
6390
- }
6391
- }
6392
- .animate-slide-in-right {
6393
- animation: slide-in-right 0.3s ease-out;
6394
- }
6395
- .animate-slide-in-left {
6396
- animation: slide-in-left 0.3s ease-out;
6397
- }
6398
- ` })
6453
+ )
6399
6454
  ] });
6400
6455
  };
6401
6456
  Drawer.displayName = "Drawer";
@@ -6446,14 +6501,23 @@ var init_Toast = __esm({
6446
6501
  }) => {
6447
6502
  const eventBus = useEventBus();
6448
6503
  const { t } = useTranslate();
6449
- const handleDismiss = () => {
6504
+ const [leaving, setLeaving] = useState(false);
6505
+ const doRealDismiss = () => {
6450
6506
  if (dismissEvent) eventBus.emit(`UI:${dismissEvent}`, {});
6451
6507
  onDismiss?.();
6452
6508
  };
6509
+ const handleDismiss = () => {
6510
+ if (leaving) return;
6511
+ setLeaving(true);
6512
+ };
6453
6513
  const handleAction = () => {
6454
6514
  if (actionEvent) eventBus.emit(`UI:${actionEvent}`, {});
6455
6515
  onAction?.();
6456
6516
  };
6517
+ const handleAnimEnd = (e) => {
6518
+ if (e.target !== e.currentTarget) return;
6519
+ if (leaving) doRealDismiss();
6520
+ };
6457
6521
  useEffect(() => {
6458
6522
  if (duration <= 0 || !onDismiss && !dismissEvent) {
6459
6523
  return;
@@ -6472,10 +6536,12 @@ var init_Toast = __esm({
6472
6536
  // edge. `max-w-[calc(100vw-2rem)]` clamps to viewport too.
6473
6537
  "border-l-4 p-4 shadow-elevation-toast min-w-0 sm:min-w-[300px] max-w-md max-w-[calc(100vw-2rem)]",
6474
6538
  "rounded-sm",
6539
+ leaving ? "animate-toast-out" : "animate-toast-in",
6475
6540
  variantClasses[variant],
6476
6541
  className
6477
6542
  ),
6478
6543
  role: "alert",
6544
+ onAnimationEnd: handleAnimEnd,
6479
6545
  children: /* @__PURE__ */ jsxs(Box, { className: "flex items-start gap-3", children: [
6480
6546
  /* @__PURE__ */ jsx(Box, { className: "flex-shrink-0 mt-0.5", children: /* @__PURE__ */ jsx(
6481
6547
  Icon,
@@ -6591,7 +6657,7 @@ var init_ErrorBoundary = __esm({
6591
6657
  }
6592
6658
  );
6593
6659
  };
6594
- ErrorBoundary = class extends React73__default.Component {
6660
+ ErrorBoundary = class extends React74__default.Component {
6595
6661
  constructor(props) {
6596
6662
  super(props);
6597
6663
  __publicField(this, "reset", () => {
@@ -6872,7 +6938,7 @@ var init_Container = __esm({
6872
6938
  as: Component = "div"
6873
6939
  }) => {
6874
6940
  const resolvedSize = maxWidth ?? size ?? "lg";
6875
- return React73__default.createElement(
6941
+ return React74__default.createElement(
6876
6942
  Component,
6877
6943
  {
6878
6944
  className: cn(
@@ -10095,7 +10161,7 @@ var init_CodeBlock = __esm({
10095
10161
  DIFF_STYLE_FALLBACK = { bg: "", prefix: " ", text: "text-foreground" };
10096
10162
  LINE_PROPS_FN = (n) => ({ "data-line": String(n - 1) });
10097
10163
  HIDDEN_LINE_NUMBERS = { display: "none" };
10098
- CodeBlock = React73__default.memo(
10164
+ CodeBlock = React74__default.memo(
10099
10165
  ({
10100
10166
  code: rawCode,
10101
10167
  language = "text",
@@ -10682,7 +10748,7 @@ var init_MarkdownContent = __esm({
10682
10748
  init_Box();
10683
10749
  init_CodeBlock();
10684
10750
  init_cn();
10685
- MarkdownContent = React73__default.memo(
10751
+ MarkdownContent = React74__default.memo(
10686
10752
  ({ content, direction = "ltr", className }) => {
10687
10753
  const { t: _t } = useTranslate();
10688
10754
  const safeContent = typeof content === "string" ? content : String(content ?? "");
@@ -11645,7 +11711,7 @@ var init_StateMachineView = __esm({
11645
11711
  Box,
11646
11712
  {
11647
11713
  className: cn(
11648
- "fixed z-50 animate-in fade-in-0 zoom-in-95 duration-150",
11714
+ "fixed z-50 animate-in fade-in-0 zoom-in-95 duration-fast",
11649
11715
  tooltip.pinned ? "pointer-events-auto" : "pointer-events-none"
11650
11716
  ),
11651
11717
  style: {
@@ -12009,7 +12075,7 @@ var init_StateMachineView = __esm({
12009
12075
  style: { top: title ? 30 : 0 },
12010
12076
  children: [
12011
12077
  entity && /* @__PURE__ */ jsx(EntityBox, { entity, config }),
12012
- states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(React73__default.Fragment, { children: renderStateNode(state, config) }, state.id) : /* @__PURE__ */ jsx(
12078
+ states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(React74__default.Fragment, { children: renderStateNode(state, config) }, state.id) : /* @__PURE__ */ jsx(
12013
12079
  StateNode,
12014
12080
  {
12015
12081
  state,
@@ -14048,6 +14114,129 @@ var init_Breadcrumb = __esm({
14048
14114
  Breadcrumb.displayName = "Breadcrumb";
14049
14115
  }
14050
14116
  });
14117
+ function useSafeEventBus2() {
14118
+ try {
14119
+ return useEventBus();
14120
+ } catch {
14121
+ return { emit: () => {
14122
+ }, on: () => () => {
14123
+ }, once: () => {
14124
+ } };
14125
+ }
14126
+ }
14127
+ var log5, lookStyles4, ButtonGroup;
14128
+ var init_ButtonGroup = __esm({
14129
+ "components/core/molecules/ButtonGroup.tsx"() {
14130
+ "use client";
14131
+ init_cn();
14132
+ init_atoms();
14133
+ init_useEventBus();
14134
+ log5 = createLogger("almadar:ui:button-group");
14135
+ lookStyles4 = {
14136
+ "right-aligned-buttons": "",
14137
+ "floating-bar": "fixed bottom-section left-1/2 -translate-x-1/2 shadow-elevation-toast bg-card p-card-sm rounded-container",
14138
+ "inline-row": "gap-2 inline-flex",
14139
+ "dropdown-menu": "[&>button:not(:first-child)]:hidden",
14140
+ "command-palette-trigger": "[&>button:not(:first-child)]:hidden"
14141
+ };
14142
+ ButtonGroup = ({
14143
+ children,
14144
+ primary,
14145
+ secondary,
14146
+ variant = "default",
14147
+ orientation = "horizontal",
14148
+ className,
14149
+ // Filter-group pattern props (entity and filters are used for schema-driven filtering)
14150
+ entity: _entity,
14151
+ filters,
14152
+ look = "right-aligned-buttons"
14153
+ }) => {
14154
+ const eventBus = useSafeEventBus2();
14155
+ const variantClasses2 = {
14156
+ default: "gap-0",
14157
+ 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",
14158
+ 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"
14159
+ };
14160
+ const orientationClasses = {
14161
+ horizontal: "flex-row",
14162
+ 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"
14163
+ };
14164
+ const handleActionClick = (action) => {
14165
+ if (action.event) {
14166
+ eventBus.emit("UI:DISPATCH", { event: action.event });
14167
+ }
14168
+ if (action.navigatesTo) {
14169
+ eventBus.emit("UI:NAVIGATE", { url: action.navigatesTo });
14170
+ }
14171
+ };
14172
+ const renderFormActions = () => {
14173
+ const buttons = [];
14174
+ if (secondary) {
14175
+ secondary.forEach((action, index) => {
14176
+ buttons.push(
14177
+ /* @__PURE__ */ jsx(
14178
+ Button,
14179
+ {
14180
+ type: action.actionType === "submit" ? "submit" : "button",
14181
+ variant: action.variant || "ghost",
14182
+ onClick: () => handleActionClick(action),
14183
+ children: action.label
14184
+ },
14185
+ `secondary-${index}`
14186
+ )
14187
+ );
14188
+ });
14189
+ }
14190
+ if (primary) {
14191
+ const isSubmit = primary.actionType === "submit";
14192
+ buttons.push(
14193
+ /* @__PURE__ */ jsx(
14194
+ Button,
14195
+ {
14196
+ type: isSubmit ? "submit" : "button",
14197
+ variant: primary.variant || "primary",
14198
+ onClick: () => handleActionClick(primary),
14199
+ "data-testid": isSubmit ? "form-submit" : void 0,
14200
+ children: primary.label
14201
+ },
14202
+ "primary"
14203
+ )
14204
+ );
14205
+ }
14206
+ return buttons;
14207
+ };
14208
+ const renderFilters = () => {
14209
+ if (!filters || filters.length === 0) return null;
14210
+ return filters.map((filter, index) => /* @__PURE__ */ jsx(
14211
+ Button,
14212
+ {
14213
+ variant: "ghost",
14214
+ onClick: () => {
14215
+ log5.debug("Filter clicked", { field: filter.field });
14216
+ },
14217
+ children: filter.label
14218
+ },
14219
+ `filter-${filter.field}-${index}`
14220
+ ));
14221
+ };
14222
+ return /* @__PURE__ */ jsx(
14223
+ "div",
14224
+ {
14225
+ className: cn(
14226
+ "inline-flex gap-2",
14227
+ variantClasses2[variant],
14228
+ orientationClasses[orientation],
14229
+ lookStyles4[look],
14230
+ className
14231
+ ),
14232
+ role: "group",
14233
+ children: children || renderFilters() || renderFormActions()
14234
+ }
14235
+ );
14236
+ };
14237
+ ButtonGroup.displayName = "ButtonGroup";
14238
+ }
14239
+ });
14051
14240
  function useSwipeGesture(callbacks, options = {}) {
14052
14241
  const { threshold = 50, velocityThreshold = 0.3, preventDefault = false } = options;
14053
14242
  const startX = useRef(0);
@@ -14418,8 +14607,8 @@ function MiniMap({
14418
14607
  tileAssets,
14419
14608
  unitAssets
14420
14609
  }) {
14421
- const canvasRef = React73.useRef(null);
14422
- const imgCacheRef = React73.useRef(/* @__PURE__ */ new Map());
14610
+ const canvasRef = React74.useRef(null);
14611
+ const imgCacheRef = React74.useRef(/* @__PURE__ */ new Map());
14423
14612
  function loadImg(url) {
14424
14613
  const cached = imgCacheRef.current.get(url);
14425
14614
  if (cached) return cached.complete ? cached : null;
@@ -14434,7 +14623,7 @@ function MiniMap({
14434
14623
  imgCacheRef.current.set(url, img);
14435
14624
  return null;
14436
14625
  }
14437
- React73.useEffect(() => {
14626
+ React74.useEffect(() => {
14438
14627
  const canvas = canvasRef.current;
14439
14628
  if (!canvas) return;
14440
14629
  const ctx = canvas.getContext("2d");
@@ -14609,7 +14798,7 @@ function getTraitSnapshots() {
14609
14798
  try {
14610
14799
  snapshots.push(getter());
14611
14800
  } catch (err) {
14612
- log5.error("traitSnapshot getter failed", { trait: traitName, err: String(err) });
14801
+ log6.error("traitSnapshot getter failed", { trait: traitName, err: String(err) });
14613
14802
  }
14614
14803
  }
14615
14804
  return snapshots;
@@ -14694,10 +14883,10 @@ function updateAssetStatus(url, status) {
14694
14883
  window.__orbitalVerification.assetStatus[url] = status;
14695
14884
  }
14696
14885
  }
14697
- var log5;
14886
+ var log6;
14698
14887
  var init_verificationRegistry = __esm({
14699
14888
  "lib/verificationRegistry.ts"() {
14700
- log5 = createLogger("almadar:bridge");
14889
+ log6 = createLogger("almadar:bridge");
14701
14890
  exposeOnWindow();
14702
14891
  }
14703
14892
  });
@@ -16446,7 +16635,7 @@ var init_CardGrid = __esm({
16446
16635
  CardGrid.displayName = "CardGrid";
16447
16636
  }
16448
16637
  });
16449
- function useSafeEventBus2() {
16638
+ function useSafeEventBus3() {
16450
16639
  try {
16451
16640
  return useEventBus();
16452
16641
  } catch {
@@ -16482,7 +16671,7 @@ var init_Carousel = __esm({
16482
16671
  const [activeIndex, setActiveIndex] = useState(0);
16483
16672
  const scrollRef = useRef(null);
16484
16673
  const autoPlayRef = useRef(null);
16485
- const eventBus = useSafeEventBus2();
16674
+ const eventBus = useSafeEventBus3();
16486
16675
  const { t } = useTranslate();
16487
16676
  const safeItems = items ?? [];
16488
16677
  const totalSlides = safeItems.length;
@@ -16844,7 +17033,7 @@ var init_Chart = __esm({
16844
17033
  return /* @__PURE__ */ jsx(
16845
17034
  Box,
16846
17035
  {
16847
- className: "h-full rounded-r-sm transition-all duration-500 ease-out min-w-[2px] cursor-pointer hover:opacity-80",
17036
+ className: "h-full rounded-r-sm transition-all duration-slow ease-standard min-w-[2px] cursor-pointer hover:opacity-80",
16848
17037
  style: {
16849
17038
  width: `${ratio}%`,
16850
17039
  backgroundColor: color
@@ -16900,7 +17089,7 @@ var init_Chart = __esm({
16900
17089
  Box,
16901
17090
  {
16902
17091
  className: cn(
16903
- "rounded-t-sm transition-all duration-500 ease-out min-h-[4px] cursor-pointer hover:opacity-80",
17092
+ "rounded-t-sm transition-all duration-slow ease-standard min-h-[4px] cursor-pointer hover:opacity-80",
16904
17093
  histogram ? "flex-1 mx-0" : "flex-1"
16905
17094
  ),
16906
17095
  style: {
@@ -16950,7 +17139,7 @@ var init_Chart = __esm({
16950
17139
  return /* @__PURE__ */ jsx(
16951
17140
  Box,
16952
17141
  {
16953
- className: "w-full transition-all duration-500 ease-out cursor-pointer hover:opacity-80",
17142
+ className: "w-full transition-all duration-slow ease-standard cursor-pointer hover:opacity-80",
16954
17143
  style: {
16955
17144
  height: `${ratio}%`,
16956
17145
  backgroundColor: color
@@ -17040,7 +17229,7 @@ var init_Chart = __esm({
17040
17229
  fill: seg.color,
17041
17230
  stroke: "var(--color-card)",
17042
17231
  strokeWidth: "2",
17043
- className: "transition-opacity duration-200 hover:opacity-80 cursor-pointer",
17232
+ className: "transition-opacity duration-fast hover:opacity-80 cursor-pointer",
17044
17233
  onClick: () => onPointClick?.(
17045
17234
  { label: seg.label, value: seg.value, color: seg.color },
17046
17235
  "default"
@@ -18294,9 +18483,9 @@ function ControlButton({
18294
18483
  className
18295
18484
  }) {
18296
18485
  const eventBus = useEventBus();
18297
- const [isPressed, setIsPressed] = React73.useState(false);
18486
+ const [isPressed, setIsPressed] = React74.useState(false);
18298
18487
  const actualPressed = pressed ?? isPressed;
18299
- const handlePointerDown = React73.useCallback(
18488
+ const handlePointerDown = React74.useCallback(
18300
18489
  (e) => {
18301
18490
  e.preventDefault();
18302
18491
  if (disabled) return;
@@ -18306,7 +18495,7 @@ function ControlButton({
18306
18495
  },
18307
18496
  [disabled, pressEvent, eventBus, onPress]
18308
18497
  );
18309
- const handlePointerUp = React73.useCallback(
18498
+ const handlePointerUp = React74.useCallback(
18310
18499
  (e) => {
18311
18500
  e.preventDefault();
18312
18501
  if (disabled) return;
@@ -18316,7 +18505,7 @@ function ControlButton({
18316
18505
  },
18317
18506
  [disabled, releaseEvent, eventBus, onRelease]
18318
18507
  );
18319
- const handlePointerLeave = React73.useCallback(
18508
+ const handlePointerLeave = React74.useCallback(
18320
18509
  (e) => {
18321
18510
  if (isPressed) {
18322
18511
  setIsPressed(false);
@@ -18404,8 +18593,8 @@ function ControlGrid({
18404
18593
  className
18405
18594
  }) {
18406
18595
  const eventBus = useEventBus();
18407
- const [active, setActive] = React73.useState(/* @__PURE__ */ new Set());
18408
- const handlePress = React73.useCallback(
18596
+ const [active, setActive] = React74.useState(/* @__PURE__ */ new Set());
18597
+ const handlePress = React74.useCallback(
18409
18598
  (id) => {
18410
18599
  setActive((prev) => new Set(prev).add(id));
18411
18600
  if (actionEvent) eventBus.emit(`UI:${actionEvent}`, { id, pressed: true });
@@ -18419,7 +18608,7 @@ function ControlGrid({
18419
18608
  },
18420
18609
  [kind, actionEvent, directionEvent, directionEvents, eventBus, onAction, onDirection]
18421
18610
  );
18422
- const handleRelease = React73.useCallback(
18611
+ const handleRelease = React74.useCallback(
18423
18612
  (id) => {
18424
18613
  setActive((prev) => {
18425
18614
  const next = new Set(prev);
@@ -19626,8 +19815,8 @@ var init_Menu = __esm({
19626
19815
  "bottom-end": "bottom-start"
19627
19816
  };
19628
19817
  const effectivePosition = direction === "rtl" ? rtlMirror[position] ?? position : position;
19629
- const triggerChild = React73__default.isValidElement(trigger) ? trigger : /* @__PURE__ */ jsx(Typography, { variant: "small", as: "span", children: trigger });
19630
- const triggerElement = React73__default.cloneElement(
19818
+ const triggerChild = React74__default.isValidElement(trigger) ? trigger : /* @__PURE__ */ jsx(Typography, { variant: "small", as: "span", children: trigger });
19819
+ const triggerElement = React74__default.cloneElement(
19631
19820
  triggerChild,
19632
19821
  {
19633
19822
  ref: triggerRef,
@@ -19722,14 +19911,14 @@ function useDataDnd(args) {
19722
19911
  const isZone = Boolean(dragGroup || accepts || sortable);
19723
19912
  const enabled = isZone || Boolean(dndRoot);
19724
19913
  const eventBus = useEventBus();
19725
- const parentRoot = React73__default.useContext(RootCtx);
19914
+ const parentRoot = React74__default.useContext(RootCtx);
19726
19915
  const isRoot = enabled && parentRoot === null;
19727
- const zoneId = React73__default.useId();
19916
+ const zoneId = React74__default.useId();
19728
19917
  const ownGroup = dragGroup ?? accepts ?? zoneId;
19729
- const [optimisticOrders, setOptimisticOrders] = React73__default.useState(() => /* @__PURE__ */ new Map());
19730
- const optimisticOrdersRef = React73__default.useRef(optimisticOrders);
19918
+ const [optimisticOrders, setOptimisticOrders] = React74__default.useState(() => /* @__PURE__ */ new Map());
19919
+ const optimisticOrdersRef = React74__default.useRef(optimisticOrders);
19731
19920
  optimisticOrdersRef.current = optimisticOrders;
19732
- const clearOptimisticOrder = React73__default.useCallback((group) => {
19921
+ const clearOptimisticOrder = React74__default.useCallback((group) => {
19733
19922
  setOptimisticOrders((prev) => {
19734
19923
  if (!prev.has(group)) return prev;
19735
19924
  const next = new Map(prev);
@@ -19754,7 +19943,7 @@ function useDataDnd(args) {
19754
19943
  const raw = it[dndItemIdField];
19755
19944
  return raw != null ? String(raw) : `__idx_${idx}`;
19756
19945
  }).join("|");
19757
- const itemIds = React73__default.useMemo(
19946
+ const itemIds = React74__default.useMemo(
19758
19947
  () => orderedItems.map((it, idx) => {
19759
19948
  const raw = it[dndItemIdField];
19760
19949
  return raw != null ? String(raw) : `__idx_${idx}`;
@@ -19765,7 +19954,7 @@ function useDataDnd(args) {
19765
19954
  const raw = it[dndItemIdField];
19766
19955
  return raw != null ? String(raw) : `__${idx}`;
19767
19956
  }).join("|");
19768
- React73__default.useEffect(() => {
19957
+ React74__default.useEffect(() => {
19769
19958
  const root = isRoot ? null : parentRoot;
19770
19959
  if (root) {
19771
19960
  root.clearOptimisticOrder(ownGroup);
@@ -19773,20 +19962,20 @@ function useDataDnd(args) {
19773
19962
  clearOptimisticOrder(ownGroup);
19774
19963
  }
19775
19964
  }, [itemsContentSig, ownGroup]);
19776
- const zonesRef = React73__default.useRef(/* @__PURE__ */ new Map());
19777
- const registerZone = React73__default.useCallback((zoneId2, meta2) => {
19965
+ const zonesRef = React74__default.useRef(/* @__PURE__ */ new Map());
19966
+ const registerZone = React74__default.useCallback((zoneId2, meta2) => {
19778
19967
  zonesRef.current.set(zoneId2, meta2);
19779
19968
  }, []);
19780
- const unregisterZone = React73__default.useCallback((zoneId2) => {
19969
+ const unregisterZone = React74__default.useCallback((zoneId2) => {
19781
19970
  zonesRef.current.delete(zoneId2);
19782
19971
  }, []);
19783
- const [activeDrag, setActiveDrag] = React73__default.useState(null);
19784
- const [overZoneGroup, setOverZoneGroup] = React73__default.useState(null);
19785
- const meta = React73__default.useMemo(
19972
+ const [activeDrag, setActiveDrag] = React74__default.useState(null);
19973
+ const [overZoneGroup, setOverZoneGroup] = React74__default.useState(null);
19974
+ const meta = React74__default.useMemo(
19786
19975
  () => ({ group: ownGroup, dropEvent, reorderEvent, positionEvent, itemIds, rawItems: items, idField: dndItemIdField }),
19787
19976
  [ownGroup, dropEvent, reorderEvent, positionEvent, itemIds, items, dndItemIdField]
19788
19977
  );
19789
- React73__default.useEffect(() => {
19978
+ React74__default.useEffect(() => {
19790
19979
  const target = isRoot ? null : parentRoot;
19791
19980
  if (!target) {
19792
19981
  zonesRef.current.set(zoneId, meta);
@@ -19805,7 +19994,7 @@ function useDataDnd(args) {
19805
19994
  }, [parentRoot, isRoot, zoneId, meta]);
19806
19995
  const sensors = useAlmadarDndSensors(true);
19807
19996
  const collisionDetection = almadarDndCollisionDetection;
19808
- const findZoneByItem = React73__default.useCallback(
19997
+ const findZoneByItem = React74__default.useCallback(
19809
19998
  (id) => {
19810
19999
  for (const z of zonesRef.current.values()) {
19811
20000
  if (z.itemIds.includes(id)) return z;
@@ -19814,7 +20003,7 @@ function useDataDnd(args) {
19814
20003
  },
19815
20004
  []
19816
20005
  );
19817
- React73__default.useCallback(
20006
+ React74__default.useCallback(
19818
20007
  (group) => {
19819
20008
  for (const z of zonesRef.current.values()) {
19820
20009
  if (z.group === group) return z;
@@ -19823,7 +20012,7 @@ function useDataDnd(args) {
19823
20012
  },
19824
20013
  []
19825
20014
  );
19826
- const handleDragEnd = React73__default.useCallback(
20015
+ const handleDragEnd = React74__default.useCallback(
19827
20016
  (event) => {
19828
20017
  const { active, over } = event;
19829
20018
  const activeIdStr = String(active.id);
@@ -19914,8 +20103,8 @@ function useDataDnd(args) {
19914
20103
  },
19915
20104
  [eventBus]
19916
20105
  );
19917
- const sortableData = React73__default.useMemo(() => ({ dndGroup: ownGroup }), [ownGroup]);
19918
- const SortableItem = React73__default.useCallback(
20106
+ const sortableData = React74__default.useMemo(() => ({ dndGroup: ownGroup }), [ownGroup]);
20107
+ const SortableItem = React74__default.useCallback(
19919
20108
  ({ id, children }) => {
19920
20109
  const {
19921
20110
  attributes,
@@ -19955,7 +20144,7 @@ function useDataDnd(args) {
19955
20144
  id: droppableId,
19956
20145
  data: sortableData
19957
20146
  });
19958
- const ctx = React73__default.useContext(RootCtx);
20147
+ const ctx = React74__default.useContext(RootCtx);
19959
20148
  const activeDrag2 = ctx?.activeDrag ?? null;
19960
20149
  const overZoneGroup2 = ctx?.overZoneGroup ?? null;
19961
20150
  const isThisZoneOver = overZoneGroup2 === ownGroup;
@@ -19970,7 +20159,7 @@ function useDataDnd(args) {
19970
20159
  showForeignPlaceholder,
19971
20160
  ctxAvailable: ctx != null
19972
20161
  });
19973
- React73__default.useEffect(() => {
20162
+ React74__default.useEffect(() => {
19974
20163
  dndLog.info("dropzone:isOver:change", { droppableId, group: ownGroup, isOver, isThisZoneOver, showForeignPlaceholder, activeDragSourceGroup: activeDrag2?.sourceGroup ?? null });
19975
20164
  }, [droppableId, isOver, isThisZoneOver, showForeignPlaceholder]);
19976
20165
  return /* @__PURE__ */ jsx(
@@ -19984,11 +20173,11 @@ function useDataDnd(args) {
19984
20173
  }
19985
20174
  );
19986
20175
  };
19987
- const rootContextValue = React73__default.useMemo(
20176
+ const rootContextValue = React74__default.useMemo(
19988
20177
  () => ({ registerZone, unregisterZone, activeDrag, overZoneGroup, optimisticOrders, clearOptimisticOrder }),
19989
20178
  [registerZone, unregisterZone, activeDrag, overZoneGroup, optimisticOrders, clearOptimisticOrder]
19990
20179
  );
19991
- const handleDragStart = React73__default.useCallback((event) => {
20180
+ const handleDragStart = React74__default.useCallback((event) => {
19992
20181
  const sourceZone = findZoneByItem(event.active.id);
19993
20182
  const rect = event.active.rect.current.initial;
19994
20183
  const height = rect?.height && rect.height > 0 ? rect.height : 64;
@@ -20007,7 +20196,7 @@ function useDataDnd(args) {
20007
20196
  isRoot
20008
20197
  });
20009
20198
  }, [findZoneByItem, isRoot, zoneId]);
20010
- const handleDragOver = React73__default.useCallback((event) => {
20199
+ const handleDragOver = React74__default.useCallback((event) => {
20011
20200
  const { active, over } = event;
20012
20201
  const overData = over?.data?.current;
20013
20202
  const overGroup = overData?.dndGroup ?? null;
@@ -20077,7 +20266,7 @@ function useDataDnd(args) {
20077
20266
  return next;
20078
20267
  });
20079
20268
  }, []);
20080
- const handleDragCancel = React73__default.useCallback((event) => {
20269
+ const handleDragCancel = React74__default.useCallback((event) => {
20081
20270
  setActiveDrag(null);
20082
20271
  setOverZoneGroup(null);
20083
20272
  dndLog.warn("dragCancel", {
@@ -20085,12 +20274,12 @@ function useDataDnd(args) {
20085
20274
  reason: "dnd-kit cancelled the drag (escape key, pointer interrupted, or external)"
20086
20275
  });
20087
20276
  }, []);
20088
- const handleDragEndWithCleanup = React73__default.useCallback((event) => {
20277
+ const handleDragEndWithCleanup = React74__default.useCallback((event) => {
20089
20278
  handleDragEnd(event);
20090
20279
  setActiveDrag(null);
20091
20280
  setOverZoneGroup(null);
20092
20281
  }, [handleDragEnd]);
20093
- const wrapContainer = React73__default.useCallback(
20282
+ const wrapContainer = React74__default.useCallback(
20094
20283
  (children) => {
20095
20284
  if (!enabled) return children;
20096
20285
  const strategy = layout === "grid" ? rectSortingStrategy : verticalListSortingStrategy;
@@ -20144,7 +20333,7 @@ var init_useDataDnd = __esm({
20144
20333
  init_useAlmadarDndCollision();
20145
20334
  init_Box();
20146
20335
  dndLog = createLogger("almadar:ui:dnd");
20147
- RootCtx = React73__default.createContext(null);
20336
+ RootCtx = React74__default.createContext(null);
20148
20337
  }
20149
20338
  });
20150
20339
  function renderIconInput(icon, props) {
@@ -20341,7 +20530,7 @@ function DataGrid({
20341
20530
  /* @__PURE__ */ jsx(
20342
20531
  Box,
20343
20532
  {
20344
- className: cn("grid", gapStyles5[gap], scrollX ? "grid-flow-col overflow-x-auto" : colsClass, lookStyles4[look], className),
20533
+ className: cn("grid", gapStyles5[gap], scrollX ? "grid-flow-col overflow-x-auto" : colsClass, lookStyles5[look], className),
20345
20534
  style: scrollX ? { gridAutoFlow: "column", gridAutoColumns: `minmax(${minCardWidth}px, 1fr)` } : gridTemplateColumns ? { gridTemplateColumns } : void 0,
20346
20535
  children: data.map((item, index) => {
20347
20536
  const itemData = item;
@@ -20536,7 +20725,7 @@ function DataGrid({
20536
20725
  ] })
20537
20726
  );
20538
20727
  }
20539
- var dataGridLog, BADGE_VARIANTS, gapStyles5, lookStyles4;
20728
+ var dataGridLog, BADGE_VARIANTS, gapStyles5, lookStyles5;
20540
20729
  var init_DataGrid = __esm({
20541
20730
  "components/core/molecules/DataGrid.tsx"() {
20542
20731
  "use client";
@@ -20571,7 +20760,7 @@ var init_DataGrid = __esm({
20571
20760
  lg: "gap-6",
20572
20761
  xl: "gap-8"
20573
20762
  };
20574
- lookStyles4 = {
20763
+ lookStyles5 = {
20575
20764
  dense: "gap-2 [&>*]:p-card-sm",
20576
20765
  spacious: "gap-8 [&>*]:p-card-lg",
20577
20766
  striped: "[&>*:nth-child(even)]:bg-muted/30",
@@ -20671,7 +20860,7 @@ function DataList({
20671
20860
  }) {
20672
20861
  const eventBus = useEventBus();
20673
20862
  const { t } = useTranslate();
20674
- const [visibleCount, setVisibleCount] = React73__default.useState(pageSize || Infinity);
20863
+ const [visibleCount, setVisibleCount] = React74__default.useState(pageSize || Infinity);
20675
20864
  const fieldDefs = fields ?? columns ?? [];
20676
20865
  const allDataRaw = Array.isArray(entity) ? entity : entity ? [entity] : [];
20677
20866
  const dnd = useDataDnd({
@@ -20690,7 +20879,7 @@ function DataList({
20690
20879
  const data = pageSize > 0 ? allData.slice(0, visibleCount) : allData;
20691
20880
  const hasMoreLocal = pageSize > 0 && visibleCount < allData.length;
20692
20881
  const hasRenderProp = typeof children === "function";
20693
- React73__default.useEffect(() => {
20882
+ React74__default.useEffect(() => {
20694
20883
  const renderItemTypeOf = typeof schemaRenderItem;
20695
20884
  const childrenTypeOf = typeof children;
20696
20885
  if (data.length > 0 && !hasRenderProp) {
@@ -20794,7 +20983,7 @@ function DataList({
20794
20983
  const items2 = [...data];
20795
20984
  const groups2 = groupBy ? groupData(items2, groupBy) : [{ label: "", items: items2 }];
20796
20985
  const contentField = titleField?.name ?? fieldDefs[0]?.name ?? "";
20797
- return /* @__PURE__ */ jsx(VStack, { gap: "sm", className: cn("py-2", className), children: groups2.map((group, gi) => /* @__PURE__ */ jsxs(React73__default.Fragment, { children: [
20986
+ return /* @__PURE__ */ jsx(VStack, { gap: "sm", className: cn("py-2", className), children: groups2.map((group, gi) => /* @__PURE__ */ jsxs(React74__default.Fragment, { children: [
20798
20987
  group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: "my-2" }),
20799
20988
  group.items.map((itemData, index) => {
20800
20989
  const id = itemData.id || `${gi}-${index}`;
@@ -20935,7 +21124,7 @@ function DataList({
20935
21124
  className
20936
21125
  ),
20937
21126
  children: [
20938
- groups.map((group, gi) => /* @__PURE__ */ jsxs(React73__default.Fragment, { children: [
21127
+ groups.map((group, gi) => /* @__PURE__ */ jsxs(React74__default.Fragment, { children: [
20939
21128
  group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-4" : "mt-0" }),
20940
21129
  group.items.map(
20941
21130
  (itemData, index) => renderItem(itemData, index, gi === groups.length - 1 && index === group.items.length - 1)
@@ -21042,8 +21231,8 @@ function ScalarControl({
21042
21231
  }
21043
21232
  const numeric = typeof value === "number";
21044
21233
  const initial = value === null ? "" : String(value);
21045
- const [draft, setDraft] = React73__default.useState(initial);
21046
- React73__default.useEffect(() => setDraft(initial), [initial]);
21234
+ const [draft, setDraft] = React74__default.useState(initial);
21235
+ React74__default.useEffect(() => setDraft(initial), [initial]);
21047
21236
  const commit = () => {
21048
21237
  if (numeric) {
21049
21238
  const n = draft.trim() === "" ? 0 : Number(draft);
@@ -21111,8 +21300,8 @@ function Row({
21111
21300
  onRemove,
21112
21301
  readonly
21113
21302
  }) {
21114
- const [keyDraft, setKeyDraft] = React73__default.useState(rowKey);
21115
- React73__default.useEffect(() => setKeyDraft(rowKey), [rowKey]);
21303
+ const [keyDraft, setKeyDraft] = React74__default.useState(rowKey);
21304
+ React74__default.useEffect(() => setKeyDraft(rowKey), [rowKey]);
21116
21305
  const container = isObj(value) || isArr(value);
21117
21306
  return /* @__PURE__ */ jsxs(VStack, { gap: "none", className: "group w-max min-w-full", children: [
21118
21307
  /* @__PURE__ */ jsxs(HStack, { gap: "xs", align: "center", className: "py-0.5 w-max", children: [
@@ -21155,7 +21344,7 @@ function ContainerNode({
21155
21344
  depth,
21156
21345
  readonly
21157
21346
  }) {
21158
- const [open, setOpen] = React73__default.useState(depth < 2);
21347
+ const [open, setOpen] = React74__default.useState(depth < 2);
21159
21348
  const array = isArr(value);
21160
21349
  const entries = array ? value.map((v, i) => [String(i), v]) : Object.entries(value);
21161
21350
  const setObjValue = (key, next) => {
@@ -21297,7 +21486,7 @@ var init_FormSection = __esm({
21297
21486
  columns = 1,
21298
21487
  className
21299
21488
  }) => {
21300
- const [collapsed, setCollapsed] = React73__default.useState(defaultCollapsed);
21489
+ const [collapsed, setCollapsed] = React74__default.useState(defaultCollapsed);
21301
21490
  const { t } = useTranslate();
21302
21491
  const eventBus = useEventBus();
21303
21492
  const gridClass = {
@@ -21305,7 +21494,7 @@ var init_FormSection = __esm({
21305
21494
  2: "grid-cols-1 md:grid-cols-2",
21306
21495
  3: "grid-cols-1 md:grid-cols-2 lg:grid-cols-3"
21307
21496
  }[columns];
21308
- React73__default.useCallback(() => {
21497
+ React74__default.useCallback(() => {
21309
21498
  if (collapsible) {
21310
21499
  setCollapsed((prev) => !prev);
21311
21500
  eventBus.emit("UI:TOGGLE_COLLAPSE", { collapsed: !collapsed });
@@ -21713,8 +21902,8 @@ function TextLikeControl({
21713
21902
  onCommit
21714
21903
  }) {
21715
21904
  const initial = value === void 0 || value === null ? "" : String(value);
21716
- const [draft, setDraft] = React73__default.useState(initial);
21717
- React73__default.useEffect(() => setDraft(initial), [initial]);
21905
+ const [draft, setDraft] = React74__default.useState(initial);
21906
+ React74__default.useEffect(() => setDraft(initial), [initial]);
21718
21907
  const commit = () => {
21719
21908
  if (numeric) {
21720
21909
  const n = draft.trim() === "" ? 0 : Number(draft);
@@ -21899,14 +22088,14 @@ var init_NodeSlotEditor = __esm({
21899
22088
  isObj2 = (v) => v !== null && v !== void 0 && typeof v === "object" && !Array.isArray(v);
21900
22089
  NodeSlotEditor = ({ value, onChange, className }) => {
21901
22090
  const { type, props, wasArray } = normalize(value);
21902
- const patterns = React73__default.useMemo(() => {
22091
+ const patterns = React74__default.useMemo(() => {
21903
22092
  try {
21904
22093
  return [...getKnownPatterns()].sort();
21905
22094
  } catch {
21906
22095
  return [];
21907
22096
  }
21908
22097
  }, []);
21909
- const options = React73__default.useMemo(
22098
+ const options = React74__default.useMemo(
21910
22099
  () => [{ value: "", label: "\u2014 none \u2014" }, ...patterns.map((p) => ({ value: p, label: p }))],
21911
22100
  [patterns]
21912
22101
  );
@@ -21918,7 +22107,7 @@ var init_NodeSlotEditor = __esm({
21918
22107
  const pattern = { type: nextType, ...nextProps };
21919
22108
  onChange(wasArray || value === void 0 ? [pattern] : pattern);
21920
22109
  };
21921
- const schemaEntries = React73__default.useMemo(() => {
22110
+ const schemaEntries = React74__default.useMemo(() => {
21922
22111
  if (!type) return [];
21923
22112
  const def = getPatternDefinition(type);
21924
22113
  if (!def?.propsSchema) return [];
@@ -22120,129 +22309,6 @@ var init_FormField = __esm({
22120
22309
  FormField.displayName = "FormField";
22121
22310
  }
22122
22311
  });
22123
- function useSafeEventBus3() {
22124
- try {
22125
- return useEventBus();
22126
- } catch {
22127
- return { emit: () => {
22128
- }, on: () => () => {
22129
- }, once: () => {
22130
- } };
22131
- }
22132
- }
22133
- var log6, lookStyles5, ButtonGroup;
22134
- var init_ButtonGroup = __esm({
22135
- "components/core/molecules/ButtonGroup.tsx"() {
22136
- "use client";
22137
- init_cn();
22138
- init_atoms();
22139
- init_useEventBus();
22140
- log6 = createLogger("almadar:ui:button-group");
22141
- lookStyles5 = {
22142
- "right-aligned-buttons": "",
22143
- "floating-bar": "fixed bottom-section left-1/2 -translate-x-1/2 shadow-elevation-toast bg-card p-card-sm rounded-container",
22144
- "inline-row": "gap-2 inline-flex",
22145
- "dropdown-menu": "[&>button:not(:first-child)]:hidden",
22146
- "command-palette-trigger": "[&>button:not(:first-child)]:hidden"
22147
- };
22148
- ButtonGroup = ({
22149
- children,
22150
- primary,
22151
- secondary,
22152
- variant = "default",
22153
- orientation = "horizontal",
22154
- className,
22155
- // Filter-group pattern props (entity and filters are used for schema-driven filtering)
22156
- entity: _entity,
22157
- filters,
22158
- look = "right-aligned-buttons"
22159
- }) => {
22160
- const eventBus = useSafeEventBus3();
22161
- const variantClasses2 = {
22162
- default: "gap-0",
22163
- 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",
22164
- 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"
22165
- };
22166
- const orientationClasses = {
22167
- horizontal: "flex-row",
22168
- 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"
22169
- };
22170
- const handleActionClick = (action) => {
22171
- if (action.event) {
22172
- eventBus.emit("UI:DISPATCH", { event: action.event });
22173
- }
22174
- if (action.navigatesTo) {
22175
- eventBus.emit("UI:NAVIGATE", { url: action.navigatesTo });
22176
- }
22177
- };
22178
- const renderFormActions = () => {
22179
- const buttons = [];
22180
- if (secondary) {
22181
- secondary.forEach((action, index) => {
22182
- buttons.push(
22183
- /* @__PURE__ */ jsx(
22184
- Button,
22185
- {
22186
- type: action.actionType === "submit" ? "submit" : "button",
22187
- variant: action.variant || "ghost",
22188
- onClick: () => handleActionClick(action),
22189
- children: action.label
22190
- },
22191
- `secondary-${index}`
22192
- )
22193
- );
22194
- });
22195
- }
22196
- if (primary) {
22197
- const isSubmit = primary.actionType === "submit";
22198
- buttons.push(
22199
- /* @__PURE__ */ jsx(
22200
- Button,
22201
- {
22202
- type: isSubmit ? "submit" : "button",
22203
- variant: primary.variant || "primary",
22204
- onClick: () => handleActionClick(primary),
22205
- "data-testid": isSubmit ? "form-submit" : void 0,
22206
- children: primary.label
22207
- },
22208
- "primary"
22209
- )
22210
- );
22211
- }
22212
- return buttons;
22213
- };
22214
- const renderFilters = () => {
22215
- if (!filters || filters.length === 0) return null;
22216
- return filters.map((filter, index) => /* @__PURE__ */ jsx(
22217
- Button,
22218
- {
22219
- variant: "ghost",
22220
- onClick: () => {
22221
- log6.debug("Filter clicked", { field: filter.field });
22222
- },
22223
- children: filter.label
22224
- },
22225
- `filter-${filter.field}-${index}`
22226
- ));
22227
- };
22228
- return /* @__PURE__ */ jsx(
22229
- "div",
22230
- {
22231
- className: cn(
22232
- "inline-flex gap-2",
22233
- variantClasses2[variant],
22234
- orientationClasses[orientation],
22235
- lookStyles5[look],
22236
- className
22237
- ),
22238
- role: "group",
22239
- children: children || renderFilters() || renderFormActions()
22240
- }
22241
- );
22242
- };
22243
- ButtonGroup.displayName = "ButtonGroup";
22244
- }
22245
- });
22246
22312
  function getOrCreateStore(query) {
22247
22313
  if (!queryStores.has(query)) {
22248
22314
  queryStores.set(query, {
@@ -22427,7 +22493,7 @@ var init_FilterGroup = __esm({
22427
22493
  type: "button",
22428
22494
  onClick: () => handleFilterSelect(filter.field, null),
22429
22495
  className: cn(
22430
- "px-3 py-1.5 text-sm font-medium transition-all duration-[var(--transition-fast)]",
22496
+ "px-3 py-1.5 text-sm font-medium transition-all duration-fast",
22431
22497
  !selectedValues[filter.field] ? "bg-primary text-primary-foreground" : "bg-card text-muted-foreground hover:bg-muted"
22432
22498
  ),
22433
22499
  children: t("filterGroup.all")
@@ -22439,7 +22505,7 @@ var init_FilterGroup = __esm({
22439
22505
  type: "button",
22440
22506
  onClick: () => handleFilterSelect(filter.field, option),
22441
22507
  className: cn(
22442
- "px-3 py-1.5 text-sm font-medium transition-all duration-[var(--transition-fast)]",
22508
+ "px-3 py-1.5 text-sm font-medium transition-all duration-fast",
22443
22509
  "border-l-[length:var(--border-width)] border-border",
22444
22510
  selectedValues[filter.field] === option ? "bg-primary text-primary-foreground" : "bg-card text-muted-foreground hover:bg-muted"
22445
22511
  ),
@@ -22820,7 +22886,7 @@ var init_Flex = __esm({
22820
22886
  flexStyle.flexBasis = typeof basis === "number" ? `${basis}px` : basis;
22821
22887
  }
22822
22888
  }
22823
- return React73__default.createElement(Component, {
22889
+ return React74__default.createElement(Component, {
22824
22890
  className: cn(
22825
22891
  inline ? "inline-flex" : "flex",
22826
22892
  directionStyles[direction],
@@ -22939,7 +23005,7 @@ var init_Grid = __esm({
22939
23005
  as: Component = "div"
22940
23006
  }) => {
22941
23007
  const mergedStyle = rows2 ? { gridTemplateRows: `repeat(${rows2}, minmax(0, 1fr))`, ...style } : style;
22942
- return React73__default.createElement(
23008
+ return React74__default.createElement(
22943
23009
  Component,
22944
23010
  {
22945
23011
  className: cn(
@@ -23024,6 +23090,15 @@ var init_InputGroup = __esm({
23024
23090
  InputGroup.displayName = "InputGroup";
23025
23091
  }
23026
23092
  });
23093
+ var PageTransition;
23094
+ var init_PageTransition = __esm({
23095
+ "components/core/molecules/PageTransition.tsx"() {
23096
+ "use client";
23097
+ init_cn();
23098
+ PageTransition = ({ locationKey, children, className }) => /* @__PURE__ */ jsx("div", { className: cn("animate-page-in", className), children }, locationKey);
23099
+ PageTransition.displayName = "PageTransition";
23100
+ }
23101
+ });
23027
23102
  function computePopoverStyle(position, triggerRect, popoverWidth) {
23028
23103
  if (position === "left" || position === "right") {
23029
23104
  return {
@@ -23050,6 +23125,7 @@ var init_Popover = __esm({
23050
23125
  "components/core/molecules/Popover.tsx"() {
23051
23126
  "use client";
23052
23127
  init_Typography();
23128
+ init_Presence();
23053
23129
  init_cn();
23054
23130
  init_useTapReveal();
23055
23131
  arrowClasses = {
@@ -23073,6 +23149,7 @@ var init_Popover = __esm({
23073
23149
  const [popoverWidth, setPopoverWidth] = useState(0);
23074
23150
  const triggerRef = useRef(null);
23075
23151
  const popoverRef = useRef(null);
23152
+ const { mounted, className: panelAnim, onAnimationEnd } = usePresence(isOpen, { animation: "popover" });
23076
23153
  const updatePosition = () => {
23077
23154
  if (triggerRef.current) {
23078
23155
  setTriggerRect(triggerRef.current.getBoundingClientRect());
@@ -23098,10 +23175,11 @@ var init_Popover = __esm({
23098
23175
  useEffect(() => {
23099
23176
  if (isOpen) {
23100
23177
  updatePosition();
23101
- } else {
23102
- setPopoverWidth(0);
23103
23178
  }
23104
23179
  }, [isOpen]);
23180
+ useEffect(() => {
23181
+ if (!mounted) setPopoverWidth(0);
23182
+ }, [mounted]);
23105
23183
  useLayoutEffect(() => {
23106
23184
  if (isOpen && popoverRef.current) {
23107
23185
  const measured = popoverRef.current.offsetWidth;
@@ -23135,9 +23213,9 @@ var init_Popover = __esm({
23135
23213
  onMouseLeave: handleClose,
23136
23214
  onPointerDown: tapTriggerProps.onPointerDown
23137
23215
  };
23138
- const childElement = React73__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
23216
+ const childElement = React74__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
23139
23217
  const childPointerDown = childElement.props.onPointerDown;
23140
- const triggerElement = React73__default.cloneElement(
23218
+ const triggerElement = React74__default.cloneElement(
23141
23219
  childElement,
23142
23220
  {
23143
23221
  ref: triggerRef,
@@ -23150,13 +23228,14 @@ var init_Popover = __esm({
23150
23228
  } : void 0
23151
23229
  }
23152
23230
  );
23153
- const panel = isOpen && triggerRect ? /* @__PURE__ */ jsxs(
23231
+ const panel = mounted && triggerRect ? /* @__PURE__ */ jsxs(
23154
23232
  "div",
23155
23233
  {
23156
23234
  ref: popoverRef,
23157
23235
  className: cn(
23158
23236
  "fixed z-50 p-4",
23159
23237
  "bg-card border-2 border-border shadow-elevation-popover",
23238
+ panelAnim,
23160
23239
  className
23161
23240
  ),
23162
23241
  style: {
@@ -23164,6 +23243,7 @@ var init_Popover = __esm({
23164
23243
  ...popoverWidth === 0 ? { visibility: "hidden" } : void 0
23165
23244
  },
23166
23245
  role: "dialog",
23246
+ onAnimationEnd,
23167
23247
  onMouseEnter: trigger === "hover" ? handleOpen : void 0,
23168
23248
  onMouseLeave: trigger === "hover" ? handleClose : void 0,
23169
23249
  children: [
@@ -23320,7 +23400,7 @@ var init_Coachmark = __esm({
23320
23400
  role: "dialog",
23321
23401
  "aria-label": title,
23322
23402
  className: cn(
23323
- "fixed z-50 max-w-xs w-72 transition-opacity duration-150",
23403
+ "fixed z-50 max-w-xs w-72 transition-opacity duration-fast",
23324
23404
  centered || pos ? "opacity-100" : "opacity-0",
23325
23405
  className
23326
23406
  ),
@@ -23827,6 +23907,7 @@ var init_SidePanel = __esm({
23827
23907
  init_Box();
23828
23908
  init_Button();
23829
23909
  init_Typography();
23910
+ init_Presence();
23830
23911
  init_cn();
23831
23912
  init_useEventBus();
23832
23913
  SidePanel = ({
@@ -23846,15 +23927,17 @@ var init_SidePanel = __esm({
23846
23927
  if (closeEvent) eventBus.emit(`UI:${closeEvent}`, {});
23847
23928
  onClose();
23848
23929
  };
23849
- if (!isOpen) return null;
23930
+ const { mounted, className: panelAnim, onAnimationEnd } = usePresence(isOpen, { animation: "drawer" });
23931
+ const drawerSign = position === "right" ? 1 : -1;
23932
+ if (!mounted) return null;
23850
23933
  return /* @__PURE__ */ jsxs(Fragment, { children: [
23851
- showOverlay && /* @__PURE__ */ jsx(
23934
+ showOverlay && /* @__PURE__ */ jsx(Presence, { show: isOpen, animation: "overlay", children: /* @__PURE__ */ jsx(
23852
23935
  Box,
23853
23936
  {
23854
23937
  className: "fixed inset-0 bg-white/80 backdrop-blur-sm z-40 lg:hidden",
23855
23938
  onClick: handleClose
23856
23939
  }
23857
- ),
23940
+ ) }),
23858
23941
  /* @__PURE__ */ jsxs(
23859
23942
  Aside,
23860
23943
  {
@@ -23864,11 +23947,13 @@ var init_SidePanel = __esm({
23864
23947
  "border-l-2 border-border",
23865
23948
  position === "left" && "border-l-0 border-r-2",
23866
23949
  "flex flex-col",
23867
- "transition-transform duration-normal ease-standard",
23950
+ panelAnim,
23868
23951
  width,
23869
23952
  position === "right" ? "right-0" : "left-0",
23870
23953
  className
23871
23954
  ),
23955
+ style: { "--motion-drawer-sign": drawerSign },
23956
+ onAnimationEnd,
23872
23957
  children: [
23873
23958
  /* @__PURE__ */ jsxs(Box, { className: "flex items-center justify-between p-4 border-b-2 border-border sticky top-0 bg-card z-10", children: [
23874
23959
  /* @__PURE__ */ jsx(Typography, { variant: "h6", children: title }),
@@ -23989,9 +24074,9 @@ var init_Tooltip = __esm({
23989
24074
  if (hideTimeoutRef.current) clearTimeout(hideTimeoutRef.current);
23990
24075
  };
23991
24076
  }, []);
23992
- const triggerElement = React73__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
24077
+ const triggerElement = React74__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
23993
24078
  const childPointerDown = triggerElement.props.onPointerDown;
23994
- const trigger = React73__default.cloneElement(triggerElement, {
24079
+ const trigger = React74__default.cloneElement(triggerElement, {
23995
24080
  ref: triggerRef,
23996
24081
  onMouseEnter: handleMouseEnter,
23997
24082
  onMouseLeave: handleMouseLeave,
@@ -24081,7 +24166,7 @@ var init_WizardProgress = __esm({
24081
24166
  children: /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: normalizedSteps.map((step, index) => {
24082
24167
  const isActive = index === currentStep;
24083
24168
  const isCompleted = index < currentStep;
24084
- return /* @__PURE__ */ jsxs(React73__default.Fragment, { children: [
24169
+ return /* @__PURE__ */ jsxs(React74__default.Fragment, { children: [
24085
24170
  /* @__PURE__ */ jsx(
24086
24171
  "button",
24087
24172
  {
@@ -24632,7 +24717,7 @@ var init_FormSectionHeader = __esm({
24632
24717
  name: "chevron-down",
24633
24718
  size: "sm",
24634
24719
  className: cn(
24635
- "text-muted-foreground transition-transform duration-200 shrink-0",
24720
+ "text-muted-foreground transition-transform duration-fast shrink-0",
24636
24721
  isCollapsed && "-rotate-90"
24637
24722
  )
24638
24723
  }
@@ -25753,17 +25838,18 @@ function GameHud({
25753
25838
  const mid = Math.ceil(stats.length / 2);
25754
25839
  const leftStats = stats.slice(0, mid);
25755
25840
  const rightStats = stats.slice(mid);
25756
- const isTop = position === "top";
25757
25841
  return /* @__PURE__ */ jsxs(
25758
- Box,
25842
+ Card,
25759
25843
  {
25844
+ variant: "bordered",
25845
+ padding: "none",
25760
25846
  className: cn(
25761
- "flex items-center justify-between w-full",
25847
+ "flex items-center justify-between w-full rounded-none bg-card",
25762
25848
  "px-4 py-2 gap-4",
25763
- !transparent && (isTop ? "border-b border-border/40 bg-surface/90 backdrop-blur-sm" : "border-t border-border/40 bg-surface/90 backdrop-blur-sm"),
25764
- transparent && (isTop ? "border-b border-white/10 bg-black/40 backdrop-blur-sm" : "border-t border-white/10 bg-black/40 backdrop-blur-sm"),
25849
+ transparent && "backdrop-blur-sm",
25765
25850
  className
25766
25851
  ),
25852
+ style: transparent ? { backgroundColor: "color-mix(in srgb, var(--color-card) 40%, transparent)" } : void 0,
25767
25853
  children: [
25768
25854
  /* @__PURE__ */ jsx(Box, { className: "flex items-center gap-3 flex-shrink-0", children: leftStats.map((stat, i) => /* @__PURE__ */ jsx(StatBadge, { ...stat, size }, i)) }),
25769
25855
  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)) })
@@ -25772,14 +25858,16 @@ function GameHud({
25772
25858
  );
25773
25859
  }
25774
25860
  return /* @__PURE__ */ jsx(
25775
- Box,
25861
+ Card,
25776
25862
  {
25777
- position: "relative",
25863
+ variant: "bordered",
25864
+ padding: "sm",
25778
25865
  className: cn(
25779
- "z-10 flex items-center gap-4 px-4 py-2",
25780
- transparent ? "bg-black/30 backdrop-blur-sm" : "bg-surface/90 backdrop-blur-sm",
25866
+ "z-10 relative flex items-center gap-4 bg-card",
25867
+ transparent && "backdrop-blur-sm",
25781
25868
  className
25782
25869
  ),
25870
+ style: transparent ? { backgroundColor: "color-mix(in srgb, var(--color-card) 30%, transparent)" } : void 0,
25783
25871
  children: stats.map((stat, i) => /* @__PURE__ */ jsx(StatBadge, { ...stat, size }, i))
25784
25872
  }
25785
25873
  );
@@ -25789,6 +25877,7 @@ var init_GameHud = __esm({
25789
25877
  "components/game/molecules/GameHud.tsx"() {
25790
25878
  init_cn();
25791
25879
  init_Box();
25880
+ init_Card();
25792
25881
  init_StatBadge();
25793
25882
  positionMap = {
25794
25883
  corners: "inset-0 pointer-events-none"
@@ -25814,7 +25903,7 @@ function GameMenu({
25814
25903
  }) {
25815
25904
  const resolvedOptions = (options?.length ? options : void 0) ?? (menuItems?.length ? menuItems : void 0) ?? DEFAULT_MENU_OPTIONS;
25816
25905
  const eventBus = useEventBus();
25817
- const handleOptionClick = React73.useCallback(
25906
+ const handleOptionClick = React74.useCallback(
25818
25907
  (option) => {
25819
25908
  if (option.event) {
25820
25909
  eventBus.emit(`UI:${option.event}`, { option });
@@ -25833,39 +25922,48 @@ function GameMenu({
25833
25922
  {
25834
25923
  className: cn(
25835
25924
  "min-h-screen w-full flex flex-col items-center justify-center p-8",
25925
+ !background && "bg-background",
25836
25926
  className
25837
25927
  ),
25838
- style: {
25839
- background: background ?? "linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f0e17 100%)"
25840
- },
25928
+ style: background ? { background } : void 0,
25841
25929
  children: [
25842
- /* @__PURE__ */ jsxs(Box, { className: "text-center mb-12 animate-fade-in", children: [
25843
- logo && /* @__PURE__ */ jsx(GameIcon, { assetUrl: logo, icon: "image", size: 96, alt: title, className: "h-24 w-auto mx-auto mb-6 drop-shadow-2xl" }),
25844
- /* @__PURE__ */ jsx(
25845
- Typography,
25846
- {
25847
- variant: "h1",
25848
- className: "text-5xl md:text-7xl font-bold text-[var(--color-foreground)] tracking-tight",
25849
- style: {
25850
- textShadow: "0 4px 12px rgba(0,0,0,0.5)"
25851
- },
25852
- children: title
25853
- }
25854
- ),
25855
- subtitle && /* @__PURE__ */ jsx(Typography, { variant: "body", className: "mt-2 text-lg text-muted-foreground tracking-widest uppercase", children: subtitle })
25856
- ] }),
25857
- /* @__PURE__ */ jsx(Box, { className: "flex flex-col gap-4 w-full max-w-md", children: resolvedOptions.map((option, index) => /* @__PURE__ */ jsx(
25858
- ChoiceButton,
25930
+ /* @__PURE__ */ jsxs(
25931
+ Card,
25859
25932
  {
25860
- text: option.label,
25861
- index: index + 1,
25862
- disabled: option.disabled,
25863
- onClick: () => handleOptionClick(option),
25864
- className: "text-lg py-4 px-8"
25865
- },
25866
- index
25867
- )) }),
25868
- /* @__PURE__ */ jsxs(Box, { position: "absolute", className: "inset-0 pointer-events-none overflow-hidden", children: [
25933
+ variant: "bordered",
25934
+ padding: "lg",
25935
+ className: "bg-card flex flex-col items-center max-w-md w-full",
25936
+ children: [
25937
+ /* @__PURE__ */ jsxs(Box, { className: "text-center mb-8 animate-fade-in", children: [
25938
+ logo && /* @__PURE__ */ jsx(GameIcon, { assetUrl: logo, icon: "image", size: 96, alt: title, className: "h-24 w-auto mx-auto mb-6 drop-shadow-2xl" }),
25939
+ /* @__PURE__ */ jsx(
25940
+ Typography,
25941
+ {
25942
+ variant: "h1",
25943
+ className: "text-4xl md:text-5xl font-bold text-foreground tracking-tight",
25944
+ style: {
25945
+ textShadow: "0 4px 12px rgba(0,0,0,0.5)"
25946
+ },
25947
+ children: title
25948
+ }
25949
+ ),
25950
+ subtitle && /* @__PURE__ */ jsx(Typography, { variant: "body", className: "mt-2 text-lg text-muted-foreground tracking-widest uppercase", children: subtitle })
25951
+ ] }),
25952
+ /* @__PURE__ */ jsx(Box, { className: "flex flex-col gap-4 w-full", children: resolvedOptions.map((option, index) => /* @__PURE__ */ jsx(
25953
+ ChoiceButton,
25954
+ {
25955
+ text: option.label,
25956
+ index: index + 1,
25957
+ disabled: option.disabled,
25958
+ onClick: () => handleOptionClick(option),
25959
+ className: "text-lg py-4 px-8"
25960
+ },
25961
+ index
25962
+ )) })
25963
+ ]
25964
+ }
25965
+ ),
25966
+ /* @__PURE__ */ jsxs(Box, { position: "absolute", className: "inset-0 pointer-events-none overflow-hidden -z-10", children: [
25869
25967
  /* @__PURE__ */ jsx(Box, { position: "absolute", className: "top-1/4 left-1/4 w-64 h-64 bg-info/10 rounded-container blur-3xl" }),
25870
25968
  /* @__PURE__ */ jsx(Box, { position: "absolute", className: "bottom-1/4 right-1/4 w-96 h-96 bg-accent/10 rounded-container blur-3xl" })
25871
25969
  ] })
@@ -25880,6 +25978,7 @@ var init_GameMenu = __esm({
25880
25978
  init_cn();
25881
25979
  init_useEventBus();
25882
25980
  init_Box();
25981
+ init_Card();
25883
25982
  init_Typography();
25884
25983
  init_GameIcon();
25885
25984
  init_ChoiceButton();
@@ -26040,7 +26139,7 @@ function StateGraph({
26040
26139
  }) {
26041
26140
  const eventBus = useEventBus();
26042
26141
  const nodes = states ?? [];
26043
- const positions = React73.useMemo(() => layoutStates(nodes, width, height), [nodes, width, height]);
26142
+ const positions = React74.useMemo(() => layoutStates(nodes, width, height), [nodes, width, height]);
26044
26143
  return /* @__PURE__ */ jsxs(
26045
26144
  Box,
26046
26145
  {
@@ -26577,7 +26676,7 @@ function LinearView({
26577
26676
  /* @__PURE__ */ jsx(HStack, { className: "flex-wrap items-center", gap: "xs", children: trait.states.map((state, i) => {
26578
26677
  const isDone = i < currentIdx;
26579
26678
  const isCurrent = i === currentIdx;
26580
- return /* @__PURE__ */ jsxs(React73__default.Fragment, { children: [
26679
+ return /* @__PURE__ */ jsxs(React74__default.Fragment, { children: [
26581
26680
  i > 0 && /* @__PURE__ */ jsx(
26582
26681
  Typography,
26583
26682
  {
@@ -27210,7 +27309,7 @@ function SequenceBar({
27210
27309
  else onSlotRemove?.(index);
27211
27310
  }, [emit, slotRemoveEvent, onSlotRemove, playing]);
27212
27311
  const paddedSlots = Array.from({ length: maxSlots }, (_, i) => slots[i]);
27213
- return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(React73__default.Fragment, { children: [
27312
+ return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(React74__default.Fragment, { children: [
27214
27313
  i > 0 && /* @__PURE__ */ jsx(
27215
27314
  Typography,
27216
27315
  {
@@ -27397,6 +27496,7 @@ var init_GameShell = __esm({
27397
27496
  "components/game/templates/GameShell.tsx"() {
27398
27497
  init_cn();
27399
27498
  init_Box();
27499
+ init_Card();
27400
27500
  init_Typography();
27401
27501
  init_AtlasImage();
27402
27502
  FONT_BASE = "https://almadar-kflow-assets.web.app/shared/_shared/kenney-fonts/fonts";
@@ -27425,13 +27525,14 @@ var init_GameShell = __esm({
27425
27525
  showTopBar = true,
27426
27526
  children,
27427
27527
  backgroundAsset,
27428
- hudBackgroundAsset,
27429
- fontFamily = "future"
27528
+ fontFamily = "future",
27529
+ "data-theme": dataTheme
27430
27530
  }) => {
27431
27531
  const font = GAME_FONTS[fontFamily] ?? fontFamily;
27432
27532
  return /* @__PURE__ */ jsxs(
27433
27533
  Box,
27434
27534
  {
27535
+ "data-theme": dataTheme || void 0,
27435
27536
  className: cn("game-shell", className),
27436
27537
  style: {
27437
27538
  position: "relative",
@@ -27439,7 +27540,7 @@ var init_GameShell = __esm({
27439
27540
  height: "100vh",
27440
27541
  overflow: "hidden",
27441
27542
  background: "var(--color-background, #0a0a0f)",
27442
- color: "var(--color-text, #e0e0e0)",
27543
+ color: "var(--color-foreground, #e0e0e0)",
27443
27544
  fontFamily: `'${font}', system-ui, sans-serif`
27444
27545
  },
27445
27546
  children: [
@@ -27471,19 +27572,12 @@ var init_GameShell = __esm({
27471
27572
  },
27472
27573
  children: [
27473
27574
  showTopBar && /* @__PURE__ */ jsx(
27474
- AtlasPanel,
27575
+ Card,
27475
27576
  {
27476
- asset: hudBackgroundAsset,
27477
- borderSlice: 12,
27478
- borderWidth: 10,
27479
- className: "game-shell__title pointer-events-auto",
27480
- style: {
27481
- padding: "6px 16px",
27482
- background: hudBackgroundAsset ? void 0 : "rgba(18, 18, 31, 0.85)",
27483
- borderRadius: hudBackgroundAsset ? void 0 : 10,
27484
- boxShadow: "0 4px 14px rgba(0,0,0,0.45)",
27485
- flexShrink: 0
27486
- },
27577
+ variant: "bordered",
27578
+ padding: "none",
27579
+ className: "game-shell__title bg-card pointer-events-auto",
27580
+ style: { padding: "6px 16px", flexShrink: 0 },
27487
27581
  children: /* @__PURE__ */ jsx(
27488
27582
  Typography,
27489
27583
  {
@@ -28195,13 +28289,13 @@ var init_MapView = __esm({
28195
28289
  shadowSize: [41, 41]
28196
28290
  });
28197
28291
  L.Marker.prototype.options.icon = defaultIcon;
28198
- const { useEffect: useEffect64, useRef: useRef61, useCallback: useCallback104, useState: useState100 } = React73__default;
28292
+ const { useEffect: useEffect65, useRef: useRef62, useCallback: useCallback105, useState: useState102 } = React74__default;
28199
28293
  const { Typography: Typography2 } = await Promise.resolve().then(() => (init_Typography(), Typography_exports));
28200
28294
  const { useEventBus: useEventBus2 } = await Promise.resolve().then(() => (init_useEventBus(), useEventBus_exports));
28201
28295
  function MapUpdater({ centerLat, centerLng, zoom }) {
28202
28296
  const map = useMap();
28203
- const prevRef = useRef61({ centerLat, centerLng, zoom });
28204
- useEffect64(() => {
28297
+ const prevRef = useRef62({ centerLat, centerLng, zoom });
28298
+ useEffect65(() => {
28205
28299
  const prev = prevRef.current;
28206
28300
  if (prev.centerLat !== centerLat || prev.centerLng !== centerLng || prev.zoom !== zoom) {
28207
28301
  map.setView([centerLat, centerLng], zoom);
@@ -28212,7 +28306,7 @@ var init_MapView = __esm({
28212
28306
  }
28213
28307
  function MapClickHandler({ onMapClick }) {
28214
28308
  const map = useMap();
28215
- useEffect64(() => {
28309
+ useEffect65(() => {
28216
28310
  if (!onMapClick) return;
28217
28311
  const handler = (e) => {
28218
28312
  onMapClick(e.latlng.lat, e.latlng.lng);
@@ -28240,8 +28334,8 @@ var init_MapView = __esm({
28240
28334
  showAttribution = true
28241
28335
  }) {
28242
28336
  const eventBus = useEventBus2();
28243
- const [clickedPosition, setClickedPosition] = useState100(null);
28244
- const handleMapClick = useCallback104((lat, lng) => {
28337
+ const [clickedPosition, setClickedPosition] = useState102(null);
28338
+ const handleMapClick = useCallback105((lat, lng) => {
28245
28339
  if (showClickedPin) {
28246
28340
  setClickedPosition({ lat, lng });
28247
28341
  }
@@ -28250,7 +28344,7 @@ var init_MapView = __esm({
28250
28344
  eventBus.emit(`UI:${mapClickEvent}`, { latitude: lat, longitude: lng });
28251
28345
  }
28252
28346
  }, [onMapClick, mapClickEvent, eventBus, showClickedPin]);
28253
- const handleMarkerClick = useCallback104((marker) => {
28347
+ const handleMarkerClick = useCallback105((marker) => {
28254
28348
  onMarkerClick?.(marker);
28255
28349
  if (markerClickEvent) {
28256
28350
  eventBus.emit(`UI:${markerClickEvent}`, { ...marker });
@@ -28450,7 +28544,7 @@ var init_NumberStepper = __esm({
28450
28544
  "text-foreground",
28451
28545
  "hover:bg-muted",
28452
28546
  "active:bg-muted",
28453
- "transition-colors duration-100",
28547
+ "transition-colors duration-instant",
28454
28548
  "disabled:opacity-40 disabled:cursor-not-allowed disabled:hover:bg-transparent",
28455
28549
  "focus:outline-none focus:ring-[length:var(--focus-ring-width)] focus:ring-ring focus:ring-inset",
28456
28550
  styles.button
@@ -28491,7 +28585,7 @@ var init_NumberStepper = __esm({
28491
28585
  "text-foreground",
28492
28586
  "hover:bg-muted",
28493
28587
  "active:bg-muted",
28494
- "transition-colors duration-100",
28588
+ "transition-colors duration-instant",
28495
28589
  "disabled:opacity-40 disabled:cursor-not-allowed disabled:hover:bg-transparent",
28496
28590
  "focus:outline-none focus:ring-[length:var(--focus-ring-width)] focus:ring-ring focus:ring-inset",
28497
28591
  styles.button
@@ -28615,7 +28709,7 @@ var init_StarRating = __esm({
28615
28709
  className: cn(
28616
28710
  styles.star,
28617
28711
  "text-foreground/30",
28618
- "transition-colors duration-100"
28712
+ "transition-colors duration-instant"
28619
28713
  ),
28620
28714
  strokeWidth: 1.5
28621
28715
  }
@@ -28628,7 +28722,7 @@ var init_StarRating = __esm({
28628
28722
  styles.star,
28629
28723
  "absolute inset-0",
28630
28724
  "text-warning fill-warning",
28631
- "transition-colors duration-100"
28725
+ "transition-colors duration-instant"
28632
28726
  ),
28633
28727
  strokeWidth: 1.5,
28634
28728
  style: isHalf ? { clipPath: "inset(0 50% 0 0)" } : void 0
@@ -28783,7 +28877,7 @@ var init_UploadDropZone = __esm({
28783
28877
  "relative flex flex-col items-center justify-center",
28784
28878
  "p-8 rounded-sm",
28785
28879
  "border-2 border-dashed",
28786
- "transition-colors duration-150",
28880
+ "transition-colors duration-fast",
28787
28881
  "cursor-pointer",
28788
28882
  isDragOver ? "border-primary bg-primary bg-opacity-5" : "border-border bg-surface",
28789
28883
  error && "border-error",
@@ -29110,8 +29204,8 @@ function TableView({
29110
29204
  }) {
29111
29205
  const eventBus = useEventBus();
29112
29206
  const { t } = useTranslate();
29113
- const [visibleCount, setVisibleCount] = React73__default.useState(pageSize > 0 ? pageSize : Infinity);
29114
- const [localSelected, setLocalSelected] = React73__default.useState(/* @__PURE__ */ new Set());
29207
+ const [visibleCount, setVisibleCount] = React74__default.useState(pageSize > 0 ? pageSize : Infinity);
29208
+ const [localSelected, setLocalSelected] = React74__default.useState(/* @__PURE__ */ new Set());
29115
29209
  const colDefs = columns ?? fields ?? [];
29116
29210
  const allDataRaw = Array.isArray(entity) ? entity : entity ? [entity] : [];
29117
29211
  const dnd = useDataDnd({
@@ -29191,7 +29285,7 @@ function TableView({
29191
29285
  className: cn(
29192
29286
  "grid items-center gap-3 sticky top-0 z-10",
29193
29287
  "bg-[var(--color-surface-subtle)] border-b border-[var(--color-border)]",
29194
- "text-[var(--color-text-muted)] uppercase text-xs font-semibold tracking-wide",
29288
+ "text-muted-foreground uppercase text-xs font-semibold tracking-wide",
29195
29289
  lk.headPad
29196
29290
  ),
29197
29291
  children: [
@@ -29306,12 +29400,12 @@ function TableView({
29306
29400
  ]
29307
29401
  }
29308
29402
  );
29309
- return dnd.isZone ? /* @__PURE__ */ jsx(dnd.SortableItem, { id: row[idField] ?? id, children: rowInner }, id) : /* @__PURE__ */ jsx(React73__default.Fragment, { children: rowInner }, id);
29403
+ return dnd.isZone ? /* @__PURE__ */ jsx(dnd.SortableItem, { id: row[idField] ?? id, children: rowInner }, id) : /* @__PURE__ */ jsx(React74__default.Fragment, { children: rowInner }, id);
29310
29404
  };
29311
29405
  const items = Array.from(data);
29312
29406
  const groups = groupBy ? groupData2(items, groupBy) : [{ label: "", items }];
29313
29407
  let runningIndex = 0;
29314
- const body = /* @__PURE__ */ jsx(Box, { role: "rowgroup", children: groups.map((group, gi) => /* @__PURE__ */ jsxs(React73__default.Fragment, { children: [
29408
+ const body = /* @__PURE__ */ jsx(Box, { role: "rowgroup", children: groups.map((group, gi) => /* @__PURE__ */ jsxs(React74__default.Fragment, { children: [
29315
29409
  group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-3" : "mt-0" }),
29316
29410
  group.items.map((row) => renderRow(row, runningIndex++))
29317
29411
  ] }, gi)) });
@@ -30047,7 +30141,7 @@ function SortableListInner({
30047
30141
  "flex items-center justify-center",
30048
30142
  "text-muted-foreground",
30049
30143
  "hover:text-foreground",
30050
- "transition-colors duration-100",
30144
+ "transition-colors duration-instant",
30051
30145
  "px-1"
30052
30146
  ),
30053
30147
  "aria-grabbed": ariaGrabbed,
@@ -30074,7 +30168,7 @@ function SortableListInner({
30074
30168
  gap: "sm",
30075
30169
  align: "center",
30076
30170
  className: cn(
30077
- "transition-opacity duration-150",
30171
+ "transition-opacity duration-fast",
30078
30172
  isBeingDragged && "opacity-50"
30079
30173
  ),
30080
30174
  children: [
@@ -30246,7 +30340,7 @@ var init_PullToRefresh = __esm({
30246
30340
  children: /* @__PURE__ */ jsx(
30247
30341
  Box,
30248
30342
  {
30249
- className: "transition-transform duration-150",
30343
+ className: "transition-transform duration-fast",
30250
30344
  style: {
30251
30345
  transform: `scale(${isRefreshing ? 1 : pullProgress})`,
30252
30346
  opacity: isRefreshing ? 1 : pullProgress
@@ -30668,7 +30762,7 @@ var init_StepFlow = __esm({
30668
30762
  className
30669
30763
  }) => {
30670
30764
  if (orientation === "vertical") {
30671
- return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(React73__default.Fragment, { children: /* @__PURE__ */ jsxs(HStack, { gap: "md", align: "start", className: "w-full", children: [
30765
+ return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(React74__default.Fragment, { children: /* @__PURE__ */ jsxs(HStack, { gap: "md", align: "start", className: "w-full", children: [
30672
30766
  /* @__PURE__ */ jsxs(VStack, { gap: "none", align: "center", children: [
30673
30767
  /* @__PURE__ */ jsx(StepCircle, { step, index }),
30674
30768
  showConnectors && index < steps.length - 1 && /* @__PURE__ */ jsx(Box, { className: "w-px h-8 bg-border" })
@@ -30679,7 +30773,7 @@ var init_StepFlow = __esm({
30679
30773
  ] })
30680
30774
  ] }) }, index)) });
30681
30775
  }
30682
- 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(React73__default.Fragment, { children: [
30776
+ 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(React74__default.Fragment, { children: [
30683
30777
  /* @__PURE__ */ jsxs(VStack, { gap: "sm", align: "center", className: "flex-1 w-full md:w-auto", children: [
30684
30778
  /* @__PURE__ */ jsx(StepCircle, { step, index }),
30685
30779
  /* @__PURE__ */ jsx(Typography, { variant: "h4", className: "text-center", children: step.title }),
@@ -31585,7 +31679,7 @@ var init_VoteStack = __esm({
31585
31679
  isUp ? "text-primary" : "text-muted-foreground",
31586
31680
  "hover:bg-muted",
31587
31681
  "active:bg-muted",
31588
- "transition-colors duration-100",
31682
+ "transition-colors duration-instant",
31589
31683
  "disabled:opacity-40 disabled:cursor-not-allowed disabled:hover:bg-transparent",
31590
31684
  "focus:outline-none focus:ring-[length:var(--focus-ring-width)] focus:ring-ring focus:ring-inset",
31591
31685
  styles.button
@@ -31622,7 +31716,7 @@ var init_VoteStack = __esm({
31622
31716
  isDown ? "text-primary" : "text-muted-foreground",
31623
31717
  "hover:bg-muted",
31624
31718
  "active:bg-muted",
31625
- "transition-colors duration-100",
31719
+ "transition-colors duration-instant",
31626
31720
  "disabled:opacity-40 disabled:cursor-not-allowed disabled:hover:bg-transparent",
31627
31721
  "focus:outline-none focus:ring-[length:var(--focus-ring-width)] focus:ring-ring focus:ring-inset",
31628
31722
  styles.button
@@ -31669,7 +31763,7 @@ var init_LikertScale = __esm({
31669
31763
  md: "text-base",
31670
31764
  lg: "text-lg"
31671
31765
  };
31672
- LikertScale = React73__default.forwardRef(
31766
+ LikertScale = React74__default.forwardRef(
31673
31767
  ({
31674
31768
  question,
31675
31769
  options = DEFAULT_LIKERT_OPTIONS,
@@ -31681,7 +31775,7 @@ var init_LikertScale = __esm({
31681
31775
  variant = "radios",
31682
31776
  className
31683
31777
  }, ref) => {
31684
- const groupId = React73__default.useId();
31778
+ const groupId = React74__default.useId();
31685
31779
  const eventBus = useEventBus();
31686
31780
  const handleSelect = useCallback(
31687
31781
  (next) => {
@@ -31734,7 +31828,7 @@ var init_LikertScale = __esm({
31734
31828
  disabled,
31735
31829
  onClick: () => handleSelect(opt.value),
31736
31830
  className: cn(
31737
- "flex-1 text-center font-medium transition-colors duration-100",
31831
+ "flex-1 text-center font-medium transition-colors duration-instant",
31738
31832
  "focus:outline-none focus:ring-[length:var(--focus-ring-width)] focus:ring-ring focus:ring-inset",
31739
31833
  "disabled:cursor-not-allowed",
31740
31834
  "rounded-none gap-0 shadow-none border-none",
@@ -33963,7 +34057,7 @@ var init_DocBreadcrumb = __esm({
33963
34057
  "aria-label": t("aria.breadcrumb"),
33964
34058
  children: /* @__PURE__ */ jsx(HStack, { gap: "xs", align: "center", wrap: true, children: items.map((item, idx) => {
33965
34059
  const isLast = idx === items.length - 1;
33966
- return /* @__PURE__ */ jsxs(React73__default.Fragment, { children: [
34060
+ return /* @__PURE__ */ jsxs(React74__default.Fragment, { children: [
33967
34061
  idx > 0 && /* @__PURE__ */ jsx(
33968
34062
  Icon,
33969
34063
  {
@@ -34832,7 +34926,7 @@ var init_MiniStateMachine = __esm({
34832
34926
  const x = 2 + i * (NODE_W + GAP2 + ARROW_W + GAP2);
34833
34927
  const tc = transitionCounts[s.name] ?? 0;
34834
34928
  const role = getStateRole(s.name, s.isInitial ?? void 0, s.isTerminal ?? void 0, tc, maxTC);
34835
- return /* @__PURE__ */ jsxs(React73__default.Fragment, { children: [
34929
+ return /* @__PURE__ */ jsxs(React74__default.Fragment, { children: [
34836
34930
  /* @__PURE__ */ jsx(
34837
34931
  AvlState,
34838
34932
  {
@@ -35036,7 +35130,7 @@ var init_PageHeader = __esm({
35036
35130
  info: "bg-info/10 text-info"
35037
35131
  };
35038
35132
  return /* @__PURE__ */ jsxs(Box, { className: cn("mb-6", className), children: [
35039
- 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(React73__default.Fragment, { children: [
35133
+ 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(React74__default.Fragment, { children: [
35040
35134
  idx > 0 && /* @__PURE__ */ jsx(Typography, { variant: "small", color: "muted", children: "/" }),
35041
35135
  crumb.href ? /* @__PURE__ */ jsx(
35042
35136
  "a",
@@ -35394,7 +35488,7 @@ var init_Section = __esm({
35394
35488
  as: Component = "section"
35395
35489
  }) => {
35396
35490
  const hasHeader = title || description || action;
35397
- return React73__default.createElement(
35491
+ return React74__default.createElement(
35398
35492
  Component,
35399
35493
  {
35400
35494
  className: cn(
@@ -35461,7 +35555,7 @@ var init_Sidebar = __esm({
35461
35555
  variant: "ghost",
35462
35556
  onClick: item.onClick,
35463
35557
  className: cn(
35464
- "w-full flex items-center gap-3 px-3 py-2.5 transition-all duration-[var(--transition-fast)] group relative",
35558
+ "w-full flex items-center gap-3 px-3 py-2.5 transition-all duration-fast group relative",
35465
35559
  "rounded-sm border-[length:var(--border-width-thin)] border-transparent",
35466
35560
  isActive ? [
35467
35561
  "bg-primary text-primary-foreground",
@@ -35535,7 +35629,7 @@ var init_Sidebar = __esm({
35535
35629
  className: cn(
35536
35630
  "flex flex-col h-full",
35537
35631
  "bg-card border-e border-border",
35538
- "transition-all duration-300 ease-in-out",
35632
+ "transition-all duration-normal ease-standard",
35539
35633
  collapsed ? "w-20" : "w-64",
35540
35634
  className
35541
35635
  ),
@@ -35768,7 +35862,7 @@ var init_WizardContainer = __esm({
35768
35862
  const isCompleted = index < currentStep;
35769
35863
  const stepKey = step.id ?? step.tabId ?? `step-${index}`;
35770
35864
  const stepTitle = step.title ?? step.name ?? `Step ${index + 1}`;
35771
- return /* @__PURE__ */ jsxs(React73__default.Fragment, { children: [
35865
+ return /* @__PURE__ */ jsxs(React74__default.Fragment, { children: [
35772
35866
  /* @__PURE__ */ jsx(
35773
35867
  Button,
35774
35868
  {
@@ -37538,6 +37632,7 @@ var init_molecules2 = __esm({
37538
37632
  init_InputGroup();
37539
37633
  init_Menu();
37540
37634
  init_Modal();
37635
+ init_PageTransition();
37541
37636
  init_Pagination();
37542
37637
  init_Popover();
37543
37638
  init_Coachmark();
@@ -38588,7 +38683,7 @@ var init_DetailPanel = __esm({
38588
38683
  }
38589
38684
  });
38590
38685
  function extractTitle(children) {
38591
- if (!React73__default.isValidElement(children)) return void 0;
38686
+ if (!React74__default.isValidElement(children)) return void 0;
38592
38687
  const props = children.props;
38593
38688
  if (typeof props.title === "string") {
38594
38689
  return props.title;
@@ -38938,12 +39033,12 @@ var init_Form = __esm({
38938
39033
  const isSchemaEntity = isOrbitalEntitySchema(entity);
38939
39034
  const resolvedEntity = isSchemaEntity ? entity : void 0;
38940
39035
  const entityName = typeof entity === "string" ? entity : resolvedEntity?.name;
38941
- const normalizedInitialData = React73__default.useMemo(() => {
39036
+ const normalizedInitialData = React74__default.useMemo(() => {
38942
39037
  const entityRowAsInitial = isPlainEntityRow(entity) ? entity : void 0;
38943
39038
  const callerInitial = initialData !== null && typeof initialData === "object" && !Array.isArray(initialData) ? initialData : {};
38944
39039
  return entityRowAsInitial !== void 0 ? { ...entityRowAsInitial, ...callerInitial } : callerInitial;
38945
39040
  }, [entity, initialData]);
38946
- const entityDerivedFields = React73__default.useMemo(() => {
39041
+ const entityDerivedFields = React74__default.useMemo(() => {
38947
39042
  if (fields && fields.length > 0) return void 0;
38948
39043
  if (!resolvedEntity) return void 0;
38949
39044
  return resolvedEntity.fields.map(
@@ -38964,16 +39059,16 @@ var init_Form = __esm({
38964
39059
  const conditionalFields = typeof conditionalFieldsRaw === "boolean" ? {} : conditionalFieldsRaw;
38965
39060
  const hiddenCalculations = typeof hiddenCalculationsRaw === "boolean" ? [] : hiddenCalculationsRaw;
38966
39061
  const violationTriggers = typeof violationTriggersRaw === "boolean" ? [] : violationTriggersRaw;
38967
- const [formData, setFormData] = React73__default.useState(
39062
+ const [formData, setFormData] = React74__default.useState(
38968
39063
  normalizedInitialData
38969
39064
  );
38970
- const [collapsedSections, setCollapsedSections] = React73__default.useState(
39065
+ const [collapsedSections, setCollapsedSections] = React74__default.useState(
38971
39066
  /* @__PURE__ */ new Set()
38972
39067
  );
38973
- const [submitError, setSubmitError] = React73__default.useState(null);
38974
- const formRef = React73__default.useRef(null);
39068
+ const [submitError, setSubmitError] = React74__default.useState(null);
39069
+ const formRef = React74__default.useRef(null);
38975
39070
  const formMode = props.mode;
38976
- const mountedRef = React73__default.useRef(false);
39071
+ const mountedRef = React74__default.useRef(false);
38977
39072
  if (!mountedRef.current) {
38978
39073
  mountedRef.current = true;
38979
39074
  debug("forms", "mount", {
@@ -38986,7 +39081,7 @@ var init_Form = __esm({
38986
39081
  });
38987
39082
  }
38988
39083
  const shouldShowCancel = showCancel ?? (fields && fields.length > 0);
38989
- const evalContext = React73__default.useMemo(
39084
+ const evalContext = React74__default.useMemo(
38990
39085
  () => ({
38991
39086
  formValues: formData,
38992
39087
  globalVariables: externalContext?.globalVariables ?? {},
@@ -38995,7 +39090,7 @@ var init_Form = __esm({
38995
39090
  }),
38996
39091
  [formData, externalContext]
38997
39092
  );
38998
- React73__default.useEffect(() => {
39093
+ React74__default.useEffect(() => {
38999
39094
  debug("forms", "initialData-sync", {
39000
39095
  mode: formMode,
39001
39096
  normalizedInitialData,
@@ -39006,7 +39101,7 @@ var init_Form = __esm({
39006
39101
  setFormData(normalizedInitialData);
39007
39102
  }
39008
39103
  }, [normalizedInitialData]);
39009
- const processCalculations = React73__default.useCallback(
39104
+ const processCalculations = React74__default.useCallback(
39010
39105
  (changedFieldId, newFormData) => {
39011
39106
  if (!hiddenCalculations.length) return;
39012
39107
  const context = {
@@ -39031,7 +39126,7 @@ var init_Form = __esm({
39031
39126
  },
39032
39127
  [hiddenCalculations, externalContext, eventBus]
39033
39128
  );
39034
- const checkViolations = React73__default.useCallback(
39129
+ const checkViolations = React74__default.useCallback(
39035
39130
  (changedFieldId, newFormData) => {
39036
39131
  if (!violationTriggers.length) return;
39037
39132
  const context = {
@@ -39069,7 +39164,7 @@ var init_Form = __esm({
39069
39164
  processCalculations(name, newFormData);
39070
39165
  checkViolations(name, newFormData);
39071
39166
  };
39072
- const isFieldVisible = React73__default.useCallback(
39167
+ const isFieldVisible = React74__default.useCallback(
39073
39168
  (fieldName) => {
39074
39169
  const condition = conditionalFields[fieldName];
39075
39170
  if (!condition) return true;
@@ -39077,7 +39172,7 @@ var init_Form = __esm({
39077
39172
  },
39078
39173
  [conditionalFields, evalContext]
39079
39174
  );
39080
- const isSectionVisible = React73__default.useCallback(
39175
+ const isSectionVisible = React74__default.useCallback(
39081
39176
  (section) => {
39082
39177
  if (!section.condition) return true;
39083
39178
  return Boolean(evaluateFormExpression(section.condition, evalContext));
@@ -39153,7 +39248,7 @@ var init_Form = __esm({
39153
39248
  eventBus.emit(`UI:${onCancel}`);
39154
39249
  }
39155
39250
  };
39156
- const renderField = React73__default.useCallback(
39251
+ const renderField = React74__default.useCallback(
39157
39252
  (field) => {
39158
39253
  const fieldName = field.name || field.field;
39159
39254
  if (!fieldName) return null;
@@ -39174,7 +39269,7 @@ var init_Form = __esm({
39174
39269
  [formData, isFieldVisible, relationsData, relationsLoading, isLoading]
39175
39270
  );
39176
39271
  const effectiveFields = entityDerivedFields ?? fields;
39177
- const normalizedFields = React73__default.useMemo(() => {
39272
+ const normalizedFields = React74__default.useMemo(() => {
39178
39273
  if (!effectiveFields || effectiveFields.length === 0) return [];
39179
39274
  return effectiveFields.map((field) => {
39180
39275
  if (typeof field === "string") {
@@ -39198,7 +39293,7 @@ var init_Form = __esm({
39198
39293
  return field;
39199
39294
  });
39200
39295
  }, [effectiveFields, resolvedEntity]);
39201
- const schemaFields = React73__default.useMemo(() => {
39296
+ const schemaFields = React74__default.useMemo(() => {
39202
39297
  if (normalizedFields.length === 0) return null;
39203
39298
  if (isDebugEnabled()) {
39204
39299
  debugGroup(`Form: ${entityName || "unknown"}`);
@@ -39208,7 +39303,7 @@ var init_Form = __esm({
39208
39303
  }
39209
39304
  return normalizedFields.map(renderField).filter(Boolean);
39210
39305
  }, [normalizedFields, renderField, entityName, conditionalFields]);
39211
- const sectionElements = React73__default.useMemo(() => {
39306
+ const sectionElements = React74__default.useMemo(() => {
39212
39307
  if (!sections || sections.length === 0) return null;
39213
39308
  return sections.map((section) => {
39214
39309
  if (!isSectionVisible(section)) {
@@ -39891,7 +39986,7 @@ var init_List = __esm({
39891
39986
  Box,
39892
39987
  {
39893
39988
  className: cn(
39894
- "h-full rounded-full transition-all duration-500",
39989
+ "h-full rounded-full transition-all duration-slow",
39895
39990
  clampedValue >= 100 ? "bg-success" : clampedValue >= 70 ? "bg-info" : clampedValue >= 40 ? "bg-warning" : "bg-muted-foreground"
39896
39991
  ),
39897
39992
  style: { width: `${clampedValue}%` }
@@ -39933,7 +40028,7 @@ var init_List = __esm({
39933
40028
  if (entity && typeof entity === "object" && "id" in entity) return [entity];
39934
40029
  return [];
39935
40030
  }, [entity]);
39936
- const getItemActions = React73__default.useCallback(
40031
+ const getItemActions = React74__default.useCallback(
39937
40032
  (item) => {
39938
40033
  if (!itemActions) return [];
39939
40034
  if (typeof itemActions === "function") {
@@ -40060,7 +40155,7 @@ var init_List = __esm({
40060
40155
  {
40061
40156
  className: cn(
40062
40157
  "group flex items-center gap-5 px-6 py-5",
40063
- "transition-all duration-300 ease-out",
40158
+ "transition-all duration-normal ease-standard",
40064
40159
  hasExplicitClick && "cursor-pointer",
40065
40160
  // Hover state
40066
40161
  "hover:bg-muted/80",
@@ -40167,7 +40262,7 @@ var init_List = __esm({
40167
40262
  variant: "ghost",
40168
40263
  action: editAction.event,
40169
40264
  className: cn(
40170
- "p-2 rounded-lg transition-all duration-200",
40265
+ "p-2 rounded-lg transition-all duration-fast",
40171
40266
  "hover:bg-primary/10 hover:text-primary",
40172
40267
  "text-muted-foreground",
40173
40268
  "active:scale-95"
@@ -40183,7 +40278,7 @@ var init_List = __esm({
40183
40278
  variant: "ghost",
40184
40279
  action: viewAction.event,
40185
40280
  className: cn(
40186
- "p-2 rounded-lg transition-all duration-200",
40281
+ "p-2 rounded-lg transition-all duration-fast",
40187
40282
  "hover:bg-muted hover:text-foreground",
40188
40283
  "text-muted-foreground",
40189
40284
  "active:scale-95"
@@ -40205,7 +40300,7 @@ var init_List = __esm({
40205
40300
  {
40206
40301
  variant: "ghost",
40207
40302
  className: cn(
40208
- "p-2 rounded-lg transition-all duration-200",
40303
+ "p-2 rounded-lg transition-all duration-fast",
40209
40304
  "hover:bg-muted hover:shadow-sm",
40210
40305
  "text-muted-foreground hover:text-foreground",
40211
40306
  "active:scale-95"
@@ -40417,7 +40512,7 @@ var init_MediaGallery = __esm({
40417
40512
  [selectable, selectedItems, selectionEvent, eventBus]
40418
40513
  );
40419
40514
  const entityData = Array.isArray(entity) ? entity : [];
40420
- const items = React73__default.useMemo(() => {
40515
+ const items = React74__default.useMemo(() => {
40421
40516
  if (propItems && propItems.length > 0) return propItems;
40422
40517
  if (entityData.length === 0) return [];
40423
40518
  return entityData.map((record, idx) => {
@@ -40495,7 +40590,7 @@ var init_MediaGallery = __esm({
40495
40590
  {
40496
40591
  className: cn(
40497
40592
  "group relative overflow-hidden rounded-md cursor-pointer",
40498
- "border-2 transition-all duration-200",
40593
+ "border-2 transition-all duration-fast",
40499
40594
  isSelected ? "border-primary ring-2 ring-primary/30" : "border-transparent hover:border-border",
40500
40595
  ASPECT_CLASSES[aspectRatio]
40501
40596
  ),
@@ -40516,14 +40611,14 @@ var init_MediaGallery = __esm({
40516
40611
  {
40517
40612
  className: cn(
40518
40613
  "absolute inset-0 bg-foreground/0 group-hover:bg-foreground/20",
40519
- "transition-colors duration-200 flex items-center justify-center"
40614
+ "transition-colors duration-fast flex items-center justify-center"
40520
40615
  ),
40521
40616
  children: /* @__PURE__ */ jsx(
40522
40617
  Icon,
40523
40618
  {
40524
40619
  icon: ZoomIn,
40525
40620
  size: "md",
40526
- className: "text-white opacity-0 group-hover:opacity-100 transition-opacity duration-200"
40621
+ className: "text-white opacity-0 group-hover:opacity-100 transition-opacity duration-fast"
40527
40622
  }
40528
40623
  )
40529
40624
  }
@@ -40581,7 +40676,7 @@ var init_MediaGallery = __esm({
40581
40676
  }
40582
40677
  });
40583
40678
  function extractTitle2(children) {
40584
- if (!React73__default.isValidElement(children)) return void 0;
40679
+ if (!React74__default.isValidElement(children)) return void 0;
40585
40680
  const props = children.props;
40586
40681
  if (typeof props.title === "string") {
40587
40682
  return props.title;
@@ -40836,7 +40931,7 @@ var init_debugRegistry = __esm({
40836
40931
  }
40837
40932
  });
40838
40933
  function useDebugData() {
40839
- const [data, setData] = React73.useState(() => ({
40934
+ const [data, setData] = React74.useState(() => ({
40840
40935
  traits: [],
40841
40936
  ticks: [],
40842
40937
  guards: [],
@@ -40850,7 +40945,7 @@ function useDebugData() {
40850
40945
  },
40851
40946
  lastUpdate: Date.now()
40852
40947
  }));
40853
- React73.useEffect(() => {
40948
+ React74.useEffect(() => {
40854
40949
  const updateData = () => {
40855
40950
  setData({
40856
40951
  traits: getAllTraits(),
@@ -40959,12 +41054,12 @@ function layoutGraph(states, transitions, initialState, width, height) {
40959
41054
  return positions;
40960
41055
  }
40961
41056
  function WalkMinimap() {
40962
- const [walkStep, setWalkStep] = React73.useState(null);
40963
- const [traits2, setTraits] = React73.useState([]);
40964
- const [coveredEdges, setCoveredEdges] = React73.useState([]);
40965
- const [completedTraits, setCompletedTraits] = React73.useState(/* @__PURE__ */ new Set());
40966
- const prevTraitRef = React73.useRef(null);
40967
- React73.useEffect(() => {
41057
+ const [walkStep, setWalkStep] = React74.useState(null);
41058
+ const [traits2, setTraits] = React74.useState([]);
41059
+ const [coveredEdges, setCoveredEdges] = React74.useState([]);
41060
+ const [completedTraits, setCompletedTraits] = React74.useState(/* @__PURE__ */ new Set());
41061
+ const prevTraitRef = React74.useRef(null);
41062
+ React74.useEffect(() => {
40968
41063
  const interval = setInterval(() => {
40969
41064
  const w = window;
40970
41065
  const step = w.__orbitalWalkStep;
@@ -41400,15 +41495,15 @@ var init_EntitiesTab = __esm({
41400
41495
  });
41401
41496
  function EventFlowTab({ events: events2 }) {
41402
41497
  const { t } = useTranslate();
41403
- const [filter, setFilter] = React73.useState("all");
41404
- const containerRef = React73.useRef(null);
41405
- const [autoScroll, setAutoScroll] = React73.useState(true);
41406
- React73.useEffect(() => {
41498
+ const [filter, setFilter] = React74.useState("all");
41499
+ const containerRef = React74.useRef(null);
41500
+ const [autoScroll, setAutoScroll] = React74.useState(true);
41501
+ React74.useEffect(() => {
41407
41502
  if (autoScroll && containerRef.current) {
41408
41503
  containerRef.current.scrollTop = containerRef.current.scrollHeight;
41409
41504
  }
41410
41505
  }, [events2.length, autoScroll]);
41411
- const filteredEvents = React73.useMemo(() => {
41506
+ const filteredEvents = React74.useMemo(() => {
41412
41507
  if (filter === "all") return events2;
41413
41508
  return events2.filter((e) => e.type === filter);
41414
41509
  }, [events2, filter]);
@@ -41524,7 +41619,7 @@ var init_EventFlowTab = __esm({
41524
41619
  });
41525
41620
  function GuardsPanel({ guards }) {
41526
41621
  const { t } = useTranslate();
41527
- const [filter, setFilter] = React73.useState("all");
41622
+ const [filter, setFilter] = React74.useState("all");
41528
41623
  if (guards.length === 0) {
41529
41624
  return /* @__PURE__ */ jsx(
41530
41625
  EmptyState,
@@ -41537,7 +41632,7 @@ function GuardsPanel({ guards }) {
41537
41632
  }
41538
41633
  const passedCount = guards.filter((g) => g.result).length;
41539
41634
  const failedCount = guards.length - passedCount;
41540
- const filteredGuards = React73.useMemo(() => {
41635
+ const filteredGuards = React74.useMemo(() => {
41541
41636
  if (filter === "all") return guards;
41542
41637
  if (filter === "passed") return guards.filter((g) => g.result);
41543
41638
  return guards.filter((g) => !g.result);
@@ -41700,10 +41795,10 @@ function EffectBadge({ effect }) {
41700
41795
  }
41701
41796
  function TransitionTimeline({ transitions }) {
41702
41797
  const { t } = useTranslate();
41703
- const containerRef = React73.useRef(null);
41704
- const [autoScroll, setAutoScroll] = React73.useState(true);
41705
- const [expandedId, setExpandedId] = React73.useState(null);
41706
- React73.useEffect(() => {
41798
+ const containerRef = React74.useRef(null);
41799
+ const [autoScroll, setAutoScroll] = React74.useState(true);
41800
+ const [expandedId, setExpandedId] = React74.useState(null);
41801
+ React74.useEffect(() => {
41707
41802
  if (autoScroll && containerRef.current) {
41708
41803
  containerRef.current.scrollTop = containerRef.current.scrollHeight;
41709
41804
  }
@@ -41983,9 +42078,9 @@ function getAllEvents(traits2) {
41983
42078
  function EventDispatcherTab({ traits: traits2, schema }) {
41984
42079
  const eventBus = useEventBus();
41985
42080
  const { t } = useTranslate();
41986
- const [log19, setLog] = React73.useState([]);
41987
- const prevStatesRef = React73.useRef(/* @__PURE__ */ new Map());
41988
- React73.useEffect(() => {
42081
+ const [log19, setLog] = React74.useState([]);
42082
+ const prevStatesRef = React74.useRef(/* @__PURE__ */ new Map());
42083
+ React74.useEffect(() => {
41989
42084
  for (const trait of traits2) {
41990
42085
  const prev = prevStatesRef.current.get(trait.id);
41991
42086
  if (prev && prev !== trait.currentState) {
@@ -42154,10 +42249,10 @@ function VerifyModePanel({
42154
42249
  localCount
42155
42250
  }) {
42156
42251
  const { t } = useTranslate();
42157
- const [expanded, setExpanded] = React73.useState(true);
42158
- const scrollRef = React73.useRef(null);
42159
- const prevCountRef = React73.useRef(0);
42160
- React73.useEffect(() => {
42252
+ const [expanded, setExpanded] = React74.useState(true);
42253
+ const scrollRef = React74.useRef(null);
42254
+ const prevCountRef = React74.useRef(0);
42255
+ React74.useEffect(() => {
42161
42256
  if (expanded && transitions.length > prevCountRef.current && scrollRef.current) {
42162
42257
  scrollRef.current.scrollTop = scrollRef.current.scrollHeight;
42163
42258
  }
@@ -42214,10 +42309,10 @@ function RuntimeDebugger({
42214
42309
  schema
42215
42310
  }) {
42216
42311
  const { t } = useTranslate();
42217
- const [isCollapsed, setIsCollapsed] = React73.useState(mode === "verify" ? true : defaultCollapsed);
42218
- const [isVisible, setIsVisible] = React73.useState(mode === "inline" || mode === "verify" || isDebugEnabled2());
42312
+ const [isCollapsed, setIsCollapsed] = React74.useState(mode === "verify" ? true : defaultCollapsed);
42313
+ const [isVisible, setIsVisible] = React74.useState(mode === "inline" || mode === "verify" || isDebugEnabled2());
42219
42314
  const debugData = useDebugData();
42220
- React73.useEffect(() => {
42315
+ React74.useEffect(() => {
42221
42316
  if (mode === "inline") return;
42222
42317
  return onDebugToggle((enabled) => {
42223
42318
  setIsVisible(enabled);
@@ -42226,7 +42321,7 @@ function RuntimeDebugger({
42226
42321
  }
42227
42322
  });
42228
42323
  }, [mode]);
42229
- React73.useEffect(() => {
42324
+ React74.useEffect(() => {
42230
42325
  if (mode === "inline") return;
42231
42326
  const handleKeyDown = (e) => {
42232
42327
  if (e.key === "`" && isVisible) {
@@ -42746,7 +42841,7 @@ var init_StatCard = __esm({
42746
42841
  const labelToUse = propLabel ?? propTitle;
42747
42842
  const eventBus = useEventBus();
42748
42843
  const { t } = useTranslate();
42749
- const handleActionClick = React73__default.useCallback(() => {
42844
+ const handleActionClick = React74__default.useCallback(() => {
42750
42845
  if (action?.event) {
42751
42846
  eventBus.emit(`UI:${action.event}`, {});
42752
42847
  }
@@ -42757,7 +42852,7 @@ var init_StatCard = __esm({
42757
42852
  const data = Array.isArray(entity) ? entity : entity ? [entity] : [];
42758
42853
  const isLoading = externalLoading ?? false;
42759
42854
  const error = externalError;
42760
- const computeMetricValue = React73__default.useCallback(
42855
+ const computeMetricValue = React74__default.useCallback(
42761
42856
  (metric, items) => {
42762
42857
  if (metric.value !== void 0) {
42763
42858
  return metric.value;
@@ -42796,7 +42891,7 @@ var init_StatCard = __esm({
42796
42891
  },
42797
42892
  []
42798
42893
  );
42799
- const schemaStats = React73__default.useMemo(() => {
42894
+ const schemaStats = React74__default.useMemo(() => {
42800
42895
  if (!metrics || metrics.length === 0) return null;
42801
42896
  return metrics.map((metric) => ({
42802
42897
  label: metric.label,
@@ -42804,7 +42899,7 @@ var init_StatCard = __esm({
42804
42899
  format: metric.format
42805
42900
  }));
42806
42901
  }, [metrics, data, computeMetricValue]);
42807
- const calculatedTrend = React73__default.useMemo(() => {
42902
+ const calculatedTrend = React74__default.useMemo(() => {
42808
42903
  if (manualTrend !== void 0) return manualTrend;
42809
42904
  if (previousValue === void 0 || currentValue2 === void 0)
42810
42905
  return void 0;
@@ -43444,8 +43539,8 @@ var init_SubagentTracePanel = __esm({
43444
43539
  ] });
43445
43540
  };
43446
43541
  InlineActivityStream = ({ activities, autoScroll = true, className }) => {
43447
- const endRef = React73__default.useRef(null);
43448
- React73__default.useEffect(() => {
43542
+ const endRef = React74__default.useRef(null);
43543
+ React74__default.useEffect(() => {
43449
43544
  if (!autoScroll) return;
43450
43545
  endRef.current?.scrollIntoView({ behavior: "smooth", block: "end" });
43451
43546
  }, [activities.length, autoScroll]);
@@ -43539,7 +43634,7 @@ var init_SubagentTracePanel = __esm({
43539
43634
  };
43540
43635
  SubagentRichCard = ({ subagent }) => {
43541
43636
  const { t } = useTranslate();
43542
- const activities = React73__default.useMemo(
43637
+ const activities = React74__default.useMemo(
43543
43638
  () => subagentMessagesToActivities(subagent.messages),
43544
43639
  [subagent.messages]
43545
43640
  );
@@ -43616,8 +43711,8 @@ var init_SubagentTracePanel = __esm({
43616
43711
  ] });
43617
43712
  };
43618
43713
  CoordinatorConversation = ({ messages, autoScroll = true, className }) => {
43619
- const endRef = React73__default.useRef(null);
43620
- React73__default.useEffect(() => {
43714
+ const endRef = React74__default.useRef(null);
43715
+ React74__default.useEffect(() => {
43621
43716
  if (!autoScroll) return;
43622
43717
  endRef.current?.scrollIntoView({ behavior: "smooth", block: "end" });
43623
43718
  }, [messages.length, autoScroll]);
@@ -44052,7 +44147,7 @@ var init_Timeline = __esm({
44052
44147
  }) => {
44053
44148
  const { t } = useTranslate();
44054
44149
  const entityData = entity ?? [];
44055
- const items = React73__default.useMemo(() => {
44150
+ const items = React74__default.useMemo(() => {
44056
44151
  if (propItems) return propItems;
44057
44152
  if (entityData.length === 0) return [];
44058
44153
  return entityData.map((record, idx) => {
@@ -44154,7 +44249,7 @@ var init_Timeline = __esm({
44154
44249
  }
44155
44250
  });
44156
44251
  function extractToastProps(children) {
44157
- if (!React73__default.isValidElement(children)) {
44252
+ if (!React74__default.isValidElement(children)) {
44158
44253
  if (typeof children === "string") {
44159
44254
  return { message: children };
44160
44255
  }
@@ -44196,7 +44291,7 @@ var init_ToastSlot = __esm({
44196
44291
  eventBus.emit(`${prefix}CLOSE`);
44197
44292
  };
44198
44293
  if (!isVisible) return null;
44199
- const isCustomContent = React73__default.isValidElement(children) && !message;
44294
+ const isCustomContent = React74__default.isValidElement(children) && !message;
44200
44295
  return /* @__PURE__ */ jsx(Box, { className: "fixed bottom-4 right-4 z-50", children: isCustomContent ? children : /* @__PURE__ */ jsx(
44201
44296
  Toast,
44202
44297
  {
@@ -44244,6 +44339,7 @@ var init_component_registry_generated = __esm({
44244
44339
  init_LayoutPatterns();
44245
44340
  init_BranchingLogicBuilder();
44246
44341
  init_Breadcrumb();
44342
+ init_ButtonGroup();
44247
44343
  init_CTABanner();
44248
44344
  init_CalendarGrid();
44249
44345
  init_Canvas();
@@ -44314,8 +44410,8 @@ var init_component_registry_generated = __esm({
44314
44410
  init_FlipContainer();
44315
44411
  init_FloatingActionButton();
44316
44412
  init_Form();
44317
- init_FormSection();
44318
44413
  init_FormField();
44414
+ init_FormSection();
44319
44415
  init_FormSectionHeader();
44320
44416
  init_GameAudioToggle();
44321
44417
  init_GameHud();
@@ -44501,6 +44597,7 @@ var init_component_registry_generated = __esm({
44501
44597
  "BranchingLogicBuilder": BranchingLogicBuilder,
44502
44598
  "Breadcrumb": Breadcrumb,
44503
44599
  "Button": ButtonPattern,
44600
+ "ButtonGroup": ButtonGroup,
44504
44601
  "ButtonPattern": ButtonPattern,
44505
44602
  "CTABanner": CTABanner,
44506
44603
  "CalendarGrid": CalendarGrid,
@@ -44574,7 +44671,6 @@ var init_component_registry_generated = __esm({
44574
44671
  "FlipContainer": FlipContainer,
44575
44672
  "FloatingActionButton": FloatingActionButton,
44576
44673
  "Form": Form,
44577
- "FormActions": FormActions,
44578
44674
  "FormField": FormField,
44579
44675
  "FormLayout": FormLayout,
44580
44676
  "FormSectionHeader": FormSectionHeader,
@@ -44754,7 +44850,7 @@ function SuspenseConfigProvider({
44754
44850
  config,
44755
44851
  children
44756
44852
  }) {
44757
- return React73__default.createElement(
44853
+ return React74__default.createElement(
44758
44854
  SuspenseConfigContext.Provider,
44759
44855
  { value: config },
44760
44856
  children
@@ -44796,7 +44892,7 @@ function enrichFormFields(fields, entityDef) {
44796
44892
  }
44797
44893
  return { name: field, label: field.replace(/([a-z])([A-Z])/g, "$1 $2").replace(/\b\w/g, (c) => c.toUpperCase()) };
44798
44894
  }
44799
- if (field && typeof field === "object" && !Array.isArray(field) && !React73__default.isValidElement(field) && !(field instanceof Date)) {
44895
+ if (field && typeof field === "object" && !Array.isArray(field) && !React74__default.isValidElement(field) && !(field instanceof Date)) {
44800
44896
  const obj = field;
44801
44897
  const fieldName = typeof obj.name === "string" ? obj.name : typeof obj.field === "string" ? obj.field : void 0;
44802
44898
  if (!fieldName) return field;
@@ -45249,7 +45345,7 @@ function renderPatternChildren(children, onDismiss, parentId = "root", parentPat
45249
45345
  const key = `${parentId}-${index}-trait:${traitName}`;
45250
45346
  return /* @__PURE__ */ jsx(TraitFrame, { traitName }, key);
45251
45347
  }
45252
- return /* @__PURE__ */ jsx(React73__default.Fragment, { children: child }, `${parentId}-${index}`);
45348
+ return /* @__PURE__ */ jsx(React74__default.Fragment, { children: child }, `${parentId}-${index}`);
45253
45349
  }
45254
45350
  if (!child || typeof child !== "object") return null;
45255
45351
  const childId = `${parentId}-${index}`;
@@ -45302,14 +45398,14 @@ function isPatternConfig(value) {
45302
45398
  if (value === null || value === void 0) return false;
45303
45399
  if (typeof value !== "object") return false;
45304
45400
  if (Array.isArray(value)) return false;
45305
- if (React73__default.isValidElement(value)) return false;
45401
+ if (React74__default.isValidElement(value)) return false;
45306
45402
  if (value instanceof Date) return false;
45307
45403
  if (typeof value === "function") return false;
45308
45404
  const record = value;
45309
45405
  return "type" in record && typeof record.type === "string" && getComponentForPattern$1(record.type) !== null;
45310
45406
  }
45311
45407
  function isPlainConfigObject(value) {
45312
- if (React73__default.isValidElement(value)) return false;
45408
+ if (React74__default.isValidElement(value)) return false;
45313
45409
  if (value instanceof Date) return false;
45314
45410
  const proto = Object.getPrototypeOf(value);
45315
45411
  return proto === Object.prototype || proto === null;
@@ -45437,7 +45533,7 @@ function SlotContentRenderer({
45437
45533
  for (const slotKey of CONTENT_NODE_SLOTS) {
45438
45534
  const slotVal = restProps[slotKey];
45439
45535
  if (slotVal === void 0 || slotVal === null) continue;
45440
- if (React73__default.isValidElement(slotVal) || typeof slotVal === "string" || typeof slotVal === "number" || typeof slotVal === "boolean") continue;
45536
+ if (React74__default.isValidElement(slotVal) || typeof slotVal === "string" || typeof slotVal === "number" || typeof slotVal === "boolean") continue;
45441
45537
  if (Array.isArray(slotVal) || typeof slotVal === "object" && "type" in slotVal) {
45442
45538
  nodeSlotOverrides[slotKey] = renderPatternChildren(
45443
45539
  slotVal,
@@ -45490,7 +45586,7 @@ function SlotContentRenderer({
45490
45586
  const resolvedItems = Array.isArray(entityVal) && entityVal[0] !== "fn" ? entityVal : null;
45491
45587
  if (resolvedItems && resolvedItems.length > 0 && !finalProps.fields && !finalProps.columns) {
45492
45588
  const sample = resolvedItems[0];
45493
- if (sample && typeof sample === "object" && !Array.isArray(sample) && !React73__default.isValidElement(sample) && !(sample instanceof Date)) {
45589
+ if (sample && typeof sample === "object" && !Array.isArray(sample) && !React74__default.isValidElement(sample) && !(sample instanceof Date)) {
45494
45590
  const keys = Object.keys(sample).filter((k) => k !== "id" && k !== "_id");
45495
45591
  finalProps.fields = keys.map((k, i) => ({ name: k, variant: i === 0 ? "h4" : "body" }));
45496
45592
  }
@@ -45769,6 +45865,7 @@ var init_atoms = __esm({
45769
45865
  init_Typography();
45770
45866
  init_ThemeToggle();
45771
45867
  init_Overlay();
45868
+ init_Presence();
45772
45869
  init_FlipContainer();
45773
45870
  init_Dialog();
45774
45871
  init_Aside();
@@ -48135,4 +48232,4 @@ function useGitHubBranches(owner, repo, enabled = true) {
48135
48232
  });
48136
48233
  }
48137
48234
 
48138
- export { ALL_PRESETS, ALMADAR_DND_MIME, AR_BOOK_FIELDS, AboutPageTemplate, Accordion, Card2 as ActionCard, ActionPalette, ActionTile, ActivationBlock, Alert, AlgorithmCanvas, AnimatedCounter, AnimatedGraphic, AnimatedReveal, ArticleSection, Aside, AssetPicker, AtlasImage, AtlasPanel, AuthLayout, Avatar, Badge, BehaviorView, BiologyCanvas, BloomQuizBlock, BookChapterView, BookCoverPage, BookNavBar, BookTableOfContents, BookViewer, Box, BranchingLogicBuilder, Breadcrumb, Button, ButtonGroup, CTABanner, CalendarGrid, Canvas, Canvas2D, Card, CardBody, CardContent, CardFooter, CardGrid, CardHeader, CardTitle, Carousel, CaseStudyCard, CaseStudyOrganism, Center, Chart, ChartLegend, ChatBar, Checkbox, ChemistryCanvas, ChoiceButton, Coachmark, CodeBlock, CodeRunnerPanel, CollapsibleSection, CommunityLinks, ConditionalWrapper, ConfettiEffect, ConfirmDialog, ConnectionBlock, Container, ContentRenderer, ContentSection, ControlButton, ControlGrid, CounterTemplate, DEFAULT_LIKERT_OPTIONS, DEFAULT_MATRIX_COLUMNS, DEFAULT_SLOTS, DIAMOND_TOP_Y, DashboardGrid, DashboardLayout, DataGrid, DataList, DataTable, DateRangePicker, DateRangeSelector, DayCell, DetailPanel, Dialog, DialogueBubble, Divider, DocBreadcrumb, DocPagination, DocSearch, DocSidebar, DocTOC, DocumentViewer, StateMachineView as DomStateMachineVisualizer, Drawer, DrawerSlot, ELEMENT_SELECTED_EVENT, EdgeDecoration, EditorCheckbox, EditorSelect, EditorSlider, EditorTextInput, EditorToolbar, EmptyState, EntityDisplayEvents, ErrorBoundary, ErrorState, FEATURE_COLORS, FEATURE_TYPES, FLOOR_HEIGHT, FeatureCard, FeatureDetailPageTemplate, FeatureGrid, FeatureGridOrganism, FileTree, FilterGroup, FilterPill, Flex, FlipCard, FlipContainer, FloatingActionButton, Form, FormActions, FormField, FormLayout, FormSection, FormSectionHeader, GameAudioToggle, GameHud, GameIcon, GameMenu, GameShell, GenericAppTemplate, GeometricPattern, GradientDivider, GraphCanvas, GraphView, Grid, GridPicker, HStack, Header, HealthBar, HeroOrganism, HeroSection, I18nProvider, IDENTITY_BOOK_FIELDS, Icon, IconPicker, InfiniteScrollSentinel, Input, InputGroup, InstallBox, JazariStateMachine, JsonTreeEditor, Label, LandingPageTemplate, LawReferenceTooltip, LearningCanvas, Lightbox, LikertScale, LineChart2 as LineChart, List3 as List, LoadingState, MapView, MarkdownContent, MarketingFooter, MarketingStatCard, MasterDetail, MasterDetailLayout, MathCanvas, MatrixQuestion, MediaGallery, Menu, Meter, Modal, ModalSlot, ModuleCard, Navigation, NodeSlotEditor, NotifyListener, NumberStepper, OnboardingSpotlight, OptionConstraintGroup, StateMachineView as OrbitalStateMachineView, OrbitalVisualization, Overlay, PageHeader, Pagination, PatternTile, PhysicsCanvas, Popover, PositionedCanvas, PricingCard, PricingGrid, PricingOrganism, PricingPageTemplate, ProgressBar, ProgressDots, PropertyInspector, PullQuote, PullToRefresh, QrScanner, QuizBlock, Radio, RangeSlider, ReflectionBlock, RelationSelect, RepeatableFormSection, ReplyTree, RichBlockEditor, RuntimeDebugger, SHEET_COLUMNS, SPRITE_SHEET_LAYOUT, ScaledDiagram, ScoreDisplay, SearchInput, Section, SectionHeader, SegmentRenderer, Select, SequenceBar, ServiceCatalog, SharedEntityStoreContext, ShowcaseCard, ShowcaseOrganism, SidePanel, Sidebar, SignaturePad, SimpleGrid, Skeleton, SlotContentRenderer, SocialProof, SortableList, Spacer, Sparkline, Spinner, Split, SplitPane, SplitSection, Stack, StarRating, StatBadge, StatCard, StatDisplay, StateGraph, StateJsonView, StateMachineView, StateNode2 as StateNode, StatsGrid, StatsOrganism, StatusBar, StatusDot, StepFlow, StepFlowOrganism, SubagentTracePanel, SvgBranch, SvgConnection, SvgFlow, SvgGrid, SvgLobe, SvgMesh, SvgMorph, SvgNode, SvgPulse, SvgRing, SvgShield, SvgStack, SwipeableRow, Switch, TERRAIN_COLORS, TILE_HEIGHT, TILE_WIDTH, TabbedContainer, TableView, Tabs, TagCloud, TagInput, TeamCard, TeamOrganism, TerrainPalette, TextHighlight, Textarea, ThemeToggle, TimeSlotCell, Timeline, TimerDisplay, Toast, ToastSlot, Tooltip, TraitFrame, TraitSlot, TraitStateViewer, TransitionArrow, TrendIndicator, TypewriterText, Typography, UISlotComponent, UISlotRenderer, UploadDropZone, VStack, VersionDiff, ViolationAlert, VoteStack, WizardContainer, WizardNavigation, WizardProgress, boardEntity, bool, calculateAttackTargets, calculateValidMoves, cn, createInitialGameState, createSharedEntityStore, createTranslate, createUnitAnimationState, getCurrentFrame, getTileDimensions, inferDirection, isoToScreen, makeAsset, makeAssetMap, mapBookData, num, objAvailableActions, objAvailableEvents, objCurrentState, objIcon, objId, objMaxRules, objName, objRules, objStates, parseEditFocus, parseLessonSegments, parseMarkdownWithCodeBlocks, parseQueryBinding, pendulum, projectileMotion, resolveFieldMap, resolveFrame, resolveSheetDirection, rows, runTickFrame, screenToIso, springOscillator, str, tickAnimationState, toCodeLanguage, transitionAnimation, unitHealth, unitPosition, unitTeam, useAgentChat, useAnchorRect, useAtlasSliceDataUrl, useAuthContext, useCamera, useCanvasGestures, useCompile, useConnectGitHub, useDeepAgentGeneration, useDisconnectGitHub, useDragReorder, useDraggable, useDropZone, useEmitEvent, useEventBus, useEventListener, useExtensions, useFileEditor, useFileSystem, useGameAudio, useGitHubBranches, useGitHubRepo, useGitHubRepos, useGitHubStatus, useImageCache, useInfiniteScroll, useLongPress, useOrbitalHistory, usePreview, usePullToRefresh, useQuerySingleton, useRenderInterpolation, useSharedEntitySnapshot, useSharedEntityStore, useSharedEntityStoreContext, useSwipeGesture, useTapReveal, useTraitListens, useTranslate115 as useTranslate, useUIEvents, useUISlotManager, useUnitSpriteAtlas, useValidation, vec2 };
48235
+ export { ALL_PRESETS, ALMADAR_DND_MIME, AR_BOOK_FIELDS, AboutPageTemplate, Accordion, Card2 as ActionCard, ActionPalette, ActionTile, ActivationBlock, Alert, AlgorithmCanvas, AnimatedCounter, AnimatedGraphic, AnimatedReveal, ArticleSection, Aside, AssetPicker, AtlasImage, AtlasPanel, AuthLayout, Avatar, Badge, BehaviorView, BiologyCanvas, BloomQuizBlock, BookChapterView, BookCoverPage, BookNavBar, BookTableOfContents, BookViewer, Box, BranchingLogicBuilder, Breadcrumb, Button, ButtonGroup, CTABanner, CalendarGrid, Canvas, Canvas2D, Card, CardBody, CardContent, CardFooter, CardGrid, CardHeader, CardTitle, Carousel, CaseStudyCard, CaseStudyOrganism, Center, Chart, ChartLegend, ChatBar, Checkbox, ChemistryCanvas, ChoiceButton, Coachmark, CodeBlock, CodeRunnerPanel, CollapsibleSection, CommunityLinks, ConditionalWrapper, ConfettiEffect, ConfirmDialog, ConnectionBlock, Container, ContentRenderer, ContentSection, ControlButton, ControlGrid, CounterTemplate, DEFAULT_LIKERT_OPTIONS, DEFAULT_MATRIX_COLUMNS, DEFAULT_SLOTS, DIAMOND_TOP_Y, DashboardGrid, DashboardLayout, DataGrid, DataList, DataTable, DateRangePicker, DateRangeSelector, DayCell, DetailPanel, Dialog, DialogueBubble, Divider, DocBreadcrumb, DocPagination, DocSearch, DocSidebar, DocTOC, DocumentViewer, StateMachineView as DomStateMachineVisualizer, Drawer, DrawerSlot, ELEMENT_SELECTED_EVENT, EdgeDecoration, EditorCheckbox, EditorSelect, EditorSlider, EditorTextInput, EditorToolbar, EmptyState, EntityDisplayEvents, ErrorBoundary, ErrorState, FEATURE_COLORS, FEATURE_TYPES, FLOOR_HEIGHT, FeatureCard, FeatureDetailPageTemplate, FeatureGrid, FeatureGridOrganism, FileTree, FilterGroup, FilterPill, Flex, FlipCard, FlipContainer, FloatingActionButton, Form, FormActions, FormField, FormLayout, FormSection, FormSectionHeader, GameAudioToggle, GameHud, GameIcon, GameMenu, GameShell, GenericAppTemplate, GeometricPattern, GradientDivider, GraphCanvas, GraphView, Grid, GridPicker, HStack, Header, HealthBar, HeroOrganism, HeroSection, I18nProvider, IDENTITY_BOOK_FIELDS, Icon, IconPicker, InfiniteScrollSentinel, Input, InputGroup, InstallBox, JazariStateMachine, JsonTreeEditor, Label, LandingPageTemplate, LawReferenceTooltip, LearningCanvas, Lightbox, LikertScale, LineChart2 as LineChart, List3 as List, LoadingState, MapView, MarkdownContent, MarketingFooter, MarketingStatCard, MasterDetail, MasterDetailLayout, MathCanvas, MatrixQuestion, MediaGallery, Menu, Meter, Modal, ModalSlot, ModuleCard, Navigation, NodeSlotEditor, NotifyListener, NumberStepper, OnboardingSpotlight, OptionConstraintGroup, StateMachineView as OrbitalStateMachineView, OrbitalVisualization, Overlay, PageHeader, PageTransition, Pagination, PatternTile, PhysicsCanvas, Popover, PositionedCanvas, Presence, PricingCard, PricingGrid, PricingOrganism, PricingPageTemplate, ProgressBar, ProgressDots, PropertyInspector, PullQuote, PullToRefresh, QrScanner, QuizBlock, Radio, RangeSlider, ReflectionBlock, RelationSelect, RepeatableFormSection, ReplyTree, RichBlockEditor, RuntimeDebugger, SHEET_COLUMNS, SPRITE_SHEET_LAYOUT, ScaledDiagram, ScoreDisplay, SearchInput, Section, SectionHeader, SegmentRenderer, Select, SequenceBar, ServiceCatalog, SharedEntityStoreContext, ShowcaseCard, ShowcaseOrganism, SidePanel, Sidebar, SignaturePad, SimpleGrid, Skeleton, SlotContentRenderer, SocialProof, SortableList, Spacer, Sparkline, Spinner, Split, SplitPane, SplitSection, Stack, StarRating, StatBadge, StatCard, StatDisplay, StateGraph, StateJsonView, StateMachineView, StateNode2 as StateNode, StatsGrid, StatsOrganism, StatusBar, StatusDot, StepFlow, StepFlowOrganism, SubagentTracePanel, SvgBranch, SvgConnection, SvgFlow, SvgGrid, SvgLobe, SvgMesh, SvgMorph, SvgNode, SvgPulse, SvgRing, SvgShield, SvgStack, SwipeableRow, Switch, TERRAIN_COLORS, TILE_HEIGHT, TILE_WIDTH, TabbedContainer, TableView, Tabs, TagCloud, TagInput, TeamCard, TeamOrganism, TerrainPalette, TextHighlight, Textarea, ThemeToggle, TimeSlotCell, Timeline, TimerDisplay, Toast, ToastSlot, Tooltip, TraitFrame, TraitSlot, TraitStateViewer, TransitionArrow, TrendIndicator, TypewriterText, Typography, UISlotComponent, UISlotRenderer, UploadDropZone, VStack, VersionDiff, ViolationAlert, VoteStack, WizardContainer, WizardNavigation, WizardProgress, boardEntity, bool, calculateAttackTargets, calculateValidMoves, cn, createInitialGameState, createSharedEntityStore, createTranslate, createUnitAnimationState, getCurrentFrame, getTileDimensions, inferDirection, isoToScreen, makeAsset, makeAssetMap, mapBookData, num, objAvailableActions, objAvailableEvents, objCurrentState, objIcon, objId, objMaxRules, objName, objRules, objStates, parseEditFocus, parseLessonSegments, parseMarkdownWithCodeBlocks, parseQueryBinding, pendulum, projectileMotion, resolveFieldMap, resolveFrame, resolveSheetDirection, rows, runTickFrame, screenToIso, springOscillator, str, tickAnimationState, toCodeLanguage, transitionAnimation, unitHealth, unitPosition, unitTeam, useAgentChat, useAnchorRect, useAtlasSliceDataUrl, useAuthContext, useCamera, useCanvasGestures, useCompile, useConnectGitHub, useDeepAgentGeneration, useDisconnectGitHub, useDragReorder, useDraggable, useDropZone, useEmitEvent, useEventBus, useEventListener, useExtensions, useFileEditor, useFileSystem, useGameAudio, useGitHubBranches, useGitHubRepo, useGitHubRepos, useGitHubStatus, useImageCache, useInfiniteScroll, useLongPress, useOrbitalHistory, usePresence, usePreview, usePullToRefresh, useQuerySingleton, useRenderInterpolation, useSharedEntitySnapshot, useSharedEntityStore, useSharedEntityStoreContext, useSwipeGesture, useTapReveal, useTraitListens, useTranslate115 as useTranslate, useUIEvents, useUISlotManager, useUnitSpriteAtlas, useValidation, vec2 };