@almadar/ui 5.123.0 → 5.124.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/dist/{TraitProvider-YkK6tXDw.d.cts → TraitProvider-Ch79cUcb.d.cts} +6 -1
  2. package/dist/{TraitProvider-YkK6tXDw.d.ts → TraitProvider-Ch79cUcb.d.ts} +6 -1
  3. package/dist/{UserContext-bziZwgFL.d.cts → UserContext-BKckAUv7.d.cts} +5 -5
  4. package/dist/{UserContext-bziZwgFL.d.ts → UserContext-BKckAUv7.d.ts} +5 -5
  5. package/dist/avl/index.cjs +265 -227
  6. package/dist/avl/index.js +267 -229
  7. package/dist/components/index.cjs +208 -200
  8. package/dist/components/index.d.cts +4 -3
  9. package/dist/components/index.d.ts +4 -3
  10. package/dist/components/index.js +208 -200
  11. package/dist/context/index.cjs +25 -66
  12. package/dist/context/index.d.cts +1 -1
  13. package/dist/context/index.d.ts +1 -1
  14. package/dist/context/index.js +25 -66
  15. package/dist/providers/index.cjs +286 -219
  16. package/dist/providers/index.d.cts +4 -4
  17. package/dist/providers/index.d.ts +4 -4
  18. package/dist/providers/index.js +286 -219
  19. package/dist/runtime/index.cjs +258 -220
  20. package/dist/runtime/index.d.cts +4 -2
  21. package/dist/runtime/index.d.ts +4 -2
  22. package/dist/runtime/index.js +260 -222
  23. package/package.json +8 -7
  24. package/themes/_contract.md +2 -0
  25. package/themes/almadar-website.css +3 -3
  26. package/themes/almadar.css +4 -4
  27. package/themes/bloomberg-dense.css +2 -2
  28. package/themes/clay.css +417 -0
  29. package/themes/corporate.css +411 -0
  30. package/themes/game-adventure.css +3 -3
  31. package/themes/game-rpg.css +2 -2
  32. package/themes/game-sci-fi.css +1 -1
  33. package/themes/game-ui-pack.css +2 -2
  34. package/themes/gazette.css +2 -2
  35. package/themes/glass.css +428 -0
  36. package/themes/index.css +9 -13
  37. package/themes/kiosk.css +5 -5
  38. package/themes/linear-clean.css +1 -1
  39. package/themes/minimalist.css +2 -2
  40. package/themes/neon.css +3 -3
  41. package/themes/notion-editorial.css +1 -1
  42. package/themes/prism.css +3 -3
  43. package/themes/retro.css +410 -0
  44. package/themes/terminal.css +1 -1
  45. package/themes/trait-wars.css +8 -8
  46. package/themes/wireframe.css +2 -2
  47. package/themes/arctic.css +0 -235
  48. package/themes/copper.css +0 -235
  49. package/themes/ember.css +0 -238
  50. package/themes/forest.css +0 -238
  51. package/themes/lavender.css +0 -233
  52. package/themes/midnight.css +0 -234
  53. package/themes/ocean.css +0 -238
  54. package/themes/rose.css +0 -233
  55. package/themes/sand.css +0 -234
  56. package/themes/slate.css +0 -233
  57. package/themes/sunset.css +0 -238
