@almadar/ui 6.3.0 → 6.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
- import * as React85 from 'react';
2
- import React85__default, { createContext, useContext, useMemo, useRef, useEffect, useCallback, useSyncExternalStore, Suspense, useState, useLayoutEffect, lazy, useId } from 'react';
1
+ import * as React86 from 'react';
2
+ import React86__default, { createContext, useContext, useMemo, useRef, useEffect, useCallback, useSyncExternalStore, Suspense, useState, useLayoutEffect, lazy, useId } from 'react';
3
3
  import { EventBusContext, useTraitScopeChain, RenderSlotProvider, useEntitySchemaOptional, useEntityBindingSnapshot, useTraitScope, useEntitySchema, getAllPages, matchPathAmong, CurrentPagePathProvider, NavStackProvider, OrbitalProvider, TraitScopeProvider, useNavStack, ServerBridgeProvider, useCurrentPagePath, useRenderSlot, useGameAudioContextOptional, VerificationProvider, EntitySchemaProvider, OrbitalThemeProvider, useServerBridge, EntityBindingContext } from '@almadar/ui/providers';
4
4
  export { EntitySchemaProvider, ServerBridgeProvider, TraitContext, TraitProvider, useEntitySchema, useEntitySchemaOptional, useServerBridge, useTrait, useTraitContext } from '@almadar/ui/providers';
5
5
  import { createLogger, setNamespaceLevel, isLogLevelEnabled } from '@almadar/logger';
@@ -793,6 +793,112 @@ var init_useTapReveal = __esm({
793
793
  "hooks/useTapReveal.ts"() {
794
794
  }
795
795
  });
796
+ function useDraggable({ payload, disabled = false }) {
797
+ const [isDragging, setIsDragging] = useState(false);
798
+ const eventBus = useEventBus();
799
+ const handleDragStart = useCallback(
800
+ (e) => {
801
+ if (disabled) {
802
+ e.preventDefault();
803
+ return;
804
+ }
805
+ e.dataTransfer.setData(ALMADAR_DND_MIME, JSON.stringify(payload));
806
+ e.dataTransfer.effectAllowed = "copy";
807
+ setIsDragging(true);
808
+ eventBus.emit("UI:DRAG_START", { kind: payload.kind, data: payload.data });
809
+ },
810
+ [disabled, payload, eventBus]
811
+ );
812
+ const handleDragEnd = useCallback(
813
+ (e) => {
814
+ setIsDragging(false);
815
+ eventBus.emit("UI:DRAG_END", { kind: payload.kind, data: payload.data });
816
+ },
817
+ [payload, eventBus]
818
+ );
819
+ const dragProps = useMemo(
820
+ () => ({
821
+ draggable: !disabled,
822
+ onDragStart: handleDragStart,
823
+ onDragEnd: handleDragEnd,
824
+ "aria-grabbed": isDragging
825
+ }),
826
+ [disabled, handleDragStart, handleDragEnd, isDragging]
827
+ );
828
+ return { dragProps, isDragging };
829
+ }
830
+ var ALMADAR_DND_MIME;
831
+ var init_useDraggable = __esm({
832
+ "hooks/useDraggable.ts"() {
833
+ "use client";
834
+ init_useEventBus();
835
+ ALMADAR_DND_MIME = "application/x-almadar-dnd";
836
+ }
837
+ });
838
+ function parsePayload(e) {
839
+ try {
840
+ const raw = e.dataTransfer.getData(ALMADAR_DND_MIME);
841
+ if (!raw) return null;
842
+ const parsed = JSON.parse(raw);
843
+ if (typeof parsed.kind !== "string" || !parsed.data) return null;
844
+ return parsed;
845
+ } catch {
846
+ return null;
847
+ }
848
+ }
849
+ function hasAlmadarPayload(e) {
850
+ return e.dataTransfer.types.includes(ALMADAR_DND_MIME);
851
+ }
852
+ function useDropZone({ accepts, onDrop, disabled = false }) {
853
+ const [isOver, setIsOver] = useState(false);
854
+ const eventBus = useEventBus();
855
+ const handleDragOver = useCallback(
856
+ (e) => {
857
+ if (disabled) return;
858
+ if (!hasAlmadarPayload(e)) return;
859
+ e.preventDefault();
860
+ e.dataTransfer.dropEffect = "copy";
861
+ setIsOver(true);
862
+ },
863
+ [disabled]
864
+ );
865
+ const handleDragLeave = useCallback(
866
+ (e) => {
867
+ setIsOver(false);
868
+ },
869
+ []
870
+ );
871
+ const handleDrop = useCallback(
872
+ (e) => {
873
+ e.preventDefault();
874
+ setIsOver(false);
875
+ if (disabled) return;
876
+ const payload = parsePayload(e);
877
+ if (!payload) return;
878
+ if (!accepts.includes(payload.kind)) return;
879
+ const position = { x: e.clientX, y: e.clientY };
880
+ onDrop(payload, position);
881
+ eventBus.emit("UI:DROP", { kind: payload.kind, data: payload.data, ...position });
882
+ },
883
+ [disabled, accepts, onDrop, eventBus]
884
+ );
885
+ const dropProps = useMemo(
886
+ () => ({
887
+ onDragOver: handleDragOver,
888
+ onDragLeave: handleDragLeave,
889
+ onDrop: handleDrop
890
+ }),
891
+ [handleDragOver, handleDragLeave, handleDrop]
892
+ );
893
+ return { dropProps, isOver };
894
+ }
895
+ var init_useDropZone = __esm({
896
+ "hooks/useDropZone.ts"() {
897
+ "use client";
898
+ init_useEventBus();
899
+ init_useDraggable();
900
+ }
901
+ });
796
902
  function usePerfBuffer() {
797
903
  return useSyncExternalStore(perfStore.subscribe, perfStore.getSnapshot, perfStore.getSnapshot);
798
904
  }
