@almadar/ui 5.123.0 → 5.124.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/dist/{TraitProvider-YkK6tXDw.d.cts → TraitProvider-Ch79cUcb.d.cts} +6 -1
  2. package/dist/{TraitProvider-YkK6tXDw.d.ts → TraitProvider-Ch79cUcb.d.ts} +6 -1
  3. package/dist/{UserContext-bziZwgFL.d.cts → UserContext-BKckAUv7.d.cts} +5 -5
  4. package/dist/{UserContext-bziZwgFL.d.ts → UserContext-BKckAUv7.d.ts} +5 -5
  5. package/dist/avl/index.cjs +265 -227
  6. package/dist/avl/index.js +267 -229
  7. package/dist/components/index.cjs +208 -200
  8. package/dist/components/index.d.cts +4 -3
  9. package/dist/components/index.d.ts +4 -3
  10. package/dist/components/index.js +208 -200
  11. package/dist/context/index.cjs +25 -66
  12. package/dist/context/index.d.cts +1 -1
  13. package/dist/context/index.d.ts +1 -1
  14. package/dist/context/index.js +25 -66
  15. package/dist/providers/index.cjs +286 -219
  16. package/dist/providers/index.d.cts +4 -4
  17. package/dist/providers/index.d.ts +4 -4
  18. package/dist/providers/index.js +286 -219
  19. package/dist/runtime/index.cjs +258 -220
  20. package/dist/runtime/index.d.cts +4 -2
  21. package/dist/runtime/index.d.ts +4 -2
  22. package/dist/runtime/index.js +260 -222
  23. package/package.json +8 -7
  24. package/themes/_contract.md +2 -0
  25. package/themes/almadar-website.css +3 -3
  26. package/themes/almadar.css +4 -4
  27. package/themes/bloomberg-dense.css +2 -2
  28. package/themes/clay.css +417 -0
  29. package/themes/corporate.css +411 -0
  30. package/themes/game-adventure.css +3 -3
  31. package/themes/game-rpg.css +2 -2
  32. package/themes/game-sci-fi.css +1 -1
  33. package/themes/game-ui-pack.css +2 -2
  34. package/themes/gazette.css +2 -2
  35. package/themes/glass.css +428 -0
  36. package/themes/index.css +9 -13
  37. package/themes/kiosk.css +5 -5
  38. package/themes/linear-clean.css +1 -1
  39. package/themes/minimalist.css +2 -2
  40. package/themes/neon.css +3 -3
  41. package/themes/notion-editorial.css +1 -1
  42. package/themes/prism.css +3 -3
  43. package/themes/retro.css +410 -0
  44. package/themes/terminal.css +1 -1
  45. package/themes/trait-wars.css +8 -8
  46. package/themes/wireframe.css +2 -2
  47. package/themes/arctic.css +0 -235
  48. package/themes/copper.css +0 -235
  49. package/themes/ember.css +0 -238
  50. package/themes/forest.css +0 -238
  51. package/themes/lavender.css +0 -233
  52. package/themes/midnight.css +0 -234
  53. package/themes/ocean.css +0 -238
  54. package/themes/rose.css +0 -233
  55. package/themes/sand.css +0 -234
  56. package/themes/slate.css +0 -233
  57. package/themes/sunset.css +0 -238
@@ -1,6 +1,6 @@
1
1
  import * as React82 from 'react';
2
2
  import React82__default, { createContext, useContext, useMemo, useRef, useEffect, useCallback, Suspense, useState, useSyncExternalStore, useLayoutEffect, lazy, useId } from 'react';
3
- import { EventBusContext, useTraitScopeChain, useEntitySchemaOptional, useEntitySchema, getAllPages, OrbitalProvider, TraitScopeProvider, ServerBridgeProvider, useCurrentPagePath, useGameAudioContextOptional, VerificationProvider, EntitySchemaProvider, OrbitalThemeProvider, useServerBridge } from '@almadar/ui/providers';
3
+ import { EventBusContext, useTraitScopeChain, useEntitySchemaOptional, useEntitySchema, getAllPages, matchPath, OrbitalProvider, TraitScopeProvider, ServerBridgeProvider, useCurrentPagePath, useGameAudioContextOptional, VerificationProvider, EntitySchemaProvider, OrbitalThemeProvider, useServerBridge } from '@almadar/ui/providers';
4
4
  export { EntitySchemaProvider, ServerBridgeProvider, TraitContext, TraitProvider, useEntitySchema, useEntitySchemaOptional, useServerBridge, useTrait, useTraitContext } from '@almadar/ui/providers';
5
5
  import { createLogger, setNamespaceLevel, isLogLevelEnabled } from '@almadar/logger';
6
6
  import { clsx } from 'clsx';
@@ -69,7 +69,7 @@ import ReactMarkdown from 'react-markdown';
69
69
  import remarkGfm from 'remark-gfm';
70
70
  import remarkMath from 'remark-math';
71
71
  import rehypeKatex from 'rehype-katex';
72
- import { mergeEntityFrame, isCircuitEvent, schemaToIR, getPage, clearSchemaCache as clearSchemaCache$1, walkSExpr, buildResolvedTraitConfigs, isInlineTrait, isSExpr, isEventPayloadValue } from '@almadar/core';
72
+ import { mergeEntityFrame, isCircuitEvent, applyListenPayloadMapping, schemaToIR, getPage, clearSchemaCache as clearSchemaCache$1, walkSExpr, buildResolvedTraitConfigs, isInlineTrait, isSExpr, isEventPayloadValue } from '@almadar/core';
73
73
  import { DndContext, pointerWithin, rectIntersection, closestCorners, useSensors, useSensor, PointerSensor, KeyboardSensor, useDroppable } from '@dnd-kit/core';
74
74
  import { useSortable, arrayMove, sortableKeyboardCoordinates, SortableContext, rectSortingStrategy, verticalListSortingStrategy } from '@dnd-kit/sortable';
75
75
  import { CSS } from '@dnd-kit/utilities';
