@almadar/ui 2.43.0 → 2.46.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.
@@ -4040,9 +4040,9 @@ var shapeMap = {
4040
4040
  square: "rounded-md"
4041
4041
  };
4042
4042
  var variantMap = {
4043
- primary: "bg-blue-600 text-white border-blue-400 hover:bg-blue-500",
4044
- secondary: "bg-gray-700 text-white border-gray-500 hover:bg-gray-600",
4045
- ghost: "bg-transparent text-white border-white/30 hover:bg-white/10"
4043
+ primary: "bg-blue-600 text-[var(--color-foreground)] border-blue-400 hover:bg-blue-500",
4044
+ secondary: "bg-[var(--color-surface,#374151)] text-[var(--color-foreground)] border-gray-500 hover:bg-gray-600",
4045
+ ghost: "bg-transparent text-[var(--color-foreground)] border-white/30 hover:bg-white/10"
4046
4046
  };
4047
4047
  function ControlButton({
4048
4048
  label,
@@ -4307,11 +4307,11 @@ function TimerDisplay({
4307
4307
  {
4308
4308
  className: cn(
4309
4309
  "inline-flex items-center justify-center rounded-lg",
4310
- "bg-gray-800/80 border border-gray-600 font-mono font-bold tabular-nums",
4310
+ "bg-[var(--color-card)]/80 border border-gray-600 font-mono font-bold tabular-nums",
4311
4311
  sizeMap4[size],
4312
4312
  running && "border-green-500/50",
4313
4313
  isLow && "text-red-400 border-red-500/50 animate-pulse",
4314
- !isLow && "text-white",
4314
+ !isLow && "text-[var(--color-foreground)]",
4315
4315
  className
4316
4316
  ),
4317
4317
  children: formatTime(seconds, format)
@@ -4339,7 +4339,7 @@ function ResourceCounter({
4339
4339
  {
4340
4340
  className: cn(
4341
4341
  "inline-flex items-center rounded-md",
4342
- "bg-gray-800/80 border border-gray-600 font-medium text-white",
4342
+ "bg-[var(--color-card)]/80 border border-gray-600 font-medium text-[var(--color-foreground)]",
4343
4343
  sizes.wrapper,
4344
4344
  className
4345
4345
  ),
@@ -4398,9 +4398,9 @@ function ItemSlot({
4398
4398
  title: label,
4399
4399
  className: cn(
4400
4400
  "relative flex items-center justify-center rounded-lg border-2",
4401
- "bg-gray-800/80 transition-all duration-150",
4401
+ "bg-[var(--color-card)]/80 transition-all duration-150",
4402
4402
  sizeMap6[size],
4403
- empty ? "border-gray-700 bg-gray-900/50" : rarityBorderMap[rarity],
4403
+ empty ? "border-gray-700 bg-[var(--color-card)]/50" : rarityBorderMap[rarity],
4404
4404
  !empty && rarityGlowMap[rarity],
4405
4405
  selected && "ring-2 ring-white ring-offset-1 ring-offset-gray-900",
4406
4406
  isClickable && !empty && "hover:brightness-125 cursor-pointer",
@@ -4416,7 +4416,7 @@ function ItemSlot({
4416
4416
  className: cn(
4417
4417
  "absolute -bottom-1 -right-1 flex items-center justify-center",
4418
4418
  "min-w-[18px] h-[18px] rounded-full px-1",
4419
- "bg-gray-700 border border-gray-500 text-[10px] font-bold text-white"
4419
+ "bg-[var(--color-surface,#374151)] border border-gray-500 text-[10px] font-bold text-[var(--color-foreground)]"
4420
4420
  ),
4421
4421
  children: quantity
4422
4422
  }
@@ -4445,7 +4445,7 @@ function TurnIndicator({
4445
4445
  {
4446
4446
  className: cn(
4447
4447
  "inline-flex items-center rounded-lg",
4448
- "bg-gray-800/80 border border-gray-600 font-medium text-white",
4448
+ "bg-[var(--color-card)]/80 border border-gray-600 font-medium text-[var(--color-foreground)]",
4449
4449
  sizes.wrapper,
4450
4450
  className
4451
4451
  ),
@@ -4481,7 +4481,7 @@ function getComboIntensity(combo) {
4481
4481
  if (combo >= 10) return "text-red-400 animate-pulse";
4482
4482
  if (combo >= 7) return "text-orange-400";
4483
4483
  if (combo >= 4) return "text-yellow-400";
4484
- return "text-white";
4484
+ return "text-[var(--color-foreground)]";
4485
4485
  }
4486
4486
  function getComboScale(combo) {
4487
4487
  if (combo >= 10) return "scale-110";
@@ -4502,7 +4502,7 @@ function ComboCounter({
4502
4502
  {
4503
4503
  className: cn(
4504
4504
  "inline-flex flex-col items-center justify-center",
4505
- "rounded-xl bg-gray-800/80 border border-gray-600 px-3 py-1.5",
4505
+ "rounded-xl bg-[var(--color-card)]/80 border border-gray-600 px-3 py-1.5",
4506
4506
  "transition-transform duration-200",
4507
4507
  getComboScale(combo),
4508
4508
  className
@@ -4703,7 +4703,7 @@ function StatusEffect({
4703
4703
  "span",
4704
4704
  {
4705
4705
  className: cn(
4706
- "absolute flex items-center justify-center rounded-full bg-white text-black font-bold leading-none",
4706
+ "absolute flex items-center justify-center rounded-full bg-[var(--color-card)] text-[var(--color-foreground)] font-bold leading-none",
4707
4707
  sizes.badge
4708
4708
  ),
4709
4709
  children: stacks
@@ -4782,7 +4782,7 @@ function DialogueBubble({
4782
4782
  ) }),
4783
4783
  /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-1 min-w-0", children: [
4784
4784
  speaker && /* @__PURE__ */ jsx("span", { className: "text-sm font-bold text-yellow-400", children: speaker }),
4785
- /* @__PURE__ */ jsx("span", { className: "text-sm text-white leading-relaxed", children: text })
4785
+ /* @__PURE__ */ jsx("span", { className: "text-sm text-[var(--color-foreground)] leading-relaxed", children: text })
4786
4786
  ] })
4787
4787
  ]
4788
4788
  }
@@ -4806,7 +4806,7 @@ function ChoiceButton({
4806
4806
  className: cn(
4807
4807
  "w-full text-left px-4 py-2.5 rounded-md border transition-all duration-150",
4808
4808
  "flex items-center gap-2",
4809
- 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",
4809
+ 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",
4810
4810
  disabled && "opacity-40 cursor-not-allowed hover:bg-white/5 hover:border-white/10",
4811
4811
  className
4812
4812
  ),
@@ -4862,7 +4862,7 @@ function ActionButton({
4862
4862
  disabled: isDisabled,
4863
4863
  onClick,
4864
4864
  className: cn(
4865
- "relative inline-flex items-center gap-1.5 rounded-md border font-medium text-white overflow-hidden transition-colors duration-150",
4865
+ "relative inline-flex items-center gap-1.5 rounded-md border font-medium text-[var(--color-foreground)] overflow-hidden transition-colors duration-150",
4866
4866
  sizes.button,
4867
4867
  variantStyles7[variant],
4868
4868
  isDisabled && "opacity-60 cursor-not-allowed",
@@ -8612,7 +8612,7 @@ var MarkdownContent = React90__default.memo(
8612
8612
  "th",
8613
8613
  {
8614
8614
  ...props,
8615
- className: "border border-gray-300 dark:border-gray-600 bg-gray-100 dark:bg-gray-800 px-4 py-2 text-left font-semibold",
8615
+ className: "border border-gray-300 dark:border-gray-600 bg-[var(--color-muted)] px-4 py-2 text-left font-semibold",
8616
8616
  children
8617
8617
  }
8618
8618
  );
@@ -8890,7 +8890,7 @@ var CodeBlock = React90__default.memo(
8890
8890
  {
8891
8891
  justify: "between",
8892
8892
  align: "center",
8893
- className: "px-3 py-2 bg-gray-800 rounded-t-lg border-b border-gray-700",
8893
+ className: "px-3 py-2 bg-[var(--color-card)] rounded-t-lg border-b border-gray-700",
8894
8894
  children: [
8895
8895
  showLanguageBadge && /* @__PURE__ */ jsx(Badge, { variant: "default", size: "sm", children: language }),
8896
8896
  showCopyButton && /* @__PURE__ */ jsx(
@@ -10115,7 +10115,7 @@ var sizeMap17 = {
10115
10115
  lg: "text-base px-4 py-2"
10116
10116
  };
10117
10117
  var variantMap2 = {
10118
- default: "bg-gray-800/80 border-gray-700",
10118
+ default: "bg-[var(--color-card)]/80 border-gray-700",
10119
10119
  primary: "bg-blue-900/80 border-blue-700",
10120
10120
  success: "bg-green-900/80 border-green-700",
10121
10121
  warning: "bg-yellow-900/80 border-yellow-700",
@@ -10176,7 +10176,7 @@ function StatBadge({
10176
10176
  animated: true
10177
10177
  }
10178
10178
  ),
10179
- format === "text" && /* @__PURE__ */ jsx("span", { className: "font-bold text-white", children: value })
10179
+ format === "text" && /* @__PURE__ */ jsx("span", { className: "font-bold text-[var(--color-foreground)]", children: value })
10180
10180
  ]
10181
10181
  }
10182
10182
  );
@@ -10519,7 +10519,7 @@ function HealthPanel({
10519
10519
  Box,
10520
10520
  {
10521
10521
  className: cn(
10522
- "rounded-lg bg-gray-900/90 border border-gray-700 backdrop-blur-sm",
10522
+ "rounded-lg bg-[var(--color-card)]/90 border border-gray-700 backdrop-blur-sm",
10523
10523
  sizes.padding,
10524
10524
  className
10525
10525
  ),
@@ -10621,7 +10621,7 @@ function ScoreBoard({
10621
10621
  Card,
10622
10622
  {
10623
10623
  className: cn(
10624
- "bg-gray-900/90 border-gray-700 backdrop-blur-sm",
10624
+ "bg-[var(--color-card)]/90 border-gray-700 backdrop-blur-sm",
10625
10625
  className
10626
10626
  ),
10627
10627
  children: /* @__PURE__ */ jsx(CardContent, { className: "p-3", children: /* @__PURE__ */ jsxs(Box, { className: "flex items-center gap-3 flex-wrap", children: [
@@ -10720,7 +10720,7 @@ function TurnPanel({
10720
10720
  Box,
10721
10721
  {
10722
10722
  className: cn(
10723
- "flex items-center gap-3 rounded-lg bg-gray-900/90 border border-gray-700 backdrop-blur-sm px-3 py-2",
10723
+ "flex items-center gap-3 rounded-lg bg-[var(--color-card)]/90 border border-gray-700 backdrop-blur-sm px-3 py-2",
10724
10724
  className
10725
10725
  ),
10726
10726
  children: [
@@ -10767,7 +10767,7 @@ function EnemyPlate({
10767
10767
  Box,
10768
10768
  {
10769
10769
  className: cn(
10770
- "inline-flex flex-col gap-1 rounded-lg bg-gray-900/90 border border-gray-700 backdrop-blur-sm px-3 py-1.5",
10770
+ "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",
10771
10771
  "min-w-[120px]",
10772
10772
  className
10773
10773
  ),
@@ -10778,7 +10778,7 @@ function EnemyPlate({
10778
10778
  {
10779
10779
  variant: "caption",
10780
10780
  weight: "bold",
10781
- className: "text-white truncate",
10781
+ className: "text-[var(--color-foreground)] truncate",
10782
10782
  children: name
10783
10783
  }
10784
10784
  ),
@@ -10845,7 +10845,7 @@ function UnitCommandBar({
10845
10845
  Box,
10846
10846
  {
10847
10847
  className: cn(
10848
- "flex items-center gap-1.5 rounded-lg bg-gray-900/90 border border-gray-700 backdrop-blur-sm px-2 py-1.5",
10848
+ "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",
10849
10849
  className
10850
10850
  ),
10851
10851
  children: commands.map((command, i) => /* @__PURE__ */ jsxs(Box, { className: "flex flex-col items-center gap-0.5", children: [
@@ -11072,7 +11072,7 @@ function DialogueBox({
11072
11072
  tabIndex: 0,
11073
11073
  role: "dialog",
11074
11074
  "aria-label": "Dialogue",
11075
- children: /* @__PURE__ */ jsx("div", { className: "mx-4 my-4 bg-gray-900 bg-opacity-95 border-2 border-gray-600 rounded-lg overflow-hidden", children: /* @__PURE__ */ jsxs("div", { className: "flex", children: [
11075
+ children: /* @__PURE__ */ 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__ */ jsxs("div", { className: "flex", children: [
11076
11076
  dialogue.portrait && /* @__PURE__ */ jsx("div", { className: "flex-shrink-0 p-4 border-r border-gray-700", children: /* @__PURE__ */ jsx(
11077
11077
  "img",
11078
11078
  {
@@ -11084,7 +11084,7 @@ function DialogueBox({
11084
11084
  ) }),
11085
11085
  /* @__PURE__ */ jsxs("div", { className: "flex-1 p-4", children: [
11086
11086
  /* @__PURE__ */ jsx("div", { className: "text-yellow-400 font-bold mb-2", children: dialogue.speaker }),
11087
- /* @__PURE__ */ jsxs("div", { className: "text-white text-lg leading-relaxed min-h-[60px]", children: [
11087
+ /* @__PURE__ */ jsxs("div", { className: "text-[var(--color-foreground)] text-lg leading-relaxed min-h-[60px]", children: [
11088
11088
  displayedText,
11089
11089
  isTyping && /* @__PURE__ */ jsx("span", { className: "animate-pulse", children: "\u258C" })
11090
11090
  ] }),
@@ -11094,8 +11094,8 @@ function DialogueBox({
11094
11094
  type: "button",
11095
11095
  className: cn(
11096
11096
  "block w-full text-left px-4 py-2 rounded transition-colors",
11097
- "hover:bg-gray-700 focus:outline-none focus:ring-2 focus:ring-yellow-400",
11098
- selectedChoice === index ? "bg-gray-700 text-yellow-400" : "bg-gray-800 text-white"
11097
+ "hover:bg-[var(--color-surface,#374151)] focus:outline-none focus:ring-2 focus:ring-yellow-400",
11098
+ selectedChoice === index ? "bg-[var(--color-surface,#374151)] text-yellow-400" : "bg-[var(--color-card)] text-[var(--color-foreground)]"
11099
11099
  ),
11100
11100
  onClick: (e) => {
11101
11101
  e.stopPropagation();
@@ -11288,7 +11288,7 @@ function InventoryPanel({
11288
11288
  /* @__PURE__ */ jsx(
11289
11289
  "div",
11290
11290
  {
11291
- className: "grid gap-1 bg-gray-900 p-2 rounded-lg border border-gray-700",
11291
+ className: "grid gap-1 bg-[var(--color-card)] p-2 rounded-lg border border-gray-700",
11292
11292
  style: {
11293
11293
  gridTemplateColumns: `repeat(${safeColumns}, ${slotSize}px)`,
11294
11294
  gridTemplateRows: `repeat(${rows}, ${slotSize}px)`
@@ -11299,9 +11299,9 @@ function InventoryPanel({
11299
11299
  type: "button",
11300
11300
  className: cn(
11301
11301
  "relative flex items-center justify-center",
11302
- "bg-gray-800 border rounded transition-colors",
11303
- "hover:bg-gray-700 focus:outline-none focus:ring-2 focus:ring-blue-500",
11304
- selectedSlot === index ? "border-yellow-400 bg-gray-700" : "border-gray-600"
11302
+ "bg-[var(--color-card)] border rounded transition-colors",
11303
+ "hover:bg-[var(--color-surface,#374151)] focus:outline-none focus:ring-2 focus:ring-blue-500",
11304
+ selectedSlot === index ? "border-yellow-400 bg-[var(--color-surface,#374151)]" : "border-gray-600"
11305
11305
  ),
11306
11306
  style: { width: slotSize, height: slotSize },
11307
11307
  onClick: () => handleSlotClick(index),
@@ -11331,14 +11331,14 @@ function InventoryPanel({
11331
11331
  showTooltips && hoveredItem && /* @__PURE__ */ jsxs(
11332
11332
  "div",
11333
11333
  {
11334
- className: "fixed z-50 bg-gray-900 border border-gray-600 rounded-lg p-2 shadow-lg pointer-events-none",
11334
+ className: "fixed z-50 bg-[var(--color-card)] border border-gray-600 rounded-lg p-2 shadow-lg pointer-events-none",
11335
11335
  style: {
11336
11336
  left: tooltipPosition.x,
11337
11337
  top: tooltipPosition.y,
11338
11338
  maxWidth: 200
11339
11339
  },
11340
11340
  children: [
11341
- /* @__PURE__ */ jsx("div", { className: "font-semibold text-white", children: hoveredItem.name || hoveredItem.type }),
11341
+ /* @__PURE__ */ jsx("div", { className: "font-semibold text-[var(--color-foreground)]", children: hoveredItem.name || hoveredItem.type }),
11342
11342
  hoveredItem.description && /* @__PURE__ */ jsx("div", { className: "text-sm text-gray-400 mt-1", children: hoveredItem.description }),
11343
11343
  /* @__PURE__ */ jsxs("div", { className: "text-xs text-gray-500 mt-1", children: [
11344
11344
  "Quantity: ",
@@ -11350,9 +11350,9 @@ function InventoryPanel({
11350
11350
  ] });
11351
11351
  }
11352
11352
  var variantMap3 = {
11353
- primary: "bg-blue-600 hover:bg-blue-500 text-white border-blue-400 shadow-lg shadow-blue-500/25",
11354
- secondary: "bg-gray-700 hover:bg-gray-600 text-white border-gray-500",
11355
- ghost: "bg-transparent hover:bg-white/10 text-white border-white/20"
11353
+ primary: "bg-[var(--color-primary)] hover:bg-blue-500 text-[var(--color-primary-foreground)] border-blue-400 shadow-lg shadow-blue-500/25",
11354
+ secondary: "bg-[var(--color-surface,#374151)] hover:bg-gray-600 text-[var(--color-foreground)] border-gray-500",
11355
+ ghost: "bg-transparent hover:bg-white/10 text-[var(--color-foreground)] border-white/20"
11356
11356
  };
11357
11357
  function GameMenu({
11358
11358
  title,
@@ -11409,7 +11409,7 @@ function GameMenu({
11409
11409
  /* @__PURE__ */ jsx(
11410
11410
  "h1",
11411
11411
  {
11412
- className: "text-5xl md:text-7xl font-bold text-white tracking-tight",
11412
+ className: "text-5xl md:text-7xl font-bold text-[var(--color-foreground)] tracking-tight",
11413
11413
  style: {
11414
11414
  textShadow: "0 4px 12px rgba(0,0,0,0.5)"
11415
11415
  },
@@ -11465,9 +11465,9 @@ var variantColors = {
11465
11465
  }
11466
11466
  };
11467
11467
  var buttonVariants = {
11468
- primary: "bg-blue-600 hover:bg-blue-500 text-white border-blue-400",
11469
- secondary: "bg-gray-700 hover:bg-gray-600 text-white border-gray-500",
11470
- ghost: "bg-transparent hover:bg-white/10 text-white border-white/20"
11468
+ primary: "bg-[var(--color-primary)] hover:bg-blue-500 text-[var(--color-primary-foreground)] border-blue-400",
11469
+ secondary: "bg-[var(--color-surface,#374151)] hover:bg-gray-600 text-[var(--color-foreground)] border-gray-500",
11470
+ ghost: "bg-transparent hover:bg-white/10 text-[var(--color-foreground)] border-white/20"
11471
11471
  };
11472
11472
  function formatTime3(ms) {
11473
11473
  const seconds = Math.floor(ms / 1e3);
@@ -11548,7 +11548,7 @@ function GameOverScreen({
11548
11548
  }
11549
11549
  return /* @__PURE__ */ jsxs("div", { className: "text-center", children: [
11550
11550
  /* @__PURE__ */ jsx("div", { className: "text-gray-400 text-sm mb-1", children: stat.label }),
11551
- /* @__PURE__ */ jsxs("div", { className: "text-white text-2xl font-bold flex items-center justify-center gap-2", children: [
11551
+ /* @__PURE__ */ jsxs("div", { className: "text-[var(--color-foreground)] text-2xl font-bold flex items-center justify-center gap-2", children: [
11552
11552
  stat.icon && /* @__PURE__ */ jsx("span", { children: stat.icon }),
11553
11553
  /* @__PURE__ */ jsx("span", { className: "tabular-nums", children: displayValue })
11554
11554
  ] })
@@ -12742,7 +12742,7 @@ function IsometricCanvas({
12742
12742
  className: cn("relative w-full overflow-hidden rounded-lg", className),
12743
12743
  style: { height: viewportSize.height },
12744
12744
  "data-testid": "game-canvas-empty",
12745
- children: /* @__PURE__ */ jsx(Box, { className: "flex items-center justify-center h-full bg-slate-800 rounded-lg", children: /* @__PURE__ */ jsxs(Stack, { direction: "vertical", gap: "md", align: "center", children: [
12745
+ children: /* @__PURE__ */ jsx(Box, { className: "flex items-center justify-center h-full bg-[var(--color-card)] rounded-lg", children: /* @__PURE__ */ jsxs(Stack, { direction: "vertical", gap: "md", align: "center", children: [
12746
12746
  /* @__PURE__ */ jsx(Icon, { name: "map", size: "xl" }),
12747
12747
  /* @__PURE__ */ jsx(Typography, { variant: "body", className: "text-slate-400", children: t("canvas.emptyMessage") || "No map data loaded" })
12748
12748
  ] }) })
@@ -13818,7 +13818,7 @@ var Lightbox = ({
13818
13818
  className: cn(
13819
13819
  "absolute top-4 right-4 z-10",
13820
13820
  "p-2 rounded-full",
13821
- "text-white bg-black bg-opacity-50",
13821
+ "text-[var(--color-foreground)] bg-[var(--color-card)]",
13822
13822
  "hover:bg-opacity-70 transition-opacity",
13823
13823
  "focus:outline-none focus:ring-2 focus:ring-white"
13824
13824
  ),
@@ -13837,7 +13837,7 @@ var Lightbox = ({
13837
13837
  className: cn(
13838
13838
  "absolute left-4 z-10",
13839
13839
  "p-2 rounded-full",
13840
- "text-white bg-black bg-opacity-50",
13840
+ "text-[var(--color-foreground)] bg-[var(--color-card)]",
13841
13841
  "hover:bg-opacity-70 transition-opacity",
13842
13842
  "focus:outline-none focus:ring-2 focus:ring-white"
13843
13843
  ),
@@ -13874,7 +13874,7 @@ var Lightbox = ({
13874
13874
  className: cn(
13875
13875
  "absolute right-4 z-10",
13876
13876
  "p-2 rounded-full",
13877
- "text-white bg-black bg-opacity-50",
13877
+ "text-[var(--color-foreground)] bg-[var(--color-card)]",
13878
13878
  "hover:bg-opacity-70 transition-opacity",
13879
13879
  "focus:outline-none focus:ring-2 focus:ring-white"
13880
13880
  ),
@@ -13883,12 +13883,12 @@ var Lightbox = ({
13883
13883
  }
13884
13884
  ),
13885
13885
  /* @__PURE__ */ jsxs("div", { className: "absolute bottom-4 left-0 right-0 text-center", children: [
13886
- showCounter && safeImages.length > 1 && /* @__PURE__ */ jsxs("div", { className: "text-white text-sm mb-1", children: [
13886
+ showCounter && safeImages.length > 1 && /* @__PURE__ */ jsxs("div", { className: "text-[var(--color-foreground)] text-sm mb-1", children: [
13887
13887
  index + 1,
13888
13888
  " of ",
13889
13889
  safeImages.length
13890
13890
  ] }),
13891
- currentImage?.caption && /* @__PURE__ */ jsx("div", { className: "text-white text-sm opacity-80 px-8", children: currentImage.caption })
13891
+ currentImage?.caption && /* @__PURE__ */ jsx("div", { className: "text-[var(--color-foreground)] text-sm opacity-80 px-8", children: currentImage.caption })
13892
13892
  ] })
13893
13893
  ]
13894
13894
  }
@@ -29226,6 +29226,10 @@ var contextValue = {
29226
29226
  getById
29227
29227
  };
29228
29228
  createContext(contextValue);
29229
+ var EntitySchemaContext = createContext(null);
29230
+ function useEntitySchemaOptional() {
29231
+ return useContext(EntitySchemaContext);
29232
+ }
29229
29233
  var ClientEffectConfigContext = createContext(null);
29230
29234
  ClientEffectConfigContext.Provider;
29231
29235
 
@@ -29752,11 +29756,11 @@ var AuthLayout = ({
29752
29756
  children: [
29753
29757
  /* @__PURE__ */ jsx(Box, { className: "absolute inset-0 bg-gradient-to-br from-primary-600/90 to-primary-800/90" }),
29754
29758
  /* @__PURE__ */ jsx(Box, { className: "relative z-10", children: /* @__PURE__ */ jsxs(Link, { to: "/", className: "flex items-center gap-3", children: [
29755
- logo || /* @__PURE__ */ jsx(Box, { className: "w-10 h-10 bg-white/20 rounded-xl flex items-center justify-center backdrop-blur", children: /* @__PURE__ */ jsx(
29759
+ logo || /* @__PURE__ */ jsx(Box, { className: "w-10 h-10 bg-[var(--color-card)]/20 rounded-xl flex items-center justify-center backdrop-blur", children: /* @__PURE__ */ jsx(
29756
29760
  Typography,
29757
29761
  {
29758
29762
  variant: "body1",
29759
- className: "text-white font-bold text-lg",
29763
+ className: "text-[var(--color-foreground)] font-bold text-lg",
29760
29764
  children: appName.charAt(0).toUpperCase()
29761
29765
  }
29762
29766
  ) }),
@@ -29764,7 +29768,7 @@ var AuthLayout = ({
29764
29768
  Typography,
29765
29769
  {
29766
29770
  variant: "body1",
29767
- className: "text-2xl font-bold text-white",
29771
+ className: "text-2xl font-bold text-[var(--color-foreground)]",
29768
29772
  children: appName
29769
29773
  }
29770
29774
  )
@@ -29774,7 +29778,7 @@ var AuthLayout = ({
29774
29778
  Typography,
29775
29779
  {
29776
29780
  variant: "h1",
29777
- className: "text-4xl font-bold text-white leading-tight",
29781
+ className: "text-4xl font-bold text-[var(--color-foreground)] leading-tight",
29778
29782
  children: [
29779
29783
  "Welcome to ",
29780
29784
  appName
@@ -29785,27 +29789,27 @@ var AuthLayout = ({
29785
29789
  Typography,
29786
29790
  {
29787
29791
  variant: "body1",
29788
- className: "text-lg text-white/80 max-w-md",
29792
+ className: "text-lg text-[var(--color-foreground)]/80 max-w-md",
29789
29793
  children: "Sign in to access your dashboard and manage your account."
29790
29794
  }
29791
29795
  ),
29792
- /* @__PURE__ */ jsxs(Box, { className: "mt-12 p-6 bg-white/10 rounded-xl backdrop-blur", children: [
29796
+ /* @__PURE__ */ jsxs(Box, { className: "mt-12 p-6 bg-[var(--color-card)]/10 rounded-xl backdrop-blur", children: [
29793
29797
  /* @__PURE__ */ jsx(
29794
29798
  Typography,
29795
29799
  {
29796
29800
  variant: "body1",
29797
- className: "text-white/90 italic",
29801
+ className: "text-[var(--color-foreground)]/90 italic",
29798
29802
  children: '"This platform has transformed how we work. Highly recommended!"'
29799
29803
  }
29800
29804
  ),
29801
29805
  /* @__PURE__ */ jsxs(HStack, { className: "mt-4", gap: "sm", align: "center", children: [
29802
- /* @__PURE__ */ jsx(Box, { className: "w-10 h-10 bg-white/20 rounded-full" }),
29806
+ /* @__PURE__ */ jsx(Box, { className: "w-10 h-10 bg-[var(--color-card)]/20 rounded-full" }),
29803
29807
  /* @__PURE__ */ jsxs(VStack, { gap: "none", children: [
29804
29808
  /* @__PURE__ */ jsx(
29805
29809
  Typography,
29806
29810
  {
29807
29811
  variant: "body1",
29808
- className: "text-white font-medium",
29812
+ className: "text-[var(--color-foreground)] font-medium",
29809
29813
  children: "Jane Doe"
29810
29814
  }
29811
29815
  ),
@@ -29813,7 +29817,7 @@ var AuthLayout = ({
29813
29817
  Typography,
29814
29818
  {
29815
29819
  variant: "body1",
29816
- className: "text-white/60 text-sm",
29820
+ className: "text-[var(--color-foreground)]/60 text-sm",
29817
29821
  children: "CEO, Example Co."
29818
29822
  }
29819
29823
  )
@@ -29821,8 +29825,8 @@ var AuthLayout = ({
29821
29825
  ] })
29822
29826
  ] })
29823
29827
  ] }) }),
29824
- /* @__PURE__ */ jsx(Box, { className: "absolute -bottom-32 -right-32 w-96 h-96 bg-white/5 rounded-full" }),
29825
- /* @__PURE__ */ jsx(Box, { className: "absolute -top-16 -right-16 w-64 h-64 bg-white/5 rounded-full" })
29828
+ /* @__PURE__ */ jsx(Box, { className: "absolute -bottom-32 -right-32 w-96 h-96 bg-[var(--color-card)]/5 rounded-full" }),
29829
+ /* @__PURE__ */ jsx(Box, { className: "absolute -top-16 -right-16 w-64 h-64 bg-[var(--color-card)]/5 rounded-full" })
29826
29830
  ]
29827
29831
  }
29828
29832
  ),
@@ -29839,7 +29843,7 @@ var AuthLayout = ({
29839
29843
  Typography,
29840
29844
  {
29841
29845
  variant: "body1",
29842
- className: "text-white font-bold text-xl",
29846
+ className: "text-[var(--color-foreground)] font-bold text-xl",
29843
29847
  children: appName.charAt(0).toUpperCase()
29844
29848
  }
29845
29849
  ) }),
@@ -32342,6 +32346,254 @@ function onDebugToggle(listener) {
32342
32346
  listeners5.add(listener);
32343
32347
  return () => listeners5.delete(listener);
32344
32348
  }
32349
+ function layoutGraph(states, transitions, initialState, width, height) {
32350
+ if (states.length === 0) return [];
32351
+ const layers = /* @__PURE__ */ new Map();
32352
+ const queue = [initialState];
32353
+ layers.set(initialState, 0);
32354
+ while (queue.length > 0) {
32355
+ const current = queue.shift();
32356
+ const layer = layers.get(current);
32357
+ for (const tr of transitions) {
32358
+ if (tr.from === current && !layers.has(tr.to)) {
32359
+ layers.set(tr.to, layer + 1);
32360
+ queue.push(tr.to);
32361
+ }
32362
+ }
32363
+ }
32364
+ for (const s of states) {
32365
+ if (!layers.has(s)) layers.set(s, layers.size > 0 ? Math.max(...layers.values()) + 1 : 0);
32366
+ }
32367
+ const layerGroups = /* @__PURE__ */ new Map();
32368
+ for (const [state, layer] of layers) {
32369
+ const group = layerGroups.get(layer) ?? [];
32370
+ group.push(state);
32371
+ layerGroups.set(layer, group);
32372
+ }
32373
+ const maxLayer = Math.max(...layerGroups.keys(), 0);
32374
+ const padX = 24;
32375
+ const padY = 20;
32376
+ const usableW = width - padX * 2;
32377
+ const usableH = height - padY * 2;
32378
+ const positions = [];
32379
+ for (const [layer, group] of layerGroups) {
32380
+ const y = maxLayer === 0 ? usableH / 2 + padY : padY + layer / maxLayer * usableH;
32381
+ for (let i = 0; i < group.length; i++) {
32382
+ const x = group.length === 1 ? width / 2 : padX + i / (group.length - 1) * usableW;
32383
+ positions.push({ x, y, state: group[i] });
32384
+ }
32385
+ }
32386
+ return positions;
32387
+ }
32388
+ function WalkMinimap() {
32389
+ const [walkStep, setWalkStep] = React90.useState(null);
32390
+ const [traits2, setTraits] = React90.useState([]);
32391
+ const [coveredEdges, setCoveredEdges] = React90.useState([]);
32392
+ const [completedTraits, setCompletedTraits] = React90.useState(/* @__PURE__ */ new Set());
32393
+ const prevTraitRef = React90.useRef(null);
32394
+ React90.useEffect(() => {
32395
+ const interval = setInterval(() => {
32396
+ const w = window;
32397
+ const step = w.__orbitalWalkStep;
32398
+ const traitConfigs = w.__orbitalWalkTraits;
32399
+ const edges = w.__orbitalCoveredEdges;
32400
+ if (step) setWalkStep(step);
32401
+ if (traitConfigs) setTraits(traitConfigs);
32402
+ if (edges) setCoveredEdges(edges);
32403
+ if (step && prevTraitRef.current && prevTraitRef.current !== step.traitName) {
32404
+ setCompletedTraits((prev) => new Set(prev).add(prevTraitRef.current));
32405
+ }
32406
+ if (step) prevTraitRef.current = step.traitName;
32407
+ }, 250);
32408
+ return () => clearInterval(interval);
32409
+ }, []);
32410
+ if (!walkStep || traits2.length === 0) return null;
32411
+ const activeTrait = traits2.find((t) => t.name === walkStep.traitName);
32412
+ const engineCount = coveredEdges.filter((e) => e.phase === "engine").length;
32413
+ const domCount = coveredEdges.filter((e) => e.phase === "dom").length;
32414
+ const totalTransitions = traits2.reduce((sum, t) => sum + t.transitions.length, 0);
32415
+ const activeEdgeKeys = new Set(
32416
+ coveredEdges.filter((e) => e.trait === walkStep.traitName).map((e) => `${e.from}+${e.event}->${e.to}`)
32417
+ );
32418
+ const activeEdgePhases = new Map(
32419
+ coveredEdges.filter((e) => e.trait === walkStep.traitName).map((e) => [`${e.from}+${e.event}->${e.to}`, e.phase])
32420
+ );
32421
+ const currentEdgeKey = `${walkStep.from}+${walkStep.event}->${walkStep.to}`;
32422
+ const graphW = 260;
32423
+ const graphH = 120;
32424
+ const nodeR = 10;
32425
+ const positions = activeTrait ? layoutGraph(activeTrait.states, activeTrait.transitions, activeTrait.initialState, graphW, graphH) : [];
32426
+ const posMap = new Map(positions.map((p2) => [p2.state, p2]));
32427
+ const visitedStates = new Set(
32428
+ coveredEdges.filter((e) => e.trait === walkStep.traitName).flatMap((e) => [e.from, e.to])
32429
+ );
32430
+ return /* @__PURE__ */ jsxs(VStack, { gap: "none", className: "w-64 flex-shrink-0 border-l border-border bg-[var(--color-card)] overflow-hidden", children: [
32431
+ /* @__PURE__ */ jsx(Box, { className: "px-2 py-1.5 border-b border-border overflow-x-auto", children: /* @__PURE__ */ jsx(HStack, { gap: "xs", className: "flex-nowrap", children: traits2.map((t) => {
32432
+ const isDone = completedTraits.has(t.name);
32433
+ const isActive = t.name === walkStep.traitName;
32434
+ const variant = isDone ? "success" : isActive ? "info" : "neutral";
32435
+ const shortName = t.name.replace(/^[A-Z][a-z]+/, "");
32436
+ return /* @__PURE__ */ jsxs(
32437
+ Badge,
32438
+ {
32439
+ variant,
32440
+ size: "sm",
32441
+ className: `flex-shrink-0 text-[9px] ${isActive ? "ring-1 ring-cyan-400" : ""}`,
32442
+ children: [
32443
+ isDone ? "\u2713" : isActive ? "\u25CF" : "\u25CB",
32444
+ " ",
32445
+ shortName || t.name
32446
+ ]
32447
+ },
32448
+ t.name
32449
+ );
32450
+ }) }) }),
32451
+ /* @__PURE__ */ jsx(Box, { className: "flex-1 flex items-center justify-center px-1 py-1", children: activeTrait && /* @__PURE__ */ jsxs("svg", { width: graphW, height: graphH, viewBox: `0 0 ${graphW} ${graphH}`, children: [
32452
+ /* @__PURE__ */ jsxs("defs", { children: [
32453
+ /* @__PURE__ */ jsx("marker", { id: "mm-arrow", markerWidth: "6", markerHeight: "4", refX: "6", refY: "2", orient: "auto", children: /* @__PURE__ */ jsx("path", { d: "M0,0 L6,2 L0,4", fill: "#888" }) }),
32454
+ /* @__PURE__ */ jsx("marker", { id: "mm-arrow-green", markerWidth: "6", markerHeight: "4", refX: "6", refY: "2", orient: "auto", children: /* @__PURE__ */ jsx("path", { d: "M0,0 L6,2 L0,4", fill: "#22c55e" }) }),
32455
+ /* @__PURE__ */ jsx("marker", { id: "mm-arrow-cyan", markerWidth: "6", markerHeight: "4", refX: "6", refY: "2", orient: "auto", children: /* @__PURE__ */ jsx("path", { d: "M0,0 L6,2 L0,4", fill: "#06b6d4" }) }),
32456
+ /* @__PURE__ */ jsx("marker", { id: "mm-arrow-yellow", markerWidth: "6", markerHeight: "4", refX: "6", refY: "2", orient: "auto", children: /* @__PURE__ */ jsx("path", { d: "M0,0 L6,2 L0,4", fill: "#eab308" }) })
32457
+ ] }),
32458
+ activeTrait.transitions.map((tr, i) => {
32459
+ const fromPos = posMap.get(tr.from);
32460
+ const toPos = posMap.get(tr.to);
32461
+ if (!fromPos || !toPos) return null;
32462
+ const key = `${tr.from}+${tr.event}->${tr.to}`;
32463
+ const isCurrent = key === currentEdgeKey && !walkStep.isRepositioning;
32464
+ const isCovered = activeEdgeKeys.has(key);
32465
+ const phase = activeEdgePhases.get(key);
32466
+ let stroke = "#555";
32467
+ let markerEnd = "url(#mm-arrow)";
32468
+ let strokeWidth = 1;
32469
+ let opacity = 0.4;
32470
+ if (isCurrent) {
32471
+ stroke = "#eab308";
32472
+ markerEnd = "url(#mm-arrow-yellow)";
32473
+ strokeWidth = 2.5;
32474
+ opacity = 1;
32475
+ } else if (isCovered && phase === "dom") {
32476
+ stroke = "#06b6d4";
32477
+ markerEnd = "url(#mm-arrow-cyan)";
32478
+ strokeWidth = 1.5;
32479
+ opacity = 0.9;
32480
+ } else if (isCovered) {
32481
+ stroke = "#22c55e";
32482
+ markerEnd = "url(#mm-arrow-green)";
32483
+ strokeWidth = 1.5;
32484
+ opacity = 0.9;
32485
+ }
32486
+ if (tr.from === tr.to) {
32487
+ const cx = fromPos.x;
32488
+ const cy = fromPos.y - nodeR - 8;
32489
+ return /* @__PURE__ */ jsxs("g", { children: [
32490
+ /* @__PURE__ */ jsx(
32491
+ "path",
32492
+ {
32493
+ d: `M${cx - 5},${fromPos.y - nodeR} C${cx - 18},${cy - 14} ${cx + 18},${cy - 14} ${cx + 5},${fromPos.y - nodeR}`,
32494
+ fill: "none",
32495
+ stroke,
32496
+ strokeWidth,
32497
+ opacity,
32498
+ markerEnd
32499
+ }
32500
+ ),
32501
+ /* @__PURE__ */ 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 })
32502
+ ] }, `e-${i}`);
32503
+ }
32504
+ const dx = toPos.x - fromPos.x;
32505
+ const dy = toPos.y - fromPos.y;
32506
+ const len = Math.sqrt(dx * dx + dy * dy) || 1;
32507
+ const nx = -dy / len;
32508
+ const ny = dx / len;
32509
+ const hasReverse = activeTrait.transitions.some(
32510
+ (t2) => t2.from === tr.to && t2.to === tr.from
32511
+ );
32512
+ const offset = hasReverse ? 4 : 0;
32513
+ const x1 = fromPos.x + dx / len * nodeR + nx * offset;
32514
+ const y1 = fromPos.y + dy / len * nodeR + ny * offset;
32515
+ const x2 = toPos.x - dx / len * (nodeR + 6) + nx * offset;
32516
+ const y2 = toPos.y - dy / len * (nodeR + 6) + ny * offset;
32517
+ const mx = (x1 + x2) / 2 + nx * 8;
32518
+ const my = (y1 + y2) / 2 + ny * 8;
32519
+ return /* @__PURE__ */ jsxs("g", { children: [
32520
+ /* @__PURE__ */ jsx(
32521
+ "line",
32522
+ {
32523
+ x1,
32524
+ y1,
32525
+ x2,
32526
+ y2,
32527
+ stroke,
32528
+ strokeWidth,
32529
+ opacity,
32530
+ markerEnd,
32531
+ children: isCurrent && /* @__PURE__ */ jsx("animate", { attributeName: "opacity", values: "1;0.4;1", dur: "0.8s", repeatCount: "indefinite" })
32532
+ }
32533
+ ),
32534
+ /* @__PURE__ */ 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 })
32535
+ ] }, `e-${i}`);
32536
+ }),
32537
+ positions.map((pos) => {
32538
+ const isCurrentState = pos.state === walkStep.from || pos.state === walkStep.to;
32539
+ const isVisited = visitedStates.has(pos.state);
32540
+ const isInitial = pos.state === activeTrait.initialState;
32541
+ let fill = "#333";
32542
+ let strokeColor = "#555";
32543
+ let sw = 1;
32544
+ if (isCurrentState) {
32545
+ fill = "#1e40af";
32546
+ strokeColor = "#3b82f6";
32547
+ sw = 2;
32548
+ } else if (isVisited) {
32549
+ fill = "#166534";
32550
+ strokeColor = "#22c55e";
32551
+ sw = 1.5;
32552
+ }
32553
+ return /* @__PURE__ */ jsxs("g", { children: [
32554
+ isInitial && /* @__PURE__ */ jsx("circle", { cx: pos.x, cy: pos.y, r: nodeR + 3, fill: "none", stroke: "#3b82f6", strokeWidth: 1, opacity: 0.4 }),
32555
+ /* @__PURE__ */ jsx(
32556
+ "circle",
32557
+ {
32558
+ cx: pos.x,
32559
+ cy: pos.y,
32560
+ r: nodeR,
32561
+ fill,
32562
+ stroke: strokeColor,
32563
+ strokeWidth: sw,
32564
+ children: isCurrentState && /* @__PURE__ */ jsx("animate", { attributeName: "r", values: `${nodeR};${nodeR + 2};${nodeR}`, dur: "1s", repeatCount: "indefinite" })
32565
+ }
32566
+ ),
32567
+ /* @__PURE__ */ jsx(
32568
+ "text",
32569
+ {
32570
+ x: pos.x,
32571
+ y: pos.y + nodeR + 10,
32572
+ textAnchor: "middle",
32573
+ fontSize: "8",
32574
+ fill: "#aaa",
32575
+ children: pos.state.length > 10 ? pos.state.slice(0, 8) + ".." : pos.state
32576
+ }
32577
+ )
32578
+ ] }, pos.state);
32579
+ })
32580
+ ] }) }),
32581
+ /* @__PURE__ */ jsx(Box, { className: "px-2 py-1 border-t border-border", children: /* @__PURE__ */ jsxs(HStack, { gap: "sm", className: "items-center justify-between", children: [
32582
+ /* @__PURE__ */ jsxs(Typography, { variant: "caption", className: "text-[10px] font-mono text-green-500", children: [
32583
+ "Engine: ",
32584
+ engineCount,
32585
+ "/",
32586
+ totalTransitions
32587
+ ] }),
32588
+ domCount > 0 && /* @__PURE__ */ jsxs(Typography, { variant: "caption", className: "text-[10px] font-mono text-cyan-500", children: [
32589
+ "DOM: ",
32590
+ domCount
32591
+ ] }),
32592
+ /* @__PURE__ */ jsx(Badge, { variant: walkStep.phase === "engine" ? "info" : "warning", size: "sm", className: "text-[9px]", children: walkStep.phase === "engine" ? "Engine" : "DOM" })
32593
+ ] }) })
32594
+ ] });
32595
+ }
32596
+ WalkMinimap.displayName = "WalkMinimap";
32345
32597
  function TraitsTab({ traits: traits2 }) {
32346
32598
  if (traits2.length === 0) {
32347
32599
  return /* @__PURE__ */ jsx(
@@ -33165,25 +33417,25 @@ function EventDispatcherTab({ traits: traits2, schema }) {
33165
33417
  EventDispatcherTab.displayName = "EventDispatcherTab";
33166
33418
  function ServerResponseRow({ sr }) {
33167
33419
  const entityEntries = Object.entries(sr.dataEntities);
33168
- return /* @__PURE__ */ jsxs("div", { className: "ml-4 pl-2 border-l border-purple-700/50 py-0.5 text-[10px] font-mono", children: [
33420
+ return /* @__PURE__ */ jsxs("div", { className: "ml-4 pl-2 border-l border-purple-500/30 py-0.5 text-[10px] font-mono", children: [
33169
33421
  /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
33170
- /* @__PURE__ */ jsxs("span", { className: sr.success ? "text-green-400" : "text-red-400", children: [
33422
+ /* @__PURE__ */ jsxs("span", { className: sr.success ? "text-green-600 dark:text-green-400" : "text-red-600 dark:text-red-400", children: [
33171
33423
  sr.success ? "\u2713" : "\u2717",
33172
33424
  " server"
33173
33425
  ] }),
33174
- /* @__PURE__ */ jsx("span", { className: "text-purple-300", children: sr.orbitalName }),
33175
- sr.clientEffects > 0 && /* @__PURE__ */ jsxs("span", { className: "px-1 rounded bg-purple-900/50 text-purple-300", children: [
33426
+ /* @__PURE__ */ jsx("span", { className: "text-purple-600 dark:text-purple-300", children: sr.orbitalName }),
33427
+ sr.clientEffects > 0 && /* @__PURE__ */ jsxs("span", { className: "px-1 rounded bg-purple-500/15 text-purple-600 dark:text-purple-300", children: [
33176
33428
  sr.clientEffects,
33177
33429
  " clientEffect",
33178
33430
  sr.clientEffects !== 1 ? "s" : ""
33179
33431
  ] }),
33180
- sr.emittedEvents.length > 0 && /* @__PURE__ */ jsxs("span", { className: "px-1 rounded bg-blue-900/50 text-blue-300", children: [
33432
+ sr.emittedEvents.length > 0 && /* @__PURE__ */ jsxs("span", { className: "px-1 rounded bg-blue-500/15 text-blue-300", children: [
33181
33433
  "emit: ",
33182
33434
  sr.emittedEvents.join(", ")
33183
33435
  ] }),
33184
- sr.error && /* @__PURE__ */ jsx("span", { className: "px-1 rounded bg-red-900/50 text-red-400 truncate max-w-[300px]", children: sr.error })
33436
+ sr.error && /* @__PURE__ */ jsx("span", { className: "px-1 rounded bg-red-500/15 text-red-600 dark:text-red-400 truncate max-w-[300px]", children: sr.error })
33185
33437
  ] }),
33186
- entityEntries.length > 0 && /* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-1 mt-0.5", children: entityEntries.map(([name, count]) => /* @__PURE__ */ jsxs("span", { className: "px-1 rounded bg-gray-800 text-gray-300", children: [
33438
+ entityEntries.length > 0 && /* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-1 mt-0.5", children: entityEntries.map(([name, count]) => /* @__PURE__ */ jsxs("span", { className: "px-1 rounded bg-[var(--color-card)] text-foreground", children: [
33187
33439
  name,
33188
33440
  ": ",
33189
33441
  count,
@@ -33196,24 +33448,24 @@ function TransitionRow({ trace }) {
33196
33448
  const isServerEntry = !!trace.serverResponse && trace.traitName.startsWith("server:");
33197
33449
  const hasFailedEffects = trace.effects.some((e) => e.status === "failed");
33198
33450
  if (isServerEntry && trace.serverResponse) {
33199
- return /* @__PURE__ */ jsxs("div", { className: "py-0.5 border-b border-gray-800 last:border-0", children: [
33451
+ return /* @__PURE__ */ jsxs("div", { className: "py-0.5 border-b border-border last:border-0", children: [
33200
33452
  /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-2 text-xs font-mono", children: [
33201
33453
  /* @__PURE__ */ jsx("span", { className: "mt-1.5 w-1.5 h-1.5 rounded-full flex-shrink-0 bg-purple-500" }),
33202
33454
  /* @__PURE__ */ jsx(Badge, { variant: "warning", size: "sm", className: "flex-shrink-0", children: trace.event }),
33203
- /* @__PURE__ */ jsx("span", { className: "text-purple-400 flex-shrink-0", children: "server response" })
33455
+ /* @__PURE__ */ jsx("span", { className: "text-purple-600 dark:text-purple-400 flex-shrink-0", children: "server response" })
33204
33456
  ] }),
33205
33457
  /* @__PURE__ */ jsx(ServerResponseRow, { sr: trace.serverResponse })
33206
33458
  ] });
33207
33459
  }
33208
- return /* @__PURE__ */ jsxs("div", { className: "py-0.5 border-b border-gray-800 last:border-0", children: [
33460
+ return /* @__PURE__ */ jsxs("div", { className: "py-0.5 border-b border-border last:border-0", children: [
33209
33461
  /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-2 text-xs font-mono", children: [
33210
33462
  /* @__PURE__ */ jsx("span", { className: cn(
33211
33463
  "mt-1.5 w-1.5 h-1.5 rounded-full flex-shrink-0",
33212
33464
  hasFailedEffects ? "bg-red-500" : "bg-green-500"
33213
33465
  ) }),
33214
33466
  /* @__PURE__ */ jsx(Badge, { variant: "info", size: "sm", className: "flex-shrink-0", children: trace.event }),
33215
- /* @__PURE__ */ jsx("span", { className: "text-gray-300 flex-shrink-0", children: trace.traitName }),
33216
- /* @__PURE__ */ jsxs("span", { className: "text-gray-400 flex-shrink-0", children: [
33467
+ /* @__PURE__ */ jsx("span", { className: "text-foreground flex-shrink-0", children: trace.traitName }),
33468
+ /* @__PURE__ */ jsxs("span", { className: "text-foreground/70 flex-shrink-0", children: [
33217
33469
  trace.from,
33218
33470
  " ",
33219
33471
  "\u2192",
@@ -33223,12 +33475,12 @@ function TransitionRow({ trace }) {
33223
33475
  ] }),
33224
33476
  trace.effects.length > 0 && /* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-1 ml-6 mt-0.5", children: trace.effects.map((eff, i) => /* @__PURE__ */ jsxs("span", { className: cn(
33225
33477
  "px-1 rounded text-[10px]",
33226
- 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"
33478
+ 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"
33227
33479
  ), children: [
33228
33480
  eff.status === "executed" ? "\u2713" : eff.status === "failed" ? "\u2717" : "-",
33229
33481
  " ",
33230
33482
  eff.type,
33231
- eff.args.length > 0 && /* @__PURE__ */ jsx("span", { className: "text-gray-500 ml-0.5", children: JSON.stringify(eff.args).slice(0, 40) })
33483
+ eff.args.length > 0 && /* @__PURE__ */ jsx("span", { className: "text-foreground/50 ml-0.5", children: JSON.stringify(eff.args).slice(0, 40) })
33232
33484
  ] }, i)) }),
33233
33485
  trace.serverResponse && /* @__PURE__ */ jsx(ServerResponseRow, { sr: trace.serverResponse })
33234
33486
  ] });
@@ -33243,15 +33495,6 @@ function VerifyModePanel({
33243
33495
  }) {
33244
33496
  const scrollRef = React90.useRef(null);
33245
33497
  const prevCountRef = React90.useRef(0);
33246
- const [walkStep, setWalkStep] = React90.useState(null);
33247
- React90.useEffect(() => {
33248
- const interval = setInterval(() => {
33249
- const w = window;
33250
- const step = w.__orbitalWalkStep;
33251
- if (step) setWalkStep(step);
33252
- }, 300);
33253
- return () => clearInterval(interval);
33254
- }, []);
33255
33498
  React90.useEffect(() => {
33256
33499
  if (transitions.length > prevCountRef.current && scrollRef.current) {
33257
33500
  scrollRef.current.scrollTop = scrollRef.current.scrollHeight;
@@ -33264,49 +33507,28 @@ function VerifyModePanel({
33264
33507
  {
33265
33508
  className: cn(
33266
33509
  "runtime-debugger runtime-debugger--verify",
33267
- "flex flex-col bg-gray-900 text-white border-t-2 border-cyan-500",
33510
+ "flex flex-col bg-[var(--color-card)] text-[var(--color-foreground)] border-t-2 border-cyan-500",
33268
33511
  hudBottom ? "" : "fixed bottom-0 left-0 right-0",
33269
33512
  className
33270
33513
  ),
33271
33514
  "data-testid": "debugger-verify",
33272
33515
  style: { height: "25vh", zIndex: hudBottom ? void 0 : 40 },
33273
33516
  children: [
33274
- /* @__PURE__ */ 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: [
33517
+ /* @__PURE__ */ 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: [
33275
33518
  /* @__PURE__ */ jsx(Badge, { variant: failedChecks > 0 ? "danger" : "success", size: "sm", children: failedChecks > 0 ? `${failedChecks} fail` : "OK" }),
33276
- /* @__PURE__ */ jsxs("span", { className: "text-gray-400", children: [
33519
+ /* @__PURE__ */ jsxs("span", { className: "text-foreground/70", children: [
33277
33520
  localCount,
33278
33521
  " local"
33279
33522
  ] }),
33280
- /* @__PURE__ */ jsxs("span", { className: "text-purple-400", children: [
33523
+ /* @__PURE__ */ jsxs("span", { className: "text-purple-600 dark:text-purple-400", children: [
33281
33524
  serverCount,
33282
33525
  " server"
33283
33526
  ] }),
33284
- traitStates && /* @__PURE__ */ jsx("span", { className: "text-cyan-400 truncate max-w-[400px]", children: traitStates })
33527
+ traitStates && /* @__PURE__ */ jsx("span", { className: "text-cyan-600 dark:text-cyan-400 truncate max-w-[400px]", children: traitStates })
33285
33528
  ] }),
33286
33529
  /* @__PURE__ */ jsxs("div", { className: "flex-1 flex overflow-hidden", children: [
33287
- /* @__PURE__ */ jsx("div", { ref: scrollRef, className: "flex-1 overflow-y-auto", children: /* @__PURE__ */ jsx("div", { className: "px-2 py-1", children: transitions.length === 0 ? /* @__PURE__ */ jsx("div", { className: "text-gray-500 text-xs font-mono py-2 text-center", children: "Waiting for transitions..." }) : /* @__PURE__ */ jsx("div", { className: "space-y-0.5", children: transitions.map((trace) => /* @__PURE__ */ jsx(TransitionRow, { trace }, trace.id)) }) }) }),
33288
- walkStep && /* @__PURE__ */ 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: [
33289
- /* @__PURE__ */ jsxs("div", { className: "text-cyan-400 font-bold mb-1", children: [
33290
- "Walk Step ",
33291
- walkStep.stepIndex,
33292
- "/",
33293
- walkStep.stepTotal
33294
- ] }),
33295
- /* @__PURE__ */ jsx("div", { className: "text-gray-300 mb-1", children: walkStep.traitName }),
33296
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1 mb-1", children: [
33297
- /* @__PURE__ */ jsx("span", { className: "text-yellow-300", children: walkStep.from }),
33298
- /* @__PURE__ */ jsx("span", { className: "text-gray-500", children: "--" }),
33299
- /* @__PURE__ */ jsx("span", { className: "text-green-300", children: walkStep.event }),
33300
- /* @__PURE__ */ jsx("span", { className: "text-gray-500", children: "-->" }),
33301
- /* @__PURE__ */ jsx("span", { className: "text-yellow-300", children: walkStep.to })
33302
- ] }),
33303
- walkStep.guardCase && /* @__PURE__ */ jsxs("div", { className: walkStep.guardCase === "pass" ? "text-green-400" : "text-red-400", children: [
33304
- "guard: ",
33305
- walkStep.guardCase
33306
- ] }),
33307
- walkStep.isRepositioning && /* @__PURE__ */ jsx("div", { className: "text-gray-500 italic", children: "repositioning" }),
33308
- /* @__PURE__ */ jsx("div", { className: walkStep.accepted ? "text-green-400 mt-1" : "text-red-400 mt-1", children: walkStep.accepted ? "\u2713 accepted" : "\u2717 rejected" })
33309
- ] })
33530
+ /* @__PURE__ */ jsx("div", { ref: scrollRef, className: "flex-1 overflow-y-auto", children: /* @__PURE__ */ jsx("div", { className: "px-2 py-1", children: transitions.length === 0 ? /* @__PURE__ */ jsx("div", { className: "text-foreground/50 text-xs font-mono py-2 text-center", children: "Waiting for transitions..." }) : /* @__PURE__ */ jsx("div", { className: "space-y-0.5", children: transitions.map((trace) => /* @__PURE__ */ jsx(TransitionRow, { trace }, trace.id)) }) }) }),
33531
+ /* @__PURE__ */ jsx(WalkMinimap, {})
33310
33532
  ] })
33311
33533
  ]
33312
33534
  }
@@ -33531,7 +33753,7 @@ function RuntimeDebugger({
33531
33753
  className: "runtime-debugger__tabs"
33532
33754
  }
33533
33755
  ) }),
33534
- /* @__PURE__ */ jsx("div", { className: "runtime-debugger__footer", children: /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-gray-500", children: "Press ` to toggle | window.__orbitalVerification for automation" }) })
33756
+ /* @__PURE__ */ jsx("div", { className: "runtime-debugger__footer", children: /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-foreground/50", children: "Press ` to toggle | window.__orbitalVerification for automation" }) })
33535
33757
  ] })
33536
33758
  }
33537
33759
  );
@@ -34242,6 +34464,62 @@ function getComponentForPattern(patternType) {
34242
34464
  if (!name) return null;
34243
34465
  return COMPONENT_REGISTRY[name] ?? null;
34244
34466
  }
34467
+ var FORM_PATTERNS = /* @__PURE__ */ new Set([
34468
+ "form",
34469
+ "form-section",
34470
+ "inline-edit-form",
34471
+ "wizard-step"
34472
+ ]);
34473
+ function enrichFormFields(fields, entityDef) {
34474
+ const fieldMap = new Map(entityDef.fields.map((f3) => [f3.name, f3]));
34475
+ return fields.map((field) => {
34476
+ if (typeof field === "string") {
34477
+ const entityField = fieldMap.get(field);
34478
+ if (entityField) {
34479
+ const enriched = {
34480
+ name: field,
34481
+ label: field.replace(/([a-z])([A-Z])/g, "$1 $2").replace(/\b\w/g, (c) => c.toUpperCase()),
34482
+ type: entityField.type,
34483
+ required: entityField.required
34484
+ };
34485
+ if (entityField.values && entityField.values.length > 0) {
34486
+ enriched.values = entityField.values;
34487
+ } else if (entityField.enumValues && entityField.enumValues.length > 0) {
34488
+ enriched.values = entityField.enumValues;
34489
+ }
34490
+ if (entityField.relation) {
34491
+ enriched.relation = entityField.relation;
34492
+ }
34493
+ return enriched;
34494
+ }
34495
+ return { name: field, label: field.replace(/([a-z])([A-Z])/g, "$1 $2").replace(/\b\w/g, (c) => c.toUpperCase()) };
34496
+ }
34497
+ if (field && typeof field === "object" && !Array.isArray(field)) {
34498
+ const obj = field;
34499
+ const fieldName = obj.name ?? obj.field;
34500
+ if (!fieldName) return field;
34501
+ if (obj.type || obj.inputType) return field;
34502
+ const entityField = fieldMap.get(fieldName);
34503
+ if (!entityField) return field;
34504
+ const enriched = { ...obj, type: entityField.type };
34505
+ if (entityField.required && !("required" in obj)) {
34506
+ enriched.required = true;
34507
+ }
34508
+ if (!obj.values && !obj.options) {
34509
+ if (entityField.values && entityField.values.length > 0) {
34510
+ enriched.values = entityField.values;
34511
+ } else if (entityField.enumValues && entityField.enumValues.length > 0) {
34512
+ enriched.values = entityField.enumValues;
34513
+ }
34514
+ }
34515
+ if (!obj.relation && entityField.relation) {
34516
+ enriched.relation = entityField.relation;
34517
+ }
34518
+ return enriched;
34519
+ }
34520
+ return field;
34521
+ });
34522
+ }
34245
34523
  var PATTERNS_WITH_CHILDREN = /* @__PURE__ */ new Set([
34246
34524
  "stack",
34247
34525
  "vstack",
@@ -34675,6 +34953,8 @@ function SlotContentRenderer({
34675
34953
  const entityProp = content.props.entity;
34676
34954
  const entityType = typeof entityProp === "string" ? entityProp : "";
34677
34955
  const storeData = useEntityRef(entityType);
34956
+ const schemaCtx = useEntitySchemaOptional();
34957
+ const entityDef = entityType && schemaCtx ? schemaCtx.entities.get(entityType) : void 0;
34678
34958
  const PatternComponent = getComponentForPattern(content.pattern);
34679
34959
  if (PatternComponent) {
34680
34960
  const childrenConfig = content.props.children;
@@ -34696,6 +34976,13 @@ function SlotContentRenderer({
34696
34976
  } else {
34697
34977
  finalProps = renderedProps;
34698
34978
  }
34979
+ const isFormPattern = FORM_PATTERNS.has(content.pattern) || content.pattern.includes("form");
34980
+ if (isFormPattern && entityDef && Array.isArray(finalProps.fields)) {
34981
+ finalProps.fields = enrichFormFields(finalProps.fields, entityDef);
34982
+ if (finalProps.mode === "edit" && !finalProps.initialData && storeData.length > 0) {
34983
+ finalProps.initialData = storeData[0];
34984
+ }
34985
+ }
34699
34986
  const acceptsChildren = PATTERNS_WITH_CHILDREN.has(content.pattern);
34700
34987
  return /* @__PURE__ */ jsx(
34701
34988
  Box,