@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
@@ -4359,10 +4359,10 @@ var init_ModuleCard = __esm({
4359
4359
  init_avl_atom_types();
4360
4360
  init_MiniStateMachine();
4361
4361
  PERSISTENCE_BORDER = {
4362
- persistent: "border-l-[3px] border-l-blue-500 border-solid",
4363
- runtime: "border-l-[3px] border-l-blue-500 border-dashed",
4364
- singleton: "border-l-[3px] border-l-blue-500 border-double",
4365
- instance: "border-l-[3px] border-l-blue-500 border-dotted"
4362
+ persistent: "border-l-[3px] border-l-primary border-solid",
4363
+ runtime: "border-l-[3px] border-l-primary border-dashed",
4364
+ singleton: "border-l-[3px] border-l-primary border-double",
4365
+ instance: "border-l-[3px] border-l-primary border-dotted"
4366
4366
  };
4367
4367
  PERSISTENCE_ICON = {
4368
4368
  persistent: "\u26C1",
@@ -4392,8 +4392,8 @@ var init_ModuleCard = __esm({
4392
4392
  className: "rounded-lg border border-[var(--color-border)] bg-[var(--color-card)] shadow-sm overflow-hidden",
4393
4393
  style: { minWidth: 280, maxWidth: 400 },
4394
4394
  children: [
4395
- /* @__PURE__ */ jsxRuntime.jsx(react.Handle, { type: "target", position: react.Position.Left, className: "!w-2.5 !h-2.5 !bg-orange-400" }),
4396
- /* @__PURE__ */ jsxRuntime.jsx(react.Handle, { type: "source", position: react.Position.Right, className: "!w-2.5 !h-2.5 !bg-orange-400" }),
4395
+ /* @__PURE__ */ jsxRuntime.jsx(react.Handle, { type: "target", position: react.Position.Left, className: "!w-2.5 !h-2.5 !bg-warning" }),
4396
+ /* @__PURE__ */ jsxRuntime.jsx(react.Handle, { type: "source", position: react.Position.Right, className: "!w-2.5 !h-2.5 !bg-warning" }),
4397
4397
  /* @__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 }) }),
4398
4398
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `px-3 py-2 border-b border-[var(--color-border)] ${PERSISTENCE_BORDER[persistence] ?? ""}`, children: [
4399
4399
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1.5 mb-1.5", children: [
@@ -8442,15 +8442,15 @@ var init_TextHighlight = __esm({
8442
8442
  const typeStyles = {
8443
8443
  question: cn(
8444
8444
  // Blue border for questions
8445
- "bg-card border-b-2 border-primary-600",
8445
+ "bg-card border-b-2 border-primary",
8446
8446
  "hover:bg-muted",
8447
- isActive && "bg-primary-100 ring-2 ring-primary-600"
8447
+ isActive && "bg-primary/10 ring-2 ring-primary"
8448
8448
  ),
8449
8449
  note: cn(
8450
8450
  // Yellow border for notes
8451
- "bg-card border-b-2 border-amber-500",
8451
+ "bg-card border-b-2 border-warning",
8452
8452
  "hover:bg-muted",
8453
- isActive && "bg-amber-100 ring-2 ring-amber-500"
8453
+ isActive && "bg-warning/10 ring-2 ring-warning"
8454
8454
  )
8455
8455
  };
8456
8456
  return /* @__PURE__ */ jsxRuntime.jsx(
@@ -8796,7 +8796,7 @@ function DayCell({
8796
8796
  {
8797
8797
  className: cn(
8798
8798
  "p-2 text-center cursor-pointer hover:bg-muted transition-colors",
8799
- isToday && "bg-blue-500/10",
8799
+ isToday && "bg-primary/10",
8800
8800
  className
8801
8801
  ),
8802
8802
  onClick: handleClick,
@@ -8807,7 +8807,7 @@ function DayCell({
8807
8807
  variant: "small",
8808
8808
  className: cn(
8809
8809
  "font-medium",
8810
- isToday ? "text-blue-600" : "text-muted-foreground"
8810
+ isToday ? "text-primary" : "text-muted-foreground"
8811
8811
  ),
8812
8812
  children: dayAbbr
8813
8813
  }
@@ -8819,7 +8819,7 @@ function DayCell({
8819
8819
  rounded: "full",
8820
8820
  className: cn(
8821
8821
  "h-8 w-8 mx-auto items-center justify-center",
8822
- isToday && "bg-blue-600 text-white"
8822
+ isToday && "bg-primary text-primary-foreground"
8823
8823
  ),
8824
8824
  children: /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body", className: "font-semibold", children: safeDate.getDate() })
8825
8825
  }
@@ -15673,19 +15673,19 @@ var init_ActivationBlock = __esm({
15673
15673
  "div",
15674
15674
  {
15675
15675
  className: cn(
15676
- "bg-indigo-50 dark:bg-indigo-900/20 border-2 border-indigo-200 dark:border-indigo-800 rounded-lg p-5 mb-6",
15676
+ "bg-primary/10 border-2 border-primary rounded-lg p-5 mb-6",
15677
15677
  className
15678
15678
  ),
15679
15679
  children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-3", children: [
15680
- /* @__PURE__ */ jsxRuntime.jsx(LucideIcons2.Lightbulb, { className: "text-indigo-600 dark:text-indigo-400 flex-shrink-0 mt-1", size: 24 }),
15680
+ /* @__PURE__ */ jsxRuntime.jsx(LucideIcons2.Lightbulb, { className: "text-primary flex-shrink-0 mt-1", size: 24 }),
15681
15681
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1", children: [
15682
- /* @__PURE__ */ jsxRuntime.jsx("h4", { className: "font-semibold text-indigo-900 dark:text-indigo-100 mb-2", children: "Before You Begin..." }),
15683
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-gray-700 dark:text-gray-300 mb-3 text-sm md:text-base", children: question }),
15682
+ /* @__PURE__ */ jsxRuntime.jsx("h4", { className: "font-semibold text-primary mb-2", children: "Before You Begin..." }),
15683
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-foreground mb-3 text-sm md:text-base", children: question }),
15684
15684
  isExpanded ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
15685
15685
  /* @__PURE__ */ jsxRuntime.jsx(
15686
15686
  "textarea",
15687
15687
  {
15688
- 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",
15688
+ 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",
15689
15689
  placeholder: "Jot down your thoughts...",
15690
15690
  value: response,
15691
15691
  onChange: (e) => setResponse(e.target.value),
@@ -15697,7 +15697,7 @@ var init_ActivationBlock = __esm({
15697
15697
  "button",
15698
15698
  {
15699
15699
  onClick: handleSubmit,
15700
- className: "px-4 py-2 bg-indigo-600 text-white rounded-md hover:bg-indigo-700 text-sm font-medium transition-colors",
15700
+ className: "px-4 py-2 bg-primary text-primary-foreground rounded-md hover:bg-primary-hover text-sm font-medium transition-colors",
15701
15701
  children: "Continue to Lesson \u2192"
15702
15702
  }
15703
15703
  ),
@@ -15708,7 +15708,7 @@ var init_ActivationBlock = __esm({
15708
15708
  emit(`UI:${saveEvent}`, { response: "" });
15709
15709
  setIsExpanded(false);
15710
15710
  },
15711
- className: "px-4 py-2 text-indigo-600 dark:text-indigo-400 hover:underline text-sm",
15711
+ className: "px-4 py-2 text-primary hover:underline text-sm",
15712
15712
  children: "Skip for now"
15713
15713
  }
15714
15714
  )
@@ -15717,7 +15717,7 @@ var init_ActivationBlock = __esm({
15717
15717
  "button",
15718
15718
  {
15719
15719
  onClick: () => setIsExpanded(true),
15720
- className: "text-sm text-indigo-600 dark:text-indigo-400 hover:underline font-medium",
15720
+ className: "text-sm text-primary hover:underline font-medium",
15721
15721
  children: "\u2713 Answered \xB7 Edit response"
15722
15722
  }
15723
15723
  )
@@ -16221,7 +16221,7 @@ var init_AuthLayout = __esm({
16221
16221
  VStack,
16222
16222
  {
16223
16223
  className: cn(
16224
- "hidden lg:flex lg:w-1/2 bg-primary-600 relative overflow-hidden",
16224
+ "hidden lg:flex lg:w-1/2 bg-primary relative overflow-hidden",
16225
16225
  "justify-between p-12"
16226
16226
  ),
16227
16227
  style: backgroundImage ? {
@@ -16230,7 +16230,7 @@ var init_AuthLayout = __esm({
16230
16230
  } : void 0,
16231
16231
  gap: "none",
16232
16232
  children: [
16233
- /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "absolute inset-0 bg-gradient-to-br from-primary-600/90 to-primary-800/90" }),
16233
+ /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "absolute inset-0 bg-gradient-to-br from-primary/90 to-primary-hover/90" }),
16234
16234
  /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "relative z-10", children: /* @__PURE__ */ jsxRuntime.jsxs(reactRouterDom.Link, { to: "/", className: "flex items-center gap-3", children: [
16235
16235
  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(
16236
16236
  Typography,
@@ -16315,7 +16315,7 @@ var init_AuthLayout = __esm({
16315
16315
  ),
16316
16316
  children: /* @__PURE__ */ jsxRuntime.jsxs(Box, { className: "w-full max-w-md", children: [
16317
16317
  /* @__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: [
16318
- logo || /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "w-12 h-12 bg-primary-600 rounded-xl flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(
16318
+ logo || /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "w-12 h-12 bg-primary rounded-xl flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(
16319
16319
  Typography,
16320
16320
  {
16321
16321
  variant: "body1",
@@ -17479,7 +17479,7 @@ var init_CodeBlock = __esm({
17479
17479
  {
17480
17480
  justify: "between",
17481
17481
  align: "center",
17482
- className: "px-3 py-2 bg-[var(--color-card)] rounded-t-lg border-b border-gray-700",
17482
+ className: "px-3 py-2 bg-[var(--color-card)] rounded-t-lg border-b border-border",
17483
17483
  children: [
17484
17484
  showLanguageBadge && /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: "default", size: "sm", children: language }),
17485
17485
  effectiveCopy && /* @__PURE__ */ jsxRuntime.jsx(
@@ -17488,9 +17488,9 @@ var init_CodeBlock = __esm({
17488
17488
  variant: "ghost",
17489
17489
  size: "sm",
17490
17490
  onClick: handleCopy,
17491
- className: "opacity-0 group-hover:opacity-100 focus:opacity-100 transition-opacity text-muted-foreground hover:text-white",
17491
+ className: "opacity-0 group-hover:opacity-100 focus:opacity-100 transition-opacity text-muted-foreground hover:text-foreground",
17492
17492
  "aria-label": t("common.copy"),
17493
- 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" })
17493
+ 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" })
17494
17494
  }
17495
17495
  )
17496
17496
  ]
@@ -17858,12 +17858,12 @@ var init_BloomQuizBlock = __esm({
17858
17858
  init_useEventBus();
17859
17859
  init_cn();
17860
17860
  BLOOM_CONFIG = {
17861
- remember: { color: "bg-gray-500", bgColor: "bg-gray-50 dark:bg-gray-900/30", label: "Remember" },
17862
- understand: { color: "bg-blue-500", bgColor: "bg-blue-50 dark:bg-blue-900/30", label: "Understand" },
17863
- apply: { color: "bg-green-500", bgColor: "bg-green-50 dark:bg-green-900/30", label: "Apply" },
17864
- analyze: { color: "bg-yellow-500", bgColor: "bg-yellow-50 dark:bg-yellow-900/30", label: "Analyze" },
17865
- evaluate: { color: "bg-orange-500", bgColor: "bg-orange-50 dark:bg-orange-900/30", label: "Evaluate" },
17866
- create: { color: "bg-purple-500", bgColor: "bg-purple-50 dark:bg-purple-900/30", label: "Create" }
17861
+ remember: { color: "bg-secondary text-secondary-foreground", bgColor: "bg-muted", label: "Remember" },
17862
+ understand: { color: "bg-info text-info-foreground", bgColor: "bg-info/10", label: "Understand" },
17863
+ apply: { color: "bg-success text-success-foreground", bgColor: "bg-success/10", label: "Apply" },
17864
+ analyze: { color: "bg-warning text-warning-foreground", bgColor: "bg-warning/10", label: "Analyze" },
17865
+ evaluate: { color: "bg-accent text-accent-foreground", bgColor: "bg-accent/10", label: "Evaluate" },
17866
+ create: { color: "bg-primary text-primary-foreground", bgColor: "bg-primary/10", label: "Create" }
17867
17867
  };
17868
17868
  BloomQuizBlock = ({
17869
17869
  level,
@@ -17889,22 +17889,22 @@ var init_BloomQuizBlock = __esm({
17889
17889
  "div",
17890
17890
  {
17891
17891
  className: cn(
17892
- "rounded-lg border border-indigo-100 dark:border-indigo-800 p-4 my-4 transition-all",
17892
+ "rounded-lg border border-primary p-4 my-4 transition-all",
17893
17893
  config.bgColor,
17894
17894
  className
17895
17895
  ),
17896
17896
  children: [
17897
17897
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between mb-3", children: [
17898
17898
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 flex-wrap", children: [
17899
- index !== void 0 && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-gray-500 dark:text-gray-400 font-medium text-sm", children: [
17899
+ index !== void 0 && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-muted-foreground font-medium text-sm", children: [
17900
17900
  "Question ",
17901
17901
  index + 1
17902
17902
  ] }),
17903
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn(config.color, "text-white text-xs px-2 py-1 rounded-full font-medium"), children: config.label })
17903
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn(config.color, "text-xs px-2 py-1 rounded-full font-medium"), children: config.label })
17904
17904
  ] }),
17905
- isAnswered && /* @__PURE__ */ jsxRuntime.jsx(LucideIcons2.CheckCircle, { className: "text-green-600 dark:text-green-400 flex-shrink-0", size: 20 })
17905
+ isAnswered && /* @__PURE__ */ jsxRuntime.jsx(LucideIcons2.CheckCircle, { className: "text-success flex-shrink-0", size: 20 })
17906
17906
  ] }),
17907
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "font-semibold text-indigo-900 dark:text-indigo-200 mb-3 space-y-2", children: questionSegments.map(
17907
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "font-semibold text-primary mb-3 space-y-2", children: questionSegments.map(
17908
17908
  (segment, idx) => segment.type === "markdown" ? /* @__PURE__ */ jsxRuntime.jsx(MarkdownContent, { content: segment.content }, `q-md-${idx}`) : /* @__PURE__ */ jsxRuntime.jsx(
17909
17909
  CodeBlock,
17910
17910
  {
@@ -17918,13 +17918,13 @@ var init_BloomQuizBlock = __esm({
17918
17918
  "button",
17919
17919
  {
17920
17920
  type: "button",
17921
- 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",
17921
+ 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",
17922
17922
  onClick: handleReveal,
17923
17923
  children: revealed ? "Hide Answer" : "Reveal Answer"
17924
17924
  }
17925
17925
  ),
17926
- 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: [
17927
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-xs text-gray-600 dark:text-gray-400 mb-1 font-medium uppercase tracking-wide", children: "Answer:" }),
17926
+ 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: [
17927
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-xs text-muted-foreground mb-1 font-medium uppercase tracking-wide", children: "Answer:" }),
17928
17928
  answerSegments.map(
17929
17929
  (segment, idx) => segment.type === "markdown" ? /* @__PURE__ */ jsxRuntime.jsx(MarkdownContent, { content: segment.content }, `a-md-${idx}`) : /* @__PURE__ */ jsxRuntime.jsx(
17930
17930
  CodeBlock,
@@ -18198,12 +18198,12 @@ var init_QuizBlock = __esm({
18198
18198
  }) => {
18199
18199
  const { t } = hooks.useTranslate();
18200
18200
  const [revealed, setRevealed] = React91.useState(false);
18201
- 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: [
18201
+ return /* @__PURE__ */ jsxRuntime.jsx(Card2, { className: cn("my-4 border-primary", className), children: /* @__PURE__ */ jsxRuntime.jsxs(VStack, { gap: "sm", className: "p-4", children: [
18202
18202
  /* @__PURE__ */ jsxRuntime.jsxs(HStack, { gap: "sm", align: "start", children: [
18203
- /* @__PURE__ */ jsxRuntime.jsx(Icon, { icon: LucideIcons2.HelpCircle, size: "sm", className: "text-blue-500 mt-0.5 shrink-0" }),
18203
+ /* @__PURE__ */ jsxRuntime.jsx(Icon, { icon: LucideIcons2.HelpCircle, size: "sm", className: "text-primary mt-0.5 shrink-0" }),
18204
18204
  /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body", className: "font-medium", children: question })
18205
18205
  ] }),
18206
- 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,
18206
+ 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,
18207
18207
  /* @__PURE__ */ jsxRuntime.jsx(
18208
18208
  Button,
18209
18209
  {
@@ -20115,7 +20115,7 @@ var init_BookTableOfContents = __esm({
20115
20115
  className: cn(
20116
20116
  "justify-start text-left w-full",
20117
20117
  direction === "rtl" && "text-right",
20118
- isCurrent && "bg-blue-50 dark:bg-blue-950 text-blue-600 dark:text-blue-400"
20118
+ isCurrent && "bg-primary/10 text-primary"
20119
20119
  ),
20120
20120
  children: /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "truncate", children: /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body", children: String(chapter.title ?? "") }) })
20121
20121
  },
@@ -21363,7 +21363,7 @@ function CalendarGrid({
21363
21363
  border: true,
21364
21364
  className: cn(
21365
21365
  "cursor-pointer hover:shadow-sm transition-shadow text-xs truncate",
21366
- color ? color : "bg-blue-500/15 border-blue-500/30 text-blue-600"
21366
+ color ? color : "bg-primary/10 border-primary/30 text-primary"
21367
21367
  ),
21368
21368
  onClick: (e) => handleEventClick(event, e),
21369
21369
  children: /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "truncate font-medium", children: event.title })
@@ -21461,7 +21461,7 @@ function CalendarGrid({
21461
21461
  onClick: () => handleSlotClick(day, time),
21462
21462
  className: cn(
21463
21463
  "border-l border-border",
21464
- isToday && "bg-blue-50/30"
21464
+ isToday && "bg-primary/10"
21465
21465
  ),
21466
21466
  ...longPressEvent ? {
21467
21467
  onPointerDown: () => startLongPress(day, time),
@@ -23477,31 +23477,31 @@ var init_CodeRunnerPanel = __esm({
23477
23477
  }
23478
23478
  )
23479
23479
  ] }),
23480
- hasOutput && /* @__PURE__ */ jsxRuntime.jsxs(Box, { className: "rounded-lg border border-gray-700 bg-[#0d0d0d] overflow-hidden", children: [
23480
+ hasOutput && /* @__PURE__ */ jsxRuntime.jsxs(Box, { className: "rounded-lg border border-border bg-foreground overflow-hidden", children: [
23481
23481
  /* @__PURE__ */ jsxRuntime.jsxs(
23482
23482
  HStack,
23483
23483
  {
23484
23484
  gap: "sm",
23485
23485
  align: "center",
23486
- className: "px-3 py-2 bg-gray-800 border-b border-gray-700",
23486
+ className: "px-3 py-2 bg-card border-b border-border",
23487
23487
  children: [
23488
- /* @__PURE__ */ jsxRuntime.jsx(LucideIcons2.Terminal, { size: 16, className: "text-gray-400" }),
23489
- /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-gray-300 font-medium", children: "Output" })
23488
+ /* @__PURE__ */ jsxRuntime.jsx(LucideIcons2.Terminal, { size: 16, className: "text-muted-foreground" }),
23489
+ /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-foreground font-medium", children: "Output" })
23490
23490
  ]
23491
23491
  }
23492
23492
  ),
23493
- /* @__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: [
23494
- output?.stdout ? /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-gray-200 whitespace-pre-wrap", children: output.stdout }) : null,
23495
- output?.stderr ? /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-red-400 whitespace-pre-wrap", children: output.stderr }) : null,
23496
- !output?.stdout && !output?.stderr ? /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-gray-500 italic", children: "No output" }) : null,
23497
- 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: [
23498
- 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" }),
23493
+ /* @__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: [
23494
+ output?.stdout ? /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-background whitespace-pre-wrap", children: output.stdout }) : null,
23495
+ output?.stderr ? /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-error whitespace-pre-wrap", children: output.stderr }) : null,
23496
+ !output?.stdout && !output?.stderr ? /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-background italic", children: "No output" }) : null,
23497
+ 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: [
23498
+ 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" }),
23499
23499
  /* @__PURE__ */ jsxRuntime.jsxs(VStack, { gap: "xs", className: "flex-1", children: [
23500
23500
  /* @__PURE__ */ jsxRuntime.jsxs(
23501
23501
  Typography,
23502
23502
  {
23503
23503
  variant: "small",
23504
- className: test.passed ? "text-green-400" : "text-red-400",
23504
+ className: test.passed ? "text-success" : "text-error",
23505
23505
  children: [
23506
23506
  "Test ",
23507
23507
  index + 1,
@@ -23510,15 +23510,15 @@ var init_CodeRunnerPanel = __esm({
23510
23510
  ]
23511
23511
  }
23512
23512
  ),
23513
- /* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "small", className: "text-gray-400", children: [
23513
+ /* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "small", className: "text-background", children: [
23514
23514
  "Input: ",
23515
23515
  test.input
23516
23516
  ] }),
23517
- /* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "small", className: "text-gray-400", children: [
23517
+ /* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "small", className: "text-background", children: [
23518
23518
  "Expected: ",
23519
23519
  test.expectedOutput
23520
23520
  ] }),
23521
- /* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "small", className: "text-gray-400", children: [
23521
+ /* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "small", className: "text-background", children: [
23522
23522
  "Actual: ",
23523
23523
  test.actualOutput
23524
23524
  ] })
@@ -23703,14 +23703,14 @@ var init_ConnectionBlock = __esm({
23703
23703
  "div",
23704
23704
  {
23705
23705
  className: cn(
23706
- "bg-emerald-50 dark:bg-emerald-900/20 border-l-4 border-emerald-500 rounded-r-lg p-5 mb-6",
23706
+ "bg-success/10 border-l-4 border-success rounded-r-lg p-5 mb-6",
23707
23707
  className
23708
23708
  ),
23709
23709
  children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-3", children: [
23710
- /* @__PURE__ */ jsxRuntime.jsx(LucideIcons2.Link2, { className: "text-emerald-600 dark:text-emerald-400 flex-shrink-0 mt-1", size: 20 }),
23710
+ /* @__PURE__ */ jsxRuntime.jsx(LucideIcons2.Link2, { className: "text-success flex-shrink-0 mt-1", size: 20 }),
23711
23711
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1", children: [
23712
- /* @__PURE__ */ jsxRuntime.jsx("h4", { className: "font-semibold text-emerald-900 dark:text-emerald-100 mb-2", children: "Building On What You Know" }),
23713
- /* @__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 }) })
23712
+ /* @__PURE__ */ jsxRuntime.jsx("h4", { className: "font-semibold text-success mb-2", children: "Building On What You Know" }),
23713
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "prose dark:prose-invert prose-sm max-w-none text-foreground", children: /* @__PURE__ */ jsxRuntime.jsx(MarkdownContent, { content }) })
23714
23714
  ] })
23715
23715
  ] })
23716
23716
  }
@@ -23797,7 +23797,7 @@ function CounterStandard({
23797
23797
  variant: "h1",
23798
23798
  className: cn(
23799
23799
  sizeStyles8[size].display,
23800
- "font-bold tabular-nums text-primary-600"
23800
+ "font-bold tabular-nums text-primary"
23801
23801
  ),
23802
23802
  children: resolved.count
23803
23803
  }
@@ -23870,7 +23870,7 @@ function CounterFull({
23870
23870
  variant: "h1",
23871
23871
  className: cn(
23872
23872
  sizeStyles8[size].display,
23873
- "font-bold tabular-nums text-primary-600"
23873
+ "font-bold tabular-nums text-primary"
23874
23874
  ),
23875
23875
  children: resolved.count
23876
23876
  }
@@ -24131,11 +24131,11 @@ var init_DashboardLayout = __esm({
24131
24131
  className: "h-16 px-4 border-b border-border dark:border-border",
24132
24132
  children: [
24133
24133
  /* @__PURE__ */ jsxRuntime.jsxs(reactRouterDom.Link, { to: "/", className: "flex items-center gap-2", children: [
24134
- logo || /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "w-8 h-8 bg-primary-600 rounded-lg flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(
24134
+ logo || /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "w-8 h-8 bg-primary rounded-lg flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(
24135
24135
  Typography,
24136
24136
  {
24137
24137
  variant: "small",
24138
- className: "text-white font-bold text-sm",
24138
+ className: "text-primary-foreground font-bold text-sm",
24139
24139
  as: "span",
24140
24140
  children: appName.charAt(0).toUpperCase()
24141
24141
  }
@@ -24214,11 +24214,11 @@ var init_DashboardLayout = __esm({
24214
24214
  className: "hidden @md/dashboard:flex items-center gap-1 overflow-x-auto",
24215
24215
  children: [
24216
24216
  /* @__PURE__ */ jsxRuntime.jsxs(reactRouterDom.Link, { to: "/", className: "flex items-center gap-2 mr-3 shrink-0", children: [
24217
- logo || /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "w-7 h-7 bg-primary-600 rounded-lg flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(
24217
+ logo || /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "w-7 h-7 bg-primary rounded-lg flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(
24218
24218
  Typography,
24219
24219
  {
24220
24220
  variant: "small",
24221
- className: "text-white font-bold text-xs",
24221
+ className: "text-primary-foreground font-bold text-xs",
24222
24222
  as: "span",
24223
24223
  children: appName.charAt(0).toUpperCase()
24224
24224
  }
@@ -24278,8 +24278,8 @@ var init_DashboardLayout = __esm({
24278
24278
  {
24279
24279
  as: "span",
24280
24280
  className: cn(
24281
- "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",
24282
- action.variant === "danger" ? "bg-error" : action.variant === "primary" ? "bg-primary" : "bg-foreground"
24281
+ "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",
24282
+ action.variant === "danger" ? "bg-error text-error-foreground" : action.variant === "primary" ? "bg-primary text-primary-foreground" : "bg-foreground text-background"
24283
24283
  ),
24284
24284
  children: action.badge
24285
24285
  }
@@ -24301,7 +24301,7 @@ var init_DashboardLayout = __esm({
24301
24301
  Box,
24302
24302
  {
24303
24303
  as: "span",
24304
- 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",
24304
+ 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",
24305
24305
  children: unreadCount > 99 ? "99+" : unreadCount
24306
24306
  }
24307
24307
  )
@@ -24584,7 +24584,7 @@ function SubMenu({
24584
24584
  ),
24585
24585
  children: [
24586
24586
  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" })),
24587
- /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: cn("flex-1", isDanger && "text-red-600"), children: item.label }),
24587
+ /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: cn("flex-1", isDanger && "text-error"), children: item.label }),
24588
24588
  item.badge !== void 0 && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-auto text-xs font-medium", children: item.badge })
24589
24589
  ]
24590
24590
  },
@@ -24641,7 +24641,7 @@ function MenuItemRow({
24641
24641
  Typography,
24642
24642
  {
24643
24643
  variant: "small",
24644
- className: cn("flex-1", isDanger && "text-red-600"),
24644
+ className: cn("flex-1", isDanger && "text-error"),
24645
24645
  children: item.label
24646
24646
  }
24647
24647
  ),
@@ -25409,20 +25409,24 @@ function DataGrid({
25409
25409
  const bodyFields = fieldDefs.filter((f3) => f3 !== titleField && !badgeFields.includes(f3));
25410
25410
  const primaryActions = actionDefs.filter((a) => a.variant !== "danger");
25411
25411
  const dangerActions = actionDefs.filter((a) => a.variant === "danger");
25412
- const handleActionClick = (action, itemData) => (e) => {
25413
- e.stopPropagation();
25414
- const payload = {
25415
- id: itemData.id,
25416
- row: itemData
25417
- };
25418
- eventBus.emit(`UI:${action.event}`, payload);
25412
+ const fireAction = (action, itemData) => {
25419
25413
  if (action.navigatesTo) {
25420
25414
  const url = action.navigatesTo.replace(
25421
25415
  /\{\{row\.(\w+(?:\.\w+)*)\}\}/g,
25422
25416
  (_, field) => String(itemData[field] ?? "")
25423
25417
  );
25424
- eventBus.emit("UI:NAVIGATE", { url });
25418
+ eventBus.emit("UI:NAVIGATE", { url, row: itemData });
25419
+ return;
25425
25420
  }
25421
+ const payload = {
25422
+ id: itemData.id,
25423
+ row: itemData
25424
+ };
25425
+ eventBus.emit(`UI:${action.event}`, payload);
25426
+ };
25427
+ const handleActionClick = (action, itemData) => (e) => {
25428
+ e.stopPropagation();
25429
+ fireAction(action, itemData);
25426
25430
  };
25427
25431
  const hasRenderProp = typeof children === "function";
25428
25432
  React91.useEffect(() => {
@@ -25524,10 +25528,7 @@ function DataGrid({
25524
25528
  label: action.label,
25525
25529
  icon: action.icon,
25526
25530
  event: action.event,
25527
- onClick: () => eventBus.emit(`UI:${action.event}`, {
25528
- id: itemData.id,
25529
- row: itemData
25530
- })
25531
+ onClick: () => fireAction(action, itemData)
25531
25532
  }))
25532
25533
  }
25533
25534
  )
@@ -25669,10 +25670,7 @@ function DataGrid({
25669
25670
  label: action.label,
25670
25671
  icon: action.icon,
25671
25672
  event: action.event,
25672
- onClick: () => eventBus.emit(`UI:${action.event}`, {
25673
- id: itemData.id,
25674
- row: itemData
25675
- })
25673
+ onClick: () => fireAction(action, itemData)
25676
25674
  }))
25677
25675
  }
25678
25676
  )
@@ -27599,8 +27597,8 @@ var init_RelationSelect = __esm({
27599
27597
  disabled,
27600
27598
  className: cn(
27601
27599
  "w-full justify-between font-normal",
27602
- error && "border-red-300 focus:border-red-500 focus:ring-red-500",
27603
- isOpen && "ring-2 ring-primary-500 border-primary-500"
27600
+ error && "border-error/50 focus:border-error focus:ring-error",
27601
+ isOpen && "ring-2 ring-primary border-primary"
27604
27602
  ),
27605
27603
  children: [
27606
27604
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -27680,7 +27678,7 @@ var init_RelationSelect = __esm({
27680
27678
  paddingY: "sm",
27681
27679
  className: cn(
27682
27680
  "text-left text-sm hover:bg-muted focus:outline-none focus:bg-muted",
27683
- option.value === value && "bg-primary-50 text-primary-700",
27681
+ option.value === value && "bg-primary/10 text-primary",
27684
27682
  option.disabled && "opacity-50 cursor-not-allowed"
27685
27683
  ),
27686
27684
  onClick: () => handleSelect(option),
@@ -27837,7 +27835,7 @@ var init_SidePanel = __esm({
27837
27835
  showOverlay && /* @__PURE__ */ jsxRuntime.jsx(Presence, { show: isOpen, animation: "overlay", children: /* @__PURE__ */ jsxRuntime.jsx(
27838
27836
  Box,
27839
27837
  {
27840
- className: "fixed inset-0 bg-white/80 backdrop-blur-sm z-40 lg:hidden",
27838
+ className: "fixed inset-0 bg-background/80 backdrop-blur-sm z-40 lg:hidden",
27841
27839
  onClick: handleClose
27842
27840
  }
27843
27841
  ) }),
@@ -28204,7 +28202,7 @@ var init_WizardNavigation = __esm({
28204
28202
  /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: "chevron-left", size: "sm" }),
28205
28203
  resolvedBackLabel
28206
28204
  ] }) : /* @__PURE__ */ jsxRuntime.jsx(Box, {}),
28207
- /* @__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) }) }) }),
28205
+ /* @__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) }) }) }),
28208
28206
  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: [
28209
28207
  resolvedNextLabel,
28210
28208
  /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: "chevron-right", size: "sm" })
@@ -30361,6 +30359,7 @@ var init_Lightbox = __esm({
30361
30359
  {
30362
30360
  className: cn(
30363
30361
  "fixed inset-0 z-50 flex items-center justify-center",
30362
+ // eslint-disable-next-line almadar/no-hardcoded-colors -- media overlay: lightbox scrim behind images
30364
30363
  "bg-black bg-opacity-90",
30365
30364
  className
30366
30365
  ),
@@ -30383,7 +30382,7 @@ var init_Lightbox = __esm({
30383
30382
  "p-2 rounded-full",
30384
30383
  "text-[var(--color-foreground)] bg-[var(--color-card)]",
30385
30384
  "hover:bg-opacity-70 transition-opacity",
30386
- "focus:outline-none focus:ring-2 focus:ring-white"
30385
+ "focus:outline-none focus:ring-2 focus:ring-ring"
30387
30386
  ),
30388
30387
  "aria-label": t("aria.closeModal"),
30389
30388
  children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: "x", className: "w-6 h-6" })
@@ -30402,7 +30401,7 @@ var init_Lightbox = __esm({
30402
30401
  "p-2 rounded-full",
30403
30402
  "text-[var(--color-foreground)] bg-[var(--color-card)]",
30404
30403
  "hover:bg-opacity-70 transition-opacity",
30405
- "focus:outline-none focus:ring-2 focus:ring-white"
30404
+ "focus:outline-none focus:ring-2 focus:ring-ring"
30406
30405
  ),
30407
30406
  "aria-label": t("aria.previousImage"),
30408
30407
  children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: "chevron-left", className: "w-8 h-8" })
@@ -30439,7 +30438,7 @@ var init_Lightbox = __esm({
30439
30438
  "p-2 rounded-full",
30440
30439
  "text-[var(--color-foreground)] bg-[var(--color-card)]",
30441
30440
  "hover:bg-opacity-70 transition-opacity",
30442
- "focus:outline-none focus:ring-2 focus:ring-white"
30441
+ "focus:outline-none focus:ring-2 focus:ring-ring"
30443
30442
  ),
30444
30443
  "aria-label": t("aria.nextImage"),
30445
30444
  children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: "chevron-right", className: "w-8 h-8" })
@@ -33512,6 +33511,7 @@ var init_QrScanner = __esm({
33512
33511
  overflow: "hidden",
33513
33512
  rounded: "sm",
33514
33513
  className: cn(
33514
+ // eslint-disable-next-line almadar/no-hardcoded-colors -- media overlay: always over a dark scrim
33515
33515
  "bg-black",
33516
33516
  "aspect-square w-full max-w-md",
33517
33517
  className
@@ -33576,7 +33576,9 @@ var init_QrScanner = __esm({
33576
33576
  type: "button",
33577
33577
  onClick: togglePause,
33578
33578
  className: cn(
33579
+ // eslint-disable-next-line almadar/no-hardcoded-colors -- media overlay: always over a dark scrim
33579
33580
  "rounded-full bg-black bg-opacity-60 p-2 text-white",
33581
+ // eslint-disable-next-line almadar/no-hardcoded-colors -- media overlay: always over a dark scrim
33580
33582
  "hover:bg-opacity-80 focus:outline-none focus:ring-2 focus:ring-white"
33581
33583
  ),
33582
33584
  "aria-label": isPaused ? t("qrScanner.resumeScanning") : t("qrScanner.pauseScanning"),
@@ -33589,7 +33591,9 @@ var init_QrScanner = __esm({
33589
33591
  type: "button",
33590
33592
  onClick: toggleFacing,
33591
33593
  className: cn(
33594
+ // eslint-disable-next-line almadar/no-hardcoded-colors -- media overlay: always over a dark scrim
33592
33595
  "rounded-full bg-black bg-opacity-60 p-2 text-white",
33596
+ // eslint-disable-next-line almadar/no-hardcoded-colors -- media overlay: always over a dark scrim
33593
33597
  "hover:bg-opacity-80 focus:outline-none focus:ring-2 focus:ring-white"
33594
33598
  ),
33595
33599
  "aria-label": currentFacing === "environment" ? t("qrScanner.switchToFrontCamera") : t("qrScanner.switchToRearCamera"),
@@ -33602,7 +33606,9 @@ var init_QrScanner = __esm({
33602
33606
  type: "button",
33603
33607
  onClick: handleMockScan,
33604
33608
  className: cn(
33609
+ // eslint-disable-next-line almadar/no-hardcoded-colors -- media overlay: always over a dark scrim
33605
33610
  "rounded-full bg-black bg-opacity-60 px-3 py-2 text-xs text-white",
33611
+ // eslint-disable-next-line almadar/no-hardcoded-colors -- media overlay: always over a dark scrim
33606
33612
  "hover:bg-opacity-80 focus:outline-none focus:ring-2 focus:ring-white"
33607
33613
  ),
33608
33614
  "aria-label": t("aria.mockScanDev"),
@@ -38419,19 +38425,19 @@ var init_ReflectionBlock = __esm({
38419
38425
  "div",
38420
38426
  {
38421
38427
  className: cn(
38422
- "my-6 border-l-4 border-amber-400 bg-amber-50 dark:bg-amber-900/20 rounded-r-lg p-4",
38428
+ "my-6 border-l-4 border-warning bg-warning/10 rounded-r-lg p-4",
38423
38429
  className
38424
38430
  ),
38425
38431
  children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-3", children: [
38426
- /* @__PURE__ */ jsxRuntime.jsx(LucideIcons2.PauseCircle, { className: "text-amber-600 dark:text-amber-400 flex-shrink-0 mt-1", size: 20 }),
38432
+ /* @__PURE__ */ jsxRuntime.jsx(LucideIcons2.PauseCircle, { className: "text-warning flex-shrink-0 mt-1", size: 20 }),
38427
38433
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1", children: [
38428
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "font-medium text-amber-900 dark:text-amber-100 mb-2", children: "Pause & Reflect" }),
38429
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-gray-700 dark:text-gray-300 text-sm mb-3", children: prompt }),
38434
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "font-medium text-warning mb-2", children: "Pause & Reflect" }),
38435
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-foreground text-sm mb-3", children: prompt }),
38430
38436
  isExpanded ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
38431
38437
  /* @__PURE__ */ jsxRuntime.jsx(
38432
38438
  "textarea",
38433
38439
  {
38434
- 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",
38440
+ className: "w-full p-2 border border-input rounded text-sm bg-card text-foreground focus:ring-2 focus:ring-ring focus:border-transparent",
38435
38441
  placeholder: "Your thoughts...",
38436
38442
  value: note,
38437
38443
  onChange: (e) => setNote(e.target.value),
@@ -38442,7 +38448,7 @@ var init_ReflectionBlock = __esm({
38442
38448
  "button",
38443
38449
  {
38444
38450
  onClick: handleSave,
38445
- className: "mt-2 text-sm px-3 py-1 bg-amber-600 text-white rounded hover:bg-amber-700 transition-colors",
38451
+ className: "mt-2 text-sm px-3 py-1 bg-warning text-warning-foreground rounded hover:opacity-90 transition-colors",
38446
38452
  children: "Save & Continue"
38447
38453
  }
38448
38454
  )
@@ -38450,7 +38456,7 @@ var init_ReflectionBlock = __esm({
38450
38456
  "button",
38451
38457
  {
38452
38458
  onClick: () => setIsExpanded(true),
38453
- className: "text-sm text-amber-600 dark:text-amber-400 hover:underline",
38459
+ className: "text-sm text-warning hover:underline",
38454
38460
  children: savedNote ? "\u2713 Answered \xB7 Edit" : "Answer this question"
38455
38461
  }
38456
38462
  )
@@ -38736,7 +38742,7 @@ function DataTable({
38736
38742
  )),
38737
38743
  rowActions && /* @__PURE__ */ jsxRuntime.jsx("th", { className: "w-12 px-4 py-3" })
38738
38744
  ] }) }),
38739
- /* @__PURE__ */ jsxRuntime.jsx("tbody", { className: "divide-y divide-gray-200 dark:divide-gray-700", children: isLoading ? /* @__PURE__ */ jsxRuntime.jsx("tr", { children: /* @__PURE__ */ jsxRuntime.jsx(
38745
+ /* @__PURE__ */ jsxRuntime.jsx("tbody", { className: "divide-y divide-border", children: isLoading ? /* @__PURE__ */ jsxRuntime.jsx("tr", { children: /* @__PURE__ */ jsxRuntime.jsx(
38740
38746
  "td",
38741
38747
  {
38742
38748
  colSpan: normalizedColumns.length + (selectable ? 1 : 0) + (rowActions ? 1 : 0),
@@ -39107,7 +39113,7 @@ var init_DetailPanel = __esm({
39107
39113
  };
39108
39114
  const effectiveFieldNames = isFieldDefArray(propFields) ? normalizeFieldDefs(propFields) : fieldNames;
39109
39115
  const fieldTypeMap = isFieldDefArray(propFields) ? buildFieldTypeMap(propFields) : {};
39110
- React91.useCallback(
39116
+ const handleActionClick = React91.useCallback(
39111
39117
  (action, data2) => {
39112
39118
  if (action.navigatesTo) {
39113
39119
  const url = action.navigatesTo.replace(
@@ -39299,8 +39305,9 @@ var init_DetailPanel = __esm({
39299
39305
  {
39300
39306
  variant: action.variant || "secondary",
39301
39307
  size: "sm",
39302
- action: action.event,
39308
+ action: action.navigatesTo ? void 0 : action.event,
39303
39309
  actionPayload: { row: normalizedData },
39310
+ onClick: action.navigatesTo ? () => handleActionClick(action, normalizedData) : void 0,
39304
39311
  icon: action.icon,
39305
39312
  "data-testid": action.event ? `action-${action.event}` : void 0,
39306
39313
  "data-row-id": normalizedData?.id !== void 0 ? String(normalizedData.id) : void 0,
@@ -41343,8 +41350,9 @@ var init_MediaGallery = __esm({
41343
41350
  )
41344
41351
  }
41345
41352
  ),
41346
- 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 }) }),
41347
- 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" }) })
41353
+ item.caption && // eslint-disable-next-line almadar/no-hardcoded-colors -- media overlay: caption scrim over image
41354
+ /* @__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 }) }),
41355
+ 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" }) })
41348
41356
  ]
41349
41357
  },
41350
41358
  item.id
@@ -41373,7 +41381,7 @@ var init_MediaGallery = __esm({
41373
41381
  size: "sm",
41374
41382
  icon: LucideIcons2.X,
41375
41383
  action: "LIGHTBOX_CLOSE",
41376
- className: "text-white hover:bg-white/20"
41384
+ className: "text-foreground hover:bg-muted/50"
41377
41385
  }
41378
41386
  ) }),
41379
41387
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -41384,7 +41392,7 @@ var init_MediaGallery = __esm({
41384
41392
  className: "max-w-full max-h-[80vh] object-contain rounded-md"
41385
41393
  }
41386
41394
  ),
41387
- lightboxItem.caption && /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body", className: "text-white mt-3 text-center", children: lightboxItem.caption })
41395
+ lightboxItem.caption && /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body", className: "text-foreground mt-3 text-center", children: lightboxItem.caption })
41388
41396
  ]
41389
41397
  }
41390
41398
  )
@@ -41845,7 +41853,7 @@ function WalkMinimap() {
41845
41853
  {
41846
41854
  variant,
41847
41855
  size: "sm",
41848
- className: `flex-shrink-0 text-[9px] ${isActive ? "ring-1 ring-cyan-400" : ""}`,
41856
+ className: `flex-shrink-0 text-[9px] ${isActive ? "ring-1 ring-info" : ""}`,
41849
41857
  children: [
41850
41858
  isDone ? "\u2713" : isActive ? "\u25CF" : "\u25CB",
41851
41859
  " ",
@@ -41986,13 +41994,13 @@ function WalkMinimap() {
41986
41994
  })
41987
41995
  ] }) }),
41988
41996
  /* @__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: [
41989
- /* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "caption", className: "text-xs font-mono text-green-500", children: [
41997
+ /* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "caption", className: "text-xs font-mono text-success", children: [
41990
41998
  "Engine: ",
41991
41999
  engineCount,
41992
42000
  "/",
41993
42001
  totalTransitions
41994
42002
  ] }),
41995
- domCount > 0 && /* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "caption", className: "text-xs font-mono text-cyan-500", children: [
42003
+ domCount > 0 && /* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "caption", className: "text-xs font-mono text-info", children: [
41996
42004
  "DOM: ",
41997
42005
  domCount
41998
42006
  ] }),
@@ -42025,13 +42033,13 @@ function TraitsTab({ traits: traits2 }) {
42025
42033
  const accordionItems = traits2.map((trait) => ({
42026
42034
  id: trait.id,
42027
42035
  header: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 w-full", children: [
42028
- /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body", weight: "semibold", className: "text-purple-600 dark:text-purple-400", children: trait.name }),
42036
+ /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body", weight: "semibold", className: "text-primary", children: trait.name }),
42029
42037
  /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: "success", size: "sm", children: trait.currentState }),
42030
- /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-gray-500 ml-auto", children: t("debug.transitionsCount", { count: trait.transitionCount }) })
42038
+ /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-muted-foreground ml-auto", children: t("debug.transitionsCount", { count: trait.transitionCount }) })
42031
42039
  ] }),
42032
42040
  content: /* @__PURE__ */ jsxRuntime.jsxs(Stack, { gap: "sm", children: [
42033
42041
  /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
42034
- /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-2", children: t("debug.states") }),
42042
+ /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground mb-2", children: t("debug.states") }),
42035
42043
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-wrap gap-1", children: trait.states.map((state) => /* @__PURE__ */ jsxRuntime.jsx(
42036
42044
  Badge,
42037
42045
  {
@@ -42043,18 +42051,18 @@ function TraitsTab({ traits: traits2 }) {
42043
42051
  )) })
42044
42052
  ] }),
42045
42053
  trait.transitions.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
42046
- /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-2", children: t("debug.transitions") }),
42054
+ /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground mb-2", children: t("debug.transitions") }),
42047
42055
  /* @__PURE__ */ jsxRuntime.jsx(Stack, { gap: "xs", children: trait.transitions.map((t2, i) => /* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "small", className: "font-mono", children: [
42048
42056
  t2.from,
42049
42057
  " \u2192 ",
42050
42058
  t2.to,
42051
42059
  " ",
42052
- /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-gray-500", children: [
42060
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-muted-foreground", children: [
42053
42061
  "(",
42054
42062
  t2.event,
42055
42063
  ")"
42056
42064
  ] }),
42057
- t2.guard && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-amber-500", children: [
42065
+ t2.guard && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-warning", children: [
42058
42066
  " [",
42059
42067
  t2.guard,
42060
42068
  "]"
@@ -42062,7 +42070,7 @@ function TraitsTab({ traits: traits2 }) {
42062
42070
  ] }, i)) })
42063
42071
  ] }),
42064
42072
  trait.guards.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
42065
- /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-2", children: t("debug.guards") }),
42073
+ /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground mb-2", children: t("debug.guards") }),
42066
42074
  /* @__PURE__ */ jsxRuntime.jsx(Stack, { gap: "xs", children: trait.guards.map((g, i) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [
42067
42075
  /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", children: g.name }),
42068
42076
  /* @__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" })
@@ -42105,11 +42113,11 @@ function TicksTab({ ticks: ticks2 }) {
42105
42113
  };
42106
42114
  const TickCard = ({ tick, active }) => /* @__PURE__ */ jsxRuntime.jsxs(Card, { className: `p-3 ${!active ? "opacity-50" : ""}`, children: [
42107
42115
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 mb-2", children: [
42108
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: `w-2 h-2 rounded-full ${active ? "bg-green-500" : "bg-gray-400"}` }),
42109
- /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body", weight: "semibold", className: "text-amber-600 dark:text-amber-400", children: tick.name }),
42110
- /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-gray-500", children: tick.traitName })
42116
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: `w-2 h-2 rounded-full ${active ? "bg-success" : "bg-muted-foreground"}` }),
42117
+ /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body", weight: "semibold", className: "text-warning", children: tick.name }),
42118
+ /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-muted-foreground", children: tick.traitName })
42111
42119
  ] }),
42112
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-3 text-xs text-gray-500", children: [
42120
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-3 text-xs text-muted-foreground", children: [
42113
42121
  /* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
42114
42122
  tick.interval,
42115
42123
  "ms"
@@ -42132,7 +42140,7 @@ function TicksTab({ ticks: ticks2 }) {
42132
42140
  ] });
42133
42141
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "debug-tab debug-tab--ticks", children: [
42134
42142
  activeTicks.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-4", children: [
42135
- /* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-2", children: [
42143
+ /* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground mb-2", children: [
42136
42144
  "Active (",
42137
42145
  activeTicks.length,
42138
42146
  ")"
@@ -42140,7 +42148,7 @@ function TicksTab({ ticks: ticks2 }) {
42140
42148
  /* @__PURE__ */ jsxRuntime.jsx(Stack, { gap: "sm", children: activeTicks.map((tick) => /* @__PURE__ */ jsxRuntime.jsx(TickCard, { tick, active: true }, tick.id)) })
42141
42149
  ] }),
42142
42150
  inactiveTicks.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
42143
- /* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "small", weight: "medium", className: "text-gray-400 mb-2", children: [
42151
+ /* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground mb-2", children: [
42144
42152
  "Inactive (",
42145
42153
  inactiveTicks.length,
42146
42154
  ")"
@@ -42188,33 +42196,33 @@ function EntitiesTab({ snapshot }) {
42188
42196
  id: `singleton-${name}`,
42189
42197
  header: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
42190
42198
  /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: "primary", size: "sm", children: t("debug.singleton") }),
42191
- /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body", weight: "semibold", className: "text-sky-600 dark:text-sky-400", children: name })
42199
+ /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body", weight: "semibold", className: "text-info", children: name })
42192
42200
  ] }),
42193
- 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) })
42201
+ 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) })
42194
42202
  }));
42195
42203
  const runtimeItems = runtimeEntities.slice(0, 20).map((entity) => ({
42196
42204
  id: entity.id,
42197
42205
  header: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
42198
- /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body", weight: "semibold", className: "text-sky-600 dark:text-sky-400", children: entity.type }),
42199
- /* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "small", className: "text-gray-500", children: [
42206
+ /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body", weight: "semibold", className: "text-info", children: entity.type }),
42207
+ /* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "small", className: "text-muted-foreground", children: [
42200
42208
  "#",
42201
42209
  entity.id.slice(0, 8)
42202
42210
  ] })
42203
42211
  ] }),
42204
- 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) })
42212
+ 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) })
42205
42213
  }));
42206
42214
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "debug-tab debug-tab--entities", children: [
42207
42215
  singletonItems.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-4", children: [
42208
- /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-2", children: t("debug.singletonsCount", { count: singletonItems.length }) }),
42216
+ /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground mb-2", children: t("debug.singletonsCount", { count: singletonItems.length }) }),
42209
42217
  /* @__PURE__ */ jsxRuntime.jsx(Accordion, { items: singletonItems, multiple: true })
42210
42218
  ] }),
42211
42219
  runtimeItems.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-4", children: [
42212
- /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-2", children: t("debug.runtimeCount", { count: runtimeEntities.length }) }),
42220
+ /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground mb-2", children: t("debug.runtimeCount", { count: runtimeEntities.length }) }),
42213
42221
  /* @__PURE__ */ jsxRuntime.jsx(Accordion, { items: runtimeItems, multiple: true }),
42214
- 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 }) })
42222
+ 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 }) })
42215
42223
  ] }),
42216
42224
  persistentEntries.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
42217
- /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-2", children: t("debug.persistent") }),
42225
+ /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground mb-2", children: t("debug.persistent") }),
42218
42226
  /* @__PURE__ */ jsxRuntime.jsx(Stack, { gap: "xs", children: persistentEntries.map(([type, info]) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between py-1", children: [
42219
42227
  /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", children: type }),
42220
42228
  /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: info.loaded ? "success" : "default", size: "sm", children: info.loaded ? t("debug.loadedCount", { count: info.count }) : t("debug.notLoaded") })
@@ -42299,7 +42307,7 @@ function EventFlowTab({ events: events2 }) {
42299
42307
  );
42300
42308
  })
42301
42309
  ] }),
42302
- /* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex items-center gap-1 text-xs text-gray-500 ml-auto cursor-pointer", children: [
42310
+ /* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex items-center gap-1 text-xs text-muted-foreground ml-auto cursor-pointer", children: [
42303
42311
  /* @__PURE__ */ jsxRuntime.jsx(
42304
42312
  Checkbox,
42305
42313
  {
@@ -42314,18 +42322,18 @@ function EventFlowTab({ events: events2 }) {
42314
42322
  "div",
42315
42323
  {
42316
42324
  ref: containerRef,
42317
- className: "max-h-64 overflow-y-auto space-y-1 bg-gray-50 dark:bg-gray-800 rounded p-2",
42325
+ className: "max-h-64 overflow-y-auto space-y-1 bg-muted rounded p-2",
42318
42326
  children: filteredEvents.slice(-100).map((event) => {
42319
42327
  const { variant, icon } = TYPE_BADGES[event.type] || { variant: "default", icon: "\u2022" };
42320
42328
  return /* @__PURE__ */ jsxRuntime.jsxs(
42321
42329
  "div",
42322
42330
  {
42323
- className: "flex items-start gap-2 text-xs py-1 hover:bg-gray-100 dark:hover:bg-gray-700 rounded px-1",
42331
+ className: "flex items-start gap-2 text-xs py-1 hover:bg-muted/50 rounded px-1",
42324
42332
  children: [
42325
- /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-gray-400 font-mono min-w-[65px]", children: formatTime2(event.timestamp) }),
42333
+ /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-muted-foreground font-mono min-w-[65px]", children: formatTime2(event.timestamp) }),
42326
42334
  /* @__PURE__ */ jsxRuntime.jsx("span", { children: icon }),
42327
42335
  /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant, size: "sm", className: "min-w-[60px] justify-center", children: event.source }),
42328
- /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-gray-600 dark:text-gray-400", children: event.message })
42336
+ /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-muted-foreground", children: event.message })
42329
42337
  ]
42330
42338
  },
42331
42339
  event.id
@@ -42389,21 +42397,21 @@ function GuardsPanel({ guards }) {
42389
42397
  id: guard.id,
42390
42398
  header: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 w-full", children: [
42391
42399
  /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: guard.result ? "success" : "danger", size: "sm", children: guard.result ? "\u2713" : "\u2717" }),
42392
- /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body", weight: "semibold", className: "text-amber-600 dark:text-amber-400", children: guard.guardName }),
42393
- /* @__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 }),
42394
- /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-gray-400 ml-auto", children: formatTime2(guard.timestamp) })
42400
+ /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body", weight: "semibold", className: "text-warning", children: guard.guardName }),
42401
+ /* @__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 }),
42402
+ /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-muted-foreground ml-auto", children: formatTime2(guard.timestamp) })
42395
42403
  ] }),
42396
42404
  content: /* @__PURE__ */ jsxRuntime.jsxs(Stack, { gap: "sm", children: [
42397
42405
  /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
42398
- /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500", children: t("debug.expression") }),
42399
- /* @__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 })
42406
+ /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground", children: t("debug.expression") }),
42407
+ /* @__PURE__ */ jsxRuntime.jsx("code", { className: "block mt-1 text-xs text-warning bg-warning/10 px-2 py-1 rounded", children: guard.expression })
42400
42408
  ] }),
42401
42409
  /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
42402
- /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500", children: t("debug.inputs") }),
42403
- /* @__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) })
42410
+ /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground", children: t("debug.inputs") }),
42411
+ /* @__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) })
42404
42412
  ] }),
42405
42413
  /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
42406
- /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500", children: t("debug.trait") }),
42414
+ /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground", children: t("debug.trait") }),
42407
42415
  /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", children: guard.context.traitName })
42408
42416
  ] })
42409
42417
  ] })
@@ -42459,7 +42467,7 @@ function VerificationTab({ checks, summary }) {
42459
42467
  (a, b) => (sortOrder[a.status] ?? 4) - (sortOrder[b.status] ?? 4)
42460
42468
  );
42461
42469
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "debug-tab debug-tab--verification", children: [
42462
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3 mb-3 p-2 bg-gray-50 dark:bg-gray-800 rounded", children: [
42470
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3 mb-3 p-2 bg-muted rounded", children: [
42463
42471
  /* @__PURE__ */ jsxRuntime.jsxs(Badge, { variant: "success", size: "sm", children: [
42464
42472
  summary.passed,
42465
42473
  " passed"
@@ -42476,7 +42484,7 @@ function VerificationTab({ checks, summary }) {
42476
42484
  summary.pending,
42477
42485
  " pending"
42478
42486
  ] }),
42479
- /* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "small", className: "text-gray-500 ml-auto", children: [
42487
+ /* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "small", className: "text-muted-foreground ml-auto", children: [
42480
42488
  summary.totalChecks,
42481
42489
  " total checks"
42482
42490
  ] })
@@ -42486,12 +42494,12 @@ function VerificationTab({ checks, summary }) {
42486
42494
  return /* @__PURE__ */ jsxRuntime.jsxs(
42487
42495
  "div",
42488
42496
  {
42489
- className: "flex items-start gap-2 p-2 rounded hover:bg-gray-50 dark:hover:bg-gray-800",
42497
+ className: "flex items-start gap-2 p-2 rounded hover:bg-muted/50",
42490
42498
  children: [
42491
42499
  /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: config.variant, size: "sm", className: "min-w-[20px] justify-center mt-0.5", children: config.icon }),
42492
42500
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 min-w-0", children: [
42493
42501
  /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "break-words", children: check.label }),
42494
- check.details && /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-gray-500 break-words", children: check.details })
42502
+ check.details && /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-muted-foreground break-words", children: check.details })
42495
42503
  ] }),
42496
42504
  /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-muted-foreground font-mono text-xs shrink-0", children: new Date(check.updatedAt).toLocaleTimeString("en-US", {
42497
42505
  hour12: false,
@@ -42526,10 +42534,10 @@ var init_VerificationTab = __esm({
42526
42534
  function EffectBadge({ effect }) {
42527
42535
  const variant = EFFECT_STATUS_VARIANT[effect.status] || "default";
42528
42536
  const icon = effect.status === "executed" ? "\u2713" : effect.status === "failed" ? "\u2717" : "-";
42529
- 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: [
42537
+ 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: [
42530
42538
  /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant, size: "sm", className: "!text-[9px] !px-1 !py-0", children: icon }),
42531
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-gray-600 dark:text-gray-400", children: effect.type }),
42532
- effect.error && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-red-500 truncate max-w-[120px]", title: effect.error, children: effect.error })
42539
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: effect.type }),
42540
+ effect.error && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-error truncate max-w-[120px]", title: effect.error, children: effect.error })
42533
42541
  ] });
42534
42542
  }
42535
42543
  function TransitionTimeline({ transitions }) {
@@ -42564,8 +42572,8 @@ function TransitionTimeline({ transitions }) {
42564
42572
  const sorted = [...transitions].reverse();
42565
42573
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "debug-tab debug-tab--timeline", children: [
42566
42574
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between mb-2", children: [
42567
- /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-gray-500", children: t("debug.transitionsRecorded", { count: transitions.length }) }),
42568
- /* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex items-center gap-1 text-xs text-gray-500 cursor-pointer", children: [
42575
+ /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-muted-foreground", children: t("debug.transitionsRecorded", { count: transitions.length }) }),
42576
+ /* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex items-center gap-1 text-xs text-muted-foreground cursor-pointer", children: [
42569
42577
  /* @__PURE__ */ jsxRuntime.jsx(
42570
42578
  Checkbox,
42571
42579
  {
@@ -42590,22 +42598,22 @@ function TransitionTimeline({ transitions }) {
42590
42598
  {
42591
42599
  className: `
42592
42600
  relative pl-6 pb-3 border-l-2 cursor-pointer
42593
- hover:bg-gray-50 dark:hover:bg-gray-800 rounded-r
42594
- ${hasFailedEffects ? "border-red-300 dark:border-red-700" : "border-gray-200 dark:border-gray-700"}
42601
+ hover:bg-muted/50 rounded-r
42602
+ ${hasFailedEffects ? "border-error" : "border-border"}
42595
42603
  `,
42596
42604
  onClick: () => setExpandedId(isExpanded ? null : trace.id),
42597
42605
  children: [
42598
42606
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: `
42599
42607
  absolute left-[-5px] top-1 w-2 h-2 rounded-full
42600
- ${hasFailedEffects ? "bg-red-500" : allPassed ? "bg-green-500" : "bg-gray-400"}
42608
+ ${hasFailedEffects ? "bg-error" : allPassed ? "bg-success" : "bg-muted-foreground"}
42601
42609
  ` }),
42602
42610
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 text-xs py-1 px-2", children: [
42603
- /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-gray-400 font-mono min-w-[65px]", children: formatTime2(trace.timestamp) }),
42611
+ /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-muted-foreground font-mono min-w-[65px]", children: formatTime2(trace.timestamp) }),
42604
42612
  /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: "primary", size: "sm", className: "min-w-[60px] justify-center", children: trace.traitName }),
42605
- /* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "small", className: "font-mono text-gray-600 dark:text-gray-400", children: [
42613
+ /* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "small", className: "font-mono text-muted-foreground", children: [
42606
42614
  trace.from,
42607
42615
  " ",
42608
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-gray-400", children: "\u2192" }),
42616
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground/50", children: "\u2192" }),
42609
42617
  " ",
42610
42618
  trace.to
42611
42619
  ] }),
@@ -42622,9 +42630,9 @@ function TransitionTimeline({ transitions }) {
42622
42630
  ]
42623
42631
  }
42624
42632
  ),
42625
- /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-gray-400 ml-auto", children: t("debug.effectsCount", { count: trace.effects.length }) })
42633
+ /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-muted-foreground ml-auto", children: t("debug.effectsCount", { count: trace.effects.length }) })
42626
42634
  ] }),
42627
- 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: [
42635
+ 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: [
42628
42636
  /* @__PURE__ */ jsxRuntime.jsx(EffectBadge, { effect }),
42629
42637
  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) }),
42630
42638
  effect.durationMs !== void 0 && /* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "small", className: "text-muted-foreground text-xs", children: [
@@ -42658,8 +42666,8 @@ var init_TransitionTimeline = __esm({
42658
42666
  }
42659
42667
  });
42660
42668
  function StatRow({ label, value, variant }) {
42661
- 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: [
42662
- /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-gray-500", children: label }),
42669
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between py-1.5 border-b border-border last:border-b-0", children: [
42670
+ /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-muted-foreground", children: label }),
42663
42671
  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) })
42664
42672
  ] });
42665
42673
  }
@@ -42688,7 +42696,7 @@ function ServerBridgeTab({ bridge }) {
42688
42696
  return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "debug-tab debug-tab--bridge", children: /* @__PURE__ */ jsxRuntime.jsxs(Stack, { gap: "sm", children: [
42689
42697
  /* @__PURE__ */ jsxRuntime.jsxs(Card, { className: "p-3", children: [
42690
42698
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3 mb-3", children: [
42691
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: `w-3 h-3 rounded-full ${bridge.connected ? "bg-green-500 animate-pulse" : "bg-red-500"}` }),
42699
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: `w-3 h-3 rounded-full ${bridge.connected ? "bg-success animate-pulse" : "bg-error"}` }),
42692
42700
  /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "h6", children: bridge.connected ? t("debug.connected") : t("debug.disconnected") })
42693
42701
  ] }),
42694
42702
  /* @__PURE__ */ jsxRuntime.jsxs(Stack, { gap: "xs", children: [
@@ -42723,11 +42731,11 @@ function ServerBridgeTab({ bridge }) {
42723
42731
  )
42724
42732
  ] })
42725
42733
  ] }),
42726
- bridge.lastError && /* @__PURE__ */ jsxRuntime.jsxs(Card, { className: "p-3 border-red-200 dark:border-red-800 bg-red-50 dark:bg-red-950", children: [
42727
- /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "semibold", className: "text-red-600 dark:text-red-400 mb-1", children: t("debug.lastError") }),
42728
- /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-red-500 font-mono break-all", children: bridge.lastError })
42734
+ bridge.lastError && /* @__PURE__ */ jsxRuntime.jsxs(Card, { className: "p-3 border-error/30 bg-error/10", children: [
42735
+ /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "semibold", className: "text-error mb-1", children: t("debug.lastError") }),
42736
+ /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-error font-mono break-all", children: bridge.lastError })
42729
42737
  ] }),
42730
- 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 }) }) })
42738
+ 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 }) }) })
42731
42739
  ] }) });
42732
42740
  }
42733
42741
  var init_ServerBridgeTab = __esm({
@@ -42853,7 +42861,7 @@ function EventDispatcherTab({ traits: traits2, schema }) {
42853
42861
  };
42854
42862
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "debug-tab debug-tab--dispatch", children: [
42855
42863
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-3", children: [
42856
- /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-1", children: t("debug.activeStates") }),
42864
+ /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground mb-1", children: t("debug.activeStates") }),
42857
42865
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-wrap gap-1", children: traits2.map((trait) => /* @__PURE__ */ jsxRuntime.jsxs(Badge, { variant: "success", size: "sm", children: [
42858
42866
  trait.name,
42859
42867
  ": ",
@@ -42861,8 +42869,8 @@ function EventDispatcherTab({ traits: traits2, schema }) {
42861
42869
  ] }, trait.id)) })
42862
42870
  ] }),
42863
42871
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-3", children: [
42864
- /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-1", children: t("debug.availableEvents") }),
42865
- 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: [
42872
+ /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground mb-1", children: t("debug.availableEvents") }),
42873
+ 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: [
42866
42874
  /* @__PURE__ */ jsxRuntime.jsx(
42867
42875
  Button,
42868
42876
  {
@@ -42873,22 +42881,22 @@ function EventDispatcherTab({ traits: traits2, schema }) {
42873
42881
  children: event
42874
42882
  }
42875
42883
  ),
42876
- /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-gray-500", children: transitions.map((t2) => `${t2.from} -> ${t2.to}`).join(", ") }),
42884
+ /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-muted-foreground", children: transitions.map((t2) => `${t2.from} -> ${t2.to}`).join(", ") }),
42877
42885
  transitions.some((tr) => tr.guard) && /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: "warning", size: "sm", children: t("debug.guarded") })
42878
42886
  ] }, event)) })
42879
42887
  ] }),
42880
42888
  unavailableEvents.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-3", children: [
42881
- /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-1", children: t("debug.otherEvents") }),
42889
+ /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground mb-1", children: t("debug.otherEvents") }),
42882
42890
  /* @__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)) })
42883
42891
  ] }),
42884
42892
  log11.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
42885
- /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-1", children: t("debug.recentTransitions") }),
42893
+ /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground mb-1", children: t("debug.recentTransitions") }),
42886
42894
  /* @__PURE__ */ jsxRuntime.jsx(Stack, { gap: "xs", children: log11.map((entry, i) => /* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "small", className: "font-mono text-xs", children: [
42887
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-purple-400", children: entry.traitName }),
42895
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary", children: entry.traitName }),
42888
42896
  " ",
42889
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-gray-500", children: entry.from }),
42897
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: entry.from }),
42890
42898
  " -> ",
42891
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-green-400", children: entry.to })
42899
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-success", children: entry.to })
42892
42900
  ] }, i)) })
42893
42901
  ] })
42894
42902
  ] });
@@ -42914,21 +42922,21 @@ var init_RuntimeDebugger = __esm({
42914
42922
  function ServerResponseRow({ sr }) {
42915
42923
  const { t } = hooks.useTranslate();
42916
42924
  const entityEntries = Object.entries(sr.dataEntities);
42917
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ml-4 pl-2 border-l border-purple-500/30 py-0.5 text-xs font-mono", children: [
42925
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ml-4 pl-2 border-l border-primary py-0.5 text-xs font-mono", children: [
42918
42926
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
42919
- /* @__PURE__ */ jsxRuntime.jsxs("span", { className: sr.success ? "text-green-600 dark:text-green-400" : "text-red-600 dark:text-red-400", children: [
42927
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: sr.success ? "text-success" : "text-error", children: [
42920
42928
  sr.success ? "\u2713" : "\u2717",
42921
42929
  " ",
42922
42930
  t("debug.server")
42923
42931
  ] }),
42924
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-purple-600 dark:text-purple-300", children: sr.orbitalName }),
42925
- 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 }) }),
42926
- sr.emittedEvents.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "px-1 rounded bg-blue-500/15 text-blue-300", children: [
42932
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary", children: sr.orbitalName }),
42933
+ sr.clientEffects > 0 && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "px-1 rounded bg-primary/10 text-primary", children: t("debug.clientEffectsCount", { count: sr.clientEffects }) }),
42934
+ sr.emittedEvents.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "px-1 rounded bg-primary/10 text-primary", children: [
42927
42935
  t("debug.emitLabel"),
42928
42936
  " ",
42929
42937
  sr.emittedEvents.join(", ")
42930
42938
  ] }),
42931
- 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 })
42939
+ sr.error && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "px-1 rounded bg-error/10 text-error truncate max-w-[300px]", children: sr.error })
42932
42940
  ] }),
42933
42941
  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: [
42934
42942
  name,
@@ -42944,9 +42952,9 @@ function TransitionRow({ trace }) {
42944
42952
  if (isServerEntry && trace.serverResponse) {
42945
42953
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "py-0.5 border-b border-border last:border-0", children: [
42946
42954
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-2 text-xs font-mono", children: [
42947
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "mt-1.5 w-1.5 h-1.5 rounded-full flex-shrink-0 bg-purple-500" }),
42955
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "mt-1.5 w-1.5 h-1.5 rounded-full flex-shrink-0 bg-primary" }),
42948
42956
  /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: "warning", size: "sm", className: "flex-shrink-0", children: trace.event }),