@@ -5176,15 +5176,15 @@ var init_TextHighlight = __esm({
5176
5176
  const typeStyles = {
5177
5177
  question: cn(
5178
5178
  // Blue border for questions
5179
- "bg-card border-b-2 border-primary-600",
5179
+ "bg-card border-b-2 border-primary",
5180
5180
  "hover:bg-muted",
5181
- isActive && "bg-primary-100 ring-2 ring-primary-600"
5181
+ isActive && "bg-primary/10 ring-2 ring-primary"
5182
5182
  ),
5183
5183
  note: cn(
5184
5184
  // Yellow border for notes
5185
- "bg-card border-b-2 border-amber-500",
5185
+ "bg-card border-b-2 border-warning",
5186
5186
  "hover:bg-muted",
5187
- isActive && "bg-amber-100 ring-2 ring-amber-500"
5187
+ isActive && "bg-warning/10 ring-2 ring-warning"
5188
5188
  )
5189
5189
  };
5190
5190
  return /* @__PURE__ */ jsxRuntime.jsx(
@@ -5530,7 +5530,7 @@ function DayCell({
5530
5530
  {
5531
5531
  className: cn(
5532
5532
  "p-2 text-center cursor-pointer hover:bg-muted transition-colors",
5533
- isToday && "bg-blue-500/10",
5533
+ isToday && "bg-primary/10",
5534
5534
  className
5535
5535
  ),
5536
5536
  onClick: handleClick,
@@ -5541,7 +5541,7 @@ function DayCell({
5541
5541
  variant: "small",
5542
5542
  className: cn(
5543
5543
  "font-medium",
5544
- isToday ? "text-blue-600" : "text-muted-foreground"
5544
+ isToday ? "text-primary" : "text-muted-foreground"
5545
5545
  ),
5546
5546
  children: dayAbbr
5547
5547
  }
@@ -5553,7 +5553,7 @@ function DayCell({
5553
5553
  rounded: "full",
5554
5554
  className: cn(
5555
5555
  "h-8 w-8 mx-auto items-center justify-center",
5556
- isToday && "bg-blue-600 text-white"
5556
+ isToday && "bg-primary text-primary-foreground"
5557
5557
  ),
5558
5558
  children: /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body", className: "font-semibold", children: safeDate.getDate() })
5559
5559
  }
@@ -12265,19 +12265,19 @@ var init_ActivationBlock = __esm({
12265
12265
  "div",
12266
12266
  {
12267
12267
  className: cn(
12268
- "bg-indigo-50 dark:bg-indigo-900/20 border-2 border-indigo-200 dark:border-indigo-800 rounded-lg p-5 mb-6",
12268
+ "bg-primary/10 border-2 border-primary rounded-lg p-5 mb-6",
12269
12269
  className
12270
12270
  ),
12271
12271
  children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-3", children: [
12272
- /* @__PURE__ */ jsxRuntime.jsx(LucideIcons2.Lightbulb, { className: "text-indigo-600 dark:text-indigo-400 flex-shrink-0 mt-1", size: 24 }),
12272
+ /* @__PURE__ */ jsxRuntime.jsx(LucideIcons2.Lightbulb, { className: "text-primary flex-shrink-0 mt-1", size: 24 }),
12273
12273
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1", children: [
12274
- /* @__PURE__ */ jsxRuntime.jsx("h4", { className: "font-semibold text-indigo-900 dark:text-indigo-100 mb-2", children: "Before You Begin..." }),
12275
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-gray-700 dark:text-gray-300 mb-3 text-sm md:text-base", children: question }),
12274
+ /* @__PURE__ */ jsxRuntime.jsx("h4", { className: "font-semibold text-primary mb-2", children: "Before You Begin..." }),
12275
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-foreground mb-3 text-sm md:text-base", children: question }),
12276
12276
  isExpanded ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
12277
12277
  /* @__PURE__ */ jsxRuntime.jsx(
12278
12278
  "textarea",
12279
12279
  {
12280
- className: "w-full p-3 border border-indigo-300 dark:border-indigo-700 rounded-md bg-white dark:bg-gray-800 text-gray-900 dark:text-gray-100 focus:ring-2 focus:ring-indigo-500 focus:border-transparent text-sm",
12280
+ className: "w-full p-3 border border-input rounded-md bg-card text-foreground focus:ring-2 focus:ring-ring focus:border-transparent text-sm",
12281
12281
  placeholder: "Jot down your thoughts...",
12282
12282
  value: response,
12283
12283
  onChange: (e) => setResponse(e.target.value),
@@ -12289,7 +12289,7 @@ var init_ActivationBlock = __esm({
12289
12289
  "button",
12290
12290
  {
12291
12291
  onClick: handleSubmit,
12292
- className: "px-4 py-2 bg-indigo-600 text-white rounded-md hover:bg-indigo-700 text-sm font-medium transition-colors",
12292
+ className: "px-4 py-2 bg-primary text-primary-foreground rounded-md hover:bg-primary-hover text-sm font-medium transition-colors",
12293
12293
  children: "Continue to Lesson \u2192"
12294
12294
  }
12295
12295
  ),
@@ -12300,7 +12300,7 @@ var init_ActivationBlock = __esm({
12300
12300
  emit(`UI:${saveEvent}`, { response: "" });
12301
12301
  setIsExpanded(false);
12302
12302
  },
12303
- className: "px-4 py-2 text-indigo-600 dark:text-indigo-400 hover:underline text-sm",
12303
+ className: "px-4 py-2 text-primary hover:underline text-sm",
12304
12304
  children: "Skip for now"
12305
12305
  }
12306
12306
  )
@@ -12309,7 +12309,7 @@ var init_ActivationBlock = __esm({
12309
12309
  "button",
12310
12310
  {
12311
12311
  onClick: () => setIsExpanded(true),
12312
- className: "text-sm text-indigo-600 dark:text-indigo-400 hover:underline font-medium",
12312
+ className: "text-sm text-primary hover:underline font-medium",
12313
12313
  children: "\u2713 Answered \xB7 Edit response"
12314
12314
  }
12315
12315
  )
@@ -12813,7 +12813,7 @@ var init_AuthLayout = __esm({
12813
12813
  VStack,
12814
12814
  {
12815
12815
  className: cn(
12816
- "hidden lg:flex lg:w-1/2 bg-primary-600 relative overflow-hidden",
12816
+ "hidden lg:flex lg:w-1/2 bg-primary relative overflow-hidden",
12817
12817
  "justify-between p-12"
12818
12818
  ),
12819
12819
  style: backgroundImage ? {
@@ -12822,7 +12822,7 @@ var init_AuthLayout = __esm({
12822
12822
  } : void 0,
12823
12823
  gap: "none",
12824
12824
  children: [
12825
- /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "absolute inset-0 bg-gradient-to-br from-primary-600/90 to-primary-800/90" }),
12825
+ /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "absolute inset-0 bg-gradient-to-br from-primary/90 to-primary-hover/90" }),
12826
12826
  /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "relative z-10", children: /* @__PURE__ */ jsxRuntime.jsxs(reactRouterDom.Link, { to: "/", className: "flex items-center gap-3", children: [
12827
12827
  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(
12828
12828
  Typography,
@@ -12907,7 +12907,7 @@ var init_AuthLayout = __esm({
12907
12907
  ),
12908
12908
  children: /* @__PURE__ */ jsxRuntime.jsxs(Box, { className: "w-full max-w-md", children: [
12909
12909
  /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "lg:hidden mb-8 text-center", children: /* @__PURE__ */ jsxRuntime.jsxs(reactRouterDom.Link, { to: "/", className: "inline-flex items-center gap-3", children: [
12910
- logo || /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "w-12 h-12 bg-primary-600 rounded-xl flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(
12910
+ logo || /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "w-12 h-12 bg-primary rounded-xl flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(
12911
12911
  Typography,
12912
12912
  {
12913
12913
  variant: "body1",
@@ -14898,7 +14898,7 @@ var init_CodeBlock = __esm({
14898
14898
  {
14899
14899
  justify: "between",
14900
14900
  align: "center",
14901
- className: "px-3 py-2 bg-[var(--color-card)] rounded-t-lg border-b border-gray-700",
14901
+ className: "px-3 py-2 bg-[var(--color-card)] rounded-t-lg border-b border-border",
14902
14902
  children: [
14903
14903
  showLanguageBadge && /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: "default", size: "sm", children: language }),
14904
14904
  effectiveCopy && /* @__PURE__ */ jsxRuntime.jsx(
@@ -14907,9 +14907,9 @@ var init_CodeBlock = __esm({
14907
14907
  variant: "ghost",
14908
14908
  size: "sm",
14909
14909
  onClick: handleCopy,
14910
- className: "opacity-0 group-hover:opacity-100 focus:opacity-100 transition-opacity text-muted-foreground hover:text-white",
14910
+ className: "opacity-0 group-hover:opacity-100 focus:opacity-100 transition-opacity text-muted-foreground hover:text-foreground",
14911
14911
  "aria-label": t("common.copy"),
14912
- children: copied ? /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: "check", className: "w-4 h-4 text-green-400" }) : /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: "copy", className: "w-4 h-4" })
14912
+ children: copied ? /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: "check", className: "w-4 h-4 text-success" }) : /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: "copy", className: "w-4 h-4" })
14913
14913
  }
14914
14914
  )
14915
14915
  ]
@@ -15277,12 +15277,12 @@ var init_BloomQuizBlock = __esm({
15277
15277
  init_useEventBus();
15278
15278
  init_cn();
15279
15279
  BLOOM_CONFIG = {
15280
- remember: { color: "bg-gray-500", bgColor: "bg-gray-50 dark:bg-gray-900/30", label: "Remember" },
15281
- understand: { color: "bg-blue-500", bgColor: "bg-blue-50 dark:bg-blue-900/30", label: "Understand" },
15282
- apply: { color: "bg-green-500", bgColor: "bg-green-50 dark:bg-green-900/30", label: "Apply" },
15283
- analyze: { color: "bg-yellow-500", bgColor: "bg-yellow-50 dark:bg-yellow-900/30", label: "Analyze" },
15284
- evaluate: { color: "bg-orange-500", bgColor: "bg-orange-50 dark:bg-orange-900/30", label: "Evaluate" },
15285
- create: { color: "bg-purple-500", bgColor: "bg-purple-50 dark:bg-purple-900/30", label: "Create" }
15280
+ remember: { color: "bg-secondary text-secondary-foreground", bgColor: "bg-muted", label: "Remember" },
15281
+ understand: { color: "bg-info text-info-foreground", bgColor: "bg-info/10", label: "Understand" },
15282
+ apply: { color: "bg-success text-success-foreground", bgColor: "bg-success/10", label: "Apply" },
15283
+ analyze: { color: "bg-warning text-warning-foreground", bgColor: "bg-warning/10", label: "Analyze" },
15284
+ evaluate: { color: "bg-accent text-accent-foreground", bgColor: "bg-accent/10", label: "Evaluate" },
15285
+ create: { color: "bg-primary text-primary-foreground", bgColor: "bg-primary/10", label: "Create" }
15286
15286
  };
15287
15287
  BloomQuizBlock = ({
15288
15288
  level,
@@ -15308,22 +15308,22 @@ var init_BloomQuizBlock = __esm({
15308
15308
  "div",
15309
15309
  {
15310
15310
  className: cn(
15311
- "rounded-lg border border-indigo-100 dark:border-indigo-800 p-4 my-4 transition-all",
15311
+ "rounded-lg border border-primary p-4 my-4 transition-all",
15312
15312
  config.bgColor,
15313
15313
  className
15314
15314
  ),
15315
15315
  children: [
15316
15316
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between mb-3", children: [
15317
15317
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 flex-wrap", children: [
15318
- index !== void 0 && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-gray-500 dark:text-gray-400 font-medium text-sm", children: [
15318
+ index !== void 0 && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-muted-foreground font-medium text-sm", children: [
15319
15319
  "Question ",
15320
15320
  index + 1
15321
15321
  ] }),
15322
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn(config.color, "text-white text-xs px-2 py-1 rounded-full font-medium"), children: config.label })
15322
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn(config.color, "text-xs px-2 py-1 rounded-full font-medium"), children: config.label })
15323
15323
  ] }),
15324
- isAnswered && /* @__PURE__ */ jsxRuntime.jsx(LucideIcons2.CheckCircle, { className: "text-green-600 dark:text-green-400 flex-shrink-0", size: 20 })
15324
+ isAnswered && /* @__PURE__ */ jsxRuntime.jsx(LucideIcons2.CheckCircle, { className: "text-success flex-shrink-0", size: 20 })
15325
15325
  ] }),
15326
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "font-semibold text-indigo-900 dark:text-indigo-200 mb-3 space-y-2", children: questionSegments.map(
15326
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "font-semibold text-primary mb-3 space-y-2", children: questionSegments.map(
15327
15327
  (segment, idx) => segment.type === "markdown" ? /* @__PURE__ */ jsxRuntime.jsx(MarkdownContent, { content: segment.content }, `q-md-${idx}`) : /* @__PURE__ */ jsxRuntime.jsx(
15328
15328
  CodeBlock,
15329
15329
  {
@@ -15337,13 +15337,13 @@ var init_BloomQuizBlock = __esm({
15337
15337
  "button",
15338
15338
  {
15339
15339
  type: "button",
15340
- className: "inline-flex items-center rounded-md bg-indigo-600 dark:bg-indigo-500 px-3 py-1.5 text-sm font-medium text-white hover:bg-indigo-700 dark:hover:bg-indigo-600 transition-colors",
15340
+ className: "inline-flex items-center rounded-md bg-primary px-3 py-1.5 text-sm font-medium text-primary-foreground hover:bg-primary-hover transition-colors",
15341
15341
  onClick: handleReveal,
15342
15342
  children: revealed ? "Hide Answer" : "Reveal Answer"
15343
15343
  }
15344
15344
  ),
15345
- revealed && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rounded-lg bg-white/80 dark:bg-gray-800/80 p-3 text-sm text-slate-800 dark:text-gray-200 shadow-sm border border-indigo-100 dark:border-indigo-800 mt-3 space-y-2", children: [
15346
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-xs text-gray-600 dark:text-gray-400 mb-1 font-medium uppercase tracking-wide", children: "Answer:" }),
15345
+ revealed && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rounded-lg bg-card/80 p-3 text-sm text-foreground shadow-sm border border-primary mt-3 space-y-2", children: [
15346
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-xs text-muted-foreground mb-1 font-medium uppercase tracking-wide", children: "Answer:" }),
15347
15347
  answerSegments.map(
15348
15348
  (segment, idx) => segment.type === "markdown" ? /* @__PURE__ */ jsxRuntime.jsx(MarkdownContent, { content: segment.content }, `a-md-${idx}`) : /* @__PURE__ */ jsxRuntime.jsx(
15349
15349
  CodeBlock,
@@ -15567,12 +15567,12 @@ var init_QuizBlock = __esm({
15567
15567
  }) => {
15568
15568
  const { t } = hooks.useTranslate();
15569
15569
  const [revealed, setRevealed] = React82.useState(false);
15570
- return /* @__PURE__ */ jsxRuntime.jsx(Card2, { className: cn("my-4 border-blue-200 dark:border-blue-800", className), children: /* @__PURE__ */ jsxRuntime.jsxs(VStack, { gap: "sm", className: "p-4", children: [
15570
+ return /* @__PURE__ */ jsxRuntime.jsx(Card2, { className: cn("my-4 border-primary", className), children: /* @__PURE__ */ jsxRuntime.jsxs(VStack, { gap: "sm", className: "p-4", children: [
15571
15571
  /* @__PURE__ */ jsxRuntime.jsxs(HStack, { gap: "sm", align: "start", children: [
15572
- /* @__PURE__ */ jsxRuntime.jsx(Icon, { icon: LucideIcons2.HelpCircle, size: "sm", className: "text-blue-500 mt-0.5 shrink-0" }),
15572
+ /* @__PURE__ */ jsxRuntime.jsx(Icon, { icon: LucideIcons2.HelpCircle, size: "sm", className: "text-primary mt-0.5 shrink-0" }),
15573
15573
  /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body", className: "font-medium", children: question })
15574
15574
  ] }),
15575
- revealed ? /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "pl-7 pt-2 border-t border-gray-200 dark:border-gray-700", children: /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body", className: "text-foreground", children: answer }) }) : null,
15575
+ revealed ? /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "pl-7 pt-2 border-t border-border", children: /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body", className: "text-foreground", children: answer }) }) : null,
15576
15576
  /* @__PURE__ */ jsxRuntime.jsx(
15577
15577
  Button,
15578
15578
  {
@@ -17484,7 +17484,7 @@ var init_BookTableOfContents = __esm({
17484
17484
  className: cn(
17485
17485
  "justify-start text-left w-full",
17486
17486
  direction === "rtl" && "text-right",
17487
- isCurrent && "bg-blue-50 dark:bg-blue-950 text-blue-600 dark:text-blue-400"
17487
+ isCurrent && "bg-primary/10 text-primary"
17488
17488
  ),
17489
17489
  children: /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "truncate", children: /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body", children: String(chapter.title ?? "") }) })
17490
17490
  },
@@ -18665,7 +18665,7 @@ function CalendarGrid({
18665
18665
  border: true,
18666
18666
  className: cn(
18667
18667
  "cursor-pointer hover:shadow-sm transition-shadow text-xs truncate",
18668
- color ? color : "bg-blue-500/15 border-blue-500/30 text-blue-600"
18668
+ color ? color : "bg-primary/10 border-primary/30 text-primary"
18669
18669
  ),
18670
18670
  onClick: (e) => handleEventClick(event, e),
18671
18671
  children: /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "truncate font-medium", children: event.title })
@@ -18763,7 +18763,7 @@ function CalendarGrid({
18763
18763
  onClick: () => handleSlotClick(day, time),
18764
18764
  className: cn(
18765
18765
  "border-l border-border",
18766
- isToday && "bg-blue-50/30"
18766
+ isToday && "bg-primary/10"
18767
18767
  ),
18768
18768
  ...longPressEvent ? {
18769
18769
  onPointerDown: () => startLongPress(day, time),
@@ -20779,31 +20779,31 @@ var init_CodeRunnerPanel = __esm({
20779
20779
  }
20780
20780
  )
20781
20781
  ] }),
20782
- hasOutput && /* @__PURE__ */ jsxRuntime.jsxs(Box, { className: "rounded-lg border border-gray-700 bg-[#0d0d0d] overflow-hidden", children: [
20782
+ hasOutput && /* @__PURE__ */ jsxRuntime.jsxs(Box, { className: "rounded-lg border border-border bg-foreground overflow-hidden", children: [
20783
20783
  /* @__PURE__ */ jsxRuntime.jsxs(
20784
20784
  HStack,
20785
20785
  {
20786
20786
  gap: "sm",
20787
20787
  align: "center",
20788
- className: "px-3 py-2 bg-gray-800 border-b border-gray-700",
20788
+ className: "px-3 py-2 bg-card border-b border-border",
20789
20789
  children: [
20790
- /* @__PURE__ */ jsxRuntime.jsx(LucideIcons2.Terminal, { size: 16, className: "text-gray-400" }),
20791
- /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-gray-300 font-medium", children: "Output" })
20790
+ /* @__PURE__ */ jsxRuntime.jsx(LucideIcons2.Terminal, { size: 16, className: "text-muted-foreground" }),
20791
+ /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-foreground font-medium", children: "Output" })
20792
20792
  ]
20793
20793
  }
20794
20794
  ),
20795
- /* @__PURE__ */ jsxRuntime.jsx(VStack, { gap: "none", className: "p-3 font-mono text-sm", children: error ? /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-red-400 whitespace-pre-wrap", children: error }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
20796
- output?.stdout ? /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-gray-200 whitespace-pre-wrap", children: output.stdout }) : null,
20797
- output?.stderr ? /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-red-400 whitespace-pre-wrap", children: output.stderr }) : null,
20798
- !output?.stdout && !output?.stderr ? /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-gray-500 italic", children: "No output" }) : null,
20799
- output && output.testResults.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "mt-3 pt-3 border-t border-gray-700 space-y-2", children: output.testResults.map((test, index) => /* @__PURE__ */ jsxRuntime.jsxs(HStack, { gap: "sm", align: "start", className: "text-xs", children: [
20800
- test.passed ? /* @__PURE__ */ jsxRuntime.jsx(LucideIcons2.CheckCircle, { size: 14, className: "text-green-400 mt-0.5" }) : /* @__PURE__ */ jsxRuntime.jsx(LucideIcons2.XCircle, { size: 14, className: "text-red-400 mt-0.5" }),
20795
+ /* @__PURE__ */ jsxRuntime.jsx(VStack, { gap: "none", className: "p-3 font-mono text-sm", children: error ? /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-error whitespace-pre-wrap", children: error }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
20796
+ output?.stdout ? /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-background whitespace-pre-wrap", children: output.stdout }) : null,
20797
+ output?.stderr ? /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-error whitespace-pre-wrap", children: output.stderr }) : null,
20798
+ !output?.stdout && !output?.stderr ? /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-background italic", children: "No output" }) : null,
20799
+ output && output.testResults.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "mt-3 pt-3 border-t border-border space-y-2", children: output.testResults.map((test, index) => /* @__PURE__ */ jsxRuntime.jsxs(HStack, { gap: "sm", align: "start", className: "text-xs", children: [
20800
+ test.passed ? /* @__PURE__ */ jsxRuntime.jsx(LucideIcons2.CheckCircle, { size: 14, className: "text-success mt-0.5" }) : /* @__PURE__ */ jsxRuntime.jsx(LucideIcons2.XCircle, { size: 14, className: "text-error mt-0.5" }),
20801
20801
  /* @__PURE__ */ jsxRuntime.jsxs(VStack, { gap: "xs", className: "flex-1", children: [
20802
20802
  /* @__PURE__ */ jsxRuntime.jsxs(
20803
20803
  Typography,
20804
20804
  {
20805
20805
  variant: "small",
20806
- className: test.passed ? "text-green-400" : "text-red-400",
20806
+ className: test.passed ? "text-success" : "text-error",
20807
20807
  children: [
20808
20808
  "Test ",
20809
20809
  index + 1,
@@ -20812,15 +20812,15 @@ var init_CodeRunnerPanel = __esm({
20812
20812
  ]
20813
20813
  }
20814
20814
  ),
20815
- /* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "small", className: "text-gray-400", children: [
20815
+ /* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "small", className: "text-background", children: [
20816
20816
  "Input: ",
20817
20817
  test.input
20818
20818
  ] }),
20819
- /* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "small", className: "text-gray-400", children: [
20819
+ /* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "small", className: "text-background", children: [
20820
20820
  "Expected: ",
20821
20821
  test.expectedOutput
20822
20822
  ] }),
20823
- /* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "small", className: "text-gray-400", children: [
20823
+ /* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "small", className: "text-background", children: [
20824
20824
  "Actual: ",
20825
20825
  test.actualOutput
20826
20826
  ] })
@@ -21005,14 +21005,14 @@ var init_ConnectionBlock = __esm({
21005
21005
  "div",
21006
21006
  {
21007
21007
  className: cn(
21008
- "bg-emerald-50 dark:bg-emerald-900/20 border-l-4 border-emerald-500 rounded-r-lg p-5 mb-6",
21008
+ "bg-success/10 border-l-4 border-success rounded-r-lg p-5 mb-6",
21009
21009
  className
21010
21010
  ),
21011
21011
  children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-3", children: [
21012
- /* @__PURE__ */ jsxRuntime.jsx(LucideIcons2.Link2, { className: "text-emerald-600 dark:text-emerald-400 flex-shrink-0 mt-1", size: 20 }),
21012
+ /* @__PURE__ */ jsxRuntime.jsx(LucideIcons2.Link2, { className: "text-success flex-shrink-0 mt-1", size: 20 }),
21013
21013
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1", children: [
21014
- /* @__PURE__ */ jsxRuntime.jsx("h4", { className: "font-semibold text-emerald-900 dark:text-emerald-100 mb-2", children: "Building On What You Know" }),
21015
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "prose dark:prose-invert prose-sm max-w-none text-gray-700 dark:text-gray-300", children: /* @__PURE__ */ jsxRuntime.jsx(MarkdownContent, { content }) })
21014
+ /* @__PURE__ */ jsxRuntime.jsx("h4", { className: "font-semibold text-success mb-2", children: "Building On What You Know" }),
21015
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "prose dark:prose-invert prose-sm max-w-none text-foreground", children: /* @__PURE__ */ jsxRuntime.jsx(MarkdownContent, { content }) })
21016
21016
  ] })
21017
21017
  ] })
21018
21018
  }
@@ -21099,7 +21099,7 @@ function CounterStandard({
21099
21099
  variant: "h1",
21100
21100
  className: cn(
21101
21101
  sizeStyles8[size].display,
21102
- "font-bold tabular-nums text-primary-600"
21102
+ "font-bold tabular-nums text-primary"
21103
21103
  ),
21104
21104
  children: resolved.count
21105
21105
  }
@@ -21172,7 +21172,7 @@ function CounterFull({
21172
21172
  variant: "h1",
21173
21173
  className: cn(
21174
21174
  sizeStyles8[size].display,
21175
- "font-bold tabular-nums text-primary-600"
21175
+ "font-bold tabular-nums text-primary"
21176
21176
  ),
21177
21177
  children: resolved.count
21178
21178
  }
@@ -21419,11 +21419,11 @@ var init_DashboardLayout = __esm({
21419
21419
  className: "h-16 px-4 border-b border-border dark:border-border",
21420
21420
  children: [
21421
21421
  /* @__PURE__ */ jsxRuntime.jsxs(reactRouterDom.Link, { to: "/", className: "flex items-center gap-2", children: [
21422
- logo || /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "w-8 h-8 bg-primary-600 rounded-lg flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(
21422
+ logo || /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "w-8 h-8 bg-primary rounded-lg flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(
21423
21423
  Typography,
21424
21424
  {
21425
21425
  variant: "small",
21426
- className: "text-white font-bold text-sm",
21426
+ className: "text-primary-foreground font-bold text-sm",
21427
21427
  as: "span",
21428
21428
  children: appName.charAt(0).toUpperCase()
21429
21429
  }
@@ -21502,11 +21502,11 @@ var init_DashboardLayout = __esm({
21502
21502
  className: "hidden @md/dashboard:flex items-center gap-1 overflow-x-auto",
21503
21503
  children: [
21504
21504
  /* @__PURE__ */ jsxRuntime.jsxs(reactRouterDom.Link, { to: "/", className: "flex items-center gap-2 mr-3 shrink-0", children: [
21505
- logo || /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "w-7 h-7 bg-primary-600 rounded-lg flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(
21505
+ logo || /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "w-7 h-7 bg-primary rounded-lg flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(
21506
21506
  Typography,
21507
21507
  {
21508
21508
  variant: "small",
21509
- className: "text-white font-bold text-xs",
21509
+ className: "text-primary-foreground font-bold text-xs",
21510
21510
  as: "span",
21511
21511
  children: appName.charAt(0).toUpperCase()
21512
21512
  }
@@ -21566,8 +21566,8 @@ var init_DashboardLayout = __esm({
21566
21566
  {
21567
21567
  as: "span",
21568
21568
  className: cn(
21569
- "absolute -top-0.5 -right-0.5 min-w-[18px] h-[18px] px-1 rounded-full text-xs font-semibold text-white flex items-center justify-center",
21570
- action.variant === "danger" ? "bg-error" : action.variant === "primary" ? "bg-primary" : "bg-foreground"
21569
+ "absolute -top-0.5 -right-0.5 min-w-[18px] h-[18px] px-1 rounded-full text-xs font-semibold flex items-center justify-center",
21570
+ action.variant === "danger" ? "bg-error text-error-foreground" : action.variant === "primary" ? "bg-primary text-primary-foreground" : "bg-foreground text-background"
21571
21571
  ),
21572
21572
  children: action.badge
21573
21573
  }
@@ -21589,7 +21589,7 @@ var init_DashboardLayout = __esm({
21589
21589
  Box,
21590
21590
  {
21591
21591
  as: "span",
21592
- className: "absolute -top-0.5 -right-0.5 min-w-[18px] h-[18px] px-1 bg-error rounded-full text-xs font-semibold text-white flex items-center justify-center",
21592
+ className: "absolute -top-0.5 -right-0.5 min-w-[18px] h-[18px] px-1 bg-error rounded-full text-xs font-semibold text-error-foreground flex items-center justify-center",
21593
21593
  children: unreadCount > 99 ? "99+" : unreadCount
21594
21594
  }
21595
21595
  )
@@ -21872,7 +21872,7 @@ function SubMenu({
21872
21872
  ),
21873
21873
  children: [
21874
21874
  item.icon && (typeof item.icon === "string" ? /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: item.icon, size: "sm", className: "flex-shrink-0" }) : /* @__PURE__ */ jsxRuntime.jsx(Icon, { icon: item.icon, size: "sm", className: "flex-shrink-0" })),
21875
- /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: cn("flex-1", isDanger && "text-red-600"), children: item.label }),
21875
+ /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: cn("flex-1", isDanger && "text-error"), children: item.label }),
21876
21876
  item.badge !== void 0 && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-auto text-xs font-medium", children: item.badge })
21877
21877
  ]
21878
21878
  },
@@ -21929,7 +21929,7 @@ function MenuItemRow({
21929
21929
  Typography,
21930
21930
  {
21931
21931
  variant: "small",
21932
- className: cn("flex-1", isDanger && "text-red-600"),
21932
+ className: cn("flex-1", isDanger && "text-error"),
21933
21933
  children: item.label
21934
21934
  }
21935
21935
  ),
@@ -22697,20 +22697,24 @@ function DataGrid({
22697
22697
  const bodyFields = fieldDefs.filter((f3) => f3 !== titleField && !badgeFields.includes(f3));
22698
22698
  const primaryActions = actionDefs.filter((a) => a.variant !== "danger");
22699
22699
  const dangerActions = actionDefs.filter((a) => a.variant === "danger");
22700
- const handleActionClick = (action, itemData) => (e) => {
22701
- e.stopPropagation();
22702
- const payload = {
22703
- id: itemData.id,
22704
- row: itemData
22705
- };
22706
- eventBus.emit(`UI:${action.event}`, payload);
22700
+ const fireAction = (action, itemData) => {
22707
22701
  if (action.navigatesTo) {
22708
22702
  const url = action.navigatesTo.replace(
22709
22703
  /\{\{row\.(\w+(?:\.\w+)*)\}\}/g,
22710
22704
  (_, field) => String(itemData[field] ?? "")
22711
22705
  );
22712
- eventBus.emit("UI:NAVIGATE", { url });
22706
+ eventBus.emit("UI:NAVIGATE", { url, row: itemData });
22707
+ return;
22713
22708
  }
22709
+ const payload = {
22710
+ id: itemData.id,
22711
+ row: itemData
22712
+ };
22713
+ eventBus.emit(`UI:${action.event}`, payload);
22714
+ };
22715
+ const handleActionClick = (action, itemData) => (e) => {
22716
+ e.stopPropagation();
22717
+ fireAction(action, itemData);
22714
22718
  };
22715
22719
  const hasRenderProp = typeof children === "function";
22716
22720
  React82.useEffect(() => {
@@ -22812,10 +22816,7 @@ function DataGrid({
22812
22816
  label: action.label,
22813
22817
  icon: action.icon,
22814
22818
  event: action.event,
22815
- onClick: () => eventBus.emit(`UI:${action.event}`, {
22816
- id: itemData.id,
22817
- row: itemData
22818
- })
22819
+ onClick: () => fireAction(action, itemData)
22819
22820
  }))
22820
22821
  }
22821
22822
  )
@@ -22957,10 +22958,7 @@ function DataGrid({
22957
22958
  label: action.label,
22958
22959
  icon: action.icon,
22959
22960
  event: action.event,
22960
- onClick: () => eventBus.emit(`UI:${action.event}`, {
22961
- id: itemData.id,
22962
- row: itemData
22963
- })
22961
+ onClick: () => fireAction(action, itemData)
22964
22962
  }))
22965
22963
  }
22966
22964
  )
@@ -24823,8 +24821,8 @@ var init_RelationSelect = __esm({
24823
24821
  disabled,
24824
24822
  className: cn(
24825
24823
  "w-full justify-between font-normal",
24826
- error && "border-red-300 focus:border-red-500 focus:ring-red-500",
24827
- isOpen && "ring-2 ring-primary-500 border-primary-500"
24824
+ error && "border-error/50 focus:border-error focus:ring-error",
24825
+ isOpen && "ring-2 ring-primary border-primary"
24828
24826
  ),
24829
24827
  children: [
24830
24828
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -24904,7 +24902,7 @@ var init_RelationSelect = __esm({
24904
24902
  paddingY: "sm",
24905
24903
  className: cn(
24906
24904
  "text-left text-sm hover:bg-muted focus:outline-none focus:bg-muted",
24907
- option.value === value && "bg-primary-50 text-primary-700",
24905
+ option.value === value && "bg-primary/10 text-primary",
24908
24906
  option.disabled && "opacity-50 cursor-not-allowed"
24909
24907
  ),
24910
24908
  onClick: () => handleSelect(option),
@@ -25061,7 +25059,7 @@ var init_SidePanel = __esm({
25061
25059
  showOverlay && /* @__PURE__ */ jsxRuntime.jsx(Presence, { show: isOpen, animation: "overlay", children: /* @__PURE__ */ jsxRuntime.jsx(
25062
25060
  Box,
25063
25061
  {
25064
- className: "fixed inset-0 bg-white/80 backdrop-blur-sm z-40 lg:hidden",
25062
+ className: "fixed inset-0 bg-background/80 backdrop-blur-sm z-40 lg:hidden",
25065
25063
  onClick: handleClose
25066
25064
  }
25067
25065
  ) }),
@@ -25428,7 +25426,7 @@ var init_WizardNavigation = __esm({
25428
25426
  /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: "chevron-left", size: "sm" }),
25429
25427
  resolvedBackLabel
25430
25428
  ] }) : /* @__PURE__ */ jsxRuntime.jsx(Box, {}),
25431
- /* @__PURE__ */ jsxRuntime.jsx(HStack, { align: "center", gap: "sm", children: /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "caption", className: "text-neutral-500", children: t("wizard.stepOf", { current: String(currentStep + 1), total: String(totalSteps) }) }) }),
25429
+ /* @__PURE__ */ jsxRuntime.jsx(HStack, { align: "center", gap: "sm", children: /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "caption", className: "text-muted-foreground", children: t("wizard.stepOf", { current: String(currentStep + 1), total: String(totalSteps) }) }) }),
25432
25430
  isLastStep && showComplete ? /* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "primary", onClick: handleComplete, disabled: !isValid, children: resolvedCompleteLabel }) : showNext ? /* @__PURE__ */ jsxRuntime.jsxs(Button, { variant: "primary", onClick: handleNext, disabled: !isValid, children: [
25433
25431
  resolvedNextLabel,
25434
25432
  /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: "chevron-right", size: "sm" })
@@ -27585,6 +27583,7 @@ var init_Lightbox = __esm({
27585
27583
  {
27586
27584
  className: cn(
27587
27585
  "fixed inset-0 z-50 flex items-center justify-center",
27586
+ // eslint-disable-next-line almadar/no-hardcoded-colors -- media overlay: lightbox scrim behind images
27588
27587
  "bg-black bg-opacity-90",
27589
27588
  className
27590
27589
  ),
@@ -27607,7 +27606,7 @@ var init_Lightbox = __esm({
27607
27606
  "p-2 rounded-full",
27608
27607
  "text-[var(--color-foreground)] bg-[var(--color-card)]",
27609
27608
  "hover:bg-opacity-70 transition-opacity",
27610
- "focus:outline-none focus:ring-2 focus:ring-white"
27609
+ "focus:outline-none focus:ring-2 focus:ring-ring"
27611
27610
  ),
27612
27611
  "aria-label": t("aria.closeModal"),
27613
27612
  children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: "x", className: "w-6 h-6" })
@@ -27626,7 +27625,7 @@ var init_Lightbox = __esm({
27626
27625
  "p-2 rounded-full",
27627
27626
  "text-[var(--color-foreground)] bg-[var(--color-card)]",
27628
27627
  "hover:bg-opacity-70 transition-opacity",
27629
- "focus:outline-none focus:ring-2 focus:ring-white"
27628
+ "focus:outline-none focus:ring-2 focus:ring-ring"
27630
27629
  ),
27631
27630
  "aria-label": t("aria.previousImage"),
27632
27631
  children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: "chevron-left", className: "w-8 h-8" })
@@ -27663,7 +27662,7 @@ var init_Lightbox = __esm({
27663
27662
  "p-2 rounded-full",
27664
27663
  "text-[var(--color-foreground)] bg-[var(--color-card)]",
27665
27664
  "hover:bg-opacity-70 transition-opacity",
27666
- "focus:outline-none focus:ring-2 focus:ring-white"
27665
+ "focus:outline-none focus:ring-2 focus:ring-ring"
27667
27666
  ),
27668
27667
  "aria-label": t("aria.nextImage"),
27669
27668
  children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: "chevron-right", className: "w-8 h-8" })
@@ -30598,6 +30597,7 @@ var init_QrScanner = __esm({
30598
30597
  overflow: "hidden",
30599
30598
  rounded: "sm",
30600
30599
  className: cn(
30600
+ // eslint-disable-next-line almadar/no-hardcoded-colors -- media overlay: always over a dark scrim
30601
30601
  "bg-black",
30602
30602
  "aspect-square w-full max-w-md",
30603
30603
  className
@@ -30662,7 +30662,9 @@ var init_QrScanner = __esm({
30662
30662
  type: "button",
30663
30663
  onClick: togglePause,
30664
30664
  className: cn(
30665
+ // eslint-disable-next-line almadar/no-hardcoded-colors -- media overlay: always over a dark scrim
30665
30666
  "rounded-full bg-black bg-opacity-60 p-2 text-white",
30667
+ // eslint-disable-next-line almadar/no-hardcoded-colors -- media overlay: always over a dark scrim
30666
30668
  "hover:bg-opacity-80 focus:outline-none focus:ring-2 focus:ring-white"
30667
30669
  ),
30668
30670
  "aria-label": isPaused ? t("qrScanner.resumeScanning") : t("qrScanner.pauseScanning"),
@@ -30675,7 +30677,9 @@ var init_QrScanner = __esm({
30675
30677
  type: "button",
30676
30678
  onClick: toggleFacing,
30677
30679
  className: cn(
30680
+ // eslint-disable-next-line almadar/no-hardcoded-colors -- media overlay: always over a dark scrim
30678
30681
  "rounded-full bg-black bg-opacity-60 p-2 text-white",
30682
+ // eslint-disable-next-line almadar/no-hardcoded-colors -- media overlay: always over a dark scrim
30679
30683
  "hover:bg-opacity-80 focus:outline-none focus:ring-2 focus:ring-white"
30680
30684
  ),
30681
30685
  "aria-label": currentFacing === "environment" ? t("qrScanner.switchToFrontCamera") : t("qrScanner.switchToRearCamera"),
@@ -30688,7 +30692,9 @@ var init_QrScanner = __esm({
30688
30692
  type: "button",
30689
30693
  onClick: handleMockScan,
30690
30694
  className: cn(
30695
+ // eslint-disable-next-line almadar/no-hardcoded-colors -- media overlay: always over a dark scrim
30691
30696
  "rounded-full bg-black bg-opacity-60 px-3 py-2 text-xs text-white",
30697
+ // eslint-disable-next-line almadar/no-hardcoded-colors -- media overlay: always over a dark scrim
30692
30698
  "hover:bg-opacity-80 focus:outline-none focus:ring-2 focus:ring-white"
30693
30699
  ),
30694
30700
  "aria-label": t("aria.mockScanDev"),
@@ -33424,10 +33430,10 @@ var init_ModuleCard = __esm({
33424
33430
  init_avl_atom_types();
33425
33431
  init_MiniStateMachine();
33426
33432
  PERSISTENCE_BORDER = {
33427
- persistent: "border-l-[3px] border-l-blue-500 border-solid",
33428
- runtime: "border-l-[3px] border-l-blue-500 border-dashed",
33429
- singleton: "border-l-[3px] border-l-blue-500 border-double",
33430
- instance: "border-l-[3px] border-l-blue-500 border-dotted"
33433
+ persistent: "border-l-[3px] border-l-primary border-solid",
33434
+ runtime: "border-l-[3px] border-l-primary border-dashed",
33435
+ singleton: "border-l-[3px] border-l-primary border-double",
33436
+ instance: "border-l-[3px] border-l-primary border-dotted"
33431
33437
  };
33432
33438
  PERSISTENCE_ICON = {
33433
33439
  persistent: "\u26C1",
@@ -33457,8 +33463,8 @@ var init_ModuleCard = __esm({
33457
33463
  className: "rounded-lg border border-[var(--color-border)] bg-[var(--color-card)] shadow-sm overflow-hidden",
33458
33464
  style: { minWidth: 280, maxWidth: 400 },
33459
33465
  children: [
33460
- /* @__PURE__ */ jsxRuntime.jsx(react.Handle, { type: "target", position: react.Position.Left, className: "!w-2.5 !h-2.5 !bg-orange-400" }),
33461
- /* @__PURE__ */ jsxRuntime.jsx(react.Handle, { type: "source", position: react.Position.Right, className: "!w-2.5 !h-2.5 !bg-orange-400" }),
33466
+ /* @__PURE__ */ jsxRuntime.jsx(react.Handle, { type: "target", position: react.Position.Left, className: "!w-2.5 !h-2.5 !bg-warning" }),
33467
+ /* @__PURE__ */ jsxRuntime.jsx(react.Handle, { type: "source", position: react.Position.Right, className: "!w-2.5 !h-2.5 !bg-warning" }),
33462
33468
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-3 py-2 border-b border-[var(--color-border)]", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-base font-bold text-[var(--color-foreground)]", children: orbitalName }) }),
33463
33469
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `px-3 py-2 border-b border-[var(--color-border)] ${PERSISTENCE_BORDER[persistence] ?? ""}`, children: [
33464
33470
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1.5 mb-1.5", children: [
@@ -35914,19 +35920,19 @@ var init_ReflectionBlock = __esm({
35914
35920
  "div",
35915
35921
  {
35916
35922
  className: cn(
35917
- "my-6 border-l-4 border-amber-400 bg-amber-50 dark:bg-amber-900/20 rounded-r-lg p-4",
35923
+ "my-6 border-l-4 border-warning bg-warning/10 rounded-r-lg p-4",
35918
35924
  className
35919
35925
  ),
35920
35926
  children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-3", children: [
35921
- /* @__PURE__ */ jsxRuntime.jsx(LucideIcons2.PauseCircle, { className: "text-amber-600 dark:text-amber-400 flex-shrink-0 mt-1", size: 20 }),
35927
+ /* @__PURE__ */ jsxRuntime.jsx(LucideIcons2.PauseCircle, { className: "text-warning flex-shrink-0 mt-1", size: 20 }),
35922
35928
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1", children: [
35923
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "font-medium text-amber-900 dark:text-amber-100 mb-2", children: "Pause & Reflect" }),
35924
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-gray-700 dark:text-gray-300 text-sm mb-3", children: prompt }),
35929
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "font-medium text-warning mb-2", children: "Pause & Reflect" }),
35930
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-foreground text-sm mb-3", children: prompt }),
35925
35931
  isExpanded ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
35926
35932
  /* @__PURE__ */ jsxRuntime.jsx(
35927
35933
  "textarea",
35928
35934
  {
35929
- className: "w-full p-2 border border-amber-300 dark:border-amber-700 rounded text-sm bg-white dark:bg-gray-800 text-gray-900 dark:text-gray-100 focus:ring-2 focus:ring-amber-500 focus:border-transparent",
35935
+ className: "w-full p-2 border border-input rounded text-sm bg-card text-foreground focus:ring-2 focus:ring-ring focus:border-transparent",
35930
35936
  placeholder: "Your thoughts...",
35931
35937
  value: note,
35932
35938
  onChange: (e) => setNote(e.target.value),
@@ -35937,7 +35943,7 @@ var init_ReflectionBlock = __esm({
35937
35943
  "button",
35938
35944
  {
35939
35945
  onClick: handleSave,
35940
- className: "mt-2 text-sm px-3 py-1 bg-amber-600 text-white rounded hover:bg-amber-700 transition-colors",
35946
+ className: "mt-2 text-sm px-3 py-1 bg-warning text-warning-foreground rounded hover:opacity-90 transition-colors",
35941
35947
  children: "Save & Continue"
35942
35948
  }
35943
35949
  )
@@ -35945,7 +35951,7 @@ var init_ReflectionBlock = __esm({
35945
35951
  "button",
35946
35952
  {
35947
35953
  onClick: () => setIsExpanded(true),
35948
- className: "text-sm text-amber-600 dark:text-amber-400 hover:underline",
35954
+ className: "text-sm text-warning hover:underline",
35949
35955
  children: savedNote ? "\u2713 Answered \xB7 Edit" : "Answer this question"
35950
35956
  }
35951
35957
  )
@@ -36231,7 +36237,7 @@ function DataTable({
36231
36237
  )),
36232
36238
  rowActions && /* @__PURE__ */ jsxRuntime.jsx("th", { className: "w-12 px-4 py-3" })
36233
36239
  ] }) }),
36234
- /* @__PURE__ */ jsxRuntime.jsx("tbody", { className: "divide-y divide-gray-200 dark:divide-gray-700", children: isLoading ? /* @__PURE__ */ jsxRuntime.jsx("tr", { children: /* @__PURE__ */ jsxRuntime.jsx(
36240
+ /* @__PURE__ */ jsxRuntime.jsx("tbody", { className: "divide-y divide-border", children: isLoading ? /* @__PURE__ */ jsxRuntime.jsx("tr", { children: /* @__PURE__ */ jsxRuntime.jsx(
36235
36241
  "td",
36236
36242
  {
36237
36243
  colSpan: normalizedColumns.length + (selectable ? 1 : 0) + (rowActions ? 1 : 0),
@@ -36602,7 +36608,7 @@ var init_DetailPanel = __esm({
36602
36608
  };
36603
36609
  const effectiveFieldNames = isFieldDefArray(propFields) ? normalizeFieldDefs(propFields) : fieldNames;
36604
36610
  const fieldTypeMap = isFieldDefArray(propFields) ? buildFieldTypeMap(propFields) : {};
36605
- React82.useCallback(
36611
+ const handleActionClick = React82.useCallback(
36606
36612
  (action, data2) => {
36607
36613
  if (action.navigatesTo) {
36608
36614
  const url = action.navigatesTo.replace(
@@ -36794,8 +36800,9 @@ var init_DetailPanel = __esm({
36794
36800
  {
36795
36801
  variant: action.variant || "secondary",
36796
36802
  size: "sm",
36797
- action: action.event,
36803
+ action: action.navigatesTo ? void 0 : action.event,
36798
36804
  actionPayload: { row: normalizedData },
36805
+ onClick: action.navigatesTo ? () => handleActionClick(action, normalizedData) : void 0,
36799
36806
  icon: action.icon,
36800
36807
  "data-testid": action.event ? `action-${action.event}` : void 0,
36801
36808
  "data-row-id": normalizedData?.id !== void 0 ? String(normalizedData.id) : void 0,
@@ -38838,8 +38845,9 @@ var init_MediaGallery = __esm({
38838
38845
  )
38839
38846
  }
38840
38847
  ),
38841
- item.caption && /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "absolute bottom-0 left-0 right-0 p-2 bg-gradient-to-t from-black/60 to-transparent", children: /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "caption", className: "text-white truncate", children: item.caption }) }),
38842
- selectable && isSelected && /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "absolute top-2 right-2 w-5 h-5 rounded-full bg-primary flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "caption", className: "text-white text-xs", children: "\u2713" }) })
38848
+ item.caption && // eslint-disable-next-line almadar/no-hardcoded-colors -- media overlay: caption scrim over image
38849
+ /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "absolute bottom-0 left-0 right-0 p-2 bg-gradient-to-t from-black/60 to-transparent", children: /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "caption", className: "text-white truncate", children: item.caption }) }),
38850
+ selectable && isSelected && /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "absolute top-2 right-2 w-5 h-5 rounded-full bg-primary flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "caption", className: "text-primary-foreground text-xs", children: "\u2713" }) })
38843
38851
  ]
38844
38852
  },
38845
38853
  item.id
@@ -38868,7 +38876,7 @@ var init_MediaGallery = __esm({
38868
38876
  size: "sm",
38869
38877
  icon: LucideIcons2.X,
38870
38878
  action: "LIGHTBOX_CLOSE",
38871
- className: "text-white hover:bg-white/20"
38879
+ className: "text-foreground hover:bg-muted/50"
38872
38880
  }
38873
38881
  ) }),
38874
38882
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -38879,7 +38887,7 @@ var init_MediaGallery = __esm({
38879
38887
  className: "max-w-full max-h-[80vh] object-contain rounded-md"
38880
38888
  }
38881
38889
  ),
38882
- lightboxItem.caption && /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body", className: "text-white mt-3 text-center", children: lightboxItem.caption })
38890
+ lightboxItem.caption && /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body", className: "text-foreground mt-3 text-center", children: lightboxItem.caption })
38883
38891
  ]
38884
38892
  }
38885
38893
  )
@@ -39340,7 +39348,7 @@ function WalkMinimap() {
39340
39348
  {
39341
39349
  variant,
39342
39350
  size: "sm",
39343
- className: `flex-shrink-0 text-[9px] ${isActive ? "ring-1 ring-cyan-400" : ""}`,
39351
+ className: `flex-shrink-0 text-[9px] ${isActive ? "ring-1 ring-info" : ""}`,
39344
39352
  children: [
39345
39353
  isDone ? "\u2713" : isActive ? "\u25CF" : "\u25CB",
39346
39354
  " ",
@@ -39481,13 +39489,13 @@ function WalkMinimap() {
39481
39489
  })
39482
39490
  ] }) }),
39483
39491
  /* @__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: [
39484
- /* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "caption", className: "text-xs font-mono text-green-500", children: [
39492
+ /* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "caption", className: "text-xs font-mono text-success", children: [
39485
39493
  "Engine: ",
39486
39494
  engineCount,
39487
39495
  "/",
39488
39496
  totalTransitions
39489
39497
  ] }),
39490
- domCount > 0 && /* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "caption", className: "text-xs font-mono text-cyan-500", children: [
39498
+ domCount > 0 && /* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "caption", className: "text-xs font-mono text-info", children: [
39491
39499
  "DOM: ",
39492
39500
  domCount
39493
39501
  ] }),
@@ -39520,13 +39528,13 @@ function TraitsTab({ traits: traits2 }) {
39520
39528
  const accordionItems = traits2.map((trait) => ({
39521
39529
  id: trait.id,
39522
39530
  header: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 w-full", children: [
39523
- /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body", weight: "semibold", className: "text-purple-600 dark:text-purple-400", children: trait.name }),
39531
+ /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body", weight: "semibold", className: "text-primary", children: trait.name }),
39524
39532
  /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: "success", size: "sm", children: trait.currentState }),
39525
- /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-gray-500 ml-auto", children: t("debug.transitionsCount", { count: trait.transitionCount }) })
39533
+ /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-muted-foreground ml-auto", children: t("debug.transitionsCount", { count: trait.transitionCount }) })
39526
39534
  ] }),
39527
39535
  content: /* @__PURE__ */ jsxRuntime.jsxs(Stack, { gap: "sm", children: [
39528
39536
  /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
39529
- /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-2", children: t("debug.states") }),
39537
+ /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground mb-2", children: t("debug.states") }),
39530
39538
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-wrap gap-1", children: trait.states.map((state) => /* @__PURE__ */ jsxRuntime.jsx(
39531
39539
  Badge,
39532
39540
  {
@@ -39538,18 +39546,18 @@ function TraitsTab({ traits: traits2 }) {
39538
39546
  )) })
39539
39547
  ] }),
39540
39548
  trait.transitions.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
39541
- /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-2", children: t("debug.transitions") }),
39549
+ /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground mb-2", children: t("debug.transitions") }),
39542
39550
  /* @__PURE__ */ jsxRuntime.jsx(Stack, { gap: "xs", children: trait.transitions.map((t2, i) => /* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "small", className: "font-mono", children: [
39543
39551
  t2.from,
39544
39552
  " \u2192 ",
39545
39553
  t2.to,
39546
39554
  " ",
39547
- /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-gray-500", children: [
39555
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-muted-foreground", children: [
39548
39556
  "(",
39549
39557
  t2.event,
39550
39558
  ")"
39551
39559
  ] }),
39552
- t2.guard && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-amber-500", children: [
39560
+ t2.guard && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-warning", children: [
39553
39561
  " [",
39554
39562
  t2.guard,
39555
39563
  "]"
@@ -39557,7 +39565,7 @@ function TraitsTab({ traits: traits2 }) {
39557
39565
  ] }, i)) })
39558
39566
  ] }),
39559
39567
  trait.guards.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
39560
- /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-2", children: t("debug.guards") }),
39568
+ /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground mb-2", children: t("debug.guards") }),
39561
39569
  /* @__PURE__ */ jsxRuntime.jsx(Stack, { gap: "xs", children: trait.guards.map((g, i) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [
39562
39570
  /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", children: g.name }),
39563
39571
  /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: g.lastResult === true ? "success" : g.lastResult === false ? "danger" : "default", size: "sm", children: g.lastResult === void 0 ? "?" : g.lastResult ? "\u2713" : "\u2717" })
@@ -39600,11 +39608,11 @@ function TicksTab({ ticks: ticks2 }) {
39600
39608
  };
39601
39609
  const TickCard = ({ tick, active }) => /* @__PURE__ */ jsxRuntime.jsxs(Card, { className: `p-3 ${!active ? "opacity-50" : ""}`, children: [
39602
39610
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 mb-2", children: [
39603
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: `w-2 h-2 rounded-full ${active ? "bg-green-500" : "bg-gray-400"}` }),
39604
- /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body", weight: "semibold", className: "text-amber-600 dark:text-amber-400", children: tick.name }),
39605
- /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-gray-500", children: tick.traitName })
39611
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: `w-2 h-2 rounded-full ${active ? "bg-success" : "bg-muted-foreground"}` }),
39612
+ /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body", weight: "semibold", className: "text-warning", children: tick.name }),
39613
+ /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-muted-foreground", children: tick.traitName })
39606
39614
  ] }),
39607
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-3 text-xs text-gray-500", children: [
39615
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-3 text-xs text-muted-foreground", children: [
39608
39616
  /* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
39609
39617
  tick.interval,
39610
39618
  "ms"
@@ -39627,7 +39635,7 @@ function TicksTab({ ticks: ticks2 }) {
39627
39635
  ] });
39628
39636
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "debug-tab debug-tab--ticks", children: [
39629
39637
  activeTicks.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-4", children: [
39630
- /* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-2", children: [
39638
+ /* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground mb-2", children: [
39631
39639
  "Active (",
39632
39640
  activeTicks.length,
39633
39641
  ")"
@@ -39635,7 +39643,7 @@ function TicksTab({ ticks: ticks2 }) {
39635
39643
  /* @__PURE__ */ jsxRuntime.jsx(Stack, { gap: "sm", children: activeTicks.map((tick) => /* @__PURE__ */ jsxRuntime.jsx(TickCard, { tick, active: true }, tick.id)) })
39636
39644
  ] }),
39637
39645
  inactiveTicks.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
39638
- /* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "small", weight: "medium", className: "text-gray-400 mb-2", children: [
39646
+ /* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground mb-2", children: [
39639
39647
  "Inactive (",
39640
39648
  inactiveTicks.length,
39641
39649
  ")"
@@ -39683,33 +39691,33 @@ function EntitiesTab({ snapshot }) {
39683
39691
  id: `singleton-${name}`,
39684
39692
  header: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
39685
39693
  /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: "primary", size: "sm", children: t("debug.singleton") }),
39686
- /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body", weight: "semibold", className: "text-sky-600 dark:text-sky-400", children: name })
39694
+ /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body", weight: "semibold", className: "text-info", children: name })
39687
39695
  ] }),
39688
- content: /* @__PURE__ */ jsxRuntime.jsx("pre", { className: "text-xs text-gray-600 dark:text-gray-400 bg-gray-50 dark:bg-gray-800 p-2 rounded overflow-auto max-h-40", children: JSON.stringify(data, null, 2) })
39696
+ content: /* @__PURE__ */ jsxRuntime.jsx("pre", { className: "text-xs text-muted-foreground bg-muted p-2 rounded overflow-auto max-h-40", children: JSON.stringify(data, null, 2) })
39689
39697
  }));
39690
39698
  const runtimeItems = runtimeEntities.slice(0, 20).map((entity) => ({
39691
39699
  id: entity.id,
39692
39700
  header: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
39693
- /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body", weight: "semibold", className: "text-sky-600 dark:text-sky-400", children: entity.type }),
39694
- /* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "small", className: "text-gray-500", children: [
39701
+ /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body", weight: "semibold", className: "text-info", children: entity.type }),
39702
+ /* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "small", className: "text-muted-foreground", children: [
39695
39703
  "#",
39696
39704
  entity.id.slice(0, 8)
39697
39705
  ] })
39698
39706
  ] }),
39699
- content: /* @__PURE__ */ jsxRuntime.jsx("pre", { className: "text-xs text-gray-600 dark:text-gray-400 bg-gray-50 dark:bg-gray-800 p-2 rounded overflow-auto max-h-40", children: JSON.stringify(entity.data, null, 2) })
39707
+ content: /* @__PURE__ */ jsxRuntime.jsx("pre", { className: "text-xs text-muted-foreground bg-muted p-2 rounded overflow-auto max-h-40", children: JSON.stringify(entity.data, null, 2) })
39700
39708
  }));
39701
39709
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "debug-tab debug-tab--entities", children: [
39702
39710
  singletonItems.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-4", children: [
39703
- /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-2", children: t("debug.singletonsCount", { count: singletonItems.length }) }),
39711
+ /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground mb-2", children: t("debug.singletonsCount", { count: singletonItems.length }) }),
39704
39712
  /* @__PURE__ */ jsxRuntime.jsx(Accordion, { items: singletonItems, multiple: true })
39705
39713
  ] }),
39706
39714
  runtimeItems.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-4", children: [
39707
- /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-2", children: t("debug.runtimeCount", { count: runtimeEntities.length }) }),
39715
+ /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground mb-2", children: t("debug.runtimeCount", { count: runtimeEntities.length }) }),
39708
39716
  /* @__PURE__ */ jsxRuntime.jsx(Accordion, { items: runtimeItems, multiple: true }),
39709
- runtimeEntities.length > 20 && /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-gray-400 text-center mt-2", children: t("debug.moreEntities", { count: runtimeEntities.length - 20 }) })
39717
+ runtimeEntities.length > 20 && /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-muted-foreground text-center mt-2", children: t("debug.moreEntities", { count: runtimeEntities.length - 20 }) })
39710
39718
  ] }),
39711
39719
  persistentEntries.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
39712
- /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-2", children: t("debug.persistent") }),
39720
+ /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground mb-2", children: t("debug.persistent") }),
39713
39721
  /* @__PURE__ */ jsxRuntime.jsx(Stack, { gap: "xs", children: persistentEntries.map(([type, info]) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between py-1", children: [
39714
39722
  /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", children: type }),
39715
39723
  /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: info.loaded ? "success" : "default", size: "sm", children: info.loaded ? t("debug.loadedCount", { count: info.count }) : t("debug.notLoaded") })
@@ -39794,7 +39802,7 @@ function EventFlowTab({ events: events2 }) {
39794
39802
  );
39795
39803
  })
39796
39804
  ] }),
39797
- /* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex items-center gap-1 text-xs text-gray-500 ml-auto cursor-pointer", children: [
39805
+ /* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex items-center gap-1 text-xs text-muted-foreground ml-auto cursor-pointer", children: [
39798
39806
  /* @__PURE__ */ jsxRuntime.jsx(
39799
39807
  Checkbox,
39800
39808
  {
@@ -39809,18 +39817,18 @@ function EventFlowTab({ events: events2 }) {
39809
39817
  "div",
39810
39818
  {
39811
39819
  ref: containerRef,
39812
- className: "max-h-64 overflow-y-auto space-y-1 bg-gray-50 dark:bg-gray-800 rounded p-2",
39820
+ className: "max-h-64 overflow-y-auto space-y-1 bg-muted rounded p-2",
39813
39821
  children: filteredEvents.slice(-100).map((event) => {
39814
39822
  const { variant, icon } = TYPE_BADGES[event.type] || { variant: "default", icon: "\u2022" };
39815
39823
  return /* @__PURE__ */ jsxRuntime.jsxs(
39816
39824
  "div",
39817
39825
  {
39818
- className: "flex items-start gap-2 text-xs py-1 hover:bg-gray-100 dark:hover:bg-gray-700 rounded px-1",
39826
+ className: "flex items-start gap-2 text-xs py-1 hover:bg-muted/50 rounded px-1",
39819
39827
  children: [
39820
- /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-gray-400 font-mono min-w-[65px]", children: formatTime2(event.timestamp) }),
39828
+ /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-muted-foreground font-mono min-w-[65px]", children: formatTime2(event.timestamp) }),
39821
39829
  /* @__PURE__ */ jsxRuntime.jsx("span", { children: icon }),
39822
39830
  /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant, size: "sm", className: "min-w-[60px] justify-center", children: event.source }),
39823
- /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-gray-600 dark:text-gray-400", children: event.message })
39831
+ /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-muted-foreground", children: event.message })
39824
39832
  ]
39825
39833
  },
39826
39834
  event.id
@@ -39884,21 +39892,21 @@ function GuardsPanel({ guards }) {
39884
39892
  id: guard.id,
39885
39893
  header: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 w-full", children: [
39886
39894
  /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: guard.result ? "success" : "danger", size: "sm", children: guard.result ? "\u2713" : "\u2717" }),
39887
- /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body", weight: "semibold", className: "text-amber-600 dark:text-amber-400", children: guard.guardName }),
39888
- /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-gray-500", children: guard.context.type === "transition" ? `${guard.context.transitionFrom} \u2192 ${guard.context.transitionTo}` : guard.context.tickName }),
39889
- /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-gray-400 ml-auto", children: formatTime2(guard.timestamp) })
39895
+ /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body", weight: "semibold", className: "text-warning", children: guard.guardName }),
39896
+ /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-muted-foreground", children: guard.context.type === "transition" ? `${guard.context.transitionFrom} \u2192 ${guard.context.transitionTo}` : guard.context.tickName }),
39897
+ /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-muted-foreground ml-auto", children: formatTime2(guard.timestamp) })
39890
39898
  ] }),
39891
39899
  content: /* @__PURE__ */ jsxRuntime.jsxs(Stack, { gap: "sm", children: [
39892
39900
  /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
39893
- /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500", children: t("debug.expression") }),
39894
- /* @__PURE__ */ jsxRuntime.jsx("code", { className: "block mt-1 text-xs text-amber-600 dark:text-amber-400 bg-amber-50 dark:bg-amber-900/20 px-2 py-1 rounded", children: guard.expression })
39901
+ /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground", children: t("debug.expression") }),
39902
+ /* @__PURE__ */ jsxRuntime.jsx("code", { className: "block mt-1 text-xs text-warning bg-warning/10 px-2 py-1 rounded", children: guard.expression })
39895
39903
  ] }),
39896
39904
  /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
39897
- /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500", children: t("debug.inputs") }),
39898
- /* @__PURE__ */ jsxRuntime.jsx("pre", { className: "mt-1 text-xs text-gray-600 dark:text-gray-400 bg-gray-50 dark:bg-gray-800 p-2 rounded overflow-auto max-h-24", children: JSON.stringify(guard.inputs, null, 2) })
39905
+ /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground", children: t("debug.inputs") }),
39906
+ /* @__PURE__ */ jsxRuntime.jsx("pre", { className: "mt-1 text-xs text-muted-foreground bg-muted p-2 rounded overflow-auto max-h-24", children: JSON.stringify(guard.inputs, null, 2) })
39899
39907
  ] }),
39900
39908
  /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
39901
- /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500", children: t("debug.trait") }),
39909
+ /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground", children: t("debug.trait") }),
39902
39910
  /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", children: guard.context.traitName })
39903
39911
  ] })
39904
39912
  ] })
@@ -39954,7 +39962,7 @@ function VerificationTab({ checks, summary }) {
39954
39962
  (a, b) => (sortOrder[a.status] ?? 4) - (sortOrder[b.status] ?? 4)
39955
39963
  );
39956
39964
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "debug-tab debug-tab--verification", children: [
39957
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3 mb-3 p-2 bg-gray-50 dark:bg-gray-800 rounded", children: [
39965
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3 mb-3 p-2 bg-muted rounded", children: [
39958
39966
  /* @__PURE__ */ jsxRuntime.jsxs(Badge, { variant: "success", size: "sm", children: [
39959
39967
  summary.passed,
39960
39968
  " passed"
@@ -39971,7 +39979,7 @@ function VerificationTab({ checks, summary }) {
39971
39979
  summary.pending,
39972
39980
  " pending"
39973
39981
  ] }),
39974
- /* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "small", className: "text-gray-500 ml-auto", children: [
39982
+ /* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "small", className: "text-muted-foreground ml-auto", children: [
39975
39983
  summary.totalChecks,
39976
39984
  " total checks"
39977
39985
  ] })
@@ -39981,12 +39989,12 @@ function VerificationTab({ checks, summary }) {
39981
39989
  return /* @__PURE__ */ jsxRuntime.jsxs(
39982
39990
  "div",
39983
39991
  {
39984
- className: "flex items-start gap-2 p-2 rounded hover:bg-gray-50 dark:hover:bg-gray-800",
39992
+ className: "flex items-start gap-2 p-2 rounded hover:bg-muted/50",
39985
39993
  children: [
39986
39994
  /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: config.variant, size: "sm", className: "min-w-[20px] justify-center mt-0.5", children: config.icon }),
39987
39995
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 min-w-0", children: [
39988
39996
  /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "break-words", children: check.label }),
39989
- check.details && /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-gray-500 break-words", children: check.details })
39997
+ check.details && /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-muted-foreground break-words", children: check.details })
39990
39998
  ] }),
39991
39999
  /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-muted-foreground font-mono text-xs shrink-0", children: new Date(check.updatedAt).toLocaleTimeString("en-US", {
39992
40000
  hour12: false,
@@ -40021,10 +40029,10 @@ var init_VerificationTab = __esm({
40021
40029
  function EffectBadge({ effect }) {
40022
40030
  const variant = EFFECT_STATUS_VARIANT[effect.status] || "default";
40023
40031
  const icon = effect.status === "executed" ? "\u2713" : effect.status === "failed" ? "\u2717" : "-";
40024
- return /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "inline-flex items-center gap-1 text-xs font-mono bg-gray-100 dark:bg-gray-700 rounded px-1.5 py-0.5", children: [
40032
+ return /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "inline-flex items-center gap-1 text-xs font-mono bg-muted rounded px-1.5 py-0.5", children: [
40025
40033
  /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant, size: "sm", className: "!text-[9px] !px-1 !py-0", children: icon }),
40026
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-gray-600 dark:text-gray-400", children: effect.type }),
40027
- effect.error && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-red-500 truncate max-w-[120px]", title: effect.error, children: effect.error })
40034
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: effect.type }),
40035
+ effect.error && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-error truncate max-w-[120px]", title: effect.error, children: effect.error })
40028
40036
  ] });
40029
40037
  }
40030
40038
  function TransitionTimeline({ transitions }) {
@@ -40059,8 +40067,8 @@ function TransitionTimeline({ transitions }) {
40059
40067
  const sorted = [...transitions].reverse();
40060
40068
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "debug-tab debug-tab--timeline", children: [
40061
40069
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between mb-2", children: [
40062
- /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-gray-500", children: t("debug.transitionsRecorded", { count: transitions.length }) }),
40063
- /* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex items-center gap-1 text-xs text-gray-500 cursor-pointer", children: [
40070
+ /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-muted-foreground", children: t("debug.transitionsRecorded", { count: transitions.length }) }),
40071
+ /* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex items-center gap-1 text-xs text-muted-foreground cursor-pointer", children: [
40064
40072
  /* @__PURE__ */ jsxRuntime.jsx(
40065
40073
  Checkbox,
40066
40074
  {
@@ -40085,22 +40093,22 @@ function TransitionTimeline({ transitions }) {
40085
40093
  {
40086
40094
  className: `
40087
40095
  relative pl-6 pb-3 border-l-2 cursor-pointer
40088
- hover:bg-gray-50 dark:hover:bg-gray-800 rounded-r
40089
- ${hasFailedEffects ? "border-red-300 dark:border-red-700" : "border-gray-200 dark:border-gray-700"}
40096
+ hover:bg-muted/50 rounded-r
40097
+ ${hasFailedEffects ? "border-error" : "border-border"}
40090
40098
  `,
40091
40099
  onClick: () => setExpandedId(isExpanded ? null : trace.id),
40092
40100
  children: [
40093
40101
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: `
40094
40102
  absolute left-[-5px] top-1 w-2 h-2 rounded-full
40095
- ${hasFailedEffects ? "bg-red-500" : allPassed ? "bg-green-500" : "bg-gray-400"}
40103
+ ${hasFailedEffects ? "bg-error" : allPassed ? "bg-success" : "bg-muted-foreground"}
40096
40104
  ` }),
40097
40105
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 text-xs py-1 px-2", children: [
40098
- /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-gray-400 font-mono min-w-[65px]", children: formatTime2(trace.timestamp) }),
40106
+ /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-muted-foreground font-mono min-w-[65px]", children: formatTime2(trace.timestamp) }),
40099
40107
  /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: "primary", size: "sm", className: "min-w-[60px] justify-center", children: trace.traitName }),
40100
- /* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "small", className: "font-mono text-gray-600 dark:text-gray-400", children: [
40108
+ /* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "small", className: "font-mono text-muted-foreground", children: [
40101
40109
  trace.from,
40102
40110
  " ",
40103
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-gray-400", children: "\u2192" }),
40111
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground/50", children: "\u2192" }),
40104
40112
  " ",
40105
40113
  trace.to
40106
40114
  ] }),
@@ -40117,9 +40125,9 @@ function TransitionTimeline({ transitions }) {
40117
40125
  ]
40118
40126
  }
40119
40127
  ),
40120
- /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-gray-400 ml-auto", children: t("debug.effectsCount", { count: trace.effects.length }) })
40128
+ /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-muted-foreground ml-auto", children: t("debug.effectsCount", { count: trace.effects.length }) })
40121
40129
  ] }),
40122
- isExpanded && trace.effects.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "ml-2 mt-1 mb-2 pl-2 border-l border-gray-200 dark:border-gray-700 space-y-1", children: trace.effects.map((effect, eIdx) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1", children: [
40130
+ isExpanded && trace.effects.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "ml-2 mt-1 mb-2 pl-2 border-l border-border space-y-1", children: trace.effects.map((effect, eIdx) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1", children: [
40123
40131
  /* @__PURE__ */ jsxRuntime.jsx(EffectBadge, { effect }),
40124
40132
  effect.args.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-muted-foreground font-mono text-xs truncate max-w-[200px]", children: JSON.stringify(effect.args) }),
40125
40133
  effect.durationMs !== void 0 && /* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "small", className: "text-muted-foreground text-xs", children: [
@@ -40153,8 +40161,8 @@ var init_TransitionTimeline = __esm({
40153
40161
  }
40154
40162
  });
40155
40163
  function StatRow({ label, value, variant }) {
40156
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between py-1.5 border-b border-gray-100 dark:border-gray-800 last:border-b-0", children: [
40157
- /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-gray-500", children: label }),
40164
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between py-1.5 border-b border-border last:border-b-0", children: [
40165
+ /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-muted-foreground", children: label }),
40158
40166
  variant ? /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant, size: "sm", children: String(value) }) : /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "semibold", className: "font-mono", children: String(value) })
40159
40167
  ] });
40160
40168
  }
@@ -40183,7 +40191,7 @@ function ServerBridgeTab({ bridge }) {
40183
40191
  return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "debug-tab debug-tab--bridge", children: /* @__PURE__ */ jsxRuntime.jsxs(Stack, { gap: "sm", children: [
40184
40192
  /* @__PURE__ */ jsxRuntime.jsxs(Card, { className: "p-3", children: [
40185
40193
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3 mb-3", children: [
40186
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: `w-3 h-3 rounded-full ${bridge.connected ? "bg-green-500 animate-pulse" : "bg-red-500"}` }),
40194
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: `w-3 h-3 rounded-full ${bridge.connected ? "bg-success animate-pulse" : "bg-error"}` }),
40187
40195
  /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "h6", children: bridge.connected ? t("debug.connected") : t("debug.disconnected") })
40188
40196
  ] }),
40189
40197
  /* @__PURE__ */ jsxRuntime.jsxs(Stack, { gap: "xs", children: [
@@ -40218,11 +40226,11 @@ function ServerBridgeTab({ bridge }) {
40218
40226
  )
40219
40227
  ] })
40220
40228
  ] }),
40221
- bridge.lastError && /* @__PURE__ */ jsxRuntime.jsxs(Card, { className: "p-3 border-red-200 dark:border-red-800 bg-red-50 dark:bg-red-950", children: [
40222
- /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "semibold", className: "text-red-600 dark:text-red-400 mb-1", children: t("debug.lastError") }),
40223
- /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-red-500 font-mono break-all", children: bridge.lastError })
40229
+ bridge.lastError && /* @__PURE__ */ jsxRuntime.jsxs(Card, { className: "p-3 border-error/30 bg-error/10", children: [
40230
+ /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "semibold", className: "text-error mb-1", children: t("debug.lastError") }),
40231
+ /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-error font-mono break-all", children: bridge.lastError })
40224
40232
  ] }),
40225
- bridge.connected && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-center py-2", children: /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-gray-400", children: t("debug.totalEventsProcessed", { count: bridge.eventsForwarded + bridge.eventsReceived }) }) })
40233
+ bridge.connected && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-center py-2", children: /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-muted-foreground", children: t("debug.totalEventsProcessed", { count: bridge.eventsForwarded + bridge.eventsReceived }) }) })
40226
40234
  ] }) });
40227
40235
  }
40228
40236
  var init_ServerBridgeTab = __esm({
@@ -40348,7 +40356,7 @@ function EventDispatcherTab({ traits: traits2, schema }) {
40348
40356
  };
40349
40357
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "debug-tab debug-tab--dispatch", children: [
40350
40358
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-3", children: [
40351
- /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-1", children: t("debug.activeStates") }),
40359
+ /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground mb-1", children: t("debug.activeStates") }),
40352
40360
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-wrap gap-1", children: traits2.map((trait) => /* @__PURE__ */ jsxRuntime.jsxs(Badge, { variant: "success", size: "sm", children: [
40353
40361
  trait.name,
40354
40362
  ": ",
@@ -40356,8 +40364,8 @@ function EventDispatcherTab({ traits: traits2, schema }) {
40356
40364
  ] }, trait.id)) })
40357
40365
  ] }),
40358
40366
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-3", children: [
40359
- /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-1", children: t("debug.availableEvents") }),
40360
- availableEvents.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-gray-400 italic", children: t("debug.noTransitionsFromState") }) : /* @__PURE__ */ jsxRuntime.jsx(Stack, { gap: "xs", children: availableEvents.map(({ event, transitions }) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
40367
+ /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground mb-1", children: t("debug.availableEvents") }),
40368
+ availableEvents.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-muted-foreground italic", children: t("debug.noTransitionsFromState") }) : /* @__PURE__ */ jsxRuntime.jsx(Stack, { gap: "xs", children: availableEvents.map(({ event, transitions }) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
40361
40369
  /* @__PURE__ */ jsxRuntime.jsx(
40362
40370
  Button,
40363
40371
  {
@@ -40368,22 +40376,22 @@ function EventDispatcherTab({ traits: traits2, schema }) {
40368
40376
  children: event
40369
40377
  }
40370
40378
  ),
40371
- /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-gray-500", children: transitions.map((t2) => `${t2.from} -> ${t2.to}`).join(", ") }),
40379
+ /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-muted-foreground", children: transitions.map((t2) => `${t2.from} -> ${t2.to}`).join(", ") }),
40372
40380
  transitions.some((tr) => tr.guard) && /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: "warning", size: "sm", children: t("debug.guarded") })
40373
40381
  ] }, event)) })
40374
40382
  ] }),
40375
40383
  unavailableEvents.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-3", children: [
40376
- /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-1", children: t("debug.otherEvents") }),
40384
+ /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground mb-1", children: t("debug.otherEvents") }),
40377
40385
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-wrap gap-1", children: unavailableEvents.map((event) => /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: "default", size: "sm", className: "opacity-50", children: event }, event)) })
40378
40386
  ] }),
40379
40387
  log9.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
40380
- /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-1", children: t("debug.recentTransitions") }),
40388
+ /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground mb-1", children: t("debug.recentTransitions") }),
40381
40389
  /* @__PURE__ */ jsxRuntime.jsx(Stack, { gap: "xs", children: log9.map((entry, i) => /* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "small", className: "font-mono text-xs", children: [
40382
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-purple-400", children: entry.traitName }),
40390
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary", children: entry.traitName }),
40383
40391
  " ",
40384
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-gray-500", children: entry.from }),
40392
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: entry.from }),
40385
40393
  " -> ",
40386
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-green-400", children: entry.to })
40394
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-success", children: entry.to })
40387
40395
  ] }, i)) })
40388
40396
  ] })
40389
40397
  ] });
@@ -40409,21 +40417,21 @@ var init_RuntimeDebugger = __esm({
40409
40417
  function ServerResponseRow({ sr }) {
40410
40418
  const { t } = hooks.useTranslate();
40411
40419
  const entityEntries = Object.entries(sr.dataEntities);
40412
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ml-4 pl-2 border-l border-purple-500/30 py-0.5 text-xs font-mono", children: [
40420
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ml-4 pl-2 border-l border-primary py-0.5 text-xs font-mono", children: [
40413
40421
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
40414
- /* @__PURE__ */ jsxRuntime.jsxs("span", { className: sr.success ? "text-green-600 dark:text-green-400" : "text-red-600 dark:text-red-400", children: [
40422
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: sr.success ? "text-success" : "text-error", children: [
40415
40423
  sr.success ? "\u2713" : "\u2717",
40416
40424
  " ",
40417
40425
  t("debug.server")
40418
40426
  ] }),
40419
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-purple-600 dark:text-purple-300", children: sr.orbitalName }),
40420
- sr.clientEffects > 0 && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "px-1 rounded bg-purple-500/15 text-purple-600 dark:text-purple-300", children: t("debug.clientEffectsCount", { count: sr.clientEffects }) }),
40421
- sr.emittedEvents.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "px-1 rounded bg-blue-500/15 text-blue-300", children: [
40427
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary", children: sr.orbitalName }),
40428
+ sr.clientEffects > 0 && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "px-1 rounded bg-primary/10 text-primary", children: t("debug.clientEffectsCount", { count: sr.clientEffects }) }),
40429
+ sr.emittedEvents.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "px-1 rounded bg-primary/10 text-primary", children: [
40422
40430
  t("debug.emitLabel"),
40423
40431
  " ",
40424
40432
  sr.emittedEvents.join(", ")
40425
40433
  ] }),
40426
- 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 })
40434
+ sr.error && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "px-1 rounded bg-error/10 text-error truncate max-w-[300px]", children: sr.error })
40427
40435
  ] }),
40428
40436
  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: [
40429
40437
  name,
@@ -40439,9 +40447,9 @@ function TransitionRow({ trace }) {
40439
40447
  if (isServerEntry && trace.serverResponse) {
40440
40448
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "py-0.5 border-b border-border last:border-0", children: [
40441
40449
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-2 text-xs font-mono", children: [
40442
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "mt-1.5 w-1.5 h-1.5 rounded-full flex-shrink-0 bg-purple-500" }),
40450
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "mt-1.5 w-1.5 h-1.5 rounded-full flex-shrink-0 bg-primary" }),
40443
40451
  /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: "warning", size: "sm", className: "flex-shrink-0", children: trace.event }),
