@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 React84 from 'react';
2
- import React84__default, { createContext, useMemo, useContext, useRef, useEffect, useCallback, Suspense, useState, useSyncExternalStore, useLayoutEffect, lazy, useId } from 'react';
1
+ import * as React88 from 'react';
2
+ import React88__default, { createContext, useMemo, useContext, useRef, useEffect, useCallback, Suspense, useState, useSyncExternalStore, useLayoutEffect, lazy, useId } from 'react';
3
3
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
4
4
  import { clsx } from 'clsx';
5
5
  import { twMerge } from 'tailwind-merge';
@@ -393,7 +393,7 @@ var init_Box = __esm({
393
393
  fixed: "fixed",
394
394
  sticky: "sticky"
395
395
  };
396
- Box = React84__default.forwardRef(
396
+ Box = React88__default.forwardRef(
397
397
  ({
398
398
  padding,
399
399
  paddingX,
@@ -443,7 +443,7 @@ var init_Box = __esm({
443
443
  onMouseLeave?.(e);
444
444
  }, [hoverEvent, eventBus, onMouseLeave]);
445
445
  const isClickable = action || onClick;
446
- return React84__default.createElement(
446
+ return React88__default.createElement(
447
447
  Component,
448
448
  {
449
449
  ref,
@@ -1226,7 +1226,7 @@ var init_Icon = __esm({
1226
1226
  const directIcon = typeof icon === "string" ? void 0 : icon;
1227
1227
  const effectiveName = typeof icon === "string" ? icon : name;
1228
1228
  const family = useIconFamily();
1229
- const RenderedComponent = React84__default.useMemo(() => {
1229
+ const RenderedComponent = React88__default.useMemo(() => {
1230
1230
  if (directIcon) return null;
1231
1231
  return effectiveName ? resolveIconForFamily(effectiveName, family) : null;
1232
1232
  }, [directIcon, effectiveName, family]);
@@ -1284,7 +1284,7 @@ function resolveIconProp(value, sizeClass) {
1284
1284
  const IconComp = value;
1285
1285
  return /* @__PURE__ */ jsx(IconComp, { className: sizeClass });
1286
1286
  }
1287
- if (React84__default.isValidElement(value)) {
1287
+ if (React88__default.isValidElement(value)) {
1288
1288
  return value;
1289
1289
  }
1290
1290
  if (typeof value === "object" && value !== null && "render" in value) {
@@ -1360,7 +1360,7 @@ var init_Button = __esm({
1360
1360
  md: "h-icon-default w-icon-default",
1361
1361
  lg: "h-icon-default w-icon-default"
1362
1362
  };
1363
- Button = React84__default.forwardRef(
1363
+ Button = React88__default.forwardRef(
1364
1364
  ({
1365
1365
  className,
1366
1366
  variant = "primary",
@@ -1425,7 +1425,7 @@ var Dialog;
1425
1425
  var init_Dialog = __esm({
1426
1426
  "components/core/atoms/Dialog.tsx"() {
1427
1427
  init_cn();
1428
- Dialog = React84__default.forwardRef(
1428
+ Dialog = React88__default.forwardRef(
1429
1429
  ({
1430
1430
  role = "dialog",
1431
1431
  "aria-modal": ariaModal = true,
@@ -1950,7 +1950,7 @@ var init_Drawer = __esm({
1950
1950
  };
1951
1951
  const widthClass = width in sizeWidths ? sizeWidths[width] : "";
1952
1952
  const widthStyle = width in sizeWidths ? void 0 : { width };
1953
- const positionClasses3 = position === "right" ? "right-0 border-l" : "left-0 border-r";
1953
+ const positionClasses = position === "right" ? "right-0 border-l" : "left-0 border-r";
1954
1954
  const animationClasses2 = position === "right" ? "animate-slide-in-right" : "animate-slide-in-left";
1955
1955
  return /* @__PURE__ */ jsxs(Fragment, { children: [
1956
1956
  /* @__PURE__ */ jsx(
@@ -1971,7 +1971,7 @@ var init_Drawer = __esm({
1971
1971
  className: cn(
1972
1972
  "fixed top-0 bottom-0 z-50",
1973
1973
  "flex flex-col max-h-screen",
1974
- positionClasses3,
1974
+ positionClasses,
1975
1975
  widthClass,
1976
1976
  animationClasses2,
1977
1977
  className
@@ -2089,7 +2089,7 @@ var init_Badge = __esm({
2089
2089
  md: "px-2.5 py-1 text-sm",
2090
2090
  lg: "px-3 py-1.5 text-base"
2091
2091
  };
2092
- Badge = React84__default.forwardRef(
2092
+ Badge = React88__default.forwardRef(
2093
2093
  ({ className, variant = "default", size = "sm", amount, label, icon, children, onRemove, removeLabel, ...props }, ref) => {
2094
2094
  const iconSizes3 = {
2095
2095
  sm: "h-icon-default w-icon-default",
@@ -2405,7 +2405,7 @@ var init_SvgFlow = __esm({
2405
2405
  opacity = 1,
2406
2406
  className
2407
2407
  }) => {
2408
- const markerId = React84__default.useMemo(() => {
2408
+ const markerId = React88__default.useMemo(() => {
2409
2409
  flowIdCounter += 1;
2410
2410
  return `almadar-flow-arrow-${flowIdCounter}`;
2411
2411
  }, []);
@@ -2948,7 +2948,7 @@ var init_SvgRing = __esm({
2948
2948
  className,
2949
2949
  label
2950
2950
  }) => {
2951
- const gradientId = React84__default.useMemo(() => {
2951
+ const gradientId = React88__default.useMemo(() => {
2952
2952
  ringIdCounter += 1;
2953
2953
  return `almadar-ring-glow-${ringIdCounter}`;
2954
2954
  }, []);
@@ -3110,7 +3110,7 @@ var init_Input = __esm({
3110
3110
  "components/core/atoms/Input.tsx"() {
3111
3111
  init_cn();
3112
3112
  init_Icon();
3113
- Input = React84__default.forwardRef(
3113
+ Input = React88__default.forwardRef(
3114
3114
  ({
3115
3115
  className,
3116
3116
  inputType,
@@ -3231,7 +3231,7 @@ var Label;
3231
3231
  var init_Label = __esm({
3232
3232
  "components/core/atoms/Label.tsx"() {
3233
3233
  init_cn();
3234
- Label = React84__default.forwardRef(
3234
+ Label = React88__default.forwardRef(
3235
3235
  ({ className, required, children, ...props }, ref) => {
3236
3236
  return /* @__PURE__ */ jsxs(
3237
3237
  "label",
@@ -3257,7 +3257,7 @@ var Textarea;
3257
3257
  var init_Textarea = __esm({
3258
3258
  "components/core/atoms/Textarea.tsx"() {
3259
3259
  init_cn();
3260
- Textarea = React84__default.forwardRef(
3260
+ Textarea = React88__default.forwardRef(
3261
3261
  ({ className, error, ...props }, ref) => {
3262
3262
  return /* @__PURE__ */ jsx(
3263
3263
  "textarea",
@@ -3287,7 +3287,7 @@ var init_Select = __esm({
3287
3287
  "components/core/atoms/Select.tsx"() {
3288
3288
  init_cn();
3289
3289
  init_Icon();
3290
- Select = React84__default.forwardRef(
3290
+ Select = React88__default.forwardRef(
3291
3291
  ({ className, options, placeholder, error, ...props }, ref) => {
3292
3292
  return /* @__PURE__ */ jsxs("div", { className: "relative", children: [
3293
3293
  /* @__PURE__ */ jsxs(
@@ -3329,7 +3329,7 @@ var Checkbox;
3329
3329
  var init_Checkbox = __esm({
3330
3330
  "components/core/atoms/Checkbox.tsx"() {
3331
3331
  init_cn();
3332
- Checkbox = React84__default.forwardRef(
3332
+ Checkbox = React88__default.forwardRef(
3333
3333
  ({ className, label, id, ...props }, ref) => {
3334
3334
  const inputId = id || `checkbox-${Math.random().toString(36).substr(2, 9)}`;
3335
3335
  return /* @__PURE__ */ jsxs("div", { className: "flex items-center", children: [
@@ -3420,7 +3420,7 @@ var init_Card = __esm({
3420
3420
  chip: "shadow-none rounded-pill border-[length:var(--border-width)] border-border",
3421
3421
  "tile-image-first": "p-0 overflow-hidden"
3422
3422
  };
3423
- Card = React84__default.forwardRef(
3423
+ Card = React88__default.forwardRef(
3424
3424
  ({
3425
3425
  className,
3426
3426
  variant = "bordered",
@@ -3458,9 +3458,9 @@ var init_Card = __esm({
3458
3458
  }
3459
3459
  );
3460
3460
  Card.displayName = "Card";
3461
- CardHeader = React84__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("mb-4", className), ...props }));
3461
+ CardHeader = React88__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("mb-4", className), ...props }));
3462
3462
  CardHeader.displayName = "CardHeader";
3463
- CardTitle = React84__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
3463
+ CardTitle = React88__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
3464
3464
  "h3",
3465
3465
  {
3466
3466
  ref,
@@ -3473,11 +3473,11 @@ var init_Card = __esm({
3473
3473
  }
3474
3474
  ));
3475
3475
  CardTitle.displayName = "CardTitle";
3476
- CardContent = React84__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("", className), ...props }));
3476
+ CardContent = React88__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("", className), ...props }));
3477
3477
  CardContent.displayName = "CardContent";
3478
3478
  CardBody = CardContent;
3479
3479
  CardBody.displayName = "CardBody";
3480
- CardFooter = React84__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
3480
+ CardFooter = React88__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
3481
3481
  "div",
3482
3482
  {
3483
3483
  ref,
@@ -3532,7 +3532,7 @@ var init_FilterPill = __esm({
3532
3532
  md: "w-3.5 h-3.5",
3533
3533
  lg: "w-4 h-4"
3534
3534
  };
3535
- FilterPill = React84__default.forwardRef(
3535
+ FilterPill = React88__default.forwardRef(
3536
3536
  ({
3537
3537
  className,
3538
3538
  variant = "default",
@@ -3609,7 +3609,7 @@ var init_Spinner = __esm({
3609
3609
  md: "h-6 w-6",
3610
3610
  lg: "h-8 w-8"
3611
3611
  };
3612
- Spinner = React84__default.forwardRef(
3612
+ Spinner = React88__default.forwardRef(
3613
3613
  ({ className, size = "md", ...props }, ref) => {
3614
3614
  return /* @__PURE__ */ jsx(
3615
3615
  "div",
@@ -3688,11 +3688,15 @@ var init_Avatar = __esm({
3688
3688
  actionPayload
3689
3689
  }) => {
3690
3690
  const eventBus = useEventBus();
3691
+ const [imgFailed, setImgFailed] = React88__default.useState(false);
3692
+ React88__default.useEffect(() => {
3693
+ setImgFailed(false);
3694
+ }, [src]);
3691
3695
  const initials = providedInitials ?? (name ? generateInitials(name) : void 0);
3692
3696
  const IconComponent = typeof iconProp === "string" ? resolveIcon(iconProp) : iconProp;
3693
- const hasImage = !!src;
3694
- const hasInitials = !!initials;
3697
+ const hasImage = !!src && !imgFailed;
3695
3698
  const hasIcon = !!IconComponent;
3699
+ const hasInitials = !!initials && !(hasIcon && !providedInitials);
3696
3700
  const getInitialsBackground = () => "bg-primary text-primary-foreground";
3697
3701
  const isClickable = action || onClick;
3698
3702
  const handleClick = () => {
@@ -3722,9 +3726,8 @@ var init_Avatar = __esm({
3722
3726
  src,
3723
3727
  alt: alt || "Avatar",
3724
3728
  className: "w-full h-full object-cover",
3725
- onError: (e) => {
3726
- const target = e.target;
3727
- target.style.display = "none";
3729
+ onError: () => {
3730
+ setImgFailed(true);
3728
3731
  }
3729
3732
  }
3730
3733
  ) : hasInitials ? /* @__PURE__ */ jsx(
@@ -4071,7 +4074,7 @@ var init_Radio = __esm({
4071
4074
  md: "w-2.5 h-2.5",
4072
4075
  lg: "w-3 h-3"
4073
4076
  };
4074
- Radio = React84__default.forwardRef(
4077
+ Radio = React88__default.forwardRef(
4075
4078
  ({
4076
4079
  label,
4077
4080
  helperText,
@@ -4088,12 +4091,12 @@ var init_Radio = __esm({
4088
4091
  onChange,
4089
4092
  ...props
4090
4093
  }, ref) => {
4091
- const reactId = React84__default.useId();
4094
+ const reactId = React88__default.useId();
4092
4095
  const baseId = id || `radio-${reactId}`;
4093
4096
  const hasError = !!error;
4094
4097
  const eventBus = useEventBus();
4095
- const [selected, setSelected] = React84__default.useState(value);
4096
- React84__default.useEffect(() => {
4098
+ const [selected, setSelected] = React88__default.useState(value);
4099
+ React88__default.useEffect(() => {
4097
4100
  if (value !== void 0) setSelected(value);
4098
4101
  }, [value]);
4099
4102
  const pick = (next, e) => {
@@ -4275,7 +4278,7 @@ var init_Switch = __esm({
4275
4278
  "components/core/atoms/Switch.tsx"() {
4276
4279
  "use client";
4277
4280
  init_cn();
4278
- Switch = React84.forwardRef(
4281
+ Switch = React88.forwardRef(
4279
4282
  ({
4280
4283
  checked,
4281
4284
  defaultChecked = false,
@@ -4286,10 +4289,10 @@ var init_Switch = __esm({
4286
4289
  name,
4287
4290
  className
4288
4291
  }, ref) => {
4289
- const [isChecked, setIsChecked] = React84.useState(
4292
+ const [isChecked, setIsChecked] = React88.useState(
4290
4293
  checked !== void 0 ? checked : defaultChecked
4291
4294
  );
4292
- React84.useEffect(() => {
4295
+ React88.useEffect(() => {
4293
4296
  if (checked !== void 0) {
4294
4297
  setIsChecked(checked);
4295
4298
  }
@@ -4820,7 +4823,7 @@ var Aside;
4820
4823
  var init_Aside = __esm({
4821
4824
  "components/core/atoms/Aside.tsx"() {
4822
4825
  init_cn();
4823
- Aside = React84__default.forwardRef(
4826
+ Aside = React88__default.forwardRef(
4824
4827
  ({ className, children, ...rest }, ref) => /* @__PURE__ */ jsx("aside", { ref, className: cn(className), ...rest, children })
4825
4828
  );
4826
4829
  Aside.displayName = "Aside";
@@ -4898,8 +4901,8 @@ var init_LawReferenceTooltip = __esm({
4898
4901
  className
4899
4902
  }) => {
4900
4903
  const { t } = useTranslate();
4901
- const [isVisible, setIsVisible] = React84__default.useState(false);
4902
- const timeoutRef = React84__default.useRef(null);
4904
+ const [isVisible, setIsVisible] = React88__default.useState(false);
4905
+ const timeoutRef = React88__default.useRef(null);
4903
4906
  const handleMouseEnter = () => {
4904
4907
  if (timeoutRef.current) clearTimeout(timeoutRef.current);
4905
4908
  timeoutRef.current = setTimeout(() => setIsVisible(true), 200);
@@ -4908,7 +4911,7 @@ var init_LawReferenceTooltip = __esm({
4908
4911
  if (timeoutRef.current) clearTimeout(timeoutRef.current);
4909
4912
  setIsVisible(false);
4910
4913
  };
4911
- React84__default.useEffect(() => {
4914
+ React88__default.useEffect(() => {
4912
4915
  return () => {
4913
4916
  if (timeoutRef.current) clearTimeout(timeoutRef.current);
4914
4917
  };
@@ -5118,7 +5121,7 @@ var init_StatusDot = __esm({
5118
5121
  md: "w-2.5 h-2.5",
5119
5122
  lg: "w-3 h-3"
5120
5123
  };
5121
- StatusDot = React84__default.forwardRef(
5124
+ StatusDot = React88__default.forwardRef(
5122
5125
  ({ className, status = "offline", pulse = false, size = "md", label, ...props }, ref) => {
5123
5126
  return /* @__PURE__ */ jsx(
5124
5127
  "span",
@@ -5172,7 +5175,7 @@ var init_TrendIndicator = __esm({
5172
5175
  down: "trending-down",
5173
5176
  flat: "arrow-right"
5174
5177
  };
5175
- TrendIndicator = React84__default.forwardRef(
5178
+ TrendIndicator = React88__default.forwardRef(
5176
5179
  ({
5177
5180
  className,
5178
5181
  value,
@@ -5239,7 +5242,7 @@ var init_RangeSlider = __esm({
5239
5242
  md: "w-4 h-4",
5240
5243
  lg: "w-5 h-5"
5241
5244
  };
5242
- RangeSlider = React84__default.forwardRef(
5245
+ RangeSlider = React88__default.forwardRef(
5243
5246
  ({
5244
5247
  className,
5245
5248
  min = 0,
@@ -5747,7 +5750,7 @@ var init_ContentSection = __esm({
5747
5750
  md: "py-16",
5748
5751
  lg: "py-24"
5749
5752
  };
5750
- ContentSection = React84__default.forwardRef(
5753
+ ContentSection = React88__default.forwardRef(
5751
5754
  ({ children, background = "default", padding = "lg", id, className }, ref) => {
5752
5755
  return /* @__PURE__ */ jsx(
5753
5756
  Box,
@@ -6281,7 +6284,7 @@ var init_AnimatedReveal = __esm({
6281
6284
  "scale-up": { opacity: 1, transform: "scale(1) translateY(0)" },
6282
6285
  "none": {}
6283
6286
  };
6284
- AnimatedReveal = React84__default.forwardRef(
6287
+ AnimatedReveal = React88__default.forwardRef(
6285
6288
  ({
6286
6289
  trigger = "scroll",
6287
6290
  animation = "fade-up",
@@ -6441,7 +6444,7 @@ var init_AnimatedGraphic = __esm({
6441
6444
  "components/marketing/atoms/AnimatedGraphic.tsx"() {
6442
6445
  "use client";
6443
6446
  init_cn();
6444
- AnimatedGraphic = React84__default.forwardRef(
6447
+ AnimatedGraphic = React88__default.forwardRef(
6445
6448
  ({
6446
6449
  src,
6447
6450
  svgContent,
@@ -6464,7 +6467,7 @@ var init_AnimatedGraphic = __esm({
6464
6467
  const fetchedSvg = useFetchedSvg(svgContent ? void 0 : src);
6465
6468
  const resolvedSvg = svgContent ?? fetchedSvg;
6466
6469
  const prevAnimateRef = useRef(animate);
6467
- const setRef = React84__default.useCallback(
6470
+ const setRef = React88__default.useCallback(
6468
6471
  (node) => {
6469
6472
  containerRef.current = node;
6470
6473
  if (typeof ref === "function") ref(node);
@@ -6689,9 +6692,9 @@ function ScoreDisplay({
6689
6692
  ...rest
6690
6693
  }) {
6691
6694
  const resolvedValue = typeof value === "number" && !Number.isNaN(value) ? value : typeof rest.score === "number" && !Number.isNaN(rest.score) ? rest.score : 0;
6692
- const [displayValue, setDisplayValue] = React84.useState(resolvedValue);
6693
- const [isAnimating, setIsAnimating] = React84.useState(false);
6694
- React84.useEffect(() => {
6695
+ const [displayValue, setDisplayValue] = React88.useState(resolvedValue);
6696
+ const [isAnimating, setIsAnimating] = React88.useState(false);
6697
+ React88.useEffect(() => {
6695
6698
  if (!animated || displayValue === resolvedValue) {
6696
6699
  setDisplayValue(resolvedValue);
6697
6700
  return;
@@ -6761,9 +6764,9 @@ function ControlButton({
6761
6764
  className
6762
6765
  }) {
6763
6766
  const eventBus = useEventBus();
6764
- const [isPressed, setIsPressed] = React84.useState(false);
6767
+ const [isPressed, setIsPressed] = React88.useState(false);
6765
6768
  const actualPressed = pressed ?? isPressed;
6766
- const handlePointerDown = React84.useCallback(
6769
+ const handlePointerDown = React88.useCallback(
6767
6770
  (e) => {
6768
6771
  e.preventDefault();
6769
6772
  if (disabled) return;
@@ -6773,7 +6776,7 @@ function ControlButton({
6773
6776
  },
6774
6777
  [disabled, pressEvent, eventBus, onPress]
6775
6778
  );
6776
- const handlePointerUp = React84.useCallback(
6779
+ const handlePointerUp = React88.useCallback(
6777
6780
  (e) => {
6778
6781
  e.preventDefault();
6779
6782
  if (disabled) return;
@@ -6783,7 +6786,7 @@ function ControlButton({
6783
6786
  },
6784
6787
  [disabled, releaseEvent, eventBus, onRelease]
6785
6788
  );
6786
- const handlePointerLeave = React84.useCallback(
6789
+ const handlePointerLeave = React88.useCallback(
6787
6790
  (e) => {
6788
6791
  if (isPressed) {
6789
6792
  setIsPressed(false);
@@ -7272,13 +7275,22 @@ function XPBar({
7272
7275
  }) {
7273
7276
  const sizes = sizeMap9[size];
7274
7277
  const percentage = max > 0 ? Math.max(0, Math.min(100, current / max * 100)) : 0;
7278
+ const [fillWidth, setFillWidth] = React88.useState(animated ? 0 : percentage);
7279
+ React88.useEffect(() => {
7280
+ if (!animated) {
7281
+ setFillWidth(percentage);
7282
+ return;
7283
+ }
7284
+ const frame = requestAnimationFrame(() => setFillWidth(percentage));
7285
+ return () => cancelAnimationFrame(frame);
7286
+ }, [animated, percentage]);
7275
7287
  return /* @__PURE__ */ jsxs("div", { className: cn("flex items-center gap-2", className), children: [
7276
7288
  level != null && /* @__PURE__ */ jsxs(
7277
7289
  "span",
7278
7290
  {
7279
7291
  className: cn(
7280
7292
  "flex-shrink-0 rounded-interactive font-bold",
7281
- "bg-accent text-foreground border border-accent",
7293
+ "bg-accent text-accent-foreground border border-accent",
7282
7294
  sizes.badge
7283
7295
  ),
7284
7296
  children: [
@@ -7303,7 +7315,7 @@ function XPBar({
7303
7315
  "bg-gradient-to-r from-accent to-info",
7304
7316
  animated && "transition-all duration-500 ease-out"
7305
7317
  ),
7306
- style: { width: `${percentage}%` }
7318
+ style: { width: `${fillWidth}%` }
7307
7319
  }
7308
7320
  )
7309
7321
  }
@@ -7320,6 +7332,7 @@ function XPBar({
7320
7332
  var sizeMap9;
7321
7333
  var init_XPBar = __esm({
7322
7334
  "components/game/atoms/XPBar.tsx"() {
7335
+ "use client";
7323
7336
  init_cn();
7324
7337
  sizeMap9 = {
7325
7338
  sm: { bar: "h-2", text: "text-xs", badge: "text-xs px-1.5 py-0.5" },
@@ -7689,9 +7702,9 @@ function MiniMap({
7689
7702
  viewportRect,
7690
7703
  className
7691
7704
  }) {
7692
- const canvasRef = React84.useRef(null);
7693
- const frameRef = React84.useRef(0);
7694
- React84.useEffect(() => {
7705
+ const canvasRef = React88.useRef(null);
7706
+ const frameRef = React88.useRef(0);
7707
+ React88.useEffect(() => {
7695
7708
  const canvas = canvasRef.current;
7696
7709
  if (!canvas) return;
7697
7710
  const ctx = canvas.getContext("2d");
@@ -7865,7 +7878,7 @@ var init_ErrorBoundary = __esm({
7865
7878
  }
7866
7879
  );
7867
7880
  };
7868
- ErrorBoundary = class extends React84__default.Component {
7881
+ ErrorBoundary = class extends React88__default.Component {
7869
7882
  constructor(props) {
7870
7883
  super(props);
7871
7884
  __publicField(this, "reset", () => {
@@ -8865,18 +8878,42 @@ var init_Alert = __esm({
8865
8878
  Alert.displayName = "Alert";
8866
8879
  }
8867
8880
  });
8868
- var positionClasses, arrowClasses, Tooltip;
8881
+ function computeTooltipStyle(position, triggerRect) {
8882
+ switch (position) {
8883
+ case "bottom":
8884
+ return {
8885
+ left: triggerRect.left + triggerRect.width / 2,
8886
+ top: triggerRect.bottom + TRIGGER_GAP,
8887
+ transform: "translateX(-50%)"
8888
+ };
8889
+ case "left":
8890
+ return {
8891
+ left: triggerRect.left - TRIGGER_GAP,
8892
+ top: triggerRect.top + triggerRect.height / 2,
8893
+ transform: "translate(-100%, -50%)"
8894
+ };
8895
+ case "right":
8896
+ return {
8897
+ left: triggerRect.right + TRIGGER_GAP,
8898
+ top: triggerRect.top + triggerRect.height / 2,
8899
+ transform: "translateY(-50%)"
8900
+ };
8901
+ case "top":
8902
+ default:
8903
+ return {
8904
+ left: triggerRect.left + triggerRect.width / 2,
8905
+ top: triggerRect.top - TRIGGER_GAP,
8906
+ transform: "translate(-50%, -100%)"
8907
+ };
8908
+ }
8909
+ }
8910
+ var TRIGGER_GAP, arrowClasses, Tooltip;
8869
8911
  var init_Tooltip = __esm({
8870
8912
  "components/core/molecules/Tooltip.tsx"() {
8871
8913
  "use client";
8872
8914
  init_Typography();
8873
8915
  init_cn();
8874
- positionClasses = {
8875
- top: "bottom-full left-1/2 -translate-x-1/2 mb-2",
8876
- bottom: "top-full left-1/2 -translate-x-1/2 mt-2",
8877
- left: "right-full top-1/2 -translate-y-1/2 mr-2",
8878
- right: "left-full top-1/2 -translate-y-1/2 ml-2"
8879
- };
8916
+ TRIGGER_GAP = 8;
8880
8917
  arrowClasses = {
8881
8918
  top: "top-full left-1/2 -translate-x-1/2 border-t-primary border-l-transparent border-r-transparent border-b-transparent",
8882
8919
  bottom: "bottom-full left-1/2 -translate-x-1/2 border-b-primary border-l-transparent border-r-transparent border-t-transparent",
@@ -8931,8 +8968,8 @@ var init_Tooltip = __esm({
8931
8968
  if (hideTimeoutRef.current) clearTimeout(hideTimeoutRef.current);
8932
8969
  };
8933
8970
  }, []);
8934
- const triggerElement = React84__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
8935
- const trigger = React84__default.cloneElement(triggerElement, {
8971
+ const triggerElement = React88__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
8972
+ const trigger = React88__default.cloneElement(triggerElement, {
8936
8973
  ref: triggerRef,
8937
8974
  onMouseEnter: handleMouseEnter,
8938
8975
  onMouseLeave: handleMouseLeave,
@@ -8950,14 +8987,9 @@ var init_Tooltip = __esm({
8950
8987
  "text-sm pointer-events-none",
8951
8988
  "break-words whitespace-normal",
8952
8989
  "h-auto min-h-fit",
8953
- positionClasses[position],
8954
8990
  className
8955
8991
  ),
8956
- style: {
8957
- left: position === "left" || position === "right" ? triggerRect.left + (position === "left" ? 0 : triggerRect.width) : triggerRect.left + triggerRect.width / 2,
8958
- top: position === "top" || position === "bottom" ? triggerRect.top + (position === "top" ? 0 : triggerRect.height) : triggerRect.top + triggerRect.height / 2,
8959
- transform: position === "top" || position === "bottom" ? "translateX(-50%)" : position === "left" || position === "right" ? "translateY(-50%)" : "none"
8960
- },
8992
+ style: computeTooltipStyle(position, triggerRect),
8961
8993
  role: "tooltip",
8962
8994
  children: [
8963
8995
  /* @__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 }) }),
@@ -8984,8 +9016,9 @@ var init_Tooltip = __esm({
8984
9016
  function computePopoverStyle(position, triggerRect, popoverWidth) {
8985
9017
  if (position === "left" || position === "right") {
8986
9018
  return {
8987
- left: triggerRect.left + (position === "left" ? 0 : triggerRect.width),
8988
- top: triggerRect.top + triggerRect.height / 2
9019
+ left: position === "left" ? triggerRect.left - popoverWidth - TRIGGER_GAP2 : triggerRect.right + TRIGGER_GAP2,
9020
+ top: triggerRect.top + triggerRect.height / 2,
9021
+ transform: "translateY(-50%)"
8989
9022
  };
8990
9023
  }
8991
9024
  const viewportWidth = typeof window !== "undefined" ? window.innerWidth : 1024;
@@ -8997,21 +9030,16 @@ function computePopoverStyle(position, triggerRect, popoverWidth) {
8997
9030
  );
8998
9031
  return {
8999
9032
  left: clamped,
9000
- top: triggerRect.top + (position === "top" ? 0 : triggerRect.height)
9033
+ top: position === "top" ? triggerRect.top - TRIGGER_GAP2 : triggerRect.bottom + TRIGGER_GAP2,
9034
+ transform: position === "top" ? "translateY(-100%)" : void 0
9001
9035
  };
9002
9036
  }
9003
- var positionClasses2, arrowClasses2, VIEWPORT_EDGE_PADDING, Popover;
9037
+ var arrowClasses2, VIEWPORT_EDGE_PADDING, TRIGGER_GAP2, Popover;
9004
9038
  var init_Popover = __esm({
9005
9039
  "components/core/molecules/Popover.tsx"() {
9006
9040
  "use client";
9007
9041
  init_Typography();
9008
9042
  init_cn();
9009
- positionClasses2 = {
9010
- top: "mb-2",
9011
- bottom: "mt-2",
9012
- left: "mr-2 -translate-y-1/2",
9013
- right: "ml-2 -translate-y-1/2"
9014
- };
9015
9043
  arrowClasses2 = {
9016
9044
  top: "top-full left-1/2 -translate-x-1/2 border-t-white border-l-transparent border-r-transparent border-b-transparent",
9017
9045
  bottom: "bottom-full left-1/2 -translate-x-1/2 border-b-white border-l-transparent border-r-transparent border-t-transparent",
@@ -9019,6 +9047,7 @@ var init_Popover = __esm({
9019
9047
  right: "right-full top-1/2 -translate-y-1/2 border-r-white border-t-transparent border-b-transparent border-l-transparent"
9020
9048
  };
9021
9049
  VIEWPORT_EDGE_PADDING = 8;
9050
+ TRIGGER_GAP2 = 8;
9022
9051
  Popover = ({
9023
9052
  content,
9024
9053
  children,
@@ -9087,8 +9116,8 @@ var init_Popover = __esm({
9087
9116
  onMouseEnter: handleOpen,
9088
9117
  onMouseLeave: handleClose
9089
9118
  };
9090
- const childElement = React84__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
9091
- const triggerElement = React84__default.cloneElement(
9119
+ const childElement = React88__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
9120
+ const triggerElement = React88__default.cloneElement(
9092
9121
  childElement,
9093
9122
  {
9094
9123
  ref: triggerRef,
@@ -9102,7 +9131,6 @@ var init_Popover = __esm({
9102
9131
  className: cn(
9103
9132
  "fixed z-50 p-4",
9104
9133
  "bg-card border-2 border-border shadow-elevation-popover",
9105
- positionClasses2[position],
9106
9134
  className
9107
9135
  ),
9108
9136
  style: computePopoverStyle(position, triggerRect, popoverWidth),
@@ -9192,7 +9220,7 @@ var init_Menu = __esm({
9192
9220
  document.addEventListener("mousedown", handleClickOutside);
9193
9221
  return () => document.removeEventListener("mousedown", handleClickOutside);
9194
9222
  }, [isOpen]);
9195
- const positionClasses3 = {
9223
+ const positionClasses = {
9196
9224
  "top-left": "bottom-full left-0 mb-2",
9197
9225
  "top-right": "bottom-full right-0 mb-2",
9198
9226
  "bottom-left": "top-full left-0 mt-2",
@@ -9215,8 +9243,8 @@ var init_Menu = __esm({
9215
9243
  };
9216
9244
  const effectivePosition = direction === "rtl" ? rtlMirror[position] ?? position : position;
9217
9245
  const subMenuSideClass = direction === "rtl" ? "right-full mr-2" : "left-full ml-2";
9218
- const triggerChild = React84__default.isValidElement(trigger) ? trigger : /* @__PURE__ */ jsx(Typography, { variant: "small", as: "span", children: trigger });
9219
- const triggerElement = React84__default.cloneElement(
9246
+ const triggerChild = React88__default.isValidElement(trigger) ? trigger : /* @__PURE__ */ jsx(Typography, { variant: "small", as: "span", children: trigger });
9247
+ const triggerElement = React88__default.cloneElement(
9220
9248
  triggerChild,
9221
9249
  {
9222
9250
  ref: triggerRef,
@@ -9300,7 +9328,7 @@ var init_Menu = __esm({
9300
9328
  className: cn(
9301
9329
  "absolute z-50",
9302
9330
  menuContainerStyles,
9303
- positionClasses3[effectivePosition],
9331
+ positionClasses[effectivePosition],
9304
9332
  className
9305
9333
  ),
9306
9334
  style: {
@@ -9476,7 +9504,7 @@ var init_FloatingActionButton = __esm({
9476
9504
  document.addEventListener("mousedown", handleClickOutside);
9477
9505
  return () => document.removeEventListener("mousedown", handleClickOutside);
9478
9506
  }, [isExpanded, actions]);
9479
- const positionClasses3 = {
9507
+ const positionClasses = {
9480
9508
  "bottom-right": "bottom-6 right-6",
9481
9509
  "bottom-left": "bottom-6 left-6",
9482
9510
  "bottom-center": "bottom-6 left-1/2 -translate-x-1/2",
@@ -9485,7 +9513,7 @@ var init_FloatingActionButton = __esm({
9485
9513
  "top-center": "top-6 left-1/2 -translate-x-1/2"
9486
9514
  };
9487
9515
  if (resolvedAction && (!actions || actions.length === 0)) {
9488
- return /* @__PURE__ */ jsx(Box, { className: cn("fixed z-50", positionClasses3[position], className), children: /* @__PURE__ */ jsx(
9516
+ return /* @__PURE__ */ jsx(Box, { className: cn("fixed z-50", positionClasses[position], className), children: /* @__PURE__ */ jsx(
9489
9517
  Button,
9490
9518
  {
9491
9519
  variant: resolvedAction.variant || "primary",
@@ -9513,7 +9541,7 @@ var init_FloatingActionButton = __esm({
9513
9541
  ref: fabRef,
9514
9542
  className: cn(
9515
9543
  "fixed z-50 flex flex-col items-end gap-3",
9516
- positionClasses3[position],
9544
+ positionClasses[position],
9517
9545
  position.includes("left") && "items-start",
9518
9546
  className
9519
9547
  ),
@@ -9623,13 +9651,13 @@ var init_MapView = __esm({
9623
9651
  shadowSize: [41, 41]
9624
9652
  });
9625
9653
  L.Marker.prototype.options.icon = defaultIcon;
9626
- const { useEffect: useEffect71, useRef: useRef66, useCallback: useCallback114, useState: useState103 } = React84__default;
9654
+ const { useEffect: useEffect72, useRef: useRef67, useCallback: useCallback116, useState: useState105 } = React88__default;
9627
9655
  const { Typography: Typography2 } = await Promise.resolve().then(() => (init_Typography(), Typography_exports));
9628
9656
  const { useEventBus: useEventBus3 } = await Promise.resolve().then(() => (init_useEventBus(), useEventBus_exports));
9629
9657
  function MapUpdater({ centerLat, centerLng, zoom }) {
9630
9658
  const map = useMap();
9631
- const prevRef = useRef66({ centerLat, centerLng, zoom });
9632
- useEffect71(() => {
9659
+ const prevRef = useRef67({ centerLat, centerLng, zoom });
9660
+ useEffect72(() => {
9633
9661
  const prev = prevRef.current;
9634
9662
  if (prev.centerLat !== centerLat || prev.centerLng !== centerLng || prev.zoom !== zoom) {
9635
9663
  map.setView([centerLat, centerLng], zoom);
@@ -9640,7 +9668,7 @@ var init_MapView = __esm({
9640
9668
  }
9641
9669
  function MapClickHandler({ onMapClick }) {
9642
9670
  const map = useMap();
9643
- useEffect71(() => {
9671
+ useEffect72(() => {
9644
9672
  if (!onMapClick) return;
9645
9673
  const handler = (e) => {
9646
9674
  onMapClick(e.latlng.lat, e.latlng.lng);
@@ -9668,8 +9696,8 @@ var init_MapView = __esm({
9668
9696
  showAttribution = true
9669
9697
  }) {
9670
9698
  const eventBus = useEventBus3();
9671
- const [clickedPosition, setClickedPosition] = useState103(null);
9672
- const handleMapClick = useCallback114((lat, lng) => {
9699
+ const [clickedPosition, setClickedPosition] = useState105(null);
9700
+ const handleMapClick = useCallback116((lat, lng) => {
9673
9701
  if (showClickedPin) {
9674
9702
  setClickedPosition({ lat, lng });
9675
9703
  }
@@ -9678,7 +9706,7 @@ var init_MapView = __esm({
9678
9706
  eventBus.emit(`UI:${mapClickEvent}`, { latitude: lat, longitude: lng });
9679
9707
  }
9680
9708
  }, [onMapClick, mapClickEvent, eventBus, showClickedPin]);
9681
- const handleMarkerClick = useCallback114((marker) => {
9709
+ const handleMarkerClick = useCallback116((marker) => {
9682
9710
  onMarkerClick?.(marker);
9683
9711
  if (markerClickEvent) {
9684
9712
  eventBus.emit(`UI:${markerClickEvent}`, { ...marker });
@@ -9687,7 +9715,7 @@ var init_MapView = __esm({
9687
9715
  return /* @__PURE__ */ jsx(
9688
9716
  Box,
9689
9717
  {
9690
- className: cn("relative w-full overflow-hidden rounded-lg", className),
9718
+ className: cn("relative isolate w-full overflow-hidden rounded-lg", className),
9691
9719
  style: { height },
9692
9720
  "data-testid": "map-view",
9693
9721
  children: /* @__PURE__ */ jsxs(
@@ -9869,7 +9897,7 @@ function InputPattern({
9869
9897
  fieldName
9870
9898
  }) {
9871
9899
  const { emit } = useEventBus();
9872
- const [localValue, setLocalValue] = React84__default.useState(value);
9900
+ const [localValue, setLocalValue] = React88__default.useState(value);
9873
9901
  const handleChange = (e) => {
9874
9902
  setLocalValue(e.target.value);
9875
9903
  if (onChange) {
@@ -9907,7 +9935,7 @@ function TextareaPattern({
9907
9935
  fieldName
9908
9936
  }) {
9909
9937
  const { emit } = useEventBus();
9910
- const [localValue, setLocalValue] = React84__default.useState(value);
9938
+ const [localValue, setLocalValue] = React88__default.useState(value);
9911
9939
  const handleChange = (e) => {
9912
9940
  setLocalValue(e.target.value);
9913
9941
  if (onChange) {
@@ -9939,7 +9967,7 @@ function SelectPattern({
9939
9967
  fieldName
9940
9968
  }) {
9941
9969
  const { emit } = useEventBus();
9942
- const [localValue, setLocalValue] = React84__default.useState(value);
9970
+ const [localValue, setLocalValue] = React88__default.useState(value);
9943
9971
  const handleChange = (e) => {
9944
9972
  setLocalValue(e.target.value);
9945
9973
  if (onChange) {
@@ -9968,7 +9996,7 @@ function CheckboxPattern({
9968
9996
  className
9969
9997
  }) {
9970
9998
  const { emit } = useEventBus();
9971
- const [localChecked, setLocalChecked] = React84__default.useState(checked);
9999
+ const [localChecked, setLocalChecked] = React88__default.useState(checked);
9972
10000
  const handleChange = (e) => {
9973
10001
  setLocalChecked(e.target.checked);
9974
10002
  if (onChange) {
@@ -10199,8 +10227,8 @@ function ActionButtons({
10199
10227
  disabled
10200
10228
  }) {
10201
10229
  const eventBus = useEventBus();
10202
- const [activeButtons, setActiveButtons] = React84.useState(/* @__PURE__ */ new Set());
10203
- const handlePress = React84.useCallback(
10230
+ const [activeButtons, setActiveButtons] = React88.useState(/* @__PURE__ */ new Set());
10231
+ const handlePress = React88.useCallback(
10204
10232
  (id) => {
10205
10233
  setActiveButtons((prev) => new Set(prev).add(id));
10206
10234
  if (actionEvent) eventBus.emit(`UI:${actionEvent}`, { id, pressed: true });
@@ -10208,7 +10236,7 @@ function ActionButtons({
10208
10236
  },
10209
10237
  [actionEvent, eventBus, onAction]
10210
10238
  );
10211
- const handleRelease = React84.useCallback(
10239
+ const handleRelease = React88.useCallback(
10212
10240
  (id) => {
10213
10241
  setActiveButtons((prev) => {
10214
10242
  const next = new Set(prev);
@@ -10489,9 +10517,262 @@ var init_AnimatedCounter = __esm({
10489
10517
  AnimatedCounter.displayName = "AnimatedCounter";
10490
10518
  }
10491
10519
  });
10520
+ var ALL_CATEGORY, GridPicker;
10521
+ var init_GridPicker = __esm({
10522
+ "components/core/molecules/GridPicker.tsx"() {
10523
+ "use client";
10524
+ init_cn();
10525
+ init_Input();
10526
+ init_Badge();
10527
+ init_Stack();
10528
+ ALL_CATEGORY = "__all__";
10529
+ GridPicker = ({
10530
+ items,
10531
+ value,
10532
+ onChange,
10533
+ categories,
10534
+ searchPlaceholder,
10535
+ renderThumbnail,
10536
+ cellSize = 32,
10537
+ className
10538
+ }) => {
10539
+ const [search, setSearch] = useState("");
10540
+ const [activeCategory, setActiveCategory] = useState(ALL_CATEGORY);
10541
+ const gridRef = useRef(null);
10542
+ const categoryChips = useMemo(() => {
10543
+ if (categories !== void 0) return categories;
10544
+ const seen = [];
10545
+ for (const item of items) {
10546
+ if (!seen.includes(item.category)) seen.push(item.category);
10547
+ }
10548
+ return seen;
10549
+ }, [categories, items]);
10550
+ const filtered = useMemo(() => {
10551
+ const needle = search.trim().toLowerCase();
10552
+ return items.filter((item) => {
10553
+ const matchesCategory = activeCategory === ALL_CATEGORY || item.category === activeCategory;
10554
+ const matchesSearch = needle === "" || item.label.toLowerCase().includes(needle);
10555
+ return matchesCategory && matchesSearch;
10556
+ });
10557
+ }, [items, search, activeCategory]);
10558
+ const select = useCallback(
10559
+ (item) => {
10560
+ onChange(item.id);
10561
+ },
10562
+ [onChange]
10563
+ );
10564
+ const handleKeyDown = useCallback(
10565
+ (e, index) => {
10566
+ const cells = gridRef.current?.querySelectorAll(
10567
+ "[data-gridpicker-cell]"
10568
+ );
10569
+ if (cells === void 0 || cells.length === 0) return;
10570
+ const columns = (() => {
10571
+ const grid = gridRef.current;
10572
+ if (grid === null) return 1;
10573
+ const style = window.getComputedStyle(grid);
10574
+ const cols = style.gridTemplateColumns.split(" ").filter(Boolean).length;
10575
+ return cols > 0 ? cols : 1;
10576
+ })();
10577
+ let next = -1;
10578
+ if (e.key === "ArrowRight") next = index + 1;
10579
+ else if (e.key === "ArrowLeft") next = index - 1;
10580
+ else if (e.key === "ArrowDown") next = index + columns;
10581
+ else if (e.key === "ArrowUp") next = index - columns;
10582
+ else if (e.key === "Enter" || e.key === " ") {
10583
+ e.preventDefault();
10584
+ select(filtered[index]);
10585
+ return;
10586
+ } else {
10587
+ return;
10588
+ }
10589
+ e.preventDefault();
10590
+ if (next >= 0 && next < cells.length) {
10591
+ cells[next].focus();
10592
+ }
10593
+ },
10594
+ [filtered, select]
10595
+ );
10596
+ return /* @__PURE__ */ jsxs(VStack, { gap: "sm", className: cn("w-full", className), children: [
10597
+ /* @__PURE__ */ jsx(
10598
+ Input,
10599
+ {
10600
+ type: "search",
10601
+ icon: "search",
10602
+ value: search,
10603
+ placeholder: searchPlaceholder,
10604
+ clearable: true,
10605
+ onClear: () => setSearch(""),
10606
+ onChange: (e) => setSearch(e.target.value)
10607
+ }
10608
+ ),
10609
+ categoryChips.length > 0 && /* @__PURE__ */ jsxs(HStack, { gap: "xs", wrap: true, children: [
10610
+ /* @__PURE__ */ jsx(
10611
+ Badge,
10612
+ {
10613
+ variant: activeCategory === ALL_CATEGORY ? "primary" : "neutral",
10614
+ size: "sm",
10615
+ role: "button",
10616
+ tabIndex: 0,
10617
+ "aria-pressed": activeCategory === ALL_CATEGORY,
10618
+ className: "cursor-pointer",
10619
+ onClick: () => setActiveCategory(ALL_CATEGORY),
10620
+ onKeyDown: (e) => {
10621
+ if (e.key === "Enter" || e.key === " ") {
10622
+ e.preventDefault();
10623
+ setActiveCategory(ALL_CATEGORY);
10624
+ }
10625
+ },
10626
+ children: "All"
10627
+ }
10628
+ ),
10629
+ categoryChips.map((category) => /* @__PURE__ */ jsx(
10630
+ Badge,
10631
+ {
10632
+ variant: activeCategory === category ? "primary" : "neutral",
10633
+ size: "sm",
10634
+ role: "button",
10635
+ tabIndex: 0,
10636
+ "aria-pressed": activeCategory === category,
10637
+ className: "cursor-pointer",
10638
+ onClick: () => setActiveCategory(category),
10639
+ onKeyDown: (e) => {
10640
+ if (e.key === "Enter" || e.key === " ") {
10641
+ e.preventDefault();
10642
+ setActiveCategory(category);
10643
+ }
10644
+ },
10645
+ children: category
10646
+ },
10647
+ category
10648
+ ))
10649
+ ] }),
10650
+ /* @__PURE__ */ jsx(
10651
+ "div",
10652
+ {
10653
+ ref: gridRef,
10654
+ role: "listbox",
10655
+ className: "grid gap-1 overflow-y-auto max-h-64 p-1",
10656
+ style: {
10657
+ gridTemplateColumns: `repeat(auto-fill, minmax(${cellSize}px, 1fr))`
10658
+ },
10659
+ children: filtered.map((item, index) => {
10660
+ const selected = item.id === value;
10661
+ return /* @__PURE__ */ jsx(
10662
+ "button",
10663
+ {
10664
+ type: "button",
10665
+ role: "option",
10666
+ "aria-selected": selected,
10667
+ "aria-label": item.label,
10668
+ title: item.label,
10669
+ "data-gridpicker-cell": true,
10670
+ tabIndex: selected || value === void 0 && index === 0 ? 0 : -1,
10671
+ onClick: () => select(item),
10672
+ onKeyDown: (e) => handleKeyDown(e, index),
10673
+ className: cn(
10674
+ "flex items-center justify-center rounded-sm",
10675
+ "transition-colors hover:bg-muted",
10676
+ "focus:outline-none focus:ring-1 focus:ring-ring",
10677
+ selected && "bg-primary/10 ring-1 ring-primary"
10678
+ ),
10679
+ style: { width: cellSize, height: cellSize },
10680
+ children: renderThumbnail(item)
10681
+ },
10682
+ item.id
10683
+ );
10684
+ })
10685
+ }
10686
+ )
10687
+ ] });
10688
+ };
10689
+ GridPicker.displayName = "GridPicker";
10690
+ }
10691
+ });
10692
+ function iconForKind(kind) {
10693
+ if (kind === "audio") return "music";
10694
+ if (kind === "model") return "box";
10695
+ return "file";
10696
+ }
10697
+ var THUMB_PX, IMAGE_KINDS, AssetPicker;
10698
+ var init_AssetPicker = __esm({
10699
+ "components/core/molecules/AssetPicker.tsx"() {
10700
+ "use client";
10701
+ init_GridPicker();
10702
+ init_Icon();
10703
+ THUMB_PX = 32;
10704
+ IMAGE_KINDS = /* @__PURE__ */ new Set([
10705
+ "image",
10706
+ "spritesheet",
10707
+ "scene",
10708
+ "portrait"
10709
+ ]);
10710
+ AssetPicker = ({
10711
+ assets,
10712
+ value,
10713
+ onChange,
10714
+ className
10715
+ }) => {
10716
+ const byUrl = useMemo(() => {
10717
+ const map = /* @__PURE__ */ new Map();
10718
+ for (const entry of assets) map.set(entry.url, entry);
10719
+ return map;
10720
+ }, [assets]);
10721
+ const items = useMemo(
10722
+ () => assets.map((entry) => ({
10723
+ id: entry.url,
10724
+ label: entry.name,
10725
+ category: entry.category
10726
+ })),
10727
+ [assets]
10728
+ );
10729
+ const categories = useMemo(() => {
10730
+ const seen = [];
10731
+ for (const entry of assets) {
10732
+ if (!seen.includes(entry.category)) seen.push(entry.category);
10733
+ }
10734
+ return seen;
10735
+ }, [assets]);
10736
+ const renderThumbnail = useCallback(
10737
+ (item) => {
10738
+ const entry = byUrl.get(item.id);
10739
+ if (entry === void 0) return null;
10740
+ if (IMAGE_KINDS.has(entry.kind)) {
10741
+ return /* @__PURE__ */ jsx(
10742
+ "img",
10743
+ {
10744
+ src: entry.thumbnailUrl ?? entry.url,
10745
+ alt: entry.name,
10746
+ loading: "lazy",
10747
+ width: THUMB_PX,
10748
+ height: THUMB_PX,
10749
+ style: { width: THUMB_PX, height: THUMB_PX, objectFit: "cover" }
10750
+ }
10751
+ );
10752
+ }
10753
+ return /* @__PURE__ */ jsx(Icon, { name: iconForKind(entry.kind), size: "sm" });
10754
+ },
10755
+ [byUrl]
10756
+ );
10757
+ return /* @__PURE__ */ jsx(
10758
+ GridPicker,
10759
+ {
10760
+ items,
10761
+ value,
10762
+ onChange,
10763
+ categories,
10764
+ renderThumbnail,
10765
+ cellSize: THUMB_PX,
10766
+ className
10767
+ }
10768
+ );
10769
+ };
10770
+ AssetPicker.displayName = "AssetPicker";
10771
+ }
10772
+ });
10492
10773
  var AuthLayout;
10493
10774
  var init_AuthLayout = __esm({
10494
- "components/core/templates/AuthLayout.tsx"() {
10775
+ "components/marketing/templates/AuthLayout.tsx"() {
10495
10776
  "use client";
10496
10777
  init_cn();
10497
10778
  init_Box();
@@ -13235,7 +13516,10 @@ function computeFoldRegions(code) {
13235
13516
  }
13236
13517
  return regions.sort((a, b) => a.start - b.start);
13237
13518
  }
13238
- var orbStyleOverrides, orbStyle, loloStyleOverrides, loloStyle, log7, LINE_PROPS_FN, HIDDEN_LINE_NUMBERS, CodeBlock;
13519
+ function toCodeLanguage(value) {
13520
+ return value && CODE_LANGUAGE_SET.has(value) ? value : "text";
13521
+ }
13522
+ var orbStyleOverrides, orbStyle, loloStyleOverrides, loloStyle, log7, CODE_LANGUAGES, CODE_LANGUAGE_SET, LINE_PROPS_FN, HIDDEN_LINE_NUMBERS, CodeBlock;
13239
13523
  var init_CodeBlock = __esm({
13240
13524
  "components/core/molecules/markdown/CodeBlock.tsx"() {
13241
13525
  init_Box();
@@ -13313,9 +13597,40 @@ var init_CodeBlock = __esm({
13313
13597
  };
13314
13598
  loloStyle = { ...dark, ...loloStyleOverrides };
13315
13599
  log7 = createLogger("almadar:ui:markdown-code");
13600
+ CODE_LANGUAGES = [
13601
+ "text",
13602
+ "json",
13603
+ "javascript",
13604
+ "js",
13605
+ "typescript",
13606
+ "ts",
13607
+ "jsx",
13608
+ "tsx",
13609
+ "css",
13610
+ "markdown",
13611
+ "md",
13612
+ "bash",
13613
+ "shell",
13614
+ "sh",
13615
+ "yaml",
13616
+ "yml",
13617
+ "rust",
13618
+ "python",
13619
+ "py",
13620
+ "sql",
13621
+ "diff",
13622
+ "toml",
13623
+ "go",
13624
+ "graphql",
13625
+ "html",
13626
+ "xml",
13627
+ "orb",
13628
+ "lolo"
13629
+ ];
13630
+ CODE_LANGUAGE_SET = new Set(CODE_LANGUAGES);
13316
13631
  LINE_PROPS_FN = (n) => ({ "data-line": String(n - 1) });
13317
13632
  HIDDEN_LINE_NUMBERS = { display: "none" };
13318
- CodeBlock = React84__default.memo(
13633
+ CodeBlock = React88__default.memo(
13319
13634
  ({
13320
13635
  code: rawCode,
13321
13636
  language = "text",
@@ -13752,7 +14067,7 @@ var init_MarkdownContent = __esm({
13752
14067
  init_Box();
13753
14068
  init_CodeBlock();
13754
14069
  init_cn();
13755
- MarkdownContent = React84__default.memo(
14070
+ MarkdownContent = React88__default.memo(
13756
14071
  ({ content, direction, className }) => {
13757
14072
  const { t: _t } = useTranslate();
13758
14073
  const safeContent = typeof content === "string" ? content : String(content ?? "");
@@ -13802,7 +14117,7 @@ var init_MarkdownContent = __esm({
13802
14117
  CodeBlock,
13803
14118
  {
13804
14119
  code,
13805
- language: match[1],
14120
+ language: toCodeLanguage(match[1]),
13806
14121
  maxHeight: "60vh"
13807
14122
  }
13808
14123
  );
@@ -14848,7 +15163,7 @@ var init_StateMachineView = __esm({
14848
15163
  style: { top: title ? 30 : 0 },
14849
15164
  children: [
14850
15165
  entity && /* @__PURE__ */ jsx(EntityBox, { entity, config }),
14851
- states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(React84__default.Fragment, { children: renderStateNode(state, config) }, state.id) : /* @__PURE__ */ jsx(
15166
+ states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(React88__default.Fragment, { children: renderStateNode(state, config) }, state.id) : /* @__PURE__ */ jsx(
14852
15167
  StateNode,
14853
15168
  {
14854
15169
  state,
@@ -15661,7 +15976,7 @@ var init_ContentRenderer = __esm({
15661
15976
  CodeBlock,
15662
15977
  {
15663
15978
  code: segment.content,
15664
- language: segment.language
15979
+ language: toCodeLanguage(segment.language)
15665
15980
  },
15666
15981
  key
15667
15982
  );
@@ -15686,7 +16001,7 @@ var init_ContentRenderer = __esm({
15686
16001
  CodeBlock,
15687
16002
  {
15688
16003
  code: segment.content,
15689
- language: segment.language
16004
+ language: toCodeLanguage(segment.language)
15690
16005
  }
15691
16006
  ),
15692
16007
  /* @__PURE__ */ jsx(ScaledDiagram, { children: /* @__PURE__ */ jsx(
@@ -16453,7 +16768,7 @@ var init_Grid = __esm({
16453
16768
  as: Component = "div"
16454
16769
  }) => {
16455
16770
  const mergedStyle = rows2 ? { gridTemplateRows: `repeat(${rows2}, minmax(0, 1fr))`, ...style } : style;
16456
- return React84__default.createElement(
16771
+ return React88__default.createElement(
16457
16772
  Component,
16458
16773
  {
16459
16774
  className: cn(
@@ -19771,7 +20086,7 @@ var init_Carousel = __esm({
19771
20086
  });
19772
20087
  var CaseStudyOrganism;
19773
20088
  var init_CaseStudyOrganism = __esm({
19774
- "components/core/organisms/CaseStudyOrganism.tsx"() {
20089
+ "components/marketing/organisms/CaseStudyOrganism.tsx"() {
19775
20090
  "use client";
19776
20091
  init_cn();
19777
20092
  init_useEventBus();
@@ -21813,7 +22128,7 @@ function CraftingRecipe({
21813
22128
  className
21814
22129
  }) {
21815
22130
  const eventBus = useEventBus();
21816
- const handleCraft = React84.useCallback(() => {
22131
+ const handleCraft = React88.useCallback(() => {
21817
22132
  onCraft?.();
21818
22133
  if (craftEvent) {
21819
22134
  eventBus.emit(craftEvent, { output: output.label });
@@ -21830,7 +22145,7 @@ function CraftingRecipe({
21830
22145
  children: [
21831
22146
  /* @__PURE__ */ jsx(HStack, { gap: "xs", className: "flex-wrap items-center", children: inputs.map((ingredient, index) => {
21832
22147
  const hasSufficient = ingredient.available >= ingredient.required;
21833
- return /* @__PURE__ */ jsxs(React84.Fragment, { children: [
22148
+ return /* @__PURE__ */ jsxs(React88.Fragment, { children: [
21834
22149
  /* @__PURE__ */ jsx(Box, { className: "relative", children: /* @__PURE__ */ jsx(
21835
22150
  ItemSlot,
21836
22151
  {
@@ -21893,8 +22208,8 @@ function DPad({
21893
22208
  }) {
21894
22209
  const eventBus = useEventBus();
21895
22210
  const sizes = sizeMap15[size];
21896
- const [activeDirections, setActiveDirections] = React84.useState(/* @__PURE__ */ new Set());
21897
- const handlePress = React84.useCallback(
22211
+ const [activeDirections, setActiveDirections] = React88.useState(/* @__PURE__ */ new Set());
22212
+ const handlePress = React88.useCallback(
21898
22213
  (direction) => {
21899
22214
  setActiveDirections((prev) => new Set(prev).add(direction));
21900
22215
  if (directionEvent) eventBus.emit(`UI:${directionEvent}`, { direction, pressed: true });
@@ -21902,7 +22217,7 @@ function DPad({
21902
22217
  },
21903
22218
  [directionEvent, eventBus, onDirection]
21904
22219
  );
21905
- const handleRelease = React84.useCallback(
22220
+ const handleRelease = React88.useCallback(
21906
22221
  (direction) => {
21907
22222
  setActiveDirections((prev) => {
21908
22223
  const next = new Set(prev);
@@ -22588,14 +22903,14 @@ function useDataDnd(args) {
22588
22903
  const isZone = Boolean(dragGroup || accepts || sortable);
22589
22904
  const enabled = isZone || Boolean(dndRoot);
22590
22905
  const eventBus = useEventBus();
22591
- const parentRoot = React84__default.useContext(RootCtx);
22906
+ const parentRoot = React88__default.useContext(RootCtx);
22592
22907
  const isRoot = enabled && parentRoot === null;
22593
- const zoneId = React84__default.useId();
22908
+ const zoneId = React88__default.useId();
22594
22909
  const ownGroup = dragGroup ?? accepts ?? zoneId;
22595
- const [optimisticOrders, setOptimisticOrders] = React84__default.useState(() => /* @__PURE__ */ new Map());
22596
- const optimisticOrdersRef = React84__default.useRef(optimisticOrders);
22910
+ const [optimisticOrders, setOptimisticOrders] = React88__default.useState(() => /* @__PURE__ */ new Map());
22911
+ const optimisticOrdersRef = React88__default.useRef(optimisticOrders);
22597
22912
  optimisticOrdersRef.current = optimisticOrders;
22598
- const clearOptimisticOrder = React84__default.useCallback((group) => {
22913
+ const clearOptimisticOrder = React88__default.useCallback((group) => {
22599
22914
  setOptimisticOrders((prev) => {
22600
22915
  if (!prev.has(group)) return prev;
22601
22916
  const next = new Map(prev);
@@ -22620,7 +22935,7 @@ function useDataDnd(args) {
22620
22935
  const raw = it[dndItemIdField];
22621
22936
  return String(raw ?? `__idx_${idx}`);
22622
22937
  }).join("|");
22623
- const itemIds = React84__default.useMemo(
22938
+ const itemIds = React88__default.useMemo(
22624
22939
  () => orderedItems.map((it, idx) => {
22625
22940
  const raw = it[dndItemIdField];
22626
22941
  return raw ?? `__idx_${idx}`;
@@ -22628,7 +22943,7 @@ function useDataDnd(args) {
22628
22943
  [itemIdsSignature]
22629
22944
  );
22630
22945
  const itemsContentSig = items.map((it, idx) => String(it[dndItemIdField] ?? `__${idx}`)).join("|");
22631
- React84__default.useEffect(() => {
22946
+ React88__default.useEffect(() => {
22632
22947
  const root = isRoot ? null : parentRoot;
22633
22948
  if (root) {
22634
22949
  root.clearOptimisticOrder(ownGroup);
@@ -22636,20 +22951,20 @@ function useDataDnd(args) {
22636
22951
  clearOptimisticOrder(ownGroup);
22637
22952
  }
22638
22953
  }, [itemsContentSig, ownGroup]);
22639
- const zonesRef = React84__default.useRef(/* @__PURE__ */ new Map());
22640
- const registerZone = React84__default.useCallback((zoneId2, meta2) => {
22954
+ const zonesRef = React88__default.useRef(/* @__PURE__ */ new Map());
22955
+ const registerZone = React88__default.useCallback((zoneId2, meta2) => {
22641
22956
  zonesRef.current.set(zoneId2, meta2);
22642
22957
  }, []);
22643
- const unregisterZone = React84__default.useCallback((zoneId2) => {
22958
+ const unregisterZone = React88__default.useCallback((zoneId2) => {
22644
22959
  zonesRef.current.delete(zoneId2);
22645
22960
  }, []);
22646
- const [activeDrag, setActiveDrag] = React84__default.useState(null);
22647
- const [overZoneGroup, setOverZoneGroup] = React84__default.useState(null);
22648
- const meta = React84__default.useMemo(
22961
+ const [activeDrag, setActiveDrag] = React88__default.useState(null);
22962
+ const [overZoneGroup, setOverZoneGroup] = React88__default.useState(null);
22963
+ const meta = React88__default.useMemo(
22649
22964
  () => ({ group: ownGroup, dropEvent, reorderEvent, positionEvent, itemIds, rawItems: items, idField: dndItemIdField }),
22650
22965
  [ownGroup, dropEvent, reorderEvent, positionEvent, itemIds, items, dndItemIdField]
22651
22966
  );
22652
- React84__default.useEffect(() => {
22967
+ React88__default.useEffect(() => {
22653
22968
  const target = isRoot ? null : parentRoot;
22654
22969
  if (!target) {
22655
22970
  zonesRef.current.set(zoneId, meta);
@@ -22668,7 +22983,7 @@ function useDataDnd(args) {
22668
22983
  }, [parentRoot, isRoot, zoneId, meta]);
22669
22984
  const sensors = useAlmadarDndSensors(true);
22670
22985
  const collisionDetection = almadarDndCollisionDetection;
22671
- const findZoneByItem = React84__default.useCallback(
22986
+ const findZoneByItem = React88__default.useCallback(
22672
22987
  (id) => {
22673
22988
  for (const z of zonesRef.current.values()) {
22674
22989
  if (z.itemIds.includes(id)) return z;
@@ -22677,7 +22992,7 @@ function useDataDnd(args) {
22677
22992
  },
22678
22993
  []
22679
22994
  );
22680
- React84__default.useCallback(
22995
+ React88__default.useCallback(
22681
22996
  (group) => {
22682
22997
  for (const z of zonesRef.current.values()) {
22683
22998
  if (z.group === group) return z;
@@ -22686,7 +23001,7 @@ function useDataDnd(args) {
22686
23001
  },
22687
23002
  []
22688
23003
  );
22689
- const handleDragEnd = React84__default.useCallback(
23004
+ const handleDragEnd = React88__default.useCallback(
22690
23005
  (event) => {
22691
23006
  const { active, over } = event;
22692
23007
  const activeIdStr = String(active.id);
@@ -22777,8 +23092,8 @@ function useDataDnd(args) {
22777
23092
  },
22778
23093
  [eventBus]
22779
23094
  );
22780
- const sortableData = React84__default.useMemo(() => ({ dndGroup: ownGroup }), [ownGroup]);
22781
- const SortableItem = React84__default.useCallback(
23095
+ const sortableData = React88__default.useMemo(() => ({ dndGroup: ownGroup }), [ownGroup]);
23096
+ const SortableItem = React88__default.useCallback(
22782
23097
  ({ id, children }) => {
22783
23098
  const {
22784
23099
  attributes,
@@ -22818,7 +23133,7 @@ function useDataDnd(args) {
22818
23133
  id: droppableId,
22819
23134
  data: sortableData
22820
23135
  });
22821
- const ctx = React84__default.useContext(RootCtx);
23136
+ const ctx = React88__default.useContext(RootCtx);
22822
23137
  const activeDrag2 = ctx?.activeDrag ?? null;
22823
23138
  const overZoneGroup2 = ctx?.overZoneGroup ?? null;
22824
23139
  const isThisZoneOver = overZoneGroup2 === ownGroup;
@@ -22833,7 +23148,7 @@ function useDataDnd(args) {
22833
23148
  showForeignPlaceholder,
22834
23149
  ctxAvailable: ctx != null
22835
23150
  });
22836
- React84__default.useEffect(() => {
23151
+ React88__default.useEffect(() => {
22837
23152
  dndLog.info("dropzone:isOver:change", { droppableId, group: ownGroup, isOver, isThisZoneOver, showForeignPlaceholder, activeDragSourceGroup: activeDrag2?.sourceGroup ?? null });
22838
23153
  }, [droppableId, isOver, isThisZoneOver, showForeignPlaceholder]);
22839
23154
  return /* @__PURE__ */ jsx(
@@ -22847,11 +23162,11 @@ function useDataDnd(args) {
22847
23162
  }
22848
23163
  );
22849
23164
  };
22850
- const rootContextValue = React84__default.useMemo(
23165
+ const rootContextValue = React88__default.useMemo(
22851
23166
  () => ({ registerZone, unregisterZone, activeDrag, overZoneGroup, optimisticOrders, clearOptimisticOrder }),
22852
23167
  [registerZone, unregisterZone, activeDrag, overZoneGroup, optimisticOrders, clearOptimisticOrder]
22853
23168
  );
22854
- const handleDragStart = React84__default.useCallback((event) => {
23169
+ const handleDragStart = React88__default.useCallback((event) => {
22855
23170
  const sourceZone = findZoneByItem(event.active.id);
22856
23171
  const rect = event.active.rect.current.initial;
22857
23172
  const height = rect?.height && rect.height > 0 ? rect.height : 64;
@@ -22870,7 +23185,7 @@ function useDataDnd(args) {
22870
23185
  isRoot
22871
23186
  });
22872
23187
  }, [findZoneByItem, isRoot, zoneId]);
22873
- const handleDragOver = React84__default.useCallback((event) => {
23188
+ const handleDragOver = React88__default.useCallback((event) => {
22874
23189
  const { active, over } = event;
22875
23190
  const overData = over?.data?.current;
22876
23191
  const overGroup = overData?.dndGroup ?? null;
@@ -22940,7 +23255,7 @@ function useDataDnd(args) {
22940
23255
  return next;
22941
23256
  });
22942
23257
  }, []);
22943
- const handleDragCancel = React84__default.useCallback((event) => {
23258
+ const handleDragCancel = React88__default.useCallback((event) => {
22944
23259
  setActiveDrag(null);
22945
23260
  setOverZoneGroup(null);
22946
23261
  dndLog.warn("dragCancel", {
@@ -22948,12 +23263,12 @@ function useDataDnd(args) {
22948
23263
  reason: "dnd-kit cancelled the drag (escape key, pointer interrupted, or external)"
22949
23264
  });
22950
23265
  }, []);
22951
- const handleDragEndWithCleanup = React84__default.useCallback((event) => {
23266
+ const handleDragEndWithCleanup = React88__default.useCallback((event) => {
22952
23267
  handleDragEnd(event);
22953
23268
  setActiveDrag(null);
22954
23269
  setOverZoneGroup(null);
22955
23270
  }, [handleDragEnd]);
22956
- const wrapContainer = React84__default.useCallback(
23271
+ const wrapContainer = React88__default.useCallback(
22957
23272
  (children) => {
22958
23273
  if (!enabled) return children;
22959
23274
  const strategy = layout === "grid" ? rectSortingStrategy : verticalListSortingStrategy;
@@ -23007,7 +23322,7 @@ var init_useDataDnd = __esm({
23007
23322
  init_useAlmadarDndCollision();
23008
23323
  init_Box();
23009
23324
  dndLog = createLogger("almadar:ui:dnd");
23010
- RootCtx = React84__default.createContext(null);
23325
+ RootCtx = React88__default.createContext(null);
23011
23326
  }
23012
23327
  });
23013
23328
  function fieldLabel2(key) {
@@ -23527,7 +23842,7 @@ function DataList({
23527
23842
  }) {
23528
23843
  const eventBus = useEventBus();
23529
23844
  const { t } = useTranslate();
23530
- const [visibleCount, setVisibleCount] = React84__default.useState(pageSize || Infinity);
23845
+ const [visibleCount, setVisibleCount] = React88__default.useState(pageSize || Infinity);
23531
23846
  const fieldDefs = fields ?? columns ?? [];
23532
23847
  const allDataRaw = Array.isArray(entity) ? entity : entity ? [entity] : [];
23533
23848
  const dnd = useDataDnd({
@@ -23546,7 +23861,7 @@ function DataList({
23546
23861
  const data = pageSize > 0 ? allData.slice(0, visibleCount) : allData;
23547
23862
  const hasMoreLocal = pageSize > 0 && visibleCount < allData.length;
23548
23863
  const hasRenderProp = typeof children === "function";
23549
- React84__default.useEffect(() => {
23864
+ React88__default.useEffect(() => {
23550
23865
  const renderItemTypeOf = typeof schemaRenderItem;
23551
23866
  const childrenTypeOf = typeof children;
23552
23867
  if (data.length > 0 && !hasRenderProp) {
@@ -23651,7 +23966,7 @@ function DataList({
23651
23966
  const items2 = data.map((item) => item);
23652
23967
  const groups2 = groupBy ? groupData(items2, groupBy) : [{ label: "", items: items2 }];
23653
23968
  const contentField = titleField?.name ?? fieldDefs[0]?.name ?? "";
23654
- return /* @__PURE__ */ jsx(VStack, { gap: "sm", className: cn("py-2", className), children: groups2.map((group, gi) => /* @__PURE__ */ jsxs(React84__default.Fragment, { children: [
23969
+ return /* @__PURE__ */ jsx(VStack, { gap: "sm", className: cn("py-2", className), children: groups2.map((group, gi) => /* @__PURE__ */ jsxs(React88__default.Fragment, { children: [
23655
23970
  group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: "my-2" }),
23656
23971
  group.items.map((itemData, index) => {
23657
23972
  const id = itemData.id || `${gi}-${index}`;
@@ -23799,7 +24114,7 @@ function DataList({
23799
24114
  className
23800
24115
  ),
23801
24116
  children: [
23802
- groups.map((group, gi) => /* @__PURE__ */ jsxs(React84__default.Fragment, { children: [
24117
+ groups.map((group, gi) => /* @__PURE__ */ jsxs(React88__default.Fragment, { children: [
23803
24118
  group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-4" : "mt-0" }),
23804
24119
  group.items.map(
23805
24120
  (itemData, index) => renderItem(itemData, index, gi === groups.length - 1 && index === group.items.length - 1)
@@ -25173,7 +25488,7 @@ var init_WizardProgress = __esm({
25173
25488
  children: /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: normalizedSteps.map((step, index) => {
25174
25489
  const isActive = index === currentStep;
25175
25490
  const isCompleted = index < currentStep;
25176
- return /* @__PURE__ */ jsxs(React84__default.Fragment, { children: [
25491
+ return /* @__PURE__ */ jsxs(React88__default.Fragment, { children: [
25177
25492
  /* @__PURE__ */ jsx(
25178
25493
  "button",
25179
25494
  {
@@ -25690,7 +26005,7 @@ var init_FormSectionHeader = __esm({
25690
26005
  Box,
25691
26006
  {
25692
26007
  className: cn(
25693
- "px-4 py-3 bg-muted rounded-t-lg",
26008
+ "px-4 py-3 bg-muted rounded-t-lg border-b-2 border-border border-l-4 border-l-primary",
25694
26009
  isClickable && "cursor-pointer hover:bg-[var(--color-surface-hover)] transition-colors",
25695
26010
  className
25696
26011
  ),
@@ -25702,7 +26017,7 @@ var init_FormSectionHeader = __esm({
25702
26017
  {
25703
26018
  name: icon,
25704
26019
  size: "md",
25705
- className: "text-muted-foreground"
26020
+ className: "text-primary"
25706
26021
  }
25707
26022
  ),
25708
26023
  statusIcon && /* @__PURE__ */ jsx(
@@ -25713,8 +26028,8 @@ var init_FormSectionHeader = __esm({
25713
26028
  className: hasErrors ? "text-error" : "text-success"
25714
26029
  }
25715
26030
  ),
25716
- /* @__PURE__ */ jsxs(Box, { children: [
25717
- /* @__PURE__ */ jsx(Typography, { variant: "label", weight: "semibold", children: title }),
26031
+ /* @__PURE__ */ jsxs(Box, { className: "space-y-0.5", children: [
26032
+ /* @__PURE__ */ jsx(Typography, { variant: "subheading", weight: "semibold", children: title }),
25718
26033
  subtitle && /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", children: subtitle })
25719
26034
  ] })
25720
26035
  ] }),
@@ -25784,6 +26099,50 @@ var init_FlipCard = __esm({
25784
26099
  FlipCard.displayName = "FlipCard";
25785
26100
  }
25786
26101
  });
26102
+ function pascalToKebab(name) {
26103
+ return name.replace(/([a-z0-9])([A-Z])/g, "$1-$2").replace(/([A-Z])([A-Z][a-z])/g, "$1-$2").toLowerCase();
26104
+ }
26105
+ function kebabToPascal3(name) {
26106
+ return name.split("-").map((part) => /^\d+$/.test(part) ? part : part.charAt(0).toUpperCase() + part.slice(1)).join("");
26107
+ }
26108
+ var ICON_ITEMS, IconPicker;
26109
+ var init_IconPicker = __esm({
26110
+ "components/core/molecules/IconPicker.tsx"() {
26111
+ "use client";
26112
+ init_Icon();
26113
+ init_GridPicker();
26114
+ ICON_ITEMS = (() => {
26115
+ const items = [];
26116
+ for (const [exportName, candidate] of Object.entries(LucideIcons2)) {
26117
+ if (!/^[A-Z]/.test(exportName)) continue;
26118
+ if (exportName.endsWith("Icon")) continue;
26119
+ if (exportName.startsWith("Lucide")) continue;
26120
+ const isComponent = candidate !== null && (typeof candidate === "object" || typeof candidate === "function") && "$$typeof" in candidate;
26121
+ if (!isComponent) continue;
26122
+ const kebab = pascalToKebab(exportName);
26123
+ if (kebabToPascal3(kebab) !== exportName) continue;
26124
+ items.push({ id: kebab, label: kebab, category: "icons" });
26125
+ }
26126
+ return items;
26127
+ })();
26128
+ IconPicker = ({ value, onChange, className }) => {
26129
+ const items = useMemo(() => ICON_ITEMS, []);
26130
+ return /* @__PURE__ */ jsx(
26131
+ GridPicker,
26132
+ {
26133
+ items,
26134
+ value,
26135
+ onChange,
26136
+ searchPlaceholder: "Search icons\u2026",
26137
+ renderThumbnail: (it) => /* @__PURE__ */ jsx(Icon, { name: it.id }),
26138
+ cellSize: 32,
26139
+ className
26140
+ }
26141
+ );
26142
+ };
26143
+ IconPicker.displayName = "IconPicker";
26144
+ }
26145
+ });
25787
26146
  function toISODate(d) {
25788
26147
  return d.toISOString().slice(0, 10);
25789
26148
  }
@@ -26228,7 +26587,7 @@ function InventoryGrid({
26228
26587
  const eventBus = useEventBus();
26229
26588
  const slotCount = totalSlots ?? items.length;
26230
26589
  const emptySlotCount = Math.max(0, slotCount - items.length);
26231
- const handleSelect = React84.useCallback(
26590
+ const handleSelect = React88.useCallback(
26232
26591
  (id) => {
26233
26592
  onSelect?.(id);
26234
26593
  if (selectEvent) {
@@ -26445,31 +26804,31 @@ function GameCanvas2D({
26445
26804
  assetBaseUrl = "",
26446
26805
  className
26447
26806
  }) {
26448
- const canvasRef = React84.useRef(null);
26449
- const rafRef = React84.useRef(0);
26450
- const frameRef = React84.useRef(0);
26451
- const lastTimeRef = React84.useRef(0);
26452
- const imageCache = React84.useRef(/* @__PURE__ */ new Map());
26807
+ const canvasRef = React88.useRef(null);
26808
+ const rafRef = React88.useRef(0);
26809
+ const frameRef = React88.useRef(0);
26810
+ const lastTimeRef = React88.useRef(0);
26811
+ const imageCache = React88.useRef(/* @__PURE__ */ new Map());
26453
26812
  const emit = useEmitEvent();
26454
- const onDrawRef = React84.useRef(onDraw);
26813
+ const onDrawRef = React88.useRef(onDraw);
26455
26814
  onDrawRef.current = onDraw;
26456
- const onTickRef = React84.useRef(onTick);
26815
+ const onTickRef = React88.useRef(onTick);
26457
26816
  onTickRef.current = onTick;
26458
- const tickEventRef = React84.useRef(tickEvent);
26817
+ const tickEventRef = React88.useRef(tickEvent);
26459
26818
  tickEventRef.current = tickEvent;
26460
- const drawEventRef = React84.useRef(drawEvent);
26819
+ const drawEventRef = React88.useRef(drawEvent);
26461
26820
  drawEventRef.current = drawEvent;
26462
- const emitRef = React84.useRef(emit);
26821
+ const emitRef = React88.useRef(emit);
26463
26822
  emitRef.current = emit;
26464
- const assetBaseUrlRef = React84.useRef(assetBaseUrl);
26823
+ const assetBaseUrlRef = React88.useRef(assetBaseUrl);
26465
26824
  assetBaseUrlRef.current = assetBaseUrl;
26466
- const backgroundImageRef = React84.useRef(backgroundImage);
26825
+ const backgroundImageRef = React88.useRef(backgroundImage);
26467
26826
  backgroundImageRef.current = backgroundImage;
26468
- const widthRef = React84.useRef(width);
26827
+ const widthRef = React88.useRef(width);
26469
26828
  widthRef.current = width;
26470
- const heightRef = React84.useRef(height);
26829
+ const heightRef = React88.useRef(height);
26471
26830
  heightRef.current = height;
26472
- const loadImage = React84.useCallback((url) => {
26831
+ const loadImage = React88.useCallback((url) => {
26473
26832
  const fullUrl = url.startsWith("http") ? url : `${assetBaseUrlRef.current}${url}`;
26474
26833
  const cached = imageCache.current.get(fullUrl);
26475
26834
  if (cached?.complete && cached.naturalWidth > 0) return cached;
@@ -26481,7 +26840,7 @@ function GameCanvas2D({
26481
26840
  }
26482
26841
  return null;
26483
26842
  }, []);
26484
- React84.useEffect(() => {
26843
+ React88.useEffect(() => {
26485
26844
  const canvas = canvasRef.current;
26486
26845
  if (!canvas) return;
26487
26846
  const ctx = canvas.getContext("2d");
@@ -26784,7 +27143,7 @@ function TurnPanel({
26784
27143
  className
26785
27144
  }) {
26786
27145
  const eventBus = useEventBus();
26787
- const handleAction = React84.useCallback(
27146
+ const handleAction = React88.useCallback(
26788
27147
  (event) => {
26789
27148
  if (event) {
26790
27149
  eventBus.emit(event, { turn: currentTurn, phase, activeTeam });
@@ -26930,7 +27289,7 @@ function UnitCommandBar({
26930
27289
  className
26931
27290
  }) {
26932
27291
  const eventBus = useEventBus();
26933
- const handleCommand = React84.useCallback(
27292
+ const handleCommand = React88.useCallback(
26934
27293
  (event) => {
26935
27294
  if (event) {
26936
27295
  eventBus.emit(event, { unitId: selectedUnitId });
@@ -27415,7 +27774,7 @@ function GameMenu({
27415
27774
  } catch {
27416
27775
  }
27417
27776
  const eventBus = eventBusProp || eventBusFromHook;
27418
- const handleOptionClick = React84.useCallback(
27777
+ const handleOptionClick = React88.useCallback(
27419
27778
  (option) => {
27420
27779
  if (option.event && eventBus) {
27421
27780
  eventBus.emit(`UI:${option.event}`, { option });
@@ -27529,7 +27888,7 @@ function GameOverScreen({
27529
27888
  } catch {
27530
27889
  }
27531
27890
  const eventBus = eventBusProp || eventBusFromHook;
27532
- const handleActionClick = React84.useCallback(
27891
+ const handleActionClick = React88.useCallback(
27533
27892
  (action) => {
27534
27893
  if (action.event && eventBus) {
27535
27894
  eventBus.emit(`UI:${action.event}`, { action });
@@ -28523,7 +28882,7 @@ var init_StarRating = __esm({
28523
28882
  name: "star",
28524
28883
  className: cn(
28525
28884
  styles.star,
28526
- "text-muted",
28885
+ "text-muted-foreground",
28527
28886
  "transition-colors duration-100"
28528
28887
  ),
28529
28888
  strokeWidth: 1.5
@@ -29006,8 +29365,8 @@ function TableView({
29006
29365
  }) {
29007
29366
  const eventBus = useEventBus();
29008
29367
  const { t } = useTranslate();
29009
- const [visibleCount, setVisibleCount] = React84__default.useState(pageSize > 0 ? pageSize : Infinity);
29010
- const [localSelected, setLocalSelected] = React84__default.useState(/* @__PURE__ */ new Set());
29368
+ const [visibleCount, setVisibleCount] = React88__default.useState(pageSize > 0 ? pageSize : Infinity);
29369
+ const [localSelected, setLocalSelected] = React88__default.useState(/* @__PURE__ */ new Set());
29011
29370
  const colDefs = columns ?? fields ?? [];
29012
29371
  const allDataRaw = Array.isArray(entity) ? entity : entity ? [entity] : [];
29013
29372
  const dnd = useDataDnd({
@@ -29202,12 +29561,12 @@ function TableView({
29202
29561
  ]
29203
29562
  }
29204
29563
  );
29205
- return dnd.isZone ? /* @__PURE__ */ jsx(dnd.SortableItem, { id: row[idField] ?? id, children: rowInner }, id) : /* @__PURE__ */ jsx(React84__default.Fragment, { children: rowInner }, id);
29564
+ return dnd.isZone ? /* @__PURE__ */ jsx(dnd.SortableItem, { id: row[idField] ?? id, children: rowInner }, id) : /* @__PURE__ */ jsx(React88__default.Fragment, { children: rowInner }, id);
29206
29565
  };
29207
29566
  const items = data.map((row) => row);
29208
29567
  const groups = groupBy ? groupData2(items, groupBy) : [{ label: "", items }];
29209
29568
  let runningIndex = 0;
29210
- const body = /* @__PURE__ */ jsx(Box, { role: "rowgroup", children: groups.map((group, gi) => /* @__PURE__ */ jsxs(React84__default.Fragment, { children: [
29569
+ const body = /* @__PURE__ */ jsx(Box, { role: "rowgroup", children: groups.map((group, gi) => /* @__PURE__ */ jsxs(React88__default.Fragment, { children: [
29211
29570
  group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-3" : "mt-0" }),
29212
29571
  group.items.map((row) => renderRow(row, runningIndex++))
29213
29572
  ] }, gi)) });
@@ -30559,7 +30918,7 @@ var init_StepFlow = __esm({
30559
30918
  className
30560
30919
  }) => {
30561
30920
  if (orientation === "vertical") {
30562
- return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(React84__default.Fragment, { children: /* @__PURE__ */ jsxs(HStack, { gap: "md", align: "start", className: "w-full", children: [
30921
+ return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(React88__default.Fragment, { children: /* @__PURE__ */ jsxs(HStack, { gap: "md", align: "start", className: "w-full", children: [
30563
30922
  /* @__PURE__ */ jsxs(VStack, { gap: "none", align: "center", children: [
30564
30923
  /* @__PURE__ */ jsx(StepCircle, { step, index }),
30565
30924
  showConnectors && index < steps.length - 1 && /* @__PURE__ */ jsx(Box, { className: "w-px h-8 bg-border" })
@@ -30570,7 +30929,7 @@ var init_StepFlow = __esm({
30570
30929
  ] })
30571
30930
  ] }) }, index)) });
30572
30931
  }
30573
- 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(React84__default.Fragment, { children: [
30932
+ 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(React88__default.Fragment, { children: [
30574
30933
  /* @__PURE__ */ jsxs(VStack, { gap: "sm", align: "center", className: "flex-1 w-full md:w-auto", children: [
30575
30934
  /* @__PURE__ */ jsx(StepCircle, { step, index }),
30576
30935
  /* @__PURE__ */ jsx(Typography, { variant: "h4", className: "text-center", children: step.title }),
@@ -31546,7 +31905,7 @@ var init_LikertScale = __esm({
31546
31905
  md: "text-base",
31547
31906
  lg: "text-lg"
31548
31907
  };
31549
- LikertScale = React84__default.forwardRef(
31908
+ LikertScale = React88__default.forwardRef(
31550
31909
  ({
31551
31910
  question,
31552
31911
  options = DEFAULT_LIKERT_OPTIONS,
@@ -31558,7 +31917,7 @@ var init_LikertScale = __esm({
31558
31917
  variant = "radios",
31559
31918
  className
31560
31919
  }, ref) => {
31561
- const groupId = React84__default.useId();
31920
+ const groupId = React88__default.useId();
31562
31921
  const eventBus = useEventBus();
31563
31922
  const handleSelect = useCallback(
31564
31923
  (next) => {
@@ -32703,6 +33062,7 @@ function Editable({
32703
33062
  function BlockRow({
32704
33063
  block,
32705
33064
  readOnly,
33065
+ showAffordances,
32706
33066
  placeholder,
32707
33067
  onUpdate,
32708
33068
  onDelete,
@@ -32921,7 +33281,7 @@ function BlockRow({
32921
33281
  onValueChange: (next) => setChildContent(child.id, next)
32922
33282
  }
32923
33283
  ),
32924
- !readOnly && /* @__PURE__ */ jsx(
33284
+ !readOnly && showAffordances && /* @__PURE__ */ jsx(
32925
33285
  Button,
32926
33286
  {
32927
33287
  type: "button",
@@ -32936,7 +33296,7 @@ function BlockRow({
32936
33296
  }
32937
33297
  )
32938
33298
  ] }, child.id)),
32939
- !readOnly && /* @__PURE__ */ jsx(Box, { as: "li", className: "list-none pl-0", children: /* @__PURE__ */ jsxs(
33299
+ !readOnly && showAffordances && /* @__PURE__ */ jsx(Box, { as: "li", className: "list-none pl-0", children: /* @__PURE__ */ jsxs(
32940
33300
  Button,
32941
33301
  {
32942
33302
  type: "button",
@@ -32983,7 +33343,7 @@ function BlockRow({
32983
33343
  "data-block-id": block.id,
32984
33344
  "data-block-type": block.type,
32985
33345
  children: [
32986
- !readOnly && /* @__PURE__ */ jsxs(Box, { className: "flex w-12 shrink-0 items-center gap-0.5 pt-1", children: [
33346
+ !readOnly && showAffordances && /* @__PURE__ */ jsxs(Box, { className: "flex w-12 shrink-0 items-center gap-0.5 pt-1", children: [
32987
33347
  /* @__PURE__ */ jsx(
32988
33348
  Button,
32989
33349
  {
@@ -33082,6 +33442,7 @@ var init_RichBlockEditor = __esm({
33082
33442
  changeEvent,
33083
33443
  readOnly = false,
33084
33444
  placeholder,
33445
+ enableBlocks = false,
33085
33446
  showToolbar = true,
33086
33447
  className
33087
33448
  }) => {
@@ -33153,7 +33514,7 @@ var init_RichBlockEditor = __esm({
33153
33514
  padding: "none",
33154
33515
  className: cn("flex flex-col", className),
33155
33516
  children: [
33156
- showToolbar && !readOnly && /* @__PURE__ */ jsx(
33517
+ enableBlocks && showToolbar && !readOnly && /* @__PURE__ */ jsx(
33157
33518
  Box,
33158
33519
  {
33159
33520
  role: "toolbar",
@@ -33189,6 +33550,7 @@ var init_RichBlockEditor = __esm({
33189
33550
  {
33190
33551
  block,
33191
33552
  readOnly,
33553
+ showAffordances: enableBlocks,
33192
33554
  placeholder,
33193
33555
  onUpdate: (updater) => handleUpdate(block.id, updater),
33194
33556
  onDelete: () => handleDelete(block.id),
@@ -33863,7 +34225,7 @@ var init_DocBreadcrumb = __esm({
33863
34225
  "aria-label": t("aria.breadcrumb"),
33864
34226
  children: /* @__PURE__ */ jsx(HStack, { gap: "xs", align: "center", wrap: true, children: items.map((item, idx) => {
33865
34227
  const isLast = idx === items.length - 1;
33866
- return /* @__PURE__ */ jsxs(React84__default.Fragment, { children: [
34228
+ return /* @__PURE__ */ jsxs(React88__default.Fragment, { children: [
33867
34229
  idx > 0 && /* @__PURE__ */ jsx(
33868
34230
  Icon,
33869
34231
  {
@@ -34474,7 +34836,7 @@ var init_GradientDivider = __esm({
34474
34836
  });
34475
34837
  var MarketingFooter;
34476
34838
  var init_MarketingFooter = __esm({
34477
- "components/core/molecules/MarketingFooter.tsx"() {
34839
+ "components/marketing/molecules/MarketingFooter.tsx"() {
34478
34840
  "use client";
34479
34841
  init_cn();
34480
34842
  init_Box();
@@ -34544,7 +34906,7 @@ var init_MarketingFooter = __esm({
34544
34906
  });
34545
34907
  var PullQuote;
34546
34908
  var init_PullQuote = __esm({
34547
- "components/core/molecules/PullQuote.tsx"() {
34909
+ "components/marketing/molecules/PullQuote.tsx"() {
34548
34910
  "use client";
34549
34911
  init_cn();
34550
34912
  init_Box();
@@ -34827,7 +35189,7 @@ var init_MiniStateMachine = __esm({
34827
35189
  const x = 2 + i * (NODE_W + GAP + ARROW_W + GAP);
34828
35190
  const tc = transitionCounts[s.name] ?? 0;
34829
35191
  const role = getStateRole(s.name, s.isInitial, s.isTerminal, tc, maxTC);
34830
- return /* @__PURE__ */ jsxs(React84__default.Fragment, { children: [
35192
+ return /* @__PURE__ */ jsxs(React88__default.Fragment, { children: [
34831
35193
  /* @__PURE__ */ jsx(
34832
35194
  AvlState,
34833
35195
  {
@@ -35031,7 +35393,7 @@ var init_PageHeader = __esm({
35031
35393
  info: "bg-info/10 text-info"
35032
35394
  };
35033
35395
  return /* @__PURE__ */ jsxs(Box, { className: cn("mb-6", className), children: [
35034
- 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(React84__default.Fragment, { children: [
35396
+ 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(React88__default.Fragment, { children: [
35035
35397
  idx > 0 && /* @__PURE__ */ jsx(Typography, { variant: "small", color: "muted", children: "/" }),
35036
35398
  crumb.href ? /* @__PURE__ */ jsx(
35037
35399
  "a",
@@ -35118,6 +35480,271 @@ var init_PageHeader = __esm({
35118
35480
  PageHeader.displayName = "PageHeader";
35119
35481
  }
35120
35482
  });
35483
+ var FormSection, FormLayout, FormActions;
35484
+ var init_FormSection = __esm({
35485
+ "components/core/molecules/FormSection.tsx"() {
35486
+ "use client";
35487
+ init_cn();
35488
+ init_atoms2();
35489
+ init_Box();
35490
+ init_Typography();
35491
+ init_Button();
35492
+ init_Stack();
35493
+ init_Icon();
35494
+ init_useEventBus();
35495
+ FormSection = ({
35496
+ title,
35497
+ description,
35498
+ children,
35499
+ collapsible = false,
35500
+ defaultCollapsed = false,
35501
+ card = false,
35502
+ columns = 1,
35503
+ className
35504
+ }) => {
35505
+ const [collapsed, setCollapsed] = React88__default.useState(defaultCollapsed);
35506
+ const { t } = useTranslate();
35507
+ const eventBus = useEventBus();
35508
+ const gridClass = {
35509
+ 1: "grid-cols-1",
35510
+ 2: "grid-cols-1 md:grid-cols-2",
35511
+ 3: "grid-cols-1 md:grid-cols-2 lg:grid-cols-3"
35512
+ }[columns];
35513
+ React88__default.useCallback(() => {
35514
+ if (collapsible) {
35515
+ setCollapsed((prev) => !prev);
35516
+ eventBus.emit("UI:TOGGLE_COLLAPSE", { collapsed: !collapsed });
35517
+ }
35518
+ }, [collapsible, collapsed, eventBus]);
35519
+ const content = /* @__PURE__ */ jsxs(Fragment, { children: [
35520
+ (title || description) && /* @__PURE__ */ jsxs(VStack, { gap: "xs", className: "mb-4", children: [
35521
+ title && /* @__PURE__ */ jsxs(
35522
+ HStack,
35523
+ {
35524
+ justify: "between",
35525
+ align: "center",
35526
+ className: cn(collapsible && "cursor-pointer"),
35527
+ action: collapsible ? "TOGGLE_COLLAPSE" : void 0,
35528
+ children: [
35529
+ /* @__PURE__ */ jsx(Typography, { variant: "h3", weight: "semibold", children: title }),
35530
+ collapsible && /* @__PURE__ */ jsx(
35531
+ Button,
35532
+ {
35533
+ variant: "ghost",
35534
+ size: "sm",
35535
+ action: "TOGGLE_COLLAPSE",
35536
+ children: /* @__PURE__ */ jsx(
35537
+ Icon,
35538
+ {
35539
+ icon: ChevronDown,
35540
+ size: "sm",
35541
+ className: cn(
35542
+ "text-muted-foreground transition-transform",
35543
+ collapsed && "rotate-180"
35544
+ )
35545
+ }
35546
+ )
35547
+ }
35548
+ )
35549
+ ]
35550
+ }
35551
+ ),
35552
+ description && /* @__PURE__ */ jsx(Typography, { variant: "small", color: "secondary", children: description })
35553
+ ] }),
35554
+ (!collapsible || !collapsed) && /* @__PURE__ */ jsx(Box, { className: cn("grid gap-4", gridClass), children })
35555
+ ] });
35556
+ if (card) {
35557
+ return /* @__PURE__ */ jsx(Card, { className: cn("p-6", className), children: content });
35558
+ }
35559
+ return /* @__PURE__ */ jsx(Box, { className, children: content });
35560
+ };
35561
+ FormSection.displayName = "FormSection";
35562
+ FormLayout = ({
35563
+ children,
35564
+ dividers = true,
35565
+ className
35566
+ }) => {
35567
+ return /* @__PURE__ */ jsx(
35568
+ VStack,
35569
+ {
35570
+ gap: "lg",
35571
+ className: cn(
35572
+ dividers && "[&>*+*]:pt-8 [&>*+*]:border-t [&>*+*]:border-border",
35573
+ className
35574
+ ),
35575
+ children
35576
+ }
35577
+ );
35578
+ };
35579
+ FormLayout.displayName = "FormLayout";
35580
+ FormActions = ({
35581
+ children,
35582
+ sticky = false,
35583
+ align = "right",
35584
+ className
35585
+ }) => {
35586
+ const alignClass2 = {
35587
+ left: "justify-start",
35588
+ right: "justify-end",
35589
+ between: "justify-between",
35590
+ center: "justify-center"
35591
+ }[align];
35592
+ return /* @__PURE__ */ jsx(
35593
+ HStack,
35594
+ {
35595
+ gap: "sm",
35596
+ align: "center",
35597
+ className: cn(
35598
+ "pt-6 border-t border-border",
35599
+ alignClass2,
35600
+ sticky && "sticky bottom-0 bg-card py-4 -mx-6 px-6 shadow-[0_-4px_6px_-1px_rgb(0,0,0,0.05)]",
35601
+ className
35602
+ ),
35603
+ children
35604
+ }
35605
+ );
35606
+ };
35607
+ FormActions.displayName = "FormActions";
35608
+ }
35609
+ });
35610
+ function currentValue(decl, override) {
35611
+ return override !== void 0 ? override : decl.default;
35612
+ }
35613
+ function TextLikeControl({
35614
+ field,
35615
+ numeric,
35616
+ value,
35617
+ onCommit
35618
+ }) {
35619
+ const initial = value === void 0 || value === null ? "" : String(value);
35620
+ const [draft, setDraft] = React88__default.useState(initial);
35621
+ React88__default.useEffect(() => setDraft(initial), [initial]);
35622
+ const commit = () => {
35623
+ if (numeric) {
35624
+ const n = draft.trim() === "" ? 0 : Number(draft);
35625
+ onCommit(field, Number.isNaN(n) ? 0 : n);
35626
+ } else {
35627
+ onCommit(field, draft);
35628
+ }
35629
+ };
35630
+ return /* @__PURE__ */ jsx(
35631
+ Input,
35632
+ {
35633
+ inputType: numeric ? "number" : "text",
35634
+ value: draft,
35635
+ onChange: (e) => setDraft(e.target.value),
35636
+ onBlur: commit,
35637
+ onKeyDown: (e) => {
35638
+ if (e.key === "Enter") commit();
35639
+ }
35640
+ }
35641
+ );
35642
+ }
35643
+ function FieldControl({
35644
+ name,
35645
+ decl,
35646
+ value,
35647
+ onChange,
35648
+ assets
35649
+ }) {
35650
+ let control;
35651
+ const stringValue = typeof value === "string" ? value : void 0;
35652
+ if (decl.type === "icon") {
35653
+ control = /* @__PURE__ */ jsx(IconPicker, { value: stringValue, onChange: (icon) => onChange(name, icon) });
35654
+ } else if (decl.type === "asset") {
35655
+ control = /* @__PURE__ */ jsx(
35656
+ AssetPicker,
35657
+ {
35658
+ assets: assets ?? [],
35659
+ value: stringValue,
35660
+ onChange: (url) => onChange(name, url)
35661
+ }
35662
+ );
35663
+ } else if (decl.type === "boolean") {
35664
+ control = /* @__PURE__ */ jsx(Switch, { checked: value === true, onChange: (c) => onChange(name, c) });
35665
+ } else if (decl.type === "string" && decl.values !== void 0 && decl.values.length > 0) {
35666
+ control = /* @__PURE__ */ jsx(
35667
+ Select,
35668
+ {
35669
+ options: decl.values.map((v) => ({ value: v, label: v })),
35670
+ value: typeof value === "string" ? value : "",
35671
+ onChange: (e) => onChange(name, e.target.value)
35672
+ }
35673
+ );
35674
+ } else if (decl.type === "number") {
35675
+ control = /* @__PURE__ */ jsx(TextLikeControl, { field: name, numeric: true, value, onCommit: onChange });
35676
+ } else if (decl.type === "string") {
35677
+ control = /* @__PURE__ */ jsx(TextLikeControl, { field: name, numeric: false, value, onCommit: onChange });
35678
+ } else {
35679
+ control = /* @__PURE__ */ jsxs(Typography, { variant: "caption", color: "muted", children: [
35680
+ decl.type,
35681
+ " \u2014 edit in source"
35682
+ ] });
35683
+ }
35684
+ return /* @__PURE__ */ jsxs(VStack, { gap: "xs", children: [
35685
+ /* @__PURE__ */ jsx(Typography, { variant: "label", children: decl.label ?? name }),
35686
+ control,
35687
+ decl.description !== void 0 && decl.description !== "" && /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", children: decl.description })
35688
+ ] });
35689
+ }
35690
+ var TIER_ORDER, PropertyInspector;
35691
+ var init_PropertyInspector = __esm({
35692
+ "components/core/molecules/PropertyInspector.tsx"() {
35693
+ "use client";
35694
+ init_cn();
35695
+ init_Stack();
35696
+ init_Typography();
35697
+ init_Button();
35698
+ init_Switch();
35699
+ init_Select();
35700
+ init_Input();
35701
+ init_FormSection();
35702
+ init_IconPicker();
35703
+ init_AssetPicker();
35704
+ TIER_ORDER = ["presentation", "domain", "policy", "infra", "internal"];
35705
+ PropertyInspector = ({
35706
+ config,
35707
+ values,
35708
+ onChange,
35709
+ onReset,
35710
+ title,
35711
+ className,
35712
+ assets
35713
+ }) => {
35714
+ const fields = Object.entries(config);
35715
+ const byTier = /* @__PURE__ */ new Map();
35716
+ for (const [name, decl] of fields) {
35717
+ const tier = decl.tier ?? "presentation";
35718
+ const arr = byTier.get(tier) ?? [];
35719
+ arr.push([name, decl]);
35720
+ byTier.set(tier, arr);
35721
+ }
35722
+ const tiers = [...byTier.keys()].sort((a, b) => {
35723
+ const ia = TIER_ORDER.indexOf(a);
35724
+ const ib = TIER_ORDER.indexOf(b);
35725
+ return (ia === -1 ? 99 : ia) - (ib === -1 ? 99 : ib);
35726
+ });
35727
+ return /* @__PURE__ */ jsxs(VStack, { gap: "sm", className: cn("w-full", className), children: [
35728
+ /* @__PURE__ */ jsxs(HStack, { justify: "between", align: "center", children: [
35729
+ /* @__PURE__ */ jsx(Typography, { variant: "caption", weight: "bold", children: title ?? "Config" }),
35730
+ onReset !== void 0 && /* @__PURE__ */ jsx(Button, { variant: "ghost", size: "sm", icon: "rotate-ccw", label: "Reset", onClick: onReset })
35731
+ ] }),
35732
+ fields.length === 0 && /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", children: "No configurable properties." }),
35733
+ 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(
35734
+ FieldControl,
35735
+ {
35736
+ name,
35737
+ decl,
35738
+ value: currentValue(decl, values?.[name]),
35739
+ onChange,
35740
+ assets
35741
+ },
35742
+ name
35743
+ )) }) }, tier))
35744
+ ] });
35745
+ };
35746
+ }
35747
+ });
35121
35748
  var lookStyles8, Header;
35122
35749
  var init_Header = __esm({
35123
35750
  "components/core/molecules/Header.tsx"() {
@@ -35768,7 +36395,7 @@ var init_WizardContainer = __esm({
35768
36395
  const isCompleted = index < currentStep;
35769
36396
  const stepKey = step.id ?? step.tabId ?? `step-${index}`;
35770
36397
  const stepTitle = step.title ?? step.name ?? `Step ${index + 1}`;
35771
- return /* @__PURE__ */ jsxs(React84__default.Fragment, { children: [
36398
+ return /* @__PURE__ */ jsxs(React88__default.Fragment, { children: [
35772
36399
  /* @__PURE__ */ jsx(
35773
36400
  Button,
35774
36401
  {
@@ -38053,7 +38680,7 @@ var init_DetailPanel = __esm({
38053
38680
  }
38054
38681
  });
38055
38682
  function extractTitle(children) {
38056
- if (!React84__default.isValidElement(children)) return void 0;
38683
+ if (!React88__default.isValidElement(children)) return void 0;
38057
38684
  const props = children.props;
38058
38685
  if (typeof props.title === "string") {
38059
38686
  return props.title;
@@ -38108,7 +38735,7 @@ function LinearView({
38108
38735
  /* @__PURE__ */ jsx(HStack, { className: "flex-wrap items-center", gap: "xs", children: trait.states.map((state, i) => {
38109
38736
  const isDone = i < currentIdx;
38110
38737
  const isCurrent = i === currentIdx;
38111
- return /* @__PURE__ */ jsxs(React84__default.Fragment, { children: [
38738
+ return /* @__PURE__ */ jsxs(React88__default.Fragment, { children: [
38112
38739
  i > 0 && /* @__PURE__ */ jsx(
38113
38740
  Typography,
38114
38741
  {
@@ -38818,7 +39445,7 @@ var init_FeatureDetailPageTemplate = __esm({
38818
39445
  });
38819
39446
  var FeatureGridOrganism;
38820
39447
  var init_FeatureGridOrganism = __esm({
38821
- "components/core/organisms/FeatureGridOrganism.tsx"() {
39448
+ "components/marketing/organisms/FeatureGridOrganism.tsx"() {
38822
39449
  "use client";
38823
39450
  init_cn();
38824
39451
  init_useEventBus();
@@ -39066,12 +39693,12 @@ var init_Form = __esm({
39066
39693
  const isSchemaEntity = isOrbitalEntitySchema(entity);
39067
39694
  const resolvedEntity = isSchemaEntity ? entity : void 0;
39068
39695
  const entityName = typeof entity === "string" ? entity : resolvedEntity?.name;
39069
- const normalizedInitialData = React84__default.useMemo(() => {
39696
+ const normalizedInitialData = React88__default.useMemo(() => {
39070
39697
  const entityRowAsInitial = isPlainEntityRow(entity) ? entity : void 0;
39071
39698
  const callerInitial = initialData !== null && typeof initialData === "object" && !Array.isArray(initialData) ? initialData : {};
39072
39699
  return entityRowAsInitial !== void 0 ? { ...entityRowAsInitial, ...callerInitial } : callerInitial;
39073
39700
  }, [entity, initialData]);
39074
- const entityDerivedFields = React84__default.useMemo(() => {
39701
+ const entityDerivedFields = React88__default.useMemo(() => {
39075
39702
  if (fields && fields.length > 0) return void 0;
39076
39703
  if (!resolvedEntity) return void 0;
39077
39704
  return resolvedEntity.fields.map(
@@ -39091,16 +39718,16 @@ var init_Form = __esm({
39091
39718
  const conditionalFields = typeof conditionalFieldsRaw === "boolean" ? {} : conditionalFieldsRaw;
39092
39719
  const hiddenCalculations = typeof hiddenCalculationsRaw === "boolean" ? [] : hiddenCalculationsRaw;
39093
39720
  const violationTriggers = typeof violationTriggersRaw === "boolean" ? [] : violationTriggersRaw;
39094
- const [formData, setFormData] = React84__default.useState(
39721
+ const [formData, setFormData] = React88__default.useState(
39095
39722
  normalizedInitialData
39096
39723
  );
39097
- const [collapsedSections, setCollapsedSections] = React84__default.useState(
39724
+ const [collapsedSections, setCollapsedSections] = React88__default.useState(
39098
39725
  /* @__PURE__ */ new Set()
39099
39726
  );
39100
- const [submitError, setSubmitError] = React84__default.useState(null);
39101
- const formRef = React84__default.useRef(null);
39727
+ const [submitError, setSubmitError] = React88__default.useState(null);
39728
+ const formRef = React88__default.useRef(null);
39102
39729
  const formMode = props.mode;
39103
- const mountedRef = React84__default.useRef(false);
39730
+ const mountedRef = React88__default.useRef(false);
39104
39731
  if (!mountedRef.current) {
39105
39732
  mountedRef.current = true;
39106
39733
  debug("forms", "mount", {
@@ -39113,7 +39740,7 @@ var init_Form = __esm({
39113
39740
  });
39114
39741
  }
39115
39742
  const shouldShowCancel = showCancel ?? (fields && fields.length > 0);
39116
- const evalContext = React84__default.useMemo(
39743
+ const evalContext = React88__default.useMemo(
39117
39744
  () => ({
39118
39745
  formValues: formData,
39119
39746
  globalVariables: externalContext?.globalVariables ?? {},
@@ -39122,7 +39749,7 @@ var init_Form = __esm({
39122
39749
  }),
39123
39750
  [formData, externalContext]
39124
39751
  );
39125
- React84__default.useEffect(() => {
39752
+ React88__default.useEffect(() => {
39126
39753
  debug("forms", "initialData-sync", {
39127
39754
  mode: formMode,
39128
39755
  normalizedInitialData,
@@ -39133,7 +39760,7 @@ var init_Form = __esm({
39133
39760
  setFormData(normalizedInitialData);
39134
39761
  }
39135
39762
  }, [normalizedInitialData]);
39136
- const processCalculations = React84__default.useCallback(
39763
+ const processCalculations = React88__default.useCallback(
39137
39764
  (changedFieldId, newFormData) => {
39138
39765
  if (!hiddenCalculations.length) return;
39139
39766
  const context = {
@@ -39158,7 +39785,7 @@ var init_Form = __esm({
39158
39785
  },
39159
39786
  [hiddenCalculations, externalContext, eventBus]
39160
39787
  );
39161
- const checkViolations = React84__default.useCallback(
39788
+ const checkViolations = React88__default.useCallback(
39162
39789
  (changedFieldId, newFormData) => {
39163
39790
  if (!violationTriggers.length) return;
39164
39791
  const context = {
@@ -39196,7 +39823,7 @@ var init_Form = __esm({
39196
39823
  processCalculations(name, newFormData);
39197
39824
  checkViolations(name, newFormData);
39198
39825
  };
39199
- const isFieldVisible = React84__default.useCallback(
39826
+ const isFieldVisible = React88__default.useCallback(
39200
39827
  (fieldName) => {
39201
39828
  const condition = conditionalFields[fieldName];
39202
39829
  if (!condition) return true;
@@ -39204,7 +39831,7 @@ var init_Form = __esm({
39204
39831
  },
39205
39832
  [conditionalFields, evalContext]
39206
39833
  );
39207
- const isSectionVisible = React84__default.useCallback(
39834
+ const isSectionVisible = React88__default.useCallback(
39208
39835
  (section) => {
39209
39836
  if (!section.condition) return true;
39210
39837
  return Boolean(evaluateFormExpression(section.condition, evalContext));
@@ -39280,7 +39907,7 @@ var init_Form = __esm({
39280
39907
  eventBus.emit(`UI:${onCancel}`);
39281
39908
  }
39282
39909
  };
39283
- const renderField = React84__default.useCallback(
39910
+ const renderField = React88__default.useCallback(
39284
39911
  (field) => {
39285
39912
  const fieldName = field.name || field.field;
39286
39913
  if (!fieldName) return null;
@@ -39289,19 +39916,19 @@ var init_Form = __esm({
39289
39916
  }
39290
39917
  const inputType = determineInputType(field);
39291
39918
  const label = field.label || fieldName.charAt(0).toUpperCase() + fieldName.slice(1).replace(/([A-Z])/g, " $1");
39292
- const currentValue = formData[fieldName] ?? field.defaultValue ?? "";
39919
+ const currentValue2 = formData[fieldName] ?? field.defaultValue ?? "";
39293
39920
  return /* @__PURE__ */ jsxs(VStack, { gap: "xs", "data-field": fieldName, children: [
39294
39921
  inputType !== "checkbox" && /* @__PURE__ */ jsxs(Typography, { as: "label", variant: "label", weight: "bold", children: [
39295
39922
  label,
39296
39923
  field.required && /* @__PURE__ */ jsx(Typography, { as: "span", color: "error", className: "ml-1", children: "*" })
39297
39924
  ] }),
39298
- renderFieldInput(field, fieldName, inputType, currentValue, label)
39925
+ renderFieldInput(field, fieldName, inputType, currentValue2, label)
39299
39926
  ] }, fieldName);
39300
39927
  },
39301
39928
  [formData, isFieldVisible, relationsData, relationsLoading, isLoading]
39302
39929
  );
39303
39930
  const effectiveFields = entityDerivedFields ?? fields;
39304
- const normalizedFields = React84__default.useMemo(() => {
39931
+ const normalizedFields = React88__default.useMemo(() => {
39305
39932
  if (!effectiveFields || effectiveFields.length === 0) return [];
39306
39933
  return effectiveFields.map((field) => {
39307
39934
  if (typeof field === "string") {
@@ -39324,7 +39951,7 @@ var init_Form = __esm({
39324
39951
  return field;
39325
39952
  });
39326
39953
  }, [effectiveFields, resolvedEntity]);
39327
- const schemaFields = React84__default.useMemo(() => {
39954
+ const schemaFields = React88__default.useMemo(() => {
39328
39955
  if (normalizedFields.length === 0) return null;
39329
39956
  if (isDebugEnabled()) {
39330
39957
  debugGroup(`Form: ${entityName || "unknown"}`);
@@ -39334,7 +39961,7 @@ var init_Form = __esm({
39334
39961
  }
39335
39962
  return normalizedFields.map(renderField).filter(Boolean);
39336
39963
  }, [normalizedFields, renderField, entityName, conditionalFields]);
39337
- const sectionElements = React84__default.useMemo(() => {
39964
+ const sectionElements = React88__default.useMemo(() => {
39338
39965
  if (!sections || sections.length === 0) return null;
39339
39966
  return sections.map((section) => {
39340
39967
  if (!isSectionVisible(section)) {
@@ -39370,7 +39997,7 @@ var init_Form = __esm({
39370
39997
  ] }, section.id);
39371
39998
  }).filter(Boolean);
39372
39999
  }, [sections, isSectionVisible, collapsedSections, renderField, gap]);
39373
- function renderFieldInput(field, fieldName, inputType, currentValue, label) {
40000
+ function renderFieldInput(field, fieldName, inputType, currentValue2, label) {
39374
40001
  const commonProps = {
39375
40002
  id: fieldName,
39376
40003
  name: fieldName,
@@ -39387,7 +40014,7 @@ var init_Form = __esm({
39387
40014
  {
39388
40015
  ...commonProps,
39389
40016
  label: label + (field.required ? " *" : ""),
39390
- checked: Boolean(currentValue),
40017
+ checked: Boolean(currentValue2),
39391
40018
  onChange: (e) => handleChange(fieldName, e.target.checked)
39392
40019
  }
39393
40020
  );
@@ -39396,7 +40023,7 @@ var init_Form = __esm({
39396
40023
  Textarea,
39397
40024
  {
39398
40025
  ...commonProps,
39399
- value: String(currentValue),
40026
+ value: String(currentValue2),
39400
40027
  onChange: (e) => handleChange(fieldName, e.target.value),
39401
40028
  minLength: field.min,
39402
40029
  maxLength: field.max
@@ -39409,7 +40036,7 @@ var init_Form = __esm({
39409
40036
  {
39410
40037
  ...commonProps,
39411
40038
  options,
39412
- value: String(currentValue),
40039
+ value: String(currentValue2),
39413
40040
  onChange: (e) => handleChange(fieldName, e.target.value),
39414
40041
  placeholder: field.placeholder || `Select ${label}...`
39415
40042
  }
@@ -39422,7 +40049,7 @@ var init_Form = __esm({
39422
40049
  RelationSelect,
39423
40050
  {
39424
40051
  ...commonProps,
39425
- value: currentValue ? String(currentValue) : void 0,
40052
+ value: currentValue2 ? String(currentValue2) : void 0,
39426
40053
  onChange: (value) => handleChange(fieldName, value),
39427
40054
  options: relationOptions,
39428
40055
  isLoading: relationLoading,
@@ -39438,7 +40065,7 @@ var init_Form = __esm({
39438
40065
  {
39439
40066
  ...commonProps,
39440
40067
  type: "number",
39441
- value: currentValue !== void 0 && currentValue !== "" ? String(currentValue) : "",
40068
+ value: currentValue2 !== void 0 && currentValue2 !== "" ? String(currentValue2) : "",
39442
40069
  onChange: (e) => handleChange(
39443
40070
  fieldName,
39444
40071
  e.target.value ? Number(e.target.value) : void 0
@@ -39453,7 +40080,7 @@ var init_Form = __esm({
39453
40080
  {
39454
40081
  ...commonProps,
39455
40082
  type: "date",
39456
- value: formatDateValue(currentValue),
40083
+ value: formatDateValue(currentValue2),
39457
40084
  onChange: (e) => handleChange(fieldName, e.target.value)
39458
40085
  }
39459
40086
  );
@@ -39463,7 +40090,7 @@ var init_Form = __esm({
39463
40090
  {
39464
40091
  ...commonProps,
39465
40092
  type: "datetime-local",
39466
- value: formatDateTimeValue(currentValue),
40093
+ value: formatDateTimeValue(currentValue2),
39467
40094
  onChange: (e) => handleChange(fieldName, e.target.value)
39468
40095
  }
39469
40096
  );
@@ -39473,7 +40100,7 @@ var init_Form = __esm({
39473
40100
  {
39474
40101
  ...commonProps,
39475
40102
  type: "email",
39476
- value: String(currentValue),
40103
+ value: String(currentValue2),
39477
40104
  onChange: (e) => handleChange(fieldName, e.target.value),
39478
40105
  minLength: field.min,
39479
40106
  maxLength: field.max
@@ -39485,7 +40112,7 @@ var init_Form = __esm({
39485
40112
  {
39486
40113
  ...commonProps,
39487
40114
  type: "url",
39488
- value: String(currentValue),
40115
+ value: String(currentValue2),
39489
40116
  onChange: (e) => handleChange(fieldName, e.target.value),
39490
40117
  minLength: field.min,
39491
40118
  maxLength: field.max
@@ -39497,7 +40124,7 @@ var init_Form = __esm({
39497
40124
  {
39498
40125
  ...commonProps,
39499
40126
  type: "password",
39500
- value: String(currentValue),
40127
+ value: String(currentValue2),
39501
40128
  onChange: (e) => handleChange(fieldName, e.target.value),
39502
40129
  minLength: field.min,
39503
40130
  maxLength: field.max
@@ -39510,7 +40137,7 @@ var init_Form = __esm({
39510
40137
  {
39511
40138
  ...commonProps,
39512
40139
  type: "text",
39513
- value: String(currentValue),
40140
+ value: String(currentValue2),
39514
40141
  onChange: (e) => handleChange(fieldName, e.target.value),
39515
40142
  minLength: field.min,
39516
40143
  maxLength: field.max
@@ -40165,7 +40792,7 @@ var init_GenericAppTemplate = __esm({
40165
40792
  });
40166
40793
  var HeroOrganism, _HeroClickInterceptor;
40167
40794
  var init_HeroOrganism = __esm({
40168
- "components/core/organisms/HeroOrganism.tsx"() {
40795
+ "components/marketing/organisms/HeroOrganism.tsx"() {
40169
40796
  "use client";
40170
40797
  init_cn();
40171
40798
  init_useEventBus();
@@ -40609,7 +41236,7 @@ var init_List = __esm({
40609
41236
  if (entity && typeof entity === "object" && "id" in entity) return [entity];
40610
41237
  return [];
40611
41238
  }, [entity]);
40612
- const getItemActions = React84__default.useCallback(
41239
+ const getItemActions = React88__default.useCallback(
40613
41240
  (item) => {
40614
41241
  if (!itemActions) return [];
40615
41242
  if (typeof itemActions === "function") {
@@ -41085,7 +41712,7 @@ var init_MediaGallery = __esm({
41085
41712
  [selectable, selectedItems, selectionEvent, eventBus]
41086
41713
  );
41087
41714
  const entityData = Array.isArray(entity) ? entity : [];
41088
- const items = React84__default.useMemo(() => {
41715
+ const items = React88__default.useMemo(() => {
41089
41716
  if (propItems) return propItems;
41090
41717
  if (entityData.length === 0) return [];
41091
41718
  return entityData.map((record, idx) => ({
@@ -41246,7 +41873,7 @@ var init_MediaGallery = __esm({
41246
41873
  }
41247
41874
  });
41248
41875
  function extractTitle2(children) {
41249
- if (!React84__default.isValidElement(children)) return void 0;
41876
+ if (!React88__default.isValidElement(children)) return void 0;
41250
41877
  const props = children.props;
41251
41878
  if (typeof props.title === "string") {
41252
41879
  return props.title;
@@ -41677,7 +42304,7 @@ var init_debugRegistry = __esm({
41677
42304
  }
41678
42305
  });
41679
42306
  function useDebugData() {
41680
- const [data, setData] = React84.useState(() => ({
42307
+ const [data, setData] = React88.useState(() => ({
41681
42308
  traits: [],
41682
42309
  ticks: [],
41683
42310
  guards: [],
@@ -41691,7 +42318,7 @@ function useDebugData() {
41691
42318
  },
41692
42319
  lastUpdate: Date.now()
41693
42320
  }));
41694
- React84.useEffect(() => {
42321
+ React88.useEffect(() => {
41695
42322
  const updateData = () => {
41696
42323
  setData({
41697
42324
  traits: getAllTraits(),
@@ -41800,12 +42427,12 @@ function layoutGraph(states, transitions, initialState, width, height) {
41800
42427
  return positions;
41801
42428
  }
41802
42429
  function WalkMinimap() {
41803
- const [walkStep, setWalkStep] = React84.useState(null);
41804
- const [traits2, setTraits] = React84.useState([]);
41805
- const [coveredEdges, setCoveredEdges] = React84.useState([]);
41806
- const [completedTraits, setCompletedTraits] = React84.useState(/* @__PURE__ */ new Set());
41807
- const prevTraitRef = React84.useRef(null);
41808
- React84.useEffect(() => {
42430
+ const [walkStep, setWalkStep] = React88.useState(null);
42431
+ const [traits2, setTraits] = React88.useState([]);
42432
+ const [coveredEdges, setCoveredEdges] = React88.useState([]);
42433
+ const [completedTraits, setCompletedTraits] = React88.useState(/* @__PURE__ */ new Set());
42434
+ const prevTraitRef = React88.useRef(null);
42435
+ React88.useEffect(() => {
41809
42436
  const interval = setInterval(() => {
41810
42437
  const w = window;
41811
42438
  const step = w.__orbitalWalkStep;
@@ -42241,15 +42868,15 @@ var init_EntitiesTab = __esm({
42241
42868
  });
42242
42869
  function EventFlowTab({ events: events2 }) {
42243
42870
  const { t } = useTranslate();
42244
- const [filter, setFilter] = React84.useState("all");
42245
- const containerRef = React84.useRef(null);
42246
- const [autoScroll, setAutoScroll] = React84.useState(true);
42247
- React84.useEffect(() => {
42871
+ const [filter, setFilter] = React88.useState("all");
42872
+ const containerRef = React88.useRef(null);
42873
+ const [autoScroll, setAutoScroll] = React88.useState(true);
42874
+ React88.useEffect(() => {
42248
42875
  if (autoScroll && containerRef.current) {
42249
42876
  containerRef.current.scrollTop = containerRef.current.scrollHeight;
42250
42877
  }
42251
42878
  }, [events2.length, autoScroll]);
42252
- const filteredEvents = React84.useMemo(() => {
42879
+ const filteredEvents = React88.useMemo(() => {
42253
42880
  if (filter === "all") return events2;
42254
42881
  return events2.filter((e) => e.type === filter);
42255
42882
  }, [events2, filter]);
@@ -42365,7 +42992,7 @@ var init_EventFlowTab = __esm({
42365
42992
  });
42366
42993
  function GuardsPanel({ guards }) {
42367
42994
  const { t } = useTranslate();
42368
- const [filter, setFilter] = React84.useState("all");
42995
+ const [filter, setFilter] = React88.useState("all");
42369
42996
  if (guards.length === 0) {
42370
42997
  return /* @__PURE__ */ jsx(
42371
42998
  EmptyState,
@@ -42378,7 +43005,7 @@ function GuardsPanel({ guards }) {
42378
43005
  }
42379
43006
  const passedCount = guards.filter((g) => g.result).length;
42380
43007
  const failedCount = guards.length - passedCount;
42381
- const filteredGuards = React84.useMemo(() => {
43008
+ const filteredGuards = React88.useMemo(() => {
42382
43009
  if (filter === "all") return guards;
42383
43010
  if (filter === "passed") return guards.filter((g) => g.result);
42384
43011
  return guards.filter((g) => !g.result);
@@ -42541,10 +43168,10 @@ function EffectBadge({ effect }) {
42541
43168
  }
42542
43169
  function TransitionTimeline({ transitions }) {
42543
43170
  const { t } = useTranslate();
42544
- const containerRef = React84.useRef(null);
42545
- const [autoScroll, setAutoScroll] = React84.useState(true);
42546
- const [expandedId, setExpandedId] = React84.useState(null);
42547
- React84.useEffect(() => {
43171
+ const containerRef = React88.useRef(null);
43172
+ const [autoScroll, setAutoScroll] = React88.useState(true);
43173
+ const [expandedId, setExpandedId] = React88.useState(null);
43174
+ React88.useEffect(() => {
42548
43175
  if (autoScroll && containerRef.current) {
42549
43176
  containerRef.current.scrollTop = containerRef.current.scrollHeight;
42550
43177
  }
@@ -42824,9 +43451,9 @@ function getAllEvents(traits2) {
42824
43451
  function EventDispatcherTab({ traits: traits2, schema }) {
42825
43452
  const eventBus = useEventBus();
42826
43453
  const { t } = useTranslate();
42827
- const [log12, setLog] = React84.useState([]);
42828
- const prevStatesRef = React84.useRef(/* @__PURE__ */ new Map());
42829
- React84.useEffect(() => {
43454
+ const [log12, setLog] = React88.useState([]);
43455
+ const prevStatesRef = React88.useRef(/* @__PURE__ */ new Map());
43456
+ React88.useEffect(() => {
42830
43457
  for (const trait of traits2) {
42831
43458
  const prev = prevStatesRef.current.get(trait.id);
42832
43459
  if (prev && prev !== trait.currentState) {
@@ -42995,10 +43622,10 @@ function VerifyModePanel({
42995
43622
  localCount
42996
43623
  }) {
42997
43624
  const { t } = useTranslate();
42998
- const [expanded, setExpanded] = React84.useState(true);
42999
- const scrollRef = React84.useRef(null);
43000
- const prevCountRef = React84.useRef(0);
43001
- React84.useEffect(() => {
43625
+ const [expanded, setExpanded] = React88.useState(true);
43626
+ const scrollRef = React88.useRef(null);
43627
+ const prevCountRef = React88.useRef(0);
43628
+ React88.useEffect(() => {
43002
43629
  if (expanded && transitions.length > prevCountRef.current && scrollRef.current) {
43003
43630
  scrollRef.current.scrollTop = scrollRef.current.scrollHeight;
43004
43631
  }
@@ -43055,10 +43682,10 @@ function RuntimeDebugger({
43055
43682
  schema
43056
43683
  }) {
43057
43684
  const { t } = useTranslate();
43058
- const [isCollapsed, setIsCollapsed] = React84.useState(mode === "verify" ? true : defaultCollapsed);
43059
- const [isVisible, setIsVisible] = React84.useState(mode === "inline" || mode === "verify" || isDebugEnabled2());
43685
+ const [isCollapsed, setIsCollapsed] = React88.useState(mode === "verify" ? true : defaultCollapsed);
43686
+ const [isVisible, setIsVisible] = React88.useState(mode === "inline" || mode === "verify" || isDebugEnabled2());
43060
43687
  const debugData = useDebugData();
43061
- React84.useEffect(() => {
43688
+ React88.useEffect(() => {
43062
43689
  if (mode === "inline") return;
43063
43690
  return onDebugToggle((enabled) => {
43064
43691
  setIsVisible(enabled);
@@ -43067,7 +43694,7 @@ function RuntimeDebugger({
43067
43694
  }
43068
43695
  });
43069
43696
  }, [mode]);
43070
- React84.useEffect(() => {
43697
+ React88.useEffect(() => {
43071
43698
  if (mode === "inline") return;
43072
43699
  const handleKeyDown = (e) => {
43073
43700
  if (e.key === "`" && isVisible) {
@@ -43082,7 +43709,7 @@ function RuntimeDebugger({
43082
43709
  if (!isVisible) {
43083
43710
  return null;
43084
43711
  }
43085
- const positionClasses3 = {
43712
+ const positionClasses = {
43086
43713
  "bottom-right": "bottom-4 right-4",
43087
43714
  "bottom-left": "bottom-4 left-4",
43088
43715
  "top-right": "top-4 right-4",
@@ -43211,7 +43838,7 @@ function RuntimeDebugger({
43211
43838
  className: cn(
43212
43839
  "runtime-debugger",
43213
43840
  "fixed",
43214
- positionClasses3[position],
43841
+ positionClasses[position],
43215
43842
  isCollapsed ? "runtime-debugger--collapsed" : "runtime-debugger--expanded",
43216
43843
  className
43217
43844
  ),
@@ -43516,7 +44143,7 @@ function SequenceBar({
43516
44143
  onSlotRemove(index);
43517
44144
  }, [onSlotRemove, playing]);
43518
44145
  const paddedSlots = Array.from({ length: maxSlots }, (_, i) => slots[i]);
43519
- return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(React84__default.Fragment, { children: [
44146
+ return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(React88__default.Fragment, { children: [
43520
44147
  i > 0 && /* @__PURE__ */ jsx(
43521
44148
  Typography,
43522
44149
  {
@@ -43792,7 +44419,7 @@ var init_SequencerBoard = __esm({
43792
44419
  });
43793
44420
  var ShowcaseOrganism;
43794
44421
  var init_ShowcaseOrganism = __esm({
43795
- "components/core/organisms/ShowcaseOrganism.tsx"() {
44422
+ "components/marketing/organisms/ShowcaseOrganism.tsx"() {
43796
44423
  "use client";
43797
44424
  init_cn();
43798
44425
  init_useEventBus();
@@ -44474,7 +45101,7 @@ var init_StatCard = __esm({
44474
45101
  title: propTitle,
44475
45102
  value: propValue,
44476
45103
  previousValue,
44477
- currentValue,
45104
+ currentValue: currentValue2,
44478
45105
  trend: manualTrend,
44479
45106
  trendDirection: manualDirection,
44480
45107
  invertTrend = false,
@@ -44495,7 +45122,7 @@ var init_StatCard = __esm({
44495
45122
  const labelToUse = propLabel ?? propTitle;
44496
45123
  const eventBus = useEventBus();
44497
45124
  const { t } = useTranslate();
44498
- const handleActionClick = React84__default.useCallback(() => {
45125
+ const handleActionClick = React88__default.useCallback(() => {
44499
45126
  if (action?.event) {
44500
45127
  eventBus.emit(`UI:${action.event}`, {});
44501
45128
  }
@@ -44506,7 +45133,7 @@ var init_StatCard = __esm({
44506
45133
  const data = Array.isArray(entity) ? entity : entity ? [entity] : [];
44507
45134
  const isLoading = externalLoading ?? false;
44508
45135
  const error = externalError;
44509
- const computeMetricValue = React84__default.useCallback(
45136
+ const computeMetricValue = React88__default.useCallback(
44510
45137
  (metric, items) => {
44511
45138
  if (metric.value !== void 0) {
44512
45139
  return metric.value;
@@ -44545,7 +45172,7 @@ var init_StatCard = __esm({
44545
45172
  },
44546
45173
  []
44547
45174
  );
44548
- const schemaStats = React84__default.useMemo(() => {
45175
+ const schemaStats = React88__default.useMemo(() => {
44549
45176
  if (!metrics || metrics.length === 0) return null;
44550
45177
  return metrics.map((metric) => ({
44551
45178
  label: metric.label,
@@ -44553,13 +45180,13 @@ var init_StatCard = __esm({
44553
45180
  format: metric.format
44554
45181
  }));
44555
45182
  }, [metrics, data, computeMetricValue]);
44556
- const calculatedTrend = React84__default.useMemo(() => {
45183
+ const calculatedTrend = React88__default.useMemo(() => {
44557
45184
  if (manualTrend !== void 0) return manualTrend;
44558
- if (previousValue === void 0 || currentValue === void 0)
45185
+ if (previousValue === void 0 || currentValue2 === void 0)
44559
45186
  return void 0;
44560
- if (previousValue === 0) return currentValue > 0 ? 100 : 0;
44561
- return (currentValue - previousValue) / previousValue * 100;
44562
- }, [manualTrend, previousValue, currentValue]);
45187
+ if (previousValue === 0) return currentValue2 > 0 ? 100 : 0;
45188
+ return (currentValue2 - previousValue) / previousValue * 100;
45189
+ }, [manualTrend, previousValue, currentValue2]);
44563
45190
  if (schemaStats && schemaStats.length > 1) {
44564
45191
  if (isLoading) {
44565
45192
  return /* @__PURE__ */ jsx(
@@ -45217,7 +45844,7 @@ var init_StatsOrganism = __esm({
45217
45844
  });
45218
45845
  var StepFlowOrganism;
45219
45846
  var init_StepFlowOrganism = __esm({
45220
- "components/core/organisms/StepFlowOrganism.tsx"() {
45847
+ "components/marketing/organisms/StepFlowOrganism.tsx"() {
45221
45848
  "use client";
45222
45849
  init_cn();
45223
45850
  init_Stack();
@@ -45487,7 +46114,7 @@ var init_Timeline = __esm({
45487
46114
  }) => {
45488
46115
  const { t } = useTranslate();
45489
46116
  const entityData = Array.isArray(entity) ? entity : [];
45490
- const items = React84__default.useMemo(() => {
46117
+ const items = React88__default.useMemo(() => {
45491
46118
  if (propItems) return propItems;
45492
46119
  if (entityData.length === 0) return [];
45493
46120
  return entityData.map((record, idx) => {
@@ -45594,7 +46221,7 @@ var init_Timeline = __esm({
45594
46221
  }
45595
46222
  });
45596
46223
  function extractToastProps(children) {
45597
- if (!React84__default.isValidElement(children)) {
46224
+ if (!React88__default.isValidElement(children)) {
45598
46225
  if (typeof children === "string") {
45599
46226
  return { message: children };
45600
46227
  }
@@ -45632,7 +46259,7 @@ var init_ToastSlot = __esm({
45632
46259
  eventBus.emit("UI:CLOSE");
45633
46260
  };
45634
46261
  if (!isVisible) return null;
45635
- const isCustomContent = React84__default.isValidElement(children) && !message;
46262
+ const isCustomContent = React88__default.isValidElement(children) && !message;
45636
46263
  return /* @__PURE__ */ jsx(Box, { className: "fixed bottom-4 right-4 z-50", children: isCustomContent ? children : /* @__PURE__ */ jsx(
45637
46264
  Toast,
45638
46265
  {
@@ -46142,12 +46769,12 @@ var init_WorldMapTemplate = __esm({
46142
46769
  }
46143
46770
  });
46144
46771
  function lazyThree(name, loader) {
46145
- const Lazy = React84__default.lazy(() => loader().then((m) => ({ default: m[name] })));
46772
+ const Lazy = React88__default.lazy(() => loader().then((m) => ({ default: m[name] })));
46146
46773
  function ThreeWrapper(props) {
46147
- return React84__default.createElement(
46148
- React84__default.Suspense,
46774
+ return React88__default.createElement(
46775
+ React88__default.Suspense,
46149
46776
  { fallback: null },
46150
- React84__default.createElement(Lazy, props)
46777
+ React88__default.createElement(Lazy, props)
46151
46778
  );
46152
46779
  }
46153
46780
  ThreeWrapper.displayName = `Lazy(${name})`;
@@ -46167,6 +46794,7 @@ var init_component_registry_generated = __esm({
46167
46794
  init_AnimatedReveal();
46168
46795
  init_ArticleSection();
46169
46796
  init_Aside();
46797
+ init_AssetPicker();
46170
46798
  init_AuthLayout();
46171
46799
  init_BattleBoard();
46172
46800
  init_BattleTemplate();
@@ -46266,11 +46894,13 @@ var init_component_registry_generated = __esm({
46266
46894
  init_GradientDivider();
46267
46895
  init_GraphCanvas();
46268
46896
  init_GraphView();
46897
+ init_GridPicker();
46269
46898
  init_Header();
46270
46899
  init_HealthBar();
46271
46900
  init_HealthPanel();
46272
46901
  init_HeroOrganism();
46273
46902
  init_HeroSection();
46903
+ init_IconPicker();
46274
46904
  init_InfiniteScrollSentinel();
46275
46905
  init_InputGroup();
46276
46906
  init_InstallBox();
@@ -46315,6 +46945,7 @@ var init_component_registry_generated = __esm({
46315
46945
  init_PricingOrganism();
46316
46946
  init_PricingPageTemplate();
46317
46947
  init_ProgressDots();
46948
+ init_PropertyInspector();
46318
46949
  init_PullQuote();
46319
46950
  init_PullToRefresh();
46320
46951
  init_QrScanner();
@@ -46438,6 +47069,7 @@ var init_component_registry_generated = __esm({
46438
47069
  "AnimatedReveal": AnimatedReveal,
46439
47070
  "ArticleSection": ArticleSection,
46440
47071
  "Aside": Aside,
47072
+ "AssetPicker": AssetPicker,
46441
47073
  "AuthLayout": AuthLayout,
46442
47074
  "Avatar": AvatarPattern,
46443
47075
  "AvatarPattern": AvatarPattern,
@@ -46557,6 +47189,7 @@ var init_component_registry_generated = __esm({
46557
47189
  "GraphView": GraphView,
46558
47190
  "Grid": GridPattern,
46559
47191
  "GridPattern": GridPattern,
47192
+ "GridPicker": GridPicker,
46560
47193
  "HStack": HStackPattern,
46561
47194
  "HStackPattern": HStackPattern,
46562
47195
  "Header": Header,
@@ -46566,6 +47199,7 @@ var init_component_registry_generated = __esm({
46566
47199
  "HeroSection": HeroSection,
46567
47200
  "Icon": IconPattern,
46568
47201
  "IconPattern": IconPattern,
47202
+ "IconPicker": IconPicker,
46569
47203
  "InfiniteScrollSentinel": InfiniteScrollSentinel,
46570
47204
  "Input": InputPattern,
46571
47205
  "InputGroup": InputGroup,
@@ -46622,6 +47256,7 @@ var init_component_registry_generated = __esm({
46622
47256
  "ProgressBar": ProgressBarPattern,
46623
47257
  "ProgressBarPattern": ProgressBarPattern,
46624
47258
  "ProgressDots": ProgressDots,
47259
+ "PropertyInspector": PropertyInspector,
46625
47260
  "PullQuote": PullQuote,
46626
47261
  "PullToRefresh": PullToRefresh,
46627
47262
  "QrScanner": QrScanner,
@@ -46763,7 +47398,7 @@ function SuspenseConfigProvider({
46763
47398
  config,
46764
47399
  children
46765
47400
  }) {
46766
- return React84__default.createElement(
47401
+ return React88__default.createElement(
46767
47402
  SuspenseConfigContext.Provider,
46768
47403
  { value: config },
46769
47404
  children
@@ -46838,6 +47473,9 @@ function renderContainedPortal(t, slot, content, onDismiss) {
46838
47473
  const slotId = `slot-${slot}`;
46839
47474
  switch (slot) {
46840
47475
  case "modal":
47476
+ if (SELF_OVERLAY_PATTERNS.has(content.pattern)) {
47477
+ return /* @__PURE__ */ jsx(Box, { id: slotId, className: "contents", children: slotContent });
47478
+ }
46841
47479
  return /* @__PURE__ */ jsx(
46842
47480
  Box,
46843
47481
  {
@@ -47099,8 +47737,8 @@ function CompiledPortal({ slot, className, pattern, sourceTrait, children }) {
47099
47737
  const slotId = `slot-${slot}`;
47100
47738
  let wrapper;
47101
47739
  switch (slot) {
47102
- case "modal":
47103
- wrapper = /* @__PURE__ */ jsx(Modal, { isOpen: true, onClose: handleDismiss, showCloseButton: true, size: "lg", children: /* @__PURE__ */ jsx(
47740
+ case "modal": {
47741
+ const innerContent = /* @__PURE__ */ jsx(
47104
47742
  Box,
47105
47743
  {
47106
47744
  id: slotId,
@@ -47109,8 +47747,10 @@ function CompiledPortal({ slot, className, pattern, sourceTrait, children }) {
47109
47747
  "data-source-trait": sourceTrait,
47110
47748
  children
47111
47749
  }
47112
- ) });
47750
+ );
47751
+ wrapper = pattern !== void 0 && SELF_OVERLAY_PATTERNS.has(pattern) ? innerContent : /* @__PURE__ */ jsx(Modal, { isOpen: true, onClose: handleDismiss, showCloseButton: true, size: "lg", children: innerContent });
47113
47752
  break;
47753
+ }
47114
47754
  case "drawer":
47115
47755
  wrapper = /* @__PURE__ */ jsx(Drawer, { isOpen: true, onClose: handleDismiss, position: "right", children: /* @__PURE__ */ jsx(
47116
47756
  Box,
@@ -47168,7 +47808,7 @@ function SlotPortal({
47168
47808
  let wrapper;
47169
47809
  switch (slot) {
47170
47810
  case "modal":
47171
- wrapper = /* @__PURE__ */ jsx(
47811
+ wrapper = SELF_OVERLAY_PATTERNS.has(content.pattern) ? /* @__PURE__ */ jsx(Box, { id: slotId, children: slotContent }) : /* @__PURE__ */ jsx(
47172
47812
  Modal,
47173
47813
  {
47174
47814
  isOpen: true,
@@ -47248,7 +47888,7 @@ function renderPatternChildren(children, onDismiss, parentId = "root", parentPat
47248
47888
  const key = `${parentId}-${index}-trait:${traitName}`;
47249
47889
  return /* @__PURE__ */ jsx(TraitFrame, { traitName }, key);
47250
47890
  }
47251
- return /* @__PURE__ */ jsx(React84__default.Fragment, { children: child }, `${parentId}-${index}`);
47891
+ return /* @__PURE__ */ jsx(React88__default.Fragment, { children: child }, `${parentId}-${index}`);
47252
47892
  }
47253
47893
  if (!child || typeof child !== "object") return null;
47254
47894
  const childId = `${parentId}-${index}`;
@@ -47288,14 +47928,14 @@ function isPatternConfig(value) {
47288
47928
  if (value === null || value === void 0) return false;
47289
47929
  if (typeof value !== "object") return false;
47290
47930
  if (Array.isArray(value)) return false;
47291
- if (React84__default.isValidElement(value)) return false;
47931
+ if (React88__default.isValidElement(value)) return false;
47292
47932
  if (value instanceof Date) return false;
47293
47933
  if (typeof value === "function") return false;
47294
47934
  const record = value;
47295
47935
  return "type" in record && typeof record.type === "string";
47296
47936
  }
47297
47937
  function isPlainConfigObject(value) {
47298
- if (React84__default.isValidElement(value)) return false;
47938
+ if (React88__default.isValidElement(value)) return false;
47299
47939
  if (value instanceof Date) return false;
47300
47940
  const proto = Object.getPrototypeOf(value);
47301
47941
  return proto === Object.prototype || proto === null;
@@ -47548,7 +48188,7 @@ function UISlotRenderer({
47548
48188
  }
47549
48189
  return wrapped;
47550
48190
  }
47551
- var scopeWrapLog, TRAIT_BINDING_RE, SuspenseConfigContext, SlotContainedContext, SLOT_SKELETON_MAP, FORM_PATTERNS, PATTERNS_WITH_CHILDREN;
48191
+ var scopeWrapLog, TRAIT_BINDING_RE, SuspenseConfigContext, SlotContainedContext, SLOT_SKELETON_MAP, FORM_PATTERNS, SELF_OVERLAY_PATTERNS, PATTERNS_WITH_CHILDREN;
47552
48192
  var init_UISlotRenderer = __esm({
47553
48193
  "components/core/organisms/UISlotRenderer.tsx"() {
47554
48194
  "use client";
@@ -47584,6 +48224,7 @@ var init_UISlotRenderer = __esm({
47584
48224
  "inline-edit-form",
47585
48225
  "wizard-step"
47586
48226
  ]);
48227
+ SELF_OVERLAY_PATTERNS = /* @__PURE__ */ new Set(["modal", "confirm-dialog"]);
47587
48228
  PATTERNS_WITH_CHILDREN = /* @__PURE__ */ new Set([
47588
48229
  "stack",
47589
48230
  "vstack",
@@ -47704,7 +48345,7 @@ function resolveLambdaBindings(body, params, item, index) {
47704
48345
  if (Array.isArray(body)) {
47705
48346
  return body.map((b) => recur(b));
47706
48347
  }
47707
- if (body !== null && typeof body === "object" && !React84__default.isValidElement(body) && !(body instanceof Date) && typeof body !== "function") {
48348
+ if (body !== null && typeof body === "object" && !React88__default.isValidElement(body) && !(body instanceof Date) && typeof body !== "function") {
47708
48349
  const out = {};
47709
48350
  for (const [k, v] of Object.entries(body)) {
47710
48351
  out[k] = recur(v);
@@ -47723,7 +48364,7 @@ function getSlotContentRenderer2() {
47723
48364
  function makeLambdaFn(params, lambdaBody, callerKey) {
47724
48365
  return (item, index) => {
47725
48366
  const resolvedBody = resolveLambdaBindings(lambdaBody, params, item, index);
47726
- if (resolvedBody === null || typeof resolvedBody !== "object" || Array.isArray(resolvedBody) || typeof resolvedBody === "function" || React84__default.isValidElement(resolvedBody) || resolvedBody instanceof Date) {
48367
+ if (resolvedBody === null || typeof resolvedBody !== "object" || Array.isArray(resolvedBody) || typeof resolvedBody === "function" || React88__default.isValidElement(resolvedBody) || resolvedBody instanceof Date) {
47727
48368
  return null;
47728
48369
  }
47729
48370
  const record = resolvedBody;
@@ -47742,7 +48383,7 @@ function makeLambdaFn(params, lambdaBody, callerKey) {
47742
48383
  props: childProps,
47743
48384
  priority: 0
47744
48385
  };
47745
- return React84__default.createElement(SlotContentRenderer2, { content: childContent });
48386
+ return React88__default.createElement(SlotContentRenderer2, { content: childContent });
47746
48387
  };
47747
48388
  }
47748
48389
  function convertNode(node, callerKey) {
@@ -47761,7 +48402,7 @@ function convertNode(node, callerKey) {
47761
48402
  });
47762
48403
  return anyChanged ? mapped : node;
47763
48404
  }
47764
- if (typeof node === "object" && !React84__default.isValidElement(node) && !(node instanceof Date)) {
48405
+ if (typeof node === "object" && !React88__default.isValidElement(node) && !(node instanceof Date)) {
47765
48406
  return convertObjectProps(node);
47766
48407
  }
47767
48408
  return node;