@almadar/ui 6.2.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,6 +1,6 @@
1
1
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
2
- import * as React77 from 'react';
3
- import React77__default, { createContext, useContext, useMemo, useRef, useEffect, useCallback, useState, useLayoutEffect, useId, Suspense, lazy, useSyncExternalStore } from 'react';
2
+ import * as React78 from 'react';
3
+ import React78__default, { createContext, useContext, useMemo, useRef, useEffect, useCallback, useState, useLayoutEffect, useId, Suspense, lazy, useSyncExternalStore } from 'react';
4
4
  import { clsx } from 'clsx';
5
5
  import { twMerge } from 'tailwind-merge';
6
6
  import { EventBusContext, useTraitScopeChain, useCurrentPagePath, useGameAudioContextOptional, useRenderSlot, useNavStack, useEntitySchemaOptional, RenderSlotProvider, useEntityBindingSnapshot, useTraitScope, TraitScopeProvider } from '@almadar/ui/providers';
@@ -262,7 +262,7 @@ var init_SvgFlow = __esm({
262
262
  width = 100,
263
263
  height = 100
264
264
  }) => {
265
- const markerId = React77__default.useMemo(() => {
265
+ const markerId = React78__default.useMemo(() => {
266
266
  flowIdCounter += 1;
267
267
  return `almadar-flow-arrow-${flowIdCounter}`;
268
268
  }, []);
@@ -855,7 +855,7 @@ var init_SvgRing = __esm({
855
855
  width = 100,
856
856
  height = 100
857
857
  }) => {
858
- const gradientId = React77__default.useMemo(() => {
858
+ const gradientId = React78__default.useMemo(() => {
859
859
  ringIdCounter += 1;
860
860
  return `almadar-ring-glow-${ringIdCounter}`;
861
861
  }, []);
@@ -1397,7 +1397,7 @@ var init_Icon = __esm({
1397
1397
  const effectiveName = typeof icon === "string" && icon !== "" ? icon : name;
1398
1398
  const effectiveStrokeWidth = strokeWidth != null && strokeWidth > 0 ? strokeWidth : void 0;
1399
1399
  const family = useIconFamily();
1400
- const RenderedComponent = React77__default.useMemo(() => {
1400
+ const RenderedComponent = React78__default.useMemo(() => {
1401
1401
  if (directIcon) return null;
1402
1402
  return effectiveName ? resolveIconForFamily(effectiveName) : null;
1403
1403
  }, [directIcon, effectiveName, family]);
@@ -1526,7 +1526,7 @@ var init_atlasSlice = __esm({
1526
1526
  }
1527
1527
  });
1528
1528
  function useAtlasSliceDataUrl(asset) {
1529
- const [, bump] = React77.useReducer((x) => x + 1, 0);
1529
+ const [, bump] = React78.useReducer((x) => x + 1, 0);
1530
1530
  if (!isAtlasAsset(asset)) return void 0;
1531
1531
  const key = `${asset.atlas}#${asset.sprite}`;
1532
1532
  const cached = sliceDataUrlCache.get(key);
@@ -1589,13 +1589,13 @@ function AtlasImage({
1589
1589
  style,
1590
1590
  "aria-hidden": ariaHidden
1591
1591
  }) {
1592
- const [, bump] = React77.useReducer((x) => x + 1, 0);
1593
- const canvasRef = React77.useRef(null);
1592
+ const [, bump] = React78.useReducer((x) => x + 1, 0);
1593
+ const canvasRef = React78.useRef(null);
1594
1594
  const sliced = isAtlasAsset(asset);
1595
1595
  const atlas = sliced ? getAtlas(asset.atlas, bump) : void 0;
1596
1596
  const img = sliced && asset?.url ? getSheetImage(asset.url, bump) : null;
1597
1597
  const rect = sliced && atlas ? subRectFor(atlas, asset.sprite) : null;
1598
- React77.useEffect(() => {
1598
+ React78.useEffect(() => {
1599
1599
  const canvas = canvasRef.current;
1600
1600
  if (!canvas || !img || !rect) return;
1601
1601
  canvas.width = rect.sw;
@@ -1671,7 +1671,7 @@ function resolveIconProp(value, sizeClass) {
1671
1671
  const IconComp = value;
1672
1672
  return /* @__PURE__ */ jsx(IconComp, { className: sizeClass });
1673
1673
  }
1674
- if (React77__default.isValidElement(value)) {
1674
+ if (React78__default.isValidElement(value)) {
1675
1675
  return value;
1676
1676
  }
1677
1677
  if (typeof value === "object" && value !== null && isIconLike(value)) {
@@ -1748,7 +1748,7 @@ var init_Button = __esm({
1748
1748
  md: "h-icon-default w-icon-default",
1749
1749
  lg: "h-icon-default w-icon-default"
1750
1750
  };
1751
- Button = React77__default.forwardRef(
1751
+ Button = React78__default.forwardRef(
1752
1752
  ({
1753
1753
  className,
1754
1754
  variant = "primary",
@@ -1820,7 +1820,7 @@ var init_Input = __esm({
1820
1820
  init_cn();
1821
1821
  init_Icon();
1822
1822
  init_useEventBus();
1823
- Input = React77__default.forwardRef(
1823
+ Input = React78__default.forwardRef(
1824
1824
  ({
1825
1825
  className,
1826
1826
  inputType,
@@ -1844,9 +1844,9 @@ var init_Input = __esm({
1844
1844
  const eventBus = useEventBus();
1845
1845
  const type = inputType || htmlType || "text";
1846
1846
  const isDeclarative = typeof onChange === "string";
1847
- const [localValue, setLocalValue] = React77__default.useState(value);
1848
- const pendingEchoRef = React77__default.useRef(/* @__PURE__ */ new Set());
1849
- React77__default.useEffect(() => {
1847
+ const [localValue, setLocalValue] = React78__default.useState(value);
1848
+ const pendingEchoRef = React78__default.useRef(/* @__PURE__ */ new Set());
1849
+ React78__default.useEffect(() => {
1850
1850
  if (!isDeclarative) return;
1851
1851
  const incoming = value == null ? "" : String(value);
1852
1852
  if (pendingEchoRef.current.has(incoming)) {
@@ -2013,7 +2013,7 @@ var Label;
2013
2013
  var init_Label = __esm({
2014
2014
  "components/core/atoms/Label.tsx"() {
2015
2015
  init_cn();
2016
- Label = React77__default.forwardRef(
2016
+ Label = React78__default.forwardRef(
2017
2017
  ({ className, required, children, ...props }, ref) => {
2018
2018
  return /* @__PURE__ */ jsxs(
2019
2019
  "label",
@@ -2040,7 +2040,7 @@ var init_Textarea = __esm({
2040
2040
  "components/core/atoms/Textarea.tsx"() {
2041
2041
  init_cn();
2042
2042
  init_useEventBus();
2043
- Textarea = React77__default.forwardRef(
2043
+ Textarea = React78__default.forwardRef(
2044
2044
  ({ className, error, onChange, ...props }, ref) => {
2045
2045
  const eventBus = useEventBus();
2046
2046
  const handleChange = (e) => {
@@ -2094,6 +2094,7 @@ function NativeSelect({
2094
2094
  error,
2095
2095
  onChange,
2096
2096
  onValueChange,
2097
+ action,
2097
2098
  value,
2098
2099
  ...props
2099
2100
  }) {
@@ -2105,6 +2106,9 @@ function NativeSelect({
2105
2106
  onChange?.(e);
2106
2107
  }
2107
2108
  dispatchValueChange(onValueChange, eventBus, e.target.value);
2109
+ if (action) {
2110
+ eventBus.emit(`UI:${action}`, { value: e.target.value });
2111
+ }
2108
2112
  };
2109
2113
  return /* @__PURE__ */ jsxs("div", { className: "relative", children: [
2110
2114
  /* @__PURE__ */ jsxs(
@@ -2140,6 +2144,7 @@ function RichSelect({
2140
2144
  error,
2141
2145
  onChange,
2142
2146
  onValueChange,
2147
+ action,
2143
2148
  value,
2144
2149
  multiple,
2145
2150
  searchable,
@@ -2165,6 +2170,9 @@ function RichSelect({
2165
2170
  eventBus.emit(`UI:${onChange}`, { value: next });
2166
2171
  }
2167
2172
  dispatchValueChange(onValueChange, eventBus, next);
2173
+ if (action) {
2174
+ eventBus.emit(`UI:${action}`, { value: next });
2175
+ }
2168
2176
  };
2169
2177
  const clear = (e) => {
2170
2178
  e.stopPropagation();
@@ -2173,6 +2181,9 @@ function RichSelect({
2173
2181
  eventBus.emit(`UI:${onChange}`, { value: next });
2174
2182
  }
2175
2183
  dispatchValueChange(onValueChange, eventBus, next);
2184
+ if (action) {
2185
+ eventBus.emit(`UI:${action}`, { value: next });
2186
+ }
2176
2187
  };
2177
2188
  useEffect(() => {
2178
2189
  const handler = (e) => {
@@ -2279,7 +2290,7 @@ var init_Select = __esm({
2279
2290
  init_cn();
2280
2291
  init_Icon();
2281
2292
  init_useEventBus();
2282
- Select = React77__default.forwardRef(
2293
+ Select = React78__default.forwardRef(
2283
2294
  (props, _ref) => {
2284
2295
  const { multiple, searchable, clearable } = props;
2285
2296
  if (multiple || searchable || clearable) {
@@ -2296,7 +2307,7 @@ var init_Checkbox = __esm({
2296
2307
  "components/core/atoms/Checkbox.tsx"() {
2297
2308
  init_cn();
2298
2309
  init_useEventBus();
2299
- Checkbox = React77__default.forwardRef(
2310
+ Checkbox = React78__default.forwardRef(
2300
2311
  ({ className, label, id, onChange, ...props }, ref) => {
2301
2312
  const inputId = id || `checkbox-${Math.random().toString(36).substr(2, 9)}`;
2302
2313
  const eventBus = useEventBus();
@@ -2350,7 +2361,7 @@ var init_Spinner = __esm({
2350
2361
  md: "h-6 w-6",
2351
2362
  lg: "h-8 w-8"
2352
2363
  };
2353
- Spinner = React77__default.forwardRef(
2364
+ Spinner = React78__default.forwardRef(
2354
2365
  ({ className, size = "md", overlay, ...props }, ref) => {
2355
2366
  if (overlay) {
2356
2367
  return /* @__PURE__ */ jsx(
@@ -2440,7 +2451,7 @@ var init_Card = __esm({
2440
2451
  chip: "shadow-none rounded-pill border-[length:var(--border-width)] border-border",
2441
2452
  "tile-image-first": "p-0 overflow-hidden"
2442
2453
  };
2443
- Card = React77__default.forwardRef(
2454
+ Card = React78__default.forwardRef(
2444
2455
  ({
2445
2456
  className,
2446
2457
  variant = "bordered",
@@ -2489,9 +2500,9 @@ var init_Card = __esm({
2489
2500
  }
2490
2501
  );
2491
2502
  Card.displayName = "Card";
2492
- CardHeader = React77__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("mb-4", className), ...props }));
2503
+ CardHeader = React78__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("mb-4", className), ...props }));
2493
2504
  CardHeader.displayName = "CardHeader";
2494
- CardTitle = React77__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
2505
+ CardTitle = React78__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
2495
2506
  "h3",
2496
2507
  {
2497
2508
  ref,
@@ -2504,11 +2515,11 @@ var init_Card = __esm({
2504
2515
  }
2505
2516
  ));
2506
2517
  CardTitle.displayName = "CardTitle";
2507
- CardContent = React77__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("", className), ...props }));
2518
+ CardContent = React78__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("", className), ...props }));
2508
2519
  CardContent.displayName = "CardContent";
2509
2520
  CardBody = CardContent;
2510
2521
  CardBody.displayName = "CardBody";
2511
- CardFooter = React77__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
2522
+ CardFooter = React78__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
2512
2523
  "div",
2513
2524
  {
2514
2525
  ref,
@@ -2562,7 +2573,7 @@ var init_Badge = __esm({
2562
2573
  md: "px-2.5 py-1 text-sm",
2563
2574
  lg: "px-3 py-1.5 text-base"
2564
2575
  };
2565
- Badge = React77__default.forwardRef(
2576
+ Badge = React78__default.forwardRef(
2566
2577
  ({ className, variant = "default", size = "sm", amount, label, icon, iconAsset, children, onRemove, removeLabel, ...props }, ref) => {
2567
2578
  const iconSizes3 = {
2568
2579
  sm: "h-icon-default w-icon-default",
@@ -2690,7 +2701,7 @@ var init_FilterPill = __esm({
2690
2701
  md: "w-3.5 h-3.5",
2691
2702
  lg: "w-4 h-4"
2692
2703
  };
2693
- FilterPill = React77__default.forwardRef(
2704
+ FilterPill = React78__default.forwardRef(
2694
2705
  ({
2695
2706
  className,
2696
2707
  variant = "default",
@@ -2819,8 +2830,8 @@ var init_Avatar = __esm({
2819
2830
  actionPayload
2820
2831
  }) => {
2821
2832
  const eventBus = useEventBus();
2822
- const [imgFailed, setImgFailed] = React77__default.useState(false);
2823
- React77__default.useEffect(() => {
2833
+ const [imgFailed, setImgFailed] = React78__default.useState(false);
2834
+ React78__default.useEffect(() => {
2824
2835
  setImgFailed(false);
2825
2836
  }, [src]);
2826
2837
  const initials = providedInitials ?? (name ? generateInitials(name) : void 0);
@@ -3072,7 +3083,7 @@ var init_Box = __esm({
3072
3083
  fixed: "fixed",
3073
3084
  sticky: "sticky"
3074
3085
  };
3075
- Box = React77__default.forwardRef(
3086
+ Box = React78__default.forwardRef(
3076
3087
  ({
3077
3088
  padding,
3078
3089
  paddingX,
@@ -3137,7 +3148,7 @@ var init_Box = __esm({
3137
3148
  onPointerDown?.(e);
3138
3149
  }, [hoverEvent, tapReveal, triggerProps, onPointerDown]);
3139
3150
  const isClickable = action || onClick;
3140
- return React77__default.createElement(
3151
+ return React78__default.createElement(
3141
3152
  Component,
3142
3153
  {
3143
3154
  ref,
@@ -3191,7 +3202,7 @@ var init_Center = __esm({
3191
3202
  as: Component = "div"
3192
3203
  }) => {
3193
3204
  const mergedStyle = minHeight ? { minHeight, ...style } : style;
3194
- return React77__default.createElement(Component, {
3205
+ return React78__default.createElement(Component, {
3195
3206
  className: cn(
3196
3207
  inline ? "inline-flex" : "flex",
3197
3208
  horizontal && "justify-center",
@@ -3459,7 +3470,7 @@ var init_Radio = __esm({
3459
3470
  md: "w-2.5 h-2.5",
3460
3471
  lg: "w-3 h-3"
3461
3472
  };
3462
- Radio = React77__default.forwardRef(
3473
+ Radio = React78__default.forwardRef(
3463
3474
  ({
3464
3475
  label,
3465
3476
  helperText,
@@ -3476,12 +3487,12 @@ var init_Radio = __esm({
3476
3487
  onChange,
3477
3488
  ...props
3478
3489
  }, ref) => {
3479
- const reactId = React77__default.useId();
3490
+ const reactId = React78__default.useId();
3480
3491
  const baseId = id || `radio-${reactId}`;
3481
3492
  const hasError = !!error;
3482
3493
  const eventBus = useEventBus();
3483
- const [selected, setSelected] = React77__default.useState(value);
3484
- React77__default.useEffect(() => {
3494
+ const [selected, setSelected] = React78__default.useState(value);
3495
+ React78__default.useEffect(() => {
3485
3496
  if (value !== void 0) setSelected(value);
3486
3497
  }, [value]);
3487
3498
  const pick = (next, e) => {
@@ -3663,7 +3674,7 @@ var init_Switch = __esm({
3663
3674
  "components/core/atoms/Switch.tsx"() {
3664
3675
  "use client";
3665
3676
  init_cn();
3666
- Switch = React77.forwardRef(
3677
+ Switch = React78.forwardRef(
3667
3678
  ({
3668
3679
  checked,
3669
3680
  defaultChecked = false,
@@ -3674,10 +3685,10 @@ var init_Switch = __esm({
3674
3685
  name,
3675
3686
  className
3676
3687
  }, ref) => {
3677
- const [isChecked, setIsChecked] = React77.useState(
3688
+ const [isChecked, setIsChecked] = React78.useState(
3678
3689
  checked !== void 0 ? checked : defaultChecked
3679
3690
  );
3680
- React77.useEffect(() => {
3691
+ React78.useEffect(() => {
3681
3692
  if (checked !== void 0) {
3682
3693
  setIsChecked(checked);
3683
3694
  }
@@ -3840,7 +3851,7 @@ var init_Stack = __esm({
3840
3851
  };
3841
3852
  const isHorizontal = direction === "horizontal";
3842
3853
  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";
3843
- return React77__default.createElement(
3854
+ return React78__default.createElement(
3844
3855
  Component,
3845
3856
  {
3846
3857
  className: cn(
@@ -4129,7 +4140,7 @@ var init_Typography = __esm({
4129
4140
  if (format !== void 0 && format !== "none" && (typeof body === "string" || typeof body === "number" || body instanceof Date)) {
4130
4141
  body = formatValue(body, format);
4131
4142
  }
4132
- return React77__default.createElement(
4143
+ return React78__default.createElement(
4133
4144
  Component,
4134
4145
  {
4135
4146
  id,
@@ -4363,7 +4374,7 @@ var Dialog;
4363
4374
  var init_Dialog = __esm({
4364
4375
  "components/core/atoms/Dialog.tsx"() {
4365
4376
  init_cn();
4366
- Dialog = React77__default.forwardRef(
4377
+ Dialog = React78__default.forwardRef(
4367
4378
  ({
4368
4379
  role = "dialog",
4369
4380
  "aria-modal": ariaModal = true,
@@ -4389,7 +4400,7 @@ var Aside;
4389
4400
  var init_Aside = __esm({
4390
4401
  "components/core/atoms/Aside.tsx"() {
4391
4402
  init_cn();
4392
- Aside = React77__default.forwardRef(
4403
+ Aside = React78__default.forwardRef(
4393
4404
  ({ className, children, ...rest }, ref) => /* @__PURE__ */ jsx("aside", { ref, className: cn(className), ...rest, children })
4394
4405
  );
4395
4406
  Aside.displayName = "Aside";
@@ -4468,9 +4479,9 @@ var init_LawReferenceTooltip = __esm({
4468
4479
  className
4469
4480
  }) => {
4470
4481
  const { t } = useTranslate();
4471
- const [isVisible, setIsVisible] = React77__default.useState(false);
4472
- const timeoutRef = React77__default.useRef(null);
4473
- const triggerRef = React77__default.useRef(null);
4482
+ const [isVisible, setIsVisible] = React78__default.useState(false);
4483
+ const timeoutRef = React78__default.useRef(null);
4484
+ const triggerRef = React78__default.useRef(null);
4474
4485
  const handleMouseEnter = () => {
4475
4486
  if (timeoutRef.current) clearTimeout(timeoutRef.current);
4476
4487
  timeoutRef.current = setTimeout(() => setIsVisible(true), 200);
@@ -4481,7 +4492,7 @@ var init_LawReferenceTooltip = __esm({
4481
4492
  };
4482
4493
  const { revealed, triggerProps } = useTapReveal({ refs: [triggerRef] });
4483
4494
  const open = isVisible || revealed;
4484
- React77__default.useEffect(() => {
4495
+ React78__default.useEffect(() => {
4485
4496
  return () => {
4486
4497
  if (timeoutRef.current) clearTimeout(timeoutRef.current);
4487
4498
  };
@@ -4691,7 +4702,7 @@ var init_StatusDot = __esm({
4691
4702
  md: "w-2.5 h-2.5",
4692
4703
  lg: "w-3 h-3"
4693
4704
  };
4694
- StatusDot = React77__default.forwardRef(
4705
+ StatusDot = React78__default.forwardRef(
4695
4706
  ({ className, status = "offline", pulse = false, size = "md", label, ...props }, ref) => {
4696
4707
  return /* @__PURE__ */ jsx(
4697
4708
  "span",
@@ -4745,7 +4756,7 @@ var init_TrendIndicator = __esm({
4745
4756
  down: "trending-down",
4746
4757
  flat: "arrow-right"
4747
4758
  };
4748
- TrendIndicator = React77__default.forwardRef(
4759
+ TrendIndicator = React78__default.forwardRef(
4749
4760
  ({
4750
4761
  className,
4751
4762
  value,
@@ -4814,7 +4825,7 @@ var init_RangeSlider = __esm({
4814
4825
  md: "w-4 h-4",
4815
4826
  lg: "w-5 h-5"
4816
4827
  };
4817
- RangeSlider = React77__default.forwardRef(
4828
+ RangeSlider = React78__default.forwardRef(
4818
4829
  ({
4819
4830
  className,
4820
4831
  min = 0,
@@ -5471,7 +5482,7 @@ var init_ContentSection = __esm({
5471
5482
  md: "py-16",
5472
5483
  lg: "py-24"
5473
5484
  };
5474
- ContentSection = React77__default.forwardRef(
5485
+ ContentSection = React78__default.forwardRef(
5475
5486
  ({ children, background = "default", padding = "lg", id, className }, ref) => {
5476
5487
  return /* @__PURE__ */ jsx(
5477
5488
  Box,
@@ -6005,7 +6016,7 @@ var init_AnimatedReveal = __esm({
6005
6016
  "scale-up": { opacity: 1, transform: "scale(1) translateY(0)" },
6006
6017
  "none": {}
6007
6018
  };
6008
- AnimatedReveal = React77__default.forwardRef(
6019
+ AnimatedReveal = React78__default.forwardRef(
6009
6020
  ({
6010
6021
  trigger = "scroll",
6011
6022
  animation = "fade-up",
@@ -6165,7 +6176,7 @@ var init_AnimatedGraphic = __esm({
6165
6176
  "components/marketing/atoms/AnimatedGraphic.tsx"() {
6166
6177
  "use client";
6167
6178
  init_cn();
6168
- AnimatedGraphic = React77__default.forwardRef(
6179
+ AnimatedGraphic = React78__default.forwardRef(
6169
6180
  ({
6170
6181
  src,
6171
6182
  svgContent,
@@ -6188,7 +6199,7 @@ var init_AnimatedGraphic = __esm({
6188
6199
  const fetchedSvg = useFetchedSvg(svgContent ? void 0 : src);
6189
6200
  const resolvedSvg = svgContent ?? fetchedSvg;
6190
6201
  const prevAnimateRef = useRef(animate);
6191
- const setRef = React77__default.useCallback(
6202
+ const setRef = React78__default.useCallback(
6192
6203
  (node) => {
6193
6204
  containerRef.current = node;
6194
6205
  if (typeof ref === "function") ref(node);
@@ -6289,7 +6300,7 @@ function resolveMarkerExpression(expression, entity, config, state) {
6289
6300
  function isPlainObject(value) {
6290
6301
  if (value === null || value === void 0 || typeof value !== "object") return false;
6291
6302
  if (Array.isArray(value)) return false;
6292
- if (React77__default.isValidElement(value)) return false;
6303
+ if (React78__default.isValidElement(value)) return false;
6293
6304
  if (value instanceof Date) return false;
6294
6305
  if (typeof value === "function") return false;
6295
6306
  return true;
@@ -6298,7 +6309,7 @@ function isEvaluatorResolvedData(value) {
6298
6309
  return evaluatorResolvedData.has(value);
6299
6310
  }
6300
6311
  function brandResolved(value) {
6301
- if (value !== null && typeof value === "object" && !React77__default.isValidElement(value) && !(value instanceof Date)) {
6312
+ if (value !== null && typeof value === "object" && !React78__default.isValidElement(value) && !(value instanceof Date)) {
6302
6313
  resolvedMarkerFree.add(value);
6303
6314
  }
6304
6315
  }
@@ -6331,7 +6342,7 @@ function walkValue(value, scopeTrait, entity, config, state) {
6331
6342
  }
6332
6343
  const resolved = resolveMarkerExpression(value.expression, entity, config, state);
6333
6344
  markerResolutionCache.set(value, { entity, config, state, resolved });
6334
- if (resolved !== null && typeof resolved === "object" && !React77__default.isValidElement(resolved) && !(resolved instanceof Date)) {
6345
+ if (resolved !== null && typeof resolved === "object" && !React78__default.isValidElement(resolved) && !(resolved instanceof Date)) {
6335
6346
  resolvedMarkerFree.add(resolved);
6336
6347
  evaluatorResolvedData.add(resolved);
6337
6348
  }
@@ -6519,7 +6530,6 @@ var init_Modal = __esm({
6519
6530
  ),
6520
6531
  style: { backgroundColor: "rgba(0, 0, 0, 0.6)" },
6521
6532
  onClick: handleOverlayClick,
6522
- "aria-hidden": "true",
6523
6533
  children: /* @__PURE__ */ jsxs(
6524
6534
  Dialog,
6525
6535
  {
@@ -6713,7 +6723,7 @@ var init_Drawer = __esm({
6713
6723
  };
6714
6724
  const widthClass = width in sizeWidths ? sizeWidths[width] : "";
6715
6725
  const widthStyle = width in sizeWidths ? void 0 : { width };
6716
- const positionClasses = position === "right" ? "right-0 border-l" : "left-0 border-r";
6726
+ const positionClasses2 = position === "right" ? "right-0 border-l" : "left-0 border-r";
6717
6727
  const drawerSign = position === "right" ? 1 : -1;
6718
6728
  const slideTransform = position === "right" ? "translateX(100%)" : "translateX(-100%)";
6719
6729
  return /* @__PURE__ */ jsxs(Fragment, { children: [
@@ -6735,7 +6745,7 @@ var init_Drawer = __esm({
6735
6745
  className: cn(
6736
6746
  "fixed top-0 bottom-0 z-50",
6737
6747
  "flex flex-col max-h-screen",
6738
- positionClasses,
6748
+ positionClasses2,
6739
6749
  widthClass,
6740
6750
  drawerAnim,
6741
6751
  className
@@ -6989,7 +6999,7 @@ var init_ErrorBoundary = __esm({
6989
6999
  }
6990
7000
  );
6991
7001
  };
6992
- ErrorBoundary = class extends React77__default.Component {
7002
+ ErrorBoundary = class extends React78__default.Component {
6993
7003
  constructor(props) {
6994
7004
  super(props);
6995
7005
  __publicField(this, "reset", () => {
@@ -7272,7 +7282,7 @@ var init_Container = __esm({
7272
7282
  as: Component = "div"
7273
7283
  }) => {
7274
7284
  const resolvedSize = maxWidth ?? size ?? "lg";
7275
- return React77__default.createElement(
7285
+ return React78__default.createElement(
7276
7286
  Component,
7277
7287
  {
7278
7288
  className: cn(
@@ -8296,7 +8306,7 @@ var init_FloatingActionButton = __esm({
8296
8306
  document.addEventListener("mousedown", handleClickOutside);
8297
8307
  return () => document.removeEventListener("mousedown", handleClickOutside);
8298
8308
  }, [isExpanded, actions]);
8299
- const positionClasses = {
8309
+ const positionClasses2 = {
8300
8310
  "bottom-right": "bottom-6 right-6",
8301
8311
  "bottom-left": "bottom-6 left-6",
8302
8312
  "bottom-center": "bottom-6 left-1/2 -translate-x-1/2",
@@ -8305,7 +8315,7 @@ var init_FloatingActionButton = __esm({
8305
8315
  "top-center": "top-6 left-1/2 -translate-x-1/2"
8306
8316
  };
8307
8317
  if (resolvedAction && (!actions || actions.length === 0)) {
8308
- return /* @__PURE__ */ jsx(Box, { className: cn("fixed z-50", positionClasses[position], className), children: /* @__PURE__ */ jsx(
8318
+ return /* @__PURE__ */ jsx(Box, { className: cn("fixed z-50", positionClasses2[position], className), children: /* @__PURE__ */ jsx(
8309
8319
  Button,
8310
8320
  {
8311
8321
  variant: resolvedAction.variant || "primary",
@@ -8333,7 +8343,7 @@ var init_FloatingActionButton = __esm({
8333
8343
  ref: fabRef,
8334
8344
  className: cn(
8335
8345
  "fixed z-50 flex flex-col items-end gap-3",
8336
- positionClasses[position],
8346
+ positionClasses2[position],
8337
8347
  position.includes("left") && "items-start",
8338
8348
  className
8339
8349
  ),
@@ -9610,7 +9620,7 @@ function proceduralShapes(view, pos, fade, progress) {
9610
9620
  }
9611
9621
  }
9612
9622
  }
9613
- function expandFxItem(view, node, epochNowMs, dim) {
9623
+ function expandFxItem(view, node, epochNowMs, dim, projector, fontFamily) {
9614
9624
  if (view.space === "screen") return [];
9615
9625
  const tickMs = node.tickMs ?? DEFAULT_TICK_MS;
9616
9626
  const { ageMs, progress, fade } = fxLifecycle(view, epochNowMs, tickMs);
@@ -9646,24 +9656,27 @@ function expandFxItem(view, node, epochNowMs, dim) {
9646
9656
  out.push(...proceduralShapes(view, pos, fade, progress));
9647
9657
  }
9648
9658
  if (view.message) {
9659
+ const pxSize = projector && view.size !== void 0 ? Math.max(10, Math.round(view.size * projector.tileWidth)) : void 0;
9660
+ const family = fontFamily ?? "system-ui, sans-serif";
9649
9661
  const text = {
9650
9662
  type: "draw-text",
9651
9663
  text: view.message,
9652
9664
  position: pos,
9653
9665
  offsetY: -(0.15 + 0.55 * progress),
9654
9666
  color: view.color ?? node.textColor ?? DEFAULT_TEXT_COLOR,
9655
- opacity: fade
9667
+ opacity: fade,
9668
+ font: `bold ${pxSize ?? 14}px ${family}`
9656
9669
  };
9657
9670
  out.push(text);
9658
9671
  }
9659
9672
  return out;
9660
9673
  }
9661
- function expandFxLayer(node, epochNowMs, dim) {
9674
+ function expandFxLayer(node, epochNowMs, dim, projector, fontFamily) {
9662
9675
  if (!Array.isArray(node.items)) return [];
9663
9676
  const out = [];
9664
9677
  for (const item of node.items) {
9665
9678
  if (!item || typeof item.id !== "string") continue;
9666
- out.push(...expandFxItem(resolveFxView(item, node.presets), node, epochNowMs, dim));
9679
+ out.push(...expandFxItem(resolveFxView(item, node.presets), node, epochNowMs, dim, projector, fontFamily));
9667
9680
  }
9668
9681
  return out;
9669
9682
  }
@@ -9730,7 +9743,7 @@ function paintDrawable(painter, node, dctx) {
9730
9743
  break;
9731
9744
  case "draw-fx-layer": {
9732
9745
  const epochNow = dctx.time > 0 && typeof performance !== "undefined" ? performance.timeOrigin + dctx.time : 0;
9733
- for (const child of expandFxLayer(node, epochNow, "2d")) paintDrawable(painter, child, dctx);
9746
+ for (const child of expandFxLayer(node, epochNow, "2d", dctx.projector, dctx.fontFamily)) paintDrawable(painter, child, dctx);
9734
9747
  break;
9735
9748
  }
9736
9749
  }
@@ -10191,7 +10204,7 @@ var init_LearningCanvas = __esm({
10191
10204
  if (drawables?.length && projector) {
10192
10205
  const painter = createWebPainter(ctx, invalidateRef.current);
10193
10206
  const timeMs = needsAnim && typeof performance !== "undefined" ? performance.now() : 0;
10194
- const dctx = { projector, time: timeMs, invalidate: invalidateRef.current };
10207
+ const dctx = { projector, time: timeMs, invalidate: invalidateRef.current, fontFamily: themeBodyFont(canvas) };
10195
10208
  for (const node of drawables) {
10196
10209
  paintDrawable(painter, node, dctx);
10197
10210
  }
@@ -13050,9 +13063,11 @@ var init_Tabs = __esm({
13050
13063
  }
13051
13064
  };
13052
13065
  const handleKeyDown = (e, index) => {
13053
- if (e.key === "ArrowLeft" || e.key === "ArrowRight") {
13066
+ const prevKey = orientation === "vertical" ? "ArrowUp" : "ArrowLeft";
13067
+ const nextKey = orientation === "vertical" ? "ArrowDown" : "ArrowRight";
13068
+ if (e.key === prevKey || e.key === nextKey) {
13054
13069
  e.preventDefault();
13055
- const direction = e.key === "ArrowLeft" ? -1 : 1;
13070
+ const direction = e.key === prevKey ? -1 : 1;
13056
13071
  const nextIndex = (index + direction + safeItems.length) % safeItems.length;
13057
13072
  const nextTab = safeItems[nextIndex];
13058
13073
  if (nextTab && !nextTab.disabled) {
@@ -13627,7 +13642,7 @@ var init_CodeBlock = __esm({
13627
13642
  DIFF_STYLE_FALLBACK = { bg: "", prefix: " ", text: "text-foreground" };
13628
13643
  LINE_PROPS_FN = (n) => ({ "data-line": String(n - 1) });
13629
13644
  HIDDEN_LINE_NUMBERS = { display: "none" };
13630
- CodeBlock = React77__default.memo(
13645
+ CodeBlock = React78__default.memo(
13631
13646
  ({
13632
13647
  code: rawCode,
13633
13648
  language = "text",
@@ -14210,14 +14225,77 @@ var init_CodeBlock = __esm({
14210
14225
  CodeBlock.displayName = "CodeBlock";
14211
14226
  }
14212
14227
  });
14228
+ function loadMermaid() {
14229
+ mermaidModule ?? (mermaidModule = import('mermaid').then((m) => m.default));
14230
+ return mermaidModule;
14231
+ }
14232
+ var mermaidModule, MermaidDiagram;
14233
+ var init_MermaidDiagram = __esm({
14234
+ "components/core/molecules/markdown/MermaidDiagram.tsx"() {
14235
+ init_Box();
14236
+ init_Typography();
14237
+ init_CodeBlock();
14238
+ init_cn();
14239
+ mermaidModule = null;
14240
+ MermaidDiagram = React78__default.memo(
14241
+ ({ code, className }) => {
14242
+ const { resolvedMode } = useTheme();
14243
+ const containerRef = useRef(null);
14244
+ const [error, setError] = useState(null);
14245
+ const reactId = useId();
14246
+ useEffect(() => {
14247
+ let active = true;
14248
+ void (async () => {
14249
+ try {
14250
+ const mermaid = await loadMermaid();
14251
+ mermaid.initialize({
14252
+ startOnLoad: false,
14253
+ securityLevel: "strict",
14254
+ theme: resolvedMode === "dark" ? "dark" : "default"
14255
+ });
14256
+ const domId = `mermaid-${reactId.replace(/[^a-zA-Z0-9]/g, "")}`;
14257
+ const { svg } = await mermaid.render(domId, code);
14258
+ if (!active || !containerRef.current) return;
14259
+ containerRef.current.innerHTML = svg;
14260
+ setError(null);
14261
+ } catch (err) {
14262
+ if (active) setError(err instanceof Error ? err.message : String(err));
14263
+ }
14264
+ })();
14265
+ return () => {
14266
+ active = false;
14267
+ };
14268
+ }, [code, resolvedMode, reactId]);
14269
+ return /* @__PURE__ */ jsxs(Box, { className: cn("not-prose my-4", className), children: [
14270
+ error !== null && /* @__PURE__ */ jsxs(Box, { className: "space-y-2 mb-2", children: [
14271
+ /* @__PURE__ */ jsx(Typography, { variant: "caption", className: "text-error whitespace-pre-wrap", children: error }),
14272
+ /* @__PURE__ */ jsx(CodeBlock, { code, language: "mermaid" })
14273
+ ] }),
14274
+ /* @__PURE__ */ jsx(
14275
+ Box,
14276
+ {
14277
+ ref: containerRef,
14278
+ "data-testid": "mermaid-diagram",
14279
+ className: "overflow-x-auto",
14280
+ style: error !== null ? { display: "none" } : void 0
14281
+ }
14282
+ )
14283
+ ] });
14284
+ },
14285
+ (prev, next) => prev.code === next.code && prev.className === next.className
14286
+ );
14287
+ MermaidDiagram.displayName = "MermaidDiagram";
14288
+ }
14289
+ });
14213
14290
  var MarkdownContent;
14214
14291
  var init_MarkdownContent = __esm({
14215
14292
  "components/core/molecules/markdown/MarkdownContent.tsx"() {
14216
14293
  init_katex_min();
14217
14294
  init_Box();
14218
14295
  init_CodeBlock();
14296
+ init_MermaidDiagram();
14219
14297
  init_cn();
14220
- MarkdownContent = React77__default.memo(
14298
+ MarkdownContent = React78__default.memo(
14221
14299
  ({ content, direction = "ltr", className }) => {
14222
14300
  const { t: _t } = useTranslate();
14223
14301
  const safeContent = typeof content === "string" ? content : String(content ?? "");
@@ -14262,6 +14340,9 @@ var init_MarkdownContent = __esm({
14262
14340
  if (!inline) {
14263
14341
  const match = /language-(\w+)/.exec(codeClassName ?? "");
14264
14342
  const code = String(children).replace(/\n$/, "");
14343
+ if (match?.[1] === "mermaid") {
14344
+ return /* @__PURE__ */ jsx(MermaidDiagram, { code });
14345
+ }
14265
14346
  if (match) {
14266
14347
  return /* @__PURE__ */ jsx(
14267
14348
  CodeBlock,
@@ -15544,7 +15625,7 @@ var init_StateMachineView = __esm({
15544
15625
  style: { top: title ? 30 : 0 },
15545
15626
  children: [
15546
15627
  entity && /* @__PURE__ */ jsx(EntityBox, { entity, config }),
15547
- states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(React77__default.Fragment, { children: renderStateNode(state, config) }, state.id) : /* @__PURE__ */ jsx(
15628
+ states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(React78__default.Fragment, { children: renderStateNode(state, config) }, state.id) : /* @__PURE__ */ jsx(
15548
15629
  StateNode,
15549
15630
  {
15550
15631
  state,
@@ -18185,8 +18266,8 @@ function MiniMap({
18185
18266
  tileAssets,
18186
18267
  unitAssets
18187
18268
  }) {
18188
- const canvasRef = React77.useRef(null);
18189
- const imgCacheRef = React77.useRef(/* @__PURE__ */ new Map());
18269
+ const canvasRef = React78.useRef(null);
18270
+ const imgCacheRef = React78.useRef(/* @__PURE__ */ new Map());
18190
18271
  function loadImg(url) {
18191
18272
  const cached = imgCacheRef.current.get(url);
18192
18273
  if (cached) return cached.complete ? cached : null;
@@ -18202,7 +18283,7 @@ function MiniMap({
18202
18283
  imgCacheRef.current.set(url, img);
18203
18284
  return null;
18204
18285
  }
18205
- React77.useEffect(() => {
18286
+ React78.useEffect(() => {
18206
18287
  const canvas = canvasRef.current;
18207
18288
  if (!canvas) return;
18208
18289
  const ctx = canvas.getContext("2d");
@@ -18783,7 +18864,7 @@ function Canvas2D({
18783
18864
  const registerChildDrawable = useCallback((node) => {
18784
18865
  childDrawablesRef.current.push(node);
18785
18866
  }, []);
18786
- const hasJsxChildren = React77.Children.count(children) > 0;
18867
+ const hasJsxChildren = React78.Children.count(children) > 0;
18787
18868
  function isDrawableLayer(node) {
18788
18869
  return node.type === "draw-sprite-layer" || node.type === "draw-shape-layer" || node.type === "draw-text-layer";
18789
18870
  }
@@ -19341,7 +19422,7 @@ function Canvas({
19341
19422
  if (mode !== "3d") return;
19342
19423
  const next = childDrawablesRef.current;
19343
19424
  canvasLog.debug("children:adopt", { registered: next.length, adopted: childDrawables.length });
19344
- if (next.length === 0 && React77.Children.count(children) > 0) return;
19425
+ if (next.length === 0 && React78.Children.count(children) > 0) return;
19345
19426
  setChildDrawables(
19346
19427
  (prev) => prev.length === next.length && JSON.stringify(prev) === JSON.stringify(next) ? prev : [...next]
19347
19428
  );
@@ -19379,7 +19460,7 @@ function Canvas({
19379
19460
  };
19380
19461
  return /* @__PURE__ */ jsxs(Fragment, { children: [
19381
19462
  /* @__PURE__ */ jsx(Suspense, { fallback: null, children: /* @__PURE__ */ jsx(Canvas3DHost2, { ...props3d }) }),
19382
- React77.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 }) })
19463
+ React78.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 }) })
19383
19464
  ] });
19384
19465
  }
19385
19466
  return /* @__PURE__ */ jsx(
@@ -21974,9 +22055,9 @@ function ControlButton({
21974
22055
  className
21975
22056
  }) {
21976
22057
  const eventBus = useEventBus();
21977
- const [isPressed, setIsPressed] = React77.useState(false);
22058
+ const [isPressed, setIsPressed] = React78.useState(false);
21978
22059
  const actualPressed = pressed ?? isPressed;
21979
- const handlePointerDown = React77.useCallback(
22060
+ const handlePointerDown = React78.useCallback(
21980
22061
  (e) => {
21981
22062
  e.preventDefault();
21982
22063
  if (disabled) return;
@@ -21986,7 +22067,7 @@ function ControlButton({
21986
22067
  },
21987
22068
  [disabled, pressEvent, eventBus, onPress]
21988
22069
  );
21989
- const handlePointerUp = React77.useCallback(
22070
+ const handlePointerUp = React78.useCallback(
21990
22071
  (e) => {
21991
22072
  e.preventDefault();
21992
22073
  if (disabled) return;
@@ -21996,7 +22077,7 @@ function ControlButton({
21996
22077
  },
21997
22078
  [disabled, releaseEvent, eventBus, onRelease]
21998
22079
  );
21999
- const handlePointerLeave = React77.useCallback(
22080
+ const handlePointerLeave = React78.useCallback(
22000
22081
  (e) => {
22001
22082
  if (isPressed) {
22002
22083
  setIsPressed(false);
@@ -22085,18 +22166,18 @@ function ControlGrid({
22085
22166
  className
22086
22167
  }) {
22087
22168
  const eventBus = useEventBus();
22088
- const [active, setActive] = React77.useState(/* @__PURE__ */ new Set());
22089
- const [coarse, setCoarse] = React77.useState(
22169
+ const [active, setActive] = React78.useState(/* @__PURE__ */ new Set());
22170
+ const [coarse, setCoarse] = React78.useState(
22090
22171
  () => typeof window !== "undefined" && window.matchMedia("(pointer: coarse)").matches
22091
22172
  );
22092
- React77.useEffect(() => {
22173
+ React78.useEffect(() => {
22093
22174
  if (visibility !== "auto" || typeof window === "undefined") return;
22094
22175
  const mq = window.matchMedia("(pointer: coarse)");
22095
22176
  const onChange = (e) => setCoarse(e.matches);
22096
22177
  mq.addEventListener("change", onChange);
22097
22178
  return () => mq.removeEventListener("change", onChange);
22098
22179
  }, [visibility]);
22099
- const handlePress = React77.useCallback(
22180
+ const handlePress = React78.useCallback(
22100
22181
  (id) => {
22101
22182
  setActive((prev) => new Set(prev).add(id));
22102
22183
  if (actionEvent) eventBus.emit(`UI:${actionEvent}`, { id, pressed: true });
@@ -22110,7 +22191,7 @@ function ControlGrid({
22110
22191
  },
22111
22192
  [kind, actionEvent, directionEvent, directionEvents, eventBus, onAction, onDirection]
22112
22193
  );
22113
- const handleRelease = React77.useCallback(
22194
+ const handleRelease = React78.useCallback(
22114
22195
  (id) => {
22115
22196
  setActive((prev) => {
22116
22197
  const next = new Set(prev);
@@ -23366,7 +23447,7 @@ var init_Menu = __esm({
23366
23447
  "bottom-end": "bottom-start"
23367
23448
  };
23368
23449
  const effectivePosition = direction === "rtl" ? rtlMirror[position] ?? position : position;
23369
- const triggerElement = React77__default.isValidElement(trigger) ? React77__default.cloneElement(trigger, {
23450
+ const triggerElement = React78__default.isValidElement(trigger) ? React78__default.cloneElement(trigger, {
23370
23451
  ref: triggerRef,
23371
23452
  onClick: handleToggle
23372
23453
  }) : /* @__PURE__ */ jsx(
@@ -23469,14 +23550,14 @@ function useDataDnd(args) {
23469
23550
  const isZone = Boolean(dragGroup || accepts || sortable);
23470
23551
  const enabled = isZone || Boolean(dndRoot);
23471
23552
  const eventBus = useEventBus();
23472
- const parentRoot = React77__default.useContext(RootCtx);
23553
+ const parentRoot = React78__default.useContext(RootCtx);
23473
23554
  const isRoot = enabled && parentRoot === null;
23474
- const zoneId = React77__default.useId();
23555
+ const zoneId = React78__default.useId();
23475
23556
  const ownGroup = dragGroup ?? accepts ?? zoneId;
23476
- const [optimisticOrders, setOptimisticOrders] = React77__default.useState(() => /* @__PURE__ */ new Map());
23477
- const optimisticOrdersRef = React77__default.useRef(optimisticOrders);
23557
+ const [optimisticOrders, setOptimisticOrders] = React78__default.useState(() => /* @__PURE__ */ new Map());
23558
+ const optimisticOrdersRef = React78__default.useRef(optimisticOrders);
23478
23559
  optimisticOrdersRef.current = optimisticOrders;
23479
- const clearOptimisticOrder = React77__default.useCallback((group) => {
23560
+ const clearOptimisticOrder = React78__default.useCallback((group) => {
23480
23561
  setOptimisticOrders((prev) => {
23481
23562
  if (!prev.has(group)) return prev;
23482
23563
  const next = new Map(prev);
@@ -23501,7 +23582,7 @@ function useDataDnd(args) {
23501
23582
  const raw = it[dndItemIdField];
23502
23583
  return raw != null ? String(raw) : `__idx_${idx}`;
23503
23584
  }).join("|");
23504
- const itemIds = React77__default.useMemo(
23585
+ const itemIds = React78__default.useMemo(
23505
23586
  () => orderedItems.map((it, idx) => {
23506
23587
  const raw = it[dndItemIdField];
23507
23588
  return raw != null ? String(raw) : `__idx_${idx}`;
@@ -23512,7 +23593,7 @@ function useDataDnd(args) {
23512
23593
  const raw = it[dndItemIdField];
23513
23594
  return raw != null ? String(raw) : `__${idx}`;
23514
23595
  }).join("|");
23515
- React77__default.useEffect(() => {
23596
+ React78__default.useEffect(() => {
23516
23597
  const root = isRoot ? null : parentRoot;
23517
23598
  if (root) {
23518
23599
  root.clearOptimisticOrder(ownGroup);
@@ -23520,20 +23601,20 @@ function useDataDnd(args) {
23520
23601
  clearOptimisticOrder(ownGroup);
23521
23602
  }
23522
23603
  }, [itemsContentSig, ownGroup]);
23523
- const zonesRef = React77__default.useRef(/* @__PURE__ */ new Map());
23524
- const registerZone = React77__default.useCallback((zoneId2, meta2) => {
23604
+ const zonesRef = React78__default.useRef(/* @__PURE__ */ new Map());
23605
+ const registerZone = React78__default.useCallback((zoneId2, meta2) => {
23525
23606
  zonesRef.current.set(zoneId2, meta2);
23526
23607
  }, []);
23527
- const unregisterZone = React77__default.useCallback((zoneId2) => {
23608
+ const unregisterZone = React78__default.useCallback((zoneId2) => {
23528
23609
  zonesRef.current.delete(zoneId2);
23529
23610
  }, []);
23530
- const [activeDrag, setActiveDrag] = React77__default.useState(null);
23531
- const [overZoneGroup, setOverZoneGroup] = React77__default.useState(null);
23532
- const meta = React77__default.useMemo(
23611
+ const [activeDrag, setActiveDrag] = React78__default.useState(null);
23612
+ const [overZoneGroup, setOverZoneGroup] = React78__default.useState(null);
23613
+ const meta = React78__default.useMemo(
23533
23614
  () => ({ group: ownGroup, dropEvent, reorderEvent, positionEvent, itemIds, rawItems: items, idField: dndItemIdField }),
23534
23615
  [ownGroup, dropEvent, reorderEvent, positionEvent, itemIds, items, dndItemIdField]
23535
23616
  );
23536
- React77__default.useEffect(() => {
23617
+ React78__default.useEffect(() => {
23537
23618
  const target = isRoot ? null : parentRoot;
23538
23619
  if (!target) {
23539
23620
  zonesRef.current.set(zoneId, meta);
@@ -23552,7 +23633,7 @@ function useDataDnd(args) {
23552
23633
  }, [parentRoot, isRoot, zoneId, meta]);
23553
23634
  const sensors = useAlmadarDndSensors(true);
23554
23635
  const collisionDetection = almadarDndCollisionDetection;
23555
- const findZoneByItem = React77__default.useCallback(
23636
+ const findZoneByItem = React78__default.useCallback(
23556
23637
  (id) => {
23557
23638
  for (const z of zonesRef.current.values()) {
23558
23639
  if (z.itemIds.includes(id)) return z;
@@ -23561,7 +23642,7 @@ function useDataDnd(args) {
23561
23642
  },
23562
23643
  []
23563
23644
  );
23564
- React77__default.useCallback(
23645
+ React78__default.useCallback(
23565
23646
  (group) => {
23566
23647
  for (const z of zonesRef.current.values()) {
23567
23648
  if (z.group === group) return z;
@@ -23570,7 +23651,7 @@ function useDataDnd(args) {
23570
23651
  },
23571
23652
  []
23572
23653
  );
23573
- const handleDragEnd = React77__default.useCallback(
23654
+ const handleDragEnd = React78__default.useCallback(
23574
23655
  (event) => {
23575
23656
  const { active, over } = event;
23576
23657
  const activeIdStr = String(active.id);
@@ -23661,8 +23742,8 @@ function useDataDnd(args) {
23661
23742
  },
23662
23743
  [eventBus]
23663
23744
  );
23664
- const sortableData = React77__default.useMemo(() => ({ dndGroup: ownGroup }), [ownGroup]);
23665
- const SortableItem = React77__default.useCallback(
23745
+ const sortableData = React78__default.useMemo(() => ({ dndGroup: ownGroup }), [ownGroup]);
23746
+ const SortableItem = React78__default.useCallback(
23666
23747
  ({ id, children }) => {
23667
23748
  const {
23668
23749
  attributes,
@@ -23702,7 +23783,7 @@ function useDataDnd(args) {
23702
23783
  id: droppableId,
23703
23784
  data: sortableData
23704
23785
  });
23705
- const ctx = React77__default.useContext(RootCtx);
23786
+ const ctx = React78__default.useContext(RootCtx);
23706
23787
  const activeDrag2 = ctx?.activeDrag ?? null;
23707
23788
  const overZoneGroup2 = ctx?.overZoneGroup ?? null;
23708
23789
  const isThisZoneOver = overZoneGroup2 === ownGroup;
@@ -23717,7 +23798,7 @@ function useDataDnd(args) {
23717
23798
  showForeignPlaceholder,
23718
23799
  ctxAvailable: ctx != null
23719
23800
  });
23720
- React77__default.useEffect(() => {
23801
+ React78__default.useEffect(() => {
23721
23802
  dndLog.info("dropzone:isOver:change", { droppableId, group: ownGroup, isOver, isThisZoneOver, showForeignPlaceholder, activeDragSourceGroup: activeDrag2?.sourceGroup ?? null });
23722
23803
  }, [droppableId, isOver, isThisZoneOver, showForeignPlaceholder]);
23723
23804
  return /* @__PURE__ */ jsx(
@@ -23731,11 +23812,11 @@ function useDataDnd(args) {
23731
23812
  }
23732
23813
  );
23733
23814
  };
23734
- const rootContextValue = React77__default.useMemo(
23815
+ const rootContextValue = React78__default.useMemo(
23735
23816
  () => ({ registerZone, unregisterZone, activeDrag, overZoneGroup, optimisticOrders, clearOptimisticOrder }),
23736
23817
  [registerZone, unregisterZone, activeDrag, overZoneGroup, optimisticOrders, clearOptimisticOrder]
23737
23818
  );
23738
- const handleDragStart = React77__default.useCallback((event) => {
23819
+ const handleDragStart = React78__default.useCallback((event) => {
23739
23820
  const sourceZone = findZoneByItem(event.active.id);
23740
23821
  const rect = event.active.rect.current.initial;
23741
23822
  const height = rect?.height && rect.height > 0 ? rect.height : 64;
@@ -23754,7 +23835,7 @@ function useDataDnd(args) {
23754
23835
  isRoot
23755
23836
  });
23756
23837
  }, [findZoneByItem, isRoot, zoneId]);
23757
- const handleDragOver = React77__default.useCallback((event) => {
23838
+ const handleDragOver = React78__default.useCallback((event) => {
23758
23839
  const { active, over } = event;
23759
23840
  const overData = over?.data?.current;
23760
23841
  const overGroup = overData?.dndGroup ?? null;
@@ -23824,7 +23905,7 @@ function useDataDnd(args) {
23824
23905
  return next;
23825
23906
  });
23826
23907
  }, []);
23827
- const handleDragCancel = React77__default.useCallback((event) => {
23908
+ const handleDragCancel = React78__default.useCallback((event) => {
23828
23909
  setActiveDrag(null);
23829
23910
  setOverZoneGroup(null);
23830
23911
  dndLog.warn("dragCancel", {
@@ -23832,12 +23913,12 @@ function useDataDnd(args) {
23832
23913
  reason: "dnd-kit cancelled the drag (escape key, pointer interrupted, or external)"
23833
23914
  });
23834
23915
  }, []);
23835
- const handleDragEndWithCleanup = React77__default.useCallback((event) => {
23916
+ const handleDragEndWithCleanup = React78__default.useCallback((event) => {
23836
23917
  handleDragEnd(event);
23837
23918
  setActiveDrag(null);
23838
23919
  setOverZoneGroup(null);
23839
23920
  }, [handleDragEnd]);
23840
- const wrapContainer = React77__default.useCallback(
23921
+ const wrapContainer = React78__default.useCallback(
23841
23922
  (children) => {
23842
23923
  if (!enabled) return children;
23843
23924
  const strategy = layout === "grid" ? rectSortingStrategy : verticalListSortingStrategy;
@@ -23891,7 +23972,7 @@ var init_useDataDnd = __esm({
23891
23972
  init_useAlmadarDndCollision();
23892
23973
  init_Box();
23893
23974
  dndLog = createLogger("almadar:ui:dnd");
23894
- RootCtx = React77__default.createContext(null);
23975
+ RootCtx = React78__default.createContext(null);
23895
23976
  }
23896
23977
  });
23897
23978
  function renderIconInput(icon, props) {
@@ -24406,7 +24487,7 @@ function DataList({
24406
24487
  }) {
24407
24488
  const eventBus = useEventBus();
24408
24489
  const { t } = useTranslate();
24409
- const [visibleCount, setVisibleCount] = React77__default.useState(pageSize || Infinity);
24490
+ const [visibleCount, setVisibleCount] = React78__default.useState(pageSize || Infinity);
24410
24491
  const fieldDefs = fields ?? columns ?? [];
24411
24492
  const allDataRaw = Array.isArray(entity) ? entity : entity ? [entity] : [];
24412
24493
  const dnd = useDataDnd({
@@ -24422,14 +24503,14 @@ function DataList({
24422
24503
  dndRoot
24423
24504
  });
24424
24505
  const orderedData = dnd.orderedItems;
24425
- const allData = React77__default.useMemo(
24506
+ const allData = React78__default.useMemo(
24426
24507
  () => sortRows(orderedData, sortBy, sortDirection),
24427
24508
  [orderedData, sortBy, sortDirection]
24428
24509
  );
24429
24510
  const data = pageSize > 0 ? allData.slice(0, visibleCount) : allData;
24430
24511
  const hasMoreLocal = pageSize > 0 && visibleCount < allData.length;
24431
24512
  const hasRenderProp = typeof children === "function";
24432
- React77__default.useEffect(() => {
24513
+ React78__default.useEffect(() => {
24433
24514
  const renderItemTypeOf = typeof schemaRenderItem;
24434
24515
  const childrenTypeOf = typeof children;
24435
24516
  if (data.length > 0 && !hasRenderProp) {
@@ -24549,7 +24630,7 @@ function DataList({
24549
24630
  return v === void 0 || v === null || v === "" ? raw : String(v);
24550
24631
  };
24551
24632
  return /* @__PURE__ */ jsxs(VStack, { gap: "sm", className: cn("py-2", className), children: [
24552
- groups2.map((group, gi) => /* @__PURE__ */ jsxs(React77__default.Fragment, { children: [
24633
+ groups2.map((group, gi) => /* @__PURE__ */ jsxs(React78__default.Fragment, { children: [
24553
24634
  group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: "my-2" }),
24554
24635
  group.items.map((itemData, index) => {
24555
24636
  const id = itemData.id || `${gi}-${index}`;
@@ -24765,7 +24846,7 @@ function DataList({
24765
24846
  className
24766
24847
  ),
24767
24848
  children: [
24768
- groups.map((group, gi) => /* @__PURE__ */ jsxs(React77__default.Fragment, { children: [
24849
+ groups.map((group, gi) => /* @__PURE__ */ jsxs(React78__default.Fragment, { children: [
24769
24850
  group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-4" : "mt-0" }),
24770
24851
  group.items.map(
24771
24852
  (itemData, index) => renderItem(itemData, index, gi === groups.length - 1 && index === group.items.length - 1)
@@ -24874,8 +24955,8 @@ function ScalarControl({
24874
24955
  }
24875
24956
  const numeric = typeof value === "number";
24876
24957
  const initial = value === null ? "" : String(value);
24877
- const [draft, setDraft] = React77__default.useState(initial);
24878
- React77__default.useEffect(() => setDraft(initial), [initial]);
24958
+ const [draft, setDraft] = React78__default.useState(initial);
24959
+ React78__default.useEffect(() => setDraft(initial), [initial]);
24879
24960
  const commit = () => {
24880
24961
  if (numeric) {
24881
24962
  const n = draft.trim() === "" ? 0 : Number(draft);
@@ -24943,8 +25024,8 @@ function Row({
24943
25024
  onRemove,
24944
25025
  readonly
24945
25026
  }) {
24946
- const [keyDraft, setKeyDraft] = React77__default.useState(rowKey);
24947
- React77__default.useEffect(() => setKeyDraft(rowKey), [rowKey]);
25027
+ const [keyDraft, setKeyDraft] = React78__default.useState(rowKey);
25028
+ React78__default.useEffect(() => setKeyDraft(rowKey), [rowKey]);
24948
25029
  const container = isObj(value) || isArr(value);
24949
25030
  return /* @__PURE__ */ jsxs(VStack, { gap: "none", className: "group w-max min-w-full", children: [
24950
25031
  /* @__PURE__ */ jsxs(HStack, { gap: "xs", align: "center", className: "py-0.5 w-max", children: [
@@ -24987,7 +25068,7 @@ function ContainerNode({
24987
25068
  depth,
24988
25069
  readonly
24989
25070
  }) {
24990
- const [open, setOpen] = React77__default.useState(depth < 2);
25071
+ const [open, setOpen] = React78__default.useState(depth < 2);
24991
25072
  const array = isArr(value);
24992
25073
  const entries = array ? value.map((v, i) => [String(i), v]) : Object.entries(value);
24993
25074
  const setObjValue = (key, next) => {
@@ -25129,7 +25210,7 @@ var init_FormSection = __esm({
25129
25210
  columns = 1,
25130
25211
  className
25131
25212
  }) => {
25132
- const [collapsed, setCollapsed] = React77__default.useState(defaultCollapsed);
25213
+ const [collapsed, setCollapsed] = React78__default.useState(defaultCollapsed);
25133
25214
  const { t } = useTranslate();
25134
25215
  const eventBus = useEventBus();
25135
25216
  const gridClass = {
@@ -25137,7 +25218,7 @@ var init_FormSection = __esm({
25137
25218
  2: "grid-cols-1 md:grid-cols-2",
25138
25219
  3: "grid-cols-1 md:grid-cols-2 lg:grid-cols-3"
25139
25220
  }[columns];
25140
- React77__default.useCallback(() => {
25221
+ React78__default.useCallback(() => {
25141
25222
  if (collapsible) {
25142
25223
  setCollapsed((prev) => !prev);
25143
25224
  eventBus.emit("UI:TOGGLE_COLLAPSE", { collapsed: !collapsed });
@@ -25546,8 +25627,8 @@ function TextLikeControl({
25546
25627
  onCommit
25547
25628
  }) {
25548
25629
  const initial = value === void 0 || value === null ? "" : String(value);
25549
- const [draft, setDraft] = React77__default.useState(initial);
25550
- React77__default.useEffect(() => setDraft(initial), [initial]);
25630
+ const [draft, setDraft] = React78__default.useState(initial);
25631
+ React78__default.useEffect(() => setDraft(initial), [initial]);
25551
25632
  const commit = () => {
25552
25633
  if (numeric) {
25553
25634
  const n = draft.trim() === "" ? 0 : Number(draft);
@@ -25736,14 +25817,14 @@ var init_NodeSlotEditor = __esm({
25736
25817
  isObj2 = (v) => v !== null && v !== void 0 && typeof v === "object" && !Array.isArray(v);
25737
25818
  NodeSlotEditor = ({ value, onChange, className }) => {
25738
25819
  const { type, props, wasArray } = normalize(value);
25739
- const patterns = React77__default.useMemo(() => {
25820
+ const patterns = React78__default.useMemo(() => {
25740
25821
  try {
25741
25822
  return [...getKnownPatterns()].sort();
25742
25823
  } catch {
25743
25824
  return [];
25744
25825
  }
25745
25826
  }, []);
25746
- const options = React77__default.useMemo(
25827
+ const options = React78__default.useMemo(
25747
25828
  () => [{ value: "", label: "\u2014 none \u2014" }, ...patterns.map((p) => ({ value: p, label: p }))],
25748
25829
  [patterns]
25749
25830
  );
@@ -25755,7 +25836,7 @@ var init_NodeSlotEditor = __esm({
25755
25836
  const pattern = { type: nextType, ...nextProps };
25756
25837
  onChange(wasArray || value === void 0 ? [pattern] : pattern);
25757
25838
  };
25758
- const schemaEntries = React77__default.useMemo(() => {
25839
+ const schemaEntries = React78__default.useMemo(() => {
25759
25840
  if (!type) return [];
25760
25841
  const def = getPatternDefinition(type);
25761
25842
  if (!def?.propsSchema) return [];
@@ -25796,6 +25877,112 @@ var init_NodeSlotEditor = __esm({
25796
25877
  };
25797
25878
  }
25798
25879
  });
25880
+ function useDraggable({ payload, disabled = false }) {
25881
+ const [isDragging, setIsDragging] = useState(false);
25882
+ const eventBus = useEventBus();
25883
+ const handleDragStart = useCallback(
25884
+ (e) => {
25885
+ if (disabled) {
25886
+ e.preventDefault();
25887
+ return;
25888
+ }
25889
+ e.dataTransfer.setData(ALMADAR_DND_MIME, JSON.stringify(payload));
25890
+ e.dataTransfer.effectAllowed = "copy";
25891
+ setIsDragging(true);
25892
+ eventBus.emit("UI:DRAG_START", { kind: payload.kind, data: payload.data });
25893
+ },
25894
+ [disabled, payload, eventBus]
25895
+ );
25896
+ const handleDragEnd = useCallback(
25897
+ (e) => {
25898
+ setIsDragging(false);
25899
+ eventBus.emit("UI:DRAG_END", { kind: payload.kind, data: payload.data });
25900
+ },
25901
+ [payload, eventBus]
25902
+ );
25903
+ const dragProps = useMemo(
25904
+ () => ({
25905
+ draggable: !disabled,
25906
+ onDragStart: handleDragStart,
25907
+ onDragEnd: handleDragEnd,
25908
+ "aria-grabbed": isDragging
25909
+ }),
25910
+ [disabled, handleDragStart, handleDragEnd, isDragging]
25911
+ );
25912
+ return { dragProps, isDragging };
25913
+ }
25914
+ var ALMADAR_DND_MIME;
25915
+ var init_useDraggable = __esm({
25916
+ "hooks/useDraggable.ts"() {
25917
+ "use client";
25918
+ init_useEventBus();
25919
+ ALMADAR_DND_MIME = "application/x-almadar-dnd";
25920
+ }
25921
+ });
25922
+ function parsePayload(e) {
25923
+ try {
25924
+ const raw = e.dataTransfer.getData(ALMADAR_DND_MIME);
25925
+ if (!raw) return null;
25926
+ const parsed = JSON.parse(raw);
25927
+ if (typeof parsed.kind !== "string" || !parsed.data) return null;
25928
+ return parsed;
25929
+ } catch {
25930
+ return null;
25931
+ }
25932
+ }
25933
+ function hasAlmadarPayload(e) {
25934
+ return e.dataTransfer.types.includes(ALMADAR_DND_MIME);
25935
+ }
25936
+ function useDropZone({ accepts, onDrop, disabled = false }) {
25937
+ const [isOver, setIsOver] = useState(false);
25938
+ const eventBus = useEventBus();
25939
+ const handleDragOver = useCallback(
25940
+ (e) => {
25941
+ if (disabled) return;
25942
+ if (!hasAlmadarPayload(e)) return;
25943
+ e.preventDefault();
25944
+ e.dataTransfer.dropEffect = "copy";
25945
+ setIsOver(true);
25946
+ },
25947
+ [disabled]
25948
+ );
25949
+ const handleDragLeave = useCallback(
25950
+ (e) => {
25951
+ setIsOver(false);
25952
+ },
25953
+ []
25954
+ );
25955
+ const handleDrop = useCallback(
25956
+ (e) => {
25957
+ e.preventDefault();
25958
+ setIsOver(false);
25959
+ if (disabled) return;
25960
+ const payload = parsePayload(e);
25961
+ if (!payload) return;
25962
+ if (!accepts.includes(payload.kind)) return;
25963
+ const position = { x: e.clientX, y: e.clientY };
25964
+ onDrop(payload, position);
25965
+ eventBus.emit("UI:DROP", { kind: payload.kind, data: payload.data, ...position });
25966
+ },
25967
+ [disabled, accepts, onDrop, eventBus]
25968
+ );
25969
+ const dropProps = useMemo(
25970
+ () => ({
25971
+ onDragOver: handleDragOver,
25972
+ onDragLeave: handleDragLeave,
25973
+ onDrop: handleDrop
25974
+ }),
25975
+ [handleDragOver, handleDragLeave, handleDrop]
25976
+ );
25977
+ return { dropProps, isOver };
25978
+ }
25979
+ var init_useDropZone = __esm({
25980
+ "hooks/useDropZone.ts"() {
25981
+ "use client";
25982
+ init_useEventBus();
25983
+ init_useDraggable();
25984
+ }
25985
+ });
25799
25986
  function fileIcon(name) {
25800
25987
  const ext = name.split(".").pop()?.toLowerCase() ?? "";
25801
25988
  switch (ext) {
@@ -25821,6 +26008,13 @@ function fileIcon(name) {
25821
26008
  return "file";
25822
26009
  }
25823
26010
  }
26011
+ function siblingsOf(target, roots, childrenByParent) {
26012
+ if (target.parentId) {
26013
+ const parentSiblings = childrenByParent.get(target.parentId);
26014
+ if (parentSiblings?.some((sibling) => sibling.id === target.id)) return parentSiblings;
26015
+ }
26016
+ return roots;
26017
+ }
25824
26018
  function ancestorsOf(id, byId) {
25825
26019
  const out = /* @__PURE__ */ new Set();
25826
26020
  if (!id) return out;
@@ -25838,6 +26032,8 @@ var init_FileTree = __esm({
25838
26032
  init_Box();
25839
26033
  init_Typography();
25840
26034
  init_Icon();
26035
+ init_useDraggable();
26036
+ init_useDropZone();
25841
26037
  TreeNodeItem = ({
25842
26038
  node,
25843
26039
  depth,
@@ -25921,10 +26117,12 @@ var init_FileTree = __esm({
25921
26117
  depth,
25922
26118
  indent,
25923
26119
  childrenByParent,
26120
+ roots,
25924
26121
  onNodeSelect,
25925
26122
  onNodeAction,
25926
26123
  nodeActionIcon,
25927
26124
  nodeActionLabel,
26125
+ onNodeReorder,
25928
26126
  selectedId,
25929
26127
  look,
25930
26128
  isExpanded,
@@ -25935,6 +26133,7 @@ var init_FileTree = __esm({
25935
26133
  const expanded = hasChildren && isExpanded(item.id, depth);
25936
26134
  const isSelected = selectedId !== void 0 && selectedId !== "" && item.id === selectedId;
25937
26135
  const nav = look === "nav";
26136
+ const rowRef = useRef(null);
25938
26137
  const handleClick = useCallback(() => {
25939
26138
  if (hasChildren && !onNodeSelect) onToggle(item.id, expanded);
25940
26139
  onNodeSelect?.(item.id);
@@ -25947,16 +26146,50 @@ var init_FileTree = __esm({
25947
26146
  e.stopPropagation();
25948
26147
  onNodeAction?.(item.id);
25949
26148
  }, [item.id, onNodeAction]);
26149
+ const { dragProps } = useDraggable({
26150
+ payload: { kind: "tree-node", data: { id: item.id } },
26151
+ disabled: !onNodeReorder
26152
+ });
26153
+ const handleRowDrop = useCallback(
26154
+ (payload, position) => {
26155
+ if (!onNodeReorder) return;
26156
+ const draggedId = typeof payload.data.id === "string" ? payload.data.id : void 0;
26157
+ if (!draggedId || draggedId === item.id) return;
26158
+ const rect = rowRef.current?.getBoundingClientRect();
26159
+ if (!rect || rect.height === 0) return;
26160
+ const relY = position.y - rect.top;
26161
+ const third = rect.height / 3;
26162
+ if (relY >= third && relY <= third * 2) {
26163
+ const existingChildren = childrenByParent.get(item.id);
26164
+ onNodeReorder(draggedId, item.id, existingChildren ? existingChildren.length : 0);
26165
+ return;
26166
+ }
26167
+ const siblings = siblingsOf(item, roots, childrenByParent);
26168
+ const newParentId = siblings === roots ? null : item.parentId ?? null;
26169
+ const targetIndex = siblings.findIndex((sibling) => sibling.id === item.id);
26170
+ const index = relY < third ? targetIndex < 0 ? 0 : targetIndex : targetIndex < 0 ? siblings.length : targetIndex + 1;
26171
+ onNodeReorder(draggedId, newParentId, index);
26172
+ },
26173
+ [onNodeReorder, item, roots, childrenByParent]
26174
+ );
26175
+ const { dropProps } = useDropZone({
26176
+ accepts: ["tree-node"],
26177
+ onDrop: handleRowDrop,
26178
+ disabled: !onNodeReorder
26179
+ });
25950
26180
  return /* @__PURE__ */ jsxs(Fragment, { children: [
25951
26181
  /* @__PURE__ */ jsxs(
25952
26182
  Box,
25953
26183
  {
26184
+ ref: rowRef,
25954
26185
  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"}`,
25955
26186
  style: { paddingLeft: depth * indent + 8 },
25956
26187
  onClick: handleClick,
25957
26188
  role: "treeitem",
25958
26189
  "aria-selected": isSelected,
25959
26190
  "aria-expanded": hasChildren ? expanded : void 0,
26191
+ ...dragProps,
26192
+ ...dropProps,
25960
26193
  children: [
25961
26194
  hasChildren ? /* @__PURE__ */ jsx(Box, { onClick: handleChevron, className: "flex items-center flex-shrink-0", role: "button", "aria-label": expanded ? "Collapse" : "Expand", children: /* @__PURE__ */ jsx(
25962
26195
  Icon,
@@ -26003,10 +26236,12 @@ var init_FileTree = __esm({
26003
26236
  depth: depth + 1,
26004
26237
  indent,
26005
26238
  childrenByParent,
26239
+ roots,
26006
26240
  onNodeSelect,
26007
26241
  onNodeAction,
26008
26242
  nodeActionIcon,
26009
26243
  nodeActionLabel,
26244
+ onNodeReorder,
26010
26245
  selectedId,
26011
26246
  look,
26012
26247
  isExpanded,
@@ -26024,14 +26259,15 @@ var init_FileTree = __esm({
26024
26259
  onNodeAction,
26025
26260
  nodeActionIcon,
26026
26261
  nodeActionLabel,
26262
+ onNodeReorder,
26027
26263
  className,
26028
26264
  indent = 16
26029
26265
  }) => {
26030
26266
  const [overrides, setOverrides] = useState(() => /* @__PURE__ */ new Map());
26031
- const byId = React77__default.useMemo(() => new Map(items.map((node) => [node.id, node])), [items]);
26032
- const selectedAncestors = React77__default.useMemo(() => ancestorsOf(selectedId, byId), [selectedId, byId]);
26033
- const lastSelectedRef = React77__default.useRef(selectedId);
26034
- React77__default.useEffect(() => {
26267
+ const byId = React78__default.useMemo(() => new Map(items.map((node) => [node.id, node])), [items]);
26268
+ const selectedAncestors = React78__default.useMemo(() => ancestorsOf(selectedId, byId), [selectedId, byId]);
26269
+ const lastSelectedRef = React78__default.useRef(selectedId);
26270
+ React78__default.useEffect(() => {
26035
26271
  if (selectedId === lastSelectedRef.current) return;
26036
26272
  lastSelectedRef.current = selectedId;
26037
26273
  setOverrides((prev) => {
@@ -26072,10 +26308,12 @@ var init_FileTree = __esm({
26072
26308
  depth: 0,
26073
26309
  indent,
26074
26310
  childrenByParent,
26311
+ roots,
26075
26312
  onNodeSelect,
26076
26313
  onNodeAction,
26077
26314
  nodeActionIcon,
26078
26315
  nodeActionLabel,
26316
+ onNodeReorder,
26079
26317
  selectedId,
26080
26318
  look,
26081
26319
  isExpanded,
@@ -26095,6 +26333,7 @@ var init_FileTree = __esm({
26095
26333
  onNodeAction,
26096
26334
  nodeActionIcon,
26097
26335
  nodeActionLabel,
26336
+ onNodeReorder,
26098
26337
  className,
26099
26338
  indent = 16
26100
26339
  }) => {
@@ -26109,6 +26348,7 @@ var init_FileTree = __esm({
26109
26348
  onNodeAction,
26110
26349
  nodeActionIcon,
26111
26350
  nodeActionLabel,
26351
+ onNodeReorder,
26112
26352
  className,
26113
26353
  indent
26114
26354
  }
@@ -26155,6 +26395,183 @@ var init_FormField = __esm({
26155
26395
  FormField.displayName = "FormField";
26156
26396
  }
26157
26397
  });
26398
+ function matchesQuery(query, text) {
26399
+ if (!query) return true;
26400
+ let qi = 0;
26401
+ const q = query.toLowerCase();
26402
+ const t = text.toLowerCase();
26403
+ for (let ti = 0; ti < t.length && qi < q.length; ti++) {
26404
+ if (t[ti] === q[qi]) qi++;
26405
+ }
26406
+ return qi === q.length;
26407
+ }
26408
+ function commandMatches(command, query) {
26409
+ if (!query) return true;
26410
+ if (matchesQuery(query, command.label)) return true;
26411
+ return (command.keywords ?? []).some((keyword) => matchesQuery(query, keyword));
26412
+ }
26413
+ var UNGROUPED, CommandPalette;
26414
+ var init_CommandPalette = __esm({
26415
+ "components/core/molecules/CommandPalette.tsx"() {
26416
+ "use client";
26417
+ init_Box();
26418
+ init_Stack();
26419
+ init_Typography();
26420
+ init_Icon();
26421
+ init_Input();
26422
+ init_Badge();
26423
+ init_cn();
26424
+ init_useEventBus();
26425
+ init_Modal();
26426
+ UNGROUPED = /* @__PURE__ */ Symbol("command-palette-ungrouped");
26427
+ CommandPalette = ({
26428
+ open,
26429
+ onOpenChange,
26430
+ commands,
26431
+ onSelect,
26432
+ placeholder = "Type a command...",
26433
+ emptyLabel = "No matching commands",
26434
+ className
26435
+ }) => {
26436
+ const eventBus = useEventBus();
26437
+ const [query, setQuery] = useState("");
26438
+ const [highlightIndex, setHighlightIndex] = useState(0);
26439
+ const filtered = useMemo(
26440
+ () => commands.filter((command) => commandMatches(command, query)),
26441
+ [commands, query]
26442
+ );
26443
+ const groups = useMemo(() => {
26444
+ const order = [];
26445
+ const byGroup = /* @__PURE__ */ new Map();
26446
+ for (const command of filtered) {
26447
+ const key = command.group ?? UNGROUPED;
26448
+ if (!byGroup.has(key)) {
26449
+ byGroup.set(key, []);
26450
+ order.push(key);
26451
+ }
26452
+ byGroup.get(key).push(command);
26453
+ }
26454
+ return order.map((key) => ({ group: key === UNGROUPED ? void 0 : key, items: byGroup.get(key) }));
26455
+ }, [filtered]);
26456
+ const resetQuery = useCallback(() => {
26457
+ setQuery("");
26458
+ setHighlightIndex(0);
26459
+ }, []);
26460
+ const handleClose = useCallback(() => {
26461
+ resetQuery();
26462
+ onOpenChange(false);
26463
+ }, [onOpenChange, resetQuery]);
26464
+ const handleSelect = useCallback(
26465
+ (command) => {
26466
+ if (command.disabled) return;
26467
+ if (command.event) eventBus.emit(`UI:${command.event}`, { commandId: command.id });
26468
+ if (command.action) eventBus.emit(`UI:${command.action}`, command.actionPayload ?? {});
26469
+ onSelect?.(command);
26470
+ handleClose();
26471
+ },
26472
+ [eventBus, onSelect, handleClose]
26473
+ );
26474
+ const handleQueryChange = useCallback((e) => {
26475
+ setQuery(e.target.value);
26476
+ setHighlightIndex(0);
26477
+ }, []);
26478
+ const handleKeyDown = useCallback(
26479
+ (e) => {
26480
+ if (filtered.length === 0) return;
26481
+ if (e.key === "ArrowDown") {
26482
+ e.preventDefault();
26483
+ setHighlightIndex((prev) => prev < filtered.length - 1 ? prev + 1 : 0);
26484
+ } else if (e.key === "ArrowUp") {
26485
+ e.preventDefault();
26486
+ setHighlightIndex((prev) => prev > 0 ? prev - 1 : filtered.length - 1);
26487
+ } else if (e.key === "Enter") {
26488
+ e.preventDefault();
26489
+ const command = filtered[highlightIndex];
26490
+ if (command) handleSelect(command);
26491
+ }
26492
+ },
26493
+ [filtered, highlightIndex, handleSelect]
26494
+ );
26495
+ return /* @__PURE__ */ jsx(
26496
+ Modal,
26497
+ {
26498
+ isOpen: open,
26499
+ onClose: handleClose,
26500
+ onExited: resetQuery,
26501
+ showCloseButton: false,
26502
+ size: "md",
26503
+ className,
26504
+ children: /* @__PURE__ */ jsx(Box, { "data-testid": "command-palette", children: /* @__PURE__ */ jsxs(VStack, { gap: "sm", children: [
26505
+ /* @__PURE__ */ jsx(
26506
+ Input,
26507
+ {
26508
+ inputType: "search",
26509
+ placeholder,
26510
+ value: query,
26511
+ onChange: handleQueryChange,
26512
+ onKeyDown: handleKeyDown,
26513
+ leftIcon: "search",
26514
+ clearable: query.length > 0,
26515
+ onClear: resetQuery,
26516
+ autoFocus: true,
26517
+ "data-testid": "command-palette-input"
26518
+ }
26519
+ ),
26520
+ filtered.length === 0 ? /* @__PURE__ */ jsx(Box, { className: "px-2 py-6 text-center", "data-testid": "command-palette-empty", children: /* @__PURE__ */ jsx(Typography, { variant: "body", color: "muted", children: emptyLabel }) }) : /* @__PURE__ */ jsx(
26521
+ Box,
26522
+ {
26523
+ className: "max-h-80 overflow-y-auto",
26524
+ role: "listbox",
26525
+ "aria-label": placeholder,
26526
+ children: /* @__PURE__ */ jsx(VStack, { gap: "none", children: groups.map(({ group, items }) => /* @__PURE__ */ jsxs(Box, { children: [
26527
+ group ? /* @__PURE__ */ jsx(
26528
+ Typography,
26529
+ {
26530
+ variant: "caption",
26531
+ color: "muted",
26532
+ className: "px-3 pt-2 pb-1 block",
26533
+ children: group
26534
+ }
26535
+ ) : null,
26536
+ items.map((command) => {
26537
+ const index = filtered.indexOf(command);
26538
+ const isHighlighted = index === highlightIndex;
26539
+ return /* @__PURE__ */ jsxs(
26540
+ Box,
26541
+ {
26542
+ as: "button",
26543
+ role: "option",
26544
+ "aria-selected": isHighlighted,
26545
+ "aria-disabled": command.disabled || void 0,
26546
+ "data-testid": `command-palette-item-${command.id}`,
26547
+ onMouseEnter: () => !command.disabled && setHighlightIndex(index),
26548
+ onClick: () => handleSelect(command),
26549
+ className: cn(
26550
+ "w-full flex items-center gap-3 px-3 py-2 text-start rounded-sm",
26551
+ "text-sm transition-colors",
26552
+ "focus:outline-none",
26553
+ isHighlighted && "bg-muted",
26554
+ command.disabled && "opacity-50 cursor-not-allowed"
26555
+ ),
26556
+ children: [
26557
+ command.icon ? /* @__PURE__ */ jsx(Icon, { icon: command.icon, size: "sm", className: "flex-shrink-0" }) : null,
26558
+ /* @__PURE__ */ jsx(Typography, { variant: "small", className: "flex-1 truncate", children: command.label }),
26559
+ command.shortcut ? /* @__PURE__ */ jsx(Badge, { variant: "neutral", size: "sm", children: command.shortcut }) : null
26560
+ ]
26561
+ },
26562
+ command.id
26563
+ );
26564
+ })
26565
+ ] }, String(group ?? "__ungrouped__"))) })
26566
+ }
26567
+ )
26568
+ ] }) })
26569
+ }
26570
+ );
26571
+ };
26572
+ CommandPalette.displayName = "CommandPalette";
26573
+ }
26574
+ });
26158
26575
  function getOrCreateStore(query) {
26159
26576
  if (!queryStores.has(query)) {
26160
26577
  queryStores.set(query, {
@@ -26869,7 +27286,7 @@ var init_Flex = __esm({
26869
27286
  flexStyle.flexBasis = typeof basis === "number" ? `${basis}px` : basis;
26870
27287
  }
26871
27288
  }
26872
- return React77__default.createElement(Component, {
27289
+ return React78__default.createElement(Component, {
26873
27290
  className: cn(
26874
27291
  inline ? "inline-flex" : "flex",
26875
27292
  directionStyles[direction],
@@ -26988,7 +27405,7 @@ var init_Grid = __esm({
26988
27405
  as: Component = "div"
26989
27406
  }) => {
26990
27407
  const mergedStyle = rows2 ? { gridTemplateRows: `repeat(${rows2}, minmax(0, 1fr))`, ...style } : style;
26991
- return React77__default.createElement(
27408
+ return React78__default.createElement(
26992
27409
  Component,
26993
27410
  {
26994
27411
  className: cn(
@@ -27410,9 +27827,9 @@ var init_Popover = __esm({
27410
27827
  onMouseLeave: handleClose,
27411
27828
  onPointerDown: tapTriggerProps.onPointerDown
27412
27829
  };
27413
- const childElement = React77__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
27830
+ const childElement = React78__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
27414
27831
  const childPointerDown = childElement.props.onPointerDown;
27415
- const triggerElement = React77__default.cloneElement(
27832
+ const triggerElement = React78__default.cloneElement(
27416
27833
  childElement,
27417
27834
  {
27418
27835
  ref: triggerRef,
@@ -28276,9 +28693,9 @@ var init_Tooltip = __esm({
28276
28693
  if (hideTimeoutRef.current) clearTimeout(hideTimeoutRef.current);
28277
28694
  };
28278
28695
  }, []);
28279
- const triggerElement = React77__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
28696
+ const triggerElement = React78__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
28280
28697
  const childPointerDown = triggerElement.props.onPointerDown;
28281
- const trigger = React77__default.cloneElement(triggerElement, {
28698
+ const trigger = React78__default.cloneElement(triggerElement, {
28282
28699
  ref: triggerRef,
28283
28700
  onMouseEnter: handleMouseEnter,
28284
28701
  onMouseLeave: handleMouseLeave,
@@ -28368,7 +28785,7 @@ var init_WizardProgress = __esm({
28368
28785
  children: /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: normalizedSteps.map((step, index) => {
28369
28786
  const isActive = index === currentStep;
28370
28787
  const isCompleted = index < currentStep;
28371
- return /* @__PURE__ */ jsxs(React77__default.Fragment, { children: [
28788
+ return /* @__PURE__ */ jsxs(React78__default.Fragment, { children: [
28372
28789
  /* @__PURE__ */ jsx(
28373
28790
  "button",
28374
28791
  {
@@ -30052,7 +30469,7 @@ function GameMenu({
30052
30469
  }) {
30053
30470
  const resolvedOptions = (options?.length ? options : void 0) ?? (menuItems?.length ? menuItems : void 0) ?? DEFAULT_MENU_OPTIONS;
30054
30471
  const eventBus = useEventBus();
30055
- const handleOptionClick = React77.useCallback(
30472
+ const handleOptionClick = React78.useCallback(
30056
30473
  (option) => {
30057
30474
  if (option.event) {
30058
30475
  eventBus.emit(`UI:${option.event}`, { option });
@@ -30288,7 +30705,7 @@ function StateGraph({
30288
30705
  }) {
30289
30706
  const eventBus = useEventBus();
30290
30707
  const nodes = states ?? [];
30291
- const positions = React77.useMemo(() => layoutStates(nodes, width, height), [nodes, width, height]);
30708
+ const positions = React78.useMemo(() => layoutStates(nodes, width, height), [nodes, width, height]);
30292
30709
  return /* @__PURE__ */ jsxs(
30293
30710
  Box,
30294
30711
  {
@@ -30825,7 +31242,7 @@ function LinearView({
30825
31242
  /* @__PURE__ */ jsx(HStack, { className: "flex-wrap items-center", gap: "xs", children: trait.states.map((state, i) => {
30826
31243
  const isDone = i < currentIdx;
30827
31244
  const isCurrent = i === currentIdx;
30828
- return /* @__PURE__ */ jsxs(React77__default.Fragment, { children: [
31245
+ return /* @__PURE__ */ jsxs(React78__default.Fragment, { children: [
30829
31246
  i > 0 && /* @__PURE__ */ jsx(
30830
31247
  Typography,
30831
31248
  {
@@ -31458,7 +31875,7 @@ function SequenceBar({
31458
31875
  else onSlotRemove?.(index);
31459
31876
  }, [emit, slotRemoveEvent, onSlotRemove, playing]);
31460
31877
  const paddedSlots = Array.from({ length: maxSlots }, (_, i) => slots[i]);
31461
- return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(React77__default.Fragment, { children: [
31878
+ return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(React78__default.Fragment, { children: [
31462
31879
  i > 0 && /* @__PURE__ */ jsx(
31463
31880
  Typography,
31464
31881
  {
@@ -31866,6 +32283,8 @@ var init_MathCanvas = __esm({
31866
32283
  gridColor = "var(--color-border, #9ca3af)",
31867
32284
  axisColor = "var(--color-muted-foreground, #374151)",
31868
32285
  showTickLabels = false,
32286
+ tickLabelFontSize = 10,
32287
+ labelFontSize = 12,
31869
32288
  showCurveLabels = false,
31870
32289
  curves = [],
31871
32290
  points = [],
@@ -31937,18 +32356,18 @@ var init_MathCanvas = __esm({
31937
32356
  let kx = 0;
31938
32357
  for (let x = Math.ceil(xMin / gridStep) * gridStep; x <= xMax; x += gridStep, kx++) {
31939
32358
  if (kx % labelEveryX === 0 && x !== 0) {
31940
- out.push({ type: "text", x: mapX(x), y: xAxisY + 12, text: formatTick(x), color: "#6b7280", fontSize: 10, align: "center" });
32359
+ out.push({ type: "text", x: mapX(x), y: xAxisY + 12, text: formatTick(x), color: "#6b7280", fontSize: tickLabelFontSize, align: "center" });
31941
32360
  }
31942
32361
  }
31943
32362
  const labelEveryY = Math.max(1, Math.ceil((yMax - yMin) / gridStep / Math.floor(plotH / 28)));
31944
32363
  let ky = 0;
31945
32364
  for (let y = Math.ceil(yMin / gridStep) * gridStep; y <= yMax; y += gridStep, ky++) {
31946
32365
  if (ky % labelEveryY === 0 && y !== 0) {
31947
- out.push({ type: "text", x: yAxisX - 6, y: mapY(y), text: formatTick(y), color: "#6b7280", fontSize: 10, align: "right" });
32366
+ out.push({ type: "text", x: yAxisX - 6, y: mapY(y), text: formatTick(y), color: "#6b7280", fontSize: tickLabelFontSize, align: "right" });
31948
32367
  }
31949
32368
  }
31950
32369
  if (xMin <= 0 && xMax >= 0 && yMin <= 0 && yMax >= 0) {
31951
- out.push({ type: "text", x: yAxisX - 6, y: xAxisY + 12, text: "0", color: "#6b7280", fontSize: 10, align: "right" });
32370
+ out.push({ type: "text", x: yAxisX - 6, y: xAxisY + 12, text: "0", color: "#6b7280", fontSize: tickLabelFontSize, align: "right" });
31952
32371
  }
31953
32372
  }
31954
32373
  for (const region of regions) {
@@ -31979,7 +32398,7 @@ var init_MathCanvas = __esm({
31979
32398
  y: (mapY(region.samples[mid].y) + mapY(baseline)) / 2,
31980
32399
  text: region.label,
31981
32400
  color,
31982
- fontSize: 11
32401
+ fontSize: labelFontSize
31983
32402
  });
31984
32403
  }
31985
32404
  }
@@ -32018,7 +32437,7 @@ var init_MathCanvas = __esm({
32018
32437
  const py = mapY(guide.at);
32019
32438
  out.push({ type: "line", x1: margin, y1: py, x2: width - margin, y2: py, color, dash });
32020
32439
  if (guide.label) {
32021
- out.push({ type: "text", x: width - margin - 4, y: py - 8, text: guide.label, color, fontSize: 11, align: "right" });
32440
+ out.push({ type: "text", x: width - margin - 4, y: py - 8, text: guide.label, color, fontSize: labelFontSize, align: "right" });
32022
32441
  }
32023
32442
  }
32024
32443
  }
@@ -32061,7 +32480,7 @@ var init_MathCanvas = __esm({
32061
32480
  y: mapY(lastInRange.y) - 6,
32062
32481
  text: curve.label,
32063
32482
  color: curve.color ?? "#2563eb",
32064
- fontSize: 11
32483
+ fontSize: labelFontSize
32065
32484
  });
32066
32485
  }
32067
32486
  }
@@ -32098,7 +32517,7 @@ var init_MathCanvas = __esm({
32098
32517
  y: xAxisY - peak - 8,
32099
32518
  text: hop.label,
32100
32519
  color,
32101
- fontSize: 10,
32520
+ fontSize: labelFontSize,
32102
32521
  align: "center"
32103
32522
  });
32104
32523
  }
@@ -32125,7 +32544,7 @@ var init_MathCanvas = __esm({
32125
32544
  y: mapY(angle.y + 1.35 * radius * Math.sin(rad)),
32126
32545
  text: angle.label,
32127
32546
  color,
32128
- fontSize: 11,
32547
+ fontSize: labelFontSize,
32129
32548
  align: "center"
32130
32549
  });
32131
32550
  }
@@ -32142,7 +32561,7 @@ var init_MathCanvas = __esm({
32142
32561
  fill: isOpen ? "#ffffff" : p.color ?? "#dc2626"
32143
32562
  });
32144
32563
  if (p.label) {
32145
- out.push({ type: "text", x: mapX(p.x) + 8, y: mapY(p.y) - 8, text: p.label, color: p.color ?? "#111827", fontSize: 12 });
32564
+ out.push({ type: "text", x: mapX(p.x) + 8, y: mapY(p.y) - 8, text: p.label, color: p.color ?? "#111827", fontSize: labelFontSize });
32146
32565
  }
32147
32566
  }
32148
32567
  for (const v of vectors) {
@@ -32153,7 +32572,7 @@ var init_MathCanvas = __esm({
32153
32572
  const y2 = mapY(v.y + v.vy);
32154
32573
  out.push({ type: "arrow", x1, y1, x2, y2, color: v.color ?? "#7c3aed", lineWidth: 2 });
32155
32574
  if (v.label) {
32156
- out.push({ type: "text", x: x2 + 6, y: y2 - 6, text: v.label, color: v.color ?? "#7c3aed", fontSize: 12 });
32575
+ out.push({ type: "text", x: x2 + 6, y: y2 - 6, text: v.label, color: v.color ?? "#7c3aed", fontSize: labelFontSize });
32157
32576
  }
32158
32577
  }
32159
32578
  out.push(...shapes);
@@ -32172,6 +32591,8 @@ var init_MathCanvas = __esm({
32172
32591
  gridColor,
32173
32592
  axisColor,
32174
32593
  showTickLabels,
32594
+ tickLabelFontSize,
32595
+ labelFontSize,
32175
32596
  showCurveLabels,
32176
32597
  curves,
32177
32598
  points,
@@ -33459,13 +33880,13 @@ var init_MapView = __esm({
33459
33880
  shadowSize: [41, 41]
33460
33881
  });
33461
33882
  L.Marker.prototype.options.icon = defaultIcon;
33462
- const { useEffect: useEffect69, useRef: useRef65, useCallback: useCallback108, useState: useState107 } = React77__default;
33883
+ const { useEffect: useEffect70, useRef: useRef67, useCallback: useCallback109, useState: useState109 } = React78__default;
33463
33884
  const { Typography: Typography2 } = await Promise.resolve().then(() => (init_Typography(), Typography_exports));
33464
33885
  const { useEventBus: useEventBus2 } = await Promise.resolve().then(() => (init_useEventBus(), useEventBus_exports));
33465
33886
  function MapUpdater({ centerLat, centerLng, zoom }) {
33466
33887
  const map = useMap();
33467
- const prevRef = useRef65({ centerLat, centerLng, zoom });
33468
- useEffect69(() => {
33888
+ const prevRef = useRef67({ centerLat, centerLng, zoom });
33889
+ useEffect70(() => {
33469
33890
  const prev = prevRef.current;
33470
33891
  if (prev.centerLat !== centerLat || prev.centerLng !== centerLng || prev.zoom !== zoom) {
33471
33892
  map.setView([centerLat, centerLng], zoom);
@@ -33476,7 +33897,7 @@ var init_MapView = __esm({
33476
33897
  }
33477
33898
  function MapClickHandler({ onMapClick }) {
33478
33899
  const map = useMap();
33479
- useEffect69(() => {
33900
+ useEffect70(() => {
33480
33901
  if (!onMapClick) return;
33481
33902
  const handler = (e) => {
33482
33903
  onMapClick(e.latlng.lat, e.latlng.lng);
@@ -33504,8 +33925,8 @@ var init_MapView = __esm({
33504
33925
  showAttribution = true
33505
33926
  }) {
33506
33927
  const eventBus = useEventBus2();
33507
- const [clickedPosition, setClickedPosition] = useState107(null);
33508
- const handleMapClick = useCallback108((lat, lng) => {
33928
+ const [clickedPosition, setClickedPosition] = useState109(null);
33929
+ const handleMapClick = useCallback109((lat, lng) => {
33509
33930
  if (showClickedPin) {
33510
33931
  setClickedPosition({ lat, lng });
33511
33932
  }
@@ -33514,7 +33935,7 @@ var init_MapView = __esm({
33514
33935
  eventBus.emit(`UI:${mapClickEvent}`, { latitude: lat, longitude: lng });
33515
33936
  }
33516
33937
  }, [onMapClick, mapClickEvent, eventBus, showClickedPin]);
33517
- const handleMarkerClick = useCallback108((marker) => {
33938
+ const handleMarkerClick = useCallback109((marker) => {
33518
33939
  onMarkerClick?.(marker);
33519
33940
  if (markerClickEvent) {
33520
33941
  eventBus.emit(`UI:${markerClickEvent}`, { ...marker });
@@ -34404,8 +34825,8 @@ function TableView({
34404
34825
  }) {
34405
34826
  const eventBus = useEventBus();
34406
34827
  const { t } = useTranslate();
34407
- const [visibleCount, setVisibleCount] = React77__default.useState(pageSize > 0 ? pageSize : Infinity);
34408
- const [localSelected, setLocalSelected] = React77__default.useState(/* @__PURE__ */ new Set());
34828
+ const [visibleCount, setVisibleCount] = React78__default.useState(pageSize > 0 ? pageSize : Infinity);
34829
+ const [localSelected, setLocalSelected] = React78__default.useState(/* @__PURE__ */ new Set());
34409
34830
  const colDefs = (Array.isArray(columns) ? columns : void 0) ?? (Array.isArray(fields) ? fields : void 0) ?? [];
34410
34831
  const actionDefs = Array.isArray(itemActions) ? itemActions : [];
34411
34832
  const allDataRaw = Array.isArray(entity) ? entity : entity ? [entity] : [];
@@ -34426,7 +34847,7 @@ function TableView({
34426
34847
  const hasMore = pageSize > 0 && visibleCount < ordered2.length;
34427
34848
  const hasRenderProp = typeof children === "function";
34428
34849
  const idField = dndItemIdField ?? "id";
34429
- React77__default.useEffect(() => {
34850
+ React78__default.useEffect(() => {
34430
34851
  tableViewLog.debug("render", {
34431
34852
  rowCount: data.length,
34432
34853
  colCount: colDefs.length,
@@ -34476,7 +34897,7 @@ function TableView({
34476
34897
  };
34477
34898
  eventBus.emit(`UI:${rowClickEvent}`, payload);
34478
34899
  };
34479
- const colFloors = React77__default.useMemo(
34900
+ const colFloors = React78__default.useMemo(
34480
34901
  () => colDefs.map((col) => {
34481
34902
  const longest = data.reduce((widest, row) => {
34482
34903
  const cell = formatCell(asFieldValue(getNestedValue(row, col.field ?? col.key)), col.format);
@@ -34619,12 +35040,12 @@ function TableView({
34619
35040
  ]
34620
35041
  }
34621
35042
  );
34622
- return dnd.isZone ? /* @__PURE__ */ jsx(dnd.SortableItem, { id: row[idField] ?? id, children: rowInner }, id) : /* @__PURE__ */ jsx(React77__default.Fragment, { children: rowInner }, id);
35043
+ return dnd.isZone ? /* @__PURE__ */ jsx(dnd.SortableItem, { id: row[idField] ?? id, children: rowInner }, id) : /* @__PURE__ */ jsx(React78__default.Fragment, { children: rowInner }, id);
34623
35044
  };
34624
35045
  const items = Array.from(data);
34625
35046
  const groups = groupBy ? groupData2(items, groupBy) : [{ label: "", items }];
34626
35047
  let runningIndex = 0;
34627
- const body = /* @__PURE__ */ jsx(Box, { role: "rowgroup", children: groups.map((group, gi) => /* @__PURE__ */ jsxs(React77__default.Fragment, { children: [
35048
+ const body = /* @__PURE__ */ jsx(Box, { role: "rowgroup", children: groups.map((group, gi) => /* @__PURE__ */ jsxs(React78__default.Fragment, { children: [
34628
35049
  group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-3" : "mt-0" }),
34629
35050
  group.items.map((row) => renderRow(row, runningIndex++))
34630
35051
  ] }, gi)) });
@@ -35993,7 +36414,7 @@ var init_StepFlow = __esm({
35993
36414
  className
35994
36415
  }) => {
35995
36416
  if (orientation === "vertical") {
35996
- return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(React77__default.Fragment, { children: /* @__PURE__ */ jsxs(HStack, { gap: "md", align: "start", className: "w-full", children: [
36417
+ return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(React78__default.Fragment, { children: /* @__PURE__ */ jsxs(HStack, { gap: "md", align: "start", className: "w-full", children: [
35997
36418
  /* @__PURE__ */ jsxs(VStack, { gap: "none", align: "center", children: [
35998
36419
  /* @__PURE__ */ jsx(StepCircle, { step, index }),
35999
36420
  showConnectors && index < steps.length - 1 && /* @__PURE__ */ jsx(Box, { className: "w-px h-8 bg-border" })
@@ -36004,7 +36425,7 @@ var init_StepFlow = __esm({
36004
36425
  ] })
36005
36426
  ] }) }, index)) });
36006
36427
  }
36007
- 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(React77__default.Fragment, { children: [
36428
+ 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(React78__default.Fragment, { children: [
36008
36429
  /* @__PURE__ */ jsxs(VStack, { gap: "sm", align: "center", className: "flex-1 w-full md:w-auto", children: [
36009
36430
  /* @__PURE__ */ jsx(StepCircle, { step, index }),
36010
36431
  /* @__PURE__ */ jsx(Typography, { variant: "h4", className: "text-center", children: step.title }),
@@ -36994,7 +37415,7 @@ var init_LikertScale = __esm({
36994
37415
  md: "text-base",
36995
37416
  lg: "text-lg"
36996
37417
  };
36997
- LikertScale = React77__default.forwardRef(
37418
+ LikertScale = React78__default.forwardRef(
36998
37419
  ({
36999
37420
  question,
37000
37421
  options = DEFAULT_LIKERT_OPTIONS,
@@ -37006,7 +37427,7 @@ var init_LikertScale = __esm({
37006
37427
  variant = "radios",
37007
37428
  className
37008
37429
  }, ref) => {
37009
- const groupId = React77__default.useId();
37430
+ const groupId = React78__default.useId();
37010
37431
  const eventBus = useEventBus();
37011
37432
  const handleSelect = useCallback(
37012
37433
  (next) => {
@@ -39429,7 +39850,7 @@ var init_DocBreadcrumb = __esm({
39429
39850
  "aria-label": t("aria.breadcrumb"),
39430
39851
  children: /* @__PURE__ */ jsx(HStack, { gap: "xs", align: "center", wrap: true, children: items.map((item, idx) => {
39431
39852
  const isLast = idx === items.length - 1;
39432
- return /* @__PURE__ */ jsxs(React77__default.Fragment, { children: [
39853
+ return /* @__PURE__ */ jsxs(React78__default.Fragment, { children: [
39433
39854
  idx > 0 && /* @__PURE__ */ jsx(
39434
39855
  Icon,
39435
39856
  {
@@ -40298,7 +40719,7 @@ var init_MiniStateMachine = __esm({
40298
40719
  const x = 2 + i * (NODE_W + GAP2 + ARROW_W + GAP2);
40299
40720
  const tc = transitionCounts[s.name] ?? 0;
40300
40721
  const role = getStateRole(s.name, s.isInitial ?? void 0, s.isTerminal ?? void 0, tc, maxTC);
40301
- return /* @__PURE__ */ jsxs(React77__default.Fragment, { children: [
40722
+ return /* @__PURE__ */ jsxs(React78__default.Fragment, { children: [
40302
40723
  /* @__PURE__ */ jsx(
40303
40724
  AvlState,
40304
40725
  {
@@ -40503,7 +40924,7 @@ var init_PageHeader = __esm({
40503
40924
  info: "bg-info/10 text-info"
40504
40925
  };
40505
40926
  return /* @__PURE__ */ jsxs(Box, { className: cn("mb-6", className), children: [
40506
- 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(React77__default.Fragment, { children: [
40927
+ 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(React78__default.Fragment, { children: [
40507
40928
  idx > 0 && /* @__PURE__ */ jsx(Typography, { variant: "small", color: "muted", children: "/" }),
40508
40929
  crumb.href ? /* @__PURE__ */ jsx(
40509
40930
  "a",
@@ -40861,7 +41282,7 @@ var init_Section = __esm({
40861
41282
  as: Component = "section"
40862
41283
  }) => {
40863
41284
  const hasHeader = title || description || action;
40864
- return React77__default.createElement(
41285
+ return React78__default.createElement(
40865
41286
  Component,
40866
41287
  {
40867
41288
  className: cn(
@@ -41235,7 +41656,7 @@ var init_WizardContainer = __esm({
41235
41656
  const isCompleted = index < currentStep;
41236
41657
  const stepKey = step.id ?? step.tabId ?? `step-${index}`;
41237
41658
  const stepTitle = step.title ?? step.name ?? `Step ${index + 1}`;
41238
- return /* @__PURE__ */ jsxs(React77__default.Fragment, { children: [
41659
+ return /* @__PURE__ */ jsxs(React78__default.Fragment, { children: [
41239
41660
  /* @__PURE__ */ jsx(
41240
41661
  Button,
41241
41662
  {
@@ -43022,7 +43443,7 @@ var init_ImportPreviewTree = __esm({
43022
43443
  const renderUnit = (unit, childrenByParent, depth) => {
43023
43444
  const summary = fieldSummary(unit);
43024
43445
  const children = childrenByParent.get(unit.ref) ?? [];
43025
- return /* @__PURE__ */ jsxs(React77__default.Fragment, { children: [
43446
+ return /* @__PURE__ */ jsxs(React78__default.Fragment, { children: [
43026
43447
  /* @__PURE__ */ jsxs(
43027
43448
  Box,
43028
43449
  {
@@ -43119,7 +43540,7 @@ var init_ImportProgress = __esm({
43119
43540
  PIPELINE.map((key, index) => {
43120
43541
  const isComplete = index < currentIndex;
43121
43542
  const isActive = index === currentIndex;
43122
- return /* @__PURE__ */ jsxs(React77__default.Fragment, { children: [
43543
+ return /* @__PURE__ */ jsxs(React78__default.Fragment, { children: [
43123
43544
  index > 0 ? /* @__PURE__ */ jsx(Box, { className: "h-px w-4 bg-border" }) : null,
43124
43545
  /* @__PURE__ */ jsxs(Box, { className: "flex items-center gap-1", "data-testid": `import-progress-step-${key}`, children: [
43125
43546
  /* @__PURE__ */ jsx(
@@ -43332,6 +43753,69 @@ var init_parseLessonSegments = __esm({
43332
43753
  init_lessonSegmentUtils();
43333
43754
  }
43334
43755
  });
43756
+ var positionClasses, FloatingToolbar;
43757
+ var init_FloatingToolbar = __esm({
43758
+ "components/core/molecules/FloatingToolbar.tsx"() {
43759
+ "use client";
43760
+ init_Button();
43761
+ init_Box();
43762
+ init_Divider();
43763
+ init_Typography();
43764
+ init_ButtonGroup();
43765
+ init_cn();
43766
+ init_useEventBus();
43767
+ positionClasses = {
43768
+ "bottom-center": "bottom-6 left-1/2 -translate-x-1/2",
43769
+ "bottom-left": "bottom-6 left-6",
43770
+ "bottom-right": "bottom-6 right-6"
43771
+ };
43772
+ FloatingToolbar = ({
43773
+ items,
43774
+ position = "bottom-center",
43775
+ children,
43776
+ className
43777
+ }) => {
43778
+ const eventBus = useEventBus();
43779
+ return /* @__PURE__ */ jsx(Box, { className: cn("fixed z-50", positionClasses[position]), children: /* @__PURE__ */ jsxs(
43780
+ ButtonGroup,
43781
+ {
43782
+ variant: "default",
43783
+ orientation: "horizontal",
43784
+ className: cn(
43785
+ "items-center gap-1 rounded-full border border-border",
43786
+ "bg-card/95 backdrop-blur-sm shadow-elevation-popover p-1",
43787
+ className
43788
+ ),
43789
+ children: [
43790
+ items.map((item) => /* @__PURE__ */ jsx(
43791
+ Button,
43792
+ {
43793
+ variant: item.active ? "primary" : "ghost",
43794
+ size: "sm",
43795
+ icon: item.icon,
43796
+ action: item.action,
43797
+ actionPayload: item.actionPayload,
43798
+ disabled: item.disabled,
43799
+ "aria-pressed": item.active,
43800
+ "aria-label": item.label,
43801
+ className: "rounded-full",
43802
+ "data-testid": item.testId ?? `floating-toolbar-item-${item.id}`,
43803
+ onClick: () => {
43804
+ if (item.event) eventBus.emit(`UI:${item.event}`, { actionId: item.id });
43805
+ },
43806
+ children: /* @__PURE__ */ jsx(Typography, { as: "span", className: "sr-only", children: item.label })
43807
+ },
43808
+ item.id
43809
+ )),
43810
+ children && items.length > 0 && /* @__PURE__ */ jsx(Divider, { orientation: "vertical", className: "h-6 mx-1" }),
43811
+ children
43812
+ ]
43813
+ }
43814
+ ) });
43815
+ };
43816
+ FloatingToolbar.displayName = "FloatingToolbar";
43817
+ }
43818
+ });
43335
43819
 
43336
43820
  // components/core/molecules/index.ts
43337
43821
  var init_molecules2 = __esm({
@@ -43349,6 +43833,7 @@ var init_molecules2 = __esm({
43349
43833
  init_Alert();
43350
43834
  init_Breadcrumb();
43351
43835
  init_ButtonGroup();
43836
+ init_CommandPalette();
43352
43837
  init_FilterGroup();
43353
43838
  init_Card2();
43354
43839
  init_Container();
@@ -43482,6 +43967,7 @@ var init_molecules2 = __esm({
43482
43967
  init_BloomQuizBlock();
43483
43968
  init_parseLessonSegments();
43484
43969
  init_lessonSegmentUtils();
43970
+ init_FloatingToolbar();
43485
43971
  }
43486
43972
  });
43487
43973
 
@@ -44224,7 +44710,7 @@ var init_DetailPanel = __esm({
44224
44710
  }) => {
44225
44711
  const eventBus = useEventBus();
44226
44712
  const { t } = useTranslate();
44227
- const [titleDraft, setTitleDraft] = React77__default.useState(null);
44713
+ const [titleDraft, setTitleDraft] = React78__default.useState(null);
44228
44714
  const isFieldDefArray = (arr) => {
44229
44715
  if (!arr || arr.length === 0) return false;
44230
44716
  const first = arr[0];
@@ -44617,8 +45103,224 @@ var init_DetailPanel = __esm({
44617
45103
  DetailPanel.displayName = "DetailPanel";
44618
45104
  }
44619
45105
  });
45106
+ var SplitPane;
45107
+ var init_SplitPane = __esm({
45108
+ "components/core/organisms/layout/SplitPane.tsx"() {
45109
+ "use client";
45110
+ init_cn();
45111
+ SplitPane = ({
45112
+ direction = "horizontal",
45113
+ ratio: ratioProp = 50,
45114
+ minSize = 100,
45115
+ resizable = true,
45116
+ left,
45117
+ right,
45118
+ className,
45119
+ leftClassName,
45120
+ rightClassName,
45121
+ onRatioChange
45122
+ }) => {
45123
+ const [uncontrolledRatio, setUncontrolledRatio] = useState(ratioProp);
45124
+ const ratio = onRatioChange ? ratioProp : uncontrolledRatio;
45125
+ const containerRef = useRef(null);
45126
+ const isDragging = useRef(false);
45127
+ const handlePointerDown = useCallback(
45128
+ (e) => {
45129
+ if (!resizable) return;
45130
+ e.preventDefault();
45131
+ isDragging.current = true;
45132
+ e.currentTarget.setPointerCapture(e.pointerId);
45133
+ const handlePointerMove = (ev) => {
45134
+ if (!isDragging.current || !containerRef.current) return;
45135
+ const rect = containerRef.current.getBoundingClientRect();
45136
+ let newRatio;
45137
+ if (direction === "horizontal") {
45138
+ const x = ev.clientX - rect.left;
45139
+ newRatio = x / rect.width * 100;
45140
+ } else {
45141
+ const y = ev.clientY - rect.top;
45142
+ newRatio = y / rect.height * 100;
45143
+ }
45144
+ const minRatio = minSize / (direction === "horizontal" ? rect.width : rect.height) * 100;
45145
+ const maxRatio = 100 - minRatio;
45146
+ newRatio = Math.max(minRatio, Math.min(maxRatio, newRatio));
45147
+ if (onRatioChange) {
45148
+ onRatioChange(newRatio);
45149
+ } else {
45150
+ setUncontrolledRatio(newRatio);
45151
+ }
45152
+ };
45153
+ const handlePointerUp = () => {
45154
+ isDragging.current = false;
45155
+ document.removeEventListener("pointermove", handlePointerMove);
45156
+ document.removeEventListener("pointerup", handlePointerUp);
45157
+ document.removeEventListener("pointercancel", handlePointerUp);
45158
+ };
45159
+ document.addEventListener("pointermove", handlePointerMove);
45160
+ document.addEventListener("pointerup", handlePointerUp);
45161
+ document.addEventListener("pointercancel", handlePointerUp);
45162
+ },
45163
+ [direction, minSize, resizable, onRatioChange]
45164
+ );
45165
+ const isHorizontal = direction === "horizontal";
45166
+ return /* @__PURE__ */ jsxs(
45167
+ "div",
45168
+ {
45169
+ ref: containerRef,
45170
+ className: cn(
45171
+ "flex w-full h-full",
45172
+ isHorizontal ? "flex-row" : "flex-col",
45173
+ className
45174
+ ),
45175
+ children: [
45176
+ /* @__PURE__ */ jsx(
45177
+ "div",
45178
+ {
45179
+ className: cn("overflow-auto", leftClassName),
45180
+ style: {
45181
+ [isHorizontal ? "width" : "height"]: `${ratio}%`,
45182
+ flexShrink: 0
45183
+ },
45184
+ children: left
45185
+ }
45186
+ ),
45187
+ resizable && /* @__PURE__ */ jsx(
45188
+ "div",
45189
+ {
45190
+ onPointerDown: handlePointerDown,
45191
+ className: cn(
45192
+ "flex-shrink-0 bg-border transition-colors touch-none",
45193
+ 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"
45194
+ )
45195
+ }
45196
+ ),
45197
+ /* @__PURE__ */ jsx("div", { className: cn("flex-1 overflow-auto", rightClassName), children: right })
45198
+ ]
45199
+ }
45200
+ );
45201
+ };
45202
+ SplitPane.displayName = "SplitPane";
45203
+ }
45204
+ });
45205
+ var DockLayout;
45206
+ var init_DockLayout = __esm({
45207
+ "components/core/organisms/layout/DockLayout.tsx"() {
45208
+ "use client";
45209
+ init_Box();
45210
+ init_Stack();
45211
+ init_cn();
45212
+ init_SplitPane();
45213
+ DockLayout = ({
45214
+ rail,
45215
+ sidebar,
45216
+ main,
45217
+ bottomPanel,
45218
+ statusBar,
45219
+ secondarySidebar,
45220
+ railWidth = 56,
45221
+ secondarySidebarWidth = 280,
45222
+ sidebarCollapsed = false,
45223
+ sidebarWidth = 20,
45224
+ onSidebarWidthChange,
45225
+ sidebarMinSize = 160,
45226
+ bottomPanelCollapsed = false,
45227
+ bottomPanelHeight = 30,
45228
+ onBottomPanelHeightChange,
45229
+ bottomPanelMinSize = 120,
45230
+ secondarySidebarCollapsed = false,
45231
+ className,
45232
+ railClassName,
45233
+ sidebarClassName,
45234
+ mainClassName,
45235
+ bottomPanelClassName,
45236
+ statusBarClassName,
45237
+ secondarySidebarClassName
45238
+ }) => {
45239
+ const showSidebar = Boolean(sidebar) && !sidebarCollapsed;
45240
+ const showBottomPanel = Boolean(bottomPanel) && !bottomPanelCollapsed;
45241
+ const showSecondarySidebar = Boolean(secondarySidebar) && !secondarySidebarCollapsed;
45242
+ const centerRow = /* @__PURE__ */ jsxs(HStack, { gap: "none", className: "flex-1 min-h-0 min-w-0", children: [
45243
+ /* @__PURE__ */ jsx(Box, { className: cn("flex-1 min-w-0 h-full overflow-auto", mainClassName), children: main }),
45244
+ showSecondarySidebar && /* @__PURE__ */ jsx(
45245
+ Box,
45246
+ {
45247
+ className: cn(
45248
+ "flex-shrink-0 h-full overflow-auto border-l border-border",
45249
+ secondarySidebarClassName
45250
+ ),
45251
+ style: { width: secondarySidebarWidth },
45252
+ children: secondarySidebar
45253
+ }
45254
+ )
45255
+ ] });
45256
+ const sidebarAndCenter = showSidebar ? /* @__PURE__ */ jsx(
45257
+ SplitPane,
45258
+ {
45259
+ direction: "horizontal",
45260
+ ratio: sidebarWidth,
45261
+ onRatioChange: onSidebarWidthChange,
45262
+ minSize: sidebarMinSize,
45263
+ resizable: true,
45264
+ left: /* @__PURE__ */ jsx(Box, { className: cn("h-full overflow-auto", sidebarClassName), children: sidebar }),
45265
+ right: centerRow,
45266
+ className: "flex-1 min-h-0 min-w-0"
45267
+ }
45268
+ ) : centerRow;
45269
+ const body = /* @__PURE__ */ jsxs(HStack, { gap: "none", className: "flex-1 min-h-0 min-w-0", children: [
45270
+ rail && /* @__PURE__ */ jsx(
45271
+ Box,
45272
+ {
45273
+ className: cn(
45274
+ "flex-shrink-0 h-full overflow-auto border-r border-border",
45275
+ railClassName
45276
+ ),
45277
+ style: { width: railWidth },
45278
+ children: rail
45279
+ }
45280
+ ),
45281
+ sidebarAndCenter
45282
+ ] });
45283
+ const bodyPlusBottom = showBottomPanel ? /* @__PURE__ */ jsx(
45284
+ SplitPane,
45285
+ {
45286
+ direction: "vertical",
45287
+ ratio: 100 - bottomPanelHeight,
45288
+ onRatioChange: (topRatio) => onBottomPanelHeightChange?.(100 - topRatio),
45289
+ minSize: bottomPanelMinSize,
45290
+ resizable: true,
45291
+ left: body,
45292
+ right: /* @__PURE__ */ jsx(
45293
+ Box,
45294
+ {
45295
+ className: cn(
45296
+ "h-full overflow-auto border-t border-border",
45297
+ bottomPanelClassName
45298
+ ),
45299
+ children: bottomPanel
45300
+ }
45301
+ ),
45302
+ className: "flex-1 min-h-0"
45303
+ }
45304
+ ) : body;
45305
+ return /* @__PURE__ */ jsxs(VStack, { gap: "none", className: cn("w-full h-full overflow-hidden", className), children: [
45306
+ bodyPlusBottom,
45307
+ statusBar && /* @__PURE__ */ jsx(
45308
+ Box,
45309
+ {
45310
+ className: cn(
45311
+ "flex-shrink-0 border-t border-border bg-background",
45312
+ statusBarClassName
45313
+ ),
45314
+ children: statusBar
45315
+ }
45316
+ )
45317
+ ] });
45318
+ };
45319
+ DockLayout.displayName = "DockLayout";
45320
+ }
45321
+ });
44620
45322
  function extractTitle(children) {
44621
- if (!React77__default.isValidElement(children)) return void 0;
45323
+ if (!React78__default.isValidElement(children)) return void 0;
44622
45324
  const props = children.props;
44623
45325
  if (typeof props.title === "string") {
44624
45326
  return props.title;
@@ -44980,7 +45682,7 @@ var init_Form = __esm({
44980
45682
  const isSchemaEntity = isOrbitalEntitySchema(entity);
44981
45683
  const resolvedEntity = isSchemaEntity ? entity : void 0;
44982
45684
  const entityName = typeof entity === "string" ? entity : resolvedEntity?.name;
44983
- const normalizedInitialData = React77__default.useMemo(() => {
45685
+ const normalizedInitialData = React78__default.useMemo(() => {
44984
45686
  const entityRowAsInitial = isPlainEntityRow(entity) ? entity : void 0;
44985
45687
  const callerInitial = initialData !== null && typeof initialData === "object" && !Array.isArray(initialData) ? initialData : {};
44986
45688
  const merged = entityRowAsInitial !== void 0 ? { ...entityRowAsInitial, ...callerInitial } : callerInitial;
@@ -44999,7 +45701,7 @@ var init_Form = __esm({
44999
45701
  }
45000
45702
  return normalized;
45001
45703
  }, [entity, initialData]);
45002
- const entityDerivedFields = React77__default.useMemo(() => {
45704
+ const entityDerivedFields = React78__default.useMemo(() => {
45003
45705
  if (fields && fields.length > 0) return void 0;
45004
45706
  if (!resolvedEntity) return void 0;
45005
45707
  return resolvedEntity.fields.map(
@@ -45020,16 +45722,16 @@ var init_Form = __esm({
45020
45722
  const conditionalFields = typeof conditionalFieldsRaw === "boolean" ? {} : conditionalFieldsRaw;
45021
45723
  const hiddenCalculations = typeof hiddenCalculationsRaw === "boolean" ? [] : hiddenCalculationsRaw;
45022
45724
  const violationTriggers = typeof violationTriggersRaw === "boolean" ? [] : violationTriggersRaw;
45023
- const [formData, setFormData] = React77__default.useState(
45725
+ const [formData, setFormData] = React78__default.useState(
45024
45726
  normalizedInitialData
45025
45727
  );
45026
- const [collapsedSections, setCollapsedSections] = React77__default.useState(
45728
+ const [collapsedSections, setCollapsedSections] = React78__default.useState(
45027
45729
  /* @__PURE__ */ new Set()
45028
45730
  );
45029
- const [submitError, setSubmitError] = React77__default.useState(null);
45030
- const formRef = React77__default.useRef(null);
45731
+ const [submitError, setSubmitError] = React78__default.useState(null);
45732
+ const formRef = React78__default.useRef(null);
45031
45733
  const formMode = props.mode;
45032
- const mountedRef = React77__default.useRef(false);
45734
+ const mountedRef = React78__default.useRef(false);
45033
45735
  if (!mountedRef.current) {
45034
45736
  mountedRef.current = true;
45035
45737
  debug("forms", "mount", {
@@ -45042,7 +45744,7 @@ var init_Form = __esm({
45042
45744
  });
45043
45745
  }
45044
45746
  const shouldShowCancel = showCancel ?? (fields && fields.length > 0);
45045
- const evalContext = React77__default.useMemo(
45747
+ const evalContext = React78__default.useMemo(
45046
45748
  () => ({
45047
45749
  formValues: formData,
45048
45750
  globalVariables: externalContext?.globalVariables ?? {},
@@ -45051,7 +45753,7 @@ var init_Form = __esm({
45051
45753
  }),
45052
45754
  [formData, externalContext]
45053
45755
  );
45054
- React77__default.useEffect(() => {
45756
+ React78__default.useEffect(() => {
45055
45757
  debug("forms", "initialData-sync", {
45056
45758
  mode: formMode,
45057
45759
  normalizedInitialData,
@@ -45062,7 +45764,7 @@ var init_Form = __esm({
45062
45764
  setFormData(normalizedInitialData);
45063
45765
  }
45064
45766
  }, [normalizedInitialData]);
45065
- const processCalculations = React77__default.useCallback(
45767
+ const processCalculations = React78__default.useCallback(
45066
45768
  (changedFieldId, newFormData) => {
45067
45769
  if (!hiddenCalculations.length) return;
45068
45770
  const context = {
@@ -45087,7 +45789,7 @@ var init_Form = __esm({
45087
45789
  },
45088
45790
  [hiddenCalculations, externalContext, eventBus]
45089
45791
  );
45090
- const checkViolations = React77__default.useCallback(
45792
+ const checkViolations = React78__default.useCallback(
45091
45793
  (changedFieldId, newFormData) => {
45092
45794
  if (!violationTriggers.length) return;
45093
45795
  const context = {
@@ -45125,7 +45827,7 @@ var init_Form = __esm({
45125
45827
  processCalculations(name, newFormData);
45126
45828
  checkViolations(name, newFormData);
45127
45829
  };
45128
- const isFieldVisible = React77__default.useCallback(
45830
+ const isFieldVisible = React78__default.useCallback(
45129
45831
  (fieldName2) => {
45130
45832
  const condition = conditionalFields[fieldName2];
45131
45833
  if (!condition) return true;
@@ -45133,7 +45835,7 @@ var init_Form = __esm({
45133
45835
  },
45134
45836
  [conditionalFields, evalContext]
45135
45837
  );
45136
- const isSectionVisible = React77__default.useCallback(
45838
+ const isSectionVisible = React78__default.useCallback(
45137
45839
  (section) => {
45138
45840
  if (!section.condition) return true;
45139
45841
  return Boolean(evaluateFormExpression(section.condition, evalContext));
@@ -45209,7 +45911,7 @@ var init_Form = __esm({
45209
45911
  eventBus.emit(`UI:${onCancel}`);
45210
45912
  }
45211
45913
  };
45212
- const renderField = React77__default.useCallback(
45914
+ const renderField = React78__default.useCallback(
45213
45915
  (field) => {
45214
45916
  const fieldName2 = field.name || field.field;
45215
45917
  if (!fieldName2) return null;
@@ -45231,7 +45933,7 @@ var init_Form = __esm({
45231
45933
  [formData, isFieldVisible, relationsData, relationsLoading, isLoading]
45232
45934
  );
45233
45935
  const effectiveFields = entityDerivedFields ?? fields;
45234
- const normalizedFields = React77__default.useMemo(() => {
45936
+ const normalizedFields = React78__default.useMemo(() => {
45235
45937
  if (!effectiveFields || effectiveFields.length === 0) return [];
45236
45938
  return effectiveFields.map((field) => {
45237
45939
  if (typeof field === "string") {
@@ -45266,7 +45968,7 @@ var init_Form = __esm({
45266
45968
  };
45267
45969
  });
45268
45970
  }, [effectiveFields, resolvedEntity, fieldOverrides]);
45269
- const schemaFields = React77__default.useMemo(() => {
45971
+ const schemaFields = React78__default.useMemo(() => {
45270
45972
  if (normalizedFields.length === 0) return null;
45271
45973
  if (isDebugEnabled()) {
45272
45974
  debugGroup(`Form: ${entityName || "unknown"}`);
@@ -45276,7 +45978,7 @@ var init_Form = __esm({
45276
45978
  }
45277
45979
  return normalizedFields.map(renderField).filter(Boolean);
45278
45980
  }, [normalizedFields, renderField, entityName, conditionalFields]);
45279
- const sectionElements = React77__default.useMemo(() => {
45981
+ const sectionElements = React78__default.useMemo(() => {
45280
45982
  if (!sections || sections.length === 0) return null;
45281
45983
  return sections.map((section) => {
45282
45984
  if (!isSectionVisible(section)) {
@@ -46112,7 +46814,7 @@ var init_List = __esm({
46112
46814
  if (entity && typeof entity === "object" && "id" in entity) return [entity];
46113
46815
  return [];
46114
46816
  }, [entity]);
46115
- const getItemActions = React77__default.useCallback(
46817
+ const getItemActions = React78__default.useCallback(
46116
46818
  (item) => {
46117
46819
  if (!itemActions) return [];
46118
46820
  if (typeof itemActions === "function") {
@@ -46594,7 +47296,7 @@ var init_MediaGallery = __esm({
46594
47296
  [selectable, selectedItems, selectionEvent, eventBus]
46595
47297
  );
46596
47298
  const entityData = Array.isArray(entity) ? entity : [];
46597
- const items = React77__default.useMemo(() => {
47299
+ const items = React78__default.useMemo(() => {
46598
47300
  if (propItems && propItems.length > 0) return propItems;
46599
47301
  if (entityData.length === 0) return [];
46600
47302
  return entityData.map((record, idx) => {
@@ -46759,7 +47461,7 @@ var init_MediaGallery = __esm({
46759
47461
  }
46760
47462
  });
46761
47463
  function extractTitle2(children) {
46762
- if (!React77__default.isValidElement(children)) return void 0;
47464
+ if (!React78__default.isValidElement(children)) return void 0;
46763
47465
  const props = children.props;
46764
47466
  if (typeof props.title === "string") {
46765
47467
  return props.title;
@@ -47014,7 +47716,7 @@ var init_debugRegistry = __esm({
47014
47716
  }
47015
47717
  });
47016
47718
  function useDebugData() {
47017
- const [data, setData] = React77.useState(() => ({
47719
+ const [data, setData] = React78.useState(() => ({
47018
47720
  traits: [],
47019
47721
  ticks: [],
47020
47722
  guards: [],
@@ -47028,7 +47730,7 @@ function useDebugData() {
47028
47730
  },
47029
47731
  lastUpdate: Date.now()
47030
47732
  }));
47031
- React77.useEffect(() => {
47733
+ React78.useEffect(() => {
47032
47734
  const updateData = () => {
47033
47735
  setData({
47034
47736
  traits: getAllTraits(),
@@ -47137,12 +47839,12 @@ function layoutGraph(states, transitions, initialState, width, height) {
47137
47839
  return positions;
47138
47840
  }
47139
47841
  function WalkMinimap() {
47140
- const [walkStep, setWalkStep] = React77.useState(null);
47141
- const [traits2, setTraits] = React77.useState([]);
47142
- const [coveredEdges, setCoveredEdges] = React77.useState([]);
47143
- const [completedTraits, setCompletedTraits] = React77.useState(/* @__PURE__ */ new Set());
47144
- const prevTraitRef = React77.useRef(null);
47145
- React77.useEffect(() => {
47842
+ const [walkStep, setWalkStep] = React78.useState(null);
47843
+ const [traits2, setTraits] = React78.useState([]);
47844
+ const [coveredEdges, setCoveredEdges] = React78.useState([]);
47845
+ const [completedTraits, setCompletedTraits] = React78.useState(/* @__PURE__ */ new Set());
47846
+ const prevTraitRef = React78.useRef(null);
47847
+ React78.useEffect(() => {
47146
47848
  const interval = setInterval(() => {
47147
47849
  const w = window;
47148
47850
  const step = w.__orbitalWalkStep;
@@ -47578,15 +48280,15 @@ var init_EntitiesTab = __esm({
47578
48280
  });
47579
48281
  function EventFlowTab({ events: events2 }) {
47580
48282
  const { t } = useTranslate();
47581
- const [filter, setFilter] = React77.useState("all");
47582
- const containerRef = React77.useRef(null);
47583
- const [autoScroll, setAutoScroll] = React77.useState(true);
47584
- React77.useEffect(() => {
48283
+ const [filter, setFilter] = React78.useState("all");
48284
+ const containerRef = React78.useRef(null);
48285
+ const [autoScroll, setAutoScroll] = React78.useState(true);
48286
+ React78.useEffect(() => {
47585
48287
  if (autoScroll && containerRef.current) {
47586
48288
  containerRef.current.scrollTop = containerRef.current.scrollHeight;
47587
48289
  }
47588
48290
  }, [events2.length, autoScroll]);
47589
- const filteredEvents = React77.useMemo(() => {
48291
+ const filteredEvents = React78.useMemo(() => {
47590
48292
  if (filter === "all") return events2;
47591
48293
  return events2.filter((e) => e.type === filter);
47592
48294
  }, [events2, filter]);
@@ -47702,7 +48404,7 @@ var init_EventFlowTab = __esm({
47702
48404
  });
47703
48405
  function GuardsPanel({ guards }) {
47704
48406
  const { t } = useTranslate();
47705
- const [filter, setFilter] = React77.useState("all");
48407
+ const [filter, setFilter] = React78.useState("all");
47706
48408
  if (guards.length === 0) {
47707
48409
  return /* @__PURE__ */ jsx(
47708
48410
  EmptyState,
@@ -47715,7 +48417,7 @@ function GuardsPanel({ guards }) {
47715
48417
  }
47716
48418
  const passedCount = guards.filter((g) => g.result).length;
47717
48419
  const failedCount = guards.length - passedCount;
47718
- const filteredGuards = React77.useMemo(() => {
48420
+ const filteredGuards = React78.useMemo(() => {
47719
48421
  if (filter === "all") return guards;
47720
48422
  if (filter === "passed") return guards.filter((g) => g.result);
47721
48423
  return guards.filter((g) => !g.result);
@@ -47878,10 +48580,10 @@ function EffectBadge({ effect }) {
47878
48580
  }
47879
48581
  function TransitionTimeline({ transitions }) {
47880
48582
  const { t } = useTranslate();
47881
- const containerRef = React77.useRef(null);
47882
- const [autoScroll, setAutoScroll] = React77.useState(true);
47883
- const [expandedId, setExpandedId] = React77.useState(null);
47884
- React77.useEffect(() => {
48583
+ const containerRef = React78.useRef(null);
48584
+ const [autoScroll, setAutoScroll] = React78.useState(true);
48585
+ const [expandedId, setExpandedId] = React78.useState(null);
48586
+ React78.useEffect(() => {
47885
48587
  if (autoScroll && containerRef.current) {
47886
48588
  containerRef.current.scrollTop = containerRef.current.scrollHeight;
47887
48589
  }
@@ -48161,9 +48863,9 @@ function getAllEvents(traits2) {
48161
48863
  function EventDispatcherTab({ traits: traits2, schema }) {
48162
48864
  const eventBus = useEventBus();
48163
48865
  const { t } = useTranslate();
48164
- const [log19, setLog] = React77.useState([]);
48165
- const prevStatesRef = React77.useRef(/* @__PURE__ */ new Map());
48166
- React77.useEffect(() => {
48866
+ const [log19, setLog] = React78.useState([]);
48867
+ const prevStatesRef = React78.useRef(/* @__PURE__ */ new Map());
48868
+ React78.useEffect(() => {
48167
48869
  for (const trait of traits2) {
48168
48870
  const prev = prevStatesRef.current.get(trait.id);
48169
48871
  if (prev && prev !== trait.currentState) {
@@ -48332,10 +49034,10 @@ function VerifyModePanel({
48332
49034
  localCount
48333
49035
  }) {
48334
49036
  const { t } = useTranslate();
48335
- const [expanded, setExpanded] = React77.useState(true);
48336
- const scrollRef = React77.useRef(null);
48337
- const prevCountRef = React77.useRef(0);
48338
- React77.useEffect(() => {
49037
+ const [expanded, setExpanded] = React78.useState(true);
49038
+ const scrollRef = React78.useRef(null);
49039
+ const prevCountRef = React78.useRef(0);
49040
+ React78.useEffect(() => {
48339
49041
  if (expanded && transitions.length > prevCountRef.current && scrollRef.current) {
48340
49042
  scrollRef.current.scrollTop = scrollRef.current.scrollHeight;
48341
49043
  }
@@ -48392,10 +49094,10 @@ function RuntimeDebugger({
48392
49094
  schema
48393
49095
  }) {
48394
49096
  const { t } = useTranslate();
48395
- const [isCollapsed, setIsCollapsed] = React77.useState(mode === "verify" ? true : defaultCollapsed);
48396
- const [isVisible, setIsVisible] = React77.useState(mode === "inline" || mode === "verify" || isDebugEnabled2());
49097
+ const [isCollapsed, setIsCollapsed] = React78.useState(mode === "verify" ? true : defaultCollapsed);
49098
+ const [isVisible, setIsVisible] = React78.useState(mode === "inline" || mode === "verify" || isDebugEnabled2());
48397
49099
  const debugData = useDebugData();
48398
- React77.useEffect(() => {
49100
+ React78.useEffect(() => {
48399
49101
  if (mode === "inline") return;
48400
49102
  return onDebugToggle((enabled) => {
48401
49103
  setIsVisible(enabled);
@@ -48404,7 +49106,7 @@ function RuntimeDebugger({
48404
49106
  }
48405
49107
  });
48406
49108
  }, [mode]);
48407
- React77.useEffect(() => {
49109
+ React78.useEffect(() => {
48408
49110
  if (mode === "inline") return;
48409
49111
  const handleKeyDown = (e) => {
48410
49112
  if (e.key === "`" && isVisible) {
@@ -48419,7 +49121,7 @@ function RuntimeDebugger({
48419
49121
  if (!isVisible) {
48420
49122
  return null;
48421
49123
  }
48422
- const positionClasses = {
49124
+ const positionClasses2 = {
48423
49125
  "bottom-right": "bottom-4 right-4",
48424
49126
  "bottom-left": "bottom-4 left-4",
48425
49127
  "top-right": "top-4 right-4",
@@ -48548,7 +49250,7 @@ function RuntimeDebugger({
48548
49250
  className: cn(
48549
49251
  "runtime-debugger",
48550
49252
  "fixed",
48551
- positionClasses[position],
49253
+ positionClasses2[position],
48552
49254
  isCollapsed ? "runtime-debugger--collapsed" : "runtime-debugger--expanded",
48553
49255
  className
48554
49256
  ),
@@ -48630,6 +49332,7 @@ var init_SegmentRenderer = __esm({
48630
49332
  "use client";
48631
49333
  init_MarkdownContent();
48632
49334
  init_CodeBlock();
49335
+ init_MermaidDiagram();
48633
49336
  init_QuizBlock();
48634
49337
  init_ActivationBlock();
48635
49338
  init_ConnectionBlock();
@@ -48661,6 +49364,9 @@ var init_SegmentRenderer = __esm({
48661
49364
  return /* @__PURE__ */ jsx(MarkdownContent, { content: segment.content }, `md-${index}`);
48662
49365
  }
48663
49366
  if (segment.type === "code") {
49367
+ if (segment.language === "mermaid") {
49368
+ return /* @__PURE__ */ jsx(MermaidDiagram, { code: segment.content }, `code-${index}`);
49369
+ }
48664
49370
  if (segment.runnable && onRunCodeSimulation) {
48665
49371
  return /* @__PURE__ */ jsx(
48666
49372
  CodeRunnerPanel,
@@ -48793,99 +49499,6 @@ var init_ShowcaseOrganism = __esm({
48793
49499
  ShowcaseOrganism.displayName = "ShowcaseOrganism";
48794
49500
  }
48795
49501
  });
48796
- var SplitPane;
48797
- var init_SplitPane = __esm({
48798
- "components/core/organisms/layout/SplitPane.tsx"() {
48799
- "use client";
48800
- init_cn();
48801
- SplitPane = ({
48802
- direction = "horizontal",
48803
- ratio: initialRatio = 50,
48804
- minSize = 100,
48805
- resizable = true,
48806
- left,
48807
- right,
48808
- className,
48809
- leftClassName,
48810
- rightClassName
48811
- }) => {
48812
- const [ratio, setRatio] = useState(initialRatio);
48813
- const containerRef = useRef(null);
48814
- const isDragging = useRef(false);
48815
- const handlePointerDown = useCallback(
48816
- (e) => {
48817
- if (!resizable) return;
48818
- e.preventDefault();
48819
- isDragging.current = true;
48820
- e.currentTarget.setPointerCapture(e.pointerId);
48821
- const handlePointerMove = (ev) => {
48822
- if (!isDragging.current || !containerRef.current) return;
48823
- const rect = containerRef.current.getBoundingClientRect();
48824
- let newRatio;
48825
- if (direction === "horizontal") {
48826
- const x = ev.clientX - rect.left;
48827
- newRatio = x / rect.width * 100;
48828
- } else {
48829
- const y = ev.clientY - rect.top;
48830
- newRatio = y / rect.height * 100;
48831
- }
48832
- const minRatio = minSize / (direction === "horizontal" ? rect.width : rect.height) * 100;
48833
- const maxRatio = 100 - minRatio;
48834
- newRatio = Math.max(minRatio, Math.min(maxRatio, newRatio));
48835
- setRatio(newRatio);
48836
- };
48837
- const handlePointerUp = () => {
48838
- isDragging.current = false;
48839
- document.removeEventListener("pointermove", handlePointerMove);
48840
- document.removeEventListener("pointerup", handlePointerUp);
48841
- document.removeEventListener("pointercancel", handlePointerUp);
48842
- };
48843
- document.addEventListener("pointermove", handlePointerMove);
48844
- document.addEventListener("pointerup", handlePointerUp);
48845
- document.addEventListener("pointercancel", handlePointerUp);
48846
- },
48847
- [direction, minSize, resizable]
48848
- );
48849
- const isHorizontal = direction === "horizontal";
48850
- return /* @__PURE__ */ jsxs(
48851
- "div",
48852
- {
48853
- ref: containerRef,
48854
- className: cn(
48855
- "flex w-full h-full",
48856
- isHorizontal ? "flex-row" : "flex-col",
48857
- className
48858
- ),
48859
- children: [
48860
- /* @__PURE__ */ jsx(
48861
- "div",
48862
- {
48863
- className: cn("overflow-auto", leftClassName),
48864
- style: {
48865
- [isHorizontal ? "width" : "height"]: `${ratio}%`,
48866
- flexShrink: 0
48867
- },
48868
- children: left
48869
- }
48870
- ),
48871
- resizable && /* @__PURE__ */ jsx(
48872
- "div",
48873
- {
48874
- onPointerDown: handlePointerDown,
48875
- className: cn(
48876
- "flex-shrink-0 bg-border transition-colors touch-none",
48877
- 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"
48878
- )
48879
- }
48880
- ),
48881
- /* @__PURE__ */ jsx("div", { className: cn("flex-1 overflow-auto", rightClassName), children: right })
48882
- ]
48883
- }
48884
- );
48885
- };
48886
- SplitPane.displayName = "SplitPane";
48887
- }
48888
- });
48889
49502
  var StatCard;
48890
49503
  var init_StatCard = __esm({
48891
49504
  "components/core/organisms/StatCard.tsx"() {
@@ -48924,7 +49537,7 @@ var init_StatCard = __esm({
48924
49537
  const labelToUse = propLabel ?? propTitle;
48925
49538
  const eventBus = useEventBus();
48926
49539
  const { t } = useTranslate();
48927
- const handleActionClick = React77__default.useCallback(() => {
49540
+ const handleActionClick = React78__default.useCallback(() => {
48928
49541
  if (action?.event) {
48929
49542
  eventBus.emit(`UI:${action.event}`, {});
48930
49543
  }
@@ -48935,7 +49548,7 @@ var init_StatCard = __esm({
48935
49548
  const data = Array.isArray(entity) ? entity : entity ? [entity] : [];
48936
49549
  const isLoading = externalLoading ?? false;
48937
49550
  const error = externalError;
48938
- const computeMetricValue = React77__default.useCallback(
49551
+ const computeMetricValue = React78__default.useCallback(
48939
49552
  (metric, items) => {
48940
49553
  if (metric.value !== void 0) {
48941
49554
  return metric.value;
@@ -48974,7 +49587,7 @@ var init_StatCard = __esm({
48974
49587
  },
48975
49588
  []
48976
49589
  );
48977
- const schemaStats = React77__default.useMemo(() => {
49590
+ const schemaStats = React78__default.useMemo(() => {
48978
49591
  if (!metrics || metrics.length === 0) return null;
48979
49592
  return metrics.map((metric) => ({
48980
49593
  label: metric.label,
@@ -48982,7 +49595,7 @@ var init_StatCard = __esm({
48982
49595
  format: metric.format
48983
49596
  }));
48984
49597
  }, [metrics, data, computeMetricValue]);
48985
- const calculatedTrend = React77__default.useMemo(() => {
49598
+ const calculatedTrend = React78__default.useMemo(() => {
48986
49599
  if (manualTrend !== void 0) return manualTrend;
48987
49600
  if (previousValue === void 0 || currentValue2 === void 0)
48988
49601
  return void 0;
@@ -49622,8 +50235,8 @@ var init_SubagentTracePanel = __esm({
49622
50235
  ] });
49623
50236
  };
49624
50237
  InlineActivityStream = ({ activities, autoScroll = true, className }) => {
49625
- const endRef = React77__default.useRef(null);
49626
- React77__default.useEffect(() => {
50238
+ const endRef = React78__default.useRef(null);
50239
+ React78__default.useEffect(() => {
49627
50240
  if (!autoScroll) return;
49628
50241
  endRef.current?.scrollIntoView({ behavior: "smooth", block: "end" });
49629
50242
  }, [activities.length, autoScroll]);
@@ -49717,7 +50330,7 @@ var init_SubagentTracePanel = __esm({
49717
50330
  };
49718
50331
  SubagentRichCard = ({ subagent }) => {
49719
50332
  const { t } = useTranslate();
49720
- const activities = React77__default.useMemo(
50333
+ const activities = React78__default.useMemo(
49721
50334
  () => subagentMessagesToActivities(subagent.messages),
49722
50335
  [subagent.messages]
49723
50336
  );
@@ -49794,8 +50407,8 @@ var init_SubagentTracePanel = __esm({
49794
50407
  ] });
49795
50408
  };
49796
50409
  CoordinatorConversation = ({ messages, autoScroll = true, className }) => {
49797
- const endRef = React77__default.useRef(null);
49798
- React77__default.useEffect(() => {
50410
+ const endRef = React78__default.useRef(null);
50411
+ React78__default.useEffect(() => {
49799
50412
  if (!autoScroll) return;
49800
50413
  endRef.current?.scrollIntoView({ behavior: "smooth", block: "end" });
49801
50414
  }, [messages.length, autoScroll]);
@@ -50230,7 +50843,7 @@ var init_Timeline = __esm({
50230
50843
  }) => {
50231
50844
  const { t } = useTranslate();
50232
50845
  const entityData = entity ?? [];
50233
- const items = React77__default.useMemo(() => {
50846
+ const items = React78__default.useMemo(() => {
50234
50847
  if (propItems) return propItems;
50235
50848
  if (entityData.length === 0) return [];
50236
50849
  return entityData.map((record, idx) => {
@@ -50332,7 +50945,7 @@ var init_Timeline = __esm({
50332
50945
  }
50333
50946
  });
50334
50947
  function extractToastProps(children) {
50335
- if (!React77__default.isValidElement(children)) {
50948
+ if (!React78__default.isValidElement(children)) {
50336
50949
  if (typeof children === "string") {
50337
50950
  return { message: children };
50338
50951
  }
@@ -50374,7 +50987,7 @@ var init_ToastSlot = __esm({
50374
50987
  eventBus.emit(`${prefix}CLOSE`);
50375
50988
  };
50376
50989
  if (!isVisible) return null;
50377
- const isCustomContent = React77__default.isValidElement(children) && !message;
50990
+ const isCustomContent = React78__default.isValidElement(children) && !message;
50378
50991
  return /* @__PURE__ */ jsx(Box, { className: "fixed bottom-4 right-4 z-50", children: isCustomContent ? children : /* @__PURE__ */ jsx(
50379
50992
  Toast,
50380
50993
  {
@@ -50469,6 +51082,7 @@ var init_component_registry_generated = __esm({
50469
51082
  init_DocSearch();
50470
51083
  init_DocSidebar();
50471
51084
  init_DocTOC();
51085
+ init_DockLayout();
50472
51086
  init_DocumentDetails();
50473
51087
  init_DocumentPanel();
50474
51088
  init_DocumentViewer();
@@ -50499,6 +51113,7 @@ var init_component_registry_generated = __esm({
50499
51113
  init_FlipCard();
50500
51114
  init_FlipContainer();
50501
51115
  init_FloatingActionButton();
51116
+ init_FloatingToolbar();
50502
51117
  init_Form();
50503
51118
  init_FormField();
50504
51119
  init_FormSection();
@@ -50743,6 +51358,7 @@ var init_component_registry_generated = __esm({
50743
51358
  "DocSearch": DocSearch,
50744
51359
  "DocSidebar": DocSidebar,
50745
51360
  "DocTOC": DocTOC,
51361
+ "DockLayout": DockLayout,
50746
51362
  "DocumentDetails": DocumentDetails,
50747
51363
  "DocumentPanel": DocumentPanel,
50748
51364
  "DocumentViewer": DocumentViewer,
@@ -50773,6 +51389,7 @@ var init_component_registry_generated = __esm({
50773
51389
  "FlipCard": FlipCard,
50774
51390
  "FlipContainer": FlipContainer,
50775
51391
  "FloatingActionButton": FloatingActionButton,
51392
+ "FloatingToolbar": FloatingToolbar,
50776
51393
  "Form": Form,
50777
51394
  "FormField": FormField,
50778
51395
  "FormLayout": FormLayout,
@@ -50960,7 +51577,7 @@ function SuspenseConfigProvider({
50960
51577
  config,
50961
51578
  children
50962
51579
  }) {
50963
- return React77__default.createElement(
51580
+ return React78__default.createElement(
50964
51581
  SuspenseConfigContext.Provider,
50965
51582
  { value: config },
50966
51583
  children
@@ -51008,7 +51625,7 @@ function enrichFormFields(fields, entityDef) {
51008
51625
  }
51009
51626
  return { name: field, label: humanizeFieldName(field) };
51010
51627
  }
51011
- if (field && typeof field === "object" && !Array.isArray(field) && !React77__default.isValidElement(field) && !(field instanceof Date)) {
51628
+ if (field && typeof field === "object" && !Array.isArray(field) && !React78__default.isValidElement(field) && !(field instanceof Date)) {
51012
51629
  const obj = field;
51013
51630
  const fieldName2 = typeof obj.name === "string" ? obj.name : typeof obj.field === "string" ? obj.field : void 0;
51014
51631
  if (!fieldName2) return field;
@@ -51061,7 +51678,7 @@ function enrichDetailFields(fields, entityDef) {
51061
51678
  const meta = metaFor(field);
51062
51679
  return meta ? { key: field, ...meta } : field;
51063
51680
  }
51064
- if (field && typeof field === "object" && !Array.isArray(field) && !React77__default.isValidElement(field) && !(field instanceof Date)) {
51681
+ if (field && typeof field === "object" && !Array.isArray(field) && !React78__default.isValidElement(field) && !(field instanceof Date)) {
51065
51682
  const obj = field;
51066
51683
  const fieldName2 = typeof obj.key === "string" ? obj.key : typeof obj.name === "string" ? obj.name : void 0;
51067
51684
  if (!fieldName2 || obj.type) return field;
@@ -51520,7 +52137,7 @@ function renderPatternChildren(children, onDismiss, parentId = "root", parentPat
51520
52137
  const key = `${parentId}-${index}-trait:${traitName}`;
51521
52138
  return /* @__PURE__ */ jsx(TraitFrame, { traitName }, key);
51522
52139
  }
51523
- return /* @__PURE__ */ jsx(React77__default.Fragment, { children: child }, `${parentId}-${index}`);
52140
+ return /* @__PURE__ */ jsx(React78__default.Fragment, { children: child }, `${parentId}-${index}`);
51524
52141
  }
51525
52142
  if (!child || typeof child !== "object") return null;
51526
52143
  const childId = `${parentId}-${index}`;
@@ -51577,7 +52194,7 @@ function isPatternConfig(value) {
51577
52194
  if (value === null || value === void 0) return false;
51578
52195
  if (typeof value !== "object") return false;
51579
52196
  if (Array.isArray(value)) return false;
51580
- if (React77__default.isValidElement(value)) return false;
52197
+ if (React78__default.isValidElement(value)) return false;
51581
52198
  if (value instanceof Date) return false;
51582
52199
  if (typeof value === "function") return false;
51583
52200
  const record = value;
@@ -51590,9 +52207,9 @@ function renderPatternValue(value) {
51590
52207
  if (typeof value === "string") return renderPatternChildren(value, () => {
51591
52208
  });
51592
52209
  if (value instanceof Date) return value.toLocaleString();
51593
- if (React77__default.isValidElement(value)) return value;
52210
+ if (React78__default.isValidElement(value)) return value;
51594
52211
  if (Array.isArray(value)) {
51595
- return value.map((item, index) => /* @__PURE__ */ jsx(React77__default.Fragment, { children: renderPatternValue(item) }, index));
52212
+ return value.map((item, index) => /* @__PURE__ */ jsx(React78__default.Fragment, { children: renderPatternValue(item) }, index));
51596
52213
  }
51597
52214
  if (isPatternConfig(value)) {
51598
52215
  const { type, ...props } = value;
@@ -51602,7 +52219,7 @@ function renderPatternValue(value) {
51602
52219
  return null;
51603
52220
  }
51604
52221
  function isPlainConfigObject(value) {
51605
- if (React77__default.isValidElement(value)) return false;
52222
+ if (React78__default.isValidElement(value)) return false;
51606
52223
  if (value instanceof Date) return false;
51607
52224
  const proto = Object.getPrototypeOf(value);
51608
52225
  return proto === Object.prototype || proto === null;
@@ -51776,7 +52393,7 @@ function SlotContentRenderer({
51776
52393
  for (const slotKey of CONTENT_NODE_SLOTS) {
51777
52394
  const slotVal = restProps[slotKey];
51778
52395
  if (slotVal === void 0 || slotVal === null) continue;
51779
- if (React77__default.isValidElement(slotVal) || typeof slotVal === "string" || typeof slotVal === "number" || typeof slotVal === "boolean") continue;
52396
+ if (React78__default.isValidElement(slotVal) || typeof slotVal === "string" || typeof slotVal === "number" || typeof slotVal === "boolean") continue;
51780
52397
  const typelessChildren = !Array.isArray(slotVal) && typeof slotVal === "object" && !("type" in slotVal) && Array.isArray(slotVal.children) ? slotVal.children : void 0;
51781
52398
  if (typelessChildren !== void 0 || Array.isArray(slotVal) || typeof slotVal === "object" && "type" in slotVal) {
51782
52399
  nodeSlotOverrides[slotKey] = renderPatternChildren(
@@ -51830,7 +52447,7 @@ function SlotContentRenderer({
51830
52447
  const resolvedItems = Array.isArray(entityVal) && entityVal[0] !== "fn" ? entityVal : null;
51831
52448
  if (resolvedItems && resolvedItems.length > 0 && !finalProps.fields && !finalProps.columns) {
51832
52449
  const sample = resolvedItems[0];
51833
- if (sample && typeof sample === "object" && !Array.isArray(sample) && !React77__default.isValidElement(sample) && !(sample instanceof Date)) {
52450
+ if (sample && typeof sample === "object" && !Array.isArray(sample) && !React78__default.isValidElement(sample) && !(sample instanceof Date)) {
51834
52451
  const keys = Object.keys(sample).filter((k) => k !== "id" && k !== "_id");
51835
52452
  finalProps.fields = keys.map((k, i) => ({ name: k, variant: i === 0 ? "h4" : "body" }));
51836
52453
  }
@@ -52163,6 +52780,7 @@ init_SplitPane();
52163
52780
  init_MasterDetailLayout();
52164
52781
  init_DashboardGrid();
52165
52782
  init_TabbedContainer();
52783
+ init_DockLayout();
52166
52784
 
52167
52785
  // components/core/organisms/index.ts
52168
52786
  init_molecules();
@@ -53163,7 +53781,7 @@ function expressionEqual(a, b) {
53163
53781
  function isPlainSlotObject(value) {
53164
53782
  if (value === null || value === void 0 || typeof value !== "object") return false;
53165
53783
  if (Array.isArray(value)) return false;
53166
- if (React77__default.isValidElement(value)) return false;
53784
+ if (React78__default.isValidElement(value)) return false;
53167
53785
  if (value instanceof Date) return false;
53168
53786
  if (isRenderBindingMarker(value)) return false;
53169
53787
  return true;
@@ -53182,7 +53800,7 @@ function shareValue(prev, next) {
53182
53800
  return prev instanceof Date && next instanceof Date && prev.getTime() === next.getTime() ? { value: prev, equal: true } : { value: next, equal: false };
53183
53801
  }
53184
53802
  if (typeof prev === "function" || typeof next === "function") return { value: next, equal: false };
53185
- if (React77__default.isValidElement(prev) || React77__default.isValidElement(next)) return { value: next, equal: false };
53803
+ if (React78__default.isValidElement(prev) || React78__default.isValidElement(next)) return { value: next, equal: false };
53186
53804
  if (Array.isArray(prev) && Array.isArray(next)) {
53187
53805
  let equal = prev.length === next.length;
53188
53806
  const out = new Array(next.length);
@@ -54091,6 +54709,8 @@ var en_default = {
54091
54709
  "orbInspector.tokenGroup.shadows": "Shadows",
54092
54710
  "orbInspector.tab.inspector": "Inspector",
54093
54711
  "orbInspector.tab.styles": "Styles",
54712
+ "orbInspector.tab.design": "Design",
54713
+ "orbInspector.tab.prototype": "Prototype",
54094
54714
  "orbInspector.tab.code": "Code",
54095
54715
  "canvas.goBackToOverview": "Go back to overview",
54096
54716
  "canvas.overview": "Overview",
@@ -54330,104 +54950,8 @@ init_useInfiniteScroll();
54330
54950
  init_usePullToRefresh();
54331
54951
  init_useCanvasGestures();
54332
54952
  init_useTapReveal();
54333
-
54334
- // hooks/useDraggable.ts
54335
- init_useEventBus();
54336
- var ALMADAR_DND_MIME = "application/x-almadar-dnd";
54337
- function useDraggable({ payload, disabled = false }) {
54338
- const [isDragging, setIsDragging] = useState(false);
54339
- const eventBus = useEventBus();
54340
- const handleDragStart = useCallback(
54341
- (e) => {
54342
- if (disabled) {
54343
- e.preventDefault();
54344
- return;
54345
- }
54346
- e.dataTransfer.setData(ALMADAR_DND_MIME, JSON.stringify(payload));
54347
- e.dataTransfer.effectAllowed = "copy";
54348
- setIsDragging(true);
54349
- eventBus.emit("UI:DRAG_START", { kind: payload.kind, data: payload.data });
54350
- },
54351
- [disabled, payload, eventBus]
54352
- );
54353
- const handleDragEnd = useCallback(
54354
- (e) => {
54355
- setIsDragging(false);
54356
- eventBus.emit("UI:DRAG_END", { kind: payload.kind, data: payload.data });
54357
- },
54358
- [payload, eventBus]
54359
- );
54360
- const dragProps = useMemo(
54361
- () => ({
54362
- draggable: !disabled,
54363
- onDragStart: handleDragStart,
54364
- onDragEnd: handleDragEnd,
54365
- "aria-grabbed": isDragging
54366
- }),
54367
- [disabled, handleDragStart, handleDragEnd, isDragging]
54368
- );
54369
- return { dragProps, isDragging };
54370
- }
54371
-
54372
- // hooks/useDropZone.ts
54373
- init_useEventBus();
54374
- function parsePayload(e) {
54375
- try {
54376
- const raw = e.dataTransfer.getData(ALMADAR_DND_MIME);
54377
- if (!raw) return null;
54378
- const parsed = JSON.parse(raw);
54379
- if (typeof parsed.kind !== "string" || !parsed.data) return null;
54380
- return parsed;
54381
- } catch {
54382
- return null;
54383
- }
54384
- }
54385
- function hasAlmadarPayload(e) {
54386
- return e.dataTransfer.types.includes(ALMADAR_DND_MIME);
54387
- }
54388
- function useDropZone({ accepts, onDrop, disabled = false }) {
54389
- const [isOver, setIsOver] = useState(false);
54390
- const eventBus = useEventBus();
54391
- const handleDragOver = useCallback(
54392
- (e) => {
54393
- if (disabled) return;
54394
- if (!hasAlmadarPayload(e)) return;
54395
- e.preventDefault();
54396
- e.dataTransfer.dropEffect = "copy";
54397
- setIsOver(true);
54398
- },
54399
- [disabled]
54400
- );
54401
- const handleDragLeave = useCallback(
54402
- (e) => {
54403
- setIsOver(false);
54404
- },
54405
- []
54406
- );
54407
- const handleDrop = useCallback(
54408
- (e) => {
54409
- e.preventDefault();
54410
- setIsOver(false);
54411
- if (disabled) return;
54412
- const payload = parsePayload(e);
54413
- if (!payload) return;
54414
- if (!accepts.includes(payload.kind)) return;
54415
- const position = { x: e.clientX, y: e.clientY };
54416
- onDrop(payload, position);
54417
- eventBus.emit("UI:DROP", { kind: payload.kind, data: payload.data, ...position });
54418
- },
54419
- [disabled, accepts, onDrop, eventBus]
54420
- );
54421
- const dropProps = useMemo(
54422
- () => ({
54423
- onDragOver: handleDragOver,
54424
- onDragLeave: handleDragLeave,
54425
- onDrop: handleDrop
54426
- }),
54427
- [handleDragOver, handleDragLeave, handleDrop]
54428
- );
54429
- return { dropProps, isOver };
54430
- }
54953
+ init_useDraggable();
54954
+ init_useDropZone();
54431
54955
  function useRenderInterpolation(options = {}) {
54432
54956
  const tickIntervalMs = options.tickIntervalMs ?? 1e3 / 30;
54433
54957
  const prevRef = useRef(null);
@@ -54571,4 +55095,4 @@ function useGitHubBranches(owner, repo, enabled = true) {
54571
55095
  });
54572
55096
  }
54573
55097
 
54574
- export { ALL_PRESETS, ALMADAR_DND_MIME, AR_BOOK_FIELDS, AboutPageTemplate, Accordion, Card2 as ActionCard, ActionPalette, ActionTile, ActivationBlock, Alert, AlgoGraphCanvas, AlgorithmCanvas, AnimatedCounter, AnimatedGraphic, AnimatedReveal, ArticleSection, Aside, AssetPicker, AtlasImage, AtlasPanel, AuthLayout, Avatar, Badge, BehaviorView, BiologyCanvas, BloomQuizBlock, BookChapterView, BookCoverPage, BookNavBar, BookTableOfContents, BookViewer, Box, BranchingLogicBuilder, Breadcrumb, Button, ButtonGroup, CTABanner, CalendarGrid, Canvas, Canvas2D, Card, CardBody, CardContent, CardFooter, CardGrid, CardHeader, CardTitle, Carousel, CaseStudyCard, CaseStudyOrganism, Center, Chart, ChartLegend, ChatBar, Checkbox, ChemistryCanvas, ChoiceButton, Coachmark, CodeBlock, CodeRunnerPanel, CollapsibleSection, CommunityLinks, ConditionalWrapper, ConfettiEffect, ConfirmDialog, ConnectionBlock, Container, ContentRenderer, ContentSection, ControlButton, ControlGrid, CounterTemplate, DEFAULT_LIKERT_OPTIONS, DEFAULT_MATRIX_COLUMNS, DEFAULT_SLOTS, DIAMOND_TOP_Y, DashboardGrid, DashboardLayout, DataGrid, DataList, DataTable, DateRangePicker, DateRangeSelector, DayCell, DetailPanel, Dialog, DialogueBubble, Divider, DocBreadcrumb, DocPagination, DocSearch, DocSidebar, DocTOC, DocumentDetails, DocumentPanel, DocumentViewer, StateMachineView as DomStateMachineVisualizer, Drawer, DrawerSlot, ELEMENT_SELECTED_EVENT, EdgeDecoration, EditorCheckbox, EditorSelect, EditorSlider, EditorTextInput, EditorToolbar, EmojiPicker, EmptyState, EntityDisplayEvents, ErrorBoundary, ErrorState, FEATURE_COLORS, FEATURE_TYPES, FLOOR_HEIGHT, FeatureCard, FeatureDetailPageTemplate, FeatureGrid, FeatureGridOrganism, FileTree, FilterGroup, FilterPill, Flex, FlipCard, FlipContainer, FloatingActionButton, Form, FormActions, FormField, FormLayout, FormSection, FormSectionHeader, FxOverlay, GameAudioToggle, GameHud, GameIcon, GameMenu, GameShell, GenericAppTemplate, GeometricPattern, GradientDivider, GraphCanvas, GraphView, Grid, GridPicker, HStack, Header, HealthBar, HeroOrganism, HeroSection, I18nProvider, IDENTITY_BOOK_FIELDS, Icon, IconPicker, ImportPreviewTree, ImportProgress, ImportSourcePicker, InfiniteScrollSentinel, Input, InputGroup, InstallBox, JazariStateMachine, JsonTreeEditor, Label, LandingPageTemplate, LawReferenceTooltip, LearningCanvas, LearningScene3D, Lightbox, LikertScale, LineChart2 as LineChart, List3 as List, LoadingState, MapView, MarkdownContent, MarketingFooter, MarketingStatCard, MasterDetail, MasterDetailLayout, MathCanvas, MatrixQuestion, MediaGallery, Menu, Meter, Modal, ModalSlot, ModuleCard, Navigation, NodeSlotEditor, NotifyListener, NumberStepper, OnboardingSpotlight, OptionConstraintGroup, StateMachineView as OrbitalStateMachineView, OrbitalVisualization, Overlay, PageHeader, PageTransition, Pagination, PatternTile, PhysicsCanvas, Popover, PositionedCanvas, Presence, PricingCard, PricingGrid, PricingOrganism, PricingPageTemplate, ProgressBar, ProgressDots, PropertyInspector, PullQuote, PullToRefresh, QrScanner, QuizBlock, Radio, RangeSlider, ReflectionBlock, RelationSelect, RepeatableFormSection, ReplyTree, RichTextEditor, RuntimeDebugger, SHEET_COLUMNS, SPRITE_SHEET_LAYOUT, ScaledDiagram, ScoreDisplay, SearchInput, Section, SectionHeader, SegmentRenderer, Select, SequenceBar, ServiceCatalog, SharedEntityStoreContext, ShowcaseCard, ShowcaseOrganism, SidePanel, Sidebar, SignaturePad, SimpleGrid, Skeleton, SlotContentRenderer, SocialProof, SortableList, Spacer, Sparkline, Spinner, Split, SplitPane, SplitSection, Stack, StarRating, StatBadge, StatCard, StatDisplay, StateGraph, StateJsonView, StateMachineView, StateNode2 as StateNode, StatsGrid, StatsOrganism, StatusBar, StatusDot, StepFlow, StepFlowOrganism, SubagentTracePanel, SvgBranch, SvgConnection, SvgFlow, SvgGrid, SvgLobe, SvgMesh, SvgMorph, SvgNode, SvgPulse, SvgRing, SvgShield, SvgStack, SwipeableRow, Switch, TERRAIN_COLORS, TILE_HEIGHT, TILE_WIDTH, TabbedContainer, TableView, Tabs, TagCloud, TagInput, TeamCard, TeamOrganism, TerrainPalette, TextHighlight, Textarea, ThemeToggle, TimeSlotCell, Timeline, TimerDisplay, Toast, ToastSlot, Tooltip, TraitFrame, TraitSlot, TraitStateViewer, TransitionArrow, TrendIndicator, TypewriterText, Typography, UISlotComponent, UISlotRenderer, UploadDropZone, VStack, VersionDiff, ViolationAlert, VoteStack, WizardContainer, WizardNavigation, WizardProgress, arrowBetween, billboardLabel, boardEntity, bool, calculateAttackTargets, calculateValidMoves, cn, createInitialGameState, createSharedEntityStore, createTranslate, createUnitAnimationState, cylinderBetween, get3DClickPayload, getCurrentFrame, getTileDimensions, inferDirection, isoToScreen, makeAsset, makeAssetMap, mapBookData, meshSphere, num, objAvailableActions, objAvailableEvents, objCurrentState, objIcon, objId, objMaxRules, objName, objRules, objStates, parseEditFocus, parseLessonSegments, parseMarkdownWithCodeBlocks, parseQueryBinding, pendulum, projectileMotion, registerCodeLanguageLoader, renderPatternValue, resolveFieldMap, resolveFrame, resolveSheetDirection, rows, runTickFrame, sanitizeRichHtml, screenToIso, springOscillator, str, tickAnimationState, toCodeLanguage, transitionAnimation, unitHealth, unitPosition, unitTeam, useAgentChat, useAnchorRect, useAtlasSliceDataUrl, useAuthContext, useCamera, useCanvasGestures, useCompile, useConnectGitHub, useDeepAgentGeneration, useDisconnectGitHub, useDragReorder, useDraggable, useDropZone, useEmitEvent, useEventBus, useEventListener, useExtensions, useFileEditor, useFileSystem, useGameAudio, useGitHubBranches, useGitHubRepo, useGitHubRepos, useGitHubStatus, useImageCache, useInfiniteScroll, useLongPress, useMediaQuery, useOrbitalHistory, usePresence, usePreview, usePullToRefresh, useQuerySingleton, useRenderInterpolation, useSharedEntitySnapshot, useSharedEntityStore, useSharedEntityStoreContext, useSwipeGesture, useTapReveal, useTraitListens, useTranslate116 as useTranslate, useUIEvents, useUISlotManager, useUnitSpriteAtlas, useValidation, vec2 };
55098
+ export { ALL_PRESETS, ALMADAR_DND_MIME, AR_BOOK_FIELDS, AboutPageTemplate, Accordion, Card2 as ActionCard, ActionPalette, ActionTile, ActivationBlock, Alert, AlgoGraphCanvas, AlgorithmCanvas, AnimatedCounter, AnimatedGraphic, AnimatedReveal, ArticleSection, Aside, AssetPicker, AtlasImage, AtlasPanel, AuthLayout, Avatar, Badge, BehaviorView, BiologyCanvas, BloomQuizBlock, BookChapterView, BookCoverPage, BookNavBar, BookTableOfContents, BookViewer, Box, BranchingLogicBuilder, Breadcrumb, Button, ButtonGroup, CTABanner, CalendarGrid, Canvas, Canvas2D, Card, CardBody, CardContent, CardFooter, CardGrid, CardHeader, CardTitle, Carousel, CaseStudyCard, CaseStudyOrganism, Center, Chart, ChartLegend, ChatBar, Checkbox, ChemistryCanvas, ChoiceButton, Coachmark, CodeBlock, CodeRunnerPanel, CollapsibleSection, CommandPalette, CommunityLinks, ConditionalWrapper, ConfettiEffect, ConfirmDialog, ConnectionBlock, Container, ContentRenderer, ContentSection, ControlButton, ControlGrid, CounterTemplate, DEFAULT_LIKERT_OPTIONS, DEFAULT_MATRIX_COLUMNS, DEFAULT_SLOTS, DIAMOND_TOP_Y, DashboardGrid, DashboardLayout, DataGrid, DataList, DataTable, DateRangePicker, DateRangeSelector, DayCell, DetailPanel, Dialog, DialogueBubble, Divider, DocBreadcrumb, DocPagination, DocSearch, DocSidebar, DocTOC, DockLayout, DocumentDetails, DocumentPanel, DocumentViewer, StateMachineView as DomStateMachineVisualizer, Drawer, DrawerSlot, ELEMENT_SELECTED_EVENT, EdgeDecoration, EditorCheckbox, EditorSelect, EditorSlider, EditorTextInput, EditorToolbar, EmojiPicker, EmptyState, EntityDisplayEvents, ErrorBoundary, ErrorState, FEATURE_COLORS, FEATURE_TYPES, FLOOR_HEIGHT, FeatureCard, FeatureDetailPageTemplate, FeatureGrid, FeatureGridOrganism, FileTree, FilterGroup, FilterPill, Flex, FlipCard, FlipContainer, FloatingActionButton, FloatingToolbar, Form, FormActions, FormField, FormLayout, FormSection, FormSectionHeader, FxOverlay, GameAudioToggle, GameHud, GameIcon, GameMenu, GameShell, GenericAppTemplate, GeometricPattern, GradientDivider, GraphCanvas, GraphView, Grid, GridPicker, HStack, Header, HealthBar, HeroOrganism, HeroSection, I18nProvider, IDENTITY_BOOK_FIELDS, Icon, IconPicker, ImportPreviewTree, ImportProgress, ImportSourcePicker, InfiniteScrollSentinel, Input, InputGroup, InstallBox, JazariStateMachine, JsonTreeEditor, Label, LandingPageTemplate, LawReferenceTooltip, LearningCanvas, LearningScene3D, Lightbox, LikertScale, LineChart2 as LineChart, List3 as List, LoadingState, MapView, MarkdownContent, MarketingFooter, MarketingStatCard, MasterDetail, MasterDetailLayout, MathCanvas, MatrixQuestion, MediaGallery, Menu, Meter, Modal, ModalSlot, ModuleCard, Navigation, NodeSlotEditor, NotifyListener, NumberStepper, OnboardingSpotlight, OptionConstraintGroup, StateMachineView as OrbitalStateMachineView, OrbitalVisualization, Overlay, PageHeader, PageTransition, Pagination, PatternTile, PhysicsCanvas, Popover, PositionedCanvas, Presence, PricingCard, PricingGrid, PricingOrganism, PricingPageTemplate, ProgressBar, ProgressDots, PropertyInspector, PullQuote, PullToRefresh, QrScanner, QuizBlock, Radio, RangeSlider, ReflectionBlock, RelationSelect, RepeatableFormSection, ReplyTree, RichTextEditor, RuntimeDebugger, SHEET_COLUMNS, SPRITE_SHEET_LAYOUT, ScaledDiagram, ScoreDisplay, SearchInput, Section, SectionHeader, SegmentRenderer, Select, SequenceBar, ServiceCatalog, SharedEntityStoreContext, ShowcaseCard, ShowcaseOrganism, SidePanel, Sidebar, SignaturePad, SimpleGrid, Skeleton, SlotContentRenderer, SocialProof, SortableList, Spacer, Sparkline, Spinner, Split, SplitPane, SplitSection, Stack, StarRating, StatBadge, StatCard, StatDisplay, StateGraph, StateJsonView, StateMachineView, StateNode2 as StateNode, StatsGrid, StatsOrganism, StatusBar, StatusDot, StepFlow, StepFlowOrganism, SubagentTracePanel, SvgBranch, SvgConnection, SvgFlow, SvgGrid, SvgLobe, SvgMesh, SvgMorph, SvgNode, SvgPulse, SvgRing, SvgShield, SvgStack, SwipeableRow, Switch, TERRAIN_COLORS, TILE_HEIGHT, TILE_WIDTH, TabbedContainer, TableView, Tabs, TagCloud, TagInput, TeamCard, TeamOrganism, TerrainPalette, TextHighlight, Textarea, ThemeToggle, TimeSlotCell, Timeline, TimerDisplay, Toast, ToastSlot, Tooltip, TraitFrame, TraitSlot, TraitStateViewer, TransitionArrow, TrendIndicator, TypewriterText, Typography, UISlotComponent, UISlotRenderer, UploadDropZone, VStack, VersionDiff, ViolationAlert, VoteStack, WizardContainer, WizardNavigation, WizardProgress, arrowBetween, billboardLabel, boardEntity, bool, calculateAttackTargets, calculateValidMoves, cn, createInitialGameState, createSharedEntityStore, createTranslate, createUnitAnimationState, cylinderBetween, get3DClickPayload, getCurrentFrame, getTileDimensions, inferDirection, isoToScreen, makeAsset, makeAssetMap, mapBookData, meshSphere, num, objAvailableActions, objAvailableEvents, objCurrentState, objIcon, objId, objMaxRules, objName, objRules, objStates, parseEditFocus, parseLessonSegments, parseMarkdownWithCodeBlocks, parseQueryBinding, pendulum, projectileMotion, registerCodeLanguageLoader, renderPatternValue, resolveFieldMap, resolveFrame, resolveSheetDirection, rows, runTickFrame, sanitizeRichHtml, screenToIso, springOscillator, str, tickAnimationState, toCodeLanguage, transitionAnimation, unitHealth, unitPosition, unitTeam, useAgentChat, useAnchorRect, useAtlasSliceDataUrl, useAuthContext, useCamera, useCanvasGestures, useCompile, useConnectGitHub, useDeepAgentGeneration, useDisconnectGitHub, useDragReorder, useDraggable, useDropZone, useEmitEvent, useEventBus, useEventListener, useExtensions, useFileEditor, useFileSystem, useGameAudio, useGitHubBranches, useGitHubRepo, useGitHubRepos, useGitHubStatus, useImageCache, useInfiniteScroll, useLongPress, useMediaQuery, useOrbitalHistory, usePresence, usePreview, usePullToRefresh, useQuerySingleton, useRenderInterpolation, useSharedEntitySnapshot, useSharedEntityStore, useSharedEntityStoreContext, useSwipeGesture, useTapReveal, useTraitListens, useTranslate116 as useTranslate, useUIEvents, useUISlotManager, useUnitSpriteAtlas, useValidation, vec2 };