@almadar/ui 5.138.0 → 5.139.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 React83 from 'react';
2
- import React83__default, { createContext, useContext, useMemo, useRef, useEffect, useCallback, Suspense, useState, useSyncExternalStore, useLayoutEffect, lazy, useId } from 'react';
1
+ import * as React84 from 'react';
2
+ import React84__default, { createContext, useContext, useMemo, useRef, useEffect, useCallback, Suspense, useState, useSyncExternalStore, useLayoutEffect, lazy, useId } from 'react';
3
3
  import { EventBusContext, useTraitScopeChain, useEntitySchemaOptional, useEntityBindingSnapshot, useTraitScope, useEntitySchema, getAllPages, matchPathAmong, OrbitalProvider, TraitScopeProvider, ServerBridgeProvider, useCurrentPagePath, useGameAudioContextOptional, VerificationProvider, EntitySchemaProvider, OrbitalThemeProvider, useServerBridge, EntityBindingContext } from '@almadar/ui/providers';
4
4
  export { EntitySchemaProvider, ServerBridgeProvider, TraitContext, TraitProvider, useEntitySchema, useEntitySchemaOptional, useServerBridge, useTrait, useTraitContext } from '@almadar/ui/providers';
5
5
  import { createLogger, setNamespaceLevel, isLogLevelEnabled } from '@almadar/logger';
