@almadar/ui 4.49.0 → 4.50.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/avl/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
2
2
  import { OrbitControls as OrbitControls$1, Grid as Grid$1, Stars, Sparkles, Html, RoundedBox } from '@react-three/drei';
3
- import * as React147 from 'react';
4
- import React147__default, { createContext, useState, useEffect, useMemo, useContext, useRef, useCallback, Suspense, useLayoutEffect, Profiler, useReducer, lazy, useId, forwardRef, useImperativeHandle, Component } from 'react';
3
+ import * as React93 from 'react';
4
+ import React93__default, { createContext, useState, useEffect, useMemo, useContext, useRef, useCallback, Suspense, useLayoutEffect, Profiler, useReducer, lazy, useId, forwardRef, useImperativeHandle, Component } from 'react';
5
5
  import { createLogger, isLogLevelEnabled } from '@almadar/logger';
6
6
  import ELK from 'elkjs/lib/elk.bundled.js';
7
7
  import { MarkerType, Handle, Position, getBezierPath, EdgeLabelRenderer, BaseEdge, ReactFlowProvider, useNodesState, useEdgesState, useReactFlow, ReactFlow, Controls, Background, BackgroundVariant } from '@xyflow/react';
@@ -34,6 +34,9 @@ import langToml from 'react-syntax-highlighter/dist/esm/languages/prism/toml.js'
34
34
  import langGo from 'react-syntax-highlighter/dist/esm/languages/prism/go.js';
35
35
  import langGraphql from 'react-syntax-highlighter/dist/esm/languages/prism/graphql.js';
36
36
  import { FieldTypeSchema, isInlineTrait, isEntityCall, schemaToIR, getPage, isCircuitEvent } from '@almadar/core';
37
+ import { useSensors, useSensor, PointerSensor, KeyboardSensor, DndContext, closestCenter, useDroppable } from '@dnd-kit/core';
38
+ import { sortableKeyboardCoordinates, arrayMove, useSortable, SortableContext, rectSortingStrategy, verticalListSortingStrategy } from '@dnd-kit/sortable';
39
+ import { CSS } from '@dnd-kit/utilities';
37
40
  import { useThree, useFrame, Canvas } from '@react-three/fiber';
38
41
  import * as THREE6 from 'three';
39
42
  import { Vector3, QuadraticBezierCurve3, MathUtils, Quaternion } from 'three';
