@almadar/ui 5.25.0 → 5.25.1

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 React83 from 'react';
3
- import React83__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 = React83__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 = React83__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 = React83__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 (React83__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 = React83__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 = React83__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 = React83__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 = React83__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 = React83__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 = React83__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 = React83__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 = React83__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 = React83__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 = React83__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 = React83__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 = React83__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 = React83__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 = React83__default.forwardRef(
2629
+ Spinner = React81__default.forwardRef(
2630
2630
  ({ className, size = "md", ...props }, ref) => {
2631
2631
  return /* @__PURE__ */ jsx(
2632
2632
  "div",
@@ -2705,8 +2705,8 @@ var init_Avatar = __esm({
2705
2705
  actionPayload
2706
2706
  }) => {
2707
2707
  const eventBus = useEventBus();
2708
- const [imgFailed, setImgFailed] = React83__default.useState(false);
2709
- React83__default.useEffect(() => {
2708
+ const [imgFailed, setImgFailed] = React81__default.useState(false);
2709
+ React81__default.useEffect(() => {
2710
2710
  setImgFailed(false);
2711
2711
  }, [src]);
2712
2712
  const initials = providedInitials ?? (name ? generateInitials(name) : void 0);
@@ -2913,7 +2913,7 @@ var init_Box = __esm({
2913
2913
  fixed: "fixed",
2914
2914
  sticky: "sticky"
2915
2915
  };
2916
- Box = React83__default.forwardRef(
2916
+ Box = React81__default.forwardRef(
2917
2917
  ({
2918
2918
  padding,
2919
2919
  paddingX,
@@ -2963,7 +2963,7 @@ var init_Box = __esm({
2963
2963
  onMouseLeave?.(e);
2964
2964
  }, [hoverEvent, eventBus, onMouseLeave]);
2965
2965
  const isClickable = action || onClick;
2966
- return React83__default.createElement(
2966
+ return React81__default.createElement(
2967
2967
  Component,
2968
2968
  {
2969
2969
  ref,
@@ -3285,7 +3285,7 @@ var init_Radio = __esm({
3285
3285
  md: "w-2.5 h-2.5",
3286
3286
  lg: "w-3 h-3"
3287
3287
  };
3288
- Radio = React83__default.forwardRef(
3288
+ Radio = React81__default.forwardRef(
3289
3289
  ({
3290
3290
  label,
3291
3291
  helperText,
@@ -3302,12 +3302,12 @@ var init_Radio = __esm({
3302
3302
  onChange,
3303
3303
  ...props
3304
3304
  }, ref) => {
3305
- const reactId = React83__default.useId();
3305
+ const reactId = React81__default.useId();
3306
3306
  const baseId = id || `radio-${reactId}`;
3307
3307
  const hasError = !!error;
3308
3308
  const eventBus = useEventBus();
3309
- const [selected, setSelected] = React83__default.useState(value);
3310
- React83__default.useEffect(() => {
3309
+ const [selected, setSelected] = React81__default.useState(value);
3310
+ React81__default.useEffect(() => {
3311
3311
  if (value !== void 0) setSelected(value);
3312
3312
  }, [value]);
3313
3313
  const pick = (next, e) => {
@@ -3489,7 +3489,7 @@ var init_Switch = __esm({
3489
3489
  "components/core/atoms/Switch.tsx"() {
3490
3490
  "use client";
3491
3491
  init_cn();
3492
- Switch = React83.forwardRef(
3492
+ Switch = React81.forwardRef(
3493
3493
  ({
3494
3494
  checked,
3495
3495
  defaultChecked = false,
@@ -3500,10 +3500,10 @@ var init_Switch = __esm({
3500
3500
  name,
3501
3501
  className
3502
3502
  }, ref) => {
3503
- const [isChecked, setIsChecked] = React83.useState(
3503
+ const [isChecked, setIsChecked] = React81.useState(
3504
3504
  checked !== void 0 ? checked : defaultChecked
3505
3505
  );
3506
- React83.useEffect(() => {
3506
+ React81.useEffect(() => {
3507
3507
  if (checked !== void 0) {
3508
3508
  setIsChecked(checked);
3509
3509
  }
@@ -3762,11 +3762,9 @@ var init_TextHighlight = __esm({
3762
3762
  // components/core/atoms/Typography.tsx
3763
3763
  var Typography_exports = {};
3764
3764
  __export(Typography_exports, {
3765
- Heading: () => Heading,
3766
- Text: () => Text,
3767
3765
  Typography: () => Typography
3768
3766
  });
3769
- var variantStyles6, colorStyles, weightStyles, defaultElements, typographySizeStyles, overflowStyles2, Typography, sizeStyles5, Heading, Text;
3767
+ var variantStyles6, colorStyles, weightStyles, defaultElements, typographySizeStyles, overflowStyles2, Typography;
3770
3768
  var init_Typography = __esm({
3771
3769
  "components/core/atoms/Typography.tsx"() {
3772
3770
  init_cn();
@@ -3877,46 +3875,6 @@ var init_Typography = __esm({
3877
3875
  );
3878
3876
  };
3879
3877
  Typography.displayName = "Typography";
3880
- sizeStyles5 = {
3881
- xs: "text-xs",
3882
- sm: "text-sm",
3883
- md: "text-base",
3884
- lg: "text-lg",
3885
- xl: "text-xl",
3886
- "2xl": "text-2xl",
3887
- "3xl": "text-3xl"
3888
- };
3889
- Heading = ({
3890
- level = 2,
3891
- size,
3892
- className,
3893
- ...props
3894
- }) => {
3895
- const variant = `h${level}`;
3896
- const sizeClass = size ? sizeStyles5[size] : void 0;
3897
- return /* @__PURE__ */ jsx(
3898
- Typography,
3899
- {
3900
- variant,
3901
- className: cn(sizeClass, className),
3902
- ...props
3903
- }
3904
- );
3905
- };
3906
- Heading.displayName = "Heading";
3907
- Text = ({
3908
- variant = "body",
3909
- ...props
3910
- }) => {
3911
- return /* @__PURE__ */ jsx(
3912
- Typography,
3913
- {
3914
- variant,
3915
- ...props
3916
- }
3917
- );
3918
- };
3919
- Text.displayName = "Text";
3920
3878
  }
3921
3879
  });
3922
3880
  function useTheme() {
@@ -4374,7 +4332,7 @@ var Dialog;
4374
4332
  var init_Dialog = __esm({
4375
4333
  "components/core/atoms/Dialog.tsx"() {
4376
4334
  init_cn();
4377
- Dialog = React83__default.forwardRef(
4335
+ Dialog = React81__default.forwardRef(
4378
4336
  ({
4379
4337
  role = "dialog",
4380
4338
  "aria-modal": ariaModal = true,
@@ -4400,7 +4358,7 @@ var Aside;
4400
4358
  var init_Aside = __esm({
4401
4359
  "components/core/atoms/Aside.tsx"() {
4402
4360
  init_cn();
4403
- Aside = React83__default.forwardRef(
4361
+ Aside = React81__default.forwardRef(
4404
4362
  ({ className, children, ...rest }, ref) => /* @__PURE__ */ jsx("aside", { ref, className: cn(className), ...rest, children })
4405
4363
  );
4406
4364
  Aside.displayName = "Aside";
@@ -4478,8 +4436,8 @@ var init_LawReferenceTooltip = __esm({
4478
4436
  className
4479
4437
  }) => {
4480
4438
  const { t } = useTranslate();
4481
- const [isVisible, setIsVisible] = React83__default.useState(false);
4482
- const timeoutRef = React83__default.useRef(null);
4439
+ const [isVisible, setIsVisible] = React81__default.useState(false);
4440
+ const timeoutRef = React81__default.useRef(null);
4483
4441
  const handleMouseEnter = () => {
4484
4442
  if (timeoutRef.current) clearTimeout(timeoutRef.current);
4485
4443
  timeoutRef.current = setTimeout(() => setIsVisible(true), 200);
@@ -4488,7 +4446,7 @@ var init_LawReferenceTooltip = __esm({
4488
4446
  if (timeoutRef.current) clearTimeout(timeoutRef.current);
4489
4447
  setIsVisible(false);
4490
4448
  };
4491
- React83__default.useEffect(() => {
4449
+ React81__default.useEffect(() => {
4492
4450
  return () => {
4493
4451
  if (timeoutRef.current) clearTimeout(timeoutRef.current);
4494
4452
  };
@@ -4673,7 +4631,7 @@ var init_TimeSlotCell = __esm({
4673
4631
  TimeSlotCell.displayName = "TimeSlotCell";
4674
4632
  }
4675
4633
  });
4676
- var statusColors, pulseRingColors, sizeStyles6, StatusDot;
4634
+ var statusColors, pulseRingColors, sizeStyles5, StatusDot;
4677
4635
  var init_StatusDot = __esm({
4678
4636
  "components/core/atoms/StatusDot.tsx"() {
4679
4637
  init_cn();
@@ -4693,12 +4651,12 @@ var init_StatusDot = __esm({
4693
4651
  warning: "ring-warning",
4694
4652
  critical: "ring-error"
4695
4653
  };
4696
- sizeStyles6 = {
4654
+ sizeStyles5 = {
4697
4655
  sm: "w-2 h-2",
4698
4656
  md: "w-2.5 h-2.5",
4699
4657
  lg: "w-3 h-3"
4700
4658
  };
4701
- StatusDot = React83__default.forwardRef(
4659
+ StatusDot = React81__default.forwardRef(
4702
4660
  ({ className, status = "offline", pulse = false, size = "md", label, ...props }, ref) => {
4703
4661
  return /* @__PURE__ */ jsx(
4704
4662
  "span",
@@ -4707,7 +4665,7 @@ var init_StatusDot = __esm({
4707
4665
  className: cn(
4708
4666
  "inline-block rounded-full flex-shrink-0",
4709
4667
  statusColors[status],
4710
- sizeStyles6[size],
4668
+ sizeStyles5[size],
4711
4669
  pulse && [
4712
4670
  "animate-pulse",
4713
4671
  "ring-2 ring-offset-1",
@@ -4737,12 +4695,12 @@ function resolveColor(dir, invert) {
4737
4695
  const isGood = invert ? !isPositive : isPositive;
4738
4696
  return isGood ? "text-success" : "text-error";
4739
4697
  }
4740
- var sizeStyles7, iconNameMap, TrendIndicator;
4698
+ var sizeStyles6, iconNameMap, TrendIndicator;
4741
4699
  var init_TrendIndicator = __esm({
4742
4700
  "components/core/atoms/TrendIndicator.tsx"() {
4743
4701
  init_Icon();
4744
4702
  init_cn();
4745
- sizeStyles7 = {
4703
+ sizeStyles6 = {
4746
4704
  sm: { icon: "w-3 h-3", text: "text-xs" },
4747
4705
  md: { icon: "w-4 h-4", text: "text-sm" },
4748
4706
  lg: { icon: "w-5 h-5", text: "text-base" }
@@ -4752,7 +4710,7 @@ var init_TrendIndicator = __esm({
4752
4710
  down: "trending-down",
4753
4711
  flat: "arrow-right"
4754
4712
  };
4755
- TrendIndicator = React83__default.forwardRef(
4713
+ TrendIndicator = React81__default.forwardRef(
4756
4714
  ({
4757
4715
  className,
4758
4716
  value,
@@ -4766,7 +4724,7 @@ var init_TrendIndicator = __esm({
4766
4724
  const dir = resolveDirection(value, direction);
4767
4725
  const colorClass = resolveColor(dir, invert);
4768
4726
  const iconName = iconNameMap[dir];
4769
- const styles = sizeStyles7[size];
4727
+ const styles = sizeStyles6[size];
4770
4728
  const formattedValue = value !== void 0 ? `${value > 0 ? "+" : ""}${value}%` : void 0;
4771
4729
  const ariaLabel = label ?? (formattedValue ? `${dir} ${formattedValue}` : dir);
4772
4730
  return /* @__PURE__ */ jsxs(
@@ -4819,7 +4777,7 @@ var init_RangeSlider = __esm({
4819
4777
  md: "w-4 h-4",
4820
4778
  lg: "w-5 h-5"
4821
4779
  };
4822
- RangeSlider = React83__default.forwardRef(
4780
+ RangeSlider = React81__default.forwardRef(
4823
4781
  ({
4824
4782
  className,
4825
4783
  min = 0,
@@ -5415,7 +5373,7 @@ var init_ContentSection = __esm({
5415
5373
  md: "py-16",
5416
5374
  lg: "py-24"
5417
5375
  };
5418
- ContentSection = React83__default.forwardRef(
5376
+ ContentSection = React81__default.forwardRef(
5419
5377
  ({ children, background = "default", padding = "lg", id, className }, ref) => {
5420
5378
  return /* @__PURE__ */ jsx(
5421
5379
  Box,
@@ -5949,7 +5907,7 @@ var init_AnimatedReveal = __esm({
5949
5907
  "scale-up": { opacity: 1, transform: "scale(1) translateY(0)" },
5950
5908
  "none": {}
5951
5909
  };
5952
- AnimatedReveal = React83__default.forwardRef(
5910
+ AnimatedReveal = React81__default.forwardRef(
5953
5911
  ({
5954
5912
  trigger = "scroll",
5955
5913
  animation = "fade-up",
@@ -6109,7 +6067,7 @@ var init_AnimatedGraphic = __esm({
6109
6067
  "components/marketing/atoms/AnimatedGraphic.tsx"() {
6110
6068
  "use client";
6111
6069
  init_cn();
6112
- AnimatedGraphic = React83__default.forwardRef(
6070
+ AnimatedGraphic = React81__default.forwardRef(
6113
6071
  ({
6114
6072
  src,
6115
6073
  svgContent,
@@ -6132,7 +6090,7 @@ var init_AnimatedGraphic = __esm({
6132
6090
  const fetchedSvg = useFetchedSvg(svgContent ? void 0 : src);
6133
6091
  const resolvedSvg = svgContent ?? fetchedSvg;
6134
6092
  const prevAnimateRef = useRef(animate);
6135
- const setRef = React83__default.useCallback(
6093
+ const setRef = React81__default.useCallback(
6136
6094
  (node) => {
6137
6095
  containerRef.current = node;
6138
6096
  if (typeof ref === "function") ref(node);
@@ -6822,7 +6780,7 @@ var init_ErrorBoundary = __esm({
6822
6780
  }
6823
6781
  );
6824
6782
  };
6825
- ErrorBoundary = class extends React83__default.Component {
6783
+ ErrorBoundary = class extends React81__default.Component {
6826
6784
  constructor(props) {
6827
6785
  super(props);
6828
6786
  __publicField(this, "reset", () => {
@@ -7070,11 +7028,11 @@ var init_wrapCallbackForEvent = __esm({
7070
7028
  "runtime/wrapCallbackForEvent.ts"() {
7071
7029
  }
7072
7030
  });
7073
- var sizeStyles8, paddingStyles3, Container;
7031
+ var sizeStyles7, paddingStyles3, Container;
7074
7032
  var init_Container = __esm({
7075
7033
  "components/core/molecules/Container.tsx"() {
7076
7034
  init_cn();
7077
- sizeStyles8 = {
7035
+ sizeStyles7 = {
7078
7036
  xs: "max-w-xs",
7079
7037
  // 320px
7080
7038
  sm: "max-w-screen-sm",
@@ -7112,7 +7070,7 @@ var init_Container = __esm({
7112
7070
  {
7113
7071
  className: cn(
7114
7072
  "w-full",
7115
- sizeStyles8[resolvedSize],
7073
+ sizeStyles7[resolvedSize],
7116
7074
  paddingStyles3[padding],
7117
7075
  center && "mx-auto",
7118
7076
  className
@@ -7885,8 +7843,8 @@ var init_Tooltip = __esm({
7885
7843
  if (hideTimeoutRef.current) clearTimeout(hideTimeoutRef.current);
7886
7844
  };
7887
7845
  }, []);
7888
- const triggerElement = React83__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
7889
- const trigger = React83__default.cloneElement(triggerElement, {
7846
+ const triggerElement = React81__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
7847
+ const trigger = React81__default.cloneElement(triggerElement, {
7890
7848
  ref: triggerRef,
7891
7849
  onMouseEnter: handleMouseEnter,
7892
7850
  onMouseLeave: handleMouseLeave,
@@ -8033,8 +7991,8 @@ var init_Popover = __esm({
8033
7991
  onMouseEnter: handleOpen,
8034
7992
  onMouseLeave: handleClose
8035
7993
  };
8036
- const childElement = React83__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
8037
- const triggerElement = React83__default.cloneElement(
7994
+ const childElement = React81__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
7995
+ const triggerElement = React81__default.cloneElement(
8038
7996
  childElement,
8039
7997
  {
8040
7998
  ref: triggerRef,
@@ -8160,8 +8118,8 @@ var init_Menu = __esm({
8160
8118
  };
8161
8119
  const effectivePosition = direction === "rtl" ? rtlMirror[position] ?? position : position;
8162
8120
  const subMenuSideClass = direction === "rtl" ? "right-full mr-2" : "left-full ml-2";
8163
- const triggerChild = React83__default.isValidElement(trigger) ? trigger : /* @__PURE__ */ jsx(Typography, { variant: "small", as: "span", children: trigger });
8164
- const triggerElement = React83__default.cloneElement(
8121
+ const triggerChild = React81__default.isValidElement(trigger) ? trigger : /* @__PURE__ */ jsx(Typography, { variant: "small", as: "span", children: trigger });
8122
+ const triggerElement = React81__default.cloneElement(
8165
8123
  triggerChild,
8166
8124
  {
8167
8125
  ref: triggerRef,
@@ -8568,7 +8526,7 @@ var init_MapView = __esm({
8568
8526
  shadowSize: [41, 41]
8569
8527
  });
8570
8528
  L.Marker.prototype.options.icon = defaultIcon;
8571
- const { useEffect: useEffect71, useRef: useRef68, useCallback: useCallback116, useState: useState102 } = React83__default;
8529
+ const { useEffect: useEffect71, useRef: useRef68, useCallback: useCallback116, useState: useState102 } = React81__default;
8572
8530
  const { Typography: Typography2 } = await Promise.resolve().then(() => (init_Typography(), Typography_exports));
8573
8531
  const { useEventBus: useEventBus2 } = await Promise.resolve().then(() => (init_useEventBus(), useEventBus_exports));
8574
8532
  function MapUpdater({ centerLat, centerLng, zoom }) {
@@ -8814,7 +8772,7 @@ function InputPattern({
8814
8772
  fieldName
8815
8773
  }) {
8816
8774
  const { emit } = useEventBus();
8817
- const [localValue, setLocalValue] = React83__default.useState(value);
8775
+ const [localValue, setLocalValue] = React81__default.useState(value);
8818
8776
  const handleChange = (e) => {
8819
8777
  setLocalValue(e.target.value);
8820
8778
  if (onChange) {
@@ -8852,7 +8810,7 @@ function TextareaPattern({
8852
8810
  fieldName
8853
8811
  }) {
8854
8812
  const { emit } = useEventBus();
8855
- const [localValue, setLocalValue] = React83__default.useState(value);
8813
+ const [localValue, setLocalValue] = React81__default.useState(value);
8856
8814
  const handleChange = (e) => {
8857
8815
  setLocalValue(e.target.value);
8858
8816
  if (onChange) {
@@ -8884,7 +8842,7 @@ function SelectPattern({
8884
8842
  fieldName
8885
8843
  }) {
8886
8844
  const { emit } = useEventBus();
8887
- const [localValue, setLocalValue] = React83__default.useState(value);
8845
+ const [localValue, setLocalValue] = React81__default.useState(value);
8888
8846
  const handleChange = (e) => {
8889
8847
  setLocalValue(e.target.value);
8890
8848
  if (onChange) {
@@ -8913,7 +8871,7 @@ function CheckboxPattern({
8913
8871
  className
8914
8872
  }) {
8915
8873
  const { emit } = useEventBus();
8916
- const [localChecked, setLocalChecked] = React83__default.useState(checked);
8874
+ const [localChecked, setLocalChecked] = React81__default.useState(checked);
8917
8875
  const handleChange = (e) => {
8918
8876
  setLocalChecked(e.target.checked);
8919
8877
  if (onChange) {
@@ -9101,6 +9059,7 @@ var init_ComponentPatterns = __esm({
9101
9059
  init_ProgressBar();
9102
9060
  init_Card();
9103
9061
  init_Typography();
9062
+ init_cn();
9104
9063
  init_Alert();
9105
9064
  init_Tooltip();
9106
9065
  init_Popover();
@@ -9226,9 +9185,9 @@ function ControlButton({
9226
9185
  className
9227
9186
  }) {
9228
9187
  const eventBus = useEventBus();
9229
- const [isPressed, setIsPressed] = React83.useState(false);
9188
+ const [isPressed, setIsPressed] = React81.useState(false);
9230
9189
  const actualPressed = pressed ?? isPressed;
9231
- const handlePointerDown = React83.useCallback(
9190
+ const handlePointerDown = React81.useCallback(
9232
9191
  (e) => {
9233
9192
  e.preventDefault();
9234
9193
  if (disabled) return;
@@ -9238,7 +9197,7 @@ function ControlButton({
9238
9197
  },
9239
9198
  [disabled, pressEvent, eventBus, onPress]
9240
9199
  );
9241
- const handlePointerUp = React83.useCallback(
9200
+ const handlePointerUp = React81.useCallback(
9242
9201
  (e) => {
9243
9202
  e.preventDefault();
9244
9203
  if (disabled) return;
@@ -9248,7 +9207,7 @@ function ControlButton({
9248
9207
  },
9249
9208
  [disabled, releaseEvent, eventBus, onRelease]
9250
9209
  );
9251
- const handlePointerLeave = React83.useCallback(
9210
+ const handlePointerLeave = React81.useCallback(
9252
9211
  (e) => {
9253
9212
  if (isPressed) {
9254
9213
  setIsPressed(false);
@@ -9325,8 +9284,8 @@ function ActionButtons({
9325
9284
  disabled
9326
9285
  }) {
9327
9286
  const eventBus = useEventBus();
9328
- const [activeButtons, setActiveButtons] = React83.useState(/* @__PURE__ */ new Set());
9329
- const handlePress = React83.useCallback(
9287
+ const [activeButtons, setActiveButtons] = React81.useState(/* @__PURE__ */ new Set());
9288
+ const handlePress = React81.useCallback(
9330
9289
  (id) => {
9331
9290
  setActiveButtons((prev) => new Set(prev).add(id));
9332
9291
  if (actionEvent) eventBus.emit(`UI:${actionEvent}`, { id, pressed: true });
@@ -9334,7 +9293,7 @@ function ActionButtons({
9334
9293
  },
9335
9294
  [actionEvent, eventBus, onAction]
9336
9295
  );
9337
- const handleRelease = React83.useCallback(
9296
+ const handleRelease = React81.useCallback(
9338
9297
  (id) => {
9339
9298
  setActiveButtons((prev) => {
9340
9299
  const next = new Set(prev);
@@ -9615,259 +9574,6 @@ var init_AnimatedCounter2 = __esm({
9615
9574
  AnimatedCounter2.displayName = "AnimatedCounter";
9616
9575
  }
9617
9576
  });
9618
- var ALL_CATEGORY, GridPicker;
9619
- var init_GridPicker = __esm({
9620
- "components/core/molecules/GridPicker.tsx"() {
9621
- "use client";
9622
- init_cn();
9623
- init_Input();
9624
- init_Badge();
9625
- init_Stack();
9626
- ALL_CATEGORY = "__all__";
9627
- GridPicker = ({
9628
- items,
9629
- value,
9630
- onChange,
9631
- categories,
9632
- searchPlaceholder,
9633
- renderThumbnail,
9634
- cellSize = 32,
9635
- className
9636
- }) => {
9637
- const [search, setSearch] = useState("");
9638
- const [activeCategory, setActiveCategory] = useState(ALL_CATEGORY);
9639
- const gridRef = useRef(null);
9640
- const categoryChips = useMemo(() => {
9641
- if (categories !== void 0) return categories;
9642
- const seen = [];
9643
- for (const item of items) {
9644
- if (!seen.includes(item.category)) seen.push(item.category);
9645
- }
9646
- return seen;
9647
- }, [categories, items]);
9648
- const filtered = useMemo(() => {
9649
- const needle = search.trim().toLowerCase();
9650
- return items.filter((item) => {
9651
- const matchesCategory = activeCategory === ALL_CATEGORY || item.category === activeCategory;
9652
- const matchesSearch = needle === "" || item.label.toLowerCase().includes(needle);
9653
- return matchesCategory && matchesSearch;
9654
- });
9655
- }, [items, search, activeCategory]);
9656
- const select = useCallback(
9657
- (item) => {
9658
- onChange(item.id);
9659
- },
9660
- [onChange]
9661
- );
9662
- const handleKeyDown = useCallback(
9663
- (e, index) => {
9664
- const cells = gridRef.current?.querySelectorAll(
9665
- "[data-gridpicker-cell]"
9666
- );
9667
- if (cells === void 0 || cells.length === 0) return;
9668
- const columns = (() => {
9669
- const grid = gridRef.current;
9670
- if (grid === null) return 1;
9671
- const style = window.getComputedStyle(grid);
9672
- const cols = style.gridTemplateColumns.split(" ").filter(Boolean).length;
9673
- return cols > 0 ? cols : 1;
9674
- })();
9675
- let next = -1;
9676
- if (e.key === "ArrowRight") next = index + 1;
9677
- else if (e.key === "ArrowLeft") next = index - 1;
9678
- else if (e.key === "ArrowDown") next = index + columns;
9679
- else if (e.key === "ArrowUp") next = index - columns;
9680
- else if (e.key === "Enter" || e.key === " ") {
9681
- e.preventDefault();
9682
- select(filtered[index]);
9683
- return;
9684
- } else {
9685
- return;
9686
- }
9687
- e.preventDefault();
9688
- if (next >= 0 && next < cells.length) {
9689
- cells[next].focus();
9690
- }
9691
- },
9692
- [filtered, select]
9693
- );
9694
- return /* @__PURE__ */ jsxs(VStack, { gap: "sm", className: cn("w-full", className), children: [
9695
- /* @__PURE__ */ jsx(
9696
- Input,
9697
- {
9698
- type: "search",
9699
- icon: "search",
9700
- value: search,
9701
- placeholder: searchPlaceholder,
9702
- clearable: true,
9703
- onClear: () => setSearch(""),
9704
- onChange: (e) => setSearch(e.target.value)
9705
- }
9706
- ),
9707
- categoryChips.length > 0 && /* @__PURE__ */ jsxs(HStack, { gap: "xs", wrap: true, children: [
9708
- /* @__PURE__ */ jsx(
9709
- Badge,
9710
- {
9711
- variant: activeCategory === ALL_CATEGORY ? "primary" : "neutral",
9712
- size: "sm",
9713
- role: "button",
9714
- tabIndex: 0,
9715
- "aria-pressed": activeCategory === ALL_CATEGORY,
9716
- className: "cursor-pointer",
9717
- onClick: () => setActiveCategory(ALL_CATEGORY),
9718
- onKeyDown: (e) => {
9719
- if (e.key === "Enter" || e.key === " ") {
9720
- e.preventDefault();
9721
- setActiveCategory(ALL_CATEGORY);
9722
- }
9723
- },
9724
- children: "All"
9725
- }
9726
- ),
9727
- categoryChips.map((category) => /* @__PURE__ */ jsx(
9728
- Badge,
9729
- {
9730
- variant: activeCategory === category ? "primary" : "neutral",
9731
- size: "sm",
9732
- role: "button",
9733
- tabIndex: 0,
9734
- "aria-pressed": activeCategory === category,
9735
- className: "cursor-pointer",
9736
- onClick: () => setActiveCategory(category),
9737
- onKeyDown: (e) => {
9738
- if (e.key === "Enter" || e.key === " ") {
9739
- e.preventDefault();
9740
- setActiveCategory(category);
9741
- }
9742
- },
9743
- children: category
9744
- },
9745
- category
9746
- ))
9747
- ] }),
9748
- /* @__PURE__ */ jsx(
9749
- "div",
9750
- {
9751
- ref: gridRef,
9752
- role: "listbox",
9753
- className: "grid gap-1 overflow-y-auto max-h-64 p-1",
9754
- style: {
9755
- gridTemplateColumns: `repeat(auto-fill, minmax(${cellSize}px, 1fr))`
9756
- },
9757
- children: filtered.map((item, index) => {
9758
- const selected = item.id === value;
9759
- return /* @__PURE__ */ jsx(
9760
- "button",
9761
- {
9762
- type: "button",
9763
- role: "option",
9764
- "aria-selected": selected,
9765
- "aria-label": item.label,
9766
- title: item.label,
9767
- "data-gridpicker-cell": true,
9768
- tabIndex: selected || value === void 0 && index === 0 ? 0 : -1,
9769
- onClick: () => select(item),
9770
- onKeyDown: (e) => handleKeyDown(e, index),
9771
- className: cn(
9772
- "flex items-center justify-center rounded-sm",
9773
- "transition-colors hover:bg-muted",
9774
- "focus:outline-none focus:ring-1 focus:ring-ring",
9775
- selected && "bg-primary/10 ring-1 ring-primary"
9776
- ),
9777
- style: { width: cellSize, height: cellSize },
9778
- children: renderThumbnail(item)
9779
- },
9780
- item.id
9781
- );
9782
- })
9783
- }
9784
- )
9785
- ] });
9786
- };
9787
- GridPicker.displayName = "GridPicker";
9788
- }
9789
- });
9790
- function iconForKind(kind) {
9791
- if (kind === "audio") return "music";
9792
- if (kind === "model") return "box";
9793
- return "file";
9794
- }
9795
- var THUMB_PX, IMAGE_KINDS, AssetPicker;
9796
- var init_AssetPicker = __esm({
9797
- "components/core/molecules/AssetPicker.tsx"() {
9798
- "use client";
9799
- init_GridPicker();
9800
- init_Icon();
9801
- THUMB_PX = 32;
9802
- IMAGE_KINDS = /* @__PURE__ */ new Set([
9803
- "image",
9804
- "spritesheet",
9805
- "scene",
9806
- "portrait"
9807
- ]);
9808
- AssetPicker = ({
9809
- assets,
9810
- value,
9811
- onChange,
9812
- className
9813
- }) => {
9814
- const byUrl = useMemo(() => {
9815
- const map = /* @__PURE__ */ new Map();
9816
- for (const entry of assets) map.set(entry.url, entry);
9817
- return map;
9818
- }, [assets]);
9819
- const items = useMemo(
9820
- () => assets.map((entry) => ({
9821
- id: entry.url,
9822
- label: entry.name,
9823
- category: entry.category
9824
- })),
9825
- [assets]
9826
- );
9827
- const categories = useMemo(() => {
9828
- const seen = [];
9829
- for (const entry of assets) {
9830
- if (!seen.includes(entry.category)) seen.push(entry.category);
9831
- }
9832
- return seen;
9833
- }, [assets]);
9834
- const renderThumbnail = useCallback(
9835
- (item) => {
9836
- const entry = byUrl.get(item.id);
9837
- if (entry === void 0) return null;
9838
- if (IMAGE_KINDS.has(entry.kind)) {
9839
- return /* @__PURE__ */ jsx(
9840
- "img",
9841
- {
9842
- src: entry.thumbnailUrl ?? entry.url,
9843
- alt: entry.name,
9844
- loading: "lazy",
9845
- width: THUMB_PX,
9846
- height: THUMB_PX,
9847
- style: { width: THUMB_PX, height: THUMB_PX, objectFit: "cover" }
9848
- }
9849
- );
9850
- }
9851
- return /* @__PURE__ */ jsx(Icon, { name: iconForKind(entry.kind), size: "sm" });
9852
- },
9853
- [byUrl]
9854
- );
9855
- return /* @__PURE__ */ jsx(
9856
- GridPicker,
9857
- {
9858
- items,
9859
- value,
9860
- onChange,
9861
- categories,
9862
- renderThumbnail,
9863
- cellSize: THUMB_PX,
9864
- className
9865
- }
9866
- );
9867
- };
9868
- AssetPicker.displayName = "AssetPicker";
9869
- }
9870
- });
9871
9577
  var AuthLayout;
9872
9578
  var init_AuthLayout = __esm({
9873
9579
  "components/marketing/templates/AuthLayout.tsx"() {
@@ -12627,7 +12333,7 @@ var init_CodeBlock = __esm({
12627
12333
  CODE_LANGUAGE_SET = new Set(CODE_LANGUAGES);
12628
12334
  LINE_PROPS_FN = (n) => ({ "data-line": String(n - 1) });
12629
12335
  HIDDEN_LINE_NUMBERS = { display: "none" };
12630
- CodeBlock = React83__default.memo(
12336
+ CodeBlock = React81__default.memo(
12631
12337
  ({
12632
12338
  code: rawCode,
12633
12339
  language = "text",
@@ -13064,7 +12770,7 @@ var init_MarkdownContent = __esm({
13064
12770
  init_Box();
13065
12771
  init_CodeBlock();
13066
12772
  init_cn();
13067
- MarkdownContent = React83__default.memo(
12773
+ MarkdownContent = React81__default.memo(
13068
12774
  ({ content, direction, className }) => {
13069
12775
  const { t: _t } = useTranslate();
13070
12776
  const safeContent = typeof content === "string" ? content : String(content ?? "");
@@ -14160,7 +13866,7 @@ var init_StateMachineView = __esm({
14160
13866
  style: { top: title ? 30 : 0 },
14161
13867
  children: [
14162
13868
  entity && /* @__PURE__ */ jsx(EntityBox, { entity, config }),
14163
- states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(React83__default.Fragment, { children: renderStateNode(state, config) }, state.id) : /* @__PURE__ */ jsx(
13869
+ states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(React81__default.Fragment, { children: renderStateNode(state, config) }, state.id) : /* @__PURE__ */ jsx(
14164
13870
  StateNode,
14165
13871
  {
14166
13872
  state,
@@ -15765,7 +15471,7 @@ var init_Grid = __esm({
15765
15471
  as: Component = "div"
15766
15472
  }) => {
15767
15473
  const mergedStyle = rows2 ? { gridTemplateRows: `repeat(${rows2}, minmax(0, 1fr))`, ...style } : style;
15768
- return React83__default.createElement(
15474
+ return React81__default.createElement(
15769
15475
  Component,
15770
15476
  {
15771
15477
  className: cn(
@@ -21018,7 +20724,7 @@ function CounterMinimal({
21018
20724
  Button,
21019
20725
  {
21020
20726
  variant: "secondary",
21021
- size: sizeStyles9[size].button,
20727
+ size: sizeStyles8[size].button,
21022
20728
  onClick: onDecrement,
21023
20729
  disabled: resolved.decrementDisabled,
21024
20730
  icon: "minus",
@@ -21030,7 +20736,7 @@ function CounterMinimal({
21030
20736
  {
21031
20737
  variant: "h1",
21032
20738
  className: cn(
21033
- sizeStyles9[size].display,
20739
+ sizeStyles8[size].display,
21034
20740
  "font-bold tabular-nums min-w-[3ch] text-center"
21035
20741
  ),
21036
20742
  children: resolved.count
@@ -21040,7 +20746,7 @@ function CounterMinimal({
21040
20746
  Button,
21041
20747
  {
21042
20748
  variant: "secondary",
21043
- size: sizeStyles9[size].button,
20749
+ size: sizeStyles8[size].button,
21044
20750
  onClick: onIncrement,
21045
20751
  disabled: resolved.incrementDisabled,
21046
20752
  icon: "plus",
@@ -21075,7 +20781,7 @@ function CounterStandard({
21075
20781
  {
21076
20782
  variant: "h1",
21077
20783
  className: cn(
21078
- sizeStyles9[size].display,
20784
+ sizeStyles8[size].display,
21079
20785
  "font-bold tabular-nums text-primary-600"
21080
20786
  ),
21081
20787
  children: resolved.count
@@ -21086,7 +20792,7 @@ function CounterStandard({
21086
20792
  Button,
21087
20793
  {
21088
20794
  variant: "secondary",
21089
- size: sizeStyles9[size].button,
20795
+ size: sizeStyles8[size].button,
21090
20796
  onClick: onDecrement,
21091
20797
  disabled: resolved.decrementDisabled,
21092
20798
  icon: "minus"
@@ -21096,7 +20802,7 @@ function CounterStandard({
21096
20802
  Button,
21097
20803
  {
21098
20804
  variant: "primary",
21099
- size: sizeStyles9[size].button,
20805
+ size: sizeStyles8[size].button,
21100
20806
  onClick: onIncrement,
21101
20807
  disabled: resolved.incrementDisabled,
21102
20808
  icon: "plus"
@@ -21142,7 +20848,7 @@ function CounterFull({
21142
20848
  {
21143
20849
  variant: "h1",
21144
20850
  className: cn(
21145
- sizeStyles9[size].display,
20851
+ sizeStyles8[size].display,
21146
20852
  "font-bold tabular-nums text-primary-600"
21147
20853
  ),
21148
20854
  children: resolved.count
@@ -21155,7 +20861,7 @@ function CounterFull({
21155
20861
  Button,
21156
20862
  {
21157
20863
  variant: "secondary",
21158
- size: sizeStyles9[size].button,
20864
+ size: sizeStyles8[size].button,
21159
20865
  onClick: onDecrement,
21160
20866
  disabled: resolved.decrementDisabled,
21161
20867
  icon: "minus",
@@ -21166,7 +20872,7 @@ function CounterFull({
21166
20872
  Button,
21167
20873
  {
21168
20874
  variant: "primary",
21169
- size: sizeStyles9[size].button,
20875
+ size: sizeStyles8[size].button,
21170
20876
  onClick: onIncrement,
21171
20877
  disabled: resolved.incrementDisabled,
21172
20878
  icon: "plus",
@@ -21186,7 +20892,7 @@ function CounterFull({
21186
20892
  )
21187
20893
  ] }) });
21188
20894
  }
21189
- var sizeStyles9, CounterTemplate;
20895
+ var sizeStyles8, CounterTemplate;
21190
20896
  var init_CounterTemplate = __esm({
21191
20897
  "components/core/templates/CounterTemplate.tsx"() {
21192
20898
  init_cn();
@@ -21194,7 +20900,7 @@ var init_CounterTemplate = __esm({
21194
20900
  init_Stack();
21195
20901
  init_Typography();
21196
20902
  init_Button();
21197
- sizeStyles9 = {
20903
+ sizeStyles8 = {
21198
20904
  sm: { display: "text-4xl", button: "sm" },
21199
20905
  md: { display: "text-6xl", button: "md" },
21200
20906
  lg: { display: "text-8xl", button: "lg" }
@@ -21303,7 +21009,7 @@ function CraftingRecipe({
21303
21009
  className
21304
21010
  }) {
21305
21011
  const eventBus = useEventBus();
21306
- const handleCraft = React83.useCallback(() => {
21012
+ const handleCraft = React81.useCallback(() => {
21307
21013
  onCraft?.();
21308
21014
  if (craftEvent) {
21309
21015
  eventBus.emit(craftEvent, { output: output.label });
@@ -21320,7 +21026,7 @@ function CraftingRecipe({
21320
21026
  children: [
21321
21027
  /* @__PURE__ */ jsx(HStack, { gap: "xs", className: "flex-wrap items-center", children: inputs.map((ingredient, index) => {
21322
21028
  const hasSufficient = ingredient.available >= ingredient.required;
21323
- return /* @__PURE__ */ jsxs(React83.Fragment, { children: [
21029
+ return /* @__PURE__ */ jsxs(React81.Fragment, { children: [
21324
21030
  /* @__PURE__ */ jsx(Box, { className: "relative", children: /* @__PURE__ */ jsx(
21325
21031
  ItemSlot,
21326
21032
  {
@@ -21383,8 +21089,8 @@ function DPad({
21383
21089
  }) {
21384
21090
  const eventBus = useEventBus();
21385
21091
  const sizes = sizeMap6[size];
21386
- const [activeDirections, setActiveDirections] = React83.useState(/* @__PURE__ */ new Set());
21387
- const handlePress = React83.useCallback(
21092
+ const [activeDirections, setActiveDirections] = React81.useState(/* @__PURE__ */ new Set());
21093
+ const handlePress = React81.useCallback(
21388
21094
  (direction) => {
21389
21095
  setActiveDirections((prev) => new Set(prev).add(direction));
21390
21096
  if (directionEvent) eventBus.emit(`UI:${directionEvent}`, { direction, pressed: true });
@@ -21392,7 +21098,7 @@ function DPad({
21392
21098
  },
21393
21099
  [directionEvent, eventBus, onDirection]
21394
21100
  );
21395
- const handleRelease = React83.useCallback(
21101
+ const handleRelease = React81.useCallback(
21396
21102
  (direction) => {
21397
21103
  setActiveDirections((prev) => {
21398
21104
  const next = new Set(prev);
@@ -22127,14 +21833,14 @@ function useDataDnd(args) {
22127
21833
  const isZone = Boolean(dragGroup || accepts || sortable);
22128
21834
  const enabled = isZone || Boolean(dndRoot);
22129
21835
  const eventBus = useEventBus();
22130
- const parentRoot = React83__default.useContext(RootCtx);
21836
+ const parentRoot = React81__default.useContext(RootCtx);
22131
21837
  const isRoot = enabled && parentRoot === null;
22132
- const zoneId = React83__default.useId();
21838
+ const zoneId = React81__default.useId();
22133
21839
  const ownGroup = dragGroup ?? accepts ?? zoneId;
22134
- const [optimisticOrders, setOptimisticOrders] = React83__default.useState(() => /* @__PURE__ */ new Map());
22135
- const optimisticOrdersRef = React83__default.useRef(optimisticOrders);
21840
+ const [optimisticOrders, setOptimisticOrders] = React81__default.useState(() => /* @__PURE__ */ new Map());
21841
+ const optimisticOrdersRef = React81__default.useRef(optimisticOrders);
22136
21842
  optimisticOrdersRef.current = optimisticOrders;
22137
- const clearOptimisticOrder = React83__default.useCallback((group) => {
21843
+ const clearOptimisticOrder = React81__default.useCallback((group) => {
22138
21844
  setOptimisticOrders((prev) => {
22139
21845
  if (!prev.has(group)) return prev;
22140
21846
  const next = new Map(prev);
@@ -22159,7 +21865,7 @@ function useDataDnd(args) {
22159
21865
  const raw = it[dndItemIdField];
22160
21866
  return String(raw ?? `__idx_${idx}`);
22161
21867
  }).join("|");
22162
- const itemIds = React83__default.useMemo(
21868
+ const itemIds = React81__default.useMemo(
22163
21869
  () => orderedItems.map((it, idx) => {
22164
21870
  const raw = it[dndItemIdField];
22165
21871
  return raw ?? `__idx_${idx}`;
@@ -22167,7 +21873,7 @@ function useDataDnd(args) {
22167
21873
  [itemIdsSignature]
22168
21874
  );
22169
21875
  const itemsContentSig = items.map((it, idx) => String(it[dndItemIdField] ?? `__${idx}`)).join("|");
22170
- React83__default.useEffect(() => {
21876
+ React81__default.useEffect(() => {
22171
21877
  const root = isRoot ? null : parentRoot;
22172
21878
  if (root) {
22173
21879
  root.clearOptimisticOrder(ownGroup);
@@ -22175,20 +21881,20 @@ function useDataDnd(args) {
22175
21881
  clearOptimisticOrder(ownGroup);
22176
21882
  }
22177
21883
  }, [itemsContentSig, ownGroup]);
22178
- const zonesRef = React83__default.useRef(/* @__PURE__ */ new Map());
22179
- const registerZone = React83__default.useCallback((zoneId2, meta2) => {
21884
+ const zonesRef = React81__default.useRef(/* @__PURE__ */ new Map());
21885
+ const registerZone = React81__default.useCallback((zoneId2, meta2) => {
22180
21886
  zonesRef.current.set(zoneId2, meta2);
22181
21887
  }, []);
22182
- const unregisterZone = React83__default.useCallback((zoneId2) => {
21888
+ const unregisterZone = React81__default.useCallback((zoneId2) => {
22183
21889
  zonesRef.current.delete(zoneId2);
22184
21890
  }, []);
22185
- const [activeDrag, setActiveDrag] = React83__default.useState(null);
22186
- const [overZoneGroup, setOverZoneGroup] = React83__default.useState(null);
22187
- const meta = React83__default.useMemo(
21891
+ const [activeDrag, setActiveDrag] = React81__default.useState(null);
21892
+ const [overZoneGroup, setOverZoneGroup] = React81__default.useState(null);
21893
+ const meta = React81__default.useMemo(
22188
21894
  () => ({ group: ownGroup, dropEvent, reorderEvent, positionEvent, itemIds, rawItems: items, idField: dndItemIdField }),
22189
21895
  [ownGroup, dropEvent, reorderEvent, positionEvent, itemIds, items, dndItemIdField]
22190
21896
  );
22191
- React83__default.useEffect(() => {
21897
+ React81__default.useEffect(() => {
22192
21898
  const target = isRoot ? null : parentRoot;
22193
21899
  if (!target) {
22194
21900
  zonesRef.current.set(zoneId, meta);
@@ -22207,7 +21913,7 @@ function useDataDnd(args) {
22207
21913
  }, [parentRoot, isRoot, zoneId, meta]);
22208
21914
  const sensors = useAlmadarDndSensors(true);
22209
21915
  const collisionDetection = almadarDndCollisionDetection;
22210
- const findZoneByItem = React83__default.useCallback(
21916
+ const findZoneByItem = React81__default.useCallback(
22211
21917
  (id) => {
22212
21918
  for (const z of zonesRef.current.values()) {
22213
21919
  if (z.itemIds.includes(id)) return z;
@@ -22216,7 +21922,7 @@ function useDataDnd(args) {
22216
21922
  },
22217
21923
  []
22218
21924
  );
22219
- React83__default.useCallback(
21925
+ React81__default.useCallback(
22220
21926
  (group) => {
22221
21927
  for (const z of zonesRef.current.values()) {
22222
21928
  if (z.group === group) return z;
@@ -22225,7 +21931,7 @@ function useDataDnd(args) {
22225
21931
  },
22226
21932
  []
22227
21933
  );
22228
- const handleDragEnd = React83__default.useCallback(
21934
+ const handleDragEnd = React81__default.useCallback(
22229
21935
  (event) => {
22230
21936
  const { active, over } = event;
22231
21937
  const activeIdStr = String(active.id);
@@ -22316,8 +22022,8 @@ function useDataDnd(args) {
22316
22022
  },
22317
22023
  [eventBus]
22318
22024
  );
22319
- const sortableData = React83__default.useMemo(() => ({ dndGroup: ownGroup }), [ownGroup]);
22320
- const SortableItem = React83__default.useCallback(
22025
+ const sortableData = React81__default.useMemo(() => ({ dndGroup: ownGroup }), [ownGroup]);
22026
+ const SortableItem = React81__default.useCallback(
22321
22027
  ({ id, children }) => {
22322
22028
  const {
22323
22029
  attributes,
@@ -22357,7 +22063,7 @@ function useDataDnd(args) {
22357
22063
  id: droppableId,
22358
22064
  data: sortableData
22359
22065
  });
22360
- const ctx = React83__default.useContext(RootCtx);
22066
+ const ctx = React81__default.useContext(RootCtx);
22361
22067
  const activeDrag2 = ctx?.activeDrag ?? null;
22362
22068
  const overZoneGroup2 = ctx?.overZoneGroup ?? null;
22363
22069
  const isThisZoneOver = overZoneGroup2 === ownGroup;
@@ -22372,7 +22078,7 @@ function useDataDnd(args) {
22372
22078
  showForeignPlaceholder,
22373
22079
  ctxAvailable: ctx != null
22374
22080
  });
22375
- React83__default.useEffect(() => {
22081
+ React81__default.useEffect(() => {
22376
22082
  dndLog.info("dropzone:isOver:change", { droppableId, group: ownGroup, isOver, isThisZoneOver, showForeignPlaceholder, activeDragSourceGroup: activeDrag2?.sourceGroup ?? null });
22377
22083
  }, [droppableId, isOver, isThisZoneOver, showForeignPlaceholder]);
22378
22084
  return /* @__PURE__ */ jsx(
@@ -22386,11 +22092,11 @@ function useDataDnd(args) {
22386
22092
  }
22387
22093
  );
22388
22094
  };
22389
- const rootContextValue = React83__default.useMemo(
22095
+ const rootContextValue = React81__default.useMemo(
22390
22096
  () => ({ registerZone, unregisterZone, activeDrag, overZoneGroup, optimisticOrders, clearOptimisticOrder }),
22391
22097
  [registerZone, unregisterZone, activeDrag, overZoneGroup, optimisticOrders, clearOptimisticOrder]
22392
22098
  );
22393
- const handleDragStart = React83__default.useCallback((event) => {
22099
+ const handleDragStart = React81__default.useCallback((event) => {
22394
22100
  const sourceZone = findZoneByItem(event.active.id);
22395
22101
  const rect = event.active.rect.current.initial;
22396
22102
  const height = rect?.height && rect.height > 0 ? rect.height : 64;
@@ -22409,7 +22115,7 @@ function useDataDnd(args) {
22409
22115
  isRoot
22410
22116
  });
22411
22117
  }, [findZoneByItem, isRoot, zoneId]);
22412
- const handleDragOver = React83__default.useCallback((event) => {
22118
+ const handleDragOver = React81__default.useCallback((event) => {
22413
22119
  const { active, over } = event;
22414
22120
  const overData = over?.data?.current;
22415
22121
  const overGroup = overData?.dndGroup ?? null;
@@ -22479,7 +22185,7 @@ function useDataDnd(args) {
22479
22185
  return next;
22480
22186
  });
22481
22187
  }, []);
22482
- const handleDragCancel = React83__default.useCallback((event) => {
22188
+ const handleDragCancel = React81__default.useCallback((event) => {
22483
22189
  setActiveDrag(null);
22484
22190
  setOverZoneGroup(null);
22485
22191
  dndLog.warn("dragCancel", {
@@ -22487,12 +22193,12 @@ function useDataDnd(args) {
22487
22193
  reason: "dnd-kit cancelled the drag (escape key, pointer interrupted, or external)"
22488
22194
  });
22489
22195
  }, []);
22490
- const handleDragEndWithCleanup = React83__default.useCallback((event) => {
22196
+ const handleDragEndWithCleanup = React81__default.useCallback((event) => {
22491
22197
  handleDragEnd(event);
22492
22198
  setActiveDrag(null);
22493
22199
  setOverZoneGroup(null);
22494
22200
  }, [handleDragEnd]);
22495
- const wrapContainer = React83__default.useCallback(
22201
+ const wrapContainer = React81__default.useCallback(
22496
22202
  (children) => {
22497
22203
  if (!enabled) return children;
22498
22204
  const strategy = layout === "grid" ? rectSortingStrategy : verticalListSortingStrategy;
@@ -22546,7 +22252,7 @@ var init_useDataDnd = __esm({
22546
22252
  init_useAlmadarDndCollision();
22547
22253
  init_Box();
22548
22254
  dndLog = createLogger("almadar:ui:dnd");
22549
- RootCtx = React83__default.createContext(null);
22255
+ RootCtx = React81__default.createContext(null);
22550
22256
  }
22551
22257
  });
22552
22258
  function fieldLabel2(key) {
@@ -23066,7 +22772,7 @@ function DataList({
23066
22772
  }) {
23067
22773
  const eventBus = useEventBus();
23068
22774
  const { t } = useTranslate();
23069
- const [visibleCount, setVisibleCount] = React83__default.useState(pageSize || Infinity);
22775
+ const [visibleCount, setVisibleCount] = React81__default.useState(pageSize || Infinity);
23070
22776
  const fieldDefs = fields ?? columns ?? [];
23071
22777
  const allDataRaw = Array.isArray(entity) ? entity : entity ? [entity] : [];
23072
22778
  const dnd = useDataDnd({
@@ -23085,7 +22791,7 @@ function DataList({
23085
22791
  const data = pageSize > 0 ? allData.slice(0, visibleCount) : allData;
23086
22792
  const hasMoreLocal = pageSize > 0 && visibleCount < allData.length;
23087
22793
  const hasRenderProp = typeof children === "function";
23088
- React83__default.useEffect(() => {
22794
+ React81__default.useEffect(() => {
23089
22795
  const renderItemTypeOf = typeof schemaRenderItem;
23090
22796
  const childrenTypeOf = typeof children;
23091
22797
  if (data.length > 0 && !hasRenderProp) {
@@ -23190,7 +22896,7 @@ function DataList({
23190
22896
  const items2 = data.map((item) => item);
23191
22897
  const groups2 = groupBy ? groupData(items2, groupBy) : [{ label: "", items: items2 }];
23192
22898
  const contentField = titleField?.name ?? fieldDefs[0]?.name ?? "";
23193
- return /* @__PURE__ */ jsx(VStack, { gap: "sm", className: cn("py-2", className), children: groups2.map((group, gi) => /* @__PURE__ */ jsxs(React83__default.Fragment, { children: [
22899
+ return /* @__PURE__ */ jsx(VStack, { gap: "sm", className: cn("py-2", className), children: groups2.map((group, gi) => /* @__PURE__ */ jsxs(React81__default.Fragment, { children: [
23194
22900
  group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: "my-2" }),
23195
22901
  group.items.map((itemData, index) => {
23196
22902
  const id = itemData.id || `${gi}-${index}`;
@@ -23338,7 +23044,7 @@ function DataList({
23338
23044
  className
23339
23045
  ),
23340
23046
  children: [
23341
- groups.map((group, gi) => /* @__PURE__ */ jsxs(React83__default.Fragment, { children: [
23047
+ groups.map((group, gi) => /* @__PURE__ */ jsxs(React81__default.Fragment, { children: [
23342
23048
  group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-4" : "mt-0" }),
23343
23049
  group.items.map(
23344
23050
  (itemData, index) => renderItem(itemData, index, gi === groups.length - 1 && index === group.items.length - 1)
@@ -24962,7 +24668,7 @@ var init_WizardProgress = __esm({
24962
24668
  children: /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: normalizedSteps.map((step, index) => {
24963
24669
  const isActive = index === currentStep;
24964
24670
  const isCompleted = index < currentStep;
24965
- return /* @__PURE__ */ jsxs(React83__default.Fragment, { children: [
24671
+ return /* @__PURE__ */ jsxs(React81__default.Fragment, { children: [
24966
24672
  /* @__PURE__ */ jsx(
24967
24673
  "button",
24968
24674
  {
@@ -25573,6 +25279,259 @@ var init_FlipCard = __esm({
25573
25279
  FlipCard.displayName = "FlipCard";
25574
25280
  }
25575
25281
  });
25282
+ var ALL_CATEGORY, GridPicker;
25283
+ var init_GridPicker = __esm({
25284
+ "components/core/molecules/GridPicker.tsx"() {
25285
+ "use client";
25286
+ init_cn();
25287
+ init_Input();
25288
+ init_Badge();
25289
+ init_Stack();
25290
+ ALL_CATEGORY = "__all__";
25291
+ GridPicker = ({
25292
+ items,
25293
+ value,
25294
+ onChange,
25295
+ categories,
25296
+ searchPlaceholder,
25297
+ renderThumbnail,
25298
+ cellSize = 32,
25299
+ className
25300
+ }) => {
25301
+ const [search, setSearch] = useState("");
25302
+ const [activeCategory, setActiveCategory] = useState(ALL_CATEGORY);
25303
+ const gridRef = useRef(null);
25304
+ const categoryChips = useMemo(() => {
25305
+ if (categories !== void 0) return categories;
25306
+ const seen = [];
25307
+ for (const item of items) {
25308
+ if (!seen.includes(item.category)) seen.push(item.category);
25309
+ }
25310
+ return seen;
25311
+ }, [categories, items]);
25312
+ const filtered = useMemo(() => {
25313
+ const needle = search.trim().toLowerCase();
25314
+ return items.filter((item) => {
25315
+ const matchesCategory = activeCategory === ALL_CATEGORY || item.category === activeCategory;
25316
+ const matchesSearch = needle === "" || item.label.toLowerCase().includes(needle);
25317
+ return matchesCategory && matchesSearch;
25318
+ });
25319
+ }, [items, search, activeCategory]);
25320
+ const select = useCallback(
25321
+ (item) => {
25322
+ onChange(item.id);
25323
+ },
25324
+ [onChange]
25325
+ );
25326
+ const handleKeyDown = useCallback(
25327
+ (e, index) => {
25328
+ const cells = gridRef.current?.querySelectorAll(
25329
+ "[data-gridpicker-cell]"
25330
+ );
25331
+ if (cells === void 0 || cells.length === 0) return;
25332
+ const columns = (() => {
25333
+ const grid = gridRef.current;
25334
+ if (grid === null) return 1;
25335
+ const style = window.getComputedStyle(grid);
25336
+ const cols = style.gridTemplateColumns.split(" ").filter(Boolean).length;
25337
+ return cols > 0 ? cols : 1;
25338
+ })();
25339
+ let next = -1;
25340
+ if (e.key === "ArrowRight") next = index + 1;
25341
+ else if (e.key === "ArrowLeft") next = index - 1;
25342
+ else if (e.key === "ArrowDown") next = index + columns;
25343
+ else if (e.key === "ArrowUp") next = index - columns;
25344
+ else if (e.key === "Enter" || e.key === " ") {
25345
+ e.preventDefault();
25346
+ select(filtered[index]);
25347
+ return;
25348
+ } else {
25349
+ return;
25350
+ }
25351
+ e.preventDefault();
25352
+ if (next >= 0 && next < cells.length) {
25353
+ cells[next].focus();
25354
+ }
25355
+ },
25356
+ [filtered, select]
25357
+ );
25358
+ return /* @__PURE__ */ jsxs(VStack, { gap: "sm", className: cn("w-full", className), children: [
25359
+ /* @__PURE__ */ jsx(
25360
+ Input,
25361
+ {
25362
+ type: "search",
25363
+ icon: "search",
25364
+ value: search,
25365
+ placeholder: searchPlaceholder,
25366
+ clearable: true,
25367
+ onClear: () => setSearch(""),
25368
+ onChange: (e) => setSearch(e.target.value)
25369
+ }
25370
+ ),
25371
+ categoryChips.length > 0 && /* @__PURE__ */ jsxs(HStack, { gap: "xs", wrap: true, children: [
25372
+ /* @__PURE__ */ jsx(
25373
+ Badge,
25374
+ {
25375
+ variant: activeCategory === ALL_CATEGORY ? "primary" : "neutral",
25376
+ size: "sm",
25377
+ role: "button",
25378
+ tabIndex: 0,
25379
+ "aria-pressed": activeCategory === ALL_CATEGORY,
25380
+ className: "cursor-pointer",
25381
+ onClick: () => setActiveCategory(ALL_CATEGORY),
25382
+ onKeyDown: (e) => {
25383
+ if (e.key === "Enter" || e.key === " ") {
25384
+ e.preventDefault();
25385
+ setActiveCategory(ALL_CATEGORY);
25386
+ }
25387
+ },
25388
+ children: "All"
25389
+ }
25390
+ ),
25391
+ categoryChips.map((category) => /* @__PURE__ */ jsx(
25392
+ Badge,
25393
+ {
25394
+ variant: activeCategory === category ? "primary" : "neutral",
25395
+ size: "sm",
25396
+ role: "button",
25397
+ tabIndex: 0,
25398
+ "aria-pressed": activeCategory === category,
25399
+ className: "cursor-pointer",
25400
+ onClick: () => setActiveCategory(category),
25401
+ onKeyDown: (e) => {
25402
+ if (e.key === "Enter" || e.key === " ") {
25403
+ e.preventDefault();
25404
+ setActiveCategory(category);
25405
+ }
25406
+ },
25407
+ children: category
25408
+ },
25409
+ category
25410
+ ))
25411
+ ] }),
25412
+ /* @__PURE__ */ jsx(
25413
+ "div",
25414
+ {
25415
+ ref: gridRef,
25416
+ role: "listbox",
25417
+ className: "grid gap-1 overflow-y-auto max-h-64 p-1",
25418
+ style: {
25419
+ gridTemplateColumns: `repeat(auto-fill, minmax(${cellSize}px, 1fr))`
25420
+ },
25421
+ children: filtered.map((item, index) => {
25422
+ const selected = item.id === value;
25423
+ return /* @__PURE__ */ jsx(
25424
+ "button",
25425
+ {
25426
+ type: "button",
25427
+ role: "option",
25428
+ "aria-selected": selected,
25429
+ "aria-label": item.label,
25430
+ title: item.label,
25431
+ "data-gridpicker-cell": true,
25432
+ tabIndex: selected || value === void 0 && index === 0 ? 0 : -1,
25433
+ onClick: () => select(item),
25434
+ onKeyDown: (e) => handleKeyDown(e, index),
25435
+ className: cn(
25436
+ "flex items-center justify-center rounded-sm",
25437
+ "transition-colors hover:bg-muted",
25438
+ "focus:outline-none focus:ring-1 focus:ring-ring",
25439
+ selected && "bg-primary/10 ring-1 ring-primary"
25440
+ ),
25441
+ style: { width: cellSize, height: cellSize },
25442
+ children: renderThumbnail(item)
25443
+ },
25444
+ item.id
25445
+ );
25446
+ })
25447
+ }
25448
+ )
25449
+ ] });
25450
+ };
25451
+ GridPicker.displayName = "GridPicker";
25452
+ }
25453
+ });
25454
+ function iconForKind(kind) {
25455
+ if (kind === "audio") return "music";
25456
+ if (kind === "model") return "box";
25457
+ return "file";
25458
+ }
25459
+ var THUMB_PX, IMAGE_KINDS, AssetPicker;
25460
+ var init_AssetPicker = __esm({
25461
+ "components/core/molecules/AssetPicker.tsx"() {
25462
+ "use client";
25463
+ init_GridPicker();
25464
+ init_Icon();
25465
+ THUMB_PX = 32;
25466
+ IMAGE_KINDS = /* @__PURE__ */ new Set([
25467
+ "image",
25468
+ "spritesheet",
25469
+ "scene",
25470
+ "portrait"
25471
+ ]);
25472
+ AssetPicker = ({
25473
+ assets,
25474
+ value,
25475
+ onChange,
25476
+ className
25477
+ }) => {
25478
+ const byUrl = useMemo(() => {
25479
+ const map = /* @__PURE__ */ new Map();
25480
+ for (const entry of assets) map.set(entry.url, entry);
25481
+ return map;
25482
+ }, [assets]);
25483
+ const items = useMemo(
25484
+ () => assets.map((entry) => ({
25485
+ id: entry.url,
25486
+ label: entry.name,
25487
+ category: entry.category
25488
+ })),
25489
+ [assets]
25490
+ );
25491
+ const categories = useMemo(() => {
25492
+ const seen = [];
25493
+ for (const entry of assets) {
25494
+ if (!seen.includes(entry.category)) seen.push(entry.category);
25495
+ }
25496
+ return seen;
25497
+ }, [assets]);
25498
+ const renderThumbnail = useCallback(
25499
+ (item) => {
25500
+ const entry = byUrl.get(item.id);
25501
+ if (entry === void 0) return null;
25502
+ if (IMAGE_KINDS.has(entry.kind)) {
25503
+ return /* @__PURE__ */ jsx(
25504
+ "img",
25505
+ {
25506
+ src: entry.thumbnailUrl ?? entry.url,
25507
+ alt: entry.name,
25508
+ loading: "lazy",
25509
+ width: THUMB_PX,
25510
+ height: THUMB_PX,
25511
+ style: { width: THUMB_PX, height: THUMB_PX, objectFit: "cover" }
25512
+ }
25513
+ );
25514
+ }
25515
+ return /* @__PURE__ */ jsx(Icon, { name: iconForKind(entry.kind), size: "sm" });
25516
+ },
25517
+ [byUrl]
25518
+ );
25519
+ return /* @__PURE__ */ jsx(
25520
+ GridPicker,
25521
+ {
25522
+ items,
25523
+ value,
25524
+ onChange,
25525
+ categories,
25526
+ renderThumbnail,
25527
+ cellSize: THUMB_PX,
25528
+ className
25529
+ }
25530
+ );
25531
+ };
25532
+ AssetPicker.displayName = "AssetPicker";
25533
+ }
25534
+ });
25576
25535
  function pascalToKebab(name) {
25577
25536
  return name.replace(/([a-z0-9])([A-Z])/g, "$1-$2").replace(/([A-Z])([A-Z][a-z])/g, "$1-$2").toLowerCase();
25578
25537
  }
@@ -26053,9 +26012,9 @@ function ScoreDisplay({
26053
26012
  ...rest
26054
26013
  }) {
26055
26014
  const resolvedValue = typeof value === "number" && !Number.isNaN(value) ? value : typeof rest.score === "number" && !Number.isNaN(rest.score) ? rest.score : 0;
26056
- const [displayValue, setDisplayValue] = React83.useState(resolvedValue);
26057
- const [isAnimating, setIsAnimating] = React83.useState(false);
26058
- React83.useEffect(() => {
26015
+ const [displayValue, setDisplayValue] = React81.useState(resolvedValue);
26016
+ const [isAnimating, setIsAnimating] = React81.useState(false);
26017
+ React81.useEffect(() => {
26059
26018
  if (!animated || displayValue === resolvedValue) {
26060
26019
  setDisplayValue(resolvedValue);
26061
26020
  return;
@@ -26202,7 +26161,7 @@ function InventoryGrid({
26202
26161
  const eventBus = useEventBus();
26203
26162
  const slotCount = totalSlots ?? items.length;
26204
26163
  const emptySlotCount = Math.max(0, slotCount - items.length);
26205
- const handleSelect = React83.useCallback(
26164
+ const handleSelect = React81.useCallback(
26206
26165
  (id) => {
26207
26166
  onSelect?.(id);
26208
26167
  if (selectEvent) {
@@ -26488,31 +26447,31 @@ function GameCanvas2D({
26488
26447
  assetBaseUrl = "",
26489
26448
  className
26490
26449
  }) {
26491
- const canvasRef = React83.useRef(null);
26492
- const rafRef = React83.useRef(0);
26493
- const frameRef = React83.useRef(0);
26494
- const lastTimeRef = React83.useRef(0);
26495
- const imageCache = React83.useRef(/* @__PURE__ */ new Map());
26450
+ const canvasRef = React81.useRef(null);
26451
+ const rafRef = React81.useRef(0);
26452
+ const frameRef = React81.useRef(0);
26453
+ const lastTimeRef = React81.useRef(0);
26454
+ const imageCache = React81.useRef(/* @__PURE__ */ new Map());
26496
26455
  const emit = useEmitEvent();
26497
- const onDrawRef = React83.useRef(onDraw);
26456
+ const onDrawRef = React81.useRef(onDraw);
26498
26457
  onDrawRef.current = onDraw;
26499
- const onTickRef = React83.useRef(onTick);
26458
+ const onTickRef = React81.useRef(onTick);
26500
26459
  onTickRef.current = onTick;
26501
- const tickEventRef = React83.useRef(tickEvent);
26460
+ const tickEventRef = React81.useRef(tickEvent);
26502
26461
  tickEventRef.current = tickEvent;
26503
- const drawEventRef = React83.useRef(drawEvent);
26462
+ const drawEventRef = React81.useRef(drawEvent);
26504
26463
  drawEventRef.current = drawEvent;
26505
- const emitRef = React83.useRef(emit);
26464
+ const emitRef = React81.useRef(emit);
26506
26465
  emitRef.current = emit;
26507
- const assetBaseUrlRef = React83.useRef(assetBaseUrl);
26466
+ const assetBaseUrlRef = React81.useRef(assetBaseUrl);
26508
26467
  assetBaseUrlRef.current = assetBaseUrl;
26509
- const backgroundImageRef = React83.useRef(backgroundImage);
26468
+ const backgroundImageRef = React81.useRef(backgroundImage);
26510
26469
  backgroundImageRef.current = backgroundImage;
26511
- const widthRef = React83.useRef(width);
26470
+ const widthRef = React81.useRef(width);
26512
26471
  widthRef.current = width;
26513
- const heightRef = React83.useRef(height);
26472
+ const heightRef = React81.useRef(height);
26514
26473
  heightRef.current = height;
26515
- const loadImage = React83.useCallback((url) => {
26474
+ const loadImage = React81.useCallback((url) => {
26516
26475
  const fullUrl = url.startsWith("http") ? url : `${assetBaseUrlRef.current}${url}`;
26517
26476
  const cached = imageCache.current.get(fullUrl);
26518
26477
  if (cached?.complete && cached.naturalWidth > 0) return cached;
@@ -26524,7 +26483,7 @@ function GameCanvas2D({
26524
26483
  }
26525
26484
  return null;
26526
26485
  }, []);
26527
- React83.useEffect(() => {
26486
+ React81.useEffect(() => {
26528
26487
  const canvas = canvasRef.current;
26529
26488
  if (!canvas) return;
26530
26489
  const ctx = canvas.getContext("2d");
@@ -26879,7 +26838,7 @@ function TurnPanel({
26879
26838
  className
26880
26839
  }) {
26881
26840
  const eventBus = useEventBus();
26882
- const handleAction = React83.useCallback(
26841
+ const handleAction = React81.useCallback(
26883
26842
  (event) => {
26884
26843
  if (event) {
26885
26844
  eventBus.emit(event, { turn: currentTurn, phase, activeTeam });
@@ -27025,7 +26984,7 @@ function UnitCommandBar({
27025
26984
  className
27026
26985
  }) {
27027
26986
  const eventBus = useEventBus();
27028
- const handleCommand = React83.useCallback(
26987
+ const handleCommand = React81.useCallback(
27029
26988
  (event) => {
27030
26989
  if (event) {
27031
26990
  eventBus.emit(event, { unitId: selectedUnitId });
@@ -27510,7 +27469,7 @@ function GameMenu({
27510
27469
  } catch {
27511
27470
  }
27512
27471
  const eventBus = eventBusProp || eventBusFromHook;
27513
- const handleOptionClick = React83.useCallback(
27472
+ const handleOptionClick = React81.useCallback(
27514
27473
  (option) => {
27515
27474
  if (option.event && eventBus) {
27516
27475
  eventBus.emit(`UI:${option.event}`, { option });
@@ -27624,7 +27583,7 @@ function GameOverScreen({
27624
27583
  } catch {
27625
27584
  }
27626
27585
  const eventBus = eventBusProp || eventBusFromHook;
27627
- const handleActionClick = React83.useCallback(
27586
+ const handleActionClick = React81.useCallback(
27628
27587
  (action) => {
27629
27588
  if (action.event && eventBus) {
27630
27589
  eventBus.emit(`UI:${action.event}`, { action });
@@ -28357,14 +28316,14 @@ function useSafeEventBus5() {
28357
28316
  } };
28358
28317
  }
28359
28318
  }
28360
- var sizeStyles10, LONG_PRESS_DELAY, LONG_PRESS_INTERVAL, NumberStepper;
28319
+ var sizeStyles9, LONG_PRESS_DELAY, LONG_PRESS_INTERVAL, NumberStepper;
28361
28320
  var init_NumberStepper = __esm({
28362
28321
  "components/core/molecules/NumberStepper.tsx"() {
28363
28322
  "use client";
28364
28323
  init_cn();
28365
28324
  init_Icon();
28366
28325
  init_useEventBus();
28367
- sizeStyles10 = {
28326
+ sizeStyles9 = {
28368
28327
  sm: {
28369
28328
  button: "w-7 h-7",
28370
28329
  text: "text-sm min-w-[2rem]",
@@ -28402,7 +28361,7 @@ var init_NumberStepper = __esm({
28402
28361
  const timeoutRef = useRef(null);
28403
28362
  const isAtMin = min !== void 0 && value <= min;
28404
28363
  const isAtMax = max !== void 0 && value >= max;
28405
- const styles = sizeStyles10[size];
28364
+ const styles = sizeStyles9[size];
28406
28365
  const emitChange = useCallback(
28407
28366
  (newValue) => {
28408
28367
  const clamped = Math.round(newValue / step) * step;
@@ -28543,14 +28502,14 @@ function useSafeEventBus6() {
28543
28502
  } };
28544
28503
  }
28545
28504
  }
28546
- var sizeStyles11, StarRating;
28505
+ var sizeStyles10, StarRating;
28547
28506
  var init_StarRating = __esm({
28548
28507
  "components/core/molecules/StarRating.tsx"() {
28549
28508
  "use client";
28550
28509
  init_cn();
28551
28510
  init_Icon();
28552
28511
  init_useEventBus();
28553
- sizeStyles11 = {
28512
+ sizeStyles10 = {
28554
28513
  sm: { star: "w-4 h-4", gap: "gap-0.5" },
28555
28514
  md: { star: "w-6 h-6", gap: "gap-1" },
28556
28515
  lg: { star: "w-8 h-8", gap: "gap-1.5" }
@@ -28569,7 +28528,7 @@ var init_StarRating = __esm({
28569
28528
  }) => {
28570
28529
  const [hoverValue, setHoverValue] = useState(null);
28571
28530
  const eventBus = useSafeEventBus6();
28572
- const styles = sizeStyles11[size];
28531
+ const styles = sizeStyles10[size];
28573
28532
  const displayValue = hoverValue ?? value;
28574
28533
  const emitChange = useCallback(
28575
28534
  (newValue) => {
@@ -29123,8 +29082,8 @@ function TableView({
29123
29082
  }) {
29124
29083
  const eventBus = useEventBus();
29125
29084
  const { t } = useTranslate();
29126
- const [visibleCount, setVisibleCount] = React83__default.useState(pageSize > 0 ? pageSize : Infinity);
29127
- const [localSelected, setLocalSelected] = React83__default.useState(/* @__PURE__ */ new Set());
29085
+ const [visibleCount, setVisibleCount] = React81__default.useState(pageSize > 0 ? pageSize : Infinity);
29086
+ const [localSelected, setLocalSelected] = React81__default.useState(/* @__PURE__ */ new Set());
29128
29087
  const colDefs = columns ?? fields ?? [];
29129
29088
  const allDataRaw = Array.isArray(entity) ? entity : entity ? [entity] : [];
29130
29089
  const dnd = useDataDnd({
@@ -29319,12 +29278,12 @@ function TableView({
29319
29278
  ]
29320
29279
  }
29321
29280
  );
29322
- return dnd.isZone ? /* @__PURE__ */ jsx(dnd.SortableItem, { id: row[idField] ?? id, children: rowInner }, id) : /* @__PURE__ */ jsx(React83__default.Fragment, { children: rowInner }, id);
29281
+ return dnd.isZone ? /* @__PURE__ */ jsx(dnd.SortableItem, { id: row[idField] ?? id, children: rowInner }, id) : /* @__PURE__ */ jsx(React81__default.Fragment, { children: rowInner }, id);
29323
29282
  };
29324
29283
  const items = data.map((row) => row);
29325
29284
  const groups = groupBy ? groupData2(items, groupBy) : [{ label: "", items }];
29326
29285
  let runningIndex = 0;
29327
- const body = /* @__PURE__ */ jsx(Box, { role: "rowgroup", children: groups.map((group, gi) => /* @__PURE__ */ jsxs(React83__default.Fragment, { children: [
29286
+ const body = /* @__PURE__ */ jsx(Box, { role: "rowgroup", children: groups.map((group, gi) => /* @__PURE__ */ jsxs(React81__default.Fragment, { children: [
29328
29287
  group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-3" : "mt-0" }),
29329
29288
  group.items.map((row) => renderRow(row, runningIndex++))
29330
29289
  ] }, gi)) });
@@ -30676,7 +30635,7 @@ var init_StepFlow = __esm({
30676
30635
  className
30677
30636
  }) => {
30678
30637
  if (orientation === "vertical") {
30679
- return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(React83__default.Fragment, { children: /* @__PURE__ */ jsxs(HStack, { gap: "md", align: "start", className: "w-full", children: [
30638
+ 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: [
30680
30639
  /* @__PURE__ */ jsxs(VStack, { gap: "none", align: "center", children: [
30681
30640
  /* @__PURE__ */ jsx(StepCircle, { step, index }),
30682
30641
  showConnectors && index < steps.length - 1 && /* @__PURE__ */ jsx(Box, { className: "w-px h-8 bg-border" })
@@ -30687,7 +30646,7 @@ var init_StepFlow = __esm({
30687
30646
  ] })
30688
30647
  ] }) }, index)) });
30689
30648
  }
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(React83__default.Fragment, { children: [
30649
+ 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: [
30691
30650
  /* @__PURE__ */ jsxs(VStack, { gap: "sm", align: "center", className: "flex-1 w-full md:w-auto", children: [
30692
30651
  /* @__PURE__ */ jsx(StepCircle, { step, index }),
30693
30652
  /* @__PURE__ */ jsx(Typography, { variant: "h4", className: "text-center", children: step.title }),
@@ -31496,14 +31455,14 @@ var init_EdgeDecoration = __esm({
31496
31455
  EdgeDecoration.displayName = "EdgeDecoration";
31497
31456
  }
31498
31457
  });
31499
- var sizeStyles12, VoteStack;
31458
+ var sizeStyles11, VoteStack;
31500
31459
  var init_VoteStack = __esm({
31501
31460
  "components/core/molecules/VoteStack.tsx"() {
31502
31461
  "use client";
31503
31462
  init_cn();
31504
31463
  init_Icon();
31505
31464
  init_useEventBus();
31506
- sizeStyles12 = {
31465
+ sizeStyles11 = {
31507
31466
  sm: {
31508
31467
  button: "w-7 h-7",
31509
31468
  text: "text-sm min-w-[2rem]",
@@ -31531,7 +31490,7 @@ var init_VoteStack = __esm({
31531
31490
  className,
31532
31491
  label
31533
31492
  }) => {
31534
- const styles = sizeStyles12[size];
31493
+ const styles = sizeStyles11[size];
31535
31494
  const isUp = userVote === "up";
31536
31495
  const isDown = userVote === "down";
31537
31496
  const eventBus = useEventBus();
@@ -31663,7 +31622,7 @@ var init_LikertScale = __esm({
31663
31622
  md: "text-base",
31664
31623
  lg: "text-lg"
31665
31624
  };
31666
- LikertScale = React83__default.forwardRef(
31625
+ LikertScale = React81__default.forwardRef(
31667
31626
  ({
31668
31627
  question,
31669
31628
  options = DEFAULT_LIKERT_OPTIONS,
@@ -31675,7 +31634,7 @@ var init_LikertScale = __esm({
31675
31634
  variant = "radios",
31676
31635
  className
31677
31636
  }, ref) => {
31678
- const groupId = React83__default.useId();
31637
+ const groupId = React81__default.useId();
31679
31638
  const eventBus = useEventBus();
31680
31639
  const handleSelect = useCallback(
31681
31640
  (next) => {
@@ -31799,7 +31758,7 @@ var init_LikertScale = __esm({
31799
31758
  LikertScale.displayName = "LikertScale";
31800
31759
  }
31801
31760
  });
31802
- var DEFAULT_MATRIX_COLUMNS, sizeStyles13, MatrixQuestion;
31761
+ var DEFAULT_MATRIX_COLUMNS, sizeStyles12, MatrixQuestion;
31803
31762
  var init_MatrixQuestion = __esm({
31804
31763
  "components/core/molecules/MatrixQuestion.tsx"() {
31805
31764
  "use client";
@@ -31815,7 +31774,7 @@ var init_MatrixQuestion = __esm({
31815
31774
  { value: 4, label: "Agree" },
31816
31775
  { value: 5, label: "Strongly Agree" }
31817
31776
  ];
31818
- sizeStyles13 = {
31777
+ sizeStyles12 = {
31819
31778
  sm: {
31820
31779
  cell: "px-2 py-1.5 text-xs",
31821
31780
  radio: "sm",
@@ -31838,7 +31797,7 @@ var init_MatrixQuestion = __esm({
31838
31797
  size = "md",
31839
31798
  className
31840
31799
  }) => {
31841
- const styles = sizeStyles13[size];
31800
+ const styles = sizeStyles12[size];
31842
31801
  const safeRows = rows2 ?? [];
31843
31802
  const safeValues = values ?? {};
31844
31803
  const eventBus = useEventBus();
@@ -33983,7 +33942,7 @@ var init_DocBreadcrumb = __esm({
33983
33942
  "aria-label": t("aria.breadcrumb"),
33984
33943
  children: /* @__PURE__ */ jsx(HStack, { gap: "xs", align: "center", wrap: true, children: items.map((item, idx) => {
33985
33944
  const isLast = idx === items.length - 1;
33986
- return /* @__PURE__ */ jsxs(React83__default.Fragment, { children: [
33945
+ return /* @__PURE__ */ jsxs(React81__default.Fragment, { children: [
33987
33946
  idx > 0 && /* @__PURE__ */ jsx(
33988
33947
  Icon,
33989
33948
  {
@@ -34947,7 +34906,7 @@ var init_MiniStateMachine = __esm({
34947
34906
  const x = 2 + i * (NODE_W + GAP2 + ARROW_W + GAP2);
34948
34907
  const tc = transitionCounts[s.name] ?? 0;
34949
34908
  const role = getStateRole(s.name, s.isInitial, s.isTerminal, tc, maxTC);
34950
- return /* @__PURE__ */ jsxs(React83__default.Fragment, { children: [
34909
+ return /* @__PURE__ */ jsxs(React81__default.Fragment, { children: [
34951
34910
  /* @__PURE__ */ jsx(
34952
34911
  AvlState,
34953
34912
  {
@@ -35151,7 +35110,7 @@ var init_PageHeader = __esm({
35151
35110
  info: "bg-info/10 text-info"
35152
35111
  };
35153
35112
  return /* @__PURE__ */ jsxs(Box, { className: cn("mb-6", className), 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(React83__default.Fragment, { children: [
35113
+ 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: [
35155
35114
  idx > 0 && /* @__PURE__ */ jsx(Typography, { variant: "small", color: "muted", children: "/" }),
35156
35115
  crumb.href ? /* @__PURE__ */ jsx(
35157
35116
  "a",
@@ -35260,7 +35219,7 @@ var init_FormSection = __esm({
35260
35219
  columns = 1,
35261
35220
  className
35262
35221
  }) => {
35263
- const [collapsed, setCollapsed] = React83__default.useState(defaultCollapsed);
35222
+ const [collapsed, setCollapsed] = React81__default.useState(defaultCollapsed);
35264
35223
  const { t } = useTranslate();
35265
35224
  const eventBus = useEventBus();
35266
35225
  const gridClass = {
@@ -35268,7 +35227,7 @@ var init_FormSection = __esm({
35268
35227
  2: "grid-cols-1 md:grid-cols-2",
35269
35228
  3: "grid-cols-1 md:grid-cols-2 lg:grid-cols-3"
35270
35229
  }[columns];
35271
- React83__default.useCallback(() => {
35230
+ React81__default.useCallback(() => {
35272
35231
  if (collapsible) {
35273
35232
  setCollapsed((prev) => !prev);
35274
35233
  eventBus.emit("UI:TOGGLE_COLLAPSE", { collapsed: !collapsed });
@@ -35375,8 +35334,8 @@ function TextLikeControl({
35375
35334
  onCommit
35376
35335
  }) {
35377
35336
  const initial = value === void 0 || value === null ? "" : String(value);
35378
- const [draft, setDraft] = React83__default.useState(initial);
35379
- React83__default.useEffect(() => setDraft(initial), [initial]);
35337
+ const [draft, setDraft] = React81__default.useState(initial);
35338
+ React81__default.useEffect(() => setDraft(initial), [initial]);
35380
35339
  const commit = () => {
35381
35340
  if (numeric) {
35382
35341
  const n = draft.trim() === "" ? 0 : Number(draft);
@@ -36153,7 +36112,7 @@ var init_WizardContainer = __esm({
36153
36112
  const isCompleted = index < currentStep;
36154
36113
  const stepKey = step.id ?? step.tabId ?? `step-${index}`;
36155
36114
  const stepTitle = step.title ?? step.name ?? `Step ${index + 1}`;
36156
- return /* @__PURE__ */ jsxs(React83__default.Fragment, { children: [
36115
+ return /* @__PURE__ */ jsxs(React81__default.Fragment, { children: [
36157
36116
  /* @__PURE__ */ jsx(
36158
36117
  Button,
36159
36118
  {
@@ -38564,7 +38523,7 @@ var init_DetailPanel = __esm({
38564
38523
  function DialogueBubble({
38565
38524
  speaker,
38566
38525
  text,
38567
- portrait,
38526
+ portrait = "https://almadar-kflow-assets.web.app/shared/characters/archetypes/00_base_model.png",
38568
38527
  position = "bottom",
38569
38528
  className
38570
38529
  }) {
@@ -38600,7 +38559,7 @@ var init_DialogueBubble = __esm({
38600
38559
  }
38601
38560
  });
38602
38561
  function extractTitle(children) {
38603
- if (!React83__default.isValidElement(children)) return void 0;
38562
+ if (!React81__default.isValidElement(children)) return void 0;
38604
38563
  const props = children.props;
38605
38564
  if (typeof props.title === "string") {
38606
38565
  return props.title;
@@ -38712,7 +38671,7 @@ function LinearView({
38712
38671
  /* @__PURE__ */ jsx(HStack, { className: "flex-wrap items-center", gap: "xs", children: trait.states.map((state, i) => {
38713
38672
  const isDone = i < currentIdx;
38714
38673
  const isCurrent = i === currentIdx;
38715
- return /* @__PURE__ */ jsxs(React83__default.Fragment, { children: [
38674
+ return /* @__PURE__ */ jsxs(React81__default.Fragment, { children: [
38716
38675
  i > 0 && /* @__PURE__ */ jsx(
38717
38676
  Typography,
38718
38677
  {
@@ -39670,12 +39629,12 @@ var init_Form = __esm({
39670
39629
  const isSchemaEntity = isOrbitalEntitySchema(entity);
39671
39630
  const resolvedEntity = isSchemaEntity ? entity : void 0;
39672
39631
  const entityName = typeof entity === "string" ? entity : resolvedEntity?.name;
39673
- const normalizedInitialData = React83__default.useMemo(() => {
39632
+ const normalizedInitialData = React81__default.useMemo(() => {
39674
39633
  const entityRowAsInitial = isPlainEntityRow(entity) ? entity : void 0;
39675
39634
  const callerInitial = initialData !== null && typeof initialData === "object" && !Array.isArray(initialData) ? initialData : {};
39676
39635
  return entityRowAsInitial !== void 0 ? { ...entityRowAsInitial, ...callerInitial } : callerInitial;
39677
39636
  }, [entity, initialData]);
39678
- const entityDerivedFields = React83__default.useMemo(() => {
39637
+ const entityDerivedFields = React81__default.useMemo(() => {
39679
39638
  if (fields && fields.length > 0) return void 0;
39680
39639
  if (!resolvedEntity) return void 0;
39681
39640
  return resolvedEntity.fields.map(
@@ -39695,16 +39654,16 @@ var init_Form = __esm({
39695
39654
  const conditionalFields = typeof conditionalFieldsRaw === "boolean" ? {} : conditionalFieldsRaw;
39696
39655
  const hiddenCalculations = typeof hiddenCalculationsRaw === "boolean" ? [] : hiddenCalculationsRaw;
39697
39656
  const violationTriggers = typeof violationTriggersRaw === "boolean" ? [] : violationTriggersRaw;
39698
- const [formData, setFormData] = React83__default.useState(
39657
+ const [formData, setFormData] = React81__default.useState(
39699
39658
  normalizedInitialData
39700
39659
  );
39701
- const [collapsedSections, setCollapsedSections] = React83__default.useState(
39660
+ const [collapsedSections, setCollapsedSections] = React81__default.useState(
39702
39661
  /* @__PURE__ */ new Set()
39703
39662
  );
39704
- const [submitError, setSubmitError] = React83__default.useState(null);
39705
- const formRef = React83__default.useRef(null);
39663
+ const [submitError, setSubmitError] = React81__default.useState(null);
39664
+ const formRef = React81__default.useRef(null);
39706
39665
  const formMode = props.mode;
39707
- const mountedRef = React83__default.useRef(false);
39666
+ const mountedRef = React81__default.useRef(false);
39708
39667
  if (!mountedRef.current) {
39709
39668
  mountedRef.current = true;
39710
39669
  debug("forms", "mount", {
@@ -39717,7 +39676,7 @@ var init_Form = __esm({
39717
39676
  });
39718
39677
  }
39719
39678
  const shouldShowCancel = showCancel ?? (fields && fields.length > 0);
39720
- const evalContext = React83__default.useMemo(
39679
+ const evalContext = React81__default.useMemo(
39721
39680
  () => ({
39722
39681
  formValues: formData,
39723
39682
  globalVariables: externalContext?.globalVariables ?? {},
@@ -39726,7 +39685,7 @@ var init_Form = __esm({
39726
39685
  }),
39727
39686
  [formData, externalContext]
39728
39687
  );
39729
- React83__default.useEffect(() => {
39688
+ React81__default.useEffect(() => {
39730
39689
  debug("forms", "initialData-sync", {
39731
39690
  mode: formMode,
39732
39691
  normalizedInitialData,
@@ -39737,7 +39696,7 @@ var init_Form = __esm({
39737
39696
  setFormData(normalizedInitialData);
39738
39697
  }
39739
39698
  }, [normalizedInitialData]);
39740
- const processCalculations = React83__default.useCallback(
39699
+ const processCalculations = React81__default.useCallback(
39741
39700
  (changedFieldId, newFormData) => {
39742
39701
  if (!hiddenCalculations.length) return;
39743
39702
  const context = {
@@ -39762,7 +39721,7 @@ var init_Form = __esm({
39762
39721
  },
39763
39722
  [hiddenCalculations, externalContext, eventBus]
39764
39723
  );
39765
- const checkViolations = React83__default.useCallback(
39724
+ const checkViolations = React81__default.useCallback(
39766
39725
  (changedFieldId, newFormData) => {
39767
39726
  if (!violationTriggers.length) return;
39768
39727
  const context = {
@@ -39800,7 +39759,7 @@ var init_Form = __esm({
39800
39759
  processCalculations(name, newFormData);
39801
39760
  checkViolations(name, newFormData);
39802
39761
  };
39803
- const isFieldVisible = React83__default.useCallback(
39762
+ const isFieldVisible = React81__default.useCallback(
39804
39763
  (fieldName) => {
39805
39764
  const condition = conditionalFields[fieldName];
39806
39765
  if (!condition) return true;
@@ -39808,7 +39767,7 @@ var init_Form = __esm({
39808
39767
  },
39809
39768
  [conditionalFields, evalContext]
39810
39769
  );
39811
- const isSectionVisible = React83__default.useCallback(
39770
+ const isSectionVisible = React81__default.useCallback(
39812
39771
  (section) => {
39813
39772
  if (!section.condition) return true;
39814
39773
  return Boolean(evaluateFormExpression(section.condition, evalContext));
@@ -39884,7 +39843,7 @@ var init_Form = __esm({
39884
39843
  eventBus.emit(`UI:${onCancel}`);
39885
39844
  }
39886
39845
  };
39887
- const renderField = React83__default.useCallback(
39846
+ const renderField = React81__default.useCallback(
39888
39847
  (field) => {
39889
39848
  const fieldName = field.name || field.field;
39890
39849
  if (!fieldName) return null;
@@ -39905,7 +39864,7 @@ var init_Form = __esm({
39905
39864
  [formData, isFieldVisible, relationsData, relationsLoading, isLoading]
39906
39865
  );
39907
39866
  const effectiveFields = entityDerivedFields ?? fields;
39908
- const normalizedFields = React83__default.useMemo(() => {
39867
+ const normalizedFields = React81__default.useMemo(() => {
39909
39868
  if (!effectiveFields || effectiveFields.length === 0) return [];
39910
39869
  return effectiveFields.map((field) => {
39911
39870
  if (typeof field === "string") {
@@ -39928,7 +39887,7 @@ var init_Form = __esm({
39928
39887
  return field;
39929
39888
  });
39930
39889
  }, [effectiveFields, resolvedEntity]);
39931
- const schemaFields = React83__default.useMemo(() => {
39890
+ const schemaFields = React81__default.useMemo(() => {
39932
39891
  if (normalizedFields.length === 0) return null;
39933
39892
  if (isDebugEnabled()) {
39934
39893
  debugGroup(`Form: ${entityName || "unknown"}`);
@@ -39938,7 +39897,7 @@ var init_Form = __esm({
39938
39897
  }
39939
39898
  return normalizedFields.map(renderField).filter(Boolean);
39940
39899
  }, [normalizedFields, renderField, entityName, conditionalFields]);
39941
- const sectionElements = React83__default.useMemo(() => {
39900
+ const sectionElements = React81__default.useMemo(() => {
39942
39901
  if (!sections || sections.length === 0) return null;
39943
39902
  return sections.map((section) => {
39944
39903
  if (!isSectionVisible(section)) {
@@ -41220,7 +41179,7 @@ var init_List = __esm({
41220
41179
  if (entity && typeof entity === "object" && "id" in entity) return [entity];
41221
41180
  return [];
41222
41181
  }, [entity]);
41223
- const getItemActions = React83__default.useCallback(
41182
+ const getItemActions = React81__default.useCallback(
41224
41183
  (item) => {
41225
41184
  if (!itemActions) return [];
41226
41185
  if (typeof itemActions === "function") {
@@ -41696,7 +41655,7 @@ var init_MediaGallery = __esm({
41696
41655
  [selectable, selectedItems, selectionEvent, eventBus]
41697
41656
  );
41698
41657
  const entityData = Array.isArray(entity) ? entity : [];
41699
- const items = React83__default.useMemo(() => {
41658
+ const items = React81__default.useMemo(() => {
41700
41659
  if (propItems) return propItems;
41701
41660
  if (entityData.length === 0) return [];
41702
41661
  return entityData.map((record, idx) => ({
@@ -41866,9 +41825,9 @@ function MiniMap({
41866
41825
  viewportRect,
41867
41826
  className
41868
41827
  }) {
41869
- const canvasRef = React83.useRef(null);
41870
- const frameRef = React83.useRef(0);
41871
- React83.useEffect(() => {
41828
+ const canvasRef = React81.useRef(null);
41829
+ const frameRef = React81.useRef(0);
41830
+ React81.useEffect(() => {
41872
41831
  const canvas = canvasRef.current;
41873
41832
  if (!canvas) return;
41874
41833
  const ctx = canvas.getContext("2d");
@@ -41950,7 +41909,7 @@ var init_MiniMap = __esm({
41950
41909
  }
41951
41910
  });
41952
41911
  function extractTitle2(children) {
41953
- if (!React83__default.isValidElement(children)) return void 0;
41912
+ if (!React81__default.isValidElement(children)) return void 0;
41954
41913
  const props = children.props;
41955
41914
  if (typeof props.title === "string") {
41956
41915
  return props.title;
@@ -42407,7 +42366,7 @@ var init_debugRegistry = __esm({
42407
42366
  }
42408
42367
  });
42409
42368
  function useDebugData() {
42410
- const [data, setData] = React83.useState(() => ({
42369
+ const [data, setData] = React81.useState(() => ({
42411
42370
  traits: [],
42412
42371
  ticks: [],
42413
42372
  guards: [],
@@ -42421,7 +42380,7 @@ function useDebugData() {
42421
42380
  },
42422
42381
  lastUpdate: Date.now()
42423
42382
  }));
42424
- React83.useEffect(() => {
42383
+ React81.useEffect(() => {
42425
42384
  const updateData = () => {
42426
42385
  setData({
42427
42386
  traits: getAllTraits(),
@@ -42530,12 +42489,12 @@ function layoutGraph(states, transitions, initialState, width, height) {
42530
42489
  return positions;
42531
42490
  }
42532
42491
  function WalkMinimap() {
42533
- const [walkStep, setWalkStep] = React83.useState(null);
42534
- const [traits2, setTraits] = React83.useState([]);
42535
- const [coveredEdges, setCoveredEdges] = React83.useState([]);
42536
- const [completedTraits, setCompletedTraits] = React83.useState(/* @__PURE__ */ new Set());
42537
- const prevTraitRef = React83.useRef(null);
42538
- React83.useEffect(() => {
42492
+ const [walkStep, setWalkStep] = React81.useState(null);
42493
+ const [traits2, setTraits] = React81.useState([]);
42494
+ const [coveredEdges, setCoveredEdges] = React81.useState([]);
42495
+ const [completedTraits, setCompletedTraits] = React81.useState(/* @__PURE__ */ new Set());
42496
+ const prevTraitRef = React81.useRef(null);
42497
+ React81.useEffect(() => {
42539
42498
  const interval = setInterval(() => {
42540
42499
  const w = window;
42541
42500
  const step = w.__orbitalWalkStep;
@@ -42971,15 +42930,15 @@ var init_EntitiesTab = __esm({
42971
42930
  });
42972
42931
  function EventFlowTab({ events: events2 }) {
42973
42932
  const { t } = useTranslate();
42974
- const [filter, setFilter] = React83.useState("all");
42975
- const containerRef = React83.useRef(null);
42976
- const [autoScroll, setAutoScroll] = React83.useState(true);
42977
- React83.useEffect(() => {
42933
+ const [filter, setFilter] = React81.useState("all");
42934
+ const containerRef = React81.useRef(null);
42935
+ const [autoScroll, setAutoScroll] = React81.useState(true);
42936
+ React81.useEffect(() => {
42978
42937
  if (autoScroll && containerRef.current) {
42979
42938
  containerRef.current.scrollTop = containerRef.current.scrollHeight;
42980
42939
  }
42981
42940
  }, [events2.length, autoScroll]);
42982
- const filteredEvents = React83.useMemo(() => {
42941
+ const filteredEvents = React81.useMemo(() => {
42983
42942
  if (filter === "all") return events2;
42984
42943
  return events2.filter((e) => e.type === filter);
42985
42944
  }, [events2, filter]);
@@ -43095,7 +43054,7 @@ var init_EventFlowTab = __esm({
43095
43054
  });
43096
43055
  function GuardsPanel({ guards }) {
43097
43056
  const { t } = useTranslate();
43098
- const [filter, setFilter] = React83.useState("all");
43057
+ const [filter, setFilter] = React81.useState("all");
43099
43058
  if (guards.length === 0) {
43100
43059
  return /* @__PURE__ */ jsx(
43101
43060
  EmptyState,
@@ -43108,7 +43067,7 @@ function GuardsPanel({ guards }) {
43108
43067
  }
43109
43068
  const passedCount = guards.filter((g) => g.result).length;
43110
43069
  const failedCount = guards.length - passedCount;
43111
- const filteredGuards = React83.useMemo(() => {
43070
+ const filteredGuards = React81.useMemo(() => {
43112
43071
  if (filter === "all") return guards;
43113
43072
  if (filter === "passed") return guards.filter((g) => g.result);
43114
43073
  return guards.filter((g) => !g.result);
@@ -43271,10 +43230,10 @@ function EffectBadge({ effect }) {
43271
43230
  }
43272
43231
  function TransitionTimeline({ transitions }) {
43273
43232
  const { t } = useTranslate();
43274
- const containerRef = React83.useRef(null);
43275
- const [autoScroll, setAutoScroll] = React83.useState(true);
43276
- const [expandedId, setExpandedId] = React83.useState(null);
43277
- React83.useEffect(() => {
43233
+ const containerRef = React81.useRef(null);
43234
+ const [autoScroll, setAutoScroll] = React81.useState(true);
43235
+ const [expandedId, setExpandedId] = React81.useState(null);
43236
+ React81.useEffect(() => {
43278
43237
  if (autoScroll && containerRef.current) {
43279
43238
  containerRef.current.scrollTop = containerRef.current.scrollHeight;
43280
43239
  }
@@ -43554,9 +43513,9 @@ function getAllEvents(traits2) {
43554
43513
  function EventDispatcherTab({ traits: traits2, schema }) {
43555
43514
  const eventBus = useEventBus();
43556
43515
  const { t } = useTranslate();
43557
- const [log8, setLog] = React83.useState([]);
43558
- const prevStatesRef = React83.useRef(/* @__PURE__ */ new Map());
43559
- React83.useEffect(() => {
43516
+ const [log8, setLog] = React81.useState([]);
43517
+ const prevStatesRef = React81.useRef(/* @__PURE__ */ new Map());
43518
+ React81.useEffect(() => {
43560
43519
  for (const trait of traits2) {
43561
43520
  const prev = prevStatesRef.current.get(trait.id);
43562
43521
  if (prev && prev !== trait.currentState) {
@@ -43725,10 +43684,10 @@ function VerifyModePanel({
43725
43684
  localCount
43726
43685
  }) {
43727
43686
  const { t } = useTranslate();
43728
- const [expanded, setExpanded] = React83.useState(true);
43729
- const scrollRef = React83.useRef(null);
43730
- const prevCountRef = React83.useRef(0);
43731
- React83.useEffect(() => {
43687
+ const [expanded, setExpanded] = React81.useState(true);
43688
+ const scrollRef = React81.useRef(null);
43689
+ const prevCountRef = React81.useRef(0);
43690
+ React81.useEffect(() => {
43732
43691
  if (expanded && transitions.length > prevCountRef.current && scrollRef.current) {
43733
43692
  scrollRef.current.scrollTop = scrollRef.current.scrollHeight;
43734
43693
  }
@@ -43785,10 +43744,10 @@ function RuntimeDebugger({
43785
43744
  schema
43786
43745
  }) {
43787
43746
  const { t } = useTranslate();
43788
- const [isCollapsed, setIsCollapsed] = React83.useState(mode === "verify" ? true : defaultCollapsed);
43789
- const [isVisible, setIsVisible] = React83.useState(mode === "inline" || mode === "verify" || isDebugEnabled2());
43747
+ const [isCollapsed, setIsCollapsed] = React81.useState(mode === "verify" ? true : defaultCollapsed);
43748
+ const [isVisible, setIsVisible] = React81.useState(mode === "inline" || mode === "verify" || isDebugEnabled2());
43790
43749
  const debugData = useDebugData();
43791
- React83.useEffect(() => {
43750
+ React81.useEffect(() => {
43792
43751
  if (mode === "inline") return;
43793
43752
  return onDebugToggle((enabled) => {
43794
43753
  setIsVisible(enabled);
@@ -43797,7 +43756,7 @@ function RuntimeDebugger({
43797
43756
  }
43798
43757
  });
43799
43758
  }, [mode]);
43800
- React83.useEffect(() => {
43759
+ React81.useEffect(() => {
43801
43760
  if (mode === "inline") return;
43802
43761
  const handleKeyDown = (e) => {
43803
43762
  if (e.key === "`" && isVisible) {
@@ -44246,7 +44205,7 @@ function SequenceBar({
44246
44205
  onSlotRemove(index);
44247
44206
  }, [onSlotRemove, playing]);
44248
44207
  const paddedSlots = Array.from({ length: maxSlots }, (_, i) => slots[i]);
44249
- return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(React83__default.Fragment, { children: [
44208
+ return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(React81__default.Fragment, { children: [
44250
44209
  i > 0 && /* @__PURE__ */ jsx(
44251
44210
  Typography,
44252
44211
  {
@@ -45188,7 +45147,7 @@ var init_SplitPane = __esm({
45188
45147
  }
45189
45148
  });
45190
45149
  function Sprite({
45191
- spritesheet,
45150
+ spritesheet = "https://almadar-kflow-assets.web.app/shared/isometric-blocks/Spritesheet/allTiles_sheet.png",
45192
45151
  frameWidth,
45193
45152
  frameHeight,
45194
45153
  frame,
@@ -45336,7 +45295,7 @@ var init_StatCard = __esm({
45336
45295
  const labelToUse = propLabel ?? propTitle;
45337
45296
  const eventBus = useEventBus();
45338
45297
  const { t } = useTranslate();
45339
- const handleActionClick = React83__default.useCallback(() => {
45298
+ const handleActionClick = React81__default.useCallback(() => {
45340
45299
  if (action?.event) {
45341
45300
  eventBus.emit(`UI:${action.event}`, {});
45342
45301
  }
@@ -45347,7 +45306,7 @@ var init_StatCard = __esm({
45347
45306
  const data = Array.isArray(entity) ? entity : entity ? [entity] : [];
45348
45307
  const isLoading = externalLoading ?? false;
45349
45308
  const error = externalError;
45350
- const computeMetricValue = React83__default.useCallback(
45309
+ const computeMetricValue = React81__default.useCallback(
45351
45310
  (metric, items) => {
45352
45311
  if (metric.value !== void 0) {
45353
45312
  return metric.value;
@@ -45386,7 +45345,7 @@ var init_StatCard = __esm({
45386
45345
  },
45387
45346
  []
45388
45347
  );
45389
- const schemaStats = React83__default.useMemo(() => {
45348
+ const schemaStats = React81__default.useMemo(() => {
45390
45349
  if (!metrics || metrics.length === 0) return null;
45391
45350
  return metrics.map((metric) => ({
45392
45351
  label: metric.label,
@@ -45394,7 +45353,7 @@ var init_StatCard = __esm({
45394
45353
  format: metric.format
45395
45354
  }));
45396
45355
  }, [metrics, data, computeMetricValue]);
45397
- const calculatedTrend = React83__default.useMemo(() => {
45356
+ const calculatedTrend = React81__default.useMemo(() => {
45398
45357
  if (manualTrend !== void 0) return manualTrend;
45399
45358
  if (previousValue === void 0 || currentValue2 === void 0)
45400
45359
  return void 0;
@@ -46399,7 +46358,7 @@ var init_Timeline = __esm({
46399
46358
  }) => {
46400
46359
  const { t } = useTranslate();
46401
46360
  const entityData = Array.isArray(entity) ? entity : [];
46402
- const items = React83__default.useMemo(() => {
46361
+ const items = React81__default.useMemo(() => {
46403
46362
  if (propItems) return propItems;
46404
46363
  if (entityData.length === 0) return [];
46405
46364
  return entityData.map((record, idx) => {
@@ -46556,7 +46515,7 @@ var init_TimerDisplay = __esm({
46556
46515
  }
46557
46516
  });
46558
46517
  function extractToastProps(children) {
46559
- if (!React83__default.isValidElement(children)) {
46518
+ if (!React81__default.isValidElement(children)) {
46560
46519
  if (typeof children === "string") {
46561
46520
  return { message: children };
46562
46521
  }
@@ -46594,7 +46553,7 @@ var init_ToastSlot = __esm({
46594
46553
  eventBus.emit("UI:CLOSE");
46595
46554
  };
46596
46555
  if (!isVisible) return null;
46597
- const isCustomContent = React83__default.isValidElement(children) && !message;
46556
+ const isCustomContent = React81__default.isValidElement(children) && !message;
46598
46557
  return /* @__PURE__ */ jsx(Box, { className: "fixed bottom-4 right-4 z-50", children: isCustomContent ? children : /* @__PURE__ */ jsx(
46599
46558
  Toast,
46600
46559
  {
@@ -47114,8 +47073,8 @@ function XPBar({
47114
47073
  }) {
47115
47074
  const sizes = sizeMap18[size];
47116
47075
  const percentage = max > 0 ? Math.max(0, Math.min(100, current / max * 100)) : 0;
47117
- const [fillWidth, setFillWidth] = React83.useState(animated ? 0 : percentage);
47118
- React83.useEffect(() => {
47076
+ const [fillWidth, setFillWidth] = React81.useState(animated ? 0 : percentage);
47077
+ React81.useEffect(() => {
47119
47078
  if (!animated) {
47120
47079
  setFillWidth(percentage);
47121
47080
  return;
@@ -47182,12 +47141,12 @@ var init_XPBar = __esm({
47182
47141
  }
47183
47142
  });
47184
47143
  function lazyThree(name, loader) {
47185
- const Lazy = React83__default.lazy(() => loader().then((m) => ({ default: m[name] })));
47144
+ const Lazy = React81__default.lazy(() => loader().then((m) => ({ default: m[name] })));
47186
47145
  function ThreeWrapper(props) {
47187
- return React83__default.createElement(
47188
- React83__default.Suspense,
47146
+ return React81__default.createElement(
47147
+ React81__default.Suspense,
47189
47148
  { fallback: null },
47190
- React83__default.createElement(Lazy, props)
47149
+ React81__default.createElement(Lazy, props)
47191
47150
  );
47192
47151
  }
47193
47152
  ThreeWrapper.displayName = `Lazy(${name})`;
@@ -47207,7 +47166,6 @@ var init_component_registry_generated = __esm({
47207
47166
  init_AnimatedReveal();
47208
47167
  init_ArticleSection();
47209
47168
  init_Aside();
47210
- init_AssetPicker();
47211
47169
  init_AuthLayout();
47212
47170
  init_BattleBoard();
47213
47171
  init_BattleTemplate();
@@ -47307,13 +47265,11 @@ var init_component_registry_generated = __esm({
47307
47265
  init_GradientDivider();
47308
47266
  init_GraphCanvas();
47309
47267
  init_GraphView();
47310
- init_GridPicker();
47311
47268
  init_Header();
47312
47269
  init_HealthBar();
47313
47270
  init_HealthPanel();
47314
47271
  init_HeroOrganism();
47315
47272
  init_HeroSection();
47316
- init_IconPicker();
47317
47273
  init_InfiniteScrollSentinel();
47318
47274
  init_InputGroup();
47319
47275
  init_InstallBox();
@@ -47358,7 +47314,6 @@ var init_component_registry_generated = __esm({
47358
47314
  init_PricingOrganism();
47359
47315
  init_PricingPageTemplate();
47360
47316
  init_ProgressDots();
47361
- init_PropertyInspector();
47362
47317
  init_PullQuote();
47363
47318
  init_PullToRefresh();
47364
47319
  init_QrScanner();
@@ -47482,7 +47437,6 @@ var init_component_registry_generated = __esm({
47482
47437
  "AnimatedReveal": AnimatedReveal,
47483
47438
  "ArticleSection": ArticleSection,
47484
47439
  "Aside": Aside,
47485
- "AssetPicker": AssetPicker,
47486
47440
  "AuthLayout": AuthLayout,
47487
47441
  "Avatar": AvatarPattern,
47488
47442
  "AvatarPattern": AvatarPattern,
@@ -47602,7 +47556,6 @@ var init_component_registry_generated = __esm({
47602
47556
  "GraphView": GraphView,
47603
47557
  "Grid": GridPattern,
47604
47558
  "GridPattern": GridPattern,
47605
- "GridPicker": GridPicker,
47606
47559
  "HStack": HStackPattern,
47607
47560
  "HStackPattern": HStackPattern,
47608
47561
  "Header": Header,
@@ -47612,7 +47565,6 @@ var init_component_registry_generated = __esm({
47612
47565
  "HeroSection": HeroSection,
47613
47566
  "Icon": IconPattern,
47614
47567
  "IconPattern": IconPattern,
47615
- "IconPicker": IconPicker,
47616
47568
  "InfiniteScrollSentinel": InfiniteScrollSentinel,
47617
47569
  "Input": InputPattern,
47618
47570
  "InputGroup": InputGroup,
@@ -47669,7 +47621,6 @@ var init_component_registry_generated = __esm({
47669
47621
  "ProgressBar": ProgressBarPattern,
47670
47622
  "ProgressBarPattern": ProgressBarPattern,
47671
47623
  "ProgressDots": ProgressDots,
47672
- "PropertyInspector": PropertyInspector,
47673
47624
  "PullQuote": PullQuote,
47674
47625
  "PullToRefresh": PullToRefresh,
47675
47626
  "QrScanner": QrScanner,
@@ -47811,7 +47762,7 @@ function SuspenseConfigProvider({
47811
47762
  config,
47812
47763
  children
47813
47764
  }) {
47814
- return React83__default.createElement(
47765
+ return React81__default.createElement(
47815
47766
  SuspenseConfigContext.Provider,
47816
47767
  { value: config },
47817
47768
  children
@@ -48301,7 +48252,7 @@ function renderPatternChildren(children, onDismiss, parentId = "root", parentPat
48301
48252
  const key = `${parentId}-${index}-trait:${traitName}`;
48302
48253
  return /* @__PURE__ */ jsx(TraitFrame, { traitName }, key);
48303
48254
  }
48304
- return /* @__PURE__ */ jsx(React83__default.Fragment, { children: child }, `${parentId}-${index}`);
48255
+ return /* @__PURE__ */ jsx(React81__default.Fragment, { children: child }, `${parentId}-${index}`);
48305
48256
  }
48306
48257
  if (!child || typeof child !== "object") return null;
48307
48258
  const childId = `${parentId}-${index}`;
@@ -48341,14 +48292,14 @@ function isPatternConfig(value) {
48341
48292
  if (value === null || value === void 0) return false;
48342
48293
  if (typeof value !== "object") return false;
48343
48294
  if (Array.isArray(value)) return false;
48344
- if (React83__default.isValidElement(value)) return false;
48295
+ if (React81__default.isValidElement(value)) return false;
48345
48296
  if (value instanceof Date) return false;
48346
48297
  if (typeof value === "function") return false;
48347
48298
  const record = value;
48348
48299
  return "type" in record && typeof record.type === "string";
48349
48300
  }
48350
48301
  function isPlainConfigObject(value) {
48351
- if (React83__default.isValidElement(value)) return false;
48302
+ if (React81__default.isValidElement(value)) return false;
48352
48303
  if (value instanceof Date) return false;
48353
48304
  const proto = Object.getPrototypeOf(value);
48354
48305
  return proto === Object.prototype || proto === null;
@@ -49959,4 +49910,4 @@ init_AboutPageTemplate();
49959
49910
  // components/index.ts
49960
49911
  init_cn();
49961
49912
 
49962
- 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 };
49913
+ 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, 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, 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 };