@almadar/ui 5.23.0 → 5.25.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. package/dist/avl/index.cjs +2034 -1393
  2. package/dist/avl/index.js +968 -327
  3. package/dist/components/core/molecules/AssetPicker.d.ts +21 -0
  4. package/dist/components/core/molecules/CodeViewer.d.ts +3 -2
  5. package/dist/components/core/molecules/DocCodeBlock.d.ts +2 -1
  6. package/dist/components/core/molecules/GridPicker.d.ts +44 -0
  7. package/dist/components/core/molecules/IconPicker.d.ts +18 -0
  8. package/dist/components/core/molecules/PropertyInspector.d.ts +5 -2
  9. package/dist/components/core/molecules/RichBlockEditor.d.ts +7 -0
  10. package/dist/components/core/molecules/index.d.ts +6 -3
  11. package/dist/components/core/molecules/markdown/CodeBlock.d.ts +15 -1
  12. package/dist/components/core/molecules/markdown/index.d.ts +1 -1
  13. package/dist/components/core/organisms/index.d.ts +5 -5
  14. package/dist/components/core/templates/index.d.ts +1 -1
  15. package/dist/components/index.cjs +1588 -1192
  16. package/dist/components/index.js +687 -291
  17. package/dist/components/{core → marketing}/organisms/CaseStudyOrganism.d.ts +1 -1
  18. package/dist/components/{core → marketing}/organisms/FeatureGridOrganism.d.ts +1 -1
  19. package/dist/components/{core → marketing}/organisms/HeroOrganism.d.ts +1 -1
  20. package/dist/components/{core → marketing}/organisms/ShowcaseOrganism.d.ts +1 -1
  21. package/dist/components/{core → marketing}/organisms/StepFlowOrganism.d.ts +1 -1
  22. package/dist/docs/index.d.cts +20 -1
  23. package/dist/marketing/index.cjs +8 -5
  24. package/dist/marketing/index.d.ts +4 -4
  25. package/dist/marketing/index.js +8 -5
  26. package/dist/providers/index.cjs +1857 -1216
  27. package/dist/providers/index.js +942 -301
  28. package/dist/runtime/index.cjs +1897 -1256
  29. package/dist/runtime/index.js +946 -305
  30. package/package.json +2 -2
  31. /package/dist/components/{core → marketing}/molecules/MarketingFooter.d.ts +0 -0
  32. /package/dist/components/{core → marketing}/molecules/PullQuote.d.ts +0 -0
  33. /package/dist/components/{core → marketing}/templates/AuthLayout.d.ts +0 -0
