@almadar/ui 5.123.0 → 5.125.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) hide show
  1. package/dist/{TraitProvider-YkK6tXDw.d.cts → TraitProvider-Ch79cUcb.d.cts} +6 -1
  2. package/dist/{TraitProvider-YkK6tXDw.d.ts → TraitProvider-Ch79cUcb.d.ts} +6 -1
  3. package/dist/{UserContext-bziZwgFL.d.cts → UserContext-BKckAUv7.d.cts} +5 -5
  4. package/dist/{UserContext-bziZwgFL.d.ts → UserContext-BKckAUv7.d.ts} +5 -5
  5. package/dist/avl/index.cjs +332 -275
  6. package/dist/avl/index.js +334 -277
  7. package/dist/components/index.cjs +284 -248
  8. package/dist/components/index.d.cts +4 -3
  9. package/dist/components/index.d.ts +4 -3
  10. package/dist/components/index.js +284 -248
  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/{offline-executor-aRuNznZx.d.cts → offline-executor-Qz4b6GpF.d.cts} +19 -1
  16. package/dist/{offline-executor-aRuNznZx.d.ts → offline-executor-Qz4b6GpF.d.ts} +19 -1
  17. package/dist/providers/index.cjs +395 -275
  18. package/dist/providers/index.d.cts +6 -6
  19. package/dist/providers/index.d.ts +6 -6
  20. package/dist/providers/index.js +394 -276
  21. package/dist/renderer/index.cjs +8 -0
  22. package/dist/renderer/index.d.cts +2 -2
  23. package/dist/renderer/index.d.ts +2 -2
  24. package/dist/renderer/index.js +1 -1
  25. package/dist/runtime/index.cjs +325 -268
  26. package/dist/runtime/index.d.cts +4 -2
  27. package/dist/runtime/index.d.ts +4 -2
  28. package/dist/runtime/index.js +327 -270
  29. package/package.json +13 -11
  30. package/themes/_contract.md +2 -0
  31. package/themes/almadar-website.css +3 -3
  32. package/themes/almadar.css +4 -4
  33. package/themes/bloomberg-dense.css +2 -2
  34. package/themes/clay.css +417 -0
  35. package/themes/corporate.css +411 -0
  36. package/themes/game-adventure.css +3 -3
  37. package/themes/game-rpg.css +2 -2
  38. package/themes/game-sci-fi.css +1 -1
  39. package/themes/game-ui-pack.css +2 -2
  40. package/themes/gazette.css +2 -2
  41. package/themes/glass.css +428 -0
  42. package/themes/index.css +9 -13
  43. package/themes/kiosk.css +5 -5
  44. package/themes/linear-clean.css +1 -1
  45. package/themes/minimalist.css +2 -2
  46. package/themes/neon.css +3 -3
  47. package/themes/notion-editorial.css +1 -1
  48. package/themes/prism.css +3 -3
  49. package/themes/retro.css +410 -0
  50. package/themes/terminal.css +1 -1
  51. package/themes/trait-wars.css +8 -8
  52. package/themes/wireframe.css +2 -2
  53. package/themes/arctic.css +0 -235
  54. package/themes/copper.css +0 -235
  55. package/themes/ember.css +0 -238
  56. package/themes/forest.css +0 -238
  57. package/themes/lavender.css +0 -233
  58. package/themes/midnight.css +0 -234
  59. package/themes/ocean.css +0 -238
  60. package/themes/rose.css +0 -233
  61. package/themes/sand.css +0 -234
  62. package/themes/slate.css +0 -233
  63. package/themes/sunset.css +0 -238
package/dist/avl/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
2
2
  import * as React91 from 'react';
3
3
  import React91__default, { createContext, useState, useMemo, useRef, useEffect, useContext, useCallback, Suspense, useLayoutEffect, Profiler, useReducer, useSyncExternalStore, lazy, useId } from 'react';
4
- import { getAllPages, OrbitalProvider, EventBusContext, useTraitScopeChain, ServerBridgeProvider, VerificationProvider, EntitySchemaProvider, OrbitalThemeProvider, useServerBridge, useEntitySchema, useEntitySchemaOptional, TraitScopeProvider, useCurrentPagePath, useGameAudioContextOptional } from '@almadar/ui/providers';
4
+ import { getAllPages, matchPathAmong, OrbitalProvider, EventBusContext, useTraitScopeChain, ServerBridgeProvider, VerificationProvider, EntitySchemaProvider, OrbitalThemeProvider, useServerBridge, useEntitySchema, useEntitySchemaOptional, TraitScopeProvider, useCurrentPagePath, useGameAudioContextOptional } from '@almadar/ui/providers';
5
5
  import { createLogger, setNamespaceLevel, isLogLevelEnabled } from '@almadar/logger';
6
6
  import ELK from 'elkjs/lib/elk.bundled.js';
7
7
  import { MarkerType, useReactFlow, Handle, Position, getBezierPath, EdgeLabelRenderer, useNodeId, ReactFlowProvider, BaseEdge, useNodesState, useEdgesState, ReactFlow, Controls, Background, BackgroundVariant } from '@xyflow/react';
@@ -66,7 +66,7 @@ import ReactMarkdown from 'react-markdown';
66
66
  import remarkGfm from 'remark-gfm';
67
67
  import remarkMath from 'remark-math';
68
68
  import rehypeKatex from 'rehype-katex';
69
- import { FieldTypeSchema, isInlineTrait, isPageReference, buildResolvedTraitConfigs, schemaToIR, getPage, mergeEntityFrame, isCircuitEvent, walkSExpr, isSExpr, isEventPayloadValue } from '@almadar/core';
69
+ import { FieldTypeSchema, isInlineTrait, isPageReference, buildResolvedTraitConfigs, schemaToIR, getPage, mergeEntityFrame, isCircuitEvent, applyListenPayloadMapping, walkSExpr, isSExpr, isEventPayloadValue } from '@almadar/core';
70
70
  import { useDroppable, useDraggable, DndContext, DragOverlay, useSensors, useSensor, PointerSensor, KeyboardSensor, pointerWithin, rectIntersection, closestCorners } from '@dnd-kit/core';
71
71
  import { sortableKeyboardCoordinates, useSortable, arrayMove, SortableContext, rectSortingStrategy, verticalListSortingStrategy } from '@dnd-kit/sortable';
72
72
  import { CSS } from '@dnd-kit/utilities';
