@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,5 +1,5 @@
1
- import * as React89 from 'react';
2
- import React89__default, { createContext, useContext, useMemo, useRef, useEffect, useCallback, Suspense, useState, useLayoutEffect, lazy, useId, useSyncExternalStore } from 'react';
1
+ import * as React87 from 'react';
2
+ import React87__default, { createContext, useContext, useMemo, useRef, useEffect, useCallback, Suspense, useState, useLayoutEffect, lazy, useId, useSyncExternalStore } from 'react';
3
3
  import { createLogger, isLogLevelEnabled } from '@almadar/logger';
4
4
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
5
5
  import { EventBusContext, useTraitScope, TraitScopeProvider } from '@almadar/ui/providers';
@@ -657,7 +657,7 @@ var init_Box = __esm({
657
657
  fixed: "fixed",
658
658
  sticky: "sticky"
659
659
  };
660
- Box = React89__default.forwardRef(
660
+ Box = React87__default.forwardRef(
661
661
  ({
662
662
  padding,
663
663
  paddingX,
@@ -707,7 +707,7 @@ var init_Box = __esm({
707
707
  onMouseLeave?.(e);
708
708
  }, [hoverEvent, eventBus, onMouseLeave]);
709
709
  const isClickable = action || onClick;
710
- return React89__default.createElement(
710
+ return React87__default.createElement(
711
711
  Component,
712
712
  {
713
713
  ref,
@@ -1490,7 +1490,7 @@ var init_Icon = __esm({
1490
1490
  const directIcon = typeof icon === "string" ? void 0 : icon;
1491
1491
  const effectiveName = typeof icon === "string" ? icon : name;
1492
1492
  const family = useIconFamily();
1493
- const RenderedComponent = React89__default.useMemo(() => {
1493
+ const RenderedComponent = React87__default.useMemo(() => {
1494
1494
  if (directIcon) return null;
1495
1495
  return effectiveName ? resolveIconForFamily(effectiveName, family) : null;
1496
1496
  }, [directIcon, effectiveName, family]);
@@ -1548,7 +1548,7 @@ function resolveIconProp(value, sizeClass) {
1548
1548
  const IconComp = value;
1549
1549
  return /* @__PURE__ */ jsx(IconComp, { className: sizeClass });
1550
1550
  }
1551
- if (React89__default.isValidElement(value)) {
1551
+ if (React87__default.isValidElement(value)) {
1552
1552
  return value;
1553
1553
  }
1554
1554
  if (typeof value === "object" && value !== null && "render" in value) {
@@ -1624,7 +1624,7 @@ var init_Button = __esm({
1624
1624
  md: "h-icon-default w-icon-default",
1625
1625
  lg: "h-icon-default w-icon-default"
1626
1626
  };
1627
- Button = React89__default.forwardRef(
1627
+ Button = React87__default.forwardRef(
1628
1628
  ({
1629
1629
  className,
1630
1630
  variant = "primary",
@@ -1689,7 +1689,7 @@ var Dialog;
1689
1689
  var init_Dialog = __esm({
1690
1690
  "components/core/atoms/Dialog.tsx"() {
1691
1691
  init_cn();
1692
- Dialog = React89__default.forwardRef(
1692
+ Dialog = React87__default.forwardRef(
1693
1693
  ({
1694
1694
  role = "dialog",
1695
1695
  "aria-modal": ariaModal = true,
@@ -1715,11 +1715,9 @@ var init_Dialog = __esm({
1715
1715
  // components/core/atoms/Typography.tsx
1716
1716
  var Typography_exports = {};
1717
1717
  __export(Typography_exports, {
1718
- Heading: () => Heading,
1719
- Text: () => Text,
1720
1718
  Typography: () => Typography
1721
1719
  });
1722
- var variantStyles2, colorStyles, weightStyles, defaultElements, typographySizeStyles, overflowStyles2, Typography, sizeStyles2, Heading, Text;
1720
+ var variantStyles2, colorStyles, weightStyles, defaultElements, typographySizeStyles, overflowStyles2, Typography;
1723
1721
  var init_Typography = __esm({
1724
1722
  "components/core/atoms/Typography.tsx"() {
1725
1723
  init_cn();
@@ -1830,46 +1828,6 @@ var init_Typography = __esm({
1830
1828
  );
1831
1829
  };
1832
1830
  Typography.displayName = "Typography";
1833
- sizeStyles2 = {
1834
- xs: "text-xs",
1835
- sm: "text-sm",
1836
- md: "text-base",
1837
- lg: "text-lg",
1838
- xl: "text-xl",
1839
- "2xl": "text-2xl",
1840
- "3xl": "text-3xl"
1841
- };
1842
- Heading = ({
1843
- level = 2,
1844
- size,
1845
- className,
1846
- ...props
1847
- }) => {
1848
- const variant = `h${level}`;
1849
- const sizeClass = size ? sizeStyles2[size] : void 0;
1850
- return /* @__PURE__ */ jsx(
1851
- Typography,
1852
- {
1853
- variant,
1854
- className: cn(sizeClass, className),
1855
- ...props
1856
- }
1857
- );
1858
- };
1859
- Heading.displayName = "Heading";
1860
- Text = ({
1861
- variant = "body",
1862
- ...props
1863
- }) => {
1864
- return /* @__PURE__ */ jsx(
1865
- Typography,
1866
- {
1867
- variant,
1868
- ...props
1869
- }
1870
- );
1871
- };
1872
- Text.displayName = "Text";
1873
1831
  }
1874
1832
  });
1875
1833
  var Overlay;
@@ -2311,7 +2269,7 @@ var init_Drawer = __esm({
2311
2269
  Drawer.displayName = "Drawer";
2312
2270
  }
2313
2271
  });
2314
- var variantStyles3, sizeStyles3, Badge;
2272
+ var variantStyles3, sizeStyles2, Badge;
2315
2273
  var init_Badge = __esm({
2316
2274
  "components/core/atoms/Badge.tsx"() {
2317
2275
  init_cn();
@@ -2348,12 +2306,12 @@ var init_Badge = __esm({
2348
2306
  "border-[length:var(--border-width-thin)] border-border"
2349
2307
  ].join(" ")
2350
2308
  };
2351
- sizeStyles3 = {
2309
+ sizeStyles2 = {
2352
2310
  sm: "px-2 py-0.5 text-xs",
2353
2311
  md: "px-2.5 py-1 text-sm",
2354
2312
  lg: "px-3 py-1.5 text-base"
2355
2313
  };
2356
- Badge = React89__default.forwardRef(
2314
+ Badge = React87__default.forwardRef(
2357
2315
  ({ className, variant = "default", size = "sm", amount, label, icon, children, onRemove, removeLabel, ...props }, ref) => {
2358
2316
  const iconSizes3 = {
2359
2317
  sm: "h-icon-default w-icon-default",
@@ -2368,7 +2326,7 @@ var init_Badge = __esm({
2368
2326
  className: cn(
2369
2327
  "inline-flex items-center gap-1 font-bold rounded-sm",
2370
2328
  variantStyles3[variant],
2371
- sizeStyles3[size],
2329
+ sizeStyles2[size],
2372
2330
  onRemove && "pr-1",
2373
2331
  className
2374
2332
  ),
@@ -2669,7 +2627,7 @@ var init_SvgFlow = __esm({
2669
2627
  opacity = 1,
2670
2628
  className
2671
2629
  }) => {
2672
- const markerId = React89__default.useMemo(() => {
2630
+ const markerId = React87__default.useMemo(() => {
2673
2631
  flowIdCounter += 1;
2674
2632
  return `almadar-flow-arrow-${flowIdCounter}`;
2675
2633
  }, []);
@@ -3212,7 +3170,7 @@ var init_SvgRing = __esm({
3212
3170
  className,
3213
3171
  label
3214
3172
  }) => {
3215
- const gradientId = React89__default.useMemo(() => {
3173
+ const gradientId = React87__default.useMemo(() => {
3216
3174
  ringIdCounter += 1;
3217
3175
  return `almadar-ring-glow-${ringIdCounter}`;
3218
3176
  }, []);
@@ -3374,7 +3332,7 @@ var init_Input = __esm({
3374
3332
  "components/core/atoms/Input.tsx"() {
3375
3333
  init_cn();
3376
3334
  init_Icon();
3377
- Input = React89__default.forwardRef(
3335
+ Input = React87__default.forwardRef(
3378
3336
  ({
3379
3337
  className,
3380
3338
  inputType,
@@ -3495,7 +3453,7 @@ var Label;
3495
3453
  var init_Label = __esm({
3496
3454
  "components/core/atoms/Label.tsx"() {
3497
3455
  init_cn();
3498
- Label = React89__default.forwardRef(
3456
+ Label = React87__default.forwardRef(
3499
3457
  ({ className, required, children, ...props }, ref) => {
3500
3458
  return /* @__PURE__ */ jsxs(
3501
3459
  "label",
@@ -3521,7 +3479,7 @@ var Textarea;
3521
3479
  var init_Textarea = __esm({
3522
3480
  "components/core/atoms/Textarea.tsx"() {
3523
3481
  init_cn();
3524
- Textarea = React89__default.forwardRef(
3482
+ Textarea = React87__default.forwardRef(
3525
3483
  ({ className, error, ...props }, ref) => {
3526
3484
  return /* @__PURE__ */ jsx(
3527
3485
  "textarea",
@@ -3551,7 +3509,7 @@ var init_Select = __esm({
3551
3509
  "components/core/atoms/Select.tsx"() {
3552
3510
  init_cn();
3553
3511
  init_Icon();
3554
- Select = React89__default.forwardRef(
3512
+ Select = React87__default.forwardRef(
3555
3513
  ({ className, options, placeholder, error, ...props }, ref) => {
3556
3514
  return /* @__PURE__ */ jsxs("div", { className: "relative", children: [
3557
3515
  /* @__PURE__ */ jsxs(
@@ -3593,7 +3551,7 @@ var Checkbox;
3593
3551
  var init_Checkbox = __esm({
3594
3552
  "components/core/atoms/Checkbox.tsx"() {
3595
3553
  init_cn();
3596
- Checkbox = React89__default.forwardRef(
3554
+ Checkbox = React87__default.forwardRef(
3597
3555
  ({ className, label, id, ...props }, ref) => {
3598
3556
  const inputId = id || `checkbox-${Math.random().toString(36).substr(2, 9)}`;
3599
3557
  return /* @__PURE__ */ jsxs("div", { className: "flex items-center", children: [
@@ -3684,7 +3642,7 @@ var init_Card = __esm({
3684
3642
  chip: "shadow-none rounded-pill border-[length:var(--border-width)] border-border",
3685
3643
  "tile-image-first": "p-0 overflow-hidden"
3686
3644
  };
3687
- Card = React89__default.forwardRef(
3645
+ Card = React87__default.forwardRef(
3688
3646
  ({
3689
3647
  className,
3690
3648
  variant = "bordered",
@@ -3722,9 +3680,9 @@ var init_Card = __esm({
3722
3680
  }
3723
3681
  );
3724
3682
  Card.displayName = "Card";
3725
- CardHeader = React89__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("mb-4", className), ...props }));
3683
+ CardHeader = React87__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("mb-4", className), ...props }));
3726
3684
  CardHeader.displayName = "CardHeader";
3727
- CardTitle = React89__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
3685
+ CardTitle = React87__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
3728
3686
  "h3",
3729
3687
  {
3730
3688
  ref,
@@ -3737,11 +3695,11 @@ var init_Card = __esm({
3737
3695
  }
3738
3696
  ));
3739
3697
  CardTitle.displayName = "CardTitle";
3740
- CardContent = React89__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("", className), ...props }));
3698
+ CardContent = React87__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("", className), ...props }));
3741
3699
  CardContent.displayName = "CardContent";
3742
3700
  CardBody = CardContent;
3743
3701
  CardBody.displayName = "CardBody";
3744
- CardFooter = React89__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
3702
+ CardFooter = React87__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
3745
3703
  "div",
3746
3704
  {
3747
3705
  ref,
@@ -3752,7 +3710,7 @@ var init_Card = __esm({
3752
3710
  CardFooter.displayName = "CardFooter";
3753
3711
  }
3754
3712
  });
3755
- var variantStyles5, sizeStyles4, iconSizes, FilterPill;
3713
+ var variantStyles5, sizeStyles3, iconSizes, FilterPill;
3756
3714
  var init_FilterPill = __esm({
3757
3715
  "components/core/atoms/FilterPill.tsx"() {
3758
3716
  init_cn();
@@ -3786,7 +3744,7 @@ var init_FilterPill = __esm({
3786
3744
  "border-[length:var(--border-width-thin)] border-border"
3787
3745
  ].join(" ")
3788
3746
  };
3789
- sizeStyles4 = {
3747
+ sizeStyles3 = {
3790
3748
  sm: "px-2 py-0.5 text-xs",
3791
3749
  md: "px-2.5 py-1 text-sm",
3792
3750
  lg: "px-3 py-1.5 text-base"
@@ -3796,7 +3754,7 @@ var init_FilterPill = __esm({
3796
3754
  md: "w-3.5 h-3.5",
3797
3755
  lg: "w-4 h-4"
3798
3756
  };
3799
- FilterPill = React89__default.forwardRef(
3757
+ FilterPill = React87__default.forwardRef(
3800
3758
  ({
3801
3759
  className,
3802
3760
  variant = "default",
@@ -3830,7 +3788,7 @@ var init_FilterPill = __esm({
3830
3788
  className: cn(
3831
3789
  "inline-flex items-center gap-1 font-bold rounded-pill",
3832
3790
  variantStyles5[variant],
3833
- sizeStyles4[size],
3791
+ sizeStyles3[size],
3834
3792
  (onClick || clickEvent) && "cursor-pointer",
3835
3793
  className
3836
3794
  ),
@@ -3862,18 +3820,18 @@ var init_FilterPill = __esm({
3862
3820
  FilterPill.displayName = "FilterPill";
3863
3821
  }
3864
3822
  });
3865
- var sizeStyles5, Spinner;
3823
+ var sizeStyles4, Spinner;
3866
3824
  var init_Spinner = __esm({
3867
3825
  "components/core/atoms/Spinner.tsx"() {
3868
3826
  init_cn();
3869
3827
  init_Icon();
3870
- sizeStyles5 = {
3828
+ sizeStyles4 = {
3871
3829
  xs: "h-3 w-3",
3872
3830
  sm: "h-icon-default w-icon-default",
3873
3831
  md: "h-6 w-6",
3874
3832
  lg: "h-8 w-8"
3875
3833
  };
3876
- Spinner = React89__default.forwardRef(
3834
+ Spinner = React87__default.forwardRef(
3877
3835
  ({ className, size = "md", ...props }, ref) => {
3878
3836
  return /* @__PURE__ */ jsx(
3879
3837
  "div",
@@ -3881,7 +3839,7 @@ var init_Spinner = __esm({
3881
3839
  ref,
3882
3840
  className: cn("text-foreground", className),
3883
3841
  ...props,
3884
- children: /* @__PURE__ */ jsx(Icon, { name: "loader", className: cn("animate-spin", sizeStyles5[size]) })
3842
+ children: /* @__PURE__ */ jsx(Icon, { name: "loader", className: cn("animate-spin", sizeStyles4[size]) })
3885
3843
  }
3886
3844
  );
3887
3845
  }
@@ -3952,8 +3910,8 @@ var init_Avatar = __esm({
3952
3910
  actionPayload
3953
3911
  }) => {
3954
3912
  const eventBus = useEventBus();
3955
- const [imgFailed, setImgFailed] = React89__default.useState(false);
3956
- React89__default.useEffect(() => {
3913
+ const [imgFailed, setImgFailed] = React87__default.useState(false);
3914
+ React87__default.useEffect(() => {
3957
3915
  setImgFailed(false);
3958
3916
  }, [src]);
3959
3917
  const initials = providedInitials ?? (name ? generateInitials(name) : void 0);
@@ -4338,7 +4296,7 @@ var init_Radio = __esm({
4338
4296
  md: "w-2.5 h-2.5",
4339
4297
  lg: "w-3 h-3"
4340
4298
  };
4341
- Radio = React89__default.forwardRef(
4299
+ Radio = React87__default.forwardRef(
4342
4300
  ({
4343
4301
  label,
4344
4302
  helperText,
@@ -4355,12 +4313,12 @@ var init_Radio = __esm({
4355
4313
  onChange,
4356
4314
  ...props
4357
4315
  }, ref) => {
4358
- const reactId = React89__default.useId();
4316
+ const reactId = React87__default.useId();
4359
4317
  const baseId = id || `radio-${reactId}`;
4360
4318
  const hasError = !!error;
4361
4319
  const eventBus = useEventBus();
4362
- const [selected, setSelected] = React89__default.useState(value);
4363
- React89__default.useEffect(() => {
4320
+ const [selected, setSelected] = React87__default.useState(value);
4321
+ React87__default.useEffect(() => {
4364
4322
  if (value !== void 0) setSelected(value);
4365
4323
  }, [value]);
4366
4324
  const pick = (next, e) => {
@@ -4542,7 +4500,7 @@ var init_Switch = __esm({
4542
4500
  "components/core/atoms/Switch.tsx"() {
4543
4501
  "use client";
4544
4502
  init_cn();
4545
- Switch = React89.forwardRef(
4503
+ Switch = React87.forwardRef(
4546
4504
  ({
4547
4505
  checked,
4548
4506
  defaultChecked = false,
@@ -4553,10 +4511,10 @@ var init_Switch = __esm({
4553
4511
  name,
4554
4512
  className
4555
4513
  }, ref) => {
4556
- const [isChecked, setIsChecked] = React89.useState(
4514
+ const [isChecked, setIsChecked] = React87.useState(
4557
4515
  checked !== void 0 ? checked : defaultChecked
4558
4516
  );
4559
- React89.useEffect(() => {
4517
+ React87.useEffect(() => {
4560
4518
  if (checked !== void 0) {
4561
4519
  setIsChecked(checked);
4562
4520
  }
@@ -4912,7 +4870,7 @@ var Aside;
4912
4870
  var init_Aside = __esm({
4913
4871
  "components/core/atoms/Aside.tsx"() {
4914
4872
  init_cn();
4915
- Aside = React89__default.forwardRef(
4873
+ Aside = React87__default.forwardRef(
4916
4874
  ({ className, children, ...rest }, ref) => /* @__PURE__ */ jsx("aside", { ref, className: cn(className), ...rest, children })
4917
4875
  );
4918
4876
  Aside.displayName = "Aside";
@@ -4990,8 +4948,8 @@ var init_LawReferenceTooltip = __esm({
4990
4948
  className
4991
4949
  }) => {
4992
4950
  const { t } = useTranslate();
4993
- const [isVisible, setIsVisible] = React89__default.useState(false);
4994
- const timeoutRef = React89__default.useRef(null);
4951
+ const [isVisible, setIsVisible] = React87__default.useState(false);
4952
+ const timeoutRef = React87__default.useRef(null);
4995
4953
  const handleMouseEnter = () => {
4996
4954
  if (timeoutRef.current) clearTimeout(timeoutRef.current);
4997
4955
  timeoutRef.current = setTimeout(() => setIsVisible(true), 200);
@@ -5000,7 +4958,7 @@ var init_LawReferenceTooltip = __esm({
5000
4958
  if (timeoutRef.current) clearTimeout(timeoutRef.current);
5001
4959
  setIsVisible(false);
5002
4960
  };
5003
- React89__default.useEffect(() => {
4961
+ React87__default.useEffect(() => {
5004
4962
  return () => {
5005
4963
  if (timeoutRef.current) clearTimeout(timeoutRef.current);
5006
4964
  };
@@ -5185,7 +5143,7 @@ var init_TimeSlotCell = __esm({
5185
5143
  TimeSlotCell.displayName = "TimeSlotCell";
5186
5144
  }
5187
5145
  });
5188
- var statusColors, pulseRingColors, sizeStyles6, StatusDot;
5146
+ var statusColors, pulseRingColors, sizeStyles5, StatusDot;
5189
5147
  var init_StatusDot = __esm({
5190
5148
  "components/core/atoms/StatusDot.tsx"() {
5191
5149
  init_cn();
@@ -5205,12 +5163,12 @@ var init_StatusDot = __esm({
5205
5163
  warning: "ring-warning",
5206
5164
  critical: "ring-error"
5207
5165
  };
5208
- sizeStyles6 = {
5166
+ sizeStyles5 = {
5209
5167
  sm: "w-2 h-2",
5210
5168
  md: "w-2.5 h-2.5",
5211
5169
  lg: "w-3 h-3"
5212
5170
  };
5213
- StatusDot = React89__default.forwardRef(
5171
+ StatusDot = React87__default.forwardRef(
5214
5172
  ({ className, status = "offline", pulse = false, size = "md", label, ...props }, ref) => {
5215
5173
  return /* @__PURE__ */ jsx(
5216
5174
  "span",
@@ -5219,7 +5177,7 @@ var init_StatusDot = __esm({
5219
5177
  className: cn(
5220
5178
  "inline-block rounded-full flex-shrink-0",
5221
5179
  statusColors[status],
5222
- sizeStyles6[size],
5180
+ sizeStyles5[size],
5223
5181
  pulse && [
5224
5182
  "animate-pulse",
5225
5183
  "ring-2 ring-offset-1",
@@ -5249,12 +5207,12 @@ function resolveColor(dir, invert) {
5249
5207
  const isGood = invert ? !isPositive : isPositive;
5250
5208
  return isGood ? "text-success" : "text-error";
5251
5209
  }
5252
- var sizeStyles7, iconNameMap, TrendIndicator;
5210
+ var sizeStyles6, iconNameMap, TrendIndicator;
5253
5211
  var init_TrendIndicator = __esm({
5254
5212
  "components/core/atoms/TrendIndicator.tsx"() {
5255
5213
  init_Icon();
5256
5214
  init_cn();
5257
- sizeStyles7 = {
5215
+ sizeStyles6 = {
5258
5216
  sm: { icon: "w-3 h-3", text: "text-xs" },
5259
5217
  md: { icon: "w-4 h-4", text: "text-sm" },
5260
5218
  lg: { icon: "w-5 h-5", text: "text-base" }
@@ -5264,7 +5222,7 @@ var init_TrendIndicator = __esm({
5264
5222
  down: "trending-down",
5265
5223
  flat: "arrow-right"
5266
5224
  };
5267
- TrendIndicator = React89__default.forwardRef(
5225
+ TrendIndicator = React87__default.forwardRef(
5268
5226
  ({
5269
5227
  className,
5270
5228
  value,
@@ -5278,7 +5236,7 @@ var init_TrendIndicator = __esm({
5278
5236
  const dir = resolveDirection(value, direction);
5279
5237
  const colorClass = resolveColor(dir, invert);
5280
5238
  const iconName = iconNameMap[dir];
5281
- const styles = sizeStyles7[size];
5239
+ const styles = sizeStyles6[size];
5282
5240
  const formattedValue = value !== void 0 ? `${value > 0 ? "+" : ""}${value}%` : void 0;
5283
5241
  const ariaLabel = label ?? (formattedValue ? `${dir} ${formattedValue}` : dir);
5284
5242
  return /* @__PURE__ */ jsxs(
@@ -5331,7 +5289,7 @@ var init_RangeSlider = __esm({
5331
5289
  md: "w-4 h-4",
5332
5290
  lg: "w-5 h-5"
5333
5291
  };
5334
- RangeSlider = React89__default.forwardRef(
5292
+ RangeSlider = React87__default.forwardRef(
5335
5293
  ({
5336
5294
  className,
5337
5295
  min = 0,
@@ -5839,7 +5797,7 @@ var init_ContentSection = __esm({
5839
5797
  md: "py-16",
5840
5798
  lg: "py-24"
5841
5799
  };
5842
- ContentSection = React89__default.forwardRef(
5800
+ ContentSection = React87__default.forwardRef(
5843
5801
  ({ children, background = "default", padding = "lg", id, className }, ref) => {
5844
5802
  return /* @__PURE__ */ jsx(
5845
5803
  Box,
@@ -6373,7 +6331,7 @@ var init_AnimatedReveal = __esm({
6373
6331
  "scale-up": { opacity: 1, transform: "scale(1) translateY(0)" },
6374
6332
  "none": {}
6375
6333
  };
6376
- AnimatedReveal = React89__default.forwardRef(
6334
+ AnimatedReveal = React87__default.forwardRef(
6377
6335
  ({
6378
6336
  trigger = "scroll",
6379
6337
  animation = "fade-up",
@@ -6533,7 +6491,7 @@ var init_AnimatedGraphic = __esm({
6533
6491
  "components/marketing/atoms/AnimatedGraphic.tsx"() {
6534
6492
  "use client";
6535
6493
  init_cn();
6536
- AnimatedGraphic = React89__default.forwardRef(
6494
+ AnimatedGraphic = React87__default.forwardRef(
6537
6495
  ({
6538
6496
  src,
6539
6497
  svgContent,
@@ -6556,7 +6514,7 @@ var init_AnimatedGraphic = __esm({
6556
6514
  const fetchedSvg = useFetchedSvg(svgContent ? void 0 : src);
6557
6515
  const resolvedSvg = svgContent ?? fetchedSvg;
6558
6516
  const prevAnimateRef = useRef(animate);
6559
- const setRef = React89__default.useCallback(
6517
+ const setRef = React87__default.useCallback(
6560
6518
  (node) => {
6561
6519
  containerRef.current = node;
6562
6520
  if (typeof ref === "function") ref(node);
@@ -6781,9 +6739,9 @@ function ScoreDisplay({
6781
6739
  ...rest
6782
6740
  }) {
6783
6741
  const resolvedValue = typeof value === "number" && !Number.isNaN(value) ? value : typeof rest.score === "number" && !Number.isNaN(rest.score) ? rest.score : 0;
6784
- const [displayValue, setDisplayValue] = React89.useState(resolvedValue);
6785
- const [isAnimating, setIsAnimating] = React89.useState(false);
6786
- React89.useEffect(() => {
6742
+ const [displayValue, setDisplayValue] = React87.useState(resolvedValue);
6743
+ const [isAnimating, setIsAnimating] = React87.useState(false);
6744
+ React87.useEffect(() => {
6787
6745
  if (!animated || displayValue === resolvedValue) {
6788
6746
  setDisplayValue(resolvedValue);
6789
6747
  return;
@@ -6853,9 +6811,9 @@ function ControlButton({
6853
6811
  className
6854
6812
  }) {
6855
6813
  const eventBus = useEventBus();
6856
- const [isPressed, setIsPressed] = React89.useState(false);
6814
+ const [isPressed, setIsPressed] = React87.useState(false);
6857
6815
  const actualPressed = pressed ?? isPressed;
6858
- const handlePointerDown = React89.useCallback(
6816
+ const handlePointerDown = React87.useCallback(
6859
6817
  (e) => {
6860
6818
  e.preventDefault();
6861
6819
  if (disabled) return;
@@ -6865,7 +6823,7 @@ function ControlButton({
6865
6823
  },
6866
6824
  [disabled, pressEvent, eventBus, onPress]
6867
6825
  );
6868
- const handlePointerUp = React89.useCallback(
6826
+ const handlePointerUp = React87.useCallback(
6869
6827
  (e) => {
6870
6828
  e.preventDefault();
6871
6829
  if (disabled) return;
@@ -6875,7 +6833,7 @@ function ControlButton({
6875
6833
  },
6876
6834
  [disabled, releaseEvent, eventBus, onRelease]
6877
6835
  );
6878
- const handlePointerLeave = React89.useCallback(
6836
+ const handlePointerLeave = React87.useCallback(
6879
6837
  (e) => {
6880
6838
  if (isPressed) {
6881
6839
  setIsPressed(false);
@@ -6943,7 +6901,7 @@ var init_ControlButton = __esm({
6943
6901
  }
6944
6902
  });
6945
6903
  function Sprite({
6946
- spritesheet,
6904
+ spritesheet = "https://almadar-kflow-assets.web.app/shared/isometric-blocks/Spritesheet/allTiles_sheet.png",
6947
6905
  frameWidth,
6948
6906
  frameHeight,
6949
6907
  frame,
@@ -7364,8 +7322,8 @@ function XPBar({
7364
7322
  }) {
7365
7323
  const sizes = sizeMap9[size];
7366
7324
  const percentage = max > 0 ? Math.max(0, Math.min(100, current / max * 100)) : 0;
7367
- const [fillWidth, setFillWidth] = React89.useState(animated ? 0 : percentage);
7368
- React89.useEffect(() => {
7325
+ const [fillWidth, setFillWidth] = React87.useState(animated ? 0 : percentage);
7326
+ React87.useEffect(() => {
7369
7327
  if (!animated) {
7370
7328
  setFillWidth(percentage);
7371
7329
  return;
@@ -7623,7 +7581,7 @@ var init_DamageNumber = __esm({
7623
7581
  function DialogueBubble({
7624
7582
  speaker,
7625
7583
  text,
7626
- portrait,
7584
+ portrait = "https://almadar-kflow-assets.web.app/shared/characters/archetypes/00_base_model.png",
7627
7585
  position = "bottom",
7628
7586
  className
7629
7587
  }) {
@@ -7791,9 +7749,9 @@ function MiniMap({
7791
7749
  viewportRect,
7792
7750
  className
7793
7751
  }) {
7794
- const canvasRef = React89.useRef(null);
7795
- const frameRef = React89.useRef(0);
7796
- React89.useEffect(() => {
7752
+ const canvasRef = React87.useRef(null);
7753
+ const frameRef = React87.useRef(0);
7754
+ React87.useEffect(() => {
7797
7755
  const canvas = canvasRef.current;
7798
7756
  if (!canvas) return;
7799
7757
  const ctx = canvas.getContext("2d");
@@ -7967,7 +7925,7 @@ var init_ErrorBoundary = __esm({
7967
7925
  }
7968
7926
  );
7969
7927
  };
7970
- ErrorBoundary = class extends React89__default.Component {
7928
+ ErrorBoundary = class extends React87__default.Component {
7971
7929
  constructor(props) {
7972
7930
  super(props);
7973
7931
  __publicField(this, "reset", () => {
@@ -8598,11 +8556,11 @@ var init_wrapCallbackForEvent = __esm({
8598
8556
  "runtime/wrapCallbackForEvent.ts"() {
8599
8557
  }
8600
8558
  });
8601
- var sizeStyles8, paddingStyles3, Container;
8559
+ var sizeStyles7, paddingStyles3, Container;
8602
8560
  var init_Container = __esm({
8603
8561
  "components/core/molecules/Container.tsx"() {
8604
8562
  init_cn();
8605
- sizeStyles8 = {
8563
+ sizeStyles7 = {
8606
8564
  xs: "max-w-xs",
8607
8565
  // 320px
8608
8566
  sm: "max-w-screen-sm",
@@ -8640,7 +8598,7 @@ var init_Container = __esm({
8640
8598
  {
8641
8599
  className: cn(
8642
8600
  "w-full",
8643
- sizeStyles8[resolvedSize],
8601
+ sizeStyles7[resolvedSize],
8644
8602
  paddingStyles3[padding],
8645
8603
  center && "mx-auto",
8646
8604
  className
@@ -9413,8 +9371,8 @@ var init_Tooltip = __esm({
9413
9371
  if (hideTimeoutRef.current) clearTimeout(hideTimeoutRef.current);
9414
9372
  };
9415
9373
  }, []);
9416
- const triggerElement = React89__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
9417
- const trigger = React89__default.cloneElement(triggerElement, {
9374
+ const triggerElement = React87__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
9375
+ const trigger = React87__default.cloneElement(triggerElement, {
9418
9376
  ref: triggerRef,
9419
9377
  onMouseEnter: handleMouseEnter,
9420
9378
  onMouseLeave: handleMouseLeave,
@@ -9561,8 +9519,8 @@ var init_Popover = __esm({
9561
9519
  onMouseEnter: handleOpen,
9562
9520
  onMouseLeave: handleClose
9563
9521
  };
9564
- const childElement = React89__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
9565
- const triggerElement = React89__default.cloneElement(
9522
+ const childElement = React87__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
9523
+ const triggerElement = React87__default.cloneElement(
9566
9524
  childElement,
9567
9525
  {
9568
9526
  ref: triggerRef,
@@ -9688,8 +9646,8 @@ var init_Menu = __esm({
9688
9646
  };
9689
9647
  const effectivePosition = direction === "rtl" ? rtlMirror[position] ?? position : position;
9690
9648
  const subMenuSideClass = direction === "rtl" ? "right-full mr-2" : "left-full ml-2";
9691
- const triggerChild = React89__default.isValidElement(trigger) ? trigger : /* @__PURE__ */ jsx(Typography, { variant: "small", as: "span", children: trigger });
9692
- const triggerElement = React89__default.cloneElement(
9649
+ const triggerChild = React87__default.isValidElement(trigger) ? trigger : /* @__PURE__ */ jsx(Typography, { variant: "small", as: "span", children: trigger });
9650
+ const triggerElement = React87__default.cloneElement(
9693
9651
  triggerChild,
9694
9652
  {
9695
9653
  ref: triggerRef,
@@ -10096,12 +10054,12 @@ var init_MapView = __esm({
10096
10054
  shadowSize: [41, 41]
10097
10055
  });
10098
10056
  L.Marker.prototype.options.icon = defaultIcon;
10099
- const { useEffect: useEffect71, useRef: useRef67, useCallback: useCallback116, useState: useState102 } = React89__default;
10057
+ const { useEffect: useEffect71, useRef: useRef66, useCallback: useCallback114, useState: useState101 } = React87__default;
10100
10058
  const { Typography: Typography2 } = await Promise.resolve().then(() => (init_Typography(), Typography_exports));
10101
10059
  const { useEventBus: useEventBus2 } = await Promise.resolve().then(() => (init_useEventBus(), useEventBus_exports));
10102
10060
  function MapUpdater({ centerLat, centerLng, zoom }) {
10103
10061
  const map = useMap();
10104
- const prevRef = useRef67({ centerLat, centerLng, zoom });
10062
+ const prevRef = useRef66({ centerLat, centerLng, zoom });
10105
10063
  useEffect71(() => {
10106
10064
  const prev = prevRef.current;
10107
10065
  if (prev.centerLat !== centerLat || prev.centerLng !== centerLng || prev.zoom !== zoom) {
@@ -10141,8 +10099,8 @@ var init_MapView = __esm({
10141
10099
  showAttribution = true
10142
10100
  }) {
10143
10101
  const eventBus = useEventBus2();
10144
- const [clickedPosition, setClickedPosition] = useState102(null);
10145
- const handleMapClick = useCallback116((lat, lng) => {
10102
+ const [clickedPosition, setClickedPosition] = useState101(null);
10103
+ const handleMapClick = useCallback114((lat, lng) => {
10146
10104
  if (showClickedPin) {
10147
10105
  setClickedPosition({ lat, lng });
10148
10106
  }
@@ -10151,7 +10109,7 @@ var init_MapView = __esm({
10151
10109
  eventBus.emit(`UI:${mapClickEvent}`, { latitude: lat, longitude: lng });
10152
10110
  }
10153
10111
  }, [onMapClick, mapClickEvent, eventBus, showClickedPin]);
10154
- const handleMarkerClick = useCallback116((marker) => {
10112
+ const handleMarkerClick = useCallback114((marker) => {
10155
10113
  onMarkerClick?.(marker);
10156
10114
  if (markerClickEvent) {
10157
10115
  eventBus.emit(`UI:${markerClickEvent}`, { ...marker });
@@ -10342,7 +10300,7 @@ function InputPattern({
10342
10300
  fieldName
10343
10301
  }) {
10344
10302
  const { emit } = useEventBus();
10345
- const [localValue, setLocalValue] = React89__default.useState(value);
10303
+ const [localValue, setLocalValue] = React87__default.useState(value);
10346
10304
  const handleChange = (e) => {
10347
10305
  setLocalValue(e.target.value);
10348
10306
  if (onChange) {
@@ -10380,7 +10338,7 @@ function TextareaPattern({
10380
10338
  fieldName
10381
10339
  }) {
10382
10340
  const { emit } = useEventBus();
10383
- const [localValue, setLocalValue] = React89__default.useState(value);
10341
+ const [localValue, setLocalValue] = React87__default.useState(value);
10384
10342
  const handleChange = (e) => {
10385
10343
  setLocalValue(e.target.value);
10386
10344
  if (onChange) {
@@ -10412,7 +10370,7 @@ function SelectPattern({
10412
10370
  fieldName
10413
10371
  }) {
10414
10372
  const { emit } = useEventBus();
10415
- const [localValue, setLocalValue] = React89__default.useState(value);
10373
+ const [localValue, setLocalValue] = React87__default.useState(value);
10416
10374
  const handleChange = (e) => {
10417
10375
  setLocalValue(e.target.value);
10418
10376
  if (onChange) {
@@ -10441,7 +10399,7 @@ function CheckboxPattern({
10441
10399
  className
10442
10400
  }) {
10443
10401
  const { emit } = useEventBus();
10444
- const [localChecked, setLocalChecked] = React89__default.useState(checked);
10402
+ const [localChecked, setLocalChecked] = React87__default.useState(checked);
10445
10403
  const handleChange = (e) => {
10446
10404
  setLocalChecked(e.target.checked);
10447
10405
  if (onChange) {
@@ -10629,6 +10587,7 @@ var init_ComponentPatterns = __esm({
10629
10587
  init_ProgressBar();
10630
10588
  init_Card();
10631
10589
  init_Typography();
10590
+ init_cn();
10632
10591
  init_Alert();
10633
10592
  init_Tooltip();
10634
10593
  init_Popover();
@@ -10672,8 +10631,8 @@ function ActionButtons({
10672
10631
  disabled
10673
10632
  }) {
10674
10633
  const eventBus = useEventBus();
10675
- const [activeButtons, setActiveButtons] = React89.useState(/* @__PURE__ */ new Set());
10676
- const handlePress = React89.useCallback(
10634
+ const [activeButtons, setActiveButtons] = React87.useState(/* @__PURE__ */ new Set());
10635
+ const handlePress = React87.useCallback(
10677
10636
  (id) => {
10678
10637
  setActiveButtons((prev) => new Set(prev).add(id));
10679
10638
  if (actionEvent) eventBus.emit(`UI:${actionEvent}`, { id, pressed: true });
@@ -10681,7 +10640,7 @@ function ActionButtons({
10681
10640
  },
10682
10641
  [actionEvent, eventBus, onAction]
10683
10642
  );
10684
- const handleRelease = React89.useCallback(
10643
+ const handleRelease = React87.useCallback(
10685
10644
  (id) => {
10686
10645
  setActiveButtons((prev) => {
10687
10646
  const next = new Set(prev);
@@ -10962,259 +10921,6 @@ var init_AnimatedCounter = __esm({
10962
10921
  AnimatedCounter.displayName = "AnimatedCounter";
10963
10922
  }
10964
10923
  });
10965
- var ALL_CATEGORY, GridPicker;
10966
- var init_GridPicker = __esm({
10967
- "components/core/molecules/GridPicker.tsx"() {
10968
- "use client";
10969
- init_cn();
10970
- init_Input();
10971
- init_Badge();
10972
- init_Stack();
10973
- ALL_CATEGORY = "__all__";
10974
- GridPicker = ({
10975
- items,
10976
- value,
10977
- onChange,
10978
- categories,
10979
- searchPlaceholder,
10980
- renderThumbnail,
10981
- cellSize = 32,
10982
- className
10983
- }) => {
10984
- const [search, setSearch] = useState("");
10985
- const [activeCategory, setActiveCategory] = useState(ALL_CATEGORY);
10986
- const gridRef = useRef(null);
10987
- const categoryChips = useMemo(() => {
10988
- if (categories !== void 0) return categories;
10989
- const seen = [];
10990
- for (const item of items) {
10991
- if (!seen.includes(item.category)) seen.push(item.category);
10992
- }
10993
- return seen;
10994
- }, [categories, items]);
10995
- const filtered = useMemo(() => {
10996
- const needle = search.trim().toLowerCase();
10997
- return items.filter((item) => {
10998
- const matchesCategory = activeCategory === ALL_CATEGORY || item.category === activeCategory;
10999
- const matchesSearch = needle === "" || item.label.toLowerCase().includes(needle);
11000
- return matchesCategory && matchesSearch;
11001
- });
11002
- }, [items, search, activeCategory]);
11003
- const select = useCallback(
11004
- (item) => {
11005
- onChange(item.id);
11006
- },
11007
- [onChange]
11008
- );
11009
- const handleKeyDown = useCallback(
11010
- (e, index) => {
11011
- const cells = gridRef.current?.querySelectorAll(
11012
- "[data-gridpicker-cell]"
11013
- );
11014
- if (cells === void 0 || cells.length === 0) return;
11015
- const columns = (() => {
11016
- const grid = gridRef.current;
11017
- if (grid === null) return 1;
11018
- const style = window.getComputedStyle(grid);
11019
- const cols = style.gridTemplateColumns.split(" ").filter(Boolean).length;
11020
- return cols > 0 ? cols : 1;
11021
- })();
11022
- let next = -1;
11023
- if (e.key === "ArrowRight") next = index + 1;
11024
- else if (e.key === "ArrowLeft") next = index - 1;
11025
- else if (e.key === "ArrowDown") next = index + columns;
11026
- else if (e.key === "ArrowUp") next = index - columns;
11027
- else if (e.key === "Enter" || e.key === " ") {
11028
- e.preventDefault();
11029
- select(filtered[index]);
11030
- return;
11031
- } else {
11032
- return;
11033
- }
11034
- e.preventDefault();
11035
- if (next >= 0 && next < cells.length) {
11036
- cells[next].focus();
11037
- }
11038
- },
11039
- [filtered, select]
11040
- );
11041
- return /* @__PURE__ */ jsxs(VStack, { gap: "sm", className: cn("w-full", className), children: [
11042
- /* @__PURE__ */ jsx(
11043
- Input,
11044
- {
11045
- type: "search",
11046
- icon: "search",
11047
- value: search,
11048
- placeholder: searchPlaceholder,
11049
- clearable: true,
11050
- onClear: () => setSearch(""),
11051
- onChange: (e) => setSearch(e.target.value)
11052
- }
11053
- ),
11054
- categoryChips.length > 0 && /* @__PURE__ */ jsxs(HStack, { gap: "xs", wrap: true, children: [
11055
- /* @__PURE__ */ jsx(
11056
- Badge,
11057
- {
11058
- variant: activeCategory === ALL_CATEGORY ? "primary" : "neutral",
11059
- size: "sm",
11060
- role: "button",
11061
- tabIndex: 0,
11062
- "aria-pressed": activeCategory === ALL_CATEGORY,
11063
- className: "cursor-pointer",
11064
- onClick: () => setActiveCategory(ALL_CATEGORY),
11065
- onKeyDown: (e) => {
11066
- if (e.key === "Enter" || e.key === " ") {
11067
- e.preventDefault();
11068
- setActiveCategory(ALL_CATEGORY);
11069
- }
11070
- },
11071
- children: "All"
11072
- }
11073
- ),
11074
- categoryChips.map((category) => /* @__PURE__ */ jsx(
11075
- Badge,
11076
- {
11077
- variant: activeCategory === category ? "primary" : "neutral",
11078
- size: "sm",
11079
- role: "button",
11080
- tabIndex: 0,
11081
- "aria-pressed": activeCategory === category,
11082
- className: "cursor-pointer",
11083
- onClick: () => setActiveCategory(category),
11084
- onKeyDown: (e) => {
11085
- if (e.key === "Enter" || e.key === " ") {
11086
- e.preventDefault();
11087
- setActiveCategory(category);
11088
- }
11089
- },
11090
- children: category
11091
- },
11092
- category
11093
- ))
11094
- ] }),
11095
- /* @__PURE__ */ jsx(
11096
- "div",
11097
- {
11098
- ref: gridRef,
11099
- role: "listbox",
11100
- className: "grid gap-1 overflow-y-auto max-h-64 p-1",
11101
- style: {
11102
- gridTemplateColumns: `repeat(auto-fill, minmax(${cellSize}px, 1fr))`
11103
- },
11104
- children: filtered.map((item, index) => {
11105
- const selected = item.id === value;
11106
- return /* @__PURE__ */ jsx(
11107
- "button",
11108
- {
11109
- type: "button",
11110
- role: "option",
11111
- "aria-selected": selected,
11112
- "aria-label": item.label,
11113
- title: item.label,
11114
- "data-gridpicker-cell": true,
11115
- tabIndex: selected || value === void 0 && index === 0 ? 0 : -1,
11116
- onClick: () => select(item),
11117
- onKeyDown: (e) => handleKeyDown(e, index),
11118
- className: cn(
11119
- "flex items-center justify-center rounded-sm",
11120
- "transition-colors hover:bg-muted",
11121
- "focus:outline-none focus:ring-1 focus:ring-ring",
11122
- selected && "bg-primary/10 ring-1 ring-primary"
11123
- ),
11124
- style: { width: cellSize, height: cellSize },
11125
- children: renderThumbnail(item)
11126
- },
11127
- item.id
11128
- );
11129
- })
11130
- }
11131
- )
11132
- ] });
11133
- };
11134
- GridPicker.displayName = "GridPicker";
11135
- }
11136
- });
11137
- function iconForKind(kind) {
11138
- if (kind === "audio") return "music";
11139
- if (kind === "model") return "box";
11140
- return "file";
11141
- }
11142
- var THUMB_PX, IMAGE_KINDS, AssetPicker;
11143
- var init_AssetPicker = __esm({
11144
- "components/core/molecules/AssetPicker.tsx"() {
11145
- "use client";
11146
- init_GridPicker();
11147
- init_Icon();
11148
- THUMB_PX = 32;
11149
- IMAGE_KINDS = /* @__PURE__ */ new Set([
11150
- "image",
11151
- "spritesheet",
11152
- "scene",
11153
- "portrait"
11154
- ]);
11155
- AssetPicker = ({
11156
- assets,
11157
- value,
11158
- onChange,
11159
- className
11160
- }) => {
11161
- const byUrl = useMemo(() => {
11162
- const map = /* @__PURE__ */ new Map();
11163
- for (const entry of assets) map.set(entry.url, entry);
11164
- return map;
11165
- }, [assets]);
11166
- const items = useMemo(
11167
- () => assets.map((entry) => ({
11168
- id: entry.url,
11169
- label: entry.name,
11170
- category: entry.category
11171
- })),
11172
- [assets]
11173
- );
11174
- const categories = useMemo(() => {
11175
- const seen = [];
11176
- for (const entry of assets) {
11177
- if (!seen.includes(entry.category)) seen.push(entry.category);
11178
- }
11179
- return seen;
11180
- }, [assets]);
11181
- const renderThumbnail = useCallback(
11182
- (item) => {
11183
- const entry = byUrl.get(item.id);
11184
- if (entry === void 0) return null;
11185
- if (IMAGE_KINDS.has(entry.kind)) {
11186
- return /* @__PURE__ */ jsx(
11187
- "img",
11188
- {
11189
- src: entry.thumbnailUrl ?? entry.url,
11190
- alt: entry.name,
11191
- loading: "lazy",
11192
- width: THUMB_PX,
11193
- height: THUMB_PX,
11194
- style: { width: THUMB_PX, height: THUMB_PX, objectFit: "cover" }
11195
- }
11196
- );
11197
- }
11198
- return /* @__PURE__ */ jsx(Icon, { name: iconForKind(entry.kind), size: "sm" });
11199
- },
11200
- [byUrl]
11201
- );
11202
- return /* @__PURE__ */ jsx(
11203
- GridPicker,
11204
- {
11205
- items,
11206
- value,
11207
- onChange,
11208
- categories,
11209
- renderThumbnail,
11210
- cellSize: THUMB_PX,
11211
- className
11212
- }
11213
- );
11214
- };
11215
- AssetPicker.displayName = "AssetPicker";
11216
- }
11217
- });
11218
10924
  var AuthLayout;
11219
10925
  var init_AuthLayout = __esm({
11220
10926
  "components/marketing/templates/AuthLayout.tsx"() {
@@ -14063,7 +13769,7 @@ var init_CodeBlock = __esm({
14063
13769
  CODE_LANGUAGE_SET = new Set(CODE_LANGUAGES);
14064
13770
  LINE_PROPS_FN = (n) => ({ "data-line": String(n - 1) });
14065
13771
  HIDDEN_LINE_NUMBERS = { display: "none" };
14066
- CodeBlock = React89__default.memo(
13772
+ CodeBlock = React87__default.memo(
14067
13773
  ({
14068
13774
  code: rawCode,
14069
13775
  language = "text",
@@ -14500,7 +14206,7 @@ var init_MarkdownContent = __esm({
14500
14206
  init_Box();
14501
14207
  init_CodeBlock();
14502
14208
  init_cn();
14503
- MarkdownContent = React89__default.memo(
14209
+ MarkdownContent = React87__default.memo(
14504
14210
  ({ content, direction, className }) => {
14505
14211
  const { t: _t } = useTranslate();
14506
14212
  const safeContent = typeof content === "string" ? content : String(content ?? "");
@@ -15596,7 +15302,7 @@ var init_StateMachineView = __esm({
15596
15302
  style: { top: title ? 30 : 0 },
15597
15303
  children: [
15598
15304
  entity && /* @__PURE__ */ jsx(EntityBox, { entity, config }),
15599
- states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(React89__default.Fragment, { children: renderStateNode(state, config) }, state.id) : /* @__PURE__ */ jsx(
15305
+ states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(React87__default.Fragment, { children: renderStateNode(state, config) }, state.id) : /* @__PURE__ */ jsx(
15600
15306
  StateNode,
15601
15307
  {
15602
15308
  state,
@@ -17201,7 +16907,7 @@ var init_Grid = __esm({
17201
16907
  as: Component = "div"
17202
16908
  }) => {
17203
16909
  const mergedStyle = rows2 ? { gridTemplateRows: `repeat(${rows2}, minmax(0, 1fr))`, ...style } : style;
17204
- return React89__default.createElement(
16910
+ return React87__default.createElement(
17205
16911
  Component,
17206
16912
  {
17207
16913
  className: cn(
@@ -22351,7 +22057,7 @@ function CounterMinimal({
22351
22057
  Button,
22352
22058
  {
22353
22059
  variant: "secondary",
22354
- size: sizeStyles9[size].button,
22060
+ size: sizeStyles8[size].button,
22355
22061
  onClick: onDecrement,
22356
22062
  disabled: resolved.decrementDisabled,
22357
22063
  icon: "minus",
@@ -22363,7 +22069,7 @@ function CounterMinimal({
22363
22069
  {
22364
22070
  variant: "h1",
22365
22071
  className: cn(
22366
- sizeStyles9[size].display,
22072
+ sizeStyles8[size].display,
22367
22073
  "font-bold tabular-nums min-w-[3ch] text-center"
22368
22074
  ),
22369
22075
  children: resolved.count
@@ -22373,7 +22079,7 @@ function CounterMinimal({
22373
22079
  Button,
22374
22080
  {
22375
22081
  variant: "secondary",
22376
- size: sizeStyles9[size].button,
22082
+ size: sizeStyles8[size].button,
22377
22083
  onClick: onIncrement,
22378
22084
  disabled: resolved.incrementDisabled,
22379
22085
  icon: "plus",
@@ -22408,7 +22114,7 @@ function CounterStandard({
22408
22114
  {
22409
22115
  variant: "h1",
22410
22116
  className: cn(
22411
- sizeStyles9[size].display,
22117
+ sizeStyles8[size].display,
22412
22118
  "font-bold tabular-nums text-primary-600"
22413
22119
  ),
22414
22120
  children: resolved.count
@@ -22419,7 +22125,7 @@ function CounterStandard({
22419
22125
  Button,
22420
22126
  {
22421
22127
  variant: "secondary",
22422
- size: sizeStyles9[size].button,
22128
+ size: sizeStyles8[size].button,
22423
22129
  onClick: onDecrement,
22424
22130
  disabled: resolved.decrementDisabled,
22425
22131
  icon: "minus"
@@ -22429,7 +22135,7 @@ function CounterStandard({
22429
22135
  Button,
22430
22136
  {
22431
22137
  variant: "primary",
22432
- size: sizeStyles9[size].button,
22138
+ size: sizeStyles8[size].button,
22433
22139
  onClick: onIncrement,
22434
22140
  disabled: resolved.incrementDisabled,
22435
22141
  icon: "plus"
@@ -22475,7 +22181,7 @@ function CounterFull({
22475
22181
  {
22476
22182
  variant: "h1",
22477
22183
  className: cn(
22478
- sizeStyles9[size].display,
22184
+ sizeStyles8[size].display,
22479
22185
  "font-bold tabular-nums text-primary-600"
22480
22186
  ),
22481
22187
  children: resolved.count
@@ -22488,7 +22194,7 @@ function CounterFull({
22488
22194
  Button,
22489
22195
  {
22490
22196
  variant: "secondary",
22491
- size: sizeStyles9[size].button,
22197
+ size: sizeStyles8[size].button,
22492
22198
  onClick: onDecrement,
22493
22199
  disabled: resolved.decrementDisabled,
22494
22200
  icon: "minus",
@@ -22499,7 +22205,7 @@ function CounterFull({
22499
22205
  Button,
22500
22206
  {
22501
22207
  variant: "primary",
22502
- size: sizeStyles9[size].button,
22208
+ size: sizeStyles8[size].button,
22503
22209
  onClick: onIncrement,
22504
22210
  disabled: resolved.incrementDisabled,
22505
22211
  icon: "plus",
@@ -22519,7 +22225,7 @@ function CounterFull({
22519
22225
  )
22520
22226
  ] }) });
22521
22227
  }
22522
- var sizeStyles9, CounterTemplate;
22228
+ var sizeStyles8, CounterTemplate;
22523
22229
  var init_CounterTemplate = __esm({
22524
22230
  "components/core/templates/CounterTemplate.tsx"() {
22525
22231
  init_cn();
@@ -22527,7 +22233,7 @@ var init_CounterTemplate = __esm({
22527
22233
  init_Stack();
22528
22234
  init_Typography();
22529
22235
  init_Button();
22530
- sizeStyles9 = {
22236
+ sizeStyles8 = {
22531
22237
  sm: { display: "text-4xl", button: "sm" },
22532
22238
  md: { display: "text-6xl", button: "md" },
22533
22239
  lg: { display: "text-8xl", button: "lg" }
@@ -22561,7 +22267,7 @@ function CraftingRecipe({
22561
22267
  className
22562
22268
  }) {
22563
22269
  const eventBus = useEventBus();
22564
- const handleCraft = React89.useCallback(() => {
22270
+ const handleCraft = React87.useCallback(() => {
22565
22271
  onCraft?.();
22566
22272
  if (craftEvent) {
22567
22273
  eventBus.emit(craftEvent, { output: output.label });
@@ -22578,7 +22284,7 @@ function CraftingRecipe({
22578
22284
  children: [
22579
22285
  /* @__PURE__ */ jsx(HStack, { gap: "xs", className: "flex-wrap items-center", children: inputs.map((ingredient, index) => {
22580
22286
  const hasSufficient = ingredient.available >= ingredient.required;
22581
- return /* @__PURE__ */ jsxs(React89.Fragment, { children: [
22287
+ return /* @__PURE__ */ jsxs(React87.Fragment, { children: [
22582
22288
  /* @__PURE__ */ jsx(Box, { className: "relative", children: /* @__PURE__ */ jsx(
22583
22289
  ItemSlot,
22584
22290
  {
@@ -22641,8 +22347,8 @@ function DPad({
22641
22347
  }) {
22642
22348
  const eventBus = useEventBus();
22643
22349
  const sizes = sizeMap15[size];
22644
- const [activeDirections, setActiveDirections] = React89.useState(/* @__PURE__ */ new Set());
22645
- const handlePress = React89.useCallback(
22350
+ const [activeDirections, setActiveDirections] = React87.useState(/* @__PURE__ */ new Set());
22351
+ const handlePress = React87.useCallback(
22646
22352
  (direction) => {
22647
22353
  setActiveDirections((prev) => new Set(prev).add(direction));
22648
22354
  if (directionEvent) eventBus.emit(`UI:${directionEvent}`, { direction, pressed: true });
@@ -22650,7 +22356,7 @@ function DPad({
22650
22356
  },
22651
22357
  [directionEvent, eventBus, onDirection]
22652
22358
  );
22653
- const handleRelease = React89.useCallback(
22359
+ const handleRelease = React87.useCallback(
22654
22360
  (direction) => {
22655
22361
  setActiveDirections((prev) => {
22656
22362
  const next = new Set(prev);
@@ -23336,14 +23042,14 @@ function useDataDnd(args) {
23336
23042
  const isZone = Boolean(dragGroup || accepts || sortable);
23337
23043
  const enabled = isZone || Boolean(dndRoot);
23338
23044
  const eventBus = useEventBus();
23339
- const parentRoot = React89__default.useContext(RootCtx);
23045
+ const parentRoot = React87__default.useContext(RootCtx);
23340
23046
  const isRoot = enabled && parentRoot === null;
23341
- const zoneId = React89__default.useId();
23047
+ const zoneId = React87__default.useId();
23342
23048
  const ownGroup = dragGroup ?? accepts ?? zoneId;
23343
- const [optimisticOrders, setOptimisticOrders] = React89__default.useState(() => /* @__PURE__ */ new Map());
23344
- const optimisticOrdersRef = React89__default.useRef(optimisticOrders);
23049
+ const [optimisticOrders, setOptimisticOrders] = React87__default.useState(() => /* @__PURE__ */ new Map());
23050
+ const optimisticOrdersRef = React87__default.useRef(optimisticOrders);
23345
23051
  optimisticOrdersRef.current = optimisticOrders;
23346
- const clearOptimisticOrder = React89__default.useCallback((group) => {
23052
+ const clearOptimisticOrder = React87__default.useCallback((group) => {
23347
23053
  setOptimisticOrders((prev) => {
23348
23054
  if (!prev.has(group)) return prev;
23349
23055
  const next = new Map(prev);
@@ -23368,7 +23074,7 @@ function useDataDnd(args) {
23368
23074
  const raw = it[dndItemIdField];
23369
23075
  return String(raw ?? `__idx_${idx}`);
23370
23076
  }).join("|");
23371
- const itemIds = React89__default.useMemo(
23077
+ const itemIds = React87__default.useMemo(
23372
23078
  () => orderedItems.map((it, idx) => {
23373
23079
  const raw = it[dndItemIdField];
23374
23080
  return raw ?? `__idx_${idx}`;
@@ -23376,7 +23082,7 @@ function useDataDnd(args) {
23376
23082
  [itemIdsSignature]
23377
23083
  );
23378
23084
  const itemsContentSig = items.map((it, idx) => String(it[dndItemIdField] ?? `__${idx}`)).join("|");
23379
- React89__default.useEffect(() => {
23085
+ React87__default.useEffect(() => {
23380
23086
  const root = isRoot ? null : parentRoot;
23381
23087
  if (root) {
23382
23088
  root.clearOptimisticOrder(ownGroup);
@@ -23384,20 +23090,20 @@ function useDataDnd(args) {
23384
23090
  clearOptimisticOrder(ownGroup);
23385
23091
  }
23386
23092
  }, [itemsContentSig, ownGroup]);
23387
- const zonesRef = React89__default.useRef(/* @__PURE__ */ new Map());
23388
- const registerZone = React89__default.useCallback((zoneId2, meta2) => {
23093
+ const zonesRef = React87__default.useRef(/* @__PURE__ */ new Map());
23094
+ const registerZone = React87__default.useCallback((zoneId2, meta2) => {
23389
23095
  zonesRef.current.set(zoneId2, meta2);
23390
23096
  }, []);
23391
- const unregisterZone = React89__default.useCallback((zoneId2) => {
23097
+ const unregisterZone = React87__default.useCallback((zoneId2) => {
23392
23098
  zonesRef.current.delete(zoneId2);
23393
23099
  }, []);
23394
- const [activeDrag, setActiveDrag] = React89__default.useState(null);
23395
- const [overZoneGroup, setOverZoneGroup] = React89__default.useState(null);
23396
- const meta = React89__default.useMemo(
23100
+ const [activeDrag, setActiveDrag] = React87__default.useState(null);
23101
+ const [overZoneGroup, setOverZoneGroup] = React87__default.useState(null);
23102
+ const meta = React87__default.useMemo(
23397
23103
  () => ({ group: ownGroup, dropEvent, reorderEvent, positionEvent, itemIds, rawItems: items, idField: dndItemIdField }),
23398
23104
  [ownGroup, dropEvent, reorderEvent, positionEvent, itemIds, items, dndItemIdField]
23399
23105
  );
23400
- React89__default.useEffect(() => {
23106
+ React87__default.useEffect(() => {
23401
23107
  const target = isRoot ? null : parentRoot;
23402
23108
  if (!target) {
23403
23109
  zonesRef.current.set(zoneId, meta);
@@ -23416,7 +23122,7 @@ function useDataDnd(args) {
23416
23122
  }, [parentRoot, isRoot, zoneId, meta]);
23417
23123
  const sensors = useAlmadarDndSensors(true);
23418
23124
  const collisionDetection = almadarDndCollisionDetection;
23419
- const findZoneByItem = React89__default.useCallback(
23125
+ const findZoneByItem = React87__default.useCallback(
23420
23126
  (id) => {
23421
23127
  for (const z of zonesRef.current.values()) {
23422
23128
  if (z.itemIds.includes(id)) return z;
@@ -23425,7 +23131,7 @@ function useDataDnd(args) {
23425
23131
  },
23426
23132
  []
23427
23133
  );
23428
- React89__default.useCallback(
23134
+ React87__default.useCallback(
23429
23135
  (group) => {
23430
23136
  for (const z of zonesRef.current.values()) {
23431
23137
  if (z.group === group) return z;
@@ -23434,7 +23140,7 @@ function useDataDnd(args) {
23434
23140
  },
23435
23141
  []
23436
23142
  );
23437
- const handleDragEnd = React89__default.useCallback(
23143
+ const handleDragEnd = React87__default.useCallback(
23438
23144
  (event) => {
23439
23145
  const { active, over } = event;
23440
23146
  const activeIdStr = String(active.id);
@@ -23525,8 +23231,8 @@ function useDataDnd(args) {
23525
23231
  },
23526
23232
  [eventBus]
23527
23233
  );
23528
- const sortableData = React89__default.useMemo(() => ({ dndGroup: ownGroup }), [ownGroup]);
23529
- const SortableItem = React89__default.useCallback(
23234
+ const sortableData = React87__default.useMemo(() => ({ dndGroup: ownGroup }), [ownGroup]);
23235
+ const SortableItem = React87__default.useCallback(
23530
23236
  ({ id, children }) => {
23531
23237
  const {
23532
23238
  attributes,
@@ -23566,7 +23272,7 @@ function useDataDnd(args) {
23566
23272
  id: droppableId,
23567
23273
  data: sortableData
23568
23274
  });
23569
- const ctx = React89__default.useContext(RootCtx);
23275
+ const ctx = React87__default.useContext(RootCtx);
23570
23276
  const activeDrag2 = ctx?.activeDrag ?? null;
23571
23277
  const overZoneGroup2 = ctx?.overZoneGroup ?? null;
23572
23278
  const isThisZoneOver = overZoneGroup2 === ownGroup;
@@ -23581,7 +23287,7 @@ function useDataDnd(args) {
23581
23287
  showForeignPlaceholder,
23582
23288
  ctxAvailable: ctx != null
23583
23289
  });
23584
- React89__default.useEffect(() => {
23290
+ React87__default.useEffect(() => {
23585
23291
  dndLog.info("dropzone:isOver:change", { droppableId, group: ownGroup, isOver, isThisZoneOver, showForeignPlaceholder, activeDragSourceGroup: activeDrag2?.sourceGroup ?? null });
23586
23292
  }, [droppableId, isOver, isThisZoneOver, showForeignPlaceholder]);
23587
23293
  return /* @__PURE__ */ jsx(
@@ -23595,11 +23301,11 @@ function useDataDnd(args) {
23595
23301
  }
23596
23302
  );
23597
23303
  };
23598
- const rootContextValue = React89__default.useMemo(
23304
+ const rootContextValue = React87__default.useMemo(
23599
23305
  () => ({ registerZone, unregisterZone, activeDrag, overZoneGroup, optimisticOrders, clearOptimisticOrder }),
23600
23306
  [registerZone, unregisterZone, activeDrag, overZoneGroup, optimisticOrders, clearOptimisticOrder]
23601
23307
  );
23602
- const handleDragStart = React89__default.useCallback((event) => {
23308
+ const handleDragStart = React87__default.useCallback((event) => {
23603
23309
  const sourceZone = findZoneByItem(event.active.id);
23604
23310
  const rect = event.active.rect.current.initial;
23605
23311
  const height = rect?.height && rect.height > 0 ? rect.height : 64;
@@ -23618,7 +23324,7 @@ function useDataDnd(args) {
23618
23324
  isRoot
23619
23325
  });
23620
23326
  }, [findZoneByItem, isRoot, zoneId]);
23621
- const handleDragOver = React89__default.useCallback((event) => {
23327
+ const handleDragOver = React87__default.useCallback((event) => {
23622
23328
  const { active, over } = event;
23623
23329
  const overData = over?.data?.current;
23624
23330
  const overGroup = overData?.dndGroup ?? null;
@@ -23688,7 +23394,7 @@ function useDataDnd(args) {
23688
23394
  return next;
23689
23395
  });
23690
23396
  }, []);
23691
- const handleDragCancel = React89__default.useCallback((event) => {
23397
+ const handleDragCancel = React87__default.useCallback((event) => {
23692
23398
  setActiveDrag(null);
23693
23399
  setOverZoneGroup(null);
23694
23400
  dndLog.warn("dragCancel", {
@@ -23696,12 +23402,12 @@ function useDataDnd(args) {
23696
23402
  reason: "dnd-kit cancelled the drag (escape key, pointer interrupted, or external)"
23697
23403
  });
23698
23404
  }, []);
23699
- const handleDragEndWithCleanup = React89__default.useCallback((event) => {
23405
+ const handleDragEndWithCleanup = React87__default.useCallback((event) => {
23700
23406
  handleDragEnd(event);
23701
23407
  setActiveDrag(null);
23702
23408
  setOverZoneGroup(null);
23703
23409
  }, [handleDragEnd]);
23704
- const wrapContainer = React89__default.useCallback(
23410
+ const wrapContainer = React87__default.useCallback(
23705
23411
  (children) => {
23706
23412
  if (!enabled) return children;
23707
23413
  const strategy = layout === "grid" ? rectSortingStrategy : verticalListSortingStrategy;
@@ -23755,7 +23461,7 @@ var init_useDataDnd = __esm({
23755
23461
  init_useAlmadarDndCollision();
23756
23462
  init_Box();
23757
23463
  dndLog = createLogger("almadar:ui:dnd");
23758
- RootCtx = React89__default.createContext(null);
23464
+ RootCtx = React87__default.createContext(null);
23759
23465
  }
23760
23466
  });
23761
23467
  function fieldLabel2(key) {
@@ -24275,7 +23981,7 @@ function DataList({
24275
23981
  }) {
24276
23982
  const eventBus = useEventBus();
24277
23983
  const { t } = useTranslate();
24278
- const [visibleCount, setVisibleCount] = React89__default.useState(pageSize || Infinity);
23984
+ const [visibleCount, setVisibleCount] = React87__default.useState(pageSize || Infinity);
24279
23985
  const fieldDefs = fields ?? columns ?? [];
24280
23986
  const allDataRaw = Array.isArray(entity) ? entity : entity ? [entity] : [];
24281
23987
  const dnd = useDataDnd({
@@ -24294,7 +24000,7 @@ function DataList({
24294
24000
  const data = pageSize > 0 ? allData.slice(0, visibleCount) : allData;
24295
24001
  const hasMoreLocal = pageSize > 0 && visibleCount < allData.length;
24296
24002
  const hasRenderProp = typeof children === "function";
24297
- React89__default.useEffect(() => {
24003
+ React87__default.useEffect(() => {
24298
24004
  const renderItemTypeOf = typeof schemaRenderItem;
24299
24005
  const childrenTypeOf = typeof children;
24300
24006
  if (data.length > 0 && !hasRenderProp) {
@@ -24399,7 +24105,7 @@ function DataList({
24399
24105
  const items2 = data.map((item) => item);
24400
24106
  const groups2 = groupBy ? groupData(items2, groupBy) : [{ label: "", items: items2 }];
24401
24107
  const contentField = titleField?.name ?? fieldDefs[0]?.name ?? "";
24402
- return /* @__PURE__ */ jsx(VStack, { gap: "sm", className: cn("py-2", className), children: groups2.map((group, gi) => /* @__PURE__ */ jsxs(React89__default.Fragment, { children: [
24108
+ return /* @__PURE__ */ jsx(VStack, { gap: "sm", className: cn("py-2", className), children: groups2.map((group, gi) => /* @__PURE__ */ jsxs(React87__default.Fragment, { children: [
24403
24109
  group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: "my-2" }),
24404
24110
  group.items.map((itemData, index) => {
24405
24111
  const id = itemData.id || `${gi}-${index}`;
@@ -24547,7 +24253,7 @@ function DataList({
24547
24253
  className
24548
24254
  ),
24549
24255
  children: [
24550
- groups.map((group, gi) => /* @__PURE__ */ jsxs(React89__default.Fragment, { children: [
24256
+ groups.map((group, gi) => /* @__PURE__ */ jsxs(React87__default.Fragment, { children: [
24551
24257
  group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-4" : "mt-0" }),
24552
24258
  group.items.map(
24553
24259
  (itemData, index) => renderItem(itemData, index, gi === groups.length - 1 && index === group.items.length - 1)
@@ -25921,7 +25627,7 @@ var init_WizardProgress = __esm({
25921
25627
  children: /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: normalizedSteps.map((step, index) => {
25922
25628
  const isActive = index === currentStep;
25923
25629
  const isCompleted = index < currentStep;
25924
- return /* @__PURE__ */ jsxs(React89__default.Fragment, { children: [
25630
+ return /* @__PURE__ */ jsxs(React87__default.Fragment, { children: [
25925
25631
  /* @__PURE__ */ jsx(
25926
25632
  "button",
25927
25633
  {
@@ -26532,50 +26238,6 @@ var init_FlipCard = __esm({
26532
26238
  FlipCard.displayName = "FlipCard";
26533
26239
  }
26534
26240
  });
26535
- function pascalToKebab(name) {
26536
- return name.replace(/([a-z0-9])([A-Z])/g, "$1-$2").replace(/([A-Z])([A-Z][a-z])/g, "$1-$2").toLowerCase();
26537
- }
26538
- function kebabToPascal3(name) {
26539
- return name.split("-").map((part) => /^\d+$/.test(part) ? part : part.charAt(0).toUpperCase() + part.slice(1)).join("");
26540
- }
26541
- var ICON_ITEMS, IconPicker;
26542
- var init_IconPicker = __esm({
26543
- "components/core/molecules/IconPicker.tsx"() {
26544
- "use client";
26545
- init_Icon();
26546
- init_GridPicker();
26547
- ICON_ITEMS = (() => {
26548
- const items = [];
26549
- for (const [exportName, candidate] of Object.entries(LucideIcons2)) {
26550
- if (!/^[A-Z]/.test(exportName)) continue;
26551
- if (exportName.endsWith("Icon")) continue;
26552
- if (exportName.startsWith("Lucide")) continue;
26553
- const isComponent = candidate !== null && (typeof candidate === "object" || typeof candidate === "function") && "$$typeof" in candidate;
26554
- if (!isComponent) continue;
26555
- const kebab = pascalToKebab(exportName);
26556
- if (kebabToPascal3(kebab) !== exportName) continue;
26557
- items.push({ id: kebab, label: kebab, category: "icons" });
26558
- }
26559
- return items;
26560
- })();
26561
- IconPicker = ({ value, onChange, className }) => {
26562
- const items = useMemo(() => ICON_ITEMS, []);
26563
- return /* @__PURE__ */ jsx(
26564
- GridPicker,
26565
- {
26566
- items,
26567
- value,
26568
- onChange,
26569
- searchPlaceholder: "Search icons\u2026",
26570
- renderThumbnail: (it) => /* @__PURE__ */ jsx(Icon, { name: it.id }),
26571
- cellSize: 32,
26572
- className
26573
- }
26574
- );
26575
- };
26576
- IconPicker.displayName = "IconPicker";
26577
- }
26578
- });
26579
26241
  function toISODate(d) {
26580
26242
  return d.toISOString().slice(0, 10);
26581
26243
  }
@@ -27020,7 +26682,7 @@ function InventoryGrid({
27020
26682
  const eventBus = useEventBus();
27021
26683
  const slotCount = totalSlots ?? items.length;
27022
26684
  const emptySlotCount = Math.max(0, slotCount - items.length);
27023
- const handleSelect = React89.useCallback(
26685
+ const handleSelect = React87.useCallback(
27024
26686
  (id) => {
27025
26687
  onSelect?.(id);
27026
26688
  if (selectEvent) {
@@ -27237,31 +26899,31 @@ function GameCanvas2D({
27237
26899
  assetBaseUrl = "",
27238
26900
  className
27239
26901
  }) {
27240
- const canvasRef = React89.useRef(null);
27241
- const rafRef = React89.useRef(0);
27242
- const frameRef = React89.useRef(0);
27243
- const lastTimeRef = React89.useRef(0);
27244
- const imageCache = React89.useRef(/* @__PURE__ */ new Map());
26902
+ const canvasRef = React87.useRef(null);
26903
+ const rafRef = React87.useRef(0);
26904
+ const frameRef = React87.useRef(0);
26905
+ const lastTimeRef = React87.useRef(0);
26906
+ const imageCache = React87.useRef(/* @__PURE__ */ new Map());
27245
26907
  const emit = useEmitEvent();
27246
- const onDrawRef = React89.useRef(onDraw);
26908
+ const onDrawRef = React87.useRef(onDraw);
27247
26909
  onDrawRef.current = onDraw;
27248
- const onTickRef = React89.useRef(onTick);
26910
+ const onTickRef = React87.useRef(onTick);
27249
26911
  onTickRef.current = onTick;
27250
- const tickEventRef = React89.useRef(tickEvent);
26912
+ const tickEventRef = React87.useRef(tickEvent);
27251
26913
  tickEventRef.current = tickEvent;
27252
- const drawEventRef = React89.useRef(drawEvent);
26914
+ const drawEventRef = React87.useRef(drawEvent);
27253
26915
  drawEventRef.current = drawEvent;
27254
- const emitRef = React89.useRef(emit);
26916
+ const emitRef = React87.useRef(emit);
27255
26917
  emitRef.current = emit;
27256
- const assetBaseUrlRef = React89.useRef(assetBaseUrl);
26918
+ const assetBaseUrlRef = React87.useRef(assetBaseUrl);
27257
26919
  assetBaseUrlRef.current = assetBaseUrl;
27258
- const backgroundImageRef = React89.useRef(backgroundImage);
26920
+ const backgroundImageRef = React87.useRef(backgroundImage);
27259
26921
  backgroundImageRef.current = backgroundImage;
27260
- const widthRef = React89.useRef(width);
26922
+ const widthRef = React87.useRef(width);
27261
26923
  widthRef.current = width;
27262
- const heightRef = React89.useRef(height);
26924
+ const heightRef = React87.useRef(height);
27263
26925
  heightRef.current = height;
27264
- const loadImage = React89.useCallback((url) => {
26926
+ const loadImage = React87.useCallback((url) => {
27265
26927
  const fullUrl = url.startsWith("http") ? url : `${assetBaseUrlRef.current}${url}`;
27266
26928
  const cached = imageCache.current.get(fullUrl);
27267
26929
  if (cached?.complete && cached.naturalWidth > 0) return cached;
@@ -27273,7 +26935,7 @@ function GameCanvas2D({
27273
26935
  }
27274
26936
  return null;
27275
26937
  }, []);
27276
- React89.useEffect(() => {
26938
+ React87.useEffect(() => {
27277
26939
  const canvas = canvasRef.current;
27278
26940
  if (!canvas) return;
27279
26941
  const ctx = canvas.getContext("2d");
@@ -27576,7 +27238,7 @@ function TurnPanel({
27576
27238
  className
27577
27239
  }) {
27578
27240
  const eventBus = useEventBus();
27579
- const handleAction = React89.useCallback(
27241
+ const handleAction = React87.useCallback(
27580
27242
  (event) => {
27581
27243
  if (event) {
27582
27244
  eventBus.emit(event, { turn: currentTurn, phase, activeTeam });
@@ -27722,7 +27384,7 @@ function UnitCommandBar({
27722
27384
  className
27723
27385
  }) {
27724
27386
  const eventBus = useEventBus();
27725
- const handleCommand = React89.useCallback(
27387
+ const handleCommand = React87.useCallback(
27726
27388
  (event) => {
27727
27389
  if (event) {
27728
27390
  eventBus.emit(event, { unitId: selectedUnitId });
@@ -28207,7 +27869,7 @@ function GameMenu({
28207
27869
  } catch {
28208
27870
  }
28209
27871
  const eventBus = eventBusProp || eventBusFromHook;
28210
- const handleOptionClick = React89.useCallback(
27872
+ const handleOptionClick = React87.useCallback(
28211
27873
  (option) => {
28212
27874
  if (option.event && eventBus) {
28213
27875
  eventBus.emit(`UI:${option.event}`, { option });
@@ -28321,7 +27983,7 @@ function GameOverScreen({
28321
27983
  } catch {
28322
27984
  }
28323
27985
  const eventBus = eventBusProp || eventBusFromHook;
28324
- const handleActionClick = React89.useCallback(
27986
+ const handleActionClick = React87.useCallback(
28325
27987
  (action) => {
28326
27988
  if (action.event && eventBus) {
28327
27989
  eventBus.emit(`UI:${action.event}`, { action });
@@ -29032,14 +28694,14 @@ function useSafeEventBus5() {
29032
28694
  } };
29033
28695
  }
29034
28696
  }
29035
- var sizeStyles10, LONG_PRESS_DELAY, LONG_PRESS_INTERVAL, NumberStepper;
28697
+ var sizeStyles9, LONG_PRESS_DELAY, LONG_PRESS_INTERVAL, NumberStepper;
29036
28698
  var init_NumberStepper = __esm({
29037
28699
  "components/core/molecules/NumberStepper.tsx"() {
29038
28700
  "use client";
29039
28701
  init_cn();
29040
28702
  init_Icon();
29041
28703
  init_useEventBus();
29042
- sizeStyles10 = {
28704
+ sizeStyles9 = {
29043
28705
  sm: {
29044
28706
  button: "w-7 h-7",
29045
28707
  text: "text-sm min-w-[2rem]",
@@ -29077,7 +28739,7 @@ var init_NumberStepper = __esm({
29077
28739
  const timeoutRef = useRef(null);
29078
28740
  const isAtMin = min !== void 0 && value <= min;
29079
28741
  const isAtMax = max !== void 0 && value >= max;
29080
- const styles = sizeStyles10[size];
28742
+ const styles = sizeStyles9[size];
29081
28743
  const emitChange = useCallback(
29082
28744
  (newValue) => {
29083
28745
  const clamped = Math.round(newValue / step) * step;
@@ -29218,14 +28880,14 @@ function useSafeEventBus6() {
29218
28880
  } };
29219
28881
  }
29220
28882
  }
29221
- var sizeStyles11, StarRating;
28883
+ var sizeStyles10, StarRating;
29222
28884
  var init_StarRating = __esm({
29223
28885
  "components/core/molecules/StarRating.tsx"() {
29224
28886
  "use client";
29225
28887
  init_cn();
29226
28888
  init_Icon();
29227
28889
  init_useEventBus();
29228
- sizeStyles11 = {
28890
+ sizeStyles10 = {
29229
28891
  sm: { star: "w-4 h-4", gap: "gap-0.5" },
29230
28892
  md: { star: "w-6 h-6", gap: "gap-1" },
29231
28893
  lg: { star: "w-8 h-8", gap: "gap-1.5" }
@@ -29244,7 +28906,7 @@ var init_StarRating = __esm({
29244
28906
  }) => {
29245
28907
  const [hoverValue, setHoverValue] = useState(null);
29246
28908
  const eventBus = useSafeEventBus6();
29247
- const styles = sizeStyles11[size];
28909
+ const styles = sizeStyles10[size];
29248
28910
  const displayValue = hoverValue ?? value;
29249
28911
  const emitChange = useCallback(
29250
28912
  (newValue) => {
@@ -29798,8 +29460,8 @@ function TableView({
29798
29460
  }) {
29799
29461
  const eventBus = useEventBus();
29800
29462
  const { t } = useTranslate();
29801
- const [visibleCount, setVisibleCount] = React89__default.useState(pageSize > 0 ? pageSize : Infinity);
29802
- const [localSelected, setLocalSelected] = React89__default.useState(/* @__PURE__ */ new Set());
29463
+ const [visibleCount, setVisibleCount] = React87__default.useState(pageSize > 0 ? pageSize : Infinity);
29464
+ const [localSelected, setLocalSelected] = React87__default.useState(/* @__PURE__ */ new Set());
29803
29465
  const colDefs = columns ?? fields ?? [];
29804
29466
  const allDataRaw = Array.isArray(entity) ? entity : entity ? [entity] : [];
29805
29467
  const dnd = useDataDnd({
@@ -29994,12 +29656,12 @@ function TableView({
29994
29656
  ]
29995
29657
  }
29996
29658
  );
29997
- return dnd.isZone ? /* @__PURE__ */ jsx(dnd.SortableItem, { id: row[idField] ?? id, children: rowInner }, id) : /* @__PURE__ */ jsx(React89__default.Fragment, { children: rowInner }, id);
29659
+ return dnd.isZone ? /* @__PURE__ */ jsx(dnd.SortableItem, { id: row[idField] ?? id, children: rowInner }, id) : /* @__PURE__ */ jsx(React87__default.Fragment, { children: rowInner }, id);
29998
29660
  };
29999
29661
  const items = data.map((row) => row);
30000
29662
  const groups = groupBy ? groupData2(items, groupBy) : [{ label: "", items }];
30001
29663
  let runningIndex = 0;
30002
- const body = /* @__PURE__ */ jsx(Box, { role: "rowgroup", children: groups.map((group, gi) => /* @__PURE__ */ jsxs(React89__default.Fragment, { children: [
29664
+ const body = /* @__PURE__ */ jsx(Box, { role: "rowgroup", children: groups.map((group, gi) => /* @__PURE__ */ jsxs(React87__default.Fragment, { children: [
30003
29665
  group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-3" : "mt-0" }),
30004
29666
  group.items.map((row) => renderRow(row, runningIndex++))
30005
29667
  ] }, gi)) });
@@ -31351,7 +31013,7 @@ var init_StepFlow = __esm({
31351
31013
  className
31352
31014
  }) => {
31353
31015
  if (orientation === "vertical") {
31354
- return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(React89__default.Fragment, { children: /* @__PURE__ */ jsxs(HStack, { gap: "md", align: "start", className: "w-full", children: [
31016
+ return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(React87__default.Fragment, { children: /* @__PURE__ */ jsxs(HStack, { gap: "md", align: "start", className: "w-full", children: [
31355
31017
  /* @__PURE__ */ jsxs(VStack, { gap: "none", align: "center", children: [
31356
31018
  /* @__PURE__ */ jsx(StepCircle, { step, index }),
31357
31019
  showConnectors && index < steps.length - 1 && /* @__PURE__ */ jsx(Box, { className: "w-px h-8 bg-border" })
@@ -31362,7 +31024,7 @@ var init_StepFlow = __esm({
31362
31024
  ] })
31363
31025
  ] }) }, index)) });
31364
31026
  }
31365
- 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(React89__default.Fragment, { children: [
31027
+ 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(React87__default.Fragment, { children: [
31366
31028
  /* @__PURE__ */ jsxs(VStack, { gap: "sm", align: "center", className: "flex-1 w-full md:w-auto", children: [
31367
31029
  /* @__PURE__ */ jsx(StepCircle, { step, index }),
31368
31030
  /* @__PURE__ */ jsx(Typography, { variant: "h4", className: "text-center", children: step.title }),
@@ -32171,14 +31833,14 @@ var init_EdgeDecoration = __esm({
32171
31833
  EdgeDecoration.displayName = "EdgeDecoration";
32172
31834
  }
32173
31835
  });
32174
- var sizeStyles12, VoteStack;
31836
+ var sizeStyles11, VoteStack;
32175
31837
  var init_VoteStack = __esm({
32176
31838
  "components/core/molecules/VoteStack.tsx"() {
32177
31839
  "use client";
32178
31840
  init_cn();
32179
31841
  init_Icon();
32180
31842
  init_useEventBus();
32181
- sizeStyles12 = {
31843
+ sizeStyles11 = {
32182
31844
  sm: {
32183
31845
  button: "w-7 h-7",
32184
31846
  text: "text-sm min-w-[2rem]",
@@ -32206,7 +31868,7 @@ var init_VoteStack = __esm({
32206
31868
  className,
32207
31869
  label
32208
31870
  }) => {
32209
- const styles = sizeStyles12[size];
31871
+ const styles = sizeStyles11[size];
32210
31872
  const isUp = userVote === "up";
32211
31873
  const isDown = userVote === "down";
32212
31874
  const eventBus = useEventBus();
@@ -32338,7 +32000,7 @@ var init_LikertScale = __esm({
32338
32000
  md: "text-base",
32339
32001
  lg: "text-lg"
32340
32002
  };
32341
- LikertScale = React89__default.forwardRef(
32003
+ LikertScale = React87__default.forwardRef(
32342
32004
  ({
32343
32005
  question,
32344
32006
  options = DEFAULT_LIKERT_OPTIONS,
@@ -32350,7 +32012,7 @@ var init_LikertScale = __esm({
32350
32012
  variant = "radios",
32351
32013
  className
32352
32014
  }, ref) => {
32353
- const groupId = React89__default.useId();
32015
+ const groupId = React87__default.useId();
32354
32016
  const eventBus = useEventBus();
32355
32017
  const handleSelect = useCallback(
32356
32018
  (next) => {
@@ -32474,7 +32136,7 @@ var init_LikertScale = __esm({
32474
32136
  LikertScale.displayName = "LikertScale";
32475
32137
  }
32476
32138
  });
32477
- var DEFAULT_MATRIX_COLUMNS, sizeStyles13, MatrixQuestion;
32139
+ var DEFAULT_MATRIX_COLUMNS, sizeStyles12, MatrixQuestion;
32478
32140
  var init_MatrixQuestion = __esm({
32479
32141
  "components/core/molecules/MatrixQuestion.tsx"() {
32480
32142
  "use client";
@@ -32490,7 +32152,7 @@ var init_MatrixQuestion = __esm({
32490
32152
  { value: 4, label: "Agree" },
32491
32153
  { value: 5, label: "Strongly Agree" }
32492
32154
  ];
32493
- sizeStyles13 = {
32155
+ sizeStyles12 = {
32494
32156
  sm: {
32495
32157
  cell: "px-2 py-1.5 text-xs",
32496
32158
  radio: "sm",
@@ -32513,7 +32175,7 @@ var init_MatrixQuestion = __esm({
32513
32175
  size = "md",
32514
32176
  className
32515
32177
  }) => {
32516
- const styles = sizeStyles13[size];
32178
+ const styles = sizeStyles12[size];
32517
32179
  const safeRows = rows2 ?? [];
32518
32180
  const safeValues = values ?? {};
32519
32181
  const eventBus = useEventBus();
@@ -34658,7 +34320,7 @@ var init_DocBreadcrumb = __esm({
34658
34320
  "aria-label": t("aria.breadcrumb"),
34659
34321
  children: /* @__PURE__ */ jsx(HStack, { gap: "xs", align: "center", wrap: true, children: items.map((item, idx) => {
34660
34322
  const isLast = idx === items.length - 1;
34661
- return /* @__PURE__ */ jsxs(React89__default.Fragment, { children: [
34323
+ return /* @__PURE__ */ jsxs(React87__default.Fragment, { children: [
34662
34324
  idx > 0 && /* @__PURE__ */ jsx(
34663
34325
  Icon,
34664
34326
  {
@@ -35622,7 +35284,7 @@ var init_MiniStateMachine = __esm({
35622
35284
  const x = 2 + i * (NODE_W + GAP + ARROW_W + GAP);
35623
35285
  const tc = transitionCounts[s.name] ?? 0;
35624
35286
  const role = getStateRole(s.name, s.isInitial, s.isTerminal, tc, maxTC);
35625
- return /* @__PURE__ */ jsxs(React89__default.Fragment, { children: [
35287
+ return /* @__PURE__ */ jsxs(React87__default.Fragment, { children: [
35626
35288
  /* @__PURE__ */ jsx(
35627
35289
  AvlState,
35628
35290
  {
@@ -35826,7 +35488,7 @@ var init_PageHeader = __esm({
35826
35488
  info: "bg-info/10 text-info"
35827
35489
  };
35828
35490
  return /* @__PURE__ */ jsxs(Box, { className: cn("mb-6", className), children: [
35829
- 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(React89__default.Fragment, { children: [
35491
+ 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(React87__default.Fragment, { children: [
35830
35492
  idx > 0 && /* @__PURE__ */ jsx(Typography, { variant: "small", color: "muted", children: "/" }),
35831
35493
  crumb.href ? /* @__PURE__ */ jsx(
35832
35494
  "a",
@@ -35913,271 +35575,6 @@ var init_PageHeader = __esm({
35913
35575
  PageHeader.displayName = "PageHeader";
35914
35576
  }
35915
35577
  });
35916
- var FormSection, FormLayout, FormActions;
35917
- var init_FormSection = __esm({
35918
- "components/core/molecules/FormSection.tsx"() {
35919
- "use client";
35920
- init_cn();
35921
- init_atoms2();
35922
- init_Box();
35923
- init_Typography();
35924
- init_Button();
35925
- init_Stack();
35926
- init_Icon();
35927
- init_useEventBus();
35928
- FormSection = ({
35929
- title,
35930
- description,
35931
- children,
35932
- collapsible = false,
35933
- defaultCollapsed = false,
35934
- card = false,
35935
- columns = 1,
35936
- className
35937
- }) => {
35938
- const [collapsed, setCollapsed] = React89__default.useState(defaultCollapsed);
35939
- const { t } = useTranslate();
35940
- const eventBus = useEventBus();
35941
- const gridClass = {
35942
- 1: "grid-cols-1",
35943
- 2: "grid-cols-1 md:grid-cols-2",
35944
- 3: "grid-cols-1 md:grid-cols-2 lg:grid-cols-3"
35945
- }[columns];
35946
- React89__default.useCallback(() => {
35947
- if (collapsible) {
35948
- setCollapsed((prev) => !prev);
35949
- eventBus.emit("UI:TOGGLE_COLLAPSE", { collapsed: !collapsed });
35950
- }
35951
- }, [collapsible, collapsed, eventBus]);
35952
- const content = /* @__PURE__ */ jsxs(Fragment, { children: [
35953
- (title || description) && /* @__PURE__ */ jsxs(VStack, { gap: "xs", className: "mb-4", children: [
35954
- title && /* @__PURE__ */ jsxs(
35955
- HStack,
35956
- {
35957
- justify: "between",
35958
- align: "center",
35959
- className: cn(collapsible && "cursor-pointer"),
35960
- action: collapsible ? "TOGGLE_COLLAPSE" : void 0,
35961
- children: [
35962
- /* @__PURE__ */ jsx(Typography, { variant: "h3", weight: "semibold", children: title }),
35963
- collapsible && /* @__PURE__ */ jsx(
35964
- Button,
35965
- {
35966
- variant: "ghost",
35967
- size: "sm",
35968
- action: "TOGGLE_COLLAPSE",
35969
- children: /* @__PURE__ */ jsx(
35970
- Icon,
35971
- {
35972
- icon: ChevronDown,
35973
- size: "sm",
35974
- className: cn(
35975
- "text-muted-foreground transition-transform",
35976
- collapsed && "rotate-180"
35977
- )
35978
- }
35979
- )
35980
- }
35981
- )
35982
- ]
35983
- }
35984
- ),
35985
- description && /* @__PURE__ */ jsx(Typography, { variant: "small", color: "secondary", children: description })
35986
- ] }),
35987
- (!collapsible || !collapsed) && /* @__PURE__ */ jsx(Box, { className: cn("grid gap-4", gridClass), children })
35988
- ] });
35989
- if (card) {
35990
- return /* @__PURE__ */ jsx(Card, { className: cn("p-6", className), children: content });
35991
- }
35992
- return /* @__PURE__ */ jsx(Box, { className, children: content });
35993
- };
35994
- FormSection.displayName = "FormSection";
35995
- FormLayout = ({
35996
- children,
35997
- dividers = true,
35998
- className
35999
- }) => {
36000
- return /* @__PURE__ */ jsx(
36001
- VStack,
36002
- {
36003
- gap: "lg",
36004
- className: cn(
36005
- dividers && "[&>*+*]:pt-8 [&>*+*]:border-t [&>*+*]:border-border",
36006
- className
36007
- ),
36008
- children
36009
- }
36010
- );
36011
- };
36012
- FormLayout.displayName = "FormLayout";
36013
- FormActions = ({
36014
- children,
36015
- sticky = false,
36016
- align = "right",
36017
- className
36018
- }) => {
36019
- const alignClass2 = {
36020
- left: "justify-start",
36021
- right: "justify-end",
36022
- between: "justify-between",
36023
- center: "justify-center"
36024
- }[align];
36025
- return /* @__PURE__ */ jsx(
36026
- HStack,
36027
- {
36028
- gap: "sm",
36029
- align: "center",
36030
- className: cn(
36031
- "pt-6 border-t border-border",
36032
- alignClass2,
36033
- sticky && "sticky bottom-0 bg-card py-4 -mx-6 px-6 shadow-[0_-4px_6px_-1px_rgb(0,0,0,0.05)]",
36034
- className
36035
- ),
36036
- children
36037
- }
36038
- );
36039
- };
36040
- FormActions.displayName = "FormActions";
36041
- }
36042
- });
36043
- function currentValue(decl, override) {
36044
- return override !== void 0 ? override : decl.default;
36045
- }
36046
- function TextLikeControl({
36047
- field,
36048
- numeric,
36049
- value,
36050
- onCommit
36051
- }) {
36052
- const initial = value === void 0 || value === null ? "" : String(value);
36053
- const [draft, setDraft] = React89__default.useState(initial);
36054
- React89__default.useEffect(() => setDraft(initial), [initial]);
36055
- const commit = () => {
36056
- if (numeric) {
36057
- const n = draft.trim() === "" ? 0 : Number(draft);
36058
- onCommit(field, Number.isNaN(n) ? 0 : n);
36059
- } else {
36060
- onCommit(field, draft);
36061
- }
36062
- };
36063
- return /* @__PURE__ */ jsx(
36064
- Input,
36065
- {
36066
- inputType: numeric ? "number" : "text",
36067
- value: draft,
36068
- onChange: (e) => setDraft(e.target.value),
36069
- onBlur: commit,
36070
- onKeyDown: (e) => {
36071
- if (e.key === "Enter") commit();
36072
- }
36073
- }
36074
- );
36075
- }
36076
- function FieldControl({
36077
- name,
36078
- decl,
36079
- value,
36080
- onChange,
36081
- assets
36082
- }) {
36083
- let control;
36084
- const stringValue = typeof value === "string" ? value : void 0;
36085
- if (decl.type === "icon") {
36086
- control = /* @__PURE__ */ jsx(IconPicker, { value: stringValue, onChange: (icon) => onChange(name, icon) });
36087
- } else if (decl.type === "asset") {
36088
- control = /* @__PURE__ */ jsx(
36089
- AssetPicker,
36090
- {
36091
- assets: assets ?? [],
36092
- value: stringValue,
36093
- onChange: (url) => onChange(name, url)
36094
- }
36095
- );
36096
- } else if (decl.type === "boolean") {
36097
- control = /* @__PURE__ */ jsx(Switch, { checked: value === true, onChange: (c) => onChange(name, c) });
36098
- } else if (decl.type === "string" && decl.values !== void 0 && decl.values.length > 0) {
36099
- control = /* @__PURE__ */ jsx(
36100
- Select,
36101
- {
36102
- options: decl.values.map((v) => ({ value: v, label: v })),
36103
- value: typeof value === "string" ? value : "",
36104
- onChange: (e) => onChange(name, e.target.value)
36105
- }
36106
- );
36107
- } else if (decl.type === "number") {
36108
- control = /* @__PURE__ */ jsx(TextLikeControl, { field: name, numeric: true, value, onCommit: onChange });
36109
- } else if (decl.type === "string") {
36110
- control = /* @__PURE__ */ jsx(TextLikeControl, { field: name, numeric: false, value, onCommit: onChange });
36111
- } else {
36112
- control = /* @__PURE__ */ jsxs(Typography, { variant: "caption", color: "muted", children: [
36113
- decl.type,
36114
- " \u2014 edit in source"
36115
- ] });
36116
- }
36117
- return /* @__PURE__ */ jsxs(VStack, { gap: "xs", children: [
36118
- /* @__PURE__ */ jsx(Typography, { variant: "label", children: decl.label ?? name }),
36119
- control,
36120
- decl.description !== void 0 && decl.description !== "" && /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", children: decl.description })
36121
- ] });
36122
- }
36123
- var TIER_ORDER, PropertyInspector;
36124
- var init_PropertyInspector = __esm({
36125
- "components/core/molecules/PropertyInspector.tsx"() {
36126
- "use client";
36127
- init_cn();
36128
- init_Stack();
36129
- init_Typography();
36130
- init_Button();
36131
- init_Switch();
36132
- init_Select();
36133
- init_Input();
36134
- init_FormSection();
36135
- init_IconPicker();
36136
- init_AssetPicker();
36137
- TIER_ORDER = ["presentation", "domain", "policy", "infra", "internal"];
36138
- PropertyInspector = ({
36139
- config,
36140
- values,
36141
- onChange,
36142
- onReset,
36143
- title,
36144
- className,
36145
- assets
36146
- }) => {
36147
- const fields = Object.entries(config);
36148
- const byTier = /* @__PURE__ */ new Map();
36149
- for (const [name, decl] of fields) {
36150
- const tier = decl.tier ?? "presentation";
36151
- const arr = byTier.get(tier) ?? [];
36152
- arr.push([name, decl]);
36153
- byTier.set(tier, arr);
36154
- }
36155
- const tiers = [...byTier.keys()].sort((a, b) => {
36156
- const ia = TIER_ORDER.indexOf(a);
36157
- const ib = TIER_ORDER.indexOf(b);
36158
- return (ia === -1 ? 99 : ia) - (ib === -1 ? 99 : ib);
36159
- });
36160
- return /* @__PURE__ */ jsxs(VStack, { gap: "sm", className: cn("w-full", className), children: [
36161
- /* @__PURE__ */ jsxs(HStack, { justify: "between", align: "center", children: [
36162
- /* @__PURE__ */ jsx(Typography, { variant: "caption", weight: "bold", children: title ?? "Config" }),
36163
- onReset !== void 0 && /* @__PURE__ */ jsx(Button, { variant: "ghost", size: "sm", icon: "rotate-ccw", label: "Reset", onClick: onReset })
36164
- ] }),
36165
- fields.length === 0 && /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", children: "No configurable properties." }),
36166
- tiers.map((tier) => /* @__PURE__ */ jsx(FormSection, { title: tier, collapsible: true, defaultCollapsed: tier !== "presentation", children: /* @__PURE__ */ jsx(VStack, { gap: "sm", children: byTier.get(tier)?.map(([name, decl]) => /* @__PURE__ */ jsx(
36167
- FieldControl,
36168
- {
36169
- name,
36170
- decl,
36171
- value: currentValue(decl, values?.[name]),
36172
- onChange,
36173
- assets
36174
- },
36175
- name
36176
- )) }) }, tier))
36177
- ] });
36178
- };
36179
- }
36180
- });
36181
35578
  var lookStyles8, Header;
36182
35579
  var init_Header = __esm({
36183
35580
  "components/core/molecules/Header.tsx"() {
@@ -36828,7 +36225,7 @@ var init_WizardContainer = __esm({
36828
36225
  const isCompleted = index < currentStep;
36829
36226
  const stepKey = step.id ?? step.tabId ?? `step-${index}`;
36830
36227
  const stepTitle = step.title ?? step.name ?? `Step ${index + 1}`;
36831
- return /* @__PURE__ */ jsxs(React89__default.Fragment, { children: [
36228
+ return /* @__PURE__ */ jsxs(React87__default.Fragment, { children: [
36832
36229
  /* @__PURE__ */ jsx(
36833
36230
  Button,
36834
36231
  {
@@ -39113,7 +38510,7 @@ var init_DetailPanel = __esm({
39113
38510
  }
39114
38511
  });
39115
38512
  function extractTitle(children) {
39116
- if (!React89__default.isValidElement(children)) return void 0;
38513
+ if (!React87__default.isValidElement(children)) return void 0;
39117
38514
  const props = children.props;
39118
38515
  if (typeof props.title === "string") {
39119
38516
  return props.title;
@@ -39168,7 +38565,7 @@ function LinearView({
39168
38565
  /* @__PURE__ */ jsx(HStack, { className: "flex-wrap items-center", gap: "xs", children: trait.states.map((state, i) => {
39169
38566
  const isDone = i < currentIdx;
39170
38567
  const isCurrent = i === currentIdx;
39171
- return /* @__PURE__ */ jsxs(React89__default.Fragment, { children: [
38568
+ return /* @__PURE__ */ jsxs(React87__default.Fragment, { children: [
39172
38569
  i > 0 && /* @__PURE__ */ jsx(
39173
38570
  Typography,
39174
38571
  {
@@ -40126,12 +39523,12 @@ var init_Form = __esm({
40126
39523
  const isSchemaEntity = isOrbitalEntitySchema(entity);
40127
39524
  const resolvedEntity = isSchemaEntity ? entity : void 0;
40128
39525
  const entityName = typeof entity === "string" ? entity : resolvedEntity?.name;
40129
- const normalizedInitialData = React89__default.useMemo(() => {
39526
+ const normalizedInitialData = React87__default.useMemo(() => {
40130
39527
  const entityRowAsInitial = isPlainEntityRow(entity) ? entity : void 0;
40131
39528
  const callerInitial = initialData !== null && typeof initialData === "object" && !Array.isArray(initialData) ? initialData : {};
40132
39529
  return entityRowAsInitial !== void 0 ? { ...entityRowAsInitial, ...callerInitial } : callerInitial;
40133
39530
  }, [entity, initialData]);
40134
- const entityDerivedFields = React89__default.useMemo(() => {
39531
+ const entityDerivedFields = React87__default.useMemo(() => {
40135
39532
  if (fields && fields.length > 0) return void 0;
40136
39533
  if (!resolvedEntity) return void 0;
40137
39534
  return resolvedEntity.fields.map(
@@ -40151,16 +39548,16 @@ var init_Form = __esm({
40151
39548
  const conditionalFields = typeof conditionalFieldsRaw === "boolean" ? {} : conditionalFieldsRaw;
40152
39549
  const hiddenCalculations = typeof hiddenCalculationsRaw === "boolean" ? [] : hiddenCalculationsRaw;
40153
39550
  const violationTriggers = typeof violationTriggersRaw === "boolean" ? [] : violationTriggersRaw;
40154
- const [formData, setFormData] = React89__default.useState(
39551
+ const [formData, setFormData] = React87__default.useState(
40155
39552
  normalizedInitialData
40156
39553
  );
40157
- const [collapsedSections, setCollapsedSections] = React89__default.useState(
39554
+ const [collapsedSections, setCollapsedSections] = React87__default.useState(
40158
39555
  /* @__PURE__ */ new Set()
40159
39556
  );
40160
- const [submitError, setSubmitError] = React89__default.useState(null);
40161
- const formRef = React89__default.useRef(null);
39557
+ const [submitError, setSubmitError] = React87__default.useState(null);
39558
+ const formRef = React87__default.useRef(null);
40162
39559
  const formMode = props.mode;
40163
- const mountedRef = React89__default.useRef(false);
39560
+ const mountedRef = React87__default.useRef(false);
40164
39561
  if (!mountedRef.current) {
40165
39562
  mountedRef.current = true;
40166
39563
  debug("forms", "mount", {
@@ -40173,7 +39570,7 @@ var init_Form = __esm({
40173
39570
  });
40174
39571
  }
40175
39572
  const shouldShowCancel = showCancel ?? (fields && fields.length > 0);
40176
- const evalContext = React89__default.useMemo(
39573
+ const evalContext = React87__default.useMemo(
40177
39574
  () => ({
40178
39575
  formValues: formData,
40179
39576
  globalVariables: externalContext?.globalVariables ?? {},
@@ -40182,7 +39579,7 @@ var init_Form = __esm({
40182
39579
  }),
40183
39580
  [formData, externalContext]
40184
39581
  );
40185
- React89__default.useEffect(() => {
39582
+ React87__default.useEffect(() => {
40186
39583
  debug("forms", "initialData-sync", {
40187
39584
  mode: formMode,
40188
39585
  normalizedInitialData,
@@ -40193,7 +39590,7 @@ var init_Form = __esm({
40193
39590
  setFormData(normalizedInitialData);
40194
39591
  }
40195
39592
  }, [normalizedInitialData]);
40196
- const processCalculations = React89__default.useCallback(
39593
+ const processCalculations = React87__default.useCallback(
40197
39594
  (changedFieldId, newFormData) => {
40198
39595
  if (!hiddenCalculations.length) return;
40199
39596
  const context = {
@@ -40218,7 +39615,7 @@ var init_Form = __esm({
40218
39615
  },
40219
39616
  [hiddenCalculations, externalContext, eventBus]
40220
39617
  );
40221
- const checkViolations = React89__default.useCallback(
39618
+ const checkViolations = React87__default.useCallback(
40222
39619
  (changedFieldId, newFormData) => {
40223
39620
  if (!violationTriggers.length) return;
40224
39621
  const context = {
@@ -40256,7 +39653,7 @@ var init_Form = __esm({
40256
39653
  processCalculations(name, newFormData);
40257
39654
  checkViolations(name, newFormData);
40258
39655
  };
40259
- const isFieldVisible = React89__default.useCallback(
39656
+ const isFieldVisible = React87__default.useCallback(
40260
39657
  (fieldName) => {
40261
39658
  const condition = conditionalFields[fieldName];
40262
39659
  if (!condition) return true;
@@ -40264,7 +39661,7 @@ var init_Form = __esm({
40264
39661
  },
40265
39662
  [conditionalFields, evalContext]
40266
39663
  );
40267
- const isSectionVisible = React89__default.useCallback(
39664
+ const isSectionVisible = React87__default.useCallback(
40268
39665
  (section) => {
40269
39666
  if (!section.condition) return true;
40270
39667
  return Boolean(evaluateFormExpression(section.condition, evalContext));
@@ -40340,7 +39737,7 @@ var init_Form = __esm({
40340
39737
  eventBus.emit(`UI:${onCancel}`);
40341
39738
  }
40342
39739
  };
40343
- const renderField = React89__default.useCallback(
39740
+ const renderField = React87__default.useCallback(
40344
39741
  (field) => {
40345
39742
  const fieldName = field.name || field.field;
40346
39743
  if (!fieldName) return null;
@@ -40349,19 +39746,19 @@ var init_Form = __esm({
40349
39746
  }
40350
39747
  const inputType = determineInputType(field);
40351
39748
  const label = field.label || fieldName.charAt(0).toUpperCase() + fieldName.slice(1).replace(/([A-Z])/g, " $1");
40352
- const currentValue2 = formData[fieldName] ?? field.defaultValue ?? "";
39749
+ const currentValue = formData[fieldName] ?? field.defaultValue ?? "";
40353
39750
  return /* @__PURE__ */ jsxs(VStack, { gap: "xs", "data-field": fieldName, children: [
40354
39751
  inputType !== "checkbox" && /* @__PURE__ */ jsxs(Typography, { as: "label", variant: "label", weight: "bold", children: [
40355
39752
  label,
40356
39753
  field.required && /* @__PURE__ */ jsx(Typography, { as: "span", color: "error", className: "ml-1", children: "*" })
40357
39754
  ] }),
40358
- renderFieldInput(field, fieldName, inputType, currentValue2, label)
39755
+ renderFieldInput(field, fieldName, inputType, currentValue, label)
40359
39756
  ] }, fieldName);
40360
39757
  },
40361
39758
  [formData, isFieldVisible, relationsData, relationsLoading, isLoading]
40362
39759
  );
40363
39760
  const effectiveFields = entityDerivedFields ?? fields;
40364
- const normalizedFields = React89__default.useMemo(() => {
39761
+ const normalizedFields = React87__default.useMemo(() => {
40365
39762
  if (!effectiveFields || effectiveFields.length === 0) return [];
40366
39763
  return effectiveFields.map((field) => {
40367
39764
  if (typeof field === "string") {
@@ -40384,7 +39781,7 @@ var init_Form = __esm({
40384
39781
  return field;
40385
39782
  });
40386
39783
  }, [effectiveFields, resolvedEntity]);
40387
- const schemaFields = React89__default.useMemo(() => {
39784
+ const schemaFields = React87__default.useMemo(() => {
40388
39785
  if (normalizedFields.length === 0) return null;
40389
39786
  if (isDebugEnabled()) {
40390
39787
  debugGroup(`Form: ${entityName || "unknown"}`);
@@ -40394,7 +39791,7 @@ var init_Form = __esm({
40394
39791
  }
40395
39792
  return normalizedFields.map(renderField).filter(Boolean);
40396
39793
  }, [normalizedFields, renderField, entityName, conditionalFields]);
40397
- const sectionElements = React89__default.useMemo(() => {
39794
+ const sectionElements = React87__default.useMemo(() => {
40398
39795
  if (!sections || sections.length === 0) return null;
40399
39796
  return sections.map((section) => {
40400
39797
  if (!isSectionVisible(section)) {
@@ -40430,7 +39827,7 @@ var init_Form = __esm({
40430
39827
  ] }, section.id);
40431
39828
  }).filter(Boolean);
40432
39829
  }, [sections, isSectionVisible, collapsedSections, renderField, gap]);
40433
- function renderFieldInput(field, fieldName, inputType, currentValue2, label) {
39830
+ function renderFieldInput(field, fieldName, inputType, currentValue, label) {
40434
39831
  const commonProps = {
40435
39832
  id: fieldName,
40436
39833
  name: fieldName,
@@ -40447,7 +39844,7 @@ var init_Form = __esm({
40447
39844
  {
40448
39845
  ...commonProps,
40449
39846
  label: label + (field.required ? " *" : ""),
40450
- checked: Boolean(currentValue2),
39847
+ checked: Boolean(currentValue),
40451
39848
  onChange: (e) => handleChange(fieldName, e.target.checked)
40452
39849
  }
40453
39850
  );
@@ -40456,7 +39853,7 @@ var init_Form = __esm({
40456
39853
  Textarea,
40457
39854
  {
40458
39855
  ...commonProps,
40459
- value: String(currentValue2),
39856
+ value: String(currentValue),
40460
39857
  onChange: (e) => handleChange(fieldName, e.target.value),
40461
39858
  minLength: field.min,
40462
39859
  maxLength: field.max
@@ -40469,7 +39866,7 @@ var init_Form = __esm({
40469
39866
  {
40470
39867
  ...commonProps,
40471
39868
  options,
40472
- value: String(currentValue2),
39869
+ value: String(currentValue),
40473
39870
  onChange: (e) => handleChange(fieldName, e.target.value),
40474
39871
  placeholder: field.placeholder || `Select ${label}...`
40475
39872
  }
@@ -40482,7 +39879,7 @@ var init_Form = __esm({
40482
39879
  RelationSelect,
40483
39880
  {
40484
39881
  ...commonProps,
40485
- value: currentValue2 ? String(currentValue2) : void 0,
39882
+ value: currentValue ? String(currentValue) : void 0,
40486
39883
  onChange: (value) => handleChange(fieldName, value),
40487
39884
  options: relationOptions,
40488
39885
  isLoading: relationLoading,
@@ -40498,7 +39895,7 @@ var init_Form = __esm({
40498
39895
  {
40499
39896
  ...commonProps,
40500
39897
  type: "number",
40501
- value: currentValue2 !== void 0 && currentValue2 !== "" ? String(currentValue2) : "",
39898
+ value: currentValue !== void 0 && currentValue !== "" ? String(currentValue) : "",
40502
39899
  onChange: (e) => handleChange(
40503
39900
  fieldName,
40504
39901
  e.target.value ? Number(e.target.value) : void 0
@@ -40513,7 +39910,7 @@ var init_Form = __esm({
40513
39910
  {
40514
39911
  ...commonProps,
40515
39912
  type: "date",
40516
- value: formatDateValue(currentValue2),
39913
+ value: formatDateValue(currentValue),
40517
39914
  onChange: (e) => handleChange(fieldName, e.target.value)
40518
39915
  }
40519
39916
  );
@@ -40523,7 +39920,7 @@ var init_Form = __esm({
40523
39920
  {
40524
39921
  ...commonProps,
40525
39922
  type: "datetime-local",
40526
- value: formatDateTimeValue(currentValue2),
39923
+ value: formatDateTimeValue(currentValue),
40527
39924
  onChange: (e) => handleChange(fieldName, e.target.value)
40528
39925
  }
40529
39926
  );
@@ -40533,7 +39930,7 @@ var init_Form = __esm({
40533
39930
  {
40534
39931
  ...commonProps,
40535
39932
  type: "email",
40536
- value: String(currentValue2),
39933
+ value: String(currentValue),
40537
39934
  onChange: (e) => handleChange(fieldName, e.target.value),
40538
39935
  minLength: field.min,
40539
39936
  maxLength: field.max
@@ -40545,7 +39942,7 @@ var init_Form = __esm({
40545
39942
  {
40546
39943
  ...commonProps,
40547
39944
  type: "url",
40548
- value: String(currentValue2),
39945
+ value: String(currentValue),
40549
39946
  onChange: (e) => handleChange(fieldName, e.target.value),
40550
39947
  minLength: field.min,
40551
39948
  maxLength: field.max
@@ -40557,7 +39954,7 @@ var init_Form = __esm({
40557
39954
  {
40558
39955
  ...commonProps,
40559
39956
  type: "password",
40560
- value: String(currentValue2),
39957
+ value: String(currentValue),
40561
39958
  onChange: (e) => handleChange(fieldName, e.target.value),
40562
39959
  minLength: field.min,
40563
39960
  maxLength: field.max
@@ -40570,7 +39967,7 @@ var init_Form = __esm({
40570
39967
  {
40571
39968
  ...commonProps,
40572
39969
  type: "text",
40573
- value: String(currentValue2),
39970
+ value: String(currentValue),
40574
39971
  onChange: (e) => handleChange(fieldName, e.target.value),
40575
39972
  minLength: field.min,
40576
39973
  maxLength: field.max
@@ -41669,7 +41066,7 @@ var init_List = __esm({
41669
41066
  if (entity && typeof entity === "object" && "id" in entity) return [entity];
41670
41067
  return [];
41671
41068
  }, [entity]);
41672
- const getItemActions = React89__default.useCallback(
41069
+ const getItemActions = React87__default.useCallback(
41673
41070
  (item) => {
41674
41071
  if (!itemActions) return [];
41675
41072
  if (typeof itemActions === "function") {
@@ -42145,7 +41542,7 @@ var init_MediaGallery = __esm({
42145
41542
  [selectable, selectedItems, selectionEvent, eventBus]
42146
41543
  );
42147
41544
  const entityData = Array.isArray(entity) ? entity : [];
42148
- const items = React89__default.useMemo(() => {
41545
+ const items = React87__default.useMemo(() => {
42149
41546
  if (propItems) return propItems;
42150
41547
  if (entityData.length === 0) return [];
42151
41548
  return entityData.map((record, idx) => ({
@@ -42306,7 +41703,7 @@ var init_MediaGallery = __esm({
42306
41703
  }
42307
41704
  });
42308
41705
  function extractTitle2(children) {
42309
- if (!React89__default.isValidElement(children)) return void 0;
41706
+ if (!React87__default.isValidElement(children)) return void 0;
42310
41707
  const props = children.props;
42311
41708
  if (typeof props.title === "string") {
42312
41709
  return props.title;
@@ -42718,7 +42115,7 @@ var init_debugRegistry = __esm({
42718
42115
  }
42719
42116
  });
42720
42117
  function useDebugData() {
42721
- const [data, setData] = React89.useState(() => ({
42118
+ const [data, setData] = React87.useState(() => ({
42722
42119
  traits: [],
42723
42120
  ticks: [],
42724
42121
  guards: [],
@@ -42732,7 +42129,7 @@ function useDebugData() {
42732
42129
  },
42733
42130
  lastUpdate: Date.now()
42734
42131
  }));
42735
- React89.useEffect(() => {
42132
+ React87.useEffect(() => {
42736
42133
  const updateData = () => {
42737
42134
  setData({
42738
42135
  traits: getAllTraits(),
@@ -42841,12 +42238,12 @@ function layoutGraph(states, transitions, initialState, width, height) {
42841
42238
  return positions;
42842
42239
  }
42843
42240
  function WalkMinimap() {
42844
- const [walkStep, setWalkStep] = React89.useState(null);
42845
- const [traits2, setTraits] = React89.useState([]);
42846
- const [coveredEdges, setCoveredEdges] = React89.useState([]);
42847
- const [completedTraits, setCompletedTraits] = React89.useState(/* @__PURE__ */ new Set());
42848
- const prevTraitRef = React89.useRef(null);
42849
- React89.useEffect(() => {
42241
+ const [walkStep, setWalkStep] = React87.useState(null);
42242
+ const [traits2, setTraits] = React87.useState([]);
42243
+ const [coveredEdges, setCoveredEdges] = React87.useState([]);
42244
+ const [completedTraits, setCompletedTraits] = React87.useState(/* @__PURE__ */ new Set());
42245
+ const prevTraitRef = React87.useRef(null);
42246
+ React87.useEffect(() => {
42850
42247
  const interval = setInterval(() => {
42851
42248
  const w = window;
42852
42249
  const step = w.__orbitalWalkStep;
@@ -43282,15 +42679,15 @@ var init_EntitiesTab = __esm({
43282
42679
  });
43283
42680
  function EventFlowTab({ events: events2 }) {
43284
42681
  const { t } = useTranslate();
43285
- const [filter, setFilter] = React89.useState("all");
43286
- const containerRef = React89.useRef(null);
43287
- const [autoScroll, setAutoScroll] = React89.useState(true);
43288
- React89.useEffect(() => {
42682
+ const [filter, setFilter] = React87.useState("all");
42683
+ const containerRef = React87.useRef(null);
42684
+ const [autoScroll, setAutoScroll] = React87.useState(true);
42685
+ React87.useEffect(() => {
43289
42686
  if (autoScroll && containerRef.current) {
43290
42687
  containerRef.current.scrollTop = containerRef.current.scrollHeight;
43291
42688
  }
43292
42689
  }, [events2.length, autoScroll]);
43293
- const filteredEvents = React89.useMemo(() => {
42690
+ const filteredEvents = React87.useMemo(() => {
43294
42691
  if (filter === "all") return events2;
43295
42692
  return events2.filter((e) => e.type === filter);
43296
42693
  }, [events2, filter]);
@@ -43406,7 +42803,7 @@ var init_EventFlowTab = __esm({
43406
42803
  });
43407
42804
  function GuardsPanel({ guards }) {
43408
42805
  const { t } = useTranslate();
43409
- const [filter, setFilter] = React89.useState("all");
42806
+ const [filter, setFilter] = React87.useState("all");
43410
42807
  if (guards.length === 0) {
43411
42808
  return /* @__PURE__ */ jsx(
43412
42809
  EmptyState,
@@ -43419,7 +42816,7 @@ function GuardsPanel({ guards }) {
43419
42816
  }
43420
42817
  const passedCount = guards.filter((g) => g.result).length;
43421
42818
  const failedCount = guards.length - passedCount;
43422
- const filteredGuards = React89.useMemo(() => {
42819
+ const filteredGuards = React87.useMemo(() => {
43423
42820
  if (filter === "all") return guards;
43424
42821
  if (filter === "passed") return guards.filter((g) => g.result);
43425
42822
  return guards.filter((g) => !g.result);
@@ -43582,10 +42979,10 @@ function EffectBadge({ effect }) {
43582
42979
  }
43583
42980
  function TransitionTimeline({ transitions }) {
43584
42981
  const { t } = useTranslate();
43585
- const containerRef = React89.useRef(null);
43586
- const [autoScroll, setAutoScroll] = React89.useState(true);
43587
- const [expandedId, setExpandedId] = React89.useState(null);
43588
- React89.useEffect(() => {
42982
+ const containerRef = React87.useRef(null);
42983
+ const [autoScroll, setAutoScroll] = React87.useState(true);
42984
+ const [expandedId, setExpandedId] = React87.useState(null);
42985
+ React87.useEffect(() => {
43589
42986
  if (autoScroll && containerRef.current) {
43590
42987
  containerRef.current.scrollTop = containerRef.current.scrollHeight;
43591
42988
  }
@@ -43865,9 +43262,9 @@ function getAllEvents(traits2) {
43865
43262
  function EventDispatcherTab({ traits: traits2, schema }) {
43866
43263
  const eventBus = useEventBus();
43867
43264
  const { t } = useTranslate();
43868
- const [log12, setLog] = React89.useState([]);
43869
- const prevStatesRef = React89.useRef(/* @__PURE__ */ new Map());
43870
- React89.useEffect(() => {
43265
+ const [log12, setLog] = React87.useState([]);
43266
+ const prevStatesRef = React87.useRef(/* @__PURE__ */ new Map());
43267
+ React87.useEffect(() => {
43871
43268
  for (const trait of traits2) {
43872
43269
  const prev = prevStatesRef.current.get(trait.id);
43873
43270
  if (prev && prev !== trait.currentState) {
@@ -44036,10 +43433,10 @@ function VerifyModePanel({
44036
43433
  localCount
44037
43434
  }) {
44038
43435
  const { t } = useTranslate();
44039
- const [expanded, setExpanded] = React89.useState(true);
44040
- const scrollRef = React89.useRef(null);
44041
- const prevCountRef = React89.useRef(0);
44042
- React89.useEffect(() => {
43436
+ const [expanded, setExpanded] = React87.useState(true);
43437
+ const scrollRef = React87.useRef(null);
43438
+ const prevCountRef = React87.useRef(0);
43439
+ React87.useEffect(() => {
44043
43440
  if (expanded && transitions.length > prevCountRef.current && scrollRef.current) {
44044
43441
  scrollRef.current.scrollTop = scrollRef.current.scrollHeight;
44045
43442
  }
@@ -44096,10 +43493,10 @@ function RuntimeDebugger({
44096
43493
  schema
44097
43494
  }) {
44098
43495
  const { t } = useTranslate();
44099
- const [isCollapsed, setIsCollapsed] = React89.useState(mode === "verify" ? true : defaultCollapsed);
44100
- const [isVisible, setIsVisible] = React89.useState(mode === "inline" || mode === "verify" || isDebugEnabled2());
43496
+ const [isCollapsed, setIsCollapsed] = React87.useState(mode === "verify" ? true : defaultCollapsed);
43497
+ const [isVisible, setIsVisible] = React87.useState(mode === "inline" || mode === "verify" || isDebugEnabled2());
44101
43498
  const debugData = useDebugData();
44102
- React89.useEffect(() => {
43499
+ React87.useEffect(() => {
44103
43500
  if (mode === "inline") return;
44104
43501
  return onDebugToggle((enabled) => {
44105
43502
  setIsVisible(enabled);
@@ -44108,7 +43505,7 @@ function RuntimeDebugger({
44108
43505
  }
44109
43506
  });
44110
43507
  }, [mode]);
44111
- React89.useEffect(() => {
43508
+ React87.useEffect(() => {
44112
43509
  if (mode === "inline") return;
44113
43510
  const handleKeyDown = (e) => {
44114
43511
  if (e.key === "`" && isVisible) {
@@ -44557,7 +43954,7 @@ function SequenceBar({
44557
43954
  onSlotRemove(index);
44558
43955
  }, [onSlotRemove, playing]);
44559
43956
  const paddedSlots = Array.from({ length: maxSlots }, (_, i) => slots[i]);
44560
- return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(React89__default.Fragment, { children: [
43957
+ return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(React87__default.Fragment, { children: [
44561
43958
  i > 0 && /* @__PURE__ */ jsx(
44562
43959
  Typography,
44563
43960
  {
@@ -45515,7 +44912,7 @@ var init_StatCard = __esm({
45515
44912
  title: propTitle,
45516
44913
  value: propValue,
45517
44914
  previousValue,
45518
- currentValue: currentValue2,
44915
+ currentValue,
45519
44916
  trend: manualTrend,
45520
44917
  trendDirection: manualDirection,
45521
44918
  invertTrend = false,
@@ -45536,7 +44933,7 @@ var init_StatCard = __esm({
45536
44933
  const labelToUse = propLabel ?? propTitle;
45537
44934
  const eventBus = useEventBus();
45538
44935
  const { t } = useTranslate();
45539
- const handleActionClick = React89__default.useCallback(() => {
44936
+ const handleActionClick = React87__default.useCallback(() => {
45540
44937
  if (action?.event) {
45541
44938
  eventBus.emit(`UI:${action.event}`, {});
45542
44939
  }
@@ -45547,7 +44944,7 @@ var init_StatCard = __esm({
45547
44944
  const data = Array.isArray(entity) ? entity : entity ? [entity] : [];
45548
44945
  const isLoading = externalLoading ?? false;
45549
44946
  const error = externalError;
45550
- const computeMetricValue = React89__default.useCallback(
44947
+ const computeMetricValue = React87__default.useCallback(
45551
44948
  (metric, items) => {
45552
44949
  if (metric.value !== void 0) {
45553
44950
  return metric.value;
@@ -45586,7 +44983,7 @@ var init_StatCard = __esm({
45586
44983
  },
45587
44984
  []
45588
44985
  );
45589
- const schemaStats = React89__default.useMemo(() => {
44986
+ const schemaStats = React87__default.useMemo(() => {
45590
44987
  if (!metrics || metrics.length === 0) return null;
45591
44988
  return metrics.map((metric) => ({
45592
44989
  label: metric.label,
@@ -45594,13 +44991,13 @@ var init_StatCard = __esm({
45594
44991
  format: metric.format
45595
44992
  }));
45596
44993
  }, [metrics, data, computeMetricValue]);
45597
- const calculatedTrend = React89__default.useMemo(() => {
44994
+ const calculatedTrend = React87__default.useMemo(() => {
45598
44995
  if (manualTrend !== void 0) return manualTrend;
45599
- if (previousValue === void 0 || currentValue2 === void 0)
44996
+ if (previousValue === void 0 || currentValue === void 0)
45600
44997
  return void 0;
45601
- if (previousValue === 0) return currentValue2 > 0 ? 100 : 0;
45602
- return (currentValue2 - previousValue) / previousValue * 100;
45603
- }, [manualTrend, previousValue, currentValue2]);
44998
+ if (previousValue === 0) return currentValue > 0 ? 100 : 0;
44999
+ return (currentValue - previousValue) / previousValue * 100;
45000
+ }, [manualTrend, previousValue, currentValue]);
45604
45001
  if (schemaStats && schemaStats.length > 1) {
45605
45002
  if (isLoading) {
45606
45003
  return /* @__PURE__ */ jsx(
@@ -46528,7 +45925,7 @@ var init_Timeline = __esm({
46528
45925
  }) => {
46529
45926
  const { t } = useTranslate();
46530
45927
  const entityData = Array.isArray(entity) ? entity : [];
46531
- const items = React89__default.useMemo(() => {
45928
+ const items = React87__default.useMemo(() => {
46532
45929
  if (propItems) return propItems;
46533
45930
  if (entityData.length === 0) return [];
46534
45931
  return entityData.map((record, idx) => {
@@ -46635,7 +46032,7 @@ var init_Timeline = __esm({
46635
46032
  }
46636
46033
  });
46637
46034
  function extractToastProps(children) {
46638
- if (!React89__default.isValidElement(children)) {
46035
+ if (!React87__default.isValidElement(children)) {
46639
46036
  if (typeof children === "string") {
46640
46037
  return { message: children };
46641
46038
  }
@@ -46673,7 +46070,7 @@ var init_ToastSlot = __esm({
46673
46070
  eventBus.emit("UI:CLOSE");
46674
46071
  };
46675
46072
  if (!isVisible) return null;
46676
- const isCustomContent = React89__default.isValidElement(children) && !message;
46073
+ const isCustomContent = React87__default.isValidElement(children) && !message;
46677
46074
  return /* @__PURE__ */ jsx(Box, { className: "fixed bottom-4 right-4 z-50", children: isCustomContent ? children : /* @__PURE__ */ jsx(
46678
46075
  Toast,
46679
46076
  {
@@ -47183,12 +46580,12 @@ var init_WorldMapTemplate = __esm({
47183
46580
  }
47184
46581
  });
47185
46582
  function lazyThree(name, loader) {
47186
- const Lazy = React89__default.lazy(() => loader().then((m) => ({ default: m[name] })));
46583
+ const Lazy = React87__default.lazy(() => loader().then((m) => ({ default: m[name] })));
47187
46584
  function ThreeWrapper(props) {
47188
- return React89__default.createElement(
47189
- React89__default.Suspense,
46585
+ return React87__default.createElement(
46586
+ React87__default.Suspense,
47190
46587
  { fallback: null },
47191
- React89__default.createElement(Lazy, props)
46588
+ React87__default.createElement(Lazy, props)
47192
46589
  );
47193
46590
  }
47194
46591
  ThreeWrapper.displayName = `Lazy(${name})`;
@@ -47208,7 +46605,6 @@ var init_component_registry_generated = __esm({
47208
46605
  init_AnimatedReveal();
47209
46606
  init_ArticleSection();
47210
46607
  init_Aside();
47211
- init_AssetPicker();
47212
46608
  init_AuthLayout();
47213
46609
  init_BattleBoard();
47214
46610
  init_BattleTemplate();
@@ -47308,13 +46704,11 @@ var init_component_registry_generated = __esm({
47308
46704
  init_GradientDivider();
47309
46705
  init_GraphCanvas();
47310
46706
  init_GraphView();
47311
- init_GridPicker();
47312
46707
  init_Header();
47313
46708
  init_HealthBar();
47314
46709
  init_HealthPanel();
47315
46710
  init_HeroOrganism();
47316
46711
  init_HeroSection();
47317
- init_IconPicker();
47318
46712
  init_InfiniteScrollSentinel();
47319
46713
  init_InputGroup();
47320
46714
  init_InstallBox();
@@ -47359,7 +46753,6 @@ var init_component_registry_generated = __esm({
47359
46753
  init_PricingOrganism();
47360
46754
  init_PricingPageTemplate();
47361
46755
  init_ProgressDots();
47362
- init_PropertyInspector();
47363
46756
  init_PullQuote();
47364
46757
  init_PullToRefresh();
47365
46758
  init_QrScanner();
@@ -47483,7 +46876,6 @@ var init_component_registry_generated = __esm({
47483
46876
  "AnimatedReveal": AnimatedReveal,
47484
46877
  "ArticleSection": ArticleSection,
47485
46878
  "Aside": Aside,
47486
- "AssetPicker": AssetPicker,
47487
46879
  "AuthLayout": AuthLayout,
47488
46880
  "Avatar": AvatarPattern,
47489
46881
  "AvatarPattern": AvatarPattern,
@@ -47603,7 +46995,6 @@ var init_component_registry_generated = __esm({
47603
46995
  "GraphView": GraphView,
47604
46996
  "Grid": GridPattern,
47605
46997
  "GridPattern": GridPattern,
47606
- "GridPicker": GridPicker,
47607
46998
  "HStack": HStackPattern,
47608
46999
  "HStackPattern": HStackPattern,
47609
47000
  "Header": Header,
@@ -47613,7 +47004,6 @@ var init_component_registry_generated = __esm({
47613
47004
  "HeroSection": HeroSection,
47614
47005
  "Icon": IconPattern,
47615
47006
  "IconPattern": IconPattern,
47616
- "IconPicker": IconPicker,
47617
47007
  "InfiniteScrollSentinel": InfiniteScrollSentinel,
47618
47008
  "Input": InputPattern,
47619
47009
  "InputGroup": InputGroup,
@@ -47670,7 +47060,6 @@ var init_component_registry_generated = __esm({
47670
47060
  "ProgressBar": ProgressBarPattern,
47671
47061
  "ProgressBarPattern": ProgressBarPattern,
47672
47062
  "ProgressDots": ProgressDots,
47673
- "PropertyInspector": PropertyInspector,
47674
47063
  "PullQuote": PullQuote,
47675
47064
  "PullToRefresh": PullToRefresh,
47676
47065
  "QrScanner": QrScanner,
@@ -47812,7 +47201,7 @@ function SuspenseConfigProvider({
47812
47201
  config,
47813
47202
  children
47814
47203
  }) {
47815
- return React89__default.createElement(
47204
+ return React87__default.createElement(
47816
47205
  SuspenseConfigContext.Provider,
47817
47206
  { value: config },
47818
47207
  children
@@ -48302,7 +47691,7 @@ function renderPatternChildren(children, onDismiss, parentId = "root", parentPat
48302
47691
  const key = `${parentId}-${index}-trait:${traitName}`;
48303
47692
  return /* @__PURE__ */ jsx(TraitFrame, { traitName }, key);
48304
47693
  }
48305
- return /* @__PURE__ */ jsx(React89__default.Fragment, { children: child }, `${parentId}-${index}`);
47694
+ return /* @__PURE__ */ jsx(React87__default.Fragment, { children: child }, `${parentId}-${index}`);
48306
47695
  }
48307
47696
  if (!child || typeof child !== "object") return null;
48308
47697
  const childId = `${parentId}-${index}`;
@@ -48342,14 +47731,14 @@ function isPatternConfig(value) {
48342
47731
  if (value === null || value === void 0) return false;
48343
47732
  if (typeof value !== "object") return false;
48344
47733
  if (Array.isArray(value)) return false;
48345
- if (React89__default.isValidElement(value)) return false;
47734
+ if (React87__default.isValidElement(value)) return false;
48346
47735
  if (value instanceof Date) return false;
48347
47736
  if (typeof value === "function") return false;
48348
47737
  const record = value;
48349
47738
  return "type" in record && typeof record.type === "string";
48350
47739
  }
48351
47740
  function isPlainConfigObject(value) {
48352
- if (React89__default.isValidElement(value)) return false;
47741
+ if (React87__default.isValidElement(value)) return false;
48353
47742
  if (value instanceof Date) return false;
48354
47743
  const proto = Object.getPrototypeOf(value);
48355
47744
  return proto === Object.prototype || proto === null;