@almadar/ui 5.91.0 → 5.93.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
- import * as React98 from 'react';
2
- import React98__default, { createContext, useContext, useMemo, useRef, useEffect, useCallback, Suspense, useState, useLayoutEffect, lazy, useId, useSyncExternalStore } from 'react';
1
+ import * as React97 from 'react';
2
+ import React97__default, { createContext, useContext, useMemo, useRef, useEffect, useCallback, Suspense, useState, useLayoutEffect, lazy, useId, useSyncExternalStore } from 'react';
3
3
  import { EventBusContext, useTraitScope, useEntitySchemaOptional, TraitScopeProvider, useCurrentPagePath } from '@almadar/ui/providers';
4
4
  import { createLogger, isLogLevelEnabled } from '@almadar/logger';
5
5
  import { clsx } from 'clsx';
@@ -388,7 +388,7 @@ var init_Box = __esm({
388
388
  fixed: "fixed",
389
389
  sticky: "sticky"
390
390
  };
391
- Box = React98__default.forwardRef(
391
+ Box = React97__default.forwardRef(
392
392
  ({
393
393
  padding,
394
394
  paddingX,
@@ -453,7 +453,7 @@ var init_Box = __esm({
453
453
  onPointerDown?.(e);
454
454
  }, [hoverEvent, tapReveal, triggerProps, onPointerDown]);
455
455
  const isClickable = action || onClick;
456
- return React98__default.createElement(
456
+ return React97__default.createElement(
457
457
  Component,
458
458
  {
459
459
  ref,
@@ -549,7 +549,7 @@ function loadLib(key, importer) {
549
549
  return p;
550
550
  }
551
551
  function lazyFamilyIcon(libKey, importer, pick, fallbackName, family) {
552
- const Lazy = React98__default.lazy(async () => {
552
+ const Lazy = React97__default.lazy(async () => {
553
553
  const lib = await loadLib(libKey, importer);
554
554
  const Comp = pick(lib);
555
555
  if (!Comp) {
@@ -559,7 +559,7 @@ function lazyFamilyIcon(libKey, importer, pick, fallbackName, family) {
559
559
  return { default: Comp };
560
560
  });
561
561
  const Wrapped = (props) => /* @__PURE__ */ jsx(
562
- React98__default.Suspense,
562
+ React97__default.Suspense,
563
563
  {
564
564
  fallback: /* @__PURE__ */ jsx(
565
565
  "span",
@@ -1290,7 +1290,7 @@ var init_Icon = __esm({
1290
1290
  const directIcon = typeof icon === "string" ? void 0 : icon;
1291
1291
  const effectiveName = typeof icon === "string" ? icon : name;
1292
1292
  const family = useIconFamily();
1293
- const RenderedComponent = React98__default.useMemo(() => {
1293
+ const RenderedComponent = React97__default.useMemo(() => {
1294
1294
  if (directIcon) return null;
1295
1295
  return effectiveName ? resolveIconForFamily(effectiveName, family) : null;
1296
1296
  }, [directIcon, effectiveName, family]);
@@ -1352,7 +1352,7 @@ function resolveIconProp(value, sizeClass) {
1352
1352
  const IconComp = value;
1353
1353
  return /* @__PURE__ */ jsx(IconComp, { className: sizeClass });
1354
1354
  }
1355
- if (React98__default.isValidElement(value)) {
1355
+ if (React97__default.isValidElement(value)) {
1356
1356
  return value;
1357
1357
  }
1358
1358
  if (typeof value === "object" && value !== null && isIconLike(value)) {
@@ -1428,7 +1428,7 @@ var init_Button = __esm({
1428
1428
  md: "h-icon-default w-icon-default",
1429
1429
  lg: "h-icon-default w-icon-default"
1430
1430
  };
1431
- Button = React98__default.forwardRef(
1431
+ Button = React97__default.forwardRef(
1432
1432
  ({
1433
1433
  className,
1434
1434
  variant = "primary",
@@ -1496,7 +1496,7 @@ var Dialog;
1496
1496
  var init_Dialog = __esm({
1497
1497
  "components/core/atoms/Dialog.tsx"() {
1498
1498
  init_cn();
1499
- Dialog = React98__default.forwardRef(
1499
+ Dialog = React97__default.forwardRef(
1500
1500
  ({
1501
1501
  role = "dialog",
1502
1502
  "aria-modal": ariaModal = true,
@@ -1614,7 +1614,7 @@ var init_Typography = __esm({
1614
1614
  }) => {
1615
1615
  const variant = variantProp ?? (level ? `h${level}` : "body1");
1616
1616
  const Component = as || defaultElements[variant];
1617
- return React98__default.createElement(
1617
+ return React97__default.createElement(
1618
1618
  Component,
1619
1619
  {
1620
1620
  id,
@@ -2109,7 +2109,7 @@ var init_Badge = __esm({
2109
2109
  md: "px-2.5 py-1 text-sm",
2110
2110
  lg: "px-3 py-1.5 text-base"
2111
2111
  };
2112
- Badge = React98__default.forwardRef(
2112
+ Badge = React97__default.forwardRef(
2113
2113
  ({ className, variant = "default", size = "sm", amount, label, icon, iconAsset, children, onRemove, removeLabel, ...props }, ref) => {
2114
2114
  const iconSizes3 = {
2115
2115
  sm: "h-icon-default w-icon-default",
@@ -2446,7 +2446,7 @@ var init_SvgFlow = __esm({
2446
2446
  width = 100,
2447
2447
  height = 100
2448
2448
  }) => {
2449
- const markerId = React98__default.useMemo(() => {
2449
+ const markerId = React97__default.useMemo(() => {
2450
2450
  flowIdCounter += 1;
2451
2451
  return `almadar-flow-arrow-${flowIdCounter}`;
2452
2452
  }, []);
@@ -3039,7 +3039,7 @@ var init_SvgRing = __esm({
3039
3039
  width = 100,
3040
3040
  height = 100
3041
3041
  }) => {
3042
- const gradientId = React98__default.useMemo(() => {
3042
+ const gradientId = React97__default.useMemo(() => {
3043
3043
  ringIdCounter += 1;
3044
3044
  return `almadar-ring-glow-${ringIdCounter}`;
3045
3045
  }, []);
@@ -3220,7 +3220,7 @@ var init_Input = __esm({
3220
3220
  init_cn();
3221
3221
  init_Icon();
3222
3222
  init_useEventBus();
3223
- Input = React98__default.forwardRef(
3223
+ Input = React97__default.forwardRef(
3224
3224
  ({
3225
3225
  className,
3226
3226
  inputType,
@@ -3380,7 +3380,7 @@ var Label;
3380
3380
  var init_Label = __esm({
3381
3381
  "components/core/atoms/Label.tsx"() {
3382
3382
  init_cn();
3383
- Label = React98__default.forwardRef(
3383
+ Label = React97__default.forwardRef(
3384
3384
  ({ className, required, children, ...props }, ref) => {
3385
3385
  return /* @__PURE__ */ jsxs(
3386
3386
  "label",
@@ -3407,7 +3407,7 @@ var init_Textarea = __esm({
3407
3407
  "components/core/atoms/Textarea.tsx"() {
3408
3408
  init_cn();
3409
3409
  init_useEventBus();
3410
- Textarea = React98__default.forwardRef(
3410
+ Textarea = React97__default.forwardRef(
3411
3411
  ({ className, error, onChange, ...props }, ref) => {
3412
3412
  const eventBus = useEventBus();
3413
3413
  const handleChange = (e) => {
@@ -3646,7 +3646,7 @@ var init_Select = __esm({
3646
3646
  init_cn();
3647
3647
  init_Icon();
3648
3648
  init_useEventBus();
3649
- Select = React98__default.forwardRef(
3649
+ Select = React97__default.forwardRef(
3650
3650
  (props, _ref) => {
3651
3651
  const { multiple, searchable, clearable } = props;
3652
3652
  if (multiple || searchable || clearable) {
@@ -3663,7 +3663,7 @@ var init_Checkbox = __esm({
3663
3663
  "components/core/atoms/Checkbox.tsx"() {
3664
3664
  init_cn();
3665
3665
  init_useEventBus();
3666
- Checkbox = React98__default.forwardRef(
3666
+ Checkbox = React97__default.forwardRef(
3667
3667
  ({ className, label, id, onChange, ...props }, ref) => {
3668
3668
  const inputId = id || `checkbox-${Math.random().toString(36).substr(2, 9)}`;
3669
3669
  const eventBus = useEventBus();
@@ -3717,7 +3717,7 @@ var init_Spinner = __esm({
3717
3717
  md: "h-6 w-6",
3718
3718
  lg: "h-8 w-8"
3719
3719
  };
3720
- Spinner = React98__default.forwardRef(
3720
+ Spinner = React97__default.forwardRef(
3721
3721
  ({ className, size = "md", overlay, ...props }, ref) => {
3722
3722
  if (overlay) {
3723
3723
  return /* @__PURE__ */ jsx(
@@ -3807,7 +3807,7 @@ var init_Card = __esm({
3807
3807
  chip: "shadow-none rounded-pill border-[length:var(--border-width)] border-border",
3808
3808
  "tile-image-first": "p-0 overflow-hidden"
3809
3809
  };
3810
- Card = React98__default.forwardRef(
3810
+ Card = React97__default.forwardRef(
3811
3811
  ({
3812
3812
  className,
3813
3813
  variant = "bordered",
@@ -3855,9 +3855,9 @@ var init_Card = __esm({
3855
3855
  }
3856
3856
  );
3857
3857
  Card.displayName = "Card";
3858
- CardHeader = React98__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("mb-4", className), ...props }));
3858
+ CardHeader = React97__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("mb-4", className), ...props }));
3859
3859
  CardHeader.displayName = "CardHeader";
3860
- CardTitle = React98__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
3860
+ CardTitle = React97__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
3861
3861
  "h3",
3862
3862
  {
3863
3863
  ref,
@@ -3870,11 +3870,11 @@ var init_Card = __esm({
3870
3870
  }
3871
3871
  ));
3872
3872
  CardTitle.displayName = "CardTitle";
3873
- CardContent = React98__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("", className), ...props }));
3873
+ CardContent = React97__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("", className), ...props }));
3874
3874
  CardContent.displayName = "CardContent";
3875
3875
  CardBody = CardContent;
3876
3876
  CardBody.displayName = "CardBody";
3877
- CardFooter = React98__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
3877
+ CardFooter = React97__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
3878
3878
  "div",
3879
3879
  {
3880
3880
  ref,
@@ -3929,7 +3929,7 @@ var init_FilterPill = __esm({
3929
3929
  md: "w-3.5 h-3.5",
3930
3930
  lg: "w-4 h-4"
3931
3931
  };
3932
- FilterPill = React98__default.forwardRef(
3932
+ FilterPill = React97__default.forwardRef(
3933
3933
  ({
3934
3934
  className,
3935
3935
  variant = "default",
@@ -4058,8 +4058,8 @@ var init_Avatar = __esm({
4058
4058
  actionPayload
4059
4059
  }) => {
4060
4060
  const eventBus = useEventBus();
4061
- const [imgFailed, setImgFailed] = React98__default.useState(false);
4062
- React98__default.useEffect(() => {
4061
+ const [imgFailed, setImgFailed] = React97__default.useState(false);
4062
+ React97__default.useEffect(() => {
4063
4063
  setImgFailed(false);
4064
4064
  }, [src]);
4065
4065
  const initials = providedInitials ?? (name ? generateInitials(name) : void 0);
@@ -4172,7 +4172,7 @@ var init_Center = __esm({
4172
4172
  as: Component = "div"
4173
4173
  }) => {
4174
4174
  const mergedStyle = minHeight ? { minHeight, ...style } : style;
4175
- return React98__default.createElement(Component, {
4175
+ return React97__default.createElement(Component, {
4176
4176
  className: cn(
4177
4177
  inline ? "inline-flex" : "flex",
4178
4178
  horizontal && "justify-center",
@@ -4440,7 +4440,7 @@ var init_Radio = __esm({
4440
4440
  md: "w-2.5 h-2.5",
4441
4441
  lg: "w-3 h-3"
4442
4442
  };
4443
- Radio = React98__default.forwardRef(
4443
+ Radio = React97__default.forwardRef(
4444
4444
  ({
4445
4445
  label,
4446
4446
  helperText,
@@ -4457,12 +4457,12 @@ var init_Radio = __esm({
4457
4457
  onChange,
4458
4458
  ...props
4459
4459
  }, ref) => {
4460
- const reactId = React98__default.useId();
4460
+ const reactId = React97__default.useId();
4461
4461
  const baseId = id || `radio-${reactId}`;
4462
4462
  const hasError = !!error;
4463
4463
  const eventBus = useEventBus();
4464
- const [selected, setSelected] = React98__default.useState(value);
4465
- React98__default.useEffect(() => {
4464
+ const [selected, setSelected] = React97__default.useState(value);
4465
+ React97__default.useEffect(() => {
4466
4466
  if (value !== void 0) setSelected(value);
4467
4467
  }, [value]);
4468
4468
  const pick = (next, e) => {
@@ -4644,7 +4644,7 @@ var init_Switch = __esm({
4644
4644
  "components/core/atoms/Switch.tsx"() {
4645
4645
  "use client";
4646
4646
  init_cn();
4647
- Switch = React98.forwardRef(
4647
+ Switch = React97.forwardRef(
4648
4648
  ({
4649
4649
  checked,
4650
4650
  defaultChecked = false,
@@ -4655,10 +4655,10 @@ var init_Switch = __esm({
4655
4655
  name,
4656
4656
  className
4657
4657
  }, ref) => {
4658
- const [isChecked, setIsChecked] = React98.useState(
4658
+ const [isChecked, setIsChecked] = React97.useState(
4659
4659
  checked !== void 0 ? checked : defaultChecked
4660
4660
  );
4661
- React98.useEffect(() => {
4661
+ React97.useEffect(() => {
4662
4662
  if (checked !== void 0) {
4663
4663
  setIsChecked(checked);
4664
4664
  }
@@ -4821,7 +4821,7 @@ var init_Stack = __esm({
4821
4821
  };
4822
4822
  const isHorizontal = direction === "horizontal";
4823
4823
  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";
4824
- return React98__default.createElement(
4824
+ return React97__default.createElement(
4825
4825
  Component,
4826
4826
  {
4827
4827
  className: cn(
@@ -5021,7 +5021,7 @@ var Aside;
5021
5021
  var init_Aside = __esm({
5022
5022
  "components/core/atoms/Aside.tsx"() {
5023
5023
  init_cn();
5024
- Aside = React98__default.forwardRef(
5024
+ Aside = React97__default.forwardRef(
5025
5025
  ({ className, children, ...rest }, ref) => /* @__PURE__ */ jsx("aside", { ref, className: cn(className), ...rest, children })
5026
5026
  );
5027
5027
  Aside.displayName = "Aside";
@@ -5100,9 +5100,9 @@ var init_LawReferenceTooltip = __esm({
5100
5100
  className
5101
5101
  }) => {
5102
5102
  const { t } = useTranslate();
5103
- const [isVisible, setIsVisible] = React98__default.useState(false);
5104
- const timeoutRef = React98__default.useRef(null);
5105
- const triggerRef = React98__default.useRef(null);
5103
+ const [isVisible, setIsVisible] = React97__default.useState(false);
5104
+ const timeoutRef = React97__default.useRef(null);
5105
+ const triggerRef = React97__default.useRef(null);
5106
5106
  const handleMouseEnter = () => {
5107
5107
  if (timeoutRef.current) clearTimeout(timeoutRef.current);
5108
5108
  timeoutRef.current = setTimeout(() => setIsVisible(true), 200);
@@ -5113,7 +5113,7 @@ var init_LawReferenceTooltip = __esm({
5113
5113
  };
5114
5114
  const { revealed, triggerProps } = useTapReveal({ refs: [triggerRef] });
5115
5115
  const open = isVisible || revealed;
5116
- React98__default.useEffect(() => {
5116
+ React97__default.useEffect(() => {
5117
5117
  return () => {
5118
5118
  if (timeoutRef.current) clearTimeout(timeoutRef.current);
5119
5119
  };
@@ -5323,7 +5323,7 @@ var init_StatusDot = __esm({
5323
5323
  md: "w-2.5 h-2.5",
5324
5324
  lg: "w-3 h-3"
5325
5325
  };
5326
- StatusDot = React98__default.forwardRef(
5326
+ StatusDot = React97__default.forwardRef(
5327
5327
  ({ className, status = "offline", pulse = false, size = "md", label, ...props }, ref) => {
5328
5328
  return /* @__PURE__ */ jsx(
5329
5329
  "span",
@@ -5377,7 +5377,7 @@ var init_TrendIndicator = __esm({
5377
5377
  down: "trending-down",
5378
5378
  flat: "arrow-right"
5379
5379
  };
5380
- TrendIndicator = React98__default.forwardRef(
5380
+ TrendIndicator = React97__default.forwardRef(
5381
5381
  ({
5382
5382
  className,
5383
5383
  value,
@@ -5444,7 +5444,7 @@ var init_RangeSlider = __esm({
5444
5444
  md: "w-4 h-4",
5445
5445
  lg: "w-5 h-5"
5446
5446
  };
5447
- RangeSlider = React98__default.forwardRef(
5447
+ RangeSlider = React97__default.forwardRef(
5448
5448
  ({
5449
5449
  className,
5450
5450
  min = 0,
@@ -6038,7 +6038,7 @@ var init_ContentSection = __esm({
6038
6038
  md: "py-16",
6039
6039
  lg: "py-24"
6040
6040
  };
6041
- ContentSection = React98__default.forwardRef(
6041
+ ContentSection = React97__default.forwardRef(
6042
6042
  ({ children, background = "default", padding = "lg", id, className }, ref) => {
6043
6043
  return /* @__PURE__ */ jsx(
6044
6044
  Box,
@@ -6572,7 +6572,7 @@ var init_AnimatedReveal = __esm({
6572
6572
  "scale-up": { opacity: 1, transform: "scale(1) translateY(0)" },
6573
6573
  "none": {}
6574
6574
  };
6575
- AnimatedReveal = React98__default.forwardRef(
6575
+ AnimatedReveal = React97__default.forwardRef(
6576
6576
  ({
6577
6577
  trigger = "scroll",
6578
6578
  animation = "fade-up",
@@ -6732,7 +6732,7 @@ var init_AnimatedGraphic = __esm({
6732
6732
  "components/marketing/atoms/AnimatedGraphic.tsx"() {
6733
6733
  "use client";
6734
6734
  init_cn();
6735
- AnimatedGraphic = React98__default.forwardRef(
6735
+ AnimatedGraphic = React97__default.forwardRef(
6736
6736
  ({
6737
6737
  src,
6738
6738
  svgContent,
@@ -6755,7 +6755,7 @@ var init_AnimatedGraphic = __esm({
6755
6755
  const fetchedSvg = useFetchedSvg(svgContent ? void 0 : src);
6756
6756
  const resolvedSvg = svgContent ?? fetchedSvg;
6757
6757
  const prevAnimateRef = useRef(animate);
6758
- const setRef = React98__default.useCallback(
6758
+ const setRef = React97__default.useCallback(
6759
6759
  (node) => {
6760
6760
  containerRef.current = node;
6761
6761
  if (typeof ref === "function") ref(node);
@@ -7345,12 +7345,13 @@ function GameCard({
7345
7345
  selected = false,
7346
7346
  disabled = false,
7347
7347
  size = "md",
7348
+ animState = "idle",
7348
7349
  onClick,
7349
7350
  clickEvent,
7350
7351
  className
7351
7352
  }) {
7352
7353
  const eventBus = useEventBus();
7353
- const handleClick = React98.useCallback(() => {
7354
+ const handleClick = React97.useCallback(() => {
7354
7355
  if (disabled) return;
7355
7356
  onClick?.(id);
7356
7357
  if (clickEvent) eventBus.emit(`UI:${clickEvent}`, { cardId: id });
@@ -7372,6 +7373,7 @@ function GameCard({
7372
7373
  cardSizeMap[size],
7373
7374
  disabled ? "border-border opacity-50 cursor-not-allowed" : "border-accent hover:brightness-125 hover:-translate-y-1 cursor-pointer",
7374
7375
  selected && "ring-2 ring-foreground ring-offset-1 ring-offset-background -translate-y-1",
7376
+ ANIM_STATE_CLASS[animState],
7375
7377
  className
7376
7378
  ),
7377
7379
  children: [
@@ -7404,7 +7406,7 @@ function GameCard({
7404
7406
  }
7405
7407
  );
7406
7408
  }
7407
- var cardSizeMap, artPxMap;
7409
+ var cardSizeMap, artPxMap, ANIM_STATE_CLASS;
7408
7410
  var init_GameCard = __esm({
7409
7411
  "components/game/2d/atoms/GameCard.tsx"() {
7410
7412
  "use client";
@@ -7420,6 +7422,12 @@ var init_GameCard = __esm({
7420
7422
  lg: "w-24 h-36"
7421
7423
  };
7422
7424
  artPxMap = { sm: 40, md: 52, lg: 64 };
7425
+ ANIM_STATE_CLASS = {
7426
+ idle: "",
7427
+ drawn: "scale-105",
7428
+ played: "-translate-y-2 opacity-80",
7429
+ flipped: "scale-x-0"
7430
+ };
7423
7431
  GameCard.displayName = "GameCard";
7424
7432
  }
7425
7433
  });
@@ -7632,9 +7640,9 @@ function ControlButton({
7632
7640
  className
7633
7641
  }) {
7634
7642
  const eventBus = useEventBus();
7635
- const [isPressed, setIsPressed] = React98.useState(false);
7643
+ const [isPressed, setIsPressed] = React97.useState(false);
7636
7644
  const actualPressed = pressed ?? isPressed;
7637
- const handlePointerDown = React98.useCallback(
7645
+ const handlePointerDown = React97.useCallback(
7638
7646
  (e) => {
7639
7647
  e.preventDefault();
7640
7648
  if (disabled) return;
@@ -7644,7 +7652,7 @@ function ControlButton({
7644
7652
  },
7645
7653
  [disabled, pressEvent, eventBus, onPress]
7646
7654
  );
7647
- const handlePointerUp = React98.useCallback(
7655
+ const handlePointerUp = React97.useCallback(
7648
7656
  (e) => {
7649
7657
  e.preventDefault();
7650
7658
  if (disabled) return;
@@ -7654,7 +7662,7 @@ function ControlButton({
7654
7662
  },
7655
7663
  [disabled, releaseEvent, eventBus, onRelease]
7656
7664
  );
7657
- const handlePointerLeave = React98.useCallback(
7665
+ const handlePointerLeave = React97.useCallback(
7658
7666
  (e) => {
7659
7667
  if (isPressed) {
7660
7668
  setIsPressed(false);
@@ -8460,8 +8468,11 @@ function DialogueBubble({
8460
8468
  text = "The dungeon awaits. Choose your path wisely.",
8461
8469
  portrait = DEFAULT_PORTRAIT,
8462
8470
  position = "bottom",
8471
+ mood = "neutral",
8472
+ revealedChars,
8463
8473
  className
8464
8474
  }) {
8475
+ const visibleText = revealedChars === void 0 ? text : text.slice(0, revealedChars);
8465
8476
  return /* @__PURE__ */ jsxs(
8466
8477
  Box,
8467
8478
  {
@@ -8471,16 +8482,16 @@ function DialogueBubble({
8471
8482
  className
8472
8483
  ),
8473
8484
  children: [
8474
- portrait && /* @__PURE__ */ jsx(Box, { className: "flex-shrink-0 w-12 h-12 rounded-full overflow-hidden border-2 border-warning/60", children: /* @__PURE__ */ jsx(GameIcon, { assetUrl: portrait, icon: "image", size: 48, alt: speaker ?? "speaker", className: "w-full h-full object-cover" }) }),
8485
+ portrait && /* @__PURE__ */ jsx(Box, { className: cn("flex-shrink-0 w-12 h-12 rounded-full overflow-hidden border-2 transition-colors duration-300", MOOD_RING_CLASS[mood]), children: /* @__PURE__ */ jsx(GameIcon, { assetUrl: portrait, icon: "image", size: 48, alt: speaker ?? "speaker", className: "w-full h-full object-cover" }) }),
8475
8486
  /* @__PURE__ */ jsxs(Box, { className: "flex flex-col gap-1 min-w-0", children: [
8476
8487
  speaker && /* @__PURE__ */ jsx(Typography, { as: "span", className: "text-sm font-bold text-warning", children: speaker }),
8477
- /* @__PURE__ */ jsx(Typography, { as: "span", className: "text-sm text-foreground leading-relaxed", children: text })
8488
+ /* @__PURE__ */ jsx(Typography, { as: "span", className: "text-sm text-foreground leading-relaxed", children: visibleText })
8478
8489
  ] })
8479
8490
  ]
8480
8491
  }
8481
8492
  );
8482
8493
  }
8483
- var DEFAULT_PORTRAIT;
8494
+ var DEFAULT_PORTRAIT, MOOD_RING_CLASS;
8484
8495
  var init_DialogueBubble = __esm({
8485
8496
  "components/game/2d/atoms/DialogueBubble.tsx"() {
8486
8497
  init_cn();
@@ -8492,6 +8503,12 @@ var init_DialogueBubble = __esm({
8492
8503
  role: "effect",
8493
8504
  category: "character"
8494
8505
  };
8506
+ MOOD_RING_CLASS = {
8507
+ neutral: "border-warning/60",
8508
+ happy: "border-success/70",
8509
+ concerned: "border-info/70",
8510
+ angry: "border-error/70"
8511
+ };
8495
8512
  DialogueBubble.displayName = "DialogueBubble";
8496
8513
  }
8497
8514
  });
@@ -8673,8 +8690,8 @@ function MiniMap({
8673
8690
  tileAssets,
8674
8691
  unitAssets
8675
8692
  }) {
8676
- const canvasRef = React98.useRef(null);
8677
- const imgCacheRef = React98.useRef(/* @__PURE__ */ new Map());
8693
+ const canvasRef = React97.useRef(null);
8694
+ const imgCacheRef = React97.useRef(/* @__PURE__ */ new Map());
8678
8695
  function loadImg(url) {
8679
8696
  const cached = imgCacheRef.current.get(url);
8680
8697
  if (cached) return cached.complete ? cached : null;
@@ -8689,7 +8706,7 @@ function MiniMap({
8689
8706
  imgCacheRef.current.set(url, img);
8690
8707
  return null;
8691
8708
  }
8692
- React98.useEffect(() => {
8709
+ React97.useEffect(() => {
8693
8710
  const canvas = canvasRef.current;
8694
8711
  if (!canvas) return;
8695
8712
  const ctx = canvas.getContext("2d");
@@ -8824,8 +8841,8 @@ function ControlGrid({
8824
8841
  className
8825
8842
  }) {
8826
8843
  const eventBus = useEventBus();
8827
- const [active, setActive] = React98.useState(/* @__PURE__ */ new Set());
8828
- const handlePress = React98.useCallback(
8844
+ const [active, setActive] = React97.useState(/* @__PURE__ */ new Set());
8845
+ const handlePress = React97.useCallback(
8829
8846
  (id) => {
8830
8847
  setActive((prev) => new Set(prev).add(id));
8831
8848
  if (actionEvent) eventBus.emit(`UI:${actionEvent}`, { id, pressed: true });
@@ -8839,7 +8856,7 @@ function ControlGrid({
8839
8856
  },
8840
8857
  [kind, actionEvent, directionEvent, directionEvents, eventBus, onAction, onDirection]
8841
8858
  );
8842
- const handleRelease = React98.useCallback(
8859
+ const handleRelease = React97.useCallback(
8843
8860
  (id) => {
8844
8861
  setActive((prev) => {
8845
8862
  const next = new Set(prev);
@@ -9097,7 +9114,7 @@ function InventoryGrid({
9097
9114
  const eventBus = useEventBus();
9098
9115
  const slotCount = totalSlots ?? items.length;
9099
9116
  const emptySlotCount = Math.max(0, slotCount - items.length);
9100
- const handleSelect = React98.useCallback(
9117
+ const handleSelect = React97.useCallback(
9101
9118
  (id) => {
9102
9119
  onSelect?.(id);
9103
9120
  if (selectEvent) {
@@ -9314,7 +9331,7 @@ function GameMenu({
9314
9331
  }) {
9315
9332
  const resolvedOptions = options ?? menuItems ?? DEFAULT_MENU_OPTIONS;
9316
9333
  const eventBus = useEventBus();
9317
- const handleOptionClick = React98.useCallback(
9334
+ const handleOptionClick = React97.useCallback(
9318
9335
  (option) => {
9319
9336
  if (option.event) {
9320
9337
  eventBus.emit(`UI:${option.event}`, { option });
@@ -9540,7 +9557,7 @@ function StateGraph({
9540
9557
  }) {
9541
9558
  const eventBus = useEventBus();
9542
9559
  const nodes = states ?? [];
9543
- const positions = React98.useMemo(() => layoutStates(nodes, width, height), [nodes, width, height]);
9560
+ const positions = React97.useMemo(() => layoutStates(nodes, width, height), [nodes, width, height]);
9544
9561
  return /* @__PURE__ */ jsxs(
9545
9562
  Box,
9546
9563
  {
@@ -10306,6 +10323,7 @@ function Canvas2D({
10306
10323
  unitScale = 1,
10307
10324
  showMinimap = true,
10308
10325
  animate,
10326
+ interpolateUnits = false,
10309
10327
  // Tuning
10310
10328
  debug: debug2 = false,
10311
10329
  spriteHeightRatio = 1.5,
@@ -10340,6 +10358,8 @@ function Canvas2D({
10340
10358
  const containerRef = useRef(null);
10341
10359
  const lerpRafRef = useRef(0);
10342
10360
  const animRafRef = useRef(0);
10361
+ const unitInterp = useRenderInterpolation();
10362
+ const interpolatedUnitPositionsRef = useRef(/* @__PURE__ */ new Map());
10343
10363
  const [viewportSize, setViewportSize] = useState({ width: 800, height: 600 });
10344
10364
  useEffect(() => {
10345
10365
  const el = containerRef.current;
@@ -10654,7 +10674,8 @@ function Canvas2D({
10654
10674
  return depthA !== depthB ? depthA - depthB : a.position.y - b.position.y;
10655
10675
  });
10656
10676
  for (const unit of sortedUnits) {
10657
- const pos = project(unit.position.x, unit.position.y, baseOffsetX);
10677
+ const interpolated = interpolateUnits ? interpolatedUnitPositionsRef.current.get(unit.id) : void 0;
10678
+ const pos = project(interpolated?.x ?? unit.position.x, interpolated?.y ?? unit.position.y, baseOffsetX);
10658
10679
  if (pos.x + scaledTileWidth < visLeft || pos.x > visRight || pos.y + scaledTileHeight < visTop || pos.y > visBottom) {
10659
10680
  continue;
10660
10681
  }
@@ -10806,7 +10827,8 @@ function Canvas2D({
10806
10827
  unitScale,
10807
10828
  assetManifest,
10808
10829
  spriteHeightRatio,
10809
- spriteMaxWidthRatio
10830
+ spriteMaxWidthRatio,
10831
+ interpolateUnits
10810
10832
  ]);
10811
10833
  useEffect(() => {
10812
10834
  if (camera === "fixed") return;
@@ -10821,6 +10843,19 @@ function Canvas2D({
10821
10843
  y: centerY - viewportSize.height / 2
10822
10844
  };
10823
10845
  }, [camera, selectedUnitId, units, project, baseOffsetX, scaledTileWidth, scaledDiamondTopY, scaledFloorHeight, viewportSize, targetCameraRef]);
10846
+ useEffect(() => {
10847
+ if (isSide || !interpolateUnits) return;
10848
+ unitInterp.onSnapshot(
10849
+ units.filter((u) => !!u.position).map((u) => ({ id: u.id, x: u.position.x, y: u.position.y }))
10850
+ );
10851
+ }, [isSide, interpolateUnits, units, unitInterp]);
10852
+ useEffect(() => {
10853
+ if (isSide || !interpolateUnits) return;
10854
+ return unitInterp.startLoop((positions) => {
10855
+ interpolatedUnitPositionsRef.current = positions;
10856
+ draw();
10857
+ });
10858
+ }, [isSide, interpolateUnits, unitInterp, draw]);
10824
10859
  useEffect(() => {
10825
10860
  if (isSide) return;
10826
10861
  draw();
@@ -11196,7 +11231,7 @@ function LinearView({
11196
11231
  /* @__PURE__ */ jsx(HStack, { className: "flex-wrap items-center", gap: "xs", children: trait.states.map((state, i) => {
11197
11232
  const isDone = i < currentIdx;
11198
11233
  const isCurrent = i === currentIdx;
11199
- return /* @__PURE__ */ jsxs(React98__default.Fragment, { children: [
11234
+ return /* @__PURE__ */ jsxs(React97__default.Fragment, { children: [
11200
11235
  i > 0 && /* @__PURE__ */ jsx(
11201
11236
  Typography,
11202
11237
  {
@@ -11710,6 +11745,8 @@ function SequenceBar({
11710
11745
  maxSlots,
11711
11746
  onSlotDrop,
11712
11747
  onSlotRemove,
11748
+ slotDropEvent,
11749
+ slotRemoveEvent,
11713
11750
  playing = false,
11714
11751
  currentStep = -1,
11715
11752
  categoryColors,
@@ -11717,16 +11754,19 @@ function SequenceBar({
11717
11754
  size = "lg",
11718
11755
  className
11719
11756
  }) {
11757
+ const { emit } = useEventBus();
11720
11758
  const handleDrop = useCallback((index) => (item) => {
11721
11759
  if (playing) return;
11722
- onSlotDrop(index, item);
11723
- }, [onSlotDrop, playing]);
11760
+ if (slotDropEvent) emit(`UI:${slotDropEvent}`, { slotNumber: index, itemId: item.id });
11761
+ else onSlotDrop?.(index, item);
11762
+ }, [emit, slotDropEvent, onSlotDrop, playing]);
11724
11763
  const handleRemove = useCallback((index) => () => {
11725
11764
  if (playing) return;
11726
- onSlotRemove(index);
11727
- }, [onSlotRemove, playing]);
11765
+ if (slotRemoveEvent) emit(`UI:${slotRemoveEvent}`, { slotNumber: index });
11766
+ else onSlotRemove?.(index);
11767
+ }, [emit, slotRemoveEvent, onSlotRemove, playing]);
11728
11768
  const paddedSlots = Array.from({ length: maxSlots }, (_, i) => slots[i]);
11729
- return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(React98__default.Fragment, { children: [
11769
+ return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(React97__default.Fragment, { children: [
11730
11770
  i > 0 && /* @__PURE__ */ jsx(
11731
11771
  Typography,
11732
11772
  {
@@ -11756,9 +11796,10 @@ function SequenceBar({
11756
11796
  ] }, i)) });
11757
11797
  }
11758
11798
  var init_SequenceBar = __esm({
11759
- "components/game/2d/organisms/SequenceBar.tsx"() {
11799
+ "components/game/2d/molecules/SequenceBar.tsx"() {
11760
11800
  init_atoms();
11761
11801
  init_cn();
11802
+ init_useEventBus();
11762
11803
  init_TraitSlot();
11763
11804
  SequenceBar.displayName = "SequenceBar";
11764
11805
  }
@@ -13763,227 +13804,6 @@ var init_NegotiatorBoard = __esm({
13763
13804
  NegotiatorBoard.displayName = "NegotiatorBoard";
13764
13805
  }
13765
13806
  });
13766
-
13767
- // components/game/shared/lib/mechanics.ts
13768
- var projectileMotion, pendulum, springOscillator;
13769
- var init_mechanics = __esm({
13770
- "components/game/shared/lib/mechanics.ts"() {
13771
- projectileMotion = {
13772
- id: "mechanics-projectile",
13773
- name: "Projectile Motion",
13774
- description: "Launch a ball and observe parabolic trajectory under gravity.",
13775
- domain: "natural",
13776
- gravity: { x: 0, y: 9.81 },
13777
- bodies: [
13778
- { id: "ball", x: 50, y: 350, vx: 80, vy: -120, mass: 1, radius: 10, color: "#e94560", fixed: false },
13779
- { id: "ground", x: 300, y: 390, vx: 0, vy: 0, mass: 1e3, radius: 400, color: "#333", fixed: true }
13780
- ],
13781
- showVelocity: true,
13782
- parameters: {
13783
- angle: { value: 45, min: 0, max: 90, step: 1, label: "Launch angle (deg)" },
13784
- velocity: { value: 100, min: 10, max: 200, step: 5, label: "Initial velocity (m/s)" },
13785
- gravity: { value: 9.81, min: 0, max: 20, step: 0.1, label: "Gravity (m/s\xB2)" }
13786
- }
13787
- };
13788
- pendulum = {
13789
- id: "mechanics-pendulum",
13790
- name: "Simple Pendulum",
13791
- description: "A mass on a string swinging under gravity.",
13792
- domain: "natural",
13793
- gravity: { x: 0, y: 9.81 },
13794
- bodies: [
13795
- { id: "pivot", x: 300, y: 50, vx: 0, vy: 0, mass: 1e3, radius: 5, color: "#888", fixed: true },
13796
- { id: "bob", x: 400, y: 200, vx: 0, vy: 0, mass: 5, radius: 15, color: "#e94560", fixed: false }
13797
- ],
13798
- constraints: [{ bodyA: 0, bodyB: 1, length: 180, stiffness: 1 }],
13799
- parameters: {
13800
- length: { value: 180, min: 50, max: 300, step: 10, label: "String length (px)" },
13801
- mass: { value: 5, min: 1, max: 20, step: 0.5, label: "Mass (kg)" },
13802
- gravity: { value: 9.81, min: 0, max: 20, step: 0.1, label: "Gravity (m/s\xB2)" }
13803
- }
13804
- };
13805
- springOscillator = {
13806
- id: "mechanics-spring",
13807
- name: "Spring Oscillator",
13808
- description: "A mass bouncing on a spring \u2014 simple harmonic motion.",
13809
- domain: "natural",
13810
- gravity: { x: 0, y: 0 },
13811
- bodies: [
13812
- { id: "anchor", x: 300, y: 50, vx: 0, vy: 0, mass: 1e3, radius: 8, color: "#888", fixed: true },
13813
- { id: "mass", x: 300, y: 250, vx: 0, vy: 0, mass: 2, radius: 20, color: "#0f3460", fixed: false }
13814
- ],
13815
- constraints: [{ bodyA: 0, bodyB: 1, length: 150, stiffness: 0.5 }],
13816
- parameters: {
13817
- stiffness: { value: 0.5, min: 0.1, max: 2, step: 0.05, label: "Spring stiffness (k)" },
13818
- mass: { value: 2, min: 0.5, max: 10, step: 0.5, label: "Mass (kg)" },
13819
- damping: { value: 0, min: 0, max: 0.5, step: 0.01, label: "Damping" }
13820
- }
13821
- };
13822
- }
13823
- });
13824
-
13825
- // components/game/shared/lib/physicsPresets.ts
13826
- var init_physicsPresets = __esm({
13827
- "components/game/shared/lib/physicsPresets.ts"() {
13828
- init_mechanics();
13829
- }
13830
- });
13831
- function resolvePreset(preset) {
13832
- if (typeof preset !== "string") return preset;
13833
- return PRESET_BY_ID[preset] ?? projectileMotion;
13834
- }
13835
- function SimulationCanvas({
13836
- preset: presetProp,
13837
- width = 600,
13838
- height = 400,
13839
- bodies: externalBodies,
13840
- className
13841
- }) {
13842
- const preset = useMemo(() => resolvePreset(presetProp), [presetProp]);
13843
- const canvasRef = useRef(null);
13844
- const bodiesRef = useRef(structuredClone(preset.bodies));
13845
- const interp = useRenderInterpolation();
13846
- useEffect(() => {
13847
- bodiesRef.current = structuredClone(preset.bodies);
13848
- }, [preset]);
13849
- const draw = useCallback(() => {
13850
- const canvas = canvasRef.current;
13851
- if (!canvas) return;
13852
- const ctx = canvas.getContext("2d");
13853
- if (!ctx) return;
13854
- const bodies = bodiesRef.current;
13855
- ctx.clearRect(0, 0, width, height);
13856
- ctx.fillStyle = preset.backgroundColor ?? "#1a1a2e";
13857
- ctx.fillRect(0, 0, width, height);
13858
- if (preset.constraints) {
13859
- for (const c of preset.constraints) {
13860
- const a = bodies[c.bodyA];
13861
- const b = bodies[c.bodyB];
13862
- if (a && b) {
13863
- ctx.beginPath();
13864
- ctx.moveTo(a.x, a.y);
13865
- ctx.lineTo(b.x, b.y);
13866
- ctx.strokeStyle = "#533483";
13867
- ctx.lineWidth = 1;
13868
- ctx.setLineDash([4, 4]);
13869
- ctx.stroke();
13870
- ctx.setLineDash([]);
13871
- }
13872
- }
13873
- }
13874
- for (const body of bodies) {
13875
- ctx.beginPath();
13876
- ctx.arc(body.x, body.y, body.radius, 0, Math.PI * 2);
13877
- ctx.fillStyle = body.color ?? "#e94560";
13878
- ctx.fill();
13879
- if (preset.showVelocity) {
13880
- ctx.beginPath();
13881
- ctx.moveTo(body.x, body.y);
13882
- ctx.lineTo(body.x + body.vx * 0.1, body.y + body.vy * 0.1);
13883
- ctx.strokeStyle = "#16213e";
13884
- ctx.lineWidth = 2;
13885
- ctx.stroke();
13886
- }
13887
- }
13888
- }, [width, height, preset]);
13889
- useEffect(() => {
13890
- if (!externalBodies) return;
13891
- interp.onSnapshot(externalBodies.map((b) => ({ id: b.id, x: b.x, y: b.y })));
13892
- }, [externalBodies]);
13893
- const presetRef = useRef(preset);
13894
- presetRef.current = preset;
13895
- const widthRef = useRef(width);
13896
- widthRef.current = width;
13897
- const heightRef = useRef(height);
13898
- heightRef.current = height;
13899
- useEffect(() => {
13900
- if (!externalBodies) return;
13901
- const drawInterpolated = (positions) => {
13902
- const canvas = canvasRef.current;
13903
- if (!canvas) return;
13904
- const ctx = canvas.getContext("2d");
13905
- if (!ctx) return;
13906
- const bodies = bodiesRef.current;
13907
- const p = presetRef.current;
13908
- const w = widthRef.current;
13909
- const h = heightRef.current;
13910
- ctx.clearRect(0, 0, w, h);
13911
- ctx.fillStyle = p.backgroundColor ?? "#1a1a2e";
13912
- ctx.fillRect(0, 0, w, h);
13913
- if (p.constraints) {
13914
- for (const c of p.constraints) {
13915
- const a = bodies[c.bodyA];
13916
- const b = bodies[c.bodyB];
13917
- if (a && b) {
13918
- const aPos = positions.get(a.id) ?? a;
13919
- const bPos = positions.get(b.id) ?? b;
13920
- ctx.beginPath();
13921
- ctx.moveTo(aPos.x, aPos.y);
13922
- ctx.lineTo(bPos.x, bPos.y);
13923
- ctx.strokeStyle = "#533483";
13924
- ctx.lineWidth = 1;
13925
- ctx.setLineDash([4, 4]);
13926
- ctx.stroke();
13927
- ctx.setLineDash([]);
13928
- }
13929
- }
13930
- }
13931
- for (const body of bodies) {
13932
- const pos = positions.get(body.id) ?? body;
13933
- ctx.beginPath();
13934
- ctx.arc(pos.x, pos.y, body.radius, 0, Math.PI * 2);
13935
- ctx.fillStyle = body.color ?? "#e94560";
13936
- ctx.fill();
13937
- if (p.showVelocity) {
13938
- ctx.beginPath();
13939
- ctx.moveTo(pos.x, pos.y);
13940
- ctx.lineTo(pos.x + body.vx * 0.1, pos.y + body.vy * 0.1);
13941
- ctx.strokeStyle = "#16213e";
13942
- ctx.lineWidth = 2;
13943
- ctx.stroke();
13944
- }
13945
- }
13946
- };
13947
- return interp.startLoop(drawInterpolated);
13948
- }, [externalBodies !== void 0, interp.startLoop]);
13949
- useEffect(() => {
13950
- draw();
13951
- }, [draw]);
13952
- useEffect(() => {
13953
- if (typeof window === "undefined") return;
13954
- const canvas = canvasRef.current;
13955
- if (!canvas) return;
13956
- bindCanvasCapture(() => canvas.toDataURL("image/png"));
13957
- return () => {
13958
- bindCanvasCapture(() => null);
13959
- };
13960
- }, []);
13961
- return /* @__PURE__ */ jsx(Box, { className: cn("flex justify-center", className), children: /* @__PURE__ */ jsx(
13962
- "canvas",
13963
- {
13964
- ref: canvasRef,
13965
- width,
13966
- height,
13967
- className: "rounded-container block max-w-full h-auto"
13968
- }
13969
- ) });
13970
- }
13971
- var PRESET_BY_ID;
13972
- var init_SimulationCanvas = __esm({
13973
- "components/game/2d/organisms/SimulationCanvas.tsx"() {
13974
- init_cn();
13975
- init_atoms();
13976
- init_verificationRegistry();
13977
- init_physicsPresets();
13978
- init_useRenderInterpolation();
13979
- PRESET_BY_ID = {
13980
- "mechanics-projectile": projectileMotion,
13981
- "mechanics-pendulum": pendulum,
13982
- "mechanics-spring": springOscillator
13983
- };
13984
- SimulationCanvas.displayName = "SimulationCanvas";
13985
- }
13986
- });
13987
13807
  var GameTemplate;
13988
13808
  var init_GameTemplate = __esm({
13989
13809
  "components/game/2d/templates/GameTemplate.tsx"() {
@@ -14592,7 +14412,7 @@ var init_ErrorBoundary = __esm({
14592
14412
  }
14593
14413
  );
14594
14414
  };
14595
- ErrorBoundary = class extends React98__default.Component {
14415
+ ErrorBoundary = class extends React97__default.Component {
14596
14416
  constructor(props) {
14597
14417
  super(props);
14598
14418
  __publicField(this, "reset", () => {
@@ -15257,7 +15077,7 @@ var init_Container = __esm({
15257
15077
  as: Component = "div"
15258
15078
  }) => {
15259
15079
  const resolvedSize = maxWidth ?? size ?? "lg";
15260
- return React98__default.createElement(
15080
+ return React97__default.createElement(
15261
15081
  Component,
15262
15082
  {
15263
15083
  className: cn(
@@ -17925,7 +17745,7 @@ var init_CodeBlock = __esm({
17925
17745
  DIFF_STYLE_FALLBACK = { bg: "", prefix: " ", text: "text-foreground" };
17926
17746
  LINE_PROPS_FN = (n) => ({ "data-line": String(n - 1) });
17927
17747
  HIDDEN_LINE_NUMBERS = { display: "none" };
17928
- CodeBlock = React98__default.memo(
17748
+ CodeBlock = React97__default.memo(
17929
17749
  ({
17930
17750
  code: rawCode,
17931
17751
  language = "text",
@@ -18512,7 +18332,7 @@ var init_MarkdownContent = __esm({
18512
18332
  init_Box();
18513
18333
  init_CodeBlock();
18514
18334
  init_cn();
18515
- MarkdownContent = React98__default.memo(
18335
+ MarkdownContent = React97__default.memo(
18516
18336
  ({ content, direction = "ltr", className }) => {
18517
18337
  const { t: _t } = useTranslate();
18518
18338
  const safeContent = typeof content === "string" ? content : String(content ?? "");
@@ -19839,7 +19659,7 @@ var init_StateMachineView = __esm({
19839
19659
  style: { top: title ? 30 : 0 },
19840
19660
  children: [
19841
19661
  entity && /* @__PURE__ */ jsx(EntityBox, { entity, config }),
19842
- states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(React98__default.Fragment, { children: renderStateNode(state, config) }, state.id) : /* @__PURE__ */ jsx(
19662
+ states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(React97__default.Fragment, { children: renderStateNode(state, config) }, state.id) : /* @__PURE__ */ jsx(
19843
19663
  StateNode2,
19844
19664
  {
19845
19665
  state,
@@ -25477,8 +25297,8 @@ var init_Menu = __esm({
25477
25297
  "bottom-end": "bottom-start"
25478
25298
  };
25479
25299
  const effectivePosition = direction === "rtl" ? rtlMirror[position] ?? position : position;
25480
- const triggerChild = React98__default.isValidElement(trigger) ? trigger : /* @__PURE__ */ jsx(Typography, { variant: "small", as: "span", children: trigger });
25481
- const triggerElement = React98__default.cloneElement(
25300
+ const triggerChild = React97__default.isValidElement(trigger) ? trigger : /* @__PURE__ */ jsx(Typography, { variant: "small", as: "span", children: trigger });
25301
+ const triggerElement = React97__default.cloneElement(
25482
25302
  triggerChild,
25483
25303
  {
25484
25304
  ref: triggerRef,
@@ -25573,14 +25393,14 @@ function useDataDnd(args) {
25573
25393
  const isZone = Boolean(dragGroup || accepts || sortable);
25574
25394
  const enabled = isZone || Boolean(dndRoot);
25575
25395
  const eventBus = useEventBus();
25576
- const parentRoot = React98__default.useContext(RootCtx);
25396
+ const parentRoot = React97__default.useContext(RootCtx);
25577
25397
  const isRoot = enabled && parentRoot === null;
25578
- const zoneId = React98__default.useId();
25398
+ const zoneId = React97__default.useId();
25579
25399
  const ownGroup = dragGroup ?? accepts ?? zoneId;
25580
- const [optimisticOrders, setOptimisticOrders] = React98__default.useState(() => /* @__PURE__ */ new Map());
25581
- const optimisticOrdersRef = React98__default.useRef(optimisticOrders);
25400
+ const [optimisticOrders, setOptimisticOrders] = React97__default.useState(() => /* @__PURE__ */ new Map());
25401
+ const optimisticOrdersRef = React97__default.useRef(optimisticOrders);
25582
25402
  optimisticOrdersRef.current = optimisticOrders;
25583
- const clearOptimisticOrder = React98__default.useCallback((group) => {
25403
+ const clearOptimisticOrder = React97__default.useCallback((group) => {
25584
25404
  setOptimisticOrders((prev) => {
25585
25405
  if (!prev.has(group)) return prev;
25586
25406
  const next = new Map(prev);
@@ -25605,7 +25425,7 @@ function useDataDnd(args) {
25605
25425
  const raw = it[dndItemIdField];
25606
25426
  return raw != null ? String(raw) : `__idx_${idx}`;
25607
25427
  }).join("|");
25608
- const itemIds = React98__default.useMemo(
25428
+ const itemIds = React97__default.useMemo(
25609
25429
  () => orderedItems.map((it, idx) => {
25610
25430
  const raw = it[dndItemIdField];
25611
25431
  return raw != null ? String(raw) : `__idx_${idx}`;
@@ -25616,7 +25436,7 @@ function useDataDnd(args) {
25616
25436
  const raw = it[dndItemIdField];
25617
25437
  return raw != null ? String(raw) : `__${idx}`;
25618
25438
  }).join("|");
25619
- React98__default.useEffect(() => {
25439
+ React97__default.useEffect(() => {
25620
25440
  const root = isRoot ? null : parentRoot;
25621
25441
  if (root) {
25622
25442
  root.clearOptimisticOrder(ownGroup);
@@ -25624,20 +25444,20 @@ function useDataDnd(args) {
25624
25444
  clearOptimisticOrder(ownGroup);
25625
25445
  }
25626
25446
  }, [itemsContentSig, ownGroup]);
25627
- const zonesRef = React98__default.useRef(/* @__PURE__ */ new Map());
25628
- const registerZone = React98__default.useCallback((zoneId2, meta2) => {
25447
+ const zonesRef = React97__default.useRef(/* @__PURE__ */ new Map());
25448
+ const registerZone = React97__default.useCallback((zoneId2, meta2) => {
25629
25449
  zonesRef.current.set(zoneId2, meta2);
25630
25450
  }, []);
25631
- const unregisterZone = React98__default.useCallback((zoneId2) => {
25451
+ const unregisterZone = React97__default.useCallback((zoneId2) => {
25632
25452
  zonesRef.current.delete(zoneId2);
25633
25453
  }, []);
25634
- const [activeDrag, setActiveDrag] = React98__default.useState(null);
25635
- const [overZoneGroup, setOverZoneGroup] = React98__default.useState(null);
25636
- const meta = React98__default.useMemo(
25454
+ const [activeDrag, setActiveDrag] = React97__default.useState(null);
25455
+ const [overZoneGroup, setOverZoneGroup] = React97__default.useState(null);
25456
+ const meta = React97__default.useMemo(
25637
25457
  () => ({ group: ownGroup, dropEvent, reorderEvent, positionEvent, itemIds, rawItems: items, idField: dndItemIdField }),
25638
25458
  [ownGroup, dropEvent, reorderEvent, positionEvent, itemIds, items, dndItemIdField]
25639
25459
  );
25640
- React98__default.useEffect(() => {
25460
+ React97__default.useEffect(() => {
25641
25461
  const target = isRoot ? null : parentRoot;
25642
25462
  if (!target) {
25643
25463
  zonesRef.current.set(zoneId, meta);
@@ -25656,7 +25476,7 @@ function useDataDnd(args) {
25656
25476
  }, [parentRoot, isRoot, zoneId, meta]);
25657
25477
  const sensors = useAlmadarDndSensors(true);
25658
25478
  const collisionDetection = almadarDndCollisionDetection;
25659
- const findZoneByItem = React98__default.useCallback(
25479
+ const findZoneByItem = React97__default.useCallback(
25660
25480
  (id) => {
25661
25481
  for (const z of zonesRef.current.values()) {
25662
25482
  if (z.itemIds.includes(id)) return z;
@@ -25665,7 +25485,7 @@ function useDataDnd(args) {
25665
25485
  },
25666
25486
  []
25667
25487
  );
25668
- React98__default.useCallback(
25488
+ React97__default.useCallback(
25669
25489
  (group) => {
25670
25490
  for (const z of zonesRef.current.values()) {
25671
25491
  if (z.group === group) return z;
@@ -25674,7 +25494,7 @@ function useDataDnd(args) {
25674
25494
  },
25675
25495
  []
25676
25496
  );
25677
- const handleDragEnd = React98__default.useCallback(
25497
+ const handleDragEnd = React97__default.useCallback(
25678
25498
  (event) => {
25679
25499
  const { active, over } = event;
25680
25500
  const activeIdStr = String(active.id);
@@ -25765,8 +25585,8 @@ function useDataDnd(args) {
25765
25585
  },
25766
25586
  [eventBus]
25767
25587
  );
25768
- const sortableData = React98__default.useMemo(() => ({ dndGroup: ownGroup }), [ownGroup]);
25769
- const SortableItem = React98__default.useCallback(
25588
+ const sortableData = React97__default.useMemo(() => ({ dndGroup: ownGroup }), [ownGroup]);
25589
+ const SortableItem = React97__default.useCallback(
25770
25590
  ({ id, children }) => {
25771
25591
  const {
25772
25592
  attributes,
@@ -25806,7 +25626,7 @@ function useDataDnd(args) {
25806
25626
  id: droppableId,
25807
25627
  data: sortableData
25808
25628
  });
25809
- const ctx = React98__default.useContext(RootCtx);
25629
+ const ctx = React97__default.useContext(RootCtx);
25810
25630
  const activeDrag2 = ctx?.activeDrag ?? null;
25811
25631
  const overZoneGroup2 = ctx?.overZoneGroup ?? null;
25812
25632
  const isThisZoneOver = overZoneGroup2 === ownGroup;
@@ -25821,7 +25641,7 @@ function useDataDnd(args) {
25821
25641
  showForeignPlaceholder,
25822
25642
  ctxAvailable: ctx != null
25823
25643
  });
25824
- React98__default.useEffect(() => {
25644
+ React97__default.useEffect(() => {
25825
25645
  dndLog.info("dropzone:isOver:change", { droppableId, group: ownGroup, isOver, isThisZoneOver, showForeignPlaceholder, activeDragSourceGroup: activeDrag2?.sourceGroup ?? null });
25826
25646
  }, [droppableId, isOver, isThisZoneOver, showForeignPlaceholder]);
25827
25647
  return /* @__PURE__ */ jsx(
@@ -25835,11 +25655,11 @@ function useDataDnd(args) {
25835
25655
  }
25836
25656
  );
25837
25657
  };
25838
- const rootContextValue = React98__default.useMemo(
25658
+ const rootContextValue = React97__default.useMemo(
25839
25659
  () => ({ registerZone, unregisterZone, activeDrag, overZoneGroup, optimisticOrders, clearOptimisticOrder }),
25840
25660
  [registerZone, unregisterZone, activeDrag, overZoneGroup, optimisticOrders, clearOptimisticOrder]
25841
25661
  );
25842
- const handleDragStart = React98__default.useCallback((event) => {
25662
+ const handleDragStart = React97__default.useCallback((event) => {
25843
25663
  const sourceZone = findZoneByItem(event.active.id);
25844
25664
  const rect = event.active.rect.current.initial;
25845
25665
  const height = rect?.height && rect.height > 0 ? rect.height : 64;
@@ -25858,7 +25678,7 @@ function useDataDnd(args) {
25858
25678
  isRoot
25859
25679
  });
25860
25680
  }, [findZoneByItem, isRoot, zoneId]);
25861
- const handleDragOver = React98__default.useCallback((event) => {
25681
+ const handleDragOver = React97__default.useCallback((event) => {
25862
25682
  const { active, over } = event;
25863
25683
  const overData = over?.data?.current;
25864
25684
  const overGroup = overData?.dndGroup ?? null;
@@ -25928,7 +25748,7 @@ function useDataDnd(args) {
25928
25748
  return next;
25929
25749
  });
25930
25750
  }, []);
25931
- const handleDragCancel = React98__default.useCallback((event) => {
25751
+ const handleDragCancel = React97__default.useCallback((event) => {
25932
25752
  setActiveDrag(null);
25933
25753
  setOverZoneGroup(null);
25934
25754
  dndLog.warn("dragCancel", {
@@ -25936,12 +25756,12 @@ function useDataDnd(args) {
25936
25756
  reason: "dnd-kit cancelled the drag (escape key, pointer interrupted, or external)"
25937
25757
  });
25938
25758
  }, []);
25939
- const handleDragEndWithCleanup = React98__default.useCallback((event) => {
25759
+ const handleDragEndWithCleanup = React97__default.useCallback((event) => {
25940
25760
  handleDragEnd(event);
25941
25761
  setActiveDrag(null);
25942
25762
  setOverZoneGroup(null);
25943
25763
  }, [handleDragEnd]);
25944
- const wrapContainer = React98__default.useCallback(
25764
+ const wrapContainer = React97__default.useCallback(
25945
25765
  (children) => {
25946
25766
  if (!enabled) return children;
25947
25767
  const strategy = layout === "grid" ? rectSortingStrategy : verticalListSortingStrategy;
@@ -25995,7 +25815,7 @@ var init_useDataDnd = __esm({
25995
25815
  init_useAlmadarDndCollision();
25996
25816
  init_Box();
25997
25817
  dndLog = createLogger("almadar:ui:dnd");
25998
- RootCtx = React98__default.createContext(null);
25818
+ RootCtx = React97__default.createContext(null);
25999
25819
  }
26000
25820
  });
26001
25821
  function renderIconInput(icon, props) {
@@ -26521,7 +26341,7 @@ function DataList({
26521
26341
  }) {
26522
26342
  const eventBus = useEventBus();
26523
26343
  const { t } = useTranslate();
26524
- const [visibleCount, setVisibleCount] = React98__default.useState(pageSize || Infinity);
26344
+ const [visibleCount, setVisibleCount] = React97__default.useState(pageSize || Infinity);
26525
26345
  const fieldDefs = fields ?? columns ?? [];
26526
26346
  const allDataRaw = Array.isArray(entity) ? entity : entity ? [entity] : [];
26527
26347
  const dnd = useDataDnd({
@@ -26540,7 +26360,7 @@ function DataList({
26540
26360
  const data = pageSize > 0 ? allData.slice(0, visibleCount) : allData;
26541
26361
  const hasMoreLocal = pageSize > 0 && visibleCount < allData.length;
26542
26362
  const hasRenderProp = typeof children === "function";
26543
- React98__default.useEffect(() => {
26363
+ React97__default.useEffect(() => {
26544
26364
  const renderItemTypeOf = typeof schemaRenderItem;
26545
26365
  const childrenTypeOf = typeof children;
26546
26366
  if (data.length > 0 && !hasRenderProp) {
@@ -26644,7 +26464,7 @@ function DataList({
26644
26464
  const items2 = [...data];
26645
26465
  const groups2 = groupBy ? groupData(items2, groupBy) : [{ label: "", items: items2 }];
26646
26466
  const contentField = titleField?.name ?? fieldDefs[0]?.name ?? "";
26647
- return /* @__PURE__ */ jsx(VStack, { gap: "sm", className: cn("py-2", className), children: groups2.map((group, gi) => /* @__PURE__ */ jsxs(React98__default.Fragment, { children: [
26467
+ return /* @__PURE__ */ jsx(VStack, { gap: "sm", className: cn("py-2", className), children: groups2.map((group, gi) => /* @__PURE__ */ jsxs(React97__default.Fragment, { children: [
26648
26468
  group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: "my-2" }),
26649
26469
  group.items.map((itemData, index) => {
26650
26470
  const id = itemData.id || `${gi}-${index}`;
@@ -26785,7 +26605,7 @@ function DataList({
26785
26605
  className
26786
26606
  ),
26787
26607
  children: [
26788
- groups.map((group, gi) => /* @__PURE__ */ jsxs(React98__default.Fragment, { children: [
26608
+ groups.map((group, gi) => /* @__PURE__ */ jsxs(React97__default.Fragment, { children: [
26789
26609
  group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-4" : "mt-0" }),
26790
26610
  group.items.map(
26791
26611
  (itemData, index) => renderItem(itemData, index, gi === groups.length - 1 && index === group.items.length - 1)
@@ -26870,7 +26690,7 @@ var init_FormSection = __esm({
26870
26690
  columns = 1,
26871
26691
  className
26872
26692
  }) => {
26873
- const [collapsed, setCollapsed] = React98__default.useState(defaultCollapsed);
26693
+ const [collapsed, setCollapsed] = React97__default.useState(defaultCollapsed);
26874
26694
  const { t } = useTranslate();
26875
26695
  const eventBus = useEventBus();
26876
26696
  const gridClass = {
@@ -26878,7 +26698,7 @@ var init_FormSection = __esm({
26878
26698
  2: "grid-cols-1 md:grid-cols-2",
26879
26699
  3: "grid-cols-1 md:grid-cols-2 lg:grid-cols-3"
26880
26700
  }[columns];
26881
- React98__default.useCallback(() => {
26701
+ React97__default.useCallback(() => {
26882
26702
  if (collapsible) {
26883
26703
  setCollapsed((prev) => !prev);
26884
26704
  eventBus.emit("UI:TOGGLE_COLLAPSE", { collapsed: !collapsed });
@@ -27828,7 +27648,7 @@ var init_Flex = __esm({
27828
27648
  flexStyle.flexBasis = typeof basis === "number" ? `${basis}px` : basis;
27829
27649
  }
27830
27650
  }
27831
- return React98__default.createElement(Component, {
27651
+ return React97__default.createElement(Component, {
27832
27652
  className: cn(
27833
27653
  inline ? "inline-flex" : "flex",
27834
27654
  directionStyles[direction],
@@ -27947,7 +27767,7 @@ var init_Grid = __esm({
27947
27767
  as: Component = "div"
27948
27768
  }) => {
27949
27769
  const mergedStyle = rows2 ? { gridTemplateRows: `repeat(${rows2}, minmax(0, 1fr))`, ...style } : style;
27950
- return React98__default.createElement(
27770
+ return React97__default.createElement(
27951
27771
  Component,
27952
27772
  {
27953
27773
  className: cn(
@@ -28143,9 +27963,9 @@ var init_Popover = __esm({
28143
27963
  onMouseLeave: handleClose,
28144
27964
  onPointerDown: tapTriggerProps.onPointerDown
28145
27965
  };
28146
- const childElement = React98__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
27966
+ const childElement = React97__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
28147
27967
  const childPointerDown = childElement.props.onPointerDown;
28148
- const triggerElement = React98__default.cloneElement(
27968
+ const triggerElement = React97__default.cloneElement(
28149
27969
  childElement,
28150
27970
  {
28151
27971
  ref: triggerRef,
@@ -28747,9 +28567,9 @@ var init_Tooltip = __esm({
28747
28567
  if (hideTimeoutRef.current) clearTimeout(hideTimeoutRef.current);
28748
28568
  };
28749
28569
  }, []);
28750
- const triggerElement = React98__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
28570
+ const triggerElement = React97__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
28751
28571
  const childPointerDown = triggerElement.props.onPointerDown;
28752
- const trigger = React98__default.cloneElement(triggerElement, {
28572
+ const trigger = React97__default.cloneElement(triggerElement, {
28753
28573
  ref: triggerRef,
28754
28574
  onMouseEnter: handleMouseEnter,
28755
28575
  onMouseLeave: handleMouseLeave,
@@ -28839,7 +28659,7 @@ var init_WizardProgress = __esm({
28839
28659
  children: /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: normalizedSteps.map((step, index) => {
28840
28660
  const isActive = index === currentStep;
28841
28661
  const isCompleted = index < currentStep;
28842
- return /* @__PURE__ */ jsxs(React98__default.Fragment, { children: [
28662
+ return /* @__PURE__ */ jsxs(React97__default.Fragment, { children: [
28843
28663
  /* @__PURE__ */ jsx(
28844
28664
  "button",
28845
28665
  {
@@ -30399,13 +30219,13 @@ var init_MapView = __esm({
30399
30219
  shadowSize: [41, 41]
30400
30220
  });
30401
30221
  L.Marker.prototype.options.icon = defaultIcon;
30402
- const { useEffect: useEffect68, useRef: useRef65, useCallback: useCallback104, useState: useState98 } = React98__default;
30222
+ const { useEffect: useEffect67, useRef: useRef64, useCallback: useCallback103, useState: useState98 } = React97__default;
30403
30223
  const { Typography: Typography2 } = await Promise.resolve().then(() => (init_Typography(), Typography_exports));
30404
30224
  const { useEventBus: useEventBus2 } = await Promise.resolve().then(() => (init_useEventBus(), useEventBus_exports));
30405
30225
  function MapUpdater({ centerLat, centerLng, zoom }) {
30406
30226
  const map = useMap();
30407
- const prevRef = useRef65({ centerLat, centerLng, zoom });
30408
- useEffect68(() => {
30227
+ const prevRef = useRef64({ centerLat, centerLng, zoom });
30228
+ useEffect67(() => {
30409
30229
  const prev = prevRef.current;
30410
30230
  if (prev.centerLat !== centerLat || prev.centerLng !== centerLng || prev.zoom !== zoom) {
30411
30231
  map.setView([centerLat, centerLng], zoom);
@@ -30416,7 +30236,7 @@ var init_MapView = __esm({
30416
30236
  }
30417
30237
  function MapClickHandler({ onMapClick }) {
30418
30238
  const map = useMap();
30419
- useEffect68(() => {
30239
+ useEffect67(() => {
30420
30240
  if (!onMapClick) return;
30421
30241
  const handler = (e) => {
30422
30242
  onMapClick(e.latlng.lat, e.latlng.lng);
@@ -30445,7 +30265,7 @@ var init_MapView = __esm({
30445
30265
  }) {
30446
30266
  const eventBus = useEventBus2();
30447
30267
  const [clickedPosition, setClickedPosition] = useState98(null);
30448
- const handleMapClick = useCallback104((lat, lng) => {
30268
+ const handleMapClick = useCallback103((lat, lng) => {
30449
30269
  if (showClickedPin) {
30450
30270
  setClickedPosition({ lat, lng });
30451
30271
  }
@@ -30454,7 +30274,7 @@ var init_MapView = __esm({
30454
30274
  eventBus.emit(`UI:${mapClickEvent}`, { latitude: lat, longitude: lng });
30455
30275
  }
30456
30276
  }, [onMapClick, mapClickEvent, eventBus, showClickedPin]);
30457
- const handleMarkerClick = useCallback104((marker) => {
30277
+ const handleMarkerClick = useCallback103((marker) => {
30458
30278
  onMarkerClick?.(marker);
30459
30279
  if (markerClickEvent) {
30460
30280
  eventBus.emit(`UI:${markerClickEvent}`, { ...marker });
@@ -31314,8 +31134,8 @@ function TableView({
31314
31134
  }) {
31315
31135
  const eventBus = useEventBus();
31316
31136
  const { t } = useTranslate();
31317
- const [visibleCount, setVisibleCount] = React98__default.useState(pageSize > 0 ? pageSize : Infinity);
31318
- const [localSelected, setLocalSelected] = React98__default.useState(/* @__PURE__ */ new Set());
31137
+ const [visibleCount, setVisibleCount] = React97__default.useState(pageSize > 0 ? pageSize : Infinity);
31138
+ const [localSelected, setLocalSelected] = React97__default.useState(/* @__PURE__ */ new Set());
31319
31139
  const colDefs = columns ?? fields ?? [];
31320
31140
  const allDataRaw = Array.isArray(entity) ? entity : entity ? [entity] : [];
31321
31141
  const dnd = useDataDnd({
@@ -31510,12 +31330,12 @@ function TableView({
31510
31330
  ]
31511
31331
  }
31512
31332
  );
31513
- return dnd.isZone ? /* @__PURE__ */ jsx(dnd.SortableItem, { id: row[idField] ?? id, children: rowInner }, id) : /* @__PURE__ */ jsx(React98__default.Fragment, { children: rowInner }, id);
31333
+ return dnd.isZone ? /* @__PURE__ */ jsx(dnd.SortableItem, { id: row[idField] ?? id, children: rowInner }, id) : /* @__PURE__ */ jsx(React97__default.Fragment, { children: rowInner }, id);
31514
31334
  };
31515
31335
  const items = Array.from(data);
31516
31336
  const groups = groupBy ? groupData2(items, groupBy) : [{ label: "", items }];
31517
31337
  let runningIndex = 0;
31518
- const body = /* @__PURE__ */ jsx(Box, { role: "rowgroup", children: groups.map((group, gi) => /* @__PURE__ */ jsxs(React98__default.Fragment, { children: [
31338
+ const body = /* @__PURE__ */ jsx(Box, { role: "rowgroup", children: groups.map((group, gi) => /* @__PURE__ */ jsxs(React97__default.Fragment, { children: [
31519
31339
  group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-3" : "mt-0" }),
31520
31340
  group.items.map((row) => renderRow(row, runningIndex++))
31521
31341
  ] }, gi)) });
@@ -32872,7 +32692,7 @@ var init_StepFlow = __esm({
32872
32692
  className
32873
32693
  }) => {
32874
32694
  if (orientation === "vertical") {
32875
- return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(React98__default.Fragment, { children: /* @__PURE__ */ jsxs(HStack, { gap: "md", align: "start", className: "w-full", children: [
32695
+ return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(React97__default.Fragment, { children: /* @__PURE__ */ jsxs(HStack, { gap: "md", align: "start", className: "w-full", children: [
32876
32696
  /* @__PURE__ */ jsxs(VStack, { gap: "none", align: "center", children: [
32877
32697
  /* @__PURE__ */ jsx(StepCircle, { step, index }),
32878
32698
  showConnectors && index < steps.length - 1 && /* @__PURE__ */ jsx(Box, { className: "w-px h-8 bg-border" })
@@ -32883,7 +32703,7 @@ var init_StepFlow = __esm({
32883
32703
  ] })
32884
32704
  ] }) }, index)) });
32885
32705
  }
32886
- 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(React98__default.Fragment, { children: [
32706
+ 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(React97__default.Fragment, { children: [
32887
32707
  /* @__PURE__ */ jsxs(VStack, { gap: "sm", align: "center", className: "flex-1 w-full md:w-auto", children: [
32888
32708
  /* @__PURE__ */ jsx(StepCircle, { step, index }),
32889
32709
  /* @__PURE__ */ jsx(Typography, { variant: "h4", className: "text-center", children: step.title }),
@@ -33868,7 +33688,7 @@ var init_LikertScale = __esm({
33868
33688
  md: "text-base",
33869
33689
  lg: "text-lg"
33870
33690
  };
33871
- LikertScale = React98__default.forwardRef(
33691
+ LikertScale = React97__default.forwardRef(
33872
33692
  ({
33873
33693
  question,
33874
33694
  options = DEFAULT_LIKERT_OPTIONS,
@@ -33880,7 +33700,7 @@ var init_LikertScale = __esm({
33880
33700
  variant = "radios",
33881
33701
  className
33882
33702
  }, ref) => {
33883
- const groupId = React98__default.useId();
33703
+ const groupId = React97__default.useId();
33884
33704
  const eventBus = useEventBus();
33885
33705
  const handleSelect = useCallback(
33886
33706
  (next) => {
@@ -36162,7 +35982,7 @@ var init_DocBreadcrumb = __esm({
36162
35982
  "aria-label": t("aria.breadcrumb"),
36163
35983
  children: /* @__PURE__ */ jsx(HStack, { gap: "xs", align: "center", wrap: true, children: items.map((item, idx) => {
36164
35984
  const isLast = idx === items.length - 1;
36165
- return /* @__PURE__ */ jsxs(React98__default.Fragment, { children: [
35985
+ return /* @__PURE__ */ jsxs(React97__default.Fragment, { children: [
36166
35986
  idx > 0 && /* @__PURE__ */ jsx(
36167
35987
  Icon,
36168
35988
  {
@@ -37031,7 +36851,7 @@ var init_MiniStateMachine = __esm({
37031
36851
  const x = 2 + i * (NODE_W + GAP + ARROW_W + GAP);
37032
36852
  const tc = transitionCounts[s.name] ?? 0;
37033
36853
  const role = getStateRole(s.name, s.isInitial ?? void 0, s.isTerminal ?? void 0, tc, maxTC);
37034
- return /* @__PURE__ */ jsxs(React98__default.Fragment, { children: [
36854
+ return /* @__PURE__ */ jsxs(React97__default.Fragment, { children: [
37035
36855
  /* @__PURE__ */ jsx(
37036
36856
  AvlState,
37037
36857
  {
@@ -37235,7 +37055,7 @@ var init_PageHeader = __esm({
37235
37055
  info: "bg-info/10 text-info"
37236
37056
  };
37237
37057
  return /* @__PURE__ */ jsxs(Box, { className: cn("mb-6", className), children: [
37238
- 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(React98__default.Fragment, { children: [
37058
+ 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(React97__default.Fragment, { children: [
37239
37059
  idx > 0 && /* @__PURE__ */ jsx(Typography, { variant: "small", color: "muted", children: "/" }),
37240
37060
  crumb.href ? /* @__PURE__ */ jsx(
37241
37061
  "a",
@@ -37593,7 +37413,7 @@ var init_Section = __esm({
37593
37413
  as: Component = "section"
37594
37414
  }) => {
37595
37415
  const hasHeader = title || description || action;
37596
- return React98__default.createElement(
37416
+ return React97__default.createElement(
37597
37417
  Component,
37598
37418
  {
37599
37419
  className: cn(
@@ -37967,7 +37787,7 @@ var init_WizardContainer = __esm({
37967
37787
  const isCompleted = index < currentStep;
37968
37788
  const stepKey = step.id ?? step.tabId ?? `step-${index}`;
37969
37789
  const stepTitle = step.title ?? step.name ?? `Step ${index + 1}`;
37970
- return /* @__PURE__ */ jsxs(React98__default.Fragment, { children: [
37790
+ return /* @__PURE__ */ jsxs(React97__default.Fragment, { children: [
37971
37791
  /* @__PURE__ */ jsx(
37972
37792
  Button,
37973
37793
  {
@@ -40400,7 +40220,7 @@ var init_DetailPanel = __esm({
40400
40220
  }
40401
40221
  });
40402
40222
  function extractTitle(children) {
40403
- if (!React98__default.isValidElement(children)) return void 0;
40223
+ if (!React97__default.isValidElement(children)) return void 0;
40404
40224
  const props = children.props;
40405
40225
  if (typeof props.title === "string") {
40406
40226
  return props.title;
@@ -40750,12 +40570,12 @@ var init_Form = __esm({
40750
40570
  const isSchemaEntity = isOrbitalEntitySchema(entity);
40751
40571
  const resolvedEntity = isSchemaEntity ? entity : void 0;
40752
40572
  const entityName = typeof entity === "string" ? entity : resolvedEntity?.name;
40753
- const normalizedInitialData = React98__default.useMemo(() => {
40573
+ const normalizedInitialData = React97__default.useMemo(() => {
40754
40574
  const entityRowAsInitial = isPlainEntityRow(entity) ? entity : void 0;
40755
40575
  const callerInitial = initialData !== null && typeof initialData === "object" && !Array.isArray(initialData) ? initialData : {};
40756
40576
  return entityRowAsInitial !== void 0 ? { ...entityRowAsInitial, ...callerInitial } : callerInitial;
40757
40577
  }, [entity, initialData]);
40758
- const entityDerivedFields = React98__default.useMemo(() => {
40578
+ const entityDerivedFields = React97__default.useMemo(() => {
40759
40579
  if (fields && fields.length > 0) return void 0;
40760
40580
  if (!resolvedEntity) return void 0;
40761
40581
  return resolvedEntity.fields.map(
@@ -40776,16 +40596,16 @@ var init_Form = __esm({
40776
40596
  const conditionalFields = typeof conditionalFieldsRaw === "boolean" ? {} : conditionalFieldsRaw;
40777
40597
  const hiddenCalculations = typeof hiddenCalculationsRaw === "boolean" ? [] : hiddenCalculationsRaw;
40778
40598
  const violationTriggers = typeof violationTriggersRaw === "boolean" ? [] : violationTriggersRaw;
40779
- const [formData, setFormData] = React98__default.useState(
40599
+ const [formData, setFormData] = React97__default.useState(
40780
40600
  normalizedInitialData
40781
40601
  );
40782
- const [collapsedSections, setCollapsedSections] = React98__default.useState(
40602
+ const [collapsedSections, setCollapsedSections] = React97__default.useState(
40783
40603
  /* @__PURE__ */ new Set()
40784
40604
  );
40785
- const [submitError, setSubmitError] = React98__default.useState(null);
40786
- const formRef = React98__default.useRef(null);
40605
+ const [submitError, setSubmitError] = React97__default.useState(null);
40606
+ const formRef = React97__default.useRef(null);
40787
40607
  const formMode = props.mode;
40788
- const mountedRef = React98__default.useRef(false);
40608
+ const mountedRef = React97__default.useRef(false);
40789
40609
  if (!mountedRef.current) {
40790
40610
  mountedRef.current = true;
40791
40611
  debug("forms", "mount", {
@@ -40798,7 +40618,7 @@ var init_Form = __esm({
40798
40618
  });
40799
40619
  }
40800
40620
  const shouldShowCancel = showCancel ?? (fields && fields.length > 0);
40801
- const evalContext = React98__default.useMemo(
40621
+ const evalContext = React97__default.useMemo(
40802
40622
  () => ({
40803
40623
  formValues: formData,
40804
40624
  globalVariables: externalContext?.globalVariables ?? {},
@@ -40807,7 +40627,7 @@ var init_Form = __esm({
40807
40627
  }),
40808
40628
  [formData, externalContext]
40809
40629
  );
40810
- React98__default.useEffect(() => {
40630
+ React97__default.useEffect(() => {
40811
40631
  debug("forms", "initialData-sync", {
40812
40632
  mode: formMode,
40813
40633
  normalizedInitialData,
@@ -40818,7 +40638,7 @@ var init_Form = __esm({
40818
40638
  setFormData(normalizedInitialData);
40819
40639
  }
40820
40640
  }, [normalizedInitialData]);
40821
- const processCalculations = React98__default.useCallback(
40641
+ const processCalculations = React97__default.useCallback(
40822
40642
  (changedFieldId, newFormData) => {
40823
40643
  if (!hiddenCalculations.length) return;
40824
40644
  const context = {
@@ -40843,7 +40663,7 @@ var init_Form = __esm({
40843
40663
  },
40844
40664
  [hiddenCalculations, externalContext, eventBus]
40845
40665
  );
40846
- const checkViolations = React98__default.useCallback(
40666
+ const checkViolations = React97__default.useCallback(
40847
40667
  (changedFieldId, newFormData) => {
40848
40668
  if (!violationTriggers.length) return;
40849
40669
  const context = {
@@ -40881,7 +40701,7 @@ var init_Form = __esm({
40881
40701
  processCalculations(name, newFormData);
40882
40702
  checkViolations(name, newFormData);
40883
40703
  };
40884
- const isFieldVisible = React98__default.useCallback(
40704
+ const isFieldVisible = React97__default.useCallback(
40885
40705
  (fieldName) => {
40886
40706
  const condition = conditionalFields[fieldName];
40887
40707
  if (!condition) return true;
@@ -40889,7 +40709,7 @@ var init_Form = __esm({
40889
40709
  },
40890
40710
  [conditionalFields, evalContext]
40891
40711
  );
40892
- const isSectionVisible = React98__default.useCallback(
40712
+ const isSectionVisible = React97__default.useCallback(
40893
40713
  (section) => {
40894
40714
  if (!section.condition) return true;
40895
40715
  return Boolean(evaluateFormExpression(section.condition, evalContext));
@@ -40965,7 +40785,7 @@ var init_Form = __esm({
40965
40785
  eventBus.emit(`UI:${onCancel}`);
40966
40786
  }
40967
40787
  };
40968
- const renderField = React98__default.useCallback(
40788
+ const renderField = React97__default.useCallback(
40969
40789
  (field) => {
40970
40790
  const fieldName = field.name || field.field;
40971
40791
  if (!fieldName) return null;
@@ -40986,7 +40806,7 @@ var init_Form = __esm({
40986
40806
  [formData, isFieldVisible, relationsData, relationsLoading, isLoading]
40987
40807
  );
40988
40808
  const effectiveFields = entityDerivedFields ?? fields;
40989
- const normalizedFields = React98__default.useMemo(() => {
40809
+ const normalizedFields = React97__default.useMemo(() => {
40990
40810
  if (!effectiveFields || effectiveFields.length === 0) return [];
40991
40811
  return effectiveFields.map((field) => {
40992
40812
  if (typeof field === "string") {
@@ -41010,7 +40830,7 @@ var init_Form = __esm({
41010
40830
  return field;
41011
40831
  });
41012
40832
  }, [effectiveFields, resolvedEntity]);
41013
- const schemaFields = React98__default.useMemo(() => {
40833
+ const schemaFields = React97__default.useMemo(() => {
41014
40834
  if (normalizedFields.length === 0) return null;
41015
40835
  if (isDebugEnabled()) {
41016
40836
  debugGroup(`Form: ${entityName || "unknown"}`);
@@ -41020,7 +40840,7 @@ var init_Form = __esm({
41020
40840
  }
41021
40841
  return normalizedFields.map(renderField).filter(Boolean);
41022
40842
  }, [normalizedFields, renderField, entityName, conditionalFields]);
41023
- const sectionElements = React98__default.useMemo(() => {
40843
+ const sectionElements = React97__default.useMemo(() => {
41024
40844
  if (!sections || sections.length === 0) return null;
41025
40845
  return sections.map((section) => {
41026
40846
  if (!isSectionVisible(section)) {
@@ -41745,7 +41565,7 @@ var init_List = __esm({
41745
41565
  if (entity && typeof entity === "object" && "id" in entity) return [entity];
41746
41566
  return [];
41747
41567
  }, [entity]);
41748
- const getItemActions = React98__default.useCallback(
41568
+ const getItemActions = React97__default.useCallback(
41749
41569
  (item) => {
41750
41570
  if (!itemActions) return [];
41751
41571
  if (typeof itemActions === "function") {
@@ -42220,7 +42040,7 @@ var init_MediaGallery = __esm({
42220
42040
  [selectable, selectedItems, selectionEvent, eventBus]
42221
42041
  );
42222
42042
  const entityData = Array.isArray(entity) ? entity : [];
42223
- const items = React98__default.useMemo(() => {
42043
+ const items = React97__default.useMemo(() => {
42224
42044
  if (propItems) return propItems;
42225
42045
  if (entityData.length === 0) return [];
42226
42046
  return entityData.map((record, idx) => {
@@ -42383,7 +42203,7 @@ var init_MediaGallery = __esm({
42383
42203
  }
42384
42204
  });
42385
42205
  function extractTitle2(children) {
42386
- if (!React98__default.isValidElement(children)) return void 0;
42206
+ if (!React97__default.isValidElement(children)) return void 0;
42387
42207
  const props = children.props;
42388
42208
  if (typeof props.title === "string") {
42389
42209
  return props.title;
@@ -42638,7 +42458,7 @@ var init_debugRegistry = __esm({
42638
42458
  }
42639
42459
  });
42640
42460
  function useDebugData() {
42641
- const [data, setData] = React98.useState(() => ({
42461
+ const [data, setData] = React97.useState(() => ({
42642
42462
  traits: [],
42643
42463
  ticks: [],
42644
42464
  guards: [],
@@ -42652,7 +42472,7 @@ function useDebugData() {
42652
42472
  },
42653
42473
  lastUpdate: Date.now()
42654
42474
  }));
42655
- React98.useEffect(() => {
42475
+ React97.useEffect(() => {
42656
42476
  const updateData = () => {
42657
42477
  setData({
42658
42478
  traits: getAllTraits(),
@@ -42761,12 +42581,12 @@ function layoutGraph(states, transitions, initialState, width, height) {
42761
42581
  return positions;
42762
42582
  }
42763
42583
  function WalkMinimap() {
42764
- const [walkStep, setWalkStep] = React98.useState(null);
42765
- const [traits2, setTraits] = React98.useState([]);
42766
- const [coveredEdges, setCoveredEdges] = React98.useState([]);
42767
- const [completedTraits, setCompletedTraits] = React98.useState(/* @__PURE__ */ new Set());
42768
- const prevTraitRef = React98.useRef(null);
42769
- React98.useEffect(() => {
42584
+ const [walkStep, setWalkStep] = React97.useState(null);
42585
+ const [traits2, setTraits] = React97.useState([]);
42586
+ const [coveredEdges, setCoveredEdges] = React97.useState([]);
42587
+ const [completedTraits, setCompletedTraits] = React97.useState(/* @__PURE__ */ new Set());
42588
+ const prevTraitRef = React97.useRef(null);
42589
+ React97.useEffect(() => {
42770
42590
  const interval = setInterval(() => {
42771
42591
  const w = window;
42772
42592
  const step = w.__orbitalWalkStep;
@@ -43202,15 +43022,15 @@ var init_EntitiesTab = __esm({
43202
43022
  });
43203
43023
  function EventFlowTab({ events: events2 }) {
43204
43024
  const { t } = useTranslate();
43205
- const [filter, setFilter] = React98.useState("all");
43206
- const containerRef = React98.useRef(null);
43207
- const [autoScroll, setAutoScroll] = React98.useState(true);
43208
- React98.useEffect(() => {
43025
+ const [filter, setFilter] = React97.useState("all");
43026
+ const containerRef = React97.useRef(null);
43027
+ const [autoScroll, setAutoScroll] = React97.useState(true);
43028
+ React97.useEffect(() => {
43209
43029
  if (autoScroll && containerRef.current) {
43210
43030
  containerRef.current.scrollTop = containerRef.current.scrollHeight;
43211
43031
  }
43212
43032
  }, [events2.length, autoScroll]);
43213
- const filteredEvents = React98.useMemo(() => {
43033
+ const filteredEvents = React97.useMemo(() => {
43214
43034
  if (filter === "all") return events2;
43215
43035
  return events2.filter((e) => e.type === filter);
43216
43036
  }, [events2, filter]);
@@ -43326,7 +43146,7 @@ var init_EventFlowTab = __esm({
43326
43146
  });
43327
43147
  function GuardsPanel({ guards }) {
43328
43148
  const { t } = useTranslate();
43329
- const [filter, setFilter] = React98.useState("all");
43149
+ const [filter, setFilter] = React97.useState("all");
43330
43150
  if (guards.length === 0) {
43331
43151
  return /* @__PURE__ */ jsx(
43332
43152
  EmptyState,
@@ -43339,7 +43159,7 @@ function GuardsPanel({ guards }) {
43339
43159
  }
43340
43160
  const passedCount = guards.filter((g) => g.result).length;
43341
43161
  const failedCount = guards.length - passedCount;
43342
- const filteredGuards = React98.useMemo(() => {
43162
+ const filteredGuards = React97.useMemo(() => {
43343
43163
  if (filter === "all") return guards;
43344
43164
  if (filter === "passed") return guards.filter((g) => g.result);
43345
43165
  return guards.filter((g) => !g.result);
@@ -43502,10 +43322,10 @@ function EffectBadge({ effect }) {
43502
43322
  }
43503
43323
  function TransitionTimeline({ transitions }) {
43504
43324
  const { t } = useTranslate();
43505
- const containerRef = React98.useRef(null);
43506
- const [autoScroll, setAutoScroll] = React98.useState(true);
43507
- const [expandedId, setExpandedId] = React98.useState(null);
43508
- React98.useEffect(() => {
43325
+ const containerRef = React97.useRef(null);
43326
+ const [autoScroll, setAutoScroll] = React97.useState(true);
43327
+ const [expandedId, setExpandedId] = React97.useState(null);
43328
+ React97.useEffect(() => {
43509
43329
  if (autoScroll && containerRef.current) {
43510
43330
  containerRef.current.scrollTop = containerRef.current.scrollHeight;
43511
43331
  }
@@ -43785,9 +43605,9 @@ function getAllEvents(traits2) {
43785
43605
  function EventDispatcherTab({ traits: traits2, schema }) {
43786
43606
  const eventBus = useEventBus();
43787
43607
  const { t } = useTranslate();
43788
- const [log13, setLog] = React98.useState([]);
43789
- const prevStatesRef = React98.useRef(/* @__PURE__ */ new Map());
43790
- React98.useEffect(() => {
43608
+ const [log13, setLog] = React97.useState([]);
43609
+ const prevStatesRef = React97.useRef(/* @__PURE__ */ new Map());
43610
+ React97.useEffect(() => {
43791
43611
  for (const trait of traits2) {
43792
43612
  const prev = prevStatesRef.current.get(trait.id);
43793
43613
  if (prev && prev !== trait.currentState) {
@@ -43956,10 +43776,10 @@ function VerifyModePanel({
43956
43776
  localCount
43957
43777
  }) {
43958
43778
  const { t } = useTranslate();
43959
- const [expanded, setExpanded] = React98.useState(true);
43960
- const scrollRef = React98.useRef(null);
43961
- const prevCountRef = React98.useRef(0);
43962
- React98.useEffect(() => {
43779
+ const [expanded, setExpanded] = React97.useState(true);
43780
+ const scrollRef = React97.useRef(null);
43781
+ const prevCountRef = React97.useRef(0);
43782
+ React97.useEffect(() => {
43963
43783
  if (expanded && transitions.length > prevCountRef.current && scrollRef.current) {
43964
43784
  scrollRef.current.scrollTop = scrollRef.current.scrollHeight;
43965
43785
  }
@@ -44016,10 +43836,10 @@ function RuntimeDebugger({
44016
43836
  schema
44017
43837
  }) {
44018
43838
  const { t } = useTranslate();
44019
- const [isCollapsed, setIsCollapsed] = React98.useState(mode === "verify" ? true : defaultCollapsed);
44020
- const [isVisible, setIsVisible] = React98.useState(mode === "inline" || mode === "verify" || isDebugEnabled2());
43839
+ const [isCollapsed, setIsCollapsed] = React97.useState(mode === "verify" ? true : defaultCollapsed);
43840
+ const [isVisible, setIsVisible] = React97.useState(mode === "inline" || mode === "verify" || isDebugEnabled2());
44021
43841
  const debugData = useDebugData();
44022
- React98.useEffect(() => {
43842
+ React97.useEffect(() => {
44023
43843
  if (mode === "inline") return;
44024
43844
  return onDebugToggle((enabled) => {
44025
43845
  setIsVisible(enabled);
@@ -44028,7 +43848,7 @@ function RuntimeDebugger({
44028
43848
  }
44029
43849
  });
44030
43850
  }, [mode]);
44031
- React98.useEffect(() => {
43851
+ React97.useEffect(() => {
44032
43852
  if (mode === "inline") return;
44033
43853
  const handleKeyDown = (e) => {
44034
43854
  if (e.key === "`" && isVisible) {
@@ -44548,7 +44368,7 @@ var init_StatCard = __esm({
44548
44368
  const labelToUse = propLabel ?? propTitle;
44549
44369
  const eventBus = useEventBus();
44550
44370
  const { t } = useTranslate();
44551
- const handleActionClick = React98__default.useCallback(() => {
44371
+ const handleActionClick = React97__default.useCallback(() => {
44552
44372
  if (action?.event) {
44553
44373
  eventBus.emit(`UI:${action.event}`, {});
44554
44374
  }
@@ -44559,7 +44379,7 @@ var init_StatCard = __esm({
44559
44379
  const data = Array.isArray(entity) ? entity : entity ? [entity] : [];
44560
44380
  const isLoading = externalLoading ?? false;
44561
44381
  const error = externalError;
44562
- const computeMetricValue = React98__default.useCallback(
44382
+ const computeMetricValue = React97__default.useCallback(
44563
44383
  (metric, items) => {
44564
44384
  if (metric.value !== void 0) {
44565
44385
  return metric.value;
@@ -44598,7 +44418,7 @@ var init_StatCard = __esm({
44598
44418
  },
44599
44419
  []
44600
44420
  );
44601
- const schemaStats = React98__default.useMemo(() => {
44421
+ const schemaStats = React97__default.useMemo(() => {
44602
44422
  if (!metrics || metrics.length === 0) return null;
44603
44423
  return metrics.map((metric) => ({
44604
44424
  label: metric.label,
@@ -44606,7 +44426,7 @@ var init_StatCard = __esm({
44606
44426
  format: metric.format
44607
44427
  }));
44608
44428
  }, [metrics, data, computeMetricValue]);
44609
- const calculatedTrend = React98__default.useMemo(() => {
44429
+ const calculatedTrend = React97__default.useMemo(() => {
44610
44430
  if (manualTrend !== void 0) return manualTrend;
44611
44431
  if (previousValue === void 0 || currentValue === void 0)
44612
44432
  return void 0;
@@ -45246,8 +45066,8 @@ var init_SubagentTracePanel = __esm({
45246
45066
  ] });
45247
45067
  };
45248
45068
  InlineActivityStream = ({ activities, autoScroll = true, className }) => {
45249
- const endRef = React98__default.useRef(null);
45250
- React98__default.useEffect(() => {
45069
+ const endRef = React97__default.useRef(null);
45070
+ React97__default.useEffect(() => {
45251
45071
  if (!autoScroll) return;
45252
45072
  endRef.current?.scrollIntoView({ behavior: "smooth", block: "end" });
45253
45073
  }, [activities.length, autoScroll]);
@@ -45341,7 +45161,7 @@ var init_SubagentTracePanel = __esm({
45341
45161
  };
45342
45162
  SubagentRichCard = ({ subagent }) => {
45343
45163
  const { t } = useTranslate();
45344
- const activities = React98__default.useMemo(
45164
+ const activities = React97__default.useMemo(
45345
45165
  () => subagentMessagesToActivities(subagent.messages),
45346
45166
  [subagent.messages]
45347
45167
  );
@@ -45418,8 +45238,8 @@ var init_SubagentTracePanel = __esm({
45418
45238
  ] });
45419
45239
  };
45420
45240
  CoordinatorConversation = ({ messages, autoScroll = true, className }) => {
45421
- const endRef = React98__default.useRef(null);
45422
- React98__default.useEffect(() => {
45241
+ const endRef = React97__default.useRef(null);
45242
+ React97__default.useEffect(() => {
45423
45243
  if (!autoScroll) return;
45424
45244
  endRef.current?.scrollIntoView({ behavior: "smooth", block: "end" });
45425
45245
  }, [messages.length, autoScroll]);
@@ -45849,7 +45669,7 @@ var init_Timeline = __esm({
45849
45669
  }) => {
45850
45670
  const { t } = useTranslate();
45851
45671
  const entityData = entity ?? [];
45852
- const items = React98__default.useMemo(() => {
45672
+ const items = React97__default.useMemo(() => {
45853
45673
  if (propItems) return propItems;
45854
45674
  if (entityData.length === 0) return [];
45855
45675
  return entityData.map((record, idx) => {
@@ -45951,7 +45771,7 @@ var init_Timeline = __esm({
45951
45771
  }
45952
45772
  });
45953
45773
  function extractToastProps(children) {
45954
- if (!React98__default.isValidElement(children)) {
45774
+ if (!React97__default.isValidElement(children)) {
45955
45775
  if (typeof children === "string") {
45956
45776
  return { message: children };
45957
45777
  }
@@ -45993,7 +45813,7 @@ var init_ToastSlot = __esm({
45993
45813
  eventBus.emit(`${prefix}CLOSE`);
45994
45814
  };
45995
45815
  if (!isVisible) return null;
45996
- const isCustomContent = React98__default.isValidElement(children) && !message;
45816
+ const isCustomContent = React97__default.isValidElement(children) && !message;
45997
45817
  return /* @__PURE__ */ jsx(Box, { className: "fixed bottom-4 right-4 z-50", children: isCustomContent ? children : /* @__PURE__ */ jsx(
45998
45818
  Toast,
45999
45819
  {
@@ -46010,7 +45830,7 @@ var init_ToastSlot = __esm({
46010
45830
  }
46011
45831
  });
46012
45832
  function lazyThree(name, loader) {
46013
- const Lazy = React98__default.lazy(
45833
+ const Lazy = React97__default.lazy(
46014
45834
  () => loader().then((m) => {
46015
45835
  const Resolved = m[name];
46016
45836
  if (!Resolved) {
@@ -46022,13 +45842,13 @@ function lazyThree(name, loader) {
46022
45842
  })
46023
45843
  );
46024
45844
  function ThreeWrapper(props) {
46025
- return React98__default.createElement(
45845
+ return React97__default.createElement(
46026
45846
  ThreeBoundary,
46027
45847
  { name },
46028
- React98__default.createElement(
46029
- React98__default.Suspense,
45848
+ React97__default.createElement(
45849
+ React97__default.Suspense,
46030
45850
  { fallback: null },
46031
- React98__default.createElement(Lazy, props)
45851
+ React97__default.createElement(Lazy, props)
46032
45852
  )
46033
45853
  );
46034
45854
  }
@@ -46235,7 +46055,6 @@ var init_component_registry_generated = __esm({
46235
46055
  init_Sidebar();
46236
46056
  init_SignaturePad();
46237
46057
  init_SimpleGrid();
46238
- init_SimulationCanvas();
46239
46058
  init_SimulatorBoard();
46240
46059
  init_Skeleton();
46241
46060
  init_SocialProof();
@@ -46308,7 +46127,7 @@ var init_component_registry_generated = __esm({
46308
46127
  init_WizardContainer();
46309
46128
  init_WizardNavigation();
46310
46129
  init_WizardProgress();
46311
- ThreeBoundary = class extends React98__default.Component {
46130
+ ThreeBoundary = class extends React97__default.Component {
46312
46131
  constructor() {
46313
46132
  super(...arguments);
46314
46133
  __publicField(this, "state", { failed: false });
@@ -46318,7 +46137,7 @@ var init_component_registry_generated = __esm({
46318
46137
  }
46319
46138
  render() {
46320
46139
  if (this.state.failed) {
46321
- return React98__default.createElement(
46140
+ return React97__default.createElement(
46322
46141
  "div",
46323
46142
  {
46324
46143
  "data-testid": "three-unavailable",
@@ -46547,7 +46366,6 @@ var init_component_registry_generated = __esm({
46547
46366
  "Sidebar": Sidebar,
46548
46367
  "SignaturePad": SignaturePad,
46549
46368
  "SimpleGrid": SimpleGrid,
46550
- "SimulationCanvas": SimulationCanvas,
46551
46369
  "SimulatorBoard": SimulatorBoard,
46552
46370
  "Skeleton": Skeleton,
46553
46371
  "SocialProof": SocialProof,
@@ -46642,7 +46460,7 @@ function SuspenseConfigProvider({
46642
46460
  config,
46643
46461
  children
46644
46462
  }) {
46645
- return React98__default.createElement(
46463
+ return React97__default.createElement(
46646
46464
  SuspenseConfigContext.Provider,
46647
46465
  { value: config },
46648
46466
  children
@@ -46684,7 +46502,7 @@ function enrichFormFields(fields, entityDef) {
46684
46502
  }
46685
46503
  return { name: field, label: field.replace(/([a-z])([A-Z])/g, "$1 $2").replace(/\b\w/g, (c) => c.toUpperCase()) };
46686
46504
  }
46687
- if (field && typeof field === "object" && !Array.isArray(field) && !React98__default.isValidElement(field) && !(field instanceof Date)) {
46505
+ if (field && typeof field === "object" && !Array.isArray(field) && !React97__default.isValidElement(field) && !(field instanceof Date)) {
46688
46506
  const obj = field;
46689
46507
  const fieldName = typeof obj.name === "string" ? obj.name : typeof obj.field === "string" ? obj.field : void 0;
46690
46508
  if (!fieldName) return field;
@@ -47137,7 +46955,7 @@ function renderPatternChildren(children, onDismiss, parentId = "root", parentPat
47137
46955
  const key = `${parentId}-${index}-trait:${traitName}`;
47138
46956
  return /* @__PURE__ */ jsx(TraitFrame, { traitName }, key);
47139
46957
  }
47140
- return /* @__PURE__ */ jsx(React98__default.Fragment, { children: child }, `${parentId}-${index}`);
46958
+ return /* @__PURE__ */ jsx(React97__default.Fragment, { children: child }, `${parentId}-${index}`);
47141
46959
  }
47142
46960
  if (!child || typeof child !== "object") return null;
47143
46961
  const childId = `${parentId}-${index}`;
@@ -47177,14 +46995,14 @@ function isPatternConfig(value) {
47177
46995
  if (value === null || value === void 0) return false;
47178
46996
  if (typeof value !== "object") return false;
47179
46997
  if (Array.isArray(value)) return false;
47180
- if (React98__default.isValidElement(value)) return false;
46998
+ if (React97__default.isValidElement(value)) return false;
47181
46999
  if (value instanceof Date) return false;
47182
47000
  if (typeof value === "function") return false;
47183
47001
  const record = value;
47184
47002
  return "type" in record && typeof record.type === "string" && getComponentForPattern$1(record.type) !== null;
47185
47003
  }
47186
47004
  function isPlainConfigObject(value) {
47187
- if (React98__default.isValidElement(value)) return false;
47005
+ if (React97__default.isValidElement(value)) return false;
47188
47006
  if (value instanceof Date) return false;
47189
47007
  const proto = Object.getPrototypeOf(value);
47190
47008
  return proto === Object.prototype || proto === null;
@@ -47310,7 +47128,7 @@ function SlotContentRenderer({
47310
47128
  for (const slotKey of CONTENT_NODE_SLOTS) {
47311
47129
  const slotVal = restProps[slotKey];
47312
47130
  if (slotVal === void 0 || slotVal === null) continue;
47313
- if (React98__default.isValidElement(slotVal) || typeof slotVal === "string" || typeof slotVal === "number" || typeof slotVal === "boolean") continue;
47131
+ if (React97__default.isValidElement(slotVal) || typeof slotVal === "string" || typeof slotVal === "number" || typeof slotVal === "boolean") continue;
47314
47132
  if (Array.isArray(slotVal) || typeof slotVal === "object" && "type" in slotVal) {
47315
47133
  nodeSlotOverrides[slotKey] = renderPatternChildren(
47316
47134
  slotVal,
@@ -47359,7 +47177,7 @@ function SlotContentRenderer({
47359
47177
  const resolvedItems = Array.isArray(entityVal) && entityVal[0] !== "fn" ? entityVal : null;
47360
47178
  if (resolvedItems && resolvedItems.length > 0 && !finalProps.fields && !finalProps.columns) {
47361
47179
  const sample = resolvedItems[0];
47362
- if (sample && typeof sample === "object" && !Array.isArray(sample) && !React98__default.isValidElement(sample) && !(sample instanceof Date)) {
47180
+ if (sample && typeof sample === "object" && !Array.isArray(sample) && !React97__default.isValidElement(sample) && !(sample instanceof Date)) {
47363
47181
  const keys = Object.keys(sample).filter((k) => k !== "id" && k !== "_id");
47364
47182
  finalProps.fields = keys.map((k, i) => ({ name: k, variant: i === 0 ? "h4" : "body" }));
47365
47183
  }