@@ -4283,10 +4283,10 @@ var init_ModuleCard = __esm({
4283
4283
  init_avl_atom_types();
4284
4284
  init_MiniStateMachine();
4285
4285
  PERSISTENCE_BORDER = {
4286
- persistent: "border-l-[3px] border-l-blue-500 border-solid",
4287
- runtime: "border-l-[3px] border-l-blue-500 border-dashed",
4288
- singleton: "border-l-[3px] border-l-blue-500 border-double",
4289
- instance: "border-l-[3px] border-l-blue-500 border-dotted"
4286
+ persistent: "border-l-[3px] border-l-primary border-solid",
4287
+ runtime: "border-l-[3px] border-l-primary border-dashed",
4288
+ singleton: "border-l-[3px] border-l-primary border-double",
4289
+ instance: "border-l-[3px] border-l-primary border-dotted"
4290
4290
  };
4291
4291
  PERSISTENCE_ICON = {
4292
4292
  persistent: "\u26C1",
@@ -4316,8 +4316,8 @@ var init_ModuleCard = __esm({
4316
4316
  className: "rounded-lg border border-[var(--color-border)] bg-[var(--color-card)] shadow-sm overflow-hidden",
4317
4317
  style: { minWidth: 280, maxWidth: 400 },
4318
4318
  children: [
4319
- /* @__PURE__ */ jsx(Handle, { type: "target", position: Position.Left, className: "!w-2.5 !h-2.5 !bg-orange-400" }),
4320
- /* @__PURE__ */ jsx(Handle, { type: "source", position: Position.Right, className: "!w-2.5 !h-2.5 !bg-orange-400" }),
4319
+ /* @__PURE__ */ jsx(Handle, { type: "target", position: Position.Left, className: "!w-2.5 !h-2.5 !bg-warning" }),
4320
+ /* @__PURE__ */ jsx(Handle, { type: "source", position: Position.Right, className: "!w-2.5 !h-2.5 !bg-warning" }),
4321
4321
  /* @__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 }) }),
4322
4322
  /* @__PURE__ */ jsxs("div", { className: `px-3 py-2 border-b border-[var(--color-border)] ${PERSISTENCE_BORDER[persistence] ?? ""}`, children: [
4323
4323
  /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5 mb-1.5", children: [
@@ -8366,15 +8366,15 @@ var init_TextHighlight = __esm({
8366
8366
  const typeStyles = {
8367
8367
  question: cn(
8368
8368
  // Blue border for questions
8369
- "bg-card border-b-2 border-primary-600",
8369
+ "bg-card border-b-2 border-primary",
8370
8370
  "hover:bg-muted",
8371
- isActive && "bg-primary-100 ring-2 ring-primary-600"
8371
+ isActive && "bg-primary/10 ring-2 ring-primary"
8372
8372
  ),
8373
8373
  note: cn(
8374
8374
  // Yellow border for notes
8375
- "bg-card border-b-2 border-amber-500",
8375
+ "bg-card border-b-2 border-warning",
8376
8376
  "hover:bg-muted",
8377
- isActive && "bg-amber-100 ring-2 ring-amber-500"
8377
+ isActive && "bg-warning/10 ring-2 ring-warning"
8378
8378
  )
8379
8379
  };
8380
8380
  return /* @__PURE__ */ jsx(
@@ -8720,7 +8720,7 @@ function DayCell({
8720
8720
  {
8721
8721
  className: cn(
8722
8722
  "p-2 text-center cursor-pointer hover:bg-muted transition-colors",
8723
- isToday && "bg-blue-500/10",
8723
+ isToday && "bg-primary/10",
8724
8724
  className
8725
8725
  ),
8726
8726
  onClick: handleClick,
@@ -8731,7 +8731,7 @@ function DayCell({
8731
8731
  variant: "small",
8732
8732
  className: cn(
8733
8733
  "font-medium",
8734
- isToday ? "text-blue-600" : "text-muted-foreground"
8734
+ isToday ? "text-primary" : "text-muted-foreground"
8735
8735
  ),
8736
8736
  children: dayAbbr
8737
8737
  }
@@ -8743,7 +8743,7 @@ function DayCell({
8743
8743
  rounded: "full",
8744
8744
  className: cn(
8745
8745
  "h-8 w-8 mx-auto items-center justify-center",
8746
- isToday && "bg-blue-600 text-white"
8746
+ isToday && "bg-primary text-primary-foreground"
8747
8747
  ),
8748
8748
  children: /* @__PURE__ */ jsx(Typography, { variant: "body", className: "font-semibold", children: safeDate.getDate() })
8749
8749
  }
@@ -15597,19 +15597,19 @@ var init_ActivationBlock = __esm({
15597
15597
  "div",
15598
15598
  {
15599
15599
  className: cn(
15600
- "bg-indigo-50 dark:bg-indigo-900/20 border-2 border-indigo-200 dark:border-indigo-800 rounded-lg p-5 mb-6",
15600
+ "bg-primary/10 border-2 border-primary rounded-lg p-5 mb-6",
15601
15601
  className
15602
15602
  ),
15603
15603
  children: /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-3", children: [
15604
- /* @__PURE__ */ jsx(Lightbulb, { className: "text-indigo-600 dark:text-indigo-400 flex-shrink-0 mt-1", size: 24 }),
15604
+ /* @__PURE__ */ jsx(Lightbulb, { className: "text-primary flex-shrink-0 mt-1", size: 24 }),
15605
15605
  /* @__PURE__ */ jsxs("div", { className: "flex-1", children: [
15606
- /* @__PURE__ */ jsx("h4", { className: "font-semibold text-indigo-900 dark:text-indigo-100 mb-2", children: "Before You Begin..." }),
15607
- /* @__PURE__ */ jsx("p", { className: "text-gray-700 dark:text-gray-300 mb-3 text-sm md:text-base", children: question }),
15606
+ /* @__PURE__ */ jsx("h4", { className: "font-semibold text-primary mb-2", children: "Before You Begin..." }),
15607
+ /* @__PURE__ */ jsx("p", { className: "text-foreground mb-3 text-sm md:text-base", children: question }),
15608
15608
  isExpanded ? /* @__PURE__ */ jsxs(Fragment, { children: [
15609
15609
  /* @__PURE__ */ jsx(
15610
15610
  "textarea",
15611
15611
  {
15612
- 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",
15612
+ 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",
15613
15613
  placeholder: "Jot down your thoughts...",
15614
15614
  value: response,
15615
15615
  onChange: (e) => setResponse(e.target.value),
@@ -15621,7 +15621,7 @@ var init_ActivationBlock = __esm({
15621
15621
  "button",
15622
15622
  {
15623
15623
  onClick: handleSubmit,
15624
- className: "px-4 py-2 bg-indigo-600 text-white rounded-md hover:bg-indigo-700 text-sm font-medium transition-colors",
15624
+ className: "px-4 py-2 bg-primary text-primary-foreground rounded-md hover:bg-primary-hover text-sm font-medium transition-colors",
15625
15625
  children: "Continue to Lesson \u2192"
15626
15626
  }
15627
15627
  ),
@@ -15632,7 +15632,7 @@ var init_ActivationBlock = __esm({
15632
15632
  emit(`UI:${saveEvent}`, { response: "" });
15633
15633
  setIsExpanded(false);
15634
15634
  },
15635
- className: "px-4 py-2 text-indigo-600 dark:text-indigo-400 hover:underline text-sm",
15635
+ className: "px-4 py-2 text-primary hover:underline text-sm",
15636
15636
  children: "Skip for now"
15637
15637
  }
15638
15638
  )
@@ -15641,7 +15641,7 @@ var init_ActivationBlock = __esm({
15641
15641
  "button",
15642
15642
  {
15643
15643
  onClick: () => setIsExpanded(true),
15644
- className: "text-sm text-indigo-600 dark:text-indigo-400 hover:underline font-medium",
15644
+ className: "text-sm text-primary hover:underline font-medium",
15645
15645
  children: "\u2713 Answered \xB7 Edit response"
15646
15646
  }
15647
15647
  )
@@ -16145,7 +16145,7 @@ var init_AuthLayout = __esm({
16145
16145
  VStack,
16146
16146
  {
16147
16147
  className: cn(
16148
- "hidden lg:flex lg:w-1/2 bg-primary-600 relative overflow-hidden",
16148
+ "hidden lg:flex lg:w-1/2 bg-primary relative overflow-hidden",
16149
16149
  "justify-between p-12"
16150
16150
  ),
16151
16151
  style: backgroundImage ? {
@@ -16154,7 +16154,7 @@ var init_AuthLayout = __esm({
16154
16154
  } : void 0,
16155
16155
  gap: "none",
16156
16156
  children: [
16157
- /* @__PURE__ */ jsx(Box, { className: "absolute inset-0 bg-gradient-to-br from-primary-600/90 to-primary-800/90" }),
16157
+ /* @__PURE__ */ jsx(Box, { className: "absolute inset-0 bg-gradient-to-br from-primary/90 to-primary-hover/90" }),
16158
16158
  /* @__PURE__ */ jsx(Box, { className: "relative z-10", children: /* @__PURE__ */ jsxs(Link, { to: "/", className: "flex items-center gap-3", children: [
16159
16159
  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(
16160
16160
  Typography,
@@ -16239,7 +16239,7 @@ var init_AuthLayout = __esm({
16239
16239
  ),
16240
16240
  children: /* @__PURE__ */ jsxs(Box, { className: "w-full max-w-md", children: [
16241
16241
  /* @__PURE__ */ jsx(Box, { className: "lg:hidden mb-8 text-center", children: /* @__PURE__ */ jsxs(Link, { to: "/", className: "inline-flex items-center gap-3", children: [
16242
- logo || /* @__PURE__ */ jsx(Box, { className: "w-12 h-12 bg-primary-600 rounded-xl flex items-center justify-center", children: /* @__PURE__ */ jsx(
16242
+ logo || /* @__PURE__ */ jsx(Box, { className: "w-12 h-12 bg-primary rounded-xl flex items-center justify-center", children: /* @__PURE__ */ jsx(
16243
16243
  Typography,
16244
16244
  {
16245
16245
  variant: "body1",
@@ -17403,7 +17403,7 @@ var init_CodeBlock = __esm({
17403
17403
  {
17404
17404
  justify: "between",
17405
17405
  align: "center",
17406
- className: "px-3 py-2 bg-[var(--color-card)] rounded-t-lg border-b border-gray-700",
17406
+ className: "px-3 py-2 bg-[var(--color-card)] rounded-t-lg border-b border-border",
17407
17407
  children: [
17408
17408
  showLanguageBadge && /* @__PURE__ */ jsx(Badge, { variant: "default", size: "sm", children: language }),
17409
17409
  effectiveCopy && /* @__PURE__ */ jsx(
@@ -17412,9 +17412,9 @@ var init_CodeBlock = __esm({
17412
17412
  variant: "ghost",
17413
17413
  size: "sm",
17414
17414
  onClick: handleCopy,
17415
- className: "opacity-0 group-hover:opacity-100 focus:opacity-100 transition-opacity text-muted-foreground hover:text-white",
17415
+ className: "opacity-0 group-hover:opacity-100 focus:opacity-100 transition-opacity text-muted-foreground hover:text-foreground",
17416
17416
  "aria-label": t("common.copy"),
17417
- 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" })
17417
+ children: copied ? /* @__PURE__ */ jsx(Icon, { name: "check", className: "w-4 h-4 text-success" }) : /* @__PURE__ */ jsx(Icon, { name: "copy", className: "w-4 h-4" })
17418
17418
  }
17419
17419
  )
17420
17420
  ]
@@ -17782,12 +17782,12 @@ var init_BloomQuizBlock = __esm({
17782
17782
  init_useEventBus();
17783
17783
  init_cn();
17784
17784
  BLOOM_CONFIG = {
17785
- remember: { color: "bg-gray-500", bgColor: "bg-gray-50 dark:bg-gray-900/30", label: "Remember" },
17786
- understand: { color: "bg-blue-500", bgColor: "bg-blue-50 dark:bg-blue-900/30", label: "Understand" },
17787
- apply: { color: "bg-green-500", bgColor: "bg-green-50 dark:bg-green-900/30", label: "Apply" },
17788
- analyze: { color: "bg-yellow-500", bgColor: "bg-yellow-50 dark:bg-yellow-900/30", label: "Analyze" },
17789
- evaluate: { color: "bg-orange-500", bgColor: "bg-orange-50 dark:bg-orange-900/30", label: "Evaluate" },
17790
- create: { color: "bg-purple-500", bgColor: "bg-purple-50 dark:bg-purple-900/30", label: "Create" }
17785
+ remember: { color: "bg-secondary text-secondary-foreground", bgColor: "bg-muted", label: "Remember" },
17786
+ understand: { color: "bg-info text-info-foreground", bgColor: "bg-info/10", label: "Understand" },
17787
+ apply: { color: "bg-success text-success-foreground", bgColor: "bg-success/10", label: "Apply" },
17788
+ analyze: { color: "bg-warning text-warning-foreground", bgColor: "bg-warning/10", label: "Analyze" },
17789
+ evaluate: { color: "bg-accent text-accent-foreground", bgColor: "bg-accent/10", label: "Evaluate" },
17790
+ create: { color: "bg-primary text-primary-foreground", bgColor: "bg-primary/10", label: "Create" }
17791
17791
  };
17792
17792
  BloomQuizBlock = ({
17793
17793
  level,
@@ -17813,22 +17813,22 @@ var init_BloomQuizBlock = __esm({
17813
17813
  "div",
17814
17814
  {
17815
17815
  className: cn(
17816
- "rounded-lg border border-indigo-100 dark:border-indigo-800 p-4 my-4 transition-all",
17816
+ "rounded-lg border border-primary p-4 my-4 transition-all",
17817
17817
  config.bgColor,
17818
17818
  className
17819
17819
  ),
17820
17820
  children: [
17821
17821
  /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between mb-3", children: [
17822
17822
  /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 flex-wrap", children: [
17823
- index !== void 0 && /* @__PURE__ */ jsxs("span", { className: "text-gray-500 dark:text-gray-400 font-medium text-sm", children: [
17823
+ index !== void 0 && /* @__PURE__ */ jsxs("span", { className: "text-muted-foreground font-medium text-sm", children: [
17824
17824
  "Question ",
17825
17825
  index + 1
17826
17826
  ] }),
17827
- /* @__PURE__ */ jsx("span", { className: cn(config.color, "text-white text-xs px-2 py-1 rounded-full font-medium"), children: config.label })
17827
+ /* @__PURE__ */ jsx("span", { className: cn(config.color, "text-xs px-2 py-1 rounded-full font-medium"), children: config.label })
17828
17828
  ] }),
17829
- isAnswered && /* @__PURE__ */ jsx(CheckCircle, { className: "text-green-600 dark:text-green-400 flex-shrink-0", size: 20 })
17829
+ isAnswered && /* @__PURE__ */ jsx(CheckCircle, { className: "text-success flex-shrink-0", size: 20 })
17830
17830
  ] }),
17831
- /* @__PURE__ */ jsx("div", { className: "font-semibold text-indigo-900 dark:text-indigo-200 mb-3 space-y-2", children: questionSegments.map(
17831
+ /* @__PURE__ */ jsx("div", { className: "font-semibold text-primary mb-3 space-y-2", children: questionSegments.map(
17832
17832
  (segment, idx) => segment.type === "markdown" ? /* @__PURE__ */ jsx(MarkdownContent, { content: segment.content }, `q-md-${idx}`) : /* @__PURE__ */ jsx(
17833
17833
  CodeBlock,
17834
17834
  {
@@ -17842,13 +17842,13 @@ var init_BloomQuizBlock = __esm({
17842
17842
  "button",
17843
17843
  {
17844
17844
  type: "button",
17845
- 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",
17845
+ 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",
17846
17846
  onClick: handleReveal,
17847
17847
  children: revealed ? "Hide Answer" : "Reveal Answer"
17848
17848
  }
17849
17849
  ),
17850
- 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: [
17851
- /* @__PURE__ */ jsx("div", { className: "text-xs text-gray-600 dark:text-gray-400 mb-1 font-medium uppercase tracking-wide", children: "Answer:" }),
17850
+ 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: [
17851
+ /* @__PURE__ */ jsx("div", { className: "text-xs text-muted-foreground mb-1 font-medium uppercase tracking-wide", children: "Answer:" }),
17852
17852
  answerSegments.map(
17853
17853
  (segment, idx) => segment.type === "markdown" ? /* @__PURE__ */ jsx(MarkdownContent, { content: segment.content }, `a-md-${idx}`) : /* @__PURE__ */ jsx(
17854
17854
  CodeBlock,
@@ -18122,12 +18122,12 @@ var init_QuizBlock = __esm({
18122
18122
  }) => {
18123
18123
  const { t } = useTranslate();
18124
18124
  const [revealed, setRevealed] = useState(false);
18125
- 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: [
18125
+ return /* @__PURE__ */ jsx(Card2, { className: cn("my-4 border-primary", className), children: /* @__PURE__ */ jsxs(VStack, { gap: "sm", className: "p-4", children: [
18126
18126
  /* @__PURE__ */ jsxs(HStack, { gap: "sm", align: "start", children: [
18127
- /* @__PURE__ */ jsx(Icon, { icon: HelpCircle, size: "sm", className: "text-blue-500 mt-0.5 shrink-0" }),
18127
+ /* @__PURE__ */ jsx(Icon, { icon: HelpCircle, size: "sm", className: "text-primary mt-0.5 shrink-0" }),
18128
18128
  /* @__PURE__ */ jsx(Typography, { variant: "body", className: "font-medium", children: question })
18129
18129
  ] }),
18130
- 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,
18130
+ 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,
18131
18131
  /* @__PURE__ */ jsx(
18132
18132
  Button,
18133
18133
  {
@@ -20039,7 +20039,7 @@ var init_BookTableOfContents = __esm({
20039
20039
  className: cn(
20040
20040
  "justify-start text-left w-full",
20041
20041
  direction === "rtl" && "text-right",
20042
- isCurrent && "bg-blue-50 dark:bg-blue-950 text-blue-600 dark:text-blue-400"
20042
+ isCurrent && "bg-primary/10 text-primary"
20043
20043
  ),
20044
20044
  children: /* @__PURE__ */ jsx(Box, { className: "truncate", children: /* @__PURE__ */ jsx(Typography, { variant: "body", children: String(chapter.title ?? "") }) })
20045
20045
  },
@@ -21287,7 +21287,7 @@ function CalendarGrid({
21287
21287
  border: true,
21288
21288
  className: cn(
21289
21289
  "cursor-pointer hover:shadow-sm transition-shadow text-xs truncate",
21290
- color ? color : "bg-blue-500/15 border-blue-500/30 text-blue-600"
21290
+ color ? color : "bg-primary/10 border-primary/30 text-primary"
21291
21291
  ),
21292
21292
  onClick: (e) => handleEventClick(event, e),
21293
21293
  children: /* @__PURE__ */ jsx(Typography, { variant: "small", className: "truncate font-medium", children: event.title })
@@ -21385,7 +21385,7 @@ function CalendarGrid({
21385
21385
  onClick: () => handleSlotClick(day, time),
21386
21386
  className: cn(
21387
21387
  "border-l border-border",
21388
- isToday && "bg-blue-50/30"
21388
+ isToday && "bg-primary/10"
21389
21389
  ),
21390
21390
  ...longPressEvent ? {
21391
21391
  onPointerDown: () => startLongPress(day, time),
@@ -23401,31 +23401,31 @@ var init_CodeRunnerPanel = __esm({
23401
23401
  }
23402
23402
  )
23403
23403
  ] }),
23404
- hasOutput && /* @__PURE__ */ jsxs(Box, { className: "rounded-lg border border-gray-700 bg-[#0d0d0d] overflow-hidden", children: [
23404
+ hasOutput && /* @__PURE__ */ jsxs(Box, { className: "rounded-lg border border-border bg-foreground overflow-hidden", children: [
23405
23405
  /* @__PURE__ */ jsxs(
23406
23406
  HStack,
23407
23407
  {
23408
23408
  gap: "sm",
23409
23409
  align: "center",
23410
- className: "px-3 py-2 bg-gray-800 border-b border-gray-700",
23410
+ className: "px-3 py-2 bg-card border-b border-border",
23411
23411
  children: [
23412
- /* @__PURE__ */ jsx(Terminal, { size: 16, className: "text-gray-400" }),
23413
- /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-gray-300 font-medium", children: "Output" })
23412
+ /* @__PURE__ */ jsx(Terminal, { size: 16, className: "text-muted-foreground" }),
23413
+ /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-foreground font-medium", children: "Output" })
23414
23414
  ]
23415
23415
  }
23416
23416
  ),
23417
- /* @__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: [
23418
- output?.stdout ? /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-gray-200 whitespace-pre-wrap", children: output.stdout }) : null,
23419
- output?.stderr ? /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-red-400 whitespace-pre-wrap", children: output.stderr }) : null,
23420
- !output?.stdout && !output?.stderr ? /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-gray-500 italic", children: "No output" }) : null,
23421
- 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: [
23422
- 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" }),
23417
+ /* @__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: [
23418
+ output?.stdout ? /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-background whitespace-pre-wrap", children: output.stdout }) : null,
23419
+ output?.stderr ? /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-error whitespace-pre-wrap", children: output.stderr }) : null,
23420
+ !output?.stdout && !output?.stderr ? /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-background italic", children: "No output" }) : null,
23421
+ 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: [
23422
+ test.passed ? /* @__PURE__ */ jsx(CheckCircle, { size: 14, className: "text-success mt-0.5" }) : /* @__PURE__ */ jsx(XCircle, { size: 14, className: "text-error mt-0.5" }),
23423
23423
  /* @__PURE__ */ jsxs(VStack, { gap: "xs", className: "flex-1", children: [
23424
23424
  /* @__PURE__ */ jsxs(
23425
23425
  Typography,
23426
23426
  {
23427
23427
  variant: "small",
23428
- className: test.passed ? "text-green-400" : "text-red-400",
23428
+ className: test.passed ? "text-success" : "text-error",
23429
23429
  children: [
23430
23430
  "Test ",
23431
23431
  index + 1,
@@ -23434,15 +23434,15 @@ var init_CodeRunnerPanel = __esm({
23434
23434
  ]
23435
23435
  }
23436
23436
  ),
23437
- /* @__PURE__ */ jsxs(Typography, { variant: "small", className: "text-gray-400", children: [
23437
+ /* @__PURE__ */ jsxs(Typography, { variant: "small", className: "text-background", children: [
23438
23438
  "Input: ",
23439
23439
  test.input
23440
23440
  ] }),
23441
- /* @__PURE__ */ jsxs(Typography, { variant: "small", className: "text-gray-400", children: [
23441
+ /* @__PURE__ */ jsxs(Typography, { variant: "small", className: "text-background", children: [
23442
23442
  "Expected: ",
23443
23443
  test.expectedOutput
23444
23444
  ] }),
23445
- /* @__PURE__ */ jsxs(Typography, { variant: "small", className: "text-gray-400", children: [
23445
+ /* @__PURE__ */ jsxs(Typography, { variant: "small", className: "text-background", children: [
23446
23446
  "Actual: ",
23447
23447
  test.actualOutput
23448
23448
  ] })
@@ -23627,14 +23627,14 @@ var init_ConnectionBlock = __esm({
23627
23627
  "div",
23628
23628
  {
23629
23629
  className: cn(
23630
- "bg-emerald-50 dark:bg-emerald-900/20 border-l-4 border-emerald-500 rounded-r-lg p-5 mb-6",
23630
+ "bg-success/10 border-l-4 border-success rounded-r-lg p-5 mb-6",
23631
23631
  className
23632
23632
  ),
23633
23633
  children: /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-3", children: [
23634
- /* @__PURE__ */ jsx(Link2, { className: "text-emerald-600 dark:text-emerald-400 flex-shrink-0 mt-1", size: 20 }),
23634
+ /* @__PURE__ */ jsx(Link2, { className: "text-success flex-shrink-0 mt-1", size: 20 }),
23635
23635
  /* @__PURE__ */ jsxs("div", { className: "flex-1", children: [
23636
- /* @__PURE__ */ jsx("h4", { className: "font-semibold text-emerald-900 dark:text-emerald-100 mb-2", children: "Building On What You Know" }),
23637
- /* @__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 }) })
23636
+ /* @__PURE__ */ jsx("h4", { className: "font-semibold text-success mb-2", children: "Building On What You Know" }),
23637
+ /* @__PURE__ */ jsx("div", { className: "prose dark:prose-invert prose-sm max-w-none text-foreground", children: /* @__PURE__ */ jsx(MarkdownContent, { content }) })
23638
23638
  ] })
23639
23639
  ] })
23640
23640
  }
@@ -23721,7 +23721,7 @@ function CounterStandard({
23721
23721
  variant: "h1",
23722
23722
  className: cn(
23723
23723
  sizeStyles8[size].display,
23724
- "font-bold tabular-nums text-primary-600"
23724
+ "font-bold tabular-nums text-primary"
23725
23725
  ),
23726
23726
  children: resolved.count
23727
23727
  }
@@ -23794,7 +23794,7 @@ function CounterFull({
23794
23794
  variant: "h1",
23795
23795
  className: cn(
23796
23796
  sizeStyles8[size].display,
23797
- "font-bold tabular-nums text-primary-600"
23797
+ "font-bold tabular-nums text-primary"
23798
23798
  ),
23799
23799
  children: resolved.count
23800
23800
  }
@@ -24055,11 +24055,11 @@ var init_DashboardLayout = __esm({
24055
24055
  className: "h-16 px-4 border-b border-border dark:border-border",
24056
24056
  children: [
24057
24057
  /* @__PURE__ */ jsxs(Link, { to: "/", className: "flex items-center gap-2", children: [
24058
- logo || /* @__PURE__ */ jsx(Box, { className: "w-8 h-8 bg-primary-600 rounded-lg flex items-center justify-center", children: /* @__PURE__ */ jsx(
24058
+ logo || /* @__PURE__ */ jsx(Box, { className: "w-8 h-8 bg-primary rounded-lg flex items-center justify-center", children: /* @__PURE__ */ jsx(
24059
24059
  Typography,
24060
24060
  {
24061
24061
  variant: "small",
24062
- className: "text-white font-bold text-sm",
24062
+ className: "text-primary-foreground font-bold text-sm",
24063
24063
  as: "span",
24064
24064
  children: appName.charAt(0).toUpperCase()
24065
24065
  }
@@ -24138,11 +24138,11 @@ var init_DashboardLayout = __esm({
24138
24138
  className: "hidden @md/dashboard:flex items-center gap-1 overflow-x-auto",
24139
24139
  children: [
24140
24140
  /* @__PURE__ */ jsxs(Link, { to: "/", className: "flex items-center gap-2 mr-3 shrink-0", children: [
24141
- logo || /* @__PURE__ */ jsx(Box, { className: "w-7 h-7 bg-primary-600 rounded-lg flex items-center justify-center", children: /* @__PURE__ */ jsx(
24141
+ logo || /* @__PURE__ */ jsx(Box, { className: "w-7 h-7 bg-primary rounded-lg flex items-center justify-center", children: /* @__PURE__ */ jsx(
24142
24142
  Typography,
24143
24143
  {
24144
24144
  variant: "small",
24145
- className: "text-white font-bold text-xs",
24145
+ className: "text-primary-foreground font-bold text-xs",
24146
24146
  as: "span",
24147
24147
  children: appName.charAt(0).toUpperCase()
24148
24148
  }
@@ -24202,8 +24202,8 @@ var init_DashboardLayout = __esm({
24202
24202
  {
24203
24203
  as: "span",
24204
24204
  className: cn(
24205
- "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",
24206
- action.variant === "danger" ? "bg-error" : action.variant === "primary" ? "bg-primary" : "bg-foreground"
24205
+ "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",
24206
+ action.variant === "danger" ? "bg-error text-error-foreground" : action.variant === "primary" ? "bg-primary text-primary-foreground" : "bg-foreground text-background"
24207
24207
  ),
24208
24208
  children: action.badge
24209
24209
  }
@@ -24225,7 +24225,7 @@ var init_DashboardLayout = __esm({
24225
24225
  Box,
24226
24226
  {
24227
24227
  as: "span",
24228
- 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",
24228
+ 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",
24229
24229
  children: unreadCount > 99 ? "99+" : unreadCount
24230
24230
  }
24231
24231
  )
@@ -24508,7 +24508,7 @@ function SubMenu({
24508
24508
  ),
24509
24509
  children: [
24510
24510
  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" })),
24511
- /* @__PURE__ */ jsx(Typography, { variant: "small", className: cn("flex-1", isDanger && "text-red-600"), children: item.label }),
24511
+ /* @__PURE__ */ jsx(Typography, { variant: "small", className: cn("flex-1", isDanger && "text-error"), children: item.label }),
24512
24512
  item.badge !== void 0 && /* @__PURE__ */ jsx("span", { className: "ml-auto text-xs font-medium", children: item.badge })
24513
24513
  ]
24514
24514
  },
@@ -24565,7 +24565,7 @@ function MenuItemRow({
24565
24565
  Typography,
24566
24566
  {
24567
24567
  variant: "small",
24568
- className: cn("flex-1", isDanger && "text-red-600"),
24568
+ className: cn("flex-1", isDanger && "text-error"),
24569
24569
  children: item.label
24570
24570
  }
24571
24571
  ),
@@ -25333,20 +25333,24 @@ function DataGrid({
25333
25333
  const bodyFields = fieldDefs.filter((f3) => f3 !== titleField && !badgeFields.includes(f3));
25334
25334
  const primaryActions = actionDefs.filter((a) => a.variant !== "danger");
25335
25335
  const dangerActions = actionDefs.filter((a) => a.variant === "danger");
25336
- const handleActionClick = (action, itemData) => (e) => {
25337
- e.stopPropagation();
25338
- const payload = {
25339
- id: itemData.id,
25340
- row: itemData
25341
- };
25342
- eventBus.emit(`UI:${action.event}`, payload);
25336
+ const fireAction = (action, itemData) => {
25343
25337
  if (action.navigatesTo) {
25344
25338
  const url = action.navigatesTo.replace(
25345
25339
  /\{\{row\.(\w+(?:\.\w+)*)\}\}/g,
25346
25340
  (_, field) => String(itemData[field] ?? "")
25347
25341
  );
25348
- eventBus.emit("UI:NAVIGATE", { url });
25342
+ eventBus.emit("UI:NAVIGATE", { url, row: itemData });
25343
+ return;
25349
25344
  }
25345
+ const payload = {
25346
+ id: itemData.id,
25347
+ row: itemData
25348
+ };
25349
+ eventBus.emit(`UI:${action.event}`, payload);
25350
+ };
25351
+ const handleActionClick = (action, itemData) => (e) => {
25352
+ e.stopPropagation();
25353
+ fireAction(action, itemData);
25350
25354
  };
25351
25355
  const hasRenderProp = typeof children === "function";
25352
25356
  useEffect(() => {
@@ -25448,10 +25452,7 @@ function DataGrid({
25448
25452
  label: action.label,
25449
25453
  icon: action.icon,
25450
25454
  event: action.event,
25451
- onClick: () => eventBus.emit(`UI:${action.event}`, {
25452
- id: itemData.id,
25453
- row: itemData
25454
- })
25455
+ onClick: () => fireAction(action, itemData)
25455
25456
  }))
25456
25457
  }
25457
25458
  )
@@ -25504,13 +25505,13 @@ function DataGrid({
25504
25505
  }
25505
25506
  ),
25506
25507
  /* @__PURE__ */ jsxs(VStack, { gap: "xs", className: "flex-1 min-w-0", children: [
25507
- titleValue !== void 0 && titleValue !== null && /* @__PURE__ */ jsxs(HStack, { gap: "xs", className: "items-center", children: [
25508
+ titleValue !== void 0 && titleValue !== null && /* @__PURE__ */ jsxs(HStack, { gap: "xs", className: "items-center min-w-0", children: [
25508
25509
  titleField?.icon && renderIconInput(titleField.icon, { size: "sm", className: "text-primary flex-shrink-0" }),
25509
25510
  /* @__PURE__ */ jsx(
25510
25511
  Typography,
25511
25512
  {
25512
25513
  variant: titleField?.variant === "h3" ? "h3" : "h4",
25513
- className: "font-semibold truncate",
25514
+ className: "font-semibold truncate min-w-0",
25514
25515
  children: String(titleValue)
25515
25516
  }
25516
25517
  )
@@ -25568,7 +25569,7 @@ function DataGrid({
25568
25569
  )
25569
25570
  ] }, field.name);
25570
25571
  }) }) }),
25571
- primaryActions.length > 0 && /* @__PURE__ */ jsx(Box, { className: "px-4 py-3 mt-auto border-t border-border", children: /* @__PURE__ */ jsxs(HStack, { gap: "sm", className: "justify-end", children: [
25572
+ primaryActions.length > 0 && /* @__PURE__ */ jsx(Box, { className: "px-4 py-3 mt-auto border-t border-border", children: /* @__PURE__ */ jsxs(HStack, { gap: "sm", className: "justify-end flex-wrap", children: [
25572
25573
  (maxInlineActions != null ? primaryActions.slice(0, maxInlineActions) : primaryActions).map((action, idx) => /* @__PURE__ */ jsxs(
25573
25574
  Button,
25574
25575
  {
@@ -25593,10 +25594,7 @@ function DataGrid({
25593
25594
  label: action.label,
25594
25595
  icon: action.icon,
25595
25596
  event: action.event,
25596
- onClick: () => eventBus.emit(`UI:${action.event}`, {
25597
- id: itemData.id,
25598
- row: itemData
25599
- })
25597
+ onClick: () => fireAction(action, itemData)
25600
25598
  }))
25601
25599
  }
25602
25600
  )
@@ -27523,8 +27521,8 @@ var init_RelationSelect = __esm({
27523
27521
  disabled,
27524
27522
  className: cn(
27525
27523
  "w-full justify-between font-normal",
27526
- error && "border-red-300 focus:border-red-500 focus:ring-red-500",
27527
- isOpen && "ring-2 ring-primary-500 border-primary-500"
27524
+ error && "border-error/50 focus:border-error focus:ring-error",
27525
+ isOpen && "ring-2 ring-primary border-primary"
27528
27526
  ),
27529
27527
  children: [
27530
27528
  /* @__PURE__ */ jsx(
@@ -27604,7 +27602,7 @@ var init_RelationSelect = __esm({
27604
27602
  paddingY: "sm",
27605
27603
  className: cn(
27606
27604
  "text-left text-sm hover:bg-muted focus:outline-none focus:bg-muted",
27607
- option.value === value && "bg-primary-50 text-primary-700",
27605
+ option.value === value && "bg-primary/10 text-primary",
27608
27606
  option.disabled && "opacity-50 cursor-not-allowed"
27609
27607
  ),
27610
27608
  onClick: () => handleSelect(option),
@@ -27761,7 +27759,7 @@ var init_SidePanel = __esm({
27761
27759
  showOverlay && /* @__PURE__ */ jsx(Presence, { show: isOpen, animation: "overlay", children: /* @__PURE__ */ jsx(
27762
27760
  Box,
27763
27761
  {
27764
- className: "fixed inset-0 bg-white/80 backdrop-blur-sm z-40 lg:hidden",
27762
+ className: "fixed inset-0 bg-background/80 backdrop-blur-sm z-40 lg:hidden",
27765
27763
  onClick: handleClose
27766
27764
  }
27767
27765
  ) }),
@@ -28128,7 +28126,7 @@ var init_WizardNavigation = __esm({
28128
28126
  /* @__PURE__ */ jsx(Icon, { name: "chevron-left", size: "sm" }),
28129
28127
  resolvedBackLabel
28130
28128
  ] }) : /* @__PURE__ */ jsx(Box, {}),
28131
- /* @__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) }) }) }),
28129
+ /* @__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) }) }) }),
28132
28130
  isLastStep && showComplete ? /* @__PURE__ */ jsx(Button, { variant: "primary", onClick: handleComplete, disabled: !isValid, children: resolvedCompleteLabel }) : showNext ? /* @__PURE__ */ jsxs(Button, { variant: "primary", onClick: handleNext, disabled: !isValid, children: [
28133
28131
  resolvedNextLabel,
28134
28132
  /* @__PURE__ */ jsx(Icon, { name: "chevron-right", size: "sm" })
@@ -30285,6 +30283,7 @@ var init_Lightbox = __esm({
30285
30283
  {
30286
30284
  className: cn(
30287
30285
  "fixed inset-0 z-50 flex items-center justify-center",
30286
+ // eslint-disable-next-line almadar/no-hardcoded-colors -- media overlay: lightbox scrim behind images
30288
30287
  "bg-black bg-opacity-90",
30289
30288
  className
30290
30289
  ),
@@ -30307,7 +30306,7 @@ var init_Lightbox = __esm({
30307
30306
  "p-2 rounded-full",
30308
30307
  "text-[var(--color-foreground)] bg-[var(--color-card)]",
30309
30308
  "hover:bg-opacity-70 transition-opacity",
30310
- "focus:outline-none focus:ring-2 focus:ring-white"
30309
+ "focus:outline-none focus:ring-2 focus:ring-ring"
30311
30310
  ),
30312
30311
  "aria-label": t("aria.closeModal"),
30313
30312
  children: /* @__PURE__ */ jsx(Icon, { name: "x", className: "w-6 h-6" })
@@ -30326,7 +30325,7 @@ var init_Lightbox = __esm({
30326
30325
  "p-2 rounded-full",
30327
30326
  "text-[var(--color-foreground)] bg-[var(--color-card)]",
30328
30327
  "hover:bg-opacity-70 transition-opacity",
30329
- "focus:outline-none focus:ring-2 focus:ring-white"
30328
+ "focus:outline-none focus:ring-2 focus:ring-ring"
30330
30329
  ),
30331
30330
  "aria-label": t("aria.previousImage"),
30332
30331
  children: /* @__PURE__ */ jsx(Icon, { name: "chevron-left", className: "w-8 h-8" })
@@ -30363,7 +30362,7 @@ var init_Lightbox = __esm({
30363
30362
  "p-2 rounded-full",
30364
30363
  "text-[var(--color-foreground)] bg-[var(--color-card)]",
30365
30364
  "hover:bg-opacity-70 transition-opacity",
30366
- "focus:outline-none focus:ring-2 focus:ring-white"
30365
+ "focus:outline-none focus:ring-2 focus:ring-ring"
30367
30366
  ),
30368
30367
  "aria-label": t("aria.nextImage"),
30369
30368
  children: /* @__PURE__ */ jsx(Icon, { name: "chevron-right", className: "w-8 h-8" })
@@ -30583,7 +30582,7 @@ function TableView({
30583
30582
  col.key
30584
30583
  );
30585
30584
  }),
30586
- hasActions && /* @__PURE__ */ jsx(Box, { "aria-hidden": true })
30585
+ hasActions && /* @__PURE__ */ jsx(Box, { "aria-hidden": true, className: "sticky right-0 bg-[var(--color-surface-subtle)]" })
30587
30586
  ]
30588
30587
  }
30589
30588
  );
@@ -30627,41 +30626,54 @@ function TableView({
30627
30626
  }
30628
30627
  return /* @__PURE__ */ jsx(Box, { role: "cell", className: cellBase, children: /* @__PURE__ */ jsx("span", { className: "truncate", children: formatCell(raw, col.format) }) }, col.key);
30629
30628
  }),
30630
- itemActions && itemActions.length > 0 && /* @__PURE__ */ jsxs(HStack, { gap: "xs", className: "justify-end flex-shrink-0 opacity-60 group-hover:opacity-100 transition-opacity", children: [
30631
- (maxInlineActions != null ? itemActions.slice(0, maxInlineActions) : itemActions).map((action, i) => /* @__PURE__ */ jsxs(
30632
- Button,
30633
- {
30634
- variant: action.variant ?? "ghost",
30635
- size: "sm",
30636
- onClick: handleActionClick(action, row),
30637
- "data-testid": `action-${action.event}`,
30638
- "data-row-id": String(row.id),
30639
- className: cn(action.variant === "danger" && "text-error hover:bg-error/10"),
30640
- children: [
30641
- action.icon && renderIconInput3(action.icon, { size: "xs", className: "mr-1" }),
30642
- action.label
30643
- ]
30644
- },
30645
- i
30646
- )),
30647
- maxInlineActions != null && itemActions.length > maxInlineActions && /* @__PURE__ */ jsx(
30648
- Menu,
30649
- {
30650
- position: "bottom-end",
30651
- trigger: /* @__PURE__ */ jsx(Button, { variant: "ghost", size: "sm", "aria-label": t("common.actions"), "data-testid": "action-overflow", children: /* @__PURE__ */ jsx(Icon, { name: "more-horizontal", size: "xs" }) }),
30652
- items: itemActions.slice(maxInlineActions).map((action) => ({
30653
- label: action.label,
30654
- icon: action.icon,
30655
- event: action.event,
30656
- variant: action.variant === "danger" ? "danger" : "default",
30657
- onClick: () => eventBus.emit(`UI:${action.event}`, {
30658
- id: row.id,
30659
- row
30660
- })
30661
- }))
30662
- }
30663
- )
30664
- ] })
30629
+ itemActions && itemActions.length > 0 && /* @__PURE__ */ jsxs(
30630
+ HStack,
30631
+ {
30632
+ gap: "xs",
30633
+ className: cn(
30634
+ // Pinned: the fixed column tracks routinely overflow the caller's
30635
+ // scroll container, which used to leave the actions off-screen.
30636
+ // Opaque so scrolled cells pass underneath it.
30637
+ "justify-end flex-shrink-0 sticky right-0 z-[1] transition-colors",
30638
+ lk.striped && index % 2 === 1 ? "bg-[var(--color-surface-subtle)]" : "bg-[var(--color-card)] group-hover:bg-[var(--color-surface-subtle)]"
30639
+ ),
30640
+ children: [
30641
+ (maxInlineActions != null ? itemActions.slice(0, maxInlineActions) : itemActions).map((action, i) => /* @__PURE__ */ jsxs(
30642
+ Button,
30643
+ {
30644
+ variant: action.variant ?? "ghost",
30645
+ size: "sm",
30646
+ onClick: handleActionClick(action, row),
30647
+ "data-testid": `action-${action.event}`,
30648
+ "data-row-id": String(row.id),
30649
+ className: cn(action.variant === "danger" && "text-error hover:bg-error/10"),
30650
+ children: [
30651
+ action.icon && renderIconInput3(action.icon, { size: "xs", className: "mr-1" }),
30652
+ action.label
30653
+ ]
30654
+ },
30655
+ i
30656
+ )),
30657
+ maxInlineActions != null && itemActions.length > maxInlineActions && /* @__PURE__ */ jsx(
30658
+ Menu,
30659
+ {
30660
+ position: "bottom-end",
30661
+ trigger: /* @__PURE__ */ jsx(Button, { variant: "ghost", size: "sm", "aria-label": t("common.actions"), "data-testid": "action-overflow", children: /* @__PURE__ */ jsx(Icon, { name: "more-horizontal", size: "xs" }) }),
30662
+ items: itemActions.slice(maxInlineActions).map((action) => ({
30663
+ label: action.label,
30664
+ icon: action.icon,
30665
+ event: action.event,
30666
+ variant: action.variant === "danger" ? "danger" : "default",
30667
+ onClick: () => eventBus.emit(`UI:${action.event}`, {
30668
+ id: row.id,
30669
+ row
30670
+ })
30671
+ }))
30672
+ }
30673
+ )
30674
+ ]
30675
+ }
30676
+ )
30665
30677
  ]
30666
30678
  }
30667
30679
  );
@@ -33436,6 +33448,7 @@ var init_QrScanner = __esm({
33436
33448
  overflow: "hidden",
33437
33449
  rounded: "sm",
33438
33450
  className: cn(
33451
+ // eslint-disable-next-line almadar/no-hardcoded-colors -- media overlay: always over a dark scrim
33439
33452
  "bg-black",
33440
33453
  "aspect-square w-full max-w-md",
33441
33454
  className
@@ -33500,7 +33513,9 @@ var init_QrScanner = __esm({
33500
33513
  type: "button",
33501
33514
  onClick: togglePause,
33502
33515
  className: cn(
33516
+ // eslint-disable-next-line almadar/no-hardcoded-colors -- media overlay: always over a dark scrim
33503
33517
  "rounded-full bg-black bg-opacity-60 p-2 text-white",
33518
+ // eslint-disable-next-line almadar/no-hardcoded-colors -- media overlay: always over a dark scrim
33504
33519
  "hover:bg-opacity-80 focus:outline-none focus:ring-2 focus:ring-white"
33505
33520
  ),
33506
33521
  "aria-label": isPaused ? t("qrScanner.resumeScanning") : t("qrScanner.pauseScanning"),
@@ -33513,7 +33528,9 @@ var init_QrScanner = __esm({
33513
33528
  type: "button",
33514
33529
  onClick: toggleFacing,
33515
33530
  className: cn(
33531
+ // eslint-disable-next-line almadar/no-hardcoded-colors -- media overlay: always over a dark scrim
33516
33532
  "rounded-full bg-black bg-opacity-60 p-2 text-white",
33533
+ // eslint-disable-next-line almadar/no-hardcoded-colors -- media overlay: always over a dark scrim
33517
33534
  "hover:bg-opacity-80 focus:outline-none focus:ring-2 focus:ring-white"
33518
33535
  ),
33519
33536
  "aria-label": currentFacing === "environment" ? t("qrScanner.switchToFrontCamera") : t("qrScanner.switchToRearCamera"),
@@ -33526,7 +33543,9 @@ var init_QrScanner = __esm({
33526
33543
  type: "button",
33527
33544
  onClick: handleMockScan,
33528
33545
  className: cn(
33546
+ // eslint-disable-next-line almadar/no-hardcoded-colors -- media overlay: always over a dark scrim
33529
33547
  "rounded-full bg-black bg-opacity-60 px-3 py-2 text-xs text-white",
33548
+ // eslint-disable-next-line almadar/no-hardcoded-colors -- media overlay: always over a dark scrim
33530
33549
  "hover:bg-opacity-80 focus:outline-none focus:ring-2 focus:ring-white"
33531
33550
  ),
33532
33551
  "aria-label": t("aria.mockScanDev"),
@@ -38343,19 +38362,19 @@ var init_ReflectionBlock = __esm({
38343
38362
  "div",
38344
38363
  {
38345
38364
  className: cn(
38346
- "my-6 border-l-4 border-amber-400 bg-amber-50 dark:bg-amber-900/20 rounded-r-lg p-4",
38365
+ "my-6 border-l-4 border-warning bg-warning/10 rounded-r-lg p-4",
38347
38366
  className
38348
38367
  ),
38349
38368
  children: /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-3", children: [
38350
- /* @__PURE__ */ jsx(PauseCircle, { className: "text-amber-600 dark:text-amber-400 flex-shrink-0 mt-1", size: 20 }),
38369
+ /* @__PURE__ */ jsx(PauseCircle, { className: "text-warning flex-shrink-0 mt-1", size: 20 }),
38351
38370
  /* @__PURE__ */ jsxs("div", { className: "flex-1", children: [
38352
- /* @__PURE__ */ jsx("div", { className: "font-medium text-amber-900 dark:text-amber-100 mb-2", children: "Pause & Reflect" }),
38353
- /* @__PURE__ */ jsx("p", { className: "text-gray-700 dark:text-gray-300 text-sm mb-3", children: prompt }),
38371
+ /* @__PURE__ */ jsx("div", { className: "font-medium text-warning mb-2", children: "Pause & Reflect" }),
38372
+ /* @__PURE__ */ jsx("p", { className: "text-foreground text-sm mb-3", children: prompt }),
38354
38373
  isExpanded ? /* @__PURE__ */ jsxs(Fragment, { children: [
38355
38374
  /* @__PURE__ */ jsx(
38356
38375
  "textarea",
38357
38376
  {
38358
- 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",
38377
+ className: "w-full p-2 border border-input rounded text-sm bg-card text-foreground focus:ring-2 focus:ring-ring focus:border-transparent",
38359
38378
  placeholder: "Your thoughts...",
38360
38379
  value: note,
38361
38380
  onChange: (e) => setNote(e.target.value),
@@ -38366,7 +38385,7 @@ var init_ReflectionBlock = __esm({
38366
38385
  "button",
38367
38386
  {
38368
38387
  onClick: handleSave,
38369
- className: "mt-2 text-sm px-3 py-1 bg-amber-600 text-white rounded hover:bg-amber-700 transition-colors",
38388
+ className: "mt-2 text-sm px-3 py-1 bg-warning text-warning-foreground rounded hover:opacity-90 transition-colors",
38370
38389
  children: "Save & Continue"
38371
38390
  }
38372
38391
  )
@@ -38374,7 +38393,7 @@ var init_ReflectionBlock = __esm({
38374
38393
  "button",
38375
38394
  {
38376
38395
  onClick: () => setIsExpanded(true),
38377
- className: "text-sm text-amber-600 dark:text-amber-400 hover:underline",
38396
+ className: "text-sm text-warning hover:underline",
38378
38397
  children: savedNote ? "\u2713 Answered \xB7 Edit" : "Answer this question"
38379
38398
  }
38380
38399
  )
@@ -38660,7 +38679,7 @@ function DataTable({
38660
38679
  )),
38661
38680
  rowActions && /* @__PURE__ */ jsx("th", { className: "w-12 px-4 py-3" })
38662
38681
  ] }) }),
38663
- /* @__PURE__ */ jsx("tbody", { className: "divide-y divide-gray-200 dark:divide-gray-700", children: isLoading ? /* @__PURE__ */ jsx("tr", { children: /* @__PURE__ */ jsx(
38682
+ /* @__PURE__ */ jsx("tbody", { className: "divide-y divide-border", children: isLoading ? /* @__PURE__ */ jsx("tr", { children: /* @__PURE__ */ jsx(
38664
38683
  "td",
38665
38684
  {
38666
38685
  colSpan: normalizedColumns.length + (selectable ? 1 : 0) + (rowActions ? 1 : 0),
@@ -38980,6 +38999,16 @@ function normalizeFieldDefs(fields) {
38980
38999
  return String(f3);
38981
39000
  });
38982
39001
  }
39002
+ function buildFieldLabelMap(fields) {
39003
+ const map = {};
39004
+ if (!fields) return map;
39005
+ for (const f3 of fields) {
39006
+ if (typeof f3 === "object" && "key" in f3 && f3.header !== void 0 && f3.header !== "") {
39007
+ map[f3.key] = f3.header;
39008
+ }
39009
+ }
39010
+ return map;
39011
+ }
38983
39012
  function buildFieldTypeMap(fields) {
38984
39013
  const map = {};
38985
39014
  if (!fields) return map;
@@ -39031,7 +39060,9 @@ var init_DetailPanel = __esm({
39031
39060
  };
39032
39061
  const effectiveFieldNames = isFieldDefArray(propFields) ? normalizeFieldDefs(propFields) : fieldNames;
39033
39062
  const fieldTypeMap = isFieldDefArray(propFields) ? buildFieldTypeMap(propFields) : {};
39034
- useCallback(
39063
+ const fieldLabelMap = isFieldDefArray(propFields) ? buildFieldLabelMap(propFields) : {};
39064
+ const labelFor = (field) => fieldLabelMap[field] ?? formatFieldLabel(field);
39065
+ const handleActionClick = useCallback(
39035
39066
  (action, data2) => {
39036
39067
  if (action.navigatesTo) {
39037
39068
  const url = action.navigatesTo.replace(
@@ -39066,7 +39097,7 @@ var init_DetailPanel = __esm({
39066
39097
  if (typeof field === "string") {
39067
39098
  const value = getNestedValue(normalizedData, field);
39068
39099
  return {
39069
- label: formatFieldLabel(field),
39100
+ label: labelFor(field),
39070
39101
  value: formatFieldValue(value, field),
39071
39102
  icon: getFieldIcon(field)
39072
39103
  };
@@ -39077,7 +39108,10 @@ var init_DetailPanel = __esm({
39077
39108
  }
39078
39109
  if (normalizedData && effectiveFieldNames) {
39079
39110
  const primaryField = effectiveFieldNames[0];
39080
- if (!title && primaryField && normalizedData[primaryField]) {
39111
+ const titleDerivedFromPrimary = Boolean(
39112
+ !title && primaryField && normalizedData[primaryField]
39113
+ );
39114
+ if (titleDerivedFromPrimary) {
39081
39115
  title = String(normalizedData[primaryField]);
39082
39116
  }
39083
39117
  const statusFields = effectiveFieldNames.filter(
@@ -39096,16 +39130,16 @@ var init_DetailPanel = __esm({
39096
39130
  (f3) => f3.toLowerCase().includes("description") || f3.toLowerCase().includes("note")
39097
39131
  );
39098
39132
  const otherFields = effectiveFieldNames.filter(
39099
- (f3) => f3 !== primaryField && !statusFields.includes(f3) && !progressFields.includes(f3) && !metricFields.includes(f3) && !dateFields.includes(f3) && !descriptionFields.includes(f3)
39133
+ (f3) => (!titleDerivedFromPrimary || f3 !== primaryField) && !statusFields.includes(f3) && !progressFields.includes(f3) && !metricFields.includes(f3) && !dateFields.includes(f3) && !descriptionFields.includes(f3)
39100
39134
  );
39101
39135
  sections = [];
39102
39136
  if (statusFields.length > 0 || otherFields.length > 0) {
39103
39137
  const overviewFields = [];
39104
- [...statusFields, ...otherFields.slice(0, 3)].forEach((field) => {
39138
+ [...statusFields, ...otherFields].forEach((field) => {
39105
39139
  const value = getNestedValue(normalizedData, field);
39106
39140
  if (value !== void 0 && value !== null) {
39107
39141
  overviewFields.push({
39108
- label: formatFieldLabel(field),
39142
+ label: labelFor(field),
39109
39143
  value: renderRichFieldValue(value, field, fieldTypeMap[field]),
39110
39144
  icon: getFieldIcon(field)
39111
39145
  });
@@ -39121,7 +39155,7 @@ var init_DetailPanel = __esm({
39121
39155
  const value = getNestedValue(normalizedData, field);
39122
39156
  if (value !== void 0 && value !== null) {
39123
39157
  metricsFields.push({
39124
- label: formatFieldLabel(field),
39158
+ label: labelFor(field),
39125
39159
  value: renderRichFieldValue(value, field, fieldTypeMap[field]),
39126
39160
  icon: getFieldIcon(field)
39127
39161
  });
@@ -39137,7 +39171,7 @@ var init_DetailPanel = __esm({
39137
39171
  const value = getNestedValue(normalizedData, field);
39138
39172
  if (value !== void 0 && value !== null) {
39139
39173
  timelineFields.push({
39140
- label: formatFieldLabel(field),
39174
+ label: labelFor(field),
39141
39175
  value: renderRichFieldValue(value, field, fieldTypeMap[field]),
39142
39176
  icon: getFieldIcon(field)
39143
39177
  });
@@ -39153,7 +39187,7 @@ var init_DetailPanel = __esm({
39153
39187
  const value = getNestedValue(normalizedData, field);
39154
39188
  if (value !== void 0 && value !== null) {
39155
39189
  descFields.push({
39156
- label: formatFieldLabel(field),
39190
+ label: labelFor(field),
39157
39191
  value: renderRichFieldValue(value, field, fieldTypeMap[field]),
39158
39192
  icon: getFieldIcon(field)
39159
39193
  });
@@ -39201,7 +39235,7 @@ var init_DetailPanel = __esm({
39201
39235
  if (typeof field === "string") {
39202
39236
  const value = normalizedData ? getNestedValue(normalizedData, field) : void 0;
39203
39237
  allFields.push({
39204
- label: formatFieldLabel(field),
39238
+ label: labelFor(field),
39205
39239
  value: renderRichFieldValue(value, field, fieldTypeMap[field]),
39206
39240
  icon: getFieldIcon(field)
39207
39241
  });
@@ -39223,8 +39257,9 @@ var init_DetailPanel = __esm({
39223
39257
  {
39224
39258
  variant: action.variant || "secondary",
39225
39259
  size: "sm",
39226
- action: action.event,
39260
+ action: action.navigatesTo ? void 0 : action.event,
39227
39261
  actionPayload: { row: normalizedData },
39262
+ onClick: action.navigatesTo ? () => handleActionClick(action, normalizedData) : void 0,
39228
39263
  icon: action.icon,
39229
39264
  "data-testid": action.event ? `action-${action.event}` : void 0,
39230
39265
  "data-row-id": normalizedData?.id !== void 0 ? String(normalizedData.id) : void 0,
@@ -41267,8 +41302,9 @@ var init_MediaGallery = __esm({
41267
41302
  )
41268
41303
  }
41269
41304
  ),
41270
- 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 }) }),
41271
- 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" }) })
41305
+ item.caption && // eslint-disable-next-line almadar/no-hardcoded-colors -- media overlay: caption scrim over image
41306
+ /* @__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 }) }),
41307
+ 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" }) })
41272
41308
  ]
41273
41309
  },
41274
41310
  item.id
@@ -41297,7 +41333,7 @@ var init_MediaGallery = __esm({
41297
41333
  size: "sm",
41298
41334
  icon: X,
41299
41335
  action: "LIGHTBOX_CLOSE",
41300
- className: "text-white hover:bg-white/20"
41336
+ className: "text-foreground hover:bg-muted/50"
41301
41337
  }
41302
41338
  ) }),
41303
41339
  /* @__PURE__ */ jsx(
@@ -41308,7 +41344,7 @@ var init_MediaGallery = __esm({
41308
41344
  className: "max-w-full max-h-[80vh] object-contain rounded-md"
41309
41345
  }
41310
41346
  ),
41311
- lightboxItem.caption && /* @__PURE__ */ jsx(Typography, { variant: "body", className: "text-white mt-3 text-center", children: lightboxItem.caption })
41347
+ lightboxItem.caption && /* @__PURE__ */ jsx(Typography, { variant: "body", className: "text-foreground mt-3 text-center", children: lightboxItem.caption })
41312
41348
  ]
41313
41349
  }
41314
41350
  )
@@ -41769,7 +41805,7 @@ function WalkMinimap() {
41769
41805
  {
41770
41806
  variant,
41771
41807
  size: "sm",
41772
- className: `flex-shrink-0 text-[9px] ${isActive ? "ring-1 ring-cyan-400" : ""}`,
41808
+ className: `flex-shrink-0 text-[9px] ${isActive ? "ring-1 ring-info" : ""}`,
41773
41809
  children: [
41774
41810
  isDone ? "\u2713" : isActive ? "\u25CF" : "\u25CB",
41775
41811
  " ",
@@ -41910,13 +41946,13 @@ function WalkMinimap() {
41910
41946
  })
41911
41947
  ] }) }),
41912
41948
  /* @__PURE__ */ jsx(Box, { className: "px-2 py-1 border-t border-border", children: /* @__PURE__ */ jsxs(HStack, { gap: "sm", className: "items-center justify-between", children: [
41913
- /* @__PURE__ */ jsxs(Typography, { variant: "caption", className: "text-xs font-mono text-green-500", children: [
41949
+ /* @__PURE__ */ jsxs(Typography, { variant: "caption", className: "text-xs font-mono text-success", children: [
41914
41950
  "Engine: ",
41915
41951
  engineCount,
41916
41952
  "/",
41917
41953
  totalTransitions
41918
41954
  ] }),
41919
- domCount > 0 && /* @__PURE__ */ jsxs(Typography, { variant: "caption", className: "text-xs font-mono text-cyan-500", children: [
41955
+ domCount > 0 && /* @__PURE__ */ jsxs(Typography, { variant: "caption", className: "text-xs font-mono text-info", children: [
41920
41956
  "DOM: ",
41921
41957
  domCount
41922
41958
  ] }),
@@ -41949,13 +41985,13 @@ function TraitsTab({ traits: traits2 }) {
41949
41985
  const accordionItems = traits2.map((trait) => ({
41950
41986
  id: trait.id,
41951
41987
  header: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 w-full", children: [
41952
- /* @__PURE__ */ jsx(Typography, { variant: "body", weight: "semibold", className: "text-purple-600 dark:text-purple-400", children: trait.name }),
41988
+ /* @__PURE__ */ jsx(Typography, { variant: "body", weight: "semibold", className: "text-primary", children: trait.name }),
41953
41989
  /* @__PURE__ */ jsx(Badge, { variant: "success", size: "sm", children: trait.currentState }),
41954
- /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-gray-500 ml-auto", children: t("debug.transitionsCount", { count: trait.transitionCount }) })
41990
+ /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground ml-auto", children: t("debug.transitionsCount", { count: trait.transitionCount }) })
41955
41991
  ] }),
41956
41992
  content: /* @__PURE__ */ jsxs(Stack, { gap: "sm", children: [
41957
41993
  /* @__PURE__ */ jsxs("div", { children: [
41958
- /* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-2", children: t("debug.states") }),
41994
+ /* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground mb-2", children: t("debug.states") }),
41959
41995
  /* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-1", children: trait.states.map((state) => /* @__PURE__ */ jsx(
41960
41996
  Badge,
41961
41997
  {
@@ -41967,18 +42003,18 @@ function TraitsTab({ traits: traits2 }) {
41967
42003
  )) })
41968
42004
  ] }),
41969
42005
  trait.transitions.length > 0 && /* @__PURE__ */ jsxs("div", { children: [
41970
- /* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-2", children: t("debug.transitions") }),
42006
+ /* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground mb-2", children: t("debug.transitions") }),
41971
42007
  /* @__PURE__ */ jsx(Stack, { gap: "xs", children: trait.transitions.map((t2, i) => /* @__PURE__ */ jsxs(Typography, { variant: "small", className: "font-mono", children: [
41972
42008
  t2.from,
41973
42009
  " \u2192 ",
41974
42010
  t2.to,
41975
42011
  " ",
41976
- /* @__PURE__ */ jsxs("span", { className: "text-gray-500", children: [
42012
+ /* @__PURE__ */ jsxs("span", { className: "text-muted-foreground", children: [
41977
42013
  "(",
41978
42014
  t2.event,
41979
42015
  ")"
41980
42016
  ] }),
41981
- t2.guard && /* @__PURE__ */ jsxs("span", { className: "text-amber-500", children: [
42017
+ t2.guard && /* @__PURE__ */ jsxs("span", { className: "text-warning", children: [
41982
42018
  " [",
41983
42019
  t2.guard,
41984
42020
  "]"
@@ -41986,7 +42022,7 @@ function TraitsTab({ traits: traits2 }) {
41986
42022
  ] }, i)) })
41987
42023
  ] }),
41988
42024
  trait.guards.length > 0 && /* @__PURE__ */ jsxs("div", { children: [
41989
- /* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-2", children: t("debug.guards") }),
42025
+ /* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground mb-2", children: t("debug.guards") }),
41990
42026
  /* @__PURE__ */ jsx(Stack, { gap: "xs", children: trait.guards.map((g, i) => /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
41991
42027
  /* @__PURE__ */ jsx(Typography, { variant: "small", children: g.name }),
41992
42028
  /* @__PURE__ */ jsx(Badge, { variant: g.lastResult === true ? "success" : g.lastResult === false ? "danger" : "default", size: "sm", children: g.lastResult === void 0 ? "?" : g.lastResult ? "\u2713" : "\u2717" })
@@ -42029,11 +42065,11 @@ function TicksTab({ ticks: ticks2 }) {
42029
42065
  };
42030
42066
  const TickCard = ({ tick, active }) => /* @__PURE__ */ jsxs(Card, { className: `p-3 ${!active ? "opacity-50" : ""}`, children: [
42031
42067
  /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 mb-2", children: [
42032
- /* @__PURE__ */ jsx("span", { className: `w-2 h-2 rounded-full ${active ? "bg-green-500" : "bg-gray-400"}` }),
42033
- /* @__PURE__ */ jsx(Typography, { variant: "body", weight: "semibold", className: "text-amber-600 dark:text-amber-400", children: tick.name }),
42034
- /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-gray-500", children: tick.traitName })
42068
+ /* @__PURE__ */ jsx("span", { className: `w-2 h-2 rounded-full ${active ? "bg-success" : "bg-muted-foreground"}` }),
42069
+ /* @__PURE__ */ jsx(Typography, { variant: "body", weight: "semibold", className: "text-warning", children: tick.name }),
42070
+ /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground", children: tick.traitName })
42035
42071
  ] }),
42036
- /* @__PURE__ */ jsxs("div", { className: "flex gap-3 text-xs text-gray-500", children: [
42072
+ /* @__PURE__ */ jsxs("div", { className: "flex gap-3 text-xs text-muted-foreground", children: [
42037
42073
  /* @__PURE__ */ jsxs("span", { children: [
42038
42074
  tick.interval,
42039
42075
  "ms"
@@ -42056,7 +42092,7 @@ function TicksTab({ ticks: ticks2 }) {
42056
42092
  ] });
42057
42093
  return /* @__PURE__ */ jsxs("div", { className: "debug-tab debug-tab--ticks", children: [
42058
42094
  activeTicks.length > 0 && /* @__PURE__ */ jsxs("div", { className: "mb-4", children: [
42059
- /* @__PURE__ */ jsxs(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-2", children: [
42095
+ /* @__PURE__ */ jsxs(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground mb-2", children: [
42060
42096
  "Active (",
42061
42097
  activeTicks.length,
42062
42098
  ")"
@@ -42064,7 +42100,7 @@ function TicksTab({ ticks: ticks2 }) {
42064
42100
  /* @__PURE__ */ jsx(Stack, { gap: "sm", children: activeTicks.map((tick) => /* @__PURE__ */ jsx(TickCard, { tick, active: true }, tick.id)) })
42065
42101
  ] }),
42066
42102
  inactiveTicks.length > 0 && /* @__PURE__ */ jsxs("div", { children: [
42067
- /* @__PURE__ */ jsxs(Typography, { variant: "small", weight: "medium", className: "text-gray-400 mb-2", children: [
42103
+ /* @__PURE__ */ jsxs(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground mb-2", children: [
42068
42104
  "Inactive (",
42069
42105
  inactiveTicks.length,
42070
42106
  ")"
@@ -42112,33 +42148,33 @@ function EntitiesTab({ snapshot }) {
42112
42148
  id: `singleton-${name}`,
42113
42149
  header: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
42114
42150
  /* @__PURE__ */ jsx(Badge, { variant: "primary", size: "sm", children: t("debug.singleton") }),
42115
- /* @__PURE__ */ jsx(Typography, { variant: "body", weight: "semibold", className: "text-sky-600 dark:text-sky-400", children: name })
42151
+ /* @__PURE__ */ jsx(Typography, { variant: "body", weight: "semibold", className: "text-info", children: name })
42116
42152
  ] }),
42117
- 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) })
42153
+ 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) })
42118
42154
  }));
42119
42155
  const runtimeItems = runtimeEntities.slice(0, 20).map((entity) => ({
42120
42156
  id: entity.id,
42121
42157
  header: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
42122
- /* @__PURE__ */ jsx(Typography, { variant: "body", weight: "semibold", className: "text-sky-600 dark:text-sky-400", children: entity.type }),
42123
- /* @__PURE__ */ jsxs(Typography, { variant: "small", className: "text-gray-500", children: [
42158
+ /* @__PURE__ */ jsx(Typography, { variant: "body", weight: "semibold", className: "text-info", children: entity.type }),
42159
+ /* @__PURE__ */ jsxs(Typography, { variant: "small", className: "text-muted-foreground", children: [
42124
42160
  "#",
42125
42161
  entity.id.slice(0, 8)
42126
42162
  ] })
42127
42163
  ] }),
42128
- 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) })
42164
+ 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) })
42129
42165
  }));
42130
42166
  return /* @__PURE__ */ jsxs("div", { className: "debug-tab debug-tab--entities", children: [
42131
42167
  singletonItems.length > 0 && /* @__PURE__ */ jsxs("div", { className: "mb-4", children: [
42132
- /* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-2", children: t("debug.singletonsCount", { count: singletonItems.length }) }),
42168
+ /* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground mb-2", children: t("debug.singletonsCount", { count: singletonItems.length }) }),
42133
42169
  /* @__PURE__ */ jsx(Accordion, { items: singletonItems, multiple: true })
42134
42170
  ] }),
42135
42171
  runtimeItems.length > 0 && /* @__PURE__ */ jsxs("div", { className: "mb-4", children: [
42136
- /* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-2", children: t("debug.runtimeCount", { count: runtimeEntities.length }) }),
42172
+ /* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground mb-2", children: t("debug.runtimeCount", { count: runtimeEntities.length }) }),
42137
42173
  /* @__PURE__ */ jsx(Accordion, { items: runtimeItems, multiple: true }),
42138
- runtimeEntities.length > 20 && /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-gray-400 text-center mt-2", children: t("debug.moreEntities", { count: runtimeEntities.length - 20 }) })
42174
+ runtimeEntities.length > 20 && /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground text-center mt-2", children: t("debug.moreEntities", { count: runtimeEntities.length - 20 }) })
42139
42175
  ] }),
42140
42176
  persistentEntries.length > 0 && /* @__PURE__ */ jsxs("div", { children: [
42141
- /* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-2", children: t("debug.persistent") }),
42177
+ /* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground mb-2", children: t("debug.persistent") }),
42142
42178
  /* @__PURE__ */ jsx(Stack, { gap: "xs", children: persistentEntries.map(([type, info]) => /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between py-1", children: [
42143
42179
  /* @__PURE__ */ jsx(Typography, { variant: "small", children: type }),
42144
42180
  /* @__PURE__ */ jsx(Badge, { variant: info.loaded ? "success" : "default", size: "sm", children: info.loaded ? t("debug.loadedCount", { count: info.count }) : t("debug.notLoaded") })
@@ -42223,7 +42259,7 @@ function EventFlowTab({ events: events2 }) {
42223
42259
  );
42224
42260
  })
42225
42261
  ] }),
42226
- /* @__PURE__ */ jsxs("label", { className: "flex items-center gap-1 text-xs text-gray-500 ml-auto cursor-pointer", children: [
42262
+ /* @__PURE__ */ jsxs("label", { className: "flex items-center gap-1 text-xs text-muted-foreground ml-auto cursor-pointer", children: [
42227
42263
  /* @__PURE__ */ jsx(
42228
42264
  Checkbox,
42229
42265
  {
@@ -42238,18 +42274,18 @@ function EventFlowTab({ events: events2 }) {
42238
42274
  "div",
42239
42275
  {
42240
42276
  ref: containerRef,
42241
- className: "max-h-64 overflow-y-auto space-y-1 bg-gray-50 dark:bg-gray-800 rounded p-2",
42277
+ className: "max-h-64 overflow-y-auto space-y-1 bg-muted rounded p-2",
42242
42278
  children: filteredEvents.slice(-100).map((event) => {
42243
42279
  const { variant, icon } = TYPE_BADGES[event.type] || { variant: "default", icon: "\u2022" };
42244
42280
  return /* @__PURE__ */ jsxs(
42245
42281
  "div",
42246
42282
  {
42247
- className: "flex items-start gap-2 text-xs py-1 hover:bg-gray-100 dark:hover:bg-gray-700 rounded px-1",
42283
+ className: "flex items-start gap-2 text-xs py-1 hover:bg-muted/50 rounded px-1",
42248
42284
  children: [
42249
- /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-gray-400 font-mono min-w-[65px]", children: formatTime2(event.timestamp) }),
42285
+ /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground font-mono min-w-[65px]", children: formatTime2(event.timestamp) }),
42250
42286
  /* @__PURE__ */ jsx("span", { children: icon }),
42251
42287
  /* @__PURE__ */ jsx(Badge, { variant, size: "sm", className: "min-w-[60px] justify-center", children: event.source }),
42252
- /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-gray-600 dark:text-gray-400", children: event.message })
42288
+ /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground", children: event.message })
42253
42289
  ]
42254
42290
  },
42255
42291
  event.id
@@ -42313,21 +42349,21 @@ function GuardsPanel({ guards }) {
42313
42349
  id: guard.id,
42314
42350
  header: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 w-full", children: [
42315
42351
  /* @__PURE__ */ jsx(Badge, { variant: guard.result ? "success" : "danger", size: "sm", children: guard.result ? "\u2713" : "\u2717" }),
42316
- /* @__PURE__ */ jsx(Typography, { variant: "body", weight: "semibold", className: "text-amber-600 dark:text-amber-400", children: guard.guardName }),
42317
- /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-gray-500", children: guard.context.type === "transition" ? `${guard.context.transitionFrom} \u2192 ${guard.context.transitionTo}` : guard.context.tickName }),
42318
- /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-gray-400 ml-auto", children: formatTime2(guard.timestamp) })
42352
+ /* @__PURE__ */ jsx(Typography, { variant: "body", weight: "semibold", className: "text-warning", children: guard.guardName }),
42353
+ /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground", children: guard.context.type === "transition" ? `${guard.context.transitionFrom} \u2192 ${guard.context.transitionTo}` : guard.context.tickName }),
42354
+ /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground ml-auto", children: formatTime2(guard.timestamp) })
42319
42355
  ] }),
42320
42356
  content: /* @__PURE__ */ jsxs(Stack, { gap: "sm", children: [
42321
42357
  /* @__PURE__ */ jsxs("div", { children: [
42322
- /* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500", children: t("debug.expression") }),
42323
- /* @__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 })
42358
+ /* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground", children: t("debug.expression") }),
42359
+ /* @__PURE__ */ jsx("code", { className: "block mt-1 text-xs text-warning bg-warning/10 px-2 py-1 rounded", children: guard.expression })
42324
42360
  ] }),
42325
42361
  /* @__PURE__ */ jsxs("div", { children: [
42326
- /* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500", children: t("debug.inputs") }),
42327
- /* @__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) })
42362
+ /* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground", children: t("debug.inputs") }),
42363
+ /* @__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) })
42328
42364
  ] }),
42329
42365
  /* @__PURE__ */ jsxs("div", { children: [
42330
- /* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500", children: t("debug.trait") }),
42366
+ /* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground", children: t("debug.trait") }),
42331
42367
  /* @__PURE__ */ jsx(Typography, { variant: "small", children: guard.context.traitName })
42332
42368
  ] })
42333
42369
  ] })
@@ -42383,7 +42419,7 @@ function VerificationTab({ checks, summary }) {
42383
42419
  (a, b) => (sortOrder[a.status] ?? 4) - (sortOrder[b.status] ?? 4)
42384
42420
  );
42385
42421
  return /* @__PURE__ */ jsxs("div", { className: "debug-tab debug-tab--verification", children: [
42386
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3 mb-3 p-2 bg-gray-50 dark:bg-gray-800 rounded", children: [
42422
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3 mb-3 p-2 bg-muted rounded", children: [
42387
42423
  /* @__PURE__ */ jsxs(Badge, { variant: "success", size: "sm", children: [
42388
42424
  summary.passed,
42389
42425
  " passed"
@@ -42400,7 +42436,7 @@ function VerificationTab({ checks, summary }) {
42400
42436
  summary.pending,
42401
42437
  " pending"
42402
42438
  ] }),
42403
- /* @__PURE__ */ jsxs(Typography, { variant: "small", className: "text-gray-500 ml-auto", children: [
42439
+ /* @__PURE__ */ jsxs(Typography, { variant: "small", className: "text-muted-foreground ml-auto", children: [
42404
42440
  summary.totalChecks,
42405
42441
  " total checks"
42406
42442
  ] })
@@ -42410,12 +42446,12 @@ function VerificationTab({ checks, summary }) {
42410
42446
  return /* @__PURE__ */ jsxs(
42411
42447
  "div",
42412
42448
  {
42413
- className: "flex items-start gap-2 p-2 rounded hover:bg-gray-50 dark:hover:bg-gray-800",
42449
+ className: "flex items-start gap-2 p-2 rounded hover:bg-muted/50",
42414
42450
  children: [
42415
42451
  /* @__PURE__ */ jsx(Badge, { variant: config.variant, size: "sm", className: "min-w-[20px] justify-center mt-0.5", children: config.icon }),
42416
42452
  /* @__PURE__ */ jsxs("div", { className: "flex-1 min-w-0", children: [
42417
42453
  /* @__PURE__ */ jsx(Typography, { variant: "small", className: "break-words", children: check.label }),
42418
- check.details && /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-gray-500 break-words", children: check.details })
42454
+ check.details && /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground break-words", children: check.details })
42419
42455
  ] }),
42420
42456
  /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground font-mono text-xs shrink-0", children: new Date(check.updatedAt).toLocaleTimeString("en-US", {
42421
42457
  hour12: false,
@@ -42450,10 +42486,10 @@ var init_VerificationTab = __esm({
42450
42486
  function EffectBadge({ effect }) {
42451
42487
  const variant = EFFECT_STATUS_VARIANT[effect.status] || "default";
42452
42488
  const icon = effect.status === "executed" ? "\u2713" : effect.status === "failed" ? "\u2717" : "-";
42453
- 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: [
42489
+ 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: [
42454
42490
  /* @__PURE__ */ jsx(Badge, { variant, size: "sm", className: "!text-[9px] !px-1 !py-0", children: icon }),
42455
- /* @__PURE__ */ jsx("span", { className: "text-gray-600 dark:text-gray-400", children: effect.type }),
42456
- effect.error && /* @__PURE__ */ jsx("span", { className: "text-red-500 truncate max-w-[120px]", title: effect.error, children: effect.error })
42491
+ /* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: effect.type }),
42492
+ effect.error && /* @__PURE__ */ jsx("span", { className: "text-error truncate max-w-[120px]", title: effect.error, children: effect.error })
42457
42493
  ] });
42458
42494
  }
42459
42495
  function TransitionTimeline({ transitions }) {
@@ -42488,8 +42524,8 @@ function TransitionTimeline({ transitions }) {
42488
42524
  const sorted = [...transitions].reverse();
42489
42525
  return /* @__PURE__ */ jsxs("div", { className: "debug-tab debug-tab--timeline", children: [
42490
42526
  /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between mb-2", children: [
42491
- /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-gray-500", children: t("debug.transitionsRecorded", { count: transitions.length }) }),
42492
- /* @__PURE__ */ jsxs("label", { className: "flex items-center gap-1 text-xs text-gray-500 cursor-pointer", children: [
42527
+ /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground", children: t("debug.transitionsRecorded", { count: transitions.length }) }),
42528
+ /* @__PURE__ */ jsxs("label", { className: "flex items-center gap-1 text-xs text-muted-foreground cursor-pointer", children: [
42493
42529
  /* @__PURE__ */ jsx(
42494
42530
  Checkbox,
42495
42531
  {
@@ -42514,22 +42550,22 @@ function TransitionTimeline({ transitions }) {
42514
42550
  {
42515
42551
  className: `
42516
42552
  relative pl-6 pb-3 border-l-2 cursor-pointer
42517
- hover:bg-gray-50 dark:hover:bg-gray-800 rounded-r
42518
- ${hasFailedEffects ? "border-red-300 dark:border-red-700" : "border-gray-200 dark:border-gray-700"}
42553
+ hover:bg-muted/50 rounded-r
42554
+ ${hasFailedEffects ? "border-error" : "border-border"}
42519
42555
  `,
42520
42556
  onClick: () => setExpandedId(isExpanded ? null : trace.id),
42521
42557
  children: [
42522
42558
  /* @__PURE__ */ jsx("div", { className: `
42523
42559
  absolute left-[-5px] top-1 w-2 h-2 rounded-full
42524
- ${hasFailedEffects ? "bg-red-500" : allPassed ? "bg-green-500" : "bg-gray-400"}
42560
+ ${hasFailedEffects ? "bg-error" : allPassed ? "bg-success" : "bg-muted-foreground"}
42525
42561
  ` }),
42526
42562
  /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 text-xs py-1 px-2", children: [
42527
- /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-gray-400 font-mono min-w-[65px]", children: formatTime2(trace.timestamp) }),
42563
+ /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground font-mono min-w-[65px]", children: formatTime2(trace.timestamp) }),
42528
42564
  /* @__PURE__ */ jsx(Badge, { variant: "primary", size: "sm", className: "min-w-[60px] justify-center", children: trace.traitName }),
42529
- /* @__PURE__ */ jsxs(Typography, { variant: "small", className: "font-mono text-gray-600 dark:text-gray-400", children: [
42565
+ /* @__PURE__ */ jsxs(Typography, { variant: "small", className: "font-mono text-muted-foreground", children: [
42530
42566
  trace.from,
42531
42567
  " ",
42532
- /* @__PURE__ */ jsx("span", { className: "text-gray-400", children: "\u2192" }),
42568
+ /* @__PURE__ */ jsx("span", { className: "text-muted-foreground/50", children: "\u2192" }),
42533
42569
  " ",
42534
42570
  trace.to
42535
42571
  ] }),
@@ -42546,9 +42582,9 @@ function TransitionTimeline({ transitions }) {
42546
42582
  ]
42547
42583
  }
42548
42584
  ),
42549
- /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-gray-400 ml-auto", children: t("debug.effectsCount", { count: trace.effects.length }) })
42585
+ /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground ml-auto", children: t("debug.effectsCount", { count: trace.effects.length }) })
42550
42586
  ] }),
42551
- 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: [
42587
+ 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: [
42552
42588
  /* @__PURE__ */ jsx(EffectBadge, { effect }),
42553
42589
  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) }),
42554
42590
  effect.durationMs !== void 0 && /* @__PURE__ */ jsxs(Typography, { variant: "small", className: "text-muted-foreground text-xs", children: [
@@ -42582,8 +42618,8 @@ var init_TransitionTimeline = __esm({
42582
42618
  }
42583
42619
  });
42584
42620
  function StatRow({ label, value, variant }) {
42585
- 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: [
42586
- /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-gray-500", children: label }),
42621
+ return /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between py-1.5 border-b border-border last:border-b-0", children: [
42622
+ /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground", children: label }),
42587
42623
  variant ? /* @__PURE__ */ jsx(Badge, { variant, size: "sm", children: String(value) }) : /* @__PURE__ */ jsx(Typography, { variant: "small", weight: "semibold", className: "font-mono", children: String(value) })
42588
42624
  ] });
42589
42625
  }
@@ -42612,7 +42648,7 @@ function ServerBridgeTab({ bridge }) {
42612
42648
  return /* @__PURE__ */ jsx("div", { className: "debug-tab debug-tab--bridge", children: /* @__PURE__ */ jsxs(Stack, { gap: "sm", children: [
42613
42649
  /* @__PURE__ */ jsxs(Card, { className: "p-3", children: [
42614
42650
  /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3 mb-3", children: [
42615
- /* @__PURE__ */ jsx("div", { className: `w-3 h-3 rounded-full ${bridge.connected ? "bg-green-500 animate-pulse" : "bg-red-500"}` }),
42651
+ /* @__PURE__ */ jsx("div", { className: `w-3 h-3 rounded-full ${bridge.connected ? "bg-success animate-pulse" : "bg-error"}` }),
42616
42652
  /* @__PURE__ */ jsx(Typography, { variant: "h6", children: bridge.connected ? t("debug.connected") : t("debug.disconnected") })
42617
42653
  ] }),
42618
42654
  /* @__PURE__ */ jsxs(Stack, { gap: "xs", children: [
@@ -42647,11 +42683,11 @@ function ServerBridgeTab({ bridge }) {
42647
42683
  )
42648
42684
  ] })
42649
42685
  ] }),
42650
- bridge.lastError && /* @__PURE__ */ jsxs(Card, { className: "p-3 border-red-200 dark:border-red-800 bg-red-50 dark:bg-red-950", children: [
42651
- /* @__PURE__ */ jsx(Typography, { variant: "small", weight: "semibold", className: "text-red-600 dark:text-red-400 mb-1", children: t("debug.lastError") }),
42652
- /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-red-500 font-mono break-all", children: bridge.lastError })
42686
+ bridge.lastError && /* @__PURE__ */ jsxs(Card, { className: "p-3 border-error/30 bg-error/10", children: [
42687
+ /* @__PURE__ */ jsx(Typography, { variant: "small", weight: "semibold", className: "text-error mb-1", children: t("debug.lastError") }),
42688
+ /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-error font-mono break-all", children: bridge.lastError })
42653
42689
  ] }),
42654
- 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 }) }) })
42690
+ 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 }) }) })
42655
42691
  ] }) });
42656
42692
  }
42657
42693
  var init_ServerBridgeTab = __esm({
@@ -42777,7 +42813,7 @@ function EventDispatcherTab({ traits: traits2, schema }) {
42777
42813
  };
42778
42814
  return /* @__PURE__ */ jsxs("div", { className: "debug-tab debug-tab--dispatch", children: [
42779
42815
  /* @__PURE__ */ jsxs("div", { className: "mb-3", children: [
42780
- /* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-1", children: t("debug.activeStates") }),
42816
+ /* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground mb-1", children: t("debug.activeStates") }),
42781
42817
  /* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-1", children: traits2.map((trait) => /* @__PURE__ */ jsxs(Badge, { variant: "success", size: "sm", children: [
42782
42818
  trait.name,
42783
42819
  ": ",
@@ -42785,8 +42821,8 @@ function EventDispatcherTab({ traits: traits2, schema }) {
42785
42821
  ] }, trait.id)) })
42786
42822
  ] }),
42787
42823
  /* @__PURE__ */ jsxs("div", { className: "mb-3", children: [
42788
- /* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-1", children: t("debug.availableEvents") }),
42789
- 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: [
42824
+ /* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground mb-1", children: t("debug.availableEvents") }),
42825
+ 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: [
42790
42826
  /* @__PURE__ */ jsx(
42791
42827
  Button,
42792
42828
  {
@@ -42797,22 +42833,22 @@ function EventDispatcherTab({ traits: traits2, schema }) {
42797
42833
  children: event
42798
42834
  }
42799
42835
  ),
42800
- /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-gray-500", children: transitions.map((t2) => `${t2.from} -> ${t2.to}`).join(", ") }),
42836
+ /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground", children: transitions.map((t2) => `${t2.from} -> ${t2.to}`).join(", ") }),
42801
42837
  transitions.some((tr) => tr.guard) && /* @__PURE__ */ jsx(Badge, { variant: "warning", size: "sm", children: t("debug.guarded") })
42802
42838
  ] }, event)) })
42803
42839
  ] }),
42804
42840
  unavailableEvents.length > 0 && /* @__PURE__ */ jsxs("div", { className: "mb-3", children: [
42805
- /* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-1", children: t("debug.otherEvents") }),
42841
+ /* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground mb-1", children: t("debug.otherEvents") }),
42806
42842
  /* @__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)) })
42807
42843
  ] }),
42808
42844
  log11.length > 0 && /* @__PURE__ */ jsxs("div", { children: [
42809
- /* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-1", children: t("debug.recentTransitions") }),
42845
+ /* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground mb-1", children: t("debug.recentTransitions") }),
42810
42846
  /* @__PURE__ */ jsx(Stack, { gap: "xs", children: log11.map((entry, i) => /* @__PURE__ */ jsxs(Typography, { variant: "small", className: "font-mono text-xs", children: [
42811
- /* @__PURE__ */ jsx("span", { className: "text-purple-400", children: entry.traitName }),
42847
+ /* @__PURE__ */ jsx("span", { className: "text-primary", children: entry.traitName }),
42812
42848
  " ",
42813
- /* @__PURE__ */ jsx("span", { className: "text-gray-500", children: entry.from }),
42849
+ /* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: entry.from }),
42814
42850
  " -> ",
42815
- /* @__PURE__ */ jsx("span", { className: "text-green-400", children: entry.to })
42851
+ /* @__PURE__ */ jsx("span", { className: "text-success", children: entry.to })
42816
42852
  ] }, i)) })
42817
42853
  ] })
42818
42854
  ] });
@@ -42838,21 +42874,21 @@ var init_RuntimeDebugger = __esm({
42838
42874
  function ServerResponseRow({ sr }) {
42839
42875
  const { t } = useTranslate();
42840
42876
  const entityEntries = Object.entries(sr.dataEntities);
42841
- return /* @__PURE__ */ jsxs("div", { className: "ml-4 pl-2 border-l border-purple-500/30 py-0.5 text-xs font-mono", children: [
42877
+ return /* @__PURE__ */ jsxs("div", { className: "ml-4 pl-2 border-l border-primary py-0.5 text-xs font-mono", children: [
42842
42878
  /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
42843
- /* @__PURE__ */ jsxs("span", { className: sr.success ? "text-green-600 dark:text-green-400" : "text-red-600 dark:text-red-400", children: [
42879
+ /* @__PURE__ */ jsxs("span", { className: sr.success ? "text-success" : "text-error", children: [
42844
42880
  sr.success ? "\u2713" : "\u2717",
42845
42881
  " ",
42846
42882
  t("debug.server")
42847
42883
  ] }),
42848
- /* @__PURE__ */ jsx("span", { className: "text-purple-600 dark:text-purple-300", children: sr.orbitalName }),
42849
- 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 }) }),
42850
- sr.emittedEvents.length > 0 && /* @__PURE__ */ jsxs("span", { className: "px-1 rounded bg-blue-500/15 text-blue-300", children: [
42884
+ /* @__PURE__ */ jsx("span", { className: "text-primary", children: sr.orbitalName }),
42885
+ sr.clientEffects > 0 && /* @__PURE__ */ jsx("span", { className: "px-1 rounded bg-primary/10 text-primary", children: t("debug.clientEffectsCount", { count: sr.clientEffects }) }),
42886
+ sr.emittedEvents.length > 0 && /* @__PURE__ */ jsxs("span", { className: "px-1 rounded bg-primary/10 text-primary", children: [
42851
42887
  t("debug.emitLabel"),
42852
42888
  " ",
42853
42889
  sr.emittedEvents.join(", ")
42854
42890
  ] }),
42855
- 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 })
42891
+ sr.error && /* @__PURE__ */ jsx("span", { className: "px-1 rounded bg-error/10 text-error truncate max-w-[300px]", children: sr.error })
42856
42892
  ] }),
42857
42893
  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: [
42858
42894
  name,
@@ -42868,9 +42904,9 @@ function TransitionRow({ trace }) {
42868
42904
  if (isServerEntry && trace.serverResponse) {
42869
42905
  return /* @__PURE__ */ jsxs("div", { className: "py-0.5 border-b border-border last:border-0", children: [
42870
42906
  /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-2 text-xs font-mono", children: [
42871
- /* @__PURE__ */ jsx("span", { className: "mt-1.5 w-1.5 h-1.5 rounded-full flex-shrink-0 bg-purple-500" }),
42907
+ /* @__PURE__ */ jsx("span", { className: "mt-1.5 w-1.5 h-1.5 rounded-full flex-shrink-0 bg-primary" }),
42872
42908
  /* @__PURE__ */ jsx(Badge, { variant: "warning", size: "sm", className: "flex-shrink-0", children: trace.event }),
42873
- /* @__PURE__ */ jsx("span", { className: "text-purple-600 dark:text-purple-400 flex-shrink-0", children: t("debug.serverResponse") })
42909
+ /* @__PURE__ */ jsx("span", { className: "text-primary flex-shrink-0", children: t("debug.serverResponse") })
42874
42910
  ] }),
42875
42911
  /* @__PURE__ */ jsx(ServerResponseRow, { sr: trace.serverResponse })
42876
42912
  ] });
@@ -42879,7 +42915,7 @@ function TransitionRow({ trace }) {
42879
42915
  /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-2 text-xs font-mono", children: [
42880
42916
  /* @__PURE__ */ jsx("span", { className: cn(
42881
42917
  "mt-1.5 w-1.5 h-1.5 rounded-full flex-shrink-0",
42882
- hasFailedEffects ? "bg-red-500" : "bg-green-500"
42918
+ hasFailedEffects ? "bg-error" : "bg-success"
42883
42919
  ) }),
42884
42920
  /* @__PURE__ */ jsx(Badge, { variant: "info", size: "sm", className: "flex-shrink-0", children: trace.event }),
42885
42921
  /* @__PURE__ */ jsx("span", { className: "text-foreground flex-shrink-0", children: trace.traitName }),
@@ -42893,7 +42929,7 @@ function TransitionRow({ trace }) {
42893
42929
  ] }),
42894
42930
  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(
42895
42931
  "px-1 rounded text-xs",
42896
- 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"
42932
+ eff.status === "executed" ? "bg-success/10 text-success" : eff.status === "failed" ? "bg-error/10 text-error" : "bg-warning/10 text-warning"
42897
42933
  ), children: [
42898
42934
  eff.status === "executed" ? "\u2713" : eff.status === "failed" ? "\u2717" : "-",
42899
42935
  " ",
@@ -42927,7 +42963,7 @@ function VerifyModePanel({
42927
42963
  {
42928
42964
  className: cn(
42929
42965
  "runtime-debugger runtime-debugger--verify",
42930
- "flex flex-col bg-[var(--color-card)] text-[var(--color-foreground)] border-t-2 border-cyan-500",
42966
+ "flex flex-col bg-[var(--color-card)] text-[var(--color-foreground)] border-t-2 border-accent",
42931
42967
  hudBottom ? "" : "fixed bottom-0 left-0 right-0",
42932
42968
  className
42933
42969
  ),
@@ -42948,8 +42984,8 @@ function VerifyModePanel({
42948
42984
  /* @__PURE__ */ jsx("span", { className: "text-foreground/50 w-3", "aria-hidden": true, children: expanded ? "\u25BE" : "\u25B8" }),
42949
42985
  /* @__PURE__ */ jsx(Badge, { variant: failedChecks > 0 ? "danger" : "success", size: "sm", children: failedChecks > 0 ? t("debug.failCount", { count: failedChecks }) : t("debug.ok") }),
42950
42986
  /* @__PURE__ */ jsx("span", { className: "text-foreground/70", children: t("debug.localCount", { count: localCount }) }),
42951
- /* @__PURE__ */ jsx("span", { className: "text-purple-600 dark:text-purple-400", children: t("debug.serverCount", { count: serverCount }) }),
42952
- traitStates && /* @__PURE__ */ jsx("span", { className: "text-cyan-600 dark:text-cyan-400 truncate max-w-[400px]", children: traitStates }),
42987
+ /* @__PURE__ */ jsx("span", { className: "text-primary", children: t("debug.serverCount", { count: serverCount }) }),
42988
+ traitStates && /* @__PURE__ */ jsx("span", { className: "text-accent truncate max-w-[400px]", children: traitStates }),
42953
42989
  !expanded && transitions.length > 0 && /* @__PURE__ */ jsx("span", { className: "ml-auto text-foreground/50", children: t("debug.transitionsCount", { count: transitions.length }) })
42954
42990
  ]
42955
42991
  }
@@ -43144,7 +43180,7 @@ function RuntimeDebugger({
43144
43180
  title: t("debug.openDebugger"),
43145
43181
  children: failedChecks > 0 ? /* @__PURE__ */ jsxs("span", { className: "relative", children: [
43146
43182
  /* @__PURE__ */ jsx("span", { children: "V" }),
43147
- /* @__PURE__ */ jsx("span", { className: "absolute -top-1 -right-2 w-2 h-2 bg-red-500 rounded-full" })
43183
+ /* @__PURE__ */ jsx("span", { className: "absolute -top-1 -right-2 w-2 h-2 bg-error rounded-full" })
43148
43184
  ] }) : /* @__PURE__ */ jsx("span", { children: "V" })
43149
43185
  }
43150
43186
  ) : /* @__PURE__ */ jsxs(Card, { className: "runtime-debugger__panel", children: [
@@ -43232,7 +43268,7 @@ var init_SegmentRenderer = __esm({
43232
43268
  "div",
43233
43269
  {
43234
43270
  className: cn(
43235
- "border border-gray-200 dark:border-gray-700 rounded-lg p-2 md:p-4 overflow-x-auto space-y-6",
43271
+ "border border-border rounded-lg p-2 md:p-4 overflow-x-auto space-y-6",
43236
43272
  containerClassName,
43237
43273
  className
43238
43274
  ),
@@ -48784,8 +48820,8 @@ var SystemNode = ({ data }) => {
48784
48820
  className: "rounded-lg border border-[var(--color-border)] bg-[var(--color-card)] px-3 py-2 shadow-sm",
48785
48821
  style: { minWidth: 160, maxWidth: 220 },
48786
48822
  children: [
48787
- /* @__PURE__ */ jsx(Handle, { type: "target", position: Position.Left, className: "!w-2 !h-2 !bg-orange-400" }),
48788
- /* @__PURE__ */ jsx(Handle, { type: "source", position: Position.Right, className: "!w-2 !h-2 !bg-orange-400" }),
48823
+ /* @__PURE__ */ jsx(Handle, { type: "target", position: Position.Left, className: "!w-2 !h-2 !bg-warning" }),
48824
+ /* @__PURE__ */ jsx(Handle, { type: "source", position: Position.Right, className: "!w-2 !h-2 !bg-warning" }),
48789
48825
  /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5 mb-1", children: [
48790
48826
  /* @__PURE__ */ jsx("svg", { width: 14, height: 14, viewBox: "0 0 20 20", children: /* @__PURE__ */ jsx(AvlEntity, { x: 10, y: 10, r: 8, persistence }) }),
48791
48827
  /* @__PURE__ */ jsx("span", { className: "text-xs font-semibold text-[var(--color-foreground)] truncate flex-1", children: orbitalName })
@@ -48937,9 +48973,9 @@ var AvlTransitionEdge = ({
48937
48973
  className: "absolute pointer-events-all nodrag nopan flex items-center gap-1",
48938
48974
  style: { transform: `translate(-50%, -50%) translate(${labelX}px, ${labelY}px)` },
48939
48975
  children: [
48940
- data?.hasGuard && /* @__PURE__ */ jsx("div", { className: "w-3 h-3 rotate-45 border border-amber-500 bg-amber-500/10 shrink-0", title: t("avl.guard") }),
48976
+ data?.hasGuard && /* @__PURE__ */ jsx("div", { className: "w-3 h-3 rotate-45 border border-warning bg-warning/10 shrink-0", title: t("avl.guard") }),
48941
48977
  /* @__PURE__ */ jsx("div", { className: "px-2 py-0.5 text-xs font-medium rounded-full bg-[var(--color-card)] border border-[var(--color-border)] text-[var(--color-foreground)] truncate max-w-[160px]", children: data?.event ?? "" }),
48942
- data?.hasEffects && /* @__PURE__ */ jsx("div", { className: "w-2.5 h-2.5 rounded-full bg-violet-500/80 shrink-0", title: t("avl.effects") })
48978
+ data?.hasEffects && /* @__PURE__ */ jsx("div", { className: "w-2.5 h-2.5 rounded-full bg-primary shrink-0", title: t("avl.effects") })
48943
48979
  ]
48944
48980
  }
48945
48981
  ) })
@@ -49762,7 +49798,9 @@ function useResolvedSchema(schema, pageName) {
49762
49798
  trait.listens = callSiteListens.map((l) => ({
49763
49799
  event: l.event,
49764
49800
  triggers: l.triggers,
49765
- source: l.source
49801
+ source: l.source,
49802
+ guard: l.guard,
49803
+ payloadMapping: l.payloadMapping
49766
49804
  }));
49767
49805
  resolvedSchemaLog.info("listens:restored", {
49768
49806
  trait: traitName,
@@ -51151,7 +51189,11 @@ function useTraitStateMachine(traitBindings, uiSlots, options) {
51151
51189
  crossTraitLog.debug("listen:subscribed", { busKey, targetTrait: binding.trait.name, sourceOrbital, sourceTrait, listenEvent: listen.event, triggers: listen.triggers });
51152
51190
  const unsub = eventBus.on(busKey, (event) => {
51153
51191
  crossTraitLog.debug("listen:fired", { busKey, targetTrait: binding.trait.name, triggers: listen.triggers });
51154
- enqueueAndDrain(listen.triggers, event.payload, binding.trait.name);
51192
+ enqueueAndDrain(
51193
+ listen.triggers,
51194
+ applyListenPayloadMapping(listen.payloadMapping, event.payload),
51195
+ binding.trait.name
51196
+ );
51155
51197
  });
51156
51198
  unsubscribes.push(() => {
51157
51199
  crossTraitLog.debug("listen:unsubscribe", { busKey, targetTrait: binding.trait.name, triggers: listen.triggers });
@@ -51181,7 +51223,7 @@ function useTraitStateMachine(traitBindings, uiSlots, options) {
51181
51223
  }
51182
51224
  for (const event of eventsToFire) {
51183
51225
  stateLog.debug("mount:fire-lifecycle", { event, traitCount: traitBindings.length });
51184
- enqueueAndDrain(event, {});
51226
+ enqueueAndDrain(event, { ...optionsRef.current?.initPayload ?? {} });
51185
51227
  }
51186
51228
  return () => {
51187
51229
  initedTraitsRef.current = /* @__PURE__ */ new Set();
@@ -51280,7 +51322,7 @@ function collectServerActiveTraits(ir, allTraits, mountedTraitNames) {
51280
51322
  }
51281
51323
  return active;
51282
51324
  }
51283
- function TraitInitializer({ traits: traits2, orbitalNames, onNavigate, onLocalFallback, persistence, traitConfigsByName, orbitalsByTrait, embeddedTraits, serverActiveTraits }) {
51325
+ function TraitInitializer({ traits: traits2, routeParams, orbitalNames, onNavigate, onLocalFallback, persistence, traitConfigsByName, orbitalsByTrait, embeddedTraits, serverActiveTraits }) {
51284
51326
  const bridge = useServerBridge();
51285
51327
  const activeTraitNames = useMemo(
51286
51328
  () => new Set(traits2.map((b) => b.trait.name).filter((n) => !!n)),
@@ -51309,43 +51351,48 @@ function TraitInitializer({ traits: traits2, orbitalNames, onNavigate, onLocalFa
51309
51351
  applyServerEffects(effects, uiSlots, onNavigate, embeddedTraits, activeTraitNames);
51310
51352
  }
51311
51353
  }, [bridge.connected, bridge.sendEvent, orbitalNames, uiSlots, onNavigate, embeddedTraits, activeTraitNames, withActiveTraits]);
51312
- const opts = orbitalNames ? { onEventProcessed, navigate: onNavigate, traitConfigsByName, orbitalsByTrait, embeddedTraits } : { navigate: onNavigate, persistence, traitConfigsByName, orbitalsByTrait, embeddedTraits };
51354
+ const opts = orbitalNames ? { onEventProcessed, navigate: onNavigate, traitConfigsByName, orbitalsByTrait, embeddedTraits, initPayload: routeParams } : { navigate: onNavigate, persistence, traitConfigsByName, orbitalsByTrait, embeddedTraits, initPayload: routeParams };
51313
51355
  const { sendEvent } = useTraitStateMachine(traits2, uiSlots, opts);
51314
51356
  const initSentRef = useRef(false);
51315
51357
  const prevTraitsRef = useRef(void 0);
51358
+ const paramsKey = JSON.stringify(routeParams ?? {});
51359
+ const prevParamsKeyRef = useRef(void 0);
51316
51360
  useEffect(() => {
51317
51361
  const refChanged = prevTraitsRef.current !== void 0 && prevTraitsRef.current !== traits2;
51362
+ const paramsChanged = prevParamsKeyRef.current !== void 0 && prevParamsKeyRef.current !== paramsKey;
51318
51363
  navLog.debug("page:traits-effect", () => ({
51319
51364
  refChanged,
51365
+ paramsChanged,
51320
51366
  traitsCount: Array.isArray(traits2) ? traits2.length : -1,
51321
51367
  hadPrev: prevTraitsRef.current !== void 0
51322
51368
  }));
51323
- if (refChanged) {
51324
- navLog.info("page:traits-reset", { traitsCount: Array.isArray(traits2) ? traits2.length : -1 });
51369
+ if (refChanged || paramsChanged) {
51370
+ navLog.info("page:traits-reset", { traitsCount: Array.isArray(traits2) ? traits2.length : -1, paramsChanged });
51325
51371
  uiSlots.clearAll();
51326
51372
  initSentRef.current = false;
51327
51373
  }
51328
51374
  prevTraitsRef.current = traits2;
51329
- }, [traits2, uiSlots]);
51375
+ prevParamsKeyRef.current = paramsKey;
51376
+ }, [traits2, uiSlots, paramsKey]);
51330
51377
  useEffect(() => {
51331
51378
  if (!orbitalNames?.length) {
51332
- const t = setTimeout(() => sendEvent("INIT"), 50);
51379
+ const t = setTimeout(() => sendEvent("INIT", routeParams), 50);
51333
51380
  return () => clearTimeout(t);
51334
51381
  }
51335
51382
  const fallback = setTimeout(() => {
51336
51383
  if (!initSentRef.current) {
51337
- sendEvent("INIT");
51384
+ sendEvent("INIT", routeParams);
51338
51385
  onLocalFallback?.();
51339
51386
  }
51340
51387
  }, 5e3);
51341
51388
  return () => clearTimeout(fallback);
51342
- }, [traits2, orbitalNames, sendEvent, onLocalFallback]);
51389
+ }, [traits2, orbitalNames, sendEvent, onLocalFallback, routeParams]);
51343
51390
  useEffect(() => {
51344
51391
  if (!bridge.connected || !orbitalNames?.length || initSentRef.current) return;
51345
51392
  initSentRef.current = true;
51346
51393
  (async () => {
51347
51394
  for (const name of orbitalNames) {
51348
- const { effects, meta } = await bridge.sendEvent(name, "INIT", withActiveTraits({}));
51395
+ const { effects, meta } = await bridge.sendEvent(name, "INIT", withActiveTraits({ ...routeParams ?? {} }));
51349
51396
  recordServerResponse(name, "INIT", meta);
51350
51397
  const effectTraces = [
51351
51398
  { type: "fetch", args: [], status: "executed" },
@@ -51366,10 +51413,10 @@ function TraitInitializer({ traits: traits2, orbitalNames, onNavigate, onLocalFa
51366
51413
  applyServerEffects(effects, uiSlots, onNavigate, embeddedTraits, activeTraitNames);
51367
51414
  }
51368
51415
  })();
51369
- }, [bridge.connected, orbitalNames, bridge.sendEvent, uiSlots, onNavigate, embeddedTraits, activeTraitNames, withActiveTraits]);
51416
+ }, [bridge.connected, orbitalNames, bridge.sendEvent, uiSlots, onNavigate, embeddedTraits, activeTraitNames, withActiveTraits, routeParams]);
51370
51417
  return null;
51371
51418
  }
51372
- function SchemaRunner({ schema, serverUrl, transport, mockData, pageName, onNavigate, onLocalFallback, persistence }) {
51419
+ function SchemaRunner({ schema, serverUrl, transport, mockData, pageName, routeParams, onNavigate, onLocalFallback, persistence }) {
51373
51420
  const { traits: traits2, allEntities, allTraits, ir } = useResolvedSchema(schema, pageName);
51374
51421
  const allPageTraits = useMemo(() => {
51375
51422
  let base;
@@ -51511,6 +51558,7 @@ function SchemaRunner({ schema, serverUrl, transport, mockData, pageName, onNavi
51511
51558
  TraitInitializer,
51512
51559
  {
51513
51560
  traits: allPageTraits,
51561
+ routeParams,
51514
51562
  orbitalNames: serverUrl || transport ? pageOrbitalNames : void 0,
51515
51563
  traitConfigsByName,
51516
51564
  orbitalsByTrait,
@@ -51588,27 +51636,35 @@ function OrbPreview({
51588
51636
  return [];
51589
51637
  }
51590
51638
  }, [parsedSchema]);
51591
- const initialPageName = useMemo(() => {
51639
+ const initialPageMatch = useMemo(() => {
51592
51640
  if (!initialPagePath) return void 0;
51593
- const match = pages.find(({ page }) => page.path === initialPagePath);
51594
- return match?.page.name;
51641
+ const hit = matchPathAmong(pages, initialPagePath, (entry) => entry.page.path);
51642
+ if (!hit) return void 0;
51643
+ return { name: hit.candidate.page.name, params: hit.params };
51595
51644
  }, [pages, initialPagePath]);
51645
+ const initialPageName = initialPageMatch?.name;
51596
51646
  const [currentPage, setCurrentPage] = useState(initialPageName);
51647
+ const [routeParams, setRouteParams] = useState(initialPageMatch?.params ?? {});
51597
51648
  const prevInitialPagePathRef = useRef(initialPagePath);
51598
51649
  useEffect(() => {
51599
51650
  if (prevInitialPagePathRef.current !== initialPagePath) {
51600
51651
  prevInitialPagePathRef.current = initialPagePath;
51601
51652
  setCurrentPage(initialPageName);
51653
+ setRouteParams(initialPageMatch?.params ?? {});
51602
51654
  }
51603
- }, [initialPagePath, initialPageName]);
51655
+ }, [initialPagePath, initialPageName, initialPageMatch]);
51604
51656
  const handleNavigate = useCallback((path) => {
51605
- const match = pages.find(({ page }) => page.path === path);
51657
+ const hit = matchPathAmong(pages, path, (entry) => entry.page.path);
51658
+ const match = hit?.candidate;
51659
+ const params = hit?.params ?? {};
51606
51660
  navLog.debug("handleNavigate", () => ({
51607
51661
  path,
51608
51662
  matched: match?.page.name ?? null,
51663
+ params,
51609
51664
  availablePaths: pages.map((p) => p.page.path)
51610
51665
  }));
51611
- if (match) {
51666
+ if (match?.page.name) {
51667
+ setRouteParams(params);
51612
51668
  setCurrentPage(match.page.name);
51613
51669
  if (typeof window !== "undefined") {
51614
51670
  const url = new URL(window.location.href);
@@ -51678,6 +51734,7 @@ function OrbPreview({
51678
51734
  transport,
51679
51735
  mockData: effectiveMockData,
51680
51736
  pageName: currentPage,
51737
+ routeParams,
51681
51738
  onNavigate: handleNavigate,
51682
51739
  onLocalFallback: handleLocalFallback,
51683
51740
  persistence
@@ -53426,9 +53483,9 @@ function OrbInspector({ node, schema, editable = false, userType = "builder", th
53426
53483
  /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground text-xs uppercase tracking-wider mb-2", children: t("avl.transition") }),
53427
53484
  /* @__PURE__ */ jsxs("svg", { width: "100%", height: 44, viewBox: "0 0 280 44", children: [
53428
53485
  /* @__PURE__ */ jsx(AvlState, { x: 8, y: 8, name: fromState, role: getStateRole(fromState), width: 90, height: 26 }),
53429
- /* @__PURE__ */ jsx("line", { x1: 104, y1: 21, x2: 158, y2: 21, stroke: "#1E293B", strokeWidth: 2, markerEnd: "url(#orb-arrow)" }),
53486
+ /* @__PURE__ */ jsx("line", { x1: 104, y1: 21, x2: 158, y2: 21, stroke: "var(--color-foreground)", strokeWidth: 2, markerEnd: "url(#orb-arrow)" }),
53430
53487
  /* @__PURE__ */ jsx(AvlState, { x: 164, y: 8, name: toState, role: getStateRole(toState), width: 90, height: 26 }),
53431
- /* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsx("marker", { id: "orb-arrow", markerWidth: 8, markerHeight: 6, refX: 8, refY: 3, orient: "auto", children: /* @__PURE__ */ jsx("path", { d: "M0,0 L8,3 L0,6 Z", fill: "#1E293B" }) }) })
53488
+ /* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsx("marker", { id: "orb-arrow", markerWidth: 8, markerHeight: 6, refX: 8, refY: 3, orient: "auto", children: /* @__PURE__ */ jsx("path", { d: "M0,0 L8,3 L0,6 Z", fill: "var(--color-foreground)" }) }) })
53432
53489
  ] }),
53433
53490
  traitName && /* @__PURE__ */ jsxs(Typography, { variant: "small", className: "text-muted-foreground text-xs", children: [
53434
53491
  traitName,
@@ -53539,7 +53596,7 @@ function OrbPatternTree({ config, depth }) {
53539
53596
  return /* @__PURE__ */ jsxs(Box, { style: { paddingLeft: depth * 12 }, children: [
53540
53597
  /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-primary font-semibold text-xs", children: type }),
53541
53598
  propEntries.slice(0, 5).map(([key, val]) => {
53542
- const display = typeof val === "string" ? val.startsWith("@") ? /* @__PURE__ */ jsx("span", { className: "text-purple-500", children: val }) : `"${val}"` : Array.isArray(val) && val.length > 0 && typeof val[0] === "string" && val[0].includes("/") ? /* @__PURE__ */ jsxs("span", { className: "text-amber-600", children: [
53599
+ const display = typeof val === "string" ? val.startsWith("@") ? /* @__PURE__ */ jsx("span", { className: "text-primary", children: val }) : `"${val}"` : Array.isArray(val) && val.length > 0 && typeof val[0] === "string" && val[0].includes("/") ? /* @__PURE__ */ jsxs("span", { className: "text-warning", children: [
53543
53600
  "(",
53544
53601
  val.map(String).join(" "),
53545
53602
  ")"