40444
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-purple-600 dark:text-purple-400 flex-shrink-0", children: t("debug.serverResponse") })
40452
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary flex-shrink-0", children: t("debug.serverResponse") })
40445
40453
  ] }),
40446
40454
  /* @__PURE__ */ jsxRuntime.jsx(ServerResponseRow, { sr: trace.serverResponse })
40447
40455
  ] });
@@ -40450,7 +40458,7 @@ function TransitionRow({ trace }) {
40450
40458
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-2 text-xs font-mono", children: [
40451
40459
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn(
40452
40460
  "mt-1.5 w-1.5 h-1.5 rounded-full flex-shrink-0",
40453
- hasFailedEffects ? "bg-red-500" : "bg-green-500"
40461
+ hasFailedEffects ? "bg-error" : "bg-success"
40454
40462
  ) }),
40455
40463
  /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: "info", size: "sm", className: "flex-shrink-0", children: trace.event }),
40456
40464
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-foreground flex-shrink-0", children: trace.traitName }),
@@ -40464,7 +40472,7 @@ function TransitionRow({ trace }) {
40464
40472
  ] }),
40465
40473
  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(
40466
40474
  "px-1 rounded text-xs",
40467
- 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"
40475
+ eff.status === "executed" ? "bg-success/10 text-success" : eff.status === "failed" ? "bg-error/10 text-error" : "bg-warning/10 text-warning"
40468
40476
  ), children: [
40469
40477
  eff.status === "executed" ? "\u2713" : eff.status === "failed" ? "\u2717" : "-",
40470
40478
  " ",
@@ -40498,7 +40506,7 @@ function VerifyModePanel({
40498
40506
  {
40499
40507
  className: cn(
40500
40508
  "runtime-debugger runtime-debugger--verify",
40501
- "flex flex-col bg-[var(--color-card)] text-[var(--color-foreground)] border-t-2 border-cyan-500",
40509
+ "flex flex-col bg-[var(--color-card)] text-[var(--color-foreground)] border-t-2 border-accent",
40502
40510
  hudBottom ? "" : "fixed bottom-0 left-0 right-0",
40503
40511
  className
40504
40512
  ),
@@ -40519,8 +40527,8 @@ function VerifyModePanel({
40519
40527
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-foreground/50 w-3", "aria-hidden": true, children: expanded ? "\u25BE" : "\u25B8" }),
40520
40528
  /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: failedChecks > 0 ? "danger" : "success", size: "sm", children: failedChecks > 0 ? t("debug.failCount", { count: failedChecks }) : t("debug.ok") }),
40521
40529
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-foreground/70", children: t("debug.localCount", { count: localCount }) }),
40522
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-purple-600 dark:text-purple-400", children: t("debug.serverCount", { count: serverCount }) }),
40523
- traitStates && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-cyan-600 dark:text-cyan-400 truncate max-w-[400px]", children: traitStates }),
40530
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary", children: t("debug.serverCount", { count: serverCount }) }),
40531
+ traitStates && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-accent truncate max-w-[400px]", children: traitStates }),
40524
40532
  !expanded && transitions.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-auto text-foreground/50", children: t("debug.transitionsCount", { count: transitions.length }) })
40525
40533
  ]
40526
40534
  }
@@ -40715,7 +40723,7 @@ function RuntimeDebugger({
40715
40723
  title: t("debug.openDebugger"),
40716
40724
  children: failedChecks > 0 ? /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "relative", children: [
40717
40725
  /* @__PURE__ */ jsxRuntime.jsx("span", { children: "V" }),
40718
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "absolute -top-1 -right-2 w-2 h-2 bg-red-500 rounded-full" })
40726
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "absolute -top-1 -right-2 w-2 h-2 bg-error rounded-full" })
40719
40727
  ] }) : /* @__PURE__ */ jsxRuntime.jsx("span", { children: "V" })