42949
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-purple-600 dark:text-purple-400 flex-shrink-0", children: t("debug.serverResponse") })
42957
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary flex-shrink-0", children: t("debug.serverResponse") })
42950
42958
  ] }),
42951
42959
  /* @__PURE__ */ jsxRuntime.jsx(ServerResponseRow, { sr: trace.serverResponse })
42952
42960
  ] });
@@ -42955,7 +42963,7 @@ function TransitionRow({ trace }) {
42955
42963
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-2 text-xs font-mono", children: [
42956
42964
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn(
42957
42965
  "mt-1.5 w-1.5 h-1.5 rounded-full flex-shrink-0",
42958
- hasFailedEffects ? "bg-red-500" : "bg-green-500"
42966
+ hasFailedEffects ? "bg-error" : "bg-success"
42959
42967
  ) }),
42960
42968
  /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: "info", size: "sm", className: "flex-shrink-0", children: trace.event }),
42961
42969
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-foreground flex-shrink-0", children: trace.traitName }),
@@ -42969,7 +42977,7 @@ function TransitionRow({ trace }) {
42969
42977
  ] }),
42970
42978
  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(
42971
42979
  "px-1 rounded text-xs",
42972
- 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"
42980
+ eff.status === "executed" ? "bg-success/10 text-success" : eff.status === "failed" ? "bg-error/10 text-error" : "bg-warning/10 text-warning"
42973
42981
  ), children: [
42974
42982
  eff.status === "executed" ? "\u2713" : eff.status === "failed" ? "\u2717" : "-",
42975
42983
  " ",
@@ -43003,7 +43011,7 @@ function VerifyModePanel({
43003
43011
  {
43004
43012
  className: cn(
43005
43013
  "runtime-debugger runtime-debugger--verify",
43006
- "flex flex-col bg-[var(--color-card)] text-[var(--color-foreground)] border-t-2 border-cyan-500",
43014
+ "flex flex-col bg-[var(--color-card)] text-[var(--color-foreground)] border-t-2 border-accent",
43007
43015
  hudBottom ? "" : "fixed bottom-0 left-0 right-0",
43008
43016
  className
43009
43017
  ),
@@ -43024,8 +43032,8 @@ function VerifyModePanel({
43024
43032
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-foreground/50 w-3", "aria-hidden": true, children: expanded ? "\u25BE" : "\u25B8" }),
43025
43033
  /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: failedChecks > 0 ? "danger" : "success", size: "sm", children: failedChecks > 0 ? t("debug.failCount", { count: failedChecks }) : t("debug.ok") }),
43026
43034
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-foreground/70", children: t("debug.localCount", { count: localCount }) }),
43027
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-purple-600 dark:text-purple-400", children: t("debug.serverCount", { count: serverCount }) }),
43028
- traitStates && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-cyan-600 dark:text-cyan-400 truncate max-w-[400px]", children: traitStates }),
43035
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary", children: t("debug.serverCount", { count: serverCount }) }),
43036
+ traitStates && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-accent truncate max-w-[400px]", children: traitStates }),
43029
43037
  !expanded && transitions.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-auto text-foreground/50", children: t("debug.transitionsCount", { count: transitions.length }) })
43030
43038
  ]
43031
43039
  }
@@ -43220,7 +43228,7 @@ function RuntimeDebugger({
43220
43228
  title: t("debug.openDebugger"),
43221
43229
  children: failedChecks > 0 ? /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "relative", children: [
43222
43230
  /* @__PURE__ */ jsxRuntime.jsx("span", { children: "V" }),
43223
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "absolute -top-1 -right-2 w-2 h-2 bg-red-500 rounded-full" })
43231
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "absolute -top-1 -right-2 w-2 h-2 bg-error rounded-full" })
43224
43232
  ] }) : /* @__PURE__ */ jsxRuntime.jsx("span", { children: "V" })
