@almadar/ui 2.43.0 → 2.45.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.
@@ -4086,9 +4086,9 @@ var shapeMap = {
4086
4086
  square: "rounded-md"
4087
4087
  };
4088
4088
  var variantMap = {
4089
- primary: "bg-blue-600 text-white border-blue-400 hover:bg-blue-500",
4090
- secondary: "bg-gray-700 text-white border-gray-500 hover:bg-gray-600",
4091
- ghost: "bg-transparent text-white border-white/30 hover:bg-white/10"
4089
+ primary: "bg-blue-600 text-[var(--color-foreground)] border-blue-400 hover:bg-blue-500",
4090
+ secondary: "bg-[var(--color-surface,#374151)] text-[var(--color-foreground)] border-gray-500 hover:bg-gray-600",
4091
+ ghost: "bg-transparent text-[var(--color-foreground)] border-white/30 hover:bg-white/10"
4092
4092
  };
4093
4093
  function ControlButton({
4094
4094
  label,
@@ -4353,11 +4353,11 @@ function TimerDisplay({
4353
4353
  {
4354
4354
  className: cn(
4355
4355
  "inline-flex items-center justify-center rounded-lg",
4356
- "bg-gray-800/80 border border-gray-600 font-mono font-bold tabular-nums",
4356
+ "bg-[var(--color-card)]/80 border border-gray-600 font-mono font-bold tabular-nums",
4357
4357
  sizeMap4[size],
4358
4358
  running && "border-green-500/50",
4359
4359
  isLow && "text-red-400 border-red-500/50 animate-pulse",
4360
- !isLow && "text-white",
4360
+ !isLow && "text-[var(--color-foreground)]",
4361
4361
  className
4362
4362
  ),
4363
4363
  children: formatTime(seconds, format)
@@ -4385,7 +4385,7 @@ function ResourceCounter({
4385
4385
  {
4386
4386
  className: cn(
4387
4387
  "inline-flex items-center rounded-md",
4388
- "bg-gray-800/80 border border-gray-600 font-medium text-white",
4388
+ "bg-[var(--color-card)]/80 border border-gray-600 font-medium text-[var(--color-foreground)]",
4389
4389
  sizes.wrapper,
4390
4390
  className
4391
4391
  ),
@@ -4444,9 +4444,9 @@ function ItemSlot({
4444
4444
  title: label,
4445
4445
  className: cn(
4446
4446
  "relative flex items-center justify-center rounded-lg border-2",
4447
- "bg-gray-800/80 transition-all duration-150",
4447
+ "bg-[var(--color-card)]/80 transition-all duration-150",
4448
4448
  sizeMap6[size],
4449
- empty ? "border-gray-700 bg-gray-900/50" : rarityBorderMap[rarity],
4449
+ empty ? "border-gray-700 bg-[var(--color-card)]/50" : rarityBorderMap[rarity],
4450
4450
  !empty && rarityGlowMap[rarity],
4451
4451
  selected && "ring-2 ring-white ring-offset-1 ring-offset-gray-900",
4452
4452
  isClickable && !empty && "hover:brightness-125 cursor-pointer",
@@ -4462,7 +4462,7 @@ function ItemSlot({
4462
4462
  className: cn(
4463
4463
  "absolute -bottom-1 -right-1 flex items-center justify-center",
4464
4464
  "min-w-[18px] h-[18px] rounded-full px-1",
4465
- "bg-gray-700 border border-gray-500 text-[10px] font-bold text-white"
4465
+ "bg-[var(--color-surface,#374151)] border border-gray-500 text-[10px] font-bold text-[var(--color-foreground)]"
4466
4466
  ),
4467
4467
  children: quantity
4468
4468
  }
@@ -4491,7 +4491,7 @@ function TurnIndicator({
4491
4491
  {
4492
4492
  className: cn(
4493
4493
  "inline-flex items-center rounded-lg",
4494
- "bg-gray-800/80 border border-gray-600 font-medium text-white",
4494
+ "bg-[var(--color-card)]/80 border border-gray-600 font-medium text-[var(--color-foreground)]",
4495
4495
  sizes.wrapper,
4496
4496
  className
4497
4497
  ),
@@ -4527,7 +4527,7 @@ function getComboIntensity(combo) {
4527
4527
  if (combo >= 10) return "text-red-400 animate-pulse";
4528
4528
  if (combo >= 7) return "text-orange-400";
4529
4529
  if (combo >= 4) return "text-yellow-400";
4530
- return "text-white";
4530
+ return "text-[var(--color-foreground)]";
4531
4531
  }
4532
4532
  function getComboScale(combo) {
4533
4533
  if (combo >= 10) return "scale-110";
@@ -4548,7 +4548,7 @@ function ComboCounter({
4548
4548
  {
4549
4549
  className: cn(
4550
4550
  "inline-flex flex-col items-center justify-center",
4551
- "rounded-xl bg-gray-800/80 border border-gray-600 px-3 py-1.5",
4551
+ "rounded-xl bg-[var(--color-card)]/80 border border-gray-600 px-3 py-1.5",
4552
4552
  "transition-transform duration-200",
4553
4553
  getComboScale(combo),
4554
4554
  className
@@ -4749,7 +4749,7 @@ function StatusEffect({
4749
4749
  "span",
4750
4750
  {
4751
4751
  className: cn(
4752
- "absolute flex items-center justify-center rounded-full bg-white text-black font-bold leading-none",
4752
+ "absolute flex items-center justify-center rounded-full bg-[var(--color-card)] text-[var(--color-foreground)] font-bold leading-none",
4753
4753
  sizes.badge
4754
4754
  ),
4755
4755
  children: stacks
@@ -4828,7 +4828,7 @@ function DialogueBubble({
4828
4828
  ) }),
4829
4829
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-1 min-w-0", children: [
4830
4830
  speaker && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-bold text-yellow-400", children: speaker }),
4831
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm text-white leading-relaxed", children: text })
4831
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm text-[var(--color-foreground)] leading-relaxed", children: text })
4832
4832
  ] })
4833
4833
  ]
4834
4834
  }
@@ -4852,7 +4852,7 @@ function ChoiceButton({
4852
4852
  className: cn(
4853
4853
  "w-full text-left px-4 py-2.5 rounded-md border transition-all duration-150",
4854
4854
  "flex items-center gap-2",
4855
- selected ? "bg-yellow-500/20 border-yellow-400 text-yellow-300" : "bg-white/5 border-white/10 text-white hover:bg-white/10 hover:border-white/30",
4855
+ selected ? "bg-yellow-500/20 border-yellow-400 text-yellow-300" : "bg-white/5 border-white/10 text-[var(--color-foreground)] hover:bg-white/10 hover:border-white/30",
4856
4856
  disabled && "opacity-40 cursor-not-allowed hover:bg-white/5 hover:border-white/10",
4857
4857
  className
4858
4858
  ),
@@ -4908,7 +4908,7 @@ function ActionButton({
4908
4908
  disabled: isDisabled,
4909
4909
  onClick,
4910
4910
  className: cn(
4911
- "relative inline-flex items-center gap-1.5 rounded-md border font-medium text-white overflow-hidden transition-colors duration-150",
4911
+ "relative inline-flex items-center gap-1.5 rounded-md border font-medium text-[var(--color-foreground)] overflow-hidden transition-colors duration-150",
4912
4912
  sizes.button,
4913
4913
  variantStyles7[variant],
4914
4914
  isDisabled && "opacity-60 cursor-not-allowed",
@@ -8658,7 +8658,7 @@ var MarkdownContent = React90__namespace.default.memo(
8658
8658
  "th",
8659
8659
  {
8660
8660
  ...props,
8661
- className: "border border-gray-300 dark:border-gray-600 bg-gray-100 dark:bg-gray-800 px-4 py-2 text-left font-semibold",
8661
+ className: "border border-gray-300 dark:border-gray-600 bg-[var(--color-muted)] px-4 py-2 text-left font-semibold",
8662
8662
  children
8663
8663
  }
8664
8664
  );
@@ -8936,7 +8936,7 @@ var CodeBlock = React90__namespace.default.memo(
8936
8936
  {
8937
8937
  justify: "between",
8938
8938
  align: "center",
8939
- className: "px-3 py-2 bg-gray-800 rounded-t-lg border-b border-gray-700",
8939
+ className: "px-3 py-2 bg-[var(--color-card)] rounded-t-lg border-b border-gray-700",
8940
8940
  children: [
8941
8941
  showLanguageBadge && /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: "default", size: "sm", children: language }),
8942
8942
  showCopyButton && /* @__PURE__ */ jsxRuntime.jsx(
@@ -10161,7 +10161,7 @@ var sizeMap17 = {
10161
10161
  lg: "text-base px-4 py-2"
10162
10162
  };
10163
10163
  var variantMap2 = {
10164
- default: "bg-gray-800/80 border-gray-700",
10164
+ default: "bg-[var(--color-card)]/80 border-gray-700",
10165
10165
  primary: "bg-blue-900/80 border-blue-700",
10166
10166
  success: "bg-green-900/80 border-green-700",
10167
10167
  warning: "bg-yellow-900/80 border-yellow-700",
@@ -10222,7 +10222,7 @@ function StatBadge({
10222
10222
  animated: true
10223
10223
  }
10224
10224
  ),
10225
- format === "text" && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-bold text-white", children: value })
10225
+ format === "text" && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-bold text-[var(--color-foreground)]", children: value })
10226
10226
  ]
10227
10227
  }
10228
10228
  );
@@ -10565,7 +10565,7 @@ function HealthPanel({
10565
10565
  Box,
10566
10566
  {
10567
10567
  className: cn(
10568
- "rounded-lg bg-gray-900/90 border border-gray-700 backdrop-blur-sm",
10568
+ "rounded-lg bg-[var(--color-card)]/90 border border-gray-700 backdrop-blur-sm",
10569
10569
  sizes.padding,
10570
10570
  className
10571
10571
  ),
@@ -10667,7 +10667,7 @@ function ScoreBoard({
10667
10667
  Card,
10668
10668
  {
10669
10669
  className: cn(
10670
- "bg-gray-900/90 border-gray-700 backdrop-blur-sm",
10670
+ "bg-[var(--color-card)]/90 border-gray-700 backdrop-blur-sm",
10671
10671
  className
10672
10672
  ),
10673
10673
  children: /* @__PURE__ */ jsxRuntime.jsx(CardContent, { className: "p-3", children: /* @__PURE__ */ jsxRuntime.jsxs(Box, { className: "flex items-center gap-3 flex-wrap", children: [
@@ -10766,7 +10766,7 @@ function TurnPanel({
10766
10766
  Box,
10767
10767
  {
10768
10768
  className: cn(
10769
- "flex items-center gap-3 rounded-lg bg-gray-900/90 border border-gray-700 backdrop-blur-sm px-3 py-2",
10769
+ "flex items-center gap-3 rounded-lg bg-[var(--color-card)]/90 border border-gray-700 backdrop-blur-sm px-3 py-2",
10770
10770
  className
10771
10771
  ),
10772
10772
  children: [
@@ -10813,7 +10813,7 @@ function EnemyPlate({
10813
10813
  Box,
10814
10814
  {
10815
10815
  className: cn(
10816
- "inline-flex flex-col gap-1 rounded-lg bg-gray-900/90 border border-gray-700 backdrop-blur-sm px-3 py-1.5",
10816
+ "inline-flex flex-col gap-1 rounded-lg bg-[var(--color-card)]/90 border border-gray-700 backdrop-blur-sm px-3 py-1.5",
10817
10817
  "min-w-[120px]",
10818
10818
  className
10819
10819
  ),
@@ -10824,7 +10824,7 @@ function EnemyPlate({
10824
10824
  {
10825
10825
  variant: "caption",
10826
10826
  weight: "bold",
10827
- className: "text-white truncate",
10827
+ className: "text-[var(--color-foreground)] truncate",
10828
10828
  children: name
10829
10829
  }
10830
10830
  ),
@@ -10891,7 +10891,7 @@ function UnitCommandBar({
10891
10891
  Box,
10892
10892
  {
10893
10893
  className: cn(
10894
- "flex items-center gap-1.5 rounded-lg bg-gray-900/90 border border-gray-700 backdrop-blur-sm px-2 py-1.5",
10894
+ "flex items-center gap-1.5 rounded-lg bg-[var(--color-card)]/90 border border-gray-700 backdrop-blur-sm px-2 py-1.5",
10895
10895
  className
10896
10896
  ),
10897
10897
  children: commands.map((command, i) => /* @__PURE__ */ jsxRuntime.jsxs(Box, { className: "flex flex-col items-center gap-0.5", children: [
@@ -11118,7 +11118,7 @@ function DialogueBox({
11118
11118
  tabIndex: 0,
11119
11119
  role: "dialog",
11120
11120
  "aria-label": "Dialogue",
11121
- children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mx-4 my-4 bg-gray-900 bg-opacity-95 border-2 border-gray-600 rounded-lg overflow-hidden", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex", children: [
11121
+ children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mx-4 my-4 bg-[var(--color-card)] bg-opacity-95 border-2 border-gray-600 rounded-lg overflow-hidden", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex", children: [
11122
11122
  dialogue.portrait && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-shrink-0 p-4 border-r border-gray-700", children: /* @__PURE__ */ jsxRuntime.jsx(
11123
11123
  "img",
11124
11124
  {
@@ -11130,7 +11130,7 @@ function DialogueBox({
11130
11130
  ) }),
11131
11131
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 p-4", children: [
11132
11132
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-yellow-400 font-bold mb-2", children: dialogue.speaker }),
11133
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-white text-lg leading-relaxed min-h-[60px]", children: [
11133
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-[var(--color-foreground)] text-lg leading-relaxed min-h-[60px]", children: [
11134
11134
  displayedText,
11135
11135
  isTyping && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "animate-pulse", children: "\u258C" })
11136
11136
  ] }),
@@ -11140,8 +11140,8 @@ function DialogueBox({
11140
11140
  type: "button",
11141
11141
  className: cn(
11142
11142
  "block w-full text-left px-4 py-2 rounded transition-colors",
11143
- "hover:bg-gray-700 focus:outline-none focus:ring-2 focus:ring-yellow-400",
11144
- selectedChoice === index ? "bg-gray-700 text-yellow-400" : "bg-gray-800 text-white"
11143
+ "hover:bg-[var(--color-surface,#374151)] focus:outline-none focus:ring-2 focus:ring-yellow-400",
11144
+ selectedChoice === index ? "bg-[var(--color-surface,#374151)] text-yellow-400" : "bg-[var(--color-card)] text-[var(--color-foreground)]"
11145
11145
  ),
11146
11146
  onClick: (e) => {
11147
11147
  e.stopPropagation();
@@ -11334,7 +11334,7 @@ function InventoryPanel({
11334
11334
  /* @__PURE__ */ jsxRuntime.jsx(
11335
11335
  "div",
11336
11336
  {
11337
- className: "grid gap-1 bg-gray-900 p-2 rounded-lg border border-gray-700",
11337
+ className: "grid gap-1 bg-[var(--color-card)] p-2 rounded-lg border border-gray-700",
11338
11338
  style: {
11339
11339
  gridTemplateColumns: `repeat(${safeColumns}, ${slotSize}px)`,
11340
11340
  gridTemplateRows: `repeat(${rows}, ${slotSize}px)`
@@ -11345,9 +11345,9 @@ function InventoryPanel({
11345
11345
  type: "button",
11346
11346
  className: cn(
11347
11347
  "relative flex items-center justify-center",
11348
- "bg-gray-800 border rounded transition-colors",
11349
- "hover:bg-gray-700 focus:outline-none focus:ring-2 focus:ring-blue-500",
11350
- selectedSlot === index ? "border-yellow-400 bg-gray-700" : "border-gray-600"
11348
+ "bg-[var(--color-card)] border rounded transition-colors",
11349
+ "hover:bg-[var(--color-surface,#374151)] focus:outline-none focus:ring-2 focus:ring-blue-500",
11350
+ selectedSlot === index ? "border-yellow-400 bg-[var(--color-surface,#374151)]" : "border-gray-600"
11351
11351
  ),
11352
11352
  style: { width: slotSize, height: slotSize },
11353
11353
  onClick: () => handleSlotClick(index),
@@ -11377,14 +11377,14 @@ function InventoryPanel({
11377
11377
  showTooltips && hoveredItem && /* @__PURE__ */ jsxRuntime.jsxs(
11378
11378
  "div",
11379
11379
  {
11380
- className: "fixed z-50 bg-gray-900 border border-gray-600 rounded-lg p-2 shadow-lg pointer-events-none",
11380
+ className: "fixed z-50 bg-[var(--color-card)] border border-gray-600 rounded-lg p-2 shadow-lg pointer-events-none",
11381
11381
  style: {
11382
11382
  left: tooltipPosition.x,
11383
11383
  top: tooltipPosition.y,
11384
11384
  maxWidth: 200
11385
11385
  },
11386
11386
  children: [
11387
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "font-semibold text-white", children: hoveredItem.name || hoveredItem.type }),
11387
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "font-semibold text-[var(--color-foreground)]", children: hoveredItem.name || hoveredItem.type }),
11388
11388
  hoveredItem.description && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-sm text-gray-400 mt-1", children: hoveredItem.description }),
11389
11389
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-xs text-gray-500 mt-1", children: [
11390
11390
  "Quantity: ",
@@ -11396,9 +11396,9 @@ function InventoryPanel({
11396
11396
  ] });
11397
11397
  }
11398
11398
  var variantMap3 = {
11399
- primary: "bg-blue-600 hover:bg-blue-500 text-white border-blue-400 shadow-lg shadow-blue-500/25",
11400
- secondary: "bg-gray-700 hover:bg-gray-600 text-white border-gray-500",
11401
- ghost: "bg-transparent hover:bg-white/10 text-white border-white/20"
11399
+ primary: "bg-[var(--color-primary)] hover:bg-blue-500 text-[var(--color-primary-foreground)] border-blue-400 shadow-lg shadow-blue-500/25",
11400
+ secondary: "bg-[var(--color-surface,#374151)] hover:bg-gray-600 text-[var(--color-foreground)] border-gray-500",
11401
+ ghost: "bg-transparent hover:bg-white/10 text-[var(--color-foreground)] border-white/20"
11402
11402
  };
11403
11403
  function GameMenu({
11404
11404
  title,
@@ -11455,7 +11455,7 @@ function GameMenu({
11455
11455
  /* @__PURE__ */ jsxRuntime.jsx(
11456
11456
  "h1",
11457
11457
  {
11458
- className: "text-5xl md:text-7xl font-bold text-white tracking-tight",
11458
+ className: "text-5xl md:text-7xl font-bold text-[var(--color-foreground)] tracking-tight",
11459
11459
  style: {
11460
11460
  textShadow: "0 4px 12px rgba(0,0,0,0.5)"
11461
11461
  },
@@ -11511,9 +11511,9 @@ var variantColors = {
11511
11511
  }
11512
11512
  };
11513
11513
  var buttonVariants = {
11514
- primary: "bg-blue-600 hover:bg-blue-500 text-white border-blue-400",
11515
- secondary: "bg-gray-700 hover:bg-gray-600 text-white border-gray-500",
11516
- ghost: "bg-transparent hover:bg-white/10 text-white border-white/20"
11514
+ primary: "bg-[var(--color-primary)] hover:bg-blue-500 text-[var(--color-primary-foreground)] border-blue-400",
11515
+ secondary: "bg-[var(--color-surface,#374151)] hover:bg-gray-600 text-[var(--color-foreground)] border-gray-500",
11516
+ ghost: "bg-transparent hover:bg-white/10 text-[var(--color-foreground)] border-white/20"
11517
11517
  };
11518
11518
  function formatTime3(ms) {
11519
11519
  const seconds = Math.floor(ms / 1e3);
@@ -11594,7 +11594,7 @@ function GameOverScreen({
11594
11594
  }
11595
11595
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-center", children: [
11596
11596
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-gray-400 text-sm mb-1", children: stat.label }),
11597
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-white text-2xl font-bold flex items-center justify-center gap-2", children: [
11597
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-[var(--color-foreground)] text-2xl font-bold flex items-center justify-center gap-2", children: [
11598
11598
  stat.icon && /* @__PURE__ */ jsxRuntime.jsx("span", { children: stat.icon }),
11599
11599
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "tabular-nums", children: displayValue })
11600
11600
  ] })
@@ -12788,7 +12788,7 @@ function IsometricCanvas({
12788
12788
  className: cn("relative w-full overflow-hidden rounded-lg", className),
12789
12789
  style: { height: viewportSize.height },
12790
12790
  "data-testid": "game-canvas-empty",
12791
- children: /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "flex items-center justify-center h-full bg-slate-800 rounded-lg", children: /* @__PURE__ */ jsxRuntime.jsxs(Stack, { direction: "vertical", gap: "md", align: "center", children: [
12791
+ children: /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "flex items-center justify-center h-full bg-[var(--color-card)] rounded-lg", children: /* @__PURE__ */ jsxRuntime.jsxs(Stack, { direction: "vertical", gap: "md", align: "center", children: [
12792
12792
  /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: "map", size: "xl" }),
12793
12793
  /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body", className: "text-slate-400", children: t("canvas.emptyMessage") || "No map data loaded" })
12794
12794
  ] }) })
@@ -13864,7 +13864,7 @@ var Lightbox = ({
13864
13864
  className: cn(
13865
13865
  "absolute top-4 right-4 z-10",
13866
13866
  "p-2 rounded-full",
13867
- "text-white bg-black bg-opacity-50",
13867
+ "text-[var(--color-foreground)] bg-[var(--color-card)]",
13868
13868
  "hover:bg-opacity-70 transition-opacity",
13869
13869
  "focus:outline-none focus:ring-2 focus:ring-white"
13870
13870
  ),
@@ -13883,7 +13883,7 @@ var Lightbox = ({
13883
13883
  className: cn(
13884
13884
  "absolute left-4 z-10",
13885
13885
  "p-2 rounded-full",
13886
- "text-white bg-black bg-opacity-50",
13886
+ "text-[var(--color-foreground)] bg-[var(--color-card)]",
13887
13887
  "hover:bg-opacity-70 transition-opacity",
13888
13888
  "focus:outline-none focus:ring-2 focus:ring-white"
13889
13889
  ),
@@ -13920,7 +13920,7 @@ var Lightbox = ({
13920
13920
  className: cn(
13921
13921
  "absolute right-4 z-10",
13922
13922
  "p-2 rounded-full",
13923
- "text-white bg-black bg-opacity-50",
13923
+ "text-[var(--color-foreground)] bg-[var(--color-card)]",
13924
13924
  "hover:bg-opacity-70 transition-opacity",
13925
13925
  "focus:outline-none focus:ring-2 focus:ring-white"
13926
13926
  ),
@@ -13929,12 +13929,12 @@ var Lightbox = ({
13929
13929
  }
13930
13930
  ),
13931
13931
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "absolute bottom-4 left-0 right-0 text-center", children: [
13932
- showCounter && safeImages.length > 1 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-white text-sm mb-1", children: [
13932
+ showCounter && safeImages.length > 1 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-[var(--color-foreground)] text-sm mb-1", children: [
13933
13933
  index + 1,
13934
13934
  " of ",
13935
13935
  safeImages.length
13936
13936
  ] }),
13937
- currentImage?.caption && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-white text-sm opacity-80 px-8", children: currentImage.caption })
13937
+ currentImage?.caption && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-[var(--color-foreground)] text-sm opacity-80 px-8", children: currentImage.caption })
13938
13938
  ] })
13939
13939
  ]
13940
13940
  }
@@ -29272,6 +29272,10 @@ var contextValue = {
29272
29272
  getById
29273
29273
  };
29274
29274
  React90.createContext(contextValue);
29275
+ var EntitySchemaContext = React90.createContext(null);
29276
+ function useEntitySchemaOptional() {
29277
+ return React90.useContext(EntitySchemaContext);
29278
+ }
29275
29279
  var ClientEffectConfigContext = React90.createContext(null);
29276
29280
  ClientEffectConfigContext.Provider;
29277
29281
 
@@ -29798,11 +29802,11 @@ var AuthLayout = ({
29798
29802
  children: [
29799
29803
  /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "absolute inset-0 bg-gradient-to-br from-primary-600/90 to-primary-800/90" }),
29800
29804
  /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "relative z-10", children: /* @__PURE__ */ jsxRuntime.jsxs(reactRouterDom.Link, { to: "/", className: "flex items-center gap-3", children: [
29801
- logo || /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "w-10 h-10 bg-white/20 rounded-xl flex items-center justify-center backdrop-blur", children: /* @__PURE__ */ jsxRuntime.jsx(
29805
+ logo || /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "w-10 h-10 bg-[var(--color-card)]/20 rounded-xl flex items-center justify-center backdrop-blur", children: /* @__PURE__ */ jsxRuntime.jsx(
29802
29806
  Typography,
29803
29807
  {
29804
29808
  variant: "body1",
29805
- className: "text-white font-bold text-lg",
29809
+ className: "text-[var(--color-foreground)] font-bold text-lg",
29806
29810
  children: appName.charAt(0).toUpperCase()
29807
29811
  }
29808
29812
  ) }),
@@ -29810,7 +29814,7 @@ var AuthLayout = ({
29810
29814
  Typography,
29811
29815
  {
29812
29816
  variant: "body1",
29813
- className: "text-2xl font-bold text-white",
29817
+ className: "text-2xl font-bold text-[var(--color-foreground)]",
29814
29818
  children: appName
29815
29819
  }
29816
29820
  )
@@ -29820,7 +29824,7 @@ var AuthLayout = ({
29820
29824
  Typography,
29821
29825
  {
29822
29826
  variant: "h1",
29823
- className: "text-4xl font-bold text-white leading-tight",
29827
+ className: "text-4xl font-bold text-[var(--color-foreground)] leading-tight",
29824
29828
  children: [
29825
29829
  "Welcome to ",
29826
29830
  appName
@@ -29831,27 +29835,27 @@ var AuthLayout = ({
29831
29835
  Typography,
29832
29836
  {
29833
29837
  variant: "body1",
29834
- className: "text-lg text-white/80 max-w-md",
29838
+ className: "text-lg text-[var(--color-foreground)]/80 max-w-md",
29835
29839
  children: "Sign in to access your dashboard and manage your account."
29836
29840
  }
29837
29841
  ),
29838
- /* @__PURE__ */ jsxRuntime.jsxs(Box, { className: "mt-12 p-6 bg-white/10 rounded-xl backdrop-blur", children: [
29842
+ /* @__PURE__ */ jsxRuntime.jsxs(Box, { className: "mt-12 p-6 bg-[var(--color-card)]/10 rounded-xl backdrop-blur", children: [
29839
29843
  /* @__PURE__ */ jsxRuntime.jsx(
29840
29844
  Typography,
29841
29845
  {
29842
29846
  variant: "body1",
29843
- className: "text-white/90 italic",
29847
+ className: "text-[var(--color-foreground)]/90 italic",
29844
29848
  children: '"This platform has transformed how we work. Highly recommended!"'
29845
29849
  }
29846
29850
  ),
29847
29851
  /* @__PURE__ */ jsxRuntime.jsxs(HStack, { className: "mt-4", gap: "sm", align: "center", children: [
29848
- /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "w-10 h-10 bg-white/20 rounded-full" }),
29852
+ /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "w-10 h-10 bg-[var(--color-card)]/20 rounded-full" }),
29849
29853
  /* @__PURE__ */ jsxRuntime.jsxs(VStack, { gap: "none", children: [
29850
29854
  /* @__PURE__ */ jsxRuntime.jsx(
29851
29855
  Typography,
29852
29856
  {
29853
29857
  variant: "body1",
29854
- className: "text-white font-medium",
29858
+ className: "text-[var(--color-foreground)] font-medium",
29855
29859
  children: "Jane Doe"
29856
29860
  }
29857
29861
  ),
@@ -29859,7 +29863,7 @@ var AuthLayout = ({
29859
29863
  Typography,
29860
29864
  {
29861
29865
  variant: "body1",
29862
- className: "text-white/60 text-sm",
29866
+ className: "text-[var(--color-foreground)]/60 text-sm",
29863
29867
  children: "CEO, Example Co."
29864
29868
  }
29865
29869
  )
@@ -29867,8 +29871,8 @@ var AuthLayout = ({
29867
29871
  ] })
29868
29872
  ] })
29869
29873
  ] }) }),
29870
- /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "absolute -bottom-32 -right-32 w-96 h-96 bg-white/5 rounded-full" }),
29871
- /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "absolute -top-16 -right-16 w-64 h-64 bg-white/5 rounded-full" })
29874
+ /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "absolute -bottom-32 -right-32 w-96 h-96 bg-[var(--color-card)]/5 rounded-full" }),
29875
+ /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "absolute -top-16 -right-16 w-64 h-64 bg-[var(--color-card)]/5 rounded-full" })
29872
29876
  ]
29873
29877
  }
29874
29878
  ),
@@ -29885,7 +29889,7 @@ var AuthLayout = ({
29885
29889
  Typography,
29886
29890
  {
29887
29891
  variant: "body1",
29888
- className: "text-white font-bold text-xl",
29892
+ className: "text-[var(--color-foreground)] font-bold text-xl",
29889
29893
  children: appName.charAt(0).toUpperCase()
29890
29894
  }
29891
29895
  ) }),
@@ -32388,6 +32392,254 @@ function onDebugToggle(listener) {
32388
32392
  listeners5.add(listener);
32389
32393
  return () => listeners5.delete(listener);
32390
32394
  }
32395
+ function layoutGraph(states, transitions, initialState, width, height) {
32396
+ if (states.length === 0) return [];
32397
+ const layers = /* @__PURE__ */ new Map();
32398
+ const queue = [initialState];
32399
+ layers.set(initialState, 0);
32400
+ while (queue.length > 0) {
32401
+ const current = queue.shift();
32402
+ const layer = layers.get(current);
32403
+ for (const tr of transitions) {
32404
+ if (tr.from === current && !layers.has(tr.to)) {
32405
+ layers.set(tr.to, layer + 1);
32406
+ queue.push(tr.to);
32407
+ }
32408
+ }
32409
+ }
32410
+ for (const s of states) {
32411
+ if (!layers.has(s)) layers.set(s, layers.size > 0 ? Math.max(...layers.values()) + 1 : 0);
32412
+ }
32413
+ const layerGroups = /* @__PURE__ */ new Map();
32414
+ for (const [state, layer] of layers) {
32415
+ const group = layerGroups.get(layer) ?? [];
32416
+ group.push(state);
32417
+ layerGroups.set(layer, group);
32418
+ }
32419
+ const maxLayer = Math.max(...layerGroups.keys(), 0);
32420
+ const padX = 24;
32421
+ const padY = 20;
32422
+ const usableW = width - padX * 2;
32423
+ const usableH = height - padY * 2;
32424
+ const positions = [];
32425
+ for (const [layer, group] of layerGroups) {
32426
+ const y = maxLayer === 0 ? usableH / 2 + padY : padY + layer / maxLayer * usableH;
32427
+ for (let i = 0; i < group.length; i++) {
32428
+ const x = group.length === 1 ? width / 2 : padX + i / (group.length - 1) * usableW;
32429
+ positions.push({ x, y, state: group[i] });
32430
+ }
32431
+ }
32432
+ return positions;
32433
+ }
32434
+ function WalkMinimap() {
32435
+ const [walkStep, setWalkStep] = React90__namespace.useState(null);
32436
+ const [traits2, setTraits] = React90__namespace.useState([]);
32437
+ const [coveredEdges, setCoveredEdges] = React90__namespace.useState([]);
32438
+ const [completedTraits, setCompletedTraits] = React90__namespace.useState(/* @__PURE__ */ new Set());
32439
+ const prevTraitRef = React90__namespace.useRef(null);
32440
+ React90__namespace.useEffect(() => {
32441
+ const interval = setInterval(() => {
32442
+ const w = window;
32443
+ const step = w.__orbitalWalkStep;
32444
+ const traitConfigs = w.__orbitalWalkTraits;
32445
+ const edges = w.__orbitalCoveredEdges;
32446
+ if (step) setWalkStep(step);
32447
+ if (traitConfigs) setTraits(traitConfigs);
32448
+ if (edges) setCoveredEdges(edges);
32449
+ if (step && prevTraitRef.current && prevTraitRef.current !== step.traitName) {
32450
+ setCompletedTraits((prev) => new Set(prev).add(prevTraitRef.current));
32451
+ }
32452
+ if (step) prevTraitRef.current = step.traitName;
32453
+ }, 250);
32454
+ return () => clearInterval(interval);
32455
+ }, []);
32456
+ if (!walkStep || traits2.length === 0) return null;
32457
+ const activeTrait = traits2.find((t) => t.name === walkStep.traitName);
32458
+ const engineCount = coveredEdges.filter((e) => e.phase === "engine").length;
32459
+ const domCount = coveredEdges.filter((e) => e.phase === "dom").length;
32460
+ const totalTransitions = traits2.reduce((sum, t) => sum + t.transitions.length, 0);
32461
+ const activeEdgeKeys = new Set(
32462
+ coveredEdges.filter((e) => e.trait === walkStep.traitName).map((e) => `${e.from}+${e.event}->${e.to}`)
32463
+ );
32464
+ const activeEdgePhases = new Map(
32465
+ coveredEdges.filter((e) => e.trait === walkStep.traitName).map((e) => [`${e.from}+${e.event}->${e.to}`, e.phase])
32466
+ );
32467
+ const currentEdgeKey = `${walkStep.from}+${walkStep.event}->${walkStep.to}`;
32468
+ const graphW = 260;
32469
+ const graphH = 120;
32470
+ const nodeR = 10;
32471
+ const positions = activeTrait ? layoutGraph(activeTrait.states, activeTrait.transitions, activeTrait.initialState, graphW, graphH) : [];
32472
+ const posMap = new Map(positions.map((p2) => [p2.state, p2]));
32473
+ const visitedStates = new Set(
32474
+ coveredEdges.filter((e) => e.trait === walkStep.traitName).flatMap((e) => [e.from, e.to])
32475
+ );
32476
+ return /* @__PURE__ */ jsxRuntime.jsxs(VStack, { gap: "none", className: "w-64 flex-shrink-0 border-l border-border bg-[var(--color-card)] overflow-hidden", children: [
32477
+ /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "px-2 py-1.5 border-b border-border overflow-x-auto", children: /* @__PURE__ */ jsxRuntime.jsx(HStack, { gap: "xs", className: "flex-nowrap", children: traits2.map((t) => {
32478
+ const isDone = completedTraits.has(t.name);
32479
+ const isActive = t.name === walkStep.traitName;
32480
+ const variant = isDone ? "success" : isActive ? "info" : "neutral";
32481
+ const shortName = t.name.replace(/^[A-Z][a-z]+/, "");
32482
+ return /* @__PURE__ */ jsxRuntime.jsxs(
32483
+ Badge,
32484
+ {
32485
+ variant,
32486
+ size: "sm",
32487
+ className: `flex-shrink-0 text-[9px] ${isActive ? "ring-1 ring-cyan-400" : ""}`,
32488
+ children: [
32489
+ isDone ? "\u2713" : isActive ? "\u25CF" : "\u25CB",
32490
+ " ",
32491
+ shortName || t.name
32492
+ ]
32493
+ },
32494
+ t.name
32495
+ );
32496
+ }) }) }),
32497
+ /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "flex-1 flex items-center justify-center px-1 py-1", children: activeTrait && /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: graphW, height: graphH, viewBox: `0 0 ${graphW} ${graphH}`, children: [
32498
+ /* @__PURE__ */ jsxRuntime.jsxs("defs", { children: [
32499
+ /* @__PURE__ */ jsxRuntime.jsx("marker", { id: "mm-arrow", markerWidth: "6", markerHeight: "4", refX: "6", refY: "2", orient: "auto", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M0,0 L6,2 L0,4", fill: "#888" }) }),
32500
+ /* @__PURE__ */ jsxRuntime.jsx("marker", { id: "mm-arrow-green", markerWidth: "6", markerHeight: "4", refX: "6", refY: "2", orient: "auto", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M0,0 L6,2 L0,4", fill: "#22c55e" }) }),
32501
+ /* @__PURE__ */ jsxRuntime.jsx("marker", { id: "mm-arrow-cyan", markerWidth: "6", markerHeight: "4", refX: "6", refY: "2", orient: "auto", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M0,0 L6,2 L0,4", fill: "#06b6d4" }) }),
32502
+ /* @__PURE__ */ jsxRuntime.jsx("marker", { id: "mm-arrow-yellow", markerWidth: "6", markerHeight: "4", refX: "6", refY: "2", orient: "auto", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M0,0 L6,2 L0,4", fill: "#eab308" }) })
32503
+ ] }),
32504
+ activeTrait.transitions.map((tr, i) => {
32505
+ const fromPos = posMap.get(tr.from);
32506
+ const toPos = posMap.get(tr.to);
32507
+ if (!fromPos || !toPos) return null;
32508
+ const key = `${tr.from}+${tr.event}->${tr.to}`;
32509
+ const isCurrent = key === currentEdgeKey && !walkStep.isRepositioning;
32510
+ const isCovered = activeEdgeKeys.has(key);
32511
+ const phase = activeEdgePhases.get(key);
32512
+ let stroke = "#555";
32513
+ let markerEnd = "url(#mm-arrow)";
32514
+ let strokeWidth = 1;
32515
+ let opacity = 0.4;
32516
+ if (isCurrent) {
32517
+ stroke = "#eab308";
32518
+ markerEnd = "url(#mm-arrow-yellow)";
32519
+ strokeWidth = 2.5;
32520
+ opacity = 1;
32521
+ } else if (isCovered && phase === "dom") {
32522
+ stroke = "#06b6d4";
32523
+ markerEnd = "url(#mm-arrow-cyan)";
32524
+ strokeWidth = 1.5;
32525
+ opacity = 0.9;
32526
+ } else if (isCovered) {
32527
+ stroke = "#22c55e";
32528
+ markerEnd = "url(#mm-arrow-green)";
32529
+ strokeWidth = 1.5;
32530
+ opacity = 0.9;
32531
+ }
32532
+ if (tr.from === tr.to) {
32533
+ const cx = fromPos.x;
32534
+ const cy = fromPos.y - nodeR - 8;
32535
+ return /* @__PURE__ */ jsxRuntime.jsxs("g", { children: [
32536
+ /* @__PURE__ */ jsxRuntime.jsx(
32537
+ "path",
32538
+ {
32539
+ d: `M${cx - 5},${fromPos.y - nodeR} C${cx - 18},${cy - 14} ${cx + 18},${cy - 14} ${cx + 5},${fromPos.y - nodeR}`,
32540
+ fill: "none",
32541
+ stroke,
32542
+ strokeWidth,
32543
+ opacity,
32544
+ markerEnd
32545
+ }
32546
+ ),
32547
+ /* @__PURE__ */ jsxRuntime.jsx("text", { x: cx, y: cy - 12, textAnchor: "middle", fontSize: "7", fill: stroke, opacity, children: tr.event.length > 10 ? tr.event.slice(0, 8) + ".." : tr.event })
32548
+ ] }, `e-${i}`);
32549
+ }
32550
+ const dx = toPos.x - fromPos.x;
32551
+ const dy = toPos.y - fromPos.y;
32552
+ const len = Math.sqrt(dx * dx + dy * dy) || 1;
32553
+ const nx = -dy / len;
32554
+ const ny = dx / len;
32555
+ const hasReverse = activeTrait.transitions.some(
32556
+ (t2) => t2.from === tr.to && t2.to === tr.from
32557
+ );
32558
+ const offset = hasReverse ? 4 : 0;
32559
+ const x1 = fromPos.x + dx / len * nodeR + nx * offset;
32560
+ const y1 = fromPos.y + dy / len * nodeR + ny * offset;
32561
+ const x2 = toPos.x - dx / len * (nodeR + 6) + nx * offset;
32562
+ const y2 = toPos.y - dy / len * (nodeR + 6) + ny * offset;
32563
+ const mx = (x1 + x2) / 2 + nx * 8;
32564
+ const my = (y1 + y2) / 2 + ny * 8;
32565
+ return /* @__PURE__ */ jsxRuntime.jsxs("g", { children: [
32566
+ /* @__PURE__ */ jsxRuntime.jsx(
32567
+ "line",
32568
+ {
32569
+ x1,
32570
+ y1,
32571
+ x2,
32572
+ y2,
32573
+ stroke,
32574
+ strokeWidth,
32575
+ opacity,
32576
+ markerEnd,
32577
+ children: isCurrent && /* @__PURE__ */ jsxRuntime.jsx("animate", { attributeName: "opacity", values: "1;0.4;1", dur: "0.8s", repeatCount: "indefinite" })
32578
+ }
32579
+ ),
32580
+ /* @__PURE__ */ jsxRuntime.jsx("text", { x: mx, y: my, textAnchor: "middle", fontSize: "7", fill: stroke, opacity: Math.min(opacity + 0.2, 1), children: tr.event.length > 12 ? tr.event.slice(0, 10) + ".." : tr.event })
32581
+ ] }, `e-${i}`);
32582
+ }),
32583
+ positions.map((pos) => {
32584
+ const isCurrentState = pos.state === walkStep.from || pos.state === walkStep.to;
32585
+ const isVisited = visitedStates.has(pos.state);
32586
+ const isInitial = pos.state === activeTrait.initialState;
32587
+ let fill = "#333";
32588
+ let strokeColor = "#555";
32589
+ let sw = 1;
32590
+ if (isCurrentState) {
32591
+ fill = "#1e40af";
32592
+ strokeColor = "#3b82f6";
32593
+ sw = 2;
32594
+ } else if (isVisited) {
32595
+ fill = "#166534";
32596
+ strokeColor = "#22c55e";
32597
+ sw = 1.5;
32598
+ }
32599
+ return /* @__PURE__ */ jsxRuntime.jsxs("g", { children: [
32600
+ isInitial && /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: pos.x, cy: pos.y, r: nodeR + 3, fill: "none", stroke: "#3b82f6", strokeWidth: 1, opacity: 0.4 }),
32601
+ /* @__PURE__ */ jsxRuntime.jsx(
32602
+ "circle",
32603
+ {
32604
+ cx: pos.x,
32605
+ cy: pos.y,
32606
+ r: nodeR,
32607
+ fill,
32608
+ stroke: strokeColor,
32609
+ strokeWidth: sw,
32610
+ children: isCurrentState && /* @__PURE__ */ jsxRuntime.jsx("animate", { attributeName: "r", values: `${nodeR};${nodeR + 2};${nodeR}`, dur: "1s", repeatCount: "indefinite" })
32611
+ }
32612
+ ),
32613
+ /* @__PURE__ */ jsxRuntime.jsx(
32614
+ "text",
32615
+ {
32616
+ x: pos.x,
32617
+ y: pos.y + nodeR + 10,
32618
+ textAnchor: "middle",
32619
+ fontSize: "8",
32620
+ fill: "#aaa",
32621
+ children: pos.state.length > 10 ? pos.state.slice(0, 8) + ".." : pos.state
32622
+ }
32623
+ )
32624
+ ] }, pos.state);
32625
+ })
32626
+ ] }) }),
32627
+ /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "px-2 py-1 border-t border-border", children: /* @__PURE__ */ jsxRuntime.jsxs(HStack, { gap: "sm", className: "items-center justify-between", children: [
32628
+ /* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "caption", className: "text-[10px] font-mono text-green-500", children: [
32629
+ "Engine: ",
32630
+ engineCount,
32631
+ "/",
32632
+ totalTransitions
32633
+ ] }),
32634
+ domCount > 0 && /* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "caption", className: "text-[10px] font-mono text-cyan-500", children: [
32635
+ "DOM: ",
32636
+ domCount
32637
+ ] }),
32638
+ /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: walkStep.phase === "engine" ? "info" : "warning", size: "sm", className: "text-[9px]", children: walkStep.phase === "engine" ? "Engine" : "DOM" })
32639
+ ] }) })
32640
+ ] });
32641
+ }
32642
+ WalkMinimap.displayName = "WalkMinimap";
32391
32643
  function TraitsTab({ traits: traits2 }) {
32392
32644
  if (traits2.length === 0) {
32393
32645
  return /* @__PURE__ */ jsxRuntime.jsx(
@@ -33211,25 +33463,25 @@ function EventDispatcherTab({ traits: traits2, schema }) {
33211
33463
  EventDispatcherTab.displayName = "EventDispatcherTab";
33212
33464
  function ServerResponseRow({ sr }) {
33213
33465
  const entityEntries = Object.entries(sr.dataEntities);
33214
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ml-4 pl-2 border-l border-purple-700/50 py-0.5 text-[10px] font-mono", children: [
33466
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ml-4 pl-2 border-l border-purple-500/30 py-0.5 text-[10px] font-mono", children: [
33215
33467
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
33216
- /* @__PURE__ */ jsxRuntime.jsxs("span", { className: sr.success ? "text-green-400" : "text-red-400", children: [
33468
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: sr.success ? "text-green-600 dark:text-green-400" : "text-red-600 dark:text-red-400", children: [
33217
33469
  sr.success ? "\u2713" : "\u2717",
33218
33470
  " server"
33219
33471
  ] }),
33220
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-purple-300", children: sr.orbitalName }),
33221
- sr.clientEffects > 0 && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "px-1 rounded bg-purple-900/50 text-purple-300", children: [
33472
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-purple-600 dark:text-purple-300", children: sr.orbitalName }),
33473
+ sr.clientEffects > 0 && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "px-1 rounded bg-purple-500/15 text-purple-600 dark:text-purple-300", children: [
33222
33474
  sr.clientEffects,
33223
33475
  " clientEffect",
33224
33476
  sr.clientEffects !== 1 ? "s" : ""
33225
33477
  ] }),
33226
- sr.emittedEvents.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "px-1 rounded bg-blue-900/50 text-blue-300", children: [
33478
+ sr.emittedEvents.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "px-1 rounded bg-blue-500/15 text-blue-300", children: [
33227
33479
  "emit: ",
33228
33480
  sr.emittedEvents.join(", ")
33229
33481
  ] }),
33230
- sr.error && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "px-1 rounded bg-red-900/50 text-red-400 truncate max-w-[300px]", children: sr.error })
33482
+ sr.error && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "px-1 rounded bg-red-500/15 text-red-600 dark:text-red-400 truncate max-w-[300px]", children: sr.error })
33231
33483
  ] }),
33232
- entityEntries.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-wrap gap-1 mt-0.5", children: entityEntries.map(([name, count]) => /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "px-1 rounded bg-gray-800 text-gray-300", children: [
33484
+ entityEntries.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-wrap gap-1 mt-0.5", children: entityEntries.map(([name, count]) => /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "px-1 rounded bg-[var(--color-card)] text-foreground", children: [
33233
33485
  name,
33234
33486
  ": ",
33235
33487
  count,
@@ -33242,24 +33494,24 @@ function TransitionRow({ trace }) {
33242
33494
  const isServerEntry = !!trace.serverResponse && trace.traitName.startsWith("server:");
33243
33495
  const hasFailedEffects = trace.effects.some((e) => e.status === "failed");
33244
33496
  if (isServerEntry && trace.serverResponse) {
33245
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "py-0.5 border-b border-gray-800 last:border-0", children: [
33497
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "py-0.5 border-b border-border last:border-0", children: [
33246
33498
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-2 text-xs font-mono", children: [
33247
33499
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "mt-1.5 w-1.5 h-1.5 rounded-full flex-shrink-0 bg-purple-500" }),
33248
33500
  /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: "warning", size: "sm", className: "flex-shrink-0", children: trace.event }),
33249
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-purple-400 flex-shrink-0", children: "server response" })
33501
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-purple-600 dark:text-purple-400 flex-shrink-0", children: "server response" })
33250
33502
  ] }),
33251
33503
  /* @__PURE__ */ jsxRuntime.jsx(ServerResponseRow, { sr: trace.serverResponse })
33252
33504
  ] });
33253
33505
  }
33254
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "py-0.5 border-b border-gray-800 last:border-0", children: [
33506
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "py-0.5 border-b border-border last:border-0", children: [
33255
33507
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-2 text-xs font-mono", children: [
33256
33508
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn(
33257
33509
  "mt-1.5 w-1.5 h-1.5 rounded-full flex-shrink-0",
33258
33510
  hasFailedEffects ? "bg-red-500" : "bg-green-500"
33259
33511
  ) }),
33260
33512
  /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: "info", size: "sm", className: "flex-shrink-0", children: trace.event }),
33261
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-gray-300 flex-shrink-0", children: trace.traitName }),
33262
- /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-gray-400 flex-shrink-0", children: [
33513
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-foreground flex-shrink-0", children: trace.traitName }),
33514
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-foreground/70 flex-shrink-0", children: [
33263
33515
  trace.from,
33264
33516
  " ",
33265
33517
  "\u2192",
@@ -33269,12 +33521,12 @@ function TransitionRow({ trace }) {
33269
33521
  ] }),
33270
33522
  trace.effects.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-wrap gap-1 ml-6 mt-0.5", children: trace.effects.map((eff, i) => /* @__PURE__ */ jsxRuntime.jsxs("span", { className: cn(
33271
33523
  "px-1 rounded text-[10px]",
33272
- eff.status === "executed" ? "bg-green-900/50 text-green-400" : eff.status === "failed" ? "bg-red-900/50 text-red-400" : "bg-yellow-900/50 text-yellow-400"
33524
+ eff.status === "executed" ? "bg-green-500/15 text-green-600 dark:text-green-400" : eff.status === "failed" ? "bg-red-500/15 text-red-600 dark:text-red-400" : "bg-yellow-500/15 text-yellow-600 dark:text-yellow-400"
33273
33525
  ), children: [
33274
33526
  eff.status === "executed" ? "\u2713" : eff.status === "failed" ? "\u2717" : "-",
33275
33527
  " ",
33276
33528
  eff.type,
33277
- eff.args.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-gray-500 ml-0.5", children: JSON.stringify(eff.args).slice(0, 40) })
33529
+ eff.args.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-foreground/50 ml-0.5", children: JSON.stringify(eff.args).slice(0, 40) })
33278
33530
  ] }, i)) }),
33279
33531
  trace.serverResponse && /* @__PURE__ */ jsxRuntime.jsx(ServerResponseRow, { sr: trace.serverResponse })
33280
33532
  ] });
@@ -33289,15 +33541,6 @@ function VerifyModePanel({
33289
33541
  }) {
33290
33542
  const scrollRef = React90__namespace.useRef(null);
33291
33543
  const prevCountRef = React90__namespace.useRef(0);
33292
- const [walkStep, setWalkStep] = React90__namespace.useState(null);
33293
- React90__namespace.useEffect(() => {
33294
- const interval = setInterval(() => {
33295
- const w = window;
33296
- const step = w.__orbitalWalkStep;
33297
- if (step) setWalkStep(step);
33298
- }, 300);
33299
- return () => clearInterval(interval);
33300
- }, []);
33301
33544
  React90__namespace.useEffect(() => {
33302
33545
  if (transitions.length > prevCountRef.current && scrollRef.current) {
33303
33546
  scrollRef.current.scrollTop = scrollRef.current.scrollHeight;
@@ -33310,49 +33553,28 @@ function VerifyModePanel({
33310
33553
  {
33311
33554
  className: cn(
33312
33555
  "runtime-debugger runtime-debugger--verify",
33313
- "flex flex-col bg-gray-900 text-white border-t-2 border-cyan-500",
33556
+ "flex flex-col bg-[var(--color-card)] text-[var(--color-foreground)] border-t-2 border-cyan-500",
33314
33557
  hudBottom ? "" : "fixed bottom-0 left-0 right-0",
33315
33558
  className
33316
33559
  ),
33317
33560
  "data-testid": "debugger-verify",
33318
33561
  style: { height: "25vh", zIndex: hudBottom ? void 0 : 40 },
33319
33562
  children: [
33320
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "px-3 py-1.5 flex items-center gap-3 text-xs font-mono border-b border-gray-700 flex-shrink-0", children: [
33563
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "px-3 py-1.5 flex items-center gap-3 text-xs font-mono border-b border-border flex-shrink-0", children: [
33321
33564
  /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: failedChecks > 0 ? "danger" : "success", size: "sm", children: failedChecks > 0 ? `${failedChecks} fail` : "OK" }),
33322
- /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-gray-400", children: [
33565
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-foreground/70", children: [
33323
33566
  localCount,
33324
33567
  " local"
33325
33568
  ] }),
33326
- /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-purple-400", children: [
33569
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-purple-600 dark:text-purple-400", children: [
33327
33570
  serverCount,
33328
33571
  " server"
33329
33572
  ] }),
33330
- traitStates && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-cyan-400 truncate max-w-[400px]", children: traitStates })
33573
+ traitStates && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-cyan-600 dark:text-cyan-400 truncate max-w-[400px]", children: traitStates })
33331
33574
  ] }),
33332
33575
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 flex overflow-hidden", children: [
33333
- /* @__PURE__ */ jsxRuntime.jsx("div", { ref: scrollRef, className: "flex-1 overflow-y-auto", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-2 py-1", children: transitions.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-gray-500 text-xs font-mono py-2 text-center", children: "Waiting for transitions..." }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-0.5", children: transitions.map((trace) => /* @__PURE__ */ jsxRuntime.jsx(TransitionRow, { trace }, trace.id)) }) }) }),
33334
- walkStep && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "w-56 flex-shrink-0 border-l border-gray-700 px-2 py-1 text-xs font-mono overflow-y-auto", children: [
33335
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-cyan-400 font-bold mb-1", children: [
33336
- "Walk Step ",
33337
- walkStep.stepIndex,
33338
- "/",
33339
- walkStep.stepTotal
33340
- ] }),
33341
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-gray-300 mb-1", children: walkStep.traitName }),
33342
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1 mb-1", children: [
33343
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-yellow-300", children: walkStep.from }),
33344
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-gray-500", children: "--" }),
33345
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-green-300", children: walkStep.event }),
33346
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-gray-500", children: "-->" }),
33347
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-yellow-300", children: walkStep.to })
33348
- ] }),
33349
- walkStep.guardCase && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: walkStep.guardCase === "pass" ? "text-green-400" : "text-red-400", children: [
33350
- "guard: ",
33351
- walkStep.guardCase
33352
- ] }),
33353
- walkStep.isRepositioning && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-gray-500 italic", children: "repositioning" }),
33354
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: walkStep.accepted ? "text-green-400 mt-1" : "text-red-400 mt-1", children: walkStep.accepted ? "\u2713 accepted" : "\u2717 rejected" })
33355
- ] })
33576
+ /* @__PURE__ */ jsxRuntime.jsx("div", { ref: scrollRef, className: "flex-1 overflow-y-auto", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-2 py-1", children: transitions.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-foreground/50 text-xs font-mono py-2 text-center", children: "Waiting for transitions..." }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-0.5", children: transitions.map((trace) => /* @__PURE__ */ jsxRuntime.jsx(TransitionRow, { trace }, trace.id)) }) }) }),
33577
+ /* @__PURE__ */ jsxRuntime.jsx(WalkMinimap, {})
33356
33578
  ] })
33357
33579
  ]
33358
33580
  }
@@ -33577,7 +33799,7 @@ function RuntimeDebugger({
33577
33799
  className: "runtime-debugger__tabs"
33578
33800
  }
33579
33801
  ) }),
33580
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "runtime-debugger__footer", children: /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-gray-500", children: "Press ` to toggle | window.__orbitalVerification for automation" }) })
33802
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "runtime-debugger__footer", children: /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-foreground/50", children: "Press ` to toggle | window.__orbitalVerification for automation" }) })
33581
33803
  ] })
33582
33804
  }
33583
33805
  );
@@ -34288,6 +34510,62 @@ function getComponentForPattern(patternType) {
34288
34510
  if (!name) return null;
34289
34511
  return COMPONENT_REGISTRY[name] ?? null;
34290
34512
  }
34513
+ var FORM_PATTERNS = /* @__PURE__ */ new Set([
34514
+ "form",
34515
+ "form-section",
34516
+ "inline-edit-form",
34517
+ "wizard-step"
34518
+ ]);
34519
+ function enrichFormFields(fields, entityDef) {
34520
+ const fieldMap = new Map(entityDef.fields.map((f3) => [f3.name, f3]));
34521
+ return fields.map((field) => {
34522
+ if (typeof field === "string") {
34523
+ const entityField = fieldMap.get(field);
34524
+ if (entityField) {
34525
+ const enriched = {
34526
+ name: field,
34527
+ label: field.replace(/([a-z])([A-Z])/g, "$1 $2").replace(/\b\w/g, (c) => c.toUpperCase()),
34528
+ type: entityField.type,
34529
+ required: entityField.required
34530
+ };
34531
+ if (entityField.values && entityField.values.length > 0) {
34532
+ enriched.values = entityField.values;
34533
+ } else if (entityField.enumValues && entityField.enumValues.length > 0) {
34534
+ enriched.values = entityField.enumValues;
34535
+ }
34536
+ if (entityField.relation) {
34537
+ enriched.relation = entityField.relation;
34538
+ }
34539
+ return enriched;
34540
+ }
34541
+ return { name: field, label: field.replace(/([a-z])([A-Z])/g, "$1 $2").replace(/\b\w/g, (c) => c.toUpperCase()) };
34542
+ }
34543
+ if (field && typeof field === "object" && !Array.isArray(field)) {
34544
+ const obj = field;
34545
+ const fieldName = obj.name ?? obj.field;
34546
+ if (!fieldName) return field;
34547
+ if (obj.type || obj.inputType) return field;
34548
+ const entityField = fieldMap.get(fieldName);
34549
+ if (!entityField) return field;
34550
+ const enriched = { ...obj, type: entityField.type };
34551
+ if (entityField.required && !("required" in obj)) {
34552
+ enriched.required = true;
34553
+ }
34554
+ if (!obj.values && !obj.options) {
34555
+ if (entityField.values && entityField.values.length > 0) {
34556
+ enriched.values = entityField.values;
34557
+ } else if (entityField.enumValues && entityField.enumValues.length > 0) {
34558
+ enriched.values = entityField.enumValues;
34559
+ }
34560
+ }
34561
+ if (!obj.relation && entityField.relation) {
34562
+ enriched.relation = entityField.relation;
34563
+ }
34564
+ return enriched;
34565
+ }
34566
+ return field;
34567
+ });
34568
+ }
34291
34569
  var PATTERNS_WITH_CHILDREN = /* @__PURE__ */ new Set([
34292
34570
  "stack",
34293
34571
  "vstack",
@@ -34721,6 +34999,8 @@ function SlotContentRenderer({
34721
34999
  const entityProp = content.props.entity;
34722
35000
  const entityType = typeof entityProp === "string" ? entityProp : "";
34723
35001
  const storeData = useEntityRef(entityType);
35002
+ const schemaCtx = useEntitySchemaOptional();
35003
+ const entityDef = entityType && schemaCtx ? schemaCtx.entities.get(entityType) : void 0;
34724
35004
  const PatternComponent = getComponentForPattern(content.pattern);
34725
35005
  if (PatternComponent) {
34726
35006
  const childrenConfig = content.props.children;
@@ -34742,6 +35022,13 @@ function SlotContentRenderer({
34742
35022
  } else {
34743
35023
  finalProps = renderedProps;
34744
35024
  }
35025
+ const isFormPattern = FORM_PATTERNS.has(content.pattern) || content.pattern.includes("form");
35026
+ if (isFormPattern && entityDef && Array.isArray(finalProps.fields)) {
35027
+ finalProps.fields = enrichFormFields(finalProps.fields, entityDef);
35028
+ if (finalProps.mode === "edit" && !finalProps.initialData && storeData.length > 0) {
35029
+ finalProps.initialData = storeData[0];
35030
+ }
35031
+ }
34745
35032
  const acceptsChildren = PATTERNS_WITH_CHILDREN.has(content.pattern);
34746
35033
  return /* @__PURE__ */ jsxRuntime.jsx(
34747
35034
  Box,