@almadar/ui 2.27.2 → 2.27.4

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.
Files changed (34) hide show
  1. package/dist/components/atoms/flow/FlowLabel.d.ts +23 -0
  2. package/dist/components/atoms/flow/FlowMinimap.d.ts +28 -0
  3. package/dist/components/atoms/flow/FlowNodeShell.d.ts +25 -0
  4. package/dist/components/atoms/flow/FlowPort.d.ts +26 -0
  5. package/dist/components/atoms/flow/FlowWire.d.ts +39 -0
  6. package/dist/components/atoms/flow/index.d.ts +13 -0
  7. package/dist/components/atoms/index.d.ts +1 -0
  8. package/dist/components/index.cjs +1745 -1018
  9. package/dist/components/index.js +854 -142
  10. package/dist/components/molecules/avl/AvlBehaviorGlyph.d.ts +61 -0
  11. package/dist/components/molecules/avl/index.d.ts +1 -0
  12. package/dist/components/molecules/flow/BehaviorNode.d.ts +28 -0
  13. package/dist/components/molecules/flow/EffectNode.d.ts +26 -0
  14. package/dist/components/molecules/flow/EventWireEdge.d.ts +23 -0
  15. package/dist/components/molecules/flow/ExprNode.d.ts +27 -0
  16. package/dist/components/molecules/flow/FlowStateNode.d.ts +18 -0
  17. package/dist/components/molecules/flow/NodePalette.d.ts +36 -0
  18. package/dist/components/molecules/flow/OrbitalNode.d.ts +31 -0
  19. package/dist/components/molecules/flow/TransitionEdge.d.ts +26 -0
  20. package/dist/components/molecules/flow/index.d.ts +8 -0
  21. package/dist/components/molecules/index.d.ts +1 -0
  22. package/dist/docs/index.cjs +1 -1
  23. package/dist/docs/index.js +1 -1
  24. package/dist/flow/index.cjs +3832 -0
  25. package/dist/flow/index.d.cts +367 -0
  26. package/dist/flow/index.d.ts +10 -0
  27. package/dist/flow/index.js +3793 -0
  28. package/dist/marketing/index.cjs +1 -1
  29. package/dist/marketing/index.js +1 -1
  30. package/dist/providers/index.cjs +146 -144
  31. package/dist/providers/index.js +44 -42
  32. package/dist/runtime/index.cjs +977 -920
  33. package/dist/runtime/index.js +203 -146
  34. package/package.json +7 -1
@@ -1,5 +1,5 @@
1
- import * as React90 from 'react';
2
- import React90__default, { useCallback, createContext, useState, useRef, useEffect, useLayoutEffect, lazy, useContext, useMemo, useId, Suspense, useSyncExternalStore } from 'react';
1
+ import * as React91 from 'react';
2
+ import React91__default, { useCallback, createContext, useState, useRef, useEffect, useLayoutEffect, lazy, useContext, useMemo, useId, Suspense, useSyncExternalStore } from 'react';
3
3
  import { clsx } from 'clsx';
4
4
  import { twMerge } from 'tailwind-merge';
5
5
  import * as LucideIcons from 'lucide-react';
@@ -17,6 +17,7 @@ import dark from 'react-syntax-highlighter/dist/esm/styles/prism/vsc-dark-plus';
17
17
  import { MapContainer, TileLayer, Marker, Popup, useMap } from 'react-leaflet';
18
18
  import L from 'leaflet';
19
19
  import 'leaflet/dist/leaflet.css';
20
+ import { Handle, Position, getBezierPath, BaseEdge, EdgeLabelRenderer } from '@xyflow/react';
20
21
  import { useUISlots } from '@almadar/ui/context';
21
22
  import { getComponentForPattern as getComponentForPattern$1 } from '@almadar/patterns';
22
23
  import { Link, Outlet, useLocation } from 'react-router-dom';