@@ -1,5 +1,5 @@
1
- import * as React85 from 'react';
2
- import React85__default, { createContext, useContext, useMemo, useRef, useEffect, useCallback, Suspense, useState, useLayoutEffect, lazy, useId, useSyncExternalStore } from 'react';
1
+ import * as React89 from 'react';
2
+ import React89__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 = React85__default.forwardRef(
660
+ Box = React89__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 React85__default.createElement(
710
+ return React89__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 = React85__default.useMemo(() => {
1493
+ const RenderedComponent = React89__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 (React85__default.isValidElement(value)) {
1551
+ if (React89__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 = React85__default.forwardRef(
1627
+ Button = React89__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 = React85__default.forwardRef(
1692
+ Dialog = React89__default.forwardRef(
1693
1693
  ({
1694
1694
  role = "dialog",
1695
1695
  "aria-modal": ariaModal = true,
@@ -2214,7 +2214,7 @@ var init_Drawer = __esm({
2214
2214
  };
2215
2215
  const widthClass = width in sizeWidths ? sizeWidths[width] : "";
2216
2216
  const widthStyle = width in sizeWidths ? void 0 : { width };
2217
- const positionClasses3 = position === "right" ? "right-0 border-l" : "left-0 border-r";
2217
+ const positionClasses = position === "right" ? "right-0 border-l" : "left-0 border-r";
2218
2218
  const animationClasses2 = position === "right" ? "animate-slide-in-right" : "animate-slide-in-left";
2219
2219
  return /* @__PURE__ */ jsxs(Fragment, { children: [
2220
2220
  /* @__PURE__ */ jsx(
@@ -2235,7 +2235,7 @@ var init_Drawer = __esm({
2235
2235
  className: cn(
2236
2236
  "fixed top-0 bottom-0 z-50",
2237
2237
  "flex flex-col max-h-screen",
2238
- positionClasses3,
2238
+ positionClasses,
2239
2239
  widthClass,
2240
2240
  animationClasses2,
2241
2241
  className
@@ -2353,7 +2353,7 @@ var init_Badge = __esm({
2353
2353
  md: "px-2.5 py-1 text-sm",
2354
2354
  lg: "px-3 py-1.5 text-base"
2355
2355
  };
2356
- Badge = React85__default.forwardRef(
2356
+ Badge = React89__default.forwardRef(
2357
2357
  ({ className, variant = "default", size = "sm", amount, label, icon, children, onRemove, removeLabel, ...props }, ref) => {
2358
2358
  const iconSizes3 = {
2359
2359
  sm: "h-icon-default w-icon-default",
@@ -2669,7 +2669,7 @@ var init_SvgFlow = __esm({
2669
2669
  opacity = 1,
2670
2670
  className
2671
2671
  }) => {
2672
- const markerId = React85__default.useMemo(() => {
2672
+ const markerId = React89__default.useMemo(() => {
2673
2673
  flowIdCounter += 1;
2674
2674
  return `almadar-flow-arrow-${flowIdCounter}`;
2675
2675
  }, []);
@@ -3212,7 +3212,7 @@ var init_SvgRing = __esm({
3212
3212
  className,
3213
3213
  label
3214
3214
  }) => {
3215
- const gradientId = React85__default.useMemo(() => {
3215
+ const gradientId = React89__default.useMemo(() => {
3216
3216
  ringIdCounter += 1;
3217
3217
  return `almadar-ring-glow-${ringIdCounter}`;
3218
3218
  }, []);
@@ -3374,7 +3374,7 @@ var init_Input = __esm({
3374
3374
  "components/core/atoms/Input.tsx"() {
3375
3375
  init_cn();
3376
3376
  init_Icon();
3377
- Input = React85__default.forwardRef(
3377
+ Input = React89__default.forwardRef(
3378
3378
  ({
3379
3379
  className,
3380
3380
  inputType,
@@ -3495,7 +3495,7 @@ var Label;
3495
3495
  var init_Label = __esm({
3496
3496
  "components/core/atoms/Label.tsx"() {
3497
3497
  init_cn();
3498
- Label = React85__default.forwardRef(
3498
+ Label = React89__default.forwardRef(
3499
3499
  ({ className, required, children, ...props }, ref) => {
3500
3500
  return /* @__PURE__ */ jsxs(
3501
3501
  "label",
@@ -3521,7 +3521,7 @@ var Textarea;
3521
3521
  var init_Textarea = __esm({
3522
3522
  "components/core/atoms/Textarea.tsx"() {
3523
3523
  init_cn();
3524
- Textarea = React85__default.forwardRef(
3524
+ Textarea = React89__default.forwardRef(
3525
3525
  ({ className, error, ...props }, ref) => {
3526
3526
  return /* @__PURE__ */ jsx(
3527
3527
  "textarea",
@@ -3551,7 +3551,7 @@ var init_Select = __esm({
3551
3551
  "components/core/atoms/Select.tsx"() {
3552
3552
  init_cn();
3553
3553
  init_Icon();
3554
- Select = React85__default.forwardRef(
3554
+ Select = React89__default.forwardRef(
3555
3555
  ({ className, options, placeholder, error, ...props }, ref) => {
3556
3556
  return /* @__PURE__ */ jsxs("div", { className: "relative", children: [
3557
3557
  /* @__PURE__ */ jsxs(
@@ -3593,7 +3593,7 @@ var Checkbox;
3593
3593
  var init_Checkbox = __esm({
3594
3594
  "components/core/atoms/Checkbox.tsx"() {
3595
3595
  init_cn();
3596
- Checkbox = React85__default.forwardRef(
3596
+ Checkbox = React89__default.forwardRef(
3597
3597
  ({ className, label, id, ...props }, ref) => {
3598
3598
  const inputId = id || `checkbox-${Math.random().toString(36).substr(2, 9)}`;
3599
3599
  return /* @__PURE__ */ jsxs("div", { className: "flex items-center", children: [
@@ -3684,7 +3684,7 @@ var init_Card = __esm({
3684
3684
  chip: "shadow-none rounded-pill border-[length:var(--border-width)] border-border",
3685
3685
  "tile-image-first": "p-0 overflow-hidden"
3686
3686
  };
3687
- Card = React85__default.forwardRef(
3687
+ Card = React89__default.forwardRef(
3688
3688
  ({
3689
3689
  className,
3690
3690
  variant = "bordered",
@@ -3722,9 +3722,9 @@ var init_Card = __esm({
3722
3722
  }
3723
3723
  );
3724
3724
  Card.displayName = "Card";
3725
- CardHeader = React85__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("mb-4", className), ...props }));
3725
+ CardHeader = React89__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("mb-4", className), ...props }));
3726
3726
  CardHeader.displayName = "CardHeader";
3727
- CardTitle = React85__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
3727
+ CardTitle = React89__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
3728
3728
  "h3",
3729
3729
  {
3730
3730
  ref,
@@ -3737,11 +3737,11 @@ var init_Card = __esm({
3737
3737
  }
3738
3738
  ));
3739
3739
  CardTitle.displayName = "CardTitle";
3740
- CardContent = React85__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("", className), ...props }));
3740
+ CardContent = React89__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("", className), ...props }));
3741
3741
  CardContent.displayName = "CardContent";
3742
3742
  CardBody = CardContent;
3743
3743
  CardBody.displayName = "CardBody";
3744
- CardFooter = React85__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
3744
+ CardFooter = React89__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
3745
3745
  "div",
3746
3746
  {
3747
3747
  ref,
@@ -3796,7 +3796,7 @@ var init_FilterPill = __esm({
3796
3796
  md: "w-3.5 h-3.5",
3797
3797
  lg: "w-4 h-4"
3798
3798
  };
3799
- FilterPill = React85__default.forwardRef(
3799
+ FilterPill = React89__default.forwardRef(
3800
3800
  ({
3801
3801
  className,
3802
3802
  variant = "default",
@@ -3873,7 +3873,7 @@ var init_Spinner = __esm({
3873
3873
  md: "h-6 w-6",
3874
3874
  lg: "h-8 w-8"
3875
3875
  };
3876
- Spinner = React85__default.forwardRef(
3876
+ Spinner = React89__default.forwardRef(
3877
3877
  ({ className, size = "md", ...props }, ref) => {
3878
3878
  return /* @__PURE__ */ jsx(
3879
3879
  "div",
@@ -3952,11 +3952,15 @@ var init_Avatar = __esm({
3952
3952
  actionPayload
3953
3953
  }) => {
3954
3954
  const eventBus = useEventBus();
3955
+ const [imgFailed, setImgFailed] = React89__default.useState(false);
3956
+ React89__default.useEffect(() => {
3957
+ setImgFailed(false);
3958
+ }, [src]);
3955
3959
  const initials = providedInitials ?? (name ? generateInitials(name) : void 0);
3956
3960
  const IconComponent = typeof iconProp === "string" ? resolveIcon(iconProp) : iconProp;
3957
- const hasImage = !!src;
3958
- const hasInitials = !!initials;
3961
+ const hasImage = !!src && !imgFailed;
3959
3962
  const hasIcon = !!IconComponent;
3963
+ const hasInitials = !!initials && !(hasIcon && !providedInitials);
3960
3964
  const getInitialsBackground = () => "bg-primary text-primary-foreground";
3961
3965
  const isClickable = action || onClick;
3962
3966
  const handleClick = () => {
@@ -3986,9 +3990,8 @@ var init_Avatar = __esm({
3986
3990
  src,
3987
3991
  alt: alt || "Avatar",
3988
3992
  className: "w-full h-full object-cover",
3989
- onError: (e) => {
3990
- const target = e.target;
3991
- target.style.display = "none";
3993
+ onError: () => {
3994
+ setImgFailed(true);
3992
3995
  }
3993
3996
  }
3994
3997
  ) : hasInitials ? /* @__PURE__ */ jsx(
@@ -4335,7 +4338,7 @@ var init_Radio = __esm({
4335
4338
  md: "w-2.5 h-2.5",
4336
4339
  lg: "w-3 h-3"
4337
4340
  };
4338
- Radio = React85__default.forwardRef(
4341
+ Radio = React89__default.forwardRef(
4339
4342
  ({
4340
4343
  label,
4341
4344
  helperText,
@@ -4352,12 +4355,12 @@ var init_Radio = __esm({
4352
4355
  onChange,
4353
4356
  ...props
4354
4357
  }, ref) => {
4355
- const reactId = React85__default.useId();
4358
+ const reactId = React89__default.useId();
4356
4359
  const baseId = id || `radio-${reactId}`;
4357
4360
  const hasError = !!error;
4358
4361
  const eventBus = useEventBus();
4359
- const [selected, setSelected] = React85__default.useState(value);
4360
- React85__default.useEffect(() => {
4362
+ const [selected, setSelected] = React89__default.useState(value);
4363
+ React89__default.useEffect(() => {
4361
4364
  if (value !== void 0) setSelected(value);
4362
4365
  }, [value]);
4363
4366
  const pick = (next, e) => {
@@ -4539,7 +4542,7 @@ var init_Switch = __esm({
4539
4542
  "components/core/atoms/Switch.tsx"() {
4540
4543
  "use client";
4541
4544
  init_cn();
4542
- Switch = React85.forwardRef(
4545
+ Switch = React89.forwardRef(
4543
4546
  ({
4544
4547
  checked,
4545
4548
  defaultChecked = false,
@@ -4550,10 +4553,10 @@ var init_Switch = __esm({
4550
4553
  name,
4551
4554
  className
4552
4555
  }, ref) => {
4553
- const [isChecked, setIsChecked] = React85.useState(
4556
+ const [isChecked, setIsChecked] = React89.useState(
4554
4557
  checked !== void 0 ? checked : defaultChecked
4555
4558
  );
4556
- React85.useEffect(() => {
4559
+ React89.useEffect(() => {
4557
4560
  if (checked !== void 0) {
4558
4561
  setIsChecked(checked);
4559
4562
  }
@@ -4909,7 +4912,7 @@ var Aside;
4909
4912
  var init_Aside = __esm({
4910
4913
  "components/core/atoms/Aside.tsx"() {
4911
4914
  init_cn();
4912
- Aside = React85__default.forwardRef(
4915
+ Aside = React89__default.forwardRef(
4913
4916
  ({ className, children, ...rest }, ref) => /* @__PURE__ */ jsx("aside", { ref, className: cn(className), ...rest, children })
4914
4917
  );
4915
4918
  Aside.displayName = "Aside";
@@ -4987,8 +4990,8 @@ var init_LawReferenceTooltip = __esm({
4987
4990
  className
4988
4991
  }) => {
4989
4992
  const { t } = useTranslate();
4990
- const [isVisible, setIsVisible] = React85__default.useState(false);
4991
- const timeoutRef = React85__default.useRef(null);
4993
+ const [isVisible, setIsVisible] = React89__default.useState(false);
4994
+ const timeoutRef = React89__default.useRef(null);
4992
4995
  const handleMouseEnter = () => {
4993
4996
  if (timeoutRef.current) clearTimeout(timeoutRef.current);
4994
4997
  timeoutRef.current = setTimeout(() => setIsVisible(true), 200);
@@ -4997,7 +5000,7 @@ var init_LawReferenceTooltip = __esm({
4997
5000
  if (timeoutRef.current) clearTimeout(timeoutRef.current);
4998
5001
  setIsVisible(false);
4999
5002
  };
5000
- React85__default.useEffect(() => {
5003
+ React89__default.useEffect(() => {
5001
5004
  return () => {
5002
5005
  if (timeoutRef.current) clearTimeout(timeoutRef.current);
5003
5006
  };
@@ -5207,7 +5210,7 @@ var init_StatusDot = __esm({
5207
5210
  md: "w-2.5 h-2.5",
5208
5211
  lg: "w-3 h-3"
5209
5212
  };
5210
- StatusDot = React85__default.forwardRef(
5213
+ StatusDot = React89__default.forwardRef(
5211
5214
  ({ className, status = "offline", pulse = false, size = "md", label, ...props }, ref) => {
5212
5215
  return /* @__PURE__ */ jsx(
5213
5216
  "span",
@@ -5261,7 +5264,7 @@ var init_TrendIndicator = __esm({
5261
5264
  down: "trending-down",
5262
5265
  flat: "arrow-right"
5263
5266
  };
5264
- TrendIndicator = React85__default.forwardRef(
5267
+ TrendIndicator = React89__default.forwardRef(
5265
5268
  ({
5266
5269
  className,
5267
5270
  value,
@@ -5328,7 +5331,7 @@ var init_RangeSlider = __esm({
5328
5331
  md: "w-4 h-4",
5329
5332
  lg: "w-5 h-5"
5330
5333
  };
5331
- RangeSlider = React85__default.forwardRef(
5334
+ RangeSlider = React89__default.forwardRef(
5332
5335
  ({
5333
5336
  className,
5334
5337
  min = 0,
@@ -5836,7 +5839,7 @@ var init_ContentSection = __esm({
5836
5839
  md: "py-16",
5837
5840
  lg: "py-24"
5838
5841
  };
5839
- ContentSection = React85__default.forwardRef(
5842
+ ContentSection = React89__default.forwardRef(
5840
5843
  ({ children, background = "default", padding = "lg", id, className }, ref) => {
5841
5844
  return /* @__PURE__ */ jsx(
5842
5845
  Box,
@@ -6370,7 +6373,7 @@ var init_AnimatedReveal = __esm({
6370
6373
  "scale-up": { opacity: 1, transform: "scale(1) translateY(0)" },
6371
6374
  "none": {}
6372
6375
  };
6373
- AnimatedReveal = React85__default.forwardRef(
6376
+ AnimatedReveal = React89__default.forwardRef(
6374
6377
  ({
6375
6378
  trigger = "scroll",
6376
6379
  animation = "fade-up",
@@ -6530,7 +6533,7 @@ var init_AnimatedGraphic = __esm({
6530
6533
  "components/marketing/atoms/AnimatedGraphic.tsx"() {
6531
6534
  "use client";
6532
6535
  init_cn();
6533
- AnimatedGraphic = React85__default.forwardRef(
6536
+ AnimatedGraphic = React89__default.forwardRef(
6534
6537
  ({
6535
6538
  src,
6536
6539
  svgContent,
@@ -6553,7 +6556,7 @@ var init_AnimatedGraphic = __esm({
6553
6556
  const fetchedSvg = useFetchedSvg(svgContent ? void 0 : src);
6554
6557
  const resolvedSvg = svgContent ?? fetchedSvg;
6555
6558
  const prevAnimateRef = useRef(animate);
6556
- const setRef = React85__default.useCallback(
6559
+ const setRef = React89__default.useCallback(
6557
6560
  (node) => {
6558
6561
  containerRef.current = node;
6559
6562
  if (typeof ref === "function") ref(node);
@@ -6778,9 +6781,9 @@ function ScoreDisplay({
6778
6781
  ...rest
6779
6782
  }) {
6780
6783
  const resolvedValue = typeof value === "number" && !Number.isNaN(value) ? value : typeof rest.score === "number" && !Number.isNaN(rest.score) ? rest.score : 0;
6781
- const [displayValue, setDisplayValue] = React85.useState(resolvedValue);
6782
- const [isAnimating, setIsAnimating] = React85.useState(false);
6783
- React85.useEffect(() => {
6784
+ const [displayValue, setDisplayValue] = React89.useState(resolvedValue);
6785
+ const [isAnimating, setIsAnimating] = React89.useState(false);
6786
+ React89.useEffect(() => {
6784
6787
  if (!animated || displayValue === resolvedValue) {
6785
6788
  setDisplayValue(resolvedValue);
6786
6789
  return;
@@ -6850,9 +6853,9 @@ function ControlButton({
6850
6853
  className
6851
6854
  }) {
6852
6855
  const eventBus = useEventBus();
6853
- const [isPressed, setIsPressed] = React85.useState(false);
6856
+ const [isPressed, setIsPressed] = React89.useState(false);
6854
6857
  const actualPressed = pressed ?? isPressed;
6855
- const handlePointerDown = React85.useCallback(
6858
+ const handlePointerDown = React89.useCallback(
6856
6859
  (e) => {
6857
6860
  e.preventDefault();
6858
6861
  if (disabled) return;
@@ -6862,7 +6865,7 @@ function ControlButton({
6862
6865
  },
6863
6866
  [disabled, pressEvent, eventBus, onPress]
6864
6867
  );
6865
- const handlePointerUp = React85.useCallback(
6868
+ const handlePointerUp = React89.useCallback(
6866
6869
  (e) => {
6867
6870
  e.preventDefault();
6868
6871
  if (disabled) return;
@@ -6872,7 +6875,7 @@ function ControlButton({
6872
6875
  },
6873
6876
  [disabled, releaseEvent, eventBus, onRelease]
6874
6877
  );
6875
- const handlePointerLeave = React85.useCallback(
6878
+ const handlePointerLeave = React89.useCallback(
6876
6879
  (e) => {
6877
6880
  if (isPressed) {
6878
6881
  setIsPressed(false);
@@ -7361,13 +7364,22 @@ function XPBar({
7361
7364
  }) {
7362
7365
  const sizes = sizeMap9[size];
7363
7366
  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(() => {
7369
+ if (!animated) {
7370
+ setFillWidth(percentage);
7371
+ return;
7372
+ }
7373
+ const frame = requestAnimationFrame(() => setFillWidth(percentage));
7374
+ return () => cancelAnimationFrame(frame);
7375
+ }, [animated, percentage]);
7364
7376
  return /* @__PURE__ */ jsxs("div", { className: cn("flex items-center gap-2", className), children: [
7365
7377
  level != null && /* @__PURE__ */ jsxs(
7366
7378
  "span",
7367
7379
  {
7368
7380
  className: cn(
7369
7381
  "flex-shrink-0 rounded-interactive font-bold",
7370
- "bg-accent text-foreground border border-accent",
7382
+ "bg-accent text-accent-foreground border border-accent",
7371
7383
  sizes.badge
7372
7384
  ),
7373
7385
  children: [
@@ -7392,7 +7404,7 @@ function XPBar({
7392
7404
  "bg-gradient-to-r from-accent to-info",
7393
7405
  animated && "transition-all duration-500 ease-out"
7394
7406
  ),
7395
- style: { width: `${percentage}%` }
7407
+ style: { width: `${fillWidth}%` }
7396
7408
  }
7397
7409
  )
7398
7410
  }
@@ -7409,6 +7421,7 @@ function XPBar({
7409
7421
  var sizeMap9;
7410
7422
  var init_XPBar = __esm({
7411
7423
  "components/game/atoms/XPBar.tsx"() {
7424
+ "use client";
7412
7425
  init_cn();
7413
7426
  sizeMap9 = {
7414
7427
  sm: { bar: "h-2", text: "text-xs", badge: "text-xs px-1.5 py-0.5" },
@@ -7778,9 +7791,9 @@ function MiniMap({
7778
7791
  viewportRect,
7779
7792
  className
7780
7793
  }) {
7781
- const canvasRef = React85.useRef(null);
7782
- const frameRef = React85.useRef(0);
7783
- React85.useEffect(() => {
7794
+ const canvasRef = React89.useRef(null);
7795
+ const frameRef = React89.useRef(0);
7796
+ React89.useEffect(() => {
7784
7797
  const canvas = canvasRef.current;
7785
7798
  if (!canvas) return;
7786
7799
  const ctx = canvas.getContext("2d");
@@ -7954,7 +7967,7 @@ var init_ErrorBoundary = __esm({
7954
7967
  }
7955
7968
  );
7956
7969
  };
7957
- ErrorBoundary = class extends React85__default.Component {
7970
+ ErrorBoundary = class extends React89__default.Component {
7958
7971
  constructor(props) {
7959
7972
  super(props);
7960
7973
  __publicField(this, "reset", () => {
@@ -9310,18 +9323,42 @@ var init_Alert = __esm({
9310
9323
  Alert.displayName = "Alert";
9311
9324
  }
9312
9325
  });
9313
- var positionClasses, arrowClasses, Tooltip;
9326
+ function computeTooltipStyle(position, triggerRect) {
9327
+ switch (position) {
9328
+ case "bottom":
9329
+ return {
9330
+ left: triggerRect.left + triggerRect.width / 2,
9331
+ top: triggerRect.bottom + TRIGGER_GAP,
9332
+ transform: "translateX(-50%)"
9333
+ };
9334
+ case "left":
9335
+ return {
9336
+ left: triggerRect.left - TRIGGER_GAP,
9337
+ top: triggerRect.top + triggerRect.height / 2,
9338
+ transform: "translate(-100%, -50%)"
9339
+ };
9340
+ case "right":
9341
+ return {
9342
+ left: triggerRect.right + TRIGGER_GAP,
9343
+ top: triggerRect.top + triggerRect.height / 2,
9344
+ transform: "translateY(-50%)"
9345
+ };
9346
+ case "top":
9347
+ default:
9348
+ return {
9349
+ left: triggerRect.left + triggerRect.width / 2,
9350
+ top: triggerRect.top - TRIGGER_GAP,
9351
+ transform: "translate(-50%, -100%)"
9352
+ };
9353
+ }
9354
+ }
9355
+ var TRIGGER_GAP, arrowClasses, Tooltip;
9314
9356
  var init_Tooltip = __esm({
9315
9357
  "components/core/molecules/Tooltip.tsx"() {
9316
9358
  "use client";
9317
9359
  init_Typography();
9318
9360
  init_cn();
9319
- positionClasses = {
9320
- top: "bottom-full left-1/2 -translate-x-1/2 mb-2",
9321
- bottom: "top-full left-1/2 -translate-x-1/2 mt-2",
9322
- left: "right-full top-1/2 -translate-y-1/2 mr-2",
9323
- right: "left-full top-1/2 -translate-y-1/2 ml-2"
9324
- };
9361
+ TRIGGER_GAP = 8;
9325
9362
  arrowClasses = {
9326
9363
  top: "top-full left-1/2 -translate-x-1/2 border-t-primary border-l-transparent border-r-transparent border-b-transparent",
9327
9364
  bottom: "bottom-full left-1/2 -translate-x-1/2 border-b-primary border-l-transparent border-r-transparent border-t-transparent",
@@ -9376,8 +9413,8 @@ var init_Tooltip = __esm({
9376
9413
  if (hideTimeoutRef.current) clearTimeout(hideTimeoutRef.current);
9377
9414
  };
9378
9415
  }, []);
9379
- const triggerElement = React85__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
9380
- const trigger = React85__default.cloneElement(triggerElement, {
9416
+ const triggerElement = React89__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
9417
+ const trigger = React89__default.cloneElement(triggerElement, {
9381
9418
  ref: triggerRef,
9382
9419
  onMouseEnter: handleMouseEnter,
9383
9420
  onMouseLeave: handleMouseLeave,
@@ -9395,14 +9432,9 @@ var init_Tooltip = __esm({
9395
9432
  "text-sm pointer-events-none",
9396
9433
  "break-words whitespace-normal",
9397
9434
  "h-auto min-h-fit",
9398
- positionClasses[position],
9399
9435
  className
9400
9436
  ),
9401
- style: {
9402
- left: position === "left" || position === "right" ? triggerRect.left + (position === "left" ? 0 : triggerRect.width) : triggerRect.left + triggerRect.width / 2,
9403
- top: position === "top" || position === "bottom" ? triggerRect.top + (position === "top" ? 0 : triggerRect.height) : triggerRect.top + triggerRect.height / 2,
9404
- transform: position === "top" || position === "bottom" ? "translateX(-50%)" : position === "left" || position === "right" ? "translateY(-50%)" : "none"
9405
- },
9437
+ style: computeTooltipStyle(position, triggerRect),
9406
9438
  role: "tooltip",
9407
9439
  children: [
9408
9440
  /* @__PURE__ */ jsx("div", { className: "w-full break-words whitespace-normal h-auto", children: typeof content === "string" ? /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-primary-foreground break-words whitespace-normal", children: content }) : /* @__PURE__ */ jsx("div", { className: "break-words whitespace-normal", children: content }) }),
@@ -9429,8 +9461,9 @@ var init_Tooltip = __esm({
9429
9461
  function computePopoverStyle(position, triggerRect, popoverWidth) {
9430
9462
  if (position === "left" || position === "right") {
9431
9463
  return {
9432
- left: triggerRect.left + (position === "left" ? 0 : triggerRect.width),
9433
- top: triggerRect.top + triggerRect.height / 2
9464
+ left: position === "left" ? triggerRect.left - popoverWidth - TRIGGER_GAP2 : triggerRect.right + TRIGGER_GAP2,
9465
+ top: triggerRect.top + triggerRect.height / 2,
9466
+ transform: "translateY(-50%)"
9434
9467
  };
9435
9468
  }
9436
9469
  const viewportWidth = typeof window !== "undefined" ? window.innerWidth : 1024;
@@ -9442,21 +9475,16 @@ function computePopoverStyle(position, triggerRect, popoverWidth) {
9442
9475
  );
9443
9476
  return {
9444
9477
  left: clamped,
9445
- top: triggerRect.top + (position === "top" ? 0 : triggerRect.height)
9478
+ top: position === "top" ? triggerRect.top - TRIGGER_GAP2 : triggerRect.bottom + TRIGGER_GAP2,
9479
+ transform: position === "top" ? "translateY(-100%)" : void 0
9446
9480
  };
9447
9481
  }
9448
- var positionClasses2, arrowClasses2, VIEWPORT_EDGE_PADDING, Popover;
9482
+ var arrowClasses2, VIEWPORT_EDGE_PADDING, TRIGGER_GAP2, Popover;
9449
9483
  var init_Popover = __esm({
9450
9484
  "components/core/molecules/Popover.tsx"() {
9451
9485
  "use client";
9452
9486
  init_Typography();
9453
9487
  init_cn();
9454
- positionClasses2 = {
9455
- top: "mb-2",
9456
- bottom: "mt-2",
9457
- left: "mr-2 -translate-y-1/2",
9458
- right: "ml-2 -translate-y-1/2"
9459
- };
9460
9488
  arrowClasses2 = {
9461
9489
  top: "top-full left-1/2 -translate-x-1/2 border-t-white border-l-transparent border-r-transparent border-b-transparent",
9462
9490
  bottom: "bottom-full left-1/2 -translate-x-1/2 border-b-white border-l-transparent border-r-transparent border-t-transparent",
@@ -9464,6 +9492,7 @@ var init_Popover = __esm({
9464
9492
  right: "right-full top-1/2 -translate-y-1/2 border-r-white border-t-transparent border-b-transparent border-l-transparent"
9465
9493
  };
9466
9494
  VIEWPORT_EDGE_PADDING = 8;
9495
+ TRIGGER_GAP2 = 8;
9467
9496
  Popover = ({
9468
9497
  content,
9469
9498
  children,
@@ -9532,8 +9561,8 @@ var init_Popover = __esm({
9532
9561
  onMouseEnter: handleOpen,
9533
9562
  onMouseLeave: handleClose
9534
9563
  };
9535
- const childElement = React85__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
9536
- const triggerElement = React85__default.cloneElement(
9564
+ const childElement = React89__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
9565
+ const triggerElement = React89__default.cloneElement(
9537
9566
  childElement,
9538
9567
  {
9539
9568
  ref: triggerRef,
@@ -9547,7 +9576,6 @@ var init_Popover = __esm({
9547
9576
  className: cn(
9548
9577
  "fixed z-50 p-4",
9549
9578
  "bg-card border-2 border-border shadow-elevation-popover",
9550
- positionClasses2[position],
9551
9579
  className
9552
9580
  ),
9553
9581
  style: computePopoverStyle(position, triggerRect, popoverWidth),
@@ -9637,7 +9665,7 @@ var init_Menu = __esm({
9637
9665
  document.addEventListener("mousedown", handleClickOutside);
9638
9666
  return () => document.removeEventListener("mousedown", handleClickOutside);
9639
9667
  }, [isOpen]);
9640
- const positionClasses3 = {
9668
+ const positionClasses = {
9641
9669
  "top-left": "bottom-full left-0 mb-2",
9642
9670
  "top-right": "bottom-full right-0 mb-2",
9643
9671
  "bottom-left": "top-full left-0 mt-2",
@@ -9660,8 +9688,8 @@ var init_Menu = __esm({
9660
9688
  };
9661
9689
  const effectivePosition = direction === "rtl" ? rtlMirror[position] ?? position : position;
9662
9690
  const subMenuSideClass = direction === "rtl" ? "right-full mr-2" : "left-full ml-2";
9663
- const triggerChild = React85__default.isValidElement(trigger) ? trigger : /* @__PURE__ */ jsx(Typography, { variant: "small", as: "span", children: trigger });
9664
- const triggerElement = React85__default.cloneElement(
9691
+ const triggerChild = React89__default.isValidElement(trigger) ? trigger : /* @__PURE__ */ jsx(Typography, { variant: "small", as: "span", children: trigger });
9692
+ const triggerElement = React89__default.cloneElement(
9665
9693
  triggerChild,
9666
9694
  {
9667
9695
  ref: triggerRef,
@@ -9745,7 +9773,7 @@ var init_Menu = __esm({
9745
9773
  className: cn(
9746
9774
  "absolute z-50",
9747
9775
  menuContainerStyles,
9748
- positionClasses3[effectivePosition],
9776
+ positionClasses[effectivePosition],
9749
9777
  className
9750
9778
  ),
9751
9779
  style: {
@@ -9921,7 +9949,7 @@ var init_FloatingActionButton = __esm({
9921
9949
  document.addEventListener("mousedown", handleClickOutside);
9922
9950
  return () => document.removeEventListener("mousedown", handleClickOutside);
9923
9951
  }, [isExpanded, actions]);
9924
- const positionClasses3 = {
9952
+ const positionClasses = {
9925
9953
  "bottom-right": "bottom-6 right-6",
9926
9954
  "bottom-left": "bottom-6 left-6",
9927
9955
  "bottom-center": "bottom-6 left-1/2 -translate-x-1/2",
@@ -9930,7 +9958,7 @@ var init_FloatingActionButton = __esm({
9930
9958
  "top-center": "top-6 left-1/2 -translate-x-1/2"
9931
9959
  };
9932
9960
  if (resolvedAction && (!actions || actions.length === 0)) {
9933
- return /* @__PURE__ */ jsx(Box, { className: cn("fixed z-50", positionClasses3[position], className), children: /* @__PURE__ */ jsx(
9961
+ return /* @__PURE__ */ jsx(Box, { className: cn("fixed z-50", positionClasses[position], className), children: /* @__PURE__ */ jsx(
9934
9962
  Button,
9935
9963
  {
9936
9964
  variant: resolvedAction.variant || "primary",
@@ -9958,7 +9986,7 @@ var init_FloatingActionButton = __esm({
9958
9986
  ref: fabRef,
9959
9987
  className: cn(
9960
9988
  "fixed z-50 flex flex-col items-end gap-3",
9961
- positionClasses3[position],
9989
+ positionClasses[position],
9962
9990
  position.includes("left") && "items-start",
9963
9991
  className
9964
9992
  ),
@@ -10068,13 +10096,13 @@ var init_MapView = __esm({
10068
10096
  shadowSize: [41, 41]
10069
10097
  });
10070
10098
  L.Marker.prototype.options.icon = defaultIcon;
10071
- const { useEffect: useEffect70, useRef: useRef66, useCallback: useCallback114, useState: useState100 } = React85__default;
10099
+ const { useEffect: useEffect71, useRef: useRef67, useCallback: useCallback116, useState: useState102 } = React89__default;
10072
10100
  const { Typography: Typography2 } = await Promise.resolve().then(() => (init_Typography(), Typography_exports));
10073
10101
  const { useEventBus: useEventBus2 } = await Promise.resolve().then(() => (init_useEventBus(), useEventBus_exports));
10074
10102
  function MapUpdater({ centerLat, centerLng, zoom }) {
10075
10103
  const map = useMap();
10076
- const prevRef = useRef66({ centerLat, centerLng, zoom });
10077
- useEffect70(() => {
10104
+ const prevRef = useRef67({ centerLat, centerLng, zoom });
10105
+ useEffect71(() => {
10078
10106
  const prev = prevRef.current;
10079
10107
  if (prev.centerLat !== centerLat || prev.centerLng !== centerLng || prev.zoom !== zoom) {
10080
10108
  map.setView([centerLat, centerLng], zoom);
@@ -10085,7 +10113,7 @@ var init_MapView = __esm({
10085
10113
  }
10086
10114
  function MapClickHandler({ onMapClick }) {
10087
10115
  const map = useMap();
10088
- useEffect70(() => {
10116
+ useEffect71(() => {
10089
10117
  if (!onMapClick) return;
10090
10118
  const handler = (e) => {
10091
10119
  onMapClick(e.latlng.lat, e.latlng.lng);
@@ -10113,8 +10141,8 @@ var init_MapView = __esm({
10113
10141
  showAttribution = true
10114
10142
  }) {
10115
10143
  const eventBus = useEventBus2();
10116
- const [clickedPosition, setClickedPosition] = useState100(null);
10117
- const handleMapClick = useCallback114((lat, lng) => {
10144
+ const [clickedPosition, setClickedPosition] = useState102(null);
10145
+ const handleMapClick = useCallback116((lat, lng) => {
10118
10146
  if (showClickedPin) {
10119
10147
  setClickedPosition({ lat, lng });
10120
10148
  }
@@ -10123,7 +10151,7 @@ var init_MapView = __esm({
10123
10151
  eventBus.emit(`UI:${mapClickEvent}`, { latitude: lat, longitude: lng });
10124
10152
  }
10125
10153
  }, [onMapClick, mapClickEvent, eventBus, showClickedPin]);
10126
- const handleMarkerClick = useCallback114((marker) => {
10154
+ const handleMarkerClick = useCallback116((marker) => {
10127
10155
  onMarkerClick?.(marker);
10128
10156
  if (markerClickEvent) {
10129
10157
  eventBus.emit(`UI:${markerClickEvent}`, { ...marker });
@@ -10132,7 +10160,7 @@ var init_MapView = __esm({
10132
10160
  return /* @__PURE__ */ jsx(
10133
10161
  Box,
10134
10162
  {
10135
- className: cn("relative w-full overflow-hidden rounded-lg", className),
10163
+ className: cn("relative isolate w-full overflow-hidden rounded-lg", className),
10136
10164
  style: { height },
10137
10165
  "data-testid": "map-view",
10138
10166
  children: /* @__PURE__ */ jsxs(
@@ -10314,7 +10342,7 @@ function InputPattern({
10314
10342
  fieldName
10315
10343
  }) {
10316
10344
  const { emit } = useEventBus();
10317
- const [localValue, setLocalValue] = React85__default.useState(value);
10345
+ const [localValue, setLocalValue] = React89__default.useState(value);
10318
10346
  const handleChange = (e) => {
10319
10347
  setLocalValue(e.target.value);
10320
10348
  if (onChange) {
@@ -10352,7 +10380,7 @@ function TextareaPattern({
10352
10380
  fieldName
10353
10381
  }) {
10354
10382
  const { emit } = useEventBus();
10355
- const [localValue, setLocalValue] = React85__default.useState(value);
10383
+ const [localValue, setLocalValue] = React89__default.useState(value);
10356
10384
  const handleChange = (e) => {
10357
10385
  setLocalValue(e.target.value);
10358
10386
  if (onChange) {
@@ -10384,7 +10412,7 @@ function SelectPattern({
10384
10412
  fieldName
10385
10413
  }) {
10386
10414
  const { emit } = useEventBus();
10387
- const [localValue, setLocalValue] = React85__default.useState(value);
10415
+ const [localValue, setLocalValue] = React89__default.useState(value);
10388
10416
  const handleChange = (e) => {
10389
10417
  setLocalValue(e.target.value);
10390
10418
  if (onChange) {
@@ -10413,7 +10441,7 @@ function CheckboxPattern({
10413
10441
  className
10414
10442
  }) {
10415
10443
  const { emit } = useEventBus();
10416
- const [localChecked, setLocalChecked] = React85__default.useState(checked);
10444
+ const [localChecked, setLocalChecked] = React89__default.useState(checked);
10417
10445
  const handleChange = (e) => {
10418
10446
  setLocalChecked(e.target.checked);
10419
10447
  if (onChange) {
@@ -10644,8 +10672,8 @@ function ActionButtons({
10644
10672
  disabled
10645
10673
  }) {
10646
10674
  const eventBus = useEventBus();
10647
- const [activeButtons, setActiveButtons] = React85.useState(/* @__PURE__ */ new Set());
10648
- const handlePress = React85.useCallback(
10675
+ const [activeButtons, setActiveButtons] = React89.useState(/* @__PURE__ */ new Set());
10676
+ const handlePress = React89.useCallback(
10649
10677
  (id) => {
10650
10678
  setActiveButtons((prev) => new Set(prev).add(id));
10651
10679
  if (actionEvent) eventBus.emit(`UI:${actionEvent}`, { id, pressed: true });
@@ -10653,7 +10681,7 @@ function ActionButtons({
10653
10681
  },
10654
10682
  [actionEvent, eventBus, onAction]
10655
10683
  );
10656
- const handleRelease = React85.useCallback(
10684
+ const handleRelease = React89.useCallback(
10657
10685
  (id) => {
10658
10686
  setActiveButtons((prev) => {
10659
10687
  const next = new Set(prev);
@@ -10934,9 +10962,262 @@ var init_AnimatedCounter = __esm({
10934
10962
  AnimatedCounter.displayName = "AnimatedCounter";
10935
10963
  }
10936
10964
  });
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
+ });
10937
11218
  var AuthLayout;
10938
11219
  var init_AuthLayout = __esm({
10939
- "components/core/templates/AuthLayout.tsx"() {
11220
+ "components/marketing/templates/AuthLayout.tsx"() {
10940
11221
  "use client";
10941
11222
  init_cn();
10942
11223
  init_Box();
@@ -13668,7 +13949,10 @@ function computeFoldRegions(code) {
13668
13949
  }
13669
13950
  return regions.sort((a, b) => a.start - b.start);
13670
13951
  }
13671
- var orbStyleOverrides, orbStyle, loloStyleOverrides, loloStyle, log8, LINE_PROPS_FN, HIDDEN_LINE_NUMBERS, CodeBlock;
13952
+ function toCodeLanguage(value) {
13953
+ return value && CODE_LANGUAGE_SET.has(value) ? value : "text";
13954
+ }
13955
+ var orbStyleOverrides, orbStyle, loloStyleOverrides, loloStyle, log8, CODE_LANGUAGES, CODE_LANGUAGE_SET, LINE_PROPS_FN, HIDDEN_LINE_NUMBERS, CodeBlock;
13672
13956
  var init_CodeBlock = __esm({
13673
13957
  "components/core/molecules/markdown/CodeBlock.tsx"() {
13674
13958
  init_Box();
@@ -13746,9 +14030,40 @@ var init_CodeBlock = __esm({
13746
14030
  };
13747
14031
  loloStyle = { ...dark, ...loloStyleOverrides };
13748
14032
  log8 = createLogger("almadar:ui:markdown-code");
14033
+ CODE_LANGUAGES = [
14034
+ "text",
14035
+ "json",
14036
+ "javascript",
14037
+ "js",
14038
+ "typescript",
14039
+ "ts",
14040
+ "jsx",
14041
+ "tsx",
14042
+ "css",
14043
+ "markdown",
14044
+ "md",
14045
+ "bash",
14046
+ "shell",
14047
+ "sh",
14048
+ "yaml",
14049
+ "yml",
14050
+ "rust",
14051
+ "python",
14052
+ "py",
14053
+ "sql",
14054
+ "diff",
14055
+ "toml",
14056
+ "go",
14057
+ "graphql",
14058
+ "html",
14059
+ "xml",
14060
+ "orb",
14061
+ "lolo"
14062
+ ];
14063
+ CODE_LANGUAGE_SET = new Set(CODE_LANGUAGES);
13749
14064
  LINE_PROPS_FN = (n) => ({ "data-line": String(n - 1) });
13750
14065
  HIDDEN_LINE_NUMBERS = { display: "none" };
13751
- CodeBlock = React85__default.memo(
14066
+ CodeBlock = React89__default.memo(
13752
14067
  ({
13753
14068
  code: rawCode,
13754
14069
  language = "text",
@@ -14185,7 +14500,7 @@ var init_MarkdownContent = __esm({
14185
14500
  init_Box();
14186
14501
  init_CodeBlock();
14187
14502
  init_cn();
14188
- MarkdownContent = React85__default.memo(
14503
+ MarkdownContent = React89__default.memo(
14189
14504
  ({ content, direction, className }) => {
14190
14505
  const { t: _t } = useTranslate();
14191
14506
  const safeContent = typeof content === "string" ? content : String(content ?? "");
@@ -14235,7 +14550,7 @@ var init_MarkdownContent = __esm({
14235
14550
  CodeBlock,
14236
14551
  {
14237
14552
  code,
14238
- language: match[1],
14553
+ language: toCodeLanguage(match[1]),
14239
14554
  maxHeight: "60vh"
14240
14555
  }
14241
14556
  );
@@ -15281,7 +15596,7 @@ var init_StateMachineView = __esm({
15281
15596
  style: { top: title ? 30 : 0 },
15282
15597
  children: [
15283
15598
  entity && /* @__PURE__ */ jsx(EntityBox, { entity, config }),
15284
- states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(React85__default.Fragment, { children: renderStateNode(state, config) }, state.id) : /* @__PURE__ */ jsx(
15599
+ states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(React89__default.Fragment, { children: renderStateNode(state, config) }, state.id) : /* @__PURE__ */ jsx(
15285
15600
  StateNode,
15286
15601
  {
15287
15602
  state,
@@ -16094,7 +16409,7 @@ var init_ContentRenderer = __esm({
16094
16409
  CodeBlock,
16095
16410
  {
16096
16411
  code: segment.content,
16097
- language: segment.language
16412
+ language: toCodeLanguage(segment.language)
16098
16413
  },
16099
16414
  key
16100
16415
  );
@@ -16119,7 +16434,7 @@ var init_ContentRenderer = __esm({
16119
16434
  CodeBlock,
16120
16435
  {
16121
16436
  code: segment.content,
16122
- language: segment.language
16437
+ language: toCodeLanguage(segment.language)
16123
16438
  }
16124
16439
  ),
16125
16440
  /* @__PURE__ */ jsx(ScaledDiagram, { children: /* @__PURE__ */ jsx(
@@ -16886,7 +17201,7 @@ var init_Grid = __esm({
16886
17201
  as: Component = "div"
16887
17202
  }) => {
16888
17203
  const mergedStyle = rows2 ? { gridTemplateRows: `repeat(${rows2}, minmax(0, 1fr))`, ...style } : style;
16889
- return React85__default.createElement(
17204
+ return React89__default.createElement(
16890
17205
  Component,
16891
17206
  {
16892
17207
  className: cn(
@@ -20204,7 +20519,7 @@ var init_Carousel = __esm({
20204
20519
  });
20205
20520
  var CaseStudyOrganism;
20206
20521
  var init_CaseStudyOrganism = __esm({
20207
- "components/core/organisms/CaseStudyOrganism.tsx"() {
20522
+ "components/marketing/organisms/CaseStudyOrganism.tsx"() {
20208
20523
  "use client";
20209
20524
  init_cn();
20210
20525
  init_useEventBus();
@@ -22246,7 +22561,7 @@ function CraftingRecipe({
22246
22561
  className
22247
22562
  }) {
22248
22563
  const eventBus = useEventBus();
22249
- const handleCraft = React85.useCallback(() => {
22564
+ const handleCraft = React89.useCallback(() => {
22250
22565
  onCraft?.();
22251
22566
  if (craftEvent) {
22252
22567
  eventBus.emit(craftEvent, { output: output.label });
@@ -22263,7 +22578,7 @@ function CraftingRecipe({
22263
22578
  children: [
22264
22579
  /* @__PURE__ */ jsx(HStack, { gap: "xs", className: "flex-wrap items-center", children: inputs.map((ingredient, index) => {
22265
22580
  const hasSufficient = ingredient.available >= ingredient.required;
22266
- return /* @__PURE__ */ jsxs(React85.Fragment, { children: [
22581
+ return /* @__PURE__ */ jsxs(React89.Fragment, { children: [
22267
22582
  /* @__PURE__ */ jsx(Box, { className: "relative", children: /* @__PURE__ */ jsx(
22268
22583
  ItemSlot,
22269
22584
  {
@@ -22326,8 +22641,8 @@ function DPad({
22326
22641
  }) {
22327
22642
  const eventBus = useEventBus();
22328
22643
  const sizes = sizeMap15[size];
22329
- const [activeDirections, setActiveDirections] = React85.useState(/* @__PURE__ */ new Set());
22330
- const handlePress = React85.useCallback(
22644
+ const [activeDirections, setActiveDirections] = React89.useState(/* @__PURE__ */ new Set());
22645
+ const handlePress = React89.useCallback(
22331
22646
  (direction) => {
22332
22647
  setActiveDirections((prev) => new Set(prev).add(direction));
22333
22648
  if (directionEvent) eventBus.emit(`UI:${directionEvent}`, { direction, pressed: true });
@@ -22335,7 +22650,7 @@ function DPad({
22335
22650
  },
22336
22651
  [directionEvent, eventBus, onDirection]
22337
22652
  );
22338
- const handleRelease = React85.useCallback(
22653
+ const handleRelease = React89.useCallback(
22339
22654
  (direction) => {
22340
22655
  setActiveDirections((prev) => {
22341
22656
  const next = new Set(prev);
@@ -23021,14 +23336,14 @@ function useDataDnd(args) {
23021
23336
  const isZone = Boolean(dragGroup || accepts || sortable);
23022
23337
  const enabled = isZone || Boolean(dndRoot);
23023
23338
  const eventBus = useEventBus();
23024
- const parentRoot = React85__default.useContext(RootCtx);
23339
+ const parentRoot = React89__default.useContext(RootCtx);
23025
23340
  const isRoot = enabled && parentRoot === null;
23026
- const zoneId = React85__default.useId();
23341
+ const zoneId = React89__default.useId();
23027
23342
  const ownGroup = dragGroup ?? accepts ?? zoneId;
23028
- const [optimisticOrders, setOptimisticOrders] = React85__default.useState(() => /* @__PURE__ */ new Map());
23029
- const optimisticOrdersRef = React85__default.useRef(optimisticOrders);
23343
+ const [optimisticOrders, setOptimisticOrders] = React89__default.useState(() => /* @__PURE__ */ new Map());
23344
+ const optimisticOrdersRef = React89__default.useRef(optimisticOrders);
23030
23345
  optimisticOrdersRef.current = optimisticOrders;
23031
- const clearOptimisticOrder = React85__default.useCallback((group) => {
23346
+ const clearOptimisticOrder = React89__default.useCallback((group) => {
23032
23347
  setOptimisticOrders((prev) => {
23033
23348
  if (!prev.has(group)) return prev;
23034
23349
  const next = new Map(prev);
@@ -23053,7 +23368,7 @@ function useDataDnd(args) {
23053
23368
  const raw = it[dndItemIdField];
23054
23369
  return String(raw ?? `__idx_${idx}`);
23055
23370
  }).join("|");
23056
- const itemIds = React85__default.useMemo(
23371
+ const itemIds = React89__default.useMemo(
23057
23372
  () => orderedItems.map((it, idx) => {
23058
23373
  const raw = it[dndItemIdField];
23059
23374
  return raw ?? `__idx_${idx}`;
@@ -23061,7 +23376,7 @@ function useDataDnd(args) {
23061
23376
  [itemIdsSignature]
23062
23377
  );
23063
23378
  const itemsContentSig = items.map((it, idx) => String(it[dndItemIdField] ?? `__${idx}`)).join("|");
23064
- React85__default.useEffect(() => {
23379
+ React89__default.useEffect(() => {
23065
23380
  const root = isRoot ? null : parentRoot;
23066
23381
  if (root) {
23067
23382
  root.clearOptimisticOrder(ownGroup);
@@ -23069,20 +23384,20 @@ function useDataDnd(args) {
23069
23384
  clearOptimisticOrder(ownGroup);
23070
23385
  }
23071
23386
  }, [itemsContentSig, ownGroup]);
23072
- const zonesRef = React85__default.useRef(/* @__PURE__ */ new Map());
23073
- const registerZone = React85__default.useCallback((zoneId2, meta2) => {
23387
+ const zonesRef = React89__default.useRef(/* @__PURE__ */ new Map());
23388
+ const registerZone = React89__default.useCallback((zoneId2, meta2) => {
23074
23389
  zonesRef.current.set(zoneId2, meta2);
23075
23390
  }, []);
23076
- const unregisterZone = React85__default.useCallback((zoneId2) => {
23391
+ const unregisterZone = React89__default.useCallback((zoneId2) => {
23077
23392
  zonesRef.current.delete(zoneId2);
23078
23393
  }, []);
23079
- const [activeDrag, setActiveDrag] = React85__default.useState(null);
23080
- const [overZoneGroup, setOverZoneGroup] = React85__default.useState(null);
23081
- const meta = React85__default.useMemo(
23394
+ const [activeDrag, setActiveDrag] = React89__default.useState(null);
23395
+ const [overZoneGroup, setOverZoneGroup] = React89__default.useState(null);
23396
+ const meta = React89__default.useMemo(
23082
23397
  () => ({ group: ownGroup, dropEvent, reorderEvent, positionEvent, itemIds, rawItems: items, idField: dndItemIdField }),
23083
23398
  [ownGroup, dropEvent, reorderEvent, positionEvent, itemIds, items, dndItemIdField]
23084
23399
  );
23085
- React85__default.useEffect(() => {
23400
+ React89__default.useEffect(() => {
23086
23401
  const target = isRoot ? null : parentRoot;
23087
23402
  if (!target) {
23088
23403
  zonesRef.current.set(zoneId, meta);
@@ -23101,7 +23416,7 @@ function useDataDnd(args) {
23101
23416
  }, [parentRoot, isRoot, zoneId, meta]);
23102
23417
  const sensors = useAlmadarDndSensors(true);
23103
23418
  const collisionDetection = almadarDndCollisionDetection;
23104
- const findZoneByItem = React85__default.useCallback(
23419
+ const findZoneByItem = React89__default.useCallback(
23105
23420
  (id) => {
23106
23421
  for (const z of zonesRef.current.values()) {
23107
23422
  if (z.itemIds.includes(id)) return z;
@@ -23110,7 +23425,7 @@ function useDataDnd(args) {
23110
23425
  },
23111
23426
  []
23112
23427
  );
23113
- React85__default.useCallback(
23428
+ React89__default.useCallback(
23114
23429
  (group) => {
23115
23430
  for (const z of zonesRef.current.values()) {
23116
23431
  if (z.group === group) return z;
@@ -23119,7 +23434,7 @@ function useDataDnd(args) {
23119
23434
  },
23120
23435
  []
23121
23436
  );
23122
- const handleDragEnd = React85__default.useCallback(
23437
+ const handleDragEnd = React89__default.useCallback(
23123
23438
  (event) => {
23124
23439
  const { active, over } = event;
23125
23440
  const activeIdStr = String(active.id);
@@ -23210,8 +23525,8 @@ function useDataDnd(args) {
23210
23525
  },
23211
23526
  [eventBus]
23212
23527
  );
23213
- const sortableData = React85__default.useMemo(() => ({ dndGroup: ownGroup }), [ownGroup]);
23214
- const SortableItem = React85__default.useCallback(
23528
+ const sortableData = React89__default.useMemo(() => ({ dndGroup: ownGroup }), [ownGroup]);
23529
+ const SortableItem = React89__default.useCallback(
23215
23530
  ({ id, children }) => {
23216
23531
  const {
23217
23532
  attributes,
@@ -23251,7 +23566,7 @@ function useDataDnd(args) {
23251
23566
  id: droppableId,
23252
23567
  data: sortableData
23253
23568
  });
23254
- const ctx = React85__default.useContext(RootCtx);
23569
+ const ctx = React89__default.useContext(RootCtx);
23255
23570
  const activeDrag2 = ctx?.activeDrag ?? null;
23256
23571
  const overZoneGroup2 = ctx?.overZoneGroup ?? null;
23257
23572
  const isThisZoneOver = overZoneGroup2 === ownGroup;
@@ -23266,7 +23581,7 @@ function useDataDnd(args) {
23266
23581
  showForeignPlaceholder,
23267
23582
  ctxAvailable: ctx != null
23268
23583
  });
23269
- React85__default.useEffect(() => {
23584
+ React89__default.useEffect(() => {
23270
23585
  dndLog.info("dropzone:isOver:change", { droppableId, group: ownGroup, isOver, isThisZoneOver, showForeignPlaceholder, activeDragSourceGroup: activeDrag2?.sourceGroup ?? null });
23271
23586
  }, [droppableId, isOver, isThisZoneOver, showForeignPlaceholder]);
23272
23587
  return /* @__PURE__ */ jsx(
@@ -23280,11 +23595,11 @@ function useDataDnd(args) {
23280
23595
  }
23281
23596
  );
23282
23597
  };
23283
- const rootContextValue = React85__default.useMemo(
23598
+ const rootContextValue = React89__default.useMemo(
23284
23599
  () => ({ registerZone, unregisterZone, activeDrag, overZoneGroup, optimisticOrders, clearOptimisticOrder }),
23285
23600
  [registerZone, unregisterZone, activeDrag, overZoneGroup, optimisticOrders, clearOptimisticOrder]
23286
23601
  );
23287
- const handleDragStart = React85__default.useCallback((event) => {
23602
+ const handleDragStart = React89__default.useCallback((event) => {
23288
23603
  const sourceZone = findZoneByItem(event.active.id);
23289
23604
  const rect = event.active.rect.current.initial;
23290
23605
  const height = rect?.height && rect.height > 0 ? rect.height : 64;
@@ -23303,7 +23618,7 @@ function useDataDnd(args) {
23303
23618
  isRoot
23304
23619
  });
23305
23620
  }, [findZoneByItem, isRoot, zoneId]);
23306
- const handleDragOver = React85__default.useCallback((event) => {
23621
+ const handleDragOver = React89__default.useCallback((event) => {
23307
23622
  const { active, over } = event;
23308
23623
  const overData = over?.data?.current;
23309
23624
  const overGroup = overData?.dndGroup ?? null;
@@ -23373,7 +23688,7 @@ function useDataDnd(args) {
23373
23688
  return next;
23374
23689
  });
23375
23690
  }, []);
23376
- const handleDragCancel = React85__default.useCallback((event) => {
23691
+ const handleDragCancel = React89__default.useCallback((event) => {
23377
23692
  setActiveDrag(null);
23378
23693
  setOverZoneGroup(null);
23379
23694
  dndLog.warn("dragCancel", {
@@ -23381,12 +23696,12 @@ function useDataDnd(args) {
23381
23696
  reason: "dnd-kit cancelled the drag (escape key, pointer interrupted, or external)"
23382
23697
  });
23383
23698
  }, []);
23384
- const handleDragEndWithCleanup = React85__default.useCallback((event) => {
23699
+ const handleDragEndWithCleanup = React89__default.useCallback((event) => {
23385
23700
  handleDragEnd(event);
23386
23701
  setActiveDrag(null);
23387
23702
  setOverZoneGroup(null);
23388
23703
  }, [handleDragEnd]);
23389
- const wrapContainer = React85__default.useCallback(
23704
+ const wrapContainer = React89__default.useCallback(
23390
23705
  (children) => {
23391
23706
  if (!enabled) return children;
23392
23707
  const strategy = layout === "grid" ? rectSortingStrategy : verticalListSortingStrategy;
@@ -23440,7 +23755,7 @@ var init_useDataDnd = __esm({
23440
23755
  init_useAlmadarDndCollision();
23441
23756
  init_Box();
23442
23757
  dndLog = createLogger("almadar:ui:dnd");
23443
- RootCtx = React85__default.createContext(null);
23758
+ RootCtx = React89__default.createContext(null);
23444
23759
  }
23445
23760
  });
23446
23761
  function fieldLabel2(key) {
@@ -23960,7 +24275,7 @@ function DataList({
23960
24275
  }) {
23961
24276
  const eventBus = useEventBus();
23962
24277
  const { t } = useTranslate();
23963
- const [visibleCount, setVisibleCount] = React85__default.useState(pageSize || Infinity);
24278
+ const [visibleCount, setVisibleCount] = React89__default.useState(pageSize || Infinity);
23964
24279
  const fieldDefs = fields ?? columns ?? [];
23965
24280
  const allDataRaw = Array.isArray(entity) ? entity : entity ? [entity] : [];
23966
24281
  const dnd = useDataDnd({
@@ -23979,7 +24294,7 @@ function DataList({
23979
24294
  const data = pageSize > 0 ? allData.slice(0, visibleCount) : allData;
23980
24295
  const hasMoreLocal = pageSize > 0 && visibleCount < allData.length;
23981
24296
  const hasRenderProp = typeof children === "function";
23982
- React85__default.useEffect(() => {
24297
+ React89__default.useEffect(() => {
23983
24298
  const renderItemTypeOf = typeof schemaRenderItem;
23984
24299
  const childrenTypeOf = typeof children;
23985
24300
  if (data.length > 0 && !hasRenderProp) {
@@ -24084,7 +24399,7 @@ function DataList({
24084
24399
  const items2 = data.map((item) => item);
24085
24400
  const groups2 = groupBy ? groupData(items2, groupBy) : [{ label: "", items: items2 }];
24086
24401
  const contentField = titleField?.name ?? fieldDefs[0]?.name ?? "";
24087
- return /* @__PURE__ */ jsx(VStack, { gap: "sm", className: cn("py-2", className), children: groups2.map((group, gi) => /* @__PURE__ */ jsxs(React85__default.Fragment, { children: [
24402
+ return /* @__PURE__ */ jsx(VStack, { gap: "sm", className: cn("py-2", className), children: groups2.map((group, gi) => /* @__PURE__ */ jsxs(React89__default.Fragment, { children: [
24088
24403
  group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: "my-2" }),
24089
24404
  group.items.map((itemData, index) => {
24090
24405
  const id = itemData.id || `${gi}-${index}`;
@@ -24232,7 +24547,7 @@ function DataList({
24232
24547
  className
24233
24548
  ),
24234
24549
  children: [
24235
- groups.map((group, gi) => /* @__PURE__ */ jsxs(React85__default.Fragment, { children: [
24550
+ groups.map((group, gi) => /* @__PURE__ */ jsxs(React89__default.Fragment, { children: [
24236
24551
  group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-4" : "mt-0" }),
24237
24552
  group.items.map(
24238
24553
  (itemData, index) => renderItem(itemData, index, gi === groups.length - 1 && index === group.items.length - 1)
@@ -25606,7 +25921,7 @@ var init_WizardProgress = __esm({
25606
25921
  children: /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: normalizedSteps.map((step, index) => {
25607
25922
  const isActive = index === currentStep;
25608
25923
  const isCompleted = index < currentStep;
25609
- return /* @__PURE__ */ jsxs(React85__default.Fragment, { children: [
25924
+ return /* @__PURE__ */ jsxs(React89__default.Fragment, { children: [
25610
25925
  /* @__PURE__ */ jsx(
25611
25926
  "button",
25612
25927
  {
@@ -26123,7 +26438,7 @@ var init_FormSectionHeader = __esm({
26123
26438
  Box,
26124
26439
  {
26125
26440
  className: cn(
26126
- "px-4 py-3 bg-muted rounded-t-lg",
26441
+ "px-4 py-3 bg-muted rounded-t-lg border-b-2 border-border border-l-4 border-l-primary",
26127
26442
  isClickable && "cursor-pointer hover:bg-[var(--color-surface-hover)] transition-colors",
26128
26443
  className
26129
26444
  ),
@@ -26135,7 +26450,7 @@ var init_FormSectionHeader = __esm({
26135
26450
  {
26136
26451
  name: icon,
26137
26452
  size: "md",
26138
- className: "text-muted-foreground"
26453
+ className: "text-primary"
26139
26454
  }
26140
26455
  ),
26141
26456
  statusIcon && /* @__PURE__ */ jsx(
@@ -26146,8 +26461,8 @@ var init_FormSectionHeader = __esm({
26146
26461
  className: hasErrors ? "text-error" : "text-success"
26147
26462
  }
26148
26463
  ),
26149
- /* @__PURE__ */ jsxs(Box, { children: [
26150
- /* @__PURE__ */ jsx(Typography, { variant: "label", weight: "semibold", children: title }),
26464
+ /* @__PURE__ */ jsxs(Box, { className: "space-y-0.5", children: [
26465
+ /* @__PURE__ */ jsx(Typography, { variant: "subheading", weight: "semibold", children: title }),
26151
26466
  subtitle && /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", children: subtitle })
26152
26467
  ] })
26153
26468
  ] }),
@@ -26217,6 +26532,50 @@ var init_FlipCard = __esm({
26217
26532
  FlipCard.displayName = "FlipCard";
26218
26533
  }
26219
26534
  });
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
+ });
26220
26579
  function toISODate(d) {
26221
26580
  return d.toISOString().slice(0, 10);
26222
26581
  }
@@ -26661,7 +27020,7 @@ function InventoryGrid({
26661
27020
  const eventBus = useEventBus();
26662
27021
  const slotCount = totalSlots ?? items.length;
26663
27022
  const emptySlotCount = Math.max(0, slotCount - items.length);
26664
- const handleSelect = React85.useCallback(
27023
+ const handleSelect = React89.useCallback(
26665
27024
  (id) => {
26666
27025
  onSelect?.(id);
26667
27026
  if (selectEvent) {
@@ -26878,31 +27237,31 @@ function GameCanvas2D({
26878
27237
  assetBaseUrl = "",
26879
27238
  className
26880
27239
  }) {
26881
- const canvasRef = React85.useRef(null);
26882
- const rafRef = React85.useRef(0);
26883
- const frameRef = React85.useRef(0);
26884
- const lastTimeRef = React85.useRef(0);
26885
- const imageCache = React85.useRef(/* @__PURE__ */ new Map());
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());
26886
27245
  const emit = useEmitEvent();
26887
- const onDrawRef = React85.useRef(onDraw);
27246
+ const onDrawRef = React89.useRef(onDraw);
26888
27247
  onDrawRef.current = onDraw;
26889
- const onTickRef = React85.useRef(onTick);
27248
+ const onTickRef = React89.useRef(onTick);
26890
27249
  onTickRef.current = onTick;
26891
- const tickEventRef = React85.useRef(tickEvent);
27250
+ const tickEventRef = React89.useRef(tickEvent);
26892
27251
  tickEventRef.current = tickEvent;
26893
- const drawEventRef = React85.useRef(drawEvent);
27252
+ const drawEventRef = React89.useRef(drawEvent);
26894
27253
  drawEventRef.current = drawEvent;
26895
- const emitRef = React85.useRef(emit);
27254
+ const emitRef = React89.useRef(emit);
26896
27255
  emitRef.current = emit;
26897
- const assetBaseUrlRef = React85.useRef(assetBaseUrl);
27256
+ const assetBaseUrlRef = React89.useRef(assetBaseUrl);
26898
27257
  assetBaseUrlRef.current = assetBaseUrl;
26899
- const backgroundImageRef = React85.useRef(backgroundImage);
27258
+ const backgroundImageRef = React89.useRef(backgroundImage);
26900
27259
  backgroundImageRef.current = backgroundImage;
26901
- const widthRef = React85.useRef(width);
27260
+ const widthRef = React89.useRef(width);
26902
27261
  widthRef.current = width;
26903
- const heightRef = React85.useRef(height);
27262
+ const heightRef = React89.useRef(height);
26904
27263
  heightRef.current = height;
26905
- const loadImage = React85.useCallback((url) => {
27264
+ const loadImage = React89.useCallback((url) => {
26906
27265
  const fullUrl = url.startsWith("http") ? url : `${assetBaseUrlRef.current}${url}`;
26907
27266
  const cached = imageCache.current.get(fullUrl);
26908
27267
  if (cached?.complete && cached.naturalWidth > 0) return cached;
@@ -26914,7 +27273,7 @@ function GameCanvas2D({
26914
27273
  }
26915
27274
  return null;
26916
27275
  }, []);
26917
- React85.useEffect(() => {
27276
+ React89.useEffect(() => {
26918
27277
  const canvas = canvasRef.current;
26919
27278
  if (!canvas) return;
26920
27279
  const ctx = canvas.getContext("2d");
@@ -27217,7 +27576,7 @@ function TurnPanel({
27217
27576
  className
27218
27577
  }) {
27219
27578
  const eventBus = useEventBus();
27220
- const handleAction = React85.useCallback(
27579
+ const handleAction = React89.useCallback(
27221
27580
  (event) => {
27222
27581
  if (event) {
27223
27582
  eventBus.emit(event, { turn: currentTurn, phase, activeTeam });
@@ -27363,7 +27722,7 @@ function UnitCommandBar({
27363
27722
  className
27364
27723
  }) {
27365
27724
  const eventBus = useEventBus();
27366
- const handleCommand = React85.useCallback(
27725
+ const handleCommand = React89.useCallback(
27367
27726
  (event) => {
27368
27727
  if (event) {
27369
27728
  eventBus.emit(event, { unitId: selectedUnitId });
@@ -27848,7 +28207,7 @@ function GameMenu({
27848
28207
  } catch {
27849
28208
  }
27850
28209
  const eventBus = eventBusProp || eventBusFromHook;
27851
- const handleOptionClick = React85.useCallback(
28210
+ const handleOptionClick = React89.useCallback(
27852
28211
  (option) => {
27853
28212
  if (option.event && eventBus) {
27854
28213
  eventBus.emit(`UI:${option.event}`, { option });
@@ -27962,7 +28321,7 @@ function GameOverScreen({
27962
28321
  } catch {
27963
28322
  }
27964
28323
  const eventBus = eventBusProp || eventBusFromHook;
27965
- const handleActionClick = React85.useCallback(
28324
+ const handleActionClick = React89.useCallback(
27966
28325
  (action) => {
27967
28326
  if (action.event && eventBus) {
27968
28327
  eventBus.emit(`UI:${action.event}`, { action });
@@ -28956,7 +29315,7 @@ var init_StarRating = __esm({
28956
29315
  name: "star",
28957
29316
  className: cn(
28958
29317
  styles.star,
28959
- "text-muted",
29318
+ "text-muted-foreground",
28960
29319
  "transition-colors duration-100"
28961
29320
  ),
28962
29321
  strokeWidth: 1.5
@@ -29439,8 +29798,8 @@ function TableView({
29439
29798
  }) {
29440
29799
  const eventBus = useEventBus();
29441
29800
  const { t } = useTranslate();
29442
- const [visibleCount, setVisibleCount] = React85__default.useState(pageSize > 0 ? pageSize : Infinity);
29443
- const [localSelected, setLocalSelected] = React85__default.useState(/* @__PURE__ */ new Set());
29801
+ const [visibleCount, setVisibleCount] = React89__default.useState(pageSize > 0 ? pageSize : Infinity);
29802
+ const [localSelected, setLocalSelected] = React89__default.useState(/* @__PURE__ */ new Set());
29444
29803
  const colDefs = columns ?? fields ?? [];
29445
29804
  const allDataRaw = Array.isArray(entity) ? entity : entity ? [entity] : [];
29446
29805
  const dnd = useDataDnd({
@@ -29635,12 +29994,12 @@ function TableView({
29635
29994
  ]
29636
29995
  }
29637
29996
  );
29638
- return dnd.isZone ? /* @__PURE__ */ jsx(dnd.SortableItem, { id: row[idField] ?? id, children: rowInner }, id) : /* @__PURE__ */ jsx(React85__default.Fragment, { children: rowInner }, id);
29997
+ return dnd.isZone ? /* @__PURE__ */ jsx(dnd.SortableItem, { id: row[idField] ?? id, children: rowInner }, id) : /* @__PURE__ */ jsx(React89__default.Fragment, { children: rowInner }, id);
29639
29998
  };
29640
29999
  const items = data.map((row) => row);
29641
30000
  const groups = groupBy ? groupData2(items, groupBy) : [{ label: "", items }];
29642
30001
  let runningIndex = 0;
29643
- const body = /* @__PURE__ */ jsx(Box, { role: "rowgroup", children: groups.map((group, gi) => /* @__PURE__ */ jsxs(React85__default.Fragment, { children: [
30002
+ const body = /* @__PURE__ */ jsx(Box, { role: "rowgroup", children: groups.map((group, gi) => /* @__PURE__ */ jsxs(React89__default.Fragment, { children: [
29644
30003
  group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-3" : "mt-0" }),
29645
30004
  group.items.map((row) => renderRow(row, runningIndex++))
29646
30005
  ] }, gi)) });
@@ -30992,7 +31351,7 @@ var init_StepFlow = __esm({
30992
31351
  className
30993
31352
  }) => {
30994
31353
  if (orientation === "vertical") {
30995
- return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(React85__default.Fragment, { children: /* @__PURE__ */ jsxs(HStack, { gap: "md", align: "start", className: "w-full", children: [
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: [
30996
31355
  /* @__PURE__ */ jsxs(VStack, { gap: "none", align: "center", children: [
30997
31356
  /* @__PURE__ */ jsx(StepCircle, { step, index }),
30998
31357
  showConnectors && index < steps.length - 1 && /* @__PURE__ */ jsx(Box, { className: "w-px h-8 bg-border" })
@@ -31003,7 +31362,7 @@ var init_StepFlow = __esm({
31003
31362
  ] })
31004
31363
  ] }) }, index)) });
31005
31364
  }
31006
- return /* @__PURE__ */ jsx(Box, { className: cn("w-full flex flex-col md:flex-row items-start gap-0", className), children: steps.map((step, index) => /* @__PURE__ */ jsxs(React85__default.Fragment, { children: [
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: [
31007
31366
  /* @__PURE__ */ jsxs(VStack, { gap: "sm", align: "center", className: "flex-1 w-full md:w-auto", children: [
31008
31367
  /* @__PURE__ */ jsx(StepCircle, { step, index }),
31009
31368
  /* @__PURE__ */ jsx(Typography, { variant: "h4", className: "text-center", children: step.title }),
@@ -31979,7 +32338,7 @@ var init_LikertScale = __esm({
31979
32338
  md: "text-base",
31980
32339
  lg: "text-lg"
31981
32340
  };
31982
- LikertScale = React85__default.forwardRef(
32341
+ LikertScale = React89__default.forwardRef(
31983
32342
  ({
31984
32343
  question,
31985
32344
  options = DEFAULT_LIKERT_OPTIONS,
@@ -31991,7 +32350,7 @@ var init_LikertScale = __esm({
31991
32350
  variant = "radios",
31992
32351
  className
31993
32352
  }, ref) => {
31994
- const groupId = React85__default.useId();
32353
+ const groupId = React89__default.useId();
31995
32354
  const eventBus = useEventBus();
31996
32355
  const handleSelect = useCallback(
31997
32356
  (next) => {
@@ -33136,6 +33495,7 @@ function Editable({
33136
33495
  function BlockRow({
33137
33496
  block,
33138
33497
  readOnly,
33498
+ showAffordances,
33139
33499
  placeholder,
33140
33500
  onUpdate,
33141
33501
  onDelete,
@@ -33354,7 +33714,7 @@ function BlockRow({
33354
33714
  onValueChange: (next) => setChildContent(child.id, next)
33355
33715
  }
33356
33716
  ),
33357
- !readOnly && /* @__PURE__ */ jsx(
33717
+ !readOnly && showAffordances && /* @__PURE__ */ jsx(
33358
33718
  Button,
33359
33719
  {
33360
33720
  type: "button",
@@ -33369,7 +33729,7 @@ function BlockRow({
33369
33729
  }
33370
33730
  )
33371
33731
  ] }, child.id)),
33372
- !readOnly && /* @__PURE__ */ jsx(Box, { as: "li", className: "list-none pl-0", children: /* @__PURE__ */ jsxs(
33732
+ !readOnly && showAffordances && /* @__PURE__ */ jsx(Box, { as: "li", className: "list-none pl-0", children: /* @__PURE__ */ jsxs(
33373
33733
  Button,
33374
33734
  {
33375
33735
  type: "button",
@@ -33416,7 +33776,7 @@ function BlockRow({
33416
33776
  "data-block-id": block.id,
33417
33777
  "data-block-type": block.type,
33418
33778
  children: [
33419
- !readOnly && /* @__PURE__ */ jsxs(Box, { className: "flex w-12 shrink-0 items-center gap-0.5 pt-1", children: [
33779
+ !readOnly && showAffordances && /* @__PURE__ */ jsxs(Box, { className: "flex w-12 shrink-0 items-center gap-0.5 pt-1", children: [
33420
33780
  /* @__PURE__ */ jsx(
33421
33781
  Button,
33422
33782
  {
@@ -33515,6 +33875,7 @@ var init_RichBlockEditor = __esm({
33515
33875
  changeEvent,
33516
33876
  readOnly = false,
33517
33877
  placeholder,
33878
+ enableBlocks = false,
33518
33879
  showToolbar = true,
33519
33880
  className
33520
33881
  }) => {
@@ -33586,7 +33947,7 @@ var init_RichBlockEditor = __esm({
33586
33947
  padding: "none",
33587
33948
  className: cn("flex flex-col", className),
33588
33949
  children: [
33589
- showToolbar && !readOnly && /* @__PURE__ */ jsx(
33950
+ enableBlocks && showToolbar && !readOnly && /* @__PURE__ */ jsx(
33590
33951
  Box,
33591
33952
  {
33592
33953
  role: "toolbar",
@@ -33622,6 +33983,7 @@ var init_RichBlockEditor = __esm({
33622
33983
  {
33623
33984
  block,
33624
33985
  readOnly,
33986
+ showAffordances: enableBlocks,
33625
33987
  placeholder,
33626
33988
  onUpdate: (updater) => handleUpdate(block.id, updater),
33627
33989
  onDelete: () => handleDelete(block.id),
@@ -34296,7 +34658,7 @@ var init_DocBreadcrumb = __esm({
34296
34658
  "aria-label": t("aria.breadcrumb"),
34297
34659
  children: /* @__PURE__ */ jsx(HStack, { gap: "xs", align: "center", wrap: true, children: items.map((item, idx) => {
34298
34660
  const isLast = idx === items.length - 1;
34299
- return /* @__PURE__ */ jsxs(React85__default.Fragment, { children: [
34661
+ return /* @__PURE__ */ jsxs(React89__default.Fragment, { children: [
34300
34662
  idx > 0 && /* @__PURE__ */ jsx(
34301
34663
  Icon,
34302
34664
  {
@@ -34907,7 +35269,7 @@ var init_GradientDivider = __esm({
34907
35269
  });
34908
35270
  var MarketingFooter;
34909
35271
  var init_MarketingFooter = __esm({
34910
- "components/core/molecules/MarketingFooter.tsx"() {
35272
+ "components/marketing/molecules/MarketingFooter.tsx"() {
34911
35273
  "use client";
34912
35274
  init_cn();
34913
35275
  init_Box();
@@ -34977,7 +35339,7 @@ var init_MarketingFooter = __esm({
34977
35339
  });
34978
35340
  var PullQuote;
34979
35341
  var init_PullQuote = __esm({
34980
- "components/core/molecules/PullQuote.tsx"() {
35342
+ "components/marketing/molecules/PullQuote.tsx"() {
34981
35343
  "use client";
34982
35344
  init_cn();
34983
35345
  init_Box();
@@ -35260,7 +35622,7 @@ var init_MiniStateMachine = __esm({
35260
35622
  const x = 2 + i * (NODE_W + GAP + ARROW_W + GAP);
35261
35623
  const tc = transitionCounts[s.name] ?? 0;
35262
35624
  const role = getStateRole(s.name, s.isInitial, s.isTerminal, tc, maxTC);
35263
- return /* @__PURE__ */ jsxs(React85__default.Fragment, { children: [
35625
+ return /* @__PURE__ */ jsxs(React89__default.Fragment, { children: [
35264
35626
  /* @__PURE__ */ jsx(
35265
35627
  AvlState,
35266
35628
  {
@@ -35464,7 +35826,7 @@ var init_PageHeader = __esm({
35464
35826
  info: "bg-info/10 text-info"
35465
35827
  };
35466
35828
  return /* @__PURE__ */ jsxs(Box, { className: cn("mb-6", className), children: [
35467
- breadcrumbs && breadcrumbs.length > 0 && /* @__PURE__ */ jsx(Box, { as: "nav", className: "mb-4", children: /* @__PURE__ */ jsx(Box, { as: "ol", className: "flex items-center gap-2 text-sm", children: breadcrumbs.map((crumb, idx) => /* @__PURE__ */ jsxs(React85__default.Fragment, { children: [
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: [
35468
35830
  idx > 0 && /* @__PURE__ */ jsx(Typography, { variant: "small", color: "muted", children: "/" }),
35469
35831
  crumb.href ? /* @__PURE__ */ jsx(
35470
35832
  "a",
@@ -35551,6 +35913,271 @@ var init_PageHeader = __esm({
35551
35913
  PageHeader.displayName = "PageHeader";
35552
35914
  }
35553
35915
  });
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
+ });
35554
36181
  var lookStyles8, Header;
35555
36182
  var init_Header = __esm({
35556
36183
  "components/core/molecules/Header.tsx"() {
@@ -36201,7 +36828,7 @@ var init_WizardContainer = __esm({
36201
36828
  const isCompleted = index < currentStep;
36202
36829
  const stepKey = step.id ?? step.tabId ?? `step-${index}`;
36203
36830
  const stepTitle = step.title ?? step.name ?? `Step ${index + 1}`;
36204
- return /* @__PURE__ */ jsxs(React85__default.Fragment, { children: [
36831
+ return /* @__PURE__ */ jsxs(React89__default.Fragment, { children: [
36205
36832
  /* @__PURE__ */ jsx(
36206
36833
  Button,
36207
36834
  {
@@ -38486,7 +39113,7 @@ var init_DetailPanel = __esm({
38486
39113
  }
38487
39114
  });
38488
39115
  function extractTitle(children) {
38489
- if (!React85__default.isValidElement(children)) return void 0;
39116
+ if (!React89__default.isValidElement(children)) return void 0;
38490
39117
  const props = children.props;
38491
39118
  if (typeof props.title === "string") {
38492
39119
  return props.title;
@@ -38541,7 +39168,7 @@ function LinearView({
38541
39168
  /* @__PURE__ */ jsx(HStack, { className: "flex-wrap items-center", gap: "xs", children: trait.states.map((state, i) => {
38542
39169
  const isDone = i < currentIdx;
38543
39170
  const isCurrent = i === currentIdx;
38544
- return /* @__PURE__ */ jsxs(React85__default.Fragment, { children: [
39171
+ return /* @__PURE__ */ jsxs(React89__default.Fragment, { children: [
38545
39172
  i > 0 && /* @__PURE__ */ jsx(
38546
39173
  Typography,
38547
39174
  {
@@ -39251,7 +39878,7 @@ var init_FeatureDetailPageTemplate = __esm({
39251
39878
  });
39252
39879
  var FeatureGridOrganism;
39253
39880
  var init_FeatureGridOrganism = __esm({
39254
- "components/core/organisms/FeatureGridOrganism.tsx"() {
39881
+ "components/marketing/organisms/FeatureGridOrganism.tsx"() {
39255
39882
  "use client";
39256
39883
  init_cn();
39257
39884
  init_useEventBus();
@@ -39499,12 +40126,12 @@ var init_Form = __esm({
39499
40126
  const isSchemaEntity = isOrbitalEntitySchema(entity);
39500
40127
  const resolvedEntity = isSchemaEntity ? entity : void 0;
39501
40128
  const entityName = typeof entity === "string" ? entity : resolvedEntity?.name;
39502
- const normalizedInitialData = React85__default.useMemo(() => {
40129
+ const normalizedInitialData = React89__default.useMemo(() => {
39503
40130
  const entityRowAsInitial = isPlainEntityRow(entity) ? entity : void 0;
39504
40131
  const callerInitial = initialData !== null && typeof initialData === "object" && !Array.isArray(initialData) ? initialData : {};
39505
40132
  return entityRowAsInitial !== void 0 ? { ...entityRowAsInitial, ...callerInitial } : callerInitial;
39506
40133
  }, [entity, initialData]);
39507
- const entityDerivedFields = React85__default.useMemo(() => {
40134
+ const entityDerivedFields = React89__default.useMemo(() => {
39508
40135
  if (fields && fields.length > 0) return void 0;
39509
40136
  if (!resolvedEntity) return void 0;
39510
40137
  return resolvedEntity.fields.map(
@@ -39524,16 +40151,16 @@ var init_Form = __esm({
39524
40151
  const conditionalFields = typeof conditionalFieldsRaw === "boolean" ? {} : conditionalFieldsRaw;
39525
40152
  const hiddenCalculations = typeof hiddenCalculationsRaw === "boolean" ? [] : hiddenCalculationsRaw;
39526
40153
  const violationTriggers = typeof violationTriggersRaw === "boolean" ? [] : violationTriggersRaw;
39527
- const [formData, setFormData] = React85__default.useState(
40154
+ const [formData, setFormData] = React89__default.useState(
39528
40155
  normalizedInitialData
39529
40156
  );
39530
- const [collapsedSections, setCollapsedSections] = React85__default.useState(
40157
+ const [collapsedSections, setCollapsedSections] = React89__default.useState(
39531
40158
  /* @__PURE__ */ new Set()
39532
40159
  );
39533
- const [submitError, setSubmitError] = React85__default.useState(null);
39534
- const formRef = React85__default.useRef(null);
40160
+ const [submitError, setSubmitError] = React89__default.useState(null);
40161
+ const formRef = React89__default.useRef(null);
39535
40162
  const formMode = props.mode;
39536
- const mountedRef = React85__default.useRef(false);
40163
+ const mountedRef = React89__default.useRef(false);
39537
40164
  if (!mountedRef.current) {
39538
40165
  mountedRef.current = true;
39539
40166
  debug("forms", "mount", {
@@ -39546,7 +40173,7 @@ var init_Form = __esm({
39546
40173
  });
39547
40174
  }
39548
40175
  const shouldShowCancel = showCancel ?? (fields && fields.length > 0);
39549
- const evalContext = React85__default.useMemo(
40176
+ const evalContext = React89__default.useMemo(
39550
40177
  () => ({
39551
40178
  formValues: formData,
39552
40179
  globalVariables: externalContext?.globalVariables ?? {},
@@ -39555,7 +40182,7 @@ var init_Form = __esm({
39555
40182
  }),
39556
40183
  [formData, externalContext]
39557
40184
  );
39558
- React85__default.useEffect(() => {
40185
+ React89__default.useEffect(() => {
39559
40186
  debug("forms", "initialData-sync", {
39560
40187
  mode: formMode,
39561
40188
  normalizedInitialData,
@@ -39566,7 +40193,7 @@ var init_Form = __esm({
39566
40193
  setFormData(normalizedInitialData);
39567
40194
  }
39568
40195
  }, [normalizedInitialData]);
39569
- const processCalculations = React85__default.useCallback(
40196
+ const processCalculations = React89__default.useCallback(
39570
40197
  (changedFieldId, newFormData) => {
39571
40198
  if (!hiddenCalculations.length) return;
39572
40199
  const context = {
@@ -39591,7 +40218,7 @@ var init_Form = __esm({
39591
40218
  },
39592
40219
  [hiddenCalculations, externalContext, eventBus]
39593
40220
  );
39594
- const checkViolations = React85__default.useCallback(
40221
+ const checkViolations = React89__default.useCallback(
39595
40222
  (changedFieldId, newFormData) => {
39596
40223
  if (!violationTriggers.length) return;
39597
40224
  const context = {
@@ -39629,7 +40256,7 @@ var init_Form = __esm({
39629
40256
  processCalculations(name, newFormData);
39630
40257
  checkViolations(name, newFormData);
39631
40258
  };
39632
- const isFieldVisible = React85__default.useCallback(
40259
+ const isFieldVisible = React89__default.useCallback(
39633
40260
  (fieldName) => {
39634
40261
  const condition = conditionalFields[fieldName];
39635
40262
  if (!condition) return true;
@@ -39637,7 +40264,7 @@ var init_Form = __esm({
39637
40264
  },
39638
40265
  [conditionalFields, evalContext]
39639
40266
  );
39640
- const isSectionVisible = React85__default.useCallback(
40267
+ const isSectionVisible = React89__default.useCallback(
39641
40268
  (section) => {
39642
40269
  if (!section.condition) return true;
39643
40270
  return Boolean(evaluateFormExpression(section.condition, evalContext));
@@ -39713,7 +40340,7 @@ var init_Form = __esm({
39713
40340
  eventBus.emit(`UI:${onCancel}`);
39714
40341
  }
39715
40342
  };
39716
- const renderField = React85__default.useCallback(
40343
+ const renderField = React89__default.useCallback(
39717
40344
  (field) => {
39718
40345
  const fieldName = field.name || field.field;
39719
40346
  if (!fieldName) return null;
@@ -39722,19 +40349,19 @@ var init_Form = __esm({
39722
40349
  }
39723
40350
  const inputType = determineInputType(field);
39724
40351
  const label = field.label || fieldName.charAt(0).toUpperCase() + fieldName.slice(1).replace(/([A-Z])/g, " $1");
39725
- const currentValue = formData[fieldName] ?? field.defaultValue ?? "";
40352
+ const currentValue2 = formData[fieldName] ?? field.defaultValue ?? "";
39726
40353
  return /* @__PURE__ */ jsxs(VStack, { gap: "xs", "data-field": fieldName, children: [
39727
40354
  inputType !== "checkbox" && /* @__PURE__ */ jsxs(Typography, { as: "label", variant: "label", weight: "bold", children: [
39728
40355
  label,
39729
40356
  field.required && /* @__PURE__ */ jsx(Typography, { as: "span", color: "error", className: "ml-1", children: "*" })
39730
40357
  ] }),
39731
- renderFieldInput(field, fieldName, inputType, currentValue, label)
40358
+ renderFieldInput(field, fieldName, inputType, currentValue2, label)
39732
40359
  ] }, fieldName);
39733
40360
  },
39734
40361
  [formData, isFieldVisible, relationsData, relationsLoading, isLoading]
39735
40362
  );
39736
40363
  const effectiveFields = entityDerivedFields ?? fields;
39737
- const normalizedFields = React85__default.useMemo(() => {
40364
+ const normalizedFields = React89__default.useMemo(() => {
39738
40365
  if (!effectiveFields || effectiveFields.length === 0) return [];
39739
40366
  return effectiveFields.map((field) => {
39740
40367
  if (typeof field === "string") {
@@ -39757,7 +40384,7 @@ var init_Form = __esm({
39757
40384
  return field;
39758
40385
  });
39759
40386
  }, [effectiveFields, resolvedEntity]);
39760
- const schemaFields = React85__default.useMemo(() => {
40387
+ const schemaFields = React89__default.useMemo(() => {
39761
40388
  if (normalizedFields.length === 0) return null;
39762
40389
  if (isDebugEnabled()) {
39763
40390
  debugGroup(`Form: ${entityName || "unknown"}`);
@@ -39767,7 +40394,7 @@ var init_Form = __esm({
39767
40394
  }
39768
40395
  return normalizedFields.map(renderField).filter(Boolean);
39769
40396
  }, [normalizedFields, renderField, entityName, conditionalFields]);
39770
- const sectionElements = React85__default.useMemo(() => {
40397
+ const sectionElements = React89__default.useMemo(() => {
39771
40398
  if (!sections || sections.length === 0) return null;
39772
40399
  return sections.map((section) => {
39773
40400
  if (!isSectionVisible(section)) {
@@ -39803,7 +40430,7 @@ var init_Form = __esm({
39803
40430
  ] }, section.id);
39804
40431
  }).filter(Boolean);
39805
40432
  }, [sections, isSectionVisible, collapsedSections, renderField, gap]);
39806
- function renderFieldInput(field, fieldName, inputType, currentValue, label) {
40433
+ function renderFieldInput(field, fieldName, inputType, currentValue2, label) {
39807
40434
  const commonProps = {
39808
40435
  id: fieldName,
39809
40436
  name: fieldName,
@@ -39820,7 +40447,7 @@ var init_Form = __esm({
39820
40447
  {
39821
40448
  ...commonProps,
39822
40449
  label: label + (field.required ? " *" : ""),
39823
- checked: Boolean(currentValue),
40450
+ checked: Boolean(currentValue2),
39824
40451
  onChange: (e) => handleChange(fieldName, e.target.checked)
39825
40452
  }
39826
40453
  );
@@ -39829,7 +40456,7 @@ var init_Form = __esm({
39829
40456
  Textarea,
39830
40457
  {
39831
40458
  ...commonProps,
39832
- value: String(currentValue),
40459
+ value: String(currentValue2),
39833
40460
  onChange: (e) => handleChange(fieldName, e.target.value),
39834
40461
  minLength: field.min,
39835
40462
  maxLength: field.max
@@ -39842,7 +40469,7 @@ var init_Form = __esm({
39842
40469
  {
39843
40470
  ...commonProps,
39844
40471
  options,
39845
- value: String(currentValue),
40472
+ value: String(currentValue2),
39846
40473
  onChange: (e) => handleChange(fieldName, e.target.value),
39847
40474
  placeholder: field.placeholder || `Select ${label}...`
39848
40475
  }
@@ -39855,7 +40482,7 @@ var init_Form = __esm({
39855
40482
  RelationSelect,
39856
40483
  {
39857
40484
  ...commonProps,
39858
- value: currentValue ? String(currentValue) : void 0,
40485
+ value: currentValue2 ? String(currentValue2) : void 0,
39859
40486
  onChange: (value) => handleChange(fieldName, value),
39860
40487
  options: relationOptions,
39861
40488
  isLoading: relationLoading,
@@ -39871,7 +40498,7 @@ var init_Form = __esm({
39871
40498
  {
39872
40499
  ...commonProps,
39873
40500
  type: "number",
39874
- value: currentValue !== void 0 && currentValue !== "" ? String(currentValue) : "",
40501
+ value: currentValue2 !== void 0 && currentValue2 !== "" ? String(currentValue2) : "",
39875
40502
  onChange: (e) => handleChange(
39876
40503
  fieldName,
39877
40504
  e.target.value ? Number(e.target.value) : void 0
@@ -39886,7 +40513,7 @@ var init_Form = __esm({
39886
40513
  {
39887
40514
  ...commonProps,
39888
40515
  type: "date",
39889
- value: formatDateValue(currentValue),
40516
+ value: formatDateValue(currentValue2),
39890
40517
  onChange: (e) => handleChange(fieldName, e.target.value)
39891
40518
  }
39892
40519
  );
@@ -39896,7 +40523,7 @@ var init_Form = __esm({
39896
40523
  {
39897
40524
  ...commonProps,
39898
40525
  type: "datetime-local",
39899
- value: formatDateTimeValue(currentValue),
40526
+ value: formatDateTimeValue(currentValue2),
39900
40527
  onChange: (e) => handleChange(fieldName, e.target.value)
39901
40528
  }
39902
40529
  );
@@ -39906,7 +40533,7 @@ var init_Form = __esm({
39906
40533
  {
39907
40534
  ...commonProps,
39908
40535
  type: "email",
39909
- value: String(currentValue),
40536
+ value: String(currentValue2),
39910
40537
  onChange: (e) => handleChange(fieldName, e.target.value),
39911
40538
  minLength: field.min,
39912
40539
  maxLength: field.max
@@ -39918,7 +40545,7 @@ var init_Form = __esm({
39918
40545
  {
39919
40546
  ...commonProps,
39920
40547
  type: "url",
39921
- value: String(currentValue),
40548
+ value: String(currentValue2),
39922
40549
  onChange: (e) => handleChange(fieldName, e.target.value),
39923
40550
  minLength: field.min,
39924
40551
  maxLength: field.max
@@ -39930,7 +40557,7 @@ var init_Form = __esm({
39930
40557
  {
39931
40558
  ...commonProps,
39932
40559
  type: "password",
39933
- value: String(currentValue),
40560
+ value: String(currentValue2),
39934
40561
  onChange: (e) => handleChange(fieldName, e.target.value),
39935
40562
  minLength: field.min,
39936
40563
  maxLength: field.max
@@ -39943,7 +40570,7 @@ var init_Form = __esm({
39943
40570
  {
39944
40571
  ...commonProps,
39945
40572
  type: "text",
39946
- value: String(currentValue),
40573
+ value: String(currentValue2),
39947
40574
  onChange: (e) => handleChange(fieldName, e.target.value),
39948
40575
  minLength: field.min,
39949
40576
  maxLength: field.max
@@ -40598,7 +41225,7 @@ var init_GenericAppTemplate = __esm({
40598
41225
  });
40599
41226
  var HeroOrganism, _HeroClickInterceptor;
40600
41227
  var init_HeroOrganism = __esm({
40601
- "components/core/organisms/HeroOrganism.tsx"() {
41228
+ "components/marketing/organisms/HeroOrganism.tsx"() {
40602
41229
  "use client";
40603
41230
  init_cn();
40604
41231
  init_useEventBus();
@@ -41042,7 +41669,7 @@ var init_List = __esm({
41042
41669
  if (entity && typeof entity === "object" && "id" in entity) return [entity];
41043
41670
  return [];
41044
41671
  }, [entity]);
41045
- const getItemActions = React85__default.useCallback(
41672
+ const getItemActions = React89__default.useCallback(
41046
41673
  (item) => {
41047
41674
  if (!itemActions) return [];
41048
41675
  if (typeof itemActions === "function") {
@@ -41518,7 +42145,7 @@ var init_MediaGallery = __esm({
41518
42145
  [selectable, selectedItems, selectionEvent, eventBus]
41519
42146
  );
41520
42147
  const entityData = Array.isArray(entity) ? entity : [];
41521
- const items = React85__default.useMemo(() => {
42148
+ const items = React89__default.useMemo(() => {
41522
42149
  if (propItems) return propItems;
41523
42150
  if (entityData.length === 0) return [];
41524
42151
  return entityData.map((record, idx) => ({
@@ -41679,7 +42306,7 @@ var init_MediaGallery = __esm({
41679
42306
  }
41680
42307
  });
41681
42308
  function extractTitle2(children) {
41682
- if (!React85__default.isValidElement(children)) return void 0;
42309
+ if (!React89__default.isValidElement(children)) return void 0;
41683
42310
  const props = children.props;
41684
42311
  if (typeof props.title === "string") {
41685
42312
  return props.title;
@@ -42091,7 +42718,7 @@ var init_debugRegistry = __esm({
42091
42718
  }
42092
42719
  });
42093
42720
  function useDebugData() {
42094
- const [data, setData] = React85.useState(() => ({
42721
+ const [data, setData] = React89.useState(() => ({
42095
42722
  traits: [],
42096
42723
  ticks: [],
42097
42724
  guards: [],
@@ -42105,7 +42732,7 @@ function useDebugData() {
42105
42732
  },
42106
42733
  lastUpdate: Date.now()
42107
42734
  }));
42108
- React85.useEffect(() => {
42735
+ React89.useEffect(() => {
42109
42736
  const updateData = () => {
42110
42737
  setData({
42111
42738
  traits: getAllTraits(),
@@ -42214,12 +42841,12 @@ function layoutGraph(states, transitions, initialState, width, height) {
42214
42841
  return positions;
42215
42842
  }
42216
42843
  function WalkMinimap() {
42217
- const [walkStep, setWalkStep] = React85.useState(null);
42218
- const [traits2, setTraits] = React85.useState([]);
42219
- const [coveredEdges, setCoveredEdges] = React85.useState([]);
42220
- const [completedTraits, setCompletedTraits] = React85.useState(/* @__PURE__ */ new Set());
42221
- const prevTraitRef = React85.useRef(null);
42222
- React85.useEffect(() => {
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(() => {
42223
42850
  const interval = setInterval(() => {
42224
42851
  const w = window;
42225
42852
  const step = w.__orbitalWalkStep;
@@ -42655,15 +43282,15 @@ var init_EntitiesTab = __esm({
42655
43282
  });
42656
43283
  function EventFlowTab({ events: events2 }) {
42657
43284
  const { t } = useTranslate();
42658
- const [filter, setFilter] = React85.useState("all");
42659
- const containerRef = React85.useRef(null);
42660
- const [autoScroll, setAutoScroll] = React85.useState(true);
42661
- React85.useEffect(() => {
43285
+ const [filter, setFilter] = React89.useState("all");
43286
+ const containerRef = React89.useRef(null);
43287
+ const [autoScroll, setAutoScroll] = React89.useState(true);
43288
+ React89.useEffect(() => {
42662
43289
  if (autoScroll && containerRef.current) {
42663
43290
  containerRef.current.scrollTop = containerRef.current.scrollHeight;
42664
43291
  }
42665
43292
  }, [events2.length, autoScroll]);
42666
- const filteredEvents = React85.useMemo(() => {
43293
+ const filteredEvents = React89.useMemo(() => {
42667
43294
  if (filter === "all") return events2;
42668
43295
  return events2.filter((e) => e.type === filter);
42669
43296
  }, [events2, filter]);
@@ -42779,7 +43406,7 @@ var init_EventFlowTab = __esm({
42779
43406
  });
42780
43407
  function GuardsPanel({ guards }) {
42781
43408
  const { t } = useTranslate();
42782
- const [filter, setFilter] = React85.useState("all");
43409
+ const [filter, setFilter] = React89.useState("all");
42783
43410
  if (guards.length === 0) {
42784
43411
  return /* @__PURE__ */ jsx(
42785
43412
  EmptyState,
@@ -42792,7 +43419,7 @@ function GuardsPanel({ guards }) {
42792
43419
  }
42793
43420
  const passedCount = guards.filter((g) => g.result).length;
42794
43421
  const failedCount = guards.length - passedCount;
42795
- const filteredGuards = React85.useMemo(() => {
43422
+ const filteredGuards = React89.useMemo(() => {
42796
43423
  if (filter === "all") return guards;
42797
43424
  if (filter === "passed") return guards.filter((g) => g.result);
42798
43425
  return guards.filter((g) => !g.result);
@@ -42955,10 +43582,10 @@ function EffectBadge({ effect }) {
42955
43582
  }
42956
43583
  function TransitionTimeline({ transitions }) {
42957
43584
  const { t } = useTranslate();
42958
- const containerRef = React85.useRef(null);
42959
- const [autoScroll, setAutoScroll] = React85.useState(true);
42960
- const [expandedId, setExpandedId] = React85.useState(null);
42961
- React85.useEffect(() => {
43585
+ const containerRef = React89.useRef(null);
43586
+ const [autoScroll, setAutoScroll] = React89.useState(true);
43587
+ const [expandedId, setExpandedId] = React89.useState(null);
43588
+ React89.useEffect(() => {
42962
43589
  if (autoScroll && containerRef.current) {
42963
43590
  containerRef.current.scrollTop = containerRef.current.scrollHeight;
42964
43591
  }
@@ -43238,9 +43865,9 @@ function getAllEvents(traits2) {
43238
43865
  function EventDispatcherTab({ traits: traits2, schema }) {
43239
43866
  const eventBus = useEventBus();
43240
43867
  const { t } = useTranslate();
43241
- const [log12, setLog] = React85.useState([]);
43242
- const prevStatesRef = React85.useRef(/* @__PURE__ */ new Map());
43243
- React85.useEffect(() => {
43868
+ const [log12, setLog] = React89.useState([]);
43869
+ const prevStatesRef = React89.useRef(/* @__PURE__ */ new Map());
43870
+ React89.useEffect(() => {
43244
43871
  for (const trait of traits2) {
43245
43872
  const prev = prevStatesRef.current.get(trait.id);
43246
43873
  if (prev && prev !== trait.currentState) {
@@ -43409,10 +44036,10 @@ function VerifyModePanel({
43409
44036
  localCount
43410
44037
  }) {
43411
44038
  const { t } = useTranslate();
43412
- const [expanded, setExpanded] = React85.useState(true);
43413
- const scrollRef = React85.useRef(null);
43414
- const prevCountRef = React85.useRef(0);
43415
- React85.useEffect(() => {
44039
+ const [expanded, setExpanded] = React89.useState(true);
44040
+ const scrollRef = React89.useRef(null);
44041
+ const prevCountRef = React89.useRef(0);
44042
+ React89.useEffect(() => {
43416
44043
  if (expanded && transitions.length > prevCountRef.current && scrollRef.current) {
43417
44044
  scrollRef.current.scrollTop = scrollRef.current.scrollHeight;
43418
44045
  }
@@ -43469,10 +44096,10 @@ function RuntimeDebugger({
43469
44096
  schema
43470
44097
  }) {
43471
44098
  const { t } = useTranslate();
43472
- const [isCollapsed, setIsCollapsed] = React85.useState(mode === "verify" ? true : defaultCollapsed);
43473
- const [isVisible, setIsVisible] = React85.useState(mode === "inline" || mode === "verify" || isDebugEnabled2());
44099
+ const [isCollapsed, setIsCollapsed] = React89.useState(mode === "verify" ? true : defaultCollapsed);
44100
+ const [isVisible, setIsVisible] = React89.useState(mode === "inline" || mode === "verify" || isDebugEnabled2());
43474
44101
  const debugData = useDebugData();
43475
- React85.useEffect(() => {
44102
+ React89.useEffect(() => {
43476
44103
  if (mode === "inline") return;
43477
44104
  return onDebugToggle((enabled) => {
43478
44105
  setIsVisible(enabled);
@@ -43481,7 +44108,7 @@ function RuntimeDebugger({
43481
44108
  }
43482
44109
  });
43483
44110
  }, [mode]);
43484
- React85.useEffect(() => {
44111
+ React89.useEffect(() => {
43485
44112
  if (mode === "inline") return;
43486
44113
  const handleKeyDown = (e) => {
43487
44114
  if (e.key === "`" && isVisible) {
@@ -43496,7 +44123,7 @@ function RuntimeDebugger({
43496
44123
  if (!isVisible) {
43497
44124
  return null;
43498
44125
  }
43499
- const positionClasses3 = {
44126
+ const positionClasses = {
43500
44127
  "bottom-right": "bottom-4 right-4",
43501
44128
  "bottom-left": "bottom-4 left-4",
43502
44129
  "top-right": "top-4 right-4",
@@ -43625,7 +44252,7 @@ function RuntimeDebugger({
43625
44252
  className: cn(
43626
44253
  "runtime-debugger",
43627
44254
  "fixed",
43628
- positionClasses3[position],
44255
+ positionClasses[position],
43629
44256
  isCollapsed ? "runtime-debugger--collapsed" : "runtime-debugger--expanded",
43630
44257
  className
43631
44258
  ),
@@ -43930,7 +44557,7 @@ function SequenceBar({
43930
44557
  onSlotRemove(index);
43931
44558
  }, [onSlotRemove, playing]);
43932
44559
  const paddedSlots = Array.from({ length: maxSlots }, (_, i) => slots[i]);
43933
- return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(React85__default.Fragment, { children: [
44560
+ return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(React89__default.Fragment, { children: [
43934
44561
  i > 0 && /* @__PURE__ */ jsx(
43935
44562
  Typography,
43936
44563
  {
@@ -44206,7 +44833,7 @@ var init_SequencerBoard = __esm({
44206
44833
  });
44207
44834
  var ShowcaseOrganism;
44208
44835
  var init_ShowcaseOrganism = __esm({
44209
- "components/core/organisms/ShowcaseOrganism.tsx"() {
44836
+ "components/marketing/organisms/ShowcaseOrganism.tsx"() {
44210
44837
  "use client";
44211
44838
  init_cn();
44212
44839
  init_useEventBus();
@@ -44888,7 +45515,7 @@ var init_StatCard = __esm({
44888
45515
  title: propTitle,
44889
45516
  value: propValue,
44890
45517
  previousValue,
44891
- currentValue,
45518
+ currentValue: currentValue2,
44892
45519
  trend: manualTrend,
44893
45520
  trendDirection: manualDirection,
44894
45521
  invertTrend = false,
@@ -44909,7 +45536,7 @@ var init_StatCard = __esm({
44909
45536
  const labelToUse = propLabel ?? propTitle;
44910
45537
  const eventBus = useEventBus();
44911
45538
  const { t } = useTranslate();
44912
- const handleActionClick = React85__default.useCallback(() => {
45539
+ const handleActionClick = React89__default.useCallback(() => {
44913
45540
  if (action?.event) {
44914
45541
  eventBus.emit(`UI:${action.event}`, {});
44915
45542
  }
@@ -44920,7 +45547,7 @@ var init_StatCard = __esm({
44920
45547
  const data = Array.isArray(entity) ? entity : entity ? [entity] : [];
44921
45548
  const isLoading = externalLoading ?? false;
44922
45549
  const error = externalError;
44923
- const computeMetricValue = React85__default.useCallback(
45550
+ const computeMetricValue = React89__default.useCallback(
44924
45551
  (metric, items) => {
44925
45552
  if (metric.value !== void 0) {
44926
45553
  return metric.value;
@@ -44959,7 +45586,7 @@ var init_StatCard = __esm({
44959
45586
  },
44960
45587
  []
44961
45588
  );
44962
- const schemaStats = React85__default.useMemo(() => {
45589
+ const schemaStats = React89__default.useMemo(() => {
44963
45590
  if (!metrics || metrics.length === 0) return null;
44964
45591
  return metrics.map((metric) => ({
44965
45592
  label: metric.label,
@@ -44967,13 +45594,13 @@ var init_StatCard = __esm({
44967
45594
  format: metric.format
44968
45595
  }));
44969
45596
  }, [metrics, data, computeMetricValue]);
44970
- const calculatedTrend = React85__default.useMemo(() => {
45597
+ const calculatedTrend = React89__default.useMemo(() => {
44971
45598
  if (manualTrend !== void 0) return manualTrend;
44972
- if (previousValue === void 0 || currentValue === void 0)
45599
+ if (previousValue === void 0 || currentValue2 === void 0)
44973
45600
  return void 0;
44974
- if (previousValue === 0) return currentValue > 0 ? 100 : 0;
44975
- return (currentValue - previousValue) / previousValue * 100;
44976
- }, [manualTrend, previousValue, currentValue]);
45601
+ if (previousValue === 0) return currentValue2 > 0 ? 100 : 0;
45602
+ return (currentValue2 - previousValue) / previousValue * 100;
45603
+ }, [manualTrend, previousValue, currentValue2]);
44977
45604
  if (schemaStats && schemaStats.length > 1) {
44978
45605
  if (isLoading) {
44979
45606
  return /* @__PURE__ */ jsx(
@@ -45631,7 +46258,7 @@ var init_StatsOrganism = __esm({
45631
46258
  });
45632
46259
  var StepFlowOrganism;
45633
46260
  var init_StepFlowOrganism = __esm({
45634
- "components/core/organisms/StepFlowOrganism.tsx"() {
46261
+ "components/marketing/organisms/StepFlowOrganism.tsx"() {
45635
46262
  "use client";
45636
46263
  init_cn();
45637
46264
  init_Stack();
@@ -45901,7 +46528,7 @@ var init_Timeline = __esm({
45901
46528
  }) => {
45902
46529
  const { t } = useTranslate();
45903
46530
  const entityData = Array.isArray(entity) ? entity : [];
45904
- const items = React85__default.useMemo(() => {
46531
+ const items = React89__default.useMemo(() => {
45905
46532
  if (propItems) return propItems;
45906
46533
  if (entityData.length === 0) return [];
45907
46534
  return entityData.map((record, idx) => {
@@ -46008,7 +46635,7 @@ var init_Timeline = __esm({
46008
46635
  }
46009
46636
  });
46010
46637
  function extractToastProps(children) {
46011
- if (!React85__default.isValidElement(children)) {
46638
+ if (!React89__default.isValidElement(children)) {
46012
46639
  if (typeof children === "string") {
46013
46640
  return { message: children };
46014
46641
  }
@@ -46046,7 +46673,7 @@ var init_ToastSlot = __esm({
46046
46673
  eventBus.emit("UI:CLOSE");
46047
46674
  };
46048
46675
  if (!isVisible) return null;
46049
- const isCustomContent = React85__default.isValidElement(children) && !message;
46676
+ const isCustomContent = React89__default.isValidElement(children) && !message;
46050
46677
  return /* @__PURE__ */ jsx(Box, { className: "fixed bottom-4 right-4 z-50", children: isCustomContent ? children : /* @__PURE__ */ jsx(
46051
46678
  Toast,
46052
46679
  {
@@ -46556,12 +47183,12 @@ var init_WorldMapTemplate = __esm({
46556
47183
  }
46557
47184
  });
46558
47185
  function lazyThree(name, loader) {
46559
- const Lazy = React85__default.lazy(() => loader().then((m) => ({ default: m[name] })));
47186
+ const Lazy = React89__default.lazy(() => loader().then((m) => ({ default: m[name] })));
46560
47187
  function ThreeWrapper(props) {
46561
- return React85__default.createElement(
46562
- React85__default.Suspense,
47188
+ return React89__default.createElement(
47189
+ React89__default.Suspense,
46563
47190
  { fallback: null },
46564
- React85__default.createElement(Lazy, props)
47191
+ React89__default.createElement(Lazy, props)
46565
47192
  );
46566
47193
  }
46567
47194
  ThreeWrapper.displayName = `Lazy(${name})`;
@@ -46581,6 +47208,7 @@ var init_component_registry_generated = __esm({
46581
47208
  init_AnimatedReveal();
46582
47209
  init_ArticleSection();
46583
47210
  init_Aside();
47211
+ init_AssetPicker();
46584
47212
  init_AuthLayout();
46585
47213
  init_BattleBoard();
46586
47214
  init_BattleTemplate();
@@ -46680,11 +47308,13 @@ var init_component_registry_generated = __esm({
46680
47308
  init_GradientDivider();
46681
47309
  init_GraphCanvas();
46682
47310
  init_GraphView();
47311
+ init_GridPicker();
46683
47312
  init_Header();
46684
47313
  init_HealthBar();
46685
47314
  init_HealthPanel();
46686
47315
  init_HeroOrganism();
46687
47316
  init_HeroSection();
47317
+ init_IconPicker();
46688
47318
  init_InfiniteScrollSentinel();
46689
47319
  init_InputGroup();
46690
47320
  init_InstallBox();
@@ -46729,6 +47359,7 @@ var init_component_registry_generated = __esm({
46729
47359
  init_PricingOrganism();
46730
47360
  init_PricingPageTemplate();
46731
47361
  init_ProgressDots();
47362
+ init_PropertyInspector();
46732
47363
  init_PullQuote();
46733
47364
  init_PullToRefresh();
46734
47365
  init_QrScanner();
@@ -46852,6 +47483,7 @@ var init_component_registry_generated = __esm({
46852
47483
  "AnimatedReveal": AnimatedReveal,
46853
47484
  "ArticleSection": ArticleSection,
46854
47485
  "Aside": Aside,
47486
+ "AssetPicker": AssetPicker,
46855
47487
  "AuthLayout": AuthLayout,
46856
47488
  "Avatar": AvatarPattern,
46857
47489
  "AvatarPattern": AvatarPattern,
@@ -46971,6 +47603,7 @@ var init_component_registry_generated = __esm({
46971
47603
  "GraphView": GraphView,
46972
47604
  "Grid": GridPattern,
46973
47605
  "GridPattern": GridPattern,
47606
+ "GridPicker": GridPicker,
46974
47607
  "HStack": HStackPattern,
46975
47608
  "HStackPattern": HStackPattern,
46976
47609
  "Header": Header,
@@ -46980,6 +47613,7 @@ var init_component_registry_generated = __esm({
46980
47613
  "HeroSection": HeroSection,
46981
47614
  "Icon": IconPattern,
46982
47615
  "IconPattern": IconPattern,
47616
+ "IconPicker": IconPicker,
46983
47617
  "InfiniteScrollSentinel": InfiniteScrollSentinel,
46984
47618
  "Input": InputPattern,
46985
47619
  "InputGroup": InputGroup,
@@ -47036,6 +47670,7 @@ var init_component_registry_generated = __esm({
47036
47670
  "ProgressBar": ProgressBarPattern,
47037
47671
  "ProgressBarPattern": ProgressBarPattern,
47038
47672
  "ProgressDots": ProgressDots,
47673
+ "PropertyInspector": PropertyInspector,
47039
47674
  "PullQuote": PullQuote,
47040
47675
  "PullToRefresh": PullToRefresh,
47041
47676
  "QrScanner": QrScanner,
@@ -47177,7 +47812,7 @@ function SuspenseConfigProvider({
47177
47812
  config,
47178
47813
  children
47179
47814
  }) {
47180
- return React85__default.createElement(
47815
+ return React89__default.createElement(
47181
47816
  SuspenseConfigContext.Provider,
47182
47817
  { value: config },
47183
47818
  children
@@ -47252,6 +47887,9 @@ function renderContainedPortal(t, slot, content, onDismiss) {
47252
47887
  const slotId = `slot-${slot}`;
47253
47888
  switch (slot) {
47254
47889
  case "modal":
47890
+ if (SELF_OVERLAY_PATTERNS.has(content.pattern)) {
47891
+ return /* @__PURE__ */ jsx(Box, { id: slotId, className: "contents", children: slotContent });
47892
+ }
47255
47893
  return /* @__PURE__ */ jsx(
47256
47894
  Box,
47257
47895
  {
@@ -47513,8 +48151,8 @@ function CompiledPortal({ slot, className, pattern, sourceTrait, children }) {
47513
48151
  const slotId = `slot-${slot}`;
47514
48152
  let wrapper;
47515
48153
  switch (slot) {
47516
- case "modal":
47517
- wrapper = /* @__PURE__ */ jsx(Modal, { isOpen: true, onClose: handleDismiss, showCloseButton: true, size: "lg", children: /* @__PURE__ */ jsx(
48154
+ case "modal": {
48155
+ const innerContent = /* @__PURE__ */ jsx(
47518
48156
  Box,
47519
48157
  {
47520
48158
  id: slotId,
@@ -47523,8 +48161,10 @@ function CompiledPortal({ slot, className, pattern, sourceTrait, children }) {
47523
48161
  "data-source-trait": sourceTrait,
47524
48162
  children
47525
48163
  }
47526
- ) });
48164
+ );
48165
+ wrapper = pattern !== void 0 && SELF_OVERLAY_PATTERNS.has(pattern) ? innerContent : /* @__PURE__ */ jsx(Modal, { isOpen: true, onClose: handleDismiss, showCloseButton: true, size: "lg", children: innerContent });
47527
48166
  break;
48167
+ }
47528
48168
  case "drawer":
47529
48169
  wrapper = /* @__PURE__ */ jsx(Drawer, { isOpen: true, onClose: handleDismiss, position: "right", children: /* @__PURE__ */ jsx(
47530
48170
  Box,
@@ -47582,7 +48222,7 @@ function SlotPortal({
47582
48222
  let wrapper;
47583
48223
  switch (slot) {
47584
48224
  case "modal":
47585
- wrapper = /* @__PURE__ */ jsx(
48225
+ wrapper = SELF_OVERLAY_PATTERNS.has(content.pattern) ? /* @__PURE__ */ jsx(Box, { id: slotId, children: slotContent }) : /* @__PURE__ */ jsx(
47586
48226
  Modal,
47587
48227
  {
47588
48228
  isOpen: true,
@@ -47662,7 +48302,7 @@ function renderPatternChildren(children, onDismiss, parentId = "root", parentPat
47662
48302
  const key = `${parentId}-${index}-trait:${traitName}`;
47663
48303
  return /* @__PURE__ */ jsx(TraitFrame, { traitName }, key);
47664
48304
  }
47665
- return /* @__PURE__ */ jsx(React85__default.Fragment, { children: child }, `${parentId}-${index}`);
48305
+ return /* @__PURE__ */ jsx(React89__default.Fragment, { children: child }, `${parentId}-${index}`);
47666
48306
  }
47667
48307
  if (!child || typeof child !== "object") return null;
47668
48308
  const childId = `${parentId}-${index}`;
@@ -47702,14 +48342,14 @@ function isPatternConfig(value) {
47702
48342
  if (value === null || value === void 0) return false;
47703
48343
  if (typeof value !== "object") return false;
47704
48344
  if (Array.isArray(value)) return false;
47705
- if (React85__default.isValidElement(value)) return false;
48345
+ if (React89__default.isValidElement(value)) return false;
47706
48346
  if (value instanceof Date) return false;
47707
48347
  if (typeof value === "function") return false;
47708
48348
  const record = value;
47709
48349
  return "type" in record && typeof record.type === "string";
47710
48350
  }
47711
48351
  function isPlainConfigObject(value) {
47712
- if (React85__default.isValidElement(value)) return false;
48352
+ if (React89__default.isValidElement(value)) return false;
47713
48353
  if (value instanceof Date) return false;
47714
48354
  const proto = Object.getPrototypeOf(value);
47715
48355
  return proto === Object.prototype || proto === null;
@@ -47962,7 +48602,7 @@ function UISlotRenderer({
47962
48602
  }
47963
48603
  return wrapped;
47964
48604
  }
47965
- var scopeWrapLog, TRAIT_BINDING_RE, SuspenseConfigContext, SlotContainedContext, SLOT_SKELETON_MAP, FORM_PATTERNS, PATTERNS_WITH_CHILDREN;
48605
+ var scopeWrapLog, TRAIT_BINDING_RE, SuspenseConfigContext, SlotContainedContext, SLOT_SKELETON_MAP, FORM_PATTERNS, SELF_OVERLAY_PATTERNS, PATTERNS_WITH_CHILDREN;
47966
48606
  var init_UISlotRenderer = __esm({
47967
48607
  "components/core/organisms/UISlotRenderer.tsx"() {
47968
48608
  "use client";
@@ -47998,6 +48638,7 @@ var init_UISlotRenderer = __esm({
47998
48638
  "inline-edit-form",
47999
48639
  "wizard-step"
48000
48640
  ]);
48641
+ SELF_OVERLAY_PATTERNS = /* @__PURE__ */ new Set(["modal", "confirm-dialog"]);
48001
48642
  PATTERNS_WITH_CHILDREN = /* @__PURE__ */ new Set([
48002
48643
  "stack",
48003
48644
  "vstack",