43225
43233
  }
43226
43234
  ) : /* @__PURE__ */ jsxRuntime.jsxs(Card, { className: "runtime-debugger__panel", children: [
@@ -43308,7 +43316,7 @@ var init_SegmentRenderer = __esm({
43308
43316
  "div",
43309
43317
  {
43310
43318
  className: cn(
43311
- "border border-gray-200 dark:border-gray-700 rounded-lg p-2 md:p-4 overflow-x-auto space-y-6",
43319
+ "border border-border rounded-lg p-2 md:p-4 overflow-x-auto space-y-6",
43312
43320
  containerClassName,
43313
43321
  className
43314
43322
  ),
@@ -48860,8 +48868,8 @@ var SystemNode = ({ data }) => {
48860
48868
  className: "rounded-lg border border-[var(--color-border)] bg-[var(--color-card)] px-3 py-2 shadow-sm",
48861
48869
  style: { minWidth: 160, maxWidth: 220 },
48862
48870
  children: [
48863
- /* @__PURE__ */ jsxRuntime.jsx(react.Handle, { type: "target", position: react.Position.Left, className: "!w-2 !h-2 !bg-orange-400" }),
48864
- /* @__PURE__ */ jsxRuntime.jsx(react.Handle, { type: "source", position: react.Position.Right, className: "!w-2 !h-2 !bg-orange-400" }),
48871
+ /* @__PURE__ */ jsxRuntime.jsx(react.Handle, { type: "target", position: react.Position.Left, className: "!w-2 !h-2 !bg-warning" }),
48872
+ /* @__PURE__ */ jsxRuntime.jsx(react.Handle, { type: "source", position: react.Position.Right, className: "!w-2 !h-2 !bg-warning" }),
48865
48873
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1.5 mb-1", children: [
48866
48874
  /* @__PURE__ */ jsxRuntime.jsx("svg", { width: 14, height: 14, viewBox: "0 0 20 20", children: /* @__PURE__ */ jsxRuntime.jsx(exports.AvlEntity, { x: 10, y: 10, r: 8, persistence }) }),
48867
48875
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs font-semibold text-[var(--color-foreground)] truncate flex-1", children: orbitalName })
@@ -49013,9 +49021,9 @@ var AvlTransitionEdge = ({
49013
49021
  className: "absolute pointer-events-all nodrag nopan flex items-center gap-1",
49014
49022
  style: { transform: `translate(-50%, -50%) translate(${labelX}px, ${labelY}px)` },
49015
49023
  children: [
49016
- data?.hasGuard && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-3 h-3 rotate-45 border border-amber-500 bg-amber-500/10 shrink-0", title: t("avl.guard") }),
49024
+ data?.hasGuard && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-3 h-3 rotate-45 border border-warning bg-warning/10 shrink-0", title: t("avl.guard") }),
49017
49025
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-2 py-0.5 text-xs font-medium rounded-full bg-[var(--color-card)] border border-[var(--color-border)] text-[var(--color-foreground)] truncate max-w-[160px]", children: data?.event ?? "" }),
49018
- data?.hasEffects && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-2.5 h-2.5 rounded-full bg-violet-500/80 shrink-0", title: t("avl.effects") })
49026
+ data?.hasEffects && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-2.5 h-2.5 rounded-full bg-primary shrink-0", title: t("avl.effects") })
49019
49027
  ]
49020
49028
  }
49021
49029
  ) })
@@ -49838,7 +49846,9 @@ function useResolvedSchema(schema, pageName) {
49838
49846
  trait.listens = callSiteListens.map((l) => ({
49839
49847
  event: l.event,
49840
49848
  triggers: l.triggers,
49841
- source: l.source
49849
+ source: l.source,
49850
+ guard: l.guard,
49851
+ payloadMapping: l.payloadMapping
49842
49852
  }));
49843
49853
  resolvedSchemaLog.info("listens:restored", {
49844
49854
  trait: traitName,
@@ -51227,7 +51237,11 @@ function useTraitStateMachine(traitBindings, uiSlots, options) {
51227
51237
  crossTraitLog.debug("listen:subscribed", { busKey, targetTrait: binding.trait.name, sourceOrbital, sourceTrait, listenEvent: listen.event, triggers: listen.triggers });
51228
51238
  const unsub = eventBus.on(busKey, (event) => {
51229
51239
  crossTraitLog.debug("listen:fired", { busKey, targetTrait: binding.trait.name, triggers: listen.triggers });
51230
- enqueueAndDrain(listen.triggers, event.payload, binding.trait.name);
51240
+ enqueueAndDrain(
51241
+ listen.triggers,
51242
+ core.applyListenPayloadMapping(listen.payloadMapping, event.payload),
51243
+ binding.trait.name
51244
+ );
51231
51245
  });
51232
51246
  unsubscribes.push(() => {
51233
51247
  crossTraitLog.debug("listen:unsubscribe", { busKey, targetTrait: binding.trait.name, triggers: listen.triggers });
@@ -51257,7 +51271,7 @@ function useTraitStateMachine(traitBindings, uiSlots, options) {
51257
51271
  }
51258
51272
  for (const event of eventsToFire) {
51259
51273
  stateLog.debug("mount:fire-lifecycle", { event, traitCount: traitBindings.length });
51260
- enqueueAndDrain(event, {});
51274
+ enqueueAndDrain(event, { ...optionsRef.current?.initPayload ?? {} });
51261
51275
  }
51262
51276
  return () => {
51263
51277
  initedTraitsRef.current = /* @__PURE__ */ new Set();
@@ -51356,7 +51370,7 @@ function collectServerActiveTraits(ir, allTraits, mountedTraitNames) {
51356
51370
  }
51357
51371
  return active;
51358
51372
  }
51359
- function TraitInitializer({ traits: traits2, orbitalNames, onNavigate, onLocalFallback, persistence, traitConfigsByName, orbitalsByTrait, embeddedTraits, serverActiveTraits }) {
51373
+ function TraitInitializer({ traits: traits2, routeParams, orbitalNames, onNavigate, onLocalFallback, persistence, traitConfigsByName, orbitalsByTrait, embeddedTraits, serverActiveTraits }) {
51360
51374
  const bridge = providers.useServerBridge();
51361
51375
  const activeTraitNames = React91.useMemo(
51362
51376
  () => new Set(traits2.map((b) => b.trait.name).filter((n) => !!n)),
@@ -51385,43 +51399,48 @@ function TraitInitializer({ traits: traits2, orbitalNames, onNavigate, onLocalFa
51385
51399
  applyServerEffects(effects, uiSlots, onNavigate, embeddedTraits, activeTraitNames);
51386
51400
  }
51387
51401
  }, [bridge.connected, bridge.sendEvent, orbitalNames, uiSlots, onNavigate, embeddedTraits, activeTraitNames, withActiveTraits]);
51388
- const opts = orbitalNames ? { onEventProcessed, navigate: onNavigate, traitConfigsByName, orbitalsByTrait, embeddedTraits } : { navigate: onNavigate, persistence, traitConfigsByName, orbitalsByTrait, embeddedTraits };
51402
+ const opts = orbitalNames ? { onEventProcessed, navigate: onNavigate, traitConfigsByName, orbitalsByTrait, embeddedTraits, initPayload: routeParams } : { navigate: onNavigate, persistence, traitConfigsByName, orbitalsByTrait, embeddedTraits, initPayload: routeParams };
51389
51403
  const { sendEvent } = useTraitStateMachine(traits2, uiSlots, opts);
51390
51404
  const initSentRef = React91.useRef(false);
51391
51405
  const prevTraitsRef = React91.useRef(void 0);
51406
+ const paramsKey = JSON.stringify(routeParams ?? {});
51407
+ const prevParamsKeyRef = React91.useRef(void 0);
51392
51408
  React91.useEffect(() => {
51393
51409
  const refChanged = prevTraitsRef.current !== void 0 && prevTraitsRef.current !== traits2;
51410
+ const paramsChanged = prevParamsKeyRef.current !== void 0 && prevParamsKeyRef.current !== paramsKey;
51394
51411
  navLog.debug("page:traits-effect", () => ({
51395
51412
  refChanged,
51413
+ paramsChanged,
51396
51414
  traitsCount: Array.isArray(traits2) ? traits2.length : -1,
51397
51415
  hadPrev: prevTraitsRef.current !== void 0
51398
51416
  }));
51399
- if (refChanged) {
51400
- navLog.info("page:traits-reset", { traitsCount: Array.isArray(traits2) ? traits2.length : -1 });
51417
+ if (refChanged || paramsChanged) {
51418
+ navLog.info("page:traits-reset", { traitsCount: Array.isArray(traits2) ? traits2.length : -1, paramsChanged });
51401
51419
  uiSlots.clearAll();
51402
51420
  initSentRef.current = false;
51403
51421
  }
51404
51422
  prevTraitsRef.current = traits2;
51405
- }, [traits2, uiSlots]);
51423
+ prevParamsKeyRef.current = paramsKey;
51424
+ }, [traits2, uiSlots, paramsKey]);
51406
51425
  React91.useEffect(() => {
51407
51426
  if (!orbitalNames?.length) {
51408
- const t = setTimeout(() => sendEvent("INIT"), 50);
51427
+ const t = setTimeout(() => sendEvent("INIT", routeParams), 50);
51409
51428
  return () => clearTimeout(t);
51410
51429
  }
51411
51430
  const fallback = setTimeout(() => {
51412
51431
  if (!initSentRef.current) {
51413
- sendEvent("INIT");
51432
+ sendEvent("INIT", routeParams);
51414
51433
  onLocalFallback?.();
51415
51434
  }
51416
51435
  }, 5e3);
51417
51436
  return () => clearTimeout(fallback);
51418
- }, [traits2, orbitalNames, sendEvent, onLocalFallback]);
51437
+ }, [traits2, orbitalNames, sendEvent, onLocalFallback, routeParams]);
51419
51438
  React91.useEffect(() => {
51420
51439
  if (!bridge.connected || !orbitalNames?.length || initSentRef.current) return;
51421
51440
  initSentRef.current = true;
51422
51441
  (async () => {
51423
51442
  for (const name of orbitalNames) {
51424
- const { effects, meta } = await bridge.sendEvent(name, "INIT", withActiveTraits({}));
51443
+ const { effects, meta } = await bridge.sendEvent(name, "INIT", withActiveTraits({ ...routeParams ?? {} }));
51425
51444
  recordServerResponse(name, "INIT", meta);
51426
51445
  const effectTraces = [
51427
51446
  { type: "fetch", args: [], status: "executed" },
@@ -51442,10 +51461,10 @@ function TraitInitializer({ traits: traits2, orbitalNames, onNavigate, onLocalFa
51442
51461
  applyServerEffects(effects, uiSlots, onNavigate, embeddedTraits, activeTraitNames);
51443
51462
  }
51444
51463
  })();
51445
- }, [bridge.connected, orbitalNames, bridge.sendEvent, uiSlots, onNavigate, embeddedTraits, activeTraitNames, withActiveTraits]);
51464
+ }, [bridge.connected, orbitalNames, bridge.sendEvent, uiSlots, onNavigate, embeddedTraits, activeTraitNames, withActiveTraits, routeParams]);
51446
51465
  return null;
51447
51466
  }
51448
- function SchemaRunner({ schema, serverUrl, transport, mockData, pageName, onNavigate, onLocalFallback, persistence }) {
51467
+ function SchemaRunner({ schema, serverUrl, transport, mockData, pageName, routeParams, onNavigate, onLocalFallback, persistence }) {
51449
51468
  const { traits: traits2, allEntities, allTraits, ir } = useResolvedSchema(schema, pageName);
51450
51469
  const allPageTraits = React91.useMemo(() => {
51451
51470
  let base;
@@ -51587,6 +51606,7 @@ function SchemaRunner({ schema, serverUrl, transport, mockData, pageName, onNavi
51587
51606
  TraitInitializer,
51588
51607
  {
51589
51608
  traits: allPageTraits,
51609
+ routeParams,
51590
51610
  orbitalNames: serverUrl || transport ? pageOrbitalNames : void 0,
51591
51611
  traitConfigsByName,
51592
51612
  orbitalsByTrait,
@@ -51664,27 +51684,44 @@ function OrbPreview({
51664
51684
  return [];
51665
51685
  }
51666
51686
  }, [parsedSchema]);
51667
- const initialPageName = React91.useMemo(() => {
51687
+ const initialPageMatch = React91.useMemo(() => {
51668
51688
  if (!initialPagePath) return void 0;
51669
- const match = pages.find(({ page }) => page.path === initialPagePath);
51670
- return match?.page.name;
51689
+ for (const { page } of pages) {
51690
+ const params = page.path ? providers.matchPath(page.path, initialPagePath) : null;
51691
+ if (params !== null) return { name: page.name, params };
51692
+ }
51693
+ return void 0;
51671
51694
  }, [pages, initialPagePath]);
51695
+ const initialPageName = initialPageMatch?.name;
51672
51696
  const [currentPage, setCurrentPage] = React91.useState(initialPageName);
51697
+ const [routeParams, setRouteParams] = React91.useState(initialPageMatch?.params ?? {});
51673
51698
  const prevInitialPagePathRef = React91.useRef(initialPagePath);
51674
51699
  React91.useEffect(() => {
51675
51700
  if (prevInitialPagePathRef.current !== initialPagePath) {
51676
51701
  prevInitialPagePathRef.current = initialPagePath;
51677
51702
  setCurrentPage(initialPageName);
51703
+ setRouteParams(initialPageMatch?.params ?? {});
51678
51704
  }
51679
- }, [initialPagePath, initialPageName]);
51705
+ }, [initialPagePath, initialPageName, initialPageMatch]);
51680
51706
  const handleNavigate = React91.useCallback((path) => {
51681
- const match = pages.find(({ page }) => page.path === path);
51707
+ let match;
51708
+ let params = {};
51709
+ for (const entry of pages) {
51710
+ const m = entry.page.path ? providers.matchPath(entry.page.path, path) : null;
51711
+ if (m !== null) {
51712
+ match = entry;
51713
+ params = m;
51714
+ break;
51715
+ }
51716
+ }
51682
51717
  navLog.debug("handleNavigate", () => ({
51683
51718
  path,
51684
51719
  matched: match?.page.name ?? null,
51720
+ params,
51685
51721
  availablePaths: pages.map((p) => p.page.path)
51686
51722
  }));
51687
- if (match) {
51723
+ if (match?.page.name) {
51724
+ setRouteParams(params);
51688
51725
  setCurrentPage(match.page.name);
51689
51726
  if (typeof window !== "undefined") {
51690
51727
  const url = new URL(window.location.href);
@@ -51754,6 +51791,7 @@ function OrbPreview({
51754
51791
  transport,
51755
51792
  mockData: effectiveMockData,
51756
51793
  pageName: currentPage,
51794
+ routeParams,
51757
51795
  onNavigate: handleNavigate,
51758
51796
  onLocalFallback: handleLocalFallback,
51759
51797
  persistence
@@ -53502,9 +53540,9 @@ function OrbInspector({ node, schema, editable = false, userType = "builder", th
53502
53540
  /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-muted-foreground text-xs uppercase tracking-wider mb-2", children: t("avl.transition") }),
53503
53541
  /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: "100%", height: 44, viewBox: "0 0 280 44", children: [
53504
53542
  /* @__PURE__ */ jsxRuntime.jsx(exports.AvlState, { x: 8, y: 8, name: fromState, role: getStateRole(fromState), width: 90, height: 26 }),
53505
- /* @__PURE__ */ jsxRuntime.jsx("line", { x1: 104, y1: 21, x2: 158, y2: 21, stroke: "#1E293B", strokeWidth: 2, markerEnd: "url(#orb-arrow)" }),
53543
+ /* @__PURE__ */ jsxRuntime.jsx("line", { x1: 104, y1: 21, x2: 158, y2: 21, stroke: "var(--color-foreground)", strokeWidth: 2, markerEnd: "url(#orb-arrow)" }),
53506
53544
  /* @__PURE__ */ jsxRuntime.jsx(exports.AvlState, { x: 164, y: 8, name: toState, role: getStateRole(toState), width: 90, height: 26 }),
53507
- /* @__PURE__ */ jsxRuntime.jsx("defs", { children: /* @__PURE__ */ jsxRuntime.jsx("marker", { id: "orb-arrow", markerWidth: 8, markerHeight: 6, refX: 8, refY: 3, orient: "auto", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M0,0 L8,3 L0,6 Z", fill: "#1E293B" }) }) })
53545
+ /* @__PURE__ */ jsxRuntime.jsx("defs", { children: /* @__PURE__ */ jsxRuntime.jsx("marker", { id: "orb-arrow", markerWidth: 8, markerHeight: 6, refX: 8, refY: 3, orient: "auto", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M0,0 L8,3 L0,6 Z", fill: "var(--color-foreground)" }) }) })
53508
53546
  ] }),
53509
53547
  traitName && /* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "small", className: "text-muted-foreground text-xs", children: [
53510
53548
  traitName,
@@ -53615,7 +53653,7 @@ function OrbPatternTree({ config, depth }) {
53615
53653
  return /* @__PURE__ */ jsxRuntime.jsxs(Box, { style: { paddingLeft: depth * 12 }, children: [
53616
53654
  /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-primary font-semibold text-xs", children: type }),
53617
53655
  propEntries.slice(0, 5).map(([key, val]) => {
53618
- const display = typeof val === "string" ? val.startsWith("@") ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-purple-500", children: val }) : `"${val}"` : Array.isArray(val) && val.length > 0 && typeof val[0] === "string" && val[0].includes("/") ? /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-amber-600", children: [
53656
+ const display = typeof val === "string" ? val.startsWith("@") ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary", children: val }) : `"${val}"` : Array.isArray(val) && val.length > 0 && typeof val[0] === "string" && val[0].includes("/") ? /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-warning", children: [
53619
53657
  "(",
53620
53658
  val.map(String).join(" "),
53621
53659
  ")"