@almadar/ui 4.13.1 → 4.14.1

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 React116 from 'react';
2
- import React116__default, { createContext, useContext, useMemo, useRef, useEffect, useCallback, Suspense, useState, useLayoutEffect, lazy, useId } from 'react';
1
+ import * as React115 from 'react';
2
+ import React115__default, { createContext, useContext, useMemo, useRef, useEffect, useCallback, Suspense, useState, useLayoutEffect, lazy, useId } from 'react';
3
3
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
4
4
  import { EventBusContext, useTraitScope, TraitScopeProvider } from '@almadar/ui/providers';
5
5
  import { clsx } from 'clsx';
@@ -729,7 +729,7 @@ var init_Box = __esm({
729
729
  fixed: "fixed",
730
730
  sticky: "sticky"
731
731
  };
732
- Box = React116__default.forwardRef(
732
+ Box = React115__default.forwardRef(
733
733
  ({
734
734
  padding,
735
735
  paddingX,
@@ -1428,7 +1428,7 @@ function resolveIconProp(value, sizeClass) {
1428
1428
  const IconComp = value;
1429
1429
  return /* @__PURE__ */ jsx(IconComp, { className: sizeClass });
1430
1430
  }
1431
- if (React116__default.isValidElement(value)) {
1431
+ if (React115__default.isValidElement(value)) {
1432
1432
  return value;
1433
1433
  }
1434
1434
  if (typeof value === "object" && value !== null && "render" in value) {
@@ -1504,7 +1504,7 @@ var init_Button = __esm({
1504
1504
  md: "h-4 w-4",
1505
1505
  lg: "h-5 w-5"
1506
1506
  };
1507
- Button = React116__default.forwardRef(
1507
+ Button = React115__default.forwardRef(
1508
1508
  ({
1509
1509
  className,
1510
1510
  variant = "primary",
@@ -1607,7 +1607,7 @@ var init_Badge = __esm({
1607
1607
  md: "px-2.5 py-1 text-sm",
1608
1608
  lg: "px-3 py-1.5 text-base"
1609
1609
  };
1610
- Badge = React116__default.forwardRef(
1610
+ Badge = React115__default.forwardRef(
1611
1611
  ({ className, variant = "default", size = "sm", amount, label, icon, children, ...props }, ref) => {
1612
1612
  const iconSizes2 = { sm: "w-3 h-3", md: "w-3.5 h-3.5", lg: "w-4 h-4" };
1613
1613
  const resolvedIcon = typeof icon === "string" ? (() => {
@@ -1744,6 +1744,8 @@ var init_Toast = __esm({
1744
1744
  Toast.displayName = "Toast";
1745
1745
  }
1746
1746
  });
1747
+
1748
+ // runtime/ui/slot-types.ts
1747
1749
  function refId(obj) {
1748
1750
  if (obj === null || obj === void 0 || typeof obj !== "object") return null;
1749
1751
  const existing = refIds.get(obj);
@@ -1753,22 +1755,19 @@ function refId(obj) {
1753
1755
  return id;
1754
1756
  }
1755
1757
  var slotLog, refIds, nextRefId;
1756
- var init_SlotsContext = __esm({
1757
- "runtime/ui/SlotsContext.tsx"() {
1758
+ var init_slot_types = __esm({
1759
+ "runtime/ui/slot-types.ts"() {
1758
1760
  init_logger();
1759
1761
  slotLog = createLogger("almadar:ui:slot-render");
1760
- createLogger("almadar:runtime:cross-orbital");
1761
1762
  refIds = /* @__PURE__ */ new WeakMap();
1762
1763
  nextRefId = 1;
1763
- createContext({});
1764
- createContext(null);
1765
1764
  }
1766
1765
  });
1767
1766
  var Input;
1768
1767
  var init_Input = __esm({
1769
1768
  "components/atoms/Input.tsx"() {
1770
1769
  init_cn();
1771
- Input = React116__default.forwardRef(
1770
+ Input = React115__default.forwardRef(
1772
1771
  ({
1773
1772
  className,
1774
1773
  inputType,
@@ -1886,7 +1885,7 @@ var Label;
1886
1885
  var init_Label = __esm({
1887
1886
  "components/atoms/Label.tsx"() {
1888
1887
  init_cn();
1889
- Label = React116__default.forwardRef(
1888
+ Label = React115__default.forwardRef(
1890
1889
  ({ className, required, children, ...props }, ref) => {
1891
1890
  return /* @__PURE__ */ jsxs(
1892
1891
  "label",
@@ -1912,7 +1911,7 @@ var Textarea;
1912
1911
  var init_Textarea = __esm({
1913
1912
  "components/atoms/Textarea.tsx"() {
1914
1913
  init_cn();
1915
- Textarea = React116__default.forwardRef(
1914
+ Textarea = React115__default.forwardRef(
1916
1915
  ({ className, error, ...props }, ref) => {
1917
1916
  return /* @__PURE__ */ jsx(
1918
1917
  "textarea",
@@ -1941,7 +1940,7 @@ var Select;
1941
1940
  var init_Select = __esm({
1942
1941
  "components/atoms/Select.tsx"() {
1943
1942
  init_cn();
1944
- Select = React116__default.forwardRef(
1943
+ Select = React115__default.forwardRef(
1945
1944
  ({ className, options, placeholder, error, ...props }, ref) => {
1946
1945
  return /* @__PURE__ */ jsxs("div", { className: "relative", children: [
1947
1946
  /* @__PURE__ */ jsxs(
@@ -1983,7 +1982,7 @@ var Checkbox;
1983
1982
  var init_Checkbox = __esm({
1984
1983
  "components/atoms/Checkbox.tsx"() {
1985
1984
  init_cn();
1986
- Checkbox = React116__default.forwardRef(
1985
+ Checkbox = React115__default.forwardRef(
1987
1986
  ({ className, label, id, ...props }, ref) => {
1988
1987
  const inputId = id || `checkbox-${Math.random().toString(36).substr(2, 9)}`;
1989
1988
  return /* @__PURE__ */ jsxs("div", { className: "flex items-center", children: [
@@ -2065,7 +2064,7 @@ var init_Card = __esm({
2065
2064
  md: "shadow",
2066
2065
  lg: "shadow-lg"
2067
2066
  };
2068
- Card = React116__default.forwardRef(
2067
+ Card = React115__default.forwardRef(
2069
2068
  ({
2070
2069
  className,
2071
2070
  variant = "bordered",
@@ -2101,9 +2100,9 @@ var init_Card = __esm({
2101
2100
  }
2102
2101
  );
2103
2102
  Card.displayName = "Card";
2104
- CardHeader = React116__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("mb-4", className), ...props }));
2103
+ CardHeader = React115__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("mb-4", className), ...props }));
2105
2104
  CardHeader.displayName = "CardHeader";
2106
- CardTitle = React116__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
2105
+ CardTitle = React115__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
2107
2106
  "h3",
2108
2107
  {
2109
2108
  ref,
@@ -2116,11 +2115,11 @@ var init_Card = __esm({
2116
2115
  }
2117
2116
  ));
2118
2117
  CardTitle.displayName = "CardTitle";
2119
- CardContent = React116__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("", className), ...props }));
2118
+ CardContent = React115__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("", className), ...props }));
2120
2119
  CardContent.displayName = "CardContent";
2121
2120
  CardBody = CardContent;
2122
2121
  CardBody.displayName = "CardBody";
2123
- CardFooter = React116__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
2122
+ CardFooter = React115__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
2124
2123
  "div",
2125
2124
  {
2126
2125
  ref,
@@ -2141,7 +2140,7 @@ var init_Spinner = __esm({
2141
2140
  md: "h-6 w-6",
2142
2141
  lg: "h-8 w-8"
2143
2142
  };
2144
- Spinner = React116__default.forwardRef(
2143
+ Spinner = React115__default.forwardRef(
2145
2144
  ({ className, size = "md", ...props }, ref) => {
2146
2145
  return /* @__PURE__ */ jsx(
2147
2146
  "div",
@@ -2589,7 +2588,7 @@ var Radio;
2589
2588
  var init_Radio = __esm({
2590
2589
  "components/atoms/Radio.tsx"() {
2591
2590
  init_cn();
2592
- Radio = React116__default.forwardRef(
2591
+ Radio = React115__default.forwardRef(
2593
2592
  ({
2594
2593
  label,
2595
2594
  helperText,
@@ -2700,7 +2699,7 @@ var init_Switch = __esm({
2700
2699
  "components/atoms/Switch.tsx"() {
2701
2700
  "use client";
2702
2701
  init_cn();
2703
- Switch = React116.forwardRef(
2702
+ Switch = React115.forwardRef(
2704
2703
  ({
2705
2704
  checked,
2706
2705
  defaultChecked = false,
@@ -2711,10 +2710,10 @@ var init_Switch = __esm({
2711
2710
  name,
2712
2711
  className
2713
2712
  }, ref) => {
2714
- const [isChecked, setIsChecked] = React116.useState(
2713
+ const [isChecked, setIsChecked] = React115.useState(
2715
2714
  checked !== void 0 ? checked : defaultChecked
2716
2715
  );
2717
- React116.useEffect(() => {
2716
+ React115.useEffect(() => {
2718
2717
  if (checked !== void 0) {
2719
2718
  setIsChecked(checked);
2720
2719
  }
@@ -3140,8 +3139,8 @@ var init_LawReferenceTooltip = __esm({
3140
3139
  position = "top",
3141
3140
  className
3142
3141
  }) => {
3143
- const [isVisible, setIsVisible] = React116__default.useState(false);
3144
- const timeoutRef = React116__default.useRef(null);
3142
+ const [isVisible, setIsVisible] = React115__default.useState(false);
3143
+ const timeoutRef = React115__default.useRef(null);
3145
3144
  const handleMouseEnter = () => {
3146
3145
  if (timeoutRef.current) clearTimeout(timeoutRef.current);
3147
3146
  timeoutRef.current = setTimeout(() => setIsVisible(true), 200);
@@ -3150,7 +3149,7 @@ var init_LawReferenceTooltip = __esm({
3150
3149
  if (timeoutRef.current) clearTimeout(timeoutRef.current);
3151
3150
  setIsVisible(false);
3152
3151
  };
3153
- React116__default.useEffect(() => {
3152
+ React115__default.useEffect(() => {
3154
3153
  return () => {
3155
3154
  if (timeoutRef.current) clearTimeout(timeoutRef.current);
3156
3155
  };
@@ -3360,7 +3359,7 @@ var init_StatusDot = __esm({
3360
3359
  md: "w-2.5 h-2.5",
3361
3360
  lg: "w-3 h-3"
3362
3361
  };
3363
- StatusDot = React116__default.forwardRef(
3362
+ StatusDot = React115__default.forwardRef(
3364
3363
  ({ className, status = "offline", pulse = false, size = "md", label, ...props }, ref) => {
3365
3364
  return /* @__PURE__ */ jsx(
3366
3365
  "span",
@@ -3413,7 +3412,7 @@ var init_TrendIndicator = __esm({
3413
3412
  down: TrendingDown,
3414
3413
  flat: ArrowRight
3415
3414
  };
3416
- TrendIndicator = React116__default.forwardRef(
3415
+ TrendIndicator = React115__default.forwardRef(
3417
3416
  ({
3418
3417
  className,
3419
3418
  value,
@@ -3480,7 +3479,7 @@ var init_RangeSlider = __esm({
3480
3479
  md: "w-4 h-4",
3481
3480
  lg: "w-5 h-5"
3482
3481
  };
3483
- RangeSlider = React116__default.forwardRef(
3482
+ RangeSlider = React115__default.forwardRef(
3484
3483
  ({
3485
3484
  className,
3486
3485
  min = 0,
@@ -4076,7 +4075,7 @@ var init_ContentSection = __esm({
4076
4075
  md: "py-16",
4077
4076
  lg: "py-24"
4078
4077
  };
4079
- ContentSection = React116__default.forwardRef(
4078
+ ContentSection = React115__default.forwardRef(
4080
4079
  ({ children, background = "default", padding = "lg", id, className }, ref) => {
4081
4080
  return /* @__PURE__ */ jsx(
4082
4081
  Box,
@@ -4610,7 +4609,7 @@ var init_AnimatedReveal = __esm({
4610
4609
  "scale-up": { opacity: 1, transform: "scale(1) translateY(0)" },
4611
4610
  "none": {}
4612
4611
  };
4613
- AnimatedReveal = React116__default.forwardRef(
4612
+ AnimatedReveal = React115__default.forwardRef(
4614
4613
  ({
4615
4614
  trigger = "scroll",
4616
4615
  animation = "fade-up",
@@ -4770,7 +4769,7 @@ var init_AnimatedGraphic = __esm({
4770
4769
  "components/atoms/AnimatedGraphic.tsx"() {
4771
4770
  "use client";
4772
4771
  init_cn();
4773
- AnimatedGraphic = React116__default.forwardRef(
4772
+ AnimatedGraphic = React115__default.forwardRef(
4774
4773
  ({
4775
4774
  src,
4776
4775
  svgContent,
@@ -4793,7 +4792,7 @@ var init_AnimatedGraphic = __esm({
4793
4792
  const fetchedSvg = useFetchedSvg(svgContent ? void 0 : src);
4794
4793
  const resolvedSvg = svgContent ?? fetchedSvg;
4795
4794
  const prevAnimateRef = useRef(animate);
4796
- const setRef = React116__default.useCallback(
4795
+ const setRef = React115__default.useCallback(
4797
4796
  (node) => {
4798
4797
  containerRef.current = node;
4799
4798
  if (typeof ref === "function") ref(node);
@@ -4901,11 +4900,13 @@ function TraitFrame({
4901
4900
  fallback = null
4902
4901
  }) {
4903
4902
  const content = useTraitContent(traitName);
4903
+ const entitySchema = useEntitySchemaOptional();
4904
+ const orbital = entitySchema?.orbitalsByTrait.get(traitName);
4904
4905
  if (!content) {
4905
4906
  return /* @__PURE__ */ jsx(Fragment, { children: fallback });
4906
4907
  }
4907
4908
  const SlotContentRenderer2 = getSlotContentRenderer();
4908
- return /* @__PURE__ */ jsx(
4909
+ const rendered = /* @__PURE__ */ jsx(
4909
4910
  SlotContentRenderer2,
4910
4911
  {
4911
4912
  content,
@@ -4913,6 +4914,10 @@ function TraitFrame({
4913
4914
  }
4914
4915
  }
4915
4916
  );
4917
+ if (!orbital) {
4918
+ return rendered;
4919
+ }
4920
+ return /* @__PURE__ */ jsx(TraitScopeProvider, { orbital, trait: traitName, children: rendered });
4916
4921
  }
4917
4922
  function getSlotContentRenderer() {
4918
4923
  if (_slotContentRenderer) return _slotContentRenderer;
@@ -4923,6 +4928,7 @@ function getSlotContentRenderer() {
4923
4928
  var _slotContentRenderer;
4924
4929
  var init_TraitFrame = __esm({
4925
4930
  "components/atoms/TraitFrame.tsx"() {
4931
+ init_EntitySchemaContext();
4926
4932
  TraitFrame.displayName = "TraitFrame";
4927
4933
  _slotContentRenderer = null;
4928
4934
  }
@@ -5011,9 +5017,9 @@ function ScoreDisplay({
5011
5017
  ...rest
5012
5018
  }) {
5013
5019
  const resolvedValue = typeof value === "number" && !Number.isNaN(value) ? value : typeof rest.score === "number" && !Number.isNaN(rest.score) ? rest.score : 0;
5014
- const [displayValue, setDisplayValue] = React116.useState(resolvedValue);
5015
- const [isAnimating, setIsAnimating] = React116.useState(false);
5016
- React116.useEffect(() => {
5020
+ const [displayValue, setDisplayValue] = React115.useState(resolvedValue);
5021
+ const [isAnimating, setIsAnimating] = React115.useState(false);
5022
+ React115.useEffect(() => {
5017
5023
  if (!animated || displayValue === resolvedValue) {
5018
5024
  setDisplayValue(resolvedValue);
5019
5025
  return;
@@ -5083,9 +5089,9 @@ function ControlButton({
5083
5089
  className
5084
5090
  }) {
5085
5091
  const eventBus = useEventBus();
5086
- const [isPressed, setIsPressed] = React116.useState(false);
5092
+ const [isPressed, setIsPressed] = React115.useState(false);
5087
5093
  const actualPressed = pressed ?? isPressed;
5088
- const handlePointerDown = React116.useCallback(
5094
+ const handlePointerDown = React115.useCallback(
5089
5095
  (e) => {
5090
5096
  e.preventDefault();
5091
5097
  if (disabled) return;
@@ -5095,7 +5101,7 @@ function ControlButton({
5095
5101
  },
5096
5102
  [disabled, pressEvent, eventBus, onPress]
5097
5103
  );
5098
- const handlePointerUp = React116.useCallback(
5104
+ const handlePointerUp = React115.useCallback(
5099
5105
  (e) => {
5100
5106
  e.preventDefault();
5101
5107
  if (disabled) return;
@@ -5105,7 +5111,7 @@ function ControlButton({
5105
5111
  },
5106
5112
  [disabled, releaseEvent, eventBus, onRelease]
5107
5113
  );
5108
- const handlePointerLeave = React116.useCallback(
5114
+ const handlePointerLeave = React115.useCallback(
5109
5115
  (e) => {
5110
5116
  if (isPressed) {
5111
5117
  setIsPressed(false);
@@ -6003,9 +6009,9 @@ function MiniMap({
6003
6009
  viewportRect,
6004
6010
  className
6005
6011
  }) {
6006
- const canvasRef = React116.useRef(null);
6007
- const frameRef = React116.useRef(0);
6008
- React116.useEffect(() => {
6012
+ const canvasRef = React115.useRef(null);
6013
+ const frameRef = React115.useRef(0);
6014
+ React115.useEffect(() => {
6009
6015
  const canvas = canvasRef.current;
6010
6016
  if (!canvas) return;
6011
6017
  const ctx = canvas.getContext("2d");
@@ -6344,7 +6350,7 @@ var init_ErrorBoundary = __esm({
6344
6350
  "use client";
6345
6351
  init_cn();
6346
6352
  init_ErrorState();
6347
- ErrorBoundary = class extends React116__default.Component {
6353
+ ErrorBoundary = class extends React115__default.Component {
6348
6354
  constructor(props) {
6349
6355
  super(props);
6350
6356
  __publicField(this, "reset", () => {
@@ -7168,8 +7174,8 @@ var init_Tooltip = __esm({
7168
7174
  if (hideTimeoutRef.current) clearTimeout(hideTimeoutRef.current);
7169
7175
  };
7170
7176
  }, []);
7171
- const triggerElement = React116__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
7172
- const trigger = React116__default.cloneElement(triggerElement, {
7177
+ const triggerElement = React115__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
7178
+ const trigger = React115__default.cloneElement(triggerElement, {
7173
7179
  ref: triggerRef,
7174
7180
  onMouseEnter: handleMouseEnter,
7175
7181
  onMouseLeave: handleMouseLeave,
@@ -7290,8 +7296,8 @@ var init_Popover = __esm({
7290
7296
  onMouseEnter: handleOpen,
7291
7297
  onMouseLeave: handleClose
7292
7298
  };
7293
- const childElement = React116__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
7294
- const triggerElement = React116__default.cloneElement(
7299
+ const childElement = React115__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
7300
+ const triggerElement = React115__default.cloneElement(
7295
7301
  childElement,
7296
7302
  {
7297
7303
  ref: triggerRef,
@@ -7408,8 +7414,8 @@ var init_Menu = __esm({
7408
7414
  "bottom-start": "top-full left-0 mt-2",
7409
7415
  "bottom-end": "top-full right-0 mt-2"
7410
7416
  };
7411
- const triggerChild = React116__default.isValidElement(trigger) ? trigger : /* @__PURE__ */ jsx("span", { children: trigger });
7412
- const triggerElement = React116__default.cloneElement(
7417
+ const triggerChild = React115__default.isValidElement(trigger) ? trigger : /* @__PURE__ */ jsx("span", { children: trigger });
7418
+ const triggerElement = React115__default.cloneElement(
7413
7419
  triggerChild,
7414
7420
  {
7415
7421
  ref: triggerRef,
@@ -7928,12 +7934,12 @@ var init_MapView = __esm({
7928
7934
  shadowSize: [41, 41]
7929
7935
  });
7930
7936
  L.Marker.prototype.options.icon = defaultIcon;
7931
- const { useEffect: useEffect63, useRef: useRef63, useCallback: useCallback95, useState: useState87 } = React116__default;
7937
+ const { useEffect: useEffect63, useRef: useRef62, useCallback: useCallback94, useState: useState86 } = React115__default;
7932
7938
  const { Typography: Typography2 } = await Promise.resolve().then(() => (init_Typography(), Typography_exports));
7933
7939
  const { useEventBus: useEventBus2 } = await Promise.resolve().then(() => (init_useEventBus(), useEventBus_exports));
7934
7940
  function MapUpdater({ centerLat, centerLng, zoom }) {
7935
7941
  const map = useMap();
7936
- const prevRef = useRef63({ centerLat, centerLng, zoom });
7942
+ const prevRef = useRef62({ centerLat, centerLng, zoom });
7937
7943
  useEffect63(() => {
7938
7944
  const prev = prevRef.current;
7939
7945
  if (prev.centerLat !== centerLat || prev.centerLng !== centerLng || prev.zoom !== zoom) {
@@ -7972,8 +7978,8 @@ var init_MapView = __esm({
7972
7978
  showAttribution = true
7973
7979
  }) {
7974
7980
  const eventBus = useEventBus2();
7975
- const [clickedPosition, setClickedPosition] = useState87(null);
7976
- const handleMapClick = useCallback95((lat, lng) => {
7981
+ const [clickedPosition, setClickedPosition] = useState86(null);
7982
+ const handleMapClick = useCallback94((lat, lng) => {
7977
7983
  if (showClickedPin) {
7978
7984
  setClickedPosition({ lat, lng });
7979
7985
  }
@@ -7982,7 +7988,7 @@ var init_MapView = __esm({
7982
7988
  eventBus.emit(`UI:${mapClickEvent}`, { latitude: lat, longitude: lng });
7983
7989
  }
7984
7990
  }, [onMapClick, mapClickEvent, eventBus, showClickedPin]);
7985
- const handleMarkerClick = useCallback95((marker) => {
7991
+ const handleMarkerClick = useCallback94((marker) => {
7986
7992
  onMarkerClick?.(marker);
7987
7993
  if (markerClickEvent) {
7988
7994
  eventBus.emit(`UI:${markerClickEvent}`, { ...marker });
@@ -8159,7 +8165,7 @@ function InputPattern({
8159
8165
  fieldName
8160
8166
  }) {
8161
8167
  const { emit } = useEventBus();
8162
- const [localValue, setLocalValue] = React116__default.useState(value);
8168
+ const [localValue, setLocalValue] = React115__default.useState(value);
8163
8169
  const handleChange = (e) => {
8164
8170
  setLocalValue(e.target.value);
8165
8171
  if (onChange) {
@@ -8197,7 +8203,7 @@ function TextareaPattern({
8197
8203
  fieldName
8198
8204
  }) {
8199
8205
  const { emit } = useEventBus();
8200
- const [localValue, setLocalValue] = React116__default.useState(value);
8206
+ const [localValue, setLocalValue] = React115__default.useState(value);
8201
8207
  const handleChange = (e) => {
8202
8208
  setLocalValue(e.target.value);
8203
8209
  if (onChange) {
@@ -8229,7 +8235,7 @@ function SelectPattern({
8229
8235
  fieldName
8230
8236
  }) {
8231
8237
  const { emit } = useEventBus();
8232
- const [localValue, setLocalValue] = React116__default.useState(value);
8238
+ const [localValue, setLocalValue] = React115__default.useState(value);
8233
8239
  const handleChange = (e) => {
8234
8240
  setLocalValue(e.target.value);
8235
8241
  if (onChange) {
@@ -8258,7 +8264,7 @@ function CheckboxPattern({
8258
8264
  className
8259
8265
  }) {
8260
8266
  const { emit } = useEventBus();
8261
- const [localChecked, setLocalChecked] = React116__default.useState(checked);
8267
+ const [localChecked, setLocalChecked] = React115__default.useState(checked);
8262
8268
  const handleChange = (e) => {
8263
8269
  setLocalChecked(e.target.checked);
8264
8270
  if (onChange) {
@@ -8489,8 +8495,8 @@ function ActionButtons({
8489
8495
  disabled
8490
8496
  }) {
8491
8497
  const eventBus = useEventBus();
8492
- const [activeButtons, setActiveButtons] = React116.useState(/* @__PURE__ */ new Set());
8493
- const handlePress = React116.useCallback(
8498
+ const [activeButtons, setActiveButtons] = React115.useState(/* @__PURE__ */ new Set());
8499
+ const handlePress = React115.useCallback(
8494
8500
  (id) => {
8495
8501
  setActiveButtons((prev) => new Set(prev).add(id));
8496
8502
  if (actionEvent) eventBus.emit(`UI:${actionEvent}`, { id, pressed: true });
@@ -8498,7 +8504,7 @@ function ActionButtons({
8498
8504
  },
8499
8505
  [actionEvent, eventBus, onAction]
8500
8506
  );
8501
- const handleRelease = React116.useCallback(
8507
+ const handleRelease = React115.useCallback(
8502
8508
  (id) => {
8503
8509
  setActiveButtons((prev) => {
8504
8510
  const next = new Set(prev);
@@ -10522,7 +10528,7 @@ var init_MarkdownContent = __esm({
10522
10528
  init_Box();
10523
10529
  init_useTranslate();
10524
10530
  init_cn();
10525
- MarkdownContent = React116__default.memo(
10531
+ MarkdownContent = React115__default.memo(
10526
10532
  ({ content, direction, className }) => {
10527
10533
  const { t: _t } = useTranslate();
10528
10534
  const safeContent = typeof content === "string" ? content : String(content ?? "");
@@ -10739,7 +10745,7 @@ var init_CodeBlock = __esm({
10739
10745
  loloStyle = { ...dark, ...loloStyleOverrides };
10740
10746
  LINE_PROPS_FN = (n) => ({ "data-line": String(n - 1) });
10741
10747
  HIDDEN_LINE_NUMBERS = { display: "none" };
10742
- CodeBlock = React116__default.memo(
10748
+ CodeBlock = React115__default.memo(
10743
10749
  ({
10744
10750
  code: rawCode,
10745
10751
  language = "text",
@@ -12048,7 +12054,7 @@ var init_StateMachineView = __esm({
12048
12054
  style: { top: title ? 30 : 0 },
12049
12055
  children: [
12050
12056
  entity && /* @__PURE__ */ jsx(EntityBox, { entity, config }),
12051
- states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(React116__default.Fragment, { children: renderStateNode(state, config) }, state.id) : /* @__PURE__ */ jsx(
12057
+ states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(React115__default.Fragment, { children: renderStateNode(state, config) }, state.id) : /* @__PURE__ */ jsx(
12052
12058
  StateNode,
12053
12059
  {
12054
12060
  state,
@@ -17831,7 +17837,7 @@ function CraftingRecipe({
17831
17837
  className
17832
17838
  }) {
17833
17839
  const eventBus = useEventBus();
17834
- const handleCraft = React116.useCallback(() => {
17840
+ const handleCraft = React115.useCallback(() => {
17835
17841
  onCraft?.();
17836
17842
  if (craftEvent) {
17837
17843
  eventBus.emit(craftEvent, { output: output.label });
@@ -17848,7 +17854,7 @@ function CraftingRecipe({
17848
17854
  children: [
17849
17855
  /* @__PURE__ */ jsx(HStack, { gap: "xs", className: "flex-wrap items-center", children: inputs.map((ingredient, index) => {
17850
17856
  const hasSufficient = ingredient.available >= ingredient.required;
17851
- return /* @__PURE__ */ jsxs(React116.Fragment, { children: [
17857
+ return /* @__PURE__ */ jsxs(React115.Fragment, { children: [
17852
17858
  /* @__PURE__ */ jsx(Box, { className: "relative", children: /* @__PURE__ */ jsx(
17853
17859
  ItemSlot,
17854
17860
  {
@@ -18142,8 +18148,8 @@ function DPad({
18142
18148
  }) {
18143
18149
  const eventBus = useEventBus();
18144
18150
  const sizes = sizeMap15[size];
18145
- const [activeDirections, setActiveDirections] = React116.useState(/* @__PURE__ */ new Set());
18146
- const handlePress = React116.useCallback(
18151
+ const [activeDirections, setActiveDirections] = React115.useState(/* @__PURE__ */ new Set());
18152
+ const handlePress = React115.useCallback(
18147
18153
  (direction) => {
18148
18154
  setActiveDirections((prev) => new Set(prev).add(direction));
18149
18155
  if (directionEvent) eventBus.emit(`UI:${directionEvent}`, { direction, pressed: true });
@@ -18151,7 +18157,7 @@ function DPad({
18151
18157
  },
18152
18158
  [directionEvent, eventBus, onDirection]
18153
18159
  );
18154
- const handleRelease = React116.useCallback(
18160
+ const handleRelease = React115.useCallback(
18155
18161
  (direction) => {
18156
18162
  setActiveDirections((prev) => {
18157
18163
  const next = new Set(prev);
@@ -19051,7 +19057,7 @@ function DataList({
19051
19057
  }) {
19052
19058
  const eventBus = useEventBus();
19053
19059
  const { t } = useTranslate();
19054
- const [visibleCount, setVisibleCount] = React116__default.useState(pageSize || Infinity);
19060
+ const [visibleCount, setVisibleCount] = React115__default.useState(pageSize || Infinity);
19055
19061
  const allData = Array.isArray(entity) ? entity : entity ? [entity] : [];
19056
19062
  const data = pageSize > 0 ? allData.slice(0, visibleCount) : allData;
19057
19063
  const hasMoreLocal = pageSize > 0 && visibleCount < allData.length;
@@ -19091,7 +19097,7 @@ function DataList({
19091
19097
  const items2 = data.map((item) => item);
19092
19098
  const groups2 = groupBy ? groupData(items2, groupBy) : [{ label: "", items: items2 }];
19093
19099
  const contentField = titleField?.name ?? fields[0]?.name ?? "";
19094
- return /* @__PURE__ */ jsx(VStack, { gap: "sm", className: cn("py-2", className), children: groups2.map((group, gi) => /* @__PURE__ */ jsxs(React116__default.Fragment, { children: [
19100
+ return /* @__PURE__ */ jsx(VStack, { gap: "sm", className: cn("py-2", className), children: groups2.map((group, gi) => /* @__PURE__ */ jsxs(React115__default.Fragment, { children: [
19095
19101
  group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: "my-2" }),
19096
19102
  group.items.map((itemData, index) => {
19097
19103
  const id = itemData.id || `${gi}-${index}`;
@@ -19138,7 +19144,7 @@ function DataList({
19138
19144
  ] }, gi)) });
19139
19145
  }
19140
19146
  const hasRenderProp = typeof children === "function";
19141
- React116__default.useEffect(() => {
19147
+ React115__default.useEffect(() => {
19142
19148
  const renderItemTypeOf = typeof schemaRenderItem;
19143
19149
  const childrenTypeOf = typeof children;
19144
19150
  if (data.length > 0 && !hasRenderProp) {
@@ -19303,7 +19309,7 @@ function DataList({
19303
19309
  className
19304
19310
  ),
19305
19311
  children: [
19306
- groups.map((group, gi) => /* @__PURE__ */ jsxs(React116__default.Fragment, { children: [
19312
+ groups.map((group, gi) => /* @__PURE__ */ jsxs(React115__default.Fragment, { children: [
19307
19313
  group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-4" : "mt-0" }),
19308
19314
  group.items.map(
19309
19315
  (itemData, index) => renderItem(itemData, index, gi === groups.length - 1 && index === group.items.length - 1)
@@ -20579,7 +20585,7 @@ var init_WizardProgress = __esm({
20579
20585
  children: /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: normalizedSteps.map((step, index) => {
20580
20586
  const isActive = index === currentStep;
20581
20587
  const isCompleted = index < currentStep;
20582
- return /* @__PURE__ */ jsxs(React116__default.Fragment, { children: [
20588
+ return /* @__PURE__ */ jsxs(React115__default.Fragment, { children: [
20583
20589
  /* @__PURE__ */ jsx(
20584
20590
  "button",
20585
20591
  {
@@ -21490,7 +21496,7 @@ function InventoryGrid({
21490
21496
  const eventBus = useEventBus();
21491
21497
  const slotCount = totalSlots ?? items.length;
21492
21498
  const emptySlotCount = Math.max(0, slotCount - items.length);
21493
- const handleSelect = React116.useCallback(
21499
+ const handleSelect = React115.useCallback(
21494
21500
  (id) => {
21495
21501
  onSelect?.(id);
21496
21502
  if (selectEvent) {
@@ -21703,15 +21709,15 @@ function GameCanvas2D({
21703
21709
  fps = 60,
21704
21710
  className
21705
21711
  }) {
21706
- const canvasRef = React116.useRef(null);
21707
- const rafRef = React116.useRef(0);
21708
- const frameRef = React116.useRef(0);
21709
- const lastTimeRef = React116.useRef(0);
21710
- const onDrawRef = React116.useRef(onDraw);
21712
+ const canvasRef = React115.useRef(null);
21713
+ const rafRef = React115.useRef(0);
21714
+ const frameRef = React115.useRef(0);
21715
+ const lastTimeRef = React115.useRef(0);
21716
+ const onDrawRef = React115.useRef(onDraw);
21711
21717
  onDrawRef.current = onDraw;
21712
- const onTickRef = React116.useRef(onTick);
21718
+ const onTickRef = React115.useRef(onTick);
21713
21719
  onTickRef.current = onTick;
21714
- React116.useEffect(() => {
21720
+ React115.useEffect(() => {
21715
21721
  const canvas = canvasRef.current;
21716
21722
  if (!canvas) return;
21717
21723
  const ctx = canvas.getContext("2d");
@@ -22000,7 +22006,7 @@ function TurnPanel({
22000
22006
  className
22001
22007
  }) {
22002
22008
  const eventBus = useEventBus();
22003
- const handleAction = React116.useCallback(
22009
+ const handleAction = React115.useCallback(
22004
22010
  (event) => {
22005
22011
  if (event) {
22006
22012
  eventBus.emit(event, { turn: currentTurn, phase, activeTeam });
@@ -22146,7 +22152,7 @@ function UnitCommandBar({
22146
22152
  className
22147
22153
  }) {
22148
22154
  const eventBus = useEventBus();
22149
- const handleCommand = React116.useCallback(
22155
+ const handleCommand = React115.useCallback(
22150
22156
  (event) => {
22151
22157
  if (event) {
22152
22158
  eventBus.emit(event, { unitId: selectedUnitId });
@@ -22631,7 +22637,7 @@ function GameMenu({
22631
22637
  } catch {
22632
22638
  }
22633
22639
  const eventBus = eventBusProp || eventBusFromHook;
22634
- const handleOptionClick = React116.useCallback(
22640
+ const handleOptionClick = React115.useCallback(
22635
22641
  (option) => {
22636
22642
  if (option.event && eventBus) {
22637
22643
  eventBus.emit(`UI:${option.event}`, { option });
@@ -22745,7 +22751,7 @@ function GameOverScreen({
22745
22751
  } catch {
22746
22752
  }
22747
22753
  const eventBus = eventBusProp || eventBusFromHook;
22748
- const handleActionClick = React116.useCallback(
22754
+ const handleActionClick = React115.useCallback(
22749
22755
  (action) => {
22750
22756
  if (action.event && eventBus) {
22751
22757
  eventBus.emit(`UI:${action.event}`, { action });
@@ -25849,7 +25855,7 @@ var init_StepFlow = __esm({
25849
25855
  className
25850
25856
  }) => {
25851
25857
  if (orientation === "vertical") {
25852
- return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(React116__default.Fragment, { children: /* @__PURE__ */ jsxs(HStack, { gap: "md", align: "start", className: "w-full", children: [
25858
+ return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(React115__default.Fragment, { children: /* @__PURE__ */ jsxs(HStack, { gap: "md", align: "start", className: "w-full", children: [
25853
25859
  /* @__PURE__ */ jsxs(VStack, { gap: "none", align: "center", children: [
25854
25860
  /* @__PURE__ */ jsx(StepCircle, { step, index }),
25855
25861
  showConnectors && index < steps.length - 1 && /* @__PURE__ */ jsx(Box, { className: "w-px h-8 bg-border" })
@@ -25860,7 +25866,7 @@ var init_StepFlow = __esm({
25860
25866
  ] })
25861
25867
  ] }) }, index)) });
25862
25868
  }
25863
- 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(React116__default.Fragment, { children: [
25869
+ 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(React115__default.Fragment, { children: [
25864
25870
  /* @__PURE__ */ jsxs(VStack, { gap: "sm", align: "center", className: "flex-1 w-full md:w-auto", children: [
25865
25871
  /* @__PURE__ */ jsx(StepCircle, { step, index }),
25866
25872
  /* @__PURE__ */ jsx(Typography, { variant: "h4", className: "text-center", children: step.title }),
@@ -27974,7 +27980,7 @@ var init_DocumentViewer = __esm({
27974
27980
  }
27975
27981
  });
27976
27982
  function extractTitle(children) {
27977
- if (!React116__default.isValidElement(children)) return void 0;
27983
+ if (!React115__default.isValidElement(children)) return void 0;
27978
27984
  const props = children.props;
27979
27985
  if (typeof props.title === "string") {
27980
27986
  return props.title;
@@ -28029,7 +28035,7 @@ function LinearView({
28029
28035
  /* @__PURE__ */ jsx(HStack, { className: "flex-wrap items-center", gap: "xs", children: trait.states.map((state, i) => {
28030
28036
  const isDone = i < currentIdx;
28031
28037
  const isCurrent = i === currentIdx;
28032
- return /* @__PURE__ */ jsxs(React116__default.Fragment, { children: [
28038
+ return /* @__PURE__ */ jsxs(React115__default.Fragment, { children: [
28033
28039
  i > 0 && /* @__PURE__ */ jsx(
28034
28040
  Typography,
28035
28041
  {
@@ -28813,12 +28819,12 @@ var init_Form = __esm({
28813
28819
  const isSchemaEntity = isOrbitalEntitySchema(entity);
28814
28820
  const resolvedEntity = isSchemaEntity ? entity : void 0;
28815
28821
  const entityName = typeof entity === "string" ? entity : resolvedEntity?.name;
28816
- const normalizedInitialData = React116__default.useMemo(() => {
28822
+ const normalizedInitialData = React115__default.useMemo(() => {
28817
28823
  const entityRowAsInitial = isPlainEntityRow(entity) ? entity : void 0;
28818
28824
  const callerInitial = initialData !== null && typeof initialData === "object" && !Array.isArray(initialData) ? initialData : {};
28819
28825
  return entityRowAsInitial !== void 0 ? { ...entityRowAsInitial, ...callerInitial } : callerInitial;
28820
28826
  }, [entity, initialData]);
28821
- const entityDerivedFields = React116__default.useMemo(() => {
28827
+ const entityDerivedFields = React115__default.useMemo(() => {
28822
28828
  if (fields && fields.length > 0) return void 0;
28823
28829
  if (!resolvedEntity) return void 0;
28824
28830
  return resolvedEntity.fields.map(
@@ -28837,14 +28843,14 @@ var init_Form = __esm({
28837
28843
  const conditionalFields = typeof conditionalFieldsRaw === "boolean" ? {} : conditionalFieldsRaw;
28838
28844
  const hiddenCalculations = typeof hiddenCalculationsRaw === "boolean" ? [] : hiddenCalculationsRaw;
28839
28845
  const violationTriggers = typeof violationTriggersRaw === "boolean" ? [] : violationTriggersRaw;
28840
- const [formData, setFormData] = React116__default.useState(
28846
+ const [formData, setFormData] = React115__default.useState(
28841
28847
  normalizedInitialData
28842
28848
  );
28843
- const [collapsedSections, setCollapsedSections] = React116__default.useState(
28849
+ const [collapsedSections, setCollapsedSections] = React115__default.useState(
28844
28850
  /* @__PURE__ */ new Set()
28845
28851
  );
28846
28852
  const formMode = props.mode;
28847
- const mountedRef = React116__default.useRef(false);
28853
+ const mountedRef = React115__default.useRef(false);
28848
28854
  if (!mountedRef.current) {
28849
28855
  mountedRef.current = true;
28850
28856
  debug("forms", "mount", {
@@ -28857,7 +28863,7 @@ var init_Form = __esm({
28857
28863
  });
28858
28864
  }
28859
28865
  const shouldShowCancel = showCancel ?? (fields && fields.length > 0);
28860
- const evalContext = React116__default.useMemo(
28866
+ const evalContext = React115__default.useMemo(
28861
28867
  () => ({
28862
28868
  formValues: formData,
28863
28869
  globalVariables: externalContext?.globalVariables ?? {},
@@ -28866,7 +28872,7 @@ var init_Form = __esm({
28866
28872
  }),
28867
28873
  [formData, externalContext]
28868
28874
  );
28869
- React116__default.useEffect(() => {
28875
+ React115__default.useEffect(() => {
28870
28876
  debug("forms", "initialData-sync", {
28871
28877
  mode: formMode,
28872
28878
  normalizedInitialData,
@@ -28877,7 +28883,7 @@ var init_Form = __esm({
28877
28883
  setFormData(normalizedInitialData);
28878
28884
  }
28879
28885
  }, [normalizedInitialData]);
28880
- const processCalculations = React116__default.useCallback(
28886
+ const processCalculations = React115__default.useCallback(
28881
28887
  (changedFieldId, newFormData) => {
28882
28888
  if (!hiddenCalculations.length) return;
28883
28889
  const context = {
@@ -28902,7 +28908,7 @@ var init_Form = __esm({
28902
28908
  },
28903
28909
  [hiddenCalculations, externalContext, eventBus]
28904
28910
  );
28905
- const checkViolations = React116__default.useCallback(
28911
+ const checkViolations = React115__default.useCallback(
28906
28912
  (changedFieldId, newFormData) => {
28907
28913
  if (!violationTriggers.length) return;
28908
28914
  const context = {
@@ -28940,7 +28946,7 @@ var init_Form = __esm({
28940
28946
  processCalculations(name, newFormData);
28941
28947
  checkViolations(name, newFormData);
28942
28948
  };
28943
- const isFieldVisible = React116__default.useCallback(
28949
+ const isFieldVisible = React115__default.useCallback(
28944
28950
  (fieldName) => {
28945
28951
  const condition = conditionalFields[fieldName];
28946
28952
  if (!condition) return true;
@@ -28948,7 +28954,7 @@ var init_Form = __esm({
28948
28954
  },
28949
28955
  [conditionalFields, evalContext]
28950
28956
  );
28951
- const isSectionVisible = React116__default.useCallback(
28957
+ const isSectionVisible = React115__default.useCallback(
28952
28958
  (section) => {
28953
28959
  if (!section.condition) return true;
28954
28960
  return Boolean(evaluateFormExpression(section.condition, evalContext));
@@ -28992,7 +28998,7 @@ var init_Form = __esm({
28992
28998
  eventBus.emit(`UI:${onCancel}`);
28993
28999
  }
28994
29000
  };
28995
- const renderField = React116__default.useCallback(
29001
+ const renderField = React115__default.useCallback(
28996
29002
  (field) => {
28997
29003
  const fieldName = field.name || field.field;
28998
29004
  if (!fieldName) return null;
@@ -29013,7 +29019,7 @@ var init_Form = __esm({
29013
29019
  [formData, isFieldVisible, relationsData, relationsLoading, isLoading]
29014
29020
  );
29015
29021
  const effectiveFields = entityDerivedFields ?? fields;
29016
- const normalizedFields = React116__default.useMemo(() => {
29022
+ const normalizedFields = React115__default.useMemo(() => {
29017
29023
  if (!effectiveFields || effectiveFields.length === 0) return [];
29018
29024
  return effectiveFields.map((field) => {
29019
29025
  if (typeof field === "string") {
@@ -29035,7 +29041,7 @@ var init_Form = __esm({
29035
29041
  return field;
29036
29042
  });
29037
29043
  }, [effectiveFields, resolvedEntity]);
29038
- const schemaFields = React116__default.useMemo(() => {
29044
+ const schemaFields = React115__default.useMemo(() => {
29039
29045
  if (normalizedFields.length === 0) return null;
29040
29046
  if (isDebugEnabled()) {
29041
29047
  debugGroup(`Form: ${entityName || "unknown"}`);
@@ -29045,7 +29051,7 @@ var init_Form = __esm({
29045
29051
  }
29046
29052
  return normalizedFields.map(renderField).filter(Boolean);
29047
29053
  }, [normalizedFields, renderField, entityName, conditionalFields]);
29048
- const sectionElements = React116__default.useMemo(() => {
29054
+ const sectionElements = React115__default.useMemo(() => {
29049
29055
  if (!sections || sections.length === 0) return null;
29050
29056
  return sections.map((section) => {
29051
29057
  if (!isSectionVisible(section)) {
@@ -30569,7 +30575,7 @@ var init_List = __esm({
30569
30575
  if (entity && typeof entity === "object" && "id" in entity) return [entity];
30570
30576
  return [];
30571
30577
  }, [entity]);
30572
- const getItemActions = React116__default.useCallback(
30578
+ const getItemActions = React115__default.useCallback(
30573
30579
  (item) => {
30574
30580
  if (!itemActions) return [];
30575
30581
  if (typeof itemActions === "function") {
@@ -31006,7 +31012,7 @@ var init_MediaGallery = __esm({
31006
31012
  [selectable, selectedItems, selectionEvent, eventBus]
31007
31013
  );
31008
31014
  const entityData = Array.isArray(entity) ? entity : [];
31009
- const items = React116__default.useMemo(() => {
31015
+ const items = React115__default.useMemo(() => {
31010
31016
  if (propItems) return propItems;
31011
31017
  if (entityData.length === 0) return [];
31012
31018
  return entityData.map((record, idx) => ({
@@ -31170,7 +31176,7 @@ var init_MediaGallery = __esm({
31170
31176
  }
31171
31177
  });
31172
31178
  function extractTitle2(children) {
31173
- if (!React116__default.isValidElement(children)) return void 0;
31179
+ if (!React115__default.isValidElement(children)) return void 0;
31174
31180
  const props = children.props;
31175
31181
  if (typeof props.title === "string") {
31176
31182
  return props.title;
@@ -31883,7 +31889,7 @@ var init_PageHeader = __esm({
31883
31889
  info: "bg-info/10 text-info"
31884
31890
  };
31885
31891
  return /* @__PURE__ */ jsxs(Box, { className: cn("mb-6", className), children: [
31886
- 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(React116__default.Fragment, { children: [
31892
+ 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(React115__default.Fragment, { children: [
31887
31893
  idx > 0 && /* @__PURE__ */ jsx(Typography, { variant: "small", color: "muted", children: "/" }),
31888
31894
  crumb.href ? /* @__PURE__ */ jsx(
31889
31895
  "a",
@@ -32057,7 +32063,7 @@ var init_debugRegistry = __esm({
32057
32063
  }
32058
32064
  });
32059
32065
  function useDebugData() {
32060
- const [data, setData] = React116.useState(() => ({
32066
+ const [data, setData] = React115.useState(() => ({
32061
32067
  traits: [],
32062
32068
  ticks: [],
32063
32069
  guards: [],
@@ -32071,7 +32077,7 @@ function useDebugData() {
32071
32077
  },
32072
32078
  lastUpdate: Date.now()
32073
32079
  }));
32074
- React116.useEffect(() => {
32080
+ React115.useEffect(() => {
32075
32081
  const updateData = () => {
32076
32082
  setData({
32077
32083
  traits: getAllTraits(),
@@ -32180,12 +32186,12 @@ function layoutGraph(states, transitions, initialState, width, height) {
32180
32186
  return positions;
32181
32187
  }
32182
32188
  function WalkMinimap() {
32183
- const [walkStep, setWalkStep] = React116.useState(null);
32184
- const [traits2, setTraits] = React116.useState([]);
32185
- const [coveredEdges, setCoveredEdges] = React116.useState([]);
32186
- const [completedTraits, setCompletedTraits] = React116.useState(/* @__PURE__ */ new Set());
32187
- const prevTraitRef = React116.useRef(null);
32188
- React116.useEffect(() => {
32189
+ const [walkStep, setWalkStep] = React115.useState(null);
32190
+ const [traits2, setTraits] = React115.useState([]);
32191
+ const [coveredEdges, setCoveredEdges] = React115.useState([]);
32192
+ const [completedTraits, setCompletedTraits] = React115.useState(/* @__PURE__ */ new Set());
32193
+ const prevTraitRef = React115.useRef(null);
32194
+ React115.useEffect(() => {
32189
32195
  const interval = setInterval(() => {
32190
32196
  const w = window;
32191
32197
  const step = w.__orbitalWalkStep;
@@ -32632,15 +32638,15 @@ var init_EntitiesTab = __esm({
32632
32638
  }
32633
32639
  });
32634
32640
  function EventFlowTab({ events: events2 }) {
32635
- const [filter, setFilter] = React116.useState("all");
32636
- const containerRef = React116.useRef(null);
32637
- const [autoScroll, setAutoScroll] = React116.useState(true);
32638
- React116.useEffect(() => {
32641
+ const [filter, setFilter] = React115.useState("all");
32642
+ const containerRef = React115.useRef(null);
32643
+ const [autoScroll, setAutoScroll] = React115.useState(true);
32644
+ React115.useEffect(() => {
32639
32645
  if (autoScroll && containerRef.current) {
32640
32646
  containerRef.current.scrollTop = containerRef.current.scrollHeight;
32641
32647
  }
32642
32648
  }, [events2.length, autoScroll]);
32643
- const filteredEvents = React116.useMemo(() => {
32649
+ const filteredEvents = React115.useMemo(() => {
32644
32650
  if (filter === "all") return events2;
32645
32651
  return events2.filter((e) => e.type === filter);
32646
32652
  }, [events2, filter]);
@@ -32759,7 +32765,7 @@ var init_EventFlowTab = __esm({
32759
32765
  }
32760
32766
  });
32761
32767
  function GuardsPanel({ guards }) {
32762
- const [filter, setFilter] = React116.useState("all");
32768
+ const [filter, setFilter] = React115.useState("all");
32763
32769
  if (guards.length === 0) {
32764
32770
  return /* @__PURE__ */ jsx(
32765
32771
  EmptyState,
@@ -32772,7 +32778,7 @@ function GuardsPanel({ guards }) {
32772
32778
  }
32773
32779
  const passedCount = guards.filter((g) => g.result).length;
32774
32780
  const failedCount = guards.length - passedCount;
32775
- const filteredGuards = React116.useMemo(() => {
32781
+ const filteredGuards = React115.useMemo(() => {
32776
32782
  if (filter === "all") return guards;
32777
32783
  if (filter === "passed") return guards.filter((g) => g.result);
32778
32784
  return guards.filter((g) => !g.result);
@@ -32933,10 +32939,10 @@ function EffectBadge({ effect }) {
32933
32939
  ] });
32934
32940
  }
32935
32941
  function TransitionTimeline({ transitions }) {
32936
- const containerRef = React116.useRef(null);
32937
- const [autoScroll, setAutoScroll] = React116.useState(true);
32938
- const [expandedId, setExpandedId] = React116.useState(null);
32939
- React116.useEffect(() => {
32942
+ const containerRef = React115.useRef(null);
32943
+ const [autoScroll, setAutoScroll] = React115.useState(true);
32944
+ const [expandedId, setExpandedId] = React115.useState(null);
32945
+ React115.useEffect(() => {
32940
32946
  if (autoScroll && containerRef.current) {
32941
32947
  containerRef.current.scrollTop = containerRef.current.scrollHeight;
32942
32948
  }
@@ -33222,9 +33228,9 @@ function getAllEvents(traits2) {
33222
33228
  }
33223
33229
  function EventDispatcherTab({ traits: traits2, schema }) {
33224
33230
  const eventBus = useEventBus();
33225
- const [log4, setLog] = React116.useState([]);
33226
- const prevStatesRef = React116.useRef(/* @__PURE__ */ new Map());
33227
- React116.useEffect(() => {
33231
+ const [log4, setLog] = React115.useState([]);
33232
+ const prevStatesRef = React115.useRef(/* @__PURE__ */ new Map());
33233
+ React115.useEffect(() => {
33228
33234
  for (const trait of traits2) {
33229
33235
  const prev = prevStatesRef.current.get(trait.id);
33230
33236
  if (prev && prev !== trait.currentState) {
@@ -33394,10 +33400,10 @@ function VerifyModePanel({
33394
33400
  serverCount,
33395
33401
  localCount
33396
33402
  }) {
33397
- const [expanded, setExpanded] = React116.useState(true);
33398
- const scrollRef = React116.useRef(null);
33399
- const prevCountRef = React116.useRef(0);
33400
- React116.useEffect(() => {
33403
+ const [expanded, setExpanded] = React115.useState(true);
33404
+ const scrollRef = React115.useRef(null);
33405
+ const prevCountRef = React115.useRef(0);
33406
+ React115.useEffect(() => {
33401
33407
  if (expanded && transitions.length > prevCountRef.current && scrollRef.current) {
33402
33408
  scrollRef.current.scrollTop = scrollRef.current.scrollHeight;
33403
33409
  }
@@ -33463,10 +33469,10 @@ function RuntimeDebugger({
33463
33469
  defaultTab,
33464
33470
  schema
33465
33471
  }) {
33466
- const [isCollapsed, setIsCollapsed] = React116.useState(mode === "verify" ? true : defaultCollapsed);
33467
- const [isVisible, setIsVisible] = React116.useState(mode === "inline" || mode === "verify" || isDebugEnabled2());
33472
+ const [isCollapsed, setIsCollapsed] = React115.useState(mode === "verify" ? true : defaultCollapsed);
33473
+ const [isVisible, setIsVisible] = React115.useState(mode === "inline" || mode === "verify" || isDebugEnabled2());
33468
33474
  const debugData = useDebugData();
33469
- React116.useEffect(() => {
33475
+ React115.useEffect(() => {
33470
33476
  if (mode === "inline") return;
33471
33477
  return onDebugToggle((enabled) => {
33472
33478
  setIsVisible(enabled);
@@ -33475,7 +33481,7 @@ function RuntimeDebugger({
33475
33481
  }
33476
33482
  });
33477
33483
  }, [mode]);
33478
- React116.useEffect(() => {
33484
+ React115.useEffect(() => {
33479
33485
  if (mode === "inline") return;
33480
33486
  const handleKeyDown = (e) => {
33481
33487
  if (e.key === "`" && isVisible) {
@@ -34024,7 +34030,7 @@ function SequenceBar({
34024
34030
  onSlotRemove(index);
34025
34031
  }, [onSlotRemove, playing]);
34026
34032
  const paddedSlots = Array.from({ length: maxSlots }, (_, i) => slots[i]);
34027
- return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(React116__default.Fragment, { children: [
34033
+ return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(React115__default.Fragment, { children: [
34028
34034
  i > 0 && /* @__PURE__ */ jsx(
34029
34035
  Typography,
34030
34036
  {
@@ -35369,7 +35375,7 @@ var init_StatCard2 = __esm({
35369
35375
  const labelToUse = propLabel ?? propTitle;
35370
35376
  const eventBus = useEventBus();
35371
35377
  const { t } = useTranslate();
35372
- const handleActionClick = React116__default.useCallback(() => {
35378
+ const handleActionClick = React115__default.useCallback(() => {
35373
35379
  if (action?.event) {
35374
35380
  eventBus.emit(`UI:${action.event}`, {});
35375
35381
  }
@@ -35380,7 +35386,7 @@ var init_StatCard2 = __esm({
35380
35386
  const data = Array.isArray(entity) ? entity : entity ? [entity] : [];
35381
35387
  const isLoading = externalLoading ?? false;
35382
35388
  const error = externalError;
35383
- const computeMetricValue = React116__default.useCallback(
35389
+ const computeMetricValue = React115__default.useCallback(
35384
35390
  (metric, items) => {
35385
35391
  if (metric.value !== void 0) {
35386
35392
  return metric.value;
@@ -35419,7 +35425,7 @@ var init_StatCard2 = __esm({
35419
35425
  },
35420
35426
  []
35421
35427
  );
35422
- const schemaStats = React116__default.useMemo(() => {
35428
+ const schemaStats = React115__default.useMemo(() => {
35423
35429
  if (!metrics || metrics.length === 0) return null;
35424
35430
  return metrics.map((metric) => ({
35425
35431
  label: metric.label,
@@ -35427,7 +35433,7 @@ var init_StatCard2 = __esm({
35427
35433
  format: metric.format
35428
35434
  }));
35429
35435
  }, [metrics, data, computeMetricValue]);
35430
- const calculatedTrend = React116__default.useMemo(() => {
35436
+ const calculatedTrend = React115__default.useMemo(() => {
35431
35437
  if (manualTrend !== void 0) return manualTrend;
35432
35438
  if (previousValue === void 0 || currentValue === void 0)
35433
35439
  return void 0;
@@ -36411,7 +36417,7 @@ var init_Timeline = __esm({
36411
36417
  }) => {
36412
36418
  const { t } = useTranslate();
36413
36419
  const entityData = Array.isArray(entity) ? entity : [];
36414
- const items = React116__default.useMemo(() => {
36420
+ const items = React115__default.useMemo(() => {
36415
36421
  if (propItems) return propItems;
36416
36422
  if (entityData.length === 0) return [];
36417
36423
  return entityData.map((record, idx) => {
@@ -36518,7 +36524,7 @@ var init_Timeline = __esm({
36518
36524
  }
36519
36525
  });
36520
36526
  function extractToastProps(children) {
36521
- if (!React116__default.isValidElement(children)) {
36527
+ if (!React115__default.isValidElement(children)) {
36522
36528
  if (typeof children === "string") {
36523
36529
  return { message: children };
36524
36530
  }
@@ -36556,7 +36562,7 @@ var init_ToastSlot = __esm({
36556
36562
  eventBus.emit("UI:CLOSE");
36557
36563
  };
36558
36564
  if (!isVisible) return null;
36559
- const isCustomContent = React116__default.isValidElement(children) && !message;
36565
+ const isCustomContent = React115__default.isValidElement(children) && !message;
36560
36566
  return /* @__PURE__ */ jsx(Box, { className: "fixed bottom-4 right-4 z-50", children: isCustomContent ? children : /* @__PURE__ */ jsx(
36561
36567
  Toast,
36562
36568
  {
@@ -36825,7 +36831,7 @@ var init_WizardContainer = __esm({
36825
36831
  const isCompleted = index < currentStep;
36826
36832
  const stepKey = step.id ?? step.tabId ?? `step-${index}`;
36827
36833
  const stepTitle = step.title ?? step.name ?? `Step ${index + 1}`;
36828
- return /* @__PURE__ */ jsxs(React116__default.Fragment, { children: [
36834
+ return /* @__PURE__ */ jsxs(React115__default.Fragment, { children: [
36829
36835
  /* @__PURE__ */ jsx(
36830
36836
  Button,
36831
36837
  {
@@ -37207,12 +37213,12 @@ var init_WorldMapTemplate = __esm({
37207
37213
  }
37208
37214
  });
37209
37215
  function lazyThree(name, loader) {
37210
- const Lazy = React116__default.lazy(() => loader().then((m) => ({ default: m[name] })));
37216
+ const Lazy = React115__default.lazy(() => loader().then((m) => ({ default: m[name] })));
37211
37217
  function ThreeWrapper(props) {
37212
- return React116__default.createElement(
37213
- React116__default.Suspense,
37218
+ return React115__default.createElement(
37219
+ React115__default.Suspense,
37214
37220
  { fallback: null },
37215
- React116__default.createElement(Lazy, props)
37221
+ React115__default.createElement(Lazy, props)
37216
37222
  );
37217
37223
  }
37218
37224
  ThreeWrapper.displayName = `Lazy(${name})`;
@@ -37700,7 +37706,7 @@ function SuspenseConfigProvider({
37700
37706
  config,
37701
37707
  children
37702
37708
  }) {
37703
- return React116__default.createElement(
37709
+ return React115__default.createElement(
37704
37710
  SuspenseConfigContext.Provider,
37705
37711
  { value: config },
37706
37712
  children
@@ -38183,7 +38189,7 @@ function renderPatternChildren(children, onDismiss, parentId = "root", parentPat
38183
38189
  const key = `${parentId}-${index}-trait:${traitName}`;
38184
38190
  return /* @__PURE__ */ jsx(TraitFrame, { traitName }, key);
38185
38191
  }
38186
- return /* @__PURE__ */ jsx(React116__default.Fragment, { children: child }, `${parentId}-${index}`);
38192
+ return /* @__PURE__ */ jsx(React115__default.Fragment, { children: child }, `${parentId}-${index}`);
38187
38193
  }
38188
38194
  if (!child || typeof child !== "object") return null;
38189
38195
  const childId = `${parentId}-${index}`;
@@ -38396,7 +38402,7 @@ var init_UISlotRenderer = __esm({
38396
38402
  init_Box();
38397
38403
  init_Typography();
38398
38404
  init_useEventBus();
38399
- init_SlotsContext();
38405
+ init_slot_types();
38400
38406
  init_cn();
38401
38407
  init_ErrorBoundary();
38402
38408
  init_logger();
@@ -38934,7 +38940,7 @@ function OrbitalProvider({
38934
38940
  }
38935
38941
  OrbitalProvider.displayName = "OrbitalProvider";
38936
38942
  var TraitScopeContext = createContext(null);
38937
- function TraitScopeProvider2({
38943
+ function TraitScopeProvider3({
38938
38944
  orbital,
38939
38945
  trait,
38940
38946
  children
@@ -38978,4 +38984,4 @@ function useOptionalOfflineMode() {
38978
38984
  return useContext(OfflineModeContext);
38979
38985
  }
38980
38986
 
38981
- export { EventBusContext2 as EventBusContext, EventBusProvider, OfflineModeProvider, OrbitalProvider, SelectionContext, SelectionProvider, TraitScopeProvider2 as TraitScopeProvider, VerificationProvider, useOfflineMode, useOptionalOfflineMode, useSelection, useSelectionOptional, useTraitScope2 as useTraitScope };
38987
+ export { EventBusContext2 as EventBusContext, EventBusProvider, OfflineModeProvider, OrbitalProvider, SelectionContext, SelectionProvider, TraitScopeProvider3 as TraitScopeProvider, VerificationProvider, useOfflineMode, useOptionalOfflineMode, useSelection, useSelectionOptional, useTraitScope2 as useTraitScope };