@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
package/dist/avl/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
2
- import * as React93 from 'react';
3
- import React93__default, { createContext, useState, useMemo, useRef, useEffect, useContext, useCallback, Suspense, useLayoutEffect, Profiler, useReducer, useSyncExternalStore, lazy, useId } from 'react';
2
+ import * as React97 from 'react';
3
+ import React97__default, { createContext, useState, useMemo, useRef, useEffect, useContext, useCallback, Suspense, useLayoutEffect, Profiler, useReducer, useSyncExternalStore, lazy, useId } from 'react';
4
4
  import { OrbitalProvider, EventBusContext, useTraitScope, VerificationProvider, TraitScopeProvider } from '@almadar/ui/providers';
5
5
  import { createLogger, isLogLevelEnabled } from '@almadar/logger';
6
6
  import ELK from 'elkjs/lib/elk.bundled.js';
@@ -3509,7 +3509,7 @@ var init_Box = __esm({
3509
3509
  fixed: "fixed",
3510
3510
  sticky: "sticky"
3511
3511
  };
3512
- Box = React93__default.forwardRef(
3512
+ Box = React97__default.forwardRef(
3513
3513
  ({
3514
3514
  padding,
3515
3515
  paddingX,
@@ -3559,7 +3559,7 @@ var init_Box = __esm({
3559
3559
  onMouseLeave?.(e);
3560
3560
  }, [hoverEvent, eventBus, onMouseLeave]);
3561
3561
  const isClickable = action || onClick;
3562
- return React93__default.createElement(
3562
+ return React97__default.createElement(
3563
3563
  Component,
3564
3564
  {
3565
3565
  ref,
@@ -4149,7 +4149,7 @@ var init_MiniStateMachine = __esm({
4149
4149
  const x = 2 + i * (NODE_W + GAP + ARROW_W + GAP);
4150
4150
  const tc = transitionCounts[s.name] ?? 0;
4151
4151
  const role = getStateRole(s.name, s.isInitial, s.isTerminal, tc, maxTC);
4152
- return /* @__PURE__ */ jsxs(React93__default.Fragment, { children: [
4152
+ return /* @__PURE__ */ jsxs(React97__default.Fragment, { children: [
4153
4153
  /* @__PURE__ */ jsx(
4154
4154
  AvlState,
4155
4155
  {
@@ -5212,7 +5212,7 @@ var init_Icon = __esm({
5212
5212
  const directIcon = typeof icon === "string" ? void 0 : icon;
5213
5213
  const effectiveName = typeof icon === "string" ? icon : name;
5214
5214
  const family = useIconFamily();
5215
- const RenderedComponent = React93__default.useMemo(() => {
5215
+ const RenderedComponent = React97__default.useMemo(() => {
5216
5216
  if (directIcon) return null;
5217
5217
  return effectiveName ? resolveIconForFamily(effectiveName, family) : null;
5218
5218
  }, [directIcon, effectiveName, family]);
@@ -5270,7 +5270,7 @@ function resolveIconProp(value, sizeClass) {
5270
5270
  const IconComp = value;
5271
5271
  return /* @__PURE__ */ jsx(IconComp, { className: sizeClass });
5272
5272
  }
5273
- if (React93__default.isValidElement(value)) {
5273
+ if (React97__default.isValidElement(value)) {
5274
5274
  return value;
5275
5275
  }
5276
5276
  if (typeof value === "object" && value !== null && "render" in value) {
@@ -5346,7 +5346,7 @@ var init_Button = __esm({
5346
5346
  md: "h-icon-default w-icon-default",
5347
5347
  lg: "h-icon-default w-icon-default"
5348
5348
  };
5349
- Button = React93__default.forwardRef(
5349
+ Button = React97__default.forwardRef(
5350
5350
  ({
5351
5351
  className,
5352
5352
  variant = "primary",
@@ -5411,7 +5411,7 @@ var Dialog;
5411
5411
  var init_Dialog = __esm({
5412
5412
  "components/core/atoms/Dialog.tsx"() {
5413
5413
  init_cn();
5414
- Dialog = React93__default.forwardRef(
5414
+ Dialog = React97__default.forwardRef(
5415
5415
  ({
5416
5416
  role = "dialog",
5417
5417
  "aria-modal": ariaModal = true,
@@ -5775,7 +5775,7 @@ var init_Drawer = __esm({
5775
5775
  };
5776
5776
  const widthClass = width in sizeWidths ? sizeWidths[width] : "";
5777
5777
  const widthStyle = width in sizeWidths ? void 0 : { width };
5778
- const positionClasses3 = position === "right" ? "right-0 border-l" : "left-0 border-r";
5778
+ const positionClasses = position === "right" ? "right-0 border-l" : "left-0 border-r";
5779
5779
  const animationClasses2 = position === "right" ? "animate-slide-in-right" : "animate-slide-in-left";
5780
5780
  return /* @__PURE__ */ jsxs(Fragment, { children: [
5781
5781
  /* @__PURE__ */ jsx(
@@ -5796,7 +5796,7 @@ var init_Drawer = __esm({
5796
5796
  className: cn(
5797
5797
  "fixed top-0 bottom-0 z-50",
5798
5798
  "flex flex-col max-h-screen",
5799
- positionClasses3,
5799
+ positionClasses,
5800
5800
  widthClass,
5801
5801
  animationClasses2,
5802
5802
  className
@@ -5914,7 +5914,7 @@ var init_Badge = __esm({
5914
5914
  md: "px-2.5 py-1 text-sm",
5915
5915
  lg: "px-3 py-1.5 text-base"
5916
5916
  };
5917
- Badge = React93__default.forwardRef(
5917
+ Badge = React97__default.forwardRef(
5918
5918
  ({ className, variant = "default", size = "sm", amount, label, icon, children, onRemove, removeLabel, ...props }, ref) => {
5919
5919
  const iconSizes3 = {
5920
5920
  sm: "h-icon-default w-icon-default",
@@ -6230,7 +6230,7 @@ var init_SvgFlow = __esm({
6230
6230
  opacity = 1,
6231
6231
  className
6232
6232
  }) => {
6233
- const markerId = React93__default.useMemo(() => {
6233
+ const markerId = React97__default.useMemo(() => {
6234
6234
  flowIdCounter += 1;
6235
6235
  return `almadar-flow-arrow-${flowIdCounter}`;
6236
6236
  }, []);
@@ -6773,7 +6773,7 @@ var init_SvgRing = __esm({
6773
6773
  className,
6774
6774
  label
6775
6775
  }) => {
6776
- const gradientId = React93__default.useMemo(() => {
6776
+ const gradientId = React97__default.useMemo(() => {
6777
6777
  ringIdCounter += 1;
6778
6778
  return `almadar-ring-glow-${ringIdCounter}`;
6779
6779
  }, []);
@@ -6935,7 +6935,7 @@ var init_Input = __esm({
6935
6935
  "components/core/atoms/Input.tsx"() {
6936
6936
  init_cn();
6937
6937
  init_Icon();
6938
- Input = React93__default.forwardRef(
6938
+ Input = React97__default.forwardRef(
6939
6939
  ({
6940
6940
  className,
6941
6941
  inputType,
@@ -7056,7 +7056,7 @@ var Label;
7056
7056
  var init_Label = __esm({
7057
7057
  "components/core/atoms/Label.tsx"() {
7058
7058
  init_cn();
7059
- Label = React93__default.forwardRef(
7059
+ Label = React97__default.forwardRef(
7060
7060
  ({ className, required, children, ...props }, ref) => {
7061
7061
  return /* @__PURE__ */ jsxs(
7062
7062
  "label",
@@ -7082,7 +7082,7 @@ var Textarea;
7082
7082
  var init_Textarea = __esm({
7083
7083
  "components/core/atoms/Textarea.tsx"() {
7084
7084
  init_cn();
7085
- Textarea = React93__default.forwardRef(
7085
+ Textarea = React97__default.forwardRef(
7086
7086
  ({ className, error, ...props }, ref) => {
7087
7087
  return /* @__PURE__ */ jsx(
7088
7088
  "textarea",
@@ -7112,7 +7112,7 @@ var init_Select = __esm({
7112
7112
  "components/core/atoms/Select.tsx"() {
7113
7113
  init_cn();
7114
7114
  init_Icon();
7115
- Select = React93__default.forwardRef(
7115
+ Select = React97__default.forwardRef(
7116
7116
  ({ className, options, placeholder, error, ...props }, ref) => {
7117
7117
  return /* @__PURE__ */ jsxs("div", { className: "relative", children: [
7118
7118
  /* @__PURE__ */ jsxs(
@@ -7154,7 +7154,7 @@ var Checkbox;
7154
7154
  var init_Checkbox = __esm({
7155
7155
  "components/core/atoms/Checkbox.tsx"() {
7156
7156
  init_cn();
7157
- Checkbox = React93__default.forwardRef(
7157
+ Checkbox = React97__default.forwardRef(
7158
7158
  ({ className, label, id, ...props }, ref) => {
7159
7159
  const inputId = id || `checkbox-${Math.random().toString(36).substr(2, 9)}`;
7160
7160
  return /* @__PURE__ */ jsxs("div", { className: "flex items-center", children: [
@@ -7245,7 +7245,7 @@ var init_Card = __esm({
7245
7245
  chip: "shadow-none rounded-pill border-[length:var(--border-width)] border-border",
7246
7246
  "tile-image-first": "p-0 overflow-hidden"
7247
7247
  };
7248
- Card = React93__default.forwardRef(
7248
+ Card = React97__default.forwardRef(
7249
7249
  ({
7250
7250
  className,
7251
7251
  variant = "bordered",
@@ -7283,9 +7283,9 @@ var init_Card = __esm({
7283
7283
  }
7284
7284
  );
7285
7285
  Card.displayName = "Card";
7286
- CardHeader = React93__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("mb-4", className), ...props }));
7286
+ CardHeader = React97__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("mb-4", className), ...props }));
7287
7287
  CardHeader.displayName = "CardHeader";
7288
- CardTitle = React93__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
7288
+ CardTitle = React97__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
7289
7289
  "h3",
7290
7290
  {
7291
7291
  ref,
@@ -7298,11 +7298,11 @@ var init_Card = __esm({
7298
7298
  }
7299
7299
  ));
7300
7300
  CardTitle.displayName = "CardTitle";
7301
- CardContent = React93__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("", className), ...props }));
7301
+ CardContent = React97__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("", className), ...props }));
7302
7302
  CardContent.displayName = "CardContent";
7303
7303
  CardBody = CardContent;
7304
7304
  CardBody.displayName = "CardBody";
7305
- CardFooter = React93__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
7305
+ CardFooter = React97__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
7306
7306
  "div",
7307
7307
  {
7308
7308
  ref,
@@ -7357,7 +7357,7 @@ var init_FilterPill = __esm({
7357
7357
  md: "w-3.5 h-3.5",
7358
7358
  lg: "w-4 h-4"
7359
7359
  };
7360
- FilterPill = React93__default.forwardRef(
7360
+ FilterPill = React97__default.forwardRef(
7361
7361
  ({
7362
7362
  className,
7363
7363
  variant = "default",
@@ -7434,7 +7434,7 @@ var init_Spinner = __esm({
7434
7434
  md: "h-6 w-6",
7435
7435
  lg: "h-8 w-8"
7436
7436
  };
7437
- Spinner = React93__default.forwardRef(
7437
+ Spinner = React97__default.forwardRef(
7438
7438
  ({ className, size = "md", ...props }, ref) => {
7439
7439
  return /* @__PURE__ */ jsx(
7440
7440
  "div",
@@ -7513,11 +7513,15 @@ var init_Avatar = __esm({
7513
7513
  actionPayload
7514
7514
  }) => {
7515
7515
  const eventBus = useEventBus();
7516
+ const [imgFailed, setImgFailed] = React97__default.useState(false);
7517
+ React97__default.useEffect(() => {
7518
+ setImgFailed(false);
7519
+ }, [src]);
7516
7520
  const initials = providedInitials ?? (name ? generateInitials(name) : void 0);
7517
7521
  const IconComponent = typeof iconProp === "string" ? resolveIcon(iconProp) : iconProp;
7518
- const hasImage = !!src;
7519
- const hasInitials = !!initials;
7522
+ const hasImage = !!src && !imgFailed;
7520
7523
  const hasIcon = !!IconComponent;
7524
+ const hasInitials = !!initials && !(hasIcon && !providedInitials);
7521
7525
  const getInitialsBackground = () => "bg-primary text-primary-foreground";
7522
7526
  const isClickable = action || onClick;
7523
7527
  const handleClick = () => {
@@ -7547,9 +7551,8 @@ var init_Avatar = __esm({
7547
7551
  src,
7548
7552
  alt: alt || "Avatar",
7549
7553
  className: "w-full h-full object-cover",
7550
- onError: (e) => {
7551
- const target = e.target;
7552
- target.style.display = "none";
7554
+ onError: () => {
7555
+ setImgFailed(true);
7553
7556
  }
7554
7557
  }
7555
7558
  ) : hasInitials ? /* @__PURE__ */ jsx(
@@ -7896,7 +7899,7 @@ var init_Radio = __esm({
7896
7899
  md: "w-2.5 h-2.5",
7897
7900
  lg: "w-3 h-3"
7898
7901
  };
7899
- Radio = React93__default.forwardRef(
7902
+ Radio = React97__default.forwardRef(
7900
7903
  ({
7901
7904
  label,
7902
7905
  helperText,
@@ -7913,12 +7916,12 @@ var init_Radio = __esm({
7913
7916
  onChange,
7914
7917
  ...props
7915
7918
  }, ref) => {
7916
- const reactId = React93__default.useId();
7919
+ const reactId = React97__default.useId();
7917
7920
  const baseId = id || `radio-${reactId}`;
7918
7921
  const hasError = !!error;
7919
7922
  const eventBus = useEventBus();
7920
- const [selected, setSelected] = React93__default.useState(value);
7921
- React93__default.useEffect(() => {
7923
+ const [selected, setSelected] = React97__default.useState(value);
7924
+ React97__default.useEffect(() => {
7922
7925
  if (value !== void 0) setSelected(value);
7923
7926
  }, [value]);
7924
7927
  const pick = (next, e) => {
@@ -8100,7 +8103,7 @@ var init_Switch = __esm({
8100
8103
  "components/core/atoms/Switch.tsx"() {
8101
8104
  "use client";
8102
8105
  init_cn();
8103
- Switch = React93.forwardRef(
8106
+ Switch = React97.forwardRef(
8104
8107
  ({
8105
8108
  checked,
8106
8109
  defaultChecked = false,
@@ -8111,10 +8114,10 @@ var init_Switch = __esm({
8111
8114
  name,
8112
8115
  className
8113
8116
  }, ref) => {
8114
- const [isChecked, setIsChecked] = React93.useState(
8117
+ const [isChecked, setIsChecked] = React97.useState(
8115
8118
  checked !== void 0 ? checked : defaultChecked
8116
8119
  );
8117
- React93.useEffect(() => {
8120
+ React97.useEffect(() => {
8118
8121
  if (checked !== void 0) {
8119
8122
  setIsChecked(checked);
8120
8123
  }
@@ -8559,7 +8562,7 @@ var Aside;
8559
8562
  var init_Aside = __esm({
8560
8563
  "components/core/atoms/Aside.tsx"() {
8561
8564
  init_cn();
8562
- Aside = React93__default.forwardRef(
8565
+ Aside = React97__default.forwardRef(
8563
8566
  ({ className, children, ...rest }, ref) => /* @__PURE__ */ jsx("aside", { ref, className: cn(className), ...rest, children })
8564
8567
  );
8565
8568
  Aside.displayName = "Aside";
@@ -8637,8 +8640,8 @@ var init_LawReferenceTooltip = __esm({
8637
8640
  className
8638
8641
  }) => {
8639
8642
  const { t } = useTranslate();
8640
- const [isVisible, setIsVisible] = React93__default.useState(false);
8641
- const timeoutRef = React93__default.useRef(null);
8643
+ const [isVisible, setIsVisible] = React97__default.useState(false);
8644
+ const timeoutRef = React97__default.useRef(null);
8642
8645
  const handleMouseEnter = () => {
8643
8646
  if (timeoutRef.current) clearTimeout(timeoutRef.current);
8644
8647
  timeoutRef.current = setTimeout(() => setIsVisible(true), 200);
@@ -8647,7 +8650,7 @@ var init_LawReferenceTooltip = __esm({
8647
8650
  if (timeoutRef.current) clearTimeout(timeoutRef.current);
8648
8651
  setIsVisible(false);
8649
8652
  };
8650
- React93__default.useEffect(() => {
8653
+ React97__default.useEffect(() => {
8651
8654
  return () => {
8652
8655
  if (timeoutRef.current) clearTimeout(timeoutRef.current);
8653
8656
  };
@@ -8857,7 +8860,7 @@ var init_StatusDot = __esm({
8857
8860
  md: "w-2.5 h-2.5",
8858
8861
  lg: "w-3 h-3"
8859
8862
  };
8860
- StatusDot = React93__default.forwardRef(
8863
+ StatusDot = React97__default.forwardRef(
8861
8864
  ({ className, status = "offline", pulse = false, size = "md", label, ...props }, ref) => {
8862
8865
  return /* @__PURE__ */ jsx(
8863
8866
  "span",
@@ -8911,7 +8914,7 @@ var init_TrendIndicator = __esm({
8911
8914
  down: "trending-down",
8912
8915
  flat: "arrow-right"
8913
8916
  };
8914
- TrendIndicator = React93__default.forwardRef(
8917
+ TrendIndicator = React97__default.forwardRef(
8915
8918
  ({
8916
8919
  className,
8917
8920
  value,
@@ -8978,7 +8981,7 @@ var init_RangeSlider = __esm({
8978
8981
  md: "w-4 h-4",
8979
8982
  lg: "w-5 h-5"
8980
8983
  };
8981
- RangeSlider = React93__default.forwardRef(
8984
+ RangeSlider = React97__default.forwardRef(
8982
8985
  ({
8983
8986
  className,
8984
8987
  min = 0,
@@ -9486,7 +9489,7 @@ var init_ContentSection = __esm({
9486
9489
  md: "py-16",
9487
9490
  lg: "py-24"
9488
9491
  };
9489
- ContentSection = React93__default.forwardRef(
9492
+ ContentSection = React97__default.forwardRef(
9490
9493
  ({ children, background = "default", padding = "lg", id, className }, ref) => {
9491
9494
  return /* @__PURE__ */ jsx(
9492
9495
  Box,
@@ -10020,7 +10023,7 @@ var init_AnimatedReveal = __esm({
10020
10023
  "scale-up": { opacity: 1, transform: "scale(1) translateY(0)" },
10021
10024
  "none": {}
10022
10025
  };
10023
- AnimatedReveal = React93__default.forwardRef(
10026
+ AnimatedReveal = React97__default.forwardRef(
10024
10027
  ({
10025
10028
  trigger = "scroll",
10026
10029
  animation = "fade-up",
@@ -10180,7 +10183,7 @@ var init_AnimatedGraphic = __esm({
10180
10183
  "components/marketing/atoms/AnimatedGraphic.tsx"() {
10181
10184
  "use client";
10182
10185
  init_cn();
10183
- AnimatedGraphic = React93__default.forwardRef(
10186
+ AnimatedGraphic = React97__default.forwardRef(
10184
10187
  ({
10185
10188
  src,
10186
10189
  svgContent,
@@ -10203,7 +10206,7 @@ var init_AnimatedGraphic = __esm({
10203
10206
  const fetchedSvg = useFetchedSvg(svgContent ? void 0 : src);
10204
10207
  const resolvedSvg = svgContent ?? fetchedSvg;
10205
10208
  const prevAnimateRef = useRef(animate);
10206
- const setRef = React93__default.useCallback(
10209
+ const setRef = React97__default.useCallback(
10207
10210
  (node) => {
10208
10211
  containerRef.current = node;
10209
10212
  if (typeof ref === "function") ref(node);
@@ -10428,9 +10431,9 @@ function ScoreDisplay({
10428
10431
  ...rest
10429
10432
  }) {
10430
10433
  const resolvedValue = typeof value === "number" && !Number.isNaN(value) ? value : typeof rest.score === "number" && !Number.isNaN(rest.score) ? rest.score : 0;
10431
- const [displayValue, setDisplayValue] = React93.useState(resolvedValue);
10432
- const [isAnimating, setIsAnimating] = React93.useState(false);
10433
- React93.useEffect(() => {
10434
+ const [displayValue, setDisplayValue] = React97.useState(resolvedValue);
10435
+ const [isAnimating, setIsAnimating] = React97.useState(false);
10436
+ React97.useEffect(() => {
10434
10437
  if (!animated || displayValue === resolvedValue) {
10435
10438
  setDisplayValue(resolvedValue);
10436
10439
  return;
@@ -10500,9 +10503,9 @@ function ControlButton({
10500
10503
  className
10501
10504
  }) {
10502
10505
  const eventBus = useEventBus();
10503
- const [isPressed, setIsPressed] = React93.useState(false);
10506
+ const [isPressed, setIsPressed] = React97.useState(false);
10504
10507
  const actualPressed = pressed ?? isPressed;
10505
- const handlePointerDown = React93.useCallback(
10508
+ const handlePointerDown = React97.useCallback(
10506
10509
  (e) => {
10507
10510
  e.preventDefault();
10508
10511
  if (disabled) return;
@@ -10512,7 +10515,7 @@ function ControlButton({
10512
10515
  },
10513
10516
  [disabled, pressEvent, eventBus, onPress]
10514
10517
  );
10515
- const handlePointerUp = React93.useCallback(
10518
+ const handlePointerUp = React97.useCallback(
10516
10519
  (e) => {
10517
10520
  e.preventDefault();
10518
10521
  if (disabled) return;
@@ -10522,7 +10525,7 @@ function ControlButton({
10522
10525
  },
10523
10526
  [disabled, releaseEvent, eventBus, onRelease]
10524
10527
  );
10525
- const handlePointerLeave = React93.useCallback(
10528
+ const handlePointerLeave = React97.useCallback(
10526
10529
  (e) => {
10527
10530
  if (isPressed) {
10528
10531
  setIsPressed(false);
@@ -11011,13 +11014,22 @@ function XPBar({
11011
11014
  }) {
11012
11015
  const sizes = sizeMap9[size];
11013
11016
  const percentage = max > 0 ? Math.max(0, Math.min(100, current / max * 100)) : 0;
11017
+ const [fillWidth, setFillWidth] = React97.useState(animated ? 0 : percentage);
11018
+ React97.useEffect(() => {
11019
+ if (!animated) {
11020
+ setFillWidth(percentage);
11021
+ return;
11022
+ }
11023
+ const frame = requestAnimationFrame(() => setFillWidth(percentage));
11024
+ return () => cancelAnimationFrame(frame);
11025
+ }, [animated, percentage]);
11014
11026
  return /* @__PURE__ */ jsxs("div", { className: cn("flex items-center gap-2", className), children: [
11015
11027
  level != null && /* @__PURE__ */ jsxs(
11016
11028
  "span",
11017
11029
  {
11018
11030
  className: cn(
11019
11031
  "flex-shrink-0 rounded-interactive font-bold",
11020
- "bg-accent text-foreground border border-accent",
11032
+ "bg-accent text-accent-foreground border border-accent",
11021
11033
  sizes.badge
11022
11034
  ),
11023
11035
  children: [
@@ -11042,7 +11054,7 @@ function XPBar({
11042
11054
  "bg-gradient-to-r from-accent to-info",
11043
11055
  animated && "transition-all duration-500 ease-out"
11044
11056
  ),
11045
- style: { width: `${percentage}%` }
11057
+ style: { width: `${fillWidth}%` }
11046
11058
  }
11047
11059
  )
11048
11060
  }
@@ -11059,6 +11071,7 @@ function XPBar({
11059
11071
  var sizeMap9;
11060
11072
  var init_XPBar = __esm({
11061
11073
  "components/game/atoms/XPBar.tsx"() {
11074
+ "use client";
11062
11075
  init_cn();
11063
11076
  sizeMap9 = {
11064
11077
  sm: { bar: "h-2", text: "text-xs", badge: "text-xs px-1.5 py-0.5" },
@@ -11428,9 +11441,9 @@ function MiniMap({
11428
11441
  viewportRect,
11429
11442
  className
11430
11443
  }) {
11431
- const canvasRef = React93.useRef(null);
11432
- const frameRef = React93.useRef(0);
11433
- React93.useEffect(() => {
11444
+ const canvasRef = React97.useRef(null);
11445
+ const frameRef = React97.useRef(0);
11446
+ React97.useEffect(() => {
11434
11447
  const canvas = canvasRef.current;
11435
11448
  if (!canvas) return;
11436
11449
  const ctx = canvas.getContext("2d");
@@ -11604,7 +11617,7 @@ var init_ErrorBoundary = __esm({
11604
11617
  }
11605
11618
  );
11606
11619
  };
11607
- ErrorBoundary = class extends React93__default.Component {
11620
+ ErrorBoundary = class extends React97__default.Component {
11608
11621
  constructor(props) {
11609
11622
  super(props);
11610
11623
  __publicField(this, "reset", () => {
@@ -12604,18 +12617,42 @@ var init_Alert = __esm({
12604
12617
  Alert.displayName = "Alert";
12605
12618
  }
12606
12619
  });
12607
- var positionClasses, arrowClasses, Tooltip;
12620
+ function computeTooltipStyle(position, triggerRect) {
12621
+ switch (position) {
12622
+ case "bottom":
12623
+ return {
12624
+ left: triggerRect.left + triggerRect.width / 2,
12625
+ top: triggerRect.bottom + TRIGGER_GAP,
12626
+ transform: "translateX(-50%)"
12627
+ };
12628
+ case "left":
12629
+ return {
12630
+ left: triggerRect.left - TRIGGER_GAP,
12631
+ top: triggerRect.top + triggerRect.height / 2,
12632
+ transform: "translate(-100%, -50%)"
12633
+ };
12634
+ case "right":
12635
+ return {
12636
+ left: triggerRect.right + TRIGGER_GAP,
12637
+ top: triggerRect.top + triggerRect.height / 2,
12638
+ transform: "translateY(-50%)"
12639
+ };
12640
+ case "top":
12641
+ default:
12642
+ return {
12643
+ left: triggerRect.left + triggerRect.width / 2,
12644
+ top: triggerRect.top - TRIGGER_GAP,
12645
+ transform: "translate(-50%, -100%)"
12646
+ };
12647
+ }
12648
+ }
12649
+ var TRIGGER_GAP, arrowClasses, Tooltip;
12608
12650
  var init_Tooltip = __esm({
12609
12651
  "components/core/molecules/Tooltip.tsx"() {
12610
12652
  "use client";
12611
12653
  init_Typography();
12612
12654
  init_cn();
12613
- positionClasses = {
12614
- top: "bottom-full left-1/2 -translate-x-1/2 mb-2",
12615
- bottom: "top-full left-1/2 -translate-x-1/2 mt-2",
12616
- left: "right-full top-1/2 -translate-y-1/2 mr-2",
12617
- right: "left-full top-1/2 -translate-y-1/2 ml-2"
12618
- };
12655
+ TRIGGER_GAP = 8;
12619
12656
  arrowClasses = {
12620
12657
  top: "top-full left-1/2 -translate-x-1/2 border-t-primary border-l-transparent border-r-transparent border-b-transparent",
12621
12658
  bottom: "bottom-full left-1/2 -translate-x-1/2 border-b-primary border-l-transparent border-r-transparent border-t-transparent",
@@ -12670,8 +12707,8 @@ var init_Tooltip = __esm({
12670
12707
  if (hideTimeoutRef.current) clearTimeout(hideTimeoutRef.current);
12671
12708
  };
12672
12709
  }, []);
12673
- const triggerElement = React93__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
12674
- const trigger = React93__default.cloneElement(triggerElement, {
12710
+ const triggerElement = React97__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
12711
+ const trigger = React97__default.cloneElement(triggerElement, {
12675
12712
  ref: triggerRef,
12676
12713
  onMouseEnter: handleMouseEnter,
12677
12714
  onMouseLeave: handleMouseLeave,
@@ -12689,14 +12726,9 @@ var init_Tooltip = __esm({
12689
12726
  "text-sm pointer-events-none",
12690
12727
  "break-words whitespace-normal",
12691
12728
  "h-auto min-h-fit",
12692
- positionClasses[position],
12693
12729
  className
12694
12730
  ),
12695
- style: {
12696
- left: position === "left" || position === "right" ? triggerRect.left + (position === "left" ? 0 : triggerRect.width) : triggerRect.left + triggerRect.width / 2,
12697
- top: position === "top" || position === "bottom" ? triggerRect.top + (position === "top" ? 0 : triggerRect.height) : triggerRect.top + triggerRect.height / 2,
12698
- transform: position === "top" || position === "bottom" ? "translateX(-50%)" : position === "left" || position === "right" ? "translateY(-50%)" : "none"
12699
- },
12731
+ style: computeTooltipStyle(position, triggerRect),
12700
12732
  role: "tooltip",
12701
12733
  children: [
12702
12734
  /* @__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 }) }),
@@ -12723,8 +12755,9 @@ var init_Tooltip = __esm({
12723
12755
  function computePopoverStyle(position, triggerRect, popoverWidth) {
12724
12756
  if (position === "left" || position === "right") {
12725
12757
  return {
12726
- left: triggerRect.left + (position === "left" ? 0 : triggerRect.width),
12727
- top: triggerRect.top + triggerRect.height / 2
12758
+ left: position === "left" ? triggerRect.left - popoverWidth - TRIGGER_GAP2 : triggerRect.right + TRIGGER_GAP2,
12759
+ top: triggerRect.top + triggerRect.height / 2,
12760
+ transform: "translateY(-50%)"
12728
12761
  };
12729
12762
  }
12730
12763
  const viewportWidth = typeof window !== "undefined" ? window.innerWidth : 1024;
@@ -12736,21 +12769,16 @@ function computePopoverStyle(position, triggerRect, popoverWidth) {
12736
12769
  );
12737
12770
  return {
12738
12771
  left: clamped,
12739
- top: triggerRect.top + (position === "top" ? 0 : triggerRect.height)
12772
+ top: position === "top" ? triggerRect.top - TRIGGER_GAP2 : triggerRect.bottom + TRIGGER_GAP2,
12773
+ transform: position === "top" ? "translateY(-100%)" : void 0
12740
12774
  };
12741
12775
  }
12742
- var positionClasses2, arrowClasses2, VIEWPORT_EDGE_PADDING, Popover;
12776
+ var arrowClasses2, VIEWPORT_EDGE_PADDING, TRIGGER_GAP2, Popover;
12743
12777
  var init_Popover = __esm({
12744
12778
  "components/core/molecules/Popover.tsx"() {
12745
12779
  "use client";
12746
12780
  init_Typography();
12747
12781
  init_cn();
12748
- positionClasses2 = {
12749
- top: "mb-2",
12750
- bottom: "mt-2",
12751
- left: "mr-2 -translate-y-1/2",
12752
- right: "ml-2 -translate-y-1/2"
12753
- };
12754
12782
  arrowClasses2 = {
12755
12783
  top: "top-full left-1/2 -translate-x-1/2 border-t-white border-l-transparent border-r-transparent border-b-transparent",
12756
12784
  bottom: "bottom-full left-1/2 -translate-x-1/2 border-b-white border-l-transparent border-r-transparent border-t-transparent",
@@ -12758,6 +12786,7 @@ var init_Popover = __esm({
12758
12786
  right: "right-full top-1/2 -translate-y-1/2 border-r-white border-t-transparent border-b-transparent border-l-transparent"
12759
12787
  };
12760
12788
  VIEWPORT_EDGE_PADDING = 8;
12789
+ TRIGGER_GAP2 = 8;
12761
12790
  Popover = ({
12762
12791
  content,
12763
12792
  children,
@@ -12826,8 +12855,8 @@ var init_Popover = __esm({
12826
12855
  onMouseEnter: handleOpen,
12827
12856
  onMouseLeave: handleClose
12828
12857
  };
12829
- const childElement = React93__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
12830
- const triggerElement = React93__default.cloneElement(
12858
+ const childElement = React97__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
12859
+ const triggerElement = React97__default.cloneElement(
12831
12860
  childElement,
12832
12861
  {
12833
12862
  ref: triggerRef,
@@ -12841,7 +12870,6 @@ var init_Popover = __esm({
12841
12870
  className: cn(
12842
12871
  "fixed z-50 p-4",
12843
12872
  "bg-card border-2 border-border shadow-elevation-popover",
12844
- positionClasses2[position],
12845
12873
  className
12846
12874
  ),
12847
12875
  style: computePopoverStyle(position, triggerRect, popoverWidth),
@@ -12931,7 +12959,7 @@ var init_Menu = __esm({
12931
12959
  document.addEventListener("mousedown", handleClickOutside);
12932
12960
  return () => document.removeEventListener("mousedown", handleClickOutside);
12933
12961
  }, [isOpen]);
12934
- const positionClasses3 = {
12962
+ const positionClasses = {
12935
12963
  "top-left": "bottom-full left-0 mb-2",
12936
12964
  "top-right": "bottom-full right-0 mb-2",
12937
12965
  "bottom-left": "top-full left-0 mt-2",
@@ -12954,8 +12982,8 @@ var init_Menu = __esm({
12954
12982
  };
12955
12983
  const effectivePosition = direction === "rtl" ? rtlMirror[position] ?? position : position;
12956
12984
  const subMenuSideClass = direction === "rtl" ? "right-full mr-2" : "left-full ml-2";
12957
- const triggerChild = React93__default.isValidElement(trigger) ? trigger : /* @__PURE__ */ jsx(Typography, { variant: "small", as: "span", children: trigger });
12958
- const triggerElement = React93__default.cloneElement(
12985
+ const triggerChild = React97__default.isValidElement(trigger) ? trigger : /* @__PURE__ */ jsx(Typography, { variant: "small", as: "span", children: trigger });
12986
+ const triggerElement = React97__default.cloneElement(
12959
12987
  triggerChild,
12960
12988
  {
12961
12989
  ref: triggerRef,
@@ -13039,7 +13067,7 @@ var init_Menu = __esm({
13039
13067
  className: cn(
13040
13068
  "absolute z-50",
13041
13069
  menuContainerStyles,
13042
- positionClasses3[effectivePosition],
13070
+ positionClasses[effectivePosition],
13043
13071
  className
13044
13072
  ),
13045
13073
  style: {
@@ -13215,7 +13243,7 @@ var init_FloatingActionButton = __esm({
13215
13243
  document.addEventListener("mousedown", handleClickOutside);
13216
13244
  return () => document.removeEventListener("mousedown", handleClickOutside);
13217
13245
  }, [isExpanded, actions]);
13218
- const positionClasses3 = {
13246
+ const positionClasses = {
13219
13247
  "bottom-right": "bottom-6 right-6",
13220
13248
  "bottom-left": "bottom-6 left-6",
13221
13249
  "bottom-center": "bottom-6 left-1/2 -translate-x-1/2",
@@ -13224,7 +13252,7 @@ var init_FloatingActionButton = __esm({
13224
13252
  "top-center": "top-6 left-1/2 -translate-x-1/2"
13225
13253
  };
13226
13254
  if (resolvedAction && (!actions || actions.length === 0)) {
13227
- return /* @__PURE__ */ jsx(Box, { className: cn("fixed z-50", positionClasses3[position], className), children: /* @__PURE__ */ jsx(
13255
+ return /* @__PURE__ */ jsx(Box, { className: cn("fixed z-50", positionClasses[position], className), children: /* @__PURE__ */ jsx(
13228
13256
  Button,
13229
13257
  {
13230
13258
  variant: resolvedAction.variant || "primary",
@@ -13252,7 +13280,7 @@ var init_FloatingActionButton = __esm({
13252
13280
  ref: fabRef,
13253
13281
  className: cn(
13254
13282
  "fixed z-50 flex flex-col items-end gap-3",
13255
- positionClasses3[position],
13283
+ positionClasses[position],
13256
13284
  position.includes("left") && "items-start",
13257
13285
  className
13258
13286
  ),
@@ -13362,13 +13390,13 @@ var init_MapView = __esm({
13362
13390
  shadowSize: [41, 41]
13363
13391
  });
13364
13392
  L.Marker.prototype.options.icon = defaultIcon;
13365
- const { useEffect: useEffect75, useRef: useRef68, useCallback: useCallback120, useState: useState111 } = React93__default;
13393
+ const { useEffect: useEffect76, useRef: useRef69, useCallback: useCallback122, useState: useState113 } = React97__default;
13366
13394
  const { Typography: Typography2 } = await Promise.resolve().then(() => (init_Typography(), Typography_exports));
13367
13395
  const { useEventBus: useEventBus3 } = await Promise.resolve().then(() => (init_useEventBus(), useEventBus_exports));
13368
13396
  function MapUpdater({ centerLat, centerLng, zoom }) {
13369
13397
  const map = useMap();
13370
- const prevRef = useRef68({ centerLat, centerLng, zoom });
13371
- useEffect75(() => {
13398
+ const prevRef = useRef69({ centerLat, centerLng, zoom });
13399
+ useEffect76(() => {
13372
13400
  const prev = prevRef.current;
13373
13401
  if (prev.centerLat !== centerLat || prev.centerLng !== centerLng || prev.zoom !== zoom) {
13374
13402
  map.setView([centerLat, centerLng], zoom);
@@ -13379,7 +13407,7 @@ var init_MapView = __esm({
13379
13407
  }
13380
13408
  function MapClickHandler({ onMapClick }) {
13381
13409
  const map = useMap();
13382
- useEffect75(() => {
13410
+ useEffect76(() => {
13383
13411
  if (!onMapClick) return;
13384
13412
  const handler = (e) => {
13385
13413
  onMapClick(e.latlng.lat, e.latlng.lng);
@@ -13407,8 +13435,8 @@ var init_MapView = __esm({
13407
13435
  showAttribution = true
13408
13436
  }) {
13409
13437
  const eventBus = useEventBus3();
13410
- const [clickedPosition, setClickedPosition] = useState111(null);
13411
- const handleMapClick = useCallback120((lat, lng) => {
13438
+ const [clickedPosition, setClickedPosition] = useState113(null);
13439
+ const handleMapClick = useCallback122((lat, lng) => {
13412
13440
  if (showClickedPin) {
13413
13441
  setClickedPosition({ lat, lng });
13414
13442
  }
@@ -13417,7 +13445,7 @@ var init_MapView = __esm({
13417
13445
  eventBus.emit(`UI:${mapClickEvent}`, { latitude: lat, longitude: lng });
13418
13446
  }
13419
13447
  }, [onMapClick, mapClickEvent, eventBus, showClickedPin]);
13420
- const handleMarkerClick = useCallback120((marker) => {
13448
+ const handleMarkerClick = useCallback122((marker) => {
13421
13449
  onMarkerClick?.(marker);
13422
13450
  if (markerClickEvent) {
13423
13451
  eventBus.emit(`UI:${markerClickEvent}`, { ...marker });
@@ -13426,7 +13454,7 @@ var init_MapView = __esm({
13426
13454
  return /* @__PURE__ */ jsx(
13427
13455
  Box,
13428
13456
  {
13429
- className: cn("relative w-full overflow-hidden rounded-lg", className),
13457
+ className: cn("relative isolate w-full overflow-hidden rounded-lg", className),
13430
13458
  style: { height },
13431
13459
  "data-testid": "map-view",
13432
13460
  children: /* @__PURE__ */ jsxs(
@@ -13608,7 +13636,7 @@ function InputPattern({
13608
13636
  fieldName
13609
13637
  }) {
13610
13638
  const { emit } = useEventBus();
13611
- const [localValue, setLocalValue] = React93__default.useState(value);
13639
+ const [localValue, setLocalValue] = React97__default.useState(value);
13612
13640
  const handleChange = (e) => {
13613
13641
  setLocalValue(e.target.value);
13614
13642
  if (onChange) {
@@ -13646,7 +13674,7 @@ function TextareaPattern({
13646
13674
  fieldName
13647
13675
  }) {
13648
13676
  const { emit } = useEventBus();
13649
- const [localValue, setLocalValue] = React93__default.useState(value);
13677
+ const [localValue, setLocalValue] = React97__default.useState(value);
13650
13678
  const handleChange = (e) => {
13651
13679
  setLocalValue(e.target.value);
13652
13680
  if (onChange) {
@@ -13678,7 +13706,7 @@ function SelectPattern({
13678
13706
  fieldName
13679
13707
  }) {
13680
13708
  const { emit } = useEventBus();
13681
- const [localValue, setLocalValue] = React93__default.useState(value);
13709
+ const [localValue, setLocalValue] = React97__default.useState(value);
13682
13710
  const handleChange = (e) => {
13683
13711
  setLocalValue(e.target.value);
13684
13712
  if (onChange) {
@@ -13707,7 +13735,7 @@ function CheckboxPattern({
13707
13735
  className
13708
13736
  }) {
13709
13737
  const { emit } = useEventBus();
13710
- const [localChecked, setLocalChecked] = React93__default.useState(checked);
13738
+ const [localChecked, setLocalChecked] = React97__default.useState(checked);
13711
13739
  const handleChange = (e) => {
13712
13740
  setLocalChecked(e.target.checked);
13713
13741
  if (onChange) {
@@ -13938,8 +13966,8 @@ function ActionButtons({
13938
13966
  disabled
13939
13967
  }) {
13940
13968
  const eventBus = useEventBus();
13941
- const [activeButtons, setActiveButtons] = React93.useState(/* @__PURE__ */ new Set());
13942
- const handlePress = React93.useCallback(
13969
+ const [activeButtons, setActiveButtons] = React97.useState(/* @__PURE__ */ new Set());
13970
+ const handlePress = React97.useCallback(
13943
13971
  (id) => {
13944
13972
  setActiveButtons((prev) => new Set(prev).add(id));
13945
13973
  if (actionEvent) eventBus.emit(`UI:${actionEvent}`, { id, pressed: true });
@@ -13947,7 +13975,7 @@ function ActionButtons({
13947
13975
  },
13948
13976
  [actionEvent, eventBus, onAction]
13949
13977
  );
13950
- const handleRelease = React93.useCallback(
13978
+ const handleRelease = React97.useCallback(
13951
13979
  (id) => {
13952
13980
  setActiveButtons((prev) => {
13953
13981
  const next = new Set(prev);
@@ -14228,9 +14256,262 @@ var init_AnimatedCounter = __esm({
14228
14256
  AnimatedCounter.displayName = "AnimatedCounter";
14229
14257
  }
14230
14258
  });
14259
+ var ALL_CATEGORY, GridPicker;
14260
+ var init_GridPicker = __esm({
14261
+ "components/core/molecules/GridPicker.tsx"() {
14262
+ "use client";
14263
+ init_cn();
14264
+ init_Input();
14265
+ init_Badge();
14266
+ init_Stack();
14267
+ ALL_CATEGORY = "__all__";
14268
+ GridPicker = ({
14269
+ items,
14270
+ value,
14271
+ onChange,
14272
+ categories,
14273
+ searchPlaceholder,
14274
+ renderThumbnail,
14275
+ cellSize = 32,
14276
+ className
14277
+ }) => {
14278
+ const [search, setSearch] = useState("");
14279
+ const [activeCategory, setActiveCategory] = useState(ALL_CATEGORY);
14280
+ const gridRef = useRef(null);
14281
+ const categoryChips = useMemo(() => {
14282
+ if (categories !== void 0) return categories;
14283
+ const seen = [];
14284
+ for (const item of items) {
14285
+ if (!seen.includes(item.category)) seen.push(item.category);
14286
+ }
14287
+ return seen;
14288
+ }, [categories, items]);
14289
+ const filtered = useMemo(() => {
14290
+ const needle = search.trim().toLowerCase();
14291
+ return items.filter((item) => {
14292
+ const matchesCategory = activeCategory === ALL_CATEGORY || item.category === activeCategory;
14293
+ const matchesSearch = needle === "" || item.label.toLowerCase().includes(needle);
14294
+ return matchesCategory && matchesSearch;
14295
+ });
14296
+ }, [items, search, activeCategory]);
14297
+ const select = useCallback(
14298
+ (item) => {
14299
+ onChange(item.id);
14300
+ },
14301
+ [onChange]
14302
+ );
14303
+ const handleKeyDown = useCallback(
14304
+ (e, index) => {
14305
+ const cells = gridRef.current?.querySelectorAll(
14306
+ "[data-gridpicker-cell]"
14307
+ );
14308
+ if (cells === void 0 || cells.length === 0) return;
14309
+ const columns = (() => {
14310
+ const grid = gridRef.current;
14311
+ if (grid === null) return 1;
14312
+ const style = window.getComputedStyle(grid);
14313
+ const cols = style.gridTemplateColumns.split(" ").filter(Boolean).length;
14314
+ return cols > 0 ? cols : 1;
14315
+ })();
14316
+ let next = -1;
14317
+ if (e.key === "ArrowRight") next = index + 1;
14318
+ else if (e.key === "ArrowLeft") next = index - 1;
14319
+ else if (e.key === "ArrowDown") next = index + columns;
14320
+ else if (e.key === "ArrowUp") next = index - columns;
14321
+ else if (e.key === "Enter" || e.key === " ") {
14322
+ e.preventDefault();
14323
+ select(filtered[index]);
14324
+ return;
14325
+ } else {
14326
+ return;
14327
+ }
14328
+ e.preventDefault();
14329
+ if (next >= 0 && next < cells.length) {
14330
+ cells[next].focus();
14331
+ }
14332
+ },
14333
+ [filtered, select]
14334
+ );
14335
+ return /* @__PURE__ */ jsxs(VStack, { gap: "sm", className: cn("w-full", className), children: [
14336
+ /* @__PURE__ */ jsx(
14337
+ Input,
14338
+ {
14339
+ type: "search",
14340
+ icon: "search",
14341
+ value: search,
14342
+ placeholder: searchPlaceholder,
14343
+ clearable: true,
14344
+ onClear: () => setSearch(""),
14345
+ onChange: (e) => setSearch(e.target.value)
14346
+ }
14347
+ ),
14348
+ categoryChips.length > 0 && /* @__PURE__ */ jsxs(HStack, { gap: "xs", wrap: true, children: [
14349
+ /* @__PURE__ */ jsx(
14350
+ Badge,
14351
+ {
14352
+ variant: activeCategory === ALL_CATEGORY ? "primary" : "neutral",
14353
+ size: "sm",
14354
+ role: "button",
14355
+ tabIndex: 0,
14356
+ "aria-pressed": activeCategory === ALL_CATEGORY,
14357
+ className: "cursor-pointer",
14358
+ onClick: () => setActiveCategory(ALL_CATEGORY),
14359
+ onKeyDown: (e) => {
14360
+ if (e.key === "Enter" || e.key === " ") {
14361
+ e.preventDefault();
14362
+ setActiveCategory(ALL_CATEGORY);
14363
+ }
14364
+ },
14365
+ children: "All"
14366
+ }
14367
+ ),
14368
+ categoryChips.map((category) => /* @__PURE__ */ jsx(
14369
+ Badge,
14370
+ {
14371
+ variant: activeCategory === category ? "primary" : "neutral",
14372
+ size: "sm",
14373
+ role: "button",
14374
+ tabIndex: 0,
14375
+ "aria-pressed": activeCategory === category,
14376
+ className: "cursor-pointer",
14377
+ onClick: () => setActiveCategory(category),
14378
+ onKeyDown: (e) => {
14379
+ if (e.key === "Enter" || e.key === " ") {
14380
+ e.preventDefault();
14381
+ setActiveCategory(category);
14382
+ }
14383
+ },
14384
+ children: category
14385
+ },
14386
+ category
14387
+ ))
14388
+ ] }),
14389
+ /* @__PURE__ */ jsx(
14390
+ "div",
14391
+ {
14392
+ ref: gridRef,
14393
+ role: "listbox",
14394
+ className: "grid gap-1 overflow-y-auto max-h-64 p-1",
14395
+ style: {
14396
+ gridTemplateColumns: `repeat(auto-fill, minmax(${cellSize}px, 1fr))`
14397
+ },
14398
+ children: filtered.map((item, index) => {
14399
+ const selected = item.id === value;
14400
+ return /* @__PURE__ */ jsx(
14401
+ "button",
14402
+ {
14403
+ type: "button",
14404
+ role: "option",
14405
+ "aria-selected": selected,
14406
+ "aria-label": item.label,
14407
+ title: item.label,
14408
+ "data-gridpicker-cell": true,
14409
+ tabIndex: selected || value === void 0 && index === 0 ? 0 : -1,
14410
+ onClick: () => select(item),
14411
+ onKeyDown: (e) => handleKeyDown(e, index),
14412
+ className: cn(
14413
+ "flex items-center justify-center rounded-sm",
14414
+ "transition-colors hover:bg-muted",
14415
+ "focus:outline-none focus:ring-1 focus:ring-ring",
14416
+ selected && "bg-primary/10 ring-1 ring-primary"
14417
+ ),
14418
+ style: { width: cellSize, height: cellSize },
14419
+ children: renderThumbnail(item)
14420
+ },
14421
+ item.id
14422
+ );
14423
+ })
14424
+ }
14425
+ )
14426
+ ] });
14427
+ };
14428
+ GridPicker.displayName = "GridPicker";
14429
+ }
14430
+ });
14431
+ function iconForKind(kind) {
14432
+ if (kind === "audio") return "music";
14433
+ if (kind === "model") return "box";
14434
+ return "file";
14435
+ }
14436
+ var THUMB_PX, IMAGE_KINDS, AssetPicker;
14437
+ var init_AssetPicker = __esm({
14438
+ "components/core/molecules/AssetPicker.tsx"() {
14439
+ "use client";
14440
+ init_GridPicker();
14441
+ init_Icon();
14442
+ THUMB_PX = 32;
14443
+ IMAGE_KINDS = /* @__PURE__ */ new Set([
14444
+ "image",
14445
+ "spritesheet",
14446
+ "scene",
14447
+ "portrait"
14448
+ ]);
14449
+ AssetPicker = ({
14450
+ assets,
14451
+ value,
14452
+ onChange,
14453
+ className
14454
+ }) => {
14455
+ const byUrl = useMemo(() => {
14456
+ const map = /* @__PURE__ */ new Map();
14457
+ for (const entry of assets) map.set(entry.url, entry);
14458
+ return map;
14459
+ }, [assets]);
14460
+ const items = useMemo(
14461
+ () => assets.map((entry) => ({
14462
+ id: entry.url,
14463
+ label: entry.name,
14464
+ category: entry.category
14465
+ })),
14466
+ [assets]
14467
+ );
14468
+ const categories = useMemo(() => {
14469
+ const seen = [];
14470
+ for (const entry of assets) {
14471
+ if (!seen.includes(entry.category)) seen.push(entry.category);
14472
+ }
14473
+ return seen;
14474
+ }, [assets]);
14475
+ const renderThumbnail = useCallback(
14476
+ (item) => {
14477
+ const entry = byUrl.get(item.id);
14478
+ if (entry === void 0) return null;
14479
+ if (IMAGE_KINDS.has(entry.kind)) {
14480
+ return /* @__PURE__ */ jsx(
14481
+ "img",
14482
+ {
14483
+ src: entry.thumbnailUrl ?? entry.url,
14484
+ alt: entry.name,
14485
+ loading: "lazy",
14486
+ width: THUMB_PX,
14487
+ height: THUMB_PX,
14488
+ style: { width: THUMB_PX, height: THUMB_PX, objectFit: "cover" }
14489
+ }
14490
+ );
14491
+ }
14492
+ return /* @__PURE__ */ jsx(Icon, { name: iconForKind(entry.kind), size: "sm" });
14493
+ },
14494
+ [byUrl]
14495
+ );
14496
+ return /* @__PURE__ */ jsx(
14497
+ GridPicker,
14498
+ {
14499
+ items,
14500
+ value,
14501
+ onChange,
14502
+ categories,
14503
+ renderThumbnail,
14504
+ cellSize: THUMB_PX,
14505
+ className
14506
+ }
14507
+ );
14508
+ };
14509
+ AssetPicker.displayName = "AssetPicker";
14510
+ }
14511
+ });
14231
14512
  var AuthLayout;
14232
14513
  var init_AuthLayout = __esm({
14233
- "components/core/templates/AuthLayout.tsx"() {
14514
+ "components/marketing/templates/AuthLayout.tsx"() {
14234
14515
  "use client";
14235
14516
  init_cn();
14236
14517
  init_Box();
@@ -16145,7 +16426,10 @@ function computeFoldRegions(code) {
16145
16426
  }
16146
16427
  return regions.sort((a, b) => a.start - b.start);
16147
16428
  }
16148
- var orbStyleOverrides, orbStyle, loloStyleOverrides, loloStyle, log6, LINE_PROPS_FN, HIDDEN_LINE_NUMBERS, CodeBlock;
16429
+ function toCodeLanguage(value) {
16430
+ return value && CODE_LANGUAGE_SET.has(value) ? value : "text";
16431
+ }
16432
+ var orbStyleOverrides, orbStyle, loloStyleOverrides, loloStyle, log6, CODE_LANGUAGES, CODE_LANGUAGE_SET, LINE_PROPS_FN, HIDDEN_LINE_NUMBERS, CodeBlock;
16149
16433
  var init_CodeBlock = __esm({
16150
16434
  "components/core/molecules/markdown/CodeBlock.tsx"() {
16151
16435
  init_Box();
@@ -16223,9 +16507,40 @@ var init_CodeBlock = __esm({
16223
16507
  };
16224
16508
  loloStyle = { ...dark, ...loloStyleOverrides };
16225
16509
  log6 = createLogger("almadar:ui:markdown-code");
16510
+ CODE_LANGUAGES = [
16511
+ "text",
16512
+ "json",
16513
+ "javascript",
16514
+ "js",
16515
+ "typescript",
16516
+ "ts",
16517
+ "jsx",
16518
+ "tsx",
16519
+ "css",
16520
+ "markdown",
16521
+ "md",
16522
+ "bash",
16523
+ "shell",
16524
+ "sh",
16525
+ "yaml",
16526
+ "yml",
16527
+ "rust",
16528
+ "python",
16529
+ "py",
16530
+ "sql",
16531
+ "diff",
16532
+ "toml",
16533
+ "go",
16534
+ "graphql",
16535
+ "html",
16536
+ "xml",
16537
+ "orb",
16538
+ "lolo"
16539
+ ];
16540
+ CODE_LANGUAGE_SET = new Set(CODE_LANGUAGES);
16226
16541
  LINE_PROPS_FN = (n) => ({ "data-line": String(n - 1) });
16227
16542
  HIDDEN_LINE_NUMBERS = { display: "none" };
16228
- CodeBlock = React93__default.memo(
16543
+ CodeBlock = React97__default.memo(
16229
16544
  ({
16230
16545
  code: rawCode,
16231
16546
  language = "text",
@@ -16662,7 +16977,7 @@ var init_MarkdownContent = __esm({
16662
16977
  init_Box();
16663
16978
  init_CodeBlock();
16664
16979
  init_cn();
16665
- MarkdownContent = React93__default.memo(
16980
+ MarkdownContent = React97__default.memo(
16666
16981
  ({ content, direction, className }) => {
16667
16982
  const { t: _t } = useTranslate();
16668
16983
  const safeContent = typeof content === "string" ? content : String(content ?? "");
@@ -16712,7 +17027,7 @@ var init_MarkdownContent = __esm({
16712
17027
  CodeBlock,
16713
17028
  {
16714
17029
  code,
16715
- language: match[1],
17030
+ language: toCodeLanguage(match[1]),
16716
17031
  maxHeight: "60vh"
16717
17032
  }
16718
17033
  );
@@ -17758,7 +18073,7 @@ var init_StateMachineView = __esm({
17758
18073
  style: { top: title ? 30 : 0 },
17759
18074
  children: [
17760
18075
  entity && /* @__PURE__ */ jsx(EntityBox, { entity, config }),
17761
- states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(React93__default.Fragment, { children: renderStateNode(state, config) }, state.id) : /* @__PURE__ */ jsx(
18076
+ states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(React97__default.Fragment, { children: renderStateNode(state, config) }, state.id) : /* @__PURE__ */ jsx(
17762
18077
  StateNode,
17763
18078
  {
17764
18079
  state,
@@ -18571,7 +18886,7 @@ var init_ContentRenderer = __esm({
18571
18886
  CodeBlock,
18572
18887
  {
18573
18888
  code: segment.content,
18574
- language: segment.language
18889
+ language: toCodeLanguage(segment.language)
18575
18890
  },
18576
18891
  key
18577
18892
  );
@@ -18596,7 +18911,7 @@ var init_ContentRenderer = __esm({
18596
18911
  CodeBlock,
18597
18912
  {
18598
18913
  code: segment.content,
18599
- language: segment.language
18914
+ language: toCodeLanguage(segment.language)
18600
18915
  }
18601
18916
  ),
18602
18917
  /* @__PURE__ */ jsx(ScaledDiagram, { children: /* @__PURE__ */ jsx(
@@ -19363,7 +19678,7 @@ var init_Grid = __esm({
19363
19678
  as: Component = "div"
19364
19679
  }) => {
19365
19680
  const mergedStyle = rows2 ? { gridTemplateRows: `repeat(${rows2}, minmax(0, 1fr))`, ...style } : style;
19366
- return React93__default.createElement(
19681
+ return React97__default.createElement(
19367
19682
  Component,
19368
19683
  {
19369
19684
  className: cn(
@@ -22681,7 +22996,7 @@ var init_Carousel = __esm({
22681
22996
  });
22682
22997
  var CaseStudyOrganism;
22683
22998
  var init_CaseStudyOrganism = __esm({
22684
- "components/core/organisms/CaseStudyOrganism.tsx"() {
22999
+ "components/marketing/organisms/CaseStudyOrganism.tsx"() {
22685
23000
  "use client";
22686
23001
  init_cn();
22687
23002
  init_useEventBus();
@@ -24723,7 +25038,7 @@ function CraftingRecipe({
24723
25038
  className
24724
25039
  }) {
24725
25040
  const eventBus = useEventBus();
24726
- const handleCraft = React93.useCallback(() => {
25041
+ const handleCraft = React97.useCallback(() => {
24727
25042
  onCraft?.();
24728
25043
  if (craftEvent) {
24729
25044
  eventBus.emit(craftEvent, { output: output.label });
@@ -24740,7 +25055,7 @@ function CraftingRecipe({
24740
25055
  children: [
24741
25056
  /* @__PURE__ */ jsx(HStack, { gap: "xs", className: "flex-wrap items-center", children: inputs.map((ingredient, index) => {
24742
25057
  const hasSufficient = ingredient.available >= ingredient.required;
24743
- return /* @__PURE__ */ jsxs(React93.Fragment, { children: [
25058
+ return /* @__PURE__ */ jsxs(React97.Fragment, { children: [
24744
25059
  /* @__PURE__ */ jsx(Box, { className: "relative", children: /* @__PURE__ */ jsx(
24745
25060
  ItemSlot,
24746
25061
  {
@@ -24803,8 +25118,8 @@ function DPad({
24803
25118
  }) {
24804
25119
  const eventBus = useEventBus();
24805
25120
  const sizes = sizeMap15[size];
24806
- const [activeDirections, setActiveDirections] = React93.useState(/* @__PURE__ */ new Set());
24807
- const handlePress = React93.useCallback(
25121
+ const [activeDirections, setActiveDirections] = React97.useState(/* @__PURE__ */ new Set());
25122
+ const handlePress = React97.useCallback(
24808
25123
  (direction) => {
24809
25124
  setActiveDirections((prev) => new Set(prev).add(direction));
24810
25125
  if (directionEvent) eventBus.emit(`UI:${directionEvent}`, { direction, pressed: true });
@@ -24812,7 +25127,7 @@ function DPad({
24812
25127
  },
24813
25128
  [directionEvent, eventBus, onDirection]
24814
25129
  );
24815
- const handleRelease = React93.useCallback(
25130
+ const handleRelease = React97.useCallback(
24816
25131
  (direction) => {
24817
25132
  setActiveDirections((prev) => {
24818
25133
  const next = new Set(prev);
@@ -25498,14 +25813,14 @@ function useDataDnd(args) {
25498
25813
  const isZone = Boolean(dragGroup || accepts || sortable);
25499
25814
  const enabled = isZone || Boolean(dndRoot);
25500
25815
  const eventBus = useEventBus();
25501
- const parentRoot = React93__default.useContext(RootCtx);
25816
+ const parentRoot = React97__default.useContext(RootCtx);
25502
25817
  const isRoot = enabled && parentRoot === null;
25503
- const zoneId = React93__default.useId();
25818
+ const zoneId = React97__default.useId();
25504
25819
  const ownGroup = dragGroup ?? accepts ?? zoneId;
25505
- const [optimisticOrders, setOptimisticOrders] = React93__default.useState(() => /* @__PURE__ */ new Map());
25506
- const optimisticOrdersRef = React93__default.useRef(optimisticOrders);
25820
+ const [optimisticOrders, setOptimisticOrders] = React97__default.useState(() => /* @__PURE__ */ new Map());
25821
+ const optimisticOrdersRef = React97__default.useRef(optimisticOrders);
25507
25822
  optimisticOrdersRef.current = optimisticOrders;
25508
- const clearOptimisticOrder = React93__default.useCallback((group) => {
25823
+ const clearOptimisticOrder = React97__default.useCallback((group) => {
25509
25824
  setOptimisticOrders((prev) => {
25510
25825
  if (!prev.has(group)) return prev;
25511
25826
  const next = new Map(prev);
@@ -25530,7 +25845,7 @@ function useDataDnd(args) {
25530
25845
  const raw = it[dndItemIdField];
25531
25846
  return String(raw ?? `__idx_${idx}`);
25532
25847
  }).join("|");
25533
- const itemIds = React93__default.useMemo(
25848
+ const itemIds = React97__default.useMemo(
25534
25849
  () => orderedItems.map((it, idx) => {
25535
25850
  const raw = it[dndItemIdField];
25536
25851
  return raw ?? `__idx_${idx}`;
@@ -25538,7 +25853,7 @@ function useDataDnd(args) {
25538
25853
  [itemIdsSignature]
25539
25854
  );
25540
25855
  const itemsContentSig = items.map((it, idx) => String(it[dndItemIdField] ?? `__${idx}`)).join("|");
25541
- React93__default.useEffect(() => {
25856
+ React97__default.useEffect(() => {
25542
25857
  const root = isRoot ? null : parentRoot;
25543
25858
  if (root) {
25544
25859
  root.clearOptimisticOrder(ownGroup);
@@ -25546,20 +25861,20 @@ function useDataDnd(args) {
25546
25861
  clearOptimisticOrder(ownGroup);
25547
25862
  }
25548
25863
  }, [itemsContentSig, ownGroup]);
25549
- const zonesRef = React93__default.useRef(/* @__PURE__ */ new Map());
25550
- const registerZone = React93__default.useCallback((zoneId2, meta2) => {
25864
+ const zonesRef = React97__default.useRef(/* @__PURE__ */ new Map());
25865
+ const registerZone = React97__default.useCallback((zoneId2, meta2) => {
25551
25866
  zonesRef.current.set(zoneId2, meta2);
25552
25867
  }, []);
25553
- const unregisterZone = React93__default.useCallback((zoneId2) => {
25868
+ const unregisterZone = React97__default.useCallback((zoneId2) => {
25554
25869
  zonesRef.current.delete(zoneId2);
25555
25870
  }, []);
25556
- const [activeDrag, setActiveDrag] = React93__default.useState(null);
25557
- const [overZoneGroup, setOverZoneGroup] = React93__default.useState(null);
25558
- const meta = React93__default.useMemo(
25871
+ const [activeDrag, setActiveDrag] = React97__default.useState(null);
25872
+ const [overZoneGroup, setOverZoneGroup] = React97__default.useState(null);
25873
+ const meta = React97__default.useMemo(
25559
25874
  () => ({ group: ownGroup, dropEvent, reorderEvent, positionEvent, itemIds, rawItems: items, idField: dndItemIdField }),
25560
25875
  [ownGroup, dropEvent, reorderEvent, positionEvent, itemIds, items, dndItemIdField]
25561
25876
  );
25562
- React93__default.useEffect(() => {
25877
+ React97__default.useEffect(() => {
25563
25878
  const target = isRoot ? null : parentRoot;
25564
25879
  if (!target) {
25565
25880
  zonesRef.current.set(zoneId, meta);
@@ -25578,7 +25893,7 @@ function useDataDnd(args) {
25578
25893
  }, [parentRoot, isRoot, zoneId, meta]);
25579
25894
  const sensors = useAlmadarDndSensors(true);
25580
25895
  const collisionDetection = almadarDndCollisionDetection;
25581
- const findZoneByItem = React93__default.useCallback(
25896
+ const findZoneByItem = React97__default.useCallback(
25582
25897
  (id) => {
25583
25898
  for (const z of zonesRef.current.values()) {
25584
25899
  if (z.itemIds.includes(id)) return z;
@@ -25587,7 +25902,7 @@ function useDataDnd(args) {
25587
25902
  },
25588
25903
  []
25589
25904
  );
25590
- React93__default.useCallback(
25905
+ React97__default.useCallback(
25591
25906
  (group) => {
25592
25907
  for (const z of zonesRef.current.values()) {
25593
25908
  if (z.group === group) return z;
@@ -25596,7 +25911,7 @@ function useDataDnd(args) {
25596
25911
  },
25597
25912
  []
25598
25913
  );
25599
- const handleDragEnd = React93__default.useCallback(
25914
+ const handleDragEnd = React97__default.useCallback(
25600
25915
  (event) => {
25601
25916
  const { active, over } = event;
25602
25917
  const activeIdStr = String(active.id);
@@ -25687,8 +26002,8 @@ function useDataDnd(args) {
25687
26002
  },
25688
26003
  [eventBus]
25689
26004
  );
25690
- const sortableData = React93__default.useMemo(() => ({ dndGroup: ownGroup }), [ownGroup]);
25691
- const SortableItem = React93__default.useCallback(
26005
+ const sortableData = React97__default.useMemo(() => ({ dndGroup: ownGroup }), [ownGroup]);
26006
+ const SortableItem = React97__default.useCallback(
25692
26007
  ({ id, children }) => {
25693
26008
  const {
25694
26009
  attributes,
@@ -25728,7 +26043,7 @@ function useDataDnd(args) {
25728
26043
  id: droppableId,
25729
26044
  data: sortableData
25730
26045
  });
25731
- const ctx = React93__default.useContext(RootCtx);
26046
+ const ctx = React97__default.useContext(RootCtx);
25732
26047
  const activeDrag2 = ctx?.activeDrag ?? null;
25733
26048
  const overZoneGroup2 = ctx?.overZoneGroup ?? null;
25734
26049
  const isThisZoneOver = overZoneGroup2 === ownGroup;
@@ -25743,7 +26058,7 @@ function useDataDnd(args) {
25743
26058
  showForeignPlaceholder,
25744
26059
  ctxAvailable: ctx != null
25745
26060
  });
25746
- React93__default.useEffect(() => {
26061
+ React97__default.useEffect(() => {
25747
26062
  dndLog.info("dropzone:isOver:change", { droppableId, group: ownGroup, isOver, isThisZoneOver, showForeignPlaceholder, activeDragSourceGroup: activeDrag2?.sourceGroup ?? null });
25748
26063
  }, [droppableId, isOver, isThisZoneOver, showForeignPlaceholder]);
25749
26064
  return /* @__PURE__ */ jsx(
@@ -25757,11 +26072,11 @@ function useDataDnd(args) {
25757
26072
  }
25758
26073
  );
25759
26074
  };
25760
- const rootContextValue = React93__default.useMemo(
26075
+ const rootContextValue = React97__default.useMemo(
25761
26076
  () => ({ registerZone, unregisterZone, activeDrag, overZoneGroup, optimisticOrders, clearOptimisticOrder }),
25762
26077
  [registerZone, unregisterZone, activeDrag, overZoneGroup, optimisticOrders, clearOptimisticOrder]
25763
26078
  );
25764
- const handleDragStart = React93__default.useCallback((event) => {
26079
+ const handleDragStart = React97__default.useCallback((event) => {
25765
26080
  const sourceZone = findZoneByItem(event.active.id);
25766
26081
  const rect = event.active.rect.current.initial;
25767
26082
  const height = rect?.height && rect.height > 0 ? rect.height : 64;
@@ -25780,7 +26095,7 @@ function useDataDnd(args) {
25780
26095
  isRoot
25781
26096
  });
25782
26097
  }, [findZoneByItem, isRoot, zoneId]);
25783
- const handleDragOver = React93__default.useCallback((event) => {
26098
+ const handleDragOver = React97__default.useCallback((event) => {
25784
26099
  const { active, over } = event;
25785
26100
  const overData = over?.data?.current;
25786
26101
  const overGroup = overData?.dndGroup ?? null;
@@ -25850,7 +26165,7 @@ function useDataDnd(args) {
25850
26165
  return next;
25851
26166
  });
25852
26167
  }, []);
25853
- const handleDragCancel = React93__default.useCallback((event) => {
26168
+ const handleDragCancel = React97__default.useCallback((event) => {
25854
26169
  setActiveDrag(null);
25855
26170
  setOverZoneGroup(null);
25856
26171
  dndLog.warn("dragCancel", {
@@ -25858,12 +26173,12 @@ function useDataDnd(args) {
25858
26173
  reason: "dnd-kit cancelled the drag (escape key, pointer interrupted, or external)"
25859
26174
  });
25860
26175
  }, []);
25861
- const handleDragEndWithCleanup = React93__default.useCallback((event) => {
26176
+ const handleDragEndWithCleanup = React97__default.useCallback((event) => {
25862
26177
  handleDragEnd(event);
25863
26178
  setActiveDrag(null);
25864
26179
  setOverZoneGroup(null);
25865
26180
  }, [handleDragEnd]);
25866
- const wrapContainer = React93__default.useCallback(
26181
+ const wrapContainer = React97__default.useCallback(
25867
26182
  (children) => {
25868
26183
  if (!enabled) return children;
25869
26184
  const strategy = layout === "grid" ? rectSortingStrategy : verticalListSortingStrategy;
@@ -25917,7 +26232,7 @@ var init_useDataDnd = __esm({
25917
26232
  init_useAlmadarDndCollision();
25918
26233
  init_Box();
25919
26234
  dndLog = createLogger("almadar:ui:dnd");
25920
- RootCtx = React93__default.createContext(null);
26235
+ RootCtx = React97__default.createContext(null);
25921
26236
  }
25922
26237
  });
25923
26238
  function fieldLabel2(key) {
@@ -26437,7 +26752,7 @@ function DataList({
26437
26752
  }) {
26438
26753
  const eventBus = useEventBus();
26439
26754
  const { t } = useTranslate();
26440
- const [visibleCount, setVisibleCount] = React93__default.useState(pageSize || Infinity);
26755
+ const [visibleCount, setVisibleCount] = React97__default.useState(pageSize || Infinity);
26441
26756
  const fieldDefs = fields ?? columns ?? [];
26442
26757
  const allDataRaw = Array.isArray(entity) ? entity : entity ? [entity] : [];
26443
26758
  const dnd = useDataDnd({
@@ -26456,7 +26771,7 @@ function DataList({
26456
26771
  const data = pageSize > 0 ? allData.slice(0, visibleCount) : allData;
26457
26772
  const hasMoreLocal = pageSize > 0 && visibleCount < allData.length;
26458
26773
  const hasRenderProp = typeof children === "function";
26459
- React93__default.useEffect(() => {
26774
+ React97__default.useEffect(() => {
26460
26775
  const renderItemTypeOf = typeof schemaRenderItem;
26461
26776
  const childrenTypeOf = typeof children;
26462
26777
  if (data.length > 0 && !hasRenderProp) {
@@ -26561,7 +26876,7 @@ function DataList({
26561
26876
  const items2 = data.map((item) => item);
26562
26877
  const groups2 = groupBy ? groupData(items2, groupBy) : [{ label: "", items: items2 }];
26563
26878
  const contentField = titleField?.name ?? fieldDefs[0]?.name ?? "";
26564
- return /* @__PURE__ */ jsx(VStack, { gap: "sm", className: cn("py-2", className), children: groups2.map((group, gi) => /* @__PURE__ */ jsxs(React93__default.Fragment, { children: [
26879
+ return /* @__PURE__ */ jsx(VStack, { gap: "sm", className: cn("py-2", className), children: groups2.map((group, gi) => /* @__PURE__ */ jsxs(React97__default.Fragment, { children: [
26565
26880
  group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: "my-2" }),
26566
26881
  group.items.map((itemData, index) => {
26567
26882
  const id = itemData.id || `${gi}-${index}`;
@@ -26709,7 +27024,7 @@ function DataList({
26709
27024
  className
26710
27025
  ),
26711
27026
  children: [
26712
- groups.map((group, gi) => /* @__PURE__ */ jsxs(React93__default.Fragment, { children: [
27027
+ groups.map((group, gi) => /* @__PURE__ */ jsxs(React97__default.Fragment, { children: [
26713
27028
  group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-4" : "mt-0" }),
26714
27029
  group.items.map(
26715
27030
  (itemData, index) => renderItem(itemData, index, gi === groups.length - 1 && index === group.items.length - 1)
@@ -28083,7 +28398,7 @@ var init_WizardProgress = __esm({
28083
28398
  children: /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: normalizedSteps.map((step, index) => {
28084
28399
  const isActive = index === currentStep;
28085
28400
  const isCompleted = index < currentStep;
28086
- return /* @__PURE__ */ jsxs(React93__default.Fragment, { children: [
28401
+ return /* @__PURE__ */ jsxs(React97__default.Fragment, { children: [
28087
28402
  /* @__PURE__ */ jsx(
28088
28403
  "button",
28089
28404
  {
@@ -28600,7 +28915,7 @@ var init_FormSectionHeader = __esm({
28600
28915
  Box,
28601
28916
  {
28602
28917
  className: cn(
28603
- "px-4 py-3 bg-muted rounded-t-lg",
28918
+ "px-4 py-3 bg-muted rounded-t-lg border-b-2 border-border border-l-4 border-l-primary",
28604
28919
  isClickable && "cursor-pointer hover:bg-[var(--color-surface-hover)] transition-colors",
28605
28920
  className
28606
28921
  ),
@@ -28612,7 +28927,7 @@ var init_FormSectionHeader = __esm({
28612
28927
  {
28613
28928
  name: icon,
28614
28929
  size: "md",
28615
- className: "text-muted-foreground"
28930
+ className: "text-primary"
28616
28931
  }
28617
28932
  ),
28618
28933
  statusIcon && /* @__PURE__ */ jsx(
@@ -28623,8 +28938,8 @@ var init_FormSectionHeader = __esm({
28623
28938
  className: hasErrors ? "text-error" : "text-success"
28624
28939
  }
28625
28940
  ),
28626
- /* @__PURE__ */ jsxs(Box, { children: [
28627
- /* @__PURE__ */ jsx(Typography, { variant: "label", weight: "semibold", children: title }),
28941
+ /* @__PURE__ */ jsxs(Box, { className: "space-y-0.5", children: [
28942
+ /* @__PURE__ */ jsx(Typography, { variant: "subheading", weight: "semibold", children: title }),
28628
28943
  subtitle && /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", children: subtitle })
28629
28944
  ] })
28630
28945
  ] }),
@@ -28694,6 +29009,50 @@ var init_FlipCard = __esm({
28694
29009
  FlipCard.displayName = "FlipCard";
28695
29010
  }
28696
29011
  });
29012
+ function pascalToKebab(name) {
29013
+ return name.replace(/([a-z0-9])([A-Z])/g, "$1-$2").replace(/([A-Z])([A-Z][a-z])/g, "$1-$2").toLowerCase();
29014
+ }
29015
+ function kebabToPascal3(name) {
29016
+ return name.split("-").map((part) => /^\d+$/.test(part) ? part : part.charAt(0).toUpperCase() + part.slice(1)).join("");
29017
+ }
29018
+ var ICON_ITEMS, IconPicker;
29019
+ var init_IconPicker = __esm({
29020
+ "components/core/molecules/IconPicker.tsx"() {
29021
+ "use client";
29022
+ init_Icon();
29023
+ init_GridPicker();
29024
+ ICON_ITEMS = (() => {
29025
+ const items = [];
29026
+ for (const [exportName, candidate] of Object.entries(LucideIcons2)) {
29027
+ if (!/^[A-Z]/.test(exportName)) continue;
29028
+ if (exportName.endsWith("Icon")) continue;
29029
+ if (exportName.startsWith("Lucide")) continue;
29030
+ const isComponent = candidate !== null && (typeof candidate === "object" || typeof candidate === "function") && "$$typeof" in candidate;
29031
+ if (!isComponent) continue;
29032
+ const kebab = pascalToKebab(exportName);
29033
+ if (kebabToPascal3(kebab) !== exportName) continue;
29034
+ items.push({ id: kebab, label: kebab, category: "icons" });
29035
+ }
29036
+ return items;
29037
+ })();
29038
+ IconPicker = ({ value, onChange, className }) => {
29039
+ const items = useMemo(() => ICON_ITEMS, []);
29040
+ return /* @__PURE__ */ jsx(
29041
+ GridPicker,
29042
+ {
29043
+ items,
29044
+ value,
29045
+ onChange,
29046
+ searchPlaceholder: "Search icons\u2026",
29047
+ renderThumbnail: (it) => /* @__PURE__ */ jsx(Icon, { name: it.id }),
29048
+ cellSize: 32,
29049
+ className
29050
+ }
29051
+ );
29052
+ };
29053
+ IconPicker.displayName = "IconPicker";
29054
+ }
29055
+ });
28697
29056
  function toISODate(d) {
28698
29057
  return d.toISOString().slice(0, 10);
28699
29058
  }
@@ -29138,7 +29497,7 @@ function InventoryGrid({
29138
29497
  const eventBus = useEventBus();
29139
29498
  const slotCount = totalSlots ?? items.length;
29140
29499
  const emptySlotCount = Math.max(0, slotCount - items.length);
29141
- const handleSelect = React93.useCallback(
29500
+ const handleSelect = React97.useCallback(
29142
29501
  (id) => {
29143
29502
  onSelect?.(id);
29144
29503
  if (selectEvent) {
@@ -29355,31 +29714,31 @@ function GameCanvas2D({
29355
29714
  assetBaseUrl = "",
29356
29715
  className
29357
29716
  }) {
29358
- const canvasRef = React93.useRef(null);
29359
- const rafRef = React93.useRef(0);
29360
- const frameRef = React93.useRef(0);
29361
- const lastTimeRef = React93.useRef(0);
29362
- const imageCache = React93.useRef(/* @__PURE__ */ new Map());
29717
+ const canvasRef = React97.useRef(null);
29718
+ const rafRef = React97.useRef(0);
29719
+ const frameRef = React97.useRef(0);
29720
+ const lastTimeRef = React97.useRef(0);
29721
+ const imageCache = React97.useRef(/* @__PURE__ */ new Map());
29363
29722
  const emit = useEmitEvent();
29364
- const onDrawRef = React93.useRef(onDraw);
29723
+ const onDrawRef = React97.useRef(onDraw);
29365
29724
  onDrawRef.current = onDraw;
29366
- const onTickRef = React93.useRef(onTick);
29725
+ const onTickRef = React97.useRef(onTick);
29367
29726
  onTickRef.current = onTick;
29368
- const tickEventRef = React93.useRef(tickEvent);
29727
+ const tickEventRef = React97.useRef(tickEvent);
29369
29728
  tickEventRef.current = tickEvent;
29370
- const drawEventRef = React93.useRef(drawEvent);
29729
+ const drawEventRef = React97.useRef(drawEvent);
29371
29730
  drawEventRef.current = drawEvent;
29372
- const emitRef = React93.useRef(emit);
29731
+ const emitRef = React97.useRef(emit);
29373
29732
  emitRef.current = emit;
29374
- const assetBaseUrlRef = React93.useRef(assetBaseUrl);
29733
+ const assetBaseUrlRef = React97.useRef(assetBaseUrl);
29375
29734
  assetBaseUrlRef.current = assetBaseUrl;
29376
- const backgroundImageRef = React93.useRef(backgroundImage);
29735
+ const backgroundImageRef = React97.useRef(backgroundImage);
29377
29736
  backgroundImageRef.current = backgroundImage;
29378
- const widthRef = React93.useRef(width);
29737
+ const widthRef = React97.useRef(width);
29379
29738
  widthRef.current = width;
29380
- const heightRef = React93.useRef(height);
29739
+ const heightRef = React97.useRef(height);
29381
29740
  heightRef.current = height;
29382
- const loadImage = React93.useCallback((url) => {
29741
+ const loadImage = React97.useCallback((url) => {
29383
29742
  const fullUrl = url.startsWith("http") ? url : `${assetBaseUrlRef.current}${url}`;
29384
29743
  const cached = imageCache.current.get(fullUrl);
29385
29744
  if (cached?.complete && cached.naturalWidth > 0) return cached;
@@ -29391,7 +29750,7 @@ function GameCanvas2D({
29391
29750
  }
29392
29751
  return null;
29393
29752
  }, []);
29394
- React93.useEffect(() => {
29753
+ React97.useEffect(() => {
29395
29754
  const canvas = canvasRef.current;
29396
29755
  if (!canvas) return;
29397
29756
  const ctx = canvas.getContext("2d");
@@ -29694,7 +30053,7 @@ function TurnPanel({
29694
30053
  className
29695
30054
  }) {
29696
30055
  const eventBus = useEventBus();
29697
- const handleAction = React93.useCallback(
30056
+ const handleAction = React97.useCallback(
29698
30057
  (event) => {
29699
30058
  if (event) {
29700
30059
  eventBus.emit(event, { turn: currentTurn, phase, activeTeam });
@@ -29840,7 +30199,7 @@ function UnitCommandBar({
29840
30199
  className
29841
30200
  }) {
29842
30201
  const eventBus = useEventBus();
29843
- const handleCommand = React93.useCallback(
30202
+ const handleCommand = React97.useCallback(
29844
30203
  (event) => {
29845
30204
  if (event) {
29846
30205
  eventBus.emit(event, { unitId: selectedUnitId });
@@ -30325,7 +30684,7 @@ function GameMenu({
30325
30684
  } catch {
30326
30685
  }
30327
30686
  const eventBus = eventBusProp || eventBusFromHook;
30328
- const handleOptionClick = React93.useCallback(
30687
+ const handleOptionClick = React97.useCallback(
30329
30688
  (option) => {
30330
30689
  if (option.event && eventBus) {
30331
30690
  eventBus.emit(`UI:${option.event}`, { option });
@@ -30439,7 +30798,7 @@ function GameOverScreen({
30439
30798
  } catch {
30440
30799
  }
30441
30800
  const eventBus = eventBusProp || eventBusFromHook;
30442
- const handleActionClick = React93.useCallback(
30801
+ const handleActionClick = React97.useCallback(
30443
30802
  (action) => {
30444
30803
  if (action.event && eventBus) {
30445
30804
  eventBus.emit(`UI:${action.event}`, { action });
@@ -31433,7 +31792,7 @@ var init_StarRating = __esm({
31433
31792
  name: "star",
31434
31793
  className: cn(
31435
31794
  styles.star,
31436
- "text-muted",
31795
+ "text-muted-foreground",
31437
31796
  "transition-colors duration-100"
31438
31797
  ),
31439
31798
  strokeWidth: 1.5
@@ -31916,8 +32275,8 @@ function TableView({
31916
32275
  }) {
31917
32276
  const eventBus = useEventBus();
31918
32277
  const { t } = useTranslate();
31919
- const [visibleCount, setVisibleCount] = React93__default.useState(pageSize > 0 ? pageSize : Infinity);
31920
- const [localSelected, setLocalSelected] = React93__default.useState(/* @__PURE__ */ new Set());
32278
+ const [visibleCount, setVisibleCount] = React97__default.useState(pageSize > 0 ? pageSize : Infinity);
32279
+ const [localSelected, setLocalSelected] = React97__default.useState(/* @__PURE__ */ new Set());
31921
32280
  const colDefs = columns ?? fields ?? [];
31922
32281
  const allDataRaw = Array.isArray(entity) ? entity : entity ? [entity] : [];
31923
32282
  const dnd = useDataDnd({
@@ -32112,12 +32471,12 @@ function TableView({
32112
32471
  ]
32113
32472
  }
32114
32473
  );
32115
- return dnd.isZone ? /* @__PURE__ */ jsx(dnd.SortableItem, { id: row[idField] ?? id, children: rowInner }, id) : /* @__PURE__ */ jsx(React93__default.Fragment, { children: rowInner }, id);
32474
+ return dnd.isZone ? /* @__PURE__ */ jsx(dnd.SortableItem, { id: row[idField] ?? id, children: rowInner }, id) : /* @__PURE__ */ jsx(React97__default.Fragment, { children: rowInner }, id);
32116
32475
  };
32117
32476
  const items = data.map((row) => row);
32118
32477
  const groups = groupBy ? groupData2(items, groupBy) : [{ label: "", items }];
32119
32478
  let runningIndex = 0;
32120
- const body = /* @__PURE__ */ jsx(Box, { role: "rowgroup", children: groups.map((group, gi) => /* @__PURE__ */ jsxs(React93__default.Fragment, { children: [
32479
+ const body = /* @__PURE__ */ jsx(Box, { role: "rowgroup", children: groups.map((group, gi) => /* @__PURE__ */ jsxs(React97__default.Fragment, { children: [
32121
32480
  group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-3" : "mt-0" }),
32122
32481
  group.items.map((row) => renderRow(row, runningIndex++))
32123
32482
  ] }, gi)) });
@@ -33469,7 +33828,7 @@ var init_StepFlow = __esm({
33469
33828
  className
33470
33829
  }) => {
33471
33830
  if (orientation === "vertical") {
33472
- return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(React93__default.Fragment, { children: /* @__PURE__ */ jsxs(HStack, { gap: "md", align: "start", className: "w-full", children: [
33831
+ return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(React97__default.Fragment, { children: /* @__PURE__ */ jsxs(HStack, { gap: "md", align: "start", className: "w-full", children: [
33473
33832
  /* @__PURE__ */ jsxs(VStack, { gap: "none", align: "center", children: [
33474
33833
  /* @__PURE__ */ jsx(StepCircle, { step, index }),
33475
33834
  showConnectors && index < steps.length - 1 && /* @__PURE__ */ jsx(Box, { className: "w-px h-8 bg-border" })
@@ -33480,7 +33839,7 @@ var init_StepFlow = __esm({
33480
33839
  ] })
33481
33840
  ] }) }, index)) });
33482
33841
  }
33483
- 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(React93__default.Fragment, { children: [
33842
+ 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(React97__default.Fragment, { children: [
33484
33843
  /* @__PURE__ */ jsxs(VStack, { gap: "sm", align: "center", className: "flex-1 w-full md:w-auto", children: [
33485
33844
  /* @__PURE__ */ jsx(StepCircle, { step, index }),
33486
33845
  /* @__PURE__ */ jsx(Typography, { variant: "h4", className: "text-center", children: step.title }),
@@ -34456,7 +34815,7 @@ var init_LikertScale = __esm({
34456
34815
  md: "text-base",
34457
34816
  lg: "text-lg"
34458
34817
  };
34459
- LikertScale = React93__default.forwardRef(
34818
+ LikertScale = React97__default.forwardRef(
34460
34819
  ({
34461
34820
  question,
34462
34821
  options = DEFAULT_LIKERT_OPTIONS,
@@ -34468,7 +34827,7 @@ var init_LikertScale = __esm({
34468
34827
  variant = "radios",
34469
34828
  className
34470
34829
  }, ref) => {
34471
- const groupId = React93__default.useId();
34830
+ const groupId = React97__default.useId();
34472
34831
  const eventBus = useEventBus();
34473
34832
  const handleSelect = useCallback(
34474
34833
  (next) => {
@@ -35613,6 +35972,7 @@ function Editable({
35613
35972
  function BlockRow({
35614
35973
  block,
35615
35974
  readOnly,
35975
+ showAffordances,
35616
35976
  placeholder,
35617
35977
  onUpdate,
35618
35978
  onDelete,
@@ -35831,7 +36191,7 @@ function BlockRow({
35831
36191
  onValueChange: (next) => setChildContent(child.id, next)
35832
36192
  }
35833
36193
  ),
35834
- !readOnly && /* @__PURE__ */ jsx(
36194
+ !readOnly && showAffordances && /* @__PURE__ */ jsx(
35835
36195
  Button,
35836
36196
  {
35837
36197
  type: "button",
@@ -35846,7 +36206,7 @@ function BlockRow({
35846
36206
  }
35847
36207
  )
35848
36208
  ] }, child.id)),
35849
- !readOnly && /* @__PURE__ */ jsx(Box, { as: "li", className: "list-none pl-0", children: /* @__PURE__ */ jsxs(
36209
+ !readOnly && showAffordances && /* @__PURE__ */ jsx(Box, { as: "li", className: "list-none pl-0", children: /* @__PURE__ */ jsxs(
35850
36210
  Button,
35851
36211
  {
35852
36212
  type: "button",
@@ -35893,7 +36253,7 @@ function BlockRow({
35893
36253
  "data-block-id": block.id,
35894
36254
  "data-block-type": block.type,
35895
36255
  children: [
35896
- !readOnly && /* @__PURE__ */ jsxs(Box, { className: "flex w-12 shrink-0 items-center gap-0.5 pt-1", children: [
36256
+ !readOnly && showAffordances && /* @__PURE__ */ jsxs(Box, { className: "flex w-12 shrink-0 items-center gap-0.5 pt-1", children: [
35897
36257
  /* @__PURE__ */ jsx(
35898
36258
  Button,
35899
36259
  {
@@ -35992,6 +36352,7 @@ var init_RichBlockEditor = __esm({
35992
36352
  changeEvent,
35993
36353
  readOnly = false,
35994
36354
  placeholder,
36355
+ enableBlocks = false,
35995
36356
  showToolbar = true,
35996
36357
  className
35997
36358
  }) => {
@@ -36063,7 +36424,7 @@ var init_RichBlockEditor = __esm({
36063
36424
  padding: "none",
36064
36425
  className: cn("flex flex-col", className),
36065
36426
  children: [
36066
- showToolbar && !readOnly && /* @__PURE__ */ jsx(
36427
+ enableBlocks && showToolbar && !readOnly && /* @__PURE__ */ jsx(
36067
36428
  Box,
36068
36429
  {
36069
36430
  role: "toolbar",
@@ -36099,6 +36460,7 @@ var init_RichBlockEditor = __esm({
36099
36460
  {
36100
36461
  block,
36101
36462
  readOnly,
36463
+ showAffordances: enableBlocks,
36102
36464
  placeholder,
36103
36465
  onUpdate: (updater) => handleUpdate(block.id, updater),
36104
36466
  onDelete: () => handleDelete(block.id),
@@ -36773,7 +37135,7 @@ var init_DocBreadcrumb = __esm({
36773
37135
  "aria-label": t("aria.breadcrumb"),
36774
37136
  children: /* @__PURE__ */ jsx(HStack, { gap: "xs", align: "center", wrap: true, children: items.map((item, idx) => {
36775
37137
  const isLast = idx === items.length - 1;
36776
- return /* @__PURE__ */ jsxs(React93__default.Fragment, { children: [
37138
+ return /* @__PURE__ */ jsxs(React97__default.Fragment, { children: [
36777
37139
  idx > 0 && /* @__PURE__ */ jsx(
36778
37140
  Icon,
36779
37141
  {
@@ -37384,7 +37746,7 @@ var init_GradientDivider = __esm({
37384
37746
  });
37385
37747
  var MarketingFooter;
37386
37748
  var init_MarketingFooter = __esm({
37387
- "components/core/molecules/MarketingFooter.tsx"() {
37749
+ "components/marketing/molecules/MarketingFooter.tsx"() {
37388
37750
  "use client";
37389
37751
  init_cn();
37390
37752
  init_Box();
@@ -37454,7 +37816,7 @@ var init_MarketingFooter = __esm({
37454
37816
  });
37455
37817
  var PullQuote;
37456
37818
  var init_PullQuote = __esm({
37457
- "components/core/molecules/PullQuote.tsx"() {
37819
+ "components/marketing/molecules/PullQuote.tsx"() {
37458
37820
  "use client";
37459
37821
  init_cn();
37460
37822
  init_Box();
@@ -37532,7 +37894,7 @@ var init_PageHeader = __esm({
37532
37894
  info: "bg-info/10 text-info"
37533
37895
  };
37534
37896
  return /* @__PURE__ */ jsxs(Box, { className: cn("mb-6", className), children: [
37535
- 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(React93__default.Fragment, { children: [
37897
+ 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(React97__default.Fragment, { children: [
37536
37898
  idx > 0 && /* @__PURE__ */ jsx(Typography, { variant: "small", color: "muted", children: "/" }),
37537
37899
  crumb.href ? /* @__PURE__ */ jsx(
37538
37900
  "a",
@@ -37619,6 +37981,271 @@ var init_PageHeader = __esm({
37619
37981
  PageHeader.displayName = "PageHeader";
37620
37982
  }
37621
37983
  });
37984
+ var FormSection, FormLayout, FormActions;
37985
+ var init_FormSection = __esm({
37986
+ "components/core/molecules/FormSection.tsx"() {
37987
+ "use client";
37988
+ init_cn();
37989
+ init_atoms2();
37990
+ init_Box();
37991
+ init_Typography();
37992
+ init_Button();
37993
+ init_Stack();
37994
+ init_Icon();
37995
+ init_useEventBus();
37996
+ FormSection = ({
37997
+ title,
37998
+ description,
37999
+ children,
38000
+ collapsible = false,
38001
+ defaultCollapsed = false,
38002
+ card = false,
38003
+ columns = 1,
38004
+ className
38005
+ }) => {
38006
+ const [collapsed, setCollapsed] = React97__default.useState(defaultCollapsed);
38007
+ const { t } = useTranslate();
38008
+ const eventBus = useEventBus();
38009
+ const gridClass = {
38010
+ 1: "grid-cols-1",
38011
+ 2: "grid-cols-1 md:grid-cols-2",
38012
+ 3: "grid-cols-1 md:grid-cols-2 lg:grid-cols-3"
38013
+ }[columns];
38014
+ React97__default.useCallback(() => {
38015
+ if (collapsible) {
38016
+ setCollapsed((prev) => !prev);
38017
+ eventBus.emit("UI:TOGGLE_COLLAPSE", { collapsed: !collapsed });
38018
+ }
38019
+ }, [collapsible, collapsed, eventBus]);
38020
+ const content = /* @__PURE__ */ jsxs(Fragment, { children: [
38021
+ (title || description) && /* @__PURE__ */ jsxs(VStack, { gap: "xs", className: "mb-4", children: [
38022
+ title && /* @__PURE__ */ jsxs(
38023
+ HStack,
38024
+ {
38025
+ justify: "between",
38026
+ align: "center",
38027
+ className: cn(collapsible && "cursor-pointer"),
38028
+ action: collapsible ? "TOGGLE_COLLAPSE" : void 0,
38029
+ children: [
38030
+ /* @__PURE__ */ jsx(Typography, { variant: "h3", weight: "semibold", children: title }),
38031
+ collapsible && /* @__PURE__ */ jsx(
38032
+ Button,
38033
+ {
38034
+ variant: "ghost",
38035
+ size: "sm",
38036
+ action: "TOGGLE_COLLAPSE",
38037
+ children: /* @__PURE__ */ jsx(
38038
+ Icon,
38039
+ {
38040
+ icon: ChevronDown,
38041
+ size: "sm",
38042
+ className: cn(
38043
+ "text-muted-foreground transition-transform",
38044
+ collapsed && "rotate-180"
38045
+ )
38046
+ }
38047
+ )
38048
+ }
38049
+ )
38050
+ ]
38051
+ }
38052
+ ),
38053
+ description && /* @__PURE__ */ jsx(Typography, { variant: "small", color: "secondary", children: description })
38054
+ ] }),
38055
+ (!collapsible || !collapsed) && /* @__PURE__ */ jsx(Box, { className: cn("grid gap-4", gridClass), children })
38056
+ ] });
38057
+ if (card) {
38058
+ return /* @__PURE__ */ jsx(Card, { className: cn("p-6", className), children: content });
38059
+ }
38060
+ return /* @__PURE__ */ jsx(Box, { className, children: content });
38061
+ };
38062
+ FormSection.displayName = "FormSection";
38063
+ FormLayout = ({
38064
+ children,
38065
+ dividers = true,
38066
+ className
38067
+ }) => {
38068
+ return /* @__PURE__ */ jsx(
38069
+ VStack,
38070
+ {
38071
+ gap: "lg",
38072
+ className: cn(
38073
+ dividers && "[&>*+*]:pt-8 [&>*+*]:border-t [&>*+*]:border-border",
38074
+ className
38075
+ ),
38076
+ children
38077
+ }
38078
+ );
38079
+ };
38080
+ FormLayout.displayName = "FormLayout";
38081
+ FormActions = ({
38082
+ children,
38083
+ sticky = false,
38084
+ align = "right",
38085
+ className
38086
+ }) => {
38087
+ const alignClass2 = {
38088
+ left: "justify-start",
38089
+ right: "justify-end",
38090
+ between: "justify-between",
38091
+ center: "justify-center"
38092
+ }[align];
38093
+ return /* @__PURE__ */ jsx(
38094
+ HStack,
38095
+ {
38096
+ gap: "sm",
38097
+ align: "center",
38098
+ className: cn(
38099
+ "pt-6 border-t border-border",
38100
+ alignClass2,
38101
+ sticky && "sticky bottom-0 bg-card py-4 -mx-6 px-6 shadow-[0_-4px_6px_-1px_rgb(0,0,0,0.05)]",
38102
+ className
38103
+ ),
38104
+ children
38105
+ }
38106
+ );
38107
+ };
38108
+ FormActions.displayName = "FormActions";
38109
+ }
38110
+ });
38111
+ function currentValue(decl, override) {
38112
+ return override !== void 0 ? override : decl.default;
38113
+ }
38114
+ function TextLikeControl({
38115
+ field,
38116
+ numeric,
38117
+ value,
38118
+ onCommit
38119
+ }) {
38120
+ const initial = value === void 0 || value === null ? "" : String(value);
38121
+ const [draft, setDraft] = React97__default.useState(initial);
38122
+ React97__default.useEffect(() => setDraft(initial), [initial]);
38123
+ const commit = () => {
38124
+ if (numeric) {
38125
+ const n = draft.trim() === "" ? 0 : Number(draft);
38126
+ onCommit(field, Number.isNaN(n) ? 0 : n);
38127
+ } else {
38128
+ onCommit(field, draft);
38129
+ }
38130
+ };
38131
+ return /* @__PURE__ */ jsx(
38132
+ Input,
38133
+ {
38134
+ inputType: numeric ? "number" : "text",
38135
+ value: draft,
38136
+ onChange: (e) => setDraft(e.target.value),
38137
+ onBlur: commit,
38138
+ onKeyDown: (e) => {
38139
+ if (e.key === "Enter") commit();
38140
+ }
38141
+ }
38142
+ );
38143
+ }
38144
+ function FieldControl({
38145
+ name,
38146
+ decl,
38147
+ value,
38148
+ onChange,
38149
+ assets
38150
+ }) {
38151
+ let control;
38152
+ const stringValue = typeof value === "string" ? value : void 0;
38153
+ if (decl.type === "icon") {
38154
+ control = /* @__PURE__ */ jsx(IconPicker, { value: stringValue, onChange: (icon) => onChange(name, icon) });
38155
+ } else if (decl.type === "asset") {
38156
+ control = /* @__PURE__ */ jsx(
38157
+ AssetPicker,
38158
+ {
38159
+ assets: assets ?? [],
38160
+ value: stringValue,
38161
+ onChange: (url) => onChange(name, url)
38162
+ }
38163
+ );
38164
+ } else if (decl.type === "boolean") {
38165
+ control = /* @__PURE__ */ jsx(Switch, { checked: value === true, onChange: (c) => onChange(name, c) });
38166
+ } else if (decl.type === "string" && decl.values !== void 0 && decl.values.length > 0) {
38167
+ control = /* @__PURE__ */ jsx(
38168
+ Select,
38169
+ {
38170
+ options: decl.values.map((v) => ({ value: v, label: v })),
38171
+ value: typeof value === "string" ? value : "",
38172
+ onChange: (e) => onChange(name, e.target.value)
38173
+ }
38174
+ );
38175
+ } else if (decl.type === "number") {
38176
+ control = /* @__PURE__ */ jsx(TextLikeControl, { field: name, numeric: true, value, onCommit: onChange });
38177
+ } else if (decl.type === "string") {
38178
+ control = /* @__PURE__ */ jsx(TextLikeControl, { field: name, numeric: false, value, onCommit: onChange });
38179
+ } else {
38180
+ control = /* @__PURE__ */ jsxs(Typography, { variant: "caption", color: "muted", children: [
38181
+ decl.type,
38182
+ " \u2014 edit in source"
38183
+ ] });
38184
+ }
38185
+ return /* @__PURE__ */ jsxs(VStack, { gap: "xs", children: [
38186
+ /* @__PURE__ */ jsx(Typography, { variant: "label", children: decl.label ?? name }),
38187
+ control,
38188
+ decl.description !== void 0 && decl.description !== "" && /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", children: decl.description })
38189
+ ] });
38190
+ }
38191
+ var TIER_ORDER, PropertyInspector;
38192
+ var init_PropertyInspector = __esm({
38193
+ "components/core/molecules/PropertyInspector.tsx"() {
38194
+ "use client";
38195
+ init_cn();
38196
+ init_Stack();
38197
+ init_Typography();
38198
+ init_Button();
38199
+ init_Switch();
38200
+ init_Select();
38201
+ init_Input();
38202
+ init_FormSection();
38203
+ init_IconPicker();
38204
+ init_AssetPicker();
38205
+ TIER_ORDER = ["presentation", "domain", "policy", "infra", "internal"];
38206
+ PropertyInspector = ({
38207
+ config,
38208
+ values,
38209
+ onChange,
38210
+ onReset,
38211
+ title,
38212
+ className,
38213
+ assets
38214
+ }) => {
38215
+ const fields = Object.entries(config);
38216
+ const byTier = /* @__PURE__ */ new Map();
38217
+ for (const [name, decl] of fields) {
38218
+ const tier = decl.tier ?? "presentation";
38219
+ const arr = byTier.get(tier) ?? [];
38220
+ arr.push([name, decl]);
38221
+ byTier.set(tier, arr);
38222
+ }
38223
+ const tiers = [...byTier.keys()].sort((a, b) => {
38224
+ const ia = TIER_ORDER.indexOf(a);
38225
+ const ib = TIER_ORDER.indexOf(b);
38226
+ return (ia === -1 ? 99 : ia) - (ib === -1 ? 99 : ib);
38227
+ });
38228
+ return /* @__PURE__ */ jsxs(VStack, { gap: "sm", className: cn("w-full", className), children: [
38229
+ /* @__PURE__ */ jsxs(HStack, { justify: "between", align: "center", children: [
38230
+ /* @__PURE__ */ jsx(Typography, { variant: "caption", weight: "bold", children: title ?? "Config" }),
38231
+ onReset !== void 0 && /* @__PURE__ */ jsx(Button, { variant: "ghost", size: "sm", icon: "rotate-ccw", label: "Reset", onClick: onReset })
38232
+ ] }),
38233
+ fields.length === 0 && /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", children: "No configurable properties." }),
38234
+ 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(
38235
+ FieldControl,
38236
+ {
38237
+ name,
38238
+ decl,
38239
+ value: currentValue(decl, values?.[name]),
38240
+ onChange,
38241
+ assets
38242
+ },
38243
+ name
38244
+ )) }) }, tier))
38245
+ ] });
38246
+ };
38247
+ }
38248
+ });
37622
38249
  var lookStyles8, Header;
37623
38250
  var init_Header = __esm({
37624
38251
  "components/core/molecules/Header.tsx"() {
@@ -38269,7 +38896,7 @@ var init_WizardContainer = __esm({
38269
38896
  const isCompleted = index < currentStep;
38270
38897
  const stepKey = step.id ?? step.tabId ?? `step-${index}`;
38271
38898
  const stepTitle = step.title ?? step.name ?? `Step ${index + 1}`;
38272
- return /* @__PURE__ */ jsxs(React93__default.Fragment, { children: [
38899
+ return /* @__PURE__ */ jsxs(React97__default.Fragment, { children: [
38273
38900
  /* @__PURE__ */ jsx(
38274
38901
  Button,
38275
38902
  {
@@ -40554,7 +41181,7 @@ var init_DetailPanel = __esm({
40554
41181
  }
40555
41182
  });
40556
41183
  function extractTitle(children) {
40557
- if (!React93__default.isValidElement(children)) return void 0;
41184
+ if (!React97__default.isValidElement(children)) return void 0;
40558
41185
  const props = children.props;
40559
41186
  if (typeof props.title === "string") {
40560
41187
  return props.title;
@@ -40609,7 +41236,7 @@ function LinearView({
40609
41236
  /* @__PURE__ */ jsx(HStack, { className: "flex-wrap items-center", gap: "xs", children: trait.states.map((state, i) => {
40610
41237
  const isDone = i < currentIdx;
40611
41238
  const isCurrent = i === currentIdx;
40612
- return /* @__PURE__ */ jsxs(React93__default.Fragment, { children: [
41239
+ return /* @__PURE__ */ jsxs(React97__default.Fragment, { children: [
40613
41240
  i > 0 && /* @__PURE__ */ jsx(
40614
41241
  Typography,
40615
41242
  {
@@ -41319,7 +41946,7 @@ var init_FeatureDetailPageTemplate = __esm({
41319
41946
  });
41320
41947
  var FeatureGridOrganism;
41321
41948
  var init_FeatureGridOrganism = __esm({
41322
- "components/core/organisms/FeatureGridOrganism.tsx"() {
41949
+ "components/marketing/organisms/FeatureGridOrganism.tsx"() {
41323
41950
  "use client";
41324
41951
  init_cn();
41325
41952
  init_useEventBus();
@@ -41567,12 +42194,12 @@ var init_Form = __esm({
41567
42194
  const isSchemaEntity = isOrbitalEntitySchema(entity);
41568
42195
  const resolvedEntity = isSchemaEntity ? entity : void 0;
41569
42196
  const entityName = typeof entity === "string" ? entity : resolvedEntity?.name;
41570
- const normalizedInitialData = React93__default.useMemo(() => {
42197
+ const normalizedInitialData = React97__default.useMemo(() => {
41571
42198
  const entityRowAsInitial = isPlainEntityRow(entity) ? entity : void 0;
41572
42199
  const callerInitial = initialData !== null && typeof initialData === "object" && !Array.isArray(initialData) ? initialData : {};
41573
42200
  return entityRowAsInitial !== void 0 ? { ...entityRowAsInitial, ...callerInitial } : callerInitial;
41574
42201
  }, [entity, initialData]);
41575
- const entityDerivedFields = React93__default.useMemo(() => {
42202
+ const entityDerivedFields = React97__default.useMemo(() => {
41576
42203
  if (fields && fields.length > 0) return void 0;
41577
42204
  if (!resolvedEntity) return void 0;
41578
42205
  return resolvedEntity.fields.map(
@@ -41592,16 +42219,16 @@ var init_Form = __esm({
41592
42219
  const conditionalFields = typeof conditionalFieldsRaw === "boolean" ? {} : conditionalFieldsRaw;
41593
42220
  const hiddenCalculations = typeof hiddenCalculationsRaw === "boolean" ? [] : hiddenCalculationsRaw;
41594
42221
  const violationTriggers = typeof violationTriggersRaw === "boolean" ? [] : violationTriggersRaw;
41595
- const [formData, setFormData] = React93__default.useState(
42222
+ const [formData, setFormData] = React97__default.useState(
41596
42223
  normalizedInitialData
41597
42224
  );
41598
- const [collapsedSections, setCollapsedSections] = React93__default.useState(
42225
+ const [collapsedSections, setCollapsedSections] = React97__default.useState(
41599
42226
  /* @__PURE__ */ new Set()
41600
42227
  );
41601
- const [submitError, setSubmitError] = React93__default.useState(null);
41602
- const formRef = React93__default.useRef(null);
42228
+ const [submitError, setSubmitError] = React97__default.useState(null);
42229
+ const formRef = React97__default.useRef(null);
41603
42230
  const formMode = props.mode;
41604
- const mountedRef = React93__default.useRef(false);
42231
+ const mountedRef = React97__default.useRef(false);
41605
42232
  if (!mountedRef.current) {
41606
42233
  mountedRef.current = true;
41607
42234
  debug("forms", "mount", {
@@ -41614,7 +42241,7 @@ var init_Form = __esm({
41614
42241
  });
41615
42242
  }
41616
42243
  const shouldShowCancel = showCancel ?? (fields && fields.length > 0);
41617
- const evalContext = React93__default.useMemo(
42244
+ const evalContext = React97__default.useMemo(
41618
42245
  () => ({
41619
42246
  formValues: formData,
41620
42247
  globalVariables: externalContext?.globalVariables ?? {},
@@ -41623,7 +42250,7 @@ var init_Form = __esm({
41623
42250
  }),
41624
42251
  [formData, externalContext]
41625
42252
  );
41626
- React93__default.useEffect(() => {
42253
+ React97__default.useEffect(() => {
41627
42254
  debug("forms", "initialData-sync", {
41628
42255
  mode: formMode,
41629
42256
  normalizedInitialData,
@@ -41634,7 +42261,7 @@ var init_Form = __esm({
41634
42261
  setFormData(normalizedInitialData);
41635
42262
  }
41636
42263
  }, [normalizedInitialData]);
41637
- const processCalculations = React93__default.useCallback(
42264
+ const processCalculations = React97__default.useCallback(
41638
42265
  (changedFieldId, newFormData) => {
41639
42266
  if (!hiddenCalculations.length) return;
41640
42267
  const context = {
@@ -41659,7 +42286,7 @@ var init_Form = __esm({
41659
42286
  },
41660
42287
  [hiddenCalculations, externalContext, eventBus]
41661
42288
  );
41662
- const checkViolations = React93__default.useCallback(
42289
+ const checkViolations = React97__default.useCallback(
41663
42290
  (changedFieldId, newFormData) => {
41664
42291
  if (!violationTriggers.length) return;
41665
42292
  const context = {
@@ -41697,7 +42324,7 @@ var init_Form = __esm({
41697
42324
  processCalculations(name, newFormData);
41698
42325
  checkViolations(name, newFormData);
41699
42326
  };
41700
- const isFieldVisible = React93__default.useCallback(
42327
+ const isFieldVisible = React97__default.useCallback(
41701
42328
  (fieldName) => {
41702
42329
  const condition = conditionalFields[fieldName];
41703
42330
  if (!condition) return true;
@@ -41705,7 +42332,7 @@ var init_Form = __esm({
41705
42332
  },
41706
42333
  [conditionalFields, evalContext]
41707
42334
  );
41708
- const isSectionVisible = React93__default.useCallback(
42335
+ const isSectionVisible = React97__default.useCallback(
41709
42336
  (section) => {
41710
42337
  if (!section.condition) return true;
41711
42338
  return Boolean(evaluateFormExpression(section.condition, evalContext));
@@ -41781,7 +42408,7 @@ var init_Form = __esm({
41781
42408
  eventBus.emit(`UI:${onCancel}`);
41782
42409
  }
41783
42410
  };
41784
- const renderField = React93__default.useCallback(
42411
+ const renderField = React97__default.useCallback(
41785
42412
  (field) => {
41786
42413
  const fieldName = field.name || field.field;
41787
42414
  if (!fieldName) return null;
@@ -41790,19 +42417,19 @@ var init_Form = __esm({
41790
42417
  }
41791
42418
  const inputType = determineInputType(field);
41792
42419
  const label = field.label || fieldName.charAt(0).toUpperCase() + fieldName.slice(1).replace(/([A-Z])/g, " $1");
41793
- const currentValue = formData[fieldName] ?? field.defaultValue ?? "";
42420
+ const currentValue2 = formData[fieldName] ?? field.defaultValue ?? "";
41794
42421
  return /* @__PURE__ */ jsxs(VStack, { gap: "xs", "data-field": fieldName, children: [
41795
42422
  inputType !== "checkbox" && /* @__PURE__ */ jsxs(Typography, { as: "label", variant: "label", weight: "bold", children: [
41796
42423
  label,
41797
42424
  field.required && /* @__PURE__ */ jsx(Typography, { as: "span", color: "error", className: "ml-1", children: "*" })
41798
42425
  ] }),
41799
- renderFieldInput(field, fieldName, inputType, currentValue, label)
42426
+ renderFieldInput(field, fieldName, inputType, currentValue2, label)
41800
42427
  ] }, fieldName);
41801
42428
  },
41802
42429
  [formData, isFieldVisible, relationsData, relationsLoading, isLoading]
41803
42430
  );
41804
42431
  const effectiveFields = entityDerivedFields ?? fields;
41805
- const normalizedFields = React93__default.useMemo(() => {
42432
+ const normalizedFields = React97__default.useMemo(() => {
41806
42433
  if (!effectiveFields || effectiveFields.length === 0) return [];
41807
42434
  return effectiveFields.map((field) => {
41808
42435
  if (typeof field === "string") {
@@ -41825,7 +42452,7 @@ var init_Form = __esm({
41825
42452
  return field;
41826
42453
  });
41827
42454
  }, [effectiveFields, resolvedEntity]);
41828
- const schemaFields = React93__default.useMemo(() => {
42455
+ const schemaFields = React97__default.useMemo(() => {
41829
42456
  if (normalizedFields.length === 0) return null;
41830
42457
  if (isDebugEnabled()) {
41831
42458
  debugGroup(`Form: ${entityName || "unknown"}`);
@@ -41835,7 +42462,7 @@ var init_Form = __esm({
41835
42462
  }
41836
42463
  return normalizedFields.map(renderField).filter(Boolean);
41837
42464
  }, [normalizedFields, renderField, entityName, conditionalFields]);
41838
- const sectionElements = React93__default.useMemo(() => {
42465
+ const sectionElements = React97__default.useMemo(() => {
41839
42466
  if (!sections || sections.length === 0) return null;
41840
42467
  return sections.map((section) => {
41841
42468
  if (!isSectionVisible(section)) {
@@ -41871,7 +42498,7 @@ var init_Form = __esm({
41871
42498
  ] }, section.id);
41872
42499
  }).filter(Boolean);
41873
42500
  }, [sections, isSectionVisible, collapsedSections, renderField, gap]);
41874
- function renderFieldInput(field, fieldName, inputType, currentValue, label) {
42501
+ function renderFieldInput(field, fieldName, inputType, currentValue2, label) {
41875
42502
  const commonProps = {
41876
42503
  id: fieldName,
41877
42504
  name: fieldName,
@@ -41888,7 +42515,7 @@ var init_Form = __esm({
41888
42515
  {
41889
42516
  ...commonProps,
41890
42517
  label: label + (field.required ? " *" : ""),
41891
- checked: Boolean(currentValue),
42518
+ checked: Boolean(currentValue2),
41892
42519
  onChange: (e) => handleChange(fieldName, e.target.checked)
41893
42520
  }
41894
42521
  );
@@ -41897,7 +42524,7 @@ var init_Form = __esm({
41897
42524
  Textarea,
41898
42525
  {
41899
42526
  ...commonProps,
41900
- value: String(currentValue),
42527
+ value: String(currentValue2),
41901
42528
  onChange: (e) => handleChange(fieldName, e.target.value),
41902
42529
  minLength: field.min,
41903
42530
  maxLength: field.max
@@ -41910,7 +42537,7 @@ var init_Form = __esm({
41910
42537
  {
41911
42538
  ...commonProps,
41912
42539
  options,
41913
- value: String(currentValue),
42540
+ value: String(currentValue2),
41914
42541
  onChange: (e) => handleChange(fieldName, e.target.value),
41915
42542
  placeholder: field.placeholder || `Select ${label}...`
41916
42543
  }
@@ -41923,7 +42550,7 @@ var init_Form = __esm({
41923
42550
  RelationSelect,
41924
42551
  {
41925
42552
  ...commonProps,
41926
- value: currentValue ? String(currentValue) : void 0,
42553
+ value: currentValue2 ? String(currentValue2) : void 0,
41927
42554
  onChange: (value) => handleChange(fieldName, value),
41928
42555
  options: relationOptions,
41929
42556
  isLoading: relationLoading,
@@ -41939,7 +42566,7 @@ var init_Form = __esm({
41939
42566
  {
41940
42567
  ...commonProps,
41941
42568
  type: "number",
41942
- value: currentValue !== void 0 && currentValue !== "" ? String(currentValue) : "",
42569
+ value: currentValue2 !== void 0 && currentValue2 !== "" ? String(currentValue2) : "",
41943
42570
  onChange: (e) => handleChange(
41944
42571
  fieldName,
41945
42572
  e.target.value ? Number(e.target.value) : void 0
@@ -41954,7 +42581,7 @@ var init_Form = __esm({
41954
42581
  {
41955
42582
  ...commonProps,
41956
42583
  type: "date",
41957
- value: formatDateValue(currentValue),
42584
+ value: formatDateValue(currentValue2),
41958
42585
  onChange: (e) => handleChange(fieldName, e.target.value)
41959
42586
  }
41960
42587
  );
@@ -41964,7 +42591,7 @@ var init_Form = __esm({
41964
42591
  {
41965
42592
  ...commonProps,
41966
42593
  type: "datetime-local",
41967
- value: formatDateTimeValue(currentValue),
42594
+ value: formatDateTimeValue(currentValue2),
41968
42595
  onChange: (e) => handleChange(fieldName, e.target.value)
41969
42596
  }
41970
42597
  );
@@ -41974,7 +42601,7 @@ var init_Form = __esm({
41974
42601
  {
41975
42602
  ...commonProps,
41976
42603
  type: "email",
41977
- value: String(currentValue),
42604
+ value: String(currentValue2),
41978
42605
  onChange: (e) => handleChange(fieldName, e.target.value),
41979
42606
  minLength: field.min,
41980
42607
  maxLength: field.max
@@ -41986,7 +42613,7 @@ var init_Form = __esm({
41986
42613
  {
41987
42614
  ...commonProps,
41988
42615
  type: "url",
41989
- value: String(currentValue),
42616
+ value: String(currentValue2),
41990
42617
  onChange: (e) => handleChange(fieldName, e.target.value),
41991
42618
  minLength: field.min,
41992
42619
  maxLength: field.max
@@ -41998,7 +42625,7 @@ var init_Form = __esm({
41998
42625
  {
41999
42626
  ...commonProps,
42000
42627
  type: "password",
42001
- value: String(currentValue),
42628
+ value: String(currentValue2),
42002
42629
  onChange: (e) => handleChange(fieldName, e.target.value),
42003
42630
  minLength: field.min,
42004
42631
  maxLength: field.max
@@ -42011,7 +42638,7 @@ var init_Form = __esm({
42011
42638
  {
42012
42639
  ...commonProps,
42013
42640
  type: "text",
42014
- value: String(currentValue),
42641
+ value: String(currentValue2),
42015
42642
  onChange: (e) => handleChange(fieldName, e.target.value),
42016
42643
  minLength: field.min,
42017
42644
  maxLength: field.max
@@ -42666,7 +43293,7 @@ var init_GenericAppTemplate = __esm({
42666
43293
  });
42667
43294
  var HeroOrganism, _HeroClickInterceptor;
42668
43295
  var init_HeroOrganism = __esm({
42669
- "components/core/organisms/HeroOrganism.tsx"() {
43296
+ "components/marketing/organisms/HeroOrganism.tsx"() {
42670
43297
  "use client";
42671
43298
  init_cn();
42672
43299
  init_useEventBus();
@@ -43110,7 +43737,7 @@ var init_List = __esm({
43110
43737
  if (entity && typeof entity === "object" && "id" in entity) return [entity];
43111
43738
  return [];
43112
43739
  }, [entity]);
43113
- const getItemActions = React93__default.useCallback(
43740
+ const getItemActions = React97__default.useCallback(
43114
43741
  (item) => {
43115
43742
  if (!itemActions) return [];
43116
43743
  if (typeof itemActions === "function") {
@@ -43586,7 +44213,7 @@ var init_MediaGallery = __esm({
43586
44213
  [selectable, selectedItems, selectionEvent, eventBus]
43587
44214
  );
43588
44215
  const entityData = Array.isArray(entity) ? entity : [];
43589
- const items = React93__default.useMemo(() => {
44216
+ const items = React97__default.useMemo(() => {
43590
44217
  if (propItems) return propItems;
43591
44218
  if (entityData.length === 0) return [];
43592
44219
  return entityData.map((record, idx) => ({
@@ -43747,7 +44374,7 @@ var init_MediaGallery = __esm({
43747
44374
  }
43748
44375
  });
43749
44376
  function extractTitle2(children) {
43750
- if (!React93__default.isValidElement(children)) return void 0;
44377
+ if (!React97__default.isValidElement(children)) return void 0;
43751
44378
  const props = children.props;
43752
44379
  if (typeof props.title === "string") {
43753
44380
  return props.title;
@@ -44178,7 +44805,7 @@ var init_debugRegistry = __esm({
44178
44805
  }
44179
44806
  });
44180
44807
  function useDebugData() {
44181
- const [data, setData] = React93.useState(() => ({
44808
+ const [data, setData] = React97.useState(() => ({
44182
44809
  traits: [],
44183
44810
  ticks: [],
44184
44811
  guards: [],
@@ -44192,7 +44819,7 @@ function useDebugData() {
44192
44819
  },
44193
44820
  lastUpdate: Date.now()
44194
44821
  }));
44195
- React93.useEffect(() => {
44822
+ React97.useEffect(() => {
44196
44823
  const updateData = () => {
44197
44824
  setData({
44198
44825
  traits: getAllTraits(),
@@ -44301,12 +44928,12 @@ function layoutGraph(states, transitions, initialState, width, height) {
44301
44928
  return positions;
44302
44929
  }
44303
44930
  function WalkMinimap() {
44304
- const [walkStep, setWalkStep] = React93.useState(null);
44305
- const [traits2, setTraits] = React93.useState([]);
44306
- const [coveredEdges, setCoveredEdges] = React93.useState([]);
44307
- const [completedTraits, setCompletedTraits] = React93.useState(/* @__PURE__ */ new Set());
44308
- const prevTraitRef = React93.useRef(null);
44309
- React93.useEffect(() => {
44931
+ const [walkStep, setWalkStep] = React97.useState(null);
44932
+ const [traits2, setTraits] = React97.useState([]);
44933
+ const [coveredEdges, setCoveredEdges] = React97.useState([]);
44934
+ const [completedTraits, setCompletedTraits] = React97.useState(/* @__PURE__ */ new Set());
44935
+ const prevTraitRef = React97.useRef(null);
44936
+ React97.useEffect(() => {
44310
44937
  const interval = setInterval(() => {
44311
44938
  const w = window;
44312
44939
  const step = w.__orbitalWalkStep;
@@ -44742,15 +45369,15 @@ var init_EntitiesTab = __esm({
44742
45369
  });
44743
45370
  function EventFlowTab({ events: events2 }) {
44744
45371
  const { t } = useTranslate();
44745
- const [filter, setFilter] = React93.useState("all");
44746
- const containerRef = React93.useRef(null);
44747
- const [autoScroll, setAutoScroll] = React93.useState(true);
44748
- React93.useEffect(() => {
45372
+ const [filter, setFilter] = React97.useState("all");
45373
+ const containerRef = React97.useRef(null);
45374
+ const [autoScroll, setAutoScroll] = React97.useState(true);
45375
+ React97.useEffect(() => {
44749
45376
  if (autoScroll && containerRef.current) {
44750
45377
  containerRef.current.scrollTop = containerRef.current.scrollHeight;
44751
45378
  }
44752
45379
  }, [events2.length, autoScroll]);
44753
- const filteredEvents = React93.useMemo(() => {
45380
+ const filteredEvents = React97.useMemo(() => {
44754
45381
  if (filter === "all") return events2;
44755
45382
  return events2.filter((e) => e.type === filter);
44756
45383
  }, [events2, filter]);
@@ -44866,7 +45493,7 @@ var init_EventFlowTab = __esm({
44866
45493
  });
44867
45494
  function GuardsPanel({ guards }) {
44868
45495
  const { t } = useTranslate();
44869
- const [filter, setFilter] = React93.useState("all");
45496
+ const [filter, setFilter] = React97.useState("all");
44870
45497
  if (guards.length === 0) {
44871
45498
  return /* @__PURE__ */ jsx(
44872
45499
  EmptyState,
@@ -44879,7 +45506,7 @@ function GuardsPanel({ guards }) {
44879
45506
  }
44880
45507
  const passedCount = guards.filter((g) => g.result).length;
44881
45508
  const failedCount = guards.length - passedCount;
44882
- const filteredGuards = React93.useMemo(() => {
45509
+ const filteredGuards = React97.useMemo(() => {
44883
45510
  if (filter === "all") return guards;
44884
45511
  if (filter === "passed") return guards.filter((g) => g.result);
44885
45512
  return guards.filter((g) => !g.result);
@@ -45042,10 +45669,10 @@ function EffectBadge({ effect }) {
45042
45669
  }
45043
45670
  function TransitionTimeline({ transitions }) {
45044
45671
  const { t } = useTranslate();
45045
- const containerRef = React93.useRef(null);
45046
- const [autoScroll, setAutoScroll] = React93.useState(true);
45047
- const [expandedId, setExpandedId] = React93.useState(null);
45048
- React93.useEffect(() => {
45672
+ const containerRef = React97.useRef(null);
45673
+ const [autoScroll, setAutoScroll] = React97.useState(true);
45674
+ const [expandedId, setExpandedId] = React97.useState(null);
45675
+ React97.useEffect(() => {
45049
45676
  if (autoScroll && containerRef.current) {
45050
45677
  containerRef.current.scrollTop = containerRef.current.scrollHeight;
45051
45678
  }
@@ -45325,9 +45952,9 @@ function getAllEvents(traits2) {
45325
45952
  function EventDispatcherTab({ traits: traits2, schema }) {
45326
45953
  const eventBus = useEventBus();
45327
45954
  const { t } = useTranslate();
45328
- const [log13, setLog] = React93.useState([]);
45329
- const prevStatesRef = React93.useRef(/* @__PURE__ */ new Map());
45330
- React93.useEffect(() => {
45955
+ const [log13, setLog] = React97.useState([]);
45956
+ const prevStatesRef = React97.useRef(/* @__PURE__ */ new Map());
45957
+ React97.useEffect(() => {
45331
45958
  for (const trait of traits2) {
45332
45959
  const prev = prevStatesRef.current.get(trait.id);
45333
45960
  if (prev && prev !== trait.currentState) {
@@ -45496,10 +46123,10 @@ function VerifyModePanel({
45496
46123
  localCount
45497
46124
  }) {
45498
46125
  const { t } = useTranslate();
45499
- const [expanded, setExpanded] = React93.useState(true);
45500
- const scrollRef = React93.useRef(null);
45501
- const prevCountRef = React93.useRef(0);
45502
- React93.useEffect(() => {
46126
+ const [expanded, setExpanded] = React97.useState(true);
46127
+ const scrollRef = React97.useRef(null);
46128
+ const prevCountRef = React97.useRef(0);
46129
+ React97.useEffect(() => {
45503
46130
  if (expanded && transitions.length > prevCountRef.current && scrollRef.current) {
45504
46131
  scrollRef.current.scrollTop = scrollRef.current.scrollHeight;
45505
46132
  }
@@ -45556,10 +46183,10 @@ function RuntimeDebugger({
45556
46183
  schema
45557
46184
  }) {
45558
46185
  const { t } = useTranslate();
45559
- const [isCollapsed, setIsCollapsed] = React93.useState(mode === "verify" ? true : defaultCollapsed);
45560
- const [isVisible, setIsVisible] = React93.useState(mode === "inline" || mode === "verify" || isDebugEnabled2());
46186
+ const [isCollapsed, setIsCollapsed] = React97.useState(mode === "verify" ? true : defaultCollapsed);
46187
+ const [isVisible, setIsVisible] = React97.useState(mode === "inline" || mode === "verify" || isDebugEnabled2());
45561
46188
  const debugData = useDebugData();
45562
- React93.useEffect(() => {
46189
+ React97.useEffect(() => {
45563
46190
  if (mode === "inline") return;
45564
46191
  return onDebugToggle((enabled) => {
45565
46192
  setIsVisible(enabled);
@@ -45568,7 +46195,7 @@ function RuntimeDebugger({
45568
46195
  }
45569
46196
  });
45570
46197
  }, [mode]);
45571
- React93.useEffect(() => {
46198
+ React97.useEffect(() => {
45572
46199
  if (mode === "inline") return;
45573
46200
  const handleKeyDown = (e) => {
45574
46201
  if (e.key === "`" && isVisible) {
@@ -45583,7 +46210,7 @@ function RuntimeDebugger({
45583
46210
  if (!isVisible) {
45584
46211
  return null;
45585
46212
  }
45586
- const positionClasses3 = {
46213
+ const positionClasses = {
45587
46214
  "bottom-right": "bottom-4 right-4",
45588
46215
  "bottom-left": "bottom-4 left-4",
45589
46216
  "top-right": "top-4 right-4",
@@ -45712,7 +46339,7 @@ function RuntimeDebugger({
45712
46339
  className: cn(
45713
46340
  "runtime-debugger",
45714
46341
  "fixed",
45715
- positionClasses3[position],
46342
+ positionClasses[position],
45716
46343
  isCollapsed ? "runtime-debugger--collapsed" : "runtime-debugger--expanded",
45717
46344
  className
45718
46345
  ),
@@ -46017,7 +46644,7 @@ function SequenceBar({
46017
46644
  onSlotRemove(index);
46018
46645
  }, [onSlotRemove, playing]);
46019
46646
  const paddedSlots = Array.from({ length: maxSlots }, (_, i) => slots[i]);
46020
- return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(React93__default.Fragment, { children: [
46647
+ return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(React97__default.Fragment, { children: [
46021
46648
  i > 0 && /* @__PURE__ */ jsx(
46022
46649
  Typography,
46023
46650
  {
@@ -46293,7 +46920,7 @@ var init_SequencerBoard = __esm({
46293
46920
  });
46294
46921
  var ShowcaseOrganism;
46295
46922
  var init_ShowcaseOrganism = __esm({
46296
- "components/core/organisms/ShowcaseOrganism.tsx"() {
46923
+ "components/marketing/organisms/ShowcaseOrganism.tsx"() {
46297
46924
  "use client";
46298
46925
  init_cn();
46299
46926
  init_useEventBus();
@@ -46975,7 +47602,7 @@ var init_StatCard = __esm({
46975
47602
  title: propTitle,
46976
47603
  value: propValue,
46977
47604
  previousValue,
46978
- currentValue,
47605
+ currentValue: currentValue2,
46979
47606
  trend: manualTrend,
46980
47607
  trendDirection: manualDirection,
46981
47608
  invertTrend = false,
@@ -46996,7 +47623,7 @@ var init_StatCard = __esm({
46996
47623
  const labelToUse = propLabel ?? propTitle;
46997
47624
  const eventBus = useEventBus();
46998
47625
  const { t } = useTranslate();
46999
- const handleActionClick = React93__default.useCallback(() => {
47626
+ const handleActionClick = React97__default.useCallback(() => {
47000
47627
  if (action?.event) {
47001
47628
  eventBus.emit(`UI:${action.event}`, {});
47002
47629
  }
@@ -47007,7 +47634,7 @@ var init_StatCard = __esm({
47007
47634
  const data = Array.isArray(entity) ? entity : entity ? [entity] : [];
47008
47635
  const isLoading = externalLoading ?? false;
47009
47636
  const error = externalError;
47010
- const computeMetricValue = React93__default.useCallback(
47637
+ const computeMetricValue = React97__default.useCallback(
47011
47638
  (metric, items) => {
47012
47639
  if (metric.value !== void 0) {
47013
47640
  return metric.value;
@@ -47046,7 +47673,7 @@ var init_StatCard = __esm({
47046
47673
  },
47047
47674
  []
47048
47675
  );
47049
- const schemaStats = React93__default.useMemo(() => {
47676
+ const schemaStats = React97__default.useMemo(() => {
47050
47677
  if (!metrics || metrics.length === 0) return null;
47051
47678
  return metrics.map((metric) => ({
47052
47679
  label: metric.label,
@@ -47054,13 +47681,13 @@ var init_StatCard = __esm({
47054
47681
  format: metric.format
47055
47682
  }));
47056
47683
  }, [metrics, data, computeMetricValue]);
47057
- const calculatedTrend = React93__default.useMemo(() => {
47684
+ const calculatedTrend = React97__default.useMemo(() => {
47058
47685
  if (manualTrend !== void 0) return manualTrend;
47059
- if (previousValue === void 0 || currentValue === void 0)
47686
+ if (previousValue === void 0 || currentValue2 === void 0)
47060
47687
  return void 0;
47061
- if (previousValue === 0) return currentValue > 0 ? 100 : 0;
47062
- return (currentValue - previousValue) / previousValue * 100;
47063
- }, [manualTrend, previousValue, currentValue]);
47688
+ if (previousValue === 0) return currentValue2 > 0 ? 100 : 0;
47689
+ return (currentValue2 - previousValue) / previousValue * 100;
47690
+ }, [manualTrend, previousValue, currentValue2]);
47064
47691
  if (schemaStats && schemaStats.length > 1) {
47065
47692
  if (isLoading) {
47066
47693
  return /* @__PURE__ */ jsx(
@@ -47718,7 +48345,7 @@ var init_StatsOrganism = __esm({
47718
48345
  });
47719
48346
  var StepFlowOrganism;
47720
48347
  var init_StepFlowOrganism = __esm({
47721
- "components/core/organisms/StepFlowOrganism.tsx"() {
48348
+ "components/marketing/organisms/StepFlowOrganism.tsx"() {
47722
48349
  "use client";
47723
48350
  init_cn();
47724
48351
  init_Stack();
@@ -47988,7 +48615,7 @@ var init_Timeline = __esm({
47988
48615
  }) => {
47989
48616
  const { t } = useTranslate();
47990
48617
  const entityData = Array.isArray(entity) ? entity : [];
47991
- const items = React93__default.useMemo(() => {
48618
+ const items = React97__default.useMemo(() => {
47992
48619
  if (propItems) return propItems;
47993
48620
  if (entityData.length === 0) return [];
47994
48621
  return entityData.map((record, idx) => {
@@ -48095,7 +48722,7 @@ var init_Timeline = __esm({
48095
48722
  }
48096
48723
  });
48097
48724
  function extractToastProps(children) {
48098
- if (!React93__default.isValidElement(children)) {
48725
+ if (!React97__default.isValidElement(children)) {
48099
48726
  if (typeof children === "string") {
48100
48727
  return { message: children };
48101
48728
  }
@@ -48133,7 +48760,7 @@ var init_ToastSlot = __esm({
48133
48760
  eventBus.emit("UI:CLOSE");
48134
48761
  };
48135
48762
  if (!isVisible) return null;
48136
- const isCustomContent = React93__default.isValidElement(children) && !message;
48763
+ const isCustomContent = React97__default.isValidElement(children) && !message;
48137
48764
  return /* @__PURE__ */ jsx(Box, { className: "fixed bottom-4 right-4 z-50", children: isCustomContent ? children : /* @__PURE__ */ jsx(
48138
48765
  Toast,
48139
48766
  {
@@ -48643,12 +49270,12 @@ var init_WorldMapTemplate = __esm({
48643
49270
  }
48644
49271
  });
48645
49272
  function lazyThree(name, loader) {
48646
- const Lazy = React93__default.lazy(() => loader().then((m) => ({ default: m[name] })));
49273
+ const Lazy = React97__default.lazy(() => loader().then((m) => ({ default: m[name] })));
48647
49274
  function ThreeWrapper(props) {
48648
- return React93__default.createElement(
48649
- React93__default.Suspense,
49275
+ return React97__default.createElement(
49276
+ React97__default.Suspense,
48650
49277
  { fallback: null },
48651
- React93__default.createElement(Lazy, props)
49278
+ React97__default.createElement(Lazy, props)
48652
49279
  );
48653
49280
  }
48654
49281
  ThreeWrapper.displayName = `Lazy(${name})`;
@@ -48668,6 +49295,7 @@ var init_component_registry_generated = __esm({
48668
49295
  init_AnimatedReveal();
48669
49296
  init_ArticleSection();
48670
49297
  init_Aside();
49298
+ init_AssetPicker();
48671
49299
  init_AuthLayout();
48672
49300
  init_BattleBoard();
48673
49301
  init_BattleTemplate();
@@ -48767,11 +49395,13 @@ var init_component_registry_generated = __esm({
48767
49395
  init_GradientDivider();
48768
49396
  init_GraphCanvas();
48769
49397
  init_GraphView();
49398
+ init_GridPicker();
48770
49399
  init_Header();
48771
49400
  init_HealthBar();
48772
49401
  init_HealthPanel();
48773
49402
  init_HeroOrganism();
48774
49403
  init_HeroSection();
49404
+ init_IconPicker();
48775
49405
  init_InfiniteScrollSentinel();
48776
49406
  init_InputGroup();
48777
49407
  init_InstallBox();
@@ -48816,6 +49446,7 @@ var init_component_registry_generated = __esm({
48816
49446
  init_PricingOrganism();
48817
49447
  init_PricingPageTemplate();
48818
49448
  init_ProgressDots();
49449
+ init_PropertyInspector();
48819
49450
  init_PullQuote();
48820
49451
  init_PullToRefresh();
48821
49452
  init_QrScanner();
@@ -48939,6 +49570,7 @@ var init_component_registry_generated = __esm({
48939
49570
  "AnimatedReveal": AnimatedReveal,
48940
49571
  "ArticleSection": ArticleSection,
48941
49572
  "Aside": Aside,
49573
+ "AssetPicker": AssetPicker,
48942
49574
  "AuthLayout": AuthLayout,
48943
49575
  "Avatar": AvatarPattern,
48944
49576
  "AvatarPattern": AvatarPattern,
@@ -49058,6 +49690,7 @@ var init_component_registry_generated = __esm({
49058
49690
  "GraphView": GraphView,
49059
49691
  "Grid": GridPattern,
49060
49692
  "GridPattern": GridPattern,
49693
+ "GridPicker": GridPicker,
49061
49694
  "HStack": HStackPattern,
49062
49695
  "HStackPattern": HStackPattern,
49063
49696
  "Header": Header,
@@ -49067,6 +49700,7 @@ var init_component_registry_generated = __esm({
49067
49700
  "HeroSection": HeroSection,
49068
49701
  "Icon": IconPattern,
49069
49702
  "IconPattern": IconPattern,
49703
+ "IconPicker": IconPicker,
49070
49704
  "InfiniteScrollSentinel": InfiniteScrollSentinel,
49071
49705
  "Input": InputPattern,
49072
49706
  "InputGroup": InputGroup,
@@ -49123,6 +49757,7 @@ var init_component_registry_generated = __esm({
49123
49757
  "ProgressBar": ProgressBarPattern,
49124
49758
  "ProgressBarPattern": ProgressBarPattern,
49125
49759
  "ProgressDots": ProgressDots,
49760
+ "PropertyInspector": PropertyInspector,
49126
49761
  "PullQuote": PullQuote,
49127
49762
  "PullToRefresh": PullToRefresh,
49128
49763
  "QrScanner": QrScanner,
@@ -49264,7 +49899,7 @@ function SuspenseConfigProvider({
49264
49899
  config,
49265
49900
  children
49266
49901
  }) {
49267
- return React93__default.createElement(
49902
+ return React97__default.createElement(
49268
49903
  SuspenseConfigContext.Provider,
49269
49904
  { value: config },
49270
49905
  children
@@ -49339,6 +49974,9 @@ function renderContainedPortal(t, slot, content, onDismiss) {
49339
49974
  const slotId = `slot-${slot}`;
49340
49975
  switch (slot) {
49341
49976
  case "modal":
49977
+ if (SELF_OVERLAY_PATTERNS.has(content.pattern)) {
49978
+ return /* @__PURE__ */ jsx(Box, { id: slotId, className: "contents", children: slotContent });
49979
+ }
49342
49980
  return /* @__PURE__ */ jsx(
49343
49981
  Box,
49344
49982
  {
@@ -49600,8 +50238,8 @@ function CompiledPortal({ slot, className, pattern, sourceTrait, children }) {
49600
50238
  const slotId = `slot-${slot}`;
49601
50239
  let wrapper;
49602
50240
  switch (slot) {
49603
- case "modal":
49604
- wrapper = /* @__PURE__ */ jsx(Modal, { isOpen: true, onClose: handleDismiss, showCloseButton: true, size: "lg", children: /* @__PURE__ */ jsx(
50241
+ case "modal": {
50242
+ const innerContent = /* @__PURE__ */ jsx(
49605
50243
  Box,
49606
50244
  {
49607
50245
  id: slotId,
@@ -49610,8 +50248,10 @@ function CompiledPortal({ slot, className, pattern, sourceTrait, children }) {
49610
50248
  "data-source-trait": sourceTrait,
49611
50249
  children
49612
50250
  }
49613
- ) });
50251
+ );
50252
+ wrapper = pattern !== void 0 && SELF_OVERLAY_PATTERNS.has(pattern) ? innerContent : /* @__PURE__ */ jsx(Modal, { isOpen: true, onClose: handleDismiss, showCloseButton: true, size: "lg", children: innerContent });
49614
50253
  break;
50254
+ }
49615
50255
  case "drawer":
49616
50256
  wrapper = /* @__PURE__ */ jsx(Drawer, { isOpen: true, onClose: handleDismiss, position: "right", children: /* @__PURE__ */ jsx(
49617
50257
  Box,
@@ -49669,7 +50309,7 @@ function SlotPortal({
49669
50309
  let wrapper;
49670
50310
  switch (slot) {
49671
50311
  case "modal":
49672
- wrapper = /* @__PURE__ */ jsx(
50312
+ wrapper = SELF_OVERLAY_PATTERNS.has(content.pattern) ? /* @__PURE__ */ jsx(Box, { id: slotId, children: slotContent }) : /* @__PURE__ */ jsx(
49673
50313
  Modal,
49674
50314
  {
49675
50315
  isOpen: true,
@@ -49749,7 +50389,7 @@ function renderPatternChildren(children, onDismiss, parentId = "root", parentPat
49749
50389
  const key = `${parentId}-${index}-trait:${traitName}`;
49750
50390
  return /* @__PURE__ */ jsx(TraitFrame, { traitName }, key);
49751
50391
  }
49752
- return /* @__PURE__ */ jsx(React93__default.Fragment, { children: child }, `${parentId}-${index}`);
50392
+ return /* @__PURE__ */ jsx(React97__default.Fragment, { children: child }, `${parentId}-${index}`);
49753
50393
  }
49754
50394
  if (!child || typeof child !== "object") return null;
49755
50395
  const childId = `${parentId}-${index}`;
@@ -49789,14 +50429,14 @@ function isPatternConfig(value) {
49789
50429
  if (value === null || value === void 0) return false;
49790
50430
  if (typeof value !== "object") return false;
49791
50431
  if (Array.isArray(value)) return false;
49792
- if (React93__default.isValidElement(value)) return false;
50432
+ if (React97__default.isValidElement(value)) return false;
49793
50433
  if (value instanceof Date) return false;
49794
50434
  if (typeof value === "function") return false;
49795
50435
  const record = value;
49796
50436
  return "type" in record && typeof record.type === "string";
49797
50437
  }
49798
50438
  function isPlainConfigObject(value) {
49799
- if (React93__default.isValidElement(value)) return false;
50439
+ if (React97__default.isValidElement(value)) return false;
49800
50440
  if (value instanceof Date) return false;
49801
50441
  const proto = Object.getPrototypeOf(value);
49802
50442
  return proto === Object.prototype || proto === null;
@@ -50049,7 +50689,7 @@ function UISlotRenderer({
50049
50689
  }
50050
50690
  return wrapped;
50051
50691
  }
50052
- var scopeWrapLog, TRAIT_BINDING_RE, SuspenseConfigContext, SlotContainedContext, SLOT_SKELETON_MAP, FORM_PATTERNS, PATTERNS_WITH_CHILDREN;
50692
+ var scopeWrapLog, TRAIT_BINDING_RE, SuspenseConfigContext, SlotContainedContext, SLOT_SKELETON_MAP, FORM_PATTERNS, SELF_OVERLAY_PATTERNS, PATTERNS_WITH_CHILDREN;
50053
50693
  var init_UISlotRenderer = __esm({
50054
50694
  "components/core/organisms/UISlotRenderer.tsx"() {
50055
50695
  "use client";
@@ -50085,6 +50725,7 @@ var init_UISlotRenderer = __esm({
50085
50725
  "inline-edit-form",
50086
50726
  "wizard-step"
50087
50727
  ]);
50728
+ SELF_OVERLAY_PATTERNS = /* @__PURE__ */ new Set(["modal", "confirm-dialog"]);
50088
50729
  PATTERNS_WITH_CHILDREN = /* @__PURE__ */ new Set([
50089
50730
  "stack",
50090
50731
  "vstack",
@@ -50284,7 +50925,7 @@ var AvlTransition = ({
50284
50925
  opacity = 1,
50285
50926
  className
50286
50927
  }) => {
50287
- const ids = React93__default.useMemo(() => {
50928
+ const ids = React97__default.useMemo(() => {
50288
50929
  avlTransitionId += 1;
50289
50930
  return { arrow: `avl-tr-${avlTransitionId}-arrow` };
50290
50931
  }, []);
@@ -50845,7 +51486,7 @@ var AvlStateMachine = ({
50845
51486
  color = "var(--color-primary)",
50846
51487
  animated = false
50847
51488
  }) => {
50848
- const ids = React93__default.useMemo(() => {
51489
+ const ids = React97__default.useMemo(() => {
50849
51490
  avlSmId += 1;
50850
51491
  const base = `avl-sm-${avlSmId}`;
50851
51492
  return { glow: `${base}-glow`, grad: `${base}-grad` };
@@ -51044,7 +51685,7 @@ var AvlOrbitalUnit = ({
51044
51685
  color = "var(--color-primary)",
51045
51686
  animated = false
51046
51687
  }) => {
51047
- const ids = React93__default.useMemo(() => {
51688
+ const ids = React97__default.useMemo(() => {
51048
51689
  avlOuId += 1;
51049
51690
  const base = `avl-ou-${avlOuId}`;
51050
51691
  return { glow: `${base}-glow`, grad: `${base}-grad` };
@@ -51140,7 +51781,7 @@ var AvlClosedCircuit = ({
51140
51781
  color = "var(--color-primary)",
51141
51782
  animated = false
51142
51783
  }) => {
51143
- const ids = React93__default.useMemo(() => {
51784
+ const ids = React97__default.useMemo(() => {
51144
51785
  avlCcId += 1;
51145
51786
  const base = `avl-cc-${avlCcId}`;
51146
51787
  return { glow: `${base}-glow`, grad: `${base}-grad`, arrow: `${base}-arrow` };
@@ -51295,7 +51936,7 @@ var AvlEmitListen = ({
51295
51936
  color = "var(--color-primary)",
51296
51937
  animated = false
51297
51938
  }) => {
51298
- const ids = React93__default.useMemo(() => {
51939
+ const ids = React97__default.useMemo(() => {
51299
51940
  avlElId += 1;
51300
51941
  const base = `avl-el-${avlElId}`;
51301
51942
  return { arrow: `${base}-arrow`, grad: `${base}-grad` };
@@ -51569,7 +52210,7 @@ function renderNode(node, color, glowId) {
51569
52210
  const baseR = node.type === "operator" ? 20 : 16;
51570
52211
  const r2 = Math.max(baseR, labelLen * 3.5 + 6);
51571
52212
  const nc = nodeColor(node.type, color);
51572
- return /* @__PURE__ */ jsxs(React93__default.Fragment, { children: [
52213
+ return /* @__PURE__ */ jsxs(React97__default.Fragment, { children: [
51573
52214
  node.children.map((child, i) => {
51574
52215
  const childR = Math.max(
51575
52216
  child.type === "operator" ? 20 : 16,
@@ -51626,7 +52267,7 @@ var AvlExprTree = ({
51626
52267
  className,
51627
52268
  color = "var(--color-primary)"
51628
52269
  }) => {
51629
- const ids = React93__default.useMemo(() => {
52270
+ const ids = React97__default.useMemo(() => {
51630
52271
  avlEtId += 1;
51631
52272
  return { glow: `avl-et-${avlEtId}-glow` };
51632
52273
  }, []);
@@ -52450,7 +53091,7 @@ var SystemNode = ({ data }) => {
52450
53091
  stateChain.length > 0 && /* @__PURE__ */ jsx("svg", { width: stateChain.length * 14 + 2, height: 10, viewBox: `0 0 ${stateChain.length * 14 + 2} 10`, children: stateChain.map((s, i) => {
52451
53092
  const tc = transitionCounts[s.name] ?? 0;
52452
53093
  const role = getStateRole(s.name, s.isInitial, s.isTerminal, tc, maxTC);
52453
- return /* @__PURE__ */ jsxs(React93__default.Fragment, { children: [
53094
+ return /* @__PURE__ */ jsxs(React97__default.Fragment, { children: [
52454
53095
  /* @__PURE__ */ jsx(AvlState, { x: i * 14 + 1, y: 1, width: 10, height: 8, name: "", role, isInitial: s.isInitial, isTerminal: s.isTerminal }),
52455
53096
  i < stateChain.length - 1 && /* @__PURE__ */ jsx("line", { x1: i * 14 + 12, y1: 5, x2: i * 14 + 15, y2: 5, stroke: "var(--color-border)", strokeWidth: 0.5 })
52456
53097
  ] }, s.name);
@@ -53602,7 +54243,7 @@ function resolveLambdaBindings(body, params, item, index) {
53602
54243
  if (Array.isArray(body)) {
53603
54244
  return body.map((b) => recur(b));
53604
54245
  }
53605
- if (body !== null && typeof body === "object" && !React93__default.isValidElement(body) && !(body instanceof Date) && typeof body !== "function") {
54246
+ if (body !== null && typeof body === "object" && !React97__default.isValidElement(body) && !(body instanceof Date) && typeof body !== "function") {
53606
54247
  const out = {};
53607
54248
  for (const [k, v] of Object.entries(body)) {
53608
54249
  out[k] = recur(v);
@@ -53621,7 +54262,7 @@ function getSlotContentRenderer2() {
53621
54262
  function makeLambdaFn(params, lambdaBody, callerKey) {
53622
54263
  return (item, index) => {
53623
54264
  const resolvedBody = resolveLambdaBindings(lambdaBody, params, item, index);
53624
- if (resolvedBody === null || typeof resolvedBody !== "object" || Array.isArray(resolvedBody) || typeof resolvedBody === "function" || React93__default.isValidElement(resolvedBody) || resolvedBody instanceof Date) {
54265
+ if (resolvedBody === null || typeof resolvedBody !== "object" || Array.isArray(resolvedBody) || typeof resolvedBody === "function" || React97__default.isValidElement(resolvedBody) || resolvedBody instanceof Date) {
53625
54266
  return null;
53626
54267
  }
53627
54268
  const record = resolvedBody;
@@ -53640,7 +54281,7 @@ function makeLambdaFn(params, lambdaBody, callerKey) {
53640
54281
  props: childProps,
53641
54282
  priority: 0
53642
54283
  };
53643
- return React93__default.createElement(SlotContentRenderer2, { content: childContent });
54284
+ return React97__default.createElement(SlotContentRenderer2, { content: childContent });
53644
54285
  };
53645
54286
  }
53646
54287
  function convertNode(node, callerKey) {
@@ -53659,7 +54300,7 @@ function convertNode(node, callerKey) {
53659
54300
  });
53660
54301
  return anyChanged ? mapped : node;
53661
54302
  }
53662
- if (typeof node === "object" && !React93__default.isValidElement(node) && !(node instanceof Date)) {
54303
+ if (typeof node === "object" && !React97__default.isValidElement(node) && !(node instanceof Date)) {
53663
54304
  return convertObjectProps(node);
53664
54305
  }
53665
54306
  return node;
@@ -55672,8 +56313,8 @@ function CanvasDndProvider({
55672
56313
  }) {
55673
56314
  const eventBus = useEventBus();
55674
56315
  const sensors = useAlmadarDndSensors(false);
55675
- const [activePayload, setActivePayload] = React93__default.useState(null);
55676
- const handleDragStart = React93__default.useCallback((e) => {
56316
+ const [activePayload, setActivePayload] = React97__default.useState(null);
56317
+ const handleDragStart = React97__default.useCallback((e) => {
55677
56318
  const data = e.active.data.current;
55678
56319
  const payload = data?.payload;
55679
56320
  if (payload) {
@@ -55684,7 +56325,7 @@ function CanvasDndProvider({
55684
56325
  log11.warn("dragStart:missing-payload", { id: e.active.id });
55685
56326
  }
55686
56327
  }, [eventBus]);
55687
- const handleDragEnd = React93__default.useCallback((e) => {
56328
+ const handleDragEnd = React97__default.useCallback((e) => {
55688
56329
  setActivePayload(null);
55689
56330
  const activeData = e.active.data.current;
55690
56331
  const payload = activeData?.payload;
@@ -55713,7 +56354,7 @@ function CanvasDndProvider({
55713
56354
  const suppressed = onDrop ? onDrop(drop) === true : false;
55714
56355
  if (!suppressed) defaultEmit(eventBus, drop);
55715
56356
  }, [eventBus, onDrop]);
55716
- const handleDragCancel = React93__default.useCallback(() => {
56357
+ const handleDragCancel = React97__default.useCallback(() => {
55717
56358
  setActivePayload(null);
55718
56359
  log11.info("dragCancel");
55719
56360
  }, []);
@@ -56467,7 +57108,7 @@ var OrbPreviewNodeInner = (props) => {
56467
57108
  }
56468
57109
  );
56469
57110
  };
56470
- var OrbPreviewNode = React93__default.memo(OrbPreviewNodeInner);
57111
+ var OrbPreviewNode = React97__default.memo(OrbPreviewNodeInner);
56471
57112
  OrbPreviewNode.displayName = "OrbPreviewNode";
56472
57113
  orbPreviewLog.debug("export-resolved", () => ({
56473
57114
  type: typeof OrbPreviewNode,
@@ -56572,7 +57213,7 @@ var EventFlowEdgeInner = (props) => {
56572
57213
  ) })
56573
57214
  ] });
56574
57215
  };
56575
- var EventFlowEdge = React93__default.memo(EventFlowEdgeInner);
57216
+ var EventFlowEdge = React97__default.memo(EventFlowEdgeInner);
56576
57217
  EventFlowEdge.displayName = "EventFlowEdge";
56577
57218
 
56578
57219
  // components/avl/molecules/BehaviorComposeNode.tsx
@@ -56719,7 +57360,7 @@ var BehaviorComposeNodeInner = (props) => {
56719
57360
  }
56720
57361
  );
56721
57362
  };
56722
- var BehaviorComposeNode = React93__default.memo(BehaviorComposeNodeInner);
57363
+ var BehaviorComposeNode = React97__default.memo(BehaviorComposeNodeInner);
56723
57364
  BehaviorComposeNode.displayName = "BehaviorComposeNode";
56724
57365
 
56725
57366
  // components/avl/molecules/avl-behavior-compose-converter.ts
@@ -57115,8 +57756,8 @@ function OrbInspector({ node, schema, editable = false, userType = "builder", th
57115
57756
  const explicitValue = patternConfig ? patternConfig[propName] : void 0;
57116
57757
  const defaultValue = ps.default;
57117
57758
  const isImplicit = explicitValue === void 0 && defaultValue !== void 0;
57118
- const currentValue = explicitValue !== void 0 ? explicitValue : defaultValue;
57119
- const displayValue = currentValue !== void 0 ? typeof currentValue === "object" ? JSON.stringify(currentValue) : String(currentValue) : "";
57759
+ const currentValue2 = explicitValue !== void 0 ? explicitValue : defaultValue;
57760
+ const displayValue = currentValue2 !== void 0 ? typeof currentValue2 === "object" ? JSON.stringify(currentValue2) : String(currentValue2) : "";
57120
57761
  inspectorLog.debug("prop-row", () => ({
57121
57762
  patternType: patternDef.type,
57122
57763
  patternId: selectedPattern?.patternId ?? "",
@@ -57731,7 +58372,7 @@ var TraitCardNodeInner = (props) => {
57731
58372
  }
57732
58373
  );
57733
58374
  };
57734
- var TraitCardNode = React93__default.memo(TraitCardNodeInner);
58375
+ var TraitCardNode = React97__default.memo(TraitCardNodeInner);
57735
58376
  TraitCardNode.displayName = "TraitCardNode";
57736
58377
 
57737
58378
  // components/avl/organisms/FlowCanvas.tsx
@@ -57804,7 +58445,7 @@ function FlowCanvasInner({
57804
58445
  initialOrbital
57805
58446
  );
57806
58447
  const [expandedBehaviorAlias, setExpandedBehaviorAlias] = useState(void 0);
57807
- const screenSizeUserOverrideRef = React93__default.useRef(false);
58448
+ const screenSizeUserOverrideRef = React97__default.useRef(false);
57808
58449
  const [screenSize, setScreenSize] = useState(
57809
58450
  () => typeof window === "undefined" ? "laptop" : detectScreenSize(window.innerWidth)
57810
58451
  );
@@ -58188,7 +58829,7 @@ var ZoomBreadcrumb = ({
58188
58829
  if (eventName && band === "detail") {
58189
58830
  segments.push({ icon: "\u26A1", label: eventName });
58190
58831
  }
58191
- return /* @__PURE__ */ jsx("div", { className: "absolute top-2 left-2 z-10 flex items-center gap-1 px-2 py-1 rounded-md bg-card/90 border border-border text-xs text-muted-foreground backdrop-blur-sm", children: segments.map((seg, i) => /* @__PURE__ */ jsxs(React93__default.Fragment, { children: [
58832
+ return /* @__PURE__ */ jsx("div", { className: "absolute top-2 left-2 z-10 flex items-center gap-1 px-2 py-1 rounded-md bg-card/90 border border-border text-xs text-muted-foreground backdrop-blur-sm", children: segments.map((seg, i) => /* @__PURE__ */ jsxs(React97__default.Fragment, { children: [
58192
58833
  i > 0 && /* @__PURE__ */ jsx("span", { className: "opacity-40", children: ">" }),
58193
58834
  /* @__PURE__ */ jsx("span", { className: "opacity-60", children: seg.icon }),
58194
58835
  /* @__PURE__ */ jsx("span", { children: seg.label })
@@ -58529,7 +59170,7 @@ var EventWireOverlay = ({
58529
59170
  containerW,
58530
59171
  containerH
58531
59172
  }) => {
58532
- const ids = React93__default.useMemo(() => {
59173
+ const ids = React97__default.useMemo(() => {
58533
59174
  avlOczWireId += 1;
58534
59175
  return { arrow: `avl-ocz-wire-${avlOczWireId}-arrow` };
58535
59176
  }, []);
@@ -58896,7 +59537,7 @@ var AvlOrbitalsCosmicZoom = ({
58896
59537
  borderRadius: 6,
58897
59538
  border: `1px solid ${color}`
58898
59539
  },
58899
- children: /* @__PURE__ */ jsx(HStack, { gap: "xs", align: "center", children: breadcrumbs.map((crumb, i) => /* @__PURE__ */ jsxs(React93__default.Fragment, { children: [
59540
+ children: /* @__PURE__ */ jsx(HStack, { gap: "xs", align: "center", children: breadcrumbs.map((crumb, i) => /* @__PURE__ */ jsxs(React97__default.Fragment, { children: [
58900
59541
  i > 0 && /* @__PURE__ */ jsx(Typography, { variant: "small", style: { opacity: 0.5, color }, children: "/" }),
58901
59542
  i < breadcrumbs.length - 1 ? /* @__PURE__ */ jsx(
58902
59543
  Box,