@@ -3723,7 +3726,7 @@ var init_Box = __esm({
3723
3726
  fixed: "fixed",
3724
3727
  sticky: "sticky"
3725
3728
  };
3726
- Box = React147__default.forwardRef(
3729
+ Box = React93__default.forwardRef(
3727
3730
  ({
3728
3731
  padding,
3729
3732
  paddingX,
@@ -4736,7 +4739,7 @@ var init_MiniStateMachine = __esm({
4736
4739
  const x = 2 + i * (NODE_W + GAP + ARROW_W + GAP);
4737
4740
  const tc = transitionCounts[s.name] ?? 0;
4738
4741
  const role = getStateRole(s.name, s.isInitial, s.isTerminal, tc, maxTC);
4739
- return /* @__PURE__ */ jsxs(React147__default.Fragment, { children: [
4742
+ return /* @__PURE__ */ jsxs(React93__default.Fragment, { children: [
4740
4743
  /* @__PURE__ */ jsx(
4741
4744
  AvlState,
4742
4745
  {
@@ -6198,7 +6201,7 @@ function resolveIconProp(value, sizeClass) {
6198
6201
  const IconComp = value;
6199
6202
  return /* @__PURE__ */ jsx(IconComp, { className: sizeClass });
6200
6203
  }
6201
- if (React147__default.isValidElement(value)) {
6204
+ if (React93__default.isValidElement(value)) {
6202
6205
  return value;
6203
6206
  }
6204
6207
  if (typeof value === "object" && value !== null && "render" in value) {
@@ -6274,7 +6277,7 @@ var init_Button = __esm({
6274
6277
  md: "h-4 w-4",
6275
6278
  lg: "h-5 w-5"
6276
6279
  };
6277
- Button = React147__default.forwardRef(
6280
+ Button = React93__default.forwardRef(
6278
6281
  ({
6279
6282
  className,
6280
6283
  variant = "primary",
@@ -6377,7 +6380,7 @@ var init_Badge = __esm({
6377
6380
  md: "px-2.5 py-1 text-sm",
6378
6381
  lg: "px-3 py-1.5 text-base"
6379
6382
  };
6380
- Badge = React147__default.forwardRef(
6383
+ Badge = React93__default.forwardRef(
6381
6384
  ({ className, variant = "default", size = "sm", amount, label, icon, children, ...props }, ref) => {
6382
6385
  const iconSizes3 = { sm: "w-3 h-3", md: "w-3.5 h-3.5", lg: "w-4 h-4" };
6383
6386
  const resolvedIcon = typeof icon === "string" ? (() => {
@@ -6671,7 +6674,7 @@ var init_SvgFlow = __esm({
6671
6674
  opacity = 1,
6672
6675
  className
6673
6676
  }) => {
6674
- const markerId = React147__default.useMemo(() => {
6677
+ const markerId = React93__default.useMemo(() => {
6675
6678
  flowIdCounter += 1;
6676
6679
  return `almadar-flow-arrow-${flowIdCounter}`;
6677
6680
  }, []);
@@ -7214,7 +7217,7 @@ var init_SvgRing = __esm({
7214
7217
  className,
7215
7218
  label
7216
7219
  }) => {
7217
- const gradientId = React147__default.useMemo(() => {
7220
+ const gradientId = React93__default.useMemo(() => {
7218
7221
  ringIdCounter += 1;
7219
7222
  return `almadar-ring-glow-${ringIdCounter}`;
7220
7223
  }, []);
@@ -7375,7 +7378,7 @@ var Input;
7375
7378
  var init_Input = __esm({
7376
7379
  "components/atoms/Input.tsx"() {
7377
7380
  init_cn();
7378
- Input = React147__default.forwardRef(
7381
+ Input = React93__default.forwardRef(
7379
7382
  ({
7380
7383
  className,
7381
7384
  inputType,
@@ -7493,7 +7496,7 @@ var Label;
7493
7496
  var init_Label = __esm({
7494
7497
  "components/atoms/Label.tsx"() {
7495
7498
  init_cn();
7496
- Label = React147__default.forwardRef(
7499
+ Label = React93__default.forwardRef(
7497
7500
  ({ className, required, children, ...props }, ref) => {
7498
7501
  return /* @__PURE__ */ jsxs(
7499
7502
  "label",
@@ -7519,7 +7522,7 @@ var Textarea;
7519
7522
  var init_Textarea = __esm({
7520
7523
  "components/atoms/Textarea.tsx"() {
7521
7524
  init_cn();
7522
- Textarea = React147__default.forwardRef(
7525
+ Textarea = React93__default.forwardRef(
7523
7526
  ({ className, error, ...props }, ref) => {
7524
7527
  return /* @__PURE__ */ jsx(
7525
7528
  "textarea",
@@ -7548,7 +7551,7 @@ var Select;
7548
7551
  var init_Select = __esm({
7549
7552
  "components/atoms/Select.tsx"() {
7550
7553
  init_cn();
7551
- Select = React147__default.forwardRef(
7554
+ Select = React93__default.forwardRef(
7552
7555
  ({ className, options, placeholder, error, ...props }, ref) => {
7553
7556
  return /* @__PURE__ */ jsxs("div", { className: "relative", children: [
7554
7557
  /* @__PURE__ */ jsxs(
@@ -7590,7 +7593,7 @@ var Checkbox;
7590
7593
  var init_Checkbox = __esm({
7591
7594
  "components/atoms/Checkbox.tsx"() {
7592
7595
  init_cn();
7593
- Checkbox = React147__default.forwardRef(
7596
+ Checkbox = React93__default.forwardRef(
7594
7597
  ({ className, label, id, ...props }, ref) => {
7595
7598
  const inputId = id || `checkbox-${Math.random().toString(36).substr(2, 9)}`;
7596
7599
  return /* @__PURE__ */ jsxs("div", { className: "flex items-center", children: [
@@ -7672,7 +7675,7 @@ var init_Card = __esm({
7672
7675
  md: "shadow",
7673
7676
  lg: "shadow-lg"
7674
7677
  };
7675
- Card = React147__default.forwardRef(
7678
+ Card = React93__default.forwardRef(
7676
7679
  ({
7677
7680
  className,
7678
7681
  variant = "bordered",
@@ -7708,9 +7711,9 @@ var init_Card = __esm({
7708
7711
  }
7709
7712
  );
7710
7713
  Card.displayName = "Card";
7711
- CardHeader = React147__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("mb-4", className), ...props }));
7714
+ CardHeader = React93__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("mb-4", className), ...props }));
7712
7715
  CardHeader.displayName = "CardHeader";
7713
- CardTitle = React147__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
7716
+ CardTitle = React93__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
7714
7717
  "h3",
7715
7718
  {
7716
7719
  ref,
@@ -7723,11 +7726,11 @@ var init_Card = __esm({
7723
7726
  }
7724
7727
  ));
7725
7728
  CardTitle.displayName = "CardTitle";
7726
- CardContent = React147__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("", className), ...props }));
7729
+ CardContent = React93__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("", className), ...props }));
7727
7730
  CardContent.displayName = "CardContent";
7728
7731
  CardBody = CardContent;
7729
7732
  CardBody.displayName = "CardBody";
7730
- CardFooter = React147__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
7733
+ CardFooter = React93__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
7731
7734
  "div",
7732
7735
  {
7733
7736
  ref,
@@ -7782,7 +7785,7 @@ var init_FilterPill = __esm({
7782
7785
  md: "w-3.5 h-3.5",
7783
7786
  lg: "w-4 h-4"
7784
7787
  };
7785
- FilterPill = React147__default.forwardRef(
7788
+ FilterPill = React93__default.forwardRef(
7786
7789
  ({
7787
7790
  className,
7788
7791
  variant = "default",
@@ -7861,7 +7864,7 @@ var init_Spinner = __esm({
7861
7864
  md: "h-6 w-6",
7862
7865
  lg: "h-8 w-8"
7863
7866
  };
7864
- Spinner = React147__default.forwardRef(
7867
+ Spinner = React93__default.forwardRef(
7865
7868
  ({ className, size = "md", ...props }, ref) => {
7866
7869
  return /* @__PURE__ */ jsx(
7867
7870
  "div",
@@ -8309,7 +8312,7 @@ var Radio;
8309
8312
  var init_Radio = __esm({
8310
8313
  "components/atoms/Radio.tsx"() {
8311
8314
  init_cn();
8312
- Radio = React147__default.forwardRef(
8315
+ Radio = React93__default.forwardRef(
8313
8316
  ({
8314
8317
  label,
8315
8318
  helperText,
@@ -8420,7 +8423,7 @@ var init_Switch = __esm({
8420
8423
  "components/atoms/Switch.tsx"() {
8421
8424
  "use client";
8422
8425
  init_cn();
8423
- Switch = React147.forwardRef(
8426
+ Switch = React93.forwardRef(
8424
8427
  ({
8425
8428
  checked,
8426
8429
  defaultChecked = false,
@@ -8431,10 +8434,10 @@ var init_Switch = __esm({
8431
8434
  name,
8432
8435
  className
8433
8436
  }, ref) => {
8434
- const [isChecked, setIsChecked] = React147.useState(
8437
+ const [isChecked, setIsChecked] = React93.useState(
8435
8438
  checked !== void 0 ? checked : defaultChecked
8436
8439
  );
8437
- React147.useEffect(() => {
8440
+ React93.useEffect(() => {
8438
8441
  if (checked !== void 0) {
8439
8442
  setIsChecked(checked);
8440
8443
  }
@@ -8768,8 +8771,8 @@ var init_LawReferenceTooltip = __esm({
8768
8771
  position = "top",
8769
8772
  className
8770
8773
  }) => {
8771
- const [isVisible, setIsVisible] = React147__default.useState(false);
8772
- const timeoutRef = React147__default.useRef(null);
8774
+ const [isVisible, setIsVisible] = React93__default.useState(false);
8775
+ const timeoutRef = React93__default.useRef(null);
8773
8776
  const handleMouseEnter = () => {
8774
8777
  if (timeoutRef.current) clearTimeout(timeoutRef.current);
8775
8778
  timeoutRef.current = setTimeout(() => setIsVisible(true), 200);
@@ -8778,7 +8781,7 @@ var init_LawReferenceTooltip = __esm({
8778
8781
  if (timeoutRef.current) clearTimeout(timeoutRef.current);
8779
8782
  setIsVisible(false);
8780
8783
  };
8781
- React147__default.useEffect(() => {
8784
+ React93__default.useEffect(() => {
8782
8785
  return () => {
8783
8786
  if (timeoutRef.current) clearTimeout(timeoutRef.current);
8784
8787
  };
@@ -8988,7 +8991,7 @@ var init_StatusDot = __esm({
8988
8991
  md: "w-2.5 h-2.5",
8989
8992
  lg: "w-3 h-3"
8990
8993
  };
8991
- StatusDot = React147__default.forwardRef(
8994
+ StatusDot = React93__default.forwardRef(
8992
8995
  ({ className, status = "offline", pulse = false, size = "md", label, ...props }, ref) => {
8993
8996
  return /* @__PURE__ */ jsx(
8994
8997
  "span",
@@ -9041,7 +9044,7 @@ var init_TrendIndicator = __esm({
9041
9044
  down: TrendingDown,
9042
9045
  flat: ArrowRight
9043
9046
  };
9044
- TrendIndicator = React147__default.forwardRef(
9047
+ TrendIndicator = React93__default.forwardRef(
9045
9048
  ({
9046
9049
  className,
9047
9050
  value,
@@ -9108,7 +9111,7 @@ var init_RangeSlider = __esm({
9108
9111
  md: "w-4 h-4",
9109
9112
  lg: "w-5 h-5"
9110
9113
  };
9111
- RangeSlider = React147__default.forwardRef(
9114
+ RangeSlider = React93__default.forwardRef(
9112
9115
  ({
9113
9116
  className,
9114
9117
  min = 0,
@@ -9676,7 +9679,7 @@ var init_ContentSection = __esm({
9676
9679
  md: "py-16",
9677
9680
  lg: "py-24"
9678
9681
  };
9679
- ContentSection = React147__default.forwardRef(
9682
+ ContentSection = React93__default.forwardRef(
9680
9683
  ({ children, background = "default", padding = "lg", id, className }, ref) => {
9681
9684
  return /* @__PURE__ */ jsx(
9682
9685
  Box,
@@ -10210,7 +10213,7 @@ var init_AnimatedReveal = __esm({
10210
10213
  "scale-up": { opacity: 1, transform: "scale(1) translateY(0)" },
10211
10214
  "none": {}
10212
10215
  };
10213
- AnimatedReveal = React147__default.forwardRef(
10216
+ AnimatedReveal = React93__default.forwardRef(
10214
10217
  ({
10215
10218
  trigger = "scroll",
10216
10219
  animation = "fade-up",
@@ -10370,7 +10373,7 @@ var init_AnimatedGraphic = __esm({
10370
10373
  "components/atoms/AnimatedGraphic.tsx"() {
10371
10374
  "use client";
10372
10375
  init_cn();
10373
- AnimatedGraphic = React147__default.forwardRef(
10376
+ AnimatedGraphic = React93__default.forwardRef(
10374
10377
  ({
10375
10378
  src,
10376
10379
  svgContent,
@@ -10393,7 +10396,7 @@ var init_AnimatedGraphic = __esm({
10393
10396
  const fetchedSvg = useFetchedSvg(svgContent ? void 0 : src);
10394
10397
  const resolvedSvg = svgContent ?? fetchedSvg;
10395
10398
  const prevAnimateRef = useRef(animate);
10396
- const setRef = React147__default.useCallback(
10399
+ const setRef = React93__default.useCallback(
10397
10400
  (node) => {
10398
10401
  containerRef.current = node;
10399
10402
  if (typeof ref === "function") ref(node);
@@ -10620,9 +10623,9 @@ function ScoreDisplay({
10620
10623
  ...rest
10621
10624
  }) {
10622
10625
  const resolvedValue = typeof value === "number" && !Number.isNaN(value) ? value : typeof rest.score === "number" && !Number.isNaN(rest.score) ? rest.score : 0;
10623
- const [displayValue, setDisplayValue] = React147.useState(resolvedValue);
10624
- const [isAnimating, setIsAnimating] = React147.useState(false);
10625
- React147.useEffect(() => {
10626
+ const [displayValue, setDisplayValue] = React93.useState(resolvedValue);
10627
+ const [isAnimating, setIsAnimating] = React93.useState(false);
10628
+ React93.useEffect(() => {
10626
10629
  if (!animated || displayValue === resolvedValue) {
10627
10630
  setDisplayValue(resolvedValue);
10628
10631
  return;
@@ -10692,9 +10695,9 @@ function ControlButton({
10692
10695
  className
10693
10696
  }) {
10694
10697
  const eventBus = useEventBus();
10695
- const [isPressed, setIsPressed] = React147.useState(false);
10698
+ const [isPressed, setIsPressed] = React93.useState(false);
10696
10699
  const actualPressed = pressed ?? isPressed;
10697
- const handlePointerDown = React147.useCallback(
10700
+ const handlePointerDown = React93.useCallback(
10698
10701
  (e) => {
10699
10702
  e.preventDefault();
10700
10703
  if (disabled) return;
@@ -10704,7 +10707,7 @@ function ControlButton({
10704
10707
  },
10705
10708
  [disabled, pressEvent, eventBus, onPress]
10706
10709
  );
10707
- const handlePointerUp = React147.useCallback(
10710
+ const handlePointerUp = React93.useCallback(
10708
10711
  (e) => {
10709
10712
  e.preventDefault();
10710
10713
  if (disabled) return;
@@ -10714,7 +10717,7 @@ function ControlButton({
10714
10717
  },
10715
10718
  [disabled, releaseEvent, eventBus, onRelease]
10716
10719
  );
10717
- const handlePointerLeave = React147.useCallback(
10720
+ const handlePointerLeave = React93.useCallback(
10718
10721
  (e) => {
10719
10722
  if (isPressed) {
10720
10723
  setIsPressed(false);
@@ -11620,9 +11623,9 @@ function MiniMap({
11620
11623
  viewportRect,
11621
11624
  className
11622
11625
  }) {
11623
- const canvasRef = React147.useRef(null);
11624
- const frameRef = React147.useRef(0);
11625
- React147.useEffect(() => {
11626
+ const canvasRef = React93.useRef(null);
11627
+ const frameRef = React93.useRef(0);
11628
+ React93.useEffect(() => {
11626
11629
  const canvas = canvasRef.current;
11627
11630
  if (!canvas) return;
11628
11631
  const ctx = canvas.getContext("2d");
@@ -11916,7 +11919,7 @@ var init_ErrorBoundary = __esm({
11916
11919
  "use client";
11917
11920
  init_cn();
11918
11921
  init_ErrorState();
11919
- ErrorBoundary = class extends React147__default.Component {
11922
+ ErrorBoundary = class extends React93__default.Component {
11920
11923
  constructor(props) {
11921
11924
  super(props);
11922
11925
  __publicField(this, "reset", () => {
@@ -12991,8 +12994,8 @@ var init_Tooltip = __esm({
12991
12994
  if (hideTimeoutRef.current) clearTimeout(hideTimeoutRef.current);
12992
12995
  };
12993
12996
  }, []);
12994
- const triggerElement = React147__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
12995
- const trigger = React147__default.cloneElement(triggerElement, {
12997
+ const triggerElement = React93__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
12998
+ const trigger = React93__default.cloneElement(triggerElement, {
12996
12999
  ref: triggerRef,
12997
13000
  onMouseEnter: handleMouseEnter,
12998
13001
  onMouseLeave: handleMouseLeave,
@@ -13113,8 +13116,8 @@ var init_Popover = __esm({
13113
13116
  onMouseEnter: handleOpen,
13114
13117
  onMouseLeave: handleClose
13115
13118
  };
13116
- const childElement = React147__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
13117
- const triggerElement = React147__default.cloneElement(
13119
+ const childElement = React93__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
13120
+ const triggerElement = React93__default.cloneElement(
13118
13121
  childElement,
13119
13122
  {
13120
13123
  ref: triggerRef,
@@ -13231,8 +13234,8 @@ var init_Menu = __esm({
13231
13234
  "bottom-start": "top-full left-0 mt-2",
13232
13235
  "bottom-end": "top-full right-0 mt-2"
13233
13236
  };
13234
- const triggerChild = React147__default.isValidElement(trigger) ? trigger : /* @__PURE__ */ jsx("span", { children: trigger });
13235
- const triggerElement = React147__default.cloneElement(
13237
+ const triggerChild = React93__default.isValidElement(trigger) ? trigger : /* @__PURE__ */ jsx("span", { children: trigger });
13238
+ const triggerElement = React93__default.cloneElement(
13236
13239
  triggerChild,
13237
13240
  {
13238
13241
  ref: triggerRef,
@@ -13648,7 +13651,7 @@ var init_MapView = __esm({
13648
13651
  shadowSize: [41, 41]
13649
13652
  });
13650
13653
  L.Marker.prototype.options.icon = defaultIcon;
13651
- const { useEffect: useEffect87, useRef: useRef87, useCallback: useCallback127, useState: useState121 } = React147__default;
13654
+ const { useEffect: useEffect87, useRef: useRef87, useCallback: useCallback127, useState: useState121 } = React93__default;
13652
13655
  const { Typography: Typography2 } = await Promise.resolve().then(() => (init_Typography(), Typography_exports));
13653
13656
  const { useEventBus: useEventBus3 } = await Promise.resolve().then(() => (init_useEventBus(), useEventBus_exports));
13654
13657
  function MapUpdater({ centerLat, centerLng, zoom }) {
@@ -13894,7 +13897,7 @@ function InputPattern({
13894
13897
  fieldName
13895
13898
  }) {
13896
13899
  const { emit } = useEventBus();
13897
- const [localValue, setLocalValue] = React147__default.useState(value);
13900
+ const [localValue, setLocalValue] = React93__default.useState(value);
13898
13901
  const handleChange = (e) => {
13899
13902
  setLocalValue(e.target.value);
13900
13903
  if (onChange) {
@@ -13932,7 +13935,7 @@ function TextareaPattern({
13932
13935
  fieldName
13933
13936
  }) {
13934
13937
  const { emit } = useEventBus();
13935
- const [localValue, setLocalValue] = React147__default.useState(value);
13938
+ const [localValue, setLocalValue] = React93__default.useState(value);
13936
13939
  const handleChange = (e) => {
13937
13940
  setLocalValue(e.target.value);
13938
13941
  if (onChange) {
@@ -13964,7 +13967,7 @@ function SelectPattern({
13964
13967
  fieldName
13965
13968
  }) {
13966
13969
  const { emit } = useEventBus();
13967
- const [localValue, setLocalValue] = React147__default.useState(value);
13970
+ const [localValue, setLocalValue] = React93__default.useState(value);
13968
13971
  const handleChange = (e) => {
13969
13972
  setLocalValue(e.target.value);
13970
13973
  if (onChange) {
@@ -13993,7 +13996,7 @@ function CheckboxPattern({
13993
13996
  className
13994
13997
  }) {
13995
13998
  const { emit } = useEventBus();
13996
- const [localChecked, setLocalChecked] = React147__default.useState(checked);
13999
+ const [localChecked, setLocalChecked] = React93__default.useState(checked);
13997
14000
  const handleChange = (e) => {
13998
14001
  setLocalChecked(e.target.checked);
13999
14002
  if (onChange) {
@@ -14224,8 +14227,8 @@ function ActionButtons({
14224
14227
  disabled
14225
14228
  }) {
14226
14229
  const eventBus = useEventBus();
14227
- const [activeButtons, setActiveButtons] = React147.useState(/* @__PURE__ */ new Set());
14228
- const handlePress = React147.useCallback(
14230
+ const [activeButtons, setActiveButtons] = React93.useState(/* @__PURE__ */ new Set());
14231
+ const handlePress = React93.useCallback(
14229
14232
  (id) => {
14230
14233
  setActiveButtons((prev) => new Set(prev).add(id));
14231
14234
  if (actionEvent) eventBus.emit(`UI:${actionEvent}`, { id, pressed: true });
@@ -14233,7 +14236,7 @@ function ActionButtons({
14233
14236
  },
14234
14237
  [actionEvent, eventBus, onAction]
14235
14238
  );
14236
- const handleRelease = React147.useCallback(
14239
+ const handleRelease = React93.useCallback(
14237
14240
  (id) => {
14238
14241
  setActiveButtons((prev) => {
14239
14242
  const next = new Set(prev);
@@ -16297,7 +16300,7 @@ var init_MarkdownContent = __esm({
16297
16300
  init_Box();
16298
16301
  init_useTranslate();
16299
16302
  init_cn();
16300
- MarkdownContent = React147__default.memo(
16303
+ MarkdownContent = React93__default.memo(
16301
16304
  ({ content, direction, className }) => {
16302
16305
  const { t: _t } = useTranslate();
16303
16306
  const safeContent = typeof content === "string" ? content : String(content ?? "");
@@ -16515,7 +16518,7 @@ var init_CodeBlock = __esm({
16515
16518
  log8 = createLogger("almadar:ui:markdown-code");
16516
16519
  LINE_PROPS_FN = (n) => ({ "data-line": String(n - 1) });
16517
16520
  HIDDEN_LINE_NUMBERS = { display: "none" };
16518
- CodeBlock = React147__default.memo(
16521
+ CodeBlock = React93__default.memo(
16519
16522
  ({
16520
16523
  code: rawCode,
16521
16524
  language = "text",
@@ -17824,7 +17827,7 @@ var init_StateMachineView = __esm({
17824
17827
  style: { top: title ? 30 : 0 },
17825
17828
  children: [
17826
17829
  entity && /* @__PURE__ */ jsx(EntityBox, { entity, config }),
17827
- states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(React147__default.Fragment, { children: renderStateNode(state, config) }, state.id) : /* @__PURE__ */ jsx(
17830
+ states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(React93__default.Fragment, { children: renderStateNode(state, config) }, state.id) : /* @__PURE__ */ jsx(
17828
17831
  StateNode,
17829
17832
  {
17830
17833
  state,
@@ -24268,7 +24271,7 @@ function CraftingRecipe({
24268
24271
  className
24269
24272
  }) {
24270
24273
  const eventBus = useEventBus();
24271
- const handleCraft = React147.useCallback(() => {
24274
+ const handleCraft = React93.useCallback(() => {
24272
24275
  onCraft?.();
24273
24276
  if (craftEvent) {
24274
24277
  eventBus.emit(craftEvent, { output: output.label });
@@ -24285,7 +24288,7 @@ function CraftingRecipe({
24285
24288
  children: [
24286
24289
  /* @__PURE__ */ jsx(HStack, { gap: "xs", className: "flex-wrap items-center", children: inputs.map((ingredient, index) => {
24287
24290
  const hasSufficient = ingredient.available >= ingredient.required;
24288
- return /* @__PURE__ */ jsxs(React147.Fragment, { children: [
24291
+ return /* @__PURE__ */ jsxs(React93.Fragment, { children: [
24289
24292
  /* @__PURE__ */ jsx(Box, { className: "relative", children: /* @__PURE__ */ jsx(
24290
24293
  ItemSlot,
24291
24294
  {
@@ -24348,8 +24351,8 @@ function DPad({
24348
24351
  }) {
24349
24352
  const eventBus = useEventBus();
24350
24353
  const sizes = sizeMap15[size];
24351
- const [activeDirections, setActiveDirections] = React147.useState(/* @__PURE__ */ new Set());
24352
- const handlePress = React147.useCallback(
24354
+ const [activeDirections, setActiveDirections] = React93.useState(/* @__PURE__ */ new Set());
24355
+ const handlePress = React93.useCallback(
24353
24356
  (direction) => {
24354
24357
  setActiveDirections((prev) => new Set(prev).add(direction));
24355
24358
  if (directionEvent) eventBus.emit(`UI:${directionEvent}`, { direction, pressed: true });
@@ -24357,7 +24360,7 @@ function DPad({
24357
24360
  },
24358
24361
  [directionEvent, eventBus, onDirection]
24359
24362
  );
24360
- const handleRelease = React147.useCallback(
24363
+ const handleRelease = React93.useCallback(
24361
24364
  (direction) => {
24362
24365
  setActiveDirections((prev) => {
24363
24366
  const next = new Set(prev);
@@ -24857,6 +24860,192 @@ var init_DashboardLayout = __esm({
24857
24860
  NavLink.displayName = "NavLink";
24858
24861
  }
24859
24862
  });
24863
+ function useDataDnd(args) {
24864
+ const {
24865
+ dragGroup,
24866
+ accepts,
24867
+ sortable,
24868
+ dropEvent,
24869
+ reorderEvent,
24870
+ dndItemIdField = "id",
24871
+ items,
24872
+ layout
24873
+ } = args;
24874
+ const enabled = Boolean(dragGroup || accepts || sortable);
24875
+ const eventBus = useEventBus();
24876
+ const parentRoot = React93__default.useContext(RootCtx);
24877
+ const isRoot = enabled && parentRoot === null;
24878
+ const [localOrder, setLocalOrder] = React93__default.useState(null);
24879
+ const orderedItems = localOrder ?? items;
24880
+ React93__default.useEffect(() => {
24881
+ setLocalOrder(null);
24882
+ }, [items]);
24883
+ const itemIds = React93__default.useMemo(
24884
+ () => orderedItems.map((it, idx) => {
24885
+ const raw = it[dndItemIdField];
24886
+ return raw ?? `__idx_${idx}`;
24887
+ }),
24888
+ [orderedItems, dndItemIdField]
24889
+ );
24890
+ const zonesRef = React93__default.useRef(/* @__PURE__ */ new Map());
24891
+ const registerZone = React93__default.useCallback((zoneId2, meta2) => {
24892
+ zonesRef.current.set(zoneId2, meta2);
24893
+ }, []);
24894
+ const unregisterZone = React93__default.useCallback((zoneId2) => {
24895
+ zonesRef.current.delete(zoneId2);
24896
+ }, []);
24897
+ const zoneId = React93__default.useId();
24898
+ const ownGroup = dragGroup ?? accepts ?? zoneId;
24899
+ const meta = React93__default.useMemo(
24900
+ () => ({ group: ownGroup, dropEvent, reorderEvent, itemIds }),
24901
+ [ownGroup, dropEvent, reorderEvent, itemIds]
24902
+ );
24903
+ React93__default.useEffect(() => {
24904
+ const target = isRoot ? null : parentRoot;
24905
+ if (!target) {
24906
+ zonesRef.current.set(zoneId, meta);
24907
+ return () => zonesRef.current.delete(zoneId);
24908
+ }
24909
+ target.registerZone(zoneId, meta);
24910
+ return () => target.unregisterZone(zoneId);
24911
+ }, [parentRoot, isRoot, zoneId, meta]);
24912
+ const sensors = useSensors(
24913
+ useSensor(PointerSensor, { activationConstraint: { distance: 5 } }),
24914
+ useSensor(KeyboardSensor, { coordinateGetter: sortableKeyboardCoordinates })
24915
+ );
24916
+ const findZoneByItem = React93__default.useCallback(
24917
+ (id) => {
24918
+ for (const z of zonesRef.current.values()) {
24919
+ if (z.itemIds.includes(id)) return z;
24920
+ }
24921
+ return void 0;
24922
+ },
24923
+ []
24924
+ );
24925
+ const findZoneByGroup = React93__default.useCallback(
24926
+ (group) => {
24927
+ for (const z of zonesRef.current.values()) {
24928
+ if (z.group === group) return z;
24929
+ }
24930
+ return void 0;
24931
+ },
24932
+ []
24933
+ );
24934
+ const handleDragEnd = React93__default.useCallback(
24935
+ (event) => {
24936
+ const { active, over } = event;
24937
+ if (!over) return;
24938
+ const sourceZone = findZoneByItem(active.id);
24939
+ const overData = over.data?.current;
24940
+ const targetGroup = overData?.dndGroup;
24941
+ if (!sourceZone || !targetGroup) return;
24942
+ const targetZone = findZoneByGroup(targetGroup);
24943
+ if (!targetZone) return;
24944
+ if (sourceZone.group !== targetZone.group) {
24945
+ if (targetZone.dropEvent) {
24946
+ const newIndex2 = targetZone.itemIds.indexOf(over.id);
24947
+ eventBus.emit(targetZone.dropEvent, {
24948
+ id: String(active.id),
24949
+ sourceGroup: sourceZone.group,
24950
+ targetGroup: targetZone.group,
24951
+ newIndex: newIndex2 === -1 ? targetZone.itemIds.length : newIndex2
24952
+ });
24953
+ }
24954
+ return;
24955
+ }
24956
+ const oldIndex = sourceZone.itemIds.indexOf(active.id);
24957
+ const newIndex = sourceZone.itemIds.indexOf(over.id);
24958
+ if (oldIndex === -1 || newIndex === -1 || oldIndex === newIndex) return;
24959
+ if (sourceZone.group === ownGroup) {
24960
+ const reordered = arrayMove(orderedItems, oldIndex, newIndex);
24961
+ setLocalOrder(reordered);
24962
+ }
24963
+ if (sourceZone.reorderEvent) {
24964
+ eventBus.emit(sourceZone.reorderEvent, {
24965
+ id: String(active.id),
24966
+ oldIndex,
24967
+ newIndex
24968
+ });
24969
+ }
24970
+ },
24971
+ [orderedItems, ownGroup, findZoneByItem, findZoneByGroup, eventBus]
24972
+ );
24973
+ const SortableItem = React93__default.useCallback(
24974
+ ({ id, children }) => {
24975
+ const {
24976
+ attributes,
24977
+ listeners: listeners6,
24978
+ setNodeRef,
24979
+ transform,
24980
+ transition,
24981
+ isDragging
24982
+ } = useSortable({ id, data: { dndGroup: ownGroup } });
24983
+ const style = {
24984
+ transform: CSS.Transform.toString(transform),
24985
+ transition,
24986
+ opacity: isDragging ? 0.4 : 1,
24987
+ cursor: enabled ? "grab" : void 0
24988
+ };
24989
+ return /* @__PURE__ */ jsx(
24990
+ Box,
24991
+ {
24992
+ className: "touch-none",
24993
+ ref: setNodeRef,
24994
+ style,
24995
+ ...attributes,
24996
+ ...listeners6,
24997
+ children
24998
+ }
24999
+ );
25000
+ },
25001
+ [ownGroup, enabled]
25002
+ );
25003
+ const DropZoneShell = ({ children }) => {
25004
+ const { setNodeRef, isOver } = useDroppable({
25005
+ id: `dnd-zone-${zoneId}`,
25006
+ data: { dndGroup: ownGroup }
25007
+ });
25008
+ return /* @__PURE__ */ jsx(
25009
+ Box,
25010
+ {
25011
+ ref: setNodeRef,
25012
+ className: isOver ? "ring-2 ring-primary ring-offset-2 rounded-lg" : void 0,
25013
+ children
25014
+ }
25015
+ );
25016
+ };
25017
+ const rootContextValue = React93__default.useMemo(
25018
+ () => ({ registerZone, unregisterZone }),
25019
+ [registerZone, unregisterZone]
25020
+ );
25021
+ const wrapContainer = React93__default.useCallback(
25022
+ (children) => {
25023
+ if (!enabled) return children;
25024
+ const strategy = layout === "grid" ? rectSortingStrategy : verticalListSortingStrategy;
25025
+ const inner = /* @__PURE__ */ jsx(DropZoneShell, { children: /* @__PURE__ */ jsx(SortableContext, { items: itemIds, strategy, children }) });
25026
+ if (isRoot) {
25027
+ return /* @__PURE__ */ jsx(RootCtx.Provider, { value: rootContextValue, children: /* @__PURE__ */ jsx(DndContext, { sensors, collisionDetection: closestCenter, onDragEnd: handleDragEnd, children: inner }) });
25028
+ }
25029
+ return inner;
25030
+ },
25031
+ [enabled, layout, sensors, handleDragEnd, itemIds, isRoot, rootContextValue]
25032
+ );
25033
+ return {
25034
+ enabled,
25035
+ wrapContainer,
25036
+ SortableItem,
25037
+ orderedItems
25038
+ };
25039
+ }
25040
+ var RootCtx;
25041
+ var init_useDataDnd = __esm({
25042
+ "components/molecules/useDataDnd.tsx"() {
25043
+ "use client";
25044
+ init_useEventBus();
25045
+ init_Box();
25046
+ RootCtx = React93__default.createContext(null);
25047
+ }
25048
+ });
24860
25049
  function fieldLabel2(key) {
24861
25050
  return key.replace(/([a-z])([A-Z])/g, "$1 $2").replace(/[_-]/g, " ").replace(/\b\w/g, (c) => c.toUpperCase());
24862
25051
  }
@@ -24920,14 +25109,31 @@ function DataGrid({
24920
25109
  hasMore,
24921
25110
  children,
24922
25111
  pageSize = 0,
24923
- renderItem: schemaRenderItem
25112
+ renderItem: schemaRenderItem,
25113
+ dragGroup,
25114
+ accepts,
25115
+ sortable,
25116
+ dropEvent,
25117
+ reorderEvent,
25118
+ dndItemIdField
24924
25119
  }) {
24925
25120
  const eventBus = useEventBus();
24926
25121
  const { t } = useTranslate();
24927
25122
  const [selectedIds, setSelectedIds] = useState(/* @__PURE__ */ new Set());
24928
25123
  const [visibleCount, setVisibleCount] = useState(pageSize || Infinity);
24929
25124
  const fieldDefs = fields ?? columns ?? [];
24930
- const allData = Array.isArray(entity) ? entity : entity ? [entity] : [];
25125
+ const allDataRaw = Array.isArray(entity) ? entity : entity ? [entity] : [];
25126
+ const dnd = useDataDnd({
25127
+ items: allDataRaw,
25128
+ layout: "grid",
25129
+ dragGroup,
25130
+ accepts,
25131
+ sortable,
25132
+ dropEvent,
25133
+ reorderEvent,
25134
+ dndItemIdField
25135
+ });
25136
+ const allData = dnd.orderedItems;
24931
25137
  const data = pageSize > 0 ? allData.slice(0, visibleCount) : allData;
24932
25138
  const hasMoreLocal = pageSize > 0 && visibleCount < allData.length;
24933
25139
  const toggleSelection = useCallback((id) => {
@@ -24999,196 +25205,205 @@ function DataGrid({
24999
25205
  const allIds = data.map((item, i) => item.id || String(i));
25000
25206
  const allSelected = allIds.length > 0 && allIds.every((id) => selectedIds.has(id));
25001
25207
  const someSelected = selectedIds.size > 0;
25002
- return /* @__PURE__ */ jsxs(VStack, { gap: "sm", children: [
25003
- selectable && someSelected && /* @__PURE__ */ jsxs(HStack, { gap: "sm", className: "items-center px-2 py-2 bg-muted rounded-sm", children: [
25208
+ const idFieldName = dndItemIdField ?? "id";
25209
+ return dnd.wrapContainer(
25210
+ /* @__PURE__ */ jsxs(VStack, { gap: "sm", children: [
25211
+ selectable && someSelected && /* @__PURE__ */ jsxs(HStack, { gap: "sm", className: "items-center px-2 py-2 bg-muted rounded-sm", children: [
25212
+ /* @__PURE__ */ jsx(
25213
+ "input",
25214
+ {
25215
+ type: "checkbox",
25216
+ checked: allSelected,
25217
+ onChange: toggleAll,
25218
+ className: "w-4 h-4 accent-primary",
25219
+ "aria-label": "Select all"
25220
+ }
25221
+ ),
25222
+ /* @__PURE__ */ jsxs(Typography, { variant: "caption", className: "font-semibold", children: [
25223
+ selectedIds.size,
25224
+ " ",
25225
+ t("common.selected") || "selected"
25226
+ ] })
25227
+ ] }),
25004
25228
  /* @__PURE__ */ jsx(
25005
- "input",
25229
+ Box,
25006
25230
  {
25007
- type: "checkbox",
25008
- checked: allSelected,
25009
- onChange: toggleAll,
25010
- className: "w-4 h-4 accent-primary",
25011
- "aria-label": "Select all"
25012
- }
25013
- ),
25014
- /* @__PURE__ */ jsxs(Typography, { variant: "caption", className: "font-semibold", children: [
25015
- selectedIds.size,
25016
- " ",
25017
- t("common.selected") || "selected"
25018
- ] })
25019
- ] }),
25020
- /* @__PURE__ */ jsx(
25021
- Box,
25022
- {
25023
- className: cn("grid", gapStyles6[gap], colsClass, className),
25024
- style: gridTemplateColumns ? { gridTemplateColumns } : void 0,
25025
- children: data.map((item, index) => {
25026
- const itemData = item;
25027
- const id = itemData.id || String(index);
25028
- const isSelected = selectedIds.has(id);
25029
- if (hasRenderProp) {
25030
- return /* @__PURE__ */ jsx(
25031
- Box,
25032
- {
25033
- "data-entity-row": true,
25034
- "data-entity-id": id,
25035
- className: cn(isSelected && "ring-2 ring-primary rounded-lg"),
25036
- children: children(itemData, index)
25037
- },
25038
- id
25039
- );
25040
- }
25041
- const titleValue = getNestedValue(itemData, titleField?.name ?? "");
25042
- return /* @__PURE__ */ jsxs(
25043
- Box,
25044
- {
25045
- "data-entity-row": true,
25046
- "data-entity-id": id,
25047
- className: cn(
25048
- "bg-card rounded-lg",
25049
- "border border-border",
25050
- "shadow-sm hover:shadow-lg",
25051
- "hover:border-primary transition-all",
25052
- "flex flex-col",
25053
- isSelected && "ring-2 ring-primary border-primary"
25054
- ),
25055
- children: [
25056
- imageField && (() => {
25057
- const imgUrl = getNestedValue(itemData, imageField);
25058
- if (!imgUrl || typeof imgUrl !== "string") return null;
25059
- return /* @__PURE__ */ jsx(Box, { className: "w-full aspect-video overflow-hidden rounded-t-lg", children: /* @__PURE__ */ jsx(
25060
- "img",
25061
- {
25062
- src: imgUrl,
25063
- alt: titleValue !== void 0 ? String(titleValue) : "",
25064
- className: "w-full h-full object-cover",
25065
- loading: "lazy"
25066
- }
25067
- ) });
25068
- })(),
25069
- /* @__PURE__ */ jsx(Box, { className: "p-4 pb-0", children: /* @__PURE__ */ jsxs(HStack, { gap: "sm", className: "justify-between items-start", children: [
25070
- selectable && /* @__PURE__ */ jsx(
25071
- "input",
25072
- {
25073
- type: "checkbox",
25074
- checked: isSelected,
25075
- onChange: () => toggleSelection(id),
25076
- onClick: (e) => e.stopPropagation(),
25077
- className: "w-4 h-4 mt-1 flex-shrink-0 accent-primary",
25078
- "aria-label": `Select ${titleValue !== void 0 ? String(titleValue) : "item"}`
25079
- }
25231
+ className: cn("grid", gapStyles6[gap], colsClass, className),
25232
+ style: gridTemplateColumns ? { gridTemplateColumns } : void 0,
25233
+ children: data.map((item, index) => {
25234
+ const itemData = item;
25235
+ const id = itemData.id || String(index);
25236
+ const isSelected = selectedIds.has(id);
25237
+ const dndId = itemData[idFieldName] ?? `__idx_${index}`;
25238
+ const wrapDnd = (node) => dnd.enabled ? /* @__PURE__ */ jsx(dnd.SortableItem, { id: dndId, children: node }) : node;
25239
+ if (hasRenderProp) {
25240
+ return wrapDnd(
25241
+ /* @__PURE__ */ jsx(
25242
+ Box,
25243
+ {
25244
+ "data-entity-row": true,
25245
+ "data-entity-id": id,
25246
+ className: cn(isSelected && "ring-2 ring-primary rounded-lg"),
25247
+ children: children(itemData, index)
25248
+ },
25249
+ id
25250
+ )
25251
+ );
25252
+ }
25253
+ const titleValue = getNestedValue(itemData, titleField?.name ?? "");
25254
+ return wrapDnd(
25255
+ /* @__PURE__ */ jsxs(
25256
+ Box,
25257
+ {
25258
+ "data-entity-row": true,
25259
+ "data-entity-id": id,
25260
+ className: cn(
25261
+ "bg-card rounded-lg",
25262
+ "border border-border",
25263
+ "shadow-sm hover:shadow-lg",
25264
+ "hover:border-primary transition-all",
25265
+ "flex flex-col",
25266
+ isSelected && "ring-2 ring-primary border-primary"
25080
25267
  ),
25081
- /* @__PURE__ */ jsxs(VStack, { gap: "xs", className: "flex-1 min-w-0", children: [
25082
- titleValue !== void 0 && titleValue !== null && /* @__PURE__ */ jsxs(HStack, { gap: "xs", className: "items-center", children: [
25083
- titleField?.icon && /* @__PURE__ */ jsx(Icon, { name: titleField.icon, size: "sm", className: "text-primary flex-shrink-0" }),
25084
- /* @__PURE__ */ jsx(
25085
- Typography,
25268
+ children: [
25269
+ imageField && (() => {
25270
+ const imgUrl = getNestedValue(itemData, imageField);
25271
+ if (!imgUrl || typeof imgUrl !== "string") return null;
25272
+ return /* @__PURE__ */ jsx(Box, { className: "w-full aspect-video overflow-hidden rounded-t-lg", children: /* @__PURE__ */ jsx(
25273
+ "img",
25086
25274
  {
25087
- variant: titleField?.variant === "h3" ? "h3" : "h4",
25088
- className: "font-semibold truncate",
25089
- children: String(titleValue)
25275
+ src: imgUrl,
25276
+ alt: titleValue !== void 0 ? String(titleValue) : "",
25277
+ className: "w-full h-full object-cover",
25278
+ loading: "lazy"
25090
25279
  }
25091
- )
25092
- ] }),
25093
- badgeFields.length > 0 && /* @__PURE__ */ jsx(HStack, { gap: "xs", className: "flex-wrap", children: badgeFields.map((field) => {
25094
- const val = getNestedValue(itemData, field.name);
25095
- if (val === void 0 || val === null) return null;
25096
- return /* @__PURE__ */ jsxs(HStack, { gap: "xs", className: "items-center", children: [
25097
- field.icon && /* @__PURE__ */ jsx(Icon, { name: field.icon, size: "xs" }),
25098
- /* @__PURE__ */ jsx(Badge, { variant: resolveBadgeVariant(field, String(val)), children: String(val) })
25099
- ] }, field.name);
25100
- }) })
25101
- ] }),
25102
- dangerActions.length > 0 && /* @__PURE__ */ jsx(HStack, { gap: "xs", className: "flex-shrink-0", children: dangerActions.map((action, idx) => /* @__PURE__ */ jsxs(
25103
- Button,
25104
- {
25105
- variant: "ghost",
25106
- size: "sm",
25107
- onClick: handleActionClick(action, itemData),
25108
- "data-testid": `action-${action.event}`,
25109
- "data-row-id": String(itemData.id),
25110
- className: "text-error hover:text-error hover:bg-error/10 px-2",
25111
- children: [
25112
- action.icon && /* @__PURE__ */ jsx(Icon, { name: action.icon, size: "xs" }),
25113
- action.label
25114
- ]
25115
- },
25116
- idx
25117
- )) })
25118
- ] }) }),
25119
- bodyFields.length > 0 && /* @__PURE__ */ jsx(Box, { className: "px-4 py-3 flex-1", children: /* @__PURE__ */ jsx(VStack, { gap: "xs", children: bodyFields.map((field) => {
25120
- const value = getNestedValue(itemData, field.name);
25121
- if (value === void 0 || value === null || value === "") return null;
25122
- if (field.format === "boolean") {
25123
- return /* @__PURE__ */ jsxs(HStack, { gap: "sm", className: "justify-between items-center", children: [
25124
- /* @__PURE__ */ jsxs(HStack, { gap: "xs", className: "items-center", children: [
25125
- field.icon && /* @__PURE__ */ jsx(Icon, { name: field.icon, size: "xs", className: "text-muted-foreground" }),
25126
- /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "secondary", children: field.label ?? fieldLabel2(field.name) })
25280
+ ) });
25281
+ })(),
25282
+ /* @__PURE__ */ jsx(Box, { className: "p-4 pb-0", children: /* @__PURE__ */ jsxs(HStack, { gap: "sm", className: "justify-between items-start", children: [
25283
+ selectable && /* @__PURE__ */ jsx(
25284
+ "input",
25285
+ {
25286
+ type: "checkbox",
25287
+ checked: isSelected,
25288
+ onChange: () => toggleSelection(id),
25289
+ onClick: (e) => e.stopPropagation(),
25290
+ className: "w-4 h-4 mt-1 flex-shrink-0 accent-primary",
25291
+ "aria-label": `Select ${titleValue !== void 0 ? String(titleValue) : "item"}`
25292
+ }
25293
+ ),
25294
+ /* @__PURE__ */ jsxs(VStack, { gap: "xs", className: "flex-1 min-w-0", children: [
25295
+ titleValue !== void 0 && titleValue !== null && /* @__PURE__ */ jsxs(HStack, { gap: "xs", className: "items-center", children: [
25296
+ titleField?.icon && /* @__PURE__ */ jsx(Icon, { name: titleField.icon, size: "sm", className: "text-primary flex-shrink-0" }),
25297
+ /* @__PURE__ */ jsx(
25298
+ Typography,
25299
+ {
25300
+ variant: titleField?.variant === "h3" ? "h3" : "h4",
25301
+ className: "font-semibold truncate",
25302
+ children: String(titleValue)
25303
+ }
25304
+ )
25305
+ ] }),
25306
+ badgeFields.length > 0 && /* @__PURE__ */ jsx(HStack, { gap: "xs", className: "flex-wrap", children: badgeFields.map((field) => {
25307
+ const val = getNestedValue(itemData, field.name);
25308
+ if (val === void 0 || val === null) return null;
25309
+ return /* @__PURE__ */ jsxs(HStack, { gap: "xs", className: "items-center", children: [
25310
+ field.icon && /* @__PURE__ */ jsx(Icon, { name: field.icon, size: "xs" }),
25311
+ /* @__PURE__ */ jsx(Badge, { variant: resolveBadgeVariant(field, String(val)), children: String(val) })
25312
+ ] }, field.name);
25313
+ }) })
25127
25314
  ] }),
25128
- /* @__PURE__ */ jsx(Badge, { variant: value ? "success" : "neutral", children: value ? t("common.yes") || "Yes" : t("common.no") || "No" })
25129
- ] }, field.name);
25130
- }
25131
- return /* @__PURE__ */ jsxs(HStack, { gap: "sm", className: "justify-between items-center", children: [
25132
- /* @__PURE__ */ jsxs(HStack, { gap: "xs", className: "items-center", children: [
25133
- field.icon && /* @__PURE__ */ jsx(Icon, { name: field.icon, size: "xs", className: "text-muted-foreground" }),
25134
- /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "secondary", children: field.label ?? fieldLabel2(field.name) })
25135
- ] }),
25136
- /* @__PURE__ */ jsx(
25137
- Typography,
25138
- {
25139
- variant: field.variant === "caption" ? "caption" : "small",
25140
- className: "text-right truncate max-w-[60%]",
25141
- children: formatValue(value, field.format)
25315
+ dangerActions.length > 0 && /* @__PURE__ */ jsx(HStack, { gap: "xs", className: "flex-shrink-0", children: dangerActions.map((action, idx) => /* @__PURE__ */ jsxs(
25316
+ Button,
25317
+ {
25318
+ variant: "ghost",
25319
+ size: "sm",
25320
+ onClick: handleActionClick(action, itemData),
25321
+ "data-testid": `action-${action.event}`,
25322
+ "data-row-id": String(itemData.id),
25323
+ className: "text-error hover:text-error hover:bg-error/10 px-2",
25324
+ children: [
25325
+ action.icon && /* @__PURE__ */ jsx(Icon, { name: action.icon, size: "xs" }),
25326
+ action.label
25327
+ ]
25328
+ },
25329
+ idx
25330
+ )) })
25331
+ ] }) }),
25332
+ bodyFields.length > 0 && /* @__PURE__ */ jsx(Box, { className: "px-4 py-3 flex-1", children: /* @__PURE__ */ jsx(VStack, { gap: "xs", children: bodyFields.map((field) => {
25333
+ const value = getNestedValue(itemData, field.name);
25334
+ if (value === void 0 || value === null || value === "") return null;
25335
+ if (field.format === "boolean") {
25336
+ return /* @__PURE__ */ jsxs(HStack, { gap: "sm", className: "justify-between items-center", children: [
25337
+ /* @__PURE__ */ jsxs(HStack, { gap: "xs", className: "items-center", children: [
25338
+ field.icon && /* @__PURE__ */ jsx(Icon, { name: field.icon, size: "xs", className: "text-muted-foreground" }),
25339
+ /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "secondary", children: field.label ?? fieldLabel2(field.name) })
25340
+ ] }),
25341
+ /* @__PURE__ */ jsx(Badge, { variant: value ? "success" : "neutral", children: value ? t("common.yes") || "Yes" : t("common.no") || "No" })
25342
+ ] }, field.name);
25142
25343
  }
25143
- )
25144
- ] }, field.name);
25145
- }) }) }),
25146
- primaryActions.length > 0 && /* @__PURE__ */ jsx(Box, { className: "px-4 py-3 mt-auto border-t border-border", children: /* @__PURE__ */ jsx(HStack, { gap: "sm", className: "justify-end", children: primaryActions.map((action, idx) => /* @__PURE__ */ jsxs(
25147
- Button,
25148
- {
25149
- variant: action.variant === "primary" ? "primary" : "ghost",
25150
- size: "sm",
25151
- onClick: handleActionClick(action, itemData),
25152
- "data-testid": `action-${action.event}`,
25153
- "data-row-id": String(itemData.id),
25154
- children: [
25155
- action.icon && /* @__PURE__ */ jsx(Icon, { name: action.icon, size: "xs", className: "mr-1" }),
25156
- action.label
25157
- ]
25158
- },
25159
- idx
25160
- )) }) })
25161
- ]
25162
- },
25163
- id
25164
- );
25165
- })
25166
- }
25167
- ),
25168
- hasMoreLocal && /* @__PURE__ */ jsx(Box, { className: "flex justify-center py-3", children: /* @__PURE__ */ jsxs(
25169
- Button,
25170
- {
25171
- variant: "ghost",
25172
- size: "sm",
25173
- onClick: () => setVisibleCount((prev) => prev + (pageSize || 5)),
25174
- children: [
25175
- /* @__PURE__ */ jsx(Icon, { name: "chevron-down", size: "xs", className: "mr-1" }),
25176
- t("common.showMore"),
25177
- " (",
25178
- allData.length - visibleCount,
25179
- " remaining)"
25180
- ]
25181
- }
25182
- ) }),
25183
- infiniteScroll && loadMoreEvent && /* @__PURE__ */ jsx(
25184
- InfiniteScrollSentinel,
25185
- {
25186
- loadMoreEvent,
25187
- isLoading,
25188
- hasMore
25189
- }
25190
- )
25191
- ] });
25344
+ return /* @__PURE__ */ jsxs(HStack, { gap: "sm", className: "justify-between items-center", children: [
25345
+ /* @__PURE__ */ jsxs(HStack, { gap: "xs", className: "items-center", children: [
25346
+ field.icon && /* @__PURE__ */ jsx(Icon, { name: field.icon, size: "xs", className: "text-muted-foreground" }),
25347
+ /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "secondary", children: field.label ?? fieldLabel2(field.name) })
25348
+ ] }),
25349
+ /* @__PURE__ */ jsx(
25350
+ Typography,
25351
+ {
25352
+ variant: field.variant === "caption" ? "caption" : "small",
25353
+ className: "text-right truncate max-w-[60%]",
25354
+ children: formatValue(value, field.format)
25355
+ }
25356
+ )
25357
+ ] }, field.name);
25358
+ }) }) }),
25359
+ primaryActions.length > 0 && /* @__PURE__ */ jsx(Box, { className: "px-4 py-3 mt-auto border-t border-border", children: /* @__PURE__ */ jsx(HStack, { gap: "sm", className: "justify-end", children: primaryActions.map((action, idx) => /* @__PURE__ */ jsxs(
25360
+ Button,
25361
+ {
25362
+ variant: action.variant === "primary" ? "primary" : "ghost",
25363
+ size: "sm",
25364
+ onClick: handleActionClick(action, itemData),
25365
+ "data-testid": `action-${action.event}`,
25366
+ "data-row-id": String(itemData.id),
25367
+ children: [
25368
+ action.icon && /* @__PURE__ */ jsx(Icon, { name: action.icon, size: "xs", className: "mr-1" }),
25369
+ action.label
25370
+ ]
25371
+ },
25372
+ idx
25373
+ )) }) })
25374
+ ]
25375
+ },
25376
+ id
25377
+ )
25378
+ );
25379
+ })
25380
+ }
25381
+ ),
25382
+ hasMoreLocal && /* @__PURE__ */ jsx(Box, { className: "flex justify-center py-3", children: /* @__PURE__ */ jsxs(
25383
+ Button,
25384
+ {
25385
+ variant: "ghost",
25386
+ size: "sm",
25387
+ onClick: () => setVisibleCount((prev) => prev + (pageSize || 5)),
25388
+ children: [
25389
+ /* @__PURE__ */ jsx(Icon, { name: "chevron-down", size: "xs", className: "mr-1" }),
25390
+ t("common.showMore"),
25391
+ " (",
25392
+ allData.length - visibleCount,
25393
+ " remaining)"
25394
+ ]
25395
+ }
25396
+ ) }),
25397
+ infiniteScroll && loadMoreEvent && /* @__PURE__ */ jsx(
25398
+ InfiniteScrollSentinel,
25399
+ {
25400
+ loadMoreEvent,
25401
+ isLoading,
25402
+ hasMore
25403
+ }
25404
+ )
25405
+ ] })
25406
+ );
25192
25407
  }
25193
25408
  var dataGridLog, BADGE_VARIANTS, gapStyles6;
25194
25409
  var init_DataGrid = __esm({
@@ -25205,6 +25420,7 @@ var init_DataGrid = __esm({
25205
25420
  init_Button();
25206
25421
  init_Icon();
25207
25422
  init_InfiniteScrollSentinel();
25423
+ init_useDataDnd();
25208
25424
  dataGridLog = createLogger("almadar:ui:data-grid");
25209
25425
  BADGE_VARIANTS = /* @__PURE__ */ new Set([
25210
25426
  "default",
@@ -25299,17 +25515,34 @@ function DataList({
25299
25515
  hasMore,
25300
25516
  children,
25301
25517
  pageSize = 5,
25302
- renderItem: schemaRenderItem
25518
+ renderItem: schemaRenderItem,
25519
+ dragGroup,
25520
+ accepts,
25521
+ sortable: sortableProp,
25522
+ dropEvent,
25523
+ reorderEvent: dndReorderEvent,
25524
+ dndItemIdField
25303
25525
  }) {
25304
25526
  const eventBus = useEventBus();
25305
25527
  const { t } = useTranslate();
25306
- const [visibleCount, setVisibleCount] = React147__default.useState(pageSize || Infinity);
25528
+ const [visibleCount, setVisibleCount] = React93__default.useState(pageSize || Infinity);
25307
25529
  const fieldDefs = fields ?? columns ?? [];
25308
- const allData = Array.isArray(entity) ? entity : entity ? [entity] : [];
25530
+ const allDataRaw = Array.isArray(entity) ? entity : entity ? [entity] : [];
25531
+ const dnd = useDataDnd({
25532
+ items: allDataRaw,
25533
+ layout: "list",
25534
+ dragGroup,
25535
+ accepts,
25536
+ sortable: sortableProp,
25537
+ dropEvent,
25538
+ reorderEvent: dndReorderEvent,
25539
+ dndItemIdField
25540
+ });
25541
+ const allData = dnd.orderedItems;
25309
25542
  const data = pageSize > 0 ? allData.slice(0, visibleCount) : allData;
25310
25543
  const hasMoreLocal = pageSize > 0 && visibleCount < allData.length;
25311
25544
  const hasRenderProp = typeof children === "function";
25312
- React147__default.useEffect(() => {
25545
+ React93__default.useEffect(() => {
25313
25546
  const renderItemTypeOf = typeof schemaRenderItem;
25314
25547
  const childrenTypeOf = typeof children;
25315
25548
  if (data.length > 0 && !hasRenderProp) {
@@ -25365,7 +25598,7 @@ function DataList({
25365
25598
  const items2 = data.map((item) => item);
25366
25599
  const groups2 = groupBy ? groupData(items2, groupBy) : [{ label: "", items: items2 }];
25367
25600
  const contentField = titleField?.name ?? fieldDefs[0]?.name ?? "";
25368
- return /* @__PURE__ */ jsx(VStack, { gap: "sm", className: cn("py-2", className), children: groups2.map((group, gi) => /* @__PURE__ */ jsxs(React147__default.Fragment, { children: [
25601
+ return /* @__PURE__ */ jsx(VStack, { gap: "sm", className: cn("py-2", className), children: groups2.map((group, gi) => /* @__PURE__ */ jsxs(React93__default.Fragment, { children: [
25369
25602
  group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: "my-2" }),
25370
25603
  group.items.map((itemData, index) => {
25371
25604
  const id = itemData.id || `${gi}-${index}`;
@@ -25413,18 +25646,112 @@ function DataList({
25413
25646
  }
25414
25647
  const items = data.map((item) => item);
25415
25648
  const groups = groupBy ? groupData(items, groupBy) : [{ label: "", items }];
25649
+ const idFieldName = dndItemIdField ?? "id";
25416
25650
  const renderItem = (itemData, index, isLast) => {
25651
+ const dndId = itemData[idFieldName] ?? `__idx_${index}`;
25652
+ const wrapDnd = (node) => dnd.enabled ? /* @__PURE__ */ jsx(dnd.SortableItem, { id: dndId, children: node }) : node;
25417
25653
  if (hasRenderProp) {
25418
25654
  const id2 = itemData.id || String(index);
25419
- return /* @__PURE__ */ jsxs(Box, { "data-entity-row": true, "data-entity-id": id2, children: [
25420
- /* @__PURE__ */ jsxs(Box, { className: "group flex items-stretch gap-2", children: [
25421
- /* @__PURE__ */ jsx(Box, { className: "flex-1 min-w-0", children: children(itemData, index) }),
25422
- itemActions && itemActions.length > 0 && /* @__PURE__ */ jsx(
25423
- HStack,
25424
- {
25425
- gap: "xs",
25426
- className: "flex-shrink-0",
25427
- children: itemActions.map((action, idx) => /* @__PURE__ */ jsxs(
25655
+ return wrapDnd(
25656
+ /* @__PURE__ */ jsxs(Box, { "data-entity-row": true, "data-entity-id": id2, children: [
25657
+ /* @__PURE__ */ jsxs(Box, { className: "group flex items-stretch gap-2", children: [
25658
+ /* @__PURE__ */ jsx(Box, { className: "flex-1 min-w-0", children: children(itemData, index) }),
25659
+ itemActions && itemActions.length > 0 && /* @__PURE__ */ jsx(
25660
+ HStack,
25661
+ {
25662
+ gap: "xs",
25663
+ className: "flex-shrink-0",
25664
+ children: itemActions.map((action, idx) => /* @__PURE__ */ jsxs(
25665
+ Button,
25666
+ {
25667
+ variant: action.variant ?? "ghost",
25668
+ size: "sm",
25669
+ onClick: handleActionClick(action, itemData),
25670
+ "data-testid": `action-${action.event}`,
25671
+ "data-row-id": String(itemData.id),
25672
+ className: cn(
25673
+ action.variant === "danger" && "text-error hover:bg-error/10"
25674
+ ),
25675
+ children: [
25676
+ action.icon && /* @__PURE__ */ jsx(Icon, { name: action.icon, size: "xs", className: "mr-1" }),
25677
+ action.label
25678
+ ]
25679
+ },
25680
+ idx
25681
+ ))
25682
+ }
25683
+ )
25684
+ ] }),
25685
+ isCard && !isLast && /* @__PURE__ */ jsx(Box, { className: "mx-6 border-b border-border/40" })
25686
+ ] }, id2)
25687
+ );
25688
+ }
25689
+ const id = itemData.id || String(index);
25690
+ const titleValue = getNestedValue(itemData, titleField?.name ?? "");
25691
+ return wrapDnd(
25692
+ /* @__PURE__ */ jsxs(Box, { "data-entity-row": true, "data-entity-id": id, children: [
25693
+ /* @__PURE__ */ jsxs(
25694
+ Box,
25695
+ {
25696
+ className: cn(
25697
+ "group flex items-center gap-4 transition-all duration-200",
25698
+ isCompact ? "px-4 py-2" : "px-6 py-4",
25699
+ "hover:bg-muted/80",
25700
+ !isCard && !isCompact && "rounded-lg border border-transparent hover:border-border"
25701
+ ),
25702
+ children: [
25703
+ /* @__PURE__ */ jsxs(Box, { className: "flex-1 min-w-0", children: [
25704
+ /* @__PURE__ */ jsxs(HStack, { gap: "sm", className: "items-center", children: [
25705
+ titleField?.icon && /* @__PURE__ */ jsx(
25706
+ Icon,
25707
+ {
25708
+ name: titleField.icon,
25709
+ size: isCompact ? "xs" : "sm",
25710
+ className: "text-primary flex-shrink-0"
25711
+ }
25712
+ ),
25713
+ titleValue !== void 0 && titleValue !== null && /* @__PURE__ */ jsx(
25714
+ Typography,
25715
+ {
25716
+ variant: titleField?.variant === "h3" ? "h3" : "h4",
25717
+ className: cn("font-semibold truncate flex-1", isCompact && "text-sm"),
25718
+ children: String(titleValue)
25719
+ }
25720
+ ),
25721
+ badgeFields.map((field) => {
25722
+ const val = getNestedValue(itemData, field.name);
25723
+ if (val === void 0 || val === null) return null;
25724
+ return /* @__PURE__ */ jsxs(HStack, { gap: "xs", className: "items-center flex-shrink-0", children: [
25725
+ field.icon && /* @__PURE__ */ jsx(Icon, { name: field.icon, size: "xs" }),
25726
+ /* @__PURE__ */ jsx(Badge, { variant: statusVariant3(String(val)), children: String(val) })
25727
+ ] }, field.name);
25728
+ })
25729
+ ] }),
25730
+ bodyFields.length > 0 && !isCompact && /* @__PURE__ */ jsx(HStack, { gap: "md", className: "mt-1.5 flex-wrap", children: bodyFields.map((field) => {
25731
+ const value = getNestedValue(itemData, field.name);
25732
+ if (value === void 0 || value === null || value === "") return null;
25733
+ return /* @__PURE__ */ jsxs(HStack, { gap: "xs", className: "items-center", children: [
25734
+ field.icon && /* @__PURE__ */ jsx(Icon, { name: field.icon, size: "xs", className: "text-muted-foreground" }),
25735
+ /* @__PURE__ */ jsxs(Typography, { variant: "caption", color: "secondary", children: [
25736
+ field.label ?? fieldLabel3(field.name),
25737
+ ":"
25738
+ ] }),
25739
+ /* @__PURE__ */ jsx(Typography, { variant: "small", children: formatValue2(value, field.format) })
25740
+ ] }, field.name);
25741
+ }) }),
25742
+ progressFields.map((field) => {
25743
+ const value = getNestedValue(itemData, field.name);
25744
+ if (typeof value !== "number") return null;
25745
+ return /* @__PURE__ */ jsxs(Box, { className: "mt-2 max-w-xs", children: [
25746
+ /* @__PURE__ */ jsxs(HStack, { gap: "xs", className: "items-center mb-1", children: [
25747
+ field.icon && /* @__PURE__ */ jsx(Icon, { name: field.icon, size: "xs", className: "text-muted-foreground" }),
25748
+ /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "secondary", children: field.label ?? fieldLabel3(field.name) })
25749
+ ] }),
25750
+ /* @__PURE__ */ jsx(ProgressBar, { value, max: 100 })
25751
+ ] }, field.name);
25752
+ })
25753
+ ] }),
25754
+ itemActions && itemActions.length > 0 && /* @__PURE__ */ jsx(HStack, { gap: "xs", className: "flex-shrink-0", children: itemActions.map((action, idx) => /* @__PURE__ */ jsxs(
25428
25755
  Button,
25429
25756
  {
25430
25757
  variant: action.variant ?? "ghost",
@@ -25441,141 +25768,56 @@ function DataList({
25441
25768
  ]
25442
25769
  },
25443
25770
  idx
25444
- ))
25445
- }
25446
- )
25447
- ] }),
25771
+ )) })
25772
+ ]
25773
+ }
25774
+ ),
25448
25775
  isCard && !isLast && /* @__PURE__ */ jsx(Box, { className: "mx-6 border-b border-border/40" })
25449
- ] }, id2);
25450
- }
25451
- const id = itemData.id || String(index);
25452
- const titleValue = getNestedValue(itemData, titleField?.name ?? "");
25453
- return /* @__PURE__ */ jsxs(Box, { "data-entity-row": true, "data-entity-id": id, children: [
25454
- /* @__PURE__ */ jsxs(
25455
- Box,
25456
- {
25457
- className: cn(
25458
- "group flex items-center gap-4 transition-all duration-200",
25459
- isCompact ? "px-4 py-2" : "px-6 py-4",
25460
- "hover:bg-muted/80",
25461
- !isCard && !isCompact && "rounded-lg border border-transparent hover:border-border"
25462
- ),
25463
- children: [
25464
- /* @__PURE__ */ jsxs(Box, { className: "flex-1 min-w-0", children: [
25465
- /* @__PURE__ */ jsxs(HStack, { gap: "sm", className: "items-center", children: [
25466
- titleField?.icon && /* @__PURE__ */ jsx(
25467
- Icon,
25468
- {
25469
- name: titleField.icon,
25470
- size: isCompact ? "xs" : "sm",
25471
- className: "text-primary flex-shrink-0"
25472
- }
25473
- ),
25474
- titleValue !== void 0 && titleValue !== null && /* @__PURE__ */ jsx(
25475
- Typography,
25476
- {
25477
- variant: titleField?.variant === "h3" ? "h3" : "h4",
25478
- className: cn("font-semibold truncate flex-1", isCompact && "text-sm"),
25479
- children: String(titleValue)
25480
- }
25481
- ),
25482
- badgeFields.map((field) => {
25483
- const val = getNestedValue(itemData, field.name);
25484
- if (val === void 0 || val === null) return null;
25485
- return /* @__PURE__ */ jsxs(HStack, { gap: "xs", className: "items-center flex-shrink-0", children: [
25486
- field.icon && /* @__PURE__ */ jsx(Icon, { name: field.icon, size: "xs" }),
25487
- /* @__PURE__ */ jsx(Badge, { variant: statusVariant3(String(val)), children: String(val) })
25488
- ] }, field.name);
25489
- })
25490
- ] }),
25491
- bodyFields.length > 0 && !isCompact && /* @__PURE__ */ jsx(HStack, { gap: "md", className: "mt-1.5 flex-wrap", children: bodyFields.map((field) => {
25492
- const value = getNestedValue(itemData, field.name);
25493
- if (value === void 0 || value === null || value === "") return null;
25494
- return /* @__PURE__ */ jsxs(HStack, { gap: "xs", className: "items-center", children: [
25495
- field.icon && /* @__PURE__ */ jsx(Icon, { name: field.icon, size: "xs", className: "text-muted-foreground" }),
25496
- /* @__PURE__ */ jsxs(Typography, { variant: "caption", color: "secondary", children: [
25497
- field.label ?? fieldLabel3(field.name),
25498
- ":"
25499
- ] }),
25500
- /* @__PURE__ */ jsx(Typography, { variant: "small", children: formatValue2(value, field.format) })
25501
- ] }, field.name);
25502
- }) }),
25503
- progressFields.map((field) => {
25504
- const value = getNestedValue(itemData, field.name);
25505
- if (typeof value !== "number") return null;
25506
- return /* @__PURE__ */ jsxs(Box, { className: "mt-2 max-w-xs", children: [
25507
- /* @__PURE__ */ jsxs(HStack, { gap: "xs", className: "items-center mb-1", children: [
25508
- field.icon && /* @__PURE__ */ jsx(Icon, { name: field.icon, size: "xs", className: "text-muted-foreground" }),
25509
- /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "secondary", children: field.label ?? fieldLabel3(field.name) })
25510
- ] }),
25511
- /* @__PURE__ */ jsx(ProgressBar, { value, max: 100 })
25512
- ] }, field.name);
25513
- })
25514
- ] }),
25515
- itemActions && itemActions.length > 0 && /* @__PURE__ */ jsx(HStack, { gap: "xs", className: "flex-shrink-0", children: itemActions.map((action, idx) => /* @__PURE__ */ jsxs(
25516
- Button,
25517
- {
25518
- variant: action.variant ?? "ghost",
25519
- size: "sm",
25520
- onClick: handleActionClick(action, itemData),
25521
- "data-testid": `action-${action.event}`,
25522
- "data-row-id": String(itemData.id),
25523
- className: cn(
25524
- action.variant === "danger" && "text-error hover:bg-error/10"
25525
- ),
25526
- children: [
25527
- action.icon && /* @__PURE__ */ jsx(Icon, { name: action.icon, size: "xs", className: "mr-1" }),
25528
- action.label
25529
- ]
25530
- },
25531
- idx
25532
- )) })
25533
- ]
25534
- }
25535
- ),
25536
- isCard && !isLast && /* @__PURE__ */ jsx(Box, { className: "mx-6 border-b border-border/40" })
25537
- ] }, id);
25776
+ ] }, id)
25777
+ );
25538
25778
  };
25539
- return /* @__PURE__ */ jsxs(
25540
- Box,
25541
- {
25542
- className: cn(
25543
- isCard && "bg-card rounded-xl border border-border shadow-lg overflow-hidden",
25544
- !isCard && gapClass,
25545
- className
25546
- ),
25547
- children: [
25548
- groups.map((group, gi) => /* @__PURE__ */ jsxs(React147__default.Fragment, { children: [
25549
- group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-4" : "mt-0" }),
25550
- group.items.map(
25551
- (itemData, index) => renderItem(itemData, index, gi === groups.length - 1 && index === group.items.length - 1)
25779
+ return dnd.wrapContainer(
25780
+ /* @__PURE__ */ jsxs(
25781
+ Box,
25782
+ {
25783
+ className: cn(
25784
+ isCard && "bg-card rounded-xl border border-border shadow-lg overflow-hidden",
25785
+ !isCard && gapClass,
25786
+ className
25787
+ ),
25788
+ children: [
25789
+ groups.map((group, gi) => /* @__PURE__ */ jsxs(React93__default.Fragment, { children: [
25790
+ group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-4" : "mt-0" }),
25791
+ group.items.map(
25792
+ (itemData, index) => renderItem(itemData, index, gi === groups.length - 1 && index === group.items.length - 1)
25793
+ )
25794
+ ] }, gi)),
25795
+ hasMoreLocal && /* @__PURE__ */ jsx(Box, { className: "flex justify-center py-3", children: /* @__PURE__ */ jsxs(
25796
+ Button,
25797
+ {
25798
+ variant: "ghost",
25799
+ size: "sm",
25800
+ onClick: () => setVisibleCount((prev) => prev + (pageSize || 5)),
25801
+ children: [
25802
+ /* @__PURE__ */ jsx(Icon, { name: "chevron-down", size: "xs", className: "mr-1" }),
25803
+ t("common.showMore"),
25804
+ " (",
25805
+ allData.length - visibleCount,
25806
+ " remaining)"
25807
+ ]
25808
+ }
25809
+ ) }),
25810
+ infiniteScroll && loadMoreEvent && /* @__PURE__ */ jsx(
25811
+ InfiniteScrollSentinel,
25812
+ {
25813
+ loadMoreEvent,
25814
+ isLoading,
25815
+ hasMore
25816
+ }
25552
25817
  )
25553
- ] }, gi)),
25554
- hasMoreLocal && /* @__PURE__ */ jsx(Box, { className: "flex justify-center py-3", children: /* @__PURE__ */ jsxs(
25555
- Button,
25556
- {
25557
- variant: "ghost",
25558
- size: "sm",
25559
- onClick: () => setVisibleCount((prev) => prev + (pageSize || 5)),
25560
- children: [
25561
- /* @__PURE__ */ jsx(Icon, { name: "chevron-down", size: "xs", className: "mr-1" }),
25562
- t("common.showMore"),
25563
- " (",
25564
- allData.length - visibleCount,
25565
- " remaining)"
25566
- ]
25567
- }
25568
- ) }),
25569
- infiniteScroll && loadMoreEvent && /* @__PURE__ */ jsx(
25570
- InfiniteScrollSentinel,
25571
- {
25572
- loadMoreEvent,
25573
- isLoading,
25574
- hasMore
25575
- }
25576
- )
25577
- ]
25578
- }
25818
+ ]
25819
+ }
25820
+ )
25579
25821
  );
25580
25822
  }
25581
25823
  var dataListLog;
@@ -25595,6 +25837,7 @@ var init_DataList = __esm({
25595
25837
  init_ProgressBar();
25596
25838
  init_Divider();
25597
25839
  init_InfiniteScrollSentinel();
25840
+ init_useDataDnd();
25598
25841
  dataListLog = createLogger("almadar:ui:data-list");
25599
25842
  DataList.displayName = "DataList";
25600
25843
  }
@@ -26845,7 +27088,7 @@ var init_WizardProgress = __esm({
26845
27088
  children: /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: normalizedSteps.map((step, index) => {
26846
27089
  const isActive = index === currentStep;
26847
27090
  const isCompleted = index < currentStep;
26848
- return /* @__PURE__ */ jsxs(React147__default.Fragment, { children: [
27091
+ return /* @__PURE__ */ jsxs(React93__default.Fragment, { children: [
26849
27092
  /* @__PURE__ */ jsx(
26850
27093
  "button",
26851
27094
  {
@@ -27756,7 +27999,7 @@ function InventoryGrid({
27756
27999
  const eventBus = useEventBus();
27757
28000
  const slotCount = totalSlots ?? items.length;
27758
28001
  const emptySlotCount = Math.max(0, slotCount - items.length);
27759
- const handleSelect = React147.useCallback(
28002
+ const handleSelect = React93.useCallback(
27760
28003
  (id) => {
27761
28004
  onSelect?.(id);
27762
28005
  if (selectEvent) {
@@ -27969,15 +28212,15 @@ function GameCanvas2D({
27969
28212
  fps = 60,
27970
28213
  className
27971
28214
  }) {
27972
- const canvasRef = React147.useRef(null);
27973
- const rafRef = React147.useRef(0);
27974
- const frameRef = React147.useRef(0);
27975
- const lastTimeRef = React147.useRef(0);
27976
- const onDrawRef = React147.useRef(onDraw);
28215
+ const canvasRef = React93.useRef(null);
28216
+ const rafRef = React93.useRef(0);
28217
+ const frameRef = React93.useRef(0);
28218
+ const lastTimeRef = React93.useRef(0);
28219
+ const onDrawRef = React93.useRef(onDraw);
27977
28220
  onDrawRef.current = onDraw;
27978
- const onTickRef = React147.useRef(onTick);
28221
+ const onTickRef = React93.useRef(onTick);
27979
28222
  onTickRef.current = onTick;
27980
- React147.useEffect(() => {
28223
+ React93.useEffect(() => {
27981
28224
  const canvas = canvasRef.current;
27982
28225
  if (!canvas) return;
27983
28226
  const ctx = canvas.getContext("2d");
@@ -28266,7 +28509,7 @@ function TurnPanel({
28266
28509
  className
28267
28510
  }) {
28268
28511
  const eventBus = useEventBus();
28269
- const handleAction = React147.useCallback(
28512
+ const handleAction = React93.useCallback(
28270
28513
  (event) => {
28271
28514
  if (event) {
28272
28515
  eventBus.emit(event, { turn: currentTurn, phase, activeTeam });
@@ -28412,7 +28655,7 @@ function UnitCommandBar({
28412
28655
  className
28413
28656
  }) {
28414
28657
  const eventBus = useEventBus();
28415
- const handleCommand = React147.useCallback(
28658
+ const handleCommand = React93.useCallback(
28416
28659
  (event) => {
28417
28660
  if (event) {
28418
28661
  eventBus.emit(event, { unitId: selectedUnitId });
@@ -28897,7 +29140,7 @@ function GameMenu({
28897
29140
  } catch {
28898
29141
  }
28899
29142
  const eventBus = eventBusProp || eventBusFromHook;
28900
- const handleOptionClick = React147.useCallback(
29143
+ const handleOptionClick = React93.useCallback(
28901
29144
  (option) => {
28902
29145
  if (option.event && eventBus) {
28903
29146
  eventBus.emit(`UI:${option.event}`, { option });
@@ -29011,7 +29254,7 @@ function GameOverScreen({
29011
29254
  } catch {
29012
29255
  }
29013
29256
  const eventBus = eventBusProp || eventBusFromHook;
29014
- const handleActionClick = React147.useCallback(
29257
+ const handleActionClick = React93.useCallback(
29015
29258
  (action) => {
29016
29259
  if (action.event && eventBus) {
29017
29260
  eventBus.emit(`UI:${action.event}`, { action });
@@ -31638,7 +31881,7 @@ var init_StepFlow = __esm({
31638
31881
  className
31639
31882
  }) => {
31640
31883
  if (orientation === "vertical") {
31641
- return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(React147__default.Fragment, { children: /* @__PURE__ */ jsxs(HStack, { gap: "md", align: "start", className: "w-full", children: [
31884
+ return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(React93__default.Fragment, { children: /* @__PURE__ */ jsxs(HStack, { gap: "md", align: "start", className: "w-full", children: [
31642
31885
  /* @__PURE__ */ jsxs(VStack, { gap: "none", align: "center", children: [
31643
31886
  /* @__PURE__ */ jsx(StepCircle, { step, index }),
31644
31887
  showConnectors && index < steps.length - 1 && /* @__PURE__ */ jsx(Box, { className: "w-px h-8 bg-border" })
@@ -31649,7 +31892,7 @@ var init_StepFlow = __esm({
31649
31892
  ] })
31650
31893
  ] }) }, index)) });
31651
31894
  }
31652
- 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(React147__default.Fragment, { children: [
31895
+ 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(React93__default.Fragment, { children: [
31653
31896
  /* @__PURE__ */ jsxs(VStack, { gap: "sm", align: "center", className: "flex-1 w-full md:w-auto", children: [
31654
31897
  /* @__PURE__ */ jsx(StepCircle, { step, index }),
31655
31898
  /* @__PURE__ */ jsx(Typography, { variant: "h4", className: "text-center", children: step.title }),
@@ -32531,7 +32774,7 @@ var init_LikertScale = __esm({
32531
32774
  md: "text-base",
32532
32775
  lg: "text-lg"
32533
32776
  };
32534
- LikertScale = React147__default.forwardRef(
32777
+ LikertScale = React93__default.forwardRef(
32535
32778
  ({
32536
32779
  question,
32537
32780
  options = DEFAULT_LIKERT_OPTIONS,
@@ -32543,7 +32786,7 @@ var init_LikertScale = __esm({
32543
32786
  variant = "radios",
32544
32787
  className
32545
32788
  }, ref) => {
32546
- const groupId = React147__default.useId();
32789
+ const groupId = React93__default.useId();
32547
32790
  const eventBus = useEventBus();
32548
32791
  const handleSelect = useCallback(
32549
32792
  (next) => {
@@ -34769,7 +35012,7 @@ var init_DocBreadcrumb = __esm({
34769
35012
  "aria-label": "Breadcrumb",
34770
35013
  children: /* @__PURE__ */ jsx(HStack, { gap: "xs", align: "center", wrap: true, children: items.map((item, idx) => {
34771
35014
  const isLast = idx === items.length - 1;
34772
- return /* @__PURE__ */ jsxs(React147__default.Fragment, { children: [
35015
+ return /* @__PURE__ */ jsxs(React93__default.Fragment, { children: [
34773
35016
  idx > 0 && /* @__PURE__ */ jsx(
34774
35017
  Icon,
34775
35018
  {
@@ -36633,7 +36876,7 @@ var init_DocumentViewer = __esm({
36633
36876
  }
36634
36877
  });
36635
36878
  function extractTitle(children) {
36636
- if (!React147__default.isValidElement(children)) return void 0;
36879
+ if (!React93__default.isValidElement(children)) return void 0;
36637
36880
  const props = children.props;
36638
36881
  if (typeof props.title === "string") {
36639
36882
  return props.title;
@@ -36688,7 +36931,7 @@ function LinearView({
36688
36931
  /* @__PURE__ */ jsx(HStack, { className: "flex-wrap items-center", gap: "xs", children: trait.states.map((state, i) => {
36689
36932
  const isDone = i < currentIdx;
36690
36933
  const isCurrent = i === currentIdx;
36691
- return /* @__PURE__ */ jsxs(React147__default.Fragment, { children: [
36934
+ return /* @__PURE__ */ jsxs(React93__default.Fragment, { children: [
36692
36935
  i > 0 && /* @__PURE__ */ jsx(
36693
36936
  Typography,
36694
36937
  {
@@ -37588,12 +37831,12 @@ var init_Form = __esm({
37588
37831
  const isSchemaEntity = isOrbitalEntitySchema(entity);
37589
37832
  const resolvedEntity = isSchemaEntity ? entity : void 0;
37590
37833
  const entityName = typeof entity === "string" ? entity : resolvedEntity?.name;
37591
- const normalizedInitialData = React147__default.useMemo(() => {
37834
+ const normalizedInitialData = React93__default.useMemo(() => {
37592
37835
  const entityRowAsInitial = isPlainEntityRow(entity) ? entity : void 0;
37593
37836
  const callerInitial = initialData !== null && typeof initialData === "object" && !Array.isArray(initialData) ? initialData : {};
37594
37837
  return entityRowAsInitial !== void 0 ? { ...entityRowAsInitial, ...callerInitial } : callerInitial;
37595
37838
  }, [entity, initialData]);
37596
- const entityDerivedFields = React147__default.useMemo(() => {
37839
+ const entityDerivedFields = React93__default.useMemo(() => {
37597
37840
  if (fields && fields.length > 0) return void 0;
37598
37841
  if (!resolvedEntity) return void 0;
37599
37842
  return resolvedEntity.fields.map(
@@ -37612,16 +37855,16 @@ var init_Form = __esm({
37612
37855
  const conditionalFields = typeof conditionalFieldsRaw === "boolean" ? {} : conditionalFieldsRaw;
37613
37856
  const hiddenCalculations = typeof hiddenCalculationsRaw === "boolean" ? [] : hiddenCalculationsRaw;
37614
37857
  const violationTriggers = typeof violationTriggersRaw === "boolean" ? [] : violationTriggersRaw;
37615
- const [formData, setFormData] = React147__default.useState(
37858
+ const [formData, setFormData] = React93__default.useState(
37616
37859
  normalizedInitialData
37617
37860
  );
37618
- const [collapsedSections, setCollapsedSections] = React147__default.useState(
37861
+ const [collapsedSections, setCollapsedSections] = React93__default.useState(
37619
37862
  /* @__PURE__ */ new Set()
37620
37863
  );
37621
- const [submitError, setSubmitError] = React147__default.useState(null);
37622
- const formRef = React147__default.useRef(null);
37864
+ const [submitError, setSubmitError] = React93__default.useState(null);
37865
+ const formRef = React93__default.useRef(null);
37623
37866
  const formMode = props.mode;
37624
- const mountedRef = React147__default.useRef(false);
37867
+ const mountedRef = React93__default.useRef(false);
37625
37868
  if (!mountedRef.current) {
37626
37869
  mountedRef.current = true;
37627
37870
  debug("forms", "mount", {
@@ -37634,7 +37877,7 @@ var init_Form = __esm({
37634
37877
  });
37635
37878
  }
37636
37879
  const shouldShowCancel = showCancel ?? (fields && fields.length > 0);
37637
- const evalContext = React147__default.useMemo(
37880
+ const evalContext = React93__default.useMemo(
37638
37881
  () => ({
37639
37882
  formValues: formData,
37640
37883
  globalVariables: externalContext?.globalVariables ?? {},
@@ -37643,7 +37886,7 @@ var init_Form = __esm({
37643
37886
  }),
37644
37887
  [formData, externalContext]
37645
37888
  );
37646
- React147__default.useEffect(() => {
37889
+ React93__default.useEffect(() => {
37647
37890
  debug("forms", "initialData-sync", {
37648
37891
  mode: formMode,
37649
37892
  normalizedInitialData,
@@ -37654,7 +37897,7 @@ var init_Form = __esm({
37654
37897
  setFormData(normalizedInitialData);
37655
37898
  }
37656
37899
  }, [normalizedInitialData]);
37657
- const processCalculations = React147__default.useCallback(
37900
+ const processCalculations = React93__default.useCallback(
37658
37901
  (changedFieldId, newFormData) => {
37659
37902
  if (!hiddenCalculations.length) return;
37660
37903
  const context = {
@@ -37679,7 +37922,7 @@ var init_Form = __esm({
37679
37922
  },
37680
37923
  [hiddenCalculations, externalContext, eventBus]
37681
37924
  );
37682
- const checkViolations = React147__default.useCallback(
37925
+ const checkViolations = React93__default.useCallback(
37683
37926
  (changedFieldId, newFormData) => {
37684
37927
  if (!violationTriggers.length) return;
37685
37928
  const context = {
@@ -37717,7 +37960,7 @@ var init_Form = __esm({
37717
37960
  processCalculations(name, newFormData);
37718
37961
  checkViolations(name, newFormData);
37719
37962
  };
37720
- const isFieldVisible = React147__default.useCallback(
37963
+ const isFieldVisible = React93__default.useCallback(
37721
37964
  (fieldName) => {
37722
37965
  const condition = conditionalFields[fieldName];
37723
37966
  if (!condition) return true;
@@ -37725,7 +37968,7 @@ var init_Form = __esm({
37725
37968
  },
37726
37969
  [conditionalFields, evalContext]
37727
37970
  );
37728
- const isSectionVisible = React147__default.useCallback(
37971
+ const isSectionVisible = React93__default.useCallback(
37729
37972
  (section) => {
37730
37973
  if (!section.condition) return true;
37731
37974
  return Boolean(evaluateFormExpression(section.condition, evalContext));
@@ -37801,7 +38044,7 @@ var init_Form = __esm({
37801
38044
  eventBus.emit(`UI:${onCancel}`);
37802
38045
  }
37803
38046
  };
37804
- const renderField = React147__default.useCallback(
38047
+ const renderField = React93__default.useCallback(
37805
38048
  (field) => {
37806
38049
  const fieldName = field.name || field.field;
37807
38050
  if (!fieldName) return null;
@@ -37822,7 +38065,7 @@ var init_Form = __esm({
37822
38065
  [formData, isFieldVisible, relationsData, relationsLoading, isLoading]
37823
38066
  );
37824
38067
  const effectiveFields = entityDerivedFields ?? fields;
37825
- const normalizedFields = React147__default.useMemo(() => {
38068
+ const normalizedFields = React93__default.useMemo(() => {
37826
38069
  if (!effectiveFields || effectiveFields.length === 0) return [];
37827
38070
  return effectiveFields.map((field) => {
37828
38071
  if (typeof field === "string") {
@@ -37844,7 +38087,7 @@ var init_Form = __esm({
37844
38087
  return field;
37845
38088
  });
37846
38089
  }, [effectiveFields, resolvedEntity]);
37847
- const schemaFields = React147__default.useMemo(() => {
38090
+ const schemaFields = React93__default.useMemo(() => {
37848
38091
  if (normalizedFields.length === 0) return null;
37849
38092
  if (isDebugEnabled()) {
37850
38093
  debugGroup(`Form: ${entityName || "unknown"}`);
@@ -37854,7 +38097,7 @@ var init_Form = __esm({
37854
38097
  }
37855
38098
  return normalizedFields.map(renderField).filter(Boolean);
37856
38099
  }, [normalizedFields, renderField, entityName, conditionalFields]);
37857
- const sectionElements = React147__default.useMemo(() => {
38100
+ const sectionElements = React93__default.useMemo(() => {
37858
38101
  if (!sections || sections.length === 0) return null;
37859
38102
  return sections.map((section) => {
37860
38103
  if (!isSectionVisible(section)) {
@@ -39580,7 +39823,7 @@ var init_List = __esm({
39580
39823
  if (entity && typeof entity === "object" && "id" in entity) return [entity];
39581
39824
  return [];
39582
39825
  }, [entity]);
39583
- const getItemActions = React147__default.useCallback(
39826
+ const getItemActions = React93__default.useCallback(
39584
39827
  (item) => {
39585
39828
  if (!itemActions) return [];
39586
39829
  if (typeof itemActions === "function") {
@@ -40053,7 +40296,7 @@ var init_MediaGallery = __esm({
40053
40296
  [selectable, selectedItems, selectionEvent, eventBus]
40054
40297
  );
40055
40298
  const entityData = Array.isArray(entity) ? entity : [];
40056
- const items = React147__default.useMemo(() => {
40299
+ const items = React93__default.useMemo(() => {
40057
40300
  if (propItems) return propItems;
40058
40301
  if (entityData.length === 0) return [];
40059
40302
  return entityData.map((record, idx) => ({
@@ -40217,7 +40460,7 @@ var init_MediaGallery = __esm({
40217
40460
  }
40218
40461
  });
40219
40462
  function extractTitle2(children) {
40220
- if (!React147__default.isValidElement(children)) return void 0;
40463
+ if (!React93__default.isValidElement(children)) return void 0;
40221
40464
  const props = children.props;
40222
40465
  if (typeof props.title === "string") {
40223
40466
  return props.title;
@@ -40930,7 +41173,7 @@ var init_PageHeader = __esm({
40930
41173
  info: "bg-info/10 text-info"
40931
41174
  };
40932
41175
  return /* @__PURE__ */ jsxs(Box, { className: cn("mb-6", className), children: [
40933
- 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(React147__default.Fragment, { children: [
41176
+ 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(React93__default.Fragment, { children: [
40934
41177
  idx > 0 && /* @__PURE__ */ jsx(Typography, { variant: "small", color: "muted", children: "/" }),
40935
41178
  crumb.href ? /* @__PURE__ */ jsx(
40936
41179
  "a",
@@ -41245,7 +41488,7 @@ var init_debugRegistry = __esm({
41245
41488
  }
41246
41489
  });
41247
41490
  function useDebugData() {
41248
- const [data, setData] = React147.useState(() => ({
41491
+ const [data, setData] = React93.useState(() => ({
41249
41492
  traits: [],
41250
41493
  ticks: [],
41251
41494
  guards: [],
@@ -41259,7 +41502,7 @@ function useDebugData() {
41259
41502
  },
41260
41503
  lastUpdate: Date.now()
41261
41504
  }));
41262
- React147.useEffect(() => {
41505
+ React93.useEffect(() => {
41263
41506
  const updateData = () => {
41264
41507
  setData({
41265
41508
  traits: getAllTraits(),
@@ -41368,12 +41611,12 @@ function layoutGraph(states, transitions, initialState, width, height) {
41368
41611
  return positions;
41369
41612
  }
41370
41613
  function WalkMinimap() {
41371
- const [walkStep, setWalkStep] = React147.useState(null);
41372
- const [traits2, setTraits] = React147.useState([]);
41373
- const [coveredEdges, setCoveredEdges] = React147.useState([]);
41374
- const [completedTraits, setCompletedTraits] = React147.useState(/* @__PURE__ */ new Set());
41375
- const prevTraitRef = React147.useRef(null);
41376
- React147.useEffect(() => {
41614
+ const [walkStep, setWalkStep] = React93.useState(null);
41615
+ const [traits2, setTraits] = React93.useState([]);
41616
+ const [coveredEdges, setCoveredEdges] = React93.useState([]);
41617
+ const [completedTraits, setCompletedTraits] = React93.useState(/* @__PURE__ */ new Set());
41618
+ const prevTraitRef = React93.useRef(null);
41619
+ React93.useEffect(() => {
41377
41620
  const interval = setInterval(() => {
41378
41621
  const w = window;
41379
41622
  const step = w.__orbitalWalkStep;
@@ -41820,15 +42063,15 @@ var init_EntitiesTab = __esm({
41820
42063
  }
41821
42064
  });
41822
42065
  function EventFlowTab({ events: events2 }) {
41823
- const [filter, setFilter] = React147.useState("all");
41824
- const containerRef = React147.useRef(null);
41825
- const [autoScroll, setAutoScroll] = React147.useState(true);
41826
- React147.useEffect(() => {
42066
+ const [filter, setFilter] = React93.useState("all");
42067
+ const containerRef = React93.useRef(null);
42068
+ const [autoScroll, setAutoScroll] = React93.useState(true);
42069
+ React93.useEffect(() => {
41827
42070
  if (autoScroll && containerRef.current) {
41828
42071
  containerRef.current.scrollTop = containerRef.current.scrollHeight;
41829
42072
  }
41830
42073
  }, [events2.length, autoScroll]);
41831
- const filteredEvents = React147.useMemo(() => {
42074
+ const filteredEvents = React93.useMemo(() => {
41832
42075
  if (filter === "all") return events2;
41833
42076
  return events2.filter((e) => e.type === filter);
41834
42077
  }, [events2, filter]);
@@ -41947,7 +42190,7 @@ var init_EventFlowTab = __esm({
41947
42190
  }
41948
42191
  });
41949
42192
  function GuardsPanel({ guards }) {
41950
- const [filter, setFilter] = React147.useState("all");
42193
+ const [filter, setFilter] = React93.useState("all");
41951
42194
  if (guards.length === 0) {
41952
42195
  return /* @__PURE__ */ jsx(
41953
42196
  EmptyState,
@@ -41960,7 +42203,7 @@ function GuardsPanel({ guards }) {
41960
42203
  }
41961
42204
  const passedCount = guards.filter((g) => g.result).length;
41962
42205
  const failedCount = guards.length - passedCount;
41963
- const filteredGuards = React147.useMemo(() => {
42206
+ const filteredGuards = React93.useMemo(() => {
41964
42207
  if (filter === "all") return guards;
41965
42208
  if (filter === "passed") return guards.filter((g) => g.result);
41966
42209
  return guards.filter((g) => !g.result);
@@ -42121,10 +42364,10 @@ function EffectBadge({ effect }) {
42121
42364
  ] });
42122
42365
  }
42123
42366
  function TransitionTimeline({ transitions }) {
42124
- const containerRef = React147.useRef(null);
42125
- const [autoScroll, setAutoScroll] = React147.useState(true);
42126
- const [expandedId, setExpandedId] = React147.useState(null);
42127
- React147.useEffect(() => {
42367
+ const containerRef = React93.useRef(null);
42368
+ const [autoScroll, setAutoScroll] = React93.useState(true);
42369
+ const [expandedId, setExpandedId] = React93.useState(null);
42370
+ React93.useEffect(() => {
42128
42371
  if (autoScroll && containerRef.current) {
42129
42372
  containerRef.current.scrollTop = containerRef.current.scrollHeight;
42130
42373
  }
@@ -42410,9 +42653,9 @@ function getAllEvents(traits2) {
42410
42653
  }
42411
42654
  function EventDispatcherTab({ traits: traits2, schema }) {
42412
42655
  const eventBus = useEventBus();
42413
- const [log19, setLog] = React147.useState([]);
42414
- const prevStatesRef = React147.useRef(/* @__PURE__ */ new Map());
42415
- React147.useEffect(() => {
42656
+ const [log19, setLog] = React93.useState([]);
42657
+ const prevStatesRef = React93.useRef(/* @__PURE__ */ new Map());
42658
+ React93.useEffect(() => {
42416
42659
  for (const trait of traits2) {
42417
42660
  const prev = prevStatesRef.current.get(trait.id);
42418
42661
  if (prev && prev !== trait.currentState) {
@@ -42582,10 +42825,10 @@ function VerifyModePanel({
42582
42825
  serverCount,
42583
42826
  localCount
42584
42827
  }) {
42585
- const [expanded, setExpanded] = React147.useState(true);
42586
- const scrollRef = React147.useRef(null);
42587
- const prevCountRef = React147.useRef(0);
42588
- React147.useEffect(() => {
42828
+ const [expanded, setExpanded] = React93.useState(true);
42829
+ const scrollRef = React93.useRef(null);
42830
+ const prevCountRef = React93.useRef(0);
42831
+ React93.useEffect(() => {
42589
42832
  if (expanded && transitions.length > prevCountRef.current && scrollRef.current) {
42590
42833
  scrollRef.current.scrollTop = scrollRef.current.scrollHeight;
42591
42834
  }
@@ -42651,10 +42894,10 @@ function RuntimeDebugger({
42651
42894
  defaultTab,
42652
42895
  schema
42653
42896
  }) {
42654
- const [isCollapsed, setIsCollapsed] = React147.useState(mode === "verify" ? true : defaultCollapsed);
42655
- const [isVisible, setIsVisible] = React147.useState(mode === "inline" || mode === "verify" || isDebugEnabled2());
42897
+ const [isCollapsed, setIsCollapsed] = React93.useState(mode === "verify" ? true : defaultCollapsed);
42898
+ const [isVisible, setIsVisible] = React93.useState(mode === "inline" || mode === "verify" || isDebugEnabled2());
42656
42899
  const debugData = useDebugData();
42657
- React147.useEffect(() => {
42900
+ React93.useEffect(() => {
42658
42901
  if (mode === "inline") return;
42659
42902
  return onDebugToggle((enabled) => {
42660
42903
  setIsVisible(enabled);
@@ -42663,7 +42906,7 @@ function RuntimeDebugger({
42663
42906
  }
42664
42907
  });
42665
42908
  }, [mode]);
42666
- React147.useEffect(() => {
42909
+ React93.useEffect(() => {
42667
42910
  if (mode === "inline") return;
42668
42911
  const handleKeyDown = (e) => {
42669
42912
  if (e.key === "`" && isVisible) {
@@ -43212,7 +43455,7 @@ function SequenceBar({
43212
43455
  onSlotRemove(index);
43213
43456
  }, [onSlotRemove, playing]);
43214
43457
  const paddedSlots = Array.from({ length: maxSlots }, (_, i) => slots[i]);
43215
- return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(React147__default.Fragment, { children: [
43458
+ return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(React93__default.Fragment, { children: [
43216
43459
  i > 0 && /* @__PURE__ */ jsx(
43217
43460
  Typography,
43218
43461
  {
@@ -44613,7 +44856,7 @@ var init_StatCard = __esm({
44613
44856
  const labelToUse = propLabel ?? propTitle;
44614
44857
  const eventBus = useEventBus();
44615
44858
  const { t } = useTranslate();
44616
- const handleActionClick = React147__default.useCallback(() => {
44859
+ const handleActionClick = React93__default.useCallback(() => {
44617
44860
  if (action?.event) {
44618
44861
  eventBus.emit(`UI:${action.event}`, {});
44619
44862
  }
@@ -44624,7 +44867,7 @@ var init_StatCard = __esm({
44624
44867
  const data = Array.isArray(entity) ? entity : entity ? [entity] : [];
44625
44868
  const isLoading = externalLoading ?? false;
44626
44869
  const error = externalError;
44627
- const computeMetricValue = React147__default.useCallback(
44870
+ const computeMetricValue = React93__default.useCallback(
44628
44871
  (metric, items) => {
44629
44872
  if (metric.value !== void 0) {
44630
44873
  return metric.value;
@@ -44663,7 +44906,7 @@ var init_StatCard = __esm({
44663
44906
  },
44664
44907
  []
44665
44908
  );
44666
- const schemaStats = React147__default.useMemo(() => {
44909
+ const schemaStats = React93__default.useMemo(() => {
44667
44910
  if (!metrics || metrics.length === 0) return null;
44668
44911
  return metrics.map((metric) => ({
44669
44912
  label: metric.label,
@@ -44671,7 +44914,7 @@ var init_StatCard = __esm({
44671
44914
  format: metric.format
44672
44915
  }));
44673
44916
  }, [metrics, data, computeMetricValue]);
44674
- const calculatedTrend = React147__default.useMemo(() => {
44917
+ const calculatedTrend = React93__default.useMemo(() => {
44675
44918
  if (manualTrend !== void 0) return manualTrend;
44676
44919
  if (previousValue === void 0 || currentValue === void 0)
44677
44920
  return void 0;
@@ -45807,7 +46050,7 @@ var init_Timeline = __esm({
45807
46050
  }) => {
45808
46051
  const { t } = useTranslate();
45809
46052
  const entityData = Array.isArray(entity) ? entity : [];
45810
- const items = React147__default.useMemo(() => {
46053
+ const items = React93__default.useMemo(() => {
45811
46054
  if (propItems) return propItems;
45812
46055
  if (entityData.length === 0) return [];
45813
46056
  return entityData.map((record, idx) => {
@@ -45914,7 +46157,7 @@ var init_Timeline = __esm({
45914
46157
  }
45915
46158
  });
45916
46159
  function extractToastProps(children) {
45917
- if (!React147__default.isValidElement(children)) {
46160
+ if (!React93__default.isValidElement(children)) {
45918
46161
  if (typeof children === "string") {
45919
46162
  return { message: children };
45920
46163
  }
@@ -45952,7 +46195,7 @@ var init_ToastSlot = __esm({
45952
46195
  eventBus.emit("UI:CLOSE");
45953
46196
  };
45954
46197
  if (!isVisible) return null;
45955
- const isCustomContent = React147__default.isValidElement(children) && !message;
46198
+ const isCustomContent = React93__default.isValidElement(children) && !message;
45956
46199
  return /* @__PURE__ */ jsx(Box, { className: "fixed bottom-4 right-4 z-50", children: isCustomContent ? children : /* @__PURE__ */ jsx(
45957
46200
  Toast,
45958
46201
  {
@@ -46221,7 +46464,7 @@ var init_WizardContainer = __esm({
46221
46464
  const isCompleted = index < currentStep;
46222
46465
  const stepKey = step.id ?? step.tabId ?? `step-${index}`;
46223
46466
  const stepTitle = step.title ?? step.name ?? `Step ${index + 1}`;
46224
- return /* @__PURE__ */ jsxs(React147__default.Fragment, { children: [
46467
+ return /* @__PURE__ */ jsxs(React93__default.Fragment, { children: [
46225
46468
  /* @__PURE__ */ jsx(
46226
46469
  Button,
46227
46470
  {
@@ -48414,7 +48657,7 @@ function UnitRenderer({
48414
48657
  onAnimationStateChange,
48415
48658
  animationSpeed = 1
48416
48659
  }) {
48417
- const handleUnitClick = React147__default.useCallback(
48660
+ const handleUnitClick = React93__default.useCallback(
48418
48661
  (unit) => {
48419
48662
  onUnitClick?.(unit);
48420
48663
  },
@@ -51610,7 +51853,7 @@ var init_Avl3DViewer = __esm({
51610
51853
  const handleTraitClick = useCallback((name) => {
51611
51854
  dispatch({ type: "ZOOM_INTO_TRAIT", trait: name, targetPosition: { x: 0, y: 0 } });
51612
51855
  }, []);
51613
- const [highlightedTrait, setHighlightedTrait] = React147__default.useState(null);
51856
+ const [highlightedTrait, setHighlightedTrait] = React93__default.useState(null);
51614
51857
  const handleTransitionClick = useCallback((index) => {
51615
51858
  dispatch({ type: "ZOOM_INTO_TRANSITION", transitionIndex: index, targetPosition: { x: 0, y: 0 } });
51616
51859
  }, []);
@@ -51697,7 +51940,7 @@ var init_Avl3DViewer = __esm({
51697
51940
  gap: "xs",
51698
51941
  align: "center",
51699
51942
  className: "absolute top-2 left-2 z-10 bg-surface/80 backdrop-blur rounded-md px-3 py-1.5",
51700
- children: breadcrumbs.map((crumb, i) => /* @__PURE__ */ jsxs(React147__default.Fragment, { children: [
51943
+ children: breadcrumbs.map((crumb, i) => /* @__PURE__ */ jsxs(React93__default.Fragment, { children: [
51701
51944
  i > 0 && /* @__PURE__ */ jsx(Typography, { variant: "small", color: "muted", className: "mx-1", children: "/" }),
51702
51945
  i < breadcrumbs.length - 1 ? /* @__PURE__ */ jsx(
51703
51946
  Box,
@@ -52075,12 +52318,12 @@ var init_three = __esm({
52075
52318
  }
52076
52319
  });
52077
52320
  function lazyThree(name, loader) {
52078
- const Lazy = React147__default.lazy(() => loader().then((m) => ({ default: m[name] })));
52321
+ const Lazy = React93__default.lazy(() => loader().then((m) => ({ default: m[name] })));
52079
52322
  function ThreeWrapper(props) {
52080
- return React147__default.createElement(
52081
- React147__default.Suspense,
52323
+ return React93__default.createElement(
52324
+ React93__default.Suspense,
52082
52325
  { fallback: null },
52083
- React147__default.createElement(Lazy, props)
52326
+ React93__default.createElement(Lazy, props)
52084
52327
  );
52085
52328
  }
52086
52329
  ThreeWrapper.displayName = `Lazy(${name})`;
@@ -52684,7 +52927,7 @@ function SuspenseConfigProvider({
52684
52927
  config,
52685
52928
  children
52686
52929
  }) {
52687
- return React147__default.createElement(
52930
+ return React93__default.createElement(
52688
52931
  SuspenseConfigContext.Provider,
52689
52932
  { value: config },
52690
52933
  children
@@ -53167,7 +53410,7 @@ function renderPatternChildren(children, onDismiss, parentId = "root", parentPat
53167
53410
  const key = `${parentId}-${index}-trait:${traitName}`;
53168
53411
  return /* @__PURE__ */ jsx(TraitFrame, { traitName }, key);
53169
53412
  }
53170
- return /* @__PURE__ */ jsx(React147__default.Fragment, { children: child }, `${parentId}-${index}`);
53413
+ return /* @__PURE__ */ jsx(React93__default.Fragment, { children: child }, `${parentId}-${index}`);
53171
53414
  }
53172
53415
  if (!child || typeof child !== "object") return null;
53173
53416
  const childId = `${parentId}-${index}`;
@@ -53204,14 +53447,14 @@ function isPatternConfig(value) {
53204
53447
  if (value === null || value === void 0) return false;
53205
53448
  if (typeof value !== "object") return false;
53206
53449
  if (Array.isArray(value)) return false;
53207
- if (React147__default.isValidElement(value)) return false;
53450
+ if (React93__default.isValidElement(value)) return false;
53208
53451
  if (value instanceof Date) return false;
53209
53452
  if (typeof value === "function") return false;
53210
53453
  const record = value;
53211
53454
  return "type" in record && typeof record.type === "string";
53212
53455
  }
53213
53456
  function isPlainConfigObject(value) {
53214
- if (React147__default.isValidElement(value)) return false;
53457
+ if (React93__default.isValidElement(value)) return false;
53215
53458
  if (value instanceof Date) return false;
53216
53459
  const proto = Object.getPrototypeOf(value);
53217
53460
  return proto === Object.prototype || proto === null;
@@ -53666,7 +53909,7 @@ var AvlTransition = ({
53666
53909
  opacity = 1,
53667
53910
  className
53668
53911
  }) => {
53669
- const ids = React147__default.useMemo(() => {
53912
+ const ids = React93__default.useMemo(() => {
53670
53913
  avlTransitionId += 1;
53671
53914
  return { arrow: `avl-tr-${avlTransitionId}-arrow` };
53672
53915
  }, []);
@@ -54227,7 +54470,7 @@ var AvlStateMachine = ({
54227
54470
  color = "var(--color-primary)",
54228
54471
  animated = false
54229
54472
  }) => {
54230
- const ids = React147__default.useMemo(() => {
54473
+ const ids = React93__default.useMemo(() => {
54231
54474
  avlSmId += 1;
54232
54475
  const base = `avl-sm-${avlSmId}`;
54233
54476
  return { glow: `${base}-glow`, grad: `${base}-grad` };
@@ -54426,7 +54669,7 @@ var AvlOrbitalUnit = ({
54426
54669
  color = "var(--color-primary)",
54427
54670
  animated = false
54428
54671
  }) => {
54429
- const ids = React147__default.useMemo(() => {
54672
+ const ids = React93__default.useMemo(() => {
54430
54673
  avlOuId += 1;
54431
54674
  const base = `avl-ou-${avlOuId}`;
54432
54675
  return { glow: `${base}-glow`, grad: `${base}-grad` };
@@ -54522,7 +54765,7 @@ var AvlClosedCircuit = ({
54522
54765
  color = "var(--color-primary)",
54523
54766
  animated = false
54524
54767
  }) => {
54525
- const ids = React147__default.useMemo(() => {
54768
+ const ids = React93__default.useMemo(() => {
54526
54769
  avlCcId += 1;
54527
54770
  const base = `avl-cc-${avlCcId}`;
54528
54771
  return { glow: `${base}-glow`, grad: `${base}-grad`, arrow: `${base}-arrow` };
@@ -54677,7 +54920,7 @@ var AvlEmitListen = ({
54677
54920
  color = "var(--color-primary)",
54678
54921
  animated = false
54679
54922
  }) => {
54680
- const ids = React147__default.useMemo(() => {
54923
+ const ids = React93__default.useMemo(() => {
54681
54924
  avlElId += 1;
54682
54925
  const base = `avl-el-${avlElId}`;
54683
54926
  return { arrow: `${base}-arrow`, grad: `${base}-grad` };
@@ -54950,7 +55193,7 @@ function renderNode(node, color, glowId) {
54950
55193
  const baseR = node.type === "operator" ? 20 : 16;
54951
55194
  const r2 = Math.max(baseR, labelLen * 3.5 + 6);
54952
55195
  const nc = nodeColor(node.type, color);
54953
- return /* @__PURE__ */ jsxs(React147__default.Fragment, { children: [
55196
+ return /* @__PURE__ */ jsxs(React93__default.Fragment, { children: [
54954
55197
  node.children.map((child, i) => {
54955
55198
  const childR = Math.max(
54956
55199
  child.type === "operator" ? 20 : 16,
@@ -55007,7 +55250,7 @@ var AvlExprTree = ({
55007
55250
  className,
55008
55251
  color = "var(--color-primary)"
55009
55252
  }) => {
55010
- const ids = React147__default.useMemo(() => {
55253
+ const ids = React93__default.useMemo(() => {
55011
55254
  avlEtId += 1;
55012
55255
  return { glow: `avl-et-${avlEtId}-glow` };
55013
55256
  }, []);
@@ -55570,7 +55813,7 @@ var SystemNode = ({ data }) => {
55570
55813
  stateChain.length > 0 && /* @__PURE__ */ jsx("svg", { width: stateChain.length * 14 + 2, height: 10, viewBox: `0 0 ${stateChain.length * 14 + 2} 10`, children: stateChain.map((s, i) => {
55571
55814
  const tc = transitionCounts[s.name] ?? 0;
55572
55815
  const role = getStateRole(s.name, s.isInitial, s.isTerminal, tc, maxTC);
55573
- return /* @__PURE__ */ jsxs(React147__default.Fragment, { children: [
55816
+ return /* @__PURE__ */ jsxs(React93__default.Fragment, { children: [
55574
55817
  /* @__PURE__ */ jsx(AvlState, { x: i * 14 + 1, y: 1, width: 10, height: 8, name: "", role, isInitial: s.isInitial, isTerminal: s.isTerminal }),
55575
55818
  i < stateChain.length - 1 && /* @__PURE__ */ jsx("line", { x1: i * 14 + 12, y1: 5, x2: i * 14 + 15, y2: 5, stroke: "var(--color-border)", strokeWidth: 0.5 })
55576
55819
  ] }, s.name);
@@ -56814,7 +57057,7 @@ function resolveLambdaBindings(body, argName, arg) {
56814
57057
  if (Array.isArray(body)) {
56815
57058
  return body.map((b) => resolveLambdaBindings(b, argName, arg));
56816
57059
  }
56817
- if (body !== null && typeof body === "object" && !React147__default.isValidElement(body) && !(body instanceof Date) && typeof body !== "function") {
57060
+ if (body !== null && typeof body === "object" && !React93__default.isValidElement(body) && !(body instanceof Date) && typeof body !== "function") {
56818
57061
  const out = {};
56819
57062
  for (const [k, v] of Object.entries(body)) {
56820
57063
  out[k] = resolveLambdaBindings(v, argName, arg);
@@ -56833,7 +57076,7 @@ function getSlotContentRenderer2() {
56833
57076
  function makeLambdaFn(argName, lambdaBody, callerKey) {
56834
57077
  return (item, index) => {
56835
57078
  const resolvedBody = resolveLambdaBindings(lambdaBody, argName, item);
56836
- if (resolvedBody === null || typeof resolvedBody !== "object" || Array.isArray(resolvedBody) || typeof resolvedBody === "function" || React147__default.isValidElement(resolvedBody) || resolvedBody instanceof Date) {
57079
+ if (resolvedBody === null || typeof resolvedBody !== "object" || Array.isArray(resolvedBody) || typeof resolvedBody === "function" || React93__default.isValidElement(resolvedBody) || resolvedBody instanceof Date) {
56837
57080
  return null;
56838
57081
  }
56839
57082
  const record = resolvedBody;
@@ -56851,7 +57094,7 @@ function makeLambdaFn(argName, lambdaBody, callerKey) {
56851
57094
  props: childProps,
56852
57095
  priority: 0
56853
57096
  };
56854
- return React147__default.createElement(SlotContentRenderer2, { content: childContent });
57097
+ return React93__default.createElement(SlotContentRenderer2, { content: childContent });
56855
57098
  };
56856
57099
  }
56857
57100
  function convertNode(node, callerKey) {
@@ -56870,7 +57113,7 @@ function convertNode(node, callerKey) {
56870
57113
  });
56871
57114
  return anyChanged ? mapped : node;
56872
57115
  }
56873
- if (typeof node === "object" && !React147__default.isValidElement(node) && !(node instanceof Date)) {
57116
+ if (typeof node === "object" && !React93__default.isValidElement(node) && !(node instanceof Date)) {
56874
57117
  return convertObjectProps(node);
56875
57118
  }
56876
57119
  return node;
@@ -58968,7 +59211,7 @@ var OrbPreviewNodeInner = (props) => {
58968
59211
  }
58969
59212
  );
58970
59213
  };
58971
- var OrbPreviewNode = React147__default.memo(OrbPreviewNodeInner);
59214
+ var OrbPreviewNode = React93__default.memo(OrbPreviewNodeInner);
58972
59215
  OrbPreviewNode.displayName = "OrbPreviewNode";
58973
59216
  orbPreviewLog.debug("export-resolved", () => ({
58974
59217
  type: typeof OrbPreviewNode,
@@ -59073,7 +59316,7 @@ var EventFlowEdgeInner = (props) => {
59073
59316
  ) })
59074
59317
  ] });
59075
59318
  };
59076
- var EventFlowEdge = React147__default.memo(EventFlowEdgeInner);
59319
+ var EventFlowEdge = React93__default.memo(EventFlowEdgeInner);
59077
59320
  EventFlowEdge.displayName = "EventFlowEdge";
59078
59321
 
59079
59322
  // components/molecules/avl/BehaviorComposeNode.tsx
@@ -59220,7 +59463,7 @@ var BehaviorComposeNodeInner = (props) => {
59220
59463
  }
59221
59464
  );
59222
59465
  };
59223
- var BehaviorComposeNode = React147__default.memo(BehaviorComposeNodeInner);
59466
+ var BehaviorComposeNode = React93__default.memo(BehaviorComposeNodeInner);
59224
59467
  BehaviorComposeNode.displayName = "BehaviorComposeNode";
59225
59468
 
59226
59469
  // components/molecules/avl/avl-behavior-compose-converter.ts
@@ -60183,7 +60426,7 @@ var ZoomBreadcrumb = ({
60183
60426
  if (eventName && band === "detail") {
60184
60427
  segments.push({ icon: "\u26A1", label: eventName });
60185
60428
  }
60186
- return /* @__PURE__ */ jsx("div", { className: "absolute top-2 left-2 z-10 flex items-center gap-1 px-2 py-1 rounded-md bg-card/90 border border-border text-[11px] text-muted-foreground backdrop-blur-sm", children: segments.map((seg, i) => /* @__PURE__ */ jsxs(React147__default.Fragment, { children: [
60429
+ return /* @__PURE__ */ jsx("div", { className: "absolute top-2 left-2 z-10 flex items-center gap-1 px-2 py-1 rounded-md bg-card/90 border border-border text-[11px] text-muted-foreground backdrop-blur-sm", children: segments.map((seg, i) => /* @__PURE__ */ jsxs(React93__default.Fragment, { children: [
60187
60430
  i > 0 && /* @__PURE__ */ jsx("span", { className: "opacity-40", children: ">" }),
60188
60431
  /* @__PURE__ */ jsx("span", { className: "opacity-60", children: seg.icon }),
60189
60432
  /* @__PURE__ */ jsx("span", { children: seg.label })
@@ -60662,7 +60905,7 @@ var EventWireOverlay = ({
60662
60905
  containerW,
60663
60906
  containerH
60664
60907
  }) => {
60665
- const ids = React147__default.useMemo(() => {
60908
+ const ids = React93__default.useMemo(() => {
60666
60909
  avlOczWireId += 1;
60667
60910
  return { arrow: `avl-ocz-wire-${avlOczWireId}-arrow` };
60668
60911
  }, []);
@@ -61021,7 +61264,7 @@ var AvlOrbitalsCosmicZoom = ({
61021
61264
  borderRadius: 6,
61022
61265
  border: `1px solid ${color}`
61023
61266
  },
61024
- children: /* @__PURE__ */ jsx(HStack, { gap: "xs", align: "center", children: breadcrumbs.map((crumb, i) => /* @__PURE__ */ jsxs(React147__default.Fragment, { children: [
61267
+ children: /* @__PURE__ */ jsx(HStack, { gap: "xs", align: "center", children: breadcrumbs.map((crumb, i) => /* @__PURE__ */ jsxs(React93__default.Fragment, { children: [
61025
61268
  i > 0 && /* @__PURE__ */ jsx(Typography, { variant: "small", style: { opacity: 0.5, color }, children: "/" }),
61026
61269
  i < breadcrumbs.length - 1 ? /* @__PURE__ */ jsx(
61027
61270
  Box,