40720
40728
  }
40721
40729
  ) : /* @__PURE__ */ jsxRuntime.jsxs(Card, { className: "runtime-debugger__panel", children: [
@@ -40803,7 +40811,7 @@ var init_SegmentRenderer = __esm({
40803
40811
  "div",
40804
40812
  {
40805
40813
  className: cn(
40806
- "border border-gray-200 dark:border-gray-700 rounded-lg p-2 md:p-4 overflow-x-auto space-y-6",
40814
+ "border border-border rounded-lg p-2 md:p-4 overflow-x-auto space-y-6",
40807
40815
  containerClassName,
40808
40816
  className
40809
40817
  ),
@@ -45348,7 +45356,11 @@ function useTraitStateMachine(traitBindings, uiSlots, options) {
45348
45356
  crossTraitLog.debug("listen:subscribed", { busKey, targetTrait: binding.trait.name, sourceOrbital, sourceTrait, listenEvent: listen.event, triggers: listen.triggers });
45349
45357
  const unsub = eventBus.on(busKey, (event) => {
45350
45358
  crossTraitLog.debug("listen:fired", { busKey, targetTrait: binding.trait.name, triggers: listen.triggers });
45351
- enqueueAndDrain(listen.triggers, event.payload, binding.trait.name);
45359
+ enqueueAndDrain(
45360
+ listen.triggers,
45361
+ core.applyListenPayloadMapping(listen.payloadMapping, event.payload),
45362
+ binding.trait.name
45363
+ );
45352
45364
  });
45353
45365
  unsubscribes.push(() => {
45354
45366
  crossTraitLog.debug("listen:unsubscribe", { busKey, targetTrait: binding.trait.name, triggers: listen.triggers });
@@ -45378,7 +45390,7 @@ function useTraitStateMachine(traitBindings, uiSlots, options) {
45378
45390
  }
45379
45391
  for (const event of eventsToFire) {
45380
45392
  stateLog.debug("mount:fire-lifecycle", { event, traitCount: traitBindings.length });
45381
- enqueueAndDrain(event, {});
45393
+ enqueueAndDrain(event, { ...optionsRef.current?.initPayload ?? {} });
45382
45394
  }
45383
45395
  return () => {
45384
45396
  initedTraitsRef.current = /* @__PURE__ */ new Set();
@@ -45419,7 +45431,9 @@ function useResolvedSchema(schema, pageName) {
45419
45431
  trait.listens = callSiteListens.map((l) => ({
45420
45432
  event: l.event,
45421
45433
  triggers: l.triggers,
45422
- source: l.source
45434
+ source: l.source,
45435
+ guard: l.guard,
45436
+ payloadMapping: l.payloadMapping
45423
45437
  }));
45424
45438
  resolvedSchemaLog.info("listens:restored", {
45425
45439
  trait: traitName,
@@ -45578,7 +45592,7 @@ function collectServerActiveTraits(ir, allTraits, mountedTraitNames) {
45578
45592
  }
45579
45593
  return active;
45580
45594
  }
45581
- function TraitInitializer({ traits: traits2, orbitalNames, onNavigate, onLocalFallback, persistence, traitConfigsByName, orbitalsByTrait, embeddedTraits, serverActiveTraits }) {
45595
+ function TraitInitializer({ traits: traits2, routeParams, orbitalNames, onNavigate, onLocalFallback, persistence, traitConfigsByName, orbitalsByTrait, embeddedTraits, serverActiveTraits }) {
45582
45596
  const bridge = providers.useServerBridge();
45583
45597
  const activeTraitNames = React82.useMemo(
45584
45598
  () => new Set(traits2.map((b) => b.trait.name).filter((n) => !!n)),
@@ -45607,43 +45621,48 @@ function TraitInitializer({ traits: traits2, orbitalNames, onNavigate, onLocalFa
45607
45621
  applyServerEffects(effects, uiSlots, onNavigate, embeddedTraits, activeTraitNames);
45608
45622
  }
45609
45623
  }, [bridge.connected, bridge.sendEvent, orbitalNames, uiSlots, onNavigate, embeddedTraits, activeTraitNames, withActiveTraits]);
45610
- const opts = orbitalNames ? { onEventProcessed, navigate: onNavigate, traitConfigsByName, orbitalsByTrait, embeddedTraits } : { navigate: onNavigate, persistence, traitConfigsByName, orbitalsByTrait, embeddedTraits };
45624
+ const opts = orbitalNames ? { onEventProcessed, navigate: onNavigate, traitConfigsByName, orbitalsByTrait, embeddedTraits, initPayload: routeParams } : { navigate: onNavigate, persistence, traitConfigsByName, orbitalsByTrait, embeddedTraits, initPayload: routeParams };
45611
45625
  const { sendEvent } = useTraitStateMachine(traits2, uiSlots, opts);
45612
45626
  const initSentRef = React82.useRef(false);
45613
45627
  const prevTraitsRef = React82.useRef(void 0);
45628
+ const paramsKey = JSON.stringify(routeParams ?? {});
45629
+ const prevParamsKeyRef = React82.useRef(void 0);
45614
45630
  React82.useEffect(() => {
45615
45631
  const refChanged = prevTraitsRef.current !== void 0 && prevTraitsRef.current !== traits2;
45632
+ const paramsChanged = prevParamsKeyRef.current !== void 0 && prevParamsKeyRef.current !== paramsKey;
45616
45633
  navLog.debug("page:traits-effect", () => ({
45617
45634
  refChanged,
45635
+ paramsChanged,
45618
45636
  traitsCount: Array.isArray(traits2) ? traits2.length : -1,
45619
45637
  hadPrev: prevTraitsRef.current !== void 0
45620
45638
  }));
45621
- if (refChanged) {
45622
- navLog.info("page:traits-reset", { traitsCount: Array.isArray(traits2) ? traits2.length : -1 });
45639
+ if (refChanged || paramsChanged) {
45640
+ navLog.info("page:traits-reset", { traitsCount: Array.isArray(traits2) ? traits2.length : -1, paramsChanged });
45623
45641
  uiSlots.clearAll();
45624
45642
  initSentRef.current = false;
45625
45643
  }
45626
45644
  prevTraitsRef.current = traits2;
45627
- }, [traits2, uiSlots]);
45645
+ prevParamsKeyRef.current = paramsKey;
45646
+ }, [traits2, uiSlots, paramsKey]);
45628
45647
  React82.useEffect(() => {
45629
45648
  if (!orbitalNames?.length) {
45630
- const t = setTimeout(() => sendEvent("INIT"), 50);
45649
+ const t = setTimeout(() => sendEvent("INIT", routeParams), 50);
45631
45650
  return () => clearTimeout(t);
45632
45651
  }
45633
45652
  const fallback = setTimeout(() => {
45634
45653
  if (!initSentRef.current) {
45635
- sendEvent("INIT");
45654
+ sendEvent("INIT", routeParams);
45636
45655
  onLocalFallback?.();
45637
45656
  }
45638
45657
  }, 5e3);
45639
45658
  return () => clearTimeout(fallback);
45640
- }, [traits2, orbitalNames, sendEvent, onLocalFallback]);
45659
+ }, [traits2, orbitalNames, sendEvent, onLocalFallback, routeParams]);
45641
45660
  React82.useEffect(() => {
45642
45661
  if (!bridge.connected || !orbitalNames?.length || initSentRef.current) return;
45643
45662
  initSentRef.current = true;
45644
45663
  (async () => {
45645
45664
  for (const name of orbitalNames) {
45646
- const { effects, meta } = await bridge.sendEvent(name, "INIT", withActiveTraits({}));
45665
+ const { effects, meta } = await bridge.sendEvent(name, "INIT", withActiveTraits({ ...routeParams ?? {} }));
45647
45666
  recordServerResponse(name, "INIT", meta);
45648
45667
  const effectTraces = [
45649
45668
  { type: "fetch", args: [], status: "executed" },
@@ -45664,10 +45683,10 @@ function TraitInitializer({ traits: traits2, orbitalNames, onNavigate, onLocalFa
45664
45683
  applyServerEffects(effects, uiSlots, onNavigate, embeddedTraits, activeTraitNames);
45665
45684
  }
45666
45685
  })();
45667
- }, [bridge.connected, orbitalNames, bridge.sendEvent, uiSlots, onNavigate, embeddedTraits, activeTraitNames, withActiveTraits]);
45686
+ }, [bridge.connected, orbitalNames, bridge.sendEvent, uiSlots, onNavigate, embeddedTraits, activeTraitNames, withActiveTraits, routeParams]);
45668
45687
  return null;
45669
45688
  }
45670
- function SchemaRunner({ schema, serverUrl, transport, mockData, pageName, onNavigate, onLocalFallback, persistence }) {
45689
+ function SchemaRunner({ schema, serverUrl, transport, mockData, pageName, routeParams, onNavigate, onLocalFallback, persistence }) {
45671
45690
  const { traits: traits2, allEntities, allTraits, ir } = useResolvedSchema(schema, pageName);
45672
45691
  const allPageTraits = React82.useMemo(() => {
45673
45692
  let base;
@@ -45809,6 +45828,7 @@ function SchemaRunner({ schema, serverUrl, transport, mockData, pageName, onNavi
45809
45828
  TraitInitializer,
45810
45829
  {
45811
45830
  traits: allPageTraits,
45831
+ routeParams,
45812
45832
  orbitalNames: serverUrl || transport ? pageOrbitalNames : void 0,
45813
45833
  traitConfigsByName,
45814
45834
  orbitalsByTrait,
@@ -45886,27 +45906,44 @@ function OrbPreview({
45886
45906
  return [];
45887
45907
  }
45888
45908
  }, [parsedSchema]);
45889
- const initialPageName = React82.useMemo(() => {
45909
+ const initialPageMatch = React82.useMemo(() => {
45890
45910
  if (!initialPagePath) return void 0;
45891
- const match = pages.find(({ page }) => page.path === initialPagePath);
45892
- return match?.page.name;
45911
+ for (const { page } of pages) {
45912
+ const params = page.path ? providers.matchPath(page.path, initialPagePath) : null;
45913
+ if (params !== null) return { name: page.name, params };
45914
+ }
45915
+ return void 0;
45893
45916
  }, [pages, initialPagePath]);
45917
+ const initialPageName = initialPageMatch?.name;
45894
45918
  const [currentPage, setCurrentPage] = React82.useState(initialPageName);
45919
+ const [routeParams, setRouteParams] = React82.useState(initialPageMatch?.params ?? {});
45895
45920
  const prevInitialPagePathRef = React82.useRef(initialPagePath);
45896
45921
  React82.useEffect(() => {
45897
45922
  if (prevInitialPagePathRef.current !== initialPagePath) {
45898
45923
  prevInitialPagePathRef.current = initialPagePath;
45899
45924
  setCurrentPage(initialPageName);
45925
+ setRouteParams(initialPageMatch?.params ?? {});
45900
45926
  }
45901
- }, [initialPagePath, initialPageName]);
45927
+ }, [initialPagePath, initialPageName, initialPageMatch]);
45902
45928
  const handleNavigate = React82.useCallback((path) => {
45903
- const match = pages.find(({ page }) => page.path === path);
45929
+ let match;
45930
+ let params = {};
45931
+ for (const entry of pages) {
45932
+ const m = entry.page.path ? providers.matchPath(entry.page.path, path) : null;
45933
+ if (m !== null) {
45934
+ match = entry;
45935
+ params = m;
45936
+ break;
45937
+ }
45938
+ }
45904
45939
  navLog.debug("handleNavigate", () => ({
45905
45940
  path,
45906
45941
  matched: match?.page.name ?? null,
45942
+ params,
45907
45943
  availablePaths: pages.map((p) => p.page.path)
45908
45944
  }));
45909
- if (match) {
45945
+ if (match?.page.name) {
45946
+ setRouteParams(params);
45910
45947
  setCurrentPage(match.page.name);
45911
45948
  if (typeof window !== "undefined") {
45912
45949
  const url = new URL(window.location.href);
@@ -45976,6 +46013,7 @@ function OrbPreview({
45976
46013
  transport,
45977
46014
  mockData: effectiveMockData,
45978
46015
  pageName: currentPage,
46016
+ routeParams,
45979
46017
  onNavigate: handleNavigate,
45980
46018
  onLocalFallback: handleLocalFallback,
45981
46019
  persistence