@@ -821,7 +927,7 @@ function resolveMarkerExpression(expression, entity, config, state) {
821
927
  function isPlainObject(value) {
822
928
  if (value === null || value === void 0 || typeof value !== "object") return false;
823
929
  if (Array.isArray(value)) return false;
824
- if (React85__default.isValidElement(value)) return false;
930
+ if (React86__default.isValidElement(value)) return false;
825
931
  if (value instanceof Date) return false;
826
932
  if (typeof value === "function") return false;
827
933
  return true;
@@ -830,7 +936,7 @@ function isEvaluatorResolvedData(value) {
830
936
  return evaluatorResolvedData.has(value);
831
937
  }
832
938
  function brandResolved(value) {
833
- if (value !== null && typeof value === "object" && !React85__default.isValidElement(value) && !(value instanceof Date)) {
939
+ if (value !== null && typeof value === "object" && !React86__default.isValidElement(value) && !(value instanceof Date)) {
834
940
  resolvedMarkerFree.add(value);
835
941
  }
836
942
  }
@@ -863,7 +969,7 @@ function walkValue(value, scopeTrait, entity, config, state) {
863
969
  }
864
970
  const resolved = resolveMarkerExpression(value.expression, entity, config, state);
865
971
  markerResolutionCache.set(value, { entity, config, state, resolved });
866
- if (resolved !== null && typeof resolved === "object" && !React85__default.isValidElement(resolved) && !(resolved instanceof Date)) {
972
+ if (resolved !== null && typeof resolved === "object" && !React86__default.isValidElement(resolved) && !(resolved instanceof Date)) {
867
973
  resolvedMarkerFree.add(resolved);
868
974
  evaluatorResolvedData.add(resolved);
869
975
  }
@@ -1050,7 +1156,7 @@ var init_Box = __esm({
1050
1156
  fixed: "fixed",
1051
1157
  sticky: "sticky"
1052
1158
  };
1053
- Box = React85__default.forwardRef(
1159
+ Box = React86__default.forwardRef(
1054
1160
  ({
1055
1161
  padding,
1056
1162
  paddingX,
@@ -1115,7 +1221,7 @@ var init_Box = __esm({
1115
1221
  onPointerDown?.(e);
1116
1222
  }, [hoverEvent, tapReveal, triggerProps, onPointerDown]);
1117
1223
  const isClickable = action || onClick;
1118
- return React85__default.createElement(
1224
+ return React86__default.createElement(
1119
1225
  Component,
1120
1226
  {
1121
1227
  ref,
@@ -1332,7 +1438,7 @@ var init_Icon = __esm({
1332
1438
  const effectiveName = typeof icon === "string" && icon !== "" ? icon : name;
1333
1439
  const effectiveStrokeWidth = strokeWidth != null && strokeWidth > 0 ? strokeWidth : void 0;
1334
1440
  const family = useIconFamily();
1335
- const RenderedComponent = React85__default.useMemo(() => {
1441
+ const RenderedComponent = React86__default.useMemo(() => {
1336
1442
  if (directIcon) return null;
1337
1443
  return effectiveName ? resolveIconForFamily(effectiveName) : null;
1338
1444
  }, [directIcon, effectiveName, family]);
@@ -1461,7 +1567,7 @@ var init_atlasSlice = __esm({
1461
1567
  }
1462
1568
  });
1463
1569
  function useAtlasSliceDataUrl(asset) {
1464
- const [, bump] = React85.useReducer((x) => x + 1, 0);
1570
+ const [, bump] = React86.useReducer((x) => x + 1, 0);
1465
1571
  if (!isAtlasAsset(asset)) return void 0;
1466
1572
  const key = `${asset.atlas}#${asset.sprite}`;
1467
1573
  const cached = sliceDataUrlCache.get(key);
@@ -1524,13 +1630,13 @@ function AtlasImage({
1524
1630
  style,
1525
1631
  "aria-hidden": ariaHidden
1526
1632
  }) {
1527
- const [, bump] = React85.useReducer((x) => x + 1, 0);
1528
- const canvasRef = React85.useRef(null);
1633
+ const [, bump] = React86.useReducer((x) => x + 1, 0);
1634
+ const canvasRef = React86.useRef(null);
1529
1635
  const sliced = isAtlasAsset(asset);
1530
1636
  const atlas = sliced ? getAtlas(asset.atlas, bump) : void 0;
1531
1637
  const img = sliced && asset?.url ? getSheetImage(asset.url, bump) : null;
1532
1638
  const rect = sliced && atlas ? subRectFor(atlas, asset.sprite) : null;
1533
- React85.useEffect(() => {
1639
+ React86.useEffect(() => {
1534
1640
  const canvas = canvasRef.current;
1535
1641
  if (!canvas || !img || !rect) return;
1536
1642
  canvas.width = rect.sw;
@@ -1606,7 +1712,7 @@ function resolveIconProp(value, sizeClass) {
1606
1712
  const IconComp = value;
1607
1713
  return /* @__PURE__ */ jsx(IconComp, { className: sizeClass });
1608
1714
  }
1609
- if (React85__default.isValidElement(value)) {
1715
+ if (React86__default.isValidElement(value)) {
1610
1716
  return value;
1611
1717
  }
1612
1718
  if (typeof value === "object" && value !== null && isIconLike(value)) {
@@ -1683,7 +1789,7 @@ var init_Button = __esm({
1683
1789
  md: "h-icon-default w-icon-default",
1684
1790
  lg: "h-icon-default w-icon-default"
1685
1791
  };
1686
- Button = React85__default.forwardRef(
1792
+ Button = React86__default.forwardRef(
1687
1793
  ({
1688
1794
  className,
1689
1795
  variant = "primary",
@@ -1753,7 +1859,7 @@ var Dialog;
1753
1859
  var init_Dialog = __esm({
1754
1860
  "components/core/atoms/Dialog.tsx"() {
1755
1861
  init_cn();
1756
- Dialog = React85__default.forwardRef(
1862
+ Dialog = React86__default.forwardRef(
1757
1863
  ({
1758
1864
  role = "dialog",
1759
1865
  "aria-modal": ariaModal = true,
@@ -1964,7 +2070,7 @@ var init_Typography = __esm({
1964
2070
  if (format !== void 0 && format !== "none" && (typeof body === "string" || typeof body === "number" || body instanceof Date)) {
1965
2071
  body = formatValue(body, format);
1966
2072
  }
1967
- return React85__default.createElement(
2073
+ return React86__default.createElement(
1968
2074
  Component,
1969
2075
  {
1970
2076
  id,
@@ -2174,7 +2280,6 @@ var init_Modal = __esm({
2174
2280
  ),
2175
2281
  style: { backgroundColor: "rgba(0, 0, 0, 0.6)" },
2176
2282
  onClick: handleOverlayClick,
2177
- "aria-hidden": "true",
2178
2283
  children: /* @__PURE__ */ jsxs(
2179
2284
  Dialog,
2180
2285
  {
@@ -2409,7 +2514,7 @@ var init_Drawer = __esm({
2409
2514
  };
2410
2515
  const widthClass = width in sizeWidths ? sizeWidths[width] : "";
2411
2516
  const widthStyle = width in sizeWidths ? void 0 : { width };
2412
- const positionClasses = position === "right" ? "right-0 border-l" : "left-0 border-r";
2517
+ const positionClasses2 = position === "right" ? "right-0 border-l" : "left-0 border-r";
2413
2518
  const drawerSign = position === "right" ? 1 : -1;
2414
2519
  const slideTransform = position === "right" ? "translateX(100%)" : "translateX(-100%)";
2415
2520
  return /* @__PURE__ */ jsxs(Fragment, { children: [
@@ -2431,7 +2536,7 @@ var init_Drawer = __esm({
2431
2536
  className: cn(
2432
2537
  "fixed top-0 bottom-0 z-50",
2433
2538
  "flex flex-col max-h-screen",
2434
- positionClasses,
2539
+ positionClasses2,
2435
2540
  widthClass,
2436
2541
  drawerAnim,
2437
2542
  className
@@ -2527,7 +2632,7 @@ var init_Badge = __esm({
2527
2632
  md: "px-2.5 py-1 text-sm",
2528
2633
  lg: "px-3 py-1.5 text-base"
2529
2634
  };
2530
- Badge = React85__default.forwardRef(
2635
+ Badge = React86__default.forwardRef(
2531
2636
  ({ className, variant = "default", size = "sm", amount, label, icon, iconAsset, children, onRemove, removeLabel, ...props }, ref) => {
2532
2637
  const iconSizes3 = {
2533
2638
  sm: "h-icon-default w-icon-default",
@@ -2877,7 +2982,7 @@ var init_SvgFlow = __esm({
2877
2982
  width = 100,
2878
2983
  height = 100
2879
2984
  }) => {
2880
- const markerId = React85__default.useMemo(() => {
2985
+ const markerId = React86__default.useMemo(() => {
2881
2986
  flowIdCounter += 1;
2882
2987
  return `almadar-flow-arrow-${flowIdCounter}`;
2883
2988
  }, []);
@@ -3470,7 +3575,7 @@ var init_SvgRing = __esm({
3470
3575
  width = 100,
3471
3576
  height = 100
3472
3577
  }) => {
3473
- const gradientId = React85__default.useMemo(() => {
3578
+ const gradientId = React86__default.useMemo(() => {
3474
3579
  ringIdCounter += 1;
3475
3580
  return `almadar-ring-glow-${ringIdCounter}`;
3476
3581
  }, []);
@@ -3651,7 +3756,7 @@ var init_Input = __esm({
3651
3756
  init_cn();
3652
3757
  init_Icon();
3653
3758
  init_useEventBus();
3654
- Input = React85__default.forwardRef(
3759
+ Input = React86__default.forwardRef(
3655
3760
  ({
3656
3761
  className,
3657
3762
  inputType,
@@ -3675,9 +3780,9 @@ var init_Input = __esm({
3675
3780
  const eventBus = useEventBus();
3676
3781
  const type = inputType || htmlType || "text";
3677
3782
  const isDeclarative = typeof onChange === "string";
3678
- const [localValue, setLocalValue] = React85__default.useState(value);
3679
- const pendingEchoRef = React85__default.useRef(/* @__PURE__ */ new Set());
3680
- React85__default.useEffect(() => {
3783
+ const [localValue, setLocalValue] = React86__default.useState(value);
3784
+ const pendingEchoRef = React86__default.useRef(/* @__PURE__ */ new Set());
3785
+ React86__default.useEffect(() => {
3681
3786
  if (!isDeclarative) return;
3682
3787
  const incoming = value == null ? "" : String(value);
3683
3788
  if (pendingEchoRef.current.has(incoming)) {
@@ -3844,7 +3949,7 @@ var Label;
3844
3949
  var init_Label = __esm({
3845
3950
  "components/core/atoms/Label.tsx"() {
3846
3951
  init_cn();
3847
- Label = React85__default.forwardRef(
3952
+ Label = React86__default.forwardRef(
3848
3953
  ({ className, required, children, ...props }, ref) => {
3849
3954
  return /* @__PURE__ */ jsxs(
3850
3955
  "label",
@@ -3871,7 +3976,7 @@ var init_Textarea = __esm({
3871
3976
  "components/core/atoms/Textarea.tsx"() {
3872
3977
  init_cn();
3873
3978
  init_useEventBus();
3874
- Textarea = React85__default.forwardRef(
3979
+ Textarea = React86__default.forwardRef(
3875
3980
  ({ className, error, onChange, ...props }, ref) => {
3876
3981
  const eventBus = useEventBus();
3877
3982
  const handleChange = (e) => {
@@ -4121,7 +4226,7 @@ var init_Select = __esm({
4121
4226
  init_cn();
4122
4227
  init_Icon();
4123
4228
  init_useEventBus();
4124
- Select = React85__default.forwardRef(
4229
+ Select = React86__default.forwardRef(
4125
4230
  (props, _ref) => {
4126
4231
  const { multiple, searchable, clearable } = props;
4127
4232
  if (multiple || searchable || clearable) {
@@ -4138,7 +4243,7 @@ var init_Checkbox = __esm({
4138
4243
  "components/core/atoms/Checkbox.tsx"() {
4139
4244
  init_cn();
4140
4245
  init_useEventBus();
4141
- Checkbox = React85__default.forwardRef(
4246
+ Checkbox = React86__default.forwardRef(
4142
4247
  ({ className, label, id, onChange, ...props }, ref) => {
4143
4248
  const inputId = id || `checkbox-${Math.random().toString(36).substr(2, 9)}`;
4144
4249
  const eventBus = useEventBus();
@@ -4192,7 +4297,7 @@ var init_Spinner = __esm({
4192
4297
  md: "h-6 w-6",
4193
4298
  lg: "h-8 w-8"
4194
4299
  };
4195
- Spinner = React85__default.forwardRef(
4300
+ Spinner = React86__default.forwardRef(
4196
4301
  ({ className, size = "md", overlay, ...props }, ref) => {
4197
4302
  if (overlay) {
4198
4303
  return /* @__PURE__ */ jsx(
@@ -4282,7 +4387,7 @@ var init_Card = __esm({
4282
4387
  chip: "shadow-none rounded-pill border-[length:var(--border-width)] border-border",
4283
4388
  "tile-image-first": "p-0 overflow-hidden"
4284
4389
  };
4285
- Card = React85__default.forwardRef(
4390
+ Card = React86__default.forwardRef(
4286
4391
  ({
4287
4392
  className,
4288
4393
  variant = "bordered",
@@ -4331,9 +4436,9 @@ var init_Card = __esm({
4331
4436
  }
4332
4437
  );
4333
4438
  Card.displayName = "Card";
4334
- CardHeader = React85__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("mb-4", className), ...props }));
4439
+ CardHeader = React86__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("mb-4", className), ...props }));
4335
4440
  CardHeader.displayName = "CardHeader";
4336
- CardTitle = React85__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
4441
+ CardTitle = React86__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
4337
4442
  "h3",
4338
4443
  {
4339
4444
  ref,
@@ -4346,11 +4451,11 @@ var init_Card = __esm({
4346
4451
  }
4347
4452
  ));
4348
4453
  CardTitle.displayName = "CardTitle";
4349
- CardContent = React85__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("", className), ...props }));
4454
+ CardContent = React86__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("", className), ...props }));
4350
4455
  CardContent.displayName = "CardContent";
4351
4456
  CardBody = CardContent;
4352
4457
  CardBody.displayName = "CardBody";
4353
- CardFooter = React85__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
4458
+ CardFooter = React86__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
4354
4459
  "div",
4355
4460
  {
4356
4461
  ref,
@@ -4437,7 +4542,7 @@ var init_FilterPill = __esm({
4437
4542
  md: "w-3.5 h-3.5",
4438
4543
  lg: "w-4 h-4"
4439
4544
  };
4440
- FilterPill = React85__default.forwardRef(
4545
+ FilterPill = React86__default.forwardRef(
4441
4546
  ({
4442
4547
  className,
4443
4548
  variant = "default",
@@ -4566,8 +4671,8 @@ var init_Avatar = __esm({
4566
4671
  actionPayload
4567
4672
  }) => {
4568
4673
  const eventBus = useEventBus();
4569
- const [imgFailed, setImgFailed] = React85__default.useState(false);
4570
- React85__default.useEffect(() => {
4674
+ const [imgFailed, setImgFailed] = React86__default.useState(false);
4675
+ React86__default.useEffect(() => {
4571
4676
  setImgFailed(false);
4572
4677
  }, [src]);
4573
4678
  const initials = providedInitials ?? (name ? generateInitials(name) : void 0);
@@ -4680,7 +4785,7 @@ var init_Center = __esm({
4680
4785
  as: Component = "div"
4681
4786
  }) => {
4682
4787
  const mergedStyle = minHeight ? { minHeight, ...style } : style;
4683
- return React85__default.createElement(Component, {
4788
+ return React86__default.createElement(Component, {
4684
4789
  className: cn(
4685
4790
  inline ? "inline-flex" : "flex",
4686
4791
  horizontal && "justify-center",
@@ -4948,7 +5053,7 @@ var init_Radio = __esm({
4948
5053
  md: "w-2.5 h-2.5",
4949
5054
  lg: "w-3 h-3"
4950
5055
  };
4951
- Radio = React85__default.forwardRef(
5056
+ Radio = React86__default.forwardRef(
4952
5057
  ({
4953
5058
  label,
4954
5059
  helperText,
@@ -4965,12 +5070,12 @@ var init_Radio = __esm({
4965
5070
  onChange,
4966
5071
  ...props
4967
5072
  }, ref) => {
4968
- const reactId = React85__default.useId();
5073
+ const reactId = React86__default.useId();
4969
5074
  const baseId = id || `radio-${reactId}`;
4970
5075
  const hasError = !!error;
4971
5076
  const eventBus = useEventBus();
4972
- const [selected, setSelected] = React85__default.useState(value);
4973
- React85__default.useEffect(() => {
5077
+ const [selected, setSelected] = React86__default.useState(value);
5078
+ React86__default.useEffect(() => {
4974
5079
  if (value !== void 0) setSelected(value);
4975
5080
  }, [value]);
4976
5081
  const pick = (next, e) => {
@@ -5152,7 +5257,7 @@ var init_Switch = __esm({
5152
5257
  "components/core/atoms/Switch.tsx"() {
5153
5258
  "use client";
5154
5259
  init_cn();
5155
- Switch = React85.forwardRef(
5260
+ Switch = React86.forwardRef(
5156
5261
  ({
5157
5262
  checked,
5158
5263
  defaultChecked = false,
@@ -5163,10 +5268,10 @@ var init_Switch = __esm({
5163
5268
  name,
5164
5269
  className
5165
5270
  }, ref) => {
5166
- const [isChecked, setIsChecked] = React85.useState(
5271
+ const [isChecked, setIsChecked] = React86.useState(
5167
5272
  checked !== void 0 ? checked : defaultChecked
5168
5273
  );
5169
- React85.useEffect(() => {
5274
+ React86.useEffect(() => {
5170
5275
  if (checked !== void 0) {
5171
5276
  setIsChecked(checked);
5172
5277
  }
@@ -5329,7 +5434,7 @@ var init_Stack = __esm({
5329
5434
  };
5330
5435
  const isHorizontal = direction === "horizontal";
5331
5436
  const directionClass = responsive && isHorizontal ? reverse ? "flex-col-reverse md:flex-row-reverse" : "flex-col md:flex-row" : isHorizontal ? reverse ? "flex-row-reverse" : "flex-row" : reverse ? "flex-col-reverse" : "flex-col";
5332
- return React85__default.createElement(
5437
+ return React86__default.createElement(
5333
5438
  Component,
5334
5439
  {
5335
5440
  className: cn(
@@ -5529,7 +5634,7 @@ var Aside;
5529
5634
  var init_Aside = __esm({
5530
5635
  "components/core/atoms/Aside.tsx"() {
5531
5636
  init_cn();
5532
- Aside = React85__default.forwardRef(
5637
+ Aside = React86__default.forwardRef(
5533
5638
  ({ className, children, ...rest }, ref) => /* @__PURE__ */ jsx("aside", { ref, className: cn(className), ...rest, children })
5534
5639
  );
5535
5640
  Aside.displayName = "Aside";
@@ -5608,9 +5713,9 @@ var init_LawReferenceTooltip = __esm({
5608
5713
  className
5609
5714
  }) => {
5610
5715
  const { t } = useTranslate();
5611
- const [isVisible, setIsVisible] = React85__default.useState(false);
5612
- const timeoutRef = React85__default.useRef(null);
5613
- const triggerRef = React85__default.useRef(null);
5716
+ const [isVisible, setIsVisible] = React86__default.useState(false);
5717
+ const timeoutRef = React86__default.useRef(null);
5718
+ const triggerRef = React86__default.useRef(null);
5614
5719
  const handleMouseEnter = () => {
5615
5720
  if (timeoutRef.current) clearTimeout(timeoutRef.current);
5616
5721
  timeoutRef.current = setTimeout(() => setIsVisible(true), 200);
@@ -5621,7 +5726,7 @@ var init_LawReferenceTooltip = __esm({
5621
5726
  };
5622
5727
  const { revealed, triggerProps } = useTapReveal({ refs: [triggerRef] });
5623
5728
  const open = isVisible || revealed;
5624
- React85__default.useEffect(() => {
5729
+ React86__default.useEffect(() => {
5625
5730
  return () => {
5626
5731
  if (timeoutRef.current) clearTimeout(timeoutRef.current);
5627
5732
  };
@@ -5831,7 +5936,7 @@ var init_StatusDot = __esm({
5831
5936
  md: "w-2.5 h-2.5",
5832
5937
  lg: "w-3 h-3"
5833
5938
  };
5834
- StatusDot = React85__default.forwardRef(
5939
+ StatusDot = React86__default.forwardRef(
5835
5940
  ({ className, status = "offline", pulse = false, size = "md", label, ...props }, ref) => {
5836
5941
  return /* @__PURE__ */ jsx(
5837
5942
  "span",
@@ -5885,7 +5990,7 @@ var init_TrendIndicator = __esm({
5885
5990
  down: "trending-down",
5886
5991
  flat: "arrow-right"
5887
5992
  };
5888
- TrendIndicator = React85__default.forwardRef(
5993
+ TrendIndicator = React86__default.forwardRef(
5889
5994
  ({
5890
5995
  className,
5891
5996
  value,
@@ -5954,7 +6059,7 @@ var init_RangeSlider = __esm({
5954
6059
  md: "w-4 h-4",
5955
6060
  lg: "w-5 h-5"
5956
6061
  };
5957
- RangeSlider = React85__default.forwardRef(
6062
+ RangeSlider = React86__default.forwardRef(
5958
6063
  ({
5959
6064
  className,
5960
6065
  min = 0,
@@ -6576,7 +6681,7 @@ var init_ContentSection = __esm({
6576
6681
  md: "py-16",
6577
6682
  lg: "py-24"
6578
6683
  };
6579
- ContentSection = React85__default.forwardRef(
6684
+ ContentSection = React86__default.forwardRef(
6580
6685
  ({ children, background = "default", padding = "lg", id, className }, ref) => {
6581
6686
  return /* @__PURE__ */ jsx(
6582
6687
  Box,
@@ -7110,7 +7215,7 @@ var init_AnimatedReveal = __esm({
7110
7215
  "scale-up": { opacity: 1, transform: "scale(1) translateY(0)" },
7111
7216
  "none": {}
7112
7217
  };
7113
- AnimatedReveal = React85__default.forwardRef(
7218
+ AnimatedReveal = React86__default.forwardRef(
7114
7219
  ({
7115
7220
  trigger = "scroll",
7116
7221
  animation = "fade-up",
@@ -7270,7 +7375,7 @@ var init_AnimatedGraphic = __esm({
7270
7375
  "components/marketing/atoms/AnimatedGraphic.tsx"() {
7271
7376
  "use client";
7272
7377
  init_cn();
7273
- AnimatedGraphic = React85__default.forwardRef(
7378
+ AnimatedGraphic = React86__default.forwardRef(
7274
7379
  ({
7275
7380
  src,
7276
7381
  svgContent,
@@ -7293,7 +7398,7 @@ var init_AnimatedGraphic = __esm({
7293
7398
  const fetchedSvg = useFetchedSvg(svgContent ? void 0 : src);
7294
7399
  const resolvedSvg = svgContent ?? fetchedSvg;
7295
7400
  const prevAnimateRef = useRef(animate);
7296
- const setRef = React85__default.useCallback(
7401
+ const setRef = React86__default.useCallback(
7297
7402
  (node) => {
7298
7403
  containerRef.current = node;
7299
7404
  if (typeof ref === "function") ref(node);
@@ -8045,9 +8150,9 @@ function ControlButton({
8045
8150
  className
8046
8151
  }) {
8047
8152
  const eventBus = useEventBus();
8048
- const [isPressed, setIsPressed] = React85.useState(false);
8153
+ const [isPressed, setIsPressed] = React86.useState(false);
8049
8154
  const actualPressed = pressed ?? isPressed;
8050
- const handlePointerDown = React85.useCallback(
8155
+ const handlePointerDown = React86.useCallback(
8051
8156
  (e) => {
8052
8157
  e.preventDefault();
8053
8158
  if (disabled) return;
@@ -8057,7 +8162,7 @@ function ControlButton({
8057
8162
  },
8058
8163
  [disabled, pressEvent, eventBus, onPress]
8059
8164
  );
8060
- const handlePointerUp = React85.useCallback(
8165
+ const handlePointerUp = React86.useCallback(
8061
8166
  (e) => {
8062
8167
  e.preventDefault();
8063
8168
  if (disabled) return;
@@ -8067,7 +8172,7 @@ function ControlButton({
8067
8172
  },
8068
8173
  [disabled, releaseEvent, eventBus, onRelease]
8069
8174
  );
8070
- const handlePointerLeave = React85.useCallback(
8175
+ const handlePointerLeave = React86.useCallback(
8071
8176
  (e) => {
8072
8177
  if (isPressed) {
8073
8178
  setIsPressed(false);
@@ -8326,18 +8431,18 @@ function ControlGrid({
8326
8431
  className
8327
8432
  }) {
8328
8433
  const eventBus = useEventBus();
8329
- const [active, setActive] = React85.useState(/* @__PURE__ */ new Set());
8330
- const [coarse, setCoarse] = React85.useState(
8434
+ const [active, setActive] = React86.useState(/* @__PURE__ */ new Set());
8435
+ const [coarse, setCoarse] = React86.useState(
8331
8436
  () => typeof window !== "undefined" && window.matchMedia("(pointer: coarse)").matches
8332
8437
  );
8333
- React85.useEffect(() => {
8438
+ React86.useEffect(() => {
8334
8439
  if (visibility !== "auto" || typeof window === "undefined") return;
8335
8440
  const mq = window.matchMedia("(pointer: coarse)");
8336
8441
  const onChange = (e) => setCoarse(e.matches);
8337
8442
  mq.addEventListener("change", onChange);
8338
8443
  return () => mq.removeEventListener("change", onChange);
8339
8444
  }, [visibility]);
8340
- const handlePress = React85.useCallback(
8445
+ const handlePress = React86.useCallback(
8341
8446
  (id) => {
8342
8447
  setActive((prev) => new Set(prev).add(id));
8343
8448
  if (actionEvent) eventBus.emit(`UI:${actionEvent}`, { id, pressed: true });
@@ -8351,7 +8456,7 @@ function ControlGrid({
8351
8456
  },
8352
8457
  [kind, actionEvent, directionEvent, directionEvents, eventBus, onAction, onDirection]
8353
8458
  );
8354
- const handleRelease = React85.useCallback(
8459
+ const handleRelease = React86.useCallback(
8355
8460
  (id) => {
8356
8461
  setActive((prev) => {
8357
8462
  const next = new Set(prev);
@@ -8714,7 +8819,7 @@ function GameMenu({
8714
8819
  }) {
8715
8820
  const resolvedOptions = (options?.length ? options : void 0) ?? (menuItems?.length ? menuItems : void 0) ?? DEFAULT_MENU_OPTIONS;
8716
8821
  const eventBus = useEventBus();
8717
- const handleOptionClick = React85.useCallback(
8822
+ const handleOptionClick = React86.useCallback(
8718
8823
  (option) => {
8719
8824
  if (option.event) {
8720
8825
  eventBus.emit(`UI:${option.event}`, { option });
@@ -8950,7 +9055,7 @@ function StateGraph({
8950
9055
  }) {
8951
9056
  const eventBus = useEventBus();
8952
9057
  const nodes = states ?? [];
8953
- const positions = React85.useMemo(() => layoutStates(nodes, width, height), [nodes, width, height]);
9058
+ const positions = React86.useMemo(() => layoutStates(nodes, width, height), [nodes, width, height]);
8954
9059
  return /* @__PURE__ */ jsxs(
8955
9060
  Box,
8956
9061
  {
@@ -9021,8 +9126,8 @@ function MiniMap({
9021
9126
  tileAssets,
9022
9127
  unitAssets
9023
9128
  }) {
9024
- const canvasRef = React85.useRef(null);
9025
- const imgCacheRef = React85.useRef(/* @__PURE__ */ new Map());
9129
+ const canvasRef = React86.useRef(null);
9130
+ const imgCacheRef = React86.useRef(/* @__PURE__ */ new Map());
9026
9131
  function loadImg(url) {
9027
9132
  const cached = imgCacheRef.current.get(url);
9028
9133
  if (cached) return cached.complete ? cached : null;
@@ -9038,7 +9143,7 @@ function MiniMap({
9038
9143
  imgCacheRef.current.set(url, img);
9039
9144
  return null;
9040
9145
  }
9041
- React85.useEffect(() => {
9146
+ React86.useEffect(() => {
9042
9147
  const canvas = canvasRef.current;
9043
9148
  if (!canvas) return;
9044
9149
  const ctx = canvas.getContext("2d");
@@ -10165,7 +10270,7 @@ function proceduralShapes(view, pos, fade, progress) {
10165
10270
  }
10166
10271
  }
10167
10272
  }
10168
- function expandFxItem(view, node, epochNowMs, dim, projector) {
10273
+ function expandFxItem(view, node, epochNowMs, dim, projector, fontFamily) {
10169
10274
  if (view.space === "screen") return [];
10170
10275
  const tickMs = node.tickMs ?? DEFAULT_TICK_MS;
10171
10276
  const { ageMs, progress, fade } = fxLifecycle(view, epochNowMs, tickMs);
@@ -10202,6 +10307,7 @@ function expandFxItem(view, node, epochNowMs, dim, projector) {
10202
10307
  }
10203
10308
  if (view.message) {
10204
10309
  const pxSize = projector && view.size !== void 0 ? Math.max(10, Math.round(view.size * projector.tileWidth)) : void 0;
10310
+ const family = fontFamily ?? "system-ui, sans-serif";
10205
10311
  const text = {
10206
10312
  type: "draw-text",
10207
10313
  text: view.message,
@@ -10209,18 +10315,18 @@ function expandFxItem(view, node, epochNowMs, dim, projector) {
10209
10315
  offsetY: -(0.15 + 0.55 * progress),
10210
10316
  color: view.color ?? node.textColor ?? DEFAULT_TEXT_COLOR,
10211
10317
  opacity: fade,
10212
- ...pxSize ? { font: `bold ${pxSize}px system-ui, sans-serif` } : {}
10318
+ font: `bold ${pxSize ?? 14}px ${family}`
10213
10319
  };
10214
10320
  out.push(text);
10215
10321
  }
10216
10322
  return out;
10217
10323
  }
10218
- function expandFxLayer(node, epochNowMs, dim, projector) {
10324
+ function expandFxLayer(node, epochNowMs, dim, projector, fontFamily) {
10219
10325
  if (!Array.isArray(node.items)) return [];
10220
10326
  const out = [];
10221
10327
  for (const item of node.items) {
10222
10328
  if (!item || typeof item.id !== "string") continue;
10223
- out.push(...expandFxItem(resolveFxView(item, node.presets), node, epochNowMs, dim, projector));
10329
+ out.push(...expandFxItem(resolveFxView(item, node.presets), node, epochNowMs, dim, projector, fontFamily));
10224
10330
  }
10225
10331
  return out;
10226
10332
  }
@@ -10287,7 +10393,7 @@ function paintDrawable(painter, node, dctx) {
10287
10393
  break;
10288
10394
  case "draw-fx-layer": {
10289
10395
  const epochNow = dctx.time > 0 && typeof performance !== "undefined" ? performance.timeOrigin + dctx.time : 0;
10290
- for (const child of expandFxLayer(node, epochNow, "2d", dctx.projector)) paintDrawable(painter, child, dctx);
10396
+ for (const child of expandFxLayer(node, epochNow, "2d", dctx.projector, dctx.fontFamily)) paintDrawable(painter, child, dctx);
10291
10397
  break;
10292
10398
  }
10293
10399
  }
@@ -10397,7 +10503,7 @@ function Canvas2D({
10397
10503
  const registerChildDrawable = useCallback((node) => {
10398
10504
  childDrawablesRef.current.push(node);
10399
10505
  }, []);
10400
- const hasJsxChildren = React85.Children.count(children) > 0;
10506
+ const hasJsxChildren = React86.Children.count(children) > 0;
10401
10507
  function isDrawableLayer(node) {
10402
10508
  return node.type === "draw-sprite-layer" || node.type === "draw-shape-layer" || node.type === "draw-text-layer";
10403
10509
  }
@@ -10955,7 +11061,7 @@ function Canvas({
10955
11061
  if (mode !== "3d") return;
10956
11062
  const next = childDrawablesRef.current;
10957
11063
  canvasLog.debug("children:adopt", { registered: next.length, adopted: childDrawables.length });
10958
- if (next.length === 0 && React85.Children.count(children) > 0) return;
11064
+ if (next.length === 0 && React86.Children.count(children) > 0) return;
10959
11065
  setChildDrawables(
10960
11066
  (prev) => prev.length === next.length && JSON.stringify(prev) === JSON.stringify(next) ? prev : [...next]
10961
11067
  );
@@ -10993,7 +11099,7 @@ function Canvas({
10993
11099
  };
10994
11100
  return /* @__PURE__ */ jsxs(Fragment, { children: [
10995
11101
  /* @__PURE__ */ jsx(Suspense, { fallback: null, children: /* @__PURE__ */ jsx(Canvas3DHost, { ...props3d }) }),
10996
- React85.Children.count(children) > 0 && /* @__PURE__ */ jsx(DrawableRegistryContext.Provider, { value: registerChildDrawable, children: /* @__PURE__ */ jsx("div", { "aria-hidden": "true", style: { position: "absolute", width: 0, height: 0, overflow: "hidden" }, children }) })
11102
+ React86.Children.count(children) > 0 && /* @__PURE__ */ jsx(DrawableRegistryContext.Provider, { value: registerChildDrawable, children: /* @__PURE__ */ jsx("div", { "aria-hidden": "true", style: { position: "absolute", width: 0, height: 0, overflow: "hidden" }, children }) })
10997
11103
  ] });
10998
11104
  }
10999
11105
  return /* @__PURE__ */ jsx(
@@ -11151,7 +11257,7 @@ function LinearView({
11151
11257
  /* @__PURE__ */ jsx(HStack, { className: "flex-wrap items-center", gap: "xs", children: trait.states.map((state, i) => {
11152
11258
  const isDone = i < currentIdx;
11153
11259
  const isCurrent = i === currentIdx;
11154
- return /* @__PURE__ */ jsxs(React85__default.Fragment, { children: [
11260
+ return /* @__PURE__ */ jsxs(React86__default.Fragment, { children: [
11155
11261
  i > 0 && /* @__PURE__ */ jsx(
11156
11262
  Typography,
11157
11263
  {
@@ -11686,7 +11792,7 @@ function SequenceBar({
11686
11792
  else onSlotRemove?.(index);
11687
11793
  }, [emit, slotRemoveEvent, onSlotRemove, playing]);
11688
11794
  const paddedSlots = Array.from({ length: maxSlots }, (_, i) => slots[i]);
11689
- return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(React85__default.Fragment, { children: [
11795
+ return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(React86__default.Fragment, { children: [
11690
11796
  i > 0 && /* @__PURE__ */ jsx(
11691
11797
  Typography,
11692
11798
  {
@@ -12371,7 +12477,7 @@ var init_LearningCanvas = __esm({
12371
12477
  if (drawables?.length && projector) {
12372
12478
  const painter = createWebPainter(ctx, invalidateRef.current);
12373
12479
  const timeMs = needsAnim && typeof performance !== "undefined" ? performance.now() : 0;
12374
- const dctx = { projector, time: timeMs, invalidate: invalidateRef.current };
12480
+ const dctx = { projector, time: timeMs, invalidate: invalidateRef.current, fontFamily: themeBodyFont(canvas) };
12375
12481
  for (const node of drawables) {
12376
12482
  paintDrawable(painter, node, dctx);
12377
12483
  }
@@ -12533,7 +12639,7 @@ var init_ErrorBoundary = __esm({
12533
12639
  }
12534
12640
  );
12535
12641
  };
12536
- ErrorBoundary = class extends React85__default.Component {
12642
+ ErrorBoundary = class extends React86__default.Component {
12537
12643
  constructor(props) {
12538
12644
  super(props);
12539
12645
  __publicField(this, "reset", () => {
@@ -12802,7 +12908,7 @@ var init_Container = __esm({
12802
12908
  as: Component = "div"
12803
12909
  }) => {
12804
12910
  const resolvedSize = maxWidth ?? size ?? "lg";
12805
- return React85__default.createElement(
12911
+ return React86__default.createElement(
12806
12912
  Component,
12807
12913
  {
12808
12914
  className: cn(
@@ -13739,7 +13845,7 @@ var init_FloatingActionButton = __esm({
13739
13845
  document.addEventListener("mousedown", handleClickOutside);
13740
13846
  return () => document.removeEventListener("mousedown", handleClickOutside);
13741
13847
  }, [isExpanded, actions]);
13742
- const positionClasses = {
13848
+ const positionClasses2 = {
13743
13849
  "bottom-right": "bottom-6 right-6",
13744
13850
  "bottom-left": "bottom-6 left-6",
13745
13851
  "bottom-center": "bottom-6 left-1/2 -translate-x-1/2",
@@ -13748,7 +13854,7 @@ var init_FloatingActionButton = __esm({
13748
13854
  "top-center": "top-6 left-1/2 -translate-x-1/2"
13749
13855
  };
13750
13856
  if (resolvedAction && (!actions || actions.length === 0)) {
13751
- return /* @__PURE__ */ jsx(Box, { className: cn("fixed z-50", positionClasses[position], className), children: /* @__PURE__ */ jsx(
13857
+ return /* @__PURE__ */ jsx(Box, { className: cn("fixed z-50", positionClasses2[position], className), children: /* @__PURE__ */ jsx(
13752
13858
  Button,
13753
13859
  {
13754
13860
  variant: resolvedAction.variant || "primary",
@@ -13776,7 +13882,7 @@ var init_FloatingActionButton = __esm({
13776
13882
  ref: fabRef,
13777
13883
  className: cn(
13778
13884
  "fixed z-50 flex flex-col items-end gap-3",
13779
- positionClasses[position],
13885
+ positionClasses2[position],
13780
13886
  position.includes("left") && "items-start",
13781
13887
  className
13782
13888
  ),
@@ -16712,9 +16818,11 @@ var init_Tabs = __esm({
16712
16818
  }
16713
16819
  };
16714
16820
  const handleKeyDown = (e, index) => {
16715
- if (e.key === "ArrowLeft" || e.key === "ArrowRight") {
16821
+ const prevKey = orientation === "vertical" ? "ArrowUp" : "ArrowLeft";
16822
+ const nextKey = orientation === "vertical" ? "ArrowDown" : "ArrowRight";
16823
+ if (e.key === prevKey || e.key === nextKey) {
16716
16824
  e.preventDefault();
16717
- const direction = e.key === "ArrowLeft" ? -1 : 1;
16825
+ const direction = e.key === prevKey ? -1 : 1;
16718
16826
  const nextIndex = (index + direction + safeItems.length) % safeItems.length;
16719
16827
  const nextTab = safeItems[nextIndex];
16720
16828
  if (nextTab && !nextTab.disabled) {
@@ -17286,7 +17394,7 @@ var init_CodeBlock = __esm({
17286
17394
  DIFF_STYLE_FALLBACK = { bg: "", prefix: " ", text: "text-foreground" };
17287
17395
  LINE_PROPS_FN = (n) => ({ "data-line": String(n - 1) });
17288
17396
  HIDDEN_LINE_NUMBERS = { display: "none" };
17289
- CodeBlock = React85__default.memo(
17397
+ CodeBlock = React86__default.memo(
17290
17398
  ({
17291
17399
  code: rawCode,
17292
17400
  language = "text",
@@ -17869,14 +17977,77 @@ var init_CodeBlock = __esm({
17869
17977
  CodeBlock.displayName = "CodeBlock";
17870
17978
  }
17871
17979
  });
17980
+ function loadMermaid() {
17981
+ mermaidModule ?? (mermaidModule = import('mermaid').then((m) => m.default));
17982
+ return mermaidModule;
17983
+ }
17984
+ var mermaidModule, MermaidDiagram;
17985
+ var init_MermaidDiagram = __esm({
17986
+ "components/core/molecules/markdown/MermaidDiagram.tsx"() {
17987
+ init_Box();
17988
+ init_Typography();
17989
+ init_CodeBlock();
17990
+ init_cn();
17991
+ mermaidModule = null;
17992
+ MermaidDiagram = React86__default.memo(
17993
+ ({ code, className }) => {
17994
+ const { resolvedMode } = useTheme();
17995
+ const containerRef = useRef(null);
17996
+ const [error, setError] = useState(null);
17997
+ const reactId = useId();
17998
+ useEffect(() => {
17999
+ let active = true;
18000
+ void (async () => {
18001
+ try {
18002
+ const mermaid = await loadMermaid();
18003
+ mermaid.initialize({
18004
+ startOnLoad: false,
18005
+ securityLevel: "strict",
18006
+ theme: resolvedMode === "dark" ? "dark" : "default"
18007
+ });
18008
+ const domId = `mermaid-${reactId.replace(/[^a-zA-Z0-9]/g, "")}`;
18009
+ const { svg } = await mermaid.render(domId, code);
18010
+ if (!active || !containerRef.current) return;
18011
+ containerRef.current.innerHTML = svg;
18012
+ setError(null);
18013
+ } catch (err) {
18014
+ if (active) setError(err instanceof Error ? err.message : String(err));
18015
+ }
18016
+ })();
18017
+ return () => {
18018
+ active = false;
18019
+ };
18020
+ }, [code, resolvedMode, reactId]);
18021
+ return /* @__PURE__ */ jsxs(Box, { className: cn("not-prose my-4", className), children: [
18022
+ error !== null && /* @__PURE__ */ jsxs(Box, { className: "space-y-2 mb-2", children: [
18023
+ /* @__PURE__ */ jsx(Typography, { variant: "caption", className: "text-error whitespace-pre-wrap", children: error }),
18024
+ /* @__PURE__ */ jsx(CodeBlock, { code, language: "mermaid" })
18025
+ ] }),
18026
+ /* @__PURE__ */ jsx(
18027
+ Box,
18028
+ {
18029
+ ref: containerRef,
18030
+ "data-testid": "mermaid-diagram",
18031
+ className: "overflow-x-auto",
18032
+ style: error !== null ? { display: "none" } : void 0
18033
+ }
18034
+ )
18035
+ ] });
18036
+ },
18037
+ (prev, next) => prev.code === next.code && prev.className === next.className
18038
+ );
18039
+ MermaidDiagram.displayName = "MermaidDiagram";
18040
+ }
18041
+ });
17872
18042
  var MarkdownContent;
17873
18043
  var init_MarkdownContent = __esm({
17874
18044
  "components/core/molecules/markdown/MarkdownContent.tsx"() {
17875
18045
  init_katex_min();
17876
18046
  init_Box();
17877
18047
  init_CodeBlock();
18048
+ init_MermaidDiagram();
17878
18049
  init_cn();
17879
- MarkdownContent = React85__default.memo(
18050
+ MarkdownContent = React86__default.memo(
17880
18051
  ({ content, direction = "ltr", className }) => {
17881
18052
  const { t: _t } = useTranslate();
17882
18053
  const safeContent = typeof content === "string" ? content : String(content ?? "");
@@ -17921,6 +18092,9 @@ var init_MarkdownContent = __esm({
17921
18092
  if (!inline) {
17922
18093
  const match = /language-(\w+)/.exec(codeClassName ?? "");
17923
18094
  const code = String(children).replace(/\n$/, "");
18095
+ if (match?.[1] === "mermaid") {
18096
+ return /* @__PURE__ */ jsx(MermaidDiagram, { code });
18097
+ }
17924
18098
  if (match) {
17925
18099
  return /* @__PURE__ */ jsx(
17926
18100
  CodeBlock,
@@ -19153,7 +19327,7 @@ var init_StateMachineView = __esm({
19153
19327
  style: { top: title ? 30 : 0 },
19154
19328
  children: [
19155
19329
  entity && /* @__PURE__ */ jsx(EntityBox, { entity, config }),
19156
- states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(React85__default.Fragment, { children: renderStateNode(state, config) }, state.id) : /* @__PURE__ */ jsx(
19330
+ states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(React86__default.Fragment, { children: renderStateNode(state, config) }, state.id) : /* @__PURE__ */ jsx(
19157
19331
  StateNode2,
19158
19332
  {
19159
19333
  state,
@@ -25261,7 +25435,7 @@ var init_Menu = __esm({
25261
25435
  "bottom-end": "bottom-start"
25262
25436
  };
25263
25437
  const effectivePosition = direction === "rtl" ? rtlMirror[position] ?? position : position;
25264
- const triggerElement = React85__default.isValidElement(trigger) ? React85__default.cloneElement(trigger, {
25438
+ const triggerElement = React86__default.isValidElement(trigger) ? React86__default.cloneElement(trigger, {
25265
25439
  ref: triggerRef,
25266
25440
  onClick: handleToggle
25267
25441
  }) : /* @__PURE__ */ jsx(
@@ -25364,14 +25538,14 @@ function useDataDnd(args) {
25364
25538
  const isZone = Boolean(dragGroup || accepts || sortable);
25365
25539
  const enabled = isZone || Boolean(dndRoot);
25366
25540
  const eventBus = useEventBus();
25367
- const parentRoot = React85__default.useContext(RootCtx);
25541
+ const parentRoot = React86__default.useContext(RootCtx);
25368
25542
  const isRoot = enabled && parentRoot === null;
25369
- const zoneId = React85__default.useId();
25543
+ const zoneId = React86__default.useId();
25370
25544
  const ownGroup = dragGroup ?? accepts ?? zoneId;
25371
- const [optimisticOrders, setOptimisticOrders] = React85__default.useState(() => /* @__PURE__ */ new Map());
25372
- const optimisticOrdersRef = React85__default.useRef(optimisticOrders);
25545
+ const [optimisticOrders, setOptimisticOrders] = React86__default.useState(() => /* @__PURE__ */ new Map());
25546
+ const optimisticOrdersRef = React86__default.useRef(optimisticOrders);
25373
25547
  optimisticOrdersRef.current = optimisticOrders;
25374
- const clearOptimisticOrder = React85__default.useCallback((group) => {
25548
+ const clearOptimisticOrder = React86__default.useCallback((group) => {
25375
25549
  setOptimisticOrders((prev) => {
25376
25550
  if (!prev.has(group)) return prev;
25377
25551
  const next = new Map(prev);
@@ -25396,7 +25570,7 @@ function useDataDnd(args) {
25396
25570
  const raw = it[dndItemIdField];
25397
25571
  return raw != null ? String(raw) : `__idx_${idx}`;
25398
25572
  }).join("|");
25399
- const itemIds = React85__default.useMemo(
25573
+ const itemIds = React86__default.useMemo(
25400
25574
  () => orderedItems.map((it, idx) => {
25401
25575
  const raw = it[dndItemIdField];
25402
25576
  return raw != null ? String(raw) : `__idx_${idx}`;
@@ -25407,7 +25581,7 @@ function useDataDnd(args) {
25407
25581
  const raw = it[dndItemIdField];
25408
25582
  return raw != null ? String(raw) : `__${idx}`;
25409
25583
  }).join("|");
25410
- React85__default.useEffect(() => {
25584
+ React86__default.useEffect(() => {
25411
25585
  const root = isRoot ? null : parentRoot;
25412
25586
  if (root) {
25413
25587
  root.clearOptimisticOrder(ownGroup);
@@ -25415,20 +25589,20 @@ function useDataDnd(args) {
25415
25589
  clearOptimisticOrder(ownGroup);
25416
25590
  }
25417
25591
  }, [itemsContentSig, ownGroup]);
25418
- const zonesRef = React85__default.useRef(/* @__PURE__ */ new Map());
25419
- const registerZone = React85__default.useCallback((zoneId2, meta2) => {
25592
+ const zonesRef = React86__default.useRef(/* @__PURE__ */ new Map());
25593
+ const registerZone = React86__default.useCallback((zoneId2, meta2) => {
25420
25594
  zonesRef.current.set(zoneId2, meta2);
25421
25595
  }, []);
25422
- const unregisterZone = React85__default.useCallback((zoneId2) => {
25596
+ const unregisterZone = React86__default.useCallback((zoneId2) => {
25423
25597
  zonesRef.current.delete(zoneId2);
25424
25598
  }, []);
25425
- const [activeDrag, setActiveDrag] = React85__default.useState(null);
25426
- const [overZoneGroup, setOverZoneGroup] = React85__default.useState(null);
25427
- const meta = React85__default.useMemo(
25599
+ const [activeDrag, setActiveDrag] = React86__default.useState(null);
25600
+ const [overZoneGroup, setOverZoneGroup] = React86__default.useState(null);
25601
+ const meta = React86__default.useMemo(
25428
25602
  () => ({ group: ownGroup, dropEvent, reorderEvent, positionEvent, itemIds, rawItems: items, idField: dndItemIdField }),
25429
25603
  [ownGroup, dropEvent, reorderEvent, positionEvent, itemIds, items, dndItemIdField]
25430
25604
  );
25431
- React85__default.useEffect(() => {
25605
+ React86__default.useEffect(() => {
25432
25606
  const target = isRoot ? null : parentRoot;
25433
25607
  if (!target) {
25434
25608
  zonesRef.current.set(zoneId, meta);
@@ -25447,7 +25621,7 @@ function useDataDnd(args) {
25447
25621
  }, [parentRoot, isRoot, zoneId, meta]);
25448
25622
  const sensors = useAlmadarDndSensors(true);
25449
25623
  const collisionDetection = almadarDndCollisionDetection;
25450
- const findZoneByItem = React85__default.useCallback(
25624
+ const findZoneByItem = React86__default.useCallback(
25451
25625
  (id) => {
25452
25626
  for (const z of zonesRef.current.values()) {
25453
25627
  if (z.itemIds.includes(id)) return z;
@@ -25456,7 +25630,7 @@ function useDataDnd(args) {
25456
25630
  },
25457
25631
  []
25458
25632
  );
25459
- React85__default.useCallback(
25633
+ React86__default.useCallback(
25460
25634
  (group) => {
25461
25635
  for (const z of zonesRef.current.values()) {
25462
25636
  if (z.group === group) return z;
@@ -25465,7 +25639,7 @@ function useDataDnd(args) {
25465
25639
  },
25466
25640
  []
25467
25641
  );
25468
- const handleDragEnd = React85__default.useCallback(
25642
+ const handleDragEnd = React86__default.useCallback(
25469
25643
  (event) => {
25470
25644
  const { active, over } = event;
25471
25645
  const activeIdStr = String(active.id);
@@ -25556,8 +25730,8 @@ function useDataDnd(args) {
25556
25730
  },
25557
25731
  [eventBus]
25558
25732
  );
25559
- const sortableData = React85__default.useMemo(() => ({ dndGroup: ownGroup }), [ownGroup]);
25560
- const SortableItem = React85__default.useCallback(
25733
+ const sortableData = React86__default.useMemo(() => ({ dndGroup: ownGroup }), [ownGroup]);
25734
+ const SortableItem = React86__default.useCallback(
25561
25735
  ({ id, children }) => {
25562
25736
  const {
25563
25737
  attributes,
@@ -25597,7 +25771,7 @@ function useDataDnd(args) {
25597
25771
  id: droppableId,
25598
25772
  data: sortableData
25599
25773
  });
25600
- const ctx = React85__default.useContext(RootCtx);
25774
+ const ctx = React86__default.useContext(RootCtx);
25601
25775
  const activeDrag2 = ctx?.activeDrag ?? null;
25602
25776
  const overZoneGroup2 = ctx?.overZoneGroup ?? null;
25603
25777
  const isThisZoneOver = overZoneGroup2 === ownGroup;
@@ -25612,7 +25786,7 @@ function useDataDnd(args) {
25612
25786
  showForeignPlaceholder,
25613
25787
  ctxAvailable: ctx != null
25614
25788
  });
25615
- React85__default.useEffect(() => {
25789
+ React86__default.useEffect(() => {
25616
25790
  dndLog.info("dropzone:isOver:change", { droppableId, group: ownGroup, isOver, isThisZoneOver, showForeignPlaceholder, activeDragSourceGroup: activeDrag2?.sourceGroup ?? null });
25617
25791
  }, [droppableId, isOver, isThisZoneOver, showForeignPlaceholder]);
25618
25792
  return /* @__PURE__ */ jsx(
@@ -25626,11 +25800,11 @@ function useDataDnd(args) {
25626
25800
  }
25627
25801
  );
25628
25802
  };
25629
- const rootContextValue = React85__default.useMemo(
25803
+ const rootContextValue = React86__default.useMemo(
25630
25804
  () => ({ registerZone, unregisterZone, activeDrag, overZoneGroup, optimisticOrders, clearOptimisticOrder }),
25631
25805
  [registerZone, unregisterZone, activeDrag, overZoneGroup, optimisticOrders, clearOptimisticOrder]
25632
25806
  );
25633
- const handleDragStart = React85__default.useCallback((event) => {
25807
+ const handleDragStart = React86__default.useCallback((event) => {
25634
25808
  const sourceZone = findZoneByItem(event.active.id);
25635
25809
  const rect = event.active.rect.current.initial;
25636
25810
  const height = rect?.height && rect.height > 0 ? rect.height : 64;
@@ -25649,7 +25823,7 @@ function useDataDnd(args) {
25649
25823
  isRoot
25650
25824
  });
25651
25825
  }, [findZoneByItem, isRoot, zoneId]);
25652
- const handleDragOver = React85__default.useCallback((event) => {
25826
+ const handleDragOver = React86__default.useCallback((event) => {
25653
25827
  const { active, over } = event;
25654
25828
  const overData = over?.data?.current;
25655
25829
  const overGroup = overData?.dndGroup ?? null;
@@ -25719,7 +25893,7 @@ function useDataDnd(args) {
25719
25893
  return next;
25720
25894
  });
25721
25895
  }, []);
25722
- const handleDragCancel = React85__default.useCallback((event) => {
25896
+ const handleDragCancel = React86__default.useCallback((event) => {
25723
25897
  setActiveDrag(null);
25724
25898
  setOverZoneGroup(null);
25725
25899
  dndLog.warn("dragCancel", {
@@ -25727,12 +25901,12 @@ function useDataDnd(args) {
25727
25901
  reason: "dnd-kit cancelled the drag (escape key, pointer interrupted, or external)"
25728
25902
  });
25729
25903
  }, []);
25730
- const handleDragEndWithCleanup = React85__default.useCallback((event) => {
25904
+ const handleDragEndWithCleanup = React86__default.useCallback((event) => {
25731
25905
  handleDragEnd(event);
25732
25906
  setActiveDrag(null);
25733
25907
  setOverZoneGroup(null);
25734
25908
  }, [handleDragEnd]);
25735
- const wrapContainer = React85__default.useCallback(
25909
+ const wrapContainer = React86__default.useCallback(
25736
25910
  (children) => {
25737
25911
  if (!enabled) return children;
25738
25912
  const strategy = layout === "grid" ? rectSortingStrategy : verticalListSortingStrategy;
@@ -25786,7 +25960,7 @@ var init_useDataDnd = __esm({
25786
25960
  init_useAlmadarDndCollision();
25787
25961
  init_Box();
25788
25962
  dndLog = createLogger("almadar:ui:dnd");
25789
- RootCtx = React85__default.createContext(null);
25963
+ RootCtx = React86__default.createContext(null);
25790
25964
  }
25791
25965
  });
25792
25966
  function renderIconInput(icon, props) {
@@ -26301,7 +26475,7 @@ function DataList({
26301
26475
  }) {
26302
26476
  const eventBus = useEventBus();
26303
26477
  const { t } = useTranslate();
26304
- const [visibleCount, setVisibleCount] = React85__default.useState(pageSize || Infinity);
26478
+ const [visibleCount, setVisibleCount] = React86__default.useState(pageSize || Infinity);
26305
26479
  const fieldDefs = fields ?? columns ?? [];
26306
26480
  const allDataRaw = Array.isArray(entity) ? entity : entity ? [entity] : [];
26307
26481
  const dnd = useDataDnd({
@@ -26317,14 +26491,14 @@ function DataList({
26317
26491
  dndRoot
26318
26492
  });
26319
26493
  const orderedData = dnd.orderedItems;
26320
- const allData = React85__default.useMemo(
26494
+ const allData = React86__default.useMemo(
26321
26495
  () => sortRows(orderedData, sortBy, sortDirection),
26322
26496
  [orderedData, sortBy, sortDirection]
26323
26497
  );
26324
26498
  const data = pageSize > 0 ? allData.slice(0, visibleCount) : allData;
26325
26499
  const hasMoreLocal = pageSize > 0 && visibleCount < allData.length;
26326
26500
  const hasRenderProp = typeof children === "function";
26327
- React85__default.useEffect(() => {
26501
+ React86__default.useEffect(() => {
26328
26502
  const renderItemTypeOf = typeof schemaRenderItem;
26329
26503
  const childrenTypeOf = typeof children;
26330
26504
  if (data.length > 0 && !hasRenderProp) {
@@ -26444,7 +26618,7 @@ function DataList({
26444
26618
  return v === void 0 || v === null || v === "" ? raw : String(v);
26445
26619
  };
26446
26620
  return /* @__PURE__ */ jsxs(VStack, { gap: "sm", className: cn("py-2", className), children: [
26447
- groups2.map((group, gi) => /* @__PURE__ */ jsxs(React85__default.Fragment, { children: [
26621
+ groups2.map((group, gi) => /* @__PURE__ */ jsxs(React86__default.Fragment, { children: [
26448
26622
  group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: "my-2" }),
26449
26623
  group.items.map((itemData, index) => {
26450
26624
  const id = itemData.id || `${gi}-${index}`;
@@ -26660,7 +26834,7 @@ function DataList({
26660
26834
  className
26661
26835
  ),
26662
26836
  children: [
26663
- groups.map((group, gi) => /* @__PURE__ */ jsxs(React85__default.Fragment, { children: [
26837
+ groups.map((group, gi) => /* @__PURE__ */ jsxs(React86__default.Fragment, { children: [
26664
26838
  group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-4" : "mt-0" }),
26665
26839
  group.items.map(
26666
26840
  (itemData, index) => renderItem(itemData, index, gi === groups.length - 1 && index === group.items.length - 1)
@@ -26747,7 +26921,7 @@ var init_FormSection = __esm({
26747
26921
  columns = 1,
26748
26922
  className
26749
26923
  }) => {
26750
- const [collapsed, setCollapsed] = React85__default.useState(defaultCollapsed);
26924
+ const [collapsed, setCollapsed] = React86__default.useState(defaultCollapsed);
26751
26925
  const { t } = useTranslate();
26752
26926
  const eventBus = useEventBus();
26753
26927
  const gridClass = {
@@ -26755,7 +26929,7 @@ var init_FormSection = __esm({
26755
26929
  2: "grid-cols-1 md:grid-cols-2",
26756
26930
  3: "grid-cols-1 md:grid-cols-2 lg:grid-cols-3"
26757
26931
  }[columns];
26758
- React85__default.useCallback(() => {
26932
+ React86__default.useCallback(() => {
26759
26933
  if (collapsible) {
26760
26934
  setCollapsed((prev) => !prev);
26761
26935
  eventBus.emit("UI:TOGGLE_COLLAPSE", { collapsed: !collapsed });
@@ -27053,6 +27227,13 @@ function fileIcon(name) {
27053
27227
  return "file";
27054
27228
  }
27055
27229
  }
27230
+ function siblingsOf(target, roots, childrenByParent) {
27231
+ if (target.parentId) {
27232
+ const parentSiblings = childrenByParent.get(target.parentId);
27233
+ if (parentSiblings?.some((sibling) => sibling.id === target.id)) return parentSiblings;
27234
+ }
27235
+ return roots;
27236
+ }
27056
27237
  function ancestorsOf(id, byId) {
27057
27238
  const out = /* @__PURE__ */ new Set();
27058
27239
  if (!id) return out;
@@ -27070,6 +27251,8 @@ var init_FileTree = __esm({
27070
27251
  init_Box();
27071
27252
  init_Typography();
27072
27253
  init_Icon();
27254
+ init_useDraggable();
27255
+ init_useDropZone();
27073
27256
  TreeNodeItem = ({
27074
27257
  node,
27075
27258
  depth,
@@ -27153,10 +27336,12 @@ var init_FileTree = __esm({
27153
27336
  depth,
27154
27337
  indent,
27155
27338
  childrenByParent,
27339
+ roots,
27156
27340
  onNodeSelect,
27157
27341
  onNodeAction,
27158
27342
  nodeActionIcon,
27159
27343
  nodeActionLabel,
27344
+ onNodeReorder,
27160
27345
  selectedId,
27161
27346
  look,
27162
27347
  isExpanded,
@@ -27167,6 +27352,7 @@ var init_FileTree = __esm({
27167
27352
  const expanded = hasChildren && isExpanded(item.id, depth);
27168
27353
  const isSelected = selectedId !== void 0 && selectedId !== "" && item.id === selectedId;
27169
27354
  const nav = look === "nav";
27355
+ const rowRef = useRef(null);
27170
27356
  const handleClick = useCallback(() => {
27171
27357
  if (hasChildren && !onNodeSelect) onToggle(item.id, expanded);
27172
27358
  onNodeSelect?.(item.id);
@@ -27179,16 +27365,50 @@ var init_FileTree = __esm({
27179
27365
  e.stopPropagation();
27180
27366
  onNodeAction?.(item.id);
27181
27367
  }, [item.id, onNodeAction]);
27368
+ const { dragProps } = useDraggable({
27369
+ payload: { kind: "tree-node", data: { id: item.id } },
27370
+ disabled: !onNodeReorder
27371
+ });
27372
+ const handleRowDrop = useCallback(
27373
+ (payload, position) => {
27374
+ if (!onNodeReorder) return;
27375
+ const draggedId = typeof payload.data.id === "string" ? payload.data.id : void 0;
27376
+ if (!draggedId || draggedId === item.id) return;
27377
+ const rect = rowRef.current?.getBoundingClientRect();
27378
+ if (!rect || rect.height === 0) return;
27379
+ const relY = position.y - rect.top;
27380
+ const third = rect.height / 3;
27381
+ if (relY >= third && relY <= third * 2) {
27382
+ const existingChildren = childrenByParent.get(item.id);
27383
+ onNodeReorder(draggedId, item.id, existingChildren ? existingChildren.length : 0);
27384
+ return;
27385
+ }
27386
+ const siblings = siblingsOf(item, roots, childrenByParent);
27387
+ const newParentId = siblings === roots ? null : item.parentId ?? null;
27388
+ const targetIndex = siblings.findIndex((sibling) => sibling.id === item.id);
27389
+ const index = relY < third ? targetIndex < 0 ? 0 : targetIndex : targetIndex < 0 ? siblings.length : targetIndex + 1;
27390
+ onNodeReorder(draggedId, newParentId, index);
27391
+ },
27392
+ [onNodeReorder, item, roots, childrenByParent]
27393
+ );
27394
+ const { dropProps } = useDropZone({
27395
+ accepts: ["tree-node"],
27396
+ onDrop: handleRowDrop,
27397
+ disabled: !onNodeReorder
27398
+ });
27182
27399
  return /* @__PURE__ */ jsxs(Fragment, { children: [
27183
27400
  /* @__PURE__ */ jsxs(
27184
27401
  Box,
27185
27402
  {
27403
+ ref: rowRef,
27186
27404
  className: `group/treerow flex items-center gap-1.5 px-2 cursor-pointer rounded-sm transition-colors ${nav ? "py-1" : "py-0.5"} ${isSelected ? "bg-primary text-primary-foreground" : nav ? "text-foreground hover:bg-muted" : "hover:bg-muted"}`,
27187
27405
  style: { paddingLeft: depth * indent + 8 },
27188
27406
  onClick: handleClick,
27189
27407
  role: "treeitem",
27190
27408
  "aria-selected": isSelected,
27191
27409
  "aria-expanded": hasChildren ? expanded : void 0,
27410
+ ...dragProps,
27411
+ ...dropProps,
27192
27412
  children: [
27193
27413
  hasChildren ? /* @__PURE__ */ jsx(Box, { onClick: handleChevron, className: "flex items-center flex-shrink-0", role: "button", "aria-label": expanded ? "Collapse" : "Expand", children: /* @__PURE__ */ jsx(
27194
27414
  Icon,
@@ -27235,10 +27455,12 @@ var init_FileTree = __esm({
27235
27455
  depth: depth + 1,
27236
27456
  indent,
27237
27457
  childrenByParent,
27458
+ roots,
27238
27459
  onNodeSelect,
27239
27460
  onNodeAction,
27240
27461
  nodeActionIcon,
27241
27462
  nodeActionLabel,
27463
+ onNodeReorder,
27242
27464
  selectedId,
27243
27465
  look,
27244
27466
  isExpanded,
@@ -27256,14 +27478,15 @@ var init_FileTree = __esm({
27256
27478
  onNodeAction,
27257
27479
  nodeActionIcon,
27258
27480
  nodeActionLabel,
27481
+ onNodeReorder,
27259
27482
  className,
27260
27483
  indent = 16
27261
27484
  }) => {
27262
27485
  const [overrides, setOverrides] = useState(() => /* @__PURE__ */ new Map());
27263
- const byId = React85__default.useMemo(() => new Map(items.map((node) => [node.id, node])), [items]);
27264
- const selectedAncestors = React85__default.useMemo(() => ancestorsOf(selectedId, byId), [selectedId, byId]);
27265
- const lastSelectedRef = React85__default.useRef(selectedId);
27266
- React85__default.useEffect(() => {
27486
+ const byId = React86__default.useMemo(() => new Map(items.map((node) => [node.id, node])), [items]);
27487
+ const selectedAncestors = React86__default.useMemo(() => ancestorsOf(selectedId, byId), [selectedId, byId]);
27488
+ const lastSelectedRef = React86__default.useRef(selectedId);
27489
+ React86__default.useEffect(() => {
27267
27490
  if (selectedId === lastSelectedRef.current) return;
27268
27491
  lastSelectedRef.current = selectedId;
27269
27492
  setOverrides((prev) => {
@@ -27304,10 +27527,12 @@ var init_FileTree = __esm({
27304
27527
  depth: 0,
27305
27528
  indent,
27306
27529
  childrenByParent,
27530
+ roots,
27307
27531
  onNodeSelect,
27308
27532
  onNodeAction,
27309
27533
  nodeActionIcon,
27310
27534
  nodeActionLabel,
27535
+ onNodeReorder,
27311
27536
  selectedId,
27312
27537
  look,
27313
27538
  isExpanded,
@@ -27327,6 +27552,7 @@ var init_FileTree = __esm({
27327
27552
  onNodeAction,
27328
27553
  nodeActionIcon,
27329
27554
  nodeActionLabel,
27555
+ onNodeReorder,
27330
27556
  className,
27331
27557
  indent = 16
27332
27558
  }) => {
@@ -27341,6 +27567,7 @@ var init_FileTree = __esm({
27341
27567
  onNodeAction,
27342
27568
  nodeActionIcon,
27343
27569
  nodeActionLabel,
27570
+ onNodeReorder,
27344
27571
  className,
27345
27572
  indent
27346
27573
  }
@@ -28029,7 +28256,7 @@ var init_Flex = __esm({
28029
28256
  flexStyle.flexBasis = typeof basis === "number" ? `${basis}px` : basis;
28030
28257
  }
28031
28258
  }
28032
- return React85__default.createElement(Component, {
28259
+ return React86__default.createElement(Component, {
28033
28260
  className: cn(
28034
28261
  inline ? "inline-flex" : "flex",
28035
28262
  directionStyles[direction],
@@ -28148,7 +28375,7 @@ var init_Grid = __esm({
28148
28375
  as: Component = "div"
28149
28376
  }) => {
28150
28377
  const mergedStyle = rows ? { gridTemplateRows: `repeat(${rows}, minmax(0, 1fr))`, ...style } : style;
28151
- return React85__default.createElement(
28378
+ return React86__default.createElement(
28152
28379
  Component,
28153
28380
  {
28154
28381
  className: cn(
@@ -28570,9 +28797,9 @@ var init_Popover = __esm({
28570
28797
  onMouseLeave: handleClose,
28571
28798
  onPointerDown: tapTriggerProps.onPointerDown
28572
28799
  };
28573
- const childElement = React85__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
28800
+ const childElement = React86__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
28574
28801
  const childPointerDown = childElement.props.onPointerDown;
28575
- const triggerElement = React85__default.cloneElement(
28802
+ const triggerElement = React86__default.cloneElement(
28576
28803
  childElement,
28577
28804
  {
28578
28805
  ref: triggerRef,
@@ -29186,9 +29413,9 @@ var init_Tooltip = __esm({
29186
29413
  if (hideTimeoutRef.current) clearTimeout(hideTimeoutRef.current);
29187
29414
  };
29188
29415
  }, []);
29189
- const triggerElement = React85__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
29416
+ const triggerElement = React86__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
29190
29417
  const childPointerDown = triggerElement.props.onPointerDown;
29191
- const trigger = React85__default.cloneElement(triggerElement, {
29418
+ const trigger = React86__default.cloneElement(triggerElement, {
29192
29419
  ref: triggerRef,
29193
29420
  onMouseEnter: handleMouseEnter,
29194
29421
  onMouseLeave: handleMouseLeave,
@@ -29278,7 +29505,7 @@ var init_WizardProgress = __esm({
29278
29505
  children: /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: normalizedSteps.map((step, index) => {
29279
29506
  const isActive = index === currentStep;
29280
29507
  const isCompleted = index < currentStep;
29281
- return /* @__PURE__ */ jsxs(React85__default.Fragment, { children: [
29508
+ return /* @__PURE__ */ jsxs(React86__default.Fragment, { children: [
29282
29509
  /* @__PURE__ */ jsx(
29283
29510
  "button",
29284
29511
  {
@@ -30340,6 +30567,8 @@ var init_MathCanvas = __esm({
30340
30567
  gridColor = "var(--color-border, #9ca3af)",
30341
30568
  axisColor = "var(--color-muted-foreground, #374151)",
30342
30569
  showTickLabels = false,
30570
+ tickLabelFontSize = 10,
30571
+ labelFontSize = 12,
30343
30572
  showCurveLabels = false,
30344
30573
  curves = [],
30345
30574
  points = [],
@@ -30411,18 +30640,18 @@ var init_MathCanvas = __esm({
30411
30640
  let kx = 0;
30412
30641
  for (let x = Math.ceil(xMin / gridStep) * gridStep; x <= xMax; x += gridStep, kx++) {
30413
30642
  if (kx % labelEveryX === 0 && x !== 0) {
30414
- out.push({ type: "text", x: mapX(x), y: xAxisY + 12, text: formatTick(x), color: "#6b7280", fontSize: 10, align: "center" });
30643
+ out.push({ type: "text", x: mapX(x), y: xAxisY + 12, text: formatTick(x), color: "#6b7280", fontSize: tickLabelFontSize, align: "center" });
30415
30644
  }
30416
30645
  }
30417
30646
  const labelEveryY = Math.max(1, Math.ceil((yMax - yMin) / gridStep / Math.floor(plotH / 28)));
30418
30647
  let ky = 0;
30419
30648
  for (let y = Math.ceil(yMin / gridStep) * gridStep; y <= yMax; y += gridStep, ky++) {
30420
30649
  if (ky % labelEveryY === 0 && y !== 0) {
30421
- out.push({ type: "text", x: yAxisX - 6, y: mapY(y), text: formatTick(y), color: "#6b7280", fontSize: 10, align: "right" });
30650
+ out.push({ type: "text", x: yAxisX - 6, y: mapY(y), text: formatTick(y), color: "#6b7280", fontSize: tickLabelFontSize, align: "right" });
30422
30651
  }
30423
30652
  }
30424
30653
  if (xMin <= 0 && xMax >= 0 && yMin <= 0 && yMax >= 0) {
30425
- out.push({ type: "text", x: yAxisX - 6, y: xAxisY + 12, text: "0", color: "#6b7280", fontSize: 10, align: "right" });
30654
+ out.push({ type: "text", x: yAxisX - 6, y: xAxisY + 12, text: "0", color: "#6b7280", fontSize: tickLabelFontSize, align: "right" });
30426
30655
  }
30427
30656
  }
30428
30657
  for (const region of regions) {
@@ -30453,7 +30682,7 @@ var init_MathCanvas = __esm({
30453
30682
  y: (mapY(region.samples[mid].y) + mapY(baseline)) / 2,
30454
30683
  text: region.label,
30455
30684
  color,
30456
- fontSize: 11
30685
+ fontSize: labelFontSize
30457
30686
  });
30458
30687
  }
30459
30688
  }
@@ -30492,7 +30721,7 @@ var init_MathCanvas = __esm({
30492
30721
  const py = mapY(guide.at);
30493
30722
  out.push({ type: "line", x1: margin, y1: py, x2: width - margin, y2: py, color, dash });
30494
30723
  if (guide.label) {
30495
- out.push({ type: "text", x: width - margin - 4, y: py - 8, text: guide.label, color, fontSize: 11, align: "right" });
30724
+ out.push({ type: "text", x: width - margin - 4, y: py - 8, text: guide.label, color, fontSize: labelFontSize, align: "right" });
30496
30725
  }
30497
30726
  }
30498
30727
  }
@@ -30535,7 +30764,7 @@ var init_MathCanvas = __esm({
30535
30764
  y: mapY(lastInRange.y) - 6,
30536
30765
  text: curve.label,
30537
30766
  color: curve.color ?? "#2563eb",
30538
- fontSize: 11
30767
+ fontSize: labelFontSize
30539
30768
  });
30540
30769
  }
30541
30770
  }
@@ -30572,7 +30801,7 @@ var init_MathCanvas = __esm({
30572
30801
  y: xAxisY - peak - 8,
30573
30802
  text: hop.label,
30574
30803
  color,
30575
- fontSize: 10,
30804
+ fontSize: labelFontSize,
30576
30805
  align: "center"
30577
30806
  });
30578
30807
  }
@@ -30599,7 +30828,7 @@ var init_MathCanvas = __esm({
30599
30828
  y: mapY(angle.y + 1.35 * radius * Math.sin(rad)),
30600
30829
  text: angle.label,
30601
30830
  color,
30602
- fontSize: 11,
30831
+ fontSize: labelFontSize,
30603
30832
  align: "center"
30604
30833
  });
30605
30834
  }
@@ -30616,7 +30845,7 @@ var init_MathCanvas = __esm({
30616
30845
  fill: isOpen ? "#ffffff" : p.color ?? "#dc2626"
30617
30846
  });
30618
30847
  if (p.label) {
30619
- out.push({ type: "text", x: mapX(p.x) + 8, y: mapY(p.y) - 8, text: p.label, color: p.color ?? "#111827", fontSize: 12 });
30848
+ out.push({ type: "text", x: mapX(p.x) + 8, y: mapY(p.y) - 8, text: p.label, color: p.color ?? "#111827", fontSize: labelFontSize });
30620
30849
  }
30621
30850
  }
30622
30851
  for (const v of vectors) {
@@ -30627,7 +30856,7 @@ var init_MathCanvas = __esm({
30627
30856
  const y2 = mapY(v.y + v.vy);
30628
30857
  out.push({ type: "arrow", x1, y1, x2, y2, color: v.color ?? "#7c3aed", lineWidth: 2 });
30629
30858
  if (v.label) {
30630
- out.push({ type: "text", x: x2 + 6, y: y2 - 6, text: v.label, color: v.color ?? "#7c3aed", fontSize: 12 });
30859
+ out.push({ type: "text", x: x2 + 6, y: y2 - 6, text: v.label, color: v.color ?? "#7c3aed", fontSize: labelFontSize });
30631
30860
  }
30632
30861
  }
30633
30862
  out.push(...shapes);
@@ -30646,6 +30875,8 @@ var init_MathCanvas = __esm({
30646
30875
  gridColor,
30647
30876
  axisColor,
30648
30877
  showTickLabels,
30878
+ tickLabelFontSize,
30879
+ labelFontSize,
30649
30880
  showCurveLabels,
30650
30881
  curves,
30651
30882
  points,
@@ -31933,13 +32164,13 @@ var init_MapView = __esm({
31933
32164
  shadowSize: [41, 41]
31934
32165
  });
31935
32166
  L.Marker.prototype.options.icon = defaultIcon;
31936
- const { useEffect: useEffect63, useRef: useRef63, useCallback: useCallback90, useState: useState95 } = React85__default;
32167
+ const { useEffect: useEffect64, useRef: useRef65, useCallback: useCallback92, useState: useState98 } = React86__default;
31937
32168
  const { Typography: Typography2 } = await Promise.resolve().then(() => (init_Typography(), Typography_exports));
31938
32169
  const { useEventBus: useEventBus2 } = await Promise.resolve().then(() => (init_useEventBus(), useEventBus_exports));
31939
32170
  function MapUpdater({ centerLat, centerLng, zoom }) {
31940
32171
  const map = useMap();
31941
- const prevRef = useRef63({ centerLat, centerLng, zoom });
31942
- useEffect63(() => {
32172
+ const prevRef = useRef65({ centerLat, centerLng, zoom });
32173
+ useEffect64(() => {
31943
32174
  const prev = prevRef.current;
31944
32175
  if (prev.centerLat !== centerLat || prev.centerLng !== centerLng || prev.zoom !== zoom) {
31945
32176
  map.setView([centerLat, centerLng], zoom);
@@ -31950,7 +32181,7 @@ var init_MapView = __esm({
31950
32181
  }
31951
32182
  function MapClickHandler({ onMapClick }) {
31952
32183
  const map = useMap();
31953
- useEffect63(() => {
32184
+ useEffect64(() => {
31954
32185
  if (!onMapClick) return;
31955
32186
  const handler = (e) => {
31956
32187
  onMapClick(e.latlng.lat, e.latlng.lng);
@@ -31978,8 +32209,8 @@ var init_MapView = __esm({
31978
32209
  showAttribution = true
31979
32210
  }) {
31980
32211
  const eventBus = useEventBus2();
31981
- const [clickedPosition, setClickedPosition] = useState95(null);
31982
- const handleMapClick = useCallback90((lat, lng) => {
32212
+ const [clickedPosition, setClickedPosition] = useState98(null);
32213
+ const handleMapClick = useCallback92((lat, lng) => {
31983
32214
  if (showClickedPin) {
31984
32215
  setClickedPosition({ lat, lng });
31985
32216
  }
@@ -31988,7 +32219,7 @@ var init_MapView = __esm({
31988
32219
  eventBus.emit(`UI:${mapClickEvent}`, { latitude: lat, longitude: lng });
31989
32220
  }
31990
32221
  }, [onMapClick, mapClickEvent, eventBus, showClickedPin]);
31991
- const handleMarkerClick = useCallback90((marker) => {
32222
+ const handleMarkerClick = useCallback92((marker) => {
31992
32223
  onMarkerClick?.(marker);
31993
32224
  if (markerClickEvent) {
31994
32225
  eventBus.emit(`UI:${markerClickEvent}`, { ...marker });
@@ -32878,8 +33109,8 @@ function TableView({
32878
33109
  }) {
32879
33110
  const eventBus = useEventBus();
32880
33111
  const { t } = useTranslate();
32881
- const [visibleCount, setVisibleCount] = React85__default.useState(pageSize > 0 ? pageSize : Infinity);
32882
- const [localSelected, setLocalSelected] = React85__default.useState(/* @__PURE__ */ new Set());
33112
+ const [visibleCount, setVisibleCount] = React86__default.useState(pageSize > 0 ? pageSize : Infinity);
33113
+ const [localSelected, setLocalSelected] = React86__default.useState(/* @__PURE__ */ new Set());
32883
33114
  const colDefs = (Array.isArray(columns) ? columns : void 0) ?? (Array.isArray(fields) ? fields : void 0) ?? [];
32884
33115
  const actionDefs = Array.isArray(itemActions) ? itemActions : [];
32885
33116
  const allDataRaw = Array.isArray(entity) ? entity : entity ? [entity] : [];
@@ -32900,7 +33131,7 @@ function TableView({
32900
33131
  const hasMore = pageSize > 0 && visibleCount < ordered2.length;
32901
33132
  const hasRenderProp = typeof children === "function";
32902
33133
  const idField = dndItemIdField ?? "id";
32903
- React85__default.useEffect(() => {
33134
+ React86__default.useEffect(() => {
32904
33135
  tableViewLog.debug("render", {
32905
33136
  rowCount: data.length,
32906
33137
  colCount: colDefs.length,
@@ -32950,7 +33181,7 @@ function TableView({
32950
33181
  };
32951
33182
  eventBus.emit(`UI:${rowClickEvent}`, payload);
32952
33183
  };
32953
- const colFloors = React85__default.useMemo(
33184
+ const colFloors = React86__default.useMemo(
32954
33185
  () => colDefs.map((col) => {
32955
33186
  const longest = data.reduce((widest, row) => {
32956
33187
  const cell = formatCell(asFieldValue(getNestedValue(row, col.field ?? col.key)), col.format);
@@ -33093,12 +33324,12 @@ function TableView({
33093
33324
  ]
33094
33325
  }
33095
33326
  );
33096
- return dnd.isZone ? /* @__PURE__ */ jsx(dnd.SortableItem, { id: row[idField] ?? id, children: rowInner }, id) : /* @__PURE__ */ jsx(React85__default.Fragment, { children: rowInner }, id);
33327
+ return dnd.isZone ? /* @__PURE__ */ jsx(dnd.SortableItem, { id: row[idField] ?? id, children: rowInner }, id) : /* @__PURE__ */ jsx(React86__default.Fragment, { children: rowInner }, id);
33097
33328
  };
33098
33329
  const items = Array.from(data);
33099
33330
  const groups = groupBy ? groupData2(items, groupBy) : [{ label: "", items }];
33100
33331
  let runningIndex = 0;
33101
- const body = /* @__PURE__ */ jsx(Box, { role: "rowgroup", children: groups.map((group, gi) => /* @__PURE__ */ jsxs(React85__default.Fragment, { children: [
33332
+ const body = /* @__PURE__ */ jsx(Box, { role: "rowgroup", children: groups.map((group, gi) => /* @__PURE__ */ jsxs(React86__default.Fragment, { children: [
33102
33333
  group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-3" : "mt-0" }),
33103
33334
  group.items.map((row) => renderRow(row, runningIndex++))
33104
33335
  ] }, gi)) });
@@ -34329,7 +34560,7 @@ var init_StepFlow = __esm({
34329
34560
  className
34330
34561
  }) => {
34331
34562
  if (orientation === "vertical") {
34332
- return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(React85__default.Fragment, { children: /* @__PURE__ */ jsxs(HStack, { gap: "md", align: "start", className: "w-full", children: [
34563
+ return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(React86__default.Fragment, { children: /* @__PURE__ */ jsxs(HStack, { gap: "md", align: "start", className: "w-full", children: [
34333
34564
  /* @__PURE__ */ jsxs(VStack, { gap: "none", align: "center", children: [
34334
34565
  /* @__PURE__ */ jsx(StepCircle, { step, index }),
34335
34566
  showConnectors && index < steps.length - 1 && /* @__PURE__ */ jsx(Box, { className: "w-px h-8 bg-border" })
@@ -34340,7 +34571,7 @@ var init_StepFlow = __esm({
34340
34571
  ] })
34341
34572
  ] }) }, index)) });
34342
34573
  }
34343
- return /* @__PURE__ */ jsx(Box, { className: cn("w-full flex flex-col md:flex-row items-start gap-0", className), children: steps.map((step, index) => /* @__PURE__ */ jsxs(React85__default.Fragment, { children: [
34574
+ return /* @__PURE__ */ jsx(Box, { className: cn("w-full flex flex-col md:flex-row items-start gap-0", className), children: steps.map((step, index) => /* @__PURE__ */ jsxs(React86__default.Fragment, { children: [
34344
34575
  /* @__PURE__ */ jsxs(VStack, { gap: "sm", align: "center", className: "flex-1 w-full md:w-auto", children: [
34345
34576
  /* @__PURE__ */ jsx(StepCircle, { step, index }),
34346
34577
  /* @__PURE__ */ jsx(Typography, { variant: "h4", className: "text-center", children: step.title }),
@@ -35330,7 +35561,7 @@ var init_LikertScale = __esm({
35330
35561
  md: "text-base",
35331
35562
  lg: "text-lg"
35332
35563
  };
35333
- LikertScale = React85__default.forwardRef(
35564
+ LikertScale = React86__default.forwardRef(
35334
35565
  ({
35335
35566
  question,
35336
35567
  options = DEFAULT_LIKERT_OPTIONS,
@@ -35342,7 +35573,7 @@ var init_LikertScale = __esm({
35342
35573
  variant = "radios",
35343
35574
  className
35344
35575
  }, ref) => {
35345
- const groupId = React85__default.useId();
35576
+ const groupId = React86__default.useId();
35346
35577
  const eventBus = useEventBus();
35347
35578
  const handleSelect = useCallback(
35348
35579
  (next) => {
@@ -37765,7 +37996,7 @@ var init_DocBreadcrumb = __esm({
37765
37996
  "aria-label": t("aria.breadcrumb"),
37766
37997
  children: /* @__PURE__ */ jsx(HStack, { gap: "xs", align: "center", wrap: true, children: items.map((item, idx) => {
37767
37998
  const isLast = idx === items.length - 1;
37768
- return /* @__PURE__ */ jsxs(React85__default.Fragment, { children: [
37999
+ return /* @__PURE__ */ jsxs(React86__default.Fragment, { children: [
37769
38000
  idx > 0 && /* @__PURE__ */ jsx(
37770
38001
  Icon,
37771
38002
  {
@@ -38634,7 +38865,7 @@ var init_MiniStateMachine = __esm({
38634
38865
  const x = 2 + i * (NODE_W + GAP + ARROW_W + GAP);
38635
38866
  const tc = transitionCounts[s.name] ?? 0;
38636
38867
  const role = getStateRole(s.name, s.isInitial ?? void 0, s.isTerminal ?? void 0, tc, maxTC);
38637
- return /* @__PURE__ */ jsxs(React85__default.Fragment, { children: [
38868
+ return /* @__PURE__ */ jsxs(React86__default.Fragment, { children: [
38638
38869
  /* @__PURE__ */ jsx(
38639
38870
  AvlState,
38640
38871
  {
@@ -38839,7 +39070,7 @@ var init_PageHeader = __esm({
38839
39070
  info: "bg-info/10 text-info"
38840
39071
  };
38841
39072
  return /* @__PURE__ */ jsxs(Box, { className: cn("mb-6", className), children: [
38842
- breadcrumbs && breadcrumbs.length > 0 && /* @__PURE__ */ jsx(Box, { as: "nav", className: "mb-4", children: /* @__PURE__ */ jsx(Box, { as: "ol", className: "flex items-center gap-2 text-sm", children: breadcrumbs.map((crumb, idx) => /* @__PURE__ */ jsxs(React85__default.Fragment, { children: [
39073
+ breadcrumbs && breadcrumbs.length > 0 && /* @__PURE__ */ jsx(Box, { as: "nav", className: "mb-4", children: /* @__PURE__ */ jsx(Box, { as: "ol", className: "flex items-center gap-2 text-sm", children: breadcrumbs.map((crumb, idx) => /* @__PURE__ */ jsxs(React86__default.Fragment, { children: [
38843
39074
  idx > 0 && /* @__PURE__ */ jsx(Typography, { variant: "small", color: "muted", children: "/" }),
38844
39075
  crumb.href ? /* @__PURE__ */ jsx(
38845
39076
  "a",
@@ -39197,7 +39428,7 @@ var init_Section = __esm({
39197
39428
  as: Component = "section"
39198
39429
  }) => {
39199
39430
  const hasHeader = title || description || action;
39200
- return React85__default.createElement(
39431
+ return React86__default.createElement(
39201
39432
  Component,
39202
39433
  {
39203
39434
  className: cn(
@@ -39571,7 +39802,7 @@ var init_WizardContainer = __esm({
39571
39802
  const isCompleted = index < currentStep;
39572
39803
  const stepKey = step.id ?? step.tabId ?? `step-${index}`;
39573
39804
  const stepTitle = step.title ?? step.name ?? `Step ${index + 1}`;
39574
- return /* @__PURE__ */ jsxs(React85__default.Fragment, { children: [
39805
+ return /* @__PURE__ */ jsxs(React86__default.Fragment, { children: [
39575
39806
  /* @__PURE__ */ jsx(
39576
39807
  Button,
39577
39808
  {
@@ -41358,7 +41589,7 @@ var init_ImportPreviewTree = __esm({
41358
41589
  const renderUnit = (unit, childrenByParent, depth) => {
41359
41590
  const summary = fieldSummary(unit);
41360
41591
  const children = childrenByParent.get(unit.ref) ?? [];
41361
- return /* @__PURE__ */ jsxs(React85__default.Fragment, { children: [
41592
+ return /* @__PURE__ */ jsxs(React86__default.Fragment, { children: [
41362
41593
  /* @__PURE__ */ jsxs(
41363
41594
  Box,
41364
41595
  {
@@ -41455,7 +41686,7 @@ var init_ImportProgress = __esm({
41455
41686
  PIPELINE.map((key, index) => {
41456
41687
  const isComplete = index < currentIndex;
41457
41688
  const isActive = index === currentIndex;
41458
- return /* @__PURE__ */ jsxs(React85__default.Fragment, { children: [
41689
+ return /* @__PURE__ */ jsxs(React86__default.Fragment, { children: [
41459
41690
  index > 0 ? /* @__PURE__ */ jsx(Box, { className: "h-px w-4 bg-border" }) : null,
41460
41691
  /* @__PURE__ */ jsxs(Box, { className: "flex items-center gap-1", "data-testid": `import-progress-step-${key}`, children: [
41461
41692
  /* @__PURE__ */ jsx(
@@ -41583,6 +41814,69 @@ var init_ReflectionBlock = __esm({
41583
41814
  ReflectionBlock.displayName = "ReflectionBlock";
41584
41815
  }
41585
41816
  });
41817
+ var positionClasses, FloatingToolbar;
41818
+ var init_FloatingToolbar = __esm({
41819
+ "components/core/molecules/FloatingToolbar.tsx"() {
41820
+ "use client";
41821
+ init_Button();
41822
+ init_Box();
41823
+ init_Divider();
41824
+ init_Typography();
41825
+ init_ButtonGroup();
41826
+ init_cn();
41827
+ init_useEventBus();
41828
+ positionClasses = {
41829
+ "bottom-center": "bottom-6 left-1/2 -translate-x-1/2",
41830
+ "bottom-left": "bottom-6 left-6",
41831
+ "bottom-right": "bottom-6 right-6"
41832
+ };
41833
+ FloatingToolbar = ({
41834
+ items,
41835
+ position = "bottom-center",
41836
+ children,
41837
+ className
41838
+ }) => {
41839
+ const eventBus = useEventBus();
41840
+ return /* @__PURE__ */ jsx(Box, { className: cn("fixed z-50", positionClasses[position]), children: /* @__PURE__ */ jsxs(
41841
+ ButtonGroup,
41842
+ {
41843
+ variant: "default",
41844
+ orientation: "horizontal",
41845
+ className: cn(
41846
+ "items-center gap-1 rounded-full border border-border",
41847
+ "bg-card/95 backdrop-blur-sm shadow-elevation-popover p-1",
41848
+ className
41849
+ ),
41850
+ children: [
41851
+ items.map((item) => /* @__PURE__ */ jsx(
41852
+ Button,
41853
+ {
41854
+ variant: item.active ? "primary" : "ghost",
41855
+ size: "sm",
41856
+ icon: item.icon,
41857
+ action: item.action,
41858
+ actionPayload: item.actionPayload,
41859
+ disabled: item.disabled,
41860
+ "aria-pressed": item.active,
41861
+ "aria-label": item.label,
41862
+ className: "rounded-full",
41863
+ "data-testid": item.testId ?? `floating-toolbar-item-${item.id}`,
41864
+ onClick: () => {
41865
+ if (item.event) eventBus.emit(`UI:${item.event}`, { actionId: item.id });
41866
+ },
41867
+ children: /* @__PURE__ */ jsx(Typography, { as: "span", className: "sr-only", children: item.label })
41868
+ },
41869
+ item.id
41870
+ )),
41871
+ children && items.length > 0 && /* @__PURE__ */ jsx(Divider, { orientation: "vertical", className: "h-6 mx-1" }),
41872
+ children
41873
+ ]
41874
+ }
41875
+ ) });
41876
+ };
41877
+ FloatingToolbar.displayName = "FloatingToolbar";
41878
+ }
41879
+ });
41586
41880
 
41587
41881
  // components/core/molecules/index.ts
41588
41882
  var init_molecules2 = __esm({
@@ -42333,7 +42627,7 @@ var init_DetailPanel = __esm({
42333
42627
  }) => {
42334
42628
  const eventBus = useEventBus();
42335
42629
  const { t } = useTranslate();
42336
- const [titleDraft, setTitleDraft] = React85__default.useState(null);
42630
+ const [titleDraft, setTitleDraft] = React86__default.useState(null);
42337
42631
  const isFieldDefArray = (arr) => {
42338
42632
  if (!arr || arr.length === 0) return false;
42339
42633
  const first = arr[0];
@@ -42726,8 +43020,224 @@ var init_DetailPanel = __esm({
42726
43020
  DetailPanel.displayName = "DetailPanel";
42727
43021
  }
42728
43022
  });
43023
+ var SplitPane;
43024
+ var init_SplitPane = __esm({
43025
+ "components/core/organisms/layout/SplitPane.tsx"() {
43026
+ "use client";
43027
+ init_cn();
43028
+ SplitPane = ({
43029
+ direction = "horizontal",
43030
+ ratio: ratioProp = 50,
43031
+ minSize = 100,
43032
+ resizable = true,
43033
+ left,
43034
+ right,
43035
+ className,
43036
+ leftClassName,
43037
+ rightClassName,
43038
+ onRatioChange
43039
+ }) => {
43040
+ const [uncontrolledRatio, setUncontrolledRatio] = useState(ratioProp);
43041
+ const ratio = onRatioChange ? ratioProp : uncontrolledRatio;
43042
+ const containerRef = useRef(null);
43043
+ const isDragging = useRef(false);
43044
+ const handlePointerDown = useCallback(
43045
+ (e) => {
43046
+ if (!resizable) return;
43047
+ e.preventDefault();
43048
+ isDragging.current = true;
43049
+ e.currentTarget.setPointerCapture(e.pointerId);
43050
+ const handlePointerMove = (ev) => {
43051
+ if (!isDragging.current || !containerRef.current) return;
43052
+ const rect = containerRef.current.getBoundingClientRect();
43053
+ let newRatio;
43054
+ if (direction === "horizontal") {
43055
+ const x = ev.clientX - rect.left;
43056
+ newRatio = x / rect.width * 100;
43057
+ } else {
43058
+ const y = ev.clientY - rect.top;
43059
+ newRatio = y / rect.height * 100;
43060
+ }
43061
+ const minRatio = minSize / (direction === "horizontal" ? rect.width : rect.height) * 100;
43062
+ const maxRatio = 100 - minRatio;
43063
+ newRatio = Math.max(minRatio, Math.min(maxRatio, newRatio));
43064
+ if (onRatioChange) {
43065
+ onRatioChange(newRatio);
43066
+ } else {
43067
+ setUncontrolledRatio(newRatio);
43068
+ }
43069
+ };
43070
+ const handlePointerUp = () => {
43071
+ isDragging.current = false;
43072
+ document.removeEventListener("pointermove", handlePointerMove);
43073
+ document.removeEventListener("pointerup", handlePointerUp);
43074
+ document.removeEventListener("pointercancel", handlePointerUp);
43075
+ };
43076
+ document.addEventListener("pointermove", handlePointerMove);
43077
+ document.addEventListener("pointerup", handlePointerUp);
43078
+ document.addEventListener("pointercancel", handlePointerUp);
43079
+ },
43080
+ [direction, minSize, resizable, onRatioChange]
43081
+ );
43082
+ const isHorizontal = direction === "horizontal";
43083
+ return /* @__PURE__ */ jsxs(
43084
+ "div",
43085
+ {
43086
+ ref: containerRef,
43087
+ className: cn(
43088
+ "flex w-full h-full",
43089
+ isHorizontal ? "flex-row" : "flex-col",
43090
+ className
43091
+ ),
43092
+ children: [
43093
+ /* @__PURE__ */ jsx(
43094
+ "div",
43095
+ {
43096
+ className: cn("overflow-auto", leftClassName),
43097
+ style: {
43098
+ [isHorizontal ? "width" : "height"]: `${ratio}%`,
43099
+ flexShrink: 0
43100
+ },
43101
+ children: left
43102
+ }
43103
+ ),
43104
+ resizable && /* @__PURE__ */ jsx(
43105
+ "div",
43106
+ {
43107
+ onPointerDown: handlePointerDown,
43108
+ className: cn(
43109
+ "flex-shrink-0 bg-border transition-colors touch-none",
43110
+ isHorizontal ? "w-1 cursor-col-resize hover:w-1.5 hover:bg-muted-foreground" : "h-1 cursor-row-resize hover:h-1.5 hover:bg-muted-foreground"
43111
+ )
43112
+ }
43113
+ ),
43114
+ /* @__PURE__ */ jsx("div", { className: cn("flex-1 overflow-auto", rightClassName), children: right })
43115
+ ]
43116
+ }
43117
+ );
43118
+ };
43119
+ SplitPane.displayName = "SplitPane";
43120
+ }
43121
+ });
43122
+ var DockLayout;
43123
+ var init_DockLayout = __esm({
43124
+ "components/core/organisms/layout/DockLayout.tsx"() {
43125
+ "use client";
43126
+ init_Box();
43127
+ init_Stack();
43128
+ init_cn();
43129
+ init_SplitPane();
43130
+ DockLayout = ({
43131
+ rail,
43132
+ sidebar,
43133
+ main,
43134
+ bottomPanel,
43135
+ statusBar,
43136
+ secondarySidebar,
43137
+ railWidth = 56,
43138
+ secondarySidebarWidth = 280,
43139
+ sidebarCollapsed = false,
43140
+ sidebarWidth = 20,
43141
+ onSidebarWidthChange,
43142
+ sidebarMinSize = 160,
43143
+ bottomPanelCollapsed = false,
43144
+ bottomPanelHeight = 30,
43145
+ onBottomPanelHeightChange,
43146
+ bottomPanelMinSize = 120,
43147
+ secondarySidebarCollapsed = false,
43148
+ className,
43149
+ railClassName,
43150
+ sidebarClassName,
43151
+ mainClassName,
43152
+ bottomPanelClassName,
43153
+ statusBarClassName,
43154
+ secondarySidebarClassName
43155
+ }) => {
43156
+ const showSidebar = Boolean(sidebar) && !sidebarCollapsed;
43157
+ const showBottomPanel = Boolean(bottomPanel) && !bottomPanelCollapsed;
43158
+ const showSecondarySidebar = Boolean(secondarySidebar) && !secondarySidebarCollapsed;
43159
+ const centerRow = /* @__PURE__ */ jsxs(HStack, { gap: "none", className: "flex-1 min-h-0 min-w-0", children: [
43160
+ /* @__PURE__ */ jsx(Box, { className: cn("flex-1 min-w-0 h-full overflow-auto", mainClassName), children: main }),
43161
+ showSecondarySidebar && /* @__PURE__ */ jsx(
43162
+ Box,
43163
+ {
43164
+ className: cn(
43165
+ "flex-shrink-0 h-full overflow-auto border-l border-border",
43166
+ secondarySidebarClassName
43167
+ ),
43168
+ style: { width: secondarySidebarWidth },
43169
+ children: secondarySidebar
43170
+ }
43171
+ )
43172
+ ] });
43173
+ const sidebarAndCenter = showSidebar ? /* @__PURE__ */ jsx(
43174
+ SplitPane,
43175
+ {
43176
+ direction: "horizontal",
43177
+ ratio: sidebarWidth,
43178
+ onRatioChange: onSidebarWidthChange,
43179
+ minSize: sidebarMinSize,
43180
+ resizable: true,
43181
+ left: /* @__PURE__ */ jsx(Box, { className: cn("h-full overflow-auto", sidebarClassName), children: sidebar }),
43182
+ right: centerRow,
43183
+ className: "flex-1 min-h-0 min-w-0"
43184
+ }
43185
+ ) : centerRow;
43186
+ const body = /* @__PURE__ */ jsxs(HStack, { gap: "none", className: "flex-1 min-h-0 min-w-0", children: [
43187
+ rail && /* @__PURE__ */ jsx(
43188
+ Box,
43189
+ {
43190
+ className: cn(
43191
+ "flex-shrink-0 h-full overflow-auto border-r border-border",
43192
+ railClassName
43193
+ ),
43194
+ style: { width: railWidth },
43195
+ children: rail
43196
+ }
43197
+ ),
43198
+ sidebarAndCenter
43199
+ ] });
43200
+ const bodyPlusBottom = showBottomPanel ? /* @__PURE__ */ jsx(
43201
+ SplitPane,
43202
+ {
43203
+ direction: "vertical",
43204
+ ratio: 100 - bottomPanelHeight,
43205
+ onRatioChange: (topRatio) => onBottomPanelHeightChange?.(100 - topRatio),
43206
+ minSize: bottomPanelMinSize,
43207
+ resizable: true,
43208
+ left: body,
43209
+ right: /* @__PURE__ */ jsx(
43210
+ Box,
43211
+ {
43212
+ className: cn(
43213
+ "h-full overflow-auto border-t border-border",
43214
+ bottomPanelClassName
43215
+ ),
43216
+ children: bottomPanel
43217
+ }
43218
+ ),
43219
+ className: "flex-1 min-h-0"
43220
+ }
43221
+ ) : body;
43222
+ return /* @__PURE__ */ jsxs(VStack, { gap: "none", className: cn("w-full h-full overflow-hidden", className), children: [
43223
+ bodyPlusBottom,
43224
+ statusBar && /* @__PURE__ */ jsx(
43225
+ Box,
43226
+ {
43227
+ className: cn(
43228
+ "flex-shrink-0 border-t border-border bg-background",
43229
+ statusBarClassName
43230
+ ),
43231
+ children: statusBar
43232
+ }
43233
+ )
43234
+ ] });
43235
+ };
43236
+ DockLayout.displayName = "DockLayout";
43237
+ }
43238
+ });
42729
43239
  function extractTitle(children) {
42730
- if (!React85__default.isValidElement(children)) return void 0;
43240
+ if (!React86__default.isValidElement(children)) return void 0;
42731
43241
  const props = children.props;
42732
43242
  if (typeof props.title === "string") {
42733
43243
  return props.title;
@@ -43089,7 +43599,7 @@ var init_Form = __esm({
43089
43599
  const isSchemaEntity = isOrbitalEntitySchema(entity);
43090
43600
  const resolvedEntity = isSchemaEntity ? entity : void 0;
43091
43601
  const entityName = typeof entity === "string" ? entity : resolvedEntity?.name;
43092
- const normalizedInitialData = React85__default.useMemo(() => {
43602
+ const normalizedInitialData = React86__default.useMemo(() => {
43093
43603
  const entityRowAsInitial = isPlainEntityRow(entity) ? entity : void 0;
43094
43604
  const callerInitial = initialData !== null && typeof initialData === "object" && !Array.isArray(initialData) ? initialData : {};
43095
43605
  const merged = entityRowAsInitial !== void 0 ? { ...entityRowAsInitial, ...callerInitial } : callerInitial;
@@ -43108,7 +43618,7 @@ var init_Form = __esm({
43108
43618
  }
43109
43619
  return normalized;
43110
43620
  }, [entity, initialData]);
43111
- const entityDerivedFields = React85__default.useMemo(() => {
43621
+ const entityDerivedFields = React86__default.useMemo(() => {
43112
43622
  if (fields && fields.length > 0) return void 0;
43113
43623
  if (!resolvedEntity) return void 0;
43114
43624
  return resolvedEntity.fields.map(
@@ -43129,16 +43639,16 @@ var init_Form = __esm({
43129
43639
  const conditionalFields = typeof conditionalFieldsRaw === "boolean" ? {} : conditionalFieldsRaw;
43130
43640
  const hiddenCalculations = typeof hiddenCalculationsRaw === "boolean" ? [] : hiddenCalculationsRaw;
43131
43641
  const violationTriggers = typeof violationTriggersRaw === "boolean" ? [] : violationTriggersRaw;
43132
- const [formData, setFormData] = React85__default.useState(
43642
+ const [formData, setFormData] = React86__default.useState(
43133
43643
  normalizedInitialData
43134
43644
  );
43135
- const [collapsedSections, setCollapsedSections] = React85__default.useState(
43645
+ const [collapsedSections, setCollapsedSections] = React86__default.useState(
43136
43646
  /* @__PURE__ */ new Set()
43137
43647
  );
43138
- const [submitError, setSubmitError] = React85__default.useState(null);
43139
- const formRef = React85__default.useRef(null);
43648
+ const [submitError, setSubmitError] = React86__default.useState(null);
43649
+ const formRef = React86__default.useRef(null);
43140
43650
  const formMode = props.mode;
43141
- const mountedRef = React85__default.useRef(false);
43651
+ const mountedRef = React86__default.useRef(false);
43142
43652
  if (!mountedRef.current) {
43143
43653
  mountedRef.current = true;
43144
43654
  debug("forms", "mount", {
@@ -43151,7 +43661,7 @@ var init_Form = __esm({
43151
43661
  });
43152
43662
  }
43153
43663
  const shouldShowCancel = showCancel ?? (fields && fields.length > 0);
43154
- const evalContext = React85__default.useMemo(
43664
+ const evalContext = React86__default.useMemo(
43155
43665
  () => ({
43156
43666
  formValues: formData,
43157
43667
  globalVariables: externalContext?.globalVariables ?? {},
@@ -43160,7 +43670,7 @@ var init_Form = __esm({
43160
43670
  }),
43161
43671
  [formData, externalContext]
43162
43672
  );
43163
- React85__default.useEffect(() => {
43673
+ React86__default.useEffect(() => {
43164
43674
  debug("forms", "initialData-sync", {
43165
43675
  mode: formMode,
43166
43676
  normalizedInitialData,
@@ -43171,7 +43681,7 @@ var init_Form = __esm({
43171
43681
  setFormData(normalizedInitialData);
43172
43682
  }
43173
43683
  }, [normalizedInitialData]);
43174
- const processCalculations = React85__default.useCallback(
43684
+ const processCalculations = React86__default.useCallback(
43175
43685
  (changedFieldId, newFormData) => {
43176
43686
  if (!hiddenCalculations.length) return;
43177
43687
  const context = {
@@ -43196,7 +43706,7 @@ var init_Form = __esm({
43196
43706
  },
43197
43707
  [hiddenCalculations, externalContext, eventBus]
43198
43708
  );
43199
- const checkViolations = React85__default.useCallback(
43709
+ const checkViolations = React86__default.useCallback(
43200
43710
  (changedFieldId, newFormData) => {
43201
43711
  if (!violationTriggers.length) return;
43202
43712
  const context = {
@@ -43234,7 +43744,7 @@ var init_Form = __esm({
43234
43744
  processCalculations(name, newFormData);
43235
43745
  checkViolations(name, newFormData);
43236
43746
  };
43237
- const isFieldVisible = React85__default.useCallback(
43747
+ const isFieldVisible = React86__default.useCallback(
43238
43748
  (fieldName2) => {
43239
43749
  const condition = conditionalFields[fieldName2];
43240
43750
  if (!condition) return true;
@@ -43242,7 +43752,7 @@ var init_Form = __esm({
43242
43752
  },
43243
43753
  [conditionalFields, evalContext]
43244
43754
  );
43245
- const isSectionVisible = React85__default.useCallback(
43755
+ const isSectionVisible = React86__default.useCallback(
43246
43756
  (section) => {
43247
43757
  if (!section.condition) return true;
43248
43758
  return Boolean(evaluateFormExpression(section.condition, evalContext));
@@ -43318,7 +43828,7 @@ var init_Form = __esm({
43318
43828
  eventBus.emit(`UI:${onCancel}`);
43319
43829
  }
43320
43830
  };
43321
- const renderField = React85__default.useCallback(
43831
+ const renderField = React86__default.useCallback(
43322
43832
  (field) => {
43323
43833
  const fieldName2 = field.name || field.field;
43324
43834
  if (!fieldName2) return null;
@@ -43340,7 +43850,7 @@ var init_Form = __esm({
43340
43850
  [formData, isFieldVisible, relationsData, relationsLoading, isLoading]
43341
43851
  );
43342
43852
  const effectiveFields = entityDerivedFields ?? fields;
43343
- const normalizedFields = React85__default.useMemo(() => {
43853
+ const normalizedFields = React86__default.useMemo(() => {
43344
43854
  if (!effectiveFields || effectiveFields.length === 0) return [];
43345
43855
  return effectiveFields.map((field) => {
43346
43856
  if (typeof field === "string") {
@@ -43375,7 +43885,7 @@ var init_Form = __esm({
43375
43885
  };
43376
43886
  });
43377
43887
  }, [effectiveFields, resolvedEntity, fieldOverrides]);
43378
- const schemaFields = React85__default.useMemo(() => {
43888
+ const schemaFields = React86__default.useMemo(() => {
43379
43889
  if (normalizedFields.length === 0) return null;
43380
43890
  if (isDebugEnabled()) {
43381
43891
  debugGroup(`Form: ${entityName || "unknown"}`);
@@ -43385,7 +43895,7 @@ var init_Form = __esm({
43385
43895
  }
43386
43896
  return normalizedFields.map(renderField).filter(Boolean);
43387
43897
  }, [normalizedFields, renderField, entityName, conditionalFields]);
43388
- const sectionElements = React85__default.useMemo(() => {
43898
+ const sectionElements = React86__default.useMemo(() => {
43389
43899
  if (!sections || sections.length === 0) return null;
43390
43900
  return sections.map((section) => {
43391
43901
  if (!isSectionVisible(section)) {
@@ -44221,7 +44731,7 @@ var init_List = __esm({
44221
44731
  if (entity && typeof entity === "object" && "id" in entity) return [entity];
44222
44732
  return [];
44223
44733
  }, [entity]);
44224
- const getItemActions = React85__default.useCallback(
44734
+ const getItemActions = React86__default.useCallback(
44225
44735
  (item) => {
44226
44736
  if (!itemActions) return [];
44227
44737
  if (typeof itemActions === "function") {
@@ -44703,7 +45213,7 @@ var init_MediaGallery = __esm({
44703
45213
  [selectable, selectedItems, selectionEvent, eventBus]
44704
45214
  );
44705
45215
  const entityData = Array.isArray(entity) ? entity : [];
44706
- const items = React85__default.useMemo(() => {
45216
+ const items = React86__default.useMemo(() => {
44707
45217
  if (propItems && propItems.length > 0) return propItems;
44708
45218
  if (entityData.length === 0) return [];
44709
45219
  return entityData.map((record, idx) => {
@@ -44868,7 +45378,7 @@ var init_MediaGallery = __esm({
44868
45378
  }
44869
45379
  });
44870
45380
  function extractTitle2(children) {
44871
- if (!React85__default.isValidElement(children)) return void 0;
45381
+ if (!React86__default.isValidElement(children)) return void 0;
44872
45382
  const props = children.props;
44873
45383
  if (typeof props.title === "string") {
44874
45384
  return props.title;
@@ -45142,7 +45652,7 @@ var init_debugRegistry = __esm({
45142
45652
  }
45143
45653
  });
45144
45654
  function useDebugData() {
45145
- const [data, setData] = React85.useState(() => ({
45655
+ const [data, setData] = React86.useState(() => ({
45146
45656
  traits: [],
45147
45657
  ticks: [],
45148
45658
  guards: [],
@@ -45156,7 +45666,7 @@ function useDebugData() {
45156
45666
  },
45157
45667
  lastUpdate: Date.now()
45158
45668
  }));
45159
- React85.useEffect(() => {
45669
+ React86.useEffect(() => {
45160
45670
  const updateData = () => {
45161
45671
  setData({
45162
45672
  traits: getAllTraits(),
@@ -45265,12 +45775,12 @@ function layoutGraph(states, transitions, initialState, width, height) {
45265
45775
  return positions;
45266
45776
  }
45267
45777
  function WalkMinimap() {
45268
- const [walkStep, setWalkStep] = React85.useState(null);
45269
- const [traits2, setTraits] = React85.useState([]);
45270
- const [coveredEdges, setCoveredEdges] = React85.useState([]);
45271
- const [completedTraits, setCompletedTraits] = React85.useState(/* @__PURE__ */ new Set());
45272
- const prevTraitRef = React85.useRef(null);
45273
- React85.useEffect(() => {
45778
+ const [walkStep, setWalkStep] = React86.useState(null);
45779
+ const [traits2, setTraits] = React86.useState([]);
45780
+ const [coveredEdges, setCoveredEdges] = React86.useState([]);
45781
+ const [completedTraits, setCompletedTraits] = React86.useState(/* @__PURE__ */ new Set());
45782
+ const prevTraitRef = React86.useRef(null);
45783
+ React86.useEffect(() => {
45274
45784
  const interval = setInterval(() => {
45275
45785
  const w = window;
45276
45786
  const step = w.__orbitalWalkStep;
@@ -45706,15 +46216,15 @@ var init_EntitiesTab = __esm({
45706
46216
  });
45707
46217
  function EventFlowTab({ events: events2 }) {
45708
46218
  const { t } = useTranslate();
45709
- const [filter, setFilter] = React85.useState("all");
45710
- const containerRef = React85.useRef(null);
45711
- const [autoScroll, setAutoScroll] = React85.useState(true);
45712
- React85.useEffect(() => {
46219
+ const [filter, setFilter] = React86.useState("all");
46220
+ const containerRef = React86.useRef(null);
46221
+ const [autoScroll, setAutoScroll] = React86.useState(true);
46222
+ React86.useEffect(() => {
45713
46223
  if (autoScroll && containerRef.current) {
45714
46224
  containerRef.current.scrollTop = containerRef.current.scrollHeight;
45715
46225
  }
45716
46226
  }, [events2.length, autoScroll]);
45717
- const filteredEvents = React85.useMemo(() => {
46227
+ const filteredEvents = React86.useMemo(() => {
45718
46228
  if (filter === "all") return events2;
45719
46229
  return events2.filter((e) => e.type === filter);
45720
46230
  }, [events2, filter]);
@@ -45830,7 +46340,7 @@ var init_EventFlowTab = __esm({
45830
46340
  });
45831
46341
  function GuardsPanel({ guards }) {
45832
46342
  const { t } = useTranslate();
45833
- const [filter, setFilter] = React85.useState("all");
46343
+ const [filter, setFilter] = React86.useState("all");
45834
46344
  if (guards.length === 0) {
45835
46345
  return /* @__PURE__ */ jsx(
45836
46346
  EmptyState,
@@ -45843,7 +46353,7 @@ function GuardsPanel({ guards }) {
45843
46353
  }
45844
46354
  const passedCount = guards.filter((g) => g.result).length;
45845
46355
  const failedCount = guards.length - passedCount;
45846
- const filteredGuards = React85.useMemo(() => {
46356
+ const filteredGuards = React86.useMemo(() => {
45847
46357
  if (filter === "all") return guards;
45848
46358
  if (filter === "passed") return guards.filter((g) => g.result);
45849
46359
  return guards.filter((g) => !g.result);
@@ -46006,10 +46516,10 @@ function EffectBadge({ effect }) {
46006
46516
  }
46007
46517
  function TransitionTimeline({ transitions }) {
46008
46518
  const { t } = useTranslate();
46009
- const containerRef = React85.useRef(null);
46010
- const [autoScroll, setAutoScroll] = React85.useState(true);
46011
- const [expandedId, setExpandedId] = React85.useState(null);
46012
- React85.useEffect(() => {
46519
+ const containerRef = React86.useRef(null);
46520
+ const [autoScroll, setAutoScroll] = React86.useState(true);
46521
+ const [expandedId, setExpandedId] = React86.useState(null);
46522
+ React86.useEffect(() => {
46013
46523
  if (autoScroll && containerRef.current) {
46014
46524
  containerRef.current.scrollTop = containerRef.current.scrollHeight;
46015
46525
  }
@@ -46289,9 +46799,9 @@ function getAllEvents(traits2) {
46289
46799
  function EventDispatcherTab({ traits: traits2, schema }) {
46290
46800
  const eventBus = useEventBus();
46291
46801
  const { t } = useTranslate();
46292
- const [log9, setLog] = React85.useState([]);
46293
- const prevStatesRef = React85.useRef(/* @__PURE__ */ new Map());
46294
- React85.useEffect(() => {
46802
+ const [log9, setLog] = React86.useState([]);
46803
+ const prevStatesRef = React86.useRef(/* @__PURE__ */ new Map());
46804
+ React86.useEffect(() => {
46295
46805
  for (const trait of traits2) {
46296
46806
  const prev = prevStatesRef.current.get(trait.id);
46297
46807
  if (prev && prev !== trait.currentState) {
@@ -46460,10 +46970,10 @@ function VerifyModePanel({
46460
46970
  localCount
46461
46971
  }) {
46462
46972
  const { t } = useTranslate();
46463
- const [expanded, setExpanded] = React85.useState(true);
46464
- const scrollRef = React85.useRef(null);
46465
- const prevCountRef = React85.useRef(0);
46466
- React85.useEffect(() => {
46973
+ const [expanded, setExpanded] = React86.useState(true);
46974
+ const scrollRef = React86.useRef(null);
46975
+ const prevCountRef = React86.useRef(0);
46976
+ React86.useEffect(() => {
46467
46977
  if (expanded && transitions.length > prevCountRef.current && scrollRef.current) {
46468
46978
  scrollRef.current.scrollTop = scrollRef.current.scrollHeight;
46469
46979
  }
@@ -46520,10 +47030,10 @@ function RuntimeDebugger({
46520
47030
  schema
46521
47031
  }) {
46522
47032
  const { t } = useTranslate();
46523
- const [isCollapsed, setIsCollapsed] = React85.useState(mode === "verify" ? true : defaultCollapsed);
46524
- const [isVisible, setIsVisible] = React85.useState(mode === "inline" || mode === "verify" || isDebugEnabled2());
47033
+ const [isCollapsed, setIsCollapsed] = React86.useState(mode === "verify" ? true : defaultCollapsed);
47034
+ const [isVisible, setIsVisible] = React86.useState(mode === "inline" || mode === "verify" || isDebugEnabled2());
46525
47035
  const debugData = useDebugData();
46526
- React85.useEffect(() => {
47036
+ React86.useEffect(() => {
46527
47037
  if (mode === "inline") return;
46528
47038
  return onDebugToggle((enabled) => {
46529
47039
  setIsVisible(enabled);
@@ -46532,7 +47042,7 @@ function RuntimeDebugger({
46532
47042
  }
46533
47043
  });
46534
47044
  }, [mode]);
46535
- React85.useEffect(() => {
47045
+ React86.useEffect(() => {
46536
47046
  if (mode === "inline") return;
46537
47047
  const handleKeyDown = (e) => {
46538
47048
  if (e.key === "`" && isVisible) {
@@ -46547,7 +47057,7 @@ function RuntimeDebugger({
46547
47057
  if (!isVisible) {
46548
47058
  return null;
46549
47059
  }
46550
- const positionClasses = {
47060
+ const positionClasses2 = {
46551
47061
  "bottom-right": "bottom-4 right-4",
46552
47062
  "bottom-left": "bottom-4 left-4",
46553
47063
  "top-right": "top-4 right-4",
@@ -46676,7 +47186,7 @@ function RuntimeDebugger({
46676
47186
  className: cn(
46677
47187
  "runtime-debugger",
46678
47188
  "fixed",
46679
- positionClasses[position],
47189
+ positionClasses2[position],
46680
47190
  isCollapsed ? "runtime-debugger--collapsed" : "runtime-debugger--expanded",
46681
47191
  className
46682
47192
  ),
@@ -46758,6 +47268,7 @@ var init_SegmentRenderer = __esm({
46758
47268
  "use client";
46759
47269
  init_MarkdownContent();
46760
47270
  init_CodeBlock();
47271
+ init_MermaidDiagram();
46761
47272
  init_QuizBlock();
46762
47273
  init_ActivationBlock();
46763
47274
  init_ConnectionBlock();
@@ -46789,6 +47300,9 @@ var init_SegmentRenderer = __esm({
46789
47300
  return /* @__PURE__ */ jsx(MarkdownContent, { content: segment.content }, `md-${index}`);
46790
47301
  }
46791
47302
  if (segment.type === "code") {
47303
+ if (segment.language === "mermaid") {
47304
+ return /* @__PURE__ */ jsx(MermaidDiagram, { code: segment.content }, `code-${index}`);
47305
+ }
46792
47306
  if (segment.runnable && onRunCodeSimulation) {
46793
47307
  return /* @__PURE__ */ jsx(
46794
47308
  CodeRunnerPanel,
@@ -46921,99 +47435,6 @@ var init_ShowcaseOrganism = __esm({
46921
47435
  ShowcaseOrganism.displayName = "ShowcaseOrganism";
46922
47436
  }
46923
47437
  });
46924
- var SplitPane;
46925
- var init_SplitPane = __esm({
46926
- "components/core/organisms/layout/SplitPane.tsx"() {
46927
- "use client";
46928
- init_cn();
46929
- SplitPane = ({
46930
- direction = "horizontal",
46931
- ratio: initialRatio = 50,
46932
- minSize = 100,
46933
- resizable = true,
46934
- left,
46935
- right,
46936
- className,
46937
- leftClassName,
46938
- rightClassName
46939
- }) => {
46940
- const [ratio, setRatio] = useState(initialRatio);
46941
- const containerRef = useRef(null);
46942
- const isDragging = useRef(false);
46943
- const handlePointerDown = useCallback(
46944
- (e) => {
46945
- if (!resizable) return;
46946
- e.preventDefault();
46947
- isDragging.current = true;
46948
- e.currentTarget.setPointerCapture(e.pointerId);
46949
- const handlePointerMove = (ev) => {
46950
- if (!isDragging.current || !containerRef.current) return;
46951
- const rect = containerRef.current.getBoundingClientRect();
46952
- let newRatio;
46953
- if (direction === "horizontal") {
46954
- const x = ev.clientX - rect.left;
46955
- newRatio = x / rect.width * 100;
46956
- } else {
46957
- const y = ev.clientY - rect.top;
46958
- newRatio = y / rect.height * 100;
46959
- }
46960
- const minRatio = minSize / (direction === "horizontal" ? rect.width : rect.height) * 100;
46961
- const maxRatio = 100 - minRatio;
46962
- newRatio = Math.max(minRatio, Math.min(maxRatio, newRatio));
46963
- setRatio(newRatio);
46964
- };
46965
- const handlePointerUp = () => {
46966
- isDragging.current = false;
46967
- document.removeEventListener("pointermove", handlePointerMove);
46968
- document.removeEventListener("pointerup", handlePointerUp);
46969
- document.removeEventListener("pointercancel", handlePointerUp);
46970
- };
46971
- document.addEventListener("pointermove", handlePointerMove);
46972
- document.addEventListener("pointerup", handlePointerUp);
46973
- document.addEventListener("pointercancel", handlePointerUp);
46974
- },
46975
- [direction, minSize, resizable]
46976
- );
46977
- const isHorizontal = direction === "horizontal";
46978
- return /* @__PURE__ */ jsxs(
46979
- "div",
46980
- {
46981
- ref: containerRef,
46982
- className: cn(
46983
- "flex w-full h-full",
46984
- isHorizontal ? "flex-row" : "flex-col",
46985
- className
46986
- ),
46987
- children: [
46988
- /* @__PURE__ */ jsx(
46989
- "div",
46990
- {
46991
- className: cn("overflow-auto", leftClassName),
46992
- style: {
46993
- [isHorizontal ? "width" : "height"]: `${ratio}%`,
46994
- flexShrink: 0
46995
- },
46996
- children: left
46997
- }
46998
- ),
46999
- resizable && /* @__PURE__ */ jsx(
47000
- "div",
47001
- {
47002
- onPointerDown: handlePointerDown,
47003
- className: cn(
47004
- "flex-shrink-0 bg-border transition-colors touch-none",
47005
- isHorizontal ? "w-1 cursor-col-resize hover:w-1.5 hover:bg-muted-foreground" : "h-1 cursor-row-resize hover:h-1.5 hover:bg-muted-foreground"
47006
- )
47007
- }
47008
- ),
47009
- /* @__PURE__ */ jsx("div", { className: cn("flex-1 overflow-auto", rightClassName), children: right })
47010
- ]
47011
- }
47012
- );
47013
- };
47014
- SplitPane.displayName = "SplitPane";
47015
- }
47016
- });
47017
47438
  var StatCard;
47018
47439
  var init_StatCard = __esm({
47019
47440
  "components/core/organisms/StatCard.tsx"() {
@@ -47052,7 +47473,7 @@ var init_StatCard = __esm({
47052
47473
  const labelToUse = propLabel ?? propTitle;
47053
47474
  const eventBus = useEventBus();
47054
47475
  const { t } = useTranslate();
47055
- const handleActionClick = React85__default.useCallback(() => {
47476
+ const handleActionClick = React86__default.useCallback(() => {
47056
47477
  if (action?.event) {
47057
47478
  eventBus.emit(`UI:${action.event}`, {});
47058
47479
  }
@@ -47063,7 +47484,7 @@ var init_StatCard = __esm({
47063
47484
  const data = Array.isArray(entity) ? entity : entity ? [entity] : [];
47064
47485
  const isLoading = externalLoading ?? false;
47065
47486
  const error = externalError;
47066
- const computeMetricValue = React85__default.useCallback(
47487
+ const computeMetricValue = React86__default.useCallback(
47067
47488
  (metric, items) => {
47068
47489
  if (metric.value !== void 0) {
47069
47490
  return metric.value;
@@ -47102,7 +47523,7 @@ var init_StatCard = __esm({
47102
47523
  },
47103
47524
  []
47104
47525
  );
47105
- const schemaStats = React85__default.useMemo(() => {
47526
+ const schemaStats = React86__default.useMemo(() => {
47106
47527
  if (!metrics || metrics.length === 0) return null;
47107
47528
  return metrics.map((metric) => ({
47108
47529
  label: metric.label,
@@ -47110,7 +47531,7 @@ var init_StatCard = __esm({
47110
47531
  format: metric.format
47111
47532
  }));
47112
47533
  }, [metrics, data, computeMetricValue]);
47113
- const calculatedTrend = React85__default.useMemo(() => {
47534
+ const calculatedTrend = React86__default.useMemo(() => {
47114
47535
  if (manualTrend !== void 0) return manualTrend;
47115
47536
  if (previousValue === void 0 || currentValue === void 0)
47116
47537
  return void 0;
@@ -47750,8 +48171,8 @@ var init_SubagentTracePanel = __esm({
47750
48171
  ] });
47751
48172
  };
47752
48173
  InlineActivityStream = ({ activities, autoScroll = true, className }) => {
47753
- const endRef = React85__default.useRef(null);
47754
- React85__default.useEffect(() => {
48174
+ const endRef = React86__default.useRef(null);
48175
+ React86__default.useEffect(() => {
47755
48176
  if (!autoScroll) return;
47756
48177
  endRef.current?.scrollIntoView({ behavior: "smooth", block: "end" });
47757
48178
  }, [activities.length, autoScroll]);
@@ -47845,7 +48266,7 @@ var init_SubagentTracePanel = __esm({
47845
48266
  };
47846
48267
  SubagentRichCard = ({ subagent }) => {
47847
48268
  const { t } = useTranslate();
47848
- const activities = React85__default.useMemo(
48269
+ const activities = React86__default.useMemo(
47849
48270
  () => subagentMessagesToActivities(subagent.messages),
47850
48271
  [subagent.messages]
47851
48272
  );
@@ -47922,8 +48343,8 @@ var init_SubagentTracePanel = __esm({
47922
48343
  ] });
47923
48344
  };
47924
48345
  CoordinatorConversation = ({ messages, autoScroll = true, className }) => {
47925
- const endRef = React85__default.useRef(null);
47926
- React85__default.useEffect(() => {
48346
+ const endRef = React86__default.useRef(null);
48347
+ React86__default.useEffect(() => {
47927
48348
  if (!autoScroll) return;
47928
48349
  endRef.current?.scrollIntoView({ behavior: "smooth", block: "end" });
47929
48350
  }, [messages.length, autoScroll]);
@@ -48358,7 +48779,7 @@ var init_Timeline = __esm({
48358
48779
  }) => {
48359
48780
  const { t } = useTranslate();
48360
48781
  const entityData = entity ?? [];
48361
- const items = React85__default.useMemo(() => {
48782
+ const items = React86__default.useMemo(() => {
48362
48783
  if (propItems) return propItems;
48363
48784
  if (entityData.length === 0) return [];
48364
48785
  return entityData.map((record, idx) => {
@@ -48460,7 +48881,7 @@ var init_Timeline = __esm({
48460
48881
  }
48461
48882
  });
48462
48883
  function extractToastProps(children) {
48463
- if (!React85__default.isValidElement(children)) {
48884
+ if (!React86__default.isValidElement(children)) {
48464
48885
  if (typeof children === "string") {
48465
48886
  return { message: children };
48466
48887
  }
@@ -48502,7 +48923,7 @@ var init_ToastSlot = __esm({
48502
48923
  eventBus.emit(`${prefix}CLOSE`);
48503
48924
  };
48504
48925
  if (!isVisible) return null;
48505
- const isCustomContent = React85__default.isValidElement(children) && !message;
48926
+ const isCustomContent = React86__default.isValidElement(children) && !message;
48506
48927
  return /* @__PURE__ */ jsx(Box, { className: "fixed bottom-4 right-4 z-50", children: isCustomContent ? children : /* @__PURE__ */ jsx(
48507
48928
  Toast,
48508
48929
  {
@@ -48597,6 +49018,7 @@ var init_component_registry_generated = __esm({
48597
49018
  init_DocSearch();
48598
49019
  init_DocSidebar();
48599
49020
  init_DocTOC();
49021
+ init_DockLayout();
48600
49022
  init_DocumentDetails();
48601
49023
  init_DocumentPanel();
48602
49024
  init_DocumentViewer();
@@ -48627,6 +49049,7 @@ var init_component_registry_generated = __esm({
48627
49049
  init_FlipCard();
48628
49050
  init_FlipContainer();
48629
49051
  init_FloatingActionButton();
49052
+ init_FloatingToolbar();
48630
49053
  init_Form();
48631
49054
  init_FormField();
48632
49055
  init_FormSection();
@@ -48871,6 +49294,7 @@ var init_component_registry_generated = __esm({
48871
49294
  "DocSearch": DocSearch,
48872
49295
  "DocSidebar": DocSidebar,
48873
49296
  "DocTOC": DocTOC,
49297
+ "DockLayout": DockLayout,
48874
49298
  "DocumentDetails": DocumentDetails,
48875
49299
  "DocumentPanel": DocumentPanel,
48876
49300
  "DocumentViewer": DocumentViewer,
@@ -48901,6 +49325,7 @@ var init_component_registry_generated = __esm({
48901
49325
  "FlipCard": FlipCard,
48902
49326
  "FlipContainer": FlipContainer,
48903
49327
  "FloatingActionButton": FloatingActionButton,
49328
+ "FloatingToolbar": FloatingToolbar,
48904
49329
  "Form": Form,
48905
49330
  "FormField": FormField,
48906
49331
  "FormLayout": FormLayout,
@@ -49088,7 +49513,7 @@ function SuspenseConfigProvider({
49088
49513
  config,
49089
49514
  children
49090
49515
  }) {
49091
- return React85__default.createElement(
49516
+ return React86__default.createElement(
49092
49517
  SuspenseConfigContext.Provider,
49093
49518
  { value: config },
49094
49519
  children
@@ -49136,7 +49561,7 @@ function enrichFormFields(fields, entityDef) {
49136
49561
  }
49137
49562
  return { name: field, label: humanizeFieldName(field) };
49138
49563
  }
49139
- if (field && typeof field === "object" && !Array.isArray(field) && !React85__default.isValidElement(field) && !(field instanceof Date)) {
49564
+ if (field && typeof field === "object" && !Array.isArray(field) && !React86__default.isValidElement(field) && !(field instanceof Date)) {
49140
49565
  const obj = field;
49141
49566
  const fieldName2 = typeof obj.name === "string" ? obj.name : typeof obj.field === "string" ? obj.field : void 0;
49142
49567
  if (!fieldName2) return field;
@@ -49189,7 +49614,7 @@ function enrichDetailFields(fields, entityDef) {
49189
49614
  const meta = metaFor(field);
49190
49615
  return meta ? { key: field, ...meta } : field;
49191
49616
  }
49192
- if (field && typeof field === "object" && !Array.isArray(field) && !React85__default.isValidElement(field) && !(field instanceof Date)) {
49617
+ if (field && typeof field === "object" && !Array.isArray(field) && !React86__default.isValidElement(field) && !(field instanceof Date)) {
49193
49618
  const obj = field;
49194
49619
  const fieldName2 = typeof obj.key === "string" ? obj.key : typeof obj.name === "string" ? obj.name : void 0;
49195
49620
  if (!fieldName2 || obj.type) return field;
@@ -49648,7 +50073,7 @@ function renderPatternChildren(children, onDismiss, parentId = "root", parentPat
49648
50073
  const key = `${parentId}-${index}-trait:${traitName}`;
49649
50074
  return /* @__PURE__ */ jsx(TraitFrame, { traitName }, key);
49650
50075
  }
49651
- return /* @__PURE__ */ jsx(React85__default.Fragment, { children: child }, `${parentId}-${index}`);
50076
+ return /* @__PURE__ */ jsx(React86__default.Fragment, { children: child }, `${parentId}-${index}`);
49652
50077
  }
49653
50078
  if (!child || typeof child !== "object") return null;
49654
50079
  const childId = `${parentId}-${index}`;
@@ -49705,7 +50130,7 @@ function isPatternConfig(value) {
49705
50130
  if (value === null || value === void 0) return false;
49706
50131
  if (typeof value !== "object") return false;
49707
50132
  if (Array.isArray(value)) return false;
49708
- if (React85__default.isValidElement(value)) return false;
50133
+ if (React86__default.isValidElement(value)) return false;
49709
50134
  if (value instanceof Date) return false;
49710
50135
  if (typeof value === "function") return false;
49711
50136
  const record = value;
@@ -49718,9 +50143,9 @@ function renderPatternValue(value) {
49718
50143
  if (typeof value === "string") return renderPatternChildren(value, () => {
49719
50144
  });
49720
50145
  if (value instanceof Date) return value.toLocaleString();
49721
- if (React85__default.isValidElement(value)) return value;
50146
+ if (React86__default.isValidElement(value)) return value;
49722
50147
  if (Array.isArray(value)) {
49723
- return value.map((item, index) => /* @__PURE__ */ jsx(React85__default.Fragment, { children: renderPatternValue(item) }, index));
50148
+ return value.map((item, index) => /* @__PURE__ */ jsx(React86__default.Fragment, { children: renderPatternValue(item) }, index));
49724
50149
  }
49725
50150
  if (isPatternConfig(value)) {
49726
50151
  const { type, ...props } = value;
@@ -49730,7 +50155,7 @@ function renderPatternValue(value) {
49730
50155
  return null;
49731
50156
  }
49732
50157
  function isPlainConfigObject(value) {
49733
- if (React85__default.isValidElement(value)) return false;
50158
+ if (React86__default.isValidElement(value)) return false;
49734
50159
  if (value instanceof Date) return false;
49735
50160
  const proto = Object.getPrototypeOf(value);
49736
50161
  return proto === Object.prototype || proto === null;
@@ -49904,7 +50329,7 @@ function SlotContentRenderer({
49904
50329
  for (const slotKey of CONTENT_NODE_SLOTS) {
49905
50330
  const slotVal = restProps[slotKey];
49906
50331
  if (slotVal === void 0 || slotVal === null) continue;
49907
- if (React85__default.isValidElement(slotVal) || typeof slotVal === "string" || typeof slotVal === "number" || typeof slotVal === "boolean") continue;
50332
+ if (React86__default.isValidElement(slotVal) || typeof slotVal === "string" || typeof slotVal === "number" || typeof slotVal === "boolean") continue;
49908
50333
  const typelessChildren = !Array.isArray(slotVal) && typeof slotVal === "object" && !("type" in slotVal) && Array.isArray(slotVal.children) ? slotVal.children : void 0;
49909
50334
  if (typelessChildren !== void 0 || Array.isArray(slotVal) || typeof slotVal === "object" && "type" in slotVal) {
49910
50335
  nodeSlotOverrides[slotKey] = renderPatternChildren(
@@ -49958,7 +50383,7 @@ function SlotContentRenderer({
49958
50383
  const resolvedItems = Array.isArray(entityVal) && entityVal[0] !== "fn" ? entityVal : null;
49959
50384
  if (resolvedItems && resolvedItems.length > 0 && !finalProps.fields && !finalProps.columns) {
49960
50385
  const sample = resolvedItems[0];
49961
- if (sample && typeof sample === "object" && !Array.isArray(sample) && !React85__default.isValidElement(sample) && !(sample instanceof Date)) {
50386
+ if (sample && typeof sample === "object" && !Array.isArray(sample) && !React86__default.isValidElement(sample) && !(sample instanceof Date)) {
49962
50387
  const keys = Object.keys(sample).filter((k) => k !== "id" && k !== "_id");
49963
50388
  finalProps.fields = keys.map((k, i) => ({ name: k, variant: i === 0 ? "h4" : "body" }));
49964
50389
  }
@@ -50351,7 +50776,7 @@ function resolveLambdaBindings(body, params, item, index) {
50351
50776
  }
50352
50777
  return substituted;
50353
50778
  }
50354
- if (body !== null && typeof body === "object" && !React85__default.isValidElement(body) && !(body instanceof Date) && typeof body !== "function") {
50779
+ if (body !== null && typeof body === "object" && !React86__default.isValidElement(body) && !(body instanceof Date) && typeof body !== "function") {
50355
50780
  const out = {};
50356
50781
  for (const [k, v] of Object.entries(body)) {
50357
50782
  out[k] = recur(v);
@@ -50384,7 +50809,7 @@ function deferLambdaEntityExprs(value) {
50384
50809
  }
50385
50810
  return arr.map((v) => deferLambdaEntityExprs(v));
50386
50811
  }
50387
- if (value !== null && typeof value === "object" && !React85__default.isValidElement(value) && !(value instanceof Date) && typeof value !== "function" && !isRenderBindingMarker(value)) {
50812
+ if (value !== null && typeof value === "object" && !React86__default.isValidElement(value) && !(value instanceof Date) && typeof value !== "function" && !isRenderBindingMarker(value)) {
50388
50813
  const out = {};
50389
50814
  for (const [k, v] of Object.entries(value)) {
50390
50815
  out[k] = deferLambdaEntityExprs(v);
@@ -50398,7 +50823,7 @@ function makeLambdaFn(params, lambdaBody, callerKey) {
50398
50823
  const resolvedBody = deferLambdaEntityExprs(
50399
50824
  resolveLambdaBindings(lambdaBody, params, item, index)
50400
50825
  );
50401
- if (resolvedBody === null || typeof resolvedBody !== "object" || Array.isArray(resolvedBody) || typeof resolvedBody === "function" || React85__default.isValidElement(resolvedBody) || resolvedBody instanceof Date) {
50826
+ if (resolvedBody === null || typeof resolvedBody !== "object" || Array.isArray(resolvedBody) || typeof resolvedBody === "function" || React86__default.isValidElement(resolvedBody) || resolvedBody instanceof Date) {
50402
50827
  return null;
50403
50828
  }
50404
50829
  const record = resolvedBody;
@@ -50417,7 +50842,7 @@ function makeLambdaFn(params, lambdaBody, callerKey) {
50417
50842
  props: childProps,
50418
50843
  priority: 0
50419
50844
  };
50420
- return React85__default.createElement(SlotContentRenderer2, { content: childContent });
50845
+ return React86__default.createElement(SlotContentRenderer2, { content: childContent });
50421
50846
  };
50422
50847
  }
50423
50848
  function convertNode(node, callerKey) {
@@ -50437,7 +50862,7 @@ function convertNode(node, callerKey) {
50437
50862
  });
50438
50863
  return anyChanged ? mapped : node;
50439
50864
  }
50440
- if (typeof node === "object" && !React85__default.isValidElement(node) && !(node instanceof Date)) {
50865
+ if (typeof node === "object" && !React86__default.isValidElement(node) && !(node instanceof Date)) {
50441
50866
  return convertObjectProps(node);
50442
50867
  }
50443
50868
  return node;