@@ -216,7 +217,7 @@ var variantStyles = {
216
217
  ghost: [
217
218
  "bg-transparent text-muted-foreground",
218
219
  "border border-transparent",
219
- "hover:text-foreground hover:bg-muted hover:border-border",
220
+ "hover:text-primary-foreground hover:bg-primary hover:border-primary",
220
221
  "active:scale-[var(--active-scale)]"
221
222
  ].join(" "),
222
223
  danger: [
@@ -269,7 +270,7 @@ function resolveIconProp(value, sizeClass) {
269
270
  const IconComp = value;
270
271
  return /* @__PURE__ */ jsx(IconComp, { className: sizeClass });
271
272
  }
272
- if (React90__default.isValidElement(value)) {
273
+ if (React91__default.isValidElement(value)) {
273
274
  return value;
274
275
  }
275
276
  if (typeof value === "object" && value !== null && "render" in value) {
@@ -278,7 +279,7 @@ function resolveIconProp(value, sizeClass) {
278
279
  }
279
280
  return value;
280
281
  }
281
- var Button = React90__default.forwardRef(
282
+ var Button = React91__default.forwardRef(
282
283
  ({
283
284
  className,
284
285
  variant = "primary",
@@ -337,7 +338,7 @@ var Button = React90__default.forwardRef(
337
338
  }
338
339
  );
339
340
  Button.displayName = "Button";
340
- var Input = React90__default.forwardRef(
341
+ var Input = React91__default.forwardRef(
341
342
  ({
342
343
  className,
343
344
  inputType,
@@ -449,7 +450,7 @@ var Input = React90__default.forwardRef(
449
450
  }
450
451
  );
451
452
  Input.displayName = "Input";
452
- var Label = React90__default.forwardRef(
453
+ var Label = React91__default.forwardRef(
453
454
  ({ className, required, children, ...props }, ref) => {
454
455
  return /* @__PURE__ */ jsxs(
455
456
  "label",
@@ -469,7 +470,7 @@ var Label = React90__default.forwardRef(
469
470
  }
470
471
  );
471
472
  Label.displayName = "Label";
472
- var Textarea = React90__default.forwardRef(
473
+ var Textarea = React91__default.forwardRef(
473
474
  ({ className, error, ...props }, ref) => {
474
475
  return /* @__PURE__ */ jsx(
475
476
  "textarea",
@@ -492,7 +493,7 @@ var Textarea = React90__default.forwardRef(
492
493
  }
493
494
  );
494
495
  Textarea.displayName = "Textarea";
495
- var Select = React90__default.forwardRef(
496
+ var Select = React91__default.forwardRef(
496
497
  ({ className, options, placeholder, error, ...props }, ref) => {
497
498
  return /* @__PURE__ */ jsxs("div", { className: "relative", children: [
498
499
  /* @__PURE__ */ jsxs(
@@ -528,7 +529,7 @@ var Select = React90__default.forwardRef(
528
529
  }
529
530
  );
530
531
  Select.displayName = "Select";
531
- var Checkbox = React90__default.forwardRef(
532
+ var Checkbox = React91__default.forwardRef(
532
533
  ({ className, label, id, ...props }, ref) => {
533
534
  const inputId = id || `checkbox-${Math.random().toString(36).substr(2, 9)}`;
534
535
  return /* @__PURE__ */ jsxs("div", { className: "flex items-center", children: [
@@ -604,7 +605,7 @@ var shadowStyles = {
604
605
  md: "shadow",
605
606
  lg: "shadow-lg"
606
607
  };
607
- var Card = React90__default.forwardRef(
608
+ var Card = React91__default.forwardRef(
608
609
  ({
609
610
  className,
610
611
  variant = "bordered",
@@ -640,9 +641,9 @@ var Card = React90__default.forwardRef(
640
641
  }
641
642
  );
642
643
  Card.displayName = "Card";
643
- var CardHeader = React90__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("mb-4", className), ...props }));
644
+ var CardHeader = React91__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("mb-4", className), ...props }));
644
645
  CardHeader.displayName = "CardHeader";
645
- var CardTitle = React90__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
646
+ var CardTitle = React91__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
646
647
  "h3",
647
648
  {
648
649
  ref,
@@ -655,11 +656,11 @@ var CardTitle = React90__default.forwardRef(({ className, ...props }, ref) => /*
655
656
  }
656
657
  ));
657
658
  CardTitle.displayName = "CardTitle";
658
- var CardContent = React90__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("", className), ...props }));
659
+ var CardContent = React91__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("", className), ...props }));
659
660
  CardContent.displayName = "CardContent";
660
661
  var CardBody = CardContent;
661
662
  CardBody.displayName = "CardBody";
662
- var CardFooter = React90__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
663
+ var CardFooter = React91__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
663
664
  "div",
664
665
  {
665
666
  ref,
@@ -705,7 +706,7 @@ var sizeStyles2 = {
705
706
  md: "px-2.5 py-1 text-sm",
706
707
  lg: "px-3 py-1.5 text-base"
707
708
  };
708
- var Badge = React90__default.forwardRef(
709
+ var Badge = React91__default.forwardRef(
709
710
  ({ className, variant = "default", size = "sm", amount, label, icon, children, ...props }, ref) => {
710
711
  const iconSizes2 = { sm: "w-3 h-3", md: "w-3.5 h-3.5", lg: "w-4 h-4" };
711
712
  const resolvedIcon = typeof icon === "string" ? (() => {
@@ -738,7 +739,7 @@ var sizeStyles3 = {
738
739
  md: "h-6 w-6",
739
740
  lg: "h-8 w-8"
740
741
  };
741
- var Spinner = React90__default.forwardRef(
742
+ var Spinner = React91__default.forwardRef(
742
743
  ({ className, size = "md", ...props }, ref) => {
743
744
  return /* @__PURE__ */ jsx(
744
745
  "div",
@@ -1003,7 +1004,7 @@ var positionStyles = {
1003
1004
  fixed: "fixed",
1004
1005
  sticky: "sticky"
1005
1006
  };
1006
- var Box = React90__default.forwardRef(
1007
+ var Box = React91__default.forwardRef(
1007
1008
  ({
1008
1009
  padding,
1009
1010
  paddingX,
@@ -1350,7 +1351,7 @@ var ProgressBar = ({
1350
1351
  return null;
1351
1352
  };
1352
1353
  ProgressBar.displayName = "ProgressBar";
1353
- var Radio = React90__default.forwardRef(
1354
+ var Radio = React91__default.forwardRef(
1354
1355
  ({
1355
1356
  label,
1356
1357
  helperText,
@@ -1454,7 +1455,7 @@ var Radio = React90__default.forwardRef(
1454
1455
  }
1455
1456
  );
1456
1457
  Radio.displayName = "Radio";
1457
- var Switch = React90.forwardRef(
1458
+ var Switch = React91.forwardRef(
1458
1459
  ({
1459
1460
  checked,
1460
1461
  defaultChecked = false,
@@ -1465,10 +1466,10 @@ var Switch = React90.forwardRef(
1465
1466
  name,
1466
1467
  className
1467
1468
  }, ref) => {
1468
- const [isChecked, setIsChecked] = React90.useState(
1469
+ const [isChecked, setIsChecked] = React91.useState(
1469
1470
  checked !== void 0 ? checked : defaultChecked
1470
1471
  );
1471
- React90.useEffect(() => {
1472
+ React91.useEffect(() => {
1472
1473
  if (checked !== void 0) {
1473
1474
  setIsChecked(checked);
1474
1475
  }
@@ -1774,7 +1775,7 @@ var Typography = ({
1774
1775
  align,
1775
1776
  weight,
1776
1777
  size,
1777
- truncate = false,
1778
+ truncate: truncate2 = false,
1778
1779
  overflow,
1779
1780
  as,
1780
1781
  id,
@@ -1796,7 +1797,7 @@ var Typography = ({
1796
1797
  weight && weightStyles[weight],
1797
1798
  size && typographySizeStyles[size],
1798
1799
  align && `text-${align}`,
1799
- truncate && "truncate overflow-hidden text-ellipsis",
1800
+ truncate2 && "truncate overflow-hidden text-ellipsis",
1800
1801
  overflow && overflowStyles2[overflow],
1801
1802
  className
1802
1803
  ),
@@ -2262,8 +2263,8 @@ var LawReferenceTooltip = ({
2262
2263
  position = "top",
2263
2264
  className
2264
2265
  }) => {
2265
- const [isVisible, setIsVisible] = React90__default.useState(false);
2266
- const timeoutRef = React90__default.useRef(null);
2266
+ const [isVisible, setIsVisible] = React91__default.useState(false);
2267
+ const timeoutRef = React91__default.useRef(null);
2267
2268
  const handleMouseEnter = () => {
2268
2269
  if (timeoutRef.current) clearTimeout(timeoutRef.current);
2269
2270
  timeoutRef.current = setTimeout(() => setIsVisible(true), 200);
@@ -2272,7 +2273,7 @@ var LawReferenceTooltip = ({
2272
2273
  if (timeoutRef.current) clearTimeout(timeoutRef.current);
2273
2274
  setIsVisible(false);
2274
2275
  };
2275
- React90__default.useEffect(() => {
2276
+ React91__default.useEffect(() => {
2276
2277
  return () => {
2277
2278
  if (timeoutRef.current) clearTimeout(timeoutRef.current);
2278
2279
  };
@@ -2460,7 +2461,7 @@ var sizeStyles5 = {
2460
2461
  md: "w-2.5 h-2.5",
2461
2462
  lg: "w-3 h-3"
2462
2463
  };
2463
- var StatusDot = React90__default.forwardRef(
2464
+ var StatusDot = React91__default.forwardRef(
2464
2465
  ({ className, status = "offline", pulse = false, size = "md", label, ...props }, ref) => {
2465
2466
  return /* @__PURE__ */ jsx(
2466
2467
  "span",
@@ -2507,7 +2508,7 @@ var iconMap = {
2507
2508
  down: TrendingDown,
2508
2509
  flat: ArrowRight
2509
2510
  };
2510
- var TrendIndicator = React90__default.forwardRef(
2511
+ var TrendIndicator = React91__default.forwardRef(
2511
2512
  ({
2512
2513
  className,
2513
2514
  value,
@@ -2566,7 +2567,7 @@ var thumbSizes = {
2566
2567
  md: "w-4 h-4",
2567
2568
  lg: "w-5 h-5"
2568
2569
  };
2569
- var RangeSlider = React90__default.forwardRef(
2570
+ var RangeSlider = React91__default.forwardRef(
2570
2571
  ({
2571
2572
  className,
2572
2573
  min = 0,
@@ -3098,7 +3099,7 @@ var paddingClasses = {
3098
3099
  md: "py-16",
3099
3100
  lg: "py-24"
3100
3101
  };
3101
- var ContentSection = React90__default.forwardRef(
3102
+ var ContentSection = React91__default.forwardRef(
3102
3103
  ({ children, background = "default", padding = "lg", id, className }, ref) => {
3103
3104
  return /* @__PURE__ */ jsx(
3104
3105
  Box,
@@ -3619,7 +3620,7 @@ var animatedStyles = {
3619
3620
  "scale-up": { opacity: 1, transform: "scale(1) translateY(0)" },
3620
3621
  "none": {}
3621
3622
  };
3622
- var AnimatedReveal = React90__default.forwardRef(
3623
+ var AnimatedReveal = React91__default.forwardRef(
3623
3624
  ({
3624
3625
  trigger = "scroll",
3625
3626
  animation = "fade-up",
@@ -3772,7 +3773,7 @@ function applyMorphAnimation(container, animate, duration, delay, easing) {
3772
3773
  el.style.opacity = animate ? "1" : "0";
3773
3774
  });
3774
3775
  }
3775
- var AnimatedGraphic = React90__default.forwardRef(
3776
+ var AnimatedGraphic = React91__default.forwardRef(
3776
3777
  ({
3777
3778
  src,
3778
3779
  svgContent,
@@ -3795,7 +3796,7 @@ var AnimatedGraphic = React90__default.forwardRef(
3795
3796
  const fetchedSvg = useFetchedSvg(svgContent ? void 0 : src);
3796
3797
  const resolvedSvg = svgContent ?? fetchedSvg;
3797
3798
  const prevAnimateRef = useRef(animate);
3798
- const setRef = React90__default.useCallback(
3799
+ const setRef = React91__default.useCallback(
3799
3800
  (node) => {
3800
3801
  containerRef.current = node;
3801
3802
  if (typeof ref === "function") ref(node);
@@ -3966,9 +3967,9 @@ function ScoreDisplay({
3966
3967
  ...rest
3967
3968
  }) {
3968
3969
  const resolvedValue = typeof value === "number" && !Number.isNaN(value) ? value : typeof rest.score === "number" && !Number.isNaN(rest.score) ? rest.score : 0;
3969
- const [displayValue, setDisplayValue] = React90.useState(resolvedValue);
3970
- const [isAnimating, setIsAnimating] = React90.useState(false);
3971
- React90.useEffect(() => {
3970
+ const [displayValue, setDisplayValue] = React91.useState(resolvedValue);
3971
+ const [isAnimating, setIsAnimating] = React91.useState(false);
3972
+ React91.useEffect(() => {
3972
3973
  if (!animated || displayValue === resolvedValue) {
3973
3974
  setDisplayValue(resolvedValue);
3974
3975
  return;
@@ -4041,9 +4042,9 @@ function ControlButton({
4041
4042
  className
4042
4043
  }) {
4043
4044
  const eventBus = useEventBus();
4044
- const [isPressed, setIsPressed] = React90.useState(false);
4045
+ const [isPressed, setIsPressed] = React91.useState(false);
4045
4046
  const actualPressed = pressed ?? isPressed;
4046
- const handlePointerDown = React90.useCallback(
4047
+ const handlePointerDown = React91.useCallback(
4047
4048
  (e) => {
4048
4049
  e.preventDefault();
4049
4050
  if (disabled) return;
@@ -4053,7 +4054,7 @@ function ControlButton({
4053
4054
  },
4054
4055
  [disabled, pressEvent, eventBus, onPress]
4055
4056
  );
4056
- const handlePointerUp = React90.useCallback(
4057
+ const handlePointerUp = React91.useCallback(
4057
4058
  (e) => {
4058
4059
  e.preventDefault();
4059
4060
  if (disabled) return;
@@ -4063,7 +4064,7 @@ function ControlButton({
4063
4064
  },
4064
4065
  [disabled, releaseEvent, eventBus, onRelease]
4065
4066
  );
4066
- const handlePointerLeave = React90.useCallback(
4067
+ const handlePointerLeave = React91.useCallback(
4067
4068
  (e) => {
4068
4069
  if (isPressed) {
4069
4070
  setIsPressed(false);
@@ -4889,9 +4890,9 @@ function MiniMap({
4889
4890
  viewportRect,
4890
4891
  className
4891
4892
  }) {
4892
- const canvasRef = React90.useRef(null);
4893
- const frameRef = React90.useRef(0);
4894
- React90.useEffect(() => {
4893
+ const canvasRef = React91.useRef(null);
4894
+ const frameRef = React91.useRef(0);
4895
+ React91.useEffect(() => {
4895
4896
  const canvas = canvasRef.current;
4896
4897
  if (!canvas) return;
4897
4898
  const ctx = canvas.getContext("2d");
@@ -4966,6 +4967,225 @@ function MiniMap({
4966
4967
  );
4967
4968
  }
4968
4969
  MiniMap.displayName = "MiniMap";
4970
+ var FlowPort = ({
4971
+ direction,
4972
+ portType,
4973
+ label,
4974
+ connected = false,
4975
+ compatible = false,
4976
+ className
4977
+ }) => {
4978
+ const dot = /* @__PURE__ */ jsx(
4979
+ Box,
4980
+ {
4981
+ className: cn(
4982
+ "w-3 h-3 rounded-full shrink-0 transition-all duration-150",
4983
+ connected ? "bg-primary" : "bg-transparent border-[length:var(--border-width)] border-muted-foreground",
4984
+ compatible && "ring-2 ring-success ring-offset-1 ring-offset-background",
4985
+ className
4986
+ ),
4987
+ role: "presentation",
4988
+ "aria-label": `${direction} port: ${portType}`
4989
+ }
4990
+ );
4991
+ if (!label) return dot;
4992
+ return /* @__PURE__ */ jsxs(HStack, { gap: "xs", align: "center", className: cn(direction === "in" ? "flex-row-reverse" : "flex-row"), children: [
4993
+ dot,
4994
+ /* @__PURE__ */ jsx(Typography, { variant: "caption", className: "text-muted-foreground select-none whitespace-nowrap", children: label })
4995
+ ] });
4996
+ };
4997
+ FlowPort.displayName = "FlowPort";
4998
+ var FlowNodeShell = ({
4999
+ selected = false,
5000
+ warning = false,
5001
+ nodeType,
5002
+ headerColor = "var(--color-primary)",
5003
+ children,
5004
+ className
5005
+ }) => /* @__PURE__ */ jsxs(
5006
+ Box,
5007
+ {
5008
+ className: cn(
5009
+ "rounded-md overflow-hidden bg-card",
5010
+ "border-[length:var(--border-width)] border-border",
5011
+ "shadow-sm transition-shadow duration-150 min-w-[140px]",
5012
+ selected && "ring-2 ring-primary",
5013
+ warning && !selected && "ring-2 ring-dashed ring-warning",
5014
+ className
5015
+ ),
5016
+ children: [
5017
+ /* @__PURE__ */ jsx(
5018
+ Box,
5019
+ {
5020
+ className: "flex items-center px-2",
5021
+ style: { backgroundColor: headerColor, height: 8 },
5022
+ children: nodeType && /* @__PURE__ */ jsx(
5023
+ Typography,
5024
+ {
5025
+ variant: "caption",
5026
+ className: "text-white/90 font-semibold select-none leading-none sr-only",
5027
+ children: nodeType
5028
+ }
5029
+ )
5030
+ }
5031
+ ),
5032
+ nodeType && /* @__PURE__ */ jsx(Box, { className: "px-2 pt-1.5 pb-0.5", children: /* @__PURE__ */ jsx(Typography, { variant: "caption", className: "text-muted-foreground font-semibold uppercase tracking-wider select-none", children: nodeType }) }),
5033
+ /* @__PURE__ */ jsx(Box, { className: "px-2 pb-2", children })
5034
+ ]
5035
+ }
5036
+ );
5037
+ FlowNodeShell.displayName = "FlowNodeShell";
5038
+ var variantToBadge = {
5039
+ default: "neutral",
5040
+ primary: "primary",
5041
+ warning: "warning",
5042
+ error: "danger"
5043
+ };
5044
+ var FlowLabel = ({
5045
+ text,
5046
+ truncate: truncate2,
5047
+ variant = "default",
5048
+ className
5049
+ }) => {
5050
+ const isTruncated = truncate2 != null && text.length > truncate2;
5051
+ const display = isTruncated ? `${text.slice(0, truncate2)}...` : text;
5052
+ return /* @__PURE__ */ jsx(
5053
+ Badge,
5054
+ {
5055
+ variant: variantToBadge[variant],
5056
+ size: "sm",
5057
+ className: cn("max-w-[180px] cursor-default", className),
5058
+ title: isTruncated ? text : void 0,
5059
+ children: display
5060
+ }
5061
+ );
5062
+ };
5063
+ FlowLabel.displayName = "FlowLabel";
5064
+
5065
+ // components/atoms/avl/types.ts
5066
+ var AVL_OPERATOR_COLORS = {
5067
+ arithmetic: "#4A90D9",
5068
+ comparison: "#E8913A",
5069
+ logic: "#9B59B6",
5070
+ string: "#27AE60",
5071
+ collection: "#1ABC9C",
5072
+ time: "#F39C12",
5073
+ control: "#E74C3C",
5074
+ async: "#E91E8F"
5075
+ };
5076
+ var STATE_COLORS = {
5077
+ initial: { fill: "#22C55E1F", border: "#16A34A" },
5078
+ terminal: { fill: "#EF44441F", border: "#DC2626" },
5079
+ hub: { fill: "#3B82F61F", border: "#2563EB" },
5080
+ error: { fill: "#F59E0B1F", border: "#D97706" },
5081
+ default: { fill: "#6B72801F", border: "#4B5563" }
5082
+ };
5083
+ var EFFECT_CATEGORY_COLORS = {
5084
+ ui: { color: "#8B5CF6", bg: "#8B5CF614" },
5085
+ data: { color: "#3B82F6", bg: "#3B82F614" },
5086
+ communication: { color: "#F97316", bg: "#F9731614" },
5087
+ lifecycle: { color: "#10B981", bg: "#10B98114" },
5088
+ control: { color: "#6B7280", bg: "#6B728014" }
5089
+ };
5090
+ var EFFECT_TYPE_TO_CATEGORY = {
5091
+ "render-ui": "ui",
5092
+ "navigate": "ui",
5093
+ "set": "data",
5094
+ "persist": "data",
5095
+ "fetch": "data",
5096
+ "emit": "communication",
5097
+ "notify": "communication",
5098
+ "call-service": "communication",
5099
+ "spawn": "lifecycle",
5100
+ "despawn": "lifecycle",
5101
+ "do": "control",
5102
+ "if": "control",
5103
+ "log": "control"
5104
+ };
5105
+ var CONNECTION_COLORS = {
5106
+ forward: { color: "#1E293B", width: 2, dash: "none" },
5107
+ backward: { color: "#94A3B8", width: 1.5, dash: "6 3" },
5108
+ emitListen: { color: "#F97316", width: 1.5, dash: "4 3" }
5109
+ };
5110
+ var wireTypeToColor = {
5111
+ transition: CONNECTION_COLORS.forward.color,
5112
+ event: CONNECTION_COLORS.emitListen.color,
5113
+ data: "#3B82F6",
5114
+ guard: "#9B59B6"
5115
+ };
5116
+ var wireTypeToWidth = {
5117
+ transition: CONNECTION_COLORS.forward.width,
5118
+ event: CONNECTION_COLORS.emitListen.width,
5119
+ data: 1.5,
5120
+ guard: 1.5
5121
+ };
5122
+ var wireTypeToDash = {
5123
+ transition: void 0,
5124
+ event: CONNECTION_COLORS.emitListen.dash,
5125
+ data: "5 3",
5126
+ guard: "3 3"
5127
+ };
5128
+ function getFlowWireStyle(props) {
5129
+ const { wireType = "transition", status = "valid", animated = false } = props;
5130
+ let stroke = wireTypeToColor[wireType];
5131
+ if (status === "invalid") {
5132
+ stroke = "var(--color-destructive, #EF4444)";
5133
+ }
5134
+ const strokeWidth = wireTypeToWidth[wireType];
5135
+ let strokeDasharray = wireTypeToDash[wireType];
5136
+ if (status === "pending") {
5137
+ strokeDasharray = "6 4";
5138
+ }
5139
+ const animation = animated || status === "pending" ? "flow-wire-dash 1s linear infinite" : void 0;
5140
+ return { stroke, strokeWidth, strokeDasharray, animation };
5141
+ }
5142
+ var FlowWire = ({
5143
+ wireType = "transition",
5144
+ status = "valid",
5145
+ animated = false,
5146
+ d,
5147
+ className
5148
+ }) => {
5149
+ const style = getFlowWireStyle({ wireType, status, animated });
5150
+ return /* @__PURE__ */ jsx(
5151
+ "path",
5152
+ {
5153
+ d,
5154
+ fill: "none",
5155
+ stroke: style.stroke,
5156
+ strokeWidth: style.strokeWidth,
5157
+ strokeDasharray: style.strokeDasharray,
5158
+ className: cn(
5159
+ "transition-colors duration-150",
5160
+ (animated || status === "pending") && "animate-[flow-wire-dash_1s_linear_infinite]",
5161
+ className
5162
+ ),
5163
+ style: style.animation ? { animation: style.animation } : void 0
5164
+ }
5165
+ );
5166
+ };
5167
+ FlowWire.displayName = "FlowWire";
5168
+ var MINIMAP_COLORS = {
5169
+ nodeColor: "var(--color-primary, #3B82F6)",
5170
+ maskColor: "var(--color-background, #ffffff80)",
5171
+ nodeStrokeColor: "var(--color-border, #E5E7EB)"
5172
+ };
5173
+ var FlowMinimap = ({
5174
+ className,
5175
+ children
5176
+ }) => /* @__PURE__ */ jsx(
5177
+ Box,
5178
+ {
5179
+ className: cn(
5180
+ "rounded-md overflow-hidden",
5181
+ "bg-card border-[length:var(--border-width)] border-border",
5182
+ "shadow-sm",
5183
+ className
5184
+ ),
5185
+ children
5186
+ }
5187
+ );
5188
+ FlowMinimap.displayName = "FlowMinimap";
4969
5189
 
4970
5190
  // locales/en.json
4971
5191
  var en_default = {
@@ -5132,7 +5352,7 @@ var ErrorState = ({
5132
5352
  );
5133
5353
  };
5134
5354
  ErrorState.displayName = "ErrorState";
5135
- var ErrorBoundary = class extends React90__default.Component {
5355
+ var ErrorBoundary = class extends React91__default.Component {
5136
5356
  constructor(props) {
5137
5357
  super(props);
5138
5358
  __publicField(this, "reset", () => {
@@ -6868,8 +7088,8 @@ var Menu = ({
6868
7088
  "bottom-start": "top-full left-0 mt-2",
6869
7089
  "bottom-end": "top-full right-0 mt-2"
6870
7090
  };
6871
- const triggerChild = React90__default.isValidElement(trigger) ? trigger : /* @__PURE__ */ jsx("span", { children: trigger });
6872
- const triggerElement = React90__default.cloneElement(
7091
+ const triggerChild = React91__default.isValidElement(trigger) ? trigger : /* @__PURE__ */ jsx("span", { children: trigger });
7092
+ const triggerElement = React91__default.cloneElement(
6873
7093
  triggerChild,
6874
7094
  {
6875
7095
  ref: triggerRef,
@@ -7374,8 +7594,8 @@ var Popover = ({
7374
7594
  onMouseEnter: handleOpen,
7375
7595
  onMouseLeave: handleClose
7376
7596
  };
7377
- const childElement = React90__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
7378
- const triggerElement = React90__default.cloneElement(
7597
+ const childElement = React91__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
7598
+ const triggerElement = React91__default.cloneElement(
7379
7599
  childElement,
7380
7600
  {
7381
7601
  ref: triggerRef,
@@ -8130,8 +8350,8 @@ var Tooltip = ({
8130
8350
  if (hideTimeoutRef.current) clearTimeout(hideTimeoutRef.current);
8131
8351
  };
8132
8352
  }, []);
8133
- const triggerElement = React90__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
8134
- const trigger = React90__default.cloneElement(triggerElement, {
8353
+ const triggerElement = React91__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
8354
+ const trigger = React91__default.cloneElement(triggerElement, {
8135
8355
  ref: triggerRef,
8136
8356
  onMouseEnter: handleMouseEnter,
8137
8357
  onMouseLeave: handleMouseLeave,
@@ -8380,7 +8600,7 @@ var WizardProgress = ({
8380
8600
  children: /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: steps.map((step, index) => {
8381
8601
  const isActive = index === currentStep;
8382
8602
  const isCompleted = index < currentStep;
8383
- return /* @__PURE__ */ jsxs(React90__default.Fragment, { children: [
8603
+ return /* @__PURE__ */ jsxs(React91__default.Fragment, { children: [
8384
8604
  /* @__PURE__ */ jsx(
8385
8605
  "button",
8386
8606
  {
@@ -8510,7 +8730,7 @@ var WizardNavigation = ({
8510
8730
  );
8511
8731
  };
8512
8732
  WizardNavigation.displayName = "WizardNavigation";
8513
- var MarkdownContent = React90__default.memo(
8733
+ var MarkdownContent = React91__default.memo(
8514
8734
  ({ content, direction, className }) => {
8515
8735
  const { t: _t } = useTranslate();
8516
8736
  const safeContent = typeof content === "string" ? content : String(content ?? "");
@@ -8612,7 +8832,7 @@ var MarkdownContent = React90__default.memo(
8612
8832
  (prev, next) => prev.content === next.content && prev.className === next.className && prev.direction === next.direction
8613
8833
  );
8614
8834
  MarkdownContent.displayName = "MarkdownContent";
8615
- var CodeBlock = React90__default.memo(
8835
+ var CodeBlock = React91__default.memo(
8616
8836
  ({
8617
8837
  code: rawCode,
8618
8838
  language = "text",
@@ -9733,8 +9953,8 @@ function DPad({
9733
9953
  }) {
9734
9954
  const eventBus = useEventBus();
9735
9955
  const sizes = sizeMap15[size];
9736
- const [activeDirections, setActiveDirections] = React90.useState(/* @__PURE__ */ new Set());
9737
- const handlePress = React90.useCallback(
9956
+ const [activeDirections, setActiveDirections] = React91.useState(/* @__PURE__ */ new Set());
9957
+ const handlePress = React91.useCallback(
9738
9958
  (direction) => {
9739
9959
  setActiveDirections((prev) => new Set(prev).add(direction));
9740
9960
  if (directionEvent) eventBus.emit(`UI:${directionEvent}`, { direction, pressed: true });
@@ -9742,7 +9962,7 @@ function DPad({
9742
9962
  },
9743
9963
  [directionEvent, eventBus, onDirection]
9744
9964
  );
9745
- const handleRelease = React90.useCallback(
9965
+ const handleRelease = React91.useCallback(
9746
9966
  (direction) => {
9747
9967
  setActiveDirections((prev) => {
9748
9968
  const next = new Set(prev);
@@ -9800,8 +10020,8 @@ function ActionButtons({
9800
10020
  disabled
9801
10021
  }) {
9802
10022
  const eventBus = useEventBus();
9803
- const [activeButtons, setActiveButtons] = React90.useState(/* @__PURE__ */ new Set());
9804
- const handlePress = React90.useCallback(
10023
+ const [activeButtons, setActiveButtons] = React91.useState(/* @__PURE__ */ new Set());
10024
+ const handlePress = React91.useCallback(
9805
10025
  (id) => {
9806
10026
  setActiveButtons((prev) => new Set(prev).add(id));
9807
10027
  if (actionEvent) eventBus.emit(`UI:${actionEvent}`, { id, pressed: true });
@@ -9809,7 +10029,7 @@ function ActionButtons({
9809
10029
  },
9810
10030
  [actionEvent, eventBus, onAction]
9811
10031
  );
9812
- const handleRelease = React90.useCallback(
10032
+ const handleRelease = React91.useCallback(
9813
10033
  (id) => {
9814
10034
  setActiveButtons((prev) => {
9815
10035
  const next = new Set(prev);
@@ -9994,7 +10214,7 @@ function InventoryGrid({
9994
10214
  const eventBus = useEventBus();
9995
10215
  const slotCount = totalSlots ?? items.length;
9996
10216
  const emptySlotCount = Math.max(0, slotCount - items.length);
9997
- const handleSelect = React90.useCallback(
10217
+ const handleSelect = React91.useCallback(
9998
10218
  (id) => {
9999
10219
  onSelect?.(id);
10000
10220
  if (selectEvent) {
@@ -10118,7 +10338,7 @@ function CraftingRecipe({
10118
10338
  className
10119
10339
  }) {
10120
10340
  const eventBus = useEventBus();
10121
- const handleCraft = React90.useCallback(() => {
10341
+ const handleCraft = React91.useCallback(() => {
10122
10342
  onCraft?.();
10123
10343
  if (craftEvent) {
10124
10344
  eventBus.emit(craftEvent, { output: output.label });
@@ -10135,7 +10355,7 @@ function CraftingRecipe({
10135
10355
  children: [
10136
10356
  /* @__PURE__ */ jsx(HStack, { gap: "xs", className: "flex-wrap items-center", children: inputs.map((ingredient, index) => {
10137
10357
  const hasSufficient = ingredient.available >= ingredient.required;
10138
- return /* @__PURE__ */ jsxs(React90.Fragment, { children: [
10358
+ return /* @__PURE__ */ jsxs(React91.Fragment, { children: [
10139
10359
  /* @__PURE__ */ jsx(Box, { className: "relative", children: /* @__PURE__ */ jsx(
10140
10360
  ItemSlot,
10141
10361
  {
@@ -10237,15 +10457,15 @@ function GameCanvas2D({
10237
10457
  fps = 60,
10238
10458
  className
10239
10459
  }) {
10240
- const canvasRef = React90.useRef(null);
10241
- const rafRef = React90.useRef(0);
10242
- const frameRef = React90.useRef(0);
10243
- const lastTimeRef = React90.useRef(0);
10244
- const onDrawRef = React90.useRef(onDraw);
10460
+ const canvasRef = React91.useRef(null);
10461
+ const rafRef = React91.useRef(0);
10462
+ const frameRef = React91.useRef(0);
10463
+ const lastTimeRef = React91.useRef(0);
10464
+ const onDrawRef = React91.useRef(onDraw);
10245
10465
  onDrawRef.current = onDraw;
10246
- const onTickRef = React90.useRef(onTick);
10466
+ const onTickRef = React91.useRef(onTick);
10247
10467
  onTickRef.current = onTick;
10248
- React90.useEffect(() => {
10468
+ React91.useEffect(() => {
10249
10469
  const canvas = canvasRef.current;
10250
10470
  if (!canvas) return;
10251
10471
  const ctx = canvas.getContext("2d");
@@ -10498,7 +10718,7 @@ function TurnPanel({
10498
10718
  className
10499
10719
  }) {
10500
10720
  const eventBus = useEventBus();
10501
- const handleAction = React90.useCallback(
10721
+ const handleAction = React91.useCallback(
10502
10722
  (event) => {
10503
10723
  if (event) {
10504
10724
  eventBus.emit(event, { turn: currentTurn, phase, activeTeam });
@@ -10623,7 +10843,7 @@ function UnitCommandBar({
10623
10843
  className
10624
10844
  }) {
10625
10845
  const eventBus = useEventBus();
10626
- const handleCommand = React90.useCallback(
10846
+ const handleCommand = React91.useCallback(
10627
10847
  (event) => {
10628
10848
  if (event) {
10629
10849
  eventBus.emit(event, { unitId: selectedUnitId });
@@ -11162,7 +11382,7 @@ function GameMenu({
11162
11382
  } catch {
11163
11383
  }
11164
11384
  const eventBus = eventBusProp || eventBusFromHook;
11165
- const handleOptionClick = React90.useCallback(
11385
+ const handleOptionClick = React91.useCallback(
11166
11386
  (option) => {
11167
11387
  if (option.event && eventBus) {
11168
11388
  eventBus.emit(`UI:${option.event}`, { option });
@@ -11285,7 +11505,7 @@ function GameOverScreen({
11285
11505
  } catch {
11286
11506
  }
11287
11507
  const eventBus = eventBusProp || eventBusFromHook;
11288
- const handleActionClick = React90.useCallback(
11508
+ const handleActionClick = React91.useCallback(
11289
11509
  (action) => {
11290
11510
  if (action.event && eventBus) {
11291
11511
  eventBus.emit(`UI:${action.event}`, { action });
@@ -14101,7 +14321,7 @@ var DataList = ({
14101
14321
  }) => {
14102
14322
  const eventBus = useEventBus();
14103
14323
  const { t } = useTranslate();
14104
- const [visibleCount, setVisibleCount] = React90__default.useState(pageSize || Infinity);
14324
+ const [visibleCount, setVisibleCount] = React91__default.useState(pageSize || Infinity);
14105
14325
  const fields = fieldsProp ?? columnsProp ?? [];
14106
14326
  const allData = Array.isArray(entity) ? entity : entity ? [entity] : [];
14107
14327
  const data = pageSize > 0 ? allData.slice(0, visibleCount) : allData;
@@ -14138,7 +14358,7 @@ var DataList = ({
14138
14358
  const items2 = data.map((item) => item);
14139
14359
  const groups2 = groupBy ? groupData(items2, groupBy) : [{ label: "", items: items2 }];
14140
14360
  const contentField = titleField?.name ?? fields[0]?.name ?? "";
14141
- return /* @__PURE__ */ jsx(VStack, { gap: "sm", className: cn("py-2", className), children: groups2.map((group, gi) => /* @__PURE__ */ jsxs(React90__default.Fragment, { children: [
14361
+ return /* @__PURE__ */ jsx(VStack, { gap: "sm", className: cn("py-2", className), children: groups2.map((group, gi) => /* @__PURE__ */ jsxs(React91__default.Fragment, { children: [
14142
14362
  group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: "my-2" }),
14143
14363
  group.items.map((itemData, index) => {
14144
14364
  const id = itemData.id || `${gi}-${index}`;
@@ -14341,7 +14561,7 @@ var DataList = ({
14341
14561
  className
14342
14562
  ),
14343
14563
  children: [
14344
- groups.map((group, gi) => /* @__PURE__ */ jsxs(React90__default.Fragment, { children: [
14564
+ groups.map((group, gi) => /* @__PURE__ */ jsxs(React91__default.Fragment, { children: [
14345
14565
  group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-4" : "mt-0" }),
14346
14566
  group.items.map(
14347
14567
  (itemData, index) => renderItem(itemData, index, gi === groups.length - 1 && index === group.items.length - 1)
@@ -16073,7 +16293,7 @@ var StepFlow = ({
16073
16293
  className
16074
16294
  }) => {
16075
16295
  if (orientation === "vertical") {
16076
- return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(React90__default.Fragment, { children: /* @__PURE__ */ jsxs(HStack, { gap: "md", align: "start", className: "w-full", children: [
16296
+ return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(React91__default.Fragment, { children: /* @__PURE__ */ jsxs(HStack, { gap: "md", align: "start", className: "w-full", children: [
16077
16297
  /* @__PURE__ */ jsxs(VStack, { gap: "none", align: "center", children: [
16078
16298
  /* @__PURE__ */ jsx(StepCircle, { step, index }),
16079
16299
  showConnectors && index < steps.length - 1 && /* @__PURE__ */ jsx(Box, { className: "w-px h-8 bg-border" })
@@ -16084,7 +16304,7 @@ var StepFlow = ({
16084
16304
  ] })
16085
16305
  ] }) }, index)) });
16086
16306
  }
16087
- 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(React90__default.Fragment, { children: [
16307
+ 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(React91__default.Fragment, { children: [
16088
16308
  /* @__PURE__ */ jsxs(VStack, { gap: "sm", align: "center", className: "flex-1 w-full md:w-auto", children: [
16089
16309
  /* @__PURE__ */ jsx(StepCircle, { step, index }),
16090
16310
  /* @__PURE__ */ jsx(Typography, { variant: "h4", className: "text-center", children: step.title }),
@@ -16815,6 +17035,498 @@ var EdgeDecoration = ({
16815
17035
  )) });
16816
17036
  };
16817
17037
  EdgeDecoration.displayName = "EdgeDecoration";
17038
+ function resolveRole(data) {
17039
+ if (data.isInitial) return "initial";
17040
+ if (data.isTerminal) return "terminal";
17041
+ return "default";
17042
+ }
17043
+ var FlowStateNode = ({
17044
+ data,
17045
+ selected = false
17046
+ }) => {
17047
+ const role = resolveRole(data);
17048
+ const colors = STATE_COLORS[role];
17049
+ return /* @__PURE__ */ jsxs(
17050
+ FlowNodeShell,
17051
+ {
17052
+ selected,
17053
+ nodeType: "State",
17054
+ headerColor: colors.border,
17055
+ className: cn("min-w-[120px]"),
17056
+ children: [
17057
+ /* @__PURE__ */ jsx(
17058
+ Handle,
17059
+ {
17060
+ type: "target",
17061
+ position: Position.Top,
17062
+ className: "!bg-muted-foreground !w-2 !h-2"
17063
+ }
17064
+ ),
17065
+ /* @__PURE__ */ jsx(Typography, { variant: "body", className: "font-semibold text-center select-none", children: data.name }),
17066
+ (data.isInitial || data.isTerminal) && /* @__PURE__ */ jsxs(HStack, { gap: "xs", justify: "center", className: "mt-1", children: [
17067
+ data.isInitial && /* @__PURE__ */ jsx(Badge, { variant: "success", size: "sm", children: "initial" }),
17068
+ data.isTerminal && /* @__PURE__ */ jsx(Badge, { variant: "danger", size: "sm", children: "terminal" })
17069
+ ] }),
17070
+ /* @__PURE__ */ jsx(
17071
+ Handle,
17072
+ {
17073
+ type: "source",
17074
+ position: Position.Bottom,
17075
+ className: "!bg-muted-foreground !w-2 !h-2"
17076
+ }
17077
+ )
17078
+ ]
17079
+ }
17080
+ );
17081
+ };
17082
+ FlowStateNode.displayName = "FlowStateNode";
17083
+ var OrbitalNode = ({
17084
+ data,
17085
+ selected = false
17086
+ }) => {
17087
+ const handleSpacing = 24;
17088
+ const maxPorts = Math.max(data.emits.length, data.listens.length, 1);
17089
+ const bodyHeight = maxPorts * handleSpacing + 24;
17090
+ return /* @__PURE__ */ jsxs(
17091
+ FlowNodeShell,
17092
+ {
17093
+ selected,
17094
+ nodeType: "Orbital",
17095
+ headerColor: "var(--color-primary)",
17096
+ className: cn("min-w-[180px]"),
17097
+ children: [
17098
+ data.listens.map((event, i) => /* @__PURE__ */ jsx(
17099
+ Handle,
17100
+ {
17101
+ type: "target",
17102
+ position: Position.Left,
17103
+ id: `listen-${event}`,
17104
+ className: "!bg-orange-500 !w-2 !h-2",
17105
+ style: { top: 48 + i * handleSpacing }
17106
+ },
17107
+ `listen-${event}`
17108
+ )),
17109
+ /* @__PURE__ */ jsxs(VStack, { gap: "xs", style: { minHeight: bodyHeight }, children: [
17110
+ /* @__PURE__ */ jsx(Typography, { variant: "body", className: "font-semibold select-none", children: data.name }),
17111
+ /* @__PURE__ */ jsx(Typography, { variant: "caption", className: "text-muted-foreground select-none", children: data.entityName }),
17112
+ /* @__PURE__ */ jsxs(Typography, { variant: "caption", className: "text-muted-foreground select-none", children: [
17113
+ data.traitCount,
17114
+ " traits, ",
17115
+ data.pageCount,
17116
+ " pages"
17117
+ ] }),
17118
+ data.listens.length > 0 && /* @__PURE__ */ jsx(VStack, { gap: "none", className: "mt-1", children: data.listens.map((event) => /* @__PURE__ */ jsx(
17119
+ Typography,
17120
+ {
17121
+ variant: "caption",
17122
+ className: "text-orange-500 select-none text-left",
17123
+ children: event
17124
+ },
17125
+ event
17126
+ )) }),
17127
+ data.emits.length > 0 && /* @__PURE__ */ jsx(VStack, { gap: "none", className: "mt-1", children: data.emits.map((event) => /* @__PURE__ */ jsx(
17128
+ Typography,
17129
+ {
17130
+ variant: "caption",
17131
+ className: "text-orange-500 select-none text-right",
17132
+ children: event
17133
+ },
17134
+ event
17135
+ )) })
17136
+ ] }),
17137
+ data.emits.map((event, i) => /* @__PURE__ */ jsx(
17138
+ Handle,
17139
+ {
17140
+ type: "source",
17141
+ position: Position.Right,
17142
+ id: `emit-${event}`,
17143
+ className: "!bg-orange-500 !w-2 !h-2",
17144
+ style: { top: 48 + i * handleSpacing }
17145
+ },
17146
+ `emit-${event}`
17147
+ ))
17148
+ ]
17149
+ }
17150
+ );
17151
+ };
17152
+ OrbitalNode.displayName = "OrbitalNode";
17153
+ var MAX_DESC = 60;
17154
+ function truncate(text, max) {
17155
+ if (!text) return "";
17156
+ return text.length > max ? `${text.slice(0, max)}...` : text;
17157
+ }
17158
+ var BehaviorNode = ({
17159
+ data,
17160
+ selected = false
17161
+ }) => {
17162
+ const handleSpacing = 24;
17163
+ const maxPorts = Math.max(data.emits.length, data.listens.length, 1);
17164
+ const bodyHeight = maxPorts * handleSpacing + 24;
17165
+ return /* @__PURE__ */ jsxs(
17166
+ FlowNodeShell,
17167
+ {
17168
+ selected,
17169
+ nodeType: "Behavior",
17170
+ headerColor: "#10B981",
17171
+ className: cn("min-w-[170px]"),
17172
+ children: [
17173
+ data.listens.map((event, i) => /* @__PURE__ */ jsx(
17174
+ Handle,
17175
+ {
17176
+ type: "target",
17177
+ position: Position.Left,
17178
+ id: `listen-${event}`,
17179
+ className: "!bg-orange-500 !w-2 !h-2",
17180
+ style: { top: 48 + i * handleSpacing }
17181
+ },
17182
+ `listen-${event}`
17183
+ )),
17184
+ /* @__PURE__ */ jsxs(VStack, { gap: "xs", style: { minHeight: bodyHeight }, children: [
17185
+ /* @__PURE__ */ jsx(Typography, { variant: "body", className: "font-semibold select-none", children: data.name }),
17186
+ data.description && /* @__PURE__ */ jsx(Box, { title: data.description.length > MAX_DESC ? data.description : void 0, children: /* @__PURE__ */ jsx(
17187
+ Typography,
17188
+ {
17189
+ variant: "caption",
17190
+ className: "text-muted-foreground select-none",
17191
+ children: truncate(data.description, MAX_DESC)
17192
+ }
17193
+ ) }),
17194
+ /* @__PURE__ */ jsxs(Typography, { variant: "caption", className: "text-muted-foreground select-none", children: [
17195
+ data.stateCount,
17196
+ " states"
17197
+ ] })
17198
+ ] }),
17199
+ data.emits.map((event, i) => /* @__PURE__ */ jsx(
17200
+ Handle,
17201
+ {
17202
+ type: "source",
17203
+ position: Position.Right,
17204
+ id: `emit-${event}`,
17205
+ className: "!bg-orange-500 !w-2 !h-2",
17206
+ style: { top: 48 + i * handleSpacing }
17207
+ },
17208
+ `emit-${event}`
17209
+ ))
17210
+ ]
17211
+ }
17212
+ );
17213
+ };
17214
+ BehaviorNode.displayName = "BehaviorNode";
17215
+ var ExprNode = ({
17216
+ data,
17217
+ selected = false
17218
+ }) => {
17219
+ const ns = data.namespace ?? "arithmetic";
17220
+ const headerColor = AVL_OPERATOR_COLORS[ns];
17221
+ const handleSpacing = 22;
17222
+ const bodyHeight = Math.max(data.operandCount, 1) * handleSpacing + 12;
17223
+ return /* @__PURE__ */ jsxs(
17224
+ FlowNodeShell,
17225
+ {
17226
+ selected,
17227
+ nodeType: "Expr",
17228
+ headerColor,
17229
+ className: cn("min-w-[100px]"),
17230
+ children: [
17231
+ Array.from({ length: data.operandCount }, (_, i) => /* @__PURE__ */ jsx(
17232
+ Handle,
17233
+ {
17234
+ type: "target",
17235
+ position: Position.Left,
17236
+ id: `operand-${i}`,
17237
+ className: "!w-2 !h-2",
17238
+ style: {
17239
+ top: 40 + i * handleSpacing,
17240
+ backgroundColor: headerColor
17241
+ }
17242
+ },
17243
+ `op-${i}`
17244
+ )),
17245
+ /* @__PURE__ */ jsx(
17246
+ Typography,
17247
+ {
17248
+ variant: "body",
17249
+ className: "font-mono font-bold text-center select-none",
17250
+ style: { color: headerColor, minHeight: bodyHeight },
17251
+ children: data.operator
17252
+ }
17253
+ ),
17254
+ /* @__PURE__ */ jsx(
17255
+ Handle,
17256
+ {
17257
+ type: "source",
17258
+ position: Position.Right,
17259
+ id: "result",
17260
+ className: "!w-2 !h-2",
17261
+ style: { backgroundColor: headerColor }
17262
+ }
17263
+ )
17264
+ ]
17265
+ }
17266
+ );
17267
+ };
17268
+ ExprNode.displayName = "ExprNode";
17269
+ var EFFECT_ICONS = {
17270
+ "render-ui": "\u229E",
17271
+ // grid
17272
+ "set": "\u270E",
17273
+ // pencil
17274
+ "persist": "\u26C1",
17275
+ // cylinder
17276
+ "fetch": "\u21E3",
17277
+ // down arrow
17278
+ "emit": "\u{1F4E1}",
17279
+ // antenna
17280
+ "navigate": "\u21E2",
17281
+ // right arrow
17282
+ "notify": "\u{1F514}",
17283
+ // bell
17284
+ "call-service": "\u21C4",
17285
+ // bidirectional
17286
+ "spawn": "\u2295",
17287
+ // plus circle
17288
+ "despawn": "\u2296",
17289
+ // minus circle
17290
+ "do": "\u25B6",
17291
+ // play
17292
+ "if": "\u25C7",
17293
+ // diamond
17294
+ "log": "\xB6"
17295
+ // pilcrow
17296
+ };
17297
+ function resolveCategory(data) {
17298
+ if (data.category) return data.category;
17299
+ const mapped = EFFECT_TYPE_TO_CATEGORY[data.effectType];
17300
+ return mapped ?? "control";
17301
+ }
17302
+ var EffectNode = ({
17303
+ data,
17304
+ selected = false
17305
+ }) => {
17306
+ const category = resolveCategory(data);
17307
+ const colors = EFFECT_CATEGORY_COLORS[category];
17308
+ const icon = EFFECT_ICONS[data.effectType] ?? "\u2022";
17309
+ return /* @__PURE__ */ jsxs(
17310
+ FlowNodeShell,
17311
+ {
17312
+ selected,
17313
+ nodeType: "Effect",
17314
+ headerColor: colors.color,
17315
+ className: cn("min-w-[120px]"),
17316
+ children: [
17317
+ /* @__PURE__ */ jsx(
17318
+ Handle,
17319
+ {
17320
+ type: "target",
17321
+ position: Position.Left,
17322
+ className: "!w-2 !h-2",
17323
+ style: { backgroundColor: colors.color }
17324
+ }
17325
+ ),
17326
+ /* @__PURE__ */ jsxs(HStack, { gap: "xs", align: "center", children: [
17327
+ /* @__PURE__ */ jsx(
17328
+ Typography,
17329
+ {
17330
+ variant: "body",
17331
+ className: "select-none",
17332
+ style: { color: colors.color },
17333
+ children: icon
17334
+ }
17335
+ ),
17336
+ /* @__PURE__ */ jsx(Typography, { variant: "body", className: "font-semibold select-none", children: data.effectType })
17337
+ ] }),
17338
+ data.args && /* @__PURE__ */ jsx(Typography, { variant: "caption", className: "text-muted-foreground select-none mt-0.5 truncate max-w-[160px]", children: data.args }),
17339
+ /* @__PURE__ */ jsx(
17340
+ Handle,
17341
+ {
17342
+ type: "source",
17343
+ position: Position.Right,
17344
+ className: "!w-2 !h-2",
17345
+ style: { backgroundColor: colors.color }
17346
+ }
17347
+ )
17348
+ ]
17349
+ }
17350
+ );
17351
+ };
17352
+ EffectNode.displayName = "EffectNode";
17353
+ var TransitionEdge = ({
17354
+ id,
17355
+ sourceX,
17356
+ sourceY,
17357
+ targetX,
17358
+ targetY,
17359
+ sourcePosition,
17360
+ targetPosition,
17361
+ data,
17362
+ markerEnd,
17363
+ style
17364
+ }) => {
17365
+ const [edgePath, labelX, labelY] = getBezierPath({
17366
+ sourceX,
17367
+ sourceY,
17368
+ targetX,
17369
+ targetY,
17370
+ sourcePosition,
17371
+ targetPosition
17372
+ });
17373
+ const isBackward = targetX < sourceX;
17374
+ const connStyle = isBackward ? CONNECTION_COLORS.backward : CONNECTION_COLORS.forward;
17375
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
17376
+ /* @__PURE__ */ jsx(
17377
+ BaseEdge,
17378
+ {
17379
+ id,
17380
+ path: edgePath,
17381
+ markerEnd,
17382
+ style: {
17383
+ stroke: connStyle.color,
17384
+ strokeWidth: connStyle.width,
17385
+ strokeDasharray: connStyle.dash,
17386
+ ...style
17387
+ }
17388
+ }
17389
+ ),
17390
+ /* @__PURE__ */ jsx(EdgeLabelRenderer, { children: /* @__PURE__ */ jsxs(
17391
+ Box,
17392
+ {
17393
+ className: cn(
17394
+ "absolute pointer-events-all nodrag nopan",
17395
+ "flex items-center gap-1"
17396
+ ),
17397
+ style: {
17398
+ transform: `translate(-50%, -50%) translate(${labelX}px, ${labelY}px)`
17399
+ },
17400
+ children: [
17401
+ data?.hasGuard && /* @__PURE__ */ jsx(
17402
+ Box,
17403
+ {
17404
+ className: "w-3 h-3 rotate-45 border border-amber-500 bg-amber-500/10 shrink-0",
17405
+ title: "Has guard"
17406
+ }
17407
+ ),
17408
+ /* @__PURE__ */ jsx(
17409
+ FlowLabel,
17410
+ {
17411
+ text: data?.event ?? "",
17412
+ truncate: 20,
17413
+ variant: "default"
17414
+ }
17415
+ ),
17416
+ data?.hasEffects && /* @__PURE__ */ jsx(
17417
+ Box,
17418
+ {
17419
+ className: "w-2.5 h-2.5 rounded-full bg-violet-500/80 shrink-0",
17420
+ title: "Has effects"
17421
+ }
17422
+ )
17423
+ ]
17424
+ }
17425
+ ) })
17426
+ ] });
17427
+ };
17428
+ TransitionEdge.displayName = "TransitionEdge";
17429
+ var EventWireEdge = ({
17430
+ id,
17431
+ sourceX,
17432
+ sourceY,
17433
+ targetX,
17434
+ targetY,
17435
+ sourcePosition,
17436
+ targetPosition,
17437
+ data,
17438
+ markerEnd,
17439
+ style
17440
+ }) => {
17441
+ const [edgePath, labelX, labelY] = getBezierPath({
17442
+ sourceX,
17443
+ sourceY,
17444
+ targetX,
17445
+ targetY,
17446
+ sourcePosition,
17447
+ targetPosition
17448
+ });
17449
+ const isCompatible = data?.compatible !== false;
17450
+ const wireColor = isCompatible ? CONNECTION_COLORS.emitListen.color : "#EF4444";
17451
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
17452
+ /* @__PURE__ */ jsx(
17453
+ BaseEdge,
17454
+ {
17455
+ id,
17456
+ path: edgePath,
17457
+ markerEnd,
17458
+ style: {
17459
+ stroke: wireColor,
17460
+ strokeWidth: CONNECTION_COLORS.emitListen.width,
17461
+ strokeDasharray: CONNECTION_COLORS.emitListen.dash,
17462
+ ...style
17463
+ }
17464
+ }
17465
+ ),
17466
+ /* @__PURE__ */ jsx(EdgeLabelRenderer, { children: /* @__PURE__ */ jsx(
17467
+ Box,
17468
+ {
17469
+ className: cn(
17470
+ "absolute pointer-events-all nodrag nopan",
17471
+ "flex items-center"
17472
+ ),
17473
+ style: {
17474
+ transform: `translate(-50%, -50%) translate(${labelX}px, ${labelY}px)`
17475
+ },
17476
+ children: /* @__PURE__ */ jsx(
17477
+ FlowLabel,
17478
+ {
17479
+ text: data?.event ?? "",
17480
+ truncate: 24,
17481
+ variant: isCompatible ? "primary" : "error"
17482
+ }
17483
+ )
17484
+ }
17485
+ ) })
17486
+ ] });
17487
+ };
17488
+ EventWireEdge.displayName = "EventWireEdge";
17489
+ var NodePalette = ({
17490
+ categories,
17491
+ className
17492
+ }) => {
17493
+ const handleDragStart = useCallback(
17494
+ (event, nodeType) => {
17495
+ event.dataTransfer.setData("application/reactflow", nodeType);
17496
+ event.dataTransfer.effectAllowed = "move";
17497
+ },
17498
+ []
17499
+ );
17500
+ return /* @__PURE__ */ jsx(VStack, { gap: "md", className: cn("p-3 select-none", className), children: categories.map((cat) => /* @__PURE__ */ jsxs(VStack, { gap: "xs", children: [
17501
+ /* @__PURE__ */ jsx(
17502
+ Typography,
17503
+ {
17504
+ variant: "caption",
17505
+ className: "font-semibold uppercase tracking-wider text-muted-foreground",
17506
+ children: cat.name
17507
+ }
17508
+ ),
17509
+ /* @__PURE__ */ jsx(Box, { className: "grid grid-cols-2 gap-1.5", children: cat.items.map((item) => /* @__PURE__ */ jsxs(
17510
+ Box,
17511
+ {
17512
+ draggable: true,
17513
+ onDragStart: (e) => handleDragStart(e, item.type),
17514
+ className: cn(
17515
+ "flex flex-col items-center gap-1 p-2 rounded-md cursor-grab",
17516
+ "border border-border bg-card hover:bg-accent/50",
17517
+ "transition-colors duration-100",
17518
+ "active:cursor-grabbing"
17519
+ ),
17520
+ children: [
17521
+ /* @__PURE__ */ jsx(Icon, { name: item.icon, size: "sm" }),
17522
+ /* @__PURE__ */ jsx(Typography, { variant: "caption", className: "text-center leading-tight", children: item.label })
17523
+ ]
17524
+ },
17525
+ item.type
17526
+ )) })
17527
+ ] }, cat.name)) });
17528
+ };
17529
+ NodePalette.displayName = "NodePalette";
16818
17530
 
16819
17531
  // components/organisms/types.ts
16820
17532
  var EntityDisplayEvents = {
@@ -17251,7 +17963,7 @@ var StatCard = ({
17251
17963
  const labelToUse = propLabel ?? propTitle;
17252
17964
  const eventBus = useEventBus();
17253
17965
  const { t } = useTranslate();
17254
- const handleActionClick = React90__default.useCallback(() => {
17966
+ const handleActionClick = React91__default.useCallback(() => {
17255
17967
  if (action?.event) {
17256
17968
  eventBus.emit(`UI:${action.event}`, {});
17257
17969
  }
@@ -17262,7 +17974,7 @@ var StatCard = ({
17262
17974
  const data = Array.isArray(entity) ? entity : entity ? [entity] : [];
17263
17975
  const isLoading = externalLoading ?? false;
17264
17976
  const error = externalError;
17265
- const computeMetricValue = React90__default.useCallback(
17977
+ const computeMetricValue = React91__default.useCallback(
17266
17978
  (metric, items) => {
17267
17979
  if (metric.value !== void 0) {
17268
17980
  return metric.value;
@@ -17301,7 +18013,7 @@ var StatCard = ({
17301
18013
  },
17302
18014
  []
17303
18015
  );
17304
- const schemaStats = React90__default.useMemo(() => {
18016
+ const schemaStats = React91__default.useMemo(() => {
17305
18017
  if (!metrics || metrics.length === 0) return null;
17306
18018
  return metrics.map((metric) => ({
17307
18019
  label: metric.label,
@@ -17309,7 +18021,7 @@ var StatCard = ({
17309
18021
  format: metric.format
17310
18022
  }));
17311
18023
  }, [metrics, data, computeMetricValue]);
17312
- const calculatedTrend = React90__default.useMemo(() => {
18024
+ const calculatedTrend = React91__default.useMemo(() => {
17313
18025
  if (manualTrend !== void 0) return manualTrend;
17314
18026
  if (previousValue === void 0 || currentValue === void 0)
17315
18027
  return void 0;
@@ -17473,7 +18185,7 @@ var PageHeader = ({
17473
18185
  info: "bg-info/10 text-info"
17474
18186
  };
17475
18187
  return /* @__PURE__ */ jsxs(Box, { className: cn("mb-6", className), children: [
17476
- 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(React90__default.Fragment, { children: [
18188
+ 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(React91__default.Fragment, { children: [
17477
18189
  idx > 0 && /* @__PURE__ */ jsx(Typography, { variant: "small", color: "muted", children: "/" }),
17478
18190
  crumb.href ? /* @__PURE__ */ jsx(
17479
18191
  "a",
@@ -17999,7 +18711,7 @@ var FormSection = ({
17999
18711
  columns = 1,
18000
18712
  className
18001
18713
  }) => {
18002
- const [collapsed, setCollapsed] = React90__default.useState(defaultCollapsed);
18714
+ const [collapsed, setCollapsed] = React91__default.useState(defaultCollapsed);
18003
18715
  const { t } = useTranslate();
18004
18716
  const eventBus = useEventBus();
18005
18717
  const gridClass = {
@@ -18007,7 +18719,7 @@ var FormSection = ({
18007
18719
  2: "grid-cols-1 md:grid-cols-2",
18008
18720
  3: "grid-cols-1 md:grid-cols-2 lg:grid-cols-3"
18009
18721
  }[columns];
18010
- React90__default.useCallback(() => {
18722
+ React91__default.useCallback(() => {
18011
18723
  if (collapsible) {
18012
18724
  setCollapsed((prev) => !prev);
18013
18725
  eventBus.emit("UI:TOGGLE_COLLAPSE", { collapsed: !collapsed });
@@ -18219,7 +18931,7 @@ var Form = ({
18219
18931
  const normalizedInitialData = initialData ?? {};
18220
18932
  const resolvedEntity = entity && typeof entity === "object" && !Array.isArray(entity) ? entity : void 0;
18221
18933
  const entityName = typeof entity === "string" ? entity : resolvedEntity?.name;
18222
- const entityDerivedFields = React90__default.useMemo(() => {
18934
+ const entityDerivedFields = React91__default.useMemo(() => {
18223
18935
  if (fields && fields.length > 0) return void 0;
18224
18936
  if (!resolvedEntity) return void 0;
18225
18937
  return resolvedEntity.fields.map(
@@ -18238,14 +18950,14 @@ var Form = ({
18238
18950
  const conditionalFields = typeof conditionalFieldsRaw === "boolean" ? {} : conditionalFieldsRaw;
18239
18951
  const hiddenCalculations = typeof hiddenCalculationsRaw === "boolean" ? [] : hiddenCalculationsRaw;
18240
18952
  const violationTriggers = typeof violationTriggersRaw === "boolean" ? [] : violationTriggersRaw;
18241
- const [formData, setFormData] = React90__default.useState(
18953
+ const [formData, setFormData] = React91__default.useState(
18242
18954
  normalizedInitialData
18243
18955
  );
18244
- const [collapsedSections, setCollapsedSections] = React90__default.useState(
18956
+ const [collapsedSections, setCollapsedSections] = React91__default.useState(
18245
18957
  /* @__PURE__ */ new Set()
18246
18958
  );
18247
18959
  const shouldShowCancel = showCancel ?? (fields && fields.length > 0);
18248
- const evalContext = React90__default.useMemo(
18960
+ const evalContext = React91__default.useMemo(
18249
18961
  () => ({
18250
18962
  formValues: formData,
18251
18963
  globalVariables: externalContext?.globalVariables ?? {},
@@ -18254,13 +18966,13 @@ var Form = ({
18254
18966
  }),
18255
18967
  [formData, externalContext]
18256
18968
  );
18257
- React90__default.useEffect(() => {
18969
+ React91__default.useEffect(() => {
18258
18970
  const data = initialData;
18259
18971
  if (data && Object.keys(data).length > 0) {
18260
18972
  setFormData(data);
18261
18973
  }
18262
18974
  }, [initialData]);
18263
- const processCalculations = React90__default.useCallback(
18975
+ const processCalculations = React91__default.useCallback(
18264
18976
  (changedFieldId, newFormData) => {
18265
18977
  if (!hiddenCalculations.length) return;
18266
18978
  const context = {
@@ -18285,7 +18997,7 @@ var Form = ({
18285
18997
  },
18286
18998
  [hiddenCalculations, externalContext, eventBus]
18287
18999
  );
18288
- const checkViolations = React90__default.useCallback(
19000
+ const checkViolations = React91__default.useCallback(
18289
19001
  (changedFieldId, newFormData) => {
18290
19002
  if (!violationTriggers.length) return;
18291
19003
  const context = {
@@ -18322,7 +19034,7 @@ var Form = ({
18322
19034
  processCalculations(name, newFormData);
18323
19035
  checkViolations(name, newFormData);
18324
19036
  };
18325
- const isFieldVisible = React90__default.useCallback(
19037
+ const isFieldVisible = React91__default.useCallback(
18326
19038
  (fieldName) => {
18327
19039
  const condition = conditionalFields[fieldName];
18328
19040
  if (!condition) return true;
@@ -18330,7 +19042,7 @@ var Form = ({
18330
19042
  },
18331
19043
  [conditionalFields, evalContext]
18332
19044
  );
18333
- const isSectionVisible = React90__default.useCallback(
19045
+ const isSectionVisible = React91__default.useCallback(
18334
19046
  (section) => {
18335
19047
  if (!section.condition) return true;
18336
19048
  return Boolean(evaluateFormExpression(section.condition, evalContext));
@@ -18362,7 +19074,7 @@ var Form = ({
18362
19074
  eventBus.emit(`UI:${onCancel}`);
18363
19075
  }
18364
19076
  };
18365
- const renderField = React90__default.useCallback(
19077
+ const renderField = React91__default.useCallback(
18366
19078
  (field) => {
18367
19079
  const fieldName = field.name || field.field;
18368
19080
  if (!fieldName) return null;
@@ -18383,7 +19095,7 @@ var Form = ({
18383
19095
  [formData, isFieldVisible, relationsData, relationsLoading, isLoading]
18384
19096
  );
18385
19097
  const effectiveFields = entityDerivedFields ?? fields;
18386
- const normalizedFields = React90__default.useMemo(() => {
19098
+ const normalizedFields = React91__default.useMemo(() => {
18387
19099
  if (!effectiveFields || effectiveFields.length === 0) return [];
18388
19100
  return effectiveFields.map((field) => {
18389
19101
  if (typeof field === "string") {
@@ -18405,7 +19117,7 @@ var Form = ({
18405
19117
  return field;
18406
19118
  });
18407
19119
  }, [effectiveFields, resolvedEntity]);
18408
- const schemaFields = React90__default.useMemo(() => {
19120
+ const schemaFields = React91__default.useMemo(() => {
18409
19121
  if (normalizedFields.length === 0) return null;
18410
19122
  if (isDebugEnabled()) {
18411
19123
  debugGroup(`Form: ${entityName || "unknown"}`);
@@ -18415,7 +19127,7 @@ var Form = ({
18415
19127
  }
18416
19128
  return normalizedFields.map(renderField).filter(Boolean);
18417
19129
  }, [normalizedFields, renderField, entityName, conditionalFields]);
18418
- const sectionElements = React90__default.useMemo(() => {
19130
+ const sectionElements = React91__default.useMemo(() => {
18419
19131
  if (!sections || sections.length === 0) return null;
18420
19132
  return sections.map((section) => {
18421
19133
  if (!isSectionVisible(section)) {
@@ -19540,7 +20252,7 @@ var List = ({
19540
20252
  if (entity && typeof entity === "object" && "id" in entity) return [entity];
19541
20253
  return [];
19542
20254
  }, [entity]);
19543
- const getItemActions = React90__default.useCallback(
20255
+ const getItemActions = React91__default.useCallback(
19544
20256
  (item) => {
19545
20257
  if (!itemActions) return [];
19546
20258
  if (typeof itemActions === "function") {
@@ -20306,7 +21018,7 @@ var WizardContainer = ({
20306
21018
  const isCompleted = index < currentStep;
20307
21019
  const stepKey = step.id ?? step.tabId ?? `step-${index}`;
20308
21020
  const stepTitle = step.title ?? step.name ?? `Step ${index + 1}`;
20309
- return /* @__PURE__ */ jsxs(React90__default.Fragment, { children: [
21021
+ return /* @__PURE__ */ jsxs(React91__default.Fragment, { children: [
20310
21022
  /* @__PURE__ */ jsx(
20311
21023
  Button,
20312
21024
  {
@@ -21530,7 +22242,7 @@ var StateMachineView = ({
21530
22242
  style: { top: title ? 30 : 0 },
21531
22243
  children: [
21532
22244
  entity && /* @__PURE__ */ jsx(EntityBox, { entity, config }),
21533
- states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(React90__default.Fragment, { children: renderStateNode(state, config) }, state.id) : /* @__PURE__ */ jsx(
22245
+ states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(React91__default.Fragment, { children: renderStateNode(state, config) }, state.id) : /* @__PURE__ */ jsx(
21534
22246
  StateNode,
21535
22247
  {
21536
22248
  state,
@@ -25976,7 +26688,7 @@ function LinearView({
25976
26688
  /* @__PURE__ */ jsx(HStack, { className: "flex-wrap items-center", gap: "xs", children: trait.states.map((state, i) => {
25977
26689
  const isDone = i < currentIdx;
25978
26690
  const isCurrent = i === currentIdx;
25979
- return /* @__PURE__ */ jsxs(React90__default.Fragment, { children: [
26691
+ return /* @__PURE__ */ jsxs(React91__default.Fragment, { children: [
25980
26692
  i > 0 && /* @__PURE__ */ jsx(
25981
26693
  Typography,
25982
26694
  {
@@ -26630,7 +27342,7 @@ function SequenceBar({
26630
27342
  onSlotRemove(index);
26631
27343
  }, [onSlotRemove, playing]);
26632
27344
  const paddedSlots = Array.from({ length: maxSlots }, (_, i) => slots[i]);
26633
- return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(React90__default.Fragment, { children: [
27345
+ return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(React91__default.Fragment, { children: [
26634
27346
  i > 0 && /* @__PURE__ */ jsx(
26635
27347
  Typography,
26636
27348
  {
@@ -29118,7 +29830,7 @@ function InputPattern({
29118
29830
  className
29119
29831
  }) {
29120
29832
  const { emit } = useEventBus();
29121
- const [localValue, setLocalValue] = React90__default.useState(value);
29833
+ const [localValue, setLocalValue] = React91__default.useState(value);
29122
29834
  const handleChange = (e) => {
29123
29835
  setLocalValue(e.target.value);
29124
29836
  if (onChange) {
@@ -29155,7 +29867,7 @@ function TextareaPattern({
29155
29867
  className
29156
29868
  }) {
29157
29869
  const { emit } = useEventBus();
29158
- const [localValue, setLocalValue] = React90__default.useState(value);
29870
+ const [localValue, setLocalValue] = React91__default.useState(value);
29159
29871
  const handleChange = (e) => {
29160
29872
  setLocalValue(e.target.value);
29161
29873
  if (onChange) {
@@ -29186,7 +29898,7 @@ function SelectPattern({
29186
29898
  className
29187
29899
  }) {
29188
29900
  const { emit } = useEventBus();
29189
- const [localValue, setLocalValue] = React90__default.useState(value);
29901
+ const [localValue, setLocalValue] = React91__default.useState(value);
29190
29902
  const handleChange = (e) => {
29191
29903
  setLocalValue(e.target.value);
29192
29904
  if (onChange) {
@@ -29215,7 +29927,7 @@ function CheckboxPattern({
29215
29927
  className
29216
29928
  }) {
29217
29929
  const { emit } = useEventBus();
29218
- const [localChecked, setLocalChecked] = React90__default.useState(checked);
29930
+ const [localChecked, setLocalChecked] = React91__default.useState(checked);
29219
29931
  const handleChange = (e) => {
29220
29932
  setLocalChecked(e.target.checked);
29221
29933
  if (onChange) {
@@ -31097,7 +31809,7 @@ var DocumentViewer = ({
31097
31809
  };
31098
31810
  DocumentViewer.displayName = "DocumentViewer";
31099
31811
  function extractTitle(children) {
31100
- if (!React90__default.isValidElement(children)) return void 0;
31812
+ if (!React91__default.isValidElement(children)) return void 0;
31101
31813
  const props = children.props;
31102
31814
  if (typeof props.title === "string") {
31103
31815
  return props.title;
@@ -31695,7 +32407,7 @@ var MediaGallery = ({
31695
32407
  [selectable, selectedItems, selectionEvent, eventBus]
31696
32408
  );
31697
32409
  const entityData = Array.isArray(entity) ? entity : [];
31698
- const items = React90__default.useMemo(() => {
32410
+ const items = React91__default.useMemo(() => {
31699
32411
  if (propItems) return propItems;
31700
32412
  if (entityData.length === 0) return [];
31701
32413
  return entityData.map((record, idx) => ({
@@ -31857,7 +32569,7 @@ var MediaGallery = ({
31857
32569
  };
31858
32570
  MediaGallery.displayName = "MediaGallery";
31859
32571
  function extractTitle2(children) {
31860
- if (!React90__default.isValidElement(children)) return void 0;
32572
+ if (!React91__default.isValidElement(children)) return void 0;
31861
32573
  const props = children.props;
31862
32574
  if (typeof props.title === "string") {
31863
32575
  return props.title;
@@ -31943,7 +32655,7 @@ function subscribeToDebugEvents(listener) {
31943
32655
 
31944
32656
  // components/organisms/debug/hooks/useDebugData.ts
31945
32657
  function useDebugData() {
31946
- const [data, setData] = React90.useState(() => ({
32658
+ const [data, setData] = React91.useState(() => ({
31947
32659
  traits: [],
31948
32660
  ticks: [],
31949
32661
  guards: [],
@@ -31957,7 +32669,7 @@ function useDebugData() {
31957
32669
  },
31958
32670
  lastUpdate: Date.now()
31959
32671
  }));
31960
- React90.useEffect(() => {
32672
+ React91.useEffect(() => {
31961
32673
  const updateData = () => {
31962
32674
  setData({
31963
32675
  traits: getAllTraits(),
@@ -32226,15 +32938,15 @@ var TYPE_BADGES = {
32226
32938
  state: { variant: "danger", icon: "\u{1F4CA}" }
32227
32939
  };
32228
32940
  function EventFlowTab({ events: events2 }) {
32229
- const [filter, setFilter] = React90.useState("all");
32230
- const containerRef = React90.useRef(null);
32231
- const [autoScroll, setAutoScroll] = React90.useState(true);
32232
- React90.useEffect(() => {
32941
+ const [filter, setFilter] = React91.useState("all");
32942
+ const containerRef = React91.useRef(null);
32943
+ const [autoScroll, setAutoScroll] = React91.useState(true);
32944
+ React91.useEffect(() => {
32233
32945
  if (autoScroll && containerRef.current) {
32234
32946
  containerRef.current.scrollTop = containerRef.current.scrollHeight;
32235
32947
  }
32236
32948
  }, [events2.length, autoScroll]);
32237
- const filteredEvents = React90.useMemo(() => {
32949
+ const filteredEvents = React91.useMemo(() => {
32238
32950
  if (filter === "all") return events2;
32239
32951
  return events2.filter((e) => e.type === filter);
32240
32952
  }, [events2, filter]);
@@ -32333,7 +33045,7 @@ function EventFlowTab({ events: events2 }) {
32333
33045
  }
32334
33046
  EventFlowTab.displayName = "EventFlowTab";
32335
33047
  function GuardsPanel({ guards }) {
32336
- const [filter, setFilter] = React90.useState("all");
33048
+ const [filter, setFilter] = React91.useState("all");
32337
33049
  if (guards.length === 0) {
32338
33050
  return /* @__PURE__ */ jsx(
32339
33051
  EmptyState,
@@ -32346,7 +33058,7 @@ function GuardsPanel({ guards }) {
32346
33058
  }
32347
33059
  const passedCount = guards.filter((g) => g.result).length;
32348
33060
  const failedCount = guards.length - passedCount;
32349
- const filteredGuards = React90.useMemo(() => {
33061
+ const filteredGuards = React91.useMemo(() => {
32350
33062
  if (filter === "all") return guards;
32351
33063
  if (filter === "passed") return guards.filter((g) => g.result);
32352
33064
  return guards.filter((g) => !g.result);
@@ -32490,10 +33202,10 @@ function EffectBadge({ effect }) {
32490
33202
  ] });
32491
33203
  }
32492
33204
  function TransitionTimeline({ transitions }) {
32493
- const containerRef = React90.useRef(null);
32494
- const [autoScroll, setAutoScroll] = React90.useState(true);
32495
- const [expandedId, setExpandedId] = React90.useState(null);
32496
- React90.useEffect(() => {
33205
+ const containerRef = React91.useRef(null);
33206
+ const [autoScroll, setAutoScroll] = React91.useState(true);
33207
+ const [expandedId, setExpandedId] = React91.useState(null);
33208
+ React91.useEffect(() => {
32497
33209
  if (autoScroll && containerRef.current) {
32498
33210
  containerRef.current.scrollTop = containerRef.current.scrollHeight;
32499
33211
  }
@@ -32754,9 +33466,9 @@ function getAllEvents(traits2) {
32754
33466
  }
32755
33467
  function EventDispatcherTab({ traits: traits2, schema }) {
32756
33468
  const eventBus = useEventBus();
32757
- const [log, setLog] = React90.useState([]);
32758
- const prevStatesRef = React90.useRef(/* @__PURE__ */ new Map());
32759
- React90.useEffect(() => {
33469
+ const [log, setLog] = React91.useState([]);
33470
+ const prevStatesRef = React91.useRef(/* @__PURE__ */ new Map());
33471
+ React91.useEffect(() => {
32760
33472
  for (const trait of traits2) {
32761
33473
  const prev = prevStatesRef.current.get(trait.id);
32762
33474
  if (prev && prev !== trait.currentState) {
@@ -32839,10 +33551,10 @@ function RuntimeDebugger({
32839
33551
  defaultTab,
32840
33552
  schema
32841
33553
  }) {
32842
- const [isCollapsed, setIsCollapsed] = React90.useState(mode === "verify" ? true : defaultCollapsed);
32843
- const [isVisible, setIsVisible] = React90.useState(mode === "inline" || mode === "verify" || isDebugEnabled2());
33554
+ const [isCollapsed, setIsCollapsed] = React91.useState(mode === "verify" ? true : defaultCollapsed);
33555
+ const [isVisible, setIsVisible] = React91.useState(mode === "inline" || mode === "verify" || isDebugEnabled2());
32844
33556
  const debugData = useDebugData();
32845
- React90.useEffect(() => {
33557
+ React91.useEffect(() => {
32846
33558
  if (mode === "inline") return;
32847
33559
  return onDebugToggle((enabled) => {
32848
33560
  setIsVisible(enabled);
@@ -32851,7 +33563,7 @@ function RuntimeDebugger({
32851
33563
  }
32852
33564
  });
32853
33565
  }, [mode]);
32854
- React90.useEffect(() => {
33566
+ React91.useEffect(() => {
32855
33567
  if (mode === "inline") return;
32856
33568
  const handleKeyDown = (e) => {
32857
33569
  if (e.key === "`" && isVisible) {
@@ -32985,7 +33697,7 @@ function RuntimeDebugger({
32985
33697
  {
32986
33698
  className: cn(
32987
33699
  "runtime-debugger runtime-debugger--verify",
32988
- "h-[35vh] flex flex-col bg-gray-900 text-white border-t-2 border-cyan-500",
33700
+ "fixed bottom-0 left-0 right-0 z-[9999] h-[35vh] flex flex-col bg-gray-900 text-white border-t-2 border-cyan-500",
32989
33701
  className
32990
33702
  ),
32991
33703
  "data-testid": "debugger-verify",
@@ -33298,7 +34010,7 @@ var Timeline = ({
33298
34010
  }) => {
33299
34011
  const { t } = useTranslate();
33300
34012
  const entityData = Array.isArray(entity) ? entity : [];
33301
- const items = React90__default.useMemo(() => {
34013
+ const items = React91__default.useMemo(() => {
33302
34014
  if (propItems) return propItems;
33303
34015
  if (entityData.length === 0) return [];
33304
34016
  return entityData.map((record, idx) => {
@@ -33400,7 +34112,7 @@ var Timeline = ({
33400
34112
  };
33401
34113
  Timeline.displayName = "Timeline";
33402
34114
  function extractToastProps(children) {
33403
- if (!React90__default.isValidElement(children)) {
34115
+ if (!React91__default.isValidElement(children)) {
33404
34116
  if (typeof children === "string") {
33405
34117
  return { message: children };
33406
34118
  }
@@ -33431,7 +34143,7 @@ var ToastSlot = ({
33431
34143
  eventBus.emit("UI:CLOSE");
33432
34144
  };
33433
34145
  if (!isVisible) return null;
33434
- const isCustomContent = React90__default.isValidElement(children) && !message;
34146
+ const isCustomContent = React91__default.isValidElement(children) && !message;
33435
34147
  return /* @__PURE__ */ jsx(Box, { className: "fixed bottom-4 right-4 z-50", children: isCustomContent ? children : /* @__PURE__ */ jsx(
33436
34148
  Toast,
33437
34149
  {
@@ -33473,12 +34185,12 @@ WorldMapTemplate.displayName = "WorldMapTemplate";
33473
34185
 
33474
34186
  // components/organisms/component-registry.generated.ts
33475
34187
  function lazyThree(name, loader) {
33476
- const Lazy = React90__default.lazy(() => loader().then((m) => ({ default: m[name] })));
34188
+ const Lazy = React91__default.lazy(() => loader().then((m) => ({ default: m[name] })));
33477
34189
  function ThreeWrapper(props) {
33478
- return React90__default.createElement(
33479
- React90__default.Suspense,
34190
+ return React91__default.createElement(
34191
+ React91__default.Suspense,
33480
34192
  { fallback: null },
33481
- React90__default.createElement(Lazy, props)
34193
+ React91__default.createElement(Lazy, props)
33482
34194
  );
33483
34195
  }
33484
34196
  ThreeWrapper.displayName = `Lazy(${name})`;
@@ -33766,7 +34478,7 @@ function SuspenseConfigProvider({
33766
34478
  config,
33767
34479
  children
33768
34480
  }) {
33769
- return React90__default.createElement(
34481
+ return React91__default.createElement(
33770
34482
  SuspenseConfigContext.Provider,
33771
34483
  { value: config },
33772
34484
  children
@@ -36149,7 +36861,7 @@ function EntityDataProvider({
36149
36861
  adapter,
36150
36862
  children
36151
36863
  }) {
36152
- return React90__default.createElement(
36864
+ return React91__default.createElement(
36153
36865
  EntityDataContext.Provider,
36154
36866
  { value: adapter },
36155
36867
  children
@@ -36975,4 +37687,4 @@ function useGitHubBranches(owner, repo, enabled = true) {
36975
37687
  });
36976
37688
  }
36977
37689
 
36978
- export { ALL_PRESETS, AR_BOOK_FIELDS, AboutPageTemplate, Accordion, ActionButton, ActionButtons, Card2 as ActionCard, ActionPalette, ActionTile, Alert, AnimatedCounter, AnimatedGraphic, AnimatedReveal, ArticleSection, AuthLayout, Avatar, Badge, BattleBoard, BattleTemplate, BookChapterView, BookCoverPage, BookNavBar, BookTableOfContents, BookViewer, Box, Breadcrumb, BuilderBoard, Button, ButtonGroup, CTABanner, CalendarGrid, CanvasEffect, Card, CardBody, CardContent, CardFooter, CardGrid, CardHeader, CardTitle, Carousel, CaseStudyCard, CaseStudyOrganism, CastleBoard, CastleTemplate, Center, Chart, ChartLegend, Checkbox, ChoiceButton, ClassifierBoard, CodeBlock, CodeExample, CodeView, CodeViewer, CollapsibleSection, CombatLog, ComboCounter, CommunityLinks, ConditionalWrapper, ConfettiEffect, ConfirmDialog, Container, ContentRenderer, ContentSection, ControlButton, CounterTemplate, CraftingRecipe, DEFAULT_SLOTS, DIAMOND_TOP_Y, DPad, DamageNumber, DashboardGrid, DashboardLayout, DataGrid, DataList, DataTable, DateRangeSelector, DayCell, DebuggerBoard, DetailPanel, DialogueBox, DialogueBubble, Divider, DocumentViewer, StateMachineView as DomStateMachineVisualizer, Drawer, DrawerSlot, ENTITY_EVENTS, EdgeDecoration, EditorCheckbox, EditorSelect, EditorSlider, EditorTextInput, EditorToolbar, EmptyState, EnemyPlate, EntityDataProvider, EntityDisplayEvents, ErrorBoundary, ErrorState, EventHandlerBoard, EventLog, FEATURE_COLORS, FEATURE_TYPES, FLOOR_HEIGHT, FeatureCard, FeatureDetailPageTemplate, FeatureGrid, FeatureGridOrganism, FilterGroup, Flex, FlipCard, FlipContainer, FloatingActionButton, Form, FormActions, FormField, FormLayout, FormSection, FormSectionHeader, GameAudioContext, GameAudioProvider, GameAudioToggle, GameCanvas2D, GameHud, GameMenu, GameOverScreen, GameShell, GameTemplate, GenericAppTemplate, GeometricPattern, GraphCanvas, GraphView, Grid, HStack, Header, Heading, HealthBar, HealthPanel, HeroOrganism, HeroSection, I18nProvider, IDENTITY_BOOK_FIELDS, Icon, InfiniteScrollSentinel, Input, InputGroup, InstallBox, InventoryGrid, InventoryPanel, IsometricCanvas, ItemSlot, JazariStateMachine, Label, LandingPageTemplate, LawReferenceTooltip, Lightbox, LineChart, List, LoadingState, MapView, MarkdownContent, MarketingStatCard, MasterDetail, MediaGallery, Menu, Meter, MiniMap, Modal, ModalSlot, Navigation, NegotiatorBoard, NotifyListener, NumberStepper, ObjectRulePanel, StateMachineView as OrbitalStateMachineView, OrbitalVisualization, Overlay, PageHeader, Pagination, PatternTile, PhysicsManager, PlatformerCanvas, Popover, PowerupSlots, PricingCard, PricingGrid, PricingOrganism, PricingPageTemplate, ProgressBar, ProgressDots, PullToRefresh, QuestTracker, QuizBlock, Radio, RangeSlider, RelationSelect, RepeatableFormSection, ResourceBar, ResourceCounter, RuleEditor, RuntimeDebugger, SHEET_COLUMNS, SPRITE_SHEET_LAYOUT, ScaledDiagram, ScoreBoard, ScoreDisplay, SearchInput, Section, SectionHeader, Select, SequenceBar, SequencerBoard, ServiceCatalog, ShowcaseCard, ShowcaseOrganism, SidePanel, Sidebar, SignaturePad, SimpleGrid, SimulationCanvas, SimulationControls, SimulationGraph, SimulatorBoard, Skeleton, SlotContentRenderer, SocialProof, SortableList, Spacer, Spinner, Split, SplitPane, SplitSection, Sprite, Stack, StarRating, StatBadge, StatCard, StatDisplay, StateArchitectBoard, StateIndicator, StateMachineView, StateNode2 as StateNode, StatsGrid, StatsOrganism, StatusBar, StatusDot, StatusEffect, StepFlow, StepFlowOrganism, SwipeableRow, Switch, TERRAIN_COLORS, TILE_HEIGHT, TILE_WIDTH, TabbedContainer, Table, Tabs, TagCloud, TeamCard, TeamOrganism, TerrainPalette, Text, TextHighlight, Textarea, ThemeSelector, ThemeToggle, TimeSlotCell, Timeline, TimerDisplay, Toast, ToastSlot, Tooltip, TraitSlot, TraitStateViewer, TransitionArrow, TrendIndicator, TurnIndicator, TurnPanel, TypewriterText, Typography, UISlotComponent, UISlotRenderer, UncontrolledBattleBoard, UnitCommandBar, UploadDropZone, VStack, VariablePanel, ViolationAlert, WaypointMarker, WizardContainer, WizardNavigation, WizardProgress, WorldMapBoard, WorldMapTemplate, XPBar, applyTemporaryEffect, calculateAttackTargets, calculateDamage, calculateValidMoves, clearEntities, cn, combatAnimations, combatClasses, combatEffects, createInitialGameState, createTranslate, createUnitAnimationState, drawSprite, entityDataKeys, generateCombatMessage, getAllEntities, getByType, getCurrentFrame, getEntity, getSingleton, getTileDimensions, inferDirection, isoToScreen, mapBookData, parseQueryBinding, pendulum, projectileMotion, removeEntity, resolveFieldMap, resolveFrame, resolveSheetDirection, screenToIso, spawnEntity, springOscillator, tickAnimationState, transitionAnimation, updateEntity, updateSingleton, useAgentChat, useAuthContext, useBattleState, useCamera, useCompile, useConnectGitHub, useCreateEntity, useDeepAgentGeneration, useDeleteEntity, useDisconnectGitHub, useDragReorder, useEmitEvent, useEntities, useEntitiesByType, useEntity, useEntity2 as useEntityById, useEntityDataAdapter, useEntityDetail, useEntityList, useEntityListSuspense, useEntityMutations, useEntitySuspense, useEventBus, useEventListener, useExtensions, useFileEditor, useFileSystem, useGameAudio, useGameAudioContext, useGitHubBranches, useGitHubRepo, useGitHubRepos, useGitHubStatus, useImageCache, useInfiniteScroll, useInput, useLongPress, useOrbitalHistory, useOrbitalMutations, usePhysics, usePhysics2D, usePinchZoom, usePlayer, usePreview, usePullToRefresh, useQuerySingleton, useResolvedEntity, useSelectedEntity, useSendOrbitalEvent, useSingletonEntity, useSpriteAnimations, useSwipeGesture, useTranslate, useUIEvents, useUISlotManager, useUpdateEntity, useValidation };
37690
+ export { ALL_PRESETS, AR_BOOK_FIELDS, AboutPageTemplate, Accordion, ActionButton, ActionButtons, Card2 as ActionCard, ActionPalette, ActionTile, Alert, AnimatedCounter, AnimatedGraphic, AnimatedReveal, ArticleSection, AuthLayout, Avatar, Badge, BattleBoard, BattleTemplate, BehaviorNode, BookChapterView, BookCoverPage, BookNavBar, BookTableOfContents, BookViewer, Box, Breadcrumb, BuilderBoard, Button, ButtonGroup, CTABanner, CalendarGrid, CanvasEffect, Card, CardBody, CardContent, CardFooter, CardGrid, CardHeader, CardTitle, Carousel, CaseStudyCard, CaseStudyOrganism, CastleBoard, CastleTemplate, Center, Chart, ChartLegend, Checkbox, ChoiceButton, ClassifierBoard, CodeBlock, CodeExample, CodeView, CodeViewer, CollapsibleSection, CombatLog, ComboCounter, CommunityLinks, ConditionalWrapper, ConfettiEffect, ConfirmDialog, Container, ContentRenderer, ContentSection, ControlButton, CounterTemplate, CraftingRecipe, DEFAULT_SLOTS, DIAMOND_TOP_Y, DPad, DamageNumber, DashboardGrid, DashboardLayout, DataGrid, DataList, DataTable, DateRangeSelector, DayCell, DebuggerBoard, DetailPanel, DialogueBox, DialogueBubble, Divider, DocumentViewer, StateMachineView as DomStateMachineVisualizer, Drawer, DrawerSlot, ENTITY_EVENTS, EdgeDecoration, EditorCheckbox, EditorSelect, EditorSlider, EditorTextInput, EditorToolbar, EffectNode, EmptyState, EnemyPlate, EntityDataProvider, EntityDisplayEvents, ErrorBoundary, ErrorState, EventHandlerBoard, EventLog, EventWireEdge, ExprNode, FEATURE_COLORS, FEATURE_TYPES, FLOOR_HEIGHT, FeatureCard, FeatureDetailPageTemplate, FeatureGrid, FeatureGridOrganism, FilterGroup, Flex, FlipCard, FlipContainer, FloatingActionButton, FlowLabel, FlowMinimap, FlowNodeShell, FlowPort, FlowStateNode, FlowWire, Form, FormActions, FormField, FormLayout, FormSection, FormSectionHeader, GameAudioContext, GameAudioProvider, GameAudioToggle, GameCanvas2D, GameHud, GameMenu, GameOverScreen, GameShell, GameTemplate, GenericAppTemplate, GeometricPattern, GraphCanvas, GraphView, Grid, HStack, Header, Heading, HealthBar, HealthPanel, HeroOrganism, HeroSection, I18nProvider, IDENTITY_BOOK_FIELDS, Icon, InfiniteScrollSentinel, Input, InputGroup, InstallBox, InventoryGrid, InventoryPanel, IsometricCanvas, ItemSlot, JazariStateMachine, Label, LandingPageTemplate, LawReferenceTooltip, Lightbox, LineChart, List, LoadingState, MINIMAP_COLORS, MapView, MarkdownContent, MarketingStatCard, MasterDetail, MediaGallery, Menu, Meter, MiniMap, Modal, ModalSlot, Navigation, NegotiatorBoard, NodePalette, NotifyListener, NumberStepper, ObjectRulePanel, OrbitalNode, StateMachineView as OrbitalStateMachineView, OrbitalVisualization, Overlay, PageHeader, Pagination, PatternTile, PhysicsManager, PlatformerCanvas, Popover, PowerupSlots, PricingCard, PricingGrid, PricingOrganism, PricingPageTemplate, ProgressBar, ProgressDots, PullToRefresh, QuestTracker, QuizBlock, Radio, RangeSlider, RelationSelect, RepeatableFormSection, ResourceBar, ResourceCounter, RuleEditor, RuntimeDebugger, SHEET_COLUMNS, SPRITE_SHEET_LAYOUT, ScaledDiagram, ScoreBoard, ScoreDisplay, SearchInput, Section, SectionHeader, Select, SequenceBar, SequencerBoard, ServiceCatalog, ShowcaseCard, ShowcaseOrganism, SidePanel, Sidebar, SignaturePad, SimpleGrid, SimulationCanvas, SimulationControls, SimulationGraph, SimulatorBoard, Skeleton, SlotContentRenderer, SocialProof, SortableList, Spacer, Spinner, Split, SplitPane, SplitSection, Sprite, Stack, StarRating, StatBadge, StatCard, StatDisplay, StateArchitectBoard, StateIndicator, StateMachineView, StateNode2 as StateNode, StatsGrid, StatsOrganism, StatusBar, StatusDot, StatusEffect, StepFlow, StepFlowOrganism, SwipeableRow, Switch, TERRAIN_COLORS, TILE_HEIGHT, TILE_WIDTH, TabbedContainer, Table, Tabs, TagCloud, TeamCard, TeamOrganism, TerrainPalette, Text, TextHighlight, Textarea, ThemeSelector, ThemeToggle, TimeSlotCell, Timeline, TimerDisplay, Toast, ToastSlot, Tooltip, TraitSlot, TraitStateViewer, TransitionArrow, TransitionEdge, TrendIndicator, TurnIndicator, TurnPanel, TypewriterText, Typography, UISlotComponent, UISlotRenderer, UncontrolledBattleBoard, UnitCommandBar, UploadDropZone, VStack, VariablePanel, ViolationAlert, WaypointMarker, WizardContainer, WizardNavigation, WizardProgress, WorldMapBoard, WorldMapTemplate, XPBar, applyTemporaryEffect, calculateAttackTargets, calculateDamage, calculateValidMoves, clearEntities, cn, combatAnimations, combatClasses, combatEffects, createInitialGameState, createTranslate, createUnitAnimationState, drawSprite, entityDataKeys, generateCombatMessage, getAllEntities, getByType, getCurrentFrame, getEntity, getFlowWireStyle, getSingleton, getTileDimensions, inferDirection, isoToScreen, mapBookData, parseQueryBinding, pendulum, projectileMotion, removeEntity, resolveFieldMap, resolveFrame, resolveSheetDirection, screenToIso, spawnEntity, springOscillator, tickAnimationState, transitionAnimation, updateEntity, updateSingleton, useAgentChat, useAuthContext, useBattleState, useCamera, useCompile, useConnectGitHub, useCreateEntity, useDeepAgentGeneration, useDeleteEntity, useDisconnectGitHub, useDragReorder, useEmitEvent, useEntities, useEntitiesByType, useEntity, useEntity2 as useEntityById, useEntityDataAdapter, useEntityDetail, useEntityList, useEntityListSuspense, useEntityMutations, useEntitySuspense, useEventBus, useEventListener, useExtensions, useFileEditor, useFileSystem, useGameAudio, useGameAudioContext, useGitHubBranches, useGitHubRepo, useGitHubRepos, useGitHubStatus, useImageCache, useInfiniteScroll, useInput, useLongPress, useOrbitalHistory, useOrbitalMutations, usePhysics, usePhysics2D, usePinchZoom, usePlayer, usePreview, usePullToRefresh, useQuerySingleton, useResolvedEntity, useSelectedEntity, useSendOrbitalEvent, useSingletonEntity, useSpriteAnimations, useSwipeGesture, useTranslate, useUIEvents, useUISlotManager, useUpdateEntity, useValidation };