@almadar/ui 5.122.14 → 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 (63) 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 +354 -234
  6. package/dist/avl/index.js +356 -236
  7. package/dist/components/index.cjs +273 -198
  8. package/dist/components/index.d.cts +18 -12
  9. package/dist/components/index.d.ts +18 -12
  10. package/dist/components/index.js +273 -198
  11. package/dist/context/index.cjs +34 -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 +34 -66
  15. package/dist/hooks/index.cjs +8 -0
  16. package/dist/hooks/index.js +8 -0
  17. package/dist/lib/drawable/three/index.cjs +6 -0
  18. package/dist/lib/drawable/three/index.js +6 -0
  19. package/dist/marketing/index.cjs +7 -0
  20. package/dist/marketing/index.js +7 -0
  21. package/dist/providers/index.cjs +343 -217
  22. package/dist/providers/index.d.cts +6 -6
  23. package/dist/providers/index.d.ts +6 -6
  24. package/dist/providers/index.js +343 -217
  25. package/dist/runtime/index.cjs +347 -227
  26. package/dist/runtime/index.d.cts +4 -2
  27. package/dist/runtime/index.d.ts +4 -2
  28. package/dist/runtime/index.js +349 -229
  29. package/package.json +8 -7
  30. package/themes/_contract.md +2 -0
  31. package/themes/almadar-website.css +3 -3
  32. package/themes/almadar.css +4 -4
  33. package/themes/bloomberg-dense.css +2 -2
  34. package/themes/clay.css +417 -0
  35. package/themes/corporate.css +411 -0
  36. package/themes/game-adventure.css +3 -3
  37. package/themes/game-rpg.css +2 -2
  38. package/themes/game-sci-fi.css +1 -1
  39. package/themes/game-ui-pack.css +2 -2
  40. package/themes/gazette.css +2 -2
  41. package/themes/glass.css +428 -0
  42. package/themes/index.css +9 -13
  43. package/themes/kiosk.css +5 -5
  44. package/themes/linear-clean.css +1 -1
  45. package/themes/minimalist.css +2 -2
  46. package/themes/neon.css +3 -3
  47. package/themes/notion-editorial.css +1 -1
  48. package/themes/prism.css +3 -3
  49. package/themes/retro.css +410 -0
  50. package/themes/terminal.css +1 -1
  51. package/themes/trait-wars.css +8 -8
  52. package/themes/wireframe.css +2 -2
  53. package/themes/arctic.css +0 -235
  54. package/themes/copper.css +0 -235
  55. package/themes/ember.css +0 -238
  56. package/themes/forest.css +0 -238
  57. package/themes/lavender.css +0 -233
  58. package/themes/midnight.css +0 -234
  59. package/themes/ocean.css +0 -238
  60. package/themes/rose.css +0 -233
  61. package/themes/sand.css +0 -234
  62. package/themes/slate.css +0 -233
  63. package/themes/sunset.css +0 -238
@@ -3225,6 +3225,11 @@ var init_Typography = __esm({
3225
3225
  inherit: "text-inherit"
3226
3226
  };
3227
3227
  weightStyles = {
3228
+ // Neutral: an atom default of "none" must not override the variant's baked
3229
+ // weight (C-PATTERN-ENUM-BLOCKS-NEUTRAL-OVERRIDE — `variant={h2}` rendered
3230
+ // tiny because the ui-typography atom's `weight: light`/`size: xs` defaults
3231
+ // clobbered every variant).
3232
+ none: "",
3228
3233
  light: "font-light",
3229
3234
  normal: "font-normal",
3230
3235
  medium: "font-medium",
@@ -3250,6 +3255,7 @@ var init_Typography = __esm({
3250
3255
  label: "span"
3251
3256
  };
3252
3257
  typographySizeStyles = {
3258
+ none: "",
3253
3259
  xs: "text-xs",
3254
3260
  sm: "text-sm",
3255
3261
  md: "text-base",
@@ -4353,10 +4359,10 @@ var init_ModuleCard = __esm({
4353
4359
  init_avl_atom_types();
4354
4360
  init_MiniStateMachine();
4355
4361
  PERSISTENCE_BORDER = {
4356
- persistent: "border-l-[3px] border-l-blue-500 border-solid",
4357
- runtime: "border-l-[3px] border-l-blue-500 border-dashed",
4358
- singleton: "border-l-[3px] border-l-blue-500 border-double",
4359
- 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"
4360
4366
  };
4361
4367
  PERSISTENCE_ICON = {
4362
4368
  persistent: "\u26C1",
@@ -4386,8 +4392,8 @@ var init_ModuleCard = __esm({
4386
4392
  className: "rounded-lg border border-[var(--color-border)] bg-[var(--color-card)] shadow-sm overflow-hidden",
4387
4393
  style: { minWidth: 280, maxWidth: 400 },
4388
4394
  children: [
4389
- /* @__PURE__ */ jsxRuntime.jsx(react.Handle, { type: "target", position: react.Position.Left, className: "!w-2.5 !h-2.5 !bg-orange-400" }),
4390
- /* @__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" }),
4391
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 }) }),
4392
4398
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `px-3 py-2 border-b border-[var(--color-border)] ${PERSISTENCE_BORDER[persistence] ?? ""}`, children: [
4393
4399
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1.5 mb-1.5", children: [
@@ -5111,6 +5117,7 @@ var init_Button = __esm({
5111
5117
  "button",
5112
5118
  {
5113
5119
  ref,
5120
+ type: "button",
5114
5121
  disabled: disabled || isLoading,
5115
5122
  className: cn(
5116
5123
  "relative inline-flex items-center justify-center gap-2",
@@ -8435,15 +8442,15 @@ var init_TextHighlight = __esm({
8435
8442
  const typeStyles = {
8436
8443
  question: cn(
8437
8444
  // Blue border for questions
8438
- "bg-card border-b-2 border-primary-600",
8445
+ "bg-card border-b-2 border-primary",
8439
8446
  "hover:bg-muted",
8440
- isActive && "bg-primary-100 ring-2 ring-primary-600"
8447
+ isActive && "bg-primary/10 ring-2 ring-primary"
8441
8448
  ),
8442
8449
  note: cn(
8443
8450
  // Yellow border for notes
8444
- "bg-card border-b-2 border-amber-500",
8451
+ "bg-card border-b-2 border-warning",
8445
8452
  "hover:bg-muted",
8446
- isActive && "bg-amber-100 ring-2 ring-amber-500"
8453
+ isActive && "bg-warning/10 ring-2 ring-warning"
8447
8454
  )
8448
8455
  };
8449
8456
  return /* @__PURE__ */ jsxRuntime.jsx(
@@ -8789,7 +8796,7 @@ function DayCell({
8789
8796
  {
8790
8797
  className: cn(
8791
8798
  "p-2 text-center cursor-pointer hover:bg-muted transition-colors",
8792
- isToday && "bg-blue-500/10",
8799
+ isToday && "bg-primary/10",
8793
8800
  className
8794
8801
  ),
8795
8802
  onClick: handleClick,
@@ -8800,7 +8807,7 @@ function DayCell({
8800
8807
  variant: "small",
8801
8808
  className: cn(
8802
8809
  "font-medium",
8803
- isToday ? "text-blue-600" : "text-muted-foreground"
8810
+ isToday ? "text-primary" : "text-muted-foreground"
8804
8811
  ),
8805
8812
  children: dayAbbr
8806
8813
  }
@@ -8812,7 +8819,7 @@ function DayCell({
8812
8819
  rounded: "full",
8813
8820
  className: cn(
8814
8821
  "h-8 w-8 mx-auto items-center justify-center",
8815
- isToday && "bg-blue-600 text-white"
8822
+ isToday && "bg-primary text-primary-foreground"
8816
8823
  ),
8817
8824
  children: /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body", className: "font-semibold", children: safeDate.getDate() })
8818
8825
  }
@@ -15666,19 +15673,19 @@ var init_ActivationBlock = __esm({
15666
15673
  "div",
15667
15674
  {
15668
15675
  className: cn(
15669
- "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",
15670
15677
  className
15671
15678
  ),
15672
15679
  children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-3", children: [
15673
- /* @__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 }),
15674
15681
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1", children: [
15675
- /* @__PURE__ */ jsxRuntime.jsx("h4", { className: "font-semibold text-indigo-900 dark:text-indigo-100 mb-2", children: "Before You Begin..." }),
15676
- /* @__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 }),
15677
15684
  isExpanded ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
15678
15685
  /* @__PURE__ */ jsxRuntime.jsx(
15679
15686
  "textarea",
15680
15687
  {
15681
- 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",
15682
15689
  placeholder: "Jot down your thoughts...",
15683
15690
  value: response,
15684
15691
  onChange: (e) => setResponse(e.target.value),
@@ -15690,7 +15697,7 @@ var init_ActivationBlock = __esm({
15690
15697
  "button",
15691
15698
  {
15692
15699
  onClick: handleSubmit,
15693
- 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",
15694
15701
  children: "Continue to Lesson \u2192"
15695
15702
  }
15696
15703
  ),
@@ -15701,7 +15708,7 @@ var init_ActivationBlock = __esm({
15701
15708
  emit(`UI:${saveEvent}`, { response: "" });
15702
15709
  setIsExpanded(false);
15703
15710
  },
15704
- 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",
15705
15712
  children: "Skip for now"
15706
15713
  }
15707
15714
  )
@@ -15710,7 +15717,7 @@ var init_ActivationBlock = __esm({
15710
15717
  "button",
15711
15718
  {
15712
15719
  onClick: () => setIsExpanded(true),
15713
- className: "text-sm text-indigo-600 dark:text-indigo-400 hover:underline font-medium",
15720
+ className: "text-sm text-primary hover:underline font-medium",
15714
15721
  children: "\u2713 Answered \xB7 Edit response"
15715
15722
  }
15716
15723
  )
@@ -16214,7 +16221,7 @@ var init_AuthLayout = __esm({
16214
16221
  VStack,
16215
16222
  {
16216
16223
  className: cn(
16217
- "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",
16218
16225
  "justify-between p-12"
16219
16226
  ),
16220
16227
  style: backgroundImage ? {
@@ -16223,7 +16230,7 @@ var init_AuthLayout = __esm({
16223
16230
  } : void 0,
16224
16231
  gap: "none",
16225
16232
  children: [
16226
- /* @__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" }),
16227
16234
  /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "relative z-10", children: /* @__PURE__ */ jsxRuntime.jsxs(reactRouterDom.Link, { to: "/", className: "flex items-center gap-3", children: [
16228
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(
16229
16236
  Typography,
@@ -16308,7 +16315,7 @@ var init_AuthLayout = __esm({
16308
16315
  ),
16309
16316
  children: /* @__PURE__ */ jsxRuntime.jsxs(Box, { className: "w-full max-w-md", children: [
16310
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: [
16311
- 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(
16312
16319
  Typography,
16313
16320
  {
16314
16321
  variant: "body1",
@@ -17472,7 +17479,7 @@ var init_CodeBlock = __esm({
17472
17479
  {
17473
17480
  justify: "between",
17474
17481
  align: "center",
17475
- 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",
17476
17483
  children: [
17477
17484
  showLanguageBadge && /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: "default", size: "sm", children: language }),
17478
17485
  effectiveCopy && /* @__PURE__ */ jsxRuntime.jsx(
@@ -17481,9 +17488,9 @@ var init_CodeBlock = __esm({
17481
17488
  variant: "ghost",
17482
17489
  size: "sm",
17483
17490
  onClick: handleCopy,
17484
- 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",
17485
17492
  "aria-label": t("common.copy"),
17486
- 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" })
17487
17494
  }
17488
17495
  )
17489
17496
  ]
@@ -17851,12 +17858,12 @@ var init_BloomQuizBlock = __esm({
17851
17858
  init_useEventBus();
17852
17859
  init_cn();
17853
17860
  BLOOM_CONFIG = {
17854
- remember: { color: "bg-gray-500", bgColor: "bg-gray-50 dark:bg-gray-900/30", label: "Remember" },
17855
- understand: { color: "bg-blue-500", bgColor: "bg-blue-50 dark:bg-blue-900/30", label: "Understand" },
17856
- apply: { color: "bg-green-500", bgColor: "bg-green-50 dark:bg-green-900/30", label: "Apply" },
17857
- analyze: { color: "bg-yellow-500", bgColor: "bg-yellow-50 dark:bg-yellow-900/30", label: "Analyze" },
17858
- evaluate: { color: "bg-orange-500", bgColor: "bg-orange-50 dark:bg-orange-900/30", label: "Evaluate" },
17859
- 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" }
17860
17867
  };
17861
17868
  BloomQuizBlock = ({
17862
17869
  level,
@@ -17882,22 +17889,22 @@ var init_BloomQuizBlock = __esm({
17882
17889
  "div",
17883
17890
  {
17884
17891
  className: cn(
17885
- "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",
17886
17893
  config.bgColor,
17887
17894
  className
17888
17895
  ),
17889
17896
  children: [
17890
17897
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between mb-3", children: [
17891
17898
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 flex-wrap", children: [
17892
- 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: [
17893
17900
  "Question ",
17894
17901
  index + 1
17895
17902
  ] }),
17896
- /* @__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 })
17897
17904
  ] }),
17898
- 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 })
17899
17906
  ] }),
17900
- /* @__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(
17901
17908
  (segment, idx) => segment.type === "markdown" ? /* @__PURE__ */ jsxRuntime.jsx(MarkdownContent, { content: segment.content }, `q-md-${idx}`) : /* @__PURE__ */ jsxRuntime.jsx(
17902
17909
  CodeBlock,
17903
17910
  {
@@ -17911,13 +17918,13 @@ var init_BloomQuizBlock = __esm({
17911
17918
  "button",
17912
17919
  {
17913
17920
  type: "button",
17914
- 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",
17915
17922
  onClick: handleReveal,
17916
17923
  children: revealed ? "Hide Answer" : "Reveal Answer"
17917
17924
  }
17918
17925
  ),
17919
- 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: [
17920
- /* @__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:" }),
17921
17928
  answerSegments.map(
17922
17929
  (segment, idx) => segment.type === "markdown" ? /* @__PURE__ */ jsxRuntime.jsx(MarkdownContent, { content: segment.content }, `a-md-${idx}`) : /* @__PURE__ */ jsxRuntime.jsx(
17923
17930
  CodeBlock,
@@ -18191,12 +18198,12 @@ var init_QuizBlock = __esm({
18191
18198
  }) => {
18192
18199
  const { t } = hooks.useTranslate();
18193
18200
  const [revealed, setRevealed] = React91.useState(false);
18194
- 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: [
18195
18202
  /* @__PURE__ */ jsxRuntime.jsxs(HStack, { gap: "sm", align: "start", children: [
18196
- /* @__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" }),
18197
18204
  /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body", className: "font-medium", children: question })
18198
18205
  ] }),
18199
- 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,
18200
18207
  /* @__PURE__ */ jsxRuntime.jsx(
18201
18208
  Button,
18202
18209
  {
@@ -20108,7 +20115,7 @@ var init_BookTableOfContents = __esm({
20108
20115
  className: cn(
20109
20116
  "justify-start text-left w-full",
20110
20117
  direction === "rtl" && "text-right",
20111
- isCurrent && "bg-blue-50 dark:bg-blue-950 text-blue-600 dark:text-blue-400"
20118
+ isCurrent && "bg-primary/10 text-primary"
20112
20119
  ),
20113
20120
  children: /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "truncate", children: /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body", children: String(chapter.title ?? "") }) })
20114
20121
  },
@@ -21356,7 +21363,7 @@ function CalendarGrid({
21356
21363
  border: true,
21357
21364
  className: cn(
21358
21365
  "cursor-pointer hover:shadow-sm transition-shadow text-xs truncate",
21359
- color ? color : "bg-blue-500/15 border-blue-500/30 text-blue-600"
21366
+ color ? color : "bg-primary/10 border-primary/30 text-primary"
21360
21367
  ),
21361
21368
  onClick: (e) => handleEventClick(event, e),
21362
21369
  children: /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "truncate font-medium", children: event.title })
@@ -21454,7 +21461,7 @@ function CalendarGrid({
21454
21461
  onClick: () => handleSlotClick(day, time),
21455
21462
  className: cn(
21456
21463
  "border-l border-border",
21457
- isToday && "bg-blue-50/30"
21464
+ isToday && "bg-primary/10"
21458
21465
  ),
21459
21466
  ...longPressEvent ? {
21460
21467
  onPointerDown: () => startLongPress(day, time),
@@ -23470,31 +23477,31 @@ var init_CodeRunnerPanel = __esm({
23470
23477
  }
23471
23478
  )
23472
23479
  ] }),
23473
- 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: [
23474
23481
  /* @__PURE__ */ jsxRuntime.jsxs(
23475
23482
  HStack,
23476
23483
  {
23477
23484
  gap: "sm",
23478
23485
  align: "center",
23479
- 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",
23480
23487
  children: [
23481
- /* @__PURE__ */ jsxRuntime.jsx(LucideIcons2.Terminal, { size: 16, className: "text-gray-400" }),
23482
- /* @__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" })
23483
23490
  ]
23484
23491
  }
23485
23492
  ),
23486
- /* @__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: [
23487
- output?.stdout ? /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-gray-200 whitespace-pre-wrap", children: output.stdout }) : null,
23488
- output?.stderr ? /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-red-400 whitespace-pre-wrap", children: output.stderr }) : null,
23489
- !output?.stdout && !output?.stderr ? /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-gray-500 italic", children: "No output" }) : null,
23490
- 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: [
23491
- 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" }),
23492
23499
  /* @__PURE__ */ jsxRuntime.jsxs(VStack, { gap: "xs", className: "flex-1", children: [
23493
23500
  /* @__PURE__ */ jsxRuntime.jsxs(
23494
23501
  Typography,
23495
23502
  {
23496
23503
  variant: "small",
23497
- className: test.passed ? "text-green-400" : "text-red-400",
23504
+ className: test.passed ? "text-success" : "text-error",
23498
23505
  children: [
23499
23506
  "Test ",
23500
23507
  index + 1,
@@ -23503,15 +23510,15 @@ var init_CodeRunnerPanel = __esm({
23503
23510
  ]
23504
23511
  }
23505
23512
  ),
23506
- /* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "small", className: "text-gray-400", children: [
23513
+ /* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "small", className: "text-background", children: [
23507
23514
  "Input: ",
23508
23515
  test.input
23509
23516
  ] }),
23510
- /* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "small", className: "text-gray-400", children: [
23517
+ /* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "small", className: "text-background", children: [
23511
23518
  "Expected: ",
23512
23519
  test.expectedOutput
23513
23520
  ] }),
23514
- /* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "small", className: "text-gray-400", children: [
23521
+ /* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "small", className: "text-background", children: [
23515
23522
  "Actual: ",
23516
23523
  test.actualOutput
23517
23524
  ] })
@@ -23696,14 +23703,14 @@ var init_ConnectionBlock = __esm({
23696
23703
  "div",
23697
23704
  {
23698
23705
  className: cn(
23699
- "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",
23700
23707
  className
23701
23708
  ),
23702
23709
  children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-3", children: [
23703
- /* @__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 }),
23704
23711
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1", children: [
23705
- /* @__PURE__ */ jsxRuntime.jsx("h4", { className: "font-semibold text-emerald-900 dark:text-emerald-100 mb-2", children: "Building On What You Know" }),
23706
- /* @__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 }) })
23707
23714
  ] })
23708
23715
  ] })
23709
23716
  }
@@ -23790,7 +23797,7 @@ function CounterStandard({
23790
23797
  variant: "h1",
23791
23798
  className: cn(
23792
23799
  sizeStyles8[size].display,
23793
- "font-bold tabular-nums text-primary-600"
23800
+ "font-bold tabular-nums text-primary"
23794
23801
  ),
23795
23802
  children: resolved.count
23796
23803
  }
@@ -23863,7 +23870,7 @@ function CounterFull({
23863
23870
  variant: "h1",
23864
23871
  className: cn(
23865
23872
  sizeStyles8[size].display,
23866
- "font-bold tabular-nums text-primary-600"
23873
+ "font-bold tabular-nums text-primary"
23867
23874
  ),
23868
23875
  children: resolved.count
23869
23876
  }
@@ -24124,11 +24131,11 @@ var init_DashboardLayout = __esm({
24124
24131
  className: "h-16 px-4 border-b border-border dark:border-border",
24125
24132
  children: [
24126
24133
  /* @__PURE__ */ jsxRuntime.jsxs(reactRouterDom.Link, { to: "/", className: "flex items-center gap-2", children: [
24127
- 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(
24128
24135
  Typography,
24129
24136
  {
24130
24137
  variant: "small",
24131
- className: "text-white font-bold text-sm",
24138
+ className: "text-primary-foreground font-bold text-sm",
24132
24139
  as: "span",
24133
24140
  children: appName.charAt(0).toUpperCase()
24134
24141
  }
@@ -24207,11 +24214,11 @@ var init_DashboardLayout = __esm({
24207
24214
  className: "hidden @md/dashboard:flex items-center gap-1 overflow-x-auto",
24208
24215
  children: [
24209
24216
  /* @__PURE__ */ jsxRuntime.jsxs(reactRouterDom.Link, { to: "/", className: "flex items-center gap-2 mr-3 shrink-0", children: [
24210
- 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(
24211
24218
  Typography,
24212
24219
  {
24213
24220
  variant: "small",
24214
- className: "text-white font-bold text-xs",
24221
+ className: "text-primary-foreground font-bold text-xs",
24215
24222
  as: "span",
24216
24223
  children: appName.charAt(0).toUpperCase()
24217
24224
  }
@@ -24271,8 +24278,8 @@ var init_DashboardLayout = __esm({
24271
24278
  {
24272
24279
  as: "span",
24273
24280
  className: cn(
24274
- "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",
24275
- 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"
24276
24283
  ),
24277
24284
  children: action.badge
24278
24285
  }
@@ -24294,7 +24301,7 @@ var init_DashboardLayout = __esm({
24294
24301
  Box,
24295
24302
  {
24296
24303
  as: "span",
24297
- 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",
24298
24305
  children: unreadCount > 99 ? "99+" : unreadCount
24299
24306
  }
24300
24307
  )
@@ -24577,7 +24584,7 @@ function SubMenu({
24577
24584
  ),
24578
24585
  children: [
24579
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" })),
24580
- /* @__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 }),
24581
24588
  item.badge !== void 0 && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-auto text-xs font-medium", children: item.badge })
24582
24589
  ]
24583
24590
  },
@@ -24634,7 +24641,7 @@ function MenuItemRow({
24634
24641
  Typography,
24635
24642
  {
24636
24643
  variant: "small",
24637
- className: cn("flex-1", isDanger && "text-red-600"),
24644
+ className: cn("flex-1", isDanger && "text-error"),
24638
24645
  children: item.label
24639
24646
  }
24640
24647
  ),
@@ -25402,14 +25409,25 @@ function DataGrid({
25402
25409
  const bodyFields = fieldDefs.filter((f3) => f3 !== titleField && !badgeFields.includes(f3));
25403
25410
  const primaryActions = actionDefs.filter((a) => a.variant !== "danger");
25404
25411
  const dangerActions = actionDefs.filter((a) => a.variant === "danger");
25405
- const handleActionClick = (action, itemData) => (e) => {
25406
- e.stopPropagation();
25412
+ const fireAction = (action, itemData) => {
25413
+ if (action.navigatesTo) {
25414
+ const url = action.navigatesTo.replace(
25415
+ /\{\{row\.(\w+(?:\.\w+)*)\}\}/g,
25416
+ (_, field) => String(itemData[field] ?? "")
25417
+ );
25418
+ eventBus.emit("UI:NAVIGATE", { url, row: itemData });
25419
+ return;
25420
+ }
25407
25421
  const payload = {
25408
25422
  id: itemData.id,
25409
25423
  row: itemData
25410
25424
  };
25411
25425
  eventBus.emit(`UI:${action.event}`, payload);
25412
25426
  };
25427
+ const handleActionClick = (action, itemData) => (e) => {
25428
+ e.stopPropagation();
25429
+ fireAction(action, itemData);
25430
+ };
25413
25431
  const hasRenderProp = typeof children === "function";
25414
25432
  React91.useEffect(() => {
25415
25433
  if (data.length > 0 && !hasRenderProp && fieldDefs.length === 0) {
@@ -25476,13 +25494,46 @@ function DataGrid({
25476
25494
  const wrapDnd = (node) => dnd.isZone ? /* @__PURE__ */ jsxRuntime.jsx(dnd.SortableItem, { id: dndId, children: node }, dndId) : node;
25477
25495
  if (hasRenderProp) {
25478
25496
  return wrapDnd(
25479
- /* @__PURE__ */ jsxRuntime.jsx(
25497
+ /* @__PURE__ */ jsxRuntime.jsxs(
25480
25498
  Box,
25481
25499
  {
25482
25500
  "data-entity-row": true,
25483
25501
  "data-entity-id": id,
25484
25502
  className: cn(isSelected && "ring-2 ring-primary rounded-lg"),
25485
- children: children(itemData, index)
25503
+ children: [
25504
+ children(itemData, index),
25505
+ actionDefs.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "px-4 py-3 border-t border-border", children: /* @__PURE__ */ jsxRuntime.jsxs(HStack, { gap: "sm", className: "justify-end", children: [
25506
+ (maxInlineActions != null ? actionDefs.slice(0, maxInlineActions) : actionDefs).map((action, idx) => /* @__PURE__ */ jsxRuntime.jsxs(
25507
+ Button,
25508
+ {
25509
+ variant: action.variant === "primary" ? "primary" : "ghost",
25510
+ size: "sm",
25511
+ onClick: handleActionClick(action, itemData),
25512
+ "data-testid": `action-${action.event}`,
25513
+ "data-row-id": String(itemData.id),
25514
+ className: action.variant === "danger" ? "text-error hover:text-error hover:bg-error/10" : void 0,
25515
+ children: [
25516
+ action.icon && renderIconInput(action.icon, { size: "xs", className: "mr-1" }),
25517
+ action.label
25518
+ ]
25519
+ },
25520
+ idx
25521
+ )),
25522
+ maxInlineActions != null && actionDefs.length > maxInlineActions && /* @__PURE__ */ jsxRuntime.jsx(
25523
+ Menu,
25524
+ {
25525
+ position: "bottom-end",
25526
+ trigger: /* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "ghost", size: "sm", "aria-label": t("common.actions"), "data-testid": "action-overflow", children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: "more-horizontal", size: "xs" }) }),
25527
+ items: actionDefs.slice(maxInlineActions).map((action) => ({
25528
+ label: action.label,
25529
+ icon: action.icon,
25530
+ event: action.event,
25531
+ onClick: () => fireAction(action, itemData)
25532
+ }))
25533
+ }
25534
+ )
25535
+ ] }) })
25536
+ ]
25486
25537
  },
25487
25538
  id
25488
25539
  )
@@ -25619,10 +25670,7 @@ function DataGrid({
25619
25670
  label: action.label,
25620
25671
  icon: action.icon,
25621
25672
  event: action.event,
25622
- onClick: () => eventBus.emit(`UI:${action.event}`, {
25623
- id: itemData.id,
25624
- row: itemData
25625
- })
25673
+ onClick: () => fireAction(action, itemData)
25626
25674
  }))
25627
25675
  }
25628
25676
  )
@@ -26506,7 +26554,9 @@ var init_FilterGroup = __esm({
26506
26554
  showIcon = true,
26507
26555
  query,
26508
26556
  isLoading,
26509
- look = "toolbar"
26557
+ look = "toolbar",
26558
+ event,
26559
+ clearEvent
26510
26560
  }) => {
26511
26561
  const { t } = hooks.useTranslate();
26512
26562
  const eventBus = useEventBus();
@@ -26543,14 +26593,18 @@ var init_FilterGroup = __esm({
26543
26593
  queryState.setFilter(field, value === "all" ? null : value);
26544
26594
  }
26545
26595
  onFilterChange?.(field, value === "all" ? null : value);
26546
- eventBus.emit("UI:FILTER", {
26596
+ const payload = {
26547
26597
  entity,
26548
26598
  field,
26549
26599
  value: value === "all" || value === null ? "" : value,
26550
26600
  query
26551
- });
26601
+ };
26602
+ if (event && event !== "FILTER") {
26603
+ eventBus.emit(`UI:${event}`, payload);
26604
+ }
26605
+ eventBus.emit("UI:FILTER", payload);
26552
26606
  },
26553
- [onFilterChange, queryState, eventBus, entity, query]
26607
+ [onFilterChange, queryState, eventBus, entity, query, event]
26554
26608
  );
26555
26609
  const handleClearAll = React91.useCallback(() => {
26556
26610
  setSelectedValues({});
@@ -26558,8 +26612,11 @@ var init_FilterGroup = __esm({
26558
26612
  queryState.clearFilters();
26559
26613
  }
26560
26614
  onClearAll?.();
26615
+ if (clearEvent && clearEvent !== "CLEAR_FILTERS") {
26616
+ eventBus.emit(`UI:${clearEvent}`, { entity, query });
26617
+ }
26561
26618
  eventBus.emit("UI:CLEAR_FILTERS", { entity, query });
26562
- }, [onClearAll, queryState, eventBus, entity, query]);
26619
+ }, [onClearAll, queryState, eventBus, entity, query, clearEvent]);
26563
26620
  const activeFilterCount = Object.keys(selectedValues).length;
26564
26621
  if (variant === "pills") {
26565
26622
  return /* @__PURE__ */ jsxRuntime.jsxs(
@@ -27540,8 +27597,8 @@ var init_RelationSelect = __esm({
27540
27597
  disabled,
27541
27598
  className: cn(
27542
27599
  "w-full justify-between font-normal",
27543
- error && "border-red-300 focus:border-red-500 focus:ring-red-500",
27544
- 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"
27545
27602
  ),
27546
27603
  children: [
27547
27604
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -27621,7 +27678,7 @@ var init_RelationSelect = __esm({
27621
27678
  paddingY: "sm",
27622
27679
  className: cn(
27623
27680
  "text-left text-sm hover:bg-muted focus:outline-none focus:bg-muted",
27624
- option.value === value && "bg-primary-50 text-primary-700",
27681
+ option.value === value && "bg-primary/10 text-primary",
27625
27682
  option.disabled && "opacity-50 cursor-not-allowed"
27626
27683
  ),
27627
27684
  onClick: () => handleSelect(option),
@@ -27687,7 +27744,7 @@ var init_SearchInput = __esm({
27687
27744
  queryState.setSearch(newValue);
27688
27745
  }
27689
27746
  onSearch?.(newValue);
27690
- if (event) {
27747
+ if (event && event !== "SEARCH") {
27691
27748
  eventBus.emit(`UI:${event}`, { searchTerm: newValue, entity });
27692
27749
  }
27693
27750
  if (event || entity || query) {
@@ -27778,7 +27835,7 @@ var init_SidePanel = __esm({
27778
27835
  showOverlay && /* @__PURE__ */ jsxRuntime.jsx(Presence, { show: isOpen, animation: "overlay", children: /* @__PURE__ */ jsxRuntime.jsx(
27779
27836
  Box,
27780
27837
  {
27781
- 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",
27782
27839
  onClick: handleClose
27783
27840
  }
27784
27841
  ) }),
@@ -28145,7 +28202,7 @@ var init_WizardNavigation = __esm({
28145
28202
  /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: "chevron-left", size: "sm" }),
28146
28203
  resolvedBackLabel
28147
28204
  ] }) : /* @__PURE__ */ jsxRuntime.jsx(Box, {}),
28148
- /* @__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) }) }) }),
28149
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: [
28150
28207
  resolvedNextLabel,
28151
28208
  /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: "chevron-right", size: "sm" })
@@ -30302,6 +30359,7 @@ var init_Lightbox = __esm({
30302
30359
  {
30303
30360
  className: cn(
30304
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
30305
30363
  "bg-black bg-opacity-90",
30306
30364
  className
30307
30365
  ),
@@ -30324,7 +30382,7 @@ var init_Lightbox = __esm({
30324
30382
  "p-2 rounded-full",
30325
30383
  "text-[var(--color-foreground)] bg-[var(--color-card)]",
30326
30384
  "hover:bg-opacity-70 transition-opacity",
30327
- "focus:outline-none focus:ring-2 focus:ring-white"
30385
+ "focus:outline-none focus:ring-2 focus:ring-ring"
30328
30386
  ),
30329
30387
  "aria-label": t("aria.closeModal"),
30330
30388
  children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: "x", className: "w-6 h-6" })
@@ -30343,7 +30401,7 @@ var init_Lightbox = __esm({
30343
30401
  "p-2 rounded-full",
30344
30402
  "text-[var(--color-foreground)] bg-[var(--color-card)]",
30345
30403
  "hover:bg-opacity-70 transition-opacity",
30346
- "focus:outline-none focus:ring-2 focus:ring-white"
30404
+ "focus:outline-none focus:ring-2 focus:ring-ring"
30347
30405
  ),
30348
30406
  "aria-label": t("aria.previousImage"),
30349
30407
  children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: "chevron-left", className: "w-8 h-8" })
@@ -30380,7 +30438,7 @@ var init_Lightbox = __esm({
30380
30438
  "p-2 rounded-full",
30381
30439
  "text-[var(--color-foreground)] bg-[var(--color-card)]",
30382
30440
  "hover:bg-opacity-70 transition-opacity",
30383
- "focus:outline-none focus:ring-2 focus:ring-white"
30441
+ "focus:outline-none focus:ring-2 focus:ring-ring"
30384
30442
  ),
30385
30443
  "aria-label": t("aria.nextImage"),
30386
30444
  children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: "chevron-right", className: "w-8 h-8" })
@@ -33453,6 +33511,7 @@ var init_QrScanner = __esm({
33453
33511
  overflow: "hidden",
33454
33512
  rounded: "sm",
33455
33513
  className: cn(
33514
+ // eslint-disable-next-line almadar/no-hardcoded-colors -- media overlay: always over a dark scrim
33456
33515
  "bg-black",
33457
33516
  "aspect-square w-full max-w-md",
33458
33517
  className
@@ -33517,7 +33576,9 @@ var init_QrScanner = __esm({
33517
33576
  type: "button",
33518
33577
  onClick: togglePause,
33519
33578
  className: cn(
33579
+ // eslint-disable-next-line almadar/no-hardcoded-colors -- media overlay: always over a dark scrim
33520
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
33521
33582
  "hover:bg-opacity-80 focus:outline-none focus:ring-2 focus:ring-white"
33522
33583
  ),
33523
33584
  "aria-label": isPaused ? t("qrScanner.resumeScanning") : t("qrScanner.pauseScanning"),
@@ -33530,7 +33591,9 @@ var init_QrScanner = __esm({
33530
33591
  type: "button",
33531
33592
  onClick: toggleFacing,
33532
33593
  className: cn(
33594
+ // eslint-disable-next-line almadar/no-hardcoded-colors -- media overlay: always over a dark scrim
33533
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
33534
33597
  "hover:bg-opacity-80 focus:outline-none focus:ring-2 focus:ring-white"
33535
33598
  ),
33536
33599
  "aria-label": currentFacing === "environment" ? t("qrScanner.switchToFrontCamera") : t("qrScanner.switchToRearCamera"),
@@ -33543,7 +33606,9 @@ var init_QrScanner = __esm({
33543
33606
  type: "button",
33544
33607
  onClick: handleMockScan,
33545
33608
  className: cn(
33609
+ // eslint-disable-next-line almadar/no-hardcoded-colors -- media overlay: always over a dark scrim
33546
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
33547
33612
  "hover:bg-opacity-80 focus:outline-none focus:ring-2 focus:ring-white"
33548
33613
  ),
33549
33614
  "aria-label": t("aria.mockScanDev"),
@@ -38360,19 +38425,19 @@ var init_ReflectionBlock = __esm({
38360
38425
  "div",
38361
38426
  {
38362
38427
  className: cn(
38363
- "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",
38364
38429
  className
38365
38430
  ),
38366
38431
  children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-3", children: [
38367
- /* @__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 }),
38368
38433
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1", children: [
38369
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "font-medium text-amber-900 dark:text-amber-100 mb-2", children: "Pause & Reflect" }),
38370
- /* @__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 }),
38371
38436
  isExpanded ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
38372
38437
  /* @__PURE__ */ jsxRuntime.jsx(
38373
38438
  "textarea",
38374
38439
  {
38375
- 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",
38376
38441
  placeholder: "Your thoughts...",
38377
38442
  value: note,
38378
38443
  onChange: (e) => setNote(e.target.value),
@@ -38383,7 +38448,7 @@ var init_ReflectionBlock = __esm({
38383
38448
  "button",
38384
38449
  {
38385
38450
  onClick: handleSave,
38386
- 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",
38387
38452
  children: "Save & Continue"
38388
38453
  }
38389
38454
  )
@@ -38391,7 +38456,7 @@ var init_ReflectionBlock = __esm({
38391
38456
  "button",
38392
38457
  {
38393
38458
  onClick: () => setIsExpanded(true),
38394
- className: "text-sm text-amber-600 dark:text-amber-400 hover:underline",
38459
+ className: "text-sm text-warning hover:underline",
38395
38460
  children: savedNote ? "\u2713 Answered \xB7 Edit" : "Answer this question"
38396
38461
  }
38397
38462
  )
@@ -38677,7 +38742,7 @@ function DataTable({
38677
38742
  )),
38678
38743
  rowActions && /* @__PURE__ */ jsxRuntime.jsx("th", { className: "w-12 px-4 py-3" })
38679
38744
  ] }) }),
38680
- /* @__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(
38681
38746
  "td",
38682
38747
  {
38683
38748
  colSpan: normalizedColumns.length + (selectable ? 1 : 0) + (rowActions ? 1 : 0),
@@ -39048,7 +39113,7 @@ var init_DetailPanel = __esm({
39048
39113
  };
39049
39114
  const effectiveFieldNames = isFieldDefArray(propFields) ? normalizeFieldDefs(propFields) : fieldNames;
39050
39115
  const fieldTypeMap = isFieldDefArray(propFields) ? buildFieldTypeMap(propFields) : {};
39051
- React91.useCallback(
39116
+ const handleActionClick = React91.useCallback(
39052
39117
  (action, data2) => {
39053
39118
  if (action.navigatesTo) {
39054
39119
  const url = action.navigatesTo.replace(
@@ -39240,8 +39305,9 @@ var init_DetailPanel = __esm({
39240
39305
  {
39241
39306
  variant: action.variant || "secondary",
39242
39307
  size: "sm",
39243
- action: action.event,
39308
+ action: action.navigatesTo ? void 0 : action.event,
39244
39309
  actionPayload: { row: normalizedData },
39310
+ onClick: action.navigatesTo ? () => handleActionClick(action, normalizedData) : void 0,
39245
39311
  icon: action.icon,
39246
39312
  "data-testid": action.event ? `action-${action.event}` : void 0,
39247
39313
  "data-row-id": normalizedData?.id !== void 0 ? String(normalizedData.id) : void 0,
@@ -41284,8 +41350,9 @@ var init_MediaGallery = __esm({
41284
41350
  )
41285
41351
  }
41286
41352
  ),
41287
- 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 }) }),
41288
- 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" }) })
41289
41356
  ]
41290
41357
  },
41291
41358
  item.id
@@ -41314,7 +41381,7 @@ var init_MediaGallery = __esm({
41314
41381
  size: "sm",
41315
41382
  icon: LucideIcons2.X,
41316
41383
  action: "LIGHTBOX_CLOSE",
41317
- className: "text-white hover:bg-white/20"
41384
+ className: "text-foreground hover:bg-muted/50"
41318
41385
  }
41319
41386
  ) }),
41320
41387
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -41325,7 +41392,7 @@ var init_MediaGallery = __esm({
41325
41392
  className: "max-w-full max-h-[80vh] object-contain rounded-md"
41326
41393
  }
41327
41394
  ),
41328
- 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 })
41329
41396
  ]
41330
41397
  }
41331
41398
  )
@@ -41786,7 +41853,7 @@ function WalkMinimap() {
41786
41853
  {
41787
41854
  variant,
41788
41855
  size: "sm",
41789
- className: `flex-shrink-0 text-[9px] ${isActive ? "ring-1 ring-cyan-400" : ""}`,
41856
+ className: `flex-shrink-0 text-[9px] ${isActive ? "ring-1 ring-info" : ""}`,
41790
41857
  children: [
41791
41858
  isDone ? "\u2713" : isActive ? "\u25CF" : "\u25CB",
41792
41859
  " ",
@@ -41927,13 +41994,13 @@ function WalkMinimap() {
41927
41994
  })
41928
41995
  ] }) }),
41929
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: [
41930
- /* @__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: [
41931
41998
  "Engine: ",
41932
41999
  engineCount,
41933
42000
  "/",
41934
42001
  totalTransitions
41935
42002
  ] }),
41936
- 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: [
41937
42004
  "DOM: ",
41938
42005
  domCount
41939
42006
  ] }),
@@ -41966,13 +42033,13 @@ function TraitsTab({ traits: traits2 }) {
41966
42033
  const accordionItems = traits2.map((trait) => ({
41967
42034
  id: trait.id,
41968
42035
  header: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 w-full", children: [
41969
- /* @__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 }),
41970
42037
  /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: "success", size: "sm", children: trait.currentState }),
41971
- /* @__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 }) })
41972
42039
  ] }),
41973
42040
  content: /* @__PURE__ */ jsxRuntime.jsxs(Stack, { gap: "sm", children: [
41974
42041
  /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
41975
- /* @__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") }),
41976
42043
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-wrap gap-1", children: trait.states.map((state) => /* @__PURE__ */ jsxRuntime.jsx(
41977
42044
  Badge,
41978
42045
  {
@@ -41984,18 +42051,18 @@ function TraitsTab({ traits: traits2 }) {
41984
42051
  )) })
41985
42052
  ] }),
41986
42053
  trait.transitions.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
41987
- /* @__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") }),
41988
42055
  /* @__PURE__ */ jsxRuntime.jsx(Stack, { gap: "xs", children: trait.transitions.map((t2, i) => /* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "small", className: "font-mono", children: [
41989
42056
  t2.from,
41990
42057
  " \u2192 ",
41991
42058
  t2.to,
41992
42059
  " ",
41993
- /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-gray-500", children: [
42060
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-muted-foreground", children: [
41994
42061
  "(",
41995
42062
  t2.event,
41996
42063
  ")"
41997
42064
  ] }),
41998
- t2.guard && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-amber-500", children: [
42065
+ t2.guard && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-warning", children: [
41999
42066
  " [",
42000
42067
  t2.guard,
42001
42068
  "]"
@@ -42003,7 +42070,7 @@ function TraitsTab({ traits: traits2 }) {
42003
42070
  ] }, i)) })
42004
42071
  ] }),
42005
42072
  trait.guards.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
42006
- /* @__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") }),
42007
42074
  /* @__PURE__ */ jsxRuntime.jsx(Stack, { gap: "xs", children: trait.guards.map((g, i) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [
42008
42075
  /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", children: g.name }),
42009
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" })
@@ -42046,11 +42113,11 @@ function TicksTab({ ticks: ticks2 }) {
42046
42113
  };
42047
42114
  const TickCard = ({ tick, active }) => /* @__PURE__ */ jsxRuntime.jsxs(Card, { className: `p-3 ${!active ? "opacity-50" : ""}`, children: [
42048
42115
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 mb-2", children: [
42049
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: `w-2 h-2 rounded-full ${active ? "bg-green-500" : "bg-gray-400"}` }),
42050
- /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body", weight: "semibold", className: "text-amber-600 dark:text-amber-400", children: tick.name }),
42051
- /* @__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 })
42052
42119
  ] }),
42053
- /* @__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: [
42054
42121
  /* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
42055
42122
  tick.interval,
42056
42123
  "ms"
@@ -42073,7 +42140,7 @@ function TicksTab({ ticks: ticks2 }) {
42073
42140
  ] });
42074
42141
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "debug-tab debug-tab--ticks", children: [
42075
42142
  activeTicks.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-4", children: [
42076
- /* @__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: [
42077
42144
  "Active (",
42078
42145
  activeTicks.length,
42079
42146
  ")"
@@ -42081,7 +42148,7 @@ function TicksTab({ ticks: ticks2 }) {
42081
42148
  /* @__PURE__ */ jsxRuntime.jsx(Stack, { gap: "sm", children: activeTicks.map((tick) => /* @__PURE__ */ jsxRuntime.jsx(TickCard, { tick, active: true }, tick.id)) })
42082
42149
  ] }),
42083
42150
  inactiveTicks.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
42084
- /* @__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: [
42085
42152
  "Inactive (",
42086
42153
  inactiveTicks.length,
42087
42154
  ")"
@@ -42129,33 +42196,33 @@ function EntitiesTab({ snapshot }) {
42129
42196
  id: `singleton-${name}`,
42130
42197
  header: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
42131
42198
  /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: "primary", size: "sm", children: t("debug.singleton") }),
42132
- /* @__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 })
42133
42200
  ] }),
42134
- 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) })
42135
42202
  }));
42136
42203
  const runtimeItems = runtimeEntities.slice(0, 20).map((entity) => ({
42137
42204
  id: entity.id,
42138
42205
  header: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
42139
- /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body", weight: "semibold", className: "text-sky-600 dark:text-sky-400", children: entity.type }),
42140
- /* @__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: [
42141
42208
  "#",
42142
42209
  entity.id.slice(0, 8)
42143
42210
  ] })
42144
42211
  ] }),
42145
- 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) })
42146
42213
  }));
42147
42214
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "debug-tab debug-tab--entities", children: [
42148
42215
  singletonItems.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-4", children: [
42149
- /* @__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 }) }),
42150
42217
  /* @__PURE__ */ jsxRuntime.jsx(Accordion, { items: singletonItems, multiple: true })
42151
42218
  ] }),
42152
42219
  runtimeItems.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-4", children: [
42153
- /* @__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 }) }),
42154
42221
  /* @__PURE__ */ jsxRuntime.jsx(Accordion, { items: runtimeItems, multiple: true }),
42155
- 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 }) })
42156
42223
  ] }),
42157
42224
  persistentEntries.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
42158
- /* @__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") }),
42159
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: [
42160
42227
  /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", children: type }),
42161
42228
  /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: info.loaded ? "success" : "default", size: "sm", children: info.loaded ? t("debug.loadedCount", { count: info.count }) : t("debug.notLoaded") })
@@ -42240,7 +42307,7 @@ function EventFlowTab({ events: events2 }) {
42240
42307
  );
42241
42308
  })
42242
42309
  ] }),
42243
- /* @__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: [
42244
42311
  /* @__PURE__ */ jsxRuntime.jsx(
42245
42312
  Checkbox,
42246
42313
  {
@@ -42255,18 +42322,18 @@ function EventFlowTab({ events: events2 }) {
42255
42322
  "div",
42256
42323
  {
42257
42324
  ref: containerRef,
42258
- 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",
42259
42326
  children: filteredEvents.slice(-100).map((event) => {
42260
42327
  const { variant, icon } = TYPE_BADGES[event.type] || { variant: "default", icon: "\u2022" };
42261
42328
  return /* @__PURE__ */ jsxRuntime.jsxs(
42262
42329
  "div",
42263
42330
  {
42264
- 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",
42265
42332
  children: [
42266
- /* @__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) }),
42267
42334
  /* @__PURE__ */ jsxRuntime.jsx("span", { children: icon }),
42268
42335
  /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant, size: "sm", className: "min-w-[60px] justify-center", children: event.source }),
42269
- /* @__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 })
42270
42337
  ]
42271
42338
  },
42272
42339
  event.id
@@ -42330,21 +42397,21 @@ function GuardsPanel({ guards }) {
42330
42397
  id: guard.id,
42331
42398
  header: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 w-full", children: [
42332
42399
  /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: guard.result ? "success" : "danger", size: "sm", children: guard.result ? "\u2713" : "\u2717" }),
42333
- /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body", weight: "semibold", className: "text-amber-600 dark:text-amber-400", children: guard.guardName }),
42334
- /* @__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 }),
42335
- /* @__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) })
42336
42403
  ] }),
42337
42404
  content: /* @__PURE__ */ jsxRuntime.jsxs(Stack, { gap: "sm", children: [
42338
42405
  /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
42339
- /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500", children: t("debug.expression") }),
42340
- /* @__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 })
42341
42408
  ] }),
42342
42409
  /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
42343
- /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500", children: t("debug.inputs") }),
42344
- /* @__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) })
42345
42412
  ] }),
42346
42413
  /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
42347
- /* @__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") }),
42348
42415
  /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", children: guard.context.traitName })
42349
42416
  ] })
42350
42417
  ] })
@@ -42400,7 +42467,7 @@ function VerificationTab({ checks, summary }) {
42400
42467
  (a, b) => (sortOrder[a.status] ?? 4) - (sortOrder[b.status] ?? 4)
42401
42468
  );
42402
42469
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "debug-tab debug-tab--verification", children: [
42403
- /* @__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: [
42404
42471
  /* @__PURE__ */ jsxRuntime.jsxs(Badge, { variant: "success", size: "sm", children: [
42405
42472
  summary.passed,
42406
42473
  " passed"
@@ -42417,7 +42484,7 @@ function VerificationTab({ checks, summary }) {
42417
42484
  summary.pending,
42418
42485
  " pending"
42419
42486
  ] }),
42420
- /* @__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: [
42421
42488
  summary.totalChecks,
42422
42489
  " total checks"
42423
42490
  ] })
@@ -42427,12 +42494,12 @@ function VerificationTab({ checks, summary }) {
42427
42494
  return /* @__PURE__ */ jsxRuntime.jsxs(
42428
42495
  "div",
42429
42496
  {
42430
- 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",
42431
42498
  children: [
42432
42499
  /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: config.variant, size: "sm", className: "min-w-[20px] justify-center mt-0.5", children: config.icon }),
42433
42500
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 min-w-0", children: [
42434
42501
  /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "break-words", children: check.label }),
42435
- 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 })
42436
42503
  ] }),
42437
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", {
42438
42505
  hour12: false,
@@ -42467,10 +42534,10 @@ var init_VerificationTab = __esm({
42467
42534
  function EffectBadge({ effect }) {
42468
42535
  const variant = EFFECT_STATUS_VARIANT[effect.status] || "default";
42469
42536
  const icon = effect.status === "executed" ? "\u2713" : effect.status === "failed" ? "\u2717" : "-";
42470
- 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: [
42471
42538
  /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant, size: "sm", className: "!text-[9px] !px-1 !py-0", children: icon }),
42472
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-gray-600 dark:text-gray-400", children: effect.type }),
42473
- 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 })
42474
42541
  ] });
42475
42542
  }
42476
42543
  function TransitionTimeline({ transitions }) {
@@ -42505,8 +42572,8 @@ function TransitionTimeline({ transitions }) {
42505
42572
  const sorted = [...transitions].reverse();
42506
42573
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "debug-tab debug-tab--timeline", children: [
42507
42574
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between mb-2", children: [
42508
- /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-gray-500", children: t("debug.transitionsRecorded", { count: transitions.length }) }),
42509
- /* @__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: [
42510
42577
  /* @__PURE__ */ jsxRuntime.jsx(
42511
42578
  Checkbox,
42512
42579
  {
@@ -42531,22 +42598,22 @@ function TransitionTimeline({ transitions }) {
42531
42598
  {
42532
42599
  className: `
42533
42600
  relative pl-6 pb-3 border-l-2 cursor-pointer
42534
- hover:bg-gray-50 dark:hover:bg-gray-800 rounded-r
42535
- ${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"}
42536
42603
  `,
42537
42604
  onClick: () => setExpandedId(isExpanded ? null : trace.id),
42538
42605
  children: [
42539
42606
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: `
42540
42607
  absolute left-[-5px] top-1 w-2 h-2 rounded-full
42541
- ${hasFailedEffects ? "bg-red-500" : allPassed ? "bg-green-500" : "bg-gray-400"}
42608
+ ${hasFailedEffects ? "bg-error" : allPassed ? "bg-success" : "bg-muted-foreground"}
42542
42609
  ` }),
42543
42610
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 text-xs py-1 px-2", children: [
42544
- /* @__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) }),
42545
42612
  /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: "primary", size: "sm", className: "min-w-[60px] justify-center", children: trace.traitName }),
42546
- /* @__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: [
42547
42614
  trace.from,
42548
42615
  " ",
42549
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-gray-400", children: "\u2192" }),
42616
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground/50", children: "\u2192" }),
42550
42617
  " ",
42551
42618
  trace.to
42552
42619
  ] }),
@@ -42563,9 +42630,9 @@ function TransitionTimeline({ transitions }) {
42563
42630
  ]
42564
42631
  }
42565
42632
  ),
42566
- /* @__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 }) })
42567
42634
  ] }),
42568
- 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: [
42569
42636
  /* @__PURE__ */ jsxRuntime.jsx(EffectBadge, { effect }),
42570
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) }),
42571
42638
  effect.durationMs !== void 0 && /* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "small", className: "text-muted-foreground text-xs", children: [
@@ -42599,8 +42666,8 @@ var init_TransitionTimeline = __esm({
42599
42666
  }
42600
42667
  });
42601
42668
  function StatRow({ label, value, variant }) {
42602
- 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: [
42603
- /* @__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 }),
42604
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) })
42605
42672
  ] });
42606
42673
  }
@@ -42629,7 +42696,7 @@ function ServerBridgeTab({ bridge }) {
42629
42696
  return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "debug-tab debug-tab--bridge", children: /* @__PURE__ */ jsxRuntime.jsxs(Stack, { gap: "sm", children: [
42630
42697
  /* @__PURE__ */ jsxRuntime.jsxs(Card, { className: "p-3", children: [
42631
42698
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3 mb-3", children: [
42632
- /* @__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"}` }),
42633
42700
  /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "h6", children: bridge.connected ? t("debug.connected") : t("debug.disconnected") })
42634
42701
  ] }),
42635
42702
  /* @__PURE__ */ jsxRuntime.jsxs(Stack, { gap: "xs", children: [
@@ -42664,11 +42731,11 @@ function ServerBridgeTab({ bridge }) {
42664
42731
  )
42665
42732
  ] })
42666
42733
  ] }),
42667
- bridge.lastError && /* @__PURE__ */ jsxRuntime.jsxs(Card, { className: "p-3 border-red-200 dark:border-red-800 bg-red-50 dark:bg-red-950", children: [
42668
- /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "semibold", className: "text-red-600 dark:text-red-400 mb-1", children: t("debug.lastError") }),
42669
- /* @__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 })
42670
42737
  ] }),
42671
- 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 }) }) })
42672
42739
  ] }) });
42673
42740
  }
42674
42741
  var init_ServerBridgeTab = __esm({
@@ -42794,7 +42861,7 @@ function EventDispatcherTab({ traits: traits2, schema }) {
42794
42861
  };
42795
42862
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "debug-tab debug-tab--dispatch", children: [
42796
42863
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-3", children: [
42797
- /* @__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") }),
42798
42865
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-wrap gap-1", children: traits2.map((trait) => /* @__PURE__ */ jsxRuntime.jsxs(Badge, { variant: "success", size: "sm", children: [
42799
42866
  trait.name,
42800
42867
  ": ",
@@ -42802,8 +42869,8 @@ function EventDispatcherTab({ traits: traits2, schema }) {
42802
42869
  ] }, trait.id)) })
42803
42870
  ] }),
42804
42871
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-3", children: [
42805
- /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-1", children: t("debug.availableEvents") }),
42806
- 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: [
42807
42874
  /* @__PURE__ */ jsxRuntime.jsx(
42808
42875
  Button,
42809
42876
  {
@@ -42814,22 +42881,22 @@ function EventDispatcherTab({ traits: traits2, schema }) {
42814
42881
  children: event
42815
42882
  }
42816
42883
  ),
42817
- /* @__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(", ") }),
42818
42885
  transitions.some((tr) => tr.guard) && /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: "warning", size: "sm", children: t("debug.guarded") })
42819
42886
  ] }, event)) })
42820
42887
  ] }),
42821
42888
  unavailableEvents.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-3", children: [
42822
- /* @__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") }),
42823
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)) })
42824
42891
  ] }),
42825
42892
  log11.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
42826
- /* @__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") }),
42827
42894
  /* @__PURE__ */ jsxRuntime.jsx(Stack, { gap: "xs", children: log11.map((entry, i) => /* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "small", className: "font-mono text-xs", children: [
42828
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-purple-400", children: entry.traitName }),
42895
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary", children: entry.traitName }),
42829
42896
  " ",
42830
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-gray-500", children: entry.from }),
42897
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: entry.from }),
42831
42898
  " -> ",
42832
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-green-400", children: entry.to })
42899
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-success", children: entry.to })
42833
42900
  ] }, i)) })
42834
42901
  ] })
42835
42902
  ] });
@@ -42855,21 +42922,21 @@ var init_RuntimeDebugger = __esm({
42855
42922
  function ServerResponseRow({ sr }) {
42856
42923
  const { t } = hooks.useTranslate();
42857
42924
  const entityEntries = Object.entries(sr.dataEntities);
42858
- 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: [
42859
42926
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
42860
- /* @__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: [
42861
42928
  sr.success ? "\u2713" : "\u2717",
42862
42929
  " ",
42863
42930
  t("debug.server")
42864
42931
  ] }),
42865
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-purple-600 dark:text-purple-300", children: sr.orbitalName }),
42866
- 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 }) }),
42867
- 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: [
42868
42935
  t("debug.emitLabel"),
42869
42936
  " ",
42870
42937
  sr.emittedEvents.join(", ")
42871
42938
  ] }),
42872
- 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 })
42873
42940
  ] }),
42874
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: [
42875
42942
  name,
@@ -42885,9 +42952,9 @@ function TransitionRow({ trace }) {
42885
42952
  if (isServerEntry && trace.serverResponse) {
42886
42953
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "py-0.5 border-b border-border last:border-0", children: [
42887
42954
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-2 text-xs font-mono", children: [
42888
- /* @__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" }),
42889
42956
  /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: "warning", size: "sm", className: "flex-shrink-0", children: trace.event }),
42890
- /* @__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") })
42891
42958
  ] }),
42892
42959
  /* @__PURE__ */ jsxRuntime.jsx(ServerResponseRow, { sr: trace.serverResponse })
42893
42960
  ] });
@@ -42896,7 +42963,7 @@ function TransitionRow({ trace }) {
42896
42963
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-2 text-xs font-mono", children: [
42897
42964
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn(
42898
42965
  "mt-1.5 w-1.5 h-1.5 rounded-full flex-shrink-0",
42899
- hasFailedEffects ? "bg-red-500" : "bg-green-500"
42966
+ hasFailedEffects ? "bg-error" : "bg-success"
42900
42967
  ) }),
42901
42968
  /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: "info", size: "sm", className: "flex-shrink-0", children: trace.event }),
42902
42969
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-foreground flex-shrink-0", children: trace.traitName }),
@@ -42910,7 +42977,7 @@ function TransitionRow({ trace }) {
42910
42977
  ] }),
42911
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(
42912
42979
  "px-1 rounded text-xs",
42913
- 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"
42914
42981
  ), children: [
42915
42982
  eff.status === "executed" ? "\u2713" : eff.status === "failed" ? "\u2717" : "-",
42916
42983
  " ",
@@ -42944,7 +43011,7 @@ function VerifyModePanel({
42944
43011
  {
42945
43012
  className: cn(
42946
43013
  "runtime-debugger runtime-debugger--verify",
42947
- "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",
42948
43015
  hudBottom ? "" : "fixed bottom-0 left-0 right-0",
42949
43016
  className
42950
43017
  ),
@@ -42965,8 +43032,8 @@ function VerifyModePanel({
42965
43032
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-foreground/50 w-3", "aria-hidden": true, children: expanded ? "\u25BE" : "\u25B8" }),
42966
43033
  /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: failedChecks > 0 ? "danger" : "success", size: "sm", children: failedChecks > 0 ? t("debug.failCount", { count: failedChecks }) : t("debug.ok") }),
42967
43034
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-foreground/70", children: t("debug.localCount", { count: localCount }) }),
42968
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-purple-600 dark:text-purple-400", children: t("debug.serverCount", { count: serverCount }) }),
42969
- 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 }),
42970
43037
  !expanded && transitions.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-auto text-foreground/50", children: t("debug.transitionsCount", { count: transitions.length }) })
42971
43038
  ]
42972
43039
  }
@@ -43161,7 +43228,7 @@ function RuntimeDebugger({
43161
43228
  title: t("debug.openDebugger"),
43162
43229
  children: failedChecks > 0 ? /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "relative", children: [
43163
43230
  /* @__PURE__ */ jsxRuntime.jsx("span", { children: "V" }),
43164
- /* @__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" })
43165
43232
  ] }) : /* @__PURE__ */ jsxRuntime.jsx("span", { children: "V" })
43166
43233
  }
43167
43234
  ) : /* @__PURE__ */ jsxRuntime.jsxs(Card, { className: "runtime-debugger__panel", children: [
@@ -43249,7 +43316,7 @@ var init_SegmentRenderer = __esm({
43249
43316
  "div",
43250
43317
  {
43251
43318
  className: cn(
43252
- "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",
43253
43320
  containerClassName,
43254
43321
  className
43255
43322
  ),
@@ -48801,8 +48868,8 @@ var SystemNode = ({ data }) => {
48801
48868
  className: "rounded-lg border border-[var(--color-border)] bg-[var(--color-card)] px-3 py-2 shadow-sm",
48802
48869
  style: { minWidth: 160, maxWidth: 220 },
48803
48870
  children: [
48804
- /* @__PURE__ */ jsxRuntime.jsx(react.Handle, { type: "target", position: react.Position.Left, className: "!w-2 !h-2 !bg-orange-400" }),
48805
- /* @__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" }),
48806
48873
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1.5 mb-1", children: [
48807
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 }) }),
48808
48875
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs font-semibold text-[var(--color-foreground)] truncate flex-1", children: orbitalName })
@@ -48954,9 +49021,9 @@ var AvlTransitionEdge = ({
48954
49021
  className: "absolute pointer-events-all nodrag nopan flex items-center gap-1",
48955
49022
  style: { transform: `translate(-50%, -50%) translate(${labelX}px, ${labelY}px)` },
48956
49023
  children: [
48957
- 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") }),
48958
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 ?? "" }),
48959
- 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") })
48960
49027
  ]
48961
49028
  }
48962
49029
  ) })
@@ -49779,7 +49846,9 @@ function useResolvedSchema(schema, pageName) {
49779
49846
  trait.listens = callSiteListens.map((l) => ({
49780
49847
  event: l.event,
49781
49848
  triggers: l.triggers,
49782
- source: l.source
49849
+ source: l.source,
49850
+ guard: l.guard,
49851
+ payloadMapping: l.payloadMapping
49783
49852
  }));
49784
49853
  resolvedSchemaLog.info("listens:restored", {
49785
49854
  trait: traitName,
@@ -50206,6 +50275,14 @@ function createSharedEntityWriter(binding, tick, traitStatesRef, emit) {
50206
50275
  return writes;
50207
50276
  };
50208
50277
  }
50278
+ function containsConfigForward(value) {
50279
+ if (typeof value === "string") return value.startsWith("@config.");
50280
+ if (Array.isArray(value)) return value.some(containsConfigForward);
50281
+ if (value !== null && typeof value === "object") {
50282
+ return Object.values(value).some(containsConfigForward);
50283
+ }
50284
+ return false;
50285
+ }
50209
50286
  function getBindingConfig(binding) {
50210
50287
  const raw = binding.config;
50211
50288
  const normalized = runtime.normalizeCallSiteConfigToValues(raw);
@@ -50558,7 +50635,7 @@ function useTraitStateMachine(traitBindings, uiSlots, options) {
50558
50635
  const sharedCallSite = sharedCallSiteRaw ? runtime.resolveCallSitePayloadCaptures(
50559
50636
  Object.fromEntries(
50560
50637
  Object.entries(sharedCallSiteRaw).filter(
50561
- ([, v]) => !(typeof v === "string" && v.startsWith("@config."))
50638
+ ([, v]) => !containsConfigForward(v)
50562
50639
  )
50563
50640
  ),
50564
50641
  payload || {}
@@ -50623,7 +50700,7 @@ function useTraitStateMachine(traitBindings, uiSlots, options) {
50623
50700
  const callSiteOverrides = callSiteConfig ? runtime.resolveCallSitePayloadCaptures(
50624
50701
  Object.fromEntries(
50625
50702
  Object.entries(callSiteConfig).filter(
50626
- ([, v]) => !(typeof v === "string" && v.startsWith("@config."))
50703
+ ([, v]) => !containsConfigForward(v)
50627
50704
  )
50628
50705
  ),
50629
50706
  payload || {}
@@ -50865,7 +50942,7 @@ function useTraitStateMachine(traitBindings, uiSlots, options) {
50865
50942
  }
50866
50943
  return () => scheduler.stopAll();
50867
50944
  }, [traitBindings, runTickEffects, sharedGroups, sharedEntityStore, emitFromSharedWriter]);
50868
- const processEventQueued = React91.useCallback(async (eventKey, payload) => {
50945
+ const processEventQueued = React91.useCallback(async (eventKey, payload, targetTrait) => {
50869
50946
  const normalizedEvent = normalizeEventKey(eventKey);
50870
50947
  const bindings = traitBindingsRef.current;
50871
50948
  const currentManager = managerRef.current;
@@ -50894,7 +50971,9 @@ function useTraitStateMachine(traitBindings, uiSlots, options) {
50894
50971
  normalizedEvent,
50895
50972
  payload,
50896
50973
  void 0,
50897
- entityByTrait
50974
+ entityByTrait,
50975
+ void 0,
50976
+ targetTrait
50898
50977
  );
50899
50978
  crossTraitLog.debug("processEvent:results", {
50900
50979
  event: normalizedEvent,
@@ -50987,8 +51066,11 @@ function useTraitStateMachine(traitBindings, uiSlots, options) {
50987
51066
  const effectTraces = result.effects.map(
50988
51067
  (e) => {
50989
51068
  if (Array.isArray(e)) {
51069
+ const head = String(e[0] ?? "unknown");
51070
+ const entityName = head === "fetch" && typeof e[1] === "string" ? e[1] : head === "persist" && typeof e[2] === "string" ? e[2] : void 0;
50990
51071
  return {
50991
- type: String(e[0] ?? "unknown"),
51072
+ type: head,
51073
+ ...entityName !== void 0 ? { entityName } : {},
50992
51074
  args: e.slice(1),
50993
51075
  status: "executed"
50994
51076
  };
@@ -51041,7 +51123,8 @@ function useTraitStateMachine(traitBindings, uiSlots, options) {
51041
51123
  const orbital = orbitalsByTrait?.[traitName];
51042
51124
  if (orbital) dispatchedOrbitals.add(orbital);
51043
51125
  }
51044
- await onEventProcessed(normalizedEvent, payload, dispatchedOrbitals);
51126
+ const relayPayload = targetTrait !== void 0 ? { ...payload ?? {}, _targetTrait: targetTrait } : payload;
51127
+ await onEventProcessed(normalizedEvent, relayPayload, dispatchedOrbitals);
51045
51128
  }
51046
51129
  }, [entities, eventBus, sharedEntityStore]);
51047
51130
  const drainEventQueue = React91.useCallback(async () => {
@@ -51050,14 +51133,14 @@ function useTraitStateMachine(traitBindings, uiSlots, options) {
51050
51133
  try {
51051
51134
  while (eventQueueRef.current.length > 0) {
51052
51135
  const entry = eventQueueRef.current.shift();
51053
- await processEventQueued(entry.eventKey, entry.payload);
51136
+ await processEventQueued(entry.eventKey, entry.payload, entry.targetTrait);
51054
51137
  }
51055
51138
  } finally {
51056
51139
  processingRef.current = false;
51057
51140
  }
51058
51141
  }, [processEventQueued]);
51059
- const enqueueAndDrain = React91.useCallback((eventKey, payload) => {
51060
- eventQueueRef.current.push({ eventKey, payload });
51142
+ const enqueueAndDrain = React91.useCallback((eventKey, payload, targetTrait) => {
51143
+ eventQueueRef.current.push({ eventKey, payload, targetTrait });
51061
51144
  void drainEventQueue();
51062
51145
  }, [drainEventQueue]);
51063
51146
  React91.useCallback((eventKey, payload) => {
@@ -51154,7 +51237,11 @@ function useTraitStateMachine(traitBindings, uiSlots, options) {
51154
51237
  crossTraitLog.debug("listen:subscribed", { busKey, targetTrait: binding.trait.name, sourceOrbital, sourceTrait, listenEvent: listen.event, triggers: listen.triggers });
51155
51238
  const unsub = eventBus.on(busKey, (event) => {
51156
51239
  crossTraitLog.debug("listen:fired", { busKey, targetTrait: binding.trait.name, triggers: listen.triggers });
51157
- enqueueAndDrain(listen.triggers, event.payload);
51240
+ enqueueAndDrain(
51241
+ listen.triggers,
51242
+ core.applyListenPayloadMapping(listen.payloadMapping, event.payload),
51243
+ binding.trait.name
51244
+ );
51158
51245
  });
51159
51246
  unsubscribes.push(() => {
51160
51247
  crossTraitLog.debug("listen:unsubscribe", { busKey, targetTrait: binding.trait.name, triggers: listen.triggers });
@@ -51184,7 +51271,7 @@ function useTraitStateMachine(traitBindings, uiSlots, options) {
51184
51271
  }
51185
51272
  for (const event of eventsToFire) {
51186
51273
  stateLog.debug("mount:fire-lifecycle", { event, traitCount: traitBindings.length });
51187
- enqueueAndDrain(event, {});
51274
+ enqueueAndDrain(event, { ...optionsRef.current?.initPayload ?? {} });
51188
51275
  }
51189
51276
  return () => {
51190
51277
  initedTraitsRef.current = /* @__PURE__ */ new Set();
@@ -51283,7 +51370,7 @@ function collectServerActiveTraits(ir, allTraits, mountedTraitNames) {
51283
51370
  }
51284
51371
  return active;
51285
51372
  }
51286
- 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 }) {
51287
51374
  const bridge = providers.useServerBridge();
51288
51375
  const activeTraitNames = React91.useMemo(
51289
51376
  () => new Set(traits2.map((b) => b.trait.name).filter((n) => !!n)),
@@ -51312,43 +51399,48 @@ function TraitInitializer({ traits: traits2, orbitalNames, onNavigate, onLocalFa
51312
51399
  applyServerEffects(effects, uiSlots, onNavigate, embeddedTraits, activeTraitNames);
51313
51400
  }
51314
51401
  }, [bridge.connected, bridge.sendEvent, orbitalNames, uiSlots, onNavigate, embeddedTraits, activeTraitNames, withActiveTraits]);
51315
- 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 };
51316
51403
  const { sendEvent } = useTraitStateMachine(traits2, uiSlots, opts);
51317
51404
  const initSentRef = React91.useRef(false);
51318
51405
  const prevTraitsRef = React91.useRef(void 0);
51406
+ const paramsKey = JSON.stringify(routeParams ?? {});
51407
+ const prevParamsKeyRef = React91.useRef(void 0);
51319
51408
  React91.useEffect(() => {
51320
51409
  const refChanged = prevTraitsRef.current !== void 0 && prevTraitsRef.current !== traits2;
51410
+ const paramsChanged = prevParamsKeyRef.current !== void 0 && prevParamsKeyRef.current !== paramsKey;
51321
51411
  navLog.debug("page:traits-effect", () => ({
51322
51412
  refChanged,
51413
+ paramsChanged,
51323
51414
  traitsCount: Array.isArray(traits2) ? traits2.length : -1,
51324
51415
  hadPrev: prevTraitsRef.current !== void 0
51325
51416
  }));
51326
- if (refChanged) {
51327
- 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 });
51328
51419
  uiSlots.clearAll();
51329
51420
  initSentRef.current = false;
51330
51421
  }
51331
51422
  prevTraitsRef.current = traits2;
51332
- }, [traits2, uiSlots]);
51423
+ prevParamsKeyRef.current = paramsKey;
51424
+ }, [traits2, uiSlots, paramsKey]);
51333
51425
  React91.useEffect(() => {
51334
51426
  if (!orbitalNames?.length) {
51335
- const t = setTimeout(() => sendEvent("INIT"), 50);
51427
+ const t = setTimeout(() => sendEvent("INIT", routeParams), 50);
51336
51428
  return () => clearTimeout(t);
51337
51429
  }
51338
51430
  const fallback = setTimeout(() => {
51339
51431
  if (!initSentRef.current) {
51340
- sendEvent("INIT");
51432
+ sendEvent("INIT", routeParams);
51341
51433
  onLocalFallback?.();
51342
51434
  }
51343
51435
  }, 5e3);
51344
51436
  return () => clearTimeout(fallback);
51345
- }, [traits2, orbitalNames, sendEvent, onLocalFallback]);
51437
+ }, [traits2, orbitalNames, sendEvent, onLocalFallback, routeParams]);
51346
51438
  React91.useEffect(() => {
51347
51439
  if (!bridge.connected || !orbitalNames?.length || initSentRef.current) return;
51348
51440
  initSentRef.current = true;
51349
51441
  (async () => {
51350
51442
  for (const name of orbitalNames) {
51351
- const { effects, meta } = await bridge.sendEvent(name, "INIT", withActiveTraits({}));
51443
+ const { effects, meta } = await bridge.sendEvent(name, "INIT", withActiveTraits({ ...routeParams ?? {} }));
51352
51444
  recordServerResponse(name, "INIT", meta);
51353
51445
  const effectTraces = [
51354
51446
  { type: "fetch", args: [], status: "executed" },
@@ -51369,10 +51461,10 @@ function TraitInitializer({ traits: traits2, orbitalNames, onNavigate, onLocalFa
51369
51461
  applyServerEffects(effects, uiSlots, onNavigate, embeddedTraits, activeTraitNames);
51370
51462
  }
51371
51463
  })();
51372
- }, [bridge.connected, orbitalNames, bridge.sendEvent, uiSlots, onNavigate, embeddedTraits, activeTraitNames, withActiveTraits]);
51464
+ }, [bridge.connected, orbitalNames, bridge.sendEvent, uiSlots, onNavigate, embeddedTraits, activeTraitNames, withActiveTraits, routeParams]);
51373
51465
  return null;
51374
51466
  }
51375
- function SchemaRunner({ schema, serverUrl, transport, mockData, pageName, onNavigate, onLocalFallback, persistence }) {
51467
+ function SchemaRunner({ schema, serverUrl, transport, mockData, pageName, routeParams, onNavigate, onLocalFallback, persistence }) {
51376
51468
  const { traits: traits2, allEntities, allTraits, ir } = useResolvedSchema(schema, pageName);
51377
51469
  const allPageTraits = React91.useMemo(() => {
51378
51470
  let base;
@@ -51514,6 +51606,7 @@ function SchemaRunner({ schema, serverUrl, transport, mockData, pageName, onNavi
51514
51606
  TraitInitializer,
51515
51607
  {
51516
51608
  traits: allPageTraits,
51609
+ routeParams,
51517
51610
  orbitalNames: serverUrl || transport ? pageOrbitalNames : void 0,
51518
51611
  traitConfigsByName,
51519
51612
  orbitalsByTrait,
@@ -51591,27 +51684,44 @@ function OrbPreview({
51591
51684
  return [];
51592
51685
  }
51593
51686
  }, [parsedSchema]);
51594
- const initialPageName = React91.useMemo(() => {
51687
+ const initialPageMatch = React91.useMemo(() => {
51595
51688
  if (!initialPagePath) return void 0;
51596
- const match = pages.find(({ page }) => page.path === initialPagePath);
51597
- 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;
51598
51694
  }, [pages, initialPagePath]);
51695
+ const initialPageName = initialPageMatch?.name;
51599
51696
  const [currentPage, setCurrentPage] = React91.useState(initialPageName);
51697
+ const [routeParams, setRouteParams] = React91.useState(initialPageMatch?.params ?? {});
51600
51698
  const prevInitialPagePathRef = React91.useRef(initialPagePath);
51601
51699
  React91.useEffect(() => {
51602
51700
  if (prevInitialPagePathRef.current !== initialPagePath) {
51603
51701
  prevInitialPagePathRef.current = initialPagePath;
51604
51702
  setCurrentPage(initialPageName);
51703
+ setRouteParams(initialPageMatch?.params ?? {});
51605
51704
  }
51606
- }, [initialPagePath, initialPageName]);
51705
+ }, [initialPagePath, initialPageName, initialPageMatch]);
51607
51706
  const handleNavigate = React91.useCallback((path) => {
51608
- 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
+ }
51609
51717
  navLog.debug("handleNavigate", () => ({
51610
51718
  path,
51611
51719
  matched: match?.page.name ?? null,
51720
+ params,
51612
51721
  availablePaths: pages.map((p) => p.page.path)
51613
51722
  }));
51614
- if (match) {
51723
+ if (match?.page.name) {
51724
+ setRouteParams(params);
51615
51725
  setCurrentPage(match.page.name);
51616
51726
  if (typeof window !== "undefined") {
51617
51727
  const url = new URL(window.location.href);
@@ -51621,6 +51731,15 @@ function OrbPreview({
51621
51731
  }
51622
51732
  }
51623
51733
  }, [pages]);
51734
+ React91.useEffect(() => {
51735
+ const unsubscribe = eventBus.on("UI:NAVIGATE", (event) => {
51736
+ const url = event.payload?.url;
51737
+ if (typeof url === "string" && url.length > 0) {
51738
+ handleNavigate(url);
51739
+ }
51740
+ });
51741
+ return unsubscribe;
51742
+ }, [eventBus, handleNavigate]);
51624
51743
  if (!parseResult.ok) {
51625
51744
  return /* @__PURE__ */ jsxRuntime.jsx(Box, { className, style: { height }, children: /* @__PURE__ */ jsxRuntime.jsxs(Typography, { as: "pre", color: "error", variant: "small", className: "font-mono whitespace-pre-wrap break-all m-0 p-4", children: [
51626
51745
  "Parse error: ",
@@ -51672,6 +51791,7 @@ function OrbPreview({
51672
51791
  transport,
51673
51792
  mockData: effectiveMockData,
51674
51793
  pageName: currentPage,
51794
+ routeParams,
51675
51795
  onNavigate: handleNavigate,
51676
51796
  onLocalFallback: handleLocalFallback,
51677
51797
  persistence
@@ -53420,9 +53540,9 @@ function OrbInspector({ node, schema, editable = false, userType = "builder", th
53420
53540
  /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-muted-foreground text-xs uppercase tracking-wider mb-2", children: t("avl.transition") }),
53421
53541
  /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: "100%", height: 44, viewBox: "0 0 280 44", children: [
53422
53542
  /* @__PURE__ */ jsxRuntime.jsx(exports.AvlState, { x: 8, y: 8, name: fromState, role: getStateRole(fromState), width: 90, height: 26 }),
53423
- /* @__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)" }),
53424
53544
  /* @__PURE__ */ jsxRuntime.jsx(exports.AvlState, { x: 164, y: 8, name: toState, role: getStateRole(toState), width: 90, height: 26 }),
53425
- /* @__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)" }) }) })
53426
53546
  ] }),
53427
53547
  traitName && /* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "small", className: "text-muted-foreground text-xs", children: [
53428
53548
  traitName,
@@ -53533,7 +53653,7 @@ function OrbPatternTree({ config, depth }) {
53533
53653
  return /* @__PURE__ */ jsxRuntime.jsxs(Box, { style: { paddingLeft: depth * 12 }, children: [
53534
53654
  /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-primary font-semibold text-xs", children: type }),
53535
53655
  propEntries.slice(0, 5).map(([key, val]) => {
53536
- 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: [
53537
53657
  "(",
53538
53658
  val.map(String).join(" "),
53539
53659
  ")"