@@ -825,7 +825,7 @@ function resolveMarkerExpression(expression, entity, config, state) {
825
825
  function isPlainObject(value) {
826
826
  if (value === null || value === void 0 || typeof value !== "object") return false;
827
827
  if (Array.isArray(value)) return false;
828
- if (React83__default.isValidElement(value)) return false;
828
+ if (React84__default.isValidElement(value)) return false;
829
829
  if (value instanceof Date) return false;
830
830
  if (typeof value === "function") return false;
831
831
  return true;
@@ -998,7 +998,7 @@ var init_Box = __esm({
998
998
  fixed: "fixed",
999
999
  sticky: "sticky"
1000
1000
  };
1001
- Box = React83__default.forwardRef(
1001
+ Box = React84__default.forwardRef(
1002
1002
  ({
1003
1003
  padding,
1004
1004
  paddingX,
@@ -1063,7 +1063,7 @@ var init_Box = __esm({
1063
1063
  onPointerDown?.(e);
1064
1064
  }, [hoverEvent, tapReveal, triggerProps, onPointerDown]);
1065
1065
  const isClickable = action || onClick;
1066
- return React83__default.createElement(
1066
+ return React84__default.createElement(
1067
1067
  Component,
1068
1068
  {
1069
1069
  ref,
@@ -1280,7 +1280,7 @@ var init_Icon = __esm({
1280
1280
  const effectiveName = typeof icon === "string" && icon !== "" ? icon : name;
1281
1281
  const effectiveStrokeWidth = strokeWidth != null && strokeWidth > 0 ? strokeWidth : void 0;
1282
1282
  const family = useIconFamily();
1283
- const RenderedComponent = React83__default.useMemo(() => {
1283
+ const RenderedComponent = React84__default.useMemo(() => {
1284
1284
  if (directIcon) return null;
1285
1285
  return effectiveName ? resolveIconForFamily(effectiveName) : null;
1286
1286
  }, [directIcon, effectiveName, family]);
@@ -1404,7 +1404,7 @@ var init_atlasSlice = __esm({
1404
1404
  }
1405
1405
  });
1406
1406
  function useAtlasSliceDataUrl(asset) {
1407
- const [, bump] = React83.useReducer((x) => x + 1, 0);
1407
+ const [, bump] = React84.useReducer((x) => x + 1, 0);
1408
1408
  if (!isAtlasAsset(asset)) return void 0;
1409
1409
  const key = `${asset.atlas}#${asset.sprite}`;
1410
1410
  const cached = sliceDataUrlCache.get(key);
@@ -1467,13 +1467,13 @@ function AtlasImage({
1467
1467
  style,
1468
1468
  "aria-hidden": ariaHidden
1469
1469
  }) {
1470
- const [, bump] = React83.useReducer((x) => x + 1, 0);
1471
- const canvasRef = React83.useRef(null);
1470
+ const [, bump] = React84.useReducer((x) => x + 1, 0);
1471
+ const canvasRef = React84.useRef(null);
1472
1472
  const sliced = isAtlasAsset(asset);
1473
1473
  const atlas = sliced ? getAtlas(asset.atlas, bump) : void 0;
1474
1474
  const img = sliced && asset?.url ? getSheetImage(asset.url, bump) : null;
1475
1475
  const rect = sliced && atlas ? subRectFor(atlas, asset.sprite) : null;
1476
- React83.useEffect(() => {
1476
+ React84.useEffect(() => {
1477
1477
  const canvas = canvasRef.current;
1478
1478
  if (!canvas || !img || !rect) return;
1479
1479
  canvas.width = rect.sw;
@@ -1549,7 +1549,7 @@ function resolveIconProp(value, sizeClass) {
1549
1549
  const IconComp = value;
1550
1550
  return /* @__PURE__ */ jsx(IconComp, { className: sizeClass });
1551
1551
  }
1552
- if (React83__default.isValidElement(value)) {
1552
+ if (React84__default.isValidElement(value)) {
1553
1553
  return value;
1554
1554
  }
1555
1555
  if (typeof value === "object" && value !== null && isIconLike(value)) {
@@ -1626,7 +1626,7 @@ var init_Button = __esm({
1626
1626
  md: "h-icon-default w-icon-default",
1627
1627
  lg: "h-icon-default w-icon-default"
1628
1628
  };
1629
- Button = React83__default.forwardRef(
1629
+ Button = React84__default.forwardRef(
1630
1630
  ({
1631
1631
  className,
1632
1632
  variant = "primary",
@@ -1696,7 +1696,7 @@ var Dialog;
1696
1696
  var init_Dialog = __esm({
1697
1697
  "components/core/atoms/Dialog.tsx"() {
1698
1698
  init_cn();
1699
- Dialog = React83__default.forwardRef(
1699
+ Dialog = React84__default.forwardRef(
1700
1700
  ({
1701
1701
  role = "dialog",
1702
1702
  "aria-modal": ariaModal = true,
@@ -1907,7 +1907,7 @@ var init_Typography = __esm({
1907
1907
  if (format !== void 0 && format !== "none" && (typeof body === "string" || typeof body === "number" || body instanceof Date)) {
1908
1908
  body = formatValue(body, format);
1909
1909
  }
1910
- return React83__default.createElement(
1910
+ return React84__default.createElement(
1911
1911
  Component,
1912
1912
  {
1913
1913
  id,
@@ -2470,7 +2470,7 @@ var init_Badge = __esm({
2470
2470
  md: "px-2.5 py-1 text-sm",
2471
2471
  lg: "px-3 py-1.5 text-base"
2472
2472
  };
2473
- Badge = React83__default.forwardRef(
2473
+ Badge = React84__default.forwardRef(
2474
2474
  ({ className, variant = "default", size = "sm", amount, label, icon, iconAsset, children, onRemove, removeLabel, ...props }, ref) => {
2475
2475
  const iconSizes3 = {
2476
2476
  sm: "h-icon-default w-icon-default",
@@ -2820,7 +2820,7 @@ var init_SvgFlow = __esm({
2820
2820
  width = 100,
2821
2821
  height = 100
2822
2822
  }) => {
2823
- const markerId = React83__default.useMemo(() => {
2823
+ const markerId = React84__default.useMemo(() => {
2824
2824
  flowIdCounter += 1;
2825
2825
  return `almadar-flow-arrow-${flowIdCounter}`;
2826
2826
  }, []);
@@ -3413,7 +3413,7 @@ var init_SvgRing = __esm({
3413
3413
  width = 100,
3414
3414
  height = 100
3415
3415
  }) => {
3416
- const gradientId = React83__default.useMemo(() => {
3416
+ const gradientId = React84__default.useMemo(() => {
3417
3417
  ringIdCounter += 1;
3418
3418
  return `almadar-ring-glow-${ringIdCounter}`;
3419
3419
  }, []);
@@ -3594,7 +3594,7 @@ var init_Input = __esm({
3594
3594
  init_cn();
3595
3595
  init_Icon();
3596
3596
  init_useEventBus();
3597
- Input = React83__default.forwardRef(
3597
+ Input = React84__default.forwardRef(
3598
3598
  ({
3599
3599
  className,
3600
3600
  inputType,
@@ -3618,9 +3618,9 @@ var init_Input = __esm({
3618
3618
  const eventBus = useEventBus();
3619
3619
  const type = inputType || htmlType || "text";
3620
3620
  const isDeclarative = typeof onChange === "string";
3621
- const [localValue, setLocalValue] = React83__default.useState(value);
3622
- const pendingEchoRef = React83__default.useRef(/* @__PURE__ */ new Set());
3623
- React83__default.useEffect(() => {
3621
+ const [localValue, setLocalValue] = React84__default.useState(value);
3622
+ const pendingEchoRef = React84__default.useRef(/* @__PURE__ */ new Set());
3623
+ React84__default.useEffect(() => {
3624
3624
  if (!isDeclarative) return;
3625
3625
  const incoming = value == null ? "" : String(value);
3626
3626
  if (pendingEchoRef.current.has(incoming)) {
@@ -3780,7 +3780,7 @@ var Label;
3780
3780
  var init_Label = __esm({
3781
3781
  "components/core/atoms/Label.tsx"() {
3782
3782
  init_cn();
3783
- Label = React83__default.forwardRef(
3783
+ Label = React84__default.forwardRef(
3784
3784
  ({ className, required, children, ...props }, ref) => {
3785
3785
  return /* @__PURE__ */ jsxs(
3786
3786
  "label",
@@ -3807,7 +3807,7 @@ var init_Textarea = __esm({
3807
3807
  "components/core/atoms/Textarea.tsx"() {
3808
3808
  init_cn();
3809
3809
  init_useEventBus();
3810
- Textarea = React83__default.forwardRef(
3810
+ Textarea = React84__default.forwardRef(
3811
3811
  ({ className, error, onChange, ...props }, ref) => {
3812
3812
  const eventBus = useEventBus();
3813
3813
  const handleChange = (e) => {
@@ -4046,7 +4046,7 @@ var init_Select = __esm({
4046
4046
  init_cn();
4047
4047
  init_Icon();
4048
4048
  init_useEventBus();
4049
- Select = React83__default.forwardRef(
4049
+ Select = React84__default.forwardRef(
4050
4050
  (props, _ref) => {
4051
4051
  const { multiple, searchable, clearable } = props;
4052
4052
  if (multiple || searchable || clearable) {
@@ -4063,7 +4063,7 @@ var init_Checkbox = __esm({
4063
4063
  "components/core/atoms/Checkbox.tsx"() {
4064
4064
  init_cn();
4065
4065
  init_useEventBus();
4066
- Checkbox = React83__default.forwardRef(
4066
+ Checkbox = React84__default.forwardRef(
4067
4067
  ({ className, label, id, onChange, ...props }, ref) => {
4068
4068
  const inputId = id || `checkbox-${Math.random().toString(36).substr(2, 9)}`;
4069
4069
  const eventBus = useEventBus();
@@ -4117,7 +4117,7 @@ var init_Spinner = __esm({
4117
4117
  md: "h-6 w-6",
4118
4118
  lg: "h-8 w-8"
4119
4119
  };
4120
- Spinner = React83__default.forwardRef(
4120
+ Spinner = React84__default.forwardRef(
4121
4121
  ({ className, size = "md", overlay, ...props }, ref) => {
4122
4122
  if (overlay) {
4123
4123
  return /* @__PURE__ */ jsx(
@@ -4207,7 +4207,7 @@ var init_Card = __esm({
4207
4207
  chip: "shadow-none rounded-pill border-[length:var(--border-width)] border-border",
4208
4208
  "tile-image-first": "p-0 overflow-hidden"
4209
4209
  };
4210
- Card = React83__default.forwardRef(
4210
+ Card = React84__default.forwardRef(
4211
4211
  ({
4212
4212
  className,
4213
4213
  variant = "bordered",
@@ -4256,9 +4256,9 @@ var init_Card = __esm({
4256
4256
  }
4257
4257
  );
4258
4258
  Card.displayName = "Card";
4259
- CardHeader = React83__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("mb-4", className), ...props }));
4259
+ CardHeader = React84__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("mb-4", className), ...props }));
4260
4260
  CardHeader.displayName = "CardHeader";
4261
- CardTitle = React83__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
4261
+ CardTitle = React84__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
4262
4262
  "h3",
4263
4263
  {
4264
4264
  ref,
@@ -4271,11 +4271,11 @@ var init_Card = __esm({
4271
4271
  }
4272
4272
  ));
4273
4273
  CardTitle.displayName = "CardTitle";
4274
- CardContent = React83__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("", className), ...props }));
4274
+ CardContent = React84__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("", className), ...props }));
4275
4275
  CardContent.displayName = "CardContent";
4276
4276
  CardBody = CardContent;
4277
4277
  CardBody.displayName = "CardBody";
4278
- CardFooter = React83__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
4278
+ CardFooter = React84__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
4279
4279
  "div",
4280
4280
  {
4281
4281
  ref,
@@ -4362,7 +4362,7 @@ var init_FilterPill = __esm({
4362
4362
  md: "w-3.5 h-3.5",
4363
4363
  lg: "w-4 h-4"
4364
4364
  };
4365
- FilterPill = React83__default.forwardRef(
4365
+ FilterPill = React84__default.forwardRef(
4366
4366
  ({
4367
4367
  className,
4368
4368
  variant = "default",
@@ -4491,8 +4491,8 @@ var init_Avatar = __esm({
4491
4491
  actionPayload
4492
4492
  }) => {
4493
4493
  const eventBus = useEventBus();
4494
- const [imgFailed, setImgFailed] = React83__default.useState(false);
4495
- React83__default.useEffect(() => {
4494
+ const [imgFailed, setImgFailed] = React84__default.useState(false);
4495
+ React84__default.useEffect(() => {
4496
4496
  setImgFailed(false);
4497
4497
  }, [src]);
4498
4498
  const initials = providedInitials ?? (name ? generateInitials(name) : void 0);
@@ -4605,7 +4605,7 @@ var init_Center = __esm({
4605
4605
  as: Component = "div"
4606
4606
  }) => {
4607
4607
  const mergedStyle = minHeight ? { minHeight, ...style } : style;
4608
- return React83__default.createElement(Component, {
4608
+ return React84__default.createElement(Component, {
4609
4609
  className: cn(
4610
4610
  inline ? "inline-flex" : "flex",
4611
4611
  horizontal && "justify-center",
@@ -4873,7 +4873,7 @@ var init_Radio = __esm({
4873
4873
  md: "w-2.5 h-2.5",
4874
4874
  lg: "w-3 h-3"
4875
4875
  };
4876
- Radio = React83__default.forwardRef(
4876
+ Radio = React84__default.forwardRef(
4877
4877
  ({
4878
4878
  label,
4879
4879
  helperText,
@@ -4890,12 +4890,12 @@ var init_Radio = __esm({
4890
4890
  onChange,
4891
4891
  ...props
4892
4892
  }, ref) => {
4893
- const reactId = React83__default.useId();
4893
+ const reactId = React84__default.useId();
4894
4894
  const baseId = id || `radio-${reactId}`;
4895
4895
  const hasError = !!error;
4896
4896
  const eventBus = useEventBus();
4897
- const [selected, setSelected] = React83__default.useState(value);
4898
- React83__default.useEffect(() => {
4897
+ const [selected, setSelected] = React84__default.useState(value);
4898
+ React84__default.useEffect(() => {
4899
4899
  if (value !== void 0) setSelected(value);
4900
4900
  }, [value]);
4901
4901
  const pick = (next, e) => {
@@ -5077,7 +5077,7 @@ var init_Switch = __esm({
5077
5077
  "components/core/atoms/Switch.tsx"() {
5078
5078
  "use client";
5079
5079
  init_cn();
5080
- Switch = React83.forwardRef(
5080
+ Switch = React84.forwardRef(
5081
5081
  ({
5082
5082
  checked,
5083
5083
  defaultChecked = false,
@@ -5088,10 +5088,10 @@ var init_Switch = __esm({
5088
5088
  name,
5089
5089
  className
5090
5090
  }, ref) => {
5091
- const [isChecked, setIsChecked] = React83.useState(
5091
+ const [isChecked, setIsChecked] = React84.useState(
5092
5092
  checked !== void 0 ? checked : defaultChecked
5093
5093
  );
5094
- React83.useEffect(() => {
5094
+ React84.useEffect(() => {
5095
5095
  if (checked !== void 0) {
5096
5096
  setIsChecked(checked);
5097
5097
  }
@@ -5254,7 +5254,7 @@ var init_Stack = __esm({
5254
5254
  };
5255
5255
  const isHorizontal = direction === "horizontal";
5256
5256
  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";
5257
- return React83__default.createElement(
5257
+ return React84__default.createElement(
5258
5258
  Component,
5259
5259
  {
5260
5260
  className: cn(
@@ -5454,7 +5454,7 @@ var Aside;
5454
5454
  var init_Aside = __esm({
5455
5455
  "components/core/atoms/Aside.tsx"() {
5456
5456
  init_cn();
5457
- Aside = React83__default.forwardRef(
5457
+ Aside = React84__default.forwardRef(
5458
5458
  ({ className, children, ...rest }, ref) => /* @__PURE__ */ jsx("aside", { ref, className: cn(className), ...rest, children })
5459
5459
  );
5460
5460
  Aside.displayName = "Aside";
@@ -5533,9 +5533,9 @@ var init_LawReferenceTooltip = __esm({
5533
5533
  className
5534
5534
  }) => {
5535
5535
  const { t } = useTranslate();
5536
- const [isVisible, setIsVisible] = React83__default.useState(false);
5537
- const timeoutRef = React83__default.useRef(null);
5538
- const triggerRef = React83__default.useRef(null);
5536
+ const [isVisible, setIsVisible] = React84__default.useState(false);
5537
+ const timeoutRef = React84__default.useRef(null);
5538
+ const triggerRef = React84__default.useRef(null);
5539
5539
  const handleMouseEnter = () => {
5540
5540
  if (timeoutRef.current) clearTimeout(timeoutRef.current);
5541
5541
  timeoutRef.current = setTimeout(() => setIsVisible(true), 200);
@@ -5546,7 +5546,7 @@ var init_LawReferenceTooltip = __esm({
5546
5546
  };
5547
5547
  const { revealed, triggerProps } = useTapReveal({ refs: [triggerRef] });
5548
5548
  const open = isVisible || revealed;
5549
- React83__default.useEffect(() => {
5549
+ React84__default.useEffect(() => {
5550
5550
  return () => {
5551
5551
  if (timeoutRef.current) clearTimeout(timeoutRef.current);
5552
5552
  };
@@ -5756,7 +5756,7 @@ var init_StatusDot = __esm({
5756
5756
  md: "w-2.5 h-2.5",
5757
5757
  lg: "w-3 h-3"
5758
5758
  };
5759
- StatusDot = React83__default.forwardRef(
5759
+ StatusDot = React84__default.forwardRef(
5760
5760
  ({ className, status = "offline", pulse = false, size = "md", label, ...props }, ref) => {
5761
5761
  return /* @__PURE__ */ jsx(
5762
5762
  "span",
@@ -5810,7 +5810,7 @@ var init_TrendIndicator = __esm({
5810
5810
  down: "trending-down",
5811
5811
  flat: "arrow-right"
5812
5812
  };
5813
- TrendIndicator = React83__default.forwardRef(
5813
+ TrendIndicator = React84__default.forwardRef(
5814
5814
  ({
5815
5815
  className,
5816
5816
  value,
@@ -5879,7 +5879,7 @@ var init_RangeSlider = __esm({
5879
5879
  md: "w-4 h-4",
5880
5880
  lg: "w-5 h-5"
5881
5881
  };
5882
- RangeSlider = React83__default.forwardRef(
5882
+ RangeSlider = React84__default.forwardRef(
5883
5883
  ({
5884
5884
  className,
5885
5885
  min = 0,
@@ -6455,7 +6455,7 @@ var init_ContentSection = __esm({
6455
6455
  md: "py-16",
6456
6456
  lg: "py-24"
6457
6457
  };
6458
- ContentSection = React83__default.forwardRef(
6458
+ ContentSection = React84__default.forwardRef(
6459
6459
  ({ children, background = "default", padding = "lg", id, className }, ref) => {
6460
6460
  return /* @__PURE__ */ jsx(
6461
6461
  Box,
@@ -6989,7 +6989,7 @@ var init_AnimatedReveal = __esm({
6989
6989
  "scale-up": { opacity: 1, transform: "scale(1) translateY(0)" },
6990
6990
  "none": {}
6991
6991
  };
6992
- AnimatedReveal = React83__default.forwardRef(
6992
+ AnimatedReveal = React84__default.forwardRef(
6993
6993
  ({
6994
6994
  trigger = "scroll",
6995
6995
  animation = "fade-up",
@@ -7149,7 +7149,7 @@ var init_AnimatedGraphic = __esm({
7149
7149
  "components/marketing/atoms/AnimatedGraphic.tsx"() {
7150
7150
  "use client";
7151
7151
  init_cn();
7152
- AnimatedGraphic = React83__default.forwardRef(
7152
+ AnimatedGraphic = React84__default.forwardRef(
7153
7153
  ({
7154
7154
  src,
7155
7155
  svgContent,
@@ -7172,7 +7172,7 @@ var init_AnimatedGraphic = __esm({
7172
7172
  const fetchedSvg = useFetchedSvg(svgContent ? void 0 : src);
7173
7173
  const resolvedSvg = svgContent ?? fetchedSvg;
7174
7174
  const prevAnimateRef = useRef(animate);
7175
- const setRef = React83__default.useCallback(
7175
+ const setRef = React84__default.useCallback(
7176
7176
  (node) => {
7177
7177
  containerRef.current = node;
7178
7178
  if (typeof ref === "function") ref(node);
@@ -7899,9 +7899,9 @@ function ControlButton({
7899
7899
  className
7900
7900
  }) {
7901
7901
  const eventBus = useEventBus();
7902
- const [isPressed, setIsPressed] = React83.useState(false);
7902
+ const [isPressed, setIsPressed] = React84.useState(false);
7903
7903
  const actualPressed = pressed ?? isPressed;
7904
- const handlePointerDown = React83.useCallback(
7904
+ const handlePointerDown = React84.useCallback(
7905
7905
  (e) => {
7906
7906
  e.preventDefault();
7907
7907
  if (disabled) return;
@@ -7911,7 +7911,7 @@ function ControlButton({
7911
7911
  },
7912
7912
  [disabled, pressEvent, eventBus, onPress]
7913
7913
  );
7914
- const handlePointerUp = React83.useCallback(
7914
+ const handlePointerUp = React84.useCallback(
7915
7915
  (e) => {
7916
7916
  e.preventDefault();
7917
7917
  if (disabled) return;
@@ -7921,7 +7921,7 @@ function ControlButton({
7921
7921
  },
7922
7922
  [disabled, releaseEvent, eventBus, onRelease]
7923
7923
  );
7924
- const handlePointerLeave = React83.useCallback(
7924
+ const handlePointerLeave = React84.useCallback(
7925
7925
  (e) => {
7926
7926
  if (isPressed) {
7927
7927
  setIsPressed(false);
@@ -8179,8 +8179,8 @@ function ControlGrid({
8179
8179
  className
8180
8180
  }) {
8181
8181
  const eventBus = useEventBus();
8182
- const [active, setActive] = React83.useState(/* @__PURE__ */ new Set());
8183
- const handlePress = React83.useCallback(
8182
+ const [active, setActive] = React84.useState(/* @__PURE__ */ new Set());
8183
+ const handlePress = React84.useCallback(
8184
8184
  (id) => {
8185
8185
  setActive((prev) => new Set(prev).add(id));
8186
8186
  if (actionEvent) eventBus.emit(`UI:${actionEvent}`, { id, pressed: true });
@@ -8194,7 +8194,7 @@ function ControlGrid({
8194
8194
  },
8195
8195
  [kind, actionEvent, directionEvent, directionEvents, eventBus, onAction, onDirection]
8196
8196
  );
8197
- const handleRelease = React83.useCallback(
8197
+ const handleRelease = React84.useCallback(
8198
8198
  (id) => {
8199
8199
  setActive((prev) => {
8200
8200
  const next = new Set(prev);
@@ -8552,7 +8552,7 @@ function GameMenu({
8552
8552
  }) {
8553
8553
  const resolvedOptions = (options?.length ? options : void 0) ?? (menuItems?.length ? menuItems : void 0) ?? DEFAULT_MENU_OPTIONS;
8554
8554
  const eventBus = useEventBus();
8555
- const handleOptionClick = React83.useCallback(
8555
+ const handleOptionClick = React84.useCallback(
8556
8556
  (option) => {
8557
8557
  if (option.event) {
8558
8558
  eventBus.emit(`UI:${option.event}`, { option });
@@ -8788,7 +8788,7 @@ function StateGraph({
8788
8788
  }) {
8789
8789
  const eventBus = useEventBus();
8790
8790
  const nodes = states ?? [];
8791
- const positions = React83.useMemo(() => layoutStates(nodes, width, height), [nodes, width, height]);
8791
+ const positions = React84.useMemo(() => layoutStates(nodes, width, height), [nodes, width, height]);
8792
8792
  return /* @__PURE__ */ jsxs(
8793
8793
  Box,
8794
8794
  {
@@ -8859,8 +8859,8 @@ function MiniMap({
8859
8859
  tileAssets,
8860
8860
  unitAssets
8861
8861
  }) {
8862
- const canvasRef = React83.useRef(null);
8863
- const imgCacheRef = React83.useRef(/* @__PURE__ */ new Map());
8862
+ const canvasRef = React84.useRef(null);
8863
+ const imgCacheRef = React84.useRef(/* @__PURE__ */ new Map());
8864
8864
  function loadImg(url) {
8865
8865
  const cached = imgCacheRef.current.get(url);
8866
8866
  if (cached) return cached.complete ? cached : null;
@@ -8876,7 +8876,7 @@ function MiniMap({
8876
8876
  imgCacheRef.current.set(url, img);
8877
8877
  return null;
8878
8878
  }
8879
- React83.useEffect(() => {
8879
+ React84.useEffect(() => {
8880
8880
  const canvas = canvasRef.current;
8881
8881
  if (!canvas) return;
8882
8882
  const ctx = canvas.getContext("2d");
@@ -9344,6 +9344,21 @@ var init_projector = __esm({
9344
9344
  function isValidScenePos(pos) {
9345
9345
  return Number.isFinite(pos?.x) && Number.isFinite(pos?.y);
9346
9346
  }
9347
+ function spriteRect(projector, node, natural) {
9348
+ const tw = projector.tileWidth;
9349
+ const fallbackW = projector.worldPixelDirect ? natural?.w ?? 0 : tw;
9350
+ const fallbackH = projector.worldPixelDirect ? natural?.h ?? 0 : tw;
9351
+ const w = node.width !== void 0 ? node.width * tw : fallbackW;
9352
+ const h = node.height !== void 0 ? node.height * tw : fallbackH;
9353
+ const anchor = node.anchor ?? "top-left";
9354
+ const p = projector.anchorPoint(node.position, anchor);
9355
+ return {
9356
+ x: anchor === "top-left" ? p.x : p.x - w / 2,
9357
+ y: anchor === "ground" ? p.y - h : anchor === "center" ? p.y - h / 2 : p.y,
9358
+ w,
9359
+ h
9360
+ };
9361
+ }
9347
9362
  var init_contract = __esm({
9348
9363
  "lib/drawable/contract.ts"() {
9349
9364
  }
@@ -9358,16 +9373,11 @@ function paintFallbackSquare(painter, node, dctx, reason) {
9358
9373
  warnMissingOnce(reason, node);
9359
9374
  const tw = dctx.projector.tileWidth;
9360
9375
  const natural = dctx.projector.worldPixelDirect ? FALLBACK_WORLD_PX : tw;
9361
- const w = node.width !== void 0 ? node.width * tw : natural;
9362
- const h = node.height !== void 0 ? node.height * tw : natural;
9363
- const anchor = node.anchor ?? "top-left";
9364
- const p = dctx.projector.anchorPoint(node.position, anchor);
9365
- const dx = anchor === "top-left" ? p.x : p.x - w / 2;
9366
- const dy = anchor === "ground" ? p.y - h : anchor === "center" ? p.y - h / 2 : p.y;
9376
+ const rect = spriteRect(dctx.projector, node, { w: natural, h: natural });
9367
9377
  painter.save();
9368
9378
  if (node.opacity !== void 0 && node.opacity !== 1) painter.setAlpha(node.opacity);
9369
- painter.fillRect(dx, dy, w, h, "#9b8f7f");
9370
- painter.strokeRect(dx, dy, w, h, "#5e564b", Math.max(1, tw / 32));
9379
+ painter.fillRect(rect.x, rect.y, rect.w, rect.h, "#9b8f7f");
9380
+ painter.strokeRect(rect.x, rect.y, rect.w, rect.h, "#5e564b", Math.max(1, tw / 32));
9371
9381
  painter.restore();
9372
9382
  }
9373
9383
  function DrawSprite(_props) {
@@ -9404,15 +9414,10 @@ var init_DrawSprite = __esm({
9404
9414
  }
9405
9415
  src = { x: r.sx, y: r.sy, w: r.sw, h: r.sh };
9406
9416
  }
9407
- const tw = dctx.projector.tileWidth;
9408
- const fallbackW = dctx.projector.worldPixelDirect ? src ? src.w : tex.width : tw;
9409
- const fallbackH = dctx.projector.worldPixelDirect ? src ? src.h : tex.height : tw;
9410
- const w = node.width !== void 0 ? node.width * tw : fallbackW;
9411
- const h = node.height !== void 0 ? node.height * tw : fallbackH;
9412
- const anchor = node.anchor ?? "top-left";
9413
- const p = dctx.projector.anchorPoint(node.position, anchor);
9414
- const dx = anchor === "top-left" ? p.x : p.x - w / 2;
9415
- const dy = anchor === "ground" ? p.y - h : anchor === "center" ? p.y - h / 2 : p.y;
9417
+ const rect = spriteRect(dctx.projector, node, src ? { w: src.w, h: src.h } : { w: tex.width, h: tex.height });
9418
+ const { w, h } = rect;
9419
+ const dx = rect.x;
9420
+ const dy = rect.y;
9416
9421
  painter.save();
9417
9422
  if (node.opacity !== void 0 && node.opacity !== 1) painter.setAlpha(node.opacity);
9418
9423
  if (node.shadow) painter.setShadow(node.shadow);
@@ -9434,9 +9439,24 @@ var init_DrawSprite = __esm({
9434
9439
  };
9435
9440
  }
9436
9441
  });
9437
-
9438
- // components/game/atoms/DrawShape.tsx
9439
- function DrawShape(_props) {
9442
+ var DrawableRegistryContext;
9443
+ var init_registry = __esm({
9444
+ "lib/drawable/registry.ts"() {
9445
+ DrawableRegistryContext = createContext(null);
9446
+ }
9447
+ });
9448
+ function DrawShape(props) {
9449
+ const register = useContext(DrawableRegistryContext);
9450
+ if (register) {
9451
+ const { opacity, ...rest } = props;
9452
+ const node = {
9453
+ ...rest,
9454
+ type: "draw-shape",
9455
+ ...opacity !== void 0 && opacity > 0 ? { opacity } : {}
9456
+ };
9457
+ register(node);
9458
+ return /* @__PURE__ */ jsx("div", { "data-draw-shape-debug": "", style: { position: "absolute", width: 4, height: 4, background: "red", zIndex: 9999 } });
9459
+ }
9440
9460
  return null;
9441
9461
  }
9442
9462
  var paintShape;
@@ -9444,6 +9464,7 @@ var init_DrawShape = __esm({
9444
9464
  "components/game/atoms/DrawShape.tsx"() {
9445
9465
  "use client";
9446
9466
  init_contract();
9467
+ init_registry();
9447
9468
  paintShape = (painter, node, dctx) => {
9448
9469
  if (!isValidScenePos(node.position)) return;
9449
9470
  painter.save();
@@ -9628,12 +9649,18 @@ function collectDrawnItems(nodes) {
9628
9649
  for (const n of nodes) {
9629
9650
  switch (n.type) {
9630
9651
  case "draw-sprite":
9652
+ if (isValidScenePos(n.position)) out.push({ pos: n.position, id: n.id, anchor: n.anchor, width: n.width, height: n.height });
9653
+ break;
9631
9654
  case "draw-shape":
9632
9655
  case "draw-text":
9633
9656
  case "draw-group":
9634
9657
  if (isValidScenePos(n.position)) out.push({ pos: n.position, id: n.id });
9635
9658
  break;
9636
9659
  case "draw-sprite-layer":
9660
+ for (const it of n.items) {
9661
+ if (isValidScenePos(it.position)) out.push({ pos: it.position, id: it.id, anchor: it.anchor, width: it.width, height: it.height });
9662
+ }
9663
+ break;
9637
9664
  case "draw-shape-layer":
9638
9665
  case "draw-text-layer":
9639
9666
  for (const it of n.items) {
@@ -9651,6 +9678,15 @@ function buildHitIndex(items) {
9651
9678
  }
9652
9679
  return m;
9653
9680
  }
9681
+ function hitTestSprites(items, projector, point) {
9682
+ for (let i = items.length - 1; i >= 0; i--) {
9683
+ const it = items[i];
9684
+ if (it.id === void 0) continue;
9685
+ const r = spriteRect(projector, { position: it.pos, anchor: it.anchor, width: it.width, height: it.height });
9686
+ if (point.x >= r.x && point.x <= r.x + r.w && point.y >= r.y && point.y <= r.y + r.h) return it.id;
9687
+ }
9688
+ return void 0;
9689
+ }
9654
9690
  var init_hitTest = __esm({
9655
9691
  "lib/drawable/hitTest.ts"() {
9656
9692
  init_contract();
@@ -9679,9 +9715,17 @@ function Canvas2D({
9679
9715
  showMinimap = true,
9680
9716
  followTarget,
9681
9717
  cameraPos,
9682
- bgColor
9718
+ bgColor,
9719
+ children
9683
9720
  }) {
9684
9721
  const instanceId = useMemo(() => Math.random().toString(36).slice(2, 8), []);
9722
+ const childDrawablesRef = useRef([]);
9723
+ childDrawablesRef.current = [];
9724
+ const registerChildDrawable = useCallback((node) => {
9725
+ childDrawablesRef.current.push(node);
9726
+ }, []);
9727
+ const hasJsxChildren = React84.Children.count(children) > 0;
9728
+ drawables && drawables.length > 0 ? drawables : childDrawablesRef.current;
9685
9729
  function isDrawableLayer(node) {
9686
9730
  return node.type === "draw-sprite-layer" || node.type === "draw-shape-layer" || node.type === "draw-text-layer";
9687
9731
  }
@@ -9864,7 +9908,19 @@ function Canvas2D({
9864
9908
  ctx.fillStyle = bgColor ?? BACKGROUND_FALLBACK_COLOR;
9865
9909
  ctx.fillRect(0, 0, viewportSize.width, viewportSize.height);
9866
9910
  }
9867
- if (!drawables || drawables.length === 0) return;
9911
+ if (!drawables || drawables.length === 0) {
9912
+ const childDrawables = childDrawablesRef.current;
9913
+ if (childDrawables.length === 0) return;
9914
+ const painter0 = createWebPainter(ctx, bumpAtlas);
9915
+ painter0.save();
9916
+ painter0.translate(viewportSize.width / 2, viewportSize.height / 2);
9917
+ painter0.scale(cameraRef.current.zoom, cameraRef.current.zoom);
9918
+ painter0.translate(-viewportSize.width / 2, -viewportSize.height / 2);
9919
+ const dctx0 = { projector, time: 0, invalidate: bumpAtlas };
9920
+ for (const node of childDrawables) paintDrawable(painter0, node, dctx0);
9921
+ painter0.restore();
9922
+ return;
9923
+ }
9868
9924
  const cam = cameraRef.current;
9869
9925
  if (camera !== "follow" && dragDistance() === 0) {
9870
9926
  const focus = cameraPos ?? defaultGridFocus;
@@ -9948,6 +10004,11 @@ function Canvas2D({
9948
10004
  if (dragDistance() > 5) return;
9949
10005
  if (!canvasRef.current || !tileClickEvent && !unitClickEvent) return;
9950
10006
  const world = screenToWorld(e.clientX, e.clientY, canvasRef.current, viewportSize);
10007
+ const spriteHit = unitClickEvent ? hitTestSprites(drawnItems, projector, world) : void 0;
10008
+ if (spriteHit !== void 0 && unitClickEvent) {
10009
+ eventBus.emit(`UI:${unitClickEvent}`, { unitId: spriteHit });
10010
+ return;
10011
+ }
9951
10012
  const adjustedX = world.x - scaledTileWidth / 2;
9952
10013
  const adjustedY = squareGrid ? world.y - scaledTileWidth / 2 : world.y - scaledDiamondTopY - scaledFloorHeight / 2;
9953
10014
  const isoPos = unproject(adjustedX, adjustedY);
@@ -9957,7 +10018,7 @@ function Canvas2D({
9957
10018
  } else if (tileClickEvent) {
9958
10019
  eventBus.emit(`UI:${tileClickEvent}`, { x: isoPos.x, y: isoPos.y });
9959
10020
  }
9960
- }, [enableCamera, handlePointerUp, dragDistance, screenToWorld, viewportSize, scaledTileWidth, squareGrid, scaledDiamondTopY, scaledFloorHeight, unproject, hitIndex, tileClickEvent, unitClickEvent, eventBus]);
10021
+ }, [enableCamera, handlePointerUp, dragDistance, screenToWorld, viewportSize, scaledTileWidth, squareGrid, scaledDiamondTopY, scaledFloorHeight, unproject, hitIndex, drawnItems, projector, tileClickEvent, unitClickEvent, eventBus]);
9961
10022
  const handleCanvasPointerLeave = useCallback(() => {
9962
10023
  handleMouseLeave();
9963
10024
  if (tileLeaveEvent) eventBus.emit(`UI:${tileLeaveEvent}`, {});
@@ -10027,7 +10088,7 @@ function Canvas2D({
10027
10088
  /* @__PURE__ */ jsx(Typography, { variant: "body", className: "text-muted-foreground", children: t("canvas.loadingMessage") || "Loading\u2026" })
10028
10089
  ] }) });
10029
10090
  }
10030
- if (!drawables || drawables.length === 0) {
10091
+ if ((!drawables || drawables.length === 0) && !hasJsxChildren) {
10031
10092
  return /* @__PURE__ */ jsx(
10032
10093
  Box,
10033
10094
  {
@@ -10041,7 +10102,7 @@ function Canvas2D({
10041
10102
  }
10042
10103
  );
10043
10104
  }
10044
- return /* @__PURE__ */ jsxs(
10105
+ return /* @__PURE__ */ jsx(DrawableRegistryContext.Provider, { value: registerChildDrawable, children: /* @__PURE__ */ jsxs(
10045
10106
  Box,
10046
10107
  {
10047
10108
  ref: containerRef,
@@ -10102,10 +10163,19 @@ function Canvas2D({
10102
10163
  mapWidth: miniMapWidth,
10103
10164
  mapHeight: miniMapHeight
10104
10165
  }
10105
- ) })
10166
+ ) }),
10167
+ hasJsxChildren && /* @__PURE__ */ jsx("div", { "aria-hidden": "true", style: { position: "absolute", width: 0, height: 0, overflow: "hidden" }, children }),
10168
+ /* @__PURE__ */ jsxs("div", { "data-debug": "", style: { position: "absolute", top: 0, left: 0, background: "yellow", color: "black", zIndex: 9999, fontSize: 24, padding: 8 }, children: [
10169
+ "C=",
10170
+ React84.Children.count(children),
10171
+ " J=",
10172
+ String(hasJsxChildren),
10173
+ " D=",
10174
+ drawables?.length ?? -1
10175
+ ] })
10106
10176
  ]
10107
10177
  }
10108
- );
10178
+ ) });
10109
10179
  }
10110
10180
  var canvas2DLog;
10111
10181
  var init_Canvas2D = __esm({
@@ -10127,6 +10197,7 @@ var init_Canvas2D = __esm({
10127
10197
  init_webPainter2d();
10128
10198
  init_projector();
10129
10199
  init_paintDispatch();
10200
+ init_registry();
10130
10201
  init_hitTest();
10131
10202
  init_isometric();
10132
10203
  canvas2DLog = createLogger("almadar:ui:game-canvas");
@@ -10168,7 +10239,8 @@ function Canvas({
10168
10239
  tileLeaveEvent,
10169
10240
  featureClickEvent,
10170
10241
  keyMap,
10171
- keyUpMap
10242
+ keyUpMap,
10243
+ children
10172
10244
  }) {
10173
10245
  canvasLog.debug("Canvas render", { mode, drawablesCount: drawables?.length, projection, camera: camera ? JSON.stringify(camera) : void 0 });
10174
10246
  const zoom = camera?.zoom;
@@ -10221,7 +10293,8 @@ function Canvas({
10221
10293
  tileHoverEvent,
10222
10294
  tileLeaveEvent,
10223
10295
  keyMap,
10224
- keyUpMap
10296
+ keyUpMap,
10297
+ ...children !== void 0 ? { children } : {}
10225
10298
  }
10226
10299
  );
10227
10300
  }
@@ -10353,7 +10426,7 @@ function LinearView({
10353
10426
  /* @__PURE__ */ jsx(HStack, { className: "flex-wrap items-center", gap: "xs", children: trait.states.map((state, i) => {
10354
10427
  const isDone = i < currentIdx;
10355
10428
  const isCurrent = i === currentIdx;
10356
- return /* @__PURE__ */ jsxs(React83__default.Fragment, { children: [
10429
+ return /* @__PURE__ */ jsxs(React84__default.Fragment, { children: [
10357
10430
  i > 0 && /* @__PURE__ */ jsx(
10358
10431
  Typography,
10359
10432
  {
@@ -10888,7 +10961,7 @@ function SequenceBar({
10888
10961
  else onSlotRemove?.(index);
10889
10962
  }, [emit, slotRemoveEvent, onSlotRemove, playing]);
10890
10963
  const paddedSlots = Array.from({ length: maxSlots }, (_, i) => slots[i]);
10891
- return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(React83__default.Fragment, { children: [
10964
+ return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(React84__default.Fragment, { children: [
10892
10965
  i > 0 && /* @__PURE__ */ jsx(
10893
10966
  Typography,
10894
10967
  {
@@ -11537,7 +11610,7 @@ var init_ErrorBoundary = __esm({
11537
11610
  }
11538
11611
  );
11539
11612
  };
11540
- ErrorBoundary = class extends React83__default.Component {
11613
+ ErrorBoundary = class extends React84__default.Component {
11541
11614
  constructor(props) {
11542
11615
  super(props);
11543
11616
  __publicField(this, "reset", () => {
@@ -11806,7 +11879,7 @@ var init_Container = __esm({
11806
11879
  as: Component = "div"
11807
11880
  }) => {
11808
11881
  const resolvedSize = maxWidth ?? size ?? "lg";
11809
- return React83__default.createElement(
11882
+ return React84__default.createElement(
11810
11883
  Component,
11811
11884
  {
11812
11885
  className: cn(
@@ -14771,7 +14844,7 @@ var init_CodeBlock = __esm({
14771
14844
  DIFF_STYLE_FALLBACK = { bg: "", prefix: " ", text: "text-foreground" };
14772
14845
  LINE_PROPS_FN = (n) => ({ "data-line": String(n - 1) });
14773
14846
  HIDDEN_LINE_NUMBERS = { display: "none" };
14774
- CodeBlock = React83__default.memo(
14847
+ CodeBlock = React84__default.memo(
14775
14848
  ({
14776
14849
  code: rawCode,
14777
14850
  language = "text",
@@ -15359,7 +15432,7 @@ var init_MarkdownContent = __esm({
15359
15432
  init_Box();
15360
15433
  init_CodeBlock();
15361
15434
  init_cn();
15362
- MarkdownContent = React83__default.memo(
15435
+ MarkdownContent = React84__default.memo(
15363
15436
  ({ content, direction = "ltr", className }) => {
15364
15437
  const { t: _t } = useTranslate();
15365
15438
  const safeContent = typeof content === "string" ? content : String(content ?? "");
@@ -16636,7 +16709,7 @@ var init_StateMachineView = __esm({
16636
16709
  style: { top: title ? 30 : 0 },
16637
16710
  children: [
16638
16711
  entity && /* @__PURE__ */ jsx(EntityBox, { entity, config }),
16639
- states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(React83__default.Fragment, { children: renderStateNode(state, config) }, state.id) : /* @__PURE__ */ jsx(
16712
+ states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(React84__default.Fragment, { children: renderStateNode(state, config) }, state.id) : /* @__PURE__ */ jsx(
16640
16713
  StateNode2,
16641
16714
  {
16642
16715
  state,
@@ -22377,8 +22450,8 @@ var init_Menu = __esm({
22377
22450
  "bottom-end": "bottom-start"
22378
22451
  };
22379
22452
  const effectivePosition = direction === "rtl" ? rtlMirror[position] ?? position : position;
22380
- const triggerChild = React83__default.isValidElement(trigger) ? trigger : /* @__PURE__ */ jsx(Typography, { variant: "small", as: "span", children: trigger });
22381
- const triggerElement = React83__default.cloneElement(
22453
+ const triggerChild = React84__default.isValidElement(trigger) ? trigger : /* @__PURE__ */ jsx(Typography, { variant: "small", as: "span", children: trigger });
22454
+ const triggerElement = React84__default.cloneElement(
22382
22455
  triggerChild,
22383
22456
  {
22384
22457
  ref: triggerRef,
@@ -22473,14 +22546,14 @@ function useDataDnd(args) {
22473
22546
  const isZone = Boolean(dragGroup || accepts || sortable);
22474
22547
  const enabled = isZone || Boolean(dndRoot);
22475
22548
  const eventBus = useEventBus();
22476
- const parentRoot = React83__default.useContext(RootCtx);
22549
+ const parentRoot = React84__default.useContext(RootCtx);
22477
22550
  const isRoot = enabled && parentRoot === null;
22478
- const zoneId = React83__default.useId();
22551
+ const zoneId = React84__default.useId();
22479
22552
  const ownGroup = dragGroup ?? accepts ?? zoneId;
22480
- const [optimisticOrders, setOptimisticOrders] = React83__default.useState(() => /* @__PURE__ */ new Map());
22481
- const optimisticOrdersRef = React83__default.useRef(optimisticOrders);
22553
+ const [optimisticOrders, setOptimisticOrders] = React84__default.useState(() => /* @__PURE__ */ new Map());
22554
+ const optimisticOrdersRef = React84__default.useRef(optimisticOrders);
22482
22555
  optimisticOrdersRef.current = optimisticOrders;
22483
- const clearOptimisticOrder = React83__default.useCallback((group) => {
22556
+ const clearOptimisticOrder = React84__default.useCallback((group) => {
22484
22557
  setOptimisticOrders((prev) => {
22485
22558
  if (!prev.has(group)) return prev;
22486
22559
  const next = new Map(prev);
@@ -22505,7 +22578,7 @@ function useDataDnd(args) {
22505
22578
  const raw = it[dndItemIdField];
22506
22579
  return raw != null ? String(raw) : `__idx_${idx}`;
22507
22580
  }).join("|");
22508
- const itemIds = React83__default.useMemo(
22581
+ const itemIds = React84__default.useMemo(
22509
22582
  () => orderedItems.map((it, idx) => {
22510
22583
  const raw = it[dndItemIdField];
22511
22584
  return raw != null ? String(raw) : `__idx_${idx}`;
@@ -22516,7 +22589,7 @@ function useDataDnd(args) {
22516
22589
  const raw = it[dndItemIdField];
22517
22590
  return raw != null ? String(raw) : `__${idx}`;
22518
22591
  }).join("|");
22519
- React83__default.useEffect(() => {
22592
+ React84__default.useEffect(() => {
22520
22593
  const root = isRoot ? null : parentRoot;
22521
22594
  if (root) {
22522
22595
  root.clearOptimisticOrder(ownGroup);
@@ -22524,20 +22597,20 @@ function useDataDnd(args) {
22524
22597
  clearOptimisticOrder(ownGroup);
22525
22598
  }
22526
22599
  }, [itemsContentSig, ownGroup]);
22527
- const zonesRef = React83__default.useRef(/* @__PURE__ */ new Map());
22528
- const registerZone = React83__default.useCallback((zoneId2, meta2) => {
22600
+ const zonesRef = React84__default.useRef(/* @__PURE__ */ new Map());
22601
+ const registerZone = React84__default.useCallback((zoneId2, meta2) => {
22529
22602
  zonesRef.current.set(zoneId2, meta2);
22530
22603
  }, []);
22531
- const unregisterZone = React83__default.useCallback((zoneId2) => {
22604
+ const unregisterZone = React84__default.useCallback((zoneId2) => {
22532
22605
  zonesRef.current.delete(zoneId2);
22533
22606
  }, []);
22534
- const [activeDrag, setActiveDrag] = React83__default.useState(null);
22535
- const [overZoneGroup, setOverZoneGroup] = React83__default.useState(null);
22536
- const meta = React83__default.useMemo(
22607
+ const [activeDrag, setActiveDrag] = React84__default.useState(null);
22608
+ const [overZoneGroup, setOverZoneGroup] = React84__default.useState(null);
22609
+ const meta = React84__default.useMemo(
22537
22610
  () => ({ group: ownGroup, dropEvent, reorderEvent, positionEvent, itemIds, rawItems: items, idField: dndItemIdField }),
22538
22611
  [ownGroup, dropEvent, reorderEvent, positionEvent, itemIds, items, dndItemIdField]
22539
22612
  );
22540
- React83__default.useEffect(() => {
22613
+ React84__default.useEffect(() => {
22541
22614
  const target = isRoot ? null : parentRoot;
22542
22615
  if (!target) {
22543
22616
  zonesRef.current.set(zoneId, meta);
@@ -22556,7 +22629,7 @@ function useDataDnd(args) {
22556
22629
  }, [parentRoot, isRoot, zoneId, meta]);
22557
22630
  const sensors = useAlmadarDndSensors(true);
22558
22631
  const collisionDetection = almadarDndCollisionDetection;
22559
- const findZoneByItem = React83__default.useCallback(
22632
+ const findZoneByItem = React84__default.useCallback(
22560
22633
  (id) => {
22561
22634
  for (const z of zonesRef.current.values()) {
22562
22635
  if (z.itemIds.includes(id)) return z;
@@ -22565,7 +22638,7 @@ function useDataDnd(args) {
22565
22638
  },
22566
22639
  []
22567
22640
  );
22568
- React83__default.useCallback(
22641
+ React84__default.useCallback(
22569
22642
  (group) => {
22570
22643
  for (const z of zonesRef.current.values()) {
22571
22644
  if (z.group === group) return z;
@@ -22574,7 +22647,7 @@ function useDataDnd(args) {
22574
22647
  },
22575
22648
  []
22576
22649
  );
22577
- const handleDragEnd = React83__default.useCallback(
22650
+ const handleDragEnd = React84__default.useCallback(
22578
22651
  (event) => {
22579
22652
  const { active, over } = event;
22580
22653
  const activeIdStr = String(active.id);
@@ -22665,8 +22738,8 @@ function useDataDnd(args) {
22665
22738
  },
22666
22739
  [eventBus]
22667
22740
  );
22668
- const sortableData = React83__default.useMemo(() => ({ dndGroup: ownGroup }), [ownGroup]);
22669
- const SortableItem = React83__default.useCallback(
22741
+ const sortableData = React84__default.useMemo(() => ({ dndGroup: ownGroup }), [ownGroup]);
22742
+ const SortableItem = React84__default.useCallback(
22670
22743
  ({ id, children }) => {
22671
22744
  const {
22672
22745
  attributes,
@@ -22706,7 +22779,7 @@ function useDataDnd(args) {
22706
22779
  id: droppableId,
22707
22780
  data: sortableData
22708
22781
  });
22709
- const ctx = React83__default.useContext(RootCtx);
22782
+ const ctx = React84__default.useContext(RootCtx);
22710
22783
  const activeDrag2 = ctx?.activeDrag ?? null;
22711
22784
  const overZoneGroup2 = ctx?.overZoneGroup ?? null;
22712
22785
  const isThisZoneOver = overZoneGroup2 === ownGroup;
@@ -22721,7 +22794,7 @@ function useDataDnd(args) {
22721
22794
  showForeignPlaceholder,
22722
22795
  ctxAvailable: ctx != null
22723
22796
  });
22724
- React83__default.useEffect(() => {
22797
+ React84__default.useEffect(() => {
22725
22798
  dndLog.info("dropzone:isOver:change", { droppableId, group: ownGroup, isOver, isThisZoneOver, showForeignPlaceholder, activeDragSourceGroup: activeDrag2?.sourceGroup ?? null });
22726
22799
  }, [droppableId, isOver, isThisZoneOver, showForeignPlaceholder]);
22727
22800
  return /* @__PURE__ */ jsx(
@@ -22735,11 +22808,11 @@ function useDataDnd(args) {
22735
22808
  }
22736
22809
  );
22737
22810
  };
22738
- const rootContextValue = React83__default.useMemo(
22811
+ const rootContextValue = React84__default.useMemo(
22739
22812
  () => ({ registerZone, unregisterZone, activeDrag, overZoneGroup, optimisticOrders, clearOptimisticOrder }),
22740
22813
  [registerZone, unregisterZone, activeDrag, overZoneGroup, optimisticOrders, clearOptimisticOrder]
22741
22814
  );
22742
- const handleDragStart = React83__default.useCallback((event) => {
22815
+ const handleDragStart = React84__default.useCallback((event) => {
22743
22816
  const sourceZone = findZoneByItem(event.active.id);
22744
22817
  const rect = event.active.rect.current.initial;
22745
22818
  const height = rect?.height && rect.height > 0 ? rect.height : 64;
@@ -22758,7 +22831,7 @@ function useDataDnd(args) {
22758
22831
  isRoot
22759
22832
  });
22760
22833
  }, [findZoneByItem, isRoot, zoneId]);
22761
- const handleDragOver = React83__default.useCallback((event) => {
22834
+ const handleDragOver = React84__default.useCallback((event) => {
22762
22835
  const { active, over } = event;
22763
22836
  const overData = over?.data?.current;
22764
22837
  const overGroup = overData?.dndGroup ?? null;
@@ -22828,7 +22901,7 @@ function useDataDnd(args) {
22828
22901
  return next;
22829
22902
  });
22830
22903
  }, []);
22831
- const handleDragCancel = React83__default.useCallback((event) => {
22904
+ const handleDragCancel = React84__default.useCallback((event) => {
22832
22905
  setActiveDrag(null);
22833
22906
  setOverZoneGroup(null);
22834
22907
  dndLog.warn("dragCancel", {
@@ -22836,12 +22909,12 @@ function useDataDnd(args) {
22836
22909
  reason: "dnd-kit cancelled the drag (escape key, pointer interrupted, or external)"
22837
22910
  });
22838
22911
  }, []);
22839
- const handleDragEndWithCleanup = React83__default.useCallback((event) => {
22912
+ const handleDragEndWithCleanup = React84__default.useCallback((event) => {
22840
22913
  handleDragEnd(event);
22841
22914
  setActiveDrag(null);
22842
22915
  setOverZoneGroup(null);
22843
22916
  }, [handleDragEnd]);
22844
- const wrapContainer = React83__default.useCallback(
22917
+ const wrapContainer = React84__default.useCallback(
22845
22918
  (children) => {
22846
22919
  if (!enabled) return children;
22847
22920
  const strategy = layout === "grid" ? rectSortingStrategy : verticalListSortingStrategy;
@@ -22895,7 +22968,7 @@ var init_useDataDnd = __esm({
22895
22968
  init_useAlmadarDndCollision();
22896
22969
  init_Box();
22897
22970
  dndLog = createLogger("almadar:ui:dnd");
22898
- RootCtx = React83__default.createContext(null);
22971
+ RootCtx = React84__default.createContext(null);
22899
22972
  }
22900
22973
  });
22901
22974
  function renderIconInput(icon, props) {
@@ -23437,7 +23510,7 @@ function DataList({
23437
23510
  }) {
23438
23511
  const eventBus = useEventBus();
23439
23512
  const { t } = useTranslate();
23440
- const [visibleCount, setVisibleCount] = React83__default.useState(pageSize || Infinity);
23513
+ const [visibleCount, setVisibleCount] = React84__default.useState(pageSize || Infinity);
23441
23514
  const fieldDefs = fields ?? columns ?? [];
23442
23515
  const allDataRaw = Array.isArray(entity) ? entity : entity ? [entity] : [];
23443
23516
  const dnd = useDataDnd({
@@ -23453,14 +23526,14 @@ function DataList({
23453
23526
  dndRoot
23454
23527
  });
23455
23528
  const orderedData = dnd.orderedItems;
23456
- const allData = React83__default.useMemo(
23529
+ const allData = React84__default.useMemo(
23457
23530
  () => sortRows(orderedData, sortBy, sortDirection),
23458
23531
  [orderedData, sortBy, sortDirection]
23459
23532
  );
23460
23533
  const data = pageSize > 0 ? allData.slice(0, visibleCount) : allData;
23461
23534
  const hasMoreLocal = pageSize > 0 && visibleCount < allData.length;
23462
23535
  const hasRenderProp = typeof children === "function";
23463
- React83__default.useEffect(() => {
23536
+ React84__default.useEffect(() => {
23464
23537
  const renderItemTypeOf = typeof schemaRenderItem;
23465
23538
  const childrenTypeOf = typeof children;
23466
23539
  if (data.length > 0 && !hasRenderProp) {
@@ -23575,7 +23648,7 @@ function DataList({
23575
23648
  return v === void 0 || v === null || v === "" ? raw : String(v);
23576
23649
  };
23577
23650
  return /* @__PURE__ */ jsxs(VStack, { gap: "sm", className: cn("py-2", className), children: [
23578
- groups2.map((group, gi) => /* @__PURE__ */ jsxs(React83__default.Fragment, { children: [
23651
+ groups2.map((group, gi) => /* @__PURE__ */ jsxs(React84__default.Fragment, { children: [
23579
23652
  group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: "my-2" }),
23580
23653
  group.items.map((itemData, index) => {
23581
23654
  const id = itemData.id || `${gi}-${index}`;
@@ -23774,7 +23847,7 @@ function DataList({
23774
23847
  className
23775
23848
  ),
23776
23849
  children: [
23777
- groups.map((group, gi) => /* @__PURE__ */ jsxs(React83__default.Fragment, { children: [
23850
+ groups.map((group, gi) => /* @__PURE__ */ jsxs(React84__default.Fragment, { children: [
23778
23851
  group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-4" : "mt-0" }),
23779
23852
  group.items.map(
23780
23853
  (itemData, index) => renderItem(itemData, index, gi === groups.length - 1 && index === group.items.length - 1)
@@ -23861,7 +23934,7 @@ var init_FormSection = __esm({
23861
23934
  columns = 1,
23862
23935
  className
23863
23936
  }) => {
23864
- const [collapsed, setCollapsed] = React83__default.useState(defaultCollapsed);
23937
+ const [collapsed, setCollapsed] = React84__default.useState(defaultCollapsed);
23865
23938
  const { t } = useTranslate();
23866
23939
  const eventBus = useEventBus();
23867
23940
  const gridClass = {
@@ -23869,7 +23942,7 @@ var init_FormSection = __esm({
23869
23942
  2: "grid-cols-1 md:grid-cols-2",
23870
23943
  3: "grid-cols-1 md:grid-cols-2 lg:grid-cols-3"
23871
23944
  }[columns];
23872
- React83__default.useCallback(() => {
23945
+ React84__default.useCallback(() => {
23873
23946
  if (collapsible) {
23874
23947
  setCollapsed((prev) => !prev);
23875
23948
  eventBus.emit("UI:TOGGLE_COLLAPSE", { collapsed: !collapsed });
@@ -24850,7 +24923,7 @@ var init_Flex = __esm({
24850
24923
  flexStyle.flexBasis = typeof basis === "number" ? `${basis}px` : basis;
24851
24924
  }
24852
24925
  }
24853
- return React83__default.createElement(Component, {
24926
+ return React84__default.createElement(Component, {
24854
24927
  className: cn(
24855
24928
  inline ? "inline-flex" : "flex",
24856
24929
  directionStyles[direction],
@@ -24969,7 +25042,7 @@ var init_Grid = __esm({
24969
25042
  as: Component = "div"
24970
25043
  }) => {
24971
25044
  const mergedStyle = rows ? { gridTemplateRows: `repeat(${rows}, minmax(0, 1fr))`, ...style } : style;
24972
- return React83__default.createElement(
25045
+ return React84__default.createElement(
24973
25046
  Component,
24974
25047
  {
24975
25048
  className: cn(
@@ -25201,9 +25274,9 @@ var init_Popover = __esm({
25201
25274
  onMouseLeave: handleClose,
25202
25275
  onPointerDown: tapTriggerProps.onPointerDown
25203
25276
  };
25204
- const childElement = React83__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
25277
+ const childElement = React84__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
25205
25278
  const childPointerDown = childElement.props.onPointerDown;
25206
- const triggerElement = React83__default.cloneElement(
25279
+ const triggerElement = React84__default.cloneElement(
25207
25280
  childElement,
25208
25281
  {
25209
25282
  ref: triggerRef,
@@ -25812,9 +25885,9 @@ var init_Tooltip = __esm({
25812
25885
  if (hideTimeoutRef.current) clearTimeout(hideTimeoutRef.current);
25813
25886
  };
25814
25887
  }, []);
25815
- const triggerElement = React83__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
25888
+ const triggerElement = React84__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
25816
25889
  const childPointerDown = triggerElement.props.onPointerDown;
25817
- const trigger = React83__default.cloneElement(triggerElement, {
25890
+ const trigger = React84__default.cloneElement(triggerElement, {
25818
25891
  ref: triggerRef,
25819
25892
  onMouseEnter: handleMouseEnter,
25820
25893
  onMouseLeave: handleMouseLeave,
@@ -25904,7 +25977,7 @@ var init_WizardProgress = __esm({
25904
25977
  children: /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: normalizedSteps.map((step, index) => {
25905
25978
  const isActive = index === currentStep;
25906
25979
  const isCompleted = index < currentStep;
25907
- return /* @__PURE__ */ jsxs(React83__default.Fragment, { children: [
25980
+ return /* @__PURE__ */ jsxs(React84__default.Fragment, { children: [
25908
25981
  /* @__PURE__ */ jsx(
25909
25982
  "button",
25910
25983
  {
@@ -27539,7 +27612,7 @@ var init_MapView = __esm({
27539
27612
  shadowSize: [41, 41]
27540
27613
  });
27541
27614
  L.Marker.prototype.options.icon = defaultIcon;
27542
- const { useEffect: useEffect59, useRef: useRef61, useCallback: useCallback89, useState: useState91 } = React83__default;
27615
+ const { useEffect: useEffect59, useRef: useRef61, useCallback: useCallback89, useState: useState91 } = React84__default;
27543
27616
  const { Typography: Typography2 } = await Promise.resolve().then(() => (init_Typography(), Typography_exports));
27544
27617
  const { useEventBus: useEventBus2 } = await Promise.resolve().then(() => (init_useEventBus(), useEventBus_exports));
27545
27618
  function MapUpdater({ centerLat, centerLng, zoom }) {
@@ -28437,8 +28510,8 @@ function TableView({
28437
28510
  }) {
28438
28511
  const eventBus = useEventBus();
28439
28512
  const { t } = useTranslate();
28440
- const [visibleCount, setVisibleCount] = React83__default.useState(pageSize > 0 ? pageSize : Infinity);
28441
- const [localSelected, setLocalSelected] = React83__default.useState(/* @__PURE__ */ new Set());
28513
+ const [visibleCount, setVisibleCount] = React84__default.useState(pageSize > 0 ? pageSize : Infinity);
28514
+ const [localSelected, setLocalSelected] = React84__default.useState(/* @__PURE__ */ new Set());
28442
28515
  const colDefs = (Array.isArray(columns) ? columns : void 0) ?? (Array.isArray(fields) ? fields : void 0) ?? [];
28443
28516
  const actionDefs = Array.isArray(itemActions) ? itemActions : [];
28444
28517
  const allDataRaw = Array.isArray(entity) ? entity : entity ? [entity] : [];
@@ -28460,7 +28533,7 @@ function TableView({
28460
28533
  const hasRenderProp = typeof children === "function";
28461
28534
  const idField = dndItemIdField ?? "id";
28462
28535
  const isCoarsePointer = useMediaQuery("(pointer: coarse)");
28463
- React83__default.useEffect(() => {
28536
+ React84__default.useEffect(() => {
28464
28537
  tableViewLog.debug("render", {
28465
28538
  rowCount: data.length,
28466
28539
  colCount: colDefs.length,
@@ -28517,7 +28590,7 @@ function TableView({
28517
28590
  };
28518
28591
  eventBus.emit(`UI:${itemClickEvent}`, payload);
28519
28592
  };
28520
- const colFloors = React83__default.useMemo(
28593
+ const colFloors = React84__default.useMemo(
28521
28594
  () => colDefs.map((col) => {
28522
28595
  const longest = data.reduce((widest, row) => {
28523
28596
  const cell = formatCell(asFieldValue(getNestedValue(row, col.field ?? col.key)), col.format);
@@ -28679,12 +28752,12 @@ function TableView({
28679
28752
  ]
28680
28753
  }
28681
28754
  );
28682
- return dnd.isZone ? /* @__PURE__ */ jsx(dnd.SortableItem, { id: row[idField] ?? id, children: rowInner }, id) : /* @__PURE__ */ jsx(React83__default.Fragment, { children: rowInner }, id);
28755
+ return dnd.isZone ? /* @__PURE__ */ jsx(dnd.SortableItem, { id: row[idField] ?? id, children: rowInner }, id) : /* @__PURE__ */ jsx(React84__default.Fragment, { children: rowInner }, id);
28683
28756
  };
28684
28757
  const items = Array.from(data);
28685
28758
  const groups = groupBy ? groupData2(items, groupBy) : [{ label: "", items }];
28686
28759
  let runningIndex = 0;
28687
- const body = /* @__PURE__ */ jsx(Box, { role: "rowgroup", children: groups.map((group, gi) => /* @__PURE__ */ jsxs(React83__default.Fragment, { children: [
28760
+ const body = /* @__PURE__ */ jsx(Box, { role: "rowgroup", children: groups.map((group, gi) => /* @__PURE__ */ jsxs(React84__default.Fragment, { children: [
28688
28761
  group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-3" : "mt-0" }),
28689
28762
  group.items.map((row) => renderRow(row, runningIndex++))
28690
28763
  ] }, gi)) });
@@ -29909,7 +29982,7 @@ var init_StepFlow = __esm({
29909
29982
  className
29910
29983
  }) => {
29911
29984
  if (orientation === "vertical") {
29912
- return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(React83__default.Fragment, { children: /* @__PURE__ */ jsxs(HStack, { gap: "md", align: "start", className: "w-full", children: [
29985
+ return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(React84__default.Fragment, { children: /* @__PURE__ */ jsxs(HStack, { gap: "md", align: "start", className: "w-full", children: [
29913
29986
  /* @__PURE__ */ jsxs(VStack, { gap: "none", align: "center", children: [
29914
29987
  /* @__PURE__ */ jsx(StepCircle, { step, index }),
29915
29988
  showConnectors && index < steps.length - 1 && /* @__PURE__ */ jsx(Box, { className: "w-px h-8 bg-border" })
@@ -29920,7 +29993,7 @@ var init_StepFlow = __esm({
29920
29993
  ] })
29921
29994
  ] }) }, index)) });
29922
29995
  }
29923
- 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(React83__default.Fragment, { children: [
29996
+ 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(React84__default.Fragment, { children: [
29924
29997
  /* @__PURE__ */ jsxs(VStack, { gap: "sm", align: "center", className: "flex-1 w-full md:w-auto", children: [
29925
29998
  /* @__PURE__ */ jsx(StepCircle, { step, index }),
29926
29999
  /* @__PURE__ */ jsx(Typography, { variant: "h4", className: "text-center", children: step.title }),
@@ -30910,7 +30983,7 @@ var init_LikertScale = __esm({
30910
30983
  md: "text-base",
30911
30984
  lg: "text-lg"
30912
30985
  };
30913
- LikertScale = React83__default.forwardRef(
30986
+ LikertScale = React84__default.forwardRef(
30914
30987
  ({
30915
30988
  question,
30916
30989
  options = DEFAULT_LIKERT_OPTIONS,
@@ -30922,7 +30995,7 @@ var init_LikertScale = __esm({
30922
30995
  variant = "radios",
30923
30996
  className
30924
30997
  }, ref) => {
30925
- const groupId = React83__default.useId();
30998
+ const groupId = React84__default.useId();
30926
30999
  const eventBus = useEventBus();
30927
31000
  const handleSelect = useCallback(
30928
31001
  (next) => {
@@ -33211,7 +33284,7 @@ var init_DocBreadcrumb = __esm({
33211
33284
  "aria-label": t("aria.breadcrumb"),
33212
33285
  children: /* @__PURE__ */ jsx(HStack, { gap: "xs", align: "center", wrap: true, children: items.map((item, idx) => {
33213
33286
  const isLast = idx === items.length - 1;
33214
- return /* @__PURE__ */ jsxs(React83__default.Fragment, { children: [
33287
+ return /* @__PURE__ */ jsxs(React84__default.Fragment, { children: [
33215
33288
  idx > 0 && /* @__PURE__ */ jsx(
33216
33289
  Icon,
33217
33290
  {
@@ -34080,7 +34153,7 @@ var init_MiniStateMachine = __esm({
34080
34153
  const x = 2 + i * (NODE_W + GAP + ARROW_W + GAP);
34081
34154
  const tc = transitionCounts[s.name] ?? 0;
34082
34155
  const role = getStateRole(s.name, s.isInitial ?? void 0, s.isTerminal ?? void 0, tc, maxTC);
34083
- return /* @__PURE__ */ jsxs(React83__default.Fragment, { children: [
34156
+ return /* @__PURE__ */ jsxs(React84__default.Fragment, { children: [
34084
34157
  /* @__PURE__ */ jsx(
34085
34158
  AvlState,
34086
34159
  {
@@ -34284,7 +34357,7 @@ var init_PageHeader = __esm({
34284
34357
  info: "bg-info/10 text-info"
34285
34358
  };
34286
34359
  return /* @__PURE__ */ jsxs(Box, { className: cn("mb-6", className), children: [
34287
- 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(React83__default.Fragment, { children: [
34360
+ 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(React84__default.Fragment, { children: [
34288
34361
  idx > 0 && /* @__PURE__ */ jsx(Typography, { variant: "small", color: "muted", children: "/" }),
34289
34362
  crumb.href ? /* @__PURE__ */ jsx(
34290
34363
  "a",
@@ -34642,7 +34715,7 @@ var init_Section = __esm({
34642
34715
  as: Component = "section"
34643
34716
  }) => {
34644
34717
  const hasHeader = title || description || action;
34645
- return React83__default.createElement(
34718
+ return React84__default.createElement(
34646
34719
  Component,
34647
34720
  {
34648
34721
  className: cn(
@@ -35016,7 +35089,7 @@ var init_WizardContainer = __esm({
35016
35089
  const isCompleted = index < currentStep;
35017
35090
  const stepKey = step.id ?? step.tabId ?? `step-${index}`;
35018
35091
  const stepTitle = step.title ?? step.name ?? `Step ${index + 1}`;
35019
- return /* @__PURE__ */ jsxs(React83__default.Fragment, { children: [
35092
+ return /* @__PURE__ */ jsxs(React84__default.Fragment, { children: [
35020
35093
  /* @__PURE__ */ jsx(
35021
35094
  Button,
35022
35095
  {
@@ -36803,7 +36876,7 @@ var init_ImportPreviewTree = __esm({
36803
36876
  const renderUnit = (unit, childrenByParent, depth) => {
36804
36877
  const summary = fieldSummary(unit);
36805
36878
  const children = childrenByParent.get(unit.ref) ?? [];
36806
- return /* @__PURE__ */ jsxs(React83__default.Fragment, { children: [
36879
+ return /* @__PURE__ */ jsxs(React84__default.Fragment, { children: [
36807
36880
  /* @__PURE__ */ jsxs(
36808
36881
  Box,
36809
36882
  {
@@ -36900,7 +36973,7 @@ var init_ImportProgress = __esm({
36900
36973
  PIPELINE.map((key, index) => {
36901
36974
  const isComplete = index < currentIndex;
36902
36975
  const isActive = index === currentIndex;
36903
- return /* @__PURE__ */ jsxs(React83__default.Fragment, { children: [
36976
+ return /* @__PURE__ */ jsxs(React84__default.Fragment, { children: [
36904
36977
  index > 0 ? /* @__PURE__ */ jsx(Box, { className: "h-px w-4 bg-border" }) : null,
36905
36978
  /* @__PURE__ */ jsxs(Box, { className: "flex items-center gap-1", "data-testid": `import-progress-step-${key}`, children: [
36906
36979
  /* @__PURE__ */ jsx(
@@ -38013,7 +38086,7 @@ var init_DrawGroup = __esm({
38013
38086
  }
38014
38087
  });
38015
38088
  function extractTitle(children) {
38016
- if (!React83__default.isValidElement(children)) return void 0;
38089
+ if (!React84__default.isValidElement(children)) return void 0;
38017
38090
  const props = children.props;
38018
38091
  if (typeof props.title === "string") {
38019
38092
  return props.title;
@@ -38363,12 +38436,12 @@ var init_Form = __esm({
38363
38436
  const isSchemaEntity = isOrbitalEntitySchema(entity);
38364
38437
  const resolvedEntity = isSchemaEntity ? entity : void 0;
38365
38438
  const entityName = typeof entity === "string" ? entity : resolvedEntity?.name;
38366
- const normalizedInitialData = React83__default.useMemo(() => {
38439
+ const normalizedInitialData = React84__default.useMemo(() => {
38367
38440
  const entityRowAsInitial = isPlainEntityRow(entity) ? entity : void 0;
38368
38441
  const callerInitial = initialData !== null && typeof initialData === "object" && !Array.isArray(initialData) ? initialData : {};
38369
38442
  return entityRowAsInitial !== void 0 ? { ...entityRowAsInitial, ...callerInitial } : callerInitial;
38370
38443
  }, [entity, initialData]);
38371
- const entityDerivedFields = React83__default.useMemo(() => {
38444
+ const entityDerivedFields = React84__default.useMemo(() => {
38372
38445
  if (fields && fields.length > 0) return void 0;
38373
38446
  if (!resolvedEntity) return void 0;
38374
38447
  return resolvedEntity.fields.map(
@@ -38389,16 +38462,16 @@ var init_Form = __esm({
38389
38462
  const conditionalFields = typeof conditionalFieldsRaw === "boolean" ? {} : conditionalFieldsRaw;
38390
38463
  const hiddenCalculations = typeof hiddenCalculationsRaw === "boolean" ? [] : hiddenCalculationsRaw;
38391
38464
  const violationTriggers = typeof violationTriggersRaw === "boolean" ? [] : violationTriggersRaw;
38392
- const [formData, setFormData] = React83__default.useState(
38465
+ const [formData, setFormData] = React84__default.useState(
38393
38466
  normalizedInitialData
38394
38467
  );
38395
- const [collapsedSections, setCollapsedSections] = React83__default.useState(
38468
+ const [collapsedSections, setCollapsedSections] = React84__default.useState(
38396
38469
  /* @__PURE__ */ new Set()
38397
38470
  );
38398
- const [submitError, setSubmitError] = React83__default.useState(null);
38399
- const formRef = React83__default.useRef(null);
38471
+ const [submitError, setSubmitError] = React84__default.useState(null);
38472
+ const formRef = React84__default.useRef(null);
38400
38473
  const formMode = props.mode;
38401
- const mountedRef = React83__default.useRef(false);
38474
+ const mountedRef = React84__default.useRef(false);
38402
38475
  if (!mountedRef.current) {
38403
38476
  mountedRef.current = true;
38404
38477
  debug("forms", "mount", {
@@ -38411,7 +38484,7 @@ var init_Form = __esm({
38411
38484
  });
38412
38485
  }
38413
38486
  const shouldShowCancel = showCancel ?? (fields && fields.length > 0);
38414
- const evalContext = React83__default.useMemo(
38487
+ const evalContext = React84__default.useMemo(
38415
38488
  () => ({
38416
38489
  formValues: formData,
38417
38490
  globalVariables: externalContext?.globalVariables ?? {},
@@ -38420,7 +38493,7 @@ var init_Form = __esm({
38420
38493
  }),
38421
38494
  [formData, externalContext]
38422
38495
  );
38423
- React83__default.useEffect(() => {
38496
+ React84__default.useEffect(() => {
38424
38497
  debug("forms", "initialData-sync", {
38425
38498
  mode: formMode,
38426
38499
  normalizedInitialData,
@@ -38431,7 +38504,7 @@ var init_Form = __esm({
38431
38504
  setFormData(normalizedInitialData);
38432
38505
  }
38433
38506
  }, [normalizedInitialData]);
38434
- const processCalculations = React83__default.useCallback(
38507
+ const processCalculations = React84__default.useCallback(
38435
38508
  (changedFieldId, newFormData) => {
38436
38509
  if (!hiddenCalculations.length) return;
38437
38510
  const context = {
@@ -38456,7 +38529,7 @@ var init_Form = __esm({
38456
38529
  },
38457
38530
  [hiddenCalculations, externalContext, eventBus]
38458
38531
  );
38459
- const checkViolations = React83__default.useCallback(
38532
+ const checkViolations = React84__default.useCallback(
38460
38533
  (changedFieldId, newFormData) => {
38461
38534
  if (!violationTriggers.length) return;
38462
38535
  const context = {
@@ -38494,7 +38567,7 @@ var init_Form = __esm({
38494
38567
  processCalculations(name, newFormData);
38495
38568
  checkViolations(name, newFormData);
38496
38569
  };
38497
- const isFieldVisible = React83__default.useCallback(
38570
+ const isFieldVisible = React84__default.useCallback(
38498
38571
  (fieldName) => {
38499
38572
  const condition = conditionalFields[fieldName];
38500
38573
  if (!condition) return true;
@@ -38502,7 +38575,7 @@ var init_Form = __esm({
38502
38575
  },
38503
38576
  [conditionalFields, evalContext]
38504
38577
  );
38505
- const isSectionVisible = React83__default.useCallback(
38578
+ const isSectionVisible = React84__default.useCallback(
38506
38579
  (section) => {
38507
38580
  if (!section.condition) return true;
38508
38581
  return Boolean(evaluateFormExpression(section.condition, evalContext));
@@ -38578,7 +38651,7 @@ var init_Form = __esm({
38578
38651
  eventBus.emit(`UI:${onCancel}`);
38579
38652
  }
38580
38653
  };
38581
- const renderField = React83__default.useCallback(
38654
+ const renderField = React84__default.useCallback(
38582
38655
  (field) => {
38583
38656
  const fieldName = field.name || field.field;
38584
38657
  if (!fieldName) return null;
@@ -38599,7 +38672,7 @@ var init_Form = __esm({
38599
38672
  [formData, isFieldVisible, relationsData, relationsLoading, isLoading]
38600
38673
  );
38601
38674
  const effectiveFields = entityDerivedFields ?? fields;
38602
- const normalizedFields = React83__default.useMemo(() => {
38675
+ const normalizedFields = React84__default.useMemo(() => {
38603
38676
  if (!effectiveFields || effectiveFields.length === 0) return [];
38604
38677
  return effectiveFields.map((field) => {
38605
38678
  if (typeof field === "string") {
@@ -38623,7 +38696,7 @@ var init_Form = __esm({
38623
38696
  return field;
38624
38697
  });
38625
38698
  }, [effectiveFields, resolvedEntity]);
38626
- const schemaFields = React83__default.useMemo(() => {
38699
+ const schemaFields = React84__default.useMemo(() => {
38627
38700
  if (normalizedFields.length === 0) return null;
38628
38701
  if (isDebugEnabled()) {
38629
38702
  debugGroup(`Form: ${entityName || "unknown"}`);
@@ -38633,7 +38706,7 @@ var init_Form = __esm({
38633
38706
  }
38634
38707
  return normalizedFields.map(renderField).filter(Boolean);
38635
38708
  }, [normalizedFields, renderField, entityName, conditionalFields]);
38636
- const sectionElements = React83__default.useMemo(() => {
38709
+ const sectionElements = React84__default.useMemo(() => {
38637
38710
  if (!sections || sections.length === 0) return null;
38638
38711
  return sections.map((section) => {
38639
38712
  if (!isSectionVisible(section)) {
@@ -39359,7 +39432,7 @@ var init_List = __esm({
39359
39432
  if (entity && typeof entity === "object" && "id" in entity) return [entity];
39360
39433
  return [];
39361
39434
  }, [entity]);
39362
- const getItemActions = React83__default.useCallback(
39435
+ const getItemActions = React84__default.useCallback(
39363
39436
  (item) => {
39364
39437
  if (!itemActions) return [];
39365
39438
  if (typeof itemActions === "function") {
@@ -39840,7 +39913,7 @@ var init_MediaGallery = __esm({
39840
39913
  [selectable, selectedItems, selectionEvent, eventBus]
39841
39914
  );
39842
39915
  const entityData = Array.isArray(entity) ? entity : [];
39843
- const items = React83__default.useMemo(() => {
39916
+ const items = React84__default.useMemo(() => {
39844
39917
  if (propItems && propItems.length > 0) return propItems;
39845
39918
  if (entityData.length === 0) return [];
39846
39919
  return entityData.map((record, idx) => {
@@ -40005,7 +40078,7 @@ var init_MediaGallery = __esm({
40005
40078
  }
40006
40079
  });
40007
40080
  function extractTitle2(children) {
40008
- if (!React83__default.isValidElement(children)) return void 0;
40081
+ if (!React84__default.isValidElement(children)) return void 0;
40009
40082
  const props = children.props;
40010
40083
  if (typeof props.title === "string") {
40011
40084
  return props.title;
@@ -40279,7 +40352,7 @@ var init_debugRegistry = __esm({
40279
40352
  }
40280
40353
  });
40281
40354
  function useDebugData() {
40282
- const [data, setData] = React83.useState(() => ({
40355
+ const [data, setData] = React84.useState(() => ({
40283
40356
  traits: [],
40284
40357
  ticks: [],
40285
40358
  guards: [],
@@ -40293,7 +40366,7 @@ function useDebugData() {
40293
40366
  },
40294
40367
  lastUpdate: Date.now()
40295
40368
  }));
40296
- React83.useEffect(() => {
40369
+ React84.useEffect(() => {
40297
40370
  const updateData = () => {
40298
40371
  setData({
40299
40372
  traits: getAllTraits(),
@@ -40402,12 +40475,12 @@ function layoutGraph(states, transitions, initialState, width, height) {
40402
40475
  return positions;
40403
40476
  }
40404
40477
  function WalkMinimap() {
40405
- const [walkStep, setWalkStep] = React83.useState(null);
40406
- const [traits2, setTraits] = React83.useState([]);
40407
- const [coveredEdges, setCoveredEdges] = React83.useState([]);
40408
- const [completedTraits, setCompletedTraits] = React83.useState(/* @__PURE__ */ new Set());
40409
- const prevTraitRef = React83.useRef(null);
40410
- React83.useEffect(() => {
40478
+ const [walkStep, setWalkStep] = React84.useState(null);
40479
+ const [traits2, setTraits] = React84.useState([]);
40480
+ const [coveredEdges, setCoveredEdges] = React84.useState([]);
40481
+ const [completedTraits, setCompletedTraits] = React84.useState(/* @__PURE__ */ new Set());
40482
+ const prevTraitRef = React84.useRef(null);
40483
+ React84.useEffect(() => {
40411
40484
  const interval = setInterval(() => {
40412
40485
  const w = window;
40413
40486
  const step = w.__orbitalWalkStep;
@@ -40843,15 +40916,15 @@ var init_EntitiesTab = __esm({
40843
40916
  });
40844
40917
  function EventFlowTab({ events: events2 }) {
40845
40918
  const { t } = useTranslate();
40846
- const [filter, setFilter] = React83.useState("all");
40847
- const containerRef = React83.useRef(null);
40848
- const [autoScroll, setAutoScroll] = React83.useState(true);
40849
- React83.useEffect(() => {
40919
+ const [filter, setFilter] = React84.useState("all");
40920
+ const containerRef = React84.useRef(null);
40921
+ const [autoScroll, setAutoScroll] = React84.useState(true);
40922
+ React84.useEffect(() => {
40850
40923
  if (autoScroll && containerRef.current) {
40851
40924
  containerRef.current.scrollTop = containerRef.current.scrollHeight;
40852
40925
  }
40853
40926
  }, [events2.length, autoScroll]);
40854
- const filteredEvents = React83.useMemo(() => {
40927
+ const filteredEvents = React84.useMemo(() => {
40855
40928
  if (filter === "all") return events2;
40856
40929
  return events2.filter((e) => e.type === filter);
40857
40930
  }, [events2, filter]);
@@ -40967,7 +41040,7 @@ var init_EventFlowTab = __esm({
40967
41040
  });
40968
41041
  function GuardsPanel({ guards }) {
40969
41042
  const { t } = useTranslate();
40970
- const [filter, setFilter] = React83.useState("all");
41043
+ const [filter, setFilter] = React84.useState("all");
40971
41044
  if (guards.length === 0) {
40972
41045
  return /* @__PURE__ */ jsx(
40973
41046
  EmptyState,
@@ -40980,7 +41053,7 @@ function GuardsPanel({ guards }) {
40980
41053
  }
40981
41054
  const passedCount = guards.filter((g) => g.result).length;
40982
41055
  const failedCount = guards.length - passedCount;
40983
- const filteredGuards = React83.useMemo(() => {
41056
+ const filteredGuards = React84.useMemo(() => {
40984
41057
  if (filter === "all") return guards;
40985
41058
  if (filter === "passed") return guards.filter((g) => g.result);
40986
41059
  return guards.filter((g) => !g.result);
@@ -41143,10 +41216,10 @@ function EffectBadge({ effect }) {
41143
41216
  }
41144
41217
  function TransitionTimeline({ transitions }) {
41145
41218
  const { t } = useTranslate();
41146
- const containerRef = React83.useRef(null);
41147
- const [autoScroll, setAutoScroll] = React83.useState(true);
41148
- const [expandedId, setExpandedId] = React83.useState(null);
41149
- React83.useEffect(() => {
41219
+ const containerRef = React84.useRef(null);
41220
+ const [autoScroll, setAutoScroll] = React84.useState(true);
41221
+ const [expandedId, setExpandedId] = React84.useState(null);
41222
+ React84.useEffect(() => {
41150
41223
  if (autoScroll && containerRef.current) {
41151
41224
  containerRef.current.scrollTop = containerRef.current.scrollHeight;
41152
41225
  }
@@ -41426,9 +41499,9 @@ function getAllEvents(traits2) {
41426
41499
  function EventDispatcherTab({ traits: traits2, schema }) {
41427
41500
  const eventBus = useEventBus();
41428
41501
  const { t } = useTranslate();
41429
- const [log9, setLog] = React83.useState([]);
41430
- const prevStatesRef = React83.useRef(/* @__PURE__ */ new Map());
41431
- React83.useEffect(() => {
41502
+ const [log9, setLog] = React84.useState([]);
41503
+ const prevStatesRef = React84.useRef(/* @__PURE__ */ new Map());
41504
+ React84.useEffect(() => {
41432
41505
  for (const trait of traits2) {
41433
41506
  const prev = prevStatesRef.current.get(trait.id);
41434
41507
  if (prev && prev !== trait.currentState) {
@@ -41597,10 +41670,10 @@ function VerifyModePanel({
41597
41670
  localCount
41598
41671
  }) {
41599
41672
  const { t } = useTranslate();
41600
- const [expanded, setExpanded] = React83.useState(true);
41601
- const scrollRef = React83.useRef(null);
41602
- const prevCountRef = React83.useRef(0);
41603
- React83.useEffect(() => {
41673
+ const [expanded, setExpanded] = React84.useState(true);
41674
+ const scrollRef = React84.useRef(null);
41675
+ const prevCountRef = React84.useRef(0);
41676
+ React84.useEffect(() => {
41604
41677
  if (expanded && transitions.length > prevCountRef.current && scrollRef.current) {
41605
41678
  scrollRef.current.scrollTop = scrollRef.current.scrollHeight;
41606
41679
  }
@@ -41657,10 +41730,10 @@ function RuntimeDebugger({
41657
41730
  schema
41658
41731
  }) {
41659
41732
  const { t } = useTranslate();
41660
- const [isCollapsed, setIsCollapsed] = React83.useState(mode === "verify" ? true : defaultCollapsed);
41661
- const [isVisible, setIsVisible] = React83.useState(mode === "inline" || mode === "verify" || isDebugEnabled2());
41733
+ const [isCollapsed, setIsCollapsed] = React84.useState(mode === "verify" ? true : defaultCollapsed);
41734
+ const [isVisible, setIsVisible] = React84.useState(mode === "inline" || mode === "verify" || isDebugEnabled2());
41662
41735
  const debugData = useDebugData();
41663
- React83.useEffect(() => {
41736
+ React84.useEffect(() => {
41664
41737
  if (mode === "inline") return;
41665
41738
  return onDebugToggle((enabled) => {
41666
41739
  setIsVisible(enabled);
@@ -41669,7 +41742,7 @@ function RuntimeDebugger({
41669
41742
  }
41670
41743
  });
41671
41744
  }, [mode]);
41672
- React83.useEffect(() => {
41745
+ React84.useEffect(() => {
41673
41746
  if (mode === "inline") return;
41674
41747
  const handleKeyDown = (e) => {
41675
41748
  if (e.key === "`" && isVisible) {
@@ -42189,7 +42262,7 @@ var init_StatCard = __esm({
42189
42262
  const labelToUse = propLabel ?? propTitle;
42190
42263
  const eventBus = useEventBus();
42191
42264
  const { t } = useTranslate();
42192
- const handleActionClick = React83__default.useCallback(() => {
42265
+ const handleActionClick = React84__default.useCallback(() => {
42193
42266
  if (action?.event) {
42194
42267
  eventBus.emit(`UI:${action.event}`, {});
42195
42268
  }
@@ -42200,7 +42273,7 @@ var init_StatCard = __esm({
42200
42273
  const data = Array.isArray(entity) ? entity : entity ? [entity] : [];
42201
42274
  const isLoading = externalLoading ?? false;
42202
42275
  const error = externalError;
42203
- const computeMetricValue = React83__default.useCallback(
42276
+ const computeMetricValue = React84__default.useCallback(
42204
42277
  (metric, items) => {
42205
42278
  if (metric.value !== void 0) {
42206
42279
  return metric.value;
@@ -42239,7 +42312,7 @@ var init_StatCard = __esm({
42239
42312
  },
42240
42313
  []
42241
42314
  );
42242
- const schemaStats = React83__default.useMemo(() => {
42315
+ const schemaStats = React84__default.useMemo(() => {
42243
42316
  if (!metrics || metrics.length === 0) return null;
42244
42317
  return metrics.map((metric) => ({
42245
42318
  label: metric.label,
@@ -42247,7 +42320,7 @@ var init_StatCard = __esm({
42247
42320
  format: metric.format
42248
42321
  }));
42249
42322
  }, [metrics, data, computeMetricValue]);
42250
- const calculatedTrend = React83__default.useMemo(() => {
42323
+ const calculatedTrend = React84__default.useMemo(() => {
42251
42324
  if (manualTrend !== void 0) return manualTrend;
42252
42325
  if (previousValue === void 0 || currentValue === void 0)
42253
42326
  return void 0;
@@ -42887,8 +42960,8 @@ var init_SubagentTracePanel = __esm({
42887
42960
  ] });
42888
42961
  };
42889
42962
  InlineActivityStream = ({ activities, autoScroll = true, className }) => {
42890
- const endRef = React83__default.useRef(null);
42891
- React83__default.useEffect(() => {
42963
+ const endRef = React84__default.useRef(null);
42964
+ React84__default.useEffect(() => {
42892
42965
  if (!autoScroll) return;
42893
42966
  endRef.current?.scrollIntoView({ behavior: "smooth", block: "end" });
42894
42967
  }, [activities.length, autoScroll]);
@@ -42982,7 +43055,7 @@ var init_SubagentTracePanel = __esm({
42982
43055
  };
42983
43056
  SubagentRichCard = ({ subagent }) => {
42984
43057
  const { t } = useTranslate();
42985
- const activities = React83__default.useMemo(
43058
+ const activities = React84__default.useMemo(
42986
43059
  () => subagentMessagesToActivities(subagent.messages),
42987
43060
  [subagent.messages]
42988
43061
  );
@@ -43059,8 +43132,8 @@ var init_SubagentTracePanel = __esm({
43059
43132
  ] });
43060
43133
  };
43061
43134
  CoordinatorConversation = ({ messages, autoScroll = true, className }) => {
43062
- const endRef = React83__default.useRef(null);
43063
- React83__default.useEffect(() => {
43135
+ const endRef = React84__default.useRef(null);
43136
+ React84__default.useEffect(() => {
43064
43137
  if (!autoScroll) return;
43065
43138
  endRef.current?.scrollIntoView({ behavior: "smooth", block: "end" });
43066
43139
  }, [messages.length, autoScroll]);
@@ -43495,7 +43568,7 @@ var init_Timeline = __esm({
43495
43568
  }) => {
43496
43569
  const { t } = useTranslate();
43497
43570
  const entityData = entity ?? [];
43498
- const items = React83__default.useMemo(() => {
43571
+ const items = React84__default.useMemo(() => {
43499
43572
  if (propItems) return propItems;
43500
43573
  if (entityData.length === 0) return [];
43501
43574
  return entityData.map((record, idx) => {
@@ -43597,7 +43670,7 @@ var init_Timeline = __esm({
43597
43670
  }
43598
43671
  });
43599
43672
  function extractToastProps(children) {
43600
- if (!React83__default.isValidElement(children)) {
43673
+ if (!React84__default.isValidElement(children)) {
43601
43674
  if (typeof children === "string") {
43602
43675
  return { message: children };
43603
43676
  }
@@ -43639,7 +43712,7 @@ var init_ToastSlot = __esm({
43639
43712
  eventBus.emit(`${prefix}CLOSE`);
43640
43713
  };
43641
43714
  if (!isVisible) return null;
43642
- const isCustomContent = React83__default.isValidElement(children) && !message;
43715
+ const isCustomContent = React84__default.isValidElement(children) && !message;
43643
43716
  return /* @__PURE__ */ jsx(Box, { className: "fixed bottom-4 right-4 z-50", children: isCustomContent ? children : /* @__PURE__ */ jsx(
43644
43717
  Toast,
43645
43718
  {
@@ -44212,7 +44285,7 @@ function SuspenseConfigProvider({
44212
44285
  config,
44213
44286
  children
44214
44287
  }) {
44215
- return React83__default.createElement(
44288
+ return React84__default.createElement(
44216
44289
  SuspenseConfigContext.Provider,
44217
44290
  { value: config },
44218
44291
  children
@@ -44254,7 +44327,7 @@ function enrichFormFields(fields, entityDef) {
44254
44327
  }
44255
44328
  return { name: field, label: humanizeFieldName(field) };
44256
44329
  }
44257
- if (field && typeof field === "object" && !Array.isArray(field) && !React83__default.isValidElement(field) && !(field instanceof Date)) {
44330
+ if (field && typeof field === "object" && !Array.isArray(field) && !React84__default.isValidElement(field) && !(field instanceof Date)) {
44258
44331
  const obj = field;
44259
44332
  const fieldName = typeof obj.name === "string" ? obj.name : typeof obj.field === "string" ? obj.field : void 0;
44260
44333
  if (!fieldName) return field;
@@ -44726,7 +44799,7 @@ function renderPatternChildren(children, onDismiss, parentId = "root", parentPat
44726
44799
  const key = `${parentId}-${index}-trait:${traitName}`;
44727
44800
  return /* @__PURE__ */ jsx(TraitFrame, { traitName }, key);
44728
44801
  }
44729
- return /* @__PURE__ */ jsx(React83__default.Fragment, { children: child }, `${parentId}-${index}`);
44802
+ return /* @__PURE__ */ jsx(React84__default.Fragment, { children: child }, `${parentId}-${index}`);
44730
44803
  }
44731
44804
  if (!child || typeof child !== "object") return null;
44732
44805
  const childId = `${parentId}-${index}`;
@@ -44783,14 +44856,14 @@ function isPatternConfig(value) {
44783
44856
  if (value === null || value === void 0) return false;
44784
44857
  if (typeof value !== "object") return false;
44785
44858
  if (Array.isArray(value)) return false;
44786
- if (React83__default.isValidElement(value)) return false;
44859
+ if (React84__default.isValidElement(value)) return false;
44787
44860
  if (value instanceof Date) return false;
44788
44861
  if (typeof value === "function") return false;
44789
44862
  const record = value;
44790
44863
  return "type" in record && typeof record.type === "string" && getComponentForPattern$1(record.type) !== null;
44791
44864
  }
44792
44865
  function isPlainConfigObject(value) {
44793
- if (React83__default.isValidElement(value)) return false;
44866
+ if (React84__default.isValidElement(value)) return false;
44794
44867
  if (value instanceof Date) return false;
44795
44868
  const proto = Object.getPrototypeOf(value);
44796
44869
  return proto === Object.prototype || proto === null;
@@ -44926,7 +44999,7 @@ function SlotContentRenderer({
44926
44999
  for (const slotKey of CONTENT_NODE_SLOTS) {
44927
45000
  const slotVal = restProps[slotKey];
44928
45001
  if (slotVal === void 0 || slotVal === null) continue;
44929
- if (React83__default.isValidElement(slotVal) || typeof slotVal === "string" || typeof slotVal === "number" || typeof slotVal === "boolean") continue;
45002
+ if (React84__default.isValidElement(slotVal) || typeof slotVal === "string" || typeof slotVal === "number" || typeof slotVal === "boolean") continue;
44930
45003
  const typelessChildren = !Array.isArray(slotVal) && typeof slotVal === "object" && !("type" in slotVal) && Array.isArray(slotVal.children) ? slotVal.children : void 0;
44931
45004
  if (typelessChildren !== void 0 || Array.isArray(slotVal) || typeof slotVal === "object" && "type" in slotVal) {
44932
45005
  nodeSlotOverrides[slotKey] = renderPatternChildren(
@@ -44980,7 +45053,7 @@ function SlotContentRenderer({
44980
45053
  const resolvedItems = Array.isArray(entityVal) && entityVal[0] !== "fn" ? entityVal : null;
44981
45054
  if (resolvedItems && resolvedItems.length > 0 && !finalProps.fields && !finalProps.columns) {
44982
45055
  const sample = resolvedItems[0];
44983
- if (sample && typeof sample === "object" && !Array.isArray(sample) && !React83__default.isValidElement(sample) && !(sample instanceof Date)) {
45056
+ if (sample && typeof sample === "object" && !Array.isArray(sample) && !React84__default.isValidElement(sample) && !(sample instanceof Date)) {
44984
45057
  const keys = Object.keys(sample).filter((k) => k !== "id" && k !== "_id");
44985
45058
  finalProps.fields = keys.map((k, i) => ({ name: k, variant: i === 0 ? "h4" : "body" }));
44986
45059
  }
@@ -45356,7 +45429,7 @@ function resolveLambdaBindings(body, params, item, index) {
45356
45429
  }
45357
45430
  return substituted;
45358
45431
  }
45359
- if (body !== null && typeof body === "object" && !React83__default.isValidElement(body) && !(body instanceof Date) && typeof body !== "function") {
45432
+ if (body !== null && typeof body === "object" && !React84__default.isValidElement(body) && !(body instanceof Date) && typeof body !== "function") {
45360
45433
  const out = {};
45361
45434
  for (const [k, v] of Object.entries(body)) {
45362
45435
  out[k] = recur(v);
@@ -45389,7 +45462,7 @@ function deferLambdaEntityExprs(value) {
45389
45462
  }
45390
45463
  return arr.map((v) => deferLambdaEntityExprs(v));
45391
45464
  }
45392
- if (value !== null && typeof value === "object" && !React83__default.isValidElement(value) && !(value instanceof Date) && typeof value !== "function" && !isRenderBindingMarker(value)) {
45465
+ if (value !== null && typeof value === "object" && !React84__default.isValidElement(value) && !(value instanceof Date) && typeof value !== "function" && !isRenderBindingMarker(value)) {
45393
45466
  const out = {};
45394
45467
  for (const [k, v] of Object.entries(value)) {
45395
45468
  out[k] = deferLambdaEntityExprs(v);
@@ -45403,7 +45476,7 @@ function makeLambdaFn(params, lambdaBody, callerKey) {
45403
45476
  const resolvedBody = deferLambdaEntityExprs(
45404
45477
  resolveLambdaBindings(lambdaBody, params, item, index)
45405
45478
  );
45406
- if (resolvedBody === null || typeof resolvedBody !== "object" || Array.isArray(resolvedBody) || typeof resolvedBody === "function" || React83__default.isValidElement(resolvedBody) || resolvedBody instanceof Date) {
45479
+ if (resolvedBody === null || typeof resolvedBody !== "object" || Array.isArray(resolvedBody) || typeof resolvedBody === "function" || React84__default.isValidElement(resolvedBody) || resolvedBody instanceof Date) {
45407
45480
  return null;
45408
45481
  }
45409
45482
  const record = resolvedBody;
@@ -45422,7 +45495,7 @@ function makeLambdaFn(params, lambdaBody, callerKey) {
45422
45495
  props: childProps,
45423
45496
  priority: 0
45424
45497
  };
45425
- return React83__default.createElement(SlotContentRenderer2, { content: childContent });
45498
+ return React84__default.createElement(SlotContentRenderer2, { content: childContent });
45426
45499
  };
45427
45500
  }
45428
45501
  function convertNode(node, callerKey) {
@@ -45442,7 +45515,7 @@ function convertNode(node, callerKey) {
45442
45515
  });
45443
45516
  return anyChanged ? mapped : node;
45444
45517
  }
45445
- if (typeof node === "object" && !React83__default.isValidElement(node) && !(node instanceof Date)) {
45518
+ if (typeof node === "object" && !React84__default.isValidElement(node) && !(node instanceof Date)) {
45446
45519
  return convertObjectProps(node);
45447
45520
  }
45448
45521
  return node;