@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 React85 from 'react';
2
- import React85__default, { createContext, useContext, useMemo, useRef, useEffect, useCallback, Suspense, useState, useSyncExternalStore, useLayoutEffect, lazy, useId } from 'react';
1
+ import * as React86 from 'react';
2
+ import React86__default, { createContext, useContext, useMemo, useRef, useEffect, useCallback, Suspense, useState, useSyncExternalStore, useLayoutEffect, lazy, useId } from 'react';
3
3
  import { EventBusContext, useTraitScopeChain, useEntitySchemaOptional, useEntityBindingSnapshot, useTraitScope, TraitScopeProvider, useCurrentPagePath, useGameAudioContextOptional } from '@almadar/ui/providers';
4
4
  import { createLogger, isLogLevelEnabled } from '@almadar/logger';
5
5
  import { createContextFromBindings, interpolateValue } from '@almadar/runtime';
@@ -281,7 +281,7 @@ function resolveMarkerExpression(expression, entity, config, state) {
281
281
  function isPlainObject(value) {
282
282
  if (value === null || value === void 0 || typeof value !== "object") return false;
283
283
  if (Array.isArray(value)) return false;
284
- if (React85__default.isValidElement(value)) return false;
284
+ if (React86__default.isValidElement(value)) return false;
285
285
  if (value instanceof Date) return false;
286
286
  if (typeof value === "function") return false;
287
287
  return true;
@@ -501,7 +501,7 @@ var init_Box = __esm({
501
501
  fixed: "fixed",
502
502
  sticky: "sticky"
503
503
  };
504
- Box = React85__default.forwardRef(
504
+ Box = React86__default.forwardRef(
505
505
  ({
506
506
  padding,
507
507
  paddingX,
@@ -566,7 +566,7 @@ var init_Box = __esm({
566
566
  onPointerDown?.(e);
567
567
  }, [hoverEvent, tapReveal, triggerProps, onPointerDown]);
568
568
  const isClickable = action || onClick;
569
- return React85__default.createElement(
569
+ return React86__default.createElement(
570
570
  Component,
571
571
  {
572
572
  ref,
@@ -783,7 +783,7 @@ var init_Icon = __esm({
783
783
  const effectiveName = typeof icon === "string" && icon !== "" ? icon : name;
784
784
  const effectiveStrokeWidth = strokeWidth != null && strokeWidth > 0 ? strokeWidth : void 0;
785
785
  const family = useIconFamily();
786
- const RenderedComponent = React85__default.useMemo(() => {
786
+ const RenderedComponent = React86__default.useMemo(() => {
787
787
  if (directIcon) return null;
788
788
  return effectiveName ? resolveIconForFamily(effectiveName) : null;
789
789
  }, [directIcon, effectiveName, family]);
@@ -907,7 +907,7 @@ var init_atlasSlice = __esm({
907
907
  }
908
908
  });
909
909
  function useAtlasSliceDataUrl(asset) {
910
- const [, bump] = React85.useReducer((x) => x + 1, 0);
910
+ const [, bump] = React86.useReducer((x) => x + 1, 0);
911
911
  if (!isAtlasAsset(asset)) return void 0;
912
912
  const key = `${asset.atlas}#${asset.sprite}`;
913
913
  const cached = sliceDataUrlCache.get(key);
@@ -970,13 +970,13 @@ function AtlasImage({
970
970
  style,
971
971
  "aria-hidden": ariaHidden
972
972
  }) {
973
- const [, bump] = React85.useReducer((x) => x + 1, 0);
974
- const canvasRef = React85.useRef(null);
973
+ const [, bump] = React86.useReducer((x) => x + 1, 0);
974
+ const canvasRef = React86.useRef(null);
975
975
  const sliced = isAtlasAsset(asset);
976
976
  const atlas = sliced ? getAtlas(asset.atlas, bump) : void 0;
977
977
  const img = sliced && asset?.url ? getSheetImage(asset.url, bump) : null;
978
978
  const rect = sliced && atlas ? subRectFor(atlas, asset.sprite) : null;
979
- React85.useEffect(() => {
979
+ React86.useEffect(() => {
980
980
  const canvas = canvasRef.current;
981
981
  if (!canvas || !img || !rect) return;
982
982
  canvas.width = rect.sw;
@@ -1052,7 +1052,7 @@ function resolveIconProp(value, sizeClass) {
1052
1052
  const IconComp = value;
1053
1053
  return /* @__PURE__ */ jsx(IconComp, { className: sizeClass });
1054
1054
  }
1055
- if (React85__default.isValidElement(value)) {
1055
+ if (React86__default.isValidElement(value)) {
1056
1056
  return value;
1057
1057
  }
1058
1058
  if (typeof value === "object" && value !== null && isIconLike(value)) {
@@ -1129,7 +1129,7 @@ var init_Button = __esm({
1129
1129
  md: "h-icon-default w-icon-default",
1130
1130
  lg: "h-icon-default w-icon-default"
1131
1131
  };
1132
- Button = React85__default.forwardRef(
1132
+ Button = React86__default.forwardRef(
1133
1133
  ({
1134
1134
  className,
1135
1135
  variant = "primary",
@@ -1199,7 +1199,7 @@ var Dialog;
1199
1199
  var init_Dialog = __esm({
1200
1200
  "components/core/atoms/Dialog.tsx"() {
1201
1201
  init_cn();
1202
- Dialog = React85__default.forwardRef(
1202
+ Dialog = React86__default.forwardRef(
1203
1203
  ({
1204
1204
  role = "dialog",
1205
1205
  "aria-modal": ariaModal = true,
@@ -1410,7 +1410,7 @@ var init_Typography = __esm({
1410
1410
  if (format !== void 0 && format !== "none" && (typeof body === "string" || typeof body === "number" || body instanceof Date)) {
1411
1411
  body = formatValue(body, format);
1412
1412
  }
1413
- return React85__default.createElement(
1413
+ return React86__default.createElement(
1414
1414
  Component,
1415
1415
  {
1416
1416
  id,
@@ -1973,7 +1973,7 @@ var init_Badge = __esm({
1973
1973
  md: "px-2.5 py-1 text-sm",
1974
1974
  lg: "px-3 py-1.5 text-base"
1975
1975
  };
1976
- Badge = React85__default.forwardRef(
1976
+ Badge = React86__default.forwardRef(
1977
1977
  ({ className, variant = "default", size = "sm", amount, label, icon, iconAsset, children, onRemove, removeLabel, ...props }, ref) => {
1978
1978
  const iconSizes3 = {
1979
1979
  sm: "h-icon-default w-icon-default",
@@ -2323,7 +2323,7 @@ var init_SvgFlow = __esm({
2323
2323
  width = 100,
2324
2324
  height = 100
2325
2325
  }) => {
2326
- const markerId = React85__default.useMemo(() => {
2326
+ const markerId = React86__default.useMemo(() => {
2327
2327
  flowIdCounter += 1;
2328
2328
  return `almadar-flow-arrow-${flowIdCounter}`;
2329
2329
  }, []);
@@ -2916,7 +2916,7 @@ var init_SvgRing = __esm({
2916
2916
  width = 100,
2917
2917
  height = 100
2918
2918
  }) => {
2919
- const gradientId = React85__default.useMemo(() => {
2919
+ const gradientId = React86__default.useMemo(() => {
2920
2920
  ringIdCounter += 1;
2921
2921
  return `almadar-ring-glow-${ringIdCounter}`;
2922
2922
  }, []);
@@ -3097,7 +3097,7 @@ var init_Input = __esm({
3097
3097
  init_cn();
3098
3098
  init_Icon();
3099
3099
  init_useEventBus();
3100
- Input = React85__default.forwardRef(
3100
+ Input = React86__default.forwardRef(
3101
3101
  ({
3102
3102
  className,
3103
3103
  inputType,
@@ -3121,9 +3121,9 @@ var init_Input = __esm({
3121
3121
  const eventBus = useEventBus();
3122
3122
  const type = inputType || htmlType || "text";
3123
3123
  const isDeclarative = typeof onChange === "string";
3124
- const [localValue, setLocalValue] = React85__default.useState(value);
3125
- const pendingEchoRef = React85__default.useRef(/* @__PURE__ */ new Set());
3126
- React85__default.useEffect(() => {
3124
+ const [localValue, setLocalValue] = React86__default.useState(value);
3125
+ const pendingEchoRef = React86__default.useRef(/* @__PURE__ */ new Set());
3126
+ React86__default.useEffect(() => {
3127
3127
  if (!isDeclarative) return;
3128
3128
  const incoming = value == null ? "" : String(value);
3129
3129
  if (pendingEchoRef.current.has(incoming)) {
@@ -3283,7 +3283,7 @@ var Label;
3283
3283
  var init_Label = __esm({
3284
3284
  "components/core/atoms/Label.tsx"() {
3285
3285
  init_cn();
3286
- Label = React85__default.forwardRef(
3286
+ Label = React86__default.forwardRef(
3287
3287
  ({ className, required, children, ...props }, ref) => {
3288
3288
  return /* @__PURE__ */ jsxs(
3289
3289
  "label",
@@ -3310,7 +3310,7 @@ var init_Textarea = __esm({
3310
3310
  "components/core/atoms/Textarea.tsx"() {
3311
3311
  init_cn();
3312
3312
  init_useEventBus();
3313
- Textarea = React85__default.forwardRef(
3313
+ Textarea = React86__default.forwardRef(
3314
3314
  ({ className, error, onChange, ...props }, ref) => {
3315
3315
  const eventBus = useEventBus();
3316
3316
  const handleChange = (e) => {
@@ -3549,7 +3549,7 @@ var init_Select = __esm({
3549
3549
  init_cn();
3550
3550
  init_Icon();
3551
3551
  init_useEventBus();
3552
- Select = React85__default.forwardRef(
3552
+ Select = React86__default.forwardRef(
3553
3553
  (props, _ref) => {
3554
3554
  const { multiple, searchable, clearable } = props;
3555
3555
  if (multiple || searchable || clearable) {
@@ -3566,7 +3566,7 @@ var init_Checkbox = __esm({
3566
3566
  "components/core/atoms/Checkbox.tsx"() {
3567
3567
  init_cn();
3568
3568
  init_useEventBus();
3569
- Checkbox = React85__default.forwardRef(
3569
+ Checkbox = React86__default.forwardRef(
3570
3570
  ({ className, label, id, onChange, ...props }, ref) => {
3571
3571
  const inputId = id || `checkbox-${Math.random().toString(36).substr(2, 9)}`;
3572
3572
  const eventBus = useEventBus();
@@ -3620,7 +3620,7 @@ var init_Spinner = __esm({
3620
3620
  md: "h-6 w-6",
3621
3621
  lg: "h-8 w-8"
3622
3622
  };
3623
- Spinner = React85__default.forwardRef(
3623
+ Spinner = React86__default.forwardRef(
3624
3624
  ({ className, size = "md", overlay, ...props }, ref) => {
3625
3625
  if (overlay) {
3626
3626
  return /* @__PURE__ */ jsx(
@@ -3710,7 +3710,7 @@ var init_Card = __esm({
3710
3710
  chip: "shadow-none rounded-pill border-[length:var(--border-width)] border-border",
3711
3711
  "tile-image-first": "p-0 overflow-hidden"
3712
3712
  };
3713
- Card = React85__default.forwardRef(
3713
+ Card = React86__default.forwardRef(
3714
3714
  ({
3715
3715
  className,
3716
3716
  variant = "bordered",
@@ -3759,9 +3759,9 @@ var init_Card = __esm({
3759
3759
  }
3760
3760
  );
3761
3761
  Card.displayName = "Card";
3762
- CardHeader = React85__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("mb-4", className), ...props }));
3762
+ CardHeader = React86__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("mb-4", className), ...props }));
3763
3763
  CardHeader.displayName = "CardHeader";
3764
- CardTitle = React85__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
3764
+ CardTitle = React86__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
3765
3765
  "h3",
3766
3766
  {
3767
3767
  ref,
@@ -3774,11 +3774,11 @@ var init_Card = __esm({
3774
3774
  }
3775
3775
  ));
3776
3776
  CardTitle.displayName = "CardTitle";
3777
- CardContent = React85__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("", className), ...props }));
3777
+ CardContent = React86__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("", className), ...props }));
3778
3778
  CardContent.displayName = "CardContent";
3779
3779
  CardBody = CardContent;
3780
3780
  CardBody.displayName = "CardBody";
3781
- CardFooter = React85__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
3781
+ CardFooter = React86__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
3782
3782
  "div",
3783
3783
  {
3784
3784
  ref,
@@ -3865,7 +3865,7 @@ var init_FilterPill = __esm({
3865
3865
  md: "w-3.5 h-3.5",
3866
3866
  lg: "w-4 h-4"
3867
3867
  };
3868
- FilterPill = React85__default.forwardRef(
3868
+ FilterPill = React86__default.forwardRef(
3869
3869
  ({
3870
3870
  className,
3871
3871
  variant = "default",
@@ -3994,8 +3994,8 @@ var init_Avatar = __esm({
3994
3994
  actionPayload
3995
3995
  }) => {
3996
3996
  const eventBus = useEventBus();
3997
- const [imgFailed, setImgFailed] = React85__default.useState(false);
3998
- React85__default.useEffect(() => {
3997
+ const [imgFailed, setImgFailed] = React86__default.useState(false);
3998
+ React86__default.useEffect(() => {
3999
3999
  setImgFailed(false);
4000
4000
  }, [src]);
4001
4001
  const initials = providedInitials ?? (name ? generateInitials(name) : void 0);
@@ -4108,7 +4108,7 @@ var init_Center = __esm({
4108
4108
  as: Component = "div"
4109
4109
  }) => {
4110
4110
  const mergedStyle = minHeight ? { minHeight, ...style } : style;
4111
- return React85__default.createElement(Component, {
4111
+ return React86__default.createElement(Component, {
4112
4112
  className: cn(
4113
4113
  inline ? "inline-flex" : "flex",
4114
4114
  horizontal && "justify-center",
@@ -4376,7 +4376,7 @@ var init_Radio = __esm({
4376
4376
  md: "w-2.5 h-2.5",
4377
4377
  lg: "w-3 h-3"
4378
4378
  };
4379
- Radio = React85__default.forwardRef(
4379
+ Radio = React86__default.forwardRef(
4380
4380
  ({
4381
4381
  label,
4382
4382
  helperText,
@@ -4393,12 +4393,12 @@ var init_Radio = __esm({
4393
4393
  onChange,
4394
4394
  ...props
4395
4395
  }, ref) => {
4396
- const reactId = React85__default.useId();
4396
+ const reactId = React86__default.useId();
4397
4397
  const baseId = id || `radio-${reactId}`;
4398
4398
  const hasError = !!error;
4399
4399
  const eventBus = useEventBus();
4400
- const [selected, setSelected] = React85__default.useState(value);
4401
- React85__default.useEffect(() => {
4400
+ const [selected, setSelected] = React86__default.useState(value);
4401
+ React86__default.useEffect(() => {
4402
4402
  if (value !== void 0) setSelected(value);
4403
4403
  }, [value]);
4404
4404
  const pick = (next, e) => {
@@ -4580,7 +4580,7 @@ var init_Switch = __esm({
4580
4580
  "components/core/atoms/Switch.tsx"() {
4581
4581
  "use client";
4582
4582
  init_cn();
4583
- Switch = React85.forwardRef(
4583
+ Switch = React86.forwardRef(
4584
4584
  ({
4585
4585
  checked,
4586
4586
  defaultChecked = false,
@@ -4591,10 +4591,10 @@ var init_Switch = __esm({
4591
4591
  name,
4592
4592
  className
4593
4593
  }, ref) => {
4594
- const [isChecked, setIsChecked] = React85.useState(
4594
+ const [isChecked, setIsChecked] = React86.useState(
4595
4595
  checked !== void 0 ? checked : defaultChecked
4596
4596
  );
4597
- React85.useEffect(() => {
4597
+ React86.useEffect(() => {
4598
4598
  if (checked !== void 0) {
4599
4599
  setIsChecked(checked);
4600
4600
  }
@@ -4757,7 +4757,7 @@ var init_Stack = __esm({
4757
4757
  };
4758
4758
  const isHorizontal = direction === "horizontal";
4759
4759
  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";
4760
- return React85__default.createElement(
4760
+ return React86__default.createElement(
4761
4761
  Component,
4762
4762
  {
4763
4763
  className: cn(
@@ -4957,7 +4957,7 @@ var Aside;
4957
4957
  var init_Aside = __esm({
4958
4958
  "components/core/atoms/Aside.tsx"() {
4959
4959
  init_cn();
4960
- Aside = React85__default.forwardRef(
4960
+ Aside = React86__default.forwardRef(
4961
4961
  ({ className, children, ...rest }, ref) => /* @__PURE__ */ jsx("aside", { ref, className: cn(className), ...rest, children })
4962
4962
  );
4963
4963
  Aside.displayName = "Aside";
@@ -5036,9 +5036,9 @@ var init_LawReferenceTooltip = __esm({
5036
5036
  className
5037
5037
  }) => {
5038
5038
  const { t } = useTranslate();
5039
- const [isVisible, setIsVisible] = React85__default.useState(false);
5040
- const timeoutRef = React85__default.useRef(null);
5041
- const triggerRef = React85__default.useRef(null);
5039
+ const [isVisible, setIsVisible] = React86__default.useState(false);
5040
+ const timeoutRef = React86__default.useRef(null);
5041
+ const triggerRef = React86__default.useRef(null);
5042
5042
  const handleMouseEnter = () => {
5043
5043
  if (timeoutRef.current) clearTimeout(timeoutRef.current);
5044
5044
  timeoutRef.current = setTimeout(() => setIsVisible(true), 200);
@@ -5049,7 +5049,7 @@ var init_LawReferenceTooltip = __esm({
5049
5049
  };
5050
5050
  const { revealed, triggerProps } = useTapReveal({ refs: [triggerRef] });
5051
5051
  const open = isVisible || revealed;
5052
- React85__default.useEffect(() => {
5052
+ React86__default.useEffect(() => {
5053
5053
  return () => {
5054
5054
  if (timeoutRef.current) clearTimeout(timeoutRef.current);
5055
5055
  };
@@ -5259,7 +5259,7 @@ var init_StatusDot = __esm({
5259
5259
  md: "w-2.5 h-2.5",
5260
5260
  lg: "w-3 h-3"
5261
5261
  };
5262
- StatusDot = React85__default.forwardRef(
5262
+ StatusDot = React86__default.forwardRef(
5263
5263
  ({ className, status = "offline", pulse = false, size = "md", label, ...props }, ref) => {
5264
5264
  return /* @__PURE__ */ jsx(
5265
5265
  "span",
@@ -5313,7 +5313,7 @@ var init_TrendIndicator = __esm({
5313
5313
  down: "trending-down",
5314
5314
  flat: "arrow-right"
5315
5315
  };
5316
- TrendIndicator = React85__default.forwardRef(
5316
+ TrendIndicator = React86__default.forwardRef(
5317
5317
  ({
5318
5318
  className,
5319
5319
  value,
@@ -5382,7 +5382,7 @@ var init_RangeSlider = __esm({
5382
5382
  md: "w-4 h-4",
5383
5383
  lg: "w-5 h-5"
5384
5384
  };
5385
- RangeSlider = React85__default.forwardRef(
5385
+ RangeSlider = React86__default.forwardRef(
5386
5386
  ({
5387
5387
  className,
5388
5388
  min = 0,
@@ -5993,7 +5993,7 @@ var init_ContentSection = __esm({
5993
5993
  md: "py-16",
5994
5994
  lg: "py-24"
5995
5995
  };
5996
- ContentSection = React85__default.forwardRef(
5996
+ ContentSection = React86__default.forwardRef(
5997
5997
  ({ children, background = "default", padding = "lg", id, className }, ref) => {
5998
5998
  return /* @__PURE__ */ jsx(
5999
5999
  Box,
@@ -6527,7 +6527,7 @@ var init_AnimatedReveal = __esm({
6527
6527
  "scale-up": { opacity: 1, transform: "scale(1) translateY(0)" },
6528
6528
  "none": {}
6529
6529
  };
6530
- AnimatedReveal = React85__default.forwardRef(
6530
+ AnimatedReveal = React86__default.forwardRef(
6531
6531
  ({
6532
6532
  trigger = "scroll",
6533
6533
  animation = "fade-up",
@@ -6687,7 +6687,7 @@ var init_AnimatedGraphic = __esm({
6687
6687
  "components/marketing/atoms/AnimatedGraphic.tsx"() {
6688
6688
  "use client";
6689
6689
  init_cn();
6690
- AnimatedGraphic = React85__default.forwardRef(
6690
+ AnimatedGraphic = React86__default.forwardRef(
6691
6691
  ({
6692
6692
  src,
6693
6693
  svgContent,
@@ -6710,7 +6710,7 @@ var init_AnimatedGraphic = __esm({
6710
6710
  const fetchedSvg = useFetchedSvg(svgContent ? void 0 : src);
6711
6711
  const resolvedSvg = svgContent ?? fetchedSvg;
6712
6712
  const prevAnimateRef = useRef(animate);
6713
- const setRef = React85__default.useCallback(
6713
+ const setRef = React86__default.useCallback(
6714
6714
  (node) => {
6715
6715
  containerRef.current = node;
6716
6716
  if (typeof ref === "function") ref(node);
@@ -7438,9 +7438,9 @@ function ControlButton({
7438
7438
  className
7439
7439
  }) {
7440
7440
  const eventBus = useEventBus();
7441
- const [isPressed, setIsPressed] = React85.useState(false);
7441
+ const [isPressed, setIsPressed] = React86.useState(false);
7442
7442
  const actualPressed = pressed ?? isPressed;
7443
- const handlePointerDown = React85.useCallback(
7443
+ const handlePointerDown = React86.useCallback(
7444
7444
  (e) => {
7445
7445
  e.preventDefault();
7446
7446
  if (disabled) return;
@@ -7450,7 +7450,7 @@ function ControlButton({
7450
7450
  },
7451
7451
  [disabled, pressEvent, eventBus, onPress]
7452
7452
  );
7453
- const handlePointerUp = React85.useCallback(
7453
+ const handlePointerUp = React86.useCallback(
7454
7454
  (e) => {
7455
7455
  e.preventDefault();
7456
7456
  if (disabled) return;
@@ -7460,7 +7460,7 @@ function ControlButton({
7460
7460
  },
7461
7461
  [disabled, releaseEvent, eventBus, onRelease]
7462
7462
  );
7463
- const handlePointerLeave = React85.useCallback(
7463
+ const handlePointerLeave = React86.useCallback(
7464
7464
  (e) => {
7465
7465
  if (isPressed) {
7466
7466
  setIsPressed(false);
@@ -7718,8 +7718,8 @@ function ControlGrid({
7718
7718
  className
7719
7719
  }) {
7720
7720
  const eventBus = useEventBus();
7721
- const [active, setActive] = React85.useState(/* @__PURE__ */ new Set());
7722
- const handlePress = React85.useCallback(
7721
+ const [active, setActive] = React86.useState(/* @__PURE__ */ new Set());
7722
+ const handlePress = React86.useCallback(
7723
7723
  (id) => {
7724
7724
  setActive((prev) => new Set(prev).add(id));
7725
7725
  if (actionEvent) eventBus.emit(`UI:${actionEvent}`, { id, pressed: true });
@@ -7733,7 +7733,7 @@ function ControlGrid({
7733
7733
  },
7734
7734
  [kind, actionEvent, directionEvent, directionEvents, eventBus, onAction, onDirection]
7735
7735
  );
7736
- const handleRelease = React85.useCallback(
7736
+ const handleRelease = React86.useCallback(
7737
7737
  (id) => {
7738
7738
  setActive((prev) => {
7739
7739
  const next = new Set(prev);
@@ -8091,7 +8091,7 @@ function GameMenu({
8091
8091
  }) {
8092
8092
  const resolvedOptions = (options?.length ? options : void 0) ?? (menuItems?.length ? menuItems : void 0) ?? DEFAULT_MENU_OPTIONS;
8093
8093
  const eventBus = useEventBus();
8094
- const handleOptionClick = React85.useCallback(
8094
+ const handleOptionClick = React86.useCallback(
8095
8095
  (option) => {
8096
8096
  if (option.event) {
8097
8097
  eventBus.emit(`UI:${option.event}`, { option });
@@ -8327,7 +8327,7 @@ function StateGraph({
8327
8327
  }) {
8328
8328
  const eventBus = useEventBus();
8329
8329
  const nodes = states ?? [];
8330
- const positions = React85.useMemo(() => layoutStates(nodes, width, height), [nodes, width, height]);
8330
+ const positions = React86.useMemo(() => layoutStates(nodes, width, height), [nodes, width, height]);
8331
8331
  return /* @__PURE__ */ jsxs(
8332
8332
  Box,
8333
8333
  {
@@ -8398,8 +8398,8 @@ function MiniMap({
8398
8398
  tileAssets,
8399
8399
  unitAssets
8400
8400
  }) {
8401
- const canvasRef = React85.useRef(null);
8402
- const imgCacheRef = React85.useRef(/* @__PURE__ */ new Map());
8401
+ const canvasRef = React86.useRef(null);
8402
+ const imgCacheRef = React86.useRef(/* @__PURE__ */ new Map());
8403
8403
  function loadImg(url) {
8404
8404
  const cached = imgCacheRef.current.get(url);
8405
8405
  if (cached) return cached.complete ? cached : null;
@@ -8415,7 +8415,7 @@ function MiniMap({
8415
8415
  imgCacheRef.current.set(url, img);
8416
8416
  return null;
8417
8417
  }
8418
- React85.useEffect(() => {
8418
+ React86.useEffect(() => {
8419
8419
  const canvas = canvasRef.current;
8420
8420
  if (!canvas) return;
8421
8421
  const ctx = canvas.getContext("2d");
@@ -8990,6 +8990,21 @@ var init_projector = __esm({
8990
8990
  function isValidScenePos(pos) {
8991
8991
  return Number.isFinite(pos?.x) && Number.isFinite(pos?.y);
8992
8992
  }
8993
+ function spriteRect(projector, node, natural) {
8994
+ const tw = projector.tileWidth;
8995
+ const fallbackW = projector.worldPixelDirect ? natural?.w ?? 0 : tw;
8996
+ const fallbackH = projector.worldPixelDirect ? natural?.h ?? 0 : tw;
8997
+ const w = node.width !== void 0 ? node.width * tw : fallbackW;
8998
+ const h = node.height !== void 0 ? node.height * tw : fallbackH;
8999
+ const anchor = node.anchor ?? "top-left";
9000
+ const p = projector.anchorPoint(node.position, anchor);
9001
+ return {
9002
+ x: anchor === "top-left" ? p.x : p.x - w / 2,
9003
+ y: anchor === "ground" ? p.y - h : anchor === "center" ? p.y - h / 2 : p.y,
9004
+ w,
9005
+ h
9006
+ };
9007
+ }
8993
9008
  var init_contract = __esm({
8994
9009
  "lib/drawable/contract.ts"() {
8995
9010
  }
@@ -9004,16 +9019,11 @@ function paintFallbackSquare(painter, node, dctx, reason) {
9004
9019
  warnMissingOnce(reason, node);
9005
9020
  const tw = dctx.projector.tileWidth;
9006
9021
  const natural = dctx.projector.worldPixelDirect ? FALLBACK_WORLD_PX : tw;
9007
- const w = node.width !== void 0 ? node.width * tw : natural;
9008
- const h = node.height !== void 0 ? node.height * tw : natural;
9009
- const anchor = node.anchor ?? "top-left";
9010
- const p = dctx.projector.anchorPoint(node.position, anchor);
9011
- const dx = anchor === "top-left" ? p.x : p.x - w / 2;
9012
- const dy = anchor === "ground" ? p.y - h : anchor === "center" ? p.y - h / 2 : p.y;
9022
+ const rect = spriteRect(dctx.projector, node, { w: natural, h: natural });
9013
9023
  painter.save();
9014
9024
  if (node.opacity !== void 0 && node.opacity !== 1) painter.setAlpha(node.opacity);
9015
- painter.fillRect(dx, dy, w, h, "#9b8f7f");
9016
- painter.strokeRect(dx, dy, w, h, "#5e564b", Math.max(1, tw / 32));
9025
+ painter.fillRect(rect.x, rect.y, rect.w, rect.h, "#9b8f7f");
9026
+ painter.strokeRect(rect.x, rect.y, rect.w, rect.h, "#5e564b", Math.max(1, tw / 32));
9017
9027
  painter.restore();
9018
9028
  }
9019
9029
  function DrawSprite(_props) {
@@ -9050,15 +9060,10 @@ var init_DrawSprite = __esm({
9050
9060
  }
9051
9061
  src = { x: r.sx, y: r.sy, w: r.sw, h: r.sh };
9052
9062
  }
9053
- const tw = dctx.projector.tileWidth;
9054
- const fallbackW = dctx.projector.worldPixelDirect ? src ? src.w : tex.width : tw;
9055
- const fallbackH = dctx.projector.worldPixelDirect ? src ? src.h : tex.height : tw;
9056
- const w = node.width !== void 0 ? node.width * tw : fallbackW;
9057
- const h = node.height !== void 0 ? node.height * tw : fallbackH;
9058
- const anchor = node.anchor ?? "top-left";
9059
- const p = dctx.projector.anchorPoint(node.position, anchor);
9060
- const dx = anchor === "top-left" ? p.x : p.x - w / 2;
9061
- const dy = anchor === "ground" ? p.y - h : anchor === "center" ? p.y - h / 2 : p.y;
9063
+ const rect = spriteRect(dctx.projector, node, src ? { w: src.w, h: src.h } : { w: tex.width, h: tex.height });
9064
+ const { w, h } = rect;
9065
+ const dx = rect.x;
9066
+ const dy = rect.y;
9062
9067
  painter.save();
9063
9068
  if (node.opacity !== void 0 && node.opacity !== 1) painter.setAlpha(node.opacity);
9064
9069
  if (node.shadow) painter.setShadow(node.shadow);
@@ -9080,9 +9085,24 @@ var init_DrawSprite = __esm({
9080
9085
  };
9081
9086
  }
9082
9087
  });
9083
-
9084
- // components/game/atoms/DrawShape.tsx
9085
- function DrawShape(_props) {
9088
+ var DrawableRegistryContext;
9089
+ var init_registry = __esm({
9090
+ "lib/drawable/registry.ts"() {
9091
+ DrawableRegistryContext = createContext(null);
9092
+ }
9093
+ });
9094
+ function DrawShape(props) {
9095
+ const register = useContext(DrawableRegistryContext);
9096
+ if (register) {
9097
+ const { opacity, ...rest } = props;
9098
+ const node = {
9099
+ ...rest,
9100
+ type: "draw-shape",
9101
+ ...opacity !== void 0 && opacity > 0 ? { opacity } : {}
9102
+ };
9103
+ register(node);
9104
+ return /* @__PURE__ */ jsx("div", { "data-draw-shape-debug": "", style: { position: "absolute", width: 4, height: 4, background: "red", zIndex: 9999 } });
9105
+ }
9086
9106
  return null;
9087
9107
  }
9088
9108
  var paintShape;
@@ -9090,6 +9110,7 @@ var init_DrawShape = __esm({
9090
9110
  "components/game/atoms/DrawShape.tsx"() {
9091
9111
  "use client";
9092
9112
  init_contract();
9113
+ init_registry();
9093
9114
  paintShape = (painter, node, dctx) => {
9094
9115
  if (!isValidScenePos(node.position)) return;
9095
9116
  painter.save();
@@ -9274,12 +9295,18 @@ function collectDrawnItems(nodes) {
9274
9295
  for (const n of nodes) {
9275
9296
  switch (n.type) {
9276
9297
  case "draw-sprite":
9298
+ if (isValidScenePos(n.position)) out.push({ pos: n.position, id: n.id, anchor: n.anchor, width: n.width, height: n.height });
9299
+ break;
9277
9300
  case "draw-shape":
9278
9301
  case "draw-text":
9279
9302
  case "draw-group":
9280
9303
  if (isValidScenePos(n.position)) out.push({ pos: n.position, id: n.id });
9281
9304
  break;
9282
9305
  case "draw-sprite-layer":
9306
+ for (const it of n.items) {
9307
+ if (isValidScenePos(it.position)) out.push({ pos: it.position, id: it.id, anchor: it.anchor, width: it.width, height: it.height });
9308
+ }
9309
+ break;
9283
9310
  case "draw-shape-layer":
9284
9311
  case "draw-text-layer":
9285
9312
  for (const it of n.items) {
@@ -9297,6 +9324,15 @@ function buildHitIndex(items) {
9297
9324
  }
9298
9325
  return m;
9299
9326
  }
9327
+ function hitTestSprites(items, projector, point) {
9328
+ for (let i = items.length - 1; i >= 0; i--) {
9329
+ const it = items[i];
9330
+ if (it.id === void 0) continue;
9331
+ const r = spriteRect(projector, { position: it.pos, anchor: it.anchor, width: it.width, height: it.height });
9332
+ if (point.x >= r.x && point.x <= r.x + r.w && point.y >= r.y && point.y <= r.y + r.h) return it.id;
9333
+ }
9334
+ return void 0;
9335
+ }
9300
9336
  var init_hitTest = __esm({
9301
9337
  "lib/drawable/hitTest.ts"() {
9302
9338
  init_contract();
@@ -9325,9 +9361,17 @@ function Canvas2D({
9325
9361
  showMinimap = true,
9326
9362
  followTarget,
9327
9363
  cameraPos,
9328
- bgColor
9364
+ bgColor,
9365
+ children
9329
9366
  }) {
9330
9367
  const instanceId = useMemo(() => Math.random().toString(36).slice(2, 8), []);
9368
+ const childDrawablesRef = useRef([]);
9369
+ childDrawablesRef.current = [];
9370
+ const registerChildDrawable = useCallback((node) => {
9371
+ childDrawablesRef.current.push(node);
9372
+ }, []);
9373
+ const hasJsxChildren = React86.Children.count(children) > 0;
9374
+ drawables && drawables.length > 0 ? drawables : childDrawablesRef.current;
9331
9375
  function isDrawableLayer(node) {
9332
9376
  return node.type === "draw-sprite-layer" || node.type === "draw-shape-layer" || node.type === "draw-text-layer";
9333
9377
  }
@@ -9510,7 +9554,19 @@ function Canvas2D({
9510
9554
  ctx.fillStyle = bgColor ?? BACKGROUND_FALLBACK_COLOR;
9511
9555
  ctx.fillRect(0, 0, viewportSize.width, viewportSize.height);
9512
9556
  }
9513
- if (!drawables || drawables.length === 0) return;
9557
+ if (!drawables || drawables.length === 0) {
9558
+ const childDrawables = childDrawablesRef.current;
9559
+ if (childDrawables.length === 0) return;
9560
+ const painter0 = createWebPainter(ctx, bumpAtlas);
9561
+ painter0.save();
9562
+ painter0.translate(viewportSize.width / 2, viewportSize.height / 2);
9563
+ painter0.scale(cameraRef.current.zoom, cameraRef.current.zoom);
9564
+ painter0.translate(-viewportSize.width / 2, -viewportSize.height / 2);
9565
+ const dctx0 = { projector, time: 0, invalidate: bumpAtlas };
9566
+ for (const node of childDrawables) paintDrawable(painter0, node, dctx0);
9567
+ painter0.restore();
9568
+ return;
9569
+ }
9514
9570
  const cam = cameraRef.current;
9515
9571
  if (camera !== "follow" && dragDistance() === 0) {
9516
9572
  const focus = cameraPos ?? defaultGridFocus;
@@ -9594,6 +9650,11 @@ function Canvas2D({
9594
9650
  if (dragDistance() > 5) return;
9595
9651
  if (!canvasRef.current || !tileClickEvent && !unitClickEvent) return;
9596
9652
  const world = screenToWorld(e.clientX, e.clientY, canvasRef.current, viewportSize);
9653
+ const spriteHit = unitClickEvent ? hitTestSprites(drawnItems, projector, world) : void 0;
9654
+ if (spriteHit !== void 0 && unitClickEvent) {
9655
+ eventBus.emit(`UI:${unitClickEvent}`, { unitId: spriteHit });
9656
+ return;
9657
+ }
9597
9658
  const adjustedX = world.x - scaledTileWidth / 2;
9598
9659
  const adjustedY = squareGrid ? world.y - scaledTileWidth / 2 : world.y - scaledDiamondTopY - scaledFloorHeight / 2;
9599
9660
  const isoPos = unproject(adjustedX, adjustedY);
@@ -9603,7 +9664,7 @@ function Canvas2D({
9603
9664
  } else if (tileClickEvent) {
9604
9665
  eventBus.emit(`UI:${tileClickEvent}`, { x: isoPos.x, y: isoPos.y });
9605
9666
  }
9606
- }, [enableCamera, handlePointerUp, dragDistance, screenToWorld, viewportSize, scaledTileWidth, squareGrid, scaledDiamondTopY, scaledFloorHeight, unproject, hitIndex, tileClickEvent, unitClickEvent, eventBus]);
9667
+ }, [enableCamera, handlePointerUp, dragDistance, screenToWorld, viewportSize, scaledTileWidth, squareGrid, scaledDiamondTopY, scaledFloorHeight, unproject, hitIndex, drawnItems, projector, tileClickEvent, unitClickEvent, eventBus]);
9607
9668
  const handleCanvasPointerLeave = useCallback(() => {
9608
9669
  handleMouseLeave();
9609
9670
  if (tileLeaveEvent) eventBus.emit(`UI:${tileLeaveEvent}`, {});
@@ -9673,7 +9734,7 @@ function Canvas2D({
9673
9734
  /* @__PURE__ */ jsx(Typography, { variant: "body", className: "text-muted-foreground", children: t("canvas.loadingMessage") || "Loading\u2026" })
9674
9735
  ] }) });
9675
9736
  }
9676
- if (!drawables || drawables.length === 0) {
9737
+ if ((!drawables || drawables.length === 0) && !hasJsxChildren) {
9677
9738
  return /* @__PURE__ */ jsx(
9678
9739
  Box,
9679
9740
  {
@@ -9687,7 +9748,7 @@ function Canvas2D({
9687
9748
  }
9688
9749
  );
9689
9750
  }
9690
- return /* @__PURE__ */ jsxs(
9751
+ return /* @__PURE__ */ jsx(DrawableRegistryContext.Provider, { value: registerChildDrawable, children: /* @__PURE__ */ jsxs(
9691
9752
  Box,
9692
9753
  {
9693
9754
  ref: containerRef,
@@ -9748,10 +9809,19 @@ function Canvas2D({
9748
9809
  mapWidth: miniMapWidth,
9749
9810
  mapHeight: miniMapHeight
9750
9811
  }
9751
- ) })
9812
+ ) }),
9813
+ hasJsxChildren && /* @__PURE__ */ jsx("div", { "aria-hidden": "true", style: { position: "absolute", width: 0, height: 0, overflow: "hidden" }, children }),
9814
+ /* @__PURE__ */ jsxs("div", { "data-debug": "", style: { position: "absolute", top: 0, left: 0, background: "yellow", color: "black", zIndex: 9999, fontSize: 24, padding: 8 }, children: [
9815
+ "C=",
9816
+ React86.Children.count(children),
9817
+ " J=",
9818
+ String(hasJsxChildren),
9819
+ " D=",
9820
+ drawables?.length ?? -1
9821
+ ] })
9752
9822
  ]
9753
9823
  }
9754
- );
9824
+ ) });
9755
9825
  }
9756
9826
  var canvas2DLog;
9757
9827
  var init_Canvas2D = __esm({
@@ -9773,6 +9843,7 @@ var init_Canvas2D = __esm({
9773
9843
  init_webPainter2d();
9774
9844
  init_projector();
9775
9845
  init_paintDispatch();
9846
+ init_registry();
9776
9847
  init_hitTest();
9777
9848
  init_isometric();
9778
9849
  canvas2DLog = createLogger("almadar:ui:game-canvas");
@@ -9814,7 +9885,8 @@ function Canvas({
9814
9885
  tileLeaveEvent,
9815
9886
  featureClickEvent,
9816
9887
  keyMap,
9817
- keyUpMap
9888
+ keyUpMap,
9889
+ children
9818
9890
  }) {
9819
9891
  canvasLog.debug("Canvas render", { mode, drawablesCount: drawables?.length, projection, camera: camera ? JSON.stringify(camera) : void 0 });
9820
9892
  const zoom = camera?.zoom;
@@ -9867,7 +9939,8 @@ function Canvas({
9867
9939
  tileHoverEvent,
9868
9940
  tileLeaveEvent,
9869
9941
  keyMap,
9870
- keyUpMap
9942
+ keyUpMap,
9943
+ ...children !== void 0 ? { children } : {}
9871
9944
  }
9872
9945
  );
9873
9946
  }
@@ -10266,7 +10339,7 @@ function LinearView({
10266
10339
  /* @__PURE__ */ jsx(HStack, { className: "flex-wrap items-center", gap: "xs", children: trait.states.map((state, i) => {
10267
10340
  const isDone = i < currentIdx;
10268
10341
  const isCurrent = i === currentIdx;
10269
- return /* @__PURE__ */ jsxs(React85__default.Fragment, { children: [
10342
+ return /* @__PURE__ */ jsxs(React86__default.Fragment, { children: [
10270
10343
  i > 0 && /* @__PURE__ */ jsx(
10271
10344
  Typography,
10272
10345
  {
@@ -10801,7 +10874,7 @@ function SequenceBar({
10801
10874
  else onSlotRemove?.(index);
10802
10875
  }, [emit, slotRemoveEvent, onSlotRemove, playing]);
10803
10876
  const paddedSlots = Array.from({ length: maxSlots }, (_, i) => slots[i]);
10804
- return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(React85__default.Fragment, { children: [
10877
+ return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(React86__default.Fragment, { children: [
10805
10878
  i > 0 && /* @__PURE__ */ jsx(
10806
10879
  Typography,
10807
10880
  {
@@ -11450,7 +11523,7 @@ var init_ErrorBoundary = __esm({
11450
11523
  }
11451
11524
  );
11452
11525
  };
11453
- ErrorBoundary = class extends React85__default.Component {
11526
+ ErrorBoundary = class extends React86__default.Component {
11454
11527
  constructor(props) {
11455
11528
  super(props);
11456
11529
  __publicField(this, "reset", () => {
@@ -12102,7 +12175,7 @@ var init_Container = __esm({
12102
12175
  as: Component = "div"
12103
12176
  }) => {
12104
12177
  const resolvedSize = maxWidth ?? size ?? "lg";
12105
- return React85__default.createElement(
12178
+ return React86__default.createElement(
12106
12179
  Component,
12107
12180
  {
12108
12181
  className: cn(
@@ -15067,7 +15140,7 @@ var init_CodeBlock = __esm({
15067
15140
  DIFF_STYLE_FALLBACK = { bg: "", prefix: " ", text: "text-foreground" };
15068
15141
  LINE_PROPS_FN = (n) => ({ "data-line": String(n - 1) });
15069
15142
  HIDDEN_LINE_NUMBERS = { display: "none" };
15070
- CodeBlock = React85__default.memo(
15143
+ CodeBlock = React86__default.memo(
15071
15144
  ({
15072
15145
  code: rawCode,
15073
15146
  language = "text",
@@ -15655,7 +15728,7 @@ var init_MarkdownContent = __esm({
15655
15728
  init_Box();
15656
15729
  init_CodeBlock();
15657
15730
  init_cn();
15658
- MarkdownContent = React85__default.memo(
15731
+ MarkdownContent = React86__default.memo(
15659
15732
  ({ content, direction = "ltr", className }) => {
15660
15733
  const { t: _t } = useTranslate();
15661
15734
  const safeContent = typeof content === "string" ? content : String(content ?? "");
@@ -16982,7 +17055,7 @@ var init_StateMachineView = __esm({
16982
17055
  style: { top: title ? 30 : 0 },
16983
17056
  children: [
16984
17057
  entity && /* @__PURE__ */ jsx(EntityBox, { entity, config }),
16985
- states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(React85__default.Fragment, { children: renderStateNode(state, config) }, state.id) : /* @__PURE__ */ jsx(
17058
+ states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(React86__default.Fragment, { children: renderStateNode(state, config) }, state.id) : /* @__PURE__ */ jsx(
16986
17059
  StateNode2,
16987
17060
  {
16988
17061
  state,
@@ -22804,8 +22877,8 @@ var init_Menu = __esm({
22804
22877
  "bottom-end": "bottom-start"
22805
22878
  };
22806
22879
  const effectivePosition = direction === "rtl" ? rtlMirror[position] ?? position : position;
22807
- const triggerChild = React85__default.isValidElement(trigger) ? trigger : /* @__PURE__ */ jsx(Typography, { variant: "small", as: "span", children: trigger });
22808
- const triggerElement = React85__default.cloneElement(
22880
+ const triggerChild = React86__default.isValidElement(trigger) ? trigger : /* @__PURE__ */ jsx(Typography, { variant: "small", as: "span", children: trigger });
22881
+ const triggerElement = React86__default.cloneElement(
22809
22882
  triggerChild,
22810
22883
  {
22811
22884
  ref: triggerRef,
@@ -22900,14 +22973,14 @@ function useDataDnd(args) {
22900
22973
  const isZone = Boolean(dragGroup || accepts || sortable);
22901
22974
  const enabled = isZone || Boolean(dndRoot);
22902
22975
  const eventBus = useEventBus();
22903
- const parentRoot = React85__default.useContext(RootCtx);
22976
+ const parentRoot = React86__default.useContext(RootCtx);
22904
22977
  const isRoot = enabled && parentRoot === null;
22905
- const zoneId = React85__default.useId();
22978
+ const zoneId = React86__default.useId();
22906
22979
  const ownGroup = dragGroup ?? accepts ?? zoneId;
22907
- const [optimisticOrders, setOptimisticOrders] = React85__default.useState(() => /* @__PURE__ */ new Map());
22908
- const optimisticOrdersRef = React85__default.useRef(optimisticOrders);
22980
+ const [optimisticOrders, setOptimisticOrders] = React86__default.useState(() => /* @__PURE__ */ new Map());
22981
+ const optimisticOrdersRef = React86__default.useRef(optimisticOrders);
22909
22982
  optimisticOrdersRef.current = optimisticOrders;
22910
- const clearOptimisticOrder = React85__default.useCallback((group) => {
22983
+ const clearOptimisticOrder = React86__default.useCallback((group) => {
22911
22984
  setOptimisticOrders((prev) => {
22912
22985
  if (!prev.has(group)) return prev;
22913
22986
  const next = new Map(prev);
@@ -22932,7 +23005,7 @@ function useDataDnd(args) {
22932
23005
  const raw = it[dndItemIdField];
22933
23006
  return raw != null ? String(raw) : `__idx_${idx}`;
22934
23007
  }).join("|");
22935
- const itemIds = React85__default.useMemo(
23008
+ const itemIds = React86__default.useMemo(
22936
23009
  () => orderedItems.map((it, idx) => {
22937
23010
  const raw = it[dndItemIdField];
22938
23011
  return raw != null ? String(raw) : `__idx_${idx}`;
@@ -22943,7 +23016,7 @@ function useDataDnd(args) {
22943
23016
  const raw = it[dndItemIdField];
22944
23017
  return raw != null ? String(raw) : `__${idx}`;
22945
23018
  }).join("|");
22946
- React85__default.useEffect(() => {
23019
+ React86__default.useEffect(() => {
22947
23020
  const root = isRoot ? null : parentRoot;
22948
23021
  if (root) {
22949
23022
  root.clearOptimisticOrder(ownGroup);
@@ -22951,20 +23024,20 @@ function useDataDnd(args) {
22951
23024
  clearOptimisticOrder(ownGroup);
22952
23025
  }
22953
23026
  }, [itemsContentSig, ownGroup]);
22954
- const zonesRef = React85__default.useRef(/* @__PURE__ */ new Map());
22955
- const registerZone = React85__default.useCallback((zoneId2, meta2) => {
23027
+ const zonesRef = React86__default.useRef(/* @__PURE__ */ new Map());
23028
+ const registerZone = React86__default.useCallback((zoneId2, meta2) => {
22956
23029
  zonesRef.current.set(zoneId2, meta2);
22957
23030
  }, []);
22958
- const unregisterZone = React85__default.useCallback((zoneId2) => {
23031
+ const unregisterZone = React86__default.useCallback((zoneId2) => {
22959
23032
  zonesRef.current.delete(zoneId2);
22960
23033
  }, []);
22961
- const [activeDrag, setActiveDrag] = React85__default.useState(null);
22962
- const [overZoneGroup, setOverZoneGroup] = React85__default.useState(null);
22963
- const meta = React85__default.useMemo(
23034
+ const [activeDrag, setActiveDrag] = React86__default.useState(null);
23035
+ const [overZoneGroup, setOverZoneGroup] = React86__default.useState(null);
23036
+ const meta = React86__default.useMemo(
22964
23037
  () => ({ group: ownGroup, dropEvent, reorderEvent, positionEvent, itemIds, rawItems: items, idField: dndItemIdField }),
22965
23038
  [ownGroup, dropEvent, reorderEvent, positionEvent, itemIds, items, dndItemIdField]
22966
23039
  );
22967
- React85__default.useEffect(() => {
23040
+ React86__default.useEffect(() => {
22968
23041
  const target = isRoot ? null : parentRoot;
22969
23042
  if (!target) {
22970
23043
  zonesRef.current.set(zoneId, meta);
@@ -22983,7 +23056,7 @@ function useDataDnd(args) {
22983
23056
  }, [parentRoot, isRoot, zoneId, meta]);
22984
23057
  const sensors = useAlmadarDndSensors(true);
22985
23058
  const collisionDetection = almadarDndCollisionDetection;
22986
- const findZoneByItem = React85__default.useCallback(
23059
+ const findZoneByItem = React86__default.useCallback(
22987
23060
  (id) => {
22988
23061
  for (const z of zonesRef.current.values()) {
22989
23062
  if (z.itemIds.includes(id)) return z;
@@ -22992,7 +23065,7 @@ function useDataDnd(args) {
22992
23065
  },
22993
23066
  []
22994
23067
  );
22995
- React85__default.useCallback(
23068
+ React86__default.useCallback(
22996
23069
  (group) => {
22997
23070
  for (const z of zonesRef.current.values()) {
22998
23071
  if (z.group === group) return z;
@@ -23001,7 +23074,7 @@ function useDataDnd(args) {
23001
23074
  },
23002
23075
  []
23003
23076
  );
23004
- const handleDragEnd = React85__default.useCallback(
23077
+ const handleDragEnd = React86__default.useCallback(
23005
23078
  (event) => {
23006
23079
  const { active, over } = event;
23007
23080
  const activeIdStr = String(active.id);
@@ -23092,8 +23165,8 @@ function useDataDnd(args) {
23092
23165
  },
23093
23166
  [eventBus]
23094
23167
  );
23095
- const sortableData = React85__default.useMemo(() => ({ dndGroup: ownGroup }), [ownGroup]);
23096
- const SortableItem = React85__default.useCallback(
23168
+ const sortableData = React86__default.useMemo(() => ({ dndGroup: ownGroup }), [ownGroup]);
23169
+ const SortableItem = React86__default.useCallback(
23097
23170
  ({ id, children }) => {
23098
23171
  const {
23099
23172
  attributes,
@@ -23133,7 +23206,7 @@ function useDataDnd(args) {
23133
23206
  id: droppableId,
23134
23207
  data: sortableData
23135
23208
  });
23136
- const ctx = React85__default.useContext(RootCtx);
23209
+ const ctx = React86__default.useContext(RootCtx);
23137
23210
  const activeDrag2 = ctx?.activeDrag ?? null;
23138
23211
  const overZoneGroup2 = ctx?.overZoneGroup ?? null;
23139
23212
  const isThisZoneOver = overZoneGroup2 === ownGroup;
@@ -23148,7 +23221,7 @@ function useDataDnd(args) {
23148
23221
  showForeignPlaceholder,
23149
23222
  ctxAvailable: ctx != null
23150
23223
  });
23151
- React85__default.useEffect(() => {
23224
+ React86__default.useEffect(() => {
23152
23225
  dndLog.info("dropzone:isOver:change", { droppableId, group: ownGroup, isOver, isThisZoneOver, showForeignPlaceholder, activeDragSourceGroup: activeDrag2?.sourceGroup ?? null });
23153
23226
  }, [droppableId, isOver, isThisZoneOver, showForeignPlaceholder]);
23154
23227
  return /* @__PURE__ */ jsx(
@@ -23162,11 +23235,11 @@ function useDataDnd(args) {
23162
23235
  }
23163
23236
  );
23164
23237
  };
23165
- const rootContextValue = React85__default.useMemo(
23238
+ const rootContextValue = React86__default.useMemo(
23166
23239
  () => ({ registerZone, unregisterZone, activeDrag, overZoneGroup, optimisticOrders, clearOptimisticOrder }),
23167
23240
  [registerZone, unregisterZone, activeDrag, overZoneGroup, optimisticOrders, clearOptimisticOrder]
23168
23241
  );
23169
- const handleDragStart = React85__default.useCallback((event) => {
23242
+ const handleDragStart = React86__default.useCallback((event) => {
23170
23243
  const sourceZone = findZoneByItem(event.active.id);
23171
23244
  const rect = event.active.rect.current.initial;
23172
23245
  const height = rect?.height && rect.height > 0 ? rect.height : 64;
@@ -23185,7 +23258,7 @@ function useDataDnd(args) {
23185
23258
  isRoot
23186
23259
  });
23187
23260
  }, [findZoneByItem, isRoot, zoneId]);
23188
- const handleDragOver = React85__default.useCallback((event) => {
23261
+ const handleDragOver = React86__default.useCallback((event) => {
23189
23262
  const { active, over } = event;
23190
23263
  const overData = over?.data?.current;
23191
23264
  const overGroup = overData?.dndGroup ?? null;
@@ -23255,7 +23328,7 @@ function useDataDnd(args) {
23255
23328
  return next;
23256
23329
  });
23257
23330
  }, []);
23258
- const handleDragCancel = React85__default.useCallback((event) => {
23331
+ const handleDragCancel = React86__default.useCallback((event) => {
23259
23332
  setActiveDrag(null);
23260
23333
  setOverZoneGroup(null);
23261
23334
  dndLog.warn("dragCancel", {
@@ -23263,12 +23336,12 @@ function useDataDnd(args) {
23263
23336
  reason: "dnd-kit cancelled the drag (escape key, pointer interrupted, or external)"
23264
23337
  });
23265
23338
  }, []);
23266
- const handleDragEndWithCleanup = React85__default.useCallback((event) => {
23339
+ const handleDragEndWithCleanup = React86__default.useCallback((event) => {
23267
23340
  handleDragEnd(event);
23268
23341
  setActiveDrag(null);
23269
23342
  setOverZoneGroup(null);
23270
23343
  }, [handleDragEnd]);
23271
- const wrapContainer = React85__default.useCallback(
23344
+ const wrapContainer = React86__default.useCallback(
23272
23345
  (children) => {
23273
23346
  if (!enabled) return children;
23274
23347
  const strategy = layout === "grid" ? rectSortingStrategy : verticalListSortingStrategy;
@@ -23322,7 +23395,7 @@ var init_useDataDnd = __esm({
23322
23395
  init_useAlmadarDndCollision();
23323
23396
  init_Box();
23324
23397
  dndLog = createLogger("almadar:ui:dnd");
23325
- RootCtx = React85__default.createContext(null);
23398
+ RootCtx = React86__default.createContext(null);
23326
23399
  }
23327
23400
  });
23328
23401
  function renderIconInput(icon, props) {
@@ -23864,7 +23937,7 @@ function DataList({
23864
23937
  }) {
23865
23938
  const eventBus = useEventBus();
23866
23939
  const { t } = useTranslate();
23867
- const [visibleCount, setVisibleCount] = React85__default.useState(pageSize || Infinity);
23940
+ const [visibleCount, setVisibleCount] = React86__default.useState(pageSize || Infinity);
23868
23941
  const fieldDefs = fields ?? columns ?? [];
23869
23942
  const allDataRaw = Array.isArray(entity) ? entity : entity ? [entity] : [];
23870
23943
  const dnd = useDataDnd({
@@ -23880,14 +23953,14 @@ function DataList({
23880
23953
  dndRoot
23881
23954
  });
23882
23955
  const orderedData = dnd.orderedItems;
23883
- const allData = React85__default.useMemo(
23956
+ const allData = React86__default.useMemo(
23884
23957
  () => sortRows(orderedData, sortBy, sortDirection),
23885
23958
  [orderedData, sortBy, sortDirection]
23886
23959
  );
23887
23960
  const data = pageSize > 0 ? allData.slice(0, visibleCount) : allData;
23888
23961
  const hasMoreLocal = pageSize > 0 && visibleCount < allData.length;
23889
23962
  const hasRenderProp = typeof children === "function";
23890
- React85__default.useEffect(() => {
23963
+ React86__default.useEffect(() => {
23891
23964
  const renderItemTypeOf = typeof schemaRenderItem;
23892
23965
  const childrenTypeOf = typeof children;
23893
23966
  if (data.length > 0 && !hasRenderProp) {
@@ -24002,7 +24075,7 @@ function DataList({
24002
24075
  return v === void 0 || v === null || v === "" ? raw : String(v);
24003
24076
  };
24004
24077
  return /* @__PURE__ */ jsxs(VStack, { gap: "sm", className: cn("py-2", className), children: [
24005
- groups2.map((group, gi) => /* @__PURE__ */ jsxs(React85__default.Fragment, { children: [
24078
+ groups2.map((group, gi) => /* @__PURE__ */ jsxs(React86__default.Fragment, { children: [
24006
24079
  group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: "my-2" }),
24007
24080
  group.items.map((itemData, index) => {
24008
24081
  const id = itemData.id || `${gi}-${index}`;
@@ -24201,7 +24274,7 @@ function DataList({
24201
24274
  className
24202
24275
  ),
24203
24276
  children: [
24204
- groups.map((group, gi) => /* @__PURE__ */ jsxs(React85__default.Fragment, { children: [
24277
+ groups.map((group, gi) => /* @__PURE__ */ jsxs(React86__default.Fragment, { children: [
24205
24278
  group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-4" : "mt-0" }),
24206
24279
  group.items.map(
24207
24280
  (itemData, index) => renderItem(itemData, index, gi === groups.length - 1 && index === group.items.length - 1)
@@ -24288,7 +24361,7 @@ var init_FormSection = __esm({
24288
24361
  columns = 1,
24289
24362
  className
24290
24363
  }) => {
24291
- const [collapsed, setCollapsed] = React85__default.useState(defaultCollapsed);
24364
+ const [collapsed, setCollapsed] = React86__default.useState(defaultCollapsed);
24292
24365
  const { t } = useTranslate();
24293
24366
  const eventBus = useEventBus();
24294
24367
  const gridClass = {
@@ -24296,7 +24369,7 @@ var init_FormSection = __esm({
24296
24369
  2: "grid-cols-1 md:grid-cols-2",
24297
24370
  3: "grid-cols-1 md:grid-cols-2 lg:grid-cols-3"
24298
24371
  }[columns];
24299
- React85__default.useCallback(() => {
24372
+ React86__default.useCallback(() => {
24300
24373
  if (collapsible) {
24301
24374
  setCollapsed((prev) => !prev);
24302
24375
  eventBus.emit("UI:TOGGLE_COLLAPSE", { collapsed: !collapsed });
@@ -25341,7 +25414,7 @@ var init_Flex = __esm({
25341
25414
  flexStyle.flexBasis = typeof basis === "number" ? `${basis}px` : basis;
25342
25415
  }
25343
25416
  }
25344
- return React85__default.createElement(Component, {
25417
+ return React86__default.createElement(Component, {
25345
25418
  className: cn(
25346
25419
  inline ? "inline-flex" : "flex",
25347
25420
  directionStyles[direction],
@@ -25460,7 +25533,7 @@ var init_Grid = __esm({
25460
25533
  as: Component = "div"
25461
25534
  }) => {
25462
25535
  const mergedStyle = rows ? { gridTemplateRows: `repeat(${rows}, minmax(0, 1fr))`, ...style } : style;
25463
- return React85__default.createElement(
25536
+ return React86__default.createElement(
25464
25537
  Component,
25465
25538
  {
25466
25539
  className: cn(
@@ -25692,9 +25765,9 @@ var init_Popover = __esm({
25692
25765
  onMouseLeave: handleClose,
25693
25766
  onPointerDown: tapTriggerProps.onPointerDown
25694
25767
  };
25695
- const childElement = React85__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
25768
+ const childElement = React86__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
25696
25769
  const childPointerDown = childElement.props.onPointerDown;
25697
- const triggerElement = React85__default.cloneElement(
25770
+ const triggerElement = React86__default.cloneElement(
25698
25771
  childElement,
25699
25772
  {
25700
25773
  ref: triggerRef,
@@ -26303,9 +26376,9 @@ var init_Tooltip = __esm({
26303
26376
  if (hideTimeoutRef.current) clearTimeout(hideTimeoutRef.current);
26304
26377
  };
26305
26378
  }, []);
26306
- const triggerElement = React85__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
26379
+ const triggerElement = React86__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
26307
26380
  const childPointerDown = triggerElement.props.onPointerDown;
26308
- const trigger = React85__default.cloneElement(triggerElement, {
26381
+ const trigger = React86__default.cloneElement(triggerElement, {
26309
26382
  ref: triggerRef,
26310
26383
  onMouseEnter: handleMouseEnter,
26311
26384
  onMouseLeave: handleMouseLeave,
@@ -26395,7 +26468,7 @@ var init_WizardProgress = __esm({
26395
26468
  children: /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: normalizedSteps.map((step, index) => {
26396
26469
  const isActive = index === currentStep;
26397
26470
  const isCompleted = index < currentStep;
26398
- return /* @__PURE__ */ jsxs(React85__default.Fragment, { children: [
26471
+ return /* @__PURE__ */ jsxs(React86__default.Fragment, { children: [
26399
26472
  /* @__PURE__ */ jsx(
26400
26473
  "button",
26401
26474
  {
@@ -28030,7 +28103,7 @@ var init_MapView = __esm({
28030
28103
  shadowSize: [41, 41]
28031
28104
  });
28032
28105
  L.Marker.prototype.options.icon = defaultIcon;
28033
- const { useEffect: useEffect62, useRef: useRef61, useCallback: useCallback95, useState: useState93 } = React85__default;
28106
+ const { useEffect: useEffect62, useRef: useRef61, useCallback: useCallback95, useState: useState93 } = React86__default;
28034
28107
  const { Typography: Typography2 } = await Promise.resolve().then(() => (init_Typography(), Typography_exports));
28035
28108
  const { useEventBus: useEventBus2 } = await Promise.resolve().then(() => (init_useEventBus(), useEventBus_exports));
28036
28109
  function MapUpdater({ centerLat, centerLng, zoom }) {
@@ -28948,8 +29021,8 @@ function TableView({
28948
29021
  }) {
28949
29022
  const eventBus = useEventBus();
28950
29023
  const { t } = useTranslate();
28951
- const [visibleCount, setVisibleCount] = React85__default.useState(pageSize > 0 ? pageSize : Infinity);
28952
- const [localSelected, setLocalSelected] = React85__default.useState(/* @__PURE__ */ new Set());
29024
+ const [visibleCount, setVisibleCount] = React86__default.useState(pageSize > 0 ? pageSize : Infinity);
29025
+ const [localSelected, setLocalSelected] = React86__default.useState(/* @__PURE__ */ new Set());
28953
29026
  const colDefs = (Array.isArray(columns) ? columns : void 0) ?? (Array.isArray(fields) ? fields : void 0) ?? [];
28954
29027
  const actionDefs = Array.isArray(itemActions) ? itemActions : [];
28955
29028
  const allDataRaw = Array.isArray(entity) ? entity : entity ? [entity] : [];
@@ -28971,7 +29044,7 @@ function TableView({
28971
29044
  const hasRenderProp = typeof children === "function";
28972
29045
  const idField = dndItemIdField ?? "id";
28973
29046
  const isCoarsePointer = useMediaQuery("(pointer: coarse)");
28974
- React85__default.useEffect(() => {
29047
+ React86__default.useEffect(() => {
28975
29048
  tableViewLog.debug("render", {
28976
29049
  rowCount: data.length,
28977
29050
  colCount: colDefs.length,
@@ -29028,7 +29101,7 @@ function TableView({
29028
29101
  };
29029
29102
  eventBus.emit(`UI:${itemClickEvent}`, payload);
29030
29103
  };
29031
- const colFloors = React85__default.useMemo(
29104
+ const colFloors = React86__default.useMemo(
29032
29105
  () => colDefs.map((col) => {
29033
29106
  const longest = data.reduce((widest, row) => {
29034
29107
  const cell = formatCell(asFieldValue(getNestedValue(row, col.field ?? col.key)), col.format);
@@ -29190,12 +29263,12 @@ function TableView({
29190
29263
  ]
29191
29264
  }
29192
29265
  );
29193
- return dnd.isZone ? /* @__PURE__ */ jsx(dnd.SortableItem, { id: row[idField] ?? id, children: rowInner }, id) : /* @__PURE__ */ jsx(React85__default.Fragment, { children: rowInner }, id);
29266
+ return dnd.isZone ? /* @__PURE__ */ jsx(dnd.SortableItem, { id: row[idField] ?? id, children: rowInner }, id) : /* @__PURE__ */ jsx(React86__default.Fragment, { children: rowInner }, id);
29194
29267
  };
29195
29268
  const items = Array.from(data);
29196
29269
  const groups = groupBy ? groupData2(items, groupBy) : [{ label: "", items }];
29197
29270
  let runningIndex = 0;
29198
- const body = /* @__PURE__ */ jsx(Box, { role: "rowgroup", children: groups.map((group, gi) => /* @__PURE__ */ jsxs(React85__default.Fragment, { children: [
29271
+ const body = /* @__PURE__ */ jsx(Box, { role: "rowgroup", children: groups.map((group, gi) => /* @__PURE__ */ jsxs(React86__default.Fragment, { children: [
29199
29272
  group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-3" : "mt-0" }),
29200
29273
  group.items.map((row) => renderRow(row, runningIndex++))
29201
29274
  ] }, gi)) });
@@ -30558,7 +30631,7 @@ var init_StepFlow = __esm({
30558
30631
  className
30559
30632
  }) => {
30560
30633
  if (orientation === "vertical") {
30561
- return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(React85__default.Fragment, { children: /* @__PURE__ */ jsxs(HStack, { gap: "md", align: "start", className: "w-full", children: [
30634
+ return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(React86__default.Fragment, { children: /* @__PURE__ */ jsxs(HStack, { gap: "md", align: "start", className: "w-full", children: [
30562
30635
  /* @__PURE__ */ jsxs(VStack, { gap: "none", align: "center", children: [
30563
30636
  /* @__PURE__ */ jsx(StepCircle, { step, index }),
30564
30637
  showConnectors && index < steps.length - 1 && /* @__PURE__ */ jsx(Box, { className: "w-px h-8 bg-border" })
@@ -30569,7 +30642,7 @@ var init_StepFlow = __esm({
30569
30642
  ] })
30570
30643
  ] }) }, index)) });
30571
30644
  }
30572
- 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(React85__default.Fragment, { children: [
30645
+ 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(React86__default.Fragment, { children: [
30573
30646
  /* @__PURE__ */ jsxs(VStack, { gap: "sm", align: "center", className: "flex-1 w-full md:w-auto", children: [
30574
30647
  /* @__PURE__ */ jsx(StepCircle, { step, index }),
30575
30648
  /* @__PURE__ */ jsx(Typography, { variant: "h4", className: "text-center", children: step.title }),
@@ -31559,7 +31632,7 @@ var init_LikertScale = __esm({
31559
31632
  md: "text-base",
31560
31633
  lg: "text-lg"
31561
31634
  };
31562
- LikertScale = React85__default.forwardRef(
31635
+ LikertScale = React86__default.forwardRef(
31563
31636
  ({
31564
31637
  question,
31565
31638
  options = DEFAULT_LIKERT_OPTIONS,
@@ -31571,7 +31644,7 @@ var init_LikertScale = __esm({
31571
31644
  variant = "radios",
31572
31645
  className
31573
31646
  }, ref) => {
31574
- const groupId = React85__default.useId();
31647
+ const groupId = React86__default.useId();
31575
31648
  const eventBus = useEventBus();
31576
31649
  const handleSelect = useCallback(
31577
31650
  (next) => {
@@ -33860,7 +33933,7 @@ var init_DocBreadcrumb = __esm({
33860
33933
  "aria-label": t("aria.breadcrumb"),
33861
33934
  children: /* @__PURE__ */ jsx(HStack, { gap: "xs", align: "center", wrap: true, children: items.map((item, idx) => {
33862
33935
  const isLast = idx === items.length - 1;
33863
- return /* @__PURE__ */ jsxs(React85__default.Fragment, { children: [
33936
+ return /* @__PURE__ */ jsxs(React86__default.Fragment, { children: [
33864
33937
  idx > 0 && /* @__PURE__ */ jsx(
33865
33938
  Icon,
33866
33939
  {
@@ -34729,7 +34802,7 @@ var init_MiniStateMachine = __esm({
34729
34802
  const x = 2 + i * (NODE_W + GAP + ARROW_W + GAP);
34730
34803
  const tc = transitionCounts[s.name] ?? 0;
34731
34804
  const role = getStateRole(s.name, s.isInitial ?? void 0, s.isTerminal ?? void 0, tc, maxTC);
34732
- return /* @__PURE__ */ jsxs(React85__default.Fragment, { children: [
34805
+ return /* @__PURE__ */ jsxs(React86__default.Fragment, { children: [
34733
34806
  /* @__PURE__ */ jsx(
34734
34807
  AvlState,
34735
34808
  {
@@ -34933,7 +35006,7 @@ var init_PageHeader = __esm({
34933
35006
  info: "bg-info/10 text-info"
34934
35007
  };
34935
35008
  return /* @__PURE__ */ jsxs(Box, { className: cn("mb-6", className), children: [
34936
- 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(React85__default.Fragment, { children: [
35009
+ 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(React86__default.Fragment, { children: [
34937
35010
  idx > 0 && /* @__PURE__ */ jsx(Typography, { variant: "small", color: "muted", children: "/" }),
34938
35011
  crumb.href ? /* @__PURE__ */ jsx(
34939
35012
  "a",
@@ -35291,7 +35364,7 @@ var init_Section = __esm({
35291
35364
  as: Component = "section"
35292
35365
  }) => {
35293
35366
  const hasHeader = title || description || action;
35294
- return React85__default.createElement(
35367
+ return React86__default.createElement(
35295
35368
  Component,
35296
35369
  {
35297
35370
  className: cn(
@@ -35665,7 +35738,7 @@ var init_WizardContainer = __esm({
35665
35738
  const isCompleted = index < currentStep;
35666
35739
  const stepKey = step.id ?? step.tabId ?? `step-${index}`;
35667
35740
  const stepTitle = step.title ?? step.name ?? `Step ${index + 1}`;
35668
- return /* @__PURE__ */ jsxs(React85__default.Fragment, { children: [
35741
+ return /* @__PURE__ */ jsxs(React86__default.Fragment, { children: [
35669
35742
  /* @__PURE__ */ jsx(
35670
35743
  Button,
35671
35744
  {
@@ -37452,7 +37525,7 @@ var init_ImportPreviewTree = __esm({
37452
37525
  const renderUnit = (unit, childrenByParent, depth) => {
37453
37526
  const summary = fieldSummary(unit);
37454
37527
  const children = childrenByParent.get(unit.ref) ?? [];
37455
- return /* @__PURE__ */ jsxs(React85__default.Fragment, { children: [
37528
+ return /* @__PURE__ */ jsxs(React86__default.Fragment, { children: [
37456
37529
  /* @__PURE__ */ jsxs(
37457
37530
  Box,
37458
37531
  {
@@ -37549,7 +37622,7 @@ var init_ImportProgress = __esm({
37549
37622
  PIPELINE.map((key, index) => {
37550
37623
  const isComplete = index < currentIndex;
37551
37624
  const isActive = index === currentIndex;
37552
- return /* @__PURE__ */ jsxs(React85__default.Fragment, { children: [
37625
+ return /* @__PURE__ */ jsxs(React86__default.Fragment, { children: [
37553
37626
  index > 0 ? /* @__PURE__ */ jsx(Box, { className: "h-px w-4 bg-border" }) : null,
37554
37627
  /* @__PURE__ */ jsxs(Box, { className: "flex items-center gap-1", "data-testid": `import-progress-step-${key}`, children: [
37555
37628
  /* @__PURE__ */ jsx(
@@ -38662,7 +38735,7 @@ var init_DrawGroup = __esm({
38662
38735
  }
38663
38736
  });
38664
38737
  function extractTitle(children) {
38665
- if (!React85__default.isValidElement(children)) return void 0;
38738
+ if (!React86__default.isValidElement(children)) return void 0;
38666
38739
  const props = children.props;
38667
38740
  if (typeof props.title === "string") {
38668
38741
  return props.title;
@@ -39012,12 +39085,12 @@ var init_Form = __esm({
39012
39085
  const isSchemaEntity = isOrbitalEntitySchema(entity);
39013
39086
  const resolvedEntity = isSchemaEntity ? entity : void 0;
39014
39087
  const entityName = typeof entity === "string" ? entity : resolvedEntity?.name;
39015
- const normalizedInitialData = React85__default.useMemo(() => {
39088
+ const normalizedInitialData = React86__default.useMemo(() => {
39016
39089
  const entityRowAsInitial = isPlainEntityRow(entity) ? entity : void 0;
39017
39090
  const callerInitial = initialData !== null && typeof initialData === "object" && !Array.isArray(initialData) ? initialData : {};
39018
39091
  return entityRowAsInitial !== void 0 ? { ...entityRowAsInitial, ...callerInitial } : callerInitial;
39019
39092
  }, [entity, initialData]);
39020
- const entityDerivedFields = React85__default.useMemo(() => {
39093
+ const entityDerivedFields = React86__default.useMemo(() => {
39021
39094
  if (fields && fields.length > 0) return void 0;
39022
39095
  if (!resolvedEntity) return void 0;
39023
39096
  return resolvedEntity.fields.map(
@@ -39038,16 +39111,16 @@ var init_Form = __esm({
39038
39111
  const conditionalFields = typeof conditionalFieldsRaw === "boolean" ? {} : conditionalFieldsRaw;
39039
39112
  const hiddenCalculations = typeof hiddenCalculationsRaw === "boolean" ? [] : hiddenCalculationsRaw;
39040
39113
  const violationTriggers = typeof violationTriggersRaw === "boolean" ? [] : violationTriggersRaw;
39041
- const [formData, setFormData] = React85__default.useState(
39114
+ const [formData, setFormData] = React86__default.useState(
39042
39115
  normalizedInitialData
39043
39116
  );
39044
- const [collapsedSections, setCollapsedSections] = React85__default.useState(
39117
+ const [collapsedSections, setCollapsedSections] = React86__default.useState(
39045
39118
  /* @__PURE__ */ new Set()
39046
39119
  );
39047
- const [submitError, setSubmitError] = React85__default.useState(null);
39048
- const formRef = React85__default.useRef(null);
39120
+ const [submitError, setSubmitError] = React86__default.useState(null);
39121
+ const formRef = React86__default.useRef(null);
39049
39122
  const formMode = props.mode;
39050
- const mountedRef = React85__default.useRef(false);
39123
+ const mountedRef = React86__default.useRef(false);
39051
39124
  if (!mountedRef.current) {
39052
39125
  mountedRef.current = true;
39053
39126
  debug("forms", "mount", {
@@ -39060,7 +39133,7 @@ var init_Form = __esm({
39060
39133
  });
39061
39134
  }
39062
39135
  const shouldShowCancel = showCancel ?? (fields && fields.length > 0);
39063
- const evalContext = React85__default.useMemo(
39136
+ const evalContext = React86__default.useMemo(
39064
39137
  () => ({
39065
39138
  formValues: formData,
39066
39139
  globalVariables: externalContext?.globalVariables ?? {},
@@ -39069,7 +39142,7 @@ var init_Form = __esm({
39069
39142
  }),
39070
39143
  [formData, externalContext]
39071
39144
  );
39072
- React85__default.useEffect(() => {
39145
+ React86__default.useEffect(() => {
39073
39146
  debug("forms", "initialData-sync", {
39074
39147
  mode: formMode,
39075
39148
  normalizedInitialData,
@@ -39080,7 +39153,7 @@ var init_Form = __esm({
39080
39153
  setFormData(normalizedInitialData);
39081
39154
  }
39082
39155
  }, [normalizedInitialData]);
39083
- const processCalculations = React85__default.useCallback(
39156
+ const processCalculations = React86__default.useCallback(
39084
39157
  (changedFieldId, newFormData) => {
39085
39158
  if (!hiddenCalculations.length) return;
39086
39159
  const context = {
@@ -39105,7 +39178,7 @@ var init_Form = __esm({
39105
39178
  },
39106
39179
  [hiddenCalculations, externalContext, eventBus]
39107
39180
  );
39108
- const checkViolations = React85__default.useCallback(
39181
+ const checkViolations = React86__default.useCallback(
39109
39182
  (changedFieldId, newFormData) => {
39110
39183
  if (!violationTriggers.length) return;
39111
39184
  const context = {
@@ -39143,7 +39216,7 @@ var init_Form = __esm({
39143
39216
  processCalculations(name, newFormData);
39144
39217
  checkViolations(name, newFormData);
39145
39218
  };
39146
- const isFieldVisible = React85__default.useCallback(
39219
+ const isFieldVisible = React86__default.useCallback(
39147
39220
  (fieldName) => {
39148
39221
  const condition = conditionalFields[fieldName];
39149
39222
  if (!condition) return true;
@@ -39151,7 +39224,7 @@ var init_Form = __esm({
39151
39224
  },
39152
39225
  [conditionalFields, evalContext]
39153
39226
  );
39154
- const isSectionVisible = React85__default.useCallback(
39227
+ const isSectionVisible = React86__default.useCallback(
39155
39228
  (section) => {
39156
39229
  if (!section.condition) return true;
39157
39230
  return Boolean(evaluateFormExpression(section.condition, evalContext));
@@ -39227,7 +39300,7 @@ var init_Form = __esm({
39227
39300
  eventBus.emit(`UI:${onCancel}`);
39228
39301
  }
39229
39302
  };
39230
- const renderField = React85__default.useCallback(
39303
+ const renderField = React86__default.useCallback(
39231
39304
  (field) => {
39232
39305
  const fieldName = field.name || field.field;
39233
39306
  if (!fieldName) return null;
@@ -39248,7 +39321,7 @@ var init_Form = __esm({
39248
39321
  [formData, isFieldVisible, relationsData, relationsLoading, isLoading]
39249
39322
  );
39250
39323
  const effectiveFields = entityDerivedFields ?? fields;
39251
- const normalizedFields = React85__default.useMemo(() => {
39324
+ const normalizedFields = React86__default.useMemo(() => {
39252
39325
  if (!effectiveFields || effectiveFields.length === 0) return [];
39253
39326
  return effectiveFields.map((field) => {
39254
39327
  if (typeof field === "string") {
@@ -39272,7 +39345,7 @@ var init_Form = __esm({
39272
39345
  return field;
39273
39346
  });
39274
39347
  }, [effectiveFields, resolvedEntity]);
39275
- const schemaFields = React85__default.useMemo(() => {
39348
+ const schemaFields = React86__default.useMemo(() => {
39276
39349
  if (normalizedFields.length === 0) return null;
39277
39350
  if (isDebugEnabled()) {
39278
39351
  debugGroup(`Form: ${entityName || "unknown"}`);
@@ -39282,7 +39355,7 @@ var init_Form = __esm({
39282
39355
  }
39283
39356
  return normalizedFields.map(renderField).filter(Boolean);
39284
39357
  }, [normalizedFields, renderField, entityName, conditionalFields]);
39285
- const sectionElements = React85__default.useMemo(() => {
39358
+ const sectionElements = React86__default.useMemo(() => {
39286
39359
  if (!sections || sections.length === 0) return null;
39287
39360
  return sections.map((section) => {
39288
39361
  if (!isSectionVisible(section)) {
@@ -40008,7 +40081,7 @@ var init_List = __esm({
40008
40081
  if (entity && typeof entity === "object" && "id" in entity) return [entity];
40009
40082
  return [];
40010
40083
  }, [entity]);
40011
- const getItemActions = React85__default.useCallback(
40084
+ const getItemActions = React86__default.useCallback(
40012
40085
  (item) => {
40013
40086
  if (!itemActions) return [];
40014
40087
  if (typeof itemActions === "function") {
@@ -40489,7 +40562,7 @@ var init_MediaGallery = __esm({
40489
40562
  [selectable, selectedItems, selectionEvent, eventBus]
40490
40563
  );
40491
40564
  const entityData = Array.isArray(entity) ? entity : [];
40492
- const items = React85__default.useMemo(() => {
40565
+ const items = React86__default.useMemo(() => {
40493
40566
  if (propItems && propItems.length > 0) return propItems;
40494
40567
  if (entityData.length === 0) return [];
40495
40568
  return entityData.map((record, idx) => {
@@ -40654,7 +40727,7 @@ var init_MediaGallery = __esm({
40654
40727
  }
40655
40728
  });
40656
40729
  function extractTitle2(children) {
40657
- if (!React85__default.isValidElement(children)) return void 0;
40730
+ if (!React86__default.isValidElement(children)) return void 0;
40658
40731
  const props = children.props;
40659
40732
  if (typeof props.title === "string") {
40660
40733
  return props.title;
@@ -40909,7 +40982,7 @@ var init_debugRegistry = __esm({
40909
40982
  }
40910
40983
  });
40911
40984
  function useDebugData() {
40912
- const [data, setData] = React85.useState(() => ({
40985
+ const [data, setData] = React86.useState(() => ({
40913
40986
  traits: [],
40914
40987
  ticks: [],
40915
40988
  guards: [],
@@ -40923,7 +40996,7 @@ function useDebugData() {
40923
40996
  },
40924
40997
  lastUpdate: Date.now()
40925
40998
  }));
40926
- React85.useEffect(() => {
40999
+ React86.useEffect(() => {
40927
41000
  const updateData = () => {
40928
41001
  setData({
40929
41002
  traits: getAllTraits(),
@@ -41032,12 +41105,12 @@ function layoutGraph(states, transitions, initialState, width, height) {
41032
41105
  return positions;
41033
41106
  }
41034
41107
  function WalkMinimap() {
41035
- const [walkStep, setWalkStep] = React85.useState(null);
41036
- const [traits2, setTraits] = React85.useState([]);
41037
- const [coveredEdges, setCoveredEdges] = React85.useState([]);
41038
- const [completedTraits, setCompletedTraits] = React85.useState(/* @__PURE__ */ new Set());
41039
- const prevTraitRef = React85.useRef(null);
41040
- React85.useEffect(() => {
41108
+ const [walkStep, setWalkStep] = React86.useState(null);
41109
+ const [traits2, setTraits] = React86.useState([]);
41110
+ const [coveredEdges, setCoveredEdges] = React86.useState([]);
41111
+ const [completedTraits, setCompletedTraits] = React86.useState(/* @__PURE__ */ new Set());
41112
+ const prevTraitRef = React86.useRef(null);
41113
+ React86.useEffect(() => {
41041
41114
  const interval = setInterval(() => {
41042
41115
  const w = window;
41043
41116
  const step = w.__orbitalWalkStep;
@@ -41473,15 +41546,15 @@ var init_EntitiesTab = __esm({
41473
41546
  });
41474
41547
  function EventFlowTab({ events: events2 }) {
41475
41548
  const { t } = useTranslate();
41476
- const [filter, setFilter] = React85.useState("all");
41477
- const containerRef = React85.useRef(null);
41478
- const [autoScroll, setAutoScroll] = React85.useState(true);
41479
- React85.useEffect(() => {
41549
+ const [filter, setFilter] = React86.useState("all");
41550
+ const containerRef = React86.useRef(null);
41551
+ const [autoScroll, setAutoScroll] = React86.useState(true);
41552
+ React86.useEffect(() => {
41480
41553
  if (autoScroll && containerRef.current) {
41481
41554
  containerRef.current.scrollTop = containerRef.current.scrollHeight;
41482
41555
  }
41483
41556
  }, [events2.length, autoScroll]);
41484
- const filteredEvents = React85.useMemo(() => {
41557
+ const filteredEvents = React86.useMemo(() => {
41485
41558
  if (filter === "all") return events2;
41486
41559
  return events2.filter((e) => e.type === filter);
41487
41560
  }, [events2, filter]);
@@ -41597,7 +41670,7 @@ var init_EventFlowTab = __esm({
41597
41670
  });
41598
41671
  function GuardsPanel({ guards }) {
41599
41672
  const { t } = useTranslate();
41600
- const [filter, setFilter] = React85.useState("all");
41673
+ const [filter, setFilter] = React86.useState("all");
41601
41674
  if (guards.length === 0) {
41602
41675
  return /* @__PURE__ */ jsx(
41603
41676
  EmptyState,
@@ -41610,7 +41683,7 @@ function GuardsPanel({ guards }) {
41610
41683
  }
41611
41684
  const passedCount = guards.filter((g) => g.result).length;
41612
41685
  const failedCount = guards.length - passedCount;
41613
- const filteredGuards = React85.useMemo(() => {
41686
+ const filteredGuards = React86.useMemo(() => {
41614
41687
  if (filter === "all") return guards;
41615
41688
  if (filter === "passed") return guards.filter((g) => g.result);
41616
41689
  return guards.filter((g) => !g.result);
@@ -41773,10 +41846,10 @@ function EffectBadge({ effect }) {
41773
41846
  }
41774
41847
  function TransitionTimeline({ transitions }) {
41775
41848
  const { t } = useTranslate();
41776
- const containerRef = React85.useRef(null);
41777
- const [autoScroll, setAutoScroll] = React85.useState(true);
41778
- const [expandedId, setExpandedId] = React85.useState(null);
41779
- React85.useEffect(() => {
41849
+ const containerRef = React86.useRef(null);
41850
+ const [autoScroll, setAutoScroll] = React86.useState(true);
41851
+ const [expandedId, setExpandedId] = React86.useState(null);
41852
+ React86.useEffect(() => {
41780
41853
  if (autoScroll && containerRef.current) {
41781
41854
  containerRef.current.scrollTop = containerRef.current.scrollHeight;
41782
41855
  }
@@ -42056,9 +42129,9 @@ function getAllEvents(traits2) {
42056
42129
  function EventDispatcherTab({ traits: traits2, schema }) {
42057
42130
  const eventBus = useEventBus();
42058
42131
  const { t } = useTranslate();
42059
- const [log13, setLog] = React85.useState([]);
42060
- const prevStatesRef = React85.useRef(/* @__PURE__ */ new Map());
42061
- React85.useEffect(() => {
42132
+ const [log13, setLog] = React86.useState([]);
42133
+ const prevStatesRef = React86.useRef(/* @__PURE__ */ new Map());
42134
+ React86.useEffect(() => {
42062
42135
  for (const trait of traits2) {
42063
42136
  const prev = prevStatesRef.current.get(trait.id);
42064
42137
  if (prev && prev !== trait.currentState) {
@@ -42227,10 +42300,10 @@ function VerifyModePanel({
42227
42300
  localCount
42228
42301
  }) {
42229
42302
  const { t } = useTranslate();
42230
- const [expanded, setExpanded] = React85.useState(true);
42231
- const scrollRef = React85.useRef(null);
42232
- const prevCountRef = React85.useRef(0);
42233
- React85.useEffect(() => {
42303
+ const [expanded, setExpanded] = React86.useState(true);
42304
+ const scrollRef = React86.useRef(null);
42305
+ const prevCountRef = React86.useRef(0);
42306
+ React86.useEffect(() => {
42234
42307
  if (expanded && transitions.length > prevCountRef.current && scrollRef.current) {
42235
42308
  scrollRef.current.scrollTop = scrollRef.current.scrollHeight;
42236
42309
  }
@@ -42287,10 +42360,10 @@ function RuntimeDebugger({
42287
42360
  schema
42288
42361
  }) {
42289
42362
  const { t } = useTranslate();
42290
- const [isCollapsed, setIsCollapsed] = React85.useState(mode === "verify" ? true : defaultCollapsed);
42291
- const [isVisible, setIsVisible] = React85.useState(mode === "inline" || mode === "verify" || isDebugEnabled2());
42363
+ const [isCollapsed, setIsCollapsed] = React86.useState(mode === "verify" ? true : defaultCollapsed);
42364
+ const [isVisible, setIsVisible] = React86.useState(mode === "inline" || mode === "verify" || isDebugEnabled2());
42292
42365
  const debugData = useDebugData();
42293
- React85.useEffect(() => {
42366
+ React86.useEffect(() => {
42294
42367
  if (mode === "inline") return;
42295
42368
  return onDebugToggle((enabled) => {
42296
42369
  setIsVisible(enabled);
@@ -42299,7 +42372,7 @@ function RuntimeDebugger({
42299
42372
  }
42300
42373
  });
42301
42374
  }, [mode]);
42302
- React85.useEffect(() => {
42375
+ React86.useEffect(() => {
42303
42376
  if (mode === "inline") return;
42304
42377
  const handleKeyDown = (e) => {
42305
42378
  if (e.key === "`" && isVisible) {
@@ -42819,7 +42892,7 @@ var init_StatCard = __esm({
42819
42892
  const labelToUse = propLabel ?? propTitle;
42820
42893
  const eventBus = useEventBus();
42821
42894
  const { t } = useTranslate();
42822
- const handleActionClick = React85__default.useCallback(() => {
42895
+ const handleActionClick = React86__default.useCallback(() => {
42823
42896
  if (action?.event) {
42824
42897
  eventBus.emit(`UI:${action.event}`, {});
42825
42898
  }
@@ -42830,7 +42903,7 @@ var init_StatCard = __esm({
42830
42903
  const data = Array.isArray(entity) ? entity : entity ? [entity] : [];
42831
42904
  const isLoading = externalLoading ?? false;
42832
42905
  const error = externalError;
42833
- const computeMetricValue = React85__default.useCallback(
42906
+ const computeMetricValue = React86__default.useCallback(
42834
42907
  (metric, items) => {
42835
42908
  if (metric.value !== void 0) {
42836
42909
  return metric.value;
@@ -42869,7 +42942,7 @@ var init_StatCard = __esm({
42869
42942
  },
42870
42943
  []
42871
42944
  );
42872
- const schemaStats = React85__default.useMemo(() => {
42945
+ const schemaStats = React86__default.useMemo(() => {
42873
42946
  if (!metrics || metrics.length === 0) return null;
42874
42947
  return metrics.map((metric) => ({
42875
42948
  label: metric.label,
@@ -42877,7 +42950,7 @@ var init_StatCard = __esm({
42877
42950
  format: metric.format
42878
42951
  }));
42879
42952
  }, [metrics, data, computeMetricValue]);
42880
- const calculatedTrend = React85__default.useMemo(() => {
42953
+ const calculatedTrend = React86__default.useMemo(() => {
42881
42954
  if (manualTrend !== void 0) return manualTrend;
42882
42955
  if (previousValue === void 0 || currentValue === void 0)
42883
42956
  return void 0;
@@ -43517,8 +43590,8 @@ var init_SubagentTracePanel = __esm({
43517
43590
  ] });
43518
43591
  };
43519
43592
  InlineActivityStream = ({ activities, autoScroll = true, className }) => {
43520
- const endRef = React85__default.useRef(null);
43521
- React85__default.useEffect(() => {
43593
+ const endRef = React86__default.useRef(null);
43594
+ React86__default.useEffect(() => {
43522
43595
  if (!autoScroll) return;
43523
43596
  endRef.current?.scrollIntoView({ behavior: "smooth", block: "end" });
43524
43597
  }, [activities.length, autoScroll]);
@@ -43612,7 +43685,7 @@ var init_SubagentTracePanel = __esm({
43612
43685
  };
43613
43686
  SubagentRichCard = ({ subagent }) => {
43614
43687
  const { t } = useTranslate();
43615
- const activities = React85__default.useMemo(
43688
+ const activities = React86__default.useMemo(
43616
43689
  () => subagentMessagesToActivities(subagent.messages),
43617
43690
  [subagent.messages]
43618
43691
  );
@@ -43689,8 +43762,8 @@ var init_SubagentTracePanel = __esm({
43689
43762
  ] });
43690
43763
  };
43691
43764
  CoordinatorConversation = ({ messages, autoScroll = true, className }) => {
43692
- const endRef = React85__default.useRef(null);
43693
- React85__default.useEffect(() => {
43765
+ const endRef = React86__default.useRef(null);
43766
+ React86__default.useEffect(() => {
43694
43767
  if (!autoScroll) return;
43695
43768
  endRef.current?.scrollIntoView({ behavior: "smooth", block: "end" });
43696
43769
  }, [messages.length, autoScroll]);
@@ -44125,7 +44198,7 @@ var init_Timeline = __esm({
44125
44198
  }) => {
44126
44199
  const { t } = useTranslate();
44127
44200
  const entityData = entity ?? [];
44128
- const items = React85__default.useMemo(() => {
44201
+ const items = React86__default.useMemo(() => {
44129
44202
  if (propItems) return propItems;
44130
44203
  if (entityData.length === 0) return [];
44131
44204
  return entityData.map((record, idx) => {
@@ -44227,7 +44300,7 @@ var init_Timeline = __esm({
44227
44300
  }
44228
44301
  });
44229
44302
  function extractToastProps(children) {
44230
- if (!React85__default.isValidElement(children)) {
44303
+ if (!React86__default.isValidElement(children)) {
44231
44304
  if (typeof children === "string") {
44232
44305
  return { message: children };
44233
44306
  }
@@ -44269,7 +44342,7 @@ var init_ToastSlot = __esm({
44269
44342
  eventBus.emit(`${prefix}CLOSE`);
44270
44343
  };
44271
44344
  if (!isVisible) return null;
44272
- const isCustomContent = React85__default.isValidElement(children) && !message;
44345
+ const isCustomContent = React86__default.isValidElement(children) && !message;
44273
44346
  return /* @__PURE__ */ jsx(Box, { className: "fixed bottom-4 right-4 z-50", children: isCustomContent ? children : /* @__PURE__ */ jsx(
44274
44347
  Toast,
44275
44348
  {
@@ -44842,7 +44915,7 @@ function SuspenseConfigProvider({
44842
44915
  config,
44843
44916
  children
44844
44917
  }) {
44845
- return React85__default.createElement(
44918
+ return React86__default.createElement(
44846
44919
  SuspenseConfigContext.Provider,
44847
44920
  { value: config },
44848
44921
  children
@@ -44884,7 +44957,7 @@ function enrichFormFields(fields, entityDef) {
44884
44957
  }
44885
44958
  return { name: field, label: humanizeFieldName(field) };
44886
44959
  }
44887
- if (field && typeof field === "object" && !Array.isArray(field) && !React85__default.isValidElement(field) && !(field instanceof Date)) {
44960
+ if (field && typeof field === "object" && !Array.isArray(field) && !React86__default.isValidElement(field) && !(field instanceof Date)) {
44888
44961
  const obj = field;
44889
44962
  const fieldName = typeof obj.name === "string" ? obj.name : typeof obj.field === "string" ? obj.field : void 0;
44890
44963
  if (!fieldName) return field;
@@ -45356,7 +45429,7 @@ function renderPatternChildren(children, onDismiss, parentId = "root", parentPat
45356
45429
  const key = `${parentId}-${index}-trait:${traitName}`;
45357
45430
  return /* @__PURE__ */ jsx(TraitFrame, { traitName }, key);
45358
45431
  }
45359
- return /* @__PURE__ */ jsx(React85__default.Fragment, { children: child }, `${parentId}-${index}`);
45432
+ return /* @__PURE__ */ jsx(React86__default.Fragment, { children: child }, `${parentId}-${index}`);
45360
45433
  }
45361
45434
  if (!child || typeof child !== "object") return null;
45362
45435
  const childId = `${parentId}-${index}`;
@@ -45413,14 +45486,14 @@ function isPatternConfig(value) {
45413
45486
  if (value === null || value === void 0) return false;
45414
45487
  if (typeof value !== "object") return false;
45415
45488
  if (Array.isArray(value)) return false;
45416
- if (React85__default.isValidElement(value)) return false;
45489
+ if (React86__default.isValidElement(value)) return false;
45417
45490
  if (value instanceof Date) return false;
45418
45491
  if (typeof value === "function") return false;
45419
45492
  const record = value;
45420
45493
  return "type" in record && typeof record.type === "string" && getComponentForPattern$1(record.type) !== null;
45421
45494
  }
45422
45495
  function isPlainConfigObject(value) {
45423
- if (React85__default.isValidElement(value)) return false;
45496
+ if (React86__default.isValidElement(value)) return false;
45424
45497
  if (value instanceof Date) return false;
45425
45498
  const proto = Object.getPrototypeOf(value);
45426
45499
  return proto === Object.prototype || proto === null;
@@ -45556,7 +45629,7 @@ function SlotContentRenderer({
45556
45629
  for (const slotKey of CONTENT_NODE_SLOTS) {
45557
45630
  const slotVal = restProps[slotKey];
45558
45631
  if (slotVal === void 0 || slotVal === null) continue;
45559
- if (React85__default.isValidElement(slotVal) || typeof slotVal === "string" || typeof slotVal === "number" || typeof slotVal === "boolean") continue;
45632
+ if (React86__default.isValidElement(slotVal) || typeof slotVal === "string" || typeof slotVal === "number" || typeof slotVal === "boolean") continue;
45560
45633
  const typelessChildren = !Array.isArray(slotVal) && typeof slotVal === "object" && !("type" in slotVal) && Array.isArray(slotVal.children) ? slotVal.children : void 0;
45561
45634
  if (typelessChildren !== void 0 || Array.isArray(slotVal) || typeof slotVal === "object" && "type" in slotVal) {
45562
45635
  nodeSlotOverrides[slotKey] = renderPatternChildren(
@@ -45610,7 +45683,7 @@ function SlotContentRenderer({
45610
45683
  const resolvedItems = Array.isArray(entityVal) && entityVal[0] !== "fn" ? entityVal : null;
45611
45684
  if (resolvedItems && resolvedItems.length > 0 && !finalProps.fields && !finalProps.columns) {
45612
45685
  const sample = resolvedItems[0];
45613
- if (sample && typeof sample === "object" && !Array.isArray(sample) && !React85__default.isValidElement(sample) && !(sample instanceof Date)) {
45686
+ if (sample && typeof sample === "object" && !Array.isArray(sample) && !React86__default.isValidElement(sample) && !(sample instanceof Date)) {
45614
45687
  const keys = Object.keys(sample).filter((k) => k !== "id" && k !== "_id");
45615
45688
  finalProps.fields = keys.map((k, i) => ({ name: k, variant: i === 0 ? "h4" : "body" }));
45616
45689
  }