@almadar/ui 5.22.3 → 5.24.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 { jsxs, jsx, Fragment } from 'react/jsx-runtime';
2
- import * as React80 from 'react';
3
- import React80__default, { useContext, useMemo, useRef, useEffect, useCallback, Suspense, useState, lazy, createContext, useLayoutEffect, useId, useSyncExternalStore } from 'react';
2
+ import * as React81 from 'react';
3
+ import React81__default, { useContext, useMemo, useRef, useEffect, useCallback, Suspense, useState, lazy, createContext, useLayoutEffect, useId, useSyncExternalStore } from 'react';
4
4
  import { clsx } from 'clsx';
5
5
  import { twMerge } from 'tailwind-merge';
6
6
  import { EventBusContext, useTraitScope, TraitScopeProvider } from '@almadar/ui/providers';
@@ -211,7 +211,7 @@ var init_SvgFlow = __esm({
211
211
  opacity = 1,
212
212
  className
213
213
  }) => {
214
- const markerId = React80__default.useMemo(() => {
214
+ const markerId = React81__default.useMemo(() => {
215
215
  flowIdCounter += 1;
216
216
  return `almadar-flow-arrow-${flowIdCounter}`;
217
217
  }, []);
@@ -754,7 +754,7 @@ var init_SvgRing = __esm({
754
754
  className,
755
755
  label
756
756
  }) => {
757
- const gradientId = React80__default.useMemo(() => {
757
+ const gradientId = React81__default.useMemo(() => {
758
758
  ringIdCounter += 1;
759
759
  return `almadar-ring-glow-${ringIdCounter}`;
760
760
  }, []);
@@ -1836,7 +1836,7 @@ var init_Icon = __esm({
1836
1836
  const directIcon = typeof icon === "string" ? void 0 : icon;
1837
1837
  const effectiveName = typeof icon === "string" ? icon : name;
1838
1838
  const family = useIconFamily();
1839
- const RenderedComponent = React80__default.useMemo(() => {
1839
+ const RenderedComponent = React81__default.useMemo(() => {
1840
1840
  if (directIcon) return null;
1841
1841
  return effectiveName ? resolveIconForFamily(effectiveName, family) : null;
1842
1842
  }, [directIcon, effectiveName, family]);
@@ -1894,7 +1894,7 @@ function resolveIconProp(value, sizeClass) {
1894
1894
  const IconComp = value;
1895
1895
  return /* @__PURE__ */ jsx(IconComp, { className: sizeClass });
1896
1896
  }
1897
- if (React80__default.isValidElement(value)) {
1897
+ if (React81__default.isValidElement(value)) {
1898
1898
  return value;
1899
1899
  }
1900
1900
  if (typeof value === "object" && value !== null && "render" in value) {
@@ -1970,7 +1970,7 @@ var init_Button = __esm({
1970
1970
  md: "h-icon-default w-icon-default",
1971
1971
  lg: "h-icon-default w-icon-default"
1972
1972
  };
1973
- Button = React80__default.forwardRef(
1973
+ Button = React81__default.forwardRef(
1974
1974
  ({
1975
1975
  className,
1976
1976
  variant = "primary",
@@ -2036,7 +2036,7 @@ var init_Input = __esm({
2036
2036
  "components/core/atoms/Input.tsx"() {
2037
2037
  init_cn();
2038
2038
  init_Icon();
2039
- Input = React80__default.forwardRef(
2039
+ Input = React81__default.forwardRef(
2040
2040
  ({
2041
2041
  className,
2042
2042
  inputType,
@@ -2157,7 +2157,7 @@ var Label;
2157
2157
  var init_Label = __esm({
2158
2158
  "components/core/atoms/Label.tsx"() {
2159
2159
  init_cn();
2160
- Label = React80__default.forwardRef(
2160
+ Label = React81__default.forwardRef(
2161
2161
  ({ className, required, children, ...props }, ref) => {
2162
2162
  return /* @__PURE__ */ jsxs(
2163
2163
  "label",
@@ -2183,7 +2183,7 @@ var Textarea;
2183
2183
  var init_Textarea = __esm({
2184
2184
  "components/core/atoms/Textarea.tsx"() {
2185
2185
  init_cn();
2186
- Textarea = React80__default.forwardRef(
2186
+ Textarea = React81__default.forwardRef(
2187
2187
  ({ className, error, ...props }, ref) => {
2188
2188
  return /* @__PURE__ */ jsx(
2189
2189
  "textarea",
@@ -2213,7 +2213,7 @@ var init_Select = __esm({
2213
2213
  "components/core/atoms/Select.tsx"() {
2214
2214
  init_cn();
2215
2215
  init_Icon();
2216
- Select = React80__default.forwardRef(
2216
+ Select = React81__default.forwardRef(
2217
2217
  ({ className, options, placeholder, error, ...props }, ref) => {
2218
2218
  return /* @__PURE__ */ jsxs("div", { className: "relative", children: [
2219
2219
  /* @__PURE__ */ jsxs(
@@ -2255,7 +2255,7 @@ var Checkbox;
2255
2255
  var init_Checkbox = __esm({
2256
2256
  "components/core/atoms/Checkbox.tsx"() {
2257
2257
  init_cn();
2258
- Checkbox = React80__default.forwardRef(
2258
+ Checkbox = React81__default.forwardRef(
2259
2259
  ({ className, label, id, ...props }, ref) => {
2260
2260
  const inputId = id || `checkbox-${Math.random().toString(36).substr(2, 9)}`;
2261
2261
  return /* @__PURE__ */ jsxs("div", { className: "flex items-center", children: [
@@ -2346,7 +2346,7 @@ var init_Card = __esm({
2346
2346
  chip: "shadow-none rounded-pill border-[length:var(--border-width)] border-border",
2347
2347
  "tile-image-first": "p-0 overflow-hidden"
2348
2348
  };
2349
- Card = React80__default.forwardRef(
2349
+ Card = React81__default.forwardRef(
2350
2350
  ({
2351
2351
  className,
2352
2352
  variant = "bordered",
@@ -2384,9 +2384,9 @@ var init_Card = __esm({
2384
2384
  }
2385
2385
  );
2386
2386
  Card.displayName = "Card";
2387
- CardHeader = React80__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("mb-4", className), ...props }));
2387
+ CardHeader = React81__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("mb-4", className), ...props }));
2388
2388
  CardHeader.displayName = "CardHeader";
2389
- CardTitle = React80__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
2389
+ CardTitle = React81__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
2390
2390
  "h3",
2391
2391
  {
2392
2392
  ref,
@@ -2399,11 +2399,11 @@ var init_Card = __esm({
2399
2399
  }
2400
2400
  ));
2401
2401
  CardTitle.displayName = "CardTitle";
2402
- CardContent = React80__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("", className), ...props }));
2402
+ CardContent = React81__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("", className), ...props }));
2403
2403
  CardContent.displayName = "CardContent";
2404
2404
  CardBody = CardContent;
2405
2405
  CardBody.displayName = "CardBody";
2406
- CardFooter = React80__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
2406
+ CardFooter = React81__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
2407
2407
  "div",
2408
2408
  {
2409
2409
  ref,
@@ -2456,7 +2456,7 @@ var init_Badge = __esm({
2456
2456
  md: "px-2.5 py-1 text-sm",
2457
2457
  lg: "px-3 py-1.5 text-base"
2458
2458
  };
2459
- Badge = React80__default.forwardRef(
2459
+ Badge = React81__default.forwardRef(
2460
2460
  ({ className, variant = "default", size = "sm", amount, label, icon, children, onRemove, removeLabel, ...props }, ref) => {
2461
2461
  const iconSizes3 = {
2462
2462
  sm: "h-icon-default w-icon-default",
@@ -2549,7 +2549,7 @@ var init_FilterPill = __esm({
2549
2549
  md: "w-3.5 h-3.5",
2550
2550
  lg: "w-4 h-4"
2551
2551
  };
2552
- FilterPill = React80__default.forwardRef(
2552
+ FilterPill = React81__default.forwardRef(
2553
2553
  ({
2554
2554
  className,
2555
2555
  variant = "default",
@@ -2626,7 +2626,7 @@ var init_Spinner = __esm({
2626
2626
  md: "h-6 w-6",
2627
2627
  lg: "h-8 w-8"
2628
2628
  };
2629
- Spinner = React80__default.forwardRef(
2629
+ Spinner = React81__default.forwardRef(
2630
2630
  ({ className, size = "md", ...props }, ref) => {
2631
2631
  return /* @__PURE__ */ jsx(
2632
2632
  "div",
@@ -2705,11 +2705,15 @@ var init_Avatar = __esm({
2705
2705
  actionPayload
2706
2706
  }) => {
2707
2707
  const eventBus = useEventBus();
2708
+ const [imgFailed, setImgFailed] = React81__default.useState(false);
2709
+ React81__default.useEffect(() => {
2710
+ setImgFailed(false);
2711
+ }, [src]);
2708
2712
  const initials = providedInitials ?? (name ? generateInitials(name) : void 0);
2709
2713
  const IconComponent = typeof iconProp === "string" ? resolveIcon(iconProp) : iconProp;
2710
- const hasImage = !!src;
2711
- const hasInitials = !!initials;
2714
+ const hasImage = !!src && !imgFailed;
2712
2715
  const hasIcon = !!IconComponent;
2716
+ const hasInitials = !!initials && !(hasIcon && !providedInitials);
2713
2717
  const getInitialsBackground = () => "bg-primary text-primary-foreground";
2714
2718
  const isClickable = action || onClick;
2715
2719
  const handleClick = () => {
@@ -2739,9 +2743,8 @@ var init_Avatar = __esm({
2739
2743
  src,
2740
2744
  alt: alt || "Avatar",
2741
2745
  className: "w-full h-full object-cover",
2742
- onError: (e) => {
2743
- const target = e.target;
2744
- target.style.display = "none";
2746
+ onError: () => {
2747
+ setImgFailed(true);
2745
2748
  }
2746
2749
  }
2747
2750
  ) : hasInitials ? /* @__PURE__ */ jsx(
@@ -2910,7 +2913,7 @@ var init_Box = __esm({
2910
2913
  fixed: "fixed",
2911
2914
  sticky: "sticky"
2912
2915
  };
2913
- Box = React80__default.forwardRef(
2916
+ Box = React81__default.forwardRef(
2914
2917
  ({
2915
2918
  padding,
2916
2919
  paddingX,
@@ -2960,7 +2963,7 @@ var init_Box = __esm({
2960
2963
  onMouseLeave?.(e);
2961
2964
  }, [hoverEvent, eventBus, onMouseLeave]);
2962
2965
  const isClickable = action || onClick;
2963
- return React80__default.createElement(
2966
+ return React81__default.createElement(
2964
2967
  Component,
2965
2968
  {
2966
2969
  ref,
@@ -3282,7 +3285,7 @@ var init_Radio = __esm({
3282
3285
  md: "w-2.5 h-2.5",
3283
3286
  lg: "w-3 h-3"
3284
3287
  };
3285
- Radio = React80__default.forwardRef(
3288
+ Radio = React81__default.forwardRef(
3286
3289
  ({
3287
3290
  label,
3288
3291
  helperText,
@@ -3299,12 +3302,12 @@ var init_Radio = __esm({
3299
3302
  onChange,
3300
3303
  ...props
3301
3304
  }, ref) => {
3302
- const reactId = React80__default.useId();
3305
+ const reactId = React81__default.useId();
3303
3306
  const baseId = id || `radio-${reactId}`;
3304
3307
  const hasError = !!error;
3305
3308
  const eventBus = useEventBus();
3306
- const [selected, setSelected] = React80__default.useState(value);
3307
- React80__default.useEffect(() => {
3309
+ const [selected, setSelected] = React81__default.useState(value);
3310
+ React81__default.useEffect(() => {
3308
3311
  if (value !== void 0) setSelected(value);
3309
3312
  }, [value]);
3310
3313
  const pick = (next, e) => {
@@ -3486,7 +3489,7 @@ var init_Switch = __esm({
3486
3489
  "components/core/atoms/Switch.tsx"() {
3487
3490
  "use client";
3488
3491
  init_cn();
3489
- Switch = React80.forwardRef(
3492
+ Switch = React81.forwardRef(
3490
3493
  ({
3491
3494
  checked,
3492
3495
  defaultChecked = false,
@@ -3497,10 +3500,10 @@ var init_Switch = __esm({
3497
3500
  name,
3498
3501
  className
3499
3502
  }, ref) => {
3500
- const [isChecked, setIsChecked] = React80.useState(
3503
+ const [isChecked, setIsChecked] = React81.useState(
3501
3504
  checked !== void 0 ? checked : defaultChecked
3502
3505
  );
3503
- React80.useEffect(() => {
3506
+ React81.useEffect(() => {
3504
3507
  if (checked !== void 0) {
3505
3508
  setIsChecked(checked);
3506
3509
  }
@@ -4371,7 +4374,7 @@ var Dialog;
4371
4374
  var init_Dialog = __esm({
4372
4375
  "components/core/atoms/Dialog.tsx"() {
4373
4376
  init_cn();
4374
- Dialog = React80__default.forwardRef(
4377
+ Dialog = React81__default.forwardRef(
4375
4378
  ({
4376
4379
  role = "dialog",
4377
4380
  "aria-modal": ariaModal = true,
@@ -4397,7 +4400,7 @@ var Aside;
4397
4400
  var init_Aside = __esm({
4398
4401
  "components/core/atoms/Aside.tsx"() {
4399
4402
  init_cn();
4400
- Aside = React80__default.forwardRef(
4403
+ Aside = React81__default.forwardRef(
4401
4404
  ({ className, children, ...rest }, ref) => /* @__PURE__ */ jsx("aside", { ref, className: cn(className), ...rest, children })
4402
4405
  );
4403
4406
  Aside.displayName = "Aside";
@@ -4475,8 +4478,8 @@ var init_LawReferenceTooltip = __esm({
4475
4478
  className
4476
4479
  }) => {
4477
4480
  const { t } = useTranslate();
4478
- const [isVisible, setIsVisible] = React80__default.useState(false);
4479
- const timeoutRef = React80__default.useRef(null);
4481
+ const [isVisible, setIsVisible] = React81__default.useState(false);
4482
+ const timeoutRef = React81__default.useRef(null);
4480
4483
  const handleMouseEnter = () => {
4481
4484
  if (timeoutRef.current) clearTimeout(timeoutRef.current);
4482
4485
  timeoutRef.current = setTimeout(() => setIsVisible(true), 200);
@@ -4485,7 +4488,7 @@ var init_LawReferenceTooltip = __esm({
4485
4488
  if (timeoutRef.current) clearTimeout(timeoutRef.current);
4486
4489
  setIsVisible(false);
4487
4490
  };
4488
- React80__default.useEffect(() => {
4491
+ React81__default.useEffect(() => {
4489
4492
  return () => {
4490
4493
  if (timeoutRef.current) clearTimeout(timeoutRef.current);
4491
4494
  };
@@ -4695,7 +4698,7 @@ var init_StatusDot = __esm({
4695
4698
  md: "w-2.5 h-2.5",
4696
4699
  lg: "w-3 h-3"
4697
4700
  };
4698
- StatusDot = React80__default.forwardRef(
4701
+ StatusDot = React81__default.forwardRef(
4699
4702
  ({ className, status = "offline", pulse = false, size = "md", label, ...props }, ref) => {
4700
4703
  return /* @__PURE__ */ jsx(
4701
4704
  "span",
@@ -4749,7 +4752,7 @@ var init_TrendIndicator = __esm({
4749
4752
  down: "trending-down",
4750
4753
  flat: "arrow-right"
4751
4754
  };
4752
- TrendIndicator = React80__default.forwardRef(
4755
+ TrendIndicator = React81__default.forwardRef(
4753
4756
  ({
4754
4757
  className,
4755
4758
  value,
@@ -4816,7 +4819,7 @@ var init_RangeSlider = __esm({
4816
4819
  md: "w-4 h-4",
4817
4820
  lg: "w-5 h-5"
4818
4821
  };
4819
- RangeSlider = React80__default.forwardRef(
4822
+ RangeSlider = React81__default.forwardRef(
4820
4823
  ({
4821
4824
  className,
4822
4825
  min = 0,
@@ -5412,7 +5415,7 @@ var init_ContentSection = __esm({
5412
5415
  md: "py-16",
5413
5416
  lg: "py-24"
5414
5417
  };
5415
- ContentSection = React80__default.forwardRef(
5418
+ ContentSection = React81__default.forwardRef(
5416
5419
  ({ children, background = "default", padding = "lg", id, className }, ref) => {
5417
5420
  return /* @__PURE__ */ jsx(
5418
5421
  Box,
@@ -5946,7 +5949,7 @@ var init_AnimatedReveal = __esm({
5946
5949
  "scale-up": { opacity: 1, transform: "scale(1) translateY(0)" },
5947
5950
  "none": {}
5948
5951
  };
5949
- AnimatedReveal = React80__default.forwardRef(
5952
+ AnimatedReveal = React81__default.forwardRef(
5950
5953
  ({
5951
5954
  trigger = "scroll",
5952
5955
  animation = "fade-up",
@@ -6106,7 +6109,7 @@ var init_AnimatedGraphic = __esm({
6106
6109
  "components/marketing/atoms/AnimatedGraphic.tsx"() {
6107
6110
  "use client";
6108
6111
  init_cn();
6109
- AnimatedGraphic = React80__default.forwardRef(
6112
+ AnimatedGraphic = React81__default.forwardRef(
6110
6113
  ({
6111
6114
  src,
6112
6115
  svgContent,
@@ -6129,7 +6132,7 @@ var init_AnimatedGraphic = __esm({
6129
6132
  const fetchedSvg = useFetchedSvg(svgContent ? void 0 : src);
6130
6133
  const resolvedSvg = svgContent ?? fetchedSvg;
6131
6134
  const prevAnimateRef = useRef(animate);
6132
- const setRef = React80__default.useCallback(
6135
+ const setRef = React81__default.useCallback(
6133
6136
  (node) => {
6134
6137
  containerRef.current = node;
6135
6138
  if (typeof ref === "function") ref(node);
@@ -6532,7 +6535,7 @@ var init_Drawer = __esm({
6532
6535
  };
6533
6536
  const widthClass = width in sizeWidths ? sizeWidths[width] : "";
6534
6537
  const widthStyle = width in sizeWidths ? void 0 : { width };
6535
- const positionClasses3 = position === "right" ? "right-0 border-l" : "left-0 border-r";
6538
+ const positionClasses = position === "right" ? "right-0 border-l" : "left-0 border-r";
6536
6539
  const animationClasses2 = position === "right" ? "animate-slide-in-right" : "animate-slide-in-left";
6537
6540
  return /* @__PURE__ */ jsxs(Fragment, { children: [
6538
6541
  /* @__PURE__ */ jsx(
@@ -6553,7 +6556,7 @@ var init_Drawer = __esm({
6553
6556
  className: cn(
6554
6557
  "fixed top-0 bottom-0 z-50",
6555
6558
  "flex flex-col max-h-screen",
6556
- positionClasses3,
6559
+ positionClasses,
6557
6560
  widthClass,
6558
6561
  animationClasses2,
6559
6562
  className
@@ -6819,7 +6822,7 @@ var init_ErrorBoundary = __esm({
6819
6822
  }
6820
6823
  );
6821
6824
  };
6822
- ErrorBoundary = class extends React80__default.Component {
6825
+ ErrorBoundary = class extends React81__default.Component {
6823
6826
  constructor(props) {
6824
6827
  super(props);
6825
6828
  __publicField(this, "reset", () => {
@@ -7792,18 +7795,42 @@ var init_Alert = __esm({
7792
7795
  Alert.displayName = "Alert";
7793
7796
  }
7794
7797
  });
7795
- var positionClasses, arrowClasses, Tooltip;
7798
+ function computeTooltipStyle(position, triggerRect) {
7799
+ switch (position) {
7800
+ case "bottom":
7801
+ return {
7802
+ left: triggerRect.left + triggerRect.width / 2,
7803
+ top: triggerRect.bottom + TRIGGER_GAP,
7804
+ transform: "translateX(-50%)"
7805
+ };
7806
+ case "left":
7807
+ return {
7808
+ left: triggerRect.left - TRIGGER_GAP,
7809
+ top: triggerRect.top + triggerRect.height / 2,
7810
+ transform: "translate(-100%, -50%)"
7811
+ };
7812
+ case "right":
7813
+ return {
7814
+ left: triggerRect.right + TRIGGER_GAP,
7815
+ top: triggerRect.top + triggerRect.height / 2,
7816
+ transform: "translateY(-50%)"
7817
+ };
7818
+ case "top":
7819
+ default:
7820
+ return {
7821
+ left: triggerRect.left + triggerRect.width / 2,
7822
+ top: triggerRect.top - TRIGGER_GAP,
7823
+ transform: "translate(-50%, -100%)"
7824
+ };
7825
+ }
7826
+ }
7827
+ var TRIGGER_GAP, arrowClasses, Tooltip;
7796
7828
  var init_Tooltip = __esm({
7797
7829
  "components/core/molecules/Tooltip.tsx"() {
7798
7830
  "use client";
7799
7831
  init_Typography();
7800
7832
  init_cn();
7801
- positionClasses = {
7802
- top: "bottom-full left-1/2 -translate-x-1/2 mb-2",
7803
- bottom: "top-full left-1/2 -translate-x-1/2 mt-2",
7804
- left: "right-full top-1/2 -translate-y-1/2 mr-2",
7805
- right: "left-full top-1/2 -translate-y-1/2 ml-2"
7806
- };
7833
+ TRIGGER_GAP = 8;
7807
7834
  arrowClasses = {
7808
7835
  top: "top-full left-1/2 -translate-x-1/2 border-t-primary border-l-transparent border-r-transparent border-b-transparent",
7809
7836
  bottom: "bottom-full left-1/2 -translate-x-1/2 border-b-primary border-l-transparent border-r-transparent border-t-transparent",
@@ -7858,8 +7885,8 @@ var init_Tooltip = __esm({
7858
7885
  if (hideTimeoutRef.current) clearTimeout(hideTimeoutRef.current);
7859
7886
  };
7860
7887
  }, []);
7861
- const triggerElement = React80__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
7862
- const trigger = React80__default.cloneElement(triggerElement, {
7888
+ const triggerElement = React81__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
7889
+ const trigger = React81__default.cloneElement(triggerElement, {
7863
7890
  ref: triggerRef,
7864
7891
  onMouseEnter: handleMouseEnter,
7865
7892
  onMouseLeave: handleMouseLeave,
@@ -7877,14 +7904,9 @@ var init_Tooltip = __esm({
7877
7904
  "text-sm pointer-events-none",
7878
7905
  "break-words whitespace-normal",
7879
7906
  "h-auto min-h-fit",
7880
- positionClasses[position],
7881
7907
  className
7882
7908
  ),
7883
- style: {
7884
- left: position === "left" || position === "right" ? triggerRect.left + (position === "left" ? 0 : triggerRect.width) : triggerRect.left + triggerRect.width / 2,
7885
- top: position === "top" || position === "bottom" ? triggerRect.top + (position === "top" ? 0 : triggerRect.height) : triggerRect.top + triggerRect.height / 2,
7886
- transform: position === "top" || position === "bottom" ? "translateX(-50%)" : position === "left" || position === "right" ? "translateY(-50%)" : "none"
7887
- },
7909
+ style: computeTooltipStyle(position, triggerRect),
7888
7910
  role: "tooltip",
7889
7911
  children: [
7890
7912
  /* @__PURE__ */ jsx("div", { className: "w-full break-words whitespace-normal h-auto", children: typeof content === "string" ? /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-primary-foreground break-words whitespace-normal", children: content }) : /* @__PURE__ */ jsx("div", { className: "break-words whitespace-normal", children: content }) }),
@@ -7911,8 +7933,9 @@ var init_Tooltip = __esm({
7911
7933
  function computePopoverStyle(position, triggerRect, popoverWidth) {
7912
7934
  if (position === "left" || position === "right") {
7913
7935
  return {
7914
- left: triggerRect.left + (position === "left" ? 0 : triggerRect.width),
7915
- top: triggerRect.top + triggerRect.height / 2
7936
+ left: position === "left" ? triggerRect.left - popoverWidth - TRIGGER_GAP2 : triggerRect.right + TRIGGER_GAP2,
7937
+ top: triggerRect.top + triggerRect.height / 2,
7938
+ transform: "translateY(-50%)"
7916
7939
  };
7917
7940
  }
7918
7941
  const viewportWidth = typeof window !== "undefined" ? window.innerWidth : 1024;
@@ -7924,21 +7947,16 @@ function computePopoverStyle(position, triggerRect, popoverWidth) {
7924
7947
  );
7925
7948
  return {
7926
7949
  left: clamped,
7927
- top: triggerRect.top + (position === "top" ? 0 : triggerRect.height)
7950
+ top: position === "top" ? triggerRect.top - TRIGGER_GAP2 : triggerRect.bottom + TRIGGER_GAP2,
7951
+ transform: position === "top" ? "translateY(-100%)" : void 0
7928
7952
  };
7929
7953
  }
7930
- var positionClasses2, arrowClasses2, VIEWPORT_EDGE_PADDING, Popover;
7954
+ var arrowClasses2, VIEWPORT_EDGE_PADDING, TRIGGER_GAP2, Popover;
7931
7955
  var init_Popover = __esm({
7932
7956
  "components/core/molecules/Popover.tsx"() {
7933
7957
  "use client";
7934
7958
  init_Typography();
7935
7959
  init_cn();
7936
- positionClasses2 = {
7937
- top: "mb-2",
7938
- bottom: "mt-2",
7939
- left: "mr-2 -translate-y-1/2",
7940
- right: "ml-2 -translate-y-1/2"
7941
- };
7942
7960
  arrowClasses2 = {
7943
7961
  top: "top-full left-1/2 -translate-x-1/2 border-t-white border-l-transparent border-r-transparent border-b-transparent",
7944
7962
  bottom: "bottom-full left-1/2 -translate-x-1/2 border-b-white border-l-transparent border-r-transparent border-t-transparent",
@@ -7946,6 +7964,7 @@ var init_Popover = __esm({
7946
7964
  right: "right-full top-1/2 -translate-y-1/2 border-r-white border-t-transparent border-b-transparent border-l-transparent"
7947
7965
  };
7948
7966
  VIEWPORT_EDGE_PADDING = 8;
7967
+ TRIGGER_GAP2 = 8;
7949
7968
  Popover = ({
7950
7969
  content,
7951
7970
  children,
@@ -8014,8 +8033,8 @@ var init_Popover = __esm({
8014
8033
  onMouseEnter: handleOpen,
8015
8034
  onMouseLeave: handleClose
8016
8035
  };
8017
- const childElement = React80__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
8018
- const triggerElement = React80__default.cloneElement(
8036
+ const childElement = React81__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
8037
+ const triggerElement = React81__default.cloneElement(
8019
8038
  childElement,
8020
8039
  {
8021
8040
  ref: triggerRef,
@@ -8029,7 +8048,6 @@ var init_Popover = __esm({
8029
8048
  className: cn(
8030
8049
  "fixed z-50 p-4",
8031
8050
  "bg-card border-2 border-border shadow-elevation-popover",
8032
- positionClasses2[position],
8033
8051
  className
8034
8052
  ),
8035
8053
  style: computePopoverStyle(position, triggerRect, popoverWidth),
@@ -8119,7 +8137,7 @@ var init_Menu = __esm({
8119
8137
  document.addEventListener("mousedown", handleClickOutside);
8120
8138
  return () => document.removeEventListener("mousedown", handleClickOutside);
8121
8139
  }, [isOpen]);
8122
- const positionClasses3 = {
8140
+ const positionClasses = {
8123
8141
  "top-left": "bottom-full left-0 mb-2",
8124
8142
  "top-right": "bottom-full right-0 mb-2",
8125
8143
  "bottom-left": "top-full left-0 mt-2",
@@ -8142,8 +8160,8 @@ var init_Menu = __esm({
8142
8160
  };
8143
8161
  const effectivePosition = direction === "rtl" ? rtlMirror[position] ?? position : position;
8144
8162
  const subMenuSideClass = direction === "rtl" ? "right-full mr-2" : "left-full ml-2";
8145
- const triggerChild = React80__default.isValidElement(trigger) ? trigger : /* @__PURE__ */ jsx(Typography, { variant: "small", as: "span", children: trigger });
8146
- const triggerElement = React80__default.cloneElement(
8163
+ const triggerChild = React81__default.isValidElement(trigger) ? trigger : /* @__PURE__ */ jsx(Typography, { variant: "small", as: "span", children: trigger });
8164
+ const triggerElement = React81__default.cloneElement(
8147
8165
  triggerChild,
8148
8166
  {
8149
8167
  ref: triggerRef,
@@ -8227,7 +8245,7 @@ var init_Menu = __esm({
8227
8245
  className: cn(
8228
8246
  "absolute z-50",
8229
8247
  menuContainerStyles,
8230
- positionClasses3[effectivePosition],
8248
+ positionClasses[effectivePosition],
8231
8249
  className
8232
8250
  ),
8233
8251
  style: {
@@ -8403,7 +8421,7 @@ var init_FloatingActionButton = __esm({
8403
8421
  document.addEventListener("mousedown", handleClickOutside);
8404
8422
  return () => document.removeEventListener("mousedown", handleClickOutside);
8405
8423
  }, [isExpanded, actions]);
8406
- const positionClasses3 = {
8424
+ const positionClasses = {
8407
8425
  "bottom-right": "bottom-6 right-6",
8408
8426
  "bottom-left": "bottom-6 left-6",
8409
8427
  "bottom-center": "bottom-6 left-1/2 -translate-x-1/2",
@@ -8412,7 +8430,7 @@ var init_FloatingActionButton = __esm({
8412
8430
  "top-center": "top-6 left-1/2 -translate-x-1/2"
8413
8431
  };
8414
8432
  if (resolvedAction && (!actions || actions.length === 0)) {
8415
- return /* @__PURE__ */ jsx(Box, { className: cn("fixed z-50", positionClasses3[position], className), children: /* @__PURE__ */ jsx(
8433
+ return /* @__PURE__ */ jsx(Box, { className: cn("fixed z-50", positionClasses[position], className), children: /* @__PURE__ */ jsx(
8416
8434
  Button,
8417
8435
  {
8418
8436
  variant: resolvedAction.variant || "primary",
@@ -8440,7 +8458,7 @@ var init_FloatingActionButton = __esm({
8440
8458
  ref: fabRef,
8441
8459
  className: cn(
8442
8460
  "fixed z-50 flex flex-col items-end gap-3",
8443
- positionClasses3[position],
8461
+ positionClasses[position],
8444
8462
  position.includes("left") && "items-start",
8445
8463
  className
8446
8464
  ),
@@ -8550,13 +8568,13 @@ var init_MapView = __esm({
8550
8568
  shadowSize: [41, 41]
8551
8569
  });
8552
8570
  L.Marker.prototype.options.icon = defaultIcon;
8553
- const { useEffect: useEffect70, useRef: useRef67, useCallback: useCallback114, useState: useState100 } = React80__default;
8571
+ const { useEffect: useEffect71, useRef: useRef68, useCallback: useCallback116, useState: useState102 } = React81__default;
8554
8572
  const { Typography: Typography2 } = await Promise.resolve().then(() => (init_Typography(), Typography_exports));
8555
8573
  const { useEventBus: useEventBus2 } = await Promise.resolve().then(() => (init_useEventBus(), useEventBus_exports));
8556
8574
  function MapUpdater({ centerLat, centerLng, zoom }) {
8557
8575
  const map = useMap();
8558
- const prevRef = useRef67({ centerLat, centerLng, zoom });
8559
- useEffect70(() => {
8576
+ const prevRef = useRef68({ centerLat, centerLng, zoom });
8577
+ useEffect71(() => {
8560
8578
  const prev = prevRef.current;
8561
8579
  if (prev.centerLat !== centerLat || prev.centerLng !== centerLng || prev.zoom !== zoom) {
8562
8580
  map.setView([centerLat, centerLng], zoom);
@@ -8567,7 +8585,7 @@ var init_MapView = __esm({
8567
8585
  }
8568
8586
  function MapClickHandler({ onMapClick }) {
8569
8587
  const map = useMap();
8570
- useEffect70(() => {
8588
+ useEffect71(() => {
8571
8589
  if (!onMapClick) return;
8572
8590
  const handler = (e) => {
8573
8591
  onMapClick(e.latlng.lat, e.latlng.lng);
@@ -8595,8 +8613,8 @@ var init_MapView = __esm({
8595
8613
  showAttribution = true
8596
8614
  }) {
8597
8615
  const eventBus = useEventBus2();
8598
- const [clickedPosition, setClickedPosition] = useState100(null);
8599
- const handleMapClick = useCallback114((lat, lng) => {
8616
+ const [clickedPosition, setClickedPosition] = useState102(null);
8617
+ const handleMapClick = useCallback116((lat, lng) => {
8600
8618
  if (showClickedPin) {
8601
8619
  setClickedPosition({ lat, lng });
8602
8620
  }
@@ -8605,7 +8623,7 @@ var init_MapView = __esm({
8605
8623
  eventBus.emit(`UI:${mapClickEvent}`, { latitude: lat, longitude: lng });
8606
8624
  }
8607
8625
  }, [onMapClick, mapClickEvent, eventBus, showClickedPin]);
8608
- const handleMarkerClick = useCallback114((marker) => {
8626
+ const handleMarkerClick = useCallback116((marker) => {
8609
8627
  onMarkerClick?.(marker);
8610
8628
  if (markerClickEvent) {
8611
8629
  eventBus.emit(`UI:${markerClickEvent}`, { ...marker });
@@ -8614,7 +8632,7 @@ var init_MapView = __esm({
8614
8632
  return /* @__PURE__ */ jsx(
8615
8633
  Box,
8616
8634
  {
8617
- className: cn("relative w-full overflow-hidden rounded-lg", className),
8635
+ className: cn("relative isolate w-full overflow-hidden rounded-lg", className),
8618
8636
  style: { height },
8619
8637
  "data-testid": "map-view",
8620
8638
  children: /* @__PURE__ */ jsxs(
@@ -8796,7 +8814,7 @@ function InputPattern({
8796
8814
  fieldName
8797
8815
  }) {
8798
8816
  const { emit } = useEventBus();
8799
- const [localValue, setLocalValue] = React80__default.useState(value);
8817
+ const [localValue, setLocalValue] = React81__default.useState(value);
8800
8818
  const handleChange = (e) => {
8801
8819
  setLocalValue(e.target.value);
8802
8820
  if (onChange) {
@@ -8834,7 +8852,7 @@ function TextareaPattern({
8834
8852
  fieldName
8835
8853
  }) {
8836
8854
  const { emit } = useEventBus();
8837
- const [localValue, setLocalValue] = React80__default.useState(value);
8855
+ const [localValue, setLocalValue] = React81__default.useState(value);
8838
8856
  const handleChange = (e) => {
8839
8857
  setLocalValue(e.target.value);
8840
8858
  if (onChange) {
@@ -8866,7 +8884,7 @@ function SelectPattern({
8866
8884
  fieldName
8867
8885
  }) {
8868
8886
  const { emit } = useEventBus();
8869
- const [localValue, setLocalValue] = React80__default.useState(value);
8887
+ const [localValue, setLocalValue] = React81__default.useState(value);
8870
8888
  const handleChange = (e) => {
8871
8889
  setLocalValue(e.target.value);
8872
8890
  if (onChange) {
@@ -8895,7 +8913,7 @@ function CheckboxPattern({
8895
8913
  className
8896
8914
  }) {
8897
8915
  const { emit } = useEventBus();
8898
- const [localChecked, setLocalChecked] = React80__default.useState(checked);
8916
+ const [localChecked, setLocalChecked] = React81__default.useState(checked);
8899
8917
  const handleChange = (e) => {
8900
8918
  setLocalChecked(e.target.checked);
8901
8919
  if (onChange) {
@@ -9208,9 +9226,9 @@ function ControlButton({
9208
9226
  className
9209
9227
  }) {
9210
9228
  const eventBus = useEventBus();
9211
- const [isPressed, setIsPressed] = React80.useState(false);
9229
+ const [isPressed, setIsPressed] = React81.useState(false);
9212
9230
  const actualPressed = pressed ?? isPressed;
9213
- const handlePointerDown = React80.useCallback(
9231
+ const handlePointerDown = React81.useCallback(
9214
9232
  (e) => {
9215
9233
  e.preventDefault();
9216
9234
  if (disabled) return;
@@ -9220,7 +9238,7 @@ function ControlButton({
9220
9238
  },
9221
9239
  [disabled, pressEvent, eventBus, onPress]
9222
9240
  );
9223
- const handlePointerUp = React80.useCallback(
9241
+ const handlePointerUp = React81.useCallback(
9224
9242
  (e) => {
9225
9243
  e.preventDefault();
9226
9244
  if (disabled) return;
@@ -9230,7 +9248,7 @@ function ControlButton({
9230
9248
  },
9231
9249
  [disabled, releaseEvent, eventBus, onRelease]
9232
9250
  );
9233
- const handlePointerLeave = React80.useCallback(
9251
+ const handlePointerLeave = React81.useCallback(
9234
9252
  (e) => {
9235
9253
  if (isPressed) {
9236
9254
  setIsPressed(false);
@@ -9307,8 +9325,8 @@ function ActionButtons({
9307
9325
  disabled
9308
9326
  }) {
9309
9327
  const eventBus = useEventBus();
9310
- const [activeButtons, setActiveButtons] = React80.useState(/* @__PURE__ */ new Set());
9311
- const handlePress = React80.useCallback(
9328
+ const [activeButtons, setActiveButtons] = React81.useState(/* @__PURE__ */ new Set());
9329
+ const handlePress = React81.useCallback(
9312
9330
  (id) => {
9313
9331
  setActiveButtons((prev) => new Set(prev).add(id));
9314
9332
  if (actionEvent) eventBus.emit(`UI:${actionEvent}`, { id, pressed: true });
@@ -9316,7 +9334,7 @@ function ActionButtons({
9316
9334
  },
9317
9335
  [actionEvent, eventBus, onAction]
9318
9336
  );
9319
- const handleRelease = React80.useCallback(
9337
+ const handleRelease = React81.useCallback(
9320
9338
  (id) => {
9321
9339
  setActiveButtons((prev) => {
9322
9340
  const next = new Set(prev);
@@ -12242,7 +12260,10 @@ function computeFoldRegions(code) {
12242
12260
  }
12243
12261
  return regions.sort((a, b) => a.start - b.start);
12244
12262
  }
12245
- var orbStyleOverrides, orbStyle, loloStyleOverrides, loloStyle, log5, LINE_PROPS_FN, HIDDEN_LINE_NUMBERS, CodeBlock;
12263
+ function toCodeLanguage(value) {
12264
+ return value && CODE_LANGUAGE_SET.has(value) ? value : "text";
12265
+ }
12266
+ var orbStyleOverrides, orbStyle, loloStyleOverrides, loloStyle, log5, CODE_LANGUAGES, CODE_LANGUAGE_SET, LINE_PROPS_FN, HIDDEN_LINE_NUMBERS, CodeBlock;
12246
12267
  var init_CodeBlock = __esm({
12247
12268
  "components/core/molecules/markdown/CodeBlock.tsx"() {
12248
12269
  init_Box();
@@ -12320,9 +12341,40 @@ var init_CodeBlock = __esm({
12320
12341
  };
12321
12342
  loloStyle = { ...dark, ...loloStyleOverrides };
12322
12343
  log5 = createLogger("almadar:ui:markdown-code");
12344
+ CODE_LANGUAGES = [
12345
+ "text",
12346
+ "json",
12347
+ "javascript",
12348
+ "js",
12349
+ "typescript",
12350
+ "ts",
12351
+ "jsx",
12352
+ "tsx",
12353
+ "css",
12354
+ "markdown",
12355
+ "md",
12356
+ "bash",
12357
+ "shell",
12358
+ "sh",
12359
+ "yaml",
12360
+ "yml",
12361
+ "rust",
12362
+ "python",
12363
+ "py",
12364
+ "sql",
12365
+ "diff",
12366
+ "toml",
12367
+ "go",
12368
+ "graphql",
12369
+ "html",
12370
+ "xml",
12371
+ "orb",
12372
+ "lolo"
12373
+ ];
12374
+ CODE_LANGUAGE_SET = new Set(CODE_LANGUAGES);
12323
12375
  LINE_PROPS_FN = (n) => ({ "data-line": String(n - 1) });
12324
12376
  HIDDEN_LINE_NUMBERS = { display: "none" };
12325
- CodeBlock = React80__default.memo(
12377
+ CodeBlock = React81__default.memo(
12326
12378
  ({
12327
12379
  code: rawCode,
12328
12380
  language = "text",
@@ -12759,7 +12811,7 @@ var init_MarkdownContent = __esm({
12759
12811
  init_Box();
12760
12812
  init_CodeBlock();
12761
12813
  init_cn();
12762
- MarkdownContent = React80__default.memo(
12814
+ MarkdownContent = React81__default.memo(
12763
12815
  ({ content, direction, className }) => {
12764
12816
  const { t: _t } = useTranslate();
12765
12817
  const safeContent = typeof content === "string" ? content : String(content ?? "");
@@ -12809,7 +12861,7 @@ var init_MarkdownContent = __esm({
12809
12861
  CodeBlock,
12810
12862
  {
12811
12863
  code,
12812
- language: match[1],
12864
+ language: toCodeLanguage(match[1]),
12813
12865
  maxHeight: "60vh"
12814
12866
  }
12815
12867
  );
@@ -13855,7 +13907,7 @@ var init_StateMachineView = __esm({
13855
13907
  style: { top: title ? 30 : 0 },
13856
13908
  children: [
13857
13909
  entity && /* @__PURE__ */ jsx(EntityBox, { entity, config }),
13858
- states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(React80__default.Fragment, { children: renderStateNode(state, config) }, state.id) : /* @__PURE__ */ jsx(
13910
+ states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(React81__default.Fragment, { children: renderStateNode(state, config) }, state.id) : /* @__PURE__ */ jsx(
13859
13911
  StateNode,
13860
13912
  {
13861
13913
  state,
@@ -14668,7 +14720,7 @@ var init_ContentRenderer = __esm({
14668
14720
  CodeBlock,
14669
14721
  {
14670
14722
  code: segment.content,
14671
- language: segment.language
14723
+ language: toCodeLanguage(segment.language)
14672
14724
  },
14673
14725
  key
14674
14726
  );
@@ -14693,7 +14745,7 @@ var init_ContentRenderer = __esm({
14693
14745
  CodeBlock,
14694
14746
  {
14695
14747
  code: segment.content,
14696
- language: segment.language
14748
+ language: toCodeLanguage(segment.language)
14697
14749
  }
14698
14750
  ),
14699
14751
  /* @__PURE__ */ jsx(ScaledDiagram, { children: /* @__PURE__ */ jsx(
@@ -15460,7 +15512,7 @@ var init_Grid = __esm({
15460
15512
  as: Component = "div"
15461
15513
  }) => {
15462
15514
  const mergedStyle = rows2 ? { gridTemplateRows: `repeat(${rows2}, minmax(0, 1fr))`, ...style } : style;
15463
- return React80__default.createElement(
15515
+ return React81__default.createElement(
15464
15516
  Component,
15465
15517
  {
15466
15518
  className: cn(
@@ -20998,7 +21050,7 @@ function CraftingRecipe({
20998
21050
  className
20999
21051
  }) {
21000
21052
  const eventBus = useEventBus();
21001
- const handleCraft = React80.useCallback(() => {
21053
+ const handleCraft = React81.useCallback(() => {
21002
21054
  onCraft?.();
21003
21055
  if (craftEvent) {
21004
21056
  eventBus.emit(craftEvent, { output: output.label });
@@ -21015,7 +21067,7 @@ function CraftingRecipe({
21015
21067
  children: [
21016
21068
  /* @__PURE__ */ jsx(HStack, { gap: "xs", className: "flex-wrap items-center", children: inputs.map((ingredient, index) => {
21017
21069
  const hasSufficient = ingredient.available >= ingredient.required;
21018
- return /* @__PURE__ */ jsxs(React80.Fragment, { children: [
21070
+ return /* @__PURE__ */ jsxs(React81.Fragment, { children: [
21019
21071
  /* @__PURE__ */ jsx(Box, { className: "relative", children: /* @__PURE__ */ jsx(
21020
21072
  ItemSlot,
21021
21073
  {
@@ -21078,8 +21130,8 @@ function DPad({
21078
21130
  }) {
21079
21131
  const eventBus = useEventBus();
21080
21132
  const sizes = sizeMap6[size];
21081
- const [activeDirections, setActiveDirections] = React80.useState(/* @__PURE__ */ new Set());
21082
- const handlePress = React80.useCallback(
21133
+ const [activeDirections, setActiveDirections] = React81.useState(/* @__PURE__ */ new Set());
21134
+ const handlePress = React81.useCallback(
21083
21135
  (direction) => {
21084
21136
  setActiveDirections((prev) => new Set(prev).add(direction));
21085
21137
  if (directionEvent) eventBus.emit(`UI:${directionEvent}`, { direction, pressed: true });
@@ -21087,7 +21139,7 @@ function DPad({
21087
21139
  },
21088
21140
  [directionEvent, eventBus, onDirection]
21089
21141
  );
21090
- const handleRelease = React80.useCallback(
21142
+ const handleRelease = React81.useCallback(
21091
21143
  (direction) => {
21092
21144
  setActiveDirections((prev) => {
21093
21145
  const next = new Set(prev);
@@ -21822,14 +21874,14 @@ function useDataDnd(args) {
21822
21874
  const isZone = Boolean(dragGroup || accepts || sortable);
21823
21875
  const enabled = isZone || Boolean(dndRoot);
21824
21876
  const eventBus = useEventBus();
21825
- const parentRoot = React80__default.useContext(RootCtx);
21877
+ const parentRoot = React81__default.useContext(RootCtx);
21826
21878
  const isRoot = enabled && parentRoot === null;
21827
- const zoneId = React80__default.useId();
21879
+ const zoneId = React81__default.useId();
21828
21880
  const ownGroup = dragGroup ?? accepts ?? zoneId;
21829
- const [optimisticOrders, setOptimisticOrders] = React80__default.useState(() => /* @__PURE__ */ new Map());
21830
- const optimisticOrdersRef = React80__default.useRef(optimisticOrders);
21881
+ const [optimisticOrders, setOptimisticOrders] = React81__default.useState(() => /* @__PURE__ */ new Map());
21882
+ const optimisticOrdersRef = React81__default.useRef(optimisticOrders);
21831
21883
  optimisticOrdersRef.current = optimisticOrders;
21832
- const clearOptimisticOrder = React80__default.useCallback((group) => {
21884
+ const clearOptimisticOrder = React81__default.useCallback((group) => {
21833
21885
  setOptimisticOrders((prev) => {
21834
21886
  if (!prev.has(group)) return prev;
21835
21887
  const next = new Map(prev);
@@ -21854,7 +21906,7 @@ function useDataDnd(args) {
21854
21906
  const raw = it[dndItemIdField];
21855
21907
  return String(raw ?? `__idx_${idx}`);
21856
21908
  }).join("|");
21857
- const itemIds = React80__default.useMemo(
21909
+ const itemIds = React81__default.useMemo(
21858
21910
  () => orderedItems.map((it, idx) => {
21859
21911
  const raw = it[dndItemIdField];
21860
21912
  return raw ?? `__idx_${idx}`;
@@ -21862,7 +21914,7 @@ function useDataDnd(args) {
21862
21914
  [itemIdsSignature]
21863
21915
  );
21864
21916
  const itemsContentSig = items.map((it, idx) => String(it[dndItemIdField] ?? `__${idx}`)).join("|");
21865
- React80__default.useEffect(() => {
21917
+ React81__default.useEffect(() => {
21866
21918
  const root = isRoot ? null : parentRoot;
21867
21919
  if (root) {
21868
21920
  root.clearOptimisticOrder(ownGroup);
@@ -21870,20 +21922,20 @@ function useDataDnd(args) {
21870
21922
  clearOptimisticOrder(ownGroup);
21871
21923
  }
21872
21924
  }, [itemsContentSig, ownGroup]);
21873
- const zonesRef = React80__default.useRef(/* @__PURE__ */ new Map());
21874
- const registerZone = React80__default.useCallback((zoneId2, meta2) => {
21925
+ const zonesRef = React81__default.useRef(/* @__PURE__ */ new Map());
21926
+ const registerZone = React81__default.useCallback((zoneId2, meta2) => {
21875
21927
  zonesRef.current.set(zoneId2, meta2);
21876
21928
  }, []);
21877
- const unregisterZone = React80__default.useCallback((zoneId2) => {
21929
+ const unregisterZone = React81__default.useCallback((zoneId2) => {
21878
21930
  zonesRef.current.delete(zoneId2);
21879
21931
  }, []);
21880
- const [activeDrag, setActiveDrag] = React80__default.useState(null);
21881
- const [overZoneGroup, setOverZoneGroup] = React80__default.useState(null);
21882
- const meta = React80__default.useMemo(
21932
+ const [activeDrag, setActiveDrag] = React81__default.useState(null);
21933
+ const [overZoneGroup, setOverZoneGroup] = React81__default.useState(null);
21934
+ const meta = React81__default.useMemo(
21883
21935
  () => ({ group: ownGroup, dropEvent, reorderEvent, positionEvent, itemIds, rawItems: items, idField: dndItemIdField }),
21884
21936
  [ownGroup, dropEvent, reorderEvent, positionEvent, itemIds, items, dndItemIdField]
21885
21937
  );
21886
- React80__default.useEffect(() => {
21938
+ React81__default.useEffect(() => {
21887
21939
  const target = isRoot ? null : parentRoot;
21888
21940
  if (!target) {
21889
21941
  zonesRef.current.set(zoneId, meta);
@@ -21902,7 +21954,7 @@ function useDataDnd(args) {
21902
21954
  }, [parentRoot, isRoot, zoneId, meta]);
21903
21955
  const sensors = useAlmadarDndSensors(true);
21904
21956
  const collisionDetection = almadarDndCollisionDetection;
21905
- const findZoneByItem = React80__default.useCallback(
21957
+ const findZoneByItem = React81__default.useCallback(
21906
21958
  (id) => {
21907
21959
  for (const z of zonesRef.current.values()) {
21908
21960
  if (z.itemIds.includes(id)) return z;
@@ -21911,7 +21963,7 @@ function useDataDnd(args) {
21911
21963
  },
21912
21964
  []
21913
21965
  );
21914
- React80__default.useCallback(
21966
+ React81__default.useCallback(
21915
21967
  (group) => {
21916
21968
  for (const z of zonesRef.current.values()) {
21917
21969
  if (z.group === group) return z;
@@ -21920,7 +21972,7 @@ function useDataDnd(args) {
21920
21972
  },
21921
21973
  []
21922
21974
  );
21923
- const handleDragEnd = React80__default.useCallback(
21975
+ const handleDragEnd = React81__default.useCallback(
21924
21976
  (event) => {
21925
21977
  const { active, over } = event;
21926
21978
  const activeIdStr = String(active.id);
@@ -22011,8 +22063,8 @@ function useDataDnd(args) {
22011
22063
  },
22012
22064
  [eventBus]
22013
22065
  );
22014
- const sortableData = React80__default.useMemo(() => ({ dndGroup: ownGroup }), [ownGroup]);
22015
- const SortableItem = React80__default.useCallback(
22066
+ const sortableData = React81__default.useMemo(() => ({ dndGroup: ownGroup }), [ownGroup]);
22067
+ const SortableItem = React81__default.useCallback(
22016
22068
  ({ id, children }) => {
22017
22069
  const {
22018
22070
  attributes,
@@ -22052,7 +22104,7 @@ function useDataDnd(args) {
22052
22104
  id: droppableId,
22053
22105
  data: sortableData
22054
22106
  });
22055
- const ctx = React80__default.useContext(RootCtx);
22107
+ const ctx = React81__default.useContext(RootCtx);
22056
22108
  const activeDrag2 = ctx?.activeDrag ?? null;
22057
22109
  const overZoneGroup2 = ctx?.overZoneGroup ?? null;
22058
22110
  const isThisZoneOver = overZoneGroup2 === ownGroup;
@@ -22067,7 +22119,7 @@ function useDataDnd(args) {
22067
22119
  showForeignPlaceholder,
22068
22120
  ctxAvailable: ctx != null
22069
22121
  });
22070
- React80__default.useEffect(() => {
22122
+ React81__default.useEffect(() => {
22071
22123
  dndLog.info("dropzone:isOver:change", { droppableId, group: ownGroup, isOver, isThisZoneOver, showForeignPlaceholder, activeDragSourceGroup: activeDrag2?.sourceGroup ?? null });
22072
22124
  }, [droppableId, isOver, isThisZoneOver, showForeignPlaceholder]);
22073
22125
  return /* @__PURE__ */ jsx(
@@ -22081,11 +22133,11 @@ function useDataDnd(args) {
22081
22133
  }
22082
22134
  );
22083
22135
  };
22084
- const rootContextValue = React80__default.useMemo(
22136
+ const rootContextValue = React81__default.useMemo(
22085
22137
  () => ({ registerZone, unregisterZone, activeDrag, overZoneGroup, optimisticOrders, clearOptimisticOrder }),
22086
22138
  [registerZone, unregisterZone, activeDrag, overZoneGroup, optimisticOrders, clearOptimisticOrder]
22087
22139
  );
22088
- const handleDragStart = React80__default.useCallback((event) => {
22140
+ const handleDragStart = React81__default.useCallback((event) => {
22089
22141
  const sourceZone = findZoneByItem(event.active.id);
22090
22142
  const rect = event.active.rect.current.initial;
22091
22143
  const height = rect?.height && rect.height > 0 ? rect.height : 64;
@@ -22104,7 +22156,7 @@ function useDataDnd(args) {
22104
22156
  isRoot
22105
22157
  });
22106
22158
  }, [findZoneByItem, isRoot, zoneId]);
22107
- const handleDragOver = React80__default.useCallback((event) => {
22159
+ const handleDragOver = React81__default.useCallback((event) => {
22108
22160
  const { active, over } = event;
22109
22161
  const overData = over?.data?.current;
22110
22162
  const overGroup = overData?.dndGroup ?? null;
@@ -22174,7 +22226,7 @@ function useDataDnd(args) {
22174
22226
  return next;
22175
22227
  });
22176
22228
  }, []);
22177
- const handleDragCancel = React80__default.useCallback((event) => {
22229
+ const handleDragCancel = React81__default.useCallback((event) => {
22178
22230
  setActiveDrag(null);
22179
22231
  setOverZoneGroup(null);
22180
22232
  dndLog.warn("dragCancel", {
@@ -22182,12 +22234,12 @@ function useDataDnd(args) {
22182
22234
  reason: "dnd-kit cancelled the drag (escape key, pointer interrupted, or external)"
22183
22235
  });
22184
22236
  }, []);
22185
- const handleDragEndWithCleanup = React80__default.useCallback((event) => {
22237
+ const handleDragEndWithCleanup = React81__default.useCallback((event) => {
22186
22238
  handleDragEnd(event);
22187
22239
  setActiveDrag(null);
22188
22240
  setOverZoneGroup(null);
22189
22241
  }, [handleDragEnd]);
22190
- const wrapContainer = React80__default.useCallback(
22242
+ const wrapContainer = React81__default.useCallback(
22191
22243
  (children) => {
22192
22244
  if (!enabled) return children;
22193
22245
  const strategy = layout === "grid" ? rectSortingStrategy : verticalListSortingStrategy;
@@ -22241,7 +22293,7 @@ var init_useDataDnd = __esm({
22241
22293
  init_useAlmadarDndCollision();
22242
22294
  init_Box();
22243
22295
  dndLog = createLogger("almadar:ui:dnd");
22244
- RootCtx = React80__default.createContext(null);
22296
+ RootCtx = React81__default.createContext(null);
22245
22297
  }
22246
22298
  });
22247
22299
  function fieldLabel2(key) {
@@ -22761,7 +22813,7 @@ function DataList({
22761
22813
  }) {
22762
22814
  const eventBus = useEventBus();
22763
22815
  const { t } = useTranslate();
22764
- const [visibleCount, setVisibleCount] = React80__default.useState(pageSize || Infinity);
22816
+ const [visibleCount, setVisibleCount] = React81__default.useState(pageSize || Infinity);
22765
22817
  const fieldDefs = fields ?? columns ?? [];
22766
22818
  const allDataRaw = Array.isArray(entity) ? entity : entity ? [entity] : [];
22767
22819
  const dnd = useDataDnd({
@@ -22780,7 +22832,7 @@ function DataList({
22780
22832
  const data = pageSize > 0 ? allData.slice(0, visibleCount) : allData;
22781
22833
  const hasMoreLocal = pageSize > 0 && visibleCount < allData.length;
22782
22834
  const hasRenderProp = typeof children === "function";
22783
- React80__default.useEffect(() => {
22835
+ React81__default.useEffect(() => {
22784
22836
  const renderItemTypeOf = typeof schemaRenderItem;
22785
22837
  const childrenTypeOf = typeof children;
22786
22838
  if (data.length > 0 && !hasRenderProp) {
@@ -22885,7 +22937,7 @@ function DataList({
22885
22937
  const items2 = data.map((item) => item);
22886
22938
  const groups2 = groupBy ? groupData(items2, groupBy) : [{ label: "", items: items2 }];
22887
22939
  const contentField = titleField?.name ?? fieldDefs[0]?.name ?? "";
22888
- return /* @__PURE__ */ jsx(VStack, { gap: "sm", className: cn("py-2", className), children: groups2.map((group, gi) => /* @__PURE__ */ jsxs(React80__default.Fragment, { children: [
22940
+ return /* @__PURE__ */ jsx(VStack, { gap: "sm", className: cn("py-2", className), children: groups2.map((group, gi) => /* @__PURE__ */ jsxs(React81__default.Fragment, { children: [
22889
22941
  group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: "my-2" }),
22890
22942
  group.items.map((itemData, index) => {
22891
22943
  const id = itemData.id || `${gi}-${index}`;
@@ -23033,7 +23085,7 @@ function DataList({
23033
23085
  className
23034
23086
  ),
23035
23087
  children: [
23036
- groups.map((group, gi) => /* @__PURE__ */ jsxs(React80__default.Fragment, { children: [
23088
+ groups.map((group, gi) => /* @__PURE__ */ jsxs(React81__default.Fragment, { children: [
23037
23089
  group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-4" : "mt-0" }),
23038
23090
  group.items.map(
23039
23091
  (itemData, index) => renderItem(itemData, index, gi === groups.length - 1 && index === group.items.length - 1)
@@ -24657,7 +24709,7 @@ var init_WizardProgress = __esm({
24657
24709
  children: /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: normalizedSteps.map((step, index) => {
24658
24710
  const isActive = index === currentStep;
24659
24711
  const isCompleted = index < currentStep;
24660
- return /* @__PURE__ */ jsxs(React80__default.Fragment, { children: [
24712
+ return /* @__PURE__ */ jsxs(React81__default.Fragment, { children: [
24661
24713
  /* @__PURE__ */ jsx(
24662
24714
  "button",
24663
24715
  {
@@ -25174,7 +25226,7 @@ var init_FormSectionHeader = __esm({
25174
25226
  Box,
25175
25227
  {
25176
25228
  className: cn(
25177
- "px-4 py-3 bg-muted rounded-t-lg",
25229
+ "px-4 py-3 bg-muted rounded-t-lg border-b-2 border-border border-l-4 border-l-primary",
25178
25230
  isClickable && "cursor-pointer hover:bg-[var(--color-surface-hover)] transition-colors",
25179
25231
  className
25180
25232
  ),
@@ -25186,7 +25238,7 @@ var init_FormSectionHeader = __esm({
25186
25238
  {
25187
25239
  name: icon,
25188
25240
  size: "md",
25189
- className: "text-muted-foreground"
25241
+ className: "text-primary"
25190
25242
  }
25191
25243
  ),
25192
25244
  statusIcon && /* @__PURE__ */ jsx(
@@ -25197,8 +25249,8 @@ var init_FormSectionHeader = __esm({
25197
25249
  className: hasErrors ? "text-error" : "text-success"
25198
25250
  }
25199
25251
  ),
25200
- /* @__PURE__ */ jsxs(Box, { children: [
25201
- /* @__PURE__ */ jsx(Typography, { variant: "label", weight: "semibold", children: title }),
25252
+ /* @__PURE__ */ jsxs(Box, { className: "space-y-0.5", children: [
25253
+ /* @__PURE__ */ jsx(Typography, { variant: "subheading", weight: "semibold", children: title }),
25202
25254
  subtitle && /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", children: subtitle })
25203
25255
  ] })
25204
25256
  ] }),
@@ -25268,6 +25320,303 @@ var init_FlipCard = __esm({
25268
25320
  FlipCard.displayName = "FlipCard";
25269
25321
  }
25270
25322
  });
25323
+ var ALL_CATEGORY, GridPicker;
25324
+ var init_GridPicker = __esm({
25325
+ "components/core/molecules/GridPicker.tsx"() {
25326
+ "use client";
25327
+ init_cn();
25328
+ init_Input();
25329
+ init_Badge();
25330
+ init_Stack();
25331
+ ALL_CATEGORY = "__all__";
25332
+ GridPicker = ({
25333
+ items,
25334
+ value,
25335
+ onChange,
25336
+ categories,
25337
+ searchPlaceholder,
25338
+ renderThumbnail,
25339
+ cellSize = 32,
25340
+ className
25341
+ }) => {
25342
+ const [search, setSearch] = useState("");
25343
+ const [activeCategory, setActiveCategory] = useState(ALL_CATEGORY);
25344
+ const gridRef = useRef(null);
25345
+ const categoryChips = useMemo(() => {
25346
+ if (categories !== void 0) return categories;
25347
+ const seen = [];
25348
+ for (const item of items) {
25349
+ if (!seen.includes(item.category)) seen.push(item.category);
25350
+ }
25351
+ return seen;
25352
+ }, [categories, items]);
25353
+ const filtered = useMemo(() => {
25354
+ const needle = search.trim().toLowerCase();
25355
+ return items.filter((item) => {
25356
+ const matchesCategory = activeCategory === ALL_CATEGORY || item.category === activeCategory;
25357
+ const matchesSearch = needle === "" || item.label.toLowerCase().includes(needle);
25358
+ return matchesCategory && matchesSearch;
25359
+ });
25360
+ }, [items, search, activeCategory]);
25361
+ const select = useCallback(
25362
+ (item) => {
25363
+ onChange(item.id);
25364
+ },
25365
+ [onChange]
25366
+ );
25367
+ const handleKeyDown = useCallback(
25368
+ (e, index) => {
25369
+ const cells = gridRef.current?.querySelectorAll(
25370
+ "[data-gridpicker-cell]"
25371
+ );
25372
+ if (cells === void 0 || cells.length === 0) return;
25373
+ const columns = (() => {
25374
+ const grid = gridRef.current;
25375
+ if (grid === null) return 1;
25376
+ const style = window.getComputedStyle(grid);
25377
+ const cols = style.gridTemplateColumns.split(" ").filter(Boolean).length;
25378
+ return cols > 0 ? cols : 1;
25379
+ })();
25380
+ let next = -1;
25381
+ if (e.key === "ArrowRight") next = index + 1;
25382
+ else if (e.key === "ArrowLeft") next = index - 1;
25383
+ else if (e.key === "ArrowDown") next = index + columns;
25384
+ else if (e.key === "ArrowUp") next = index - columns;
25385
+ else if (e.key === "Enter" || e.key === " ") {
25386
+ e.preventDefault();
25387
+ select(filtered[index]);
25388
+ return;
25389
+ } else {
25390
+ return;
25391
+ }
25392
+ e.preventDefault();
25393
+ if (next >= 0 && next < cells.length) {
25394
+ cells[next].focus();
25395
+ }
25396
+ },
25397
+ [filtered, select]
25398
+ );
25399
+ return /* @__PURE__ */ jsxs(VStack, { gap: "sm", className: cn("w-full", className), children: [
25400
+ /* @__PURE__ */ jsx(
25401
+ Input,
25402
+ {
25403
+ type: "search",
25404
+ icon: "search",
25405
+ value: search,
25406
+ placeholder: searchPlaceholder,
25407
+ clearable: true,
25408
+ onClear: () => setSearch(""),
25409
+ onChange: (e) => setSearch(e.target.value)
25410
+ }
25411
+ ),
25412
+ categoryChips.length > 0 && /* @__PURE__ */ jsxs(HStack, { gap: "xs", wrap: true, children: [
25413
+ /* @__PURE__ */ jsx(
25414
+ Badge,
25415
+ {
25416
+ variant: activeCategory === ALL_CATEGORY ? "primary" : "neutral",
25417
+ size: "sm",
25418
+ role: "button",
25419
+ tabIndex: 0,
25420
+ "aria-pressed": activeCategory === ALL_CATEGORY,
25421
+ className: "cursor-pointer",
25422
+ onClick: () => setActiveCategory(ALL_CATEGORY),
25423
+ onKeyDown: (e) => {
25424
+ if (e.key === "Enter" || e.key === " ") {
25425
+ e.preventDefault();
25426
+ setActiveCategory(ALL_CATEGORY);
25427
+ }
25428
+ },
25429
+ children: "All"
25430
+ }
25431
+ ),
25432
+ categoryChips.map((category) => /* @__PURE__ */ jsx(
25433
+ Badge,
25434
+ {
25435
+ variant: activeCategory === category ? "primary" : "neutral",
25436
+ size: "sm",
25437
+ role: "button",
25438
+ tabIndex: 0,
25439
+ "aria-pressed": activeCategory === category,
25440
+ className: "cursor-pointer",
25441
+ onClick: () => setActiveCategory(category),
25442
+ onKeyDown: (e) => {
25443
+ if (e.key === "Enter" || e.key === " ") {
25444
+ e.preventDefault();
25445
+ setActiveCategory(category);
25446
+ }
25447
+ },
25448
+ children: category
25449
+ },
25450
+ category
25451
+ ))
25452
+ ] }),
25453
+ /* @__PURE__ */ jsx(
25454
+ "div",
25455
+ {
25456
+ ref: gridRef,
25457
+ role: "listbox",
25458
+ className: "grid gap-1 overflow-y-auto max-h-64 p-1",
25459
+ style: {
25460
+ gridTemplateColumns: `repeat(auto-fill, minmax(${cellSize}px, 1fr))`
25461
+ },
25462
+ children: filtered.map((item, index) => {
25463
+ const selected = item.id === value;
25464
+ return /* @__PURE__ */ jsx(
25465
+ "button",
25466
+ {
25467
+ type: "button",
25468
+ role: "option",
25469
+ "aria-selected": selected,
25470
+ "aria-label": item.label,
25471
+ title: item.label,
25472
+ "data-gridpicker-cell": true,
25473
+ tabIndex: selected || value === void 0 && index === 0 ? 0 : -1,
25474
+ onClick: () => select(item),
25475
+ onKeyDown: (e) => handleKeyDown(e, index),
25476
+ className: cn(
25477
+ "flex items-center justify-center rounded-sm",
25478
+ "transition-colors hover:bg-muted",
25479
+ "focus:outline-none focus:ring-1 focus:ring-ring",
25480
+ selected && "bg-primary/10 ring-1 ring-primary"
25481
+ ),
25482
+ style: { width: cellSize, height: cellSize },
25483
+ children: renderThumbnail(item)
25484
+ },
25485
+ item.id
25486
+ );
25487
+ })
25488
+ }
25489
+ )
25490
+ ] });
25491
+ };
25492
+ GridPicker.displayName = "GridPicker";
25493
+ }
25494
+ });
25495
+ function iconForKind(kind) {
25496
+ if (kind === "audio") return "music";
25497
+ if (kind === "model") return "box";
25498
+ return "file";
25499
+ }
25500
+ var THUMB_PX, IMAGE_KINDS, AssetPicker;
25501
+ var init_AssetPicker = __esm({
25502
+ "components/core/molecules/AssetPicker.tsx"() {
25503
+ "use client";
25504
+ init_GridPicker();
25505
+ init_Icon();
25506
+ THUMB_PX = 32;
25507
+ IMAGE_KINDS = /* @__PURE__ */ new Set([
25508
+ "image",
25509
+ "spritesheet",
25510
+ "scene",
25511
+ "portrait"
25512
+ ]);
25513
+ AssetPicker = ({
25514
+ assets,
25515
+ value,
25516
+ onChange,
25517
+ className
25518
+ }) => {
25519
+ const byUrl = useMemo(() => {
25520
+ const map = /* @__PURE__ */ new Map();
25521
+ for (const entry of assets) map.set(entry.url, entry);
25522
+ return map;
25523
+ }, [assets]);
25524
+ const items = useMemo(
25525
+ () => assets.map((entry) => ({
25526
+ id: entry.url,
25527
+ label: entry.name,
25528
+ category: entry.category
25529
+ })),
25530
+ [assets]
25531
+ );
25532
+ const categories = useMemo(() => {
25533
+ const seen = [];
25534
+ for (const entry of assets) {
25535
+ if (!seen.includes(entry.category)) seen.push(entry.category);
25536
+ }
25537
+ return seen;
25538
+ }, [assets]);
25539
+ const renderThumbnail = useCallback(
25540
+ (item) => {
25541
+ const entry = byUrl.get(item.id);
25542
+ if (entry === void 0) return null;
25543
+ if (IMAGE_KINDS.has(entry.kind)) {
25544
+ return /* @__PURE__ */ jsx(
25545
+ "img",
25546
+ {
25547
+ src: entry.thumbnailUrl ?? entry.url,
25548
+ alt: entry.name,
25549
+ loading: "lazy",
25550
+ width: THUMB_PX,
25551
+ height: THUMB_PX,
25552
+ style: { width: THUMB_PX, height: THUMB_PX, objectFit: "cover" }
25553
+ }
25554
+ );
25555
+ }
25556
+ return /* @__PURE__ */ jsx(Icon, { name: iconForKind(entry.kind), size: "sm" });
25557
+ },
25558
+ [byUrl]
25559
+ );
25560
+ return /* @__PURE__ */ jsx(
25561
+ GridPicker,
25562
+ {
25563
+ items,
25564
+ value,
25565
+ onChange,
25566
+ categories,
25567
+ renderThumbnail,
25568
+ cellSize: THUMB_PX,
25569
+ className
25570
+ }
25571
+ );
25572
+ };
25573
+ AssetPicker.displayName = "AssetPicker";
25574
+ }
25575
+ });
25576
+ function pascalToKebab(name) {
25577
+ return name.replace(/([a-z0-9])([A-Z])/g, "$1-$2").replace(/([A-Z])([A-Z][a-z])/g, "$1-$2").toLowerCase();
25578
+ }
25579
+ function kebabToPascal3(name) {
25580
+ return name.split("-").map((part) => /^\d+$/.test(part) ? part : part.charAt(0).toUpperCase() + part.slice(1)).join("");
25581
+ }
25582
+ var ICON_ITEMS, IconPicker;
25583
+ var init_IconPicker = __esm({
25584
+ "components/core/molecules/IconPicker.tsx"() {
25585
+ "use client";
25586
+ init_Icon();
25587
+ init_GridPicker();
25588
+ ICON_ITEMS = (() => {
25589
+ const items = [];
25590
+ for (const [exportName, candidate] of Object.entries(LucideIcons2)) {
25591
+ if (!/^[A-Z]/.test(exportName)) continue;
25592
+ if (exportName.endsWith("Icon")) continue;
25593
+ if (exportName.startsWith("Lucide")) continue;
25594
+ const isComponent = candidate !== null && (typeof candidate === "object" || typeof candidate === "function") && "$$typeof" in candidate;
25595
+ if (!isComponent) continue;
25596
+ const kebab = pascalToKebab(exportName);
25597
+ if (kebabToPascal3(kebab) !== exportName) continue;
25598
+ items.push({ id: kebab, label: kebab, category: "icons" });
25599
+ }
25600
+ return items;
25601
+ })();
25602
+ IconPicker = ({ value, onChange, className }) => {
25603
+ const items = useMemo(() => ICON_ITEMS, []);
25604
+ return /* @__PURE__ */ jsx(
25605
+ GridPicker,
25606
+ {
25607
+ items,
25608
+ value,
25609
+ onChange,
25610
+ searchPlaceholder: "Search icons\u2026",
25611
+ renderThumbnail: (it) => /* @__PURE__ */ jsx(Icon, { name: it.id }),
25612
+ cellSize: 32,
25613
+ className
25614
+ }
25615
+ );
25616
+ };
25617
+ IconPicker.displayName = "IconPicker";
25618
+ }
25619
+ });
25271
25620
  function toISODate(d) {
25272
25621
  return d.toISOString().slice(0, 10);
25273
25622
  }
@@ -25704,9 +26053,9 @@ function ScoreDisplay({
25704
26053
  ...rest
25705
26054
  }) {
25706
26055
  const resolvedValue = typeof value === "number" && !Number.isNaN(value) ? value : typeof rest.score === "number" && !Number.isNaN(rest.score) ? rest.score : 0;
25707
- const [displayValue, setDisplayValue] = React80.useState(resolvedValue);
25708
- const [isAnimating, setIsAnimating] = React80.useState(false);
25709
- React80.useEffect(() => {
26056
+ const [displayValue, setDisplayValue] = React81.useState(resolvedValue);
26057
+ const [isAnimating, setIsAnimating] = React81.useState(false);
26058
+ React81.useEffect(() => {
25710
26059
  if (!animated || displayValue === resolvedValue) {
25711
26060
  setDisplayValue(resolvedValue);
25712
26061
  return;
@@ -25853,7 +26202,7 @@ function InventoryGrid({
25853
26202
  const eventBus = useEventBus();
25854
26203
  const slotCount = totalSlots ?? items.length;
25855
26204
  const emptySlotCount = Math.max(0, slotCount - items.length);
25856
- const handleSelect = React80.useCallback(
26205
+ const handleSelect = React81.useCallback(
25857
26206
  (id) => {
25858
26207
  onSelect?.(id);
25859
26208
  if (selectEvent) {
@@ -26139,31 +26488,31 @@ function GameCanvas2D({
26139
26488
  assetBaseUrl = "",
26140
26489
  className
26141
26490
  }) {
26142
- const canvasRef = React80.useRef(null);
26143
- const rafRef = React80.useRef(0);
26144
- const frameRef = React80.useRef(0);
26145
- const lastTimeRef = React80.useRef(0);
26146
- const imageCache = React80.useRef(/* @__PURE__ */ new Map());
26491
+ const canvasRef = React81.useRef(null);
26492
+ const rafRef = React81.useRef(0);
26493
+ const frameRef = React81.useRef(0);
26494
+ const lastTimeRef = React81.useRef(0);
26495
+ const imageCache = React81.useRef(/* @__PURE__ */ new Map());
26147
26496
  const emit = useEmitEvent();
26148
- const onDrawRef = React80.useRef(onDraw);
26497
+ const onDrawRef = React81.useRef(onDraw);
26149
26498
  onDrawRef.current = onDraw;
26150
- const onTickRef = React80.useRef(onTick);
26499
+ const onTickRef = React81.useRef(onTick);
26151
26500
  onTickRef.current = onTick;
26152
- const tickEventRef = React80.useRef(tickEvent);
26501
+ const tickEventRef = React81.useRef(tickEvent);
26153
26502
  tickEventRef.current = tickEvent;
26154
- const drawEventRef = React80.useRef(drawEvent);
26503
+ const drawEventRef = React81.useRef(drawEvent);
26155
26504
  drawEventRef.current = drawEvent;
26156
- const emitRef = React80.useRef(emit);
26505
+ const emitRef = React81.useRef(emit);
26157
26506
  emitRef.current = emit;
26158
- const assetBaseUrlRef = React80.useRef(assetBaseUrl);
26507
+ const assetBaseUrlRef = React81.useRef(assetBaseUrl);
26159
26508
  assetBaseUrlRef.current = assetBaseUrl;
26160
- const backgroundImageRef = React80.useRef(backgroundImage);
26509
+ const backgroundImageRef = React81.useRef(backgroundImage);
26161
26510
  backgroundImageRef.current = backgroundImage;
26162
- const widthRef = React80.useRef(width);
26511
+ const widthRef = React81.useRef(width);
26163
26512
  widthRef.current = width;
26164
- const heightRef = React80.useRef(height);
26513
+ const heightRef = React81.useRef(height);
26165
26514
  heightRef.current = height;
26166
- const loadImage = React80.useCallback((url) => {
26515
+ const loadImage = React81.useCallback((url) => {
26167
26516
  const fullUrl = url.startsWith("http") ? url : `${assetBaseUrlRef.current}${url}`;
26168
26517
  const cached = imageCache.current.get(fullUrl);
26169
26518
  if (cached?.complete && cached.naturalWidth > 0) return cached;
@@ -26175,7 +26524,7 @@ function GameCanvas2D({
26175
26524
  }
26176
26525
  return null;
26177
26526
  }, []);
26178
- React80.useEffect(() => {
26527
+ React81.useEffect(() => {
26179
26528
  const canvas = canvasRef.current;
26180
26529
  if (!canvas) return;
26181
26530
  const ctx = canvas.getContext("2d");
@@ -26530,7 +26879,7 @@ function TurnPanel({
26530
26879
  className
26531
26880
  }) {
26532
26881
  const eventBus = useEventBus();
26533
- const handleAction = React80.useCallback(
26882
+ const handleAction = React81.useCallback(
26534
26883
  (event) => {
26535
26884
  if (event) {
26536
26885
  eventBus.emit(event, { turn: currentTurn, phase, activeTeam });
@@ -26676,7 +27025,7 @@ function UnitCommandBar({
26676
27025
  className
26677
27026
  }) {
26678
27027
  const eventBus = useEventBus();
26679
- const handleCommand = React80.useCallback(
27028
+ const handleCommand = React81.useCallback(
26680
27029
  (event) => {
26681
27030
  if (event) {
26682
27031
  eventBus.emit(event, { unitId: selectedUnitId });
@@ -27161,7 +27510,7 @@ function GameMenu({
27161
27510
  } catch {
27162
27511
  }
27163
27512
  const eventBus = eventBusProp || eventBusFromHook;
27164
- const handleOptionClick = React80.useCallback(
27513
+ const handleOptionClick = React81.useCallback(
27165
27514
  (option) => {
27166
27515
  if (option.event && eventBus) {
27167
27516
  eventBus.emit(`UI:${option.event}`, { option });
@@ -27275,7 +27624,7 @@ function GameOverScreen({
27275
27624
  } catch {
27276
27625
  }
27277
27626
  const eventBus = eventBusProp || eventBusFromHook;
27278
- const handleActionClick = React80.useCallback(
27627
+ const handleActionClick = React81.useCallback(
27279
27628
  (action) => {
27280
27629
  if (action.event && eventBus) {
27281
27630
  eventBus.emit(`UI:${action.event}`, { action });
@@ -28291,7 +28640,7 @@ var init_StarRating = __esm({
28291
28640
  name: "star",
28292
28641
  className: cn(
28293
28642
  styles.star,
28294
- "text-muted",
28643
+ "text-muted-foreground",
28295
28644
  "transition-colors duration-100"
28296
28645
  ),
28297
28646
  strokeWidth: 1.5
@@ -28774,8 +29123,8 @@ function TableView({
28774
29123
  }) {
28775
29124
  const eventBus = useEventBus();
28776
29125
  const { t } = useTranslate();
28777
- const [visibleCount, setVisibleCount] = React80__default.useState(pageSize > 0 ? pageSize : Infinity);
28778
- const [localSelected, setLocalSelected] = React80__default.useState(/* @__PURE__ */ new Set());
29126
+ const [visibleCount, setVisibleCount] = React81__default.useState(pageSize > 0 ? pageSize : Infinity);
29127
+ const [localSelected, setLocalSelected] = React81__default.useState(/* @__PURE__ */ new Set());
28779
29128
  const colDefs = columns ?? fields ?? [];
28780
29129
  const allDataRaw = Array.isArray(entity) ? entity : entity ? [entity] : [];
28781
29130
  const dnd = useDataDnd({
@@ -28970,12 +29319,12 @@ function TableView({
28970
29319
  ]
28971
29320
  }
28972
29321
  );
28973
- return dnd.isZone ? /* @__PURE__ */ jsx(dnd.SortableItem, { id: row[idField] ?? id, children: rowInner }, id) : /* @__PURE__ */ jsx(React80__default.Fragment, { children: rowInner }, id);
29322
+ return dnd.isZone ? /* @__PURE__ */ jsx(dnd.SortableItem, { id: row[idField] ?? id, children: rowInner }, id) : /* @__PURE__ */ jsx(React81__default.Fragment, { children: rowInner }, id);
28974
29323
  };
28975
29324
  const items = data.map((row) => row);
28976
29325
  const groups = groupBy ? groupData2(items, groupBy) : [{ label: "", items }];
28977
29326
  let runningIndex = 0;
28978
- const body = /* @__PURE__ */ jsx(Box, { role: "rowgroup", children: groups.map((group, gi) => /* @__PURE__ */ jsxs(React80__default.Fragment, { children: [
29327
+ const body = /* @__PURE__ */ jsx(Box, { role: "rowgroup", children: groups.map((group, gi) => /* @__PURE__ */ jsxs(React81__default.Fragment, { children: [
28979
29328
  group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-3" : "mt-0" }),
28980
29329
  group.items.map((row) => renderRow(row, runningIndex++))
28981
29330
  ] }, gi)) });
@@ -30327,7 +30676,7 @@ var init_StepFlow = __esm({
30327
30676
  className
30328
30677
  }) => {
30329
30678
  if (orientation === "vertical") {
30330
- return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(React80__default.Fragment, { children: /* @__PURE__ */ jsxs(HStack, { gap: "md", align: "start", className: "w-full", children: [
30679
+ return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(React81__default.Fragment, { children: /* @__PURE__ */ jsxs(HStack, { gap: "md", align: "start", className: "w-full", children: [
30331
30680
  /* @__PURE__ */ jsxs(VStack, { gap: "none", align: "center", children: [
30332
30681
  /* @__PURE__ */ jsx(StepCircle, { step, index }),
30333
30682
  showConnectors && index < steps.length - 1 && /* @__PURE__ */ jsx(Box, { className: "w-px h-8 bg-border" })
@@ -30338,7 +30687,7 @@ var init_StepFlow = __esm({
30338
30687
  ] })
30339
30688
  ] }) }, index)) });
30340
30689
  }
30341
- 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(React80__default.Fragment, { children: [
30690
+ 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(React81__default.Fragment, { children: [
30342
30691
  /* @__PURE__ */ jsxs(VStack, { gap: "sm", align: "center", className: "flex-1 w-full md:w-auto", children: [
30343
30692
  /* @__PURE__ */ jsx(StepCircle, { step, index }),
30344
30693
  /* @__PURE__ */ jsx(Typography, { variant: "h4", className: "text-center", children: step.title }),
@@ -31314,7 +31663,7 @@ var init_LikertScale = __esm({
31314
31663
  md: "text-base",
31315
31664
  lg: "text-lg"
31316
31665
  };
31317
- LikertScale = React80__default.forwardRef(
31666
+ LikertScale = React81__default.forwardRef(
31318
31667
  ({
31319
31668
  question,
31320
31669
  options = DEFAULT_LIKERT_OPTIONS,
@@ -31326,7 +31675,7 @@ var init_LikertScale = __esm({
31326
31675
  variant = "radios",
31327
31676
  className
31328
31677
  }, ref) => {
31329
- const groupId = React80__default.useId();
31678
+ const groupId = React81__default.useId();
31330
31679
  const eventBus = useEventBus();
31331
31680
  const handleSelect = useCallback(
31332
31681
  (next) => {
@@ -32471,6 +32820,7 @@ function Editable({
32471
32820
  function BlockRow({
32472
32821
  block,
32473
32822
  readOnly,
32823
+ showAffordances,
32474
32824
  placeholder,
32475
32825
  onUpdate,
32476
32826
  onDelete,
@@ -32689,7 +33039,7 @@ function BlockRow({
32689
33039
  onValueChange: (next) => setChildContent(child.id, next)
32690
33040
  }
32691
33041
  ),
32692
- !readOnly && /* @__PURE__ */ jsx(
33042
+ !readOnly && showAffordances && /* @__PURE__ */ jsx(
32693
33043
  Button,
32694
33044
  {
32695
33045
  type: "button",
@@ -32704,7 +33054,7 @@ function BlockRow({
32704
33054
  }
32705
33055
  )
32706
33056
  ] }, child.id)),
32707
- !readOnly && /* @__PURE__ */ jsx(Box, { as: "li", className: "list-none pl-0", children: /* @__PURE__ */ jsxs(
33057
+ !readOnly && showAffordances && /* @__PURE__ */ jsx(Box, { as: "li", className: "list-none pl-0", children: /* @__PURE__ */ jsxs(
32708
33058
  Button,
32709
33059
  {
32710
33060
  type: "button",
@@ -32751,7 +33101,7 @@ function BlockRow({
32751
33101
  "data-block-id": block.id,
32752
33102
  "data-block-type": block.type,
32753
33103
  children: [
32754
- !readOnly && /* @__PURE__ */ jsxs(Box, { className: "flex w-12 shrink-0 items-center gap-0.5 pt-1", children: [
33104
+ !readOnly && showAffordances && /* @__PURE__ */ jsxs(Box, { className: "flex w-12 shrink-0 items-center gap-0.5 pt-1", children: [
32755
33105
  /* @__PURE__ */ jsx(
32756
33106
  Button,
32757
33107
  {
@@ -32850,6 +33200,7 @@ var init_RichBlockEditor = __esm({
32850
33200
  changeEvent,
32851
33201
  readOnly = false,
32852
33202
  placeholder,
33203
+ enableBlocks = false,
32853
33204
  showToolbar = true,
32854
33205
  className
32855
33206
  }) => {
@@ -32921,7 +33272,7 @@ var init_RichBlockEditor = __esm({
32921
33272
  padding: "none",
32922
33273
  className: cn("flex flex-col", className),
32923
33274
  children: [
32924
- showToolbar && !readOnly && /* @__PURE__ */ jsx(
33275
+ enableBlocks && showToolbar && !readOnly && /* @__PURE__ */ jsx(
32925
33276
  Box,
32926
33277
  {
32927
33278
  role: "toolbar",
@@ -32957,6 +33308,7 @@ var init_RichBlockEditor = __esm({
32957
33308
  {
32958
33309
  block,
32959
33310
  readOnly,
33311
+ showAffordances: enableBlocks,
32960
33312
  placeholder,
32961
33313
  onUpdate: (updater) => handleUpdate(block.id, updater),
32962
33314
  onDelete: () => handleDelete(block.id),
@@ -33631,7 +33983,7 @@ var init_DocBreadcrumb = __esm({
33631
33983
  "aria-label": t("aria.breadcrumb"),
33632
33984
  children: /* @__PURE__ */ jsx(HStack, { gap: "xs", align: "center", wrap: true, children: items.map((item, idx) => {
33633
33985
  const isLast = idx === items.length - 1;
33634
- return /* @__PURE__ */ jsxs(React80__default.Fragment, { children: [
33986
+ return /* @__PURE__ */ jsxs(React81__default.Fragment, { children: [
33635
33987
  idx > 0 && /* @__PURE__ */ jsx(
33636
33988
  Icon,
33637
33989
  {
@@ -34595,7 +34947,7 @@ var init_MiniStateMachine = __esm({
34595
34947
  const x = 2 + i * (NODE_W + GAP2 + ARROW_W + GAP2);
34596
34948
  const tc = transitionCounts[s.name] ?? 0;
34597
34949
  const role = getStateRole(s.name, s.isInitial, s.isTerminal, tc, maxTC);
34598
- return /* @__PURE__ */ jsxs(React80__default.Fragment, { children: [
34950
+ return /* @__PURE__ */ jsxs(React81__default.Fragment, { children: [
34599
34951
  /* @__PURE__ */ jsx(
34600
34952
  AvlState,
34601
34953
  {
@@ -34799,7 +35151,7 @@ var init_PageHeader = __esm({
34799
35151
  info: "bg-info/10 text-info"
34800
35152
  };
34801
35153
  return /* @__PURE__ */ jsxs(Box, { className: cn("mb-6", className), children: [
34802
- 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(React80__default.Fragment, { children: [
35154
+ 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(React81__default.Fragment, { children: [
34803
35155
  idx > 0 && /* @__PURE__ */ jsx(Typography, { variant: "small", color: "muted", children: "/" }),
34804
35156
  crumb.href ? /* @__PURE__ */ jsx(
34805
35157
  "a",
@@ -34908,7 +35260,7 @@ var init_FormSection = __esm({
34908
35260
  columns = 1,
34909
35261
  className
34910
35262
  }) => {
34911
- const [collapsed, setCollapsed] = React80__default.useState(defaultCollapsed);
35263
+ const [collapsed, setCollapsed] = React81__default.useState(defaultCollapsed);
34912
35264
  const { t } = useTranslate();
34913
35265
  const eventBus = useEventBus();
34914
35266
  const gridClass = {
@@ -34916,7 +35268,7 @@ var init_FormSection = __esm({
34916
35268
  2: "grid-cols-1 md:grid-cols-2",
34917
35269
  3: "grid-cols-1 md:grid-cols-2 lg:grid-cols-3"
34918
35270
  }[columns];
34919
- React80__default.useCallback(() => {
35271
+ React81__default.useCallback(() => {
34920
35272
  if (collapsible) {
34921
35273
  setCollapsed((prev) => !prev);
34922
35274
  eventBus.emit("UI:TOGGLE_COLLAPSE", { collapsed: !collapsed });
@@ -35013,6 +35365,148 @@ var init_FormSection = __esm({
35013
35365
  FormActions.displayName = "FormActions";
35014
35366
  }
35015
35367
  });
35368
+ function currentValue(decl, override) {
35369
+ return override !== void 0 ? override : decl.default;
35370
+ }
35371
+ function TextLikeControl({
35372
+ field,
35373
+ numeric,
35374
+ value,
35375
+ onCommit
35376
+ }) {
35377
+ const initial = value === void 0 || value === null ? "" : String(value);
35378
+ const [draft, setDraft] = React81__default.useState(initial);
35379
+ React81__default.useEffect(() => setDraft(initial), [initial]);
35380
+ const commit = () => {
35381
+ if (numeric) {
35382
+ const n = draft.trim() === "" ? 0 : Number(draft);
35383
+ onCommit(field, Number.isNaN(n) ? 0 : n);
35384
+ } else {
35385
+ onCommit(field, draft);
35386
+ }
35387
+ };
35388
+ return /* @__PURE__ */ jsx(
35389
+ Input,
35390
+ {
35391
+ inputType: numeric ? "number" : "text",
35392
+ value: draft,
35393
+ onChange: (e) => setDraft(e.target.value),
35394
+ onBlur: commit,
35395
+ onKeyDown: (e) => {
35396
+ if (e.key === "Enter") commit();
35397
+ }
35398
+ }
35399
+ );
35400
+ }
35401
+ function FieldControl({
35402
+ name,
35403
+ decl,
35404
+ value,
35405
+ onChange,
35406
+ assets
35407
+ }) {
35408
+ let control;
35409
+ const stringValue = typeof value === "string" ? value : void 0;
35410
+ if (decl.control === "icon") {
35411
+ control = /* @__PURE__ */ jsx(IconPicker, { value: stringValue, onChange: (icon) => onChange(name, icon) });
35412
+ } else if (decl.control === "asset" && assets !== void 0) {
35413
+ control = /* @__PURE__ */ jsx(AssetPicker, { assets, value: stringValue, onChange: (url) => onChange(name, url) });
35414
+ } else if (decl.control === "color" && decl.values !== void 0 && decl.values.length > 0) {
35415
+ control = /* @__PURE__ */ jsx(
35416
+ Select,
35417
+ {
35418
+ options: decl.values.map((v) => ({ value: v, label: v })),
35419
+ value: stringValue ?? "",
35420
+ onChange: (e) => onChange(name, e.target.value)
35421
+ }
35422
+ );
35423
+ } else if (decl.control === "asset" || decl.control === "color") {
35424
+ control = /* @__PURE__ */ jsx(TextLikeControl, { field: name, numeric: false, value, onCommit: onChange });
35425
+ } else if (decl.type === "boolean") {
35426
+ control = /* @__PURE__ */ jsx(Switch, { checked: value === true, onChange: (c) => onChange(name, c) });
35427
+ } else if (decl.type === "string" && decl.values !== void 0 && decl.values.length > 0) {
35428
+ control = /* @__PURE__ */ jsx(
35429
+ Select,
35430
+ {
35431
+ options: decl.values.map((v) => ({ value: v, label: v })),
35432
+ value: typeof value === "string" ? value : "",
35433
+ onChange: (e) => onChange(name, e.target.value)
35434
+ }
35435
+ );
35436
+ } else if (decl.type === "number") {
35437
+ control = /* @__PURE__ */ jsx(TextLikeControl, { field: name, numeric: true, value, onCommit: onChange });
35438
+ } else if (decl.type === "string") {
35439
+ control = /* @__PURE__ */ jsx(TextLikeControl, { field: name, numeric: false, value, onCommit: onChange });
35440
+ } else {
35441
+ control = /* @__PURE__ */ jsxs(Typography, { variant: "caption", color: "muted", children: [
35442
+ decl.type,
35443
+ " \u2014 edit in source"
35444
+ ] });
35445
+ }
35446
+ return /* @__PURE__ */ jsxs(VStack, { gap: "xs", children: [
35447
+ /* @__PURE__ */ jsx(Typography, { variant: "label", children: decl.label ?? name }),
35448
+ control,
35449
+ decl.description !== void 0 && decl.description !== "" && /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", children: decl.description })
35450
+ ] });
35451
+ }
35452
+ var TIER_ORDER, PropertyInspector;
35453
+ var init_PropertyInspector = __esm({
35454
+ "components/core/molecules/PropertyInspector.tsx"() {
35455
+ "use client";
35456
+ init_cn();
35457
+ init_Stack();
35458
+ init_Typography();
35459
+ init_Button();
35460
+ init_Switch();
35461
+ init_Select();
35462
+ init_Input();
35463
+ init_FormSection();
35464
+ init_IconPicker();
35465
+ init_AssetPicker();
35466
+ TIER_ORDER = ["presentation", "domain", "policy", "infra", "internal"];
35467
+ PropertyInspector = ({
35468
+ config,
35469
+ values,
35470
+ onChange,
35471
+ onReset,
35472
+ title,
35473
+ className,
35474
+ assets
35475
+ }) => {
35476
+ const fields = Object.entries(config);
35477
+ const byTier = /* @__PURE__ */ new Map();
35478
+ for (const [name, decl] of fields) {
35479
+ const tier = decl.tier ?? "presentation";
35480
+ const arr = byTier.get(tier) ?? [];
35481
+ arr.push([name, decl]);
35482
+ byTier.set(tier, arr);
35483
+ }
35484
+ const tiers = [...byTier.keys()].sort((a, b) => {
35485
+ const ia = TIER_ORDER.indexOf(a);
35486
+ const ib = TIER_ORDER.indexOf(b);
35487
+ return (ia === -1 ? 99 : ia) - (ib === -1 ? 99 : ib);
35488
+ });
35489
+ return /* @__PURE__ */ jsxs(VStack, { gap: "sm", className: cn("w-full", className), children: [
35490
+ /* @__PURE__ */ jsxs(HStack, { justify: "between", align: "center", children: [
35491
+ /* @__PURE__ */ jsx(Typography, { variant: "caption", weight: "bold", children: title ?? "Config" }),
35492
+ onReset !== void 0 && /* @__PURE__ */ jsx(Button, { variant: "ghost", size: "sm", icon: "rotate-ccw", label: "Reset", onClick: onReset })
35493
+ ] }),
35494
+ fields.length === 0 && /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", children: "No configurable properties." }),
35495
+ tiers.map((tier) => /* @__PURE__ */ jsx(FormSection, { title: tier, collapsible: true, defaultCollapsed: tier !== "presentation", children: /* @__PURE__ */ jsx(VStack, { gap: "sm", children: byTier.get(tier)?.map(([name, decl]) => /* @__PURE__ */ jsx(
35496
+ FieldControl,
35497
+ {
35498
+ name,
35499
+ decl,
35500
+ value: currentValue(decl, values?.[name]),
35501
+ onChange,
35502
+ assets
35503
+ },
35504
+ name
35505
+ )) }) }, tier))
35506
+ ] });
35507
+ };
35508
+ }
35509
+ });
35016
35510
  var lookStyles8, Header;
35017
35511
  var init_Header = __esm({
35018
35512
  "components/core/molecules/Header.tsx"() {
@@ -35663,7 +36157,7 @@ var init_WizardContainer = __esm({
35663
36157
  const isCompleted = index < currentStep;
35664
36158
  const stepKey = step.id ?? step.tabId ?? `step-${index}`;
35665
36159
  const stepTitle = step.title ?? step.name ?? `Step ${index + 1}`;
35666
- return /* @__PURE__ */ jsxs(React80__default.Fragment, { children: [
36160
+ return /* @__PURE__ */ jsxs(React81__default.Fragment, { children: [
35667
36161
  /* @__PURE__ */ jsx(
35668
36162
  Button,
35669
36163
  {
@@ -36913,6 +37407,9 @@ var init_molecules2 = __esm({
36913
37407
  init_ViolationAlert();
36914
37408
  init_FormSectionHeader();
36915
37409
  init_FlipCard();
37410
+ init_GridPicker();
37411
+ init_AssetPicker();
37412
+ init_IconPicker();
36916
37413
  init_DateRangePicker();
36917
37414
  init_DateRangeSelector();
36918
37415
  init_ChartLegend();
@@ -36978,6 +37475,7 @@ var init_molecules2 = __esm({
36978
37475
  init_ModuleCard();
36979
37476
  init_PageHeader();
36980
37477
  init_FormSection();
37478
+ init_PropertyInspector();
36981
37479
  init_Header();
36982
37480
  init_Navigation();
36983
37481
  init_Section();
@@ -38106,7 +38604,7 @@ var init_DialogueBubble = __esm({
38106
38604
  }
38107
38605
  });
38108
38606
  function extractTitle(children) {
38109
- if (!React80__default.isValidElement(children)) return void 0;
38607
+ if (!React81__default.isValidElement(children)) return void 0;
38110
38608
  const props = children.props;
38111
38609
  if (typeof props.title === "string") {
38112
38610
  return props.title;
@@ -38218,7 +38716,7 @@ function LinearView({
38218
38716
  /* @__PURE__ */ jsx(HStack, { className: "flex-wrap items-center", gap: "xs", children: trait.states.map((state, i) => {
38219
38717
  const isDone = i < currentIdx;
38220
38718
  const isCurrent = i === currentIdx;
38221
- return /* @__PURE__ */ jsxs(React80__default.Fragment, { children: [
38719
+ return /* @__PURE__ */ jsxs(React81__default.Fragment, { children: [
38222
38720
  i > 0 && /* @__PURE__ */ jsx(
38223
38721
  Typography,
38224
38722
  {
@@ -39176,12 +39674,12 @@ var init_Form = __esm({
39176
39674
  const isSchemaEntity = isOrbitalEntitySchema(entity);
39177
39675
  const resolvedEntity = isSchemaEntity ? entity : void 0;
39178
39676
  const entityName = typeof entity === "string" ? entity : resolvedEntity?.name;
39179
- const normalizedInitialData = React80__default.useMemo(() => {
39677
+ const normalizedInitialData = React81__default.useMemo(() => {
39180
39678
  const entityRowAsInitial = isPlainEntityRow(entity) ? entity : void 0;
39181
39679
  const callerInitial = initialData !== null && typeof initialData === "object" && !Array.isArray(initialData) ? initialData : {};
39182
39680
  return entityRowAsInitial !== void 0 ? { ...entityRowAsInitial, ...callerInitial } : callerInitial;
39183
39681
  }, [entity, initialData]);
39184
- const entityDerivedFields = React80__default.useMemo(() => {
39682
+ const entityDerivedFields = React81__default.useMemo(() => {
39185
39683
  if (fields && fields.length > 0) return void 0;
39186
39684
  if (!resolvedEntity) return void 0;
39187
39685
  return resolvedEntity.fields.map(
@@ -39201,16 +39699,16 @@ var init_Form = __esm({
39201
39699
  const conditionalFields = typeof conditionalFieldsRaw === "boolean" ? {} : conditionalFieldsRaw;
39202
39700
  const hiddenCalculations = typeof hiddenCalculationsRaw === "boolean" ? [] : hiddenCalculationsRaw;
39203
39701
  const violationTriggers = typeof violationTriggersRaw === "boolean" ? [] : violationTriggersRaw;
39204
- const [formData, setFormData] = React80__default.useState(
39702
+ const [formData, setFormData] = React81__default.useState(
39205
39703
  normalizedInitialData
39206
39704
  );
39207
- const [collapsedSections, setCollapsedSections] = React80__default.useState(
39705
+ const [collapsedSections, setCollapsedSections] = React81__default.useState(
39208
39706
  /* @__PURE__ */ new Set()
39209
39707
  );
39210
- const [submitError, setSubmitError] = React80__default.useState(null);
39211
- const formRef = React80__default.useRef(null);
39708
+ const [submitError, setSubmitError] = React81__default.useState(null);
39709
+ const formRef = React81__default.useRef(null);
39212
39710
  const formMode = props.mode;
39213
- const mountedRef = React80__default.useRef(false);
39711
+ const mountedRef = React81__default.useRef(false);
39214
39712
  if (!mountedRef.current) {
39215
39713
  mountedRef.current = true;
39216
39714
  debug("forms", "mount", {
@@ -39223,7 +39721,7 @@ var init_Form = __esm({
39223
39721
  });
39224
39722
  }
39225
39723
  const shouldShowCancel = showCancel ?? (fields && fields.length > 0);
39226
- const evalContext = React80__default.useMemo(
39724
+ const evalContext = React81__default.useMemo(
39227
39725
  () => ({
39228
39726
  formValues: formData,
39229
39727
  globalVariables: externalContext?.globalVariables ?? {},
@@ -39232,7 +39730,7 @@ var init_Form = __esm({
39232
39730
  }),
39233
39731
  [formData, externalContext]
39234
39732
  );
39235
- React80__default.useEffect(() => {
39733
+ React81__default.useEffect(() => {
39236
39734
  debug("forms", "initialData-sync", {
39237
39735
  mode: formMode,
39238
39736
  normalizedInitialData,
@@ -39243,7 +39741,7 @@ var init_Form = __esm({
39243
39741
  setFormData(normalizedInitialData);
39244
39742
  }
39245
39743
  }, [normalizedInitialData]);
39246
- const processCalculations = React80__default.useCallback(
39744
+ const processCalculations = React81__default.useCallback(
39247
39745
  (changedFieldId, newFormData) => {
39248
39746
  if (!hiddenCalculations.length) return;
39249
39747
  const context = {
@@ -39268,7 +39766,7 @@ var init_Form = __esm({
39268
39766
  },
39269
39767
  [hiddenCalculations, externalContext, eventBus]
39270
39768
  );
39271
- const checkViolations = React80__default.useCallback(
39769
+ const checkViolations = React81__default.useCallback(
39272
39770
  (changedFieldId, newFormData) => {
39273
39771
  if (!violationTriggers.length) return;
39274
39772
  const context = {
@@ -39306,7 +39804,7 @@ var init_Form = __esm({
39306
39804
  processCalculations(name, newFormData);
39307
39805
  checkViolations(name, newFormData);
39308
39806
  };
39309
- const isFieldVisible = React80__default.useCallback(
39807
+ const isFieldVisible = React81__default.useCallback(
39310
39808
  (fieldName) => {
39311
39809
  const condition = conditionalFields[fieldName];
39312
39810
  if (!condition) return true;
@@ -39314,7 +39812,7 @@ var init_Form = __esm({
39314
39812
  },
39315
39813
  [conditionalFields, evalContext]
39316
39814
  );
39317
- const isSectionVisible = React80__default.useCallback(
39815
+ const isSectionVisible = React81__default.useCallback(
39318
39816
  (section) => {
39319
39817
  if (!section.condition) return true;
39320
39818
  return Boolean(evaluateFormExpression(section.condition, evalContext));
@@ -39390,7 +39888,7 @@ var init_Form = __esm({
39390
39888
  eventBus.emit(`UI:${onCancel}`);
39391
39889
  }
39392
39890
  };
39393
- const renderField = React80__default.useCallback(
39891
+ const renderField = React81__default.useCallback(
39394
39892
  (field) => {
39395
39893
  const fieldName = field.name || field.field;
39396
39894
  if (!fieldName) return null;
@@ -39399,19 +39897,19 @@ var init_Form = __esm({
39399
39897
  }
39400
39898
  const inputType = determineInputType(field);
39401
39899
  const label = field.label || fieldName.charAt(0).toUpperCase() + fieldName.slice(1).replace(/([A-Z])/g, " $1");
39402
- const currentValue = formData[fieldName] ?? field.defaultValue ?? "";
39900
+ const currentValue2 = formData[fieldName] ?? field.defaultValue ?? "";
39403
39901
  return /* @__PURE__ */ jsxs(VStack, { gap: "xs", "data-field": fieldName, children: [
39404
39902
  inputType !== "checkbox" && /* @__PURE__ */ jsxs(Typography, { as: "label", variant: "label", weight: "bold", children: [
39405
39903
  label,
39406
39904
  field.required && /* @__PURE__ */ jsx(Typography, { as: "span", color: "error", className: "ml-1", children: "*" })
39407
39905
  ] }),
39408
- renderFieldInput(field, fieldName, inputType, currentValue, label)
39906
+ renderFieldInput(field, fieldName, inputType, currentValue2, label)
39409
39907
  ] }, fieldName);
39410
39908
  },
39411
39909
  [formData, isFieldVisible, relationsData, relationsLoading, isLoading]
39412
39910
  );
39413
39911
  const effectiveFields = entityDerivedFields ?? fields;
39414
- const normalizedFields = React80__default.useMemo(() => {
39912
+ const normalizedFields = React81__default.useMemo(() => {
39415
39913
  if (!effectiveFields || effectiveFields.length === 0) return [];
39416
39914
  return effectiveFields.map((field) => {
39417
39915
  if (typeof field === "string") {
@@ -39434,7 +39932,7 @@ var init_Form = __esm({
39434
39932
  return field;
39435
39933
  });
39436
39934
  }, [effectiveFields, resolvedEntity]);
39437
- const schemaFields = React80__default.useMemo(() => {
39935
+ const schemaFields = React81__default.useMemo(() => {
39438
39936
  if (normalizedFields.length === 0) return null;
39439
39937
  if (isDebugEnabled()) {
39440
39938
  debugGroup(`Form: ${entityName || "unknown"}`);
@@ -39444,7 +39942,7 @@ var init_Form = __esm({
39444
39942
  }
39445
39943
  return normalizedFields.map(renderField).filter(Boolean);
39446
39944
  }, [normalizedFields, renderField, entityName, conditionalFields]);
39447
- const sectionElements = React80__default.useMemo(() => {
39945
+ const sectionElements = React81__default.useMemo(() => {
39448
39946
  if (!sections || sections.length === 0) return null;
39449
39947
  return sections.map((section) => {
39450
39948
  if (!isSectionVisible(section)) {
@@ -39480,7 +39978,7 @@ var init_Form = __esm({
39480
39978
  ] }, section.id);
39481
39979
  }).filter(Boolean);
39482
39980
  }, [sections, isSectionVisible, collapsedSections, renderField, gap]);
39483
- function renderFieldInput(field, fieldName, inputType, currentValue, label) {
39981
+ function renderFieldInput(field, fieldName, inputType, currentValue2, label) {
39484
39982
  const commonProps = {
39485
39983
  id: fieldName,
39486
39984
  name: fieldName,
@@ -39497,7 +39995,7 @@ var init_Form = __esm({
39497
39995
  {
39498
39996
  ...commonProps,
39499
39997
  label: label + (field.required ? " *" : ""),
39500
- checked: Boolean(currentValue),
39998
+ checked: Boolean(currentValue2),
39501
39999
  onChange: (e) => handleChange(fieldName, e.target.checked)
39502
40000
  }
39503
40001
  );
@@ -39506,7 +40004,7 @@ var init_Form = __esm({
39506
40004
  Textarea,
39507
40005
  {
39508
40006
  ...commonProps,
39509
- value: String(currentValue),
40007
+ value: String(currentValue2),
39510
40008
  onChange: (e) => handleChange(fieldName, e.target.value),
39511
40009
  minLength: field.min,
39512
40010
  maxLength: field.max
@@ -39519,7 +40017,7 @@ var init_Form = __esm({
39519
40017
  {
39520
40018
  ...commonProps,
39521
40019
  options,
39522
- value: String(currentValue),
40020
+ value: String(currentValue2),
39523
40021
  onChange: (e) => handleChange(fieldName, e.target.value),
39524
40022
  placeholder: field.placeholder || `Select ${label}...`
39525
40023
  }
@@ -39532,7 +40030,7 @@ var init_Form = __esm({
39532
40030
  RelationSelect,
39533
40031
  {
39534
40032
  ...commonProps,
39535
- value: currentValue ? String(currentValue) : void 0,
40033
+ value: currentValue2 ? String(currentValue2) : void 0,
39536
40034
  onChange: (value) => handleChange(fieldName, value),
39537
40035
  options: relationOptions,
39538
40036
  isLoading: relationLoading,
@@ -39548,7 +40046,7 @@ var init_Form = __esm({
39548
40046
  {
39549
40047
  ...commonProps,
39550
40048
  type: "number",
39551
- value: currentValue !== void 0 && currentValue !== "" ? String(currentValue) : "",
40049
+ value: currentValue2 !== void 0 && currentValue2 !== "" ? String(currentValue2) : "",
39552
40050
  onChange: (e) => handleChange(
39553
40051
  fieldName,
39554
40052
  e.target.value ? Number(e.target.value) : void 0
@@ -39563,7 +40061,7 @@ var init_Form = __esm({
39563
40061
  {
39564
40062
  ...commonProps,
39565
40063
  type: "date",
39566
- value: formatDateValue(currentValue),
40064
+ value: formatDateValue(currentValue2),
39567
40065
  onChange: (e) => handleChange(fieldName, e.target.value)
39568
40066
  }
39569
40067
  );
@@ -39573,7 +40071,7 @@ var init_Form = __esm({
39573
40071
  {
39574
40072
  ...commonProps,
39575
40073
  type: "datetime-local",
39576
- value: formatDateTimeValue(currentValue),
40074
+ value: formatDateTimeValue(currentValue2),
39577
40075
  onChange: (e) => handleChange(fieldName, e.target.value)
39578
40076
  }
39579
40077
  );
@@ -39583,7 +40081,7 @@ var init_Form = __esm({
39583
40081
  {
39584
40082
  ...commonProps,
39585
40083
  type: "email",
39586
- value: String(currentValue),
40084
+ value: String(currentValue2),
39587
40085
  onChange: (e) => handleChange(fieldName, e.target.value),
39588
40086
  minLength: field.min,
39589
40087
  maxLength: field.max
@@ -39595,7 +40093,7 @@ var init_Form = __esm({
39595
40093
  {
39596
40094
  ...commonProps,
39597
40095
  type: "url",
39598
- value: String(currentValue),
40096
+ value: String(currentValue2),
39599
40097
  onChange: (e) => handleChange(fieldName, e.target.value),
39600
40098
  minLength: field.min,
39601
40099
  maxLength: field.max
@@ -39607,7 +40105,7 @@ var init_Form = __esm({
39607
40105
  {
39608
40106
  ...commonProps,
39609
40107
  type: "password",
39610
- value: String(currentValue),
40108
+ value: String(currentValue2),
39611
40109
  onChange: (e) => handleChange(fieldName, e.target.value),
39612
40110
  minLength: field.min,
39613
40111
  maxLength: field.max
@@ -39620,7 +40118,7 @@ var init_Form = __esm({
39620
40118
  {
39621
40119
  ...commonProps,
39622
40120
  type: "text",
39623
- value: String(currentValue),
40121
+ value: String(currentValue2),
39624
40122
  onChange: (e) => handleChange(fieldName, e.target.value),
39625
40123
  minLength: field.min,
39626
40124
  maxLength: field.max
@@ -40726,7 +41224,7 @@ var init_List = __esm({
40726
41224
  if (entity && typeof entity === "object" && "id" in entity) return [entity];
40727
41225
  return [];
40728
41226
  }, [entity]);
40729
- const getItemActions = React80__default.useCallback(
41227
+ const getItemActions = React81__default.useCallback(
40730
41228
  (item) => {
40731
41229
  if (!itemActions) return [];
40732
41230
  if (typeof itemActions === "function") {
@@ -41202,7 +41700,7 @@ var init_MediaGallery = __esm({
41202
41700
  [selectable, selectedItems, selectionEvent, eventBus]
41203
41701
  );
41204
41702
  const entityData = Array.isArray(entity) ? entity : [];
41205
- const items = React80__default.useMemo(() => {
41703
+ const items = React81__default.useMemo(() => {
41206
41704
  if (propItems) return propItems;
41207
41705
  if (entityData.length === 0) return [];
41208
41706
  return entityData.map((record, idx) => ({
@@ -41372,9 +41870,9 @@ function MiniMap({
41372
41870
  viewportRect,
41373
41871
  className
41374
41872
  }) {
41375
- const canvasRef = React80.useRef(null);
41376
- const frameRef = React80.useRef(0);
41377
- React80.useEffect(() => {
41873
+ const canvasRef = React81.useRef(null);
41874
+ const frameRef = React81.useRef(0);
41875
+ React81.useEffect(() => {
41378
41876
  const canvas = canvasRef.current;
41379
41877
  if (!canvas) return;
41380
41878
  const ctx = canvas.getContext("2d");
@@ -41456,7 +41954,7 @@ var init_MiniMap = __esm({
41456
41954
  }
41457
41955
  });
41458
41956
  function extractTitle2(children) {
41459
- if (!React80__default.isValidElement(children)) return void 0;
41957
+ if (!React81__default.isValidElement(children)) return void 0;
41460
41958
  const props = children.props;
41461
41959
  if (typeof props.title === "string") {
41462
41960
  return props.title;
@@ -41913,7 +42411,7 @@ var init_debugRegistry = __esm({
41913
42411
  }
41914
42412
  });
41915
42413
  function useDebugData() {
41916
- const [data, setData] = React80.useState(() => ({
42414
+ const [data, setData] = React81.useState(() => ({
41917
42415
  traits: [],
41918
42416
  ticks: [],
41919
42417
  guards: [],
@@ -41927,7 +42425,7 @@ function useDebugData() {
41927
42425
  },
41928
42426
  lastUpdate: Date.now()
41929
42427
  }));
41930
- React80.useEffect(() => {
42428
+ React81.useEffect(() => {
41931
42429
  const updateData = () => {
41932
42430
  setData({
41933
42431
  traits: getAllTraits(),
@@ -42036,12 +42534,12 @@ function layoutGraph(states, transitions, initialState, width, height) {
42036
42534
  return positions;
42037
42535
  }
42038
42536
  function WalkMinimap() {
42039
- const [walkStep, setWalkStep] = React80.useState(null);
42040
- const [traits2, setTraits] = React80.useState([]);
42041
- const [coveredEdges, setCoveredEdges] = React80.useState([]);
42042
- const [completedTraits, setCompletedTraits] = React80.useState(/* @__PURE__ */ new Set());
42043
- const prevTraitRef = React80.useRef(null);
42044
- React80.useEffect(() => {
42537
+ const [walkStep, setWalkStep] = React81.useState(null);
42538
+ const [traits2, setTraits] = React81.useState([]);
42539
+ const [coveredEdges, setCoveredEdges] = React81.useState([]);
42540
+ const [completedTraits, setCompletedTraits] = React81.useState(/* @__PURE__ */ new Set());
42541
+ const prevTraitRef = React81.useRef(null);
42542
+ React81.useEffect(() => {
42045
42543
  const interval = setInterval(() => {
42046
42544
  const w = window;
42047
42545
  const step = w.__orbitalWalkStep;
@@ -42477,15 +42975,15 @@ var init_EntitiesTab = __esm({
42477
42975
  });
42478
42976
  function EventFlowTab({ events: events2 }) {
42479
42977
  const { t } = useTranslate();
42480
- const [filter, setFilter] = React80.useState("all");
42481
- const containerRef = React80.useRef(null);
42482
- const [autoScroll, setAutoScroll] = React80.useState(true);
42483
- React80.useEffect(() => {
42978
+ const [filter, setFilter] = React81.useState("all");
42979
+ const containerRef = React81.useRef(null);
42980
+ const [autoScroll, setAutoScroll] = React81.useState(true);
42981
+ React81.useEffect(() => {
42484
42982
  if (autoScroll && containerRef.current) {
42485
42983
  containerRef.current.scrollTop = containerRef.current.scrollHeight;
42486
42984
  }
42487
42985
  }, [events2.length, autoScroll]);
42488
- const filteredEvents = React80.useMemo(() => {
42986
+ const filteredEvents = React81.useMemo(() => {
42489
42987
  if (filter === "all") return events2;
42490
42988
  return events2.filter((e) => e.type === filter);
42491
42989
  }, [events2, filter]);
@@ -42601,7 +43099,7 @@ var init_EventFlowTab = __esm({
42601
43099
  });
42602
43100
  function GuardsPanel({ guards }) {
42603
43101
  const { t } = useTranslate();
42604
- const [filter, setFilter] = React80.useState("all");
43102
+ const [filter, setFilter] = React81.useState("all");
42605
43103
  if (guards.length === 0) {
42606
43104
  return /* @__PURE__ */ jsx(
42607
43105
  EmptyState,
@@ -42614,7 +43112,7 @@ function GuardsPanel({ guards }) {
42614
43112
  }
42615
43113
  const passedCount = guards.filter((g) => g.result).length;
42616
43114
  const failedCount = guards.length - passedCount;
42617
- const filteredGuards = React80.useMemo(() => {
43115
+ const filteredGuards = React81.useMemo(() => {
42618
43116
  if (filter === "all") return guards;
42619
43117
  if (filter === "passed") return guards.filter((g) => g.result);
42620
43118
  return guards.filter((g) => !g.result);
@@ -42777,10 +43275,10 @@ function EffectBadge({ effect }) {
42777
43275
  }
42778
43276
  function TransitionTimeline({ transitions }) {
42779
43277
  const { t } = useTranslate();
42780
- const containerRef = React80.useRef(null);
42781
- const [autoScroll, setAutoScroll] = React80.useState(true);
42782
- const [expandedId, setExpandedId] = React80.useState(null);
42783
- React80.useEffect(() => {
43278
+ const containerRef = React81.useRef(null);
43279
+ const [autoScroll, setAutoScroll] = React81.useState(true);
43280
+ const [expandedId, setExpandedId] = React81.useState(null);
43281
+ React81.useEffect(() => {
42784
43282
  if (autoScroll && containerRef.current) {
42785
43283
  containerRef.current.scrollTop = containerRef.current.scrollHeight;
42786
43284
  }
@@ -43060,9 +43558,9 @@ function getAllEvents(traits2) {
43060
43558
  function EventDispatcherTab({ traits: traits2, schema }) {
43061
43559
  const eventBus = useEventBus();
43062
43560
  const { t } = useTranslate();
43063
- const [log8, setLog] = React80.useState([]);
43064
- const prevStatesRef = React80.useRef(/* @__PURE__ */ new Map());
43065
- React80.useEffect(() => {
43561
+ const [log8, setLog] = React81.useState([]);
43562
+ const prevStatesRef = React81.useRef(/* @__PURE__ */ new Map());
43563
+ React81.useEffect(() => {
43066
43564
  for (const trait of traits2) {
43067
43565
  const prev = prevStatesRef.current.get(trait.id);
43068
43566
  if (prev && prev !== trait.currentState) {
@@ -43231,10 +43729,10 @@ function VerifyModePanel({
43231
43729
  localCount
43232
43730
  }) {
43233
43731
  const { t } = useTranslate();
43234
- const [expanded, setExpanded] = React80.useState(true);
43235
- const scrollRef = React80.useRef(null);
43236
- const prevCountRef = React80.useRef(0);
43237
- React80.useEffect(() => {
43732
+ const [expanded, setExpanded] = React81.useState(true);
43733
+ const scrollRef = React81.useRef(null);
43734
+ const prevCountRef = React81.useRef(0);
43735
+ React81.useEffect(() => {
43238
43736
  if (expanded && transitions.length > prevCountRef.current && scrollRef.current) {
43239
43737
  scrollRef.current.scrollTop = scrollRef.current.scrollHeight;
43240
43738
  }
@@ -43291,10 +43789,10 @@ function RuntimeDebugger({
43291
43789
  schema
43292
43790
  }) {
43293
43791
  const { t } = useTranslate();
43294
- const [isCollapsed, setIsCollapsed] = React80.useState(mode === "verify" ? true : defaultCollapsed);
43295
- const [isVisible, setIsVisible] = React80.useState(mode === "inline" || mode === "verify" || isDebugEnabled2());
43792
+ const [isCollapsed, setIsCollapsed] = React81.useState(mode === "verify" ? true : defaultCollapsed);
43793
+ const [isVisible, setIsVisible] = React81.useState(mode === "inline" || mode === "verify" || isDebugEnabled2());
43296
43794
  const debugData = useDebugData();
43297
- React80.useEffect(() => {
43795
+ React81.useEffect(() => {
43298
43796
  if (mode === "inline") return;
43299
43797
  return onDebugToggle((enabled) => {
43300
43798
  setIsVisible(enabled);
@@ -43303,7 +43801,7 @@ function RuntimeDebugger({
43303
43801
  }
43304
43802
  });
43305
43803
  }, [mode]);
43306
- React80.useEffect(() => {
43804
+ React81.useEffect(() => {
43307
43805
  if (mode === "inline") return;
43308
43806
  const handleKeyDown = (e) => {
43309
43807
  if (e.key === "`" && isVisible) {
@@ -43318,7 +43816,7 @@ function RuntimeDebugger({
43318
43816
  if (!isVisible) {
43319
43817
  return null;
43320
43818
  }
43321
- const positionClasses3 = {
43819
+ const positionClasses = {
43322
43820
  "bottom-right": "bottom-4 right-4",
43323
43821
  "bottom-left": "bottom-4 left-4",
43324
43822
  "top-right": "top-4 right-4",
@@ -43447,7 +43945,7 @@ function RuntimeDebugger({
43447
43945
  className: cn(
43448
43946
  "runtime-debugger",
43449
43947
  "fixed",
43450
- positionClasses3[position],
43948
+ positionClasses[position],
43451
43949
  isCollapsed ? "runtime-debugger--collapsed" : "runtime-debugger--expanded",
43452
43950
  className
43453
43951
  ),
@@ -43752,7 +44250,7 @@ function SequenceBar({
43752
44250
  onSlotRemove(index);
43753
44251
  }, [onSlotRemove, playing]);
43754
44252
  const paddedSlots = Array.from({ length: maxSlots }, (_, i) => slots[i]);
43755
- return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(React80__default.Fragment, { children: [
44253
+ return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(React81__default.Fragment, { children: [
43756
44254
  i > 0 && /* @__PURE__ */ jsx(
43757
44255
  Typography,
43758
44256
  {
@@ -44821,7 +45319,7 @@ var init_StatCard = __esm({
44821
45319
  title: propTitle,
44822
45320
  value: propValue,
44823
45321
  previousValue,
44824
- currentValue,
45322
+ currentValue: currentValue2,
44825
45323
  trend: manualTrend,
44826
45324
  trendDirection: manualDirection,
44827
45325
  invertTrend = false,
@@ -44842,7 +45340,7 @@ var init_StatCard = __esm({
44842
45340
  const labelToUse = propLabel ?? propTitle;
44843
45341
  const eventBus = useEventBus();
44844
45342
  const { t } = useTranslate();
44845
- const handleActionClick = React80__default.useCallback(() => {
45343
+ const handleActionClick = React81__default.useCallback(() => {
44846
45344
  if (action?.event) {
44847
45345
  eventBus.emit(`UI:${action.event}`, {});
44848
45346
  }
@@ -44853,7 +45351,7 @@ var init_StatCard = __esm({
44853
45351
  const data = Array.isArray(entity) ? entity : entity ? [entity] : [];
44854
45352
  const isLoading = externalLoading ?? false;
44855
45353
  const error = externalError;
44856
- const computeMetricValue = React80__default.useCallback(
45354
+ const computeMetricValue = React81__default.useCallback(
44857
45355
  (metric, items) => {
44858
45356
  if (metric.value !== void 0) {
44859
45357
  return metric.value;
@@ -44892,7 +45390,7 @@ var init_StatCard = __esm({
44892
45390
  },
44893
45391
  []
44894
45392
  );
44895
- const schemaStats = React80__default.useMemo(() => {
45393
+ const schemaStats = React81__default.useMemo(() => {
44896
45394
  if (!metrics || metrics.length === 0) return null;
44897
45395
  return metrics.map((metric) => ({
44898
45396
  label: metric.label,
@@ -44900,13 +45398,13 @@ var init_StatCard = __esm({
44900
45398
  format: metric.format
44901
45399
  }));
44902
45400
  }, [metrics, data, computeMetricValue]);
44903
- const calculatedTrend = React80__default.useMemo(() => {
45401
+ const calculatedTrend = React81__default.useMemo(() => {
44904
45402
  if (manualTrend !== void 0) return manualTrend;
44905
- if (previousValue === void 0 || currentValue === void 0)
45403
+ if (previousValue === void 0 || currentValue2 === void 0)
44906
45404
  return void 0;
44907
- if (previousValue === 0) return currentValue > 0 ? 100 : 0;
44908
- return (currentValue - previousValue) / previousValue * 100;
44909
- }, [manualTrend, previousValue, currentValue]);
45405
+ if (previousValue === 0) return currentValue2 > 0 ? 100 : 0;
45406
+ return (currentValue2 - previousValue) / previousValue * 100;
45407
+ }, [manualTrend, previousValue, currentValue2]);
44910
45408
  if (schemaStats && schemaStats.length > 1) {
44911
45409
  if (isLoading) {
44912
45410
  return /* @__PURE__ */ jsx(
@@ -45905,7 +46403,7 @@ var init_Timeline = __esm({
45905
46403
  }) => {
45906
46404
  const { t } = useTranslate();
45907
46405
  const entityData = Array.isArray(entity) ? entity : [];
45908
- const items = React80__default.useMemo(() => {
46406
+ const items = React81__default.useMemo(() => {
45909
46407
  if (propItems) return propItems;
45910
46408
  if (entityData.length === 0) return [];
45911
46409
  return entityData.map((record, idx) => {
@@ -46062,7 +46560,7 @@ var init_TimerDisplay = __esm({
46062
46560
  }
46063
46561
  });
46064
46562
  function extractToastProps(children) {
46065
- if (!React80__default.isValidElement(children)) {
46563
+ if (!React81__default.isValidElement(children)) {
46066
46564
  if (typeof children === "string") {
46067
46565
  return { message: children };
46068
46566
  }
@@ -46100,7 +46598,7 @@ var init_ToastSlot = __esm({
46100
46598
  eventBus.emit("UI:CLOSE");
46101
46599
  };
46102
46600
  if (!isVisible) return null;
46103
- const isCustomContent = React80__default.isValidElement(children) && !message;
46601
+ const isCustomContent = React81__default.isValidElement(children) && !message;
46104
46602
  return /* @__PURE__ */ jsx(Box, { className: "fixed bottom-4 right-4 z-50", children: isCustomContent ? children : /* @__PURE__ */ jsx(
46105
46603
  Toast,
46106
46604
  {
@@ -46620,13 +47118,22 @@ function XPBar({
46620
47118
  }) {
46621
47119
  const sizes = sizeMap18[size];
46622
47120
  const percentage = max > 0 ? Math.max(0, Math.min(100, current / max * 100)) : 0;
47121
+ const [fillWidth, setFillWidth] = React81.useState(animated ? 0 : percentage);
47122
+ React81.useEffect(() => {
47123
+ if (!animated) {
47124
+ setFillWidth(percentage);
47125
+ return;
47126
+ }
47127
+ const frame = requestAnimationFrame(() => setFillWidth(percentage));
47128
+ return () => cancelAnimationFrame(frame);
47129
+ }, [animated, percentage]);
46623
47130
  return /* @__PURE__ */ jsxs("div", { className: cn("flex items-center gap-2", className), children: [
46624
47131
  level != null && /* @__PURE__ */ jsxs(
46625
47132
  "span",
46626
47133
  {
46627
47134
  className: cn(
46628
47135
  "flex-shrink-0 rounded-interactive font-bold",
46629
- "bg-accent text-foreground border border-accent",
47136
+ "bg-accent text-accent-foreground border border-accent",
46630
47137
  sizes.badge
46631
47138
  ),
46632
47139
  children: [
@@ -46651,7 +47158,7 @@ function XPBar({
46651
47158
  "bg-gradient-to-r from-accent to-info",
46652
47159
  animated && "transition-all duration-500 ease-out"
46653
47160
  ),
46654
- style: { width: `${percentage}%` }
47161
+ style: { width: `${fillWidth}%` }
46655
47162
  }
46656
47163
  )
46657
47164
  }
@@ -46668,6 +47175,7 @@ function XPBar({
46668
47175
  var sizeMap18;
46669
47176
  var init_XPBar = __esm({
46670
47177
  "components/game/atoms/XPBar.tsx"() {
47178
+ "use client";
46671
47179
  init_cn();
46672
47180
  sizeMap18 = {
46673
47181
  sm: { bar: "h-2", text: "text-xs", badge: "text-xs px-1.5 py-0.5" },
@@ -46678,12 +47186,12 @@ var init_XPBar = __esm({
46678
47186
  }
46679
47187
  });
46680
47188
  function lazyThree(name, loader) {
46681
- const Lazy = React80__default.lazy(() => loader().then((m) => ({ default: m[name] })));
47189
+ const Lazy = React81__default.lazy(() => loader().then((m) => ({ default: m[name] })));
46682
47190
  function ThreeWrapper(props) {
46683
- return React80__default.createElement(
46684
- React80__default.Suspense,
47191
+ return React81__default.createElement(
47192
+ React81__default.Suspense,
46685
47193
  { fallback: null },
46686
- React80__default.createElement(Lazy, props)
47194
+ React81__default.createElement(Lazy, props)
46687
47195
  );
46688
47196
  }
46689
47197
  ThreeWrapper.displayName = `Lazy(${name})`;
@@ -47299,7 +47807,7 @@ function SuspenseConfigProvider({
47299
47807
  config,
47300
47808
  children
47301
47809
  }) {
47302
- return React80__default.createElement(
47810
+ return React81__default.createElement(
47303
47811
  SuspenseConfigContext.Provider,
47304
47812
  { value: config },
47305
47813
  children
@@ -47374,6 +47882,9 @@ function renderContainedPortal(t, slot, content, onDismiss) {
47374
47882
  const slotId = `slot-${slot}`;
47375
47883
  switch (slot) {
47376
47884
  case "modal":
47885
+ if (SELF_OVERLAY_PATTERNS.has(content.pattern)) {
47886
+ return /* @__PURE__ */ jsx(Box, { id: slotId, className: "contents", children: slotContent });
47887
+ }
47377
47888
  return /* @__PURE__ */ jsx(
47378
47889
  Box,
47379
47890
  {
@@ -47635,8 +48146,8 @@ function CompiledPortal({ slot, className, pattern, sourceTrait, children }) {
47635
48146
  const slotId = `slot-${slot}`;
47636
48147
  let wrapper;
47637
48148
  switch (slot) {
47638
- case "modal":
47639
- wrapper = /* @__PURE__ */ jsx(Modal, { isOpen: true, onClose: handleDismiss, showCloseButton: true, size: "lg", children: /* @__PURE__ */ jsx(
48149
+ case "modal": {
48150
+ const innerContent = /* @__PURE__ */ jsx(
47640
48151
  Box,
47641
48152
  {
47642
48153
  id: slotId,
@@ -47645,8 +48156,10 @@ function CompiledPortal({ slot, className, pattern, sourceTrait, children }) {
47645
48156
  "data-source-trait": sourceTrait,
47646
48157
  children
47647
48158
  }
47648
- ) });
48159
+ );
48160
+ wrapper = pattern !== void 0 && SELF_OVERLAY_PATTERNS.has(pattern) ? innerContent : /* @__PURE__ */ jsx(Modal, { isOpen: true, onClose: handleDismiss, showCloseButton: true, size: "lg", children: innerContent });
47649
48161
  break;
48162
+ }
47650
48163
  case "drawer":
47651
48164
  wrapper = /* @__PURE__ */ jsx(Drawer, { isOpen: true, onClose: handleDismiss, position: "right", children: /* @__PURE__ */ jsx(
47652
48165
  Box,
@@ -47704,7 +48217,7 @@ function SlotPortal({
47704
48217
  let wrapper;
47705
48218
  switch (slot) {
47706
48219
  case "modal":
47707
- wrapper = /* @__PURE__ */ jsx(
48220
+ wrapper = SELF_OVERLAY_PATTERNS.has(content.pattern) ? /* @__PURE__ */ jsx(Box, { id: slotId, children: slotContent }) : /* @__PURE__ */ jsx(
47708
48221
  Modal,
47709
48222
  {
47710
48223
  isOpen: true,
@@ -47784,7 +48297,7 @@ function renderPatternChildren(children, onDismiss, parentId = "root", parentPat
47784
48297
  const key = `${parentId}-${index}-trait:${traitName}`;
47785
48298
  return /* @__PURE__ */ jsx(TraitFrame, { traitName }, key);
47786
48299
  }
47787
- return /* @__PURE__ */ jsx(React80__default.Fragment, { children: child }, `${parentId}-${index}`);
48300
+ return /* @__PURE__ */ jsx(React81__default.Fragment, { children: child }, `${parentId}-${index}`);
47788
48301
  }
47789
48302
  if (!child || typeof child !== "object") return null;
47790
48303
  const childId = `${parentId}-${index}`;
@@ -47824,14 +48337,14 @@ function isPatternConfig(value) {
47824
48337
  if (value === null || value === void 0) return false;
47825
48338
  if (typeof value !== "object") return false;
47826
48339
  if (Array.isArray(value)) return false;
47827
- if (React80__default.isValidElement(value)) return false;
48340
+ if (React81__default.isValidElement(value)) return false;
47828
48341
  if (value instanceof Date) return false;
47829
48342
  if (typeof value === "function") return false;
47830
48343
  const record = value;
47831
48344
  return "type" in record && typeof record.type === "string";
47832
48345
  }
47833
48346
  function isPlainConfigObject(value) {
47834
- if (React80__default.isValidElement(value)) return false;
48347
+ if (React81__default.isValidElement(value)) return false;
47835
48348
  if (value instanceof Date) return false;
47836
48349
  const proto = Object.getPrototypeOf(value);
47837
48350
  return proto === Object.prototype || proto === null;
@@ -48084,7 +48597,7 @@ function UISlotRenderer({
48084
48597
  }
48085
48598
  return wrapped;
48086
48599
  }
48087
- var scopeWrapLog, TRAIT_BINDING_RE, SuspenseConfigContext, SlotContainedContext, SLOT_SKELETON_MAP, FORM_PATTERNS, PATTERNS_WITH_CHILDREN;
48600
+ var scopeWrapLog, TRAIT_BINDING_RE, SuspenseConfigContext, SlotContainedContext, SLOT_SKELETON_MAP, FORM_PATTERNS, SELF_OVERLAY_PATTERNS, PATTERNS_WITH_CHILDREN;
48088
48601
  var init_UISlotRenderer = __esm({
48089
48602
  "components/core/organisms/UISlotRenderer.tsx"() {
48090
48603
  "use client";
@@ -48120,6 +48633,7 @@ var init_UISlotRenderer = __esm({
48120
48633
  "inline-edit-form",
48121
48634
  "wizard-step"
48122
48635
  ]);
48636
+ SELF_OVERLAY_PATTERNS = /* @__PURE__ */ new Set(["modal", "confirm-dialog"]);
48123
48637
  PATTERNS_WITH_CHILDREN = /* @__PURE__ */ new Set([
48124
48638
  "stack",
48125
48639
  "vstack",
@@ -49441,4 +49955,4 @@ init_AboutPageTemplate();
49441
49955
  // components/index.ts
49442
49956
  init_cn();
49443
49957
 
49444
- export { ALL_PRESETS, AR_BOOK_FIELDS, AboutPageTemplate, Accordion, ActionButton, ActionButtons, Card2 as ActionCard, ActionPalette, ActionTile, Alert, AnimatedCounter, AnimatedGraphic, AnimatedReveal, ArticleSection, Aside, AuthLayout, Avatar, Badge, BattleBoard, BattleTemplate, BehaviorView, BookChapterView, BookCoverPage, BookNavBar, BookTableOfContents, BookViewer, Box, BranchingLogicBuilder, Breadcrumb, BuilderBoard, Button, ButtonGroup, CTABanner, CalendarGrid, CanvasEffect, Card, CardBody, CardContent, CardFooter, CardGrid, CardHeader, CardTitle, Carousel, CaseStudyCard, CaseStudyOrganism, CastleBoard, CastleTemplate, Center, Chart, ChartLegend, Checkbox, ChoiceButton, ClassifierBoard, Coachmark, CodeBlock, CodeView, CodeViewer, CollapsibleSection, CombatLog, ComboCounter, CommunityLinks, ConditionalWrapper, ConfettiEffect, ConfirmDialog, Container, ContentRenderer, ContentSection, ControlButton, CounterTemplate, CraftingRecipe, DEFAULT_LIKERT_OPTIONS, DEFAULT_MATRIX_COLUMNS, DIAMOND_TOP_Y, DPad, DamageNumber, DashboardGrid, DashboardLayout, DataGrid, DataList, DataTable, DateRangePicker, DateRangeSelector, DayCell, DebuggerBoard, DetailPanel, Dialog, DialogueBox, DialogueBubble, Divider, DocBreadcrumb, DocCodeBlock, DocPagination, DocSearch, DocSidebar, DocTOC, DocumentViewer, StateMachineView as DomStateMachineVisualizer, Drawer, DrawerSlot, EdgeDecoration, EditorCheckbox, EditorSelect, EditorSlider, EditorTextInput, EditorToolbar, EmptyState, EnemyPlate, EntityDisplayEvents, ErrorBoundary, ErrorState, EventHandlerBoard, EventLog, FEATURE_COLORS, FEATURE_TYPES, FLOOR_HEIGHT, FeatureCard, FeatureDetailPageTemplate, FeatureGrid, FeatureGridOrganism, FeatureRenderer2 as FeatureRenderer, FileTree, FilterGroup, FilterPill, Flex, FlipCard, FlipContainer, FloatingActionButton, Form, FormActions, FormField, FormLayout, FormSection, FormSectionHeader, GameAudioContext, GameAudioProvider, GameAudioToggle, GameCanvas2D, GameHud, GameMenu, GameOverScreen, GameShell, GameTemplate, GenericAppTemplate, GeometricPattern, GradientDivider, GraphCanvas, GraphView, Grid, HStack, Header, Heading, HealthBar, HealthPanel, HeroOrganism, HeroSection, IDENTITY_BOOK_FIELDS, Icon, InfiniteScrollSentinel, Input, InputGroup, InstallBox, InventoryGrid, InventoryPanel, IsometricCanvas, ItemSlot, JazariStateMachine, Label, LandingPageTemplate, LawReferenceTooltip, Lightbox, LikertScale, LineChart2 as LineChart, List3 as List, LoadingState, MapView, MarkdownContent, MarketingFooter, MarketingStatCard, MasterDetail, MasterDetailLayout, MatrixQuestion, MediaGallery, Menu, Meter, MiniMap, Modal, ModalSlot, ModuleCard, Navigation, NegotiatorBoard, NotifyListener, NumberStepper, ObjectRulePanel, OnboardingSpotlight, OptionConstraintGroup, StateMachineView as OrbitalStateMachineView, OrbitalVisualization, Overlay, PageHeader, Pagination, PatternTile, PhysicsManager, PlatformerCanvas, Popover, PositionedCanvas, PowerupSlots, PricingCard, PricingGrid, PricingOrganism, PricingPageTemplate, ProgressBar, ProgressDots, PullQuote, PullToRefresh, QrScanner, QuestTracker, QuizBlock, Radio, RangeSlider, RelationSelect, RepeatableFormSection, ReplyTree, ResourceBar, ResourceCounter, RichBlockEditor, RuleEditor, RuntimeDebugger, SHEET_COLUMNS, SPRITE_SHEET_LAYOUT, ScaledDiagram, ScoreBoard, ScoreDisplay, SearchInput, Section, SectionHeader, Select, SequenceBar, SequencerBoard, ServiceCatalog, ShowcaseCard, ShowcaseOrganism, SidePanel, Sidebar, SignaturePad, SimpleGrid, SimulationCanvas, SimulationControls, SimulationGraph, SimulatorBoard, Skeleton, SlotContentRenderer, SocialProof, SortableList, Spacer, Sparkline, Spinner, Split, SplitPane, SplitSection, Sprite, Stack, StarRating, StatBadge, StatCard, StatDisplay, StateArchitectBoard, StateIndicator, StateMachineView, StateNode2 as StateNode, StatsGrid, StatsOrganism, StatusBar, StatusDot, StatusEffect, StepFlow, StepFlowOrganism, 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, Text, TextHighlight, Textarea, ThemeSelector, ThemeToggle, TimeSlotCell, Timeline, TimerDisplay, Toast, ToastSlot, Tooltip, TraitFrame, TraitSlot, TraitStateViewer, TransitionArrow, TrendIndicator, TurnIndicator, TurnPanel, TypewriterText, Typography, UISlotComponent, UISlotRenderer, UncontrolledBattleBoard, UnitCommandBar, UploadDropZone, VStack, VariablePanel, VersionDiff, ViolationAlert, VoteStack, WaypointMarker, WizardContainer, WizardNavigation, WizardProgress, WorldMapBoard, WorldMapTemplate, XPBar, applyTemporaryEffect, calculateAttackTargets, calculateDamage, calculateValidMoves, cn, combatAnimations, combatClasses, combatEffects, createInitialGameState, createUnitAnimationState, drawSprite, generateCombatMessage, getCurrentFrame, getTileDimensions, inferDirection, isoToScreen, mapBookData, pendulum, projectileMotion, resolveFieldMap, resolveFrame, resolveSheetDirection, screenToIso, springOscillator, tickAnimationState, transitionAnimation, useAnchorRect, useBattleState, useCamera, useGameAudio, useGameAudioContext, useImageCache, usePhysics2D, useSpriteAnimations };
49958
+ export { ALL_PRESETS, AR_BOOK_FIELDS, AboutPageTemplate, Accordion, ActionButton, ActionButtons, Card2 as ActionCard, ActionPalette, ActionTile, Alert, AnimatedCounter, AnimatedGraphic, AnimatedReveal, ArticleSection, Aside, AssetPicker, AuthLayout, Avatar, Badge, BattleBoard, BattleTemplate, BehaviorView, BookChapterView, BookCoverPage, BookNavBar, BookTableOfContents, BookViewer, Box, BranchingLogicBuilder, Breadcrumb, BuilderBoard, Button, ButtonGroup, CTABanner, CalendarGrid, CanvasEffect, Card, CardBody, CardContent, CardFooter, CardGrid, CardHeader, CardTitle, Carousel, CaseStudyCard, CaseStudyOrganism, CastleBoard, CastleTemplate, Center, Chart, ChartLegend, Checkbox, ChoiceButton, ClassifierBoard, Coachmark, CodeBlock, CodeView, CodeViewer, CollapsibleSection, CombatLog, ComboCounter, CommunityLinks, ConditionalWrapper, ConfettiEffect, ConfirmDialog, Container, ContentRenderer, ContentSection, ControlButton, CounterTemplate, CraftingRecipe, DEFAULT_LIKERT_OPTIONS, DEFAULT_MATRIX_COLUMNS, DIAMOND_TOP_Y, DPad, DamageNumber, DashboardGrid, DashboardLayout, DataGrid, DataList, DataTable, DateRangePicker, DateRangeSelector, DayCell, DebuggerBoard, DetailPanel, Dialog, DialogueBox, DialogueBubble, Divider, DocBreadcrumb, DocCodeBlock, DocPagination, DocSearch, DocSidebar, DocTOC, DocumentViewer, StateMachineView as DomStateMachineVisualizer, Drawer, DrawerSlot, EdgeDecoration, EditorCheckbox, EditorSelect, EditorSlider, EditorTextInput, EditorToolbar, EmptyState, EnemyPlate, EntityDisplayEvents, ErrorBoundary, ErrorState, EventHandlerBoard, EventLog, FEATURE_COLORS, FEATURE_TYPES, FLOOR_HEIGHT, FeatureCard, FeatureDetailPageTemplate, FeatureGrid, FeatureGridOrganism, FeatureRenderer2 as FeatureRenderer, FileTree, FilterGroup, FilterPill, Flex, FlipCard, FlipContainer, FloatingActionButton, Form, FormActions, FormField, FormLayout, FormSection, FormSectionHeader, GameAudioContext, GameAudioProvider, GameAudioToggle, GameCanvas2D, GameHud, GameMenu, GameOverScreen, GameShell, GameTemplate, GenericAppTemplate, GeometricPattern, GradientDivider, GraphCanvas, GraphView, Grid, GridPicker, HStack, Header, Heading, HealthBar, HealthPanel, HeroOrganism, HeroSection, IDENTITY_BOOK_FIELDS, Icon, IconPicker, InfiniteScrollSentinel, Input, InputGroup, InstallBox, InventoryGrid, InventoryPanel, IsometricCanvas, ItemSlot, JazariStateMachine, Label, LandingPageTemplate, LawReferenceTooltip, Lightbox, LikertScale, LineChart2 as LineChart, List3 as List, LoadingState, MapView, MarkdownContent, MarketingFooter, MarketingStatCard, MasterDetail, MasterDetailLayout, MatrixQuestion, MediaGallery, Menu, Meter, MiniMap, Modal, ModalSlot, ModuleCard, Navigation, NegotiatorBoard, NotifyListener, NumberStepper, ObjectRulePanel, OnboardingSpotlight, OptionConstraintGroup, StateMachineView as OrbitalStateMachineView, OrbitalVisualization, Overlay, PageHeader, Pagination, PatternTile, PhysicsManager, PlatformerCanvas, Popover, PositionedCanvas, PowerupSlots, PricingCard, PricingGrid, PricingOrganism, PricingPageTemplate, ProgressBar, ProgressDots, PropertyInspector, PullQuote, PullToRefresh, QrScanner, QuestTracker, QuizBlock, Radio, RangeSlider, RelationSelect, RepeatableFormSection, ReplyTree, ResourceBar, ResourceCounter, RichBlockEditor, RuleEditor, RuntimeDebugger, SHEET_COLUMNS, SPRITE_SHEET_LAYOUT, ScaledDiagram, ScoreBoard, ScoreDisplay, SearchInput, Section, SectionHeader, Select, SequenceBar, SequencerBoard, ServiceCatalog, ShowcaseCard, ShowcaseOrganism, SidePanel, Sidebar, SignaturePad, SimpleGrid, SimulationCanvas, SimulationControls, SimulationGraph, SimulatorBoard, Skeleton, SlotContentRenderer, SocialProof, SortableList, Spacer, Sparkline, Spinner, Split, SplitPane, SplitSection, Sprite, Stack, StarRating, StatBadge, StatCard, StatDisplay, StateArchitectBoard, StateIndicator, StateMachineView, StateNode2 as StateNode, StatsGrid, StatsOrganism, StatusBar, StatusDot, StatusEffect, StepFlow, StepFlowOrganism, 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, Text, TextHighlight, Textarea, ThemeSelector, ThemeToggle, TimeSlotCell, Timeline, TimerDisplay, Toast, ToastSlot, Tooltip, TraitFrame, TraitSlot, TraitStateViewer, TransitionArrow, TrendIndicator, TurnIndicator, TurnPanel, TypewriterText, Typography, UISlotComponent, UISlotRenderer, UncontrolledBattleBoard, UnitCommandBar, UploadDropZone, VStack, VariablePanel, VersionDiff, ViolationAlert, VoteStack, WaypointMarker, WizardContainer, WizardNavigation, WizardProgress, WorldMapBoard, WorldMapTemplate, XPBar, applyTemporaryEffect, calculateAttackTargets, calculateDamage, calculateValidMoves, cn, combatAnimations, combatClasses, combatEffects, createInitialGameState, createUnitAnimationState, drawSprite, generateCombatMessage, getCurrentFrame, getTileDimensions, inferDirection, isoToScreen, mapBookData, pendulum, projectileMotion, resolveFieldMap, resolveFrame, resolveSheetDirection, screenToIso, springOscillator, tickAnimationState, transitionAnimation, useAnchorRect, useBattleState, useCamera, useGameAudio, useGameAudioContext, useImageCache, usePhysics2D, useSpriteAnimations };