@@ -5102,15 +5102,15 @@ var init_TextHighlight = __esm({
5102
5102
  const typeStyles = {
5103
5103
  question: cn(
5104
5104
  // Blue border for questions
5105
- "bg-card border-b-2 border-primary-600",
5105
+ "bg-card border-b-2 border-primary",
5106
5106
  "hover:bg-muted",
5107
- isActive && "bg-primary-100 ring-2 ring-primary-600"
5107
+ isActive && "bg-primary/10 ring-2 ring-primary"
5108
5108
  ),
5109
5109
  note: cn(
5110
5110
  // Yellow border for notes
5111
- "bg-card border-b-2 border-amber-500",
5111
+ "bg-card border-b-2 border-warning",
5112
5112
  "hover:bg-muted",
5113
- isActive && "bg-amber-100 ring-2 ring-amber-500"
5113
+ isActive && "bg-warning/10 ring-2 ring-warning"
5114
5114
  )
5115
5115
  };
5116
5116
  return /* @__PURE__ */ jsx(
@@ -5456,7 +5456,7 @@ function DayCell({
5456
5456
  {
5457
5457
  className: cn(
5458
5458
  "p-2 text-center cursor-pointer hover:bg-muted transition-colors",
5459
- isToday && "bg-blue-500/10",
5459
+ isToday && "bg-primary/10",
5460
5460
  className
5461
5461
  ),
5462
5462
  onClick: handleClick,
@@ -5467,7 +5467,7 @@ function DayCell({
5467
5467
  variant: "small",
5468
5468
  className: cn(
5469
5469
  "font-medium",
5470
- isToday ? "text-blue-600" : "text-muted-foreground"
5470
+ isToday ? "text-primary" : "text-muted-foreground"
5471
5471
  ),
5472
5472
  children: dayAbbr
5473
5473
  }
@@ -5479,7 +5479,7 @@ function DayCell({
5479
5479
  rounded: "full",
5480
5480
  className: cn(
5481
5481
  "h-8 w-8 mx-auto items-center justify-center",
5482
- isToday && "bg-blue-600 text-white"
5482
+ isToday && "bg-primary text-primary-foreground"
5483
5483
  ),
5484
5484
  children: /* @__PURE__ */ jsx(Typography, { variant: "body", className: "font-semibold", children: safeDate.getDate() })
5485
5485
  }
@@ -12191,19 +12191,19 @@ var init_ActivationBlock = __esm({
12191
12191
  "div",
12192
12192
  {
12193
12193
  className: cn(
12194
- "bg-indigo-50 dark:bg-indigo-900/20 border-2 border-indigo-200 dark:border-indigo-800 rounded-lg p-5 mb-6",
12194
+ "bg-primary/10 border-2 border-primary rounded-lg p-5 mb-6",
12195
12195
  className
12196
12196
  ),
12197
12197
  children: /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-3", children: [
12198
- /* @__PURE__ */ jsx(Lightbulb, { className: "text-indigo-600 dark:text-indigo-400 flex-shrink-0 mt-1", size: 24 }),
12198
+ /* @__PURE__ */ jsx(Lightbulb, { className: "text-primary flex-shrink-0 mt-1", size: 24 }),
12199
12199
  /* @__PURE__ */ jsxs("div", { className: "flex-1", children: [
12200
- /* @__PURE__ */ jsx("h4", { className: "font-semibold text-indigo-900 dark:text-indigo-100 mb-2", children: "Before You Begin..." }),
12201
- /* @__PURE__ */ jsx("p", { className: "text-gray-700 dark:text-gray-300 mb-3 text-sm md:text-base", children: question }),
12200
+ /* @__PURE__ */ jsx("h4", { className: "font-semibold text-primary mb-2", children: "Before You Begin..." }),
12201
+ /* @__PURE__ */ jsx("p", { className: "text-foreground mb-3 text-sm md:text-base", children: question }),
12202
12202
  isExpanded ? /* @__PURE__ */ jsxs(Fragment, { children: [
12203
12203
  /* @__PURE__ */ jsx(
12204
12204
  "textarea",
12205
12205
  {
12206
- 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",
12206
+ 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",
12207
12207
  placeholder: "Jot down your thoughts...",
12208
12208
  value: response,
12209
12209
  onChange: (e) => setResponse(e.target.value),
@@ -12215,7 +12215,7 @@ var init_ActivationBlock = __esm({
12215
12215
  "button",
12216
12216
  {
12217
12217
  onClick: handleSubmit,
12218
- className: "px-4 py-2 bg-indigo-600 text-white rounded-md hover:bg-indigo-700 text-sm font-medium transition-colors",
12218
+ className: "px-4 py-2 bg-primary text-primary-foreground rounded-md hover:bg-primary-hover text-sm font-medium transition-colors",
12219
12219
  children: "Continue to Lesson \u2192"
12220
12220
  }
12221
12221
  ),
@@ -12226,7 +12226,7 @@ var init_ActivationBlock = __esm({
12226
12226
  emit(`UI:${saveEvent}`, { response: "" });
12227
12227
  setIsExpanded(false);
12228
12228
  },
12229
- className: "px-4 py-2 text-indigo-600 dark:text-indigo-400 hover:underline text-sm",
12229
+ className: "px-4 py-2 text-primary hover:underline text-sm",
12230
12230
  children: "Skip for now"
12231
12231
  }
12232
12232
  )
@@ -12235,7 +12235,7 @@ var init_ActivationBlock = __esm({
12235
12235
  "button",
12236
12236
  {
12237
12237
  onClick: () => setIsExpanded(true),
12238
- className: "text-sm text-indigo-600 dark:text-indigo-400 hover:underline font-medium",
12238
+ className: "text-sm text-primary hover:underline font-medium",
12239
12239
  children: "\u2713 Answered \xB7 Edit response"
12240
12240
  }
12241
12241
  )
@@ -12739,7 +12739,7 @@ var init_AuthLayout = __esm({
12739
12739
  VStack,
12740
12740
  {
12741
12741
  className: cn(
12742
- "hidden lg:flex lg:w-1/2 bg-primary-600 relative overflow-hidden",
12742
+ "hidden lg:flex lg:w-1/2 bg-primary relative overflow-hidden",
12743
12743
  "justify-between p-12"
12744
12744
  ),
12745
12745
  style: backgroundImage ? {
@@ -12748,7 +12748,7 @@ var init_AuthLayout = __esm({
12748
12748
  } : void 0,
12749
12749
  gap: "none",
12750
12750
  children: [
12751
- /* @__PURE__ */ jsx(Box, { className: "absolute inset-0 bg-gradient-to-br from-primary-600/90 to-primary-800/90" }),
12751
+ /* @__PURE__ */ jsx(Box, { className: "absolute inset-0 bg-gradient-to-br from-primary/90 to-primary-hover/90" }),
12752
12752
  /* @__PURE__ */ jsx(Box, { className: "relative z-10", children: /* @__PURE__ */ jsxs(Link, { to: "/", className: "flex items-center gap-3", children: [
12753
12753
  logo || /* @__PURE__ */ jsx(Box, { className: "w-10 h-10 bg-[var(--color-card)]/20 rounded-xl flex items-center justify-center backdrop-blur", children: /* @__PURE__ */ jsx(
12754
12754
  Typography,
@@ -12833,7 +12833,7 @@ var init_AuthLayout = __esm({
12833
12833
  ),
12834
12834
  children: /* @__PURE__ */ jsxs(Box, { className: "w-full max-w-md", children: [
12835
12835
  /* @__PURE__ */ jsx(Box, { className: "lg:hidden mb-8 text-center", children: /* @__PURE__ */ jsxs(Link, { to: "/", className: "inline-flex items-center gap-3", children: [
12836
- logo || /* @__PURE__ */ jsx(Box, { className: "w-12 h-12 bg-primary-600 rounded-xl flex items-center justify-center", children: /* @__PURE__ */ jsx(
12836
+ logo || /* @__PURE__ */ jsx(Box, { className: "w-12 h-12 bg-primary rounded-xl flex items-center justify-center", children: /* @__PURE__ */ jsx(
12837
12837
  Typography,
12838
12838
  {
12839
12839
  variant: "body1",
@@ -14824,7 +14824,7 @@ var init_CodeBlock = __esm({
14824
14824
  {
14825
14825
  justify: "between",
14826
14826
  align: "center",
14827
- className: "px-3 py-2 bg-[var(--color-card)] rounded-t-lg border-b border-gray-700",
14827
+ className: "px-3 py-2 bg-[var(--color-card)] rounded-t-lg border-b border-border",
14828
14828
  children: [
14829
14829
  showLanguageBadge && /* @__PURE__ */ jsx(Badge, { variant: "default", size: "sm", children: language }),
14830
14830
  effectiveCopy && /* @__PURE__ */ jsx(
@@ -14833,9 +14833,9 @@ var init_CodeBlock = __esm({
14833
14833
  variant: "ghost",
14834
14834
  size: "sm",
14835
14835
  onClick: handleCopy,
14836
- className: "opacity-0 group-hover:opacity-100 focus:opacity-100 transition-opacity text-muted-foreground hover:text-white",
14836
+ className: "opacity-0 group-hover:opacity-100 focus:opacity-100 transition-opacity text-muted-foreground hover:text-foreground",
14837
14837
  "aria-label": t("common.copy"),
14838
- children: copied ? /* @__PURE__ */ jsx(Icon, { name: "check", className: "w-4 h-4 text-green-400" }) : /* @__PURE__ */ jsx(Icon, { name: "copy", className: "w-4 h-4" })
14838
+ children: copied ? /* @__PURE__ */ jsx(Icon, { name: "check", className: "w-4 h-4 text-success" }) : /* @__PURE__ */ jsx(Icon, { name: "copy", className: "w-4 h-4" })
14839
14839
  }
14840
14840
  )
14841
14841
  ]
@@ -15203,12 +15203,12 @@ var init_BloomQuizBlock = __esm({
15203
15203
  init_useEventBus();
15204
15204
  init_cn();
15205
15205
  BLOOM_CONFIG = {
15206
- remember: { color: "bg-gray-500", bgColor: "bg-gray-50 dark:bg-gray-900/30", label: "Remember" },
15207
- understand: { color: "bg-blue-500", bgColor: "bg-blue-50 dark:bg-blue-900/30", label: "Understand" },
15208
- apply: { color: "bg-green-500", bgColor: "bg-green-50 dark:bg-green-900/30", label: "Apply" },
15209
- analyze: { color: "bg-yellow-500", bgColor: "bg-yellow-50 dark:bg-yellow-900/30", label: "Analyze" },
15210
- evaluate: { color: "bg-orange-500", bgColor: "bg-orange-50 dark:bg-orange-900/30", label: "Evaluate" },
15211
- create: { color: "bg-purple-500", bgColor: "bg-purple-50 dark:bg-purple-900/30", label: "Create" }
15206
+ remember: { color: "bg-secondary text-secondary-foreground", bgColor: "bg-muted", label: "Remember" },
15207
+ understand: { color: "bg-info text-info-foreground", bgColor: "bg-info/10", label: "Understand" },
15208
+ apply: { color: "bg-success text-success-foreground", bgColor: "bg-success/10", label: "Apply" },
15209
+ analyze: { color: "bg-warning text-warning-foreground", bgColor: "bg-warning/10", label: "Analyze" },
15210
+ evaluate: { color: "bg-accent text-accent-foreground", bgColor: "bg-accent/10", label: "Evaluate" },
15211
+ create: { color: "bg-primary text-primary-foreground", bgColor: "bg-primary/10", label: "Create" }
15212
15212
  };
15213
15213
  BloomQuizBlock = ({
15214
15214
  level,
@@ -15234,22 +15234,22 @@ var init_BloomQuizBlock = __esm({
15234
15234
  "div",
15235
15235
  {
15236
15236
  className: cn(
15237
- "rounded-lg border border-indigo-100 dark:border-indigo-800 p-4 my-4 transition-all",
15237
+ "rounded-lg border border-primary p-4 my-4 transition-all",
15238
15238
  config.bgColor,
15239
15239
  className
15240
15240
  ),
15241
15241
  children: [
15242
15242
  /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between mb-3", children: [
15243
15243
  /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 flex-wrap", children: [
15244
- index !== void 0 && /* @__PURE__ */ jsxs("span", { className: "text-gray-500 dark:text-gray-400 font-medium text-sm", children: [
15244
+ index !== void 0 && /* @__PURE__ */ jsxs("span", { className: "text-muted-foreground font-medium text-sm", children: [
15245
15245
  "Question ",
15246
15246
  index + 1
15247
15247
  ] }),
15248
- /* @__PURE__ */ jsx("span", { className: cn(config.color, "text-white text-xs px-2 py-1 rounded-full font-medium"), children: config.label })
15248
+ /* @__PURE__ */ jsx("span", { className: cn(config.color, "text-xs px-2 py-1 rounded-full font-medium"), children: config.label })
15249
15249
  ] }),
15250
- isAnswered && /* @__PURE__ */ jsx(CheckCircle, { className: "text-green-600 dark:text-green-400 flex-shrink-0", size: 20 })
15250
+ isAnswered && /* @__PURE__ */ jsx(CheckCircle, { className: "text-success flex-shrink-0", size: 20 })
15251
15251
  ] }),
15252
- /* @__PURE__ */ jsx("div", { className: "font-semibold text-indigo-900 dark:text-indigo-200 mb-3 space-y-2", children: questionSegments.map(
15252
+ /* @__PURE__ */ jsx("div", { className: "font-semibold text-primary mb-3 space-y-2", children: questionSegments.map(
15253
15253
  (segment, idx) => segment.type === "markdown" ? /* @__PURE__ */ jsx(MarkdownContent, { content: segment.content }, `q-md-${idx}`) : /* @__PURE__ */ jsx(
15254
15254
  CodeBlock,
15255
15255
  {
@@ -15263,13 +15263,13 @@ var init_BloomQuizBlock = __esm({
15263
15263
  "button",
15264
15264
  {
15265
15265
  type: "button",
15266
- 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",
15266
+ 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",
15267
15267
  onClick: handleReveal,
15268
15268
  children: revealed ? "Hide Answer" : "Reveal Answer"
15269
15269
  }
15270
15270
  ),
15271
- revealed && /* @__PURE__ */ 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: [
15272
- /* @__PURE__ */ jsx("div", { className: "text-xs text-gray-600 dark:text-gray-400 mb-1 font-medium uppercase tracking-wide", children: "Answer:" }),
15271
+ revealed && /* @__PURE__ */ 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: [
15272
+ /* @__PURE__ */ jsx("div", { className: "text-xs text-muted-foreground mb-1 font-medium uppercase tracking-wide", children: "Answer:" }),
15273
15273
  answerSegments.map(
15274
15274
  (segment, idx) => segment.type === "markdown" ? /* @__PURE__ */ jsx(MarkdownContent, { content: segment.content }, `a-md-${idx}`) : /* @__PURE__ */ jsx(
15275
15275
  CodeBlock,
@@ -15493,12 +15493,12 @@ var init_QuizBlock = __esm({
15493
15493
  }) => {
15494
15494
  const { t } = useTranslate();
15495
15495
  const [revealed, setRevealed] = useState(false);
15496
- return /* @__PURE__ */ jsx(Card2, { className: cn("my-4 border-blue-200 dark:border-blue-800", className), children: /* @__PURE__ */ jsxs(VStack, { gap: "sm", className: "p-4", children: [
15496
+ return /* @__PURE__ */ jsx(Card2, { className: cn("my-4 border-primary", className), children: /* @__PURE__ */ jsxs(VStack, { gap: "sm", className: "p-4", children: [
15497
15497
  /* @__PURE__ */ jsxs(HStack, { gap: "sm", align: "start", children: [
15498
- /* @__PURE__ */ jsx(Icon, { icon: HelpCircle, size: "sm", className: "text-blue-500 mt-0.5 shrink-0" }),
15498
+ /* @__PURE__ */ jsx(Icon, { icon: HelpCircle, size: "sm", className: "text-primary mt-0.5 shrink-0" }),
15499
15499
  /* @__PURE__ */ jsx(Typography, { variant: "body", className: "font-medium", children: question })
15500
15500
  ] }),
15501
- revealed ? /* @__PURE__ */ jsx(Box, { className: "pl-7 pt-2 border-t border-gray-200 dark:border-gray-700", children: /* @__PURE__ */ jsx(Typography, { variant: "body", className: "text-foreground", children: answer }) }) : null,
15501
+ revealed ? /* @__PURE__ */ jsx(Box, { className: "pl-7 pt-2 border-t border-border", children: /* @__PURE__ */ jsx(Typography, { variant: "body", className: "text-foreground", children: answer }) }) : null,
15502
15502
  /* @__PURE__ */ jsx(
15503
15503
  Button,
15504
15504
  {
@@ -17410,7 +17410,7 @@ var init_BookTableOfContents = __esm({
17410
17410
  className: cn(
17411
17411
  "justify-start text-left w-full",
17412
17412
  direction === "rtl" && "text-right",
17413
- isCurrent && "bg-blue-50 dark:bg-blue-950 text-blue-600 dark:text-blue-400"
17413
+ isCurrent && "bg-primary/10 text-primary"
17414
17414
  ),
17415
17415
  children: /* @__PURE__ */ jsx(Box, { className: "truncate", children: /* @__PURE__ */ jsx(Typography, { variant: "body", children: String(chapter.title ?? "") }) })
17416
17416
  },
@@ -18591,7 +18591,7 @@ function CalendarGrid({
18591
18591
  border: true,
18592
18592
  className: cn(
18593
18593
  "cursor-pointer hover:shadow-sm transition-shadow text-xs truncate",
18594
- color ? color : "bg-blue-500/15 border-blue-500/30 text-blue-600"
18594
+ color ? color : "bg-primary/10 border-primary/30 text-primary"
18595
18595
  ),
18596
18596
  onClick: (e) => handleEventClick(event, e),
18597
18597
  children: /* @__PURE__ */ jsx(Typography, { variant: "small", className: "truncate font-medium", children: event.title })
@@ -18689,7 +18689,7 @@ function CalendarGrid({
18689
18689
  onClick: () => handleSlotClick(day, time),
18690
18690
  className: cn(
18691
18691
  "border-l border-border",
18692
- isToday && "bg-blue-50/30"
18692
+ isToday && "bg-primary/10"
18693
18693
  ),
18694
18694
  ...longPressEvent ? {
18695
18695
  onPointerDown: () => startLongPress(day, time),
@@ -20705,31 +20705,31 @@ var init_CodeRunnerPanel = __esm({
20705
20705
  }
20706
20706
  )
20707
20707
  ] }),
20708
- hasOutput && /* @__PURE__ */ jsxs(Box, { className: "rounded-lg border border-gray-700 bg-[#0d0d0d] overflow-hidden", children: [
20708
+ hasOutput && /* @__PURE__ */ jsxs(Box, { className: "rounded-lg border border-border bg-foreground overflow-hidden", children: [
20709
20709
  /* @__PURE__ */ jsxs(
20710
20710
  HStack,
20711
20711
  {
20712
20712
  gap: "sm",
20713
20713
  align: "center",
20714
- className: "px-3 py-2 bg-gray-800 border-b border-gray-700",
20714
+ className: "px-3 py-2 bg-card border-b border-border",
20715
20715
  children: [
20716
- /* @__PURE__ */ jsx(Terminal, { size: 16, className: "text-gray-400" }),
20717
- /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-gray-300 font-medium", children: "Output" })
20716
+ /* @__PURE__ */ jsx(Terminal, { size: 16, className: "text-muted-foreground" }),
20717
+ /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-foreground font-medium", children: "Output" })
20718
20718
  ]
20719
20719
  }
20720
20720
  ),
20721
- /* @__PURE__ */ jsx(VStack, { gap: "none", className: "p-3 font-mono text-sm", children: error ? /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-red-400 whitespace-pre-wrap", children: error }) : /* @__PURE__ */ jsxs(Fragment, { children: [
20722
- output?.stdout ? /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-gray-200 whitespace-pre-wrap", children: output.stdout }) : null,
20723
- output?.stderr ? /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-red-400 whitespace-pre-wrap", children: output.stderr }) : null,
20724
- !output?.stdout && !output?.stderr ? /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-gray-500 italic", children: "No output" }) : null,
20725
- output && output.testResults.length > 0 && /* @__PURE__ */ jsx(Box, { className: "mt-3 pt-3 border-t border-gray-700 space-y-2", children: output.testResults.map((test, index) => /* @__PURE__ */ jsxs(HStack, { gap: "sm", align: "start", className: "text-xs", children: [
20726
- test.passed ? /* @__PURE__ */ jsx(CheckCircle, { size: 14, className: "text-green-400 mt-0.5" }) : /* @__PURE__ */ jsx(XCircle, { size: 14, className: "text-red-400 mt-0.5" }),
20721
+ /* @__PURE__ */ jsx(VStack, { gap: "none", className: "p-3 font-mono text-sm", children: error ? /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-error whitespace-pre-wrap", children: error }) : /* @__PURE__ */ jsxs(Fragment, { children: [
20722
+ output?.stdout ? /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-background whitespace-pre-wrap", children: output.stdout }) : null,
20723
+ output?.stderr ? /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-error whitespace-pre-wrap", children: output.stderr }) : null,
20724
+ !output?.stdout && !output?.stderr ? /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-background italic", children: "No output" }) : null,
20725
+ output && output.testResults.length > 0 && /* @__PURE__ */ jsx(Box, { className: "mt-3 pt-3 border-t border-border space-y-2", children: output.testResults.map((test, index) => /* @__PURE__ */ jsxs(HStack, { gap: "sm", align: "start", className: "text-xs", children: [
20726
+ test.passed ? /* @__PURE__ */ jsx(CheckCircle, { size: 14, className: "text-success mt-0.5" }) : /* @__PURE__ */ jsx(XCircle, { size: 14, className: "text-error mt-0.5" }),
20727
20727
  /* @__PURE__ */ jsxs(VStack, { gap: "xs", className: "flex-1", children: [
20728
20728
  /* @__PURE__ */ jsxs(
20729
20729
  Typography,
20730
20730
  {
20731
20731
  variant: "small",
20732
- className: test.passed ? "text-green-400" : "text-red-400",
20732
+ className: test.passed ? "text-success" : "text-error",
20733
20733
  children: [
20734
20734
  "Test ",
20735
20735
  index + 1,
@@ -20738,15 +20738,15 @@ var init_CodeRunnerPanel = __esm({
20738
20738
  ]
20739
20739
  }
20740
20740
  ),
20741
- /* @__PURE__ */ jsxs(Typography, { variant: "small", className: "text-gray-400", children: [
20741
+ /* @__PURE__ */ jsxs(Typography, { variant: "small", className: "text-background", children: [
20742
20742
  "Input: ",
20743
20743
  test.input
20744
20744
  ] }),
20745
- /* @__PURE__ */ jsxs(Typography, { variant: "small", className: "text-gray-400", children: [
20745
+ /* @__PURE__ */ jsxs(Typography, { variant: "small", className: "text-background", children: [
20746
20746
  "Expected: ",
20747
20747
  test.expectedOutput
20748
20748
  ] }),
20749
- /* @__PURE__ */ jsxs(Typography, { variant: "small", className: "text-gray-400", children: [
20749
+ /* @__PURE__ */ jsxs(Typography, { variant: "small", className: "text-background", children: [
20750
20750
  "Actual: ",
20751
20751
  test.actualOutput
20752
20752
  ] })
@@ -20931,14 +20931,14 @@ var init_ConnectionBlock = __esm({
20931
20931
  "div",
20932
20932
  {
20933
20933
  className: cn(
20934
- "bg-emerald-50 dark:bg-emerald-900/20 border-l-4 border-emerald-500 rounded-r-lg p-5 mb-6",
20934
+ "bg-success/10 border-l-4 border-success rounded-r-lg p-5 mb-6",
20935
20935
  className
20936
20936
  ),
20937
20937
  children: /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-3", children: [
20938
- /* @__PURE__ */ jsx(Link2, { className: "text-emerald-600 dark:text-emerald-400 flex-shrink-0 mt-1", size: 20 }),
20938
+ /* @__PURE__ */ jsx(Link2, { className: "text-success flex-shrink-0 mt-1", size: 20 }),
20939
20939
  /* @__PURE__ */ jsxs("div", { className: "flex-1", children: [
20940
- /* @__PURE__ */ jsx("h4", { className: "font-semibold text-emerald-900 dark:text-emerald-100 mb-2", children: "Building On What You Know" }),
20941
- /* @__PURE__ */ jsx("div", { className: "prose dark:prose-invert prose-sm max-w-none text-gray-700 dark:text-gray-300", children: /* @__PURE__ */ jsx(MarkdownContent, { content }) })
20940
+ /* @__PURE__ */ jsx("h4", { className: "font-semibold text-success mb-2", children: "Building On What You Know" }),
20941
+ /* @__PURE__ */ jsx("div", { className: "prose dark:prose-invert prose-sm max-w-none text-foreground", children: /* @__PURE__ */ jsx(MarkdownContent, { content }) })
20942
20942
  ] })
20943
20943
  ] })
20944
20944
  }
@@ -21025,7 +21025,7 @@ function CounterStandard({
21025
21025
  variant: "h1",
21026
21026
  className: cn(
21027
21027
  sizeStyles8[size].display,
21028
- "font-bold tabular-nums text-primary-600"
21028
+ "font-bold tabular-nums text-primary"
21029
21029
  ),
21030
21030
  children: resolved.count
21031
21031
  }
@@ -21098,7 +21098,7 @@ function CounterFull({
21098
21098
  variant: "h1",
21099
21099
  className: cn(
21100
21100
  sizeStyles8[size].display,
21101
- "font-bold tabular-nums text-primary-600"
21101
+ "font-bold tabular-nums text-primary"
21102
21102
  ),
21103
21103
  children: resolved.count
21104
21104
  }
@@ -21345,11 +21345,11 @@ var init_DashboardLayout = __esm({
21345
21345
  className: "h-16 px-4 border-b border-border dark:border-border",
21346
21346
  children: [
21347
21347
  /* @__PURE__ */ jsxs(Link, { to: "/", className: "flex items-center gap-2", children: [
21348
- logo || /* @__PURE__ */ jsx(Box, { className: "w-8 h-8 bg-primary-600 rounded-lg flex items-center justify-center", children: /* @__PURE__ */ jsx(
21348
+ logo || /* @__PURE__ */ jsx(Box, { className: "w-8 h-8 bg-primary rounded-lg flex items-center justify-center", children: /* @__PURE__ */ jsx(
21349
21349
  Typography,
21350
21350
  {
21351
21351
  variant: "small",
21352
- className: "text-white font-bold text-sm",
21352
+ className: "text-primary-foreground font-bold text-sm",
21353
21353
  as: "span",
21354
21354
  children: appName.charAt(0).toUpperCase()
21355
21355
  }
@@ -21428,11 +21428,11 @@ var init_DashboardLayout = __esm({
21428
21428
  className: "hidden @md/dashboard:flex items-center gap-1 overflow-x-auto",
21429
21429
  children: [
21430
21430
  /* @__PURE__ */ jsxs(Link, { to: "/", className: "flex items-center gap-2 mr-3 shrink-0", children: [
21431
- logo || /* @__PURE__ */ jsx(Box, { className: "w-7 h-7 bg-primary-600 rounded-lg flex items-center justify-center", children: /* @__PURE__ */ jsx(
21431
+ logo || /* @__PURE__ */ jsx(Box, { className: "w-7 h-7 bg-primary rounded-lg flex items-center justify-center", children: /* @__PURE__ */ jsx(
21432
21432
  Typography,
21433
21433
  {
21434
21434
  variant: "small",
21435
- className: "text-white font-bold text-xs",
21435
+ className: "text-primary-foreground font-bold text-xs",
21436
21436
  as: "span",
21437
21437
  children: appName.charAt(0).toUpperCase()
21438
21438
  }
@@ -21492,8 +21492,8 @@ var init_DashboardLayout = __esm({
21492
21492
  {
21493
21493
  as: "span",
21494
21494
  className: cn(
21495
- "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",
21496
- action.variant === "danger" ? "bg-error" : action.variant === "primary" ? "bg-primary" : "bg-foreground"
21495
+ "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",
21496
+ action.variant === "danger" ? "bg-error text-error-foreground" : action.variant === "primary" ? "bg-primary text-primary-foreground" : "bg-foreground text-background"
21497
21497
  ),
21498
21498
  children: action.badge
21499
21499
  }
@@ -21515,7 +21515,7 @@ var init_DashboardLayout = __esm({
21515
21515
  Box,
21516
21516
  {
21517
21517
  as: "span",
21518
- 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",
21518
+ 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",
21519
21519
  children: unreadCount > 99 ? "99+" : unreadCount
21520
21520
  }
21521
21521
  )
@@ -21798,7 +21798,7 @@ function SubMenu({
21798
21798
  ),
21799
21799
  children: [
21800
21800
  item.icon && (typeof item.icon === "string" ? /* @__PURE__ */ jsx(Icon, { name: item.icon, size: "sm", className: "flex-shrink-0" }) : /* @__PURE__ */ jsx(Icon, { icon: item.icon, size: "sm", className: "flex-shrink-0" })),
21801
- /* @__PURE__ */ jsx(Typography, { variant: "small", className: cn("flex-1", isDanger && "text-red-600"), children: item.label }),
21801
+ /* @__PURE__ */ jsx(Typography, { variant: "small", className: cn("flex-1", isDanger && "text-error"), children: item.label }),
21802
21802
  item.badge !== void 0 && /* @__PURE__ */ jsx("span", { className: "ml-auto text-xs font-medium", children: item.badge })
21803
21803
  ]
21804
21804
  },
@@ -21855,7 +21855,7 @@ function MenuItemRow({
21855
21855
  Typography,
21856
21856
  {
21857
21857
  variant: "small",
21858
- className: cn("flex-1", isDanger && "text-red-600"),
21858
+ className: cn("flex-1", isDanger && "text-error"),
21859
21859
  children: item.label
21860
21860
  }
21861
21861
  ),
@@ -22623,20 +22623,24 @@ function DataGrid({
22623
22623
  const bodyFields = fieldDefs.filter((f3) => f3 !== titleField && !badgeFields.includes(f3));
22624
22624
  const primaryActions = actionDefs.filter((a) => a.variant !== "danger");
22625
22625
  const dangerActions = actionDefs.filter((a) => a.variant === "danger");
22626
- const handleActionClick = (action, itemData) => (e) => {
22627
- e.stopPropagation();
22628
- const payload = {
22629
- id: itemData.id,
22630
- row: itemData
22631
- };
22632
- eventBus.emit(`UI:${action.event}`, payload);
22626
+ const fireAction = (action, itemData) => {
22633
22627
  if (action.navigatesTo) {
22634
22628
  const url = action.navigatesTo.replace(
22635
22629
  /\{\{row\.(\w+(?:\.\w+)*)\}\}/g,
22636
22630
  (_, field) => String(itemData[field] ?? "")
22637
22631
  );
22638
- eventBus.emit("UI:NAVIGATE", { url });
22632
+ eventBus.emit("UI:NAVIGATE", { url, row: itemData });
22633
+ return;
22639
22634
  }
22635
+ const payload = {
22636
+ id: itemData.id,
22637
+ row: itemData
22638
+ };
22639
+ eventBus.emit(`UI:${action.event}`, payload);
22640
+ };
22641
+ const handleActionClick = (action, itemData) => (e) => {
22642
+ e.stopPropagation();
22643
+ fireAction(action, itemData);
22640
22644
  };
22641
22645
  const hasRenderProp = typeof children === "function";
22642
22646
  useEffect(() => {
@@ -22738,10 +22742,7 @@ function DataGrid({
22738
22742
  label: action.label,
22739
22743
  icon: action.icon,
22740
22744
  event: action.event,
22741
- onClick: () => eventBus.emit(`UI:${action.event}`, {
22742
- id: itemData.id,
22743
- row: itemData
22744
- })
22745
+ onClick: () => fireAction(action, itemData)
22745
22746
  }))
22746
22747
  }
22747
22748
  )
@@ -22883,10 +22884,7 @@ function DataGrid({
22883
22884
  label: action.label,
22884
22885
  icon: action.icon,
22885
22886
  event: action.event,
22886
- onClick: () => eventBus.emit(`UI:${action.event}`, {
22887
- id: itemData.id,
22888
- row: itemData
22889
- })
22887
+ onClick: () => fireAction(action, itemData)
22890
22888
  }))
22891
22889
  }
22892
22890
  )
@@ -24749,8 +24747,8 @@ var init_RelationSelect = __esm({
24749
24747
  disabled,
24750
24748
  className: cn(
24751
24749
  "w-full justify-between font-normal",
24752
- error && "border-red-300 focus:border-red-500 focus:ring-red-500",
24753
- isOpen && "ring-2 ring-primary-500 border-primary-500"
24750
+ error && "border-error/50 focus:border-error focus:ring-error",
24751
+ isOpen && "ring-2 ring-primary border-primary"
24754
24752
  ),
24755
24753
  children: [
24756
24754
  /* @__PURE__ */ jsx(
@@ -24830,7 +24828,7 @@ var init_RelationSelect = __esm({
24830
24828
  paddingY: "sm",
24831
24829
  className: cn(
24832
24830
  "text-left text-sm hover:bg-muted focus:outline-none focus:bg-muted",
24833
- option.value === value && "bg-primary-50 text-primary-700",
24831
+ option.value === value && "bg-primary/10 text-primary",
24834
24832
  option.disabled && "opacity-50 cursor-not-allowed"
24835
24833
  ),
24836
24834
  onClick: () => handleSelect(option),
@@ -24987,7 +24985,7 @@ var init_SidePanel = __esm({
24987
24985
  showOverlay && /* @__PURE__ */ jsx(Presence, { show: isOpen, animation: "overlay", children: /* @__PURE__ */ jsx(
24988
24986
  Box,
24989
24987
  {
24990
- className: "fixed inset-0 bg-white/80 backdrop-blur-sm z-40 lg:hidden",
24988
+ className: "fixed inset-0 bg-background/80 backdrop-blur-sm z-40 lg:hidden",
24991
24989
  onClick: handleClose
24992
24990
  }
24993
24991
  ) }),
@@ -25354,7 +25352,7 @@ var init_WizardNavigation = __esm({
25354
25352
  /* @__PURE__ */ jsx(Icon, { name: "chevron-left", size: "sm" }),
25355
25353
  resolvedBackLabel
25356
25354
  ] }) : /* @__PURE__ */ jsx(Box, {}),
25357
- /* @__PURE__ */ jsx(HStack, { align: "center", gap: "sm", children: /* @__PURE__ */ jsx(Typography, { variant: "caption", className: "text-neutral-500", children: t("wizard.stepOf", { current: String(currentStep + 1), total: String(totalSteps) }) }) }),
25355
+ /* @__PURE__ */ jsx(HStack, { align: "center", gap: "sm", children: /* @__PURE__ */ jsx(Typography, { variant: "caption", className: "text-muted-foreground", children: t("wizard.stepOf", { current: String(currentStep + 1), total: String(totalSteps) }) }) }),
25358
25356
  isLastStep && showComplete ? /* @__PURE__ */ jsx(Button, { variant: "primary", onClick: handleComplete, disabled: !isValid, children: resolvedCompleteLabel }) : showNext ? /* @__PURE__ */ jsxs(Button, { variant: "primary", onClick: handleNext, disabled: !isValid, children: [
25359
25357
  resolvedNextLabel,
25360
25358
  /* @__PURE__ */ jsx(Icon, { name: "chevron-right", size: "sm" })
@@ -27511,6 +27509,7 @@ var init_Lightbox = __esm({
27511
27509
  {
27512
27510
  className: cn(
27513
27511
  "fixed inset-0 z-50 flex items-center justify-center",
27512
+ // eslint-disable-next-line almadar/no-hardcoded-colors -- media overlay: lightbox scrim behind images
27514
27513
  "bg-black bg-opacity-90",
27515
27514
  className
27516
27515
  ),
@@ -27533,7 +27532,7 @@ var init_Lightbox = __esm({
27533
27532
  "p-2 rounded-full",
27534
27533
  "text-[var(--color-foreground)] bg-[var(--color-card)]",
27535
27534
  "hover:bg-opacity-70 transition-opacity",
27536
- "focus:outline-none focus:ring-2 focus:ring-white"
27535
+ "focus:outline-none focus:ring-2 focus:ring-ring"
27537
27536
  ),
27538
27537
  "aria-label": t("aria.closeModal"),
27539
27538
  children: /* @__PURE__ */ jsx(Icon, { name: "x", className: "w-6 h-6" })
@@ -27552,7 +27551,7 @@ var init_Lightbox = __esm({
27552
27551
  "p-2 rounded-full",
27553
27552
  "text-[var(--color-foreground)] bg-[var(--color-card)]",
27554
27553
  "hover:bg-opacity-70 transition-opacity",
27555
- "focus:outline-none focus:ring-2 focus:ring-white"
27554
+ "focus:outline-none focus:ring-2 focus:ring-ring"
27556
27555
  ),
27557
27556
  "aria-label": t("aria.previousImage"),
27558
27557
  children: /* @__PURE__ */ jsx(Icon, { name: "chevron-left", className: "w-8 h-8" })
@@ -27589,7 +27588,7 @@ var init_Lightbox = __esm({
27589
27588
  "p-2 rounded-full",
27590
27589
  "text-[var(--color-foreground)] bg-[var(--color-card)]",
27591
27590
  "hover:bg-opacity-70 transition-opacity",
27592
- "focus:outline-none focus:ring-2 focus:ring-white"
27591
+ "focus:outline-none focus:ring-2 focus:ring-ring"
27593
27592
  ),
27594
27593
  "aria-label": t("aria.nextImage"),
27595
27594
  children: /* @__PURE__ */ jsx(Icon, { name: "chevron-right", className: "w-8 h-8" })
@@ -30524,6 +30523,7 @@ var init_QrScanner = __esm({
30524
30523
  overflow: "hidden",
30525
30524
  rounded: "sm",
30526
30525
  className: cn(
30526
+ // eslint-disable-next-line almadar/no-hardcoded-colors -- media overlay: always over a dark scrim
30527
30527
  "bg-black",
30528
30528
  "aspect-square w-full max-w-md",
30529
30529
  className
@@ -30588,7 +30588,9 @@ var init_QrScanner = __esm({
30588
30588
  type: "button",
30589
30589
  onClick: togglePause,
30590
30590
  className: cn(
30591
+ // eslint-disable-next-line almadar/no-hardcoded-colors -- media overlay: always over a dark scrim
30591
30592
  "rounded-full bg-black bg-opacity-60 p-2 text-white",
30593
+ // eslint-disable-next-line almadar/no-hardcoded-colors -- media overlay: always over a dark scrim
30592
30594
  "hover:bg-opacity-80 focus:outline-none focus:ring-2 focus:ring-white"
30593
30595
  ),
30594
30596
  "aria-label": isPaused ? t("qrScanner.resumeScanning") : t("qrScanner.pauseScanning"),
@@ -30601,7 +30603,9 @@ var init_QrScanner = __esm({
30601
30603
  type: "button",
30602
30604
  onClick: toggleFacing,
30603
30605
  className: cn(
30606
+ // eslint-disable-next-line almadar/no-hardcoded-colors -- media overlay: always over a dark scrim
30604
30607
  "rounded-full bg-black bg-opacity-60 p-2 text-white",
30608
+ // eslint-disable-next-line almadar/no-hardcoded-colors -- media overlay: always over a dark scrim
30605
30609
  "hover:bg-opacity-80 focus:outline-none focus:ring-2 focus:ring-white"
30606
30610
  ),
30607
30611
  "aria-label": currentFacing === "environment" ? t("qrScanner.switchToFrontCamera") : t("qrScanner.switchToRearCamera"),
@@ -30614,7 +30618,9 @@ var init_QrScanner = __esm({
30614
30618
  type: "button",
30615
30619
  onClick: handleMockScan,
30616
30620
  className: cn(
30621
+ // eslint-disable-next-line almadar/no-hardcoded-colors -- media overlay: always over a dark scrim
30617
30622
  "rounded-full bg-black bg-opacity-60 px-3 py-2 text-xs text-white",
30623
+ // eslint-disable-next-line almadar/no-hardcoded-colors -- media overlay: always over a dark scrim
30618
30624
  "hover:bg-opacity-80 focus:outline-none focus:ring-2 focus:ring-white"
30619
30625
  ),
30620
30626
  "aria-label": t("aria.mockScanDev"),
@@ -33350,10 +33356,10 @@ var init_ModuleCard = __esm({
33350
33356
  init_avl_atom_types();
33351
33357
  init_MiniStateMachine();
33352
33358
  PERSISTENCE_BORDER = {
33353
- persistent: "border-l-[3px] border-l-blue-500 border-solid",
33354
- runtime: "border-l-[3px] border-l-blue-500 border-dashed",
33355
- singleton: "border-l-[3px] border-l-blue-500 border-double",
33356
- instance: "border-l-[3px] border-l-blue-500 border-dotted"
33359
+ persistent: "border-l-[3px] border-l-primary border-solid",
33360
+ runtime: "border-l-[3px] border-l-primary border-dashed",
33361
+ singleton: "border-l-[3px] border-l-primary border-double",
33362
+ instance: "border-l-[3px] border-l-primary border-dotted"
33357
33363
  };
33358
33364
  PERSISTENCE_ICON = {
33359
33365
  persistent: "\u26C1",
@@ -33383,8 +33389,8 @@ var init_ModuleCard = __esm({
33383
33389
  className: "rounded-lg border border-[var(--color-border)] bg-[var(--color-card)] shadow-sm overflow-hidden",
33384
33390
  style: { minWidth: 280, maxWidth: 400 },
33385
33391
  children: [
33386
- /* @__PURE__ */ jsx(Handle, { type: "target", position: Position.Left, className: "!w-2.5 !h-2.5 !bg-orange-400" }),
33387
- /* @__PURE__ */ jsx(Handle, { type: "source", position: Position.Right, className: "!w-2.5 !h-2.5 !bg-orange-400" }),
33392
+ /* @__PURE__ */ jsx(Handle, { type: "target", position: Position.Left, className: "!w-2.5 !h-2.5 !bg-warning" }),
33393
+ /* @__PURE__ */ jsx(Handle, { type: "source", position: Position.Right, className: "!w-2.5 !h-2.5 !bg-warning" }),
33388
33394
  /* @__PURE__ */ jsx("div", { className: "px-3 py-2 border-b border-[var(--color-border)]", children: /* @__PURE__ */ jsx("span", { className: "text-base font-bold text-[var(--color-foreground)]", children: orbitalName }) }),
33389
33395
  /* @__PURE__ */ jsxs("div", { className: `px-3 py-2 border-b border-[var(--color-border)] ${PERSISTENCE_BORDER[persistence] ?? ""}`, children: [
33390
33396
  /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5 mb-1.5", children: [
@@ -35840,19 +35846,19 @@ var init_ReflectionBlock = __esm({
35840
35846
  "div",
35841
35847
  {
35842
35848
  className: cn(
35843
- "my-6 border-l-4 border-amber-400 bg-amber-50 dark:bg-amber-900/20 rounded-r-lg p-4",
35849
+ "my-6 border-l-4 border-warning bg-warning/10 rounded-r-lg p-4",
35844
35850
  className
35845
35851
  ),
35846
35852
  children: /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-3", children: [
35847
- /* @__PURE__ */ jsx(PauseCircle, { className: "text-amber-600 dark:text-amber-400 flex-shrink-0 mt-1", size: 20 }),
35853
+ /* @__PURE__ */ jsx(PauseCircle, { className: "text-warning flex-shrink-0 mt-1", size: 20 }),
35848
35854
  /* @__PURE__ */ jsxs("div", { className: "flex-1", children: [
35849
- /* @__PURE__ */ jsx("div", { className: "font-medium text-amber-900 dark:text-amber-100 mb-2", children: "Pause & Reflect" }),
35850
- /* @__PURE__ */ jsx("p", { className: "text-gray-700 dark:text-gray-300 text-sm mb-3", children: prompt }),
35855
+ /* @__PURE__ */ jsx("div", { className: "font-medium text-warning mb-2", children: "Pause & Reflect" }),
35856
+ /* @__PURE__ */ jsx("p", { className: "text-foreground text-sm mb-3", children: prompt }),
35851
35857
  isExpanded ? /* @__PURE__ */ jsxs(Fragment, { children: [
35852
35858
  /* @__PURE__ */ jsx(
35853
35859
  "textarea",
35854
35860
  {
35855
- 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",
35861
+ className: "w-full p-2 border border-input rounded text-sm bg-card text-foreground focus:ring-2 focus:ring-ring focus:border-transparent",
35856
35862
  placeholder: "Your thoughts...",
35857
35863
  value: note,
35858
35864
  onChange: (e) => setNote(e.target.value),
@@ -35863,7 +35869,7 @@ var init_ReflectionBlock = __esm({
35863
35869
  "button",
35864
35870
  {
35865
35871
  onClick: handleSave,
35866
- className: "mt-2 text-sm px-3 py-1 bg-amber-600 text-white rounded hover:bg-amber-700 transition-colors",
35872
+ className: "mt-2 text-sm px-3 py-1 bg-warning text-warning-foreground rounded hover:opacity-90 transition-colors",
35867
35873
  children: "Save & Continue"
35868
35874
  }
35869
35875
  )
@@ -35871,7 +35877,7 @@ var init_ReflectionBlock = __esm({
35871
35877
  "button",
35872
35878
  {
35873
35879
  onClick: () => setIsExpanded(true),
35874
- className: "text-sm text-amber-600 dark:text-amber-400 hover:underline",
35880
+ className: "text-sm text-warning hover:underline",
35875
35881
  children: savedNote ? "\u2713 Answered \xB7 Edit" : "Answer this question"
35876
35882
  }
35877
35883
  )
@@ -36157,7 +36163,7 @@ function DataTable({
36157
36163
  )),
36158
36164
  rowActions && /* @__PURE__ */ jsx("th", { className: "w-12 px-4 py-3" })
36159
36165
  ] }) }),
36160
- /* @__PURE__ */ jsx("tbody", { className: "divide-y divide-gray-200 dark:divide-gray-700", children: isLoading ? /* @__PURE__ */ jsx("tr", { children: /* @__PURE__ */ jsx(
36166
+ /* @__PURE__ */ jsx("tbody", { className: "divide-y divide-border", children: isLoading ? /* @__PURE__ */ jsx("tr", { children: /* @__PURE__ */ jsx(
36161
36167
  "td",
36162
36168
  {
36163
36169
  colSpan: normalizedColumns.length + (selectable ? 1 : 0) + (rowActions ? 1 : 0),
@@ -36528,7 +36534,7 @@ var init_DetailPanel = __esm({
36528
36534
  };
36529
36535
  const effectiveFieldNames = isFieldDefArray(propFields) ? normalizeFieldDefs(propFields) : fieldNames;
36530
36536
  const fieldTypeMap = isFieldDefArray(propFields) ? buildFieldTypeMap(propFields) : {};
36531
- useCallback(
36537
+ const handleActionClick = useCallback(
36532
36538
  (action, data2) => {
36533
36539
  if (action.navigatesTo) {
36534
36540
  const url = action.navigatesTo.replace(
@@ -36720,8 +36726,9 @@ var init_DetailPanel = __esm({
36720
36726
  {
36721
36727
  variant: action.variant || "secondary",
36722
36728
  size: "sm",
36723
- action: action.event,
36729
+ action: action.navigatesTo ? void 0 : action.event,
36724
36730
  actionPayload: { row: normalizedData },
36731
+ onClick: action.navigatesTo ? () => handleActionClick(action, normalizedData) : void 0,
36725
36732
  icon: action.icon,
36726
36733
  "data-testid": action.event ? `action-${action.event}` : void 0,
36727
36734
  "data-row-id": normalizedData?.id !== void 0 ? String(normalizedData.id) : void 0,
@@ -38764,8 +38771,9 @@ var init_MediaGallery = __esm({
38764
38771
  )
38765
38772
  }
38766
38773
  ),
38767
- item.caption && /* @__PURE__ */ jsx(Box, { className: "absolute bottom-0 left-0 right-0 p-2 bg-gradient-to-t from-black/60 to-transparent", children: /* @__PURE__ */ jsx(Typography, { variant: "caption", className: "text-white truncate", children: item.caption }) }),
38768
- selectable && isSelected && /* @__PURE__ */ jsx(Box, { className: "absolute top-2 right-2 w-5 h-5 rounded-full bg-primary flex items-center justify-center", children: /* @__PURE__ */ jsx(Typography, { variant: "caption", className: "text-white text-xs", children: "\u2713" }) })
38774
+ item.caption && // eslint-disable-next-line almadar/no-hardcoded-colors -- media overlay: caption scrim over image
38775
+ /* @__PURE__ */ jsx(Box, { className: "absolute bottom-0 left-0 right-0 p-2 bg-gradient-to-t from-black/60 to-transparent", children: /* @__PURE__ */ jsx(Typography, { variant: "caption", className: "text-white truncate", children: item.caption }) }),
38776
+ selectable && isSelected && /* @__PURE__ */ jsx(Box, { className: "absolute top-2 right-2 w-5 h-5 rounded-full bg-primary flex items-center justify-center", children: /* @__PURE__ */ jsx(Typography, { variant: "caption", className: "text-primary-foreground text-xs", children: "\u2713" }) })
38769
38777
  ]
38770
38778
  },
38771
38779
  item.id
@@ -38794,7 +38802,7 @@ var init_MediaGallery = __esm({
38794
38802
  size: "sm",
38795
38803
  icon: X,
38796
38804
  action: "LIGHTBOX_CLOSE",
38797
- className: "text-white hover:bg-white/20"
38805
+ className: "text-foreground hover:bg-muted/50"
38798
38806
  }
38799
38807
  ) }),
38800
38808
  /* @__PURE__ */ jsx(
@@ -38805,7 +38813,7 @@ var init_MediaGallery = __esm({
38805
38813
  className: "max-w-full max-h-[80vh] object-contain rounded-md"
38806
38814
  }
38807
38815
  ),
38808
- lightboxItem.caption && /* @__PURE__ */ jsx(Typography, { variant: "body", className: "text-white mt-3 text-center", children: lightboxItem.caption })
38816
+ lightboxItem.caption && /* @__PURE__ */ jsx(Typography, { variant: "body", className: "text-foreground mt-3 text-center", children: lightboxItem.caption })
38809
38817
  ]
38810
38818
  }
38811
38819
  )
@@ -39266,7 +39274,7 @@ function WalkMinimap() {
39266
39274
  {
39267
39275
  variant,
39268
39276
  size: "sm",
39269
- className: `flex-shrink-0 text-[9px] ${isActive ? "ring-1 ring-cyan-400" : ""}`,
39277
+ className: `flex-shrink-0 text-[9px] ${isActive ? "ring-1 ring-info" : ""}`,
39270
39278
  children: [
39271
39279
  isDone ? "\u2713" : isActive ? "\u25CF" : "\u25CB",
39272
39280
  " ",
@@ -39407,13 +39415,13 @@ function WalkMinimap() {
39407
39415
  })
39408
39416
  ] }) }),
39409
39417
  /* @__PURE__ */ jsx(Box, { className: "px-2 py-1 border-t border-border", children: /* @__PURE__ */ jsxs(HStack, { gap: "sm", className: "items-center justify-between", children: [
39410
- /* @__PURE__ */ jsxs(Typography, { variant: "caption", className: "text-xs font-mono text-green-500", children: [
39418
+ /* @__PURE__ */ jsxs(Typography, { variant: "caption", className: "text-xs font-mono text-success", children: [
39411
39419
  "Engine: ",
39412
39420
  engineCount,
39413
39421
  "/",
39414
39422
  totalTransitions
39415
39423
  ] }),
39416
- domCount > 0 && /* @__PURE__ */ jsxs(Typography, { variant: "caption", className: "text-xs font-mono text-cyan-500", children: [
39424
+ domCount > 0 && /* @__PURE__ */ jsxs(Typography, { variant: "caption", className: "text-xs font-mono text-info", children: [
39417
39425
  "DOM: ",
39418
39426
  domCount
39419
39427
  ] }),
@@ -39446,13 +39454,13 @@ function TraitsTab({ traits: traits2 }) {
39446
39454
  const accordionItems = traits2.map((trait) => ({
39447
39455
  id: trait.id,
39448
39456
  header: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 w-full", children: [
39449
- /* @__PURE__ */ jsx(Typography, { variant: "body", weight: "semibold", className: "text-purple-600 dark:text-purple-400", children: trait.name }),
39457
+ /* @__PURE__ */ jsx(Typography, { variant: "body", weight: "semibold", className: "text-primary", children: trait.name }),
39450
39458
  /* @__PURE__ */ jsx(Badge, { variant: "success", size: "sm", children: trait.currentState }),
39451
- /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-gray-500 ml-auto", children: t("debug.transitionsCount", { count: trait.transitionCount }) })
39459
+ /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground ml-auto", children: t("debug.transitionsCount", { count: trait.transitionCount }) })
39452
39460
  ] }),
39453
39461
  content: /* @__PURE__ */ jsxs(Stack, { gap: "sm", children: [
39454
39462
  /* @__PURE__ */ jsxs("div", { children: [
39455
- /* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-2", children: t("debug.states") }),
39463
+ /* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground mb-2", children: t("debug.states") }),
39456
39464
  /* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-1", children: trait.states.map((state) => /* @__PURE__ */ jsx(
39457
39465
  Badge,
39458
39466
  {
@@ -39464,18 +39472,18 @@ function TraitsTab({ traits: traits2 }) {
39464
39472
  )) })
39465
39473
  ] }),
39466
39474
  trait.transitions.length > 0 && /* @__PURE__ */ jsxs("div", { children: [
39467
- /* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-2", children: t("debug.transitions") }),
39475
+ /* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground mb-2", children: t("debug.transitions") }),
39468
39476
  /* @__PURE__ */ jsx(Stack, { gap: "xs", children: trait.transitions.map((t2, i) => /* @__PURE__ */ jsxs(Typography, { variant: "small", className: "font-mono", children: [
39469
39477
  t2.from,
39470
39478
  " \u2192 ",
39471
39479
  t2.to,
39472
39480
  " ",
39473
- /* @__PURE__ */ jsxs("span", { className: "text-gray-500", children: [
39481
+ /* @__PURE__ */ jsxs("span", { className: "text-muted-foreground", children: [
39474
39482
  "(",
39475
39483
  t2.event,
39476
39484
  ")"
39477
39485
  ] }),
39478
- t2.guard && /* @__PURE__ */ jsxs("span", { className: "text-amber-500", children: [
39486
+ t2.guard && /* @__PURE__ */ jsxs("span", { className: "text-warning", children: [
39479
39487
  " [",
39480
39488
  t2.guard,
39481
39489
  "]"
@@ -39483,7 +39491,7 @@ function TraitsTab({ traits: traits2 }) {
39483
39491
  ] }, i)) })
39484
39492
  ] }),
39485
39493
  trait.guards.length > 0 && /* @__PURE__ */ jsxs("div", { children: [
39486
- /* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-2", children: t("debug.guards") }),
39494
+ /* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground mb-2", children: t("debug.guards") }),
39487
39495
  /* @__PURE__ */ jsx(Stack, { gap: "xs", children: trait.guards.map((g, i) => /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
39488
39496
  /* @__PURE__ */ jsx(Typography, { variant: "small", children: g.name }),
39489
39497
  /* @__PURE__ */ jsx(Badge, { variant: g.lastResult === true ? "success" : g.lastResult === false ? "danger" : "default", size: "sm", children: g.lastResult === void 0 ? "?" : g.lastResult ? "\u2713" : "\u2717" })
@@ -39526,11 +39534,11 @@ function TicksTab({ ticks: ticks2 }) {
39526
39534
  };
39527
39535
  const TickCard = ({ tick, active }) => /* @__PURE__ */ jsxs(Card, { className: `p-3 ${!active ? "opacity-50" : ""}`, children: [
39528
39536
  /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 mb-2", children: [
39529
- /* @__PURE__ */ jsx("span", { className: `w-2 h-2 rounded-full ${active ? "bg-green-500" : "bg-gray-400"}` }),
39530
- /* @__PURE__ */ jsx(Typography, { variant: "body", weight: "semibold", className: "text-amber-600 dark:text-amber-400", children: tick.name }),
39531
- /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-gray-500", children: tick.traitName })
39537
+ /* @__PURE__ */ jsx("span", { className: `w-2 h-2 rounded-full ${active ? "bg-success" : "bg-muted-foreground"}` }),
39538
+ /* @__PURE__ */ jsx(Typography, { variant: "body", weight: "semibold", className: "text-warning", children: tick.name }),
39539
+ /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground", children: tick.traitName })
39532
39540
  ] }),
39533
- /* @__PURE__ */ jsxs("div", { className: "flex gap-3 text-xs text-gray-500", children: [
39541
+ /* @__PURE__ */ jsxs("div", { className: "flex gap-3 text-xs text-muted-foreground", children: [
39534
39542
  /* @__PURE__ */ jsxs("span", { children: [
39535
39543
  tick.interval,
39536
39544
  "ms"
@@ -39553,7 +39561,7 @@ function TicksTab({ ticks: ticks2 }) {
39553
39561
  ] });
39554
39562
  return /* @__PURE__ */ jsxs("div", { className: "debug-tab debug-tab--ticks", children: [
39555
39563
  activeTicks.length > 0 && /* @__PURE__ */ jsxs("div", { className: "mb-4", children: [
39556
- /* @__PURE__ */ jsxs(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-2", children: [
39564
+ /* @__PURE__ */ jsxs(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground mb-2", children: [
39557
39565
  "Active (",
39558
39566
  activeTicks.length,
39559
39567
  ")"
@@ -39561,7 +39569,7 @@ function TicksTab({ ticks: ticks2 }) {
39561
39569
  /* @__PURE__ */ jsx(Stack, { gap: "sm", children: activeTicks.map((tick) => /* @__PURE__ */ jsx(TickCard, { tick, active: true }, tick.id)) })
39562
39570
  ] }),
39563
39571
  inactiveTicks.length > 0 && /* @__PURE__ */ jsxs("div", { children: [
39564
- /* @__PURE__ */ jsxs(Typography, { variant: "small", weight: "medium", className: "text-gray-400 mb-2", children: [
39572
+ /* @__PURE__ */ jsxs(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground mb-2", children: [
39565
39573
  "Inactive (",
39566
39574
  inactiveTicks.length,
39567
39575
  ")"
@@ -39609,33 +39617,33 @@ function EntitiesTab({ snapshot }) {
39609
39617
  id: `singleton-${name}`,
39610
39618
  header: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
39611
39619
  /* @__PURE__ */ jsx(Badge, { variant: "primary", size: "sm", children: t("debug.singleton") }),
39612
- /* @__PURE__ */ jsx(Typography, { variant: "body", weight: "semibold", className: "text-sky-600 dark:text-sky-400", children: name })
39620
+ /* @__PURE__ */ jsx(Typography, { variant: "body", weight: "semibold", className: "text-info", children: name })
39613
39621
  ] }),
39614
- content: /* @__PURE__ */ 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) })
39622
+ content: /* @__PURE__ */ jsx("pre", { className: "text-xs text-muted-foreground bg-muted p-2 rounded overflow-auto max-h-40", children: JSON.stringify(data, null, 2) })
39615
39623
  }));
39616
39624
  const runtimeItems = runtimeEntities.slice(0, 20).map((entity) => ({
39617
39625
  id: entity.id,
39618
39626
  header: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
39619
- /* @__PURE__ */ jsx(Typography, { variant: "body", weight: "semibold", className: "text-sky-600 dark:text-sky-400", children: entity.type }),
39620
- /* @__PURE__ */ jsxs(Typography, { variant: "small", className: "text-gray-500", children: [
39627
+ /* @__PURE__ */ jsx(Typography, { variant: "body", weight: "semibold", className: "text-info", children: entity.type }),
39628
+ /* @__PURE__ */ jsxs(Typography, { variant: "small", className: "text-muted-foreground", children: [
39621
39629
  "#",
39622
39630
  entity.id.slice(0, 8)
39623
39631
  ] })
39624
39632
  ] }),
39625
- content: /* @__PURE__ */ 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) })
39633
+ content: /* @__PURE__ */ 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) })
39626
39634
  }));
39627
39635
  return /* @__PURE__ */ jsxs("div", { className: "debug-tab debug-tab--entities", children: [
39628
39636
  singletonItems.length > 0 && /* @__PURE__ */ jsxs("div", { className: "mb-4", children: [
39629
- /* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-2", children: t("debug.singletonsCount", { count: singletonItems.length }) }),
39637
+ /* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground mb-2", children: t("debug.singletonsCount", { count: singletonItems.length }) }),
39630
39638
  /* @__PURE__ */ jsx(Accordion, { items: singletonItems, multiple: true })
39631
39639
  ] }),
39632
39640
  runtimeItems.length > 0 && /* @__PURE__ */ jsxs("div", { className: "mb-4", children: [
39633
- /* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-2", children: t("debug.runtimeCount", { count: runtimeEntities.length }) }),
39641
+ /* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground mb-2", children: t("debug.runtimeCount", { count: runtimeEntities.length }) }),
39634
39642
  /* @__PURE__ */ jsx(Accordion, { items: runtimeItems, multiple: true }),
39635
- runtimeEntities.length > 20 && /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-gray-400 text-center mt-2", children: t("debug.moreEntities", { count: runtimeEntities.length - 20 }) })
39643
+ runtimeEntities.length > 20 && /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground text-center mt-2", children: t("debug.moreEntities", { count: runtimeEntities.length - 20 }) })
39636
39644
  ] }),
39637
39645
  persistentEntries.length > 0 && /* @__PURE__ */ jsxs("div", { children: [
39638
- /* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-2", children: t("debug.persistent") }),
39646
+ /* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground mb-2", children: t("debug.persistent") }),
39639
39647
  /* @__PURE__ */ jsx(Stack, { gap: "xs", children: persistentEntries.map(([type, info]) => /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between py-1", children: [
39640
39648
  /* @__PURE__ */ jsx(Typography, { variant: "small", children: type }),
39641
39649
  /* @__PURE__ */ jsx(Badge, { variant: info.loaded ? "success" : "default", size: "sm", children: info.loaded ? t("debug.loadedCount", { count: info.count }) : t("debug.notLoaded") })
@@ -39720,7 +39728,7 @@ function EventFlowTab({ events: events2 }) {
39720
39728
  );
39721
39729
  })
39722
39730
  ] }),
39723
- /* @__PURE__ */ jsxs("label", { className: "flex items-center gap-1 text-xs text-gray-500 ml-auto cursor-pointer", children: [
39731
+ /* @__PURE__ */ jsxs("label", { className: "flex items-center gap-1 text-xs text-muted-foreground ml-auto cursor-pointer", children: [
39724
39732
  /* @__PURE__ */ jsx(
39725
39733
  Checkbox,
39726
39734
  {
@@ -39735,18 +39743,18 @@ function EventFlowTab({ events: events2 }) {
39735
39743
  "div",
39736
39744
  {
39737
39745
  ref: containerRef,
39738
- className: "max-h-64 overflow-y-auto space-y-1 bg-gray-50 dark:bg-gray-800 rounded p-2",
39746
+ className: "max-h-64 overflow-y-auto space-y-1 bg-muted rounded p-2",
39739
39747
  children: filteredEvents.slice(-100).map((event) => {
39740
39748
  const { variant, icon } = TYPE_BADGES[event.type] || { variant: "default", icon: "\u2022" };
39741
39749
  return /* @__PURE__ */ jsxs(
39742
39750
  "div",
39743
39751
  {
39744
- className: "flex items-start gap-2 text-xs py-1 hover:bg-gray-100 dark:hover:bg-gray-700 rounded px-1",
39752
+ className: "flex items-start gap-2 text-xs py-1 hover:bg-muted/50 rounded px-1",
39745
39753
  children: [
39746
- /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-gray-400 font-mono min-w-[65px]", children: formatTime2(event.timestamp) }),
39754
+ /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground font-mono min-w-[65px]", children: formatTime2(event.timestamp) }),
39747
39755
  /* @__PURE__ */ jsx("span", { children: icon }),
39748
39756
  /* @__PURE__ */ jsx(Badge, { variant, size: "sm", className: "min-w-[60px] justify-center", children: event.source }),
39749
- /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-gray-600 dark:text-gray-400", children: event.message })
39757
+ /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground", children: event.message })
39750
39758
  ]
39751
39759
  },
39752
39760
  event.id
@@ -39810,21 +39818,21 @@ function GuardsPanel({ guards }) {
39810
39818
  id: guard.id,
39811
39819
  header: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 w-full", children: [
39812
39820
  /* @__PURE__ */ jsx(Badge, { variant: guard.result ? "success" : "danger", size: "sm", children: guard.result ? "\u2713" : "\u2717" }),
39813
- /* @__PURE__ */ jsx(Typography, { variant: "body", weight: "semibold", className: "text-amber-600 dark:text-amber-400", children: guard.guardName }),
39814
- /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-gray-500", children: guard.context.type === "transition" ? `${guard.context.transitionFrom} \u2192 ${guard.context.transitionTo}` : guard.context.tickName }),
39815
- /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-gray-400 ml-auto", children: formatTime2(guard.timestamp) })
39821
+ /* @__PURE__ */ jsx(Typography, { variant: "body", weight: "semibold", className: "text-warning", children: guard.guardName }),
39822
+ /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground", children: guard.context.type === "transition" ? `${guard.context.transitionFrom} \u2192 ${guard.context.transitionTo}` : guard.context.tickName }),
39823
+ /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground ml-auto", children: formatTime2(guard.timestamp) })
39816
39824
  ] }),
39817
39825
  content: /* @__PURE__ */ jsxs(Stack, { gap: "sm", children: [
39818
39826
  /* @__PURE__ */ jsxs("div", { children: [
39819
- /* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500", children: t("debug.expression") }),
39820
- /* @__PURE__ */ 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 })
39827
+ /* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground", children: t("debug.expression") }),
39828
+ /* @__PURE__ */ jsx("code", { className: "block mt-1 text-xs text-warning bg-warning/10 px-2 py-1 rounded", children: guard.expression })
39821
39829
  ] }),
39822
39830
  /* @__PURE__ */ jsxs("div", { children: [
39823
- /* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500", children: t("debug.inputs") }),
39824
- /* @__PURE__ */ 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) })
39831
+ /* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground", children: t("debug.inputs") }),
39832
+ /* @__PURE__ */ 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) })
39825
39833
  ] }),
39826
39834
  /* @__PURE__ */ jsxs("div", { children: [
39827
- /* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500", children: t("debug.trait") }),
39835
+ /* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground", children: t("debug.trait") }),
39828
39836
  /* @__PURE__ */ jsx(Typography, { variant: "small", children: guard.context.traitName })
39829
39837
  ] })
39830
39838
  ] })
@@ -39880,7 +39888,7 @@ function VerificationTab({ checks, summary }) {
39880
39888
  (a, b) => (sortOrder[a.status] ?? 4) - (sortOrder[b.status] ?? 4)
39881
39889
  );
39882
39890
  return /* @__PURE__ */ jsxs("div", { className: "debug-tab debug-tab--verification", children: [
39883
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3 mb-3 p-2 bg-gray-50 dark:bg-gray-800 rounded", children: [
39891
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3 mb-3 p-2 bg-muted rounded", children: [
39884
39892
  /* @__PURE__ */ jsxs(Badge, { variant: "success", size: "sm", children: [
39885
39893
  summary.passed,
39886
39894
  " passed"
@@ -39897,7 +39905,7 @@ function VerificationTab({ checks, summary }) {
39897
39905
  summary.pending,
39898
39906
  " pending"
39899
39907
  ] }),
39900
- /* @__PURE__ */ jsxs(Typography, { variant: "small", className: "text-gray-500 ml-auto", children: [
39908
+ /* @__PURE__ */ jsxs(Typography, { variant: "small", className: "text-muted-foreground ml-auto", children: [
39901
39909
  summary.totalChecks,
39902
39910
  " total checks"
39903
39911
  ] })
@@ -39907,12 +39915,12 @@ function VerificationTab({ checks, summary }) {
39907
39915
  return /* @__PURE__ */ jsxs(
39908
39916
  "div",
39909
39917
  {
39910
- className: "flex items-start gap-2 p-2 rounded hover:bg-gray-50 dark:hover:bg-gray-800",
39918
+ className: "flex items-start gap-2 p-2 rounded hover:bg-muted/50",
39911
39919
  children: [
39912
39920
  /* @__PURE__ */ jsx(Badge, { variant: config.variant, size: "sm", className: "min-w-[20px] justify-center mt-0.5", children: config.icon }),
39913
39921
  /* @__PURE__ */ jsxs("div", { className: "flex-1 min-w-0", children: [
39914
39922
  /* @__PURE__ */ jsx(Typography, { variant: "small", className: "break-words", children: check.label }),
39915
- check.details && /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-gray-500 break-words", children: check.details })
39923
+ check.details && /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground break-words", children: check.details })
39916
39924
  ] }),
39917
39925
  /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground font-mono text-xs shrink-0", children: new Date(check.updatedAt).toLocaleTimeString("en-US", {
39918
39926
  hour12: false,
@@ -39947,10 +39955,10 @@ var init_VerificationTab = __esm({
39947
39955
  function EffectBadge({ effect }) {
39948
39956
  const variant = EFFECT_STATUS_VARIANT[effect.status] || "default";
39949
39957
  const icon = effect.status === "executed" ? "\u2713" : effect.status === "failed" ? "\u2717" : "-";
39950
- return /* @__PURE__ */ 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: [
39958
+ return /* @__PURE__ */ jsxs("span", { className: "inline-flex items-center gap-1 text-xs font-mono bg-muted rounded px-1.5 py-0.5", children: [
39951
39959
  /* @__PURE__ */ jsx(Badge, { variant, size: "sm", className: "!text-[9px] !px-1 !py-0", children: icon }),
39952
- /* @__PURE__ */ jsx("span", { className: "text-gray-600 dark:text-gray-400", children: effect.type }),
39953
- effect.error && /* @__PURE__ */ jsx("span", { className: "text-red-500 truncate max-w-[120px]", title: effect.error, children: effect.error })
39960
+ /* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: effect.type }),
39961
+ effect.error && /* @__PURE__ */ jsx("span", { className: "text-error truncate max-w-[120px]", title: effect.error, children: effect.error })
39954
39962
  ] });
39955
39963
  }
39956
39964
  function TransitionTimeline({ transitions }) {
@@ -39985,8 +39993,8 @@ function TransitionTimeline({ transitions }) {
39985
39993
  const sorted = [...transitions].reverse();
39986
39994
  return /* @__PURE__ */ jsxs("div", { className: "debug-tab debug-tab--timeline", children: [
39987
39995
  /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between mb-2", children: [
39988
- /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-gray-500", children: t("debug.transitionsRecorded", { count: transitions.length }) }),
39989
- /* @__PURE__ */ jsxs("label", { className: "flex items-center gap-1 text-xs text-gray-500 cursor-pointer", children: [
39996
+ /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground", children: t("debug.transitionsRecorded", { count: transitions.length }) }),
39997
+ /* @__PURE__ */ jsxs("label", { className: "flex items-center gap-1 text-xs text-muted-foreground cursor-pointer", children: [
39990
39998
  /* @__PURE__ */ jsx(
39991
39999
  Checkbox,
39992
40000
  {
@@ -40011,22 +40019,22 @@ function TransitionTimeline({ transitions }) {
40011
40019
  {
40012
40020
  className: `
40013
40021
  relative pl-6 pb-3 border-l-2 cursor-pointer
40014
- hover:bg-gray-50 dark:hover:bg-gray-800 rounded-r
40015
- ${hasFailedEffects ? "border-red-300 dark:border-red-700" : "border-gray-200 dark:border-gray-700"}
40022
+ hover:bg-muted/50 rounded-r
40023
+ ${hasFailedEffects ? "border-error" : "border-border"}
40016
40024
  `,
40017
40025
  onClick: () => setExpandedId(isExpanded ? null : trace.id),
40018
40026
  children: [
40019
40027
  /* @__PURE__ */ jsx("div", { className: `
40020
40028
  absolute left-[-5px] top-1 w-2 h-2 rounded-full
40021
- ${hasFailedEffects ? "bg-red-500" : allPassed ? "bg-green-500" : "bg-gray-400"}
40029
+ ${hasFailedEffects ? "bg-error" : allPassed ? "bg-success" : "bg-muted-foreground"}
40022
40030
  ` }),
40023
40031
  /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 text-xs py-1 px-2", children: [
40024
- /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-gray-400 font-mono min-w-[65px]", children: formatTime2(trace.timestamp) }),
40032
+ /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground font-mono min-w-[65px]", children: formatTime2(trace.timestamp) }),
40025
40033
  /* @__PURE__ */ jsx(Badge, { variant: "primary", size: "sm", className: "min-w-[60px] justify-center", children: trace.traitName }),
40026
- /* @__PURE__ */ jsxs(Typography, { variant: "small", className: "font-mono text-gray-600 dark:text-gray-400", children: [
40034
+ /* @__PURE__ */ jsxs(Typography, { variant: "small", className: "font-mono text-muted-foreground", children: [
40027
40035
  trace.from,
40028
40036
  " ",
40029
- /* @__PURE__ */ jsx("span", { className: "text-gray-400", children: "\u2192" }),
40037
+ /* @__PURE__ */ jsx("span", { className: "text-muted-foreground/50", children: "\u2192" }),
40030
40038
  " ",
40031
40039
  trace.to
40032
40040
  ] }),
@@ -40043,9 +40051,9 @@ function TransitionTimeline({ transitions }) {
40043
40051
  ]
40044
40052
  }
40045
40053
  ),
40046
- /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-gray-400 ml-auto", children: t("debug.effectsCount", { count: trace.effects.length }) })
40054
+ /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground ml-auto", children: t("debug.effectsCount", { count: trace.effects.length }) })
40047
40055
  ] }),
40048
- isExpanded && trace.effects.length > 0 && /* @__PURE__ */ 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__ */ jsxs("div", { className: "flex items-center gap-1", children: [
40056
+ isExpanded && trace.effects.length > 0 && /* @__PURE__ */ 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__ */ jsxs("div", { className: "flex items-center gap-1", children: [
40049
40057
  /* @__PURE__ */ jsx(EffectBadge, { effect }),
40050
40058
  effect.args.length > 0 && /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground font-mono text-xs truncate max-w-[200px]", children: JSON.stringify(effect.args) }),
40051
40059
  effect.durationMs !== void 0 && /* @__PURE__ */ jsxs(Typography, { variant: "small", className: "text-muted-foreground text-xs", children: [
@@ -40079,8 +40087,8 @@ var init_TransitionTimeline = __esm({
40079
40087
  }
40080
40088
  });
40081
40089
  function StatRow({ label, value, variant }) {
40082
- return /* @__PURE__ */ 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: [
40083
- /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-gray-500", children: label }),
40090
+ return /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between py-1.5 border-b border-border last:border-b-0", children: [
40091
+ /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground", children: label }),
40084
40092
  variant ? /* @__PURE__ */ jsx(Badge, { variant, size: "sm", children: String(value) }) : /* @__PURE__ */ jsx(Typography, { variant: "small", weight: "semibold", className: "font-mono", children: String(value) })
40085
40093
  ] });
40086
40094
  }
@@ -40109,7 +40117,7 @@ function ServerBridgeTab({ bridge }) {
40109
40117
  return /* @__PURE__ */ jsx("div", { className: "debug-tab debug-tab--bridge", children: /* @__PURE__ */ jsxs(Stack, { gap: "sm", children: [
40110
40118
  /* @__PURE__ */ jsxs(Card, { className: "p-3", children: [
40111
40119
  /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3 mb-3", children: [
40112
- /* @__PURE__ */ jsx("div", { className: `w-3 h-3 rounded-full ${bridge.connected ? "bg-green-500 animate-pulse" : "bg-red-500"}` }),
40120
+ /* @__PURE__ */ jsx("div", { className: `w-3 h-3 rounded-full ${bridge.connected ? "bg-success animate-pulse" : "bg-error"}` }),
40113
40121
  /* @__PURE__ */ jsx(Typography, { variant: "h6", children: bridge.connected ? t("debug.connected") : t("debug.disconnected") })
40114
40122
  ] }),
40115
40123
  /* @__PURE__ */ jsxs(Stack, { gap: "xs", children: [
@@ -40144,11 +40152,11 @@ function ServerBridgeTab({ bridge }) {
40144
40152
  )
40145
40153
  ] })
40146
40154
  ] }),
40147
- bridge.lastError && /* @__PURE__ */ jsxs(Card, { className: "p-3 border-red-200 dark:border-red-800 bg-red-50 dark:bg-red-950", children: [
40148
- /* @__PURE__ */ jsx(Typography, { variant: "small", weight: "semibold", className: "text-red-600 dark:text-red-400 mb-1", children: t("debug.lastError") }),
40149
- /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-red-500 font-mono break-all", children: bridge.lastError })
40155
+ bridge.lastError && /* @__PURE__ */ jsxs(Card, { className: "p-3 border-error/30 bg-error/10", children: [
40156
+ /* @__PURE__ */ jsx(Typography, { variant: "small", weight: "semibold", className: "text-error mb-1", children: t("debug.lastError") }),
40157
+ /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-error font-mono break-all", children: bridge.lastError })
40150
40158
  ] }),
40151
- bridge.connected && /* @__PURE__ */ jsx("div", { className: "text-center py-2", children: /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-gray-400", children: t("debug.totalEventsProcessed", { count: bridge.eventsForwarded + bridge.eventsReceived }) }) })
40159
+ bridge.connected && /* @__PURE__ */ jsx("div", { className: "text-center py-2", children: /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground", children: t("debug.totalEventsProcessed", { count: bridge.eventsForwarded + bridge.eventsReceived }) }) })
40152
40160
  ] }) });
40153
40161
  }
40154
40162
  var init_ServerBridgeTab = __esm({
@@ -40274,7 +40282,7 @@ function EventDispatcherTab({ traits: traits2, schema }) {
40274
40282
  };
40275
40283
  return /* @__PURE__ */ jsxs("div", { className: "debug-tab debug-tab--dispatch", children: [
40276
40284
  /* @__PURE__ */ jsxs("div", { className: "mb-3", children: [
40277
- /* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-1", children: t("debug.activeStates") }),
40285
+ /* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground mb-1", children: t("debug.activeStates") }),
40278
40286
  /* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-1", children: traits2.map((trait) => /* @__PURE__ */ jsxs(Badge, { variant: "success", size: "sm", children: [
40279
40287
  trait.name,
40280
40288
  ": ",
@@ -40282,8 +40290,8 @@ function EventDispatcherTab({ traits: traits2, schema }) {
40282
40290
  ] }, trait.id)) })
40283
40291
  ] }),
40284
40292
  /* @__PURE__ */ jsxs("div", { className: "mb-3", children: [
40285
- /* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-1", children: t("debug.availableEvents") }),
40286
- availableEvents.length === 0 ? /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-gray-400 italic", children: t("debug.noTransitionsFromState") }) : /* @__PURE__ */ jsx(Stack, { gap: "xs", children: availableEvents.map(({ event, transitions }) => /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
40293
+ /* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground mb-1", children: t("debug.availableEvents") }),
40294
+ availableEvents.length === 0 ? /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground italic", children: t("debug.noTransitionsFromState") }) : /* @__PURE__ */ jsx(Stack, { gap: "xs", children: availableEvents.map(({ event, transitions }) => /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
40287
40295
  /* @__PURE__ */ jsx(
40288
40296
  Button,
40289
40297
  {
@@ -40294,22 +40302,22 @@ function EventDispatcherTab({ traits: traits2, schema }) {
40294
40302
  children: event
40295
40303
  }
40296
40304
  ),
40297
- /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-gray-500", children: transitions.map((t2) => `${t2.from} -> ${t2.to}`).join(", ") }),
40305
+ /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground", children: transitions.map((t2) => `${t2.from} -> ${t2.to}`).join(", ") }),
40298
40306
  transitions.some((tr) => tr.guard) && /* @__PURE__ */ jsx(Badge, { variant: "warning", size: "sm", children: t("debug.guarded") })
40299
40307
  ] }, event)) })
40300
40308
  ] }),
40301
40309
  unavailableEvents.length > 0 && /* @__PURE__ */ jsxs("div", { className: "mb-3", children: [
40302
- /* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-1", children: t("debug.otherEvents") }),
40310
+ /* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground mb-1", children: t("debug.otherEvents") }),
40303
40311
  /* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-1", children: unavailableEvents.map((event) => /* @__PURE__ */ jsx(Badge, { variant: "default", size: "sm", className: "opacity-50", children: event }, event)) })
40304
40312
  ] }),
40305
40313
  log9.length > 0 && /* @__PURE__ */ jsxs("div", { children: [
40306
- /* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-1", children: t("debug.recentTransitions") }),
40314
+ /* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground mb-1", children: t("debug.recentTransitions") }),
40307
40315
  /* @__PURE__ */ jsx(Stack, { gap: "xs", children: log9.map((entry, i) => /* @__PURE__ */ jsxs(Typography, { variant: "small", className: "font-mono text-xs", children: [
40308
- /* @__PURE__ */ jsx("span", { className: "text-purple-400", children: entry.traitName }),
40316
+ /* @__PURE__ */ jsx("span", { className: "text-primary", children: entry.traitName }),
40309
40317
  " ",
40310
- /* @__PURE__ */ jsx("span", { className: "text-gray-500", children: entry.from }),
40318
+ /* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: entry.from }),
40311
40319
  " -> ",
40312
- /* @__PURE__ */ jsx("span", { className: "text-green-400", children: entry.to })
40320
+ /* @__PURE__ */ jsx("span", { className: "text-success", children: entry.to })
40313
40321
  ] }, i)) })
40314
40322
  ] })
40315
40323
  ] });
@@ -40335,21 +40343,21 @@ var init_RuntimeDebugger = __esm({
40335
40343
  function ServerResponseRow({ sr }) {
40336
40344
  const { t } = useTranslate();
40337
40345
  const entityEntries = Object.entries(sr.dataEntities);
40338
- return /* @__PURE__ */ jsxs("div", { className: "ml-4 pl-2 border-l border-purple-500/30 py-0.5 text-xs font-mono", children: [
40346
+ return /* @__PURE__ */ jsxs("div", { className: "ml-4 pl-2 border-l border-primary py-0.5 text-xs font-mono", children: [
40339
40347
  /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
40340
- /* @__PURE__ */ jsxs("span", { className: sr.success ? "text-green-600 dark:text-green-400" : "text-red-600 dark:text-red-400", children: [
40348
+ /* @__PURE__ */ jsxs("span", { className: sr.success ? "text-success" : "text-error", children: [
40341
40349
  sr.success ? "\u2713" : "\u2717",
40342
40350
  " ",
40343
40351
  t("debug.server")
40344
40352
  ] }),
40345
- /* @__PURE__ */ jsx("span", { className: "text-purple-600 dark:text-purple-300", children: sr.orbitalName }),
40346
- sr.clientEffects > 0 && /* @__PURE__ */ jsx("span", { className: "px-1 rounded bg-purple-500/15 text-purple-600 dark:text-purple-300", children: t("debug.clientEffectsCount", { count: sr.clientEffects }) }),
40347
- sr.emittedEvents.length > 0 && /* @__PURE__ */ jsxs("span", { className: "px-1 rounded bg-blue-500/15 text-blue-300", children: [
40353
+ /* @__PURE__ */ jsx("span", { className: "text-primary", children: sr.orbitalName }),
40354
+ sr.clientEffects > 0 && /* @__PURE__ */ jsx("span", { className: "px-1 rounded bg-primary/10 text-primary", children: t("debug.clientEffectsCount", { count: sr.clientEffects }) }),
40355
+ sr.emittedEvents.length > 0 && /* @__PURE__ */ jsxs("span", { className: "px-1 rounded bg-primary/10 text-primary", children: [
40348
40356
  t("debug.emitLabel"),
40349
40357
  " ",
40350
40358
  sr.emittedEvents.join(", ")
40351
40359
  ] }),
40352
- sr.error && /* @__PURE__ */ jsx("span", { className: "px-1 rounded bg-red-500/15 text-red-600 dark:text-red-400 truncate max-w-[300px]", children: sr.error })
40360
+ sr.error && /* @__PURE__ */ jsx("span", { className: "px-1 rounded bg-error/10 text-error truncate max-w-[300px]", children: sr.error })
40353
40361
  ] }),
40354
40362
  entityEntries.length > 0 && /* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-1 mt-0.5", children: entityEntries.map(([name, count]) => /* @__PURE__ */ jsxs("span", { className: "px-1 rounded bg-[var(--color-card)] text-foreground", children: [
40355
40363
  name,
@@ -40365,9 +40373,9 @@ function TransitionRow({ trace }) {
40365
40373
  if (isServerEntry && trace.serverResponse) {
40366
40374
  return /* @__PURE__ */ jsxs("div", { className: "py-0.5 border-b border-border last:border-0", children: [
40367
40375
  /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-2 text-xs font-mono", children: [
40368
- /* @__PURE__ */ jsx("span", { className: "mt-1.5 w-1.5 h-1.5 rounded-full flex-shrink-0 bg-purple-500" }),
40376
+ /* @__PURE__ */ jsx("span", { className: "mt-1.5 w-1.5 h-1.5 rounded-full flex-shrink-0 bg-primary" }),
40369
40377
  /* @__PURE__ */ jsx(Badge, { variant: "warning", size: "sm", className: "flex-shrink-0", children: trace.event }),
40370
- /* @__PURE__ */ jsx("span", { className: "text-purple-600 dark:text-purple-400 flex-shrink-0", children: t("debug.serverResponse") })
40378
+ /* @__PURE__ */ jsx("span", { className: "text-primary flex-shrink-0", children: t("debug.serverResponse") })
40371
40379
  ] }),
40372
40380
  /* @__PURE__ */ jsx(ServerResponseRow, { sr: trace.serverResponse })
40373
40381
  ] });
@@ -40376,7 +40384,7 @@ function TransitionRow({ trace }) {
40376
40384
  /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-2 text-xs font-mono", children: [
40377
40385
  /* @__PURE__ */ jsx("span", { className: cn(
40378
40386
  "mt-1.5 w-1.5 h-1.5 rounded-full flex-shrink-0",
40379
- hasFailedEffects ? "bg-red-500" : "bg-green-500"
40387
+ hasFailedEffects ? "bg-error" : "bg-success"
40380
40388
  ) }),
40381
40389
  /* @__PURE__ */ jsx(Badge, { variant: "info", size: "sm", className: "flex-shrink-0", children: trace.event }),
40382
40390
  /* @__PURE__ */ jsx("span", { className: "text-foreground flex-shrink-0", children: trace.traitName }),
@@ -40390,7 +40398,7 @@ function TransitionRow({ trace }) {
40390
40398
  ] }),
40391
40399
  trace.effects.length > 0 && /* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-1 ml-6 mt-0.5", children: trace.effects.map((eff, i) => /* @__PURE__ */ jsxs("span", { className: cn(
40392
40400
  "px-1 rounded text-xs",
40393
- 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"
40401
+ eff.status === "executed" ? "bg-success/10 text-success" : eff.status === "failed" ? "bg-error/10 text-error" : "bg-warning/10 text-warning"
40394
40402
  ), children: [
40395
40403
  eff.status === "executed" ? "\u2713" : eff.status === "failed" ? "\u2717" : "-",
40396
40404
  " ",
@@ -40424,7 +40432,7 @@ function VerifyModePanel({
40424
40432
  {
40425
40433
  className: cn(
40426
40434
  "runtime-debugger runtime-debugger--verify",
40427
- "flex flex-col bg-[var(--color-card)] text-[var(--color-foreground)] border-t-2 border-cyan-500",
40435
+ "flex flex-col bg-[var(--color-card)] text-[var(--color-foreground)] border-t-2 border-accent",
40428
40436
  hudBottom ? "" : "fixed bottom-0 left-0 right-0",
40429
40437
  className
40430
40438
  ),
@@ -40445,8 +40453,8 @@ function VerifyModePanel({
40445
40453
  /* @__PURE__ */ jsx("span", { className: "text-foreground/50 w-3", "aria-hidden": true, children: expanded ? "\u25BE" : "\u25B8" }),
40446
40454
  /* @__PURE__ */ jsx(Badge, { variant: failedChecks > 0 ? "danger" : "success", size: "sm", children: failedChecks > 0 ? t("debug.failCount", { count: failedChecks }) : t("debug.ok") }),
40447
40455
  /* @__PURE__ */ jsx("span", { className: "text-foreground/70", children: t("debug.localCount", { count: localCount }) }),
40448
- /* @__PURE__ */ jsx("span", { className: "text-purple-600 dark:text-purple-400", children: t("debug.serverCount", { count: serverCount }) }),
40449
- traitStates && /* @__PURE__ */ jsx("span", { className: "text-cyan-600 dark:text-cyan-400 truncate max-w-[400px]", children: traitStates }),
40456
+ /* @__PURE__ */ jsx("span", { className: "text-primary", children: t("debug.serverCount", { count: serverCount }) }),
40457
+ traitStates && /* @__PURE__ */ jsx("span", { className: "text-accent truncate max-w-[400px]", children: traitStates }),
40450
40458
  !expanded && transitions.length > 0 && /* @__PURE__ */ jsx("span", { className: "ml-auto text-foreground/50", children: t("debug.transitionsCount", { count: transitions.length }) })
40451
40459
  ]
40452
40460
  }
@@ -40641,7 +40649,7 @@ function RuntimeDebugger({
40641
40649
  title: t("debug.openDebugger"),
40642
40650
  children: failedChecks > 0 ? /* @__PURE__ */ jsxs("span", { className: "relative", children: [
40643
40651
  /* @__PURE__ */ jsx("span", { children: "V" }),
40644
- /* @__PURE__ */ jsx("span", { className: "absolute -top-1 -right-2 w-2 h-2 bg-red-500 rounded-full" })
40652
+ /* @__PURE__ */ jsx("span", { className: "absolute -top-1 -right-2 w-2 h-2 bg-error rounded-full" })
40645
40653
  ] }) : /* @__PURE__ */ jsx("span", { children: "V" })
40646
40654
  }
40647
40655
  ) : /* @__PURE__ */ jsxs(Card, { className: "runtime-debugger__panel", children: [
@@ -40729,7 +40737,7 @@ var init_SegmentRenderer = __esm({
40729
40737
  "div",
40730
40738
  {
40731
40739
  className: cn(
40732
- "border border-gray-200 dark:border-gray-700 rounded-lg p-2 md:p-4 overflow-x-auto space-y-6",
40740
+ "border border-border rounded-lg p-2 md:p-4 overflow-x-auto space-y-6",
40733
40741
  containerClassName,
40734
40742
  className
40735
40743
  ),
@@ -45274,7 +45282,11 @@ function useTraitStateMachine(traitBindings, uiSlots, options) {
45274
45282
  crossTraitLog.debug("listen:subscribed", { busKey, targetTrait: binding.trait.name, sourceOrbital, sourceTrait, listenEvent: listen.event, triggers: listen.triggers });
45275
45283
  const unsub = eventBus.on(busKey, (event) => {
45276
45284
  crossTraitLog.debug("listen:fired", { busKey, targetTrait: binding.trait.name, triggers: listen.triggers });
45277
- enqueueAndDrain(listen.triggers, event.payload, binding.trait.name);
45285
+ enqueueAndDrain(
45286
+ listen.triggers,
45287
+ applyListenPayloadMapping(listen.payloadMapping, event.payload),
45288
+ binding.trait.name
45289
+ );
45278
45290
  });
45279
45291
  unsubscribes.push(() => {
45280
45292
  crossTraitLog.debug("listen:unsubscribe", { busKey, targetTrait: binding.trait.name, triggers: listen.triggers });
@@ -45304,7 +45316,7 @@ function useTraitStateMachine(traitBindings, uiSlots, options) {
45304
45316
  }
45305
45317
  for (const event of eventsToFire) {
45306
45318
  stateLog.debug("mount:fire-lifecycle", { event, traitCount: traitBindings.length });
45307
- enqueueAndDrain(event, {});
45319
+ enqueueAndDrain(event, { ...optionsRef.current?.initPayload ?? {} });
45308
45320
  }
45309
45321
  return () => {
45310
45322
  initedTraitsRef.current = /* @__PURE__ */ new Set();
@@ -45345,7 +45357,9 @@ function useResolvedSchema(schema, pageName) {
45345
45357
  trait.listens = callSiteListens.map((l) => ({
45346
45358
  event: l.event,
45347
45359
  triggers: l.triggers,
45348
- source: l.source
45360
+ source: l.source,
45361
+ guard: l.guard,
45362
+ payloadMapping: l.payloadMapping
45349
45363
  }));
45350
45364
  resolvedSchemaLog.info("listens:restored", {
45351
45365
  trait: traitName,
@@ -45504,7 +45518,7 @@ function collectServerActiveTraits(ir, allTraits, mountedTraitNames) {
45504
45518
  }
45505
45519
  return active;
45506
45520
  }
45507
- function TraitInitializer({ traits: traits2, orbitalNames, onNavigate, onLocalFallback, persistence, traitConfigsByName, orbitalsByTrait, embeddedTraits, serverActiveTraits }) {
45521
+ function TraitInitializer({ traits: traits2, routeParams, orbitalNames, onNavigate, onLocalFallback, persistence, traitConfigsByName, orbitalsByTrait, embeddedTraits, serverActiveTraits }) {
45508
45522
  const bridge = useServerBridge();
45509
45523
  const activeTraitNames = useMemo(
45510
45524
  () => new Set(traits2.map((b) => b.trait.name).filter((n) => !!n)),
@@ -45533,43 +45547,48 @@ function TraitInitializer({ traits: traits2, orbitalNames, onNavigate, onLocalFa
45533
45547
  applyServerEffects(effects, uiSlots, onNavigate, embeddedTraits, activeTraitNames);
45534
45548
  }
45535
45549
  }, [bridge.connected, bridge.sendEvent, orbitalNames, uiSlots, onNavigate, embeddedTraits, activeTraitNames, withActiveTraits]);
45536
- const opts = orbitalNames ? { onEventProcessed, navigate: onNavigate, traitConfigsByName, orbitalsByTrait, embeddedTraits } : { navigate: onNavigate, persistence, traitConfigsByName, orbitalsByTrait, embeddedTraits };
45550
+ const opts = orbitalNames ? { onEventProcessed, navigate: onNavigate, traitConfigsByName, orbitalsByTrait, embeddedTraits, initPayload: routeParams } : { navigate: onNavigate, persistence, traitConfigsByName, orbitalsByTrait, embeddedTraits, initPayload: routeParams };
45537
45551
  const { sendEvent } = useTraitStateMachine(traits2, uiSlots, opts);
45538
45552
  const initSentRef = useRef(false);
45539
45553
  const prevTraitsRef = useRef(void 0);
45554
+ const paramsKey = JSON.stringify(routeParams ?? {});
45555
+ const prevParamsKeyRef = useRef(void 0);
45540
45556
  useEffect(() => {
45541
45557
  const refChanged = prevTraitsRef.current !== void 0 && prevTraitsRef.current !== traits2;
45558
+ const paramsChanged = prevParamsKeyRef.current !== void 0 && prevParamsKeyRef.current !== paramsKey;
45542
45559
  navLog.debug("page:traits-effect", () => ({
45543
45560
  refChanged,
45561
+ paramsChanged,
45544
45562
  traitsCount: Array.isArray(traits2) ? traits2.length : -1,
45545
45563
  hadPrev: prevTraitsRef.current !== void 0
45546
45564
  }));
45547
- if (refChanged) {
45548
- navLog.info("page:traits-reset", { traitsCount: Array.isArray(traits2) ? traits2.length : -1 });
45565
+ if (refChanged || paramsChanged) {
45566
+ navLog.info("page:traits-reset", { traitsCount: Array.isArray(traits2) ? traits2.length : -1, paramsChanged });
45549
45567
  uiSlots.clearAll();
45550
45568
  initSentRef.current = false;
45551
45569
  }
45552
45570
  prevTraitsRef.current = traits2;
45553
- }, [traits2, uiSlots]);
45571
+ prevParamsKeyRef.current = paramsKey;
45572
+ }, [traits2, uiSlots, paramsKey]);
45554
45573
  useEffect(() => {
45555
45574
  if (!orbitalNames?.length) {
45556
- const t = setTimeout(() => sendEvent("INIT"), 50);
45575
+ const t = setTimeout(() => sendEvent("INIT", routeParams), 50);
45557
45576
  return () => clearTimeout(t);
45558
45577
  }
45559
45578
  const fallback = setTimeout(() => {
45560
45579
  if (!initSentRef.current) {
45561
- sendEvent("INIT");
45580
+ sendEvent("INIT", routeParams);
45562
45581
  onLocalFallback?.();
45563
45582
  }
45564
45583
  }, 5e3);
45565
45584
  return () => clearTimeout(fallback);
45566
- }, [traits2, orbitalNames, sendEvent, onLocalFallback]);
45585
+ }, [traits2, orbitalNames, sendEvent, onLocalFallback, routeParams]);
45567
45586
  useEffect(() => {
45568
45587
  if (!bridge.connected || !orbitalNames?.length || initSentRef.current) return;
45569
45588
  initSentRef.current = true;
45570
45589
  (async () => {
45571
45590
  for (const name of orbitalNames) {
45572
- const { effects, meta } = await bridge.sendEvent(name, "INIT", withActiveTraits({}));
45591
+ const { effects, meta } = await bridge.sendEvent(name, "INIT", withActiveTraits({ ...routeParams ?? {} }));
45573
45592
  recordServerResponse(name, "INIT", meta);
45574
45593
  const effectTraces = [
45575
45594
  { type: "fetch", args: [], status: "executed" },
@@ -45590,10 +45609,10 @@ function TraitInitializer({ traits: traits2, orbitalNames, onNavigate, onLocalFa
45590
45609
  applyServerEffects(effects, uiSlots, onNavigate, embeddedTraits, activeTraitNames);
45591
45610
  }
45592
45611
  })();
45593
- }, [bridge.connected, orbitalNames, bridge.sendEvent, uiSlots, onNavigate, embeddedTraits, activeTraitNames, withActiveTraits]);
45612
+ }, [bridge.connected, orbitalNames, bridge.sendEvent, uiSlots, onNavigate, embeddedTraits, activeTraitNames, withActiveTraits, routeParams]);
45594
45613
  return null;
45595
45614
  }
45596
- function SchemaRunner({ schema, serverUrl, transport, mockData, pageName, onNavigate, onLocalFallback, persistence }) {
45615
+ function SchemaRunner({ schema, serverUrl, transport, mockData, pageName, routeParams, onNavigate, onLocalFallback, persistence }) {
45597
45616
  const { traits: traits2, allEntities, allTraits, ir } = useResolvedSchema(schema, pageName);
45598
45617
  const allPageTraits = useMemo(() => {
45599
45618
  let base;
@@ -45735,6 +45754,7 @@ function SchemaRunner({ schema, serverUrl, transport, mockData, pageName, onNavi
45735
45754
  TraitInitializer,
45736
45755
  {
45737
45756
  traits: allPageTraits,
45757
+ routeParams,
45738
45758
  orbitalNames: serverUrl || transport ? pageOrbitalNames : void 0,
45739
45759
  traitConfigsByName,
45740
45760
  orbitalsByTrait,
@@ -45812,27 +45832,44 @@ function OrbPreview({
45812
45832
  return [];
45813
45833
  }
45814
45834
  }, [parsedSchema]);
45815
- const initialPageName = useMemo(() => {
45835
+ const initialPageMatch = useMemo(() => {
45816
45836
  if (!initialPagePath) return void 0;
45817
- const match = pages.find(({ page }) => page.path === initialPagePath);
45818
- return match?.page.name;
45837
+ for (const { page } of pages) {
45838
+ const params = page.path ? matchPath(page.path, initialPagePath) : null;
45839
+ if (params !== null) return { name: page.name, params };
45840
+ }
45841
+ return void 0;
45819
45842
  }, [pages, initialPagePath]);
45843
+ const initialPageName = initialPageMatch?.name;
45820
45844
  const [currentPage, setCurrentPage] = useState(initialPageName);
45845
+ const [routeParams, setRouteParams] = useState(initialPageMatch?.params ?? {});
45821
45846
  const prevInitialPagePathRef = useRef(initialPagePath);
45822
45847
  useEffect(() => {
45823
45848
  if (prevInitialPagePathRef.current !== initialPagePath) {
45824
45849
  prevInitialPagePathRef.current = initialPagePath;
45825
45850
  setCurrentPage(initialPageName);
45851
+ setRouteParams(initialPageMatch?.params ?? {});
45826
45852
  }
45827
- }, [initialPagePath, initialPageName]);
45853
+ }, [initialPagePath, initialPageName, initialPageMatch]);
45828
45854
  const handleNavigate = useCallback((path) => {
45829
- const match = pages.find(({ page }) => page.path === path);
45855
+ let match;
45856
+ let params = {};
45857
+ for (const entry of pages) {
45858
+ const m = entry.page.path ? matchPath(entry.page.path, path) : null;
45859
+ if (m !== null) {
45860
+ match = entry;
45861
+ params = m;
45862
+ break;
45863
+ }
45864
+ }
45830
45865
  navLog.debug("handleNavigate", () => ({
45831
45866
  path,
45832
45867
  matched: match?.page.name ?? null,
45868
+ params,
45833
45869
  availablePaths: pages.map((p) => p.page.path)
45834
45870
  }));
45835
- if (match) {
45871
+ if (match?.page.name) {
45872
+ setRouteParams(params);
45836
45873
  setCurrentPage(match.page.name);
45837
45874
  if (typeof window !== "undefined") {
45838
45875
  const url = new URL(window.location.href);
@@ -45902,6 +45939,7 @@ function OrbPreview({
45902
45939
  transport,
45903
45940
  mockData: effectiveMockData,
45904
45941
  pageName: currentPage,
45942
+ routeParams,
45905
45943
  onNavigate: handleNavigate,
45906
45944
  onLocalFallback: handleLocalFallback,
45907
45945
  persistence