@almadar/ui 5.123.0 → 5.124.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{TraitProvider-YkK6tXDw.d.cts → TraitProvider-Ch79cUcb.d.cts} +6 -1
- package/dist/{TraitProvider-YkK6tXDw.d.ts → TraitProvider-Ch79cUcb.d.ts} +6 -1
- package/dist/{UserContext-bziZwgFL.d.cts → UserContext-BKckAUv7.d.cts} +5 -5
- package/dist/{UserContext-bziZwgFL.d.ts → UserContext-BKckAUv7.d.ts} +5 -5
- package/dist/avl/index.cjs +265 -227
- package/dist/avl/index.js +267 -229
- package/dist/components/index.cjs +208 -200
- package/dist/components/index.d.cts +4 -3
- package/dist/components/index.d.ts +4 -3
- package/dist/components/index.js +208 -200
- package/dist/context/index.cjs +25 -66
- package/dist/context/index.d.cts +1 -1
- package/dist/context/index.d.ts +1 -1
- package/dist/context/index.js +25 -66
- package/dist/providers/index.cjs +286 -219
- package/dist/providers/index.d.cts +4 -4
- package/dist/providers/index.d.ts +4 -4
- package/dist/providers/index.js +286 -219
- package/dist/runtime/index.cjs +258 -220
- package/dist/runtime/index.d.cts +4 -2
- package/dist/runtime/index.d.ts +4 -2
- package/dist/runtime/index.js +260 -222
- package/package.json +8 -7
- package/themes/_contract.md +2 -0
- package/themes/almadar-website.css +3 -3
- package/themes/almadar.css +4 -4
- package/themes/bloomberg-dense.css +2 -2
- package/themes/clay.css +417 -0
- package/themes/corporate.css +411 -0
- package/themes/game-adventure.css +3 -3
- package/themes/game-rpg.css +2 -2
- package/themes/game-sci-fi.css +1 -1
- package/themes/game-ui-pack.css +2 -2
- package/themes/gazette.css +2 -2
- package/themes/glass.css +428 -0
- package/themes/index.css +9 -13
- package/themes/kiosk.css +5 -5
- package/themes/linear-clean.css +1 -1
- package/themes/minimalist.css +2 -2
- package/themes/neon.css +3 -3
- package/themes/notion-editorial.css +1 -1
- package/themes/prism.css +3 -3
- package/themes/retro.css +410 -0
- package/themes/terminal.css +1 -1
- package/themes/trait-wars.css +8 -8
- package/themes/wireframe.css +2 -2
- package/themes/arctic.css +0 -235
- package/themes/copper.css +0 -235
- package/themes/ember.css +0 -238
- package/themes/forest.css +0 -238
- package/themes/lavender.css +0 -233
- package/themes/midnight.css +0 -234
- package/themes/ocean.css +0 -238
- package/themes/rose.css +0 -233
- package/themes/sand.css +0 -234
- package/themes/slate.css +0 -233
- 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, matchPath, 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-
|
|
4287
|
-
runtime: "border-l-[3px] border-l-
|
|
4288
|
-
singleton: "border-l-[3px] border-l-
|
|
4289
|
-
instance: "border-l-[3px] border-l-
|
|
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-
|
|
4320
|
-
/* @__PURE__ */ jsx(Handle, { type: "source", position: Position.Right, className: "!w-2.5 !h-2.5 !bg-
|
|
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
|
|
8369
|
+
"bg-card border-b-2 border-primary",
|
|
8370
8370
|
"hover:bg-muted",
|
|
8371
|
-
isActive && "bg-primary
|
|
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-
|
|
8375
|
+
"bg-card border-b-2 border-warning",
|
|
8376
8376
|
"hover:bg-muted",
|
|
8377
|
-
isActive && "bg-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
15607
|
-
/* @__PURE__ */ jsx("p", { className: "text-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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
|
|
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
|
|
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
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
17786
|
-
understand: { color: "bg-
|
|
17787
|
-
apply: { color: "bg-
|
|
17788
|
-
analyze: { color: "bg-
|
|
17789
|
-
evaluate: { color: "bg-
|
|
17790
|
-
create: { color: "bg-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
17829
|
+
isAnswered && /* @__PURE__ */ jsx(CheckCircle, { className: "text-success flex-shrink-0", size: 20 })
|
|
17830
17830
|
] }),
|
|
17831
|
-
/* @__PURE__ */ jsx("div", { className: "font-semibold text-
|
|
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-
|
|
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-
|
|
17851
|
-
/* @__PURE__ */ jsx("div", { className: "text-xs text-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
23410
|
+
className: "px-3 py-2 bg-card border-b border-border",
|
|
23411
23411
|
children: [
|
|
23412
|
-
/* @__PURE__ */ jsx(Terminal, { size: 16, className: "text-
|
|
23413
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-
|
|
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-
|
|
23418
|
-
output?.stdout ? /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-
|
|
23419
|
-
output?.stderr ? /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-
|
|
23420
|
-
!output?.stdout && !output?.stderr ? /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-
|
|
23421
|
-
output && output.testResults.length > 0 && /* @__PURE__ */ jsx(Box, { className: "mt-3 pt-3 border-t border-
|
|
23422
|
-
test.passed ? /* @__PURE__ */ jsx(CheckCircle, { size: 14, className: "text-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
23637
|
-
/* @__PURE__ */ jsx("div", { className: "prose dark:prose-invert prose-sm max-w-none text-
|
|
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
|
|
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
|
|
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
|
|
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-
|
|
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
|
|
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-
|
|
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
|
|
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-
|
|
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-
|
|
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-
|
|
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
|
|
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: () =>
|
|
25452
|
-
id: itemData.id,
|
|
25453
|
-
row: itemData
|
|
25454
|
-
})
|
|
25455
|
+
onClick: () => fireAction(action, itemData)
|
|
25455
25456
|
}))
|
|
25456
25457
|
}
|
|
25457
25458
|
)
|
|
@@ -25593,10 +25594,7 @@ function DataGrid({
|
|
|
25593
25594
|
label: action.label,
|
|
25594
25595
|
icon: action.icon,
|
|
25595
25596
|
event: action.event,
|
|
25596
|
-
onClick: () =>
|
|
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-
|
|
27527
|
-
isOpen && "ring-2 ring-primary
|
|
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
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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" })
|
|
@@ -33436,6 +33435,7 @@ var init_QrScanner = __esm({
|
|
|
33436
33435
|
overflow: "hidden",
|
|
33437
33436
|
rounded: "sm",
|
|
33438
33437
|
className: cn(
|
|
33438
|
+
// eslint-disable-next-line almadar/no-hardcoded-colors -- media overlay: always over a dark scrim
|
|
33439
33439
|
"bg-black",
|
|
33440
33440
|
"aspect-square w-full max-w-md",
|
|
33441
33441
|
className
|
|
@@ -33500,7 +33500,9 @@ var init_QrScanner = __esm({
|
|
|
33500
33500
|
type: "button",
|
|
33501
33501
|
onClick: togglePause,
|
|
33502
33502
|
className: cn(
|
|
33503
|
+
// eslint-disable-next-line almadar/no-hardcoded-colors -- media overlay: always over a dark scrim
|
|
33503
33504
|
"rounded-full bg-black bg-opacity-60 p-2 text-white",
|
|
33505
|
+
// eslint-disable-next-line almadar/no-hardcoded-colors -- media overlay: always over a dark scrim
|
|
33504
33506
|
"hover:bg-opacity-80 focus:outline-none focus:ring-2 focus:ring-white"
|
|
33505
33507
|
),
|
|
33506
33508
|
"aria-label": isPaused ? t("qrScanner.resumeScanning") : t("qrScanner.pauseScanning"),
|
|
@@ -33513,7 +33515,9 @@ var init_QrScanner = __esm({
|
|
|
33513
33515
|
type: "button",
|
|
33514
33516
|
onClick: toggleFacing,
|
|
33515
33517
|
className: cn(
|
|
33518
|
+
// eslint-disable-next-line almadar/no-hardcoded-colors -- media overlay: always over a dark scrim
|
|
33516
33519
|
"rounded-full bg-black bg-opacity-60 p-2 text-white",
|
|
33520
|
+
// eslint-disable-next-line almadar/no-hardcoded-colors -- media overlay: always over a dark scrim
|
|
33517
33521
|
"hover:bg-opacity-80 focus:outline-none focus:ring-2 focus:ring-white"
|
|
33518
33522
|
),
|
|
33519
33523
|
"aria-label": currentFacing === "environment" ? t("qrScanner.switchToFrontCamera") : t("qrScanner.switchToRearCamera"),
|
|
@@ -33526,7 +33530,9 @@ var init_QrScanner = __esm({
|
|
|
33526
33530
|
type: "button",
|
|
33527
33531
|
onClick: handleMockScan,
|
|
33528
33532
|
className: cn(
|
|
33533
|
+
// eslint-disable-next-line almadar/no-hardcoded-colors -- media overlay: always over a dark scrim
|
|
33529
33534
|
"rounded-full bg-black bg-opacity-60 px-3 py-2 text-xs text-white",
|
|
33535
|
+
// eslint-disable-next-line almadar/no-hardcoded-colors -- media overlay: always over a dark scrim
|
|
33530
33536
|
"hover:bg-opacity-80 focus:outline-none focus:ring-2 focus:ring-white"
|
|
33531
33537
|
),
|
|
33532
33538
|
"aria-label": t("aria.mockScanDev"),
|
|
@@ -38343,19 +38349,19 @@ var init_ReflectionBlock = __esm({
|
|
|
38343
38349
|
"div",
|
|
38344
38350
|
{
|
|
38345
38351
|
className: cn(
|
|
38346
|
-
"my-6 border-l-4 border-
|
|
38352
|
+
"my-6 border-l-4 border-warning bg-warning/10 rounded-r-lg p-4",
|
|
38347
38353
|
className
|
|
38348
38354
|
),
|
|
38349
38355
|
children: /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-3", children: [
|
|
38350
|
-
/* @__PURE__ */ jsx(PauseCircle, { className: "text-
|
|
38356
|
+
/* @__PURE__ */ jsx(PauseCircle, { className: "text-warning flex-shrink-0 mt-1", size: 20 }),
|
|
38351
38357
|
/* @__PURE__ */ jsxs("div", { className: "flex-1", children: [
|
|
38352
|
-
/* @__PURE__ */ jsx("div", { className: "font-medium text-
|
|
38353
|
-
/* @__PURE__ */ jsx("p", { className: "text-
|
|
38358
|
+
/* @__PURE__ */ jsx("div", { className: "font-medium text-warning mb-2", children: "Pause & Reflect" }),
|
|
38359
|
+
/* @__PURE__ */ jsx("p", { className: "text-foreground text-sm mb-3", children: prompt }),
|
|
38354
38360
|
isExpanded ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
38355
38361
|
/* @__PURE__ */ jsx(
|
|
38356
38362
|
"textarea",
|
|
38357
38363
|
{
|
|
38358
|
-
className: "w-full p-2 border border-
|
|
38364
|
+
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
38365
|
placeholder: "Your thoughts...",
|
|
38360
38366
|
value: note,
|
|
38361
38367
|
onChange: (e) => setNote(e.target.value),
|
|
@@ -38366,7 +38372,7 @@ var init_ReflectionBlock = __esm({
|
|
|
38366
38372
|
"button",
|
|
38367
38373
|
{
|
|
38368
38374
|
onClick: handleSave,
|
|
38369
|
-
className: "mt-2 text-sm px-3 py-1 bg-
|
|
38375
|
+
className: "mt-2 text-sm px-3 py-1 bg-warning text-warning-foreground rounded hover:opacity-90 transition-colors",
|
|
38370
38376
|
children: "Save & Continue"
|
|
38371
38377
|
}
|
|
38372
38378
|
)
|
|
@@ -38374,7 +38380,7 @@ var init_ReflectionBlock = __esm({
|
|
|
38374
38380
|
"button",
|
|
38375
38381
|
{
|
|
38376
38382
|
onClick: () => setIsExpanded(true),
|
|
38377
|
-
className: "text-sm text-
|
|
38383
|
+
className: "text-sm text-warning hover:underline",
|
|
38378
38384
|
children: savedNote ? "\u2713 Answered \xB7 Edit" : "Answer this question"
|
|
38379
38385
|
}
|
|
38380
38386
|
)
|
|
@@ -38660,7 +38666,7 @@ function DataTable({
|
|
|
38660
38666
|
)),
|
|
38661
38667
|
rowActions && /* @__PURE__ */ jsx("th", { className: "w-12 px-4 py-3" })
|
|
38662
38668
|
] }) }),
|
|
38663
|
-
/* @__PURE__ */ jsx("tbody", { className: "divide-y divide-
|
|
38669
|
+
/* @__PURE__ */ jsx("tbody", { className: "divide-y divide-border", children: isLoading ? /* @__PURE__ */ jsx("tr", { children: /* @__PURE__ */ jsx(
|
|
38664
38670
|
"td",
|
|
38665
38671
|
{
|
|
38666
38672
|
colSpan: normalizedColumns.length + (selectable ? 1 : 0) + (rowActions ? 1 : 0),
|
|
@@ -39031,7 +39037,7 @@ var init_DetailPanel = __esm({
|
|
|
39031
39037
|
};
|
|
39032
39038
|
const effectiveFieldNames = isFieldDefArray(propFields) ? normalizeFieldDefs(propFields) : fieldNames;
|
|
39033
39039
|
const fieldTypeMap = isFieldDefArray(propFields) ? buildFieldTypeMap(propFields) : {};
|
|
39034
|
-
useCallback(
|
|
39040
|
+
const handleActionClick = useCallback(
|
|
39035
39041
|
(action, data2) => {
|
|
39036
39042
|
if (action.navigatesTo) {
|
|
39037
39043
|
const url = action.navigatesTo.replace(
|
|
@@ -39223,8 +39229,9 @@ var init_DetailPanel = __esm({
|
|
|
39223
39229
|
{
|
|
39224
39230
|
variant: action.variant || "secondary",
|
|
39225
39231
|
size: "sm",
|
|
39226
|
-
action: action.event,
|
|
39232
|
+
action: action.navigatesTo ? void 0 : action.event,
|
|
39227
39233
|
actionPayload: { row: normalizedData },
|
|
39234
|
+
onClick: action.navigatesTo ? () => handleActionClick(action, normalizedData) : void 0,
|
|
39228
39235
|
icon: action.icon,
|
|
39229
39236
|
"data-testid": action.event ? `action-${action.event}` : void 0,
|
|
39230
39237
|
"data-row-id": normalizedData?.id !== void 0 ? String(normalizedData.id) : void 0,
|
|
@@ -41267,8 +41274,9 @@ var init_MediaGallery = __esm({
|
|
|
41267
41274
|
)
|
|
41268
41275
|
}
|
|
41269
41276
|
),
|
|
41270
|
-
item.caption &&
|
|
41271
|
-
|
|
41277
|
+
item.caption && // eslint-disable-next-line almadar/no-hardcoded-colors -- media overlay: caption scrim over image
|
|
41278
|
+
/* @__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 }) }),
|
|
41279
|
+
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
41280
|
]
|
|
41273
41281
|
},
|
|
41274
41282
|
item.id
|
|
@@ -41297,7 +41305,7 @@ var init_MediaGallery = __esm({
|
|
|
41297
41305
|
size: "sm",
|
|
41298
41306
|
icon: X,
|
|
41299
41307
|
action: "LIGHTBOX_CLOSE",
|
|
41300
|
-
className: "text-
|
|
41308
|
+
className: "text-foreground hover:bg-muted/50"
|
|
41301
41309
|
}
|
|
41302
41310
|
) }),
|
|
41303
41311
|
/* @__PURE__ */ jsx(
|
|
@@ -41308,7 +41316,7 @@ var init_MediaGallery = __esm({
|
|
|
41308
41316
|
className: "max-w-full max-h-[80vh] object-contain rounded-md"
|
|
41309
41317
|
}
|
|
41310
41318
|
),
|
|
41311
|
-
lightboxItem.caption && /* @__PURE__ */ jsx(Typography, { variant: "body", className: "text-
|
|
41319
|
+
lightboxItem.caption && /* @__PURE__ */ jsx(Typography, { variant: "body", className: "text-foreground mt-3 text-center", children: lightboxItem.caption })
|
|
41312
41320
|
]
|
|
41313
41321
|
}
|
|
41314
41322
|
)
|
|
@@ -41769,7 +41777,7 @@ function WalkMinimap() {
|
|
|
41769
41777
|
{
|
|
41770
41778
|
variant,
|
|
41771
41779
|
size: "sm",
|
|
41772
|
-
className: `flex-shrink-0 text-[9px] ${isActive ? "ring-1 ring-
|
|
41780
|
+
className: `flex-shrink-0 text-[9px] ${isActive ? "ring-1 ring-info" : ""}`,
|
|
41773
41781
|
children: [
|
|
41774
41782
|
isDone ? "\u2713" : isActive ? "\u25CF" : "\u25CB",
|
|
41775
41783
|
" ",
|
|
@@ -41910,13 +41918,13 @@ function WalkMinimap() {
|
|
|
41910
41918
|
})
|
|
41911
41919
|
] }) }),
|
|
41912
41920
|
/* @__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-
|
|
41921
|
+
/* @__PURE__ */ jsxs(Typography, { variant: "caption", className: "text-xs font-mono text-success", children: [
|
|
41914
41922
|
"Engine: ",
|
|
41915
41923
|
engineCount,
|
|
41916
41924
|
"/",
|
|
41917
41925
|
totalTransitions
|
|
41918
41926
|
] }),
|
|
41919
|
-
domCount > 0 && /* @__PURE__ */ jsxs(Typography, { variant: "caption", className: "text-xs font-mono text-
|
|
41927
|
+
domCount > 0 && /* @__PURE__ */ jsxs(Typography, { variant: "caption", className: "text-xs font-mono text-info", children: [
|
|
41920
41928
|
"DOM: ",
|
|
41921
41929
|
domCount
|
|
41922
41930
|
] }),
|
|
@@ -41949,13 +41957,13 @@ function TraitsTab({ traits: traits2 }) {
|
|
|
41949
41957
|
const accordionItems = traits2.map((trait) => ({
|
|
41950
41958
|
id: trait.id,
|
|
41951
41959
|
header: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 w-full", children: [
|
|
41952
|
-
/* @__PURE__ */ jsx(Typography, { variant: "body", weight: "semibold", className: "text-
|
|
41960
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body", weight: "semibold", className: "text-primary", children: trait.name }),
|
|
41953
41961
|
/* @__PURE__ */ jsx(Badge, { variant: "success", size: "sm", children: trait.currentState }),
|
|
41954
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-
|
|
41962
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground ml-auto", children: t("debug.transitionsCount", { count: trait.transitionCount }) })
|
|
41955
41963
|
] }),
|
|
41956
41964
|
content: /* @__PURE__ */ jsxs(Stack, { gap: "sm", children: [
|
|
41957
41965
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
41958
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-
|
|
41966
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground mb-2", children: t("debug.states") }),
|
|
41959
41967
|
/* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-1", children: trait.states.map((state) => /* @__PURE__ */ jsx(
|
|
41960
41968
|
Badge,
|
|
41961
41969
|
{
|
|
@@ -41967,18 +41975,18 @@ function TraitsTab({ traits: traits2 }) {
|
|
|
41967
41975
|
)) })
|
|
41968
41976
|
] }),
|
|
41969
41977
|
trait.transitions.length > 0 && /* @__PURE__ */ jsxs("div", { children: [
|
|
41970
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-
|
|
41978
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground mb-2", children: t("debug.transitions") }),
|
|
41971
41979
|
/* @__PURE__ */ jsx(Stack, { gap: "xs", children: trait.transitions.map((t2, i) => /* @__PURE__ */ jsxs(Typography, { variant: "small", className: "font-mono", children: [
|
|
41972
41980
|
t2.from,
|
|
41973
41981
|
" \u2192 ",
|
|
41974
41982
|
t2.to,
|
|
41975
41983
|
" ",
|
|
41976
|
-
/* @__PURE__ */ jsxs("span", { className: "text-
|
|
41984
|
+
/* @__PURE__ */ jsxs("span", { className: "text-muted-foreground", children: [
|
|
41977
41985
|
"(",
|
|
41978
41986
|
t2.event,
|
|
41979
41987
|
")"
|
|
41980
41988
|
] }),
|
|
41981
|
-
t2.guard && /* @__PURE__ */ jsxs("span", { className: "text-
|
|
41989
|
+
t2.guard && /* @__PURE__ */ jsxs("span", { className: "text-warning", children: [
|
|
41982
41990
|
" [",
|
|
41983
41991
|
t2.guard,
|
|
41984
41992
|
"]"
|
|
@@ -41986,7 +41994,7 @@ function TraitsTab({ traits: traits2 }) {
|
|
|
41986
41994
|
] }, i)) })
|
|
41987
41995
|
] }),
|
|
41988
41996
|
trait.guards.length > 0 && /* @__PURE__ */ jsxs("div", { children: [
|
|
41989
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-
|
|
41997
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground mb-2", children: t("debug.guards") }),
|
|
41990
41998
|
/* @__PURE__ */ jsx(Stack, { gap: "xs", children: trait.guards.map((g, i) => /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
|
|
41991
41999
|
/* @__PURE__ */ jsx(Typography, { variant: "small", children: g.name }),
|
|
41992
42000
|
/* @__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 +42037,11 @@ function TicksTab({ ticks: ticks2 }) {
|
|
|
42029
42037
|
};
|
|
42030
42038
|
const TickCard = ({ tick, active }) => /* @__PURE__ */ jsxs(Card, { className: `p-3 ${!active ? "opacity-50" : ""}`, children: [
|
|
42031
42039
|
/* @__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-
|
|
42033
|
-
/* @__PURE__ */ jsx(Typography, { variant: "body", weight: "semibold", className: "text-
|
|
42034
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-
|
|
42040
|
+
/* @__PURE__ */ jsx("span", { className: `w-2 h-2 rounded-full ${active ? "bg-success" : "bg-muted-foreground"}` }),
|
|
42041
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body", weight: "semibold", className: "text-warning", children: tick.name }),
|
|
42042
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground", children: tick.traitName })
|
|
42035
42043
|
] }),
|
|
42036
|
-
/* @__PURE__ */ jsxs("div", { className: "flex gap-3 text-xs text-
|
|
42044
|
+
/* @__PURE__ */ jsxs("div", { className: "flex gap-3 text-xs text-muted-foreground", children: [
|
|
42037
42045
|
/* @__PURE__ */ jsxs("span", { children: [
|
|
42038
42046
|
tick.interval,
|
|
42039
42047
|
"ms"
|
|
@@ -42056,7 +42064,7 @@ function TicksTab({ ticks: ticks2 }) {
|
|
|
42056
42064
|
] });
|
|
42057
42065
|
return /* @__PURE__ */ jsxs("div", { className: "debug-tab debug-tab--ticks", children: [
|
|
42058
42066
|
activeTicks.length > 0 && /* @__PURE__ */ jsxs("div", { className: "mb-4", children: [
|
|
42059
|
-
/* @__PURE__ */ jsxs(Typography, { variant: "small", weight: "medium", className: "text-
|
|
42067
|
+
/* @__PURE__ */ jsxs(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground mb-2", children: [
|
|
42060
42068
|
"Active (",
|
|
42061
42069
|
activeTicks.length,
|
|
42062
42070
|
")"
|
|
@@ -42064,7 +42072,7 @@ function TicksTab({ ticks: ticks2 }) {
|
|
|
42064
42072
|
/* @__PURE__ */ jsx(Stack, { gap: "sm", children: activeTicks.map((tick) => /* @__PURE__ */ jsx(TickCard, { tick, active: true }, tick.id)) })
|
|
42065
42073
|
] }),
|
|
42066
42074
|
inactiveTicks.length > 0 && /* @__PURE__ */ jsxs("div", { children: [
|
|
42067
|
-
/* @__PURE__ */ jsxs(Typography, { variant: "small", weight: "medium", className: "text-
|
|
42075
|
+
/* @__PURE__ */ jsxs(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground mb-2", children: [
|
|
42068
42076
|
"Inactive (",
|
|
42069
42077
|
inactiveTicks.length,
|
|
42070
42078
|
")"
|
|
@@ -42112,33 +42120,33 @@ function EntitiesTab({ snapshot }) {
|
|
|
42112
42120
|
id: `singleton-${name}`,
|
|
42113
42121
|
header: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
42114
42122
|
/* @__PURE__ */ jsx(Badge, { variant: "primary", size: "sm", children: t("debug.singleton") }),
|
|
42115
|
-
/* @__PURE__ */ jsx(Typography, { variant: "body", weight: "semibold", className: "text-
|
|
42123
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body", weight: "semibold", className: "text-info", children: name })
|
|
42116
42124
|
] }),
|
|
42117
|
-
content: /* @__PURE__ */ jsx("pre", { className: "text-xs text-
|
|
42125
|
+
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
42126
|
}));
|
|
42119
42127
|
const runtimeItems = runtimeEntities.slice(0, 20).map((entity) => ({
|
|
42120
42128
|
id: entity.id,
|
|
42121
42129
|
header: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
42122
|
-
/* @__PURE__ */ jsx(Typography, { variant: "body", weight: "semibold", className: "text-
|
|
42123
|
-
/* @__PURE__ */ jsxs(Typography, { variant: "small", className: "text-
|
|
42130
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body", weight: "semibold", className: "text-info", children: entity.type }),
|
|
42131
|
+
/* @__PURE__ */ jsxs(Typography, { variant: "small", className: "text-muted-foreground", children: [
|
|
42124
42132
|
"#",
|
|
42125
42133
|
entity.id.slice(0, 8)
|
|
42126
42134
|
] })
|
|
42127
42135
|
] }),
|
|
42128
|
-
content: /* @__PURE__ */ jsx("pre", { className: "text-xs text-
|
|
42136
|
+
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
42137
|
}));
|
|
42130
42138
|
return /* @__PURE__ */ jsxs("div", { className: "debug-tab debug-tab--entities", children: [
|
|
42131
42139
|
singletonItems.length > 0 && /* @__PURE__ */ jsxs("div", { className: "mb-4", children: [
|
|
42132
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-
|
|
42140
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground mb-2", children: t("debug.singletonsCount", { count: singletonItems.length }) }),
|
|
42133
42141
|
/* @__PURE__ */ jsx(Accordion, { items: singletonItems, multiple: true })
|
|
42134
42142
|
] }),
|
|
42135
42143
|
runtimeItems.length > 0 && /* @__PURE__ */ jsxs("div", { className: "mb-4", children: [
|
|
42136
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-
|
|
42144
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground mb-2", children: t("debug.runtimeCount", { count: runtimeEntities.length }) }),
|
|
42137
42145
|
/* @__PURE__ */ jsx(Accordion, { items: runtimeItems, multiple: true }),
|
|
42138
|
-
runtimeEntities.length > 20 && /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-
|
|
42146
|
+
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
42147
|
] }),
|
|
42140
42148
|
persistentEntries.length > 0 && /* @__PURE__ */ jsxs("div", { children: [
|
|
42141
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-
|
|
42149
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground mb-2", children: t("debug.persistent") }),
|
|
42142
42150
|
/* @__PURE__ */ jsx(Stack, { gap: "xs", children: persistentEntries.map(([type, info]) => /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between py-1", children: [
|
|
42143
42151
|
/* @__PURE__ */ jsx(Typography, { variant: "small", children: type }),
|
|
42144
42152
|
/* @__PURE__ */ jsx(Badge, { variant: info.loaded ? "success" : "default", size: "sm", children: info.loaded ? t("debug.loadedCount", { count: info.count }) : t("debug.notLoaded") })
|
|
@@ -42223,7 +42231,7 @@ function EventFlowTab({ events: events2 }) {
|
|
|
42223
42231
|
);
|
|
42224
42232
|
})
|
|
42225
42233
|
] }),
|
|
42226
|
-
/* @__PURE__ */ jsxs("label", { className: "flex items-center gap-1 text-xs text-
|
|
42234
|
+
/* @__PURE__ */ jsxs("label", { className: "flex items-center gap-1 text-xs text-muted-foreground ml-auto cursor-pointer", children: [
|
|
42227
42235
|
/* @__PURE__ */ jsx(
|
|
42228
42236
|
Checkbox,
|
|
42229
42237
|
{
|
|
@@ -42238,18 +42246,18 @@ function EventFlowTab({ events: events2 }) {
|
|
|
42238
42246
|
"div",
|
|
42239
42247
|
{
|
|
42240
42248
|
ref: containerRef,
|
|
42241
|
-
className: "max-h-64 overflow-y-auto space-y-1 bg-
|
|
42249
|
+
className: "max-h-64 overflow-y-auto space-y-1 bg-muted rounded p-2",
|
|
42242
42250
|
children: filteredEvents.slice(-100).map((event) => {
|
|
42243
42251
|
const { variant, icon } = TYPE_BADGES[event.type] || { variant: "default", icon: "\u2022" };
|
|
42244
42252
|
return /* @__PURE__ */ jsxs(
|
|
42245
42253
|
"div",
|
|
42246
42254
|
{
|
|
42247
|
-
className: "flex items-start gap-2 text-xs py-1 hover:bg-
|
|
42255
|
+
className: "flex items-start gap-2 text-xs py-1 hover:bg-muted/50 rounded px-1",
|
|
42248
42256
|
children: [
|
|
42249
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-
|
|
42257
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground font-mono min-w-[65px]", children: formatTime2(event.timestamp) }),
|
|
42250
42258
|
/* @__PURE__ */ jsx("span", { children: icon }),
|
|
42251
42259
|
/* @__PURE__ */ jsx(Badge, { variant, size: "sm", className: "min-w-[60px] justify-center", children: event.source }),
|
|
42252
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-
|
|
42260
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground", children: event.message })
|
|
42253
42261
|
]
|
|
42254
42262
|
},
|
|
42255
42263
|
event.id
|
|
@@ -42313,21 +42321,21 @@ function GuardsPanel({ guards }) {
|
|
|
42313
42321
|
id: guard.id,
|
|
42314
42322
|
header: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 w-full", children: [
|
|
42315
42323
|
/* @__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-
|
|
42317
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-
|
|
42318
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-
|
|
42324
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body", weight: "semibold", className: "text-warning", children: guard.guardName }),
|
|
42325
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground", children: guard.context.type === "transition" ? `${guard.context.transitionFrom} \u2192 ${guard.context.transitionTo}` : guard.context.tickName }),
|
|
42326
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground ml-auto", children: formatTime2(guard.timestamp) })
|
|
42319
42327
|
] }),
|
|
42320
42328
|
content: /* @__PURE__ */ jsxs(Stack, { gap: "sm", children: [
|
|
42321
42329
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
42322
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-
|
|
42323
|
-
/* @__PURE__ */ jsx("code", { className: "block mt-1 text-xs text-
|
|
42330
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground", children: t("debug.expression") }),
|
|
42331
|
+
/* @__PURE__ */ jsx("code", { className: "block mt-1 text-xs text-warning bg-warning/10 px-2 py-1 rounded", children: guard.expression })
|
|
42324
42332
|
] }),
|
|
42325
42333
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
42326
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-
|
|
42327
|
-
/* @__PURE__ */ jsx("pre", { className: "mt-1 text-xs text-
|
|
42334
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground", children: t("debug.inputs") }),
|
|
42335
|
+
/* @__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
42336
|
] }),
|
|
42329
42337
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
42330
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-
|
|
42338
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground", children: t("debug.trait") }),
|
|
42331
42339
|
/* @__PURE__ */ jsx(Typography, { variant: "small", children: guard.context.traitName })
|
|
42332
42340
|
] })
|
|
42333
42341
|
] })
|
|
@@ -42383,7 +42391,7 @@ function VerificationTab({ checks, summary }) {
|
|
|
42383
42391
|
(a, b) => (sortOrder[a.status] ?? 4) - (sortOrder[b.status] ?? 4)
|
|
42384
42392
|
);
|
|
42385
42393
|
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-
|
|
42394
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3 mb-3 p-2 bg-muted rounded", children: [
|
|
42387
42395
|
/* @__PURE__ */ jsxs(Badge, { variant: "success", size: "sm", children: [
|
|
42388
42396
|
summary.passed,
|
|
42389
42397
|
" passed"
|
|
@@ -42400,7 +42408,7 @@ function VerificationTab({ checks, summary }) {
|
|
|
42400
42408
|
summary.pending,
|
|
42401
42409
|
" pending"
|
|
42402
42410
|
] }),
|
|
42403
|
-
/* @__PURE__ */ jsxs(Typography, { variant: "small", className: "text-
|
|
42411
|
+
/* @__PURE__ */ jsxs(Typography, { variant: "small", className: "text-muted-foreground ml-auto", children: [
|
|
42404
42412
|
summary.totalChecks,
|
|
42405
42413
|
" total checks"
|
|
42406
42414
|
] })
|
|
@@ -42410,12 +42418,12 @@ function VerificationTab({ checks, summary }) {
|
|
|
42410
42418
|
return /* @__PURE__ */ jsxs(
|
|
42411
42419
|
"div",
|
|
42412
42420
|
{
|
|
42413
|
-
className: "flex items-start gap-2 p-2 rounded hover:bg-
|
|
42421
|
+
className: "flex items-start gap-2 p-2 rounded hover:bg-muted/50",
|
|
42414
42422
|
children: [
|
|
42415
42423
|
/* @__PURE__ */ jsx(Badge, { variant: config.variant, size: "sm", className: "min-w-[20px] justify-center mt-0.5", children: config.icon }),
|
|
42416
42424
|
/* @__PURE__ */ jsxs("div", { className: "flex-1 min-w-0", children: [
|
|
42417
42425
|
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "break-words", children: check.label }),
|
|
42418
|
-
check.details && /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-
|
|
42426
|
+
check.details && /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground break-words", children: check.details })
|
|
42419
42427
|
] }),
|
|
42420
42428
|
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground font-mono text-xs shrink-0", children: new Date(check.updatedAt).toLocaleTimeString("en-US", {
|
|
42421
42429
|
hour12: false,
|
|
@@ -42450,10 +42458,10 @@ var init_VerificationTab = __esm({
|
|
|
42450
42458
|
function EffectBadge({ effect }) {
|
|
42451
42459
|
const variant = EFFECT_STATUS_VARIANT[effect.status] || "default";
|
|
42452
42460
|
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-
|
|
42461
|
+
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
42462
|
/* @__PURE__ */ jsx(Badge, { variant, size: "sm", className: "!text-[9px] !px-1 !py-0", children: icon }),
|
|
42455
|
-
/* @__PURE__ */ jsx("span", { className: "text-
|
|
42456
|
-
effect.error && /* @__PURE__ */ jsx("span", { className: "text-
|
|
42463
|
+
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: effect.type }),
|
|
42464
|
+
effect.error && /* @__PURE__ */ jsx("span", { className: "text-error truncate max-w-[120px]", title: effect.error, children: effect.error })
|
|
42457
42465
|
] });
|
|
42458
42466
|
}
|
|
42459
42467
|
function TransitionTimeline({ transitions }) {
|
|
@@ -42488,8 +42496,8 @@ function TransitionTimeline({ transitions }) {
|
|
|
42488
42496
|
const sorted = [...transitions].reverse();
|
|
42489
42497
|
return /* @__PURE__ */ jsxs("div", { className: "debug-tab debug-tab--timeline", children: [
|
|
42490
42498
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between mb-2", children: [
|
|
42491
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-
|
|
42492
|
-
/* @__PURE__ */ jsxs("label", { className: "flex items-center gap-1 text-xs text-
|
|
42499
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground", children: t("debug.transitionsRecorded", { count: transitions.length }) }),
|
|
42500
|
+
/* @__PURE__ */ jsxs("label", { className: "flex items-center gap-1 text-xs text-muted-foreground cursor-pointer", children: [
|
|
42493
42501
|
/* @__PURE__ */ jsx(
|
|
42494
42502
|
Checkbox,
|
|
42495
42503
|
{
|
|
@@ -42514,22 +42522,22 @@ function TransitionTimeline({ transitions }) {
|
|
|
42514
42522
|
{
|
|
42515
42523
|
className: `
|
|
42516
42524
|
relative pl-6 pb-3 border-l-2 cursor-pointer
|
|
42517
|
-
hover:bg-
|
|
42518
|
-
${hasFailedEffects ? "border-
|
|
42525
|
+
hover:bg-muted/50 rounded-r
|
|
42526
|
+
${hasFailedEffects ? "border-error" : "border-border"}
|
|
42519
42527
|
`,
|
|
42520
42528
|
onClick: () => setExpandedId(isExpanded ? null : trace.id),
|
|
42521
42529
|
children: [
|
|
42522
42530
|
/* @__PURE__ */ jsx("div", { className: `
|
|
42523
42531
|
absolute left-[-5px] top-1 w-2 h-2 rounded-full
|
|
42524
|
-
${hasFailedEffects ? "bg-
|
|
42532
|
+
${hasFailedEffects ? "bg-error" : allPassed ? "bg-success" : "bg-muted-foreground"}
|
|
42525
42533
|
` }),
|
|
42526
42534
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 text-xs py-1 px-2", children: [
|
|
42527
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-
|
|
42535
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground font-mono min-w-[65px]", children: formatTime2(trace.timestamp) }),
|
|
42528
42536
|
/* @__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-
|
|
42537
|
+
/* @__PURE__ */ jsxs(Typography, { variant: "small", className: "font-mono text-muted-foreground", children: [
|
|
42530
42538
|
trace.from,
|
|
42531
42539
|
" ",
|
|
42532
|
-
/* @__PURE__ */ jsx("span", { className: "text-
|
|
42540
|
+
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground/50", children: "\u2192" }),
|
|
42533
42541
|
" ",
|
|
42534
42542
|
trace.to
|
|
42535
42543
|
] }),
|
|
@@ -42546,9 +42554,9 @@ function TransitionTimeline({ transitions }) {
|
|
|
42546
42554
|
]
|
|
42547
42555
|
}
|
|
42548
42556
|
),
|
|
42549
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-
|
|
42557
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground ml-auto", children: t("debug.effectsCount", { count: trace.effects.length }) })
|
|
42550
42558
|
] }),
|
|
42551
|
-
isExpanded && trace.effects.length > 0 && /* @__PURE__ */ jsx("div", { className: "ml-2 mt-1 mb-2 pl-2 border-l border-
|
|
42559
|
+
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
42560
|
/* @__PURE__ */ jsx(EffectBadge, { effect }),
|
|
42553
42561
|
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
42562
|
effect.durationMs !== void 0 && /* @__PURE__ */ jsxs(Typography, { variant: "small", className: "text-muted-foreground text-xs", children: [
|
|
@@ -42582,8 +42590,8 @@ var init_TransitionTimeline = __esm({
|
|
|
42582
42590
|
}
|
|
42583
42591
|
});
|
|
42584
42592
|
function StatRow({ label, value, variant }) {
|
|
42585
|
-
return /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between py-1.5 border-b border-
|
|
42586
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-
|
|
42593
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between py-1.5 border-b border-border last:border-b-0", children: [
|
|
42594
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground", children: label }),
|
|
42587
42595
|
variant ? /* @__PURE__ */ jsx(Badge, { variant, size: "sm", children: String(value) }) : /* @__PURE__ */ jsx(Typography, { variant: "small", weight: "semibold", className: "font-mono", children: String(value) })
|
|
42588
42596
|
] });
|
|
42589
42597
|
}
|
|
@@ -42612,7 +42620,7 @@ function ServerBridgeTab({ bridge }) {
|
|
|
42612
42620
|
return /* @__PURE__ */ jsx("div", { className: "debug-tab debug-tab--bridge", children: /* @__PURE__ */ jsxs(Stack, { gap: "sm", children: [
|
|
42613
42621
|
/* @__PURE__ */ jsxs(Card, { className: "p-3", children: [
|
|
42614
42622
|
/* @__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-
|
|
42623
|
+
/* @__PURE__ */ jsx("div", { className: `w-3 h-3 rounded-full ${bridge.connected ? "bg-success animate-pulse" : "bg-error"}` }),
|
|
42616
42624
|
/* @__PURE__ */ jsx(Typography, { variant: "h6", children: bridge.connected ? t("debug.connected") : t("debug.disconnected") })
|
|
42617
42625
|
] }),
|
|
42618
42626
|
/* @__PURE__ */ jsxs(Stack, { gap: "xs", children: [
|
|
@@ -42647,11 +42655,11 @@ function ServerBridgeTab({ bridge }) {
|
|
|
42647
42655
|
)
|
|
42648
42656
|
] })
|
|
42649
42657
|
] }),
|
|
42650
|
-
bridge.lastError && /* @__PURE__ */ jsxs(Card, { className: "p-3 border-
|
|
42651
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "semibold", className: "text-
|
|
42652
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-
|
|
42658
|
+
bridge.lastError && /* @__PURE__ */ jsxs(Card, { className: "p-3 border-error/30 bg-error/10", children: [
|
|
42659
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "semibold", className: "text-error mb-1", children: t("debug.lastError") }),
|
|
42660
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-error font-mono break-all", children: bridge.lastError })
|
|
42653
42661
|
] }),
|
|
42654
|
-
bridge.connected && /* @__PURE__ */ jsx("div", { className: "text-center py-2", children: /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-
|
|
42662
|
+
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
42663
|
] }) });
|
|
42656
42664
|
}
|
|
42657
42665
|
var init_ServerBridgeTab = __esm({
|
|
@@ -42777,7 +42785,7 @@ function EventDispatcherTab({ traits: traits2, schema }) {
|
|
|
42777
42785
|
};
|
|
42778
42786
|
return /* @__PURE__ */ jsxs("div", { className: "debug-tab debug-tab--dispatch", children: [
|
|
42779
42787
|
/* @__PURE__ */ jsxs("div", { className: "mb-3", children: [
|
|
42780
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-
|
|
42788
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground mb-1", children: t("debug.activeStates") }),
|
|
42781
42789
|
/* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-1", children: traits2.map((trait) => /* @__PURE__ */ jsxs(Badge, { variant: "success", size: "sm", children: [
|
|
42782
42790
|
trait.name,
|
|
42783
42791
|
": ",
|
|
@@ -42785,8 +42793,8 @@ function EventDispatcherTab({ traits: traits2, schema }) {
|
|
|
42785
42793
|
] }, trait.id)) })
|
|
42786
42794
|
] }),
|
|
42787
42795
|
/* @__PURE__ */ jsxs("div", { className: "mb-3", children: [
|
|
42788
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-
|
|
42789
|
-
availableEvents.length === 0 ? /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-
|
|
42796
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground mb-1", children: t("debug.availableEvents") }),
|
|
42797
|
+
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
42798
|
/* @__PURE__ */ jsx(
|
|
42791
42799
|
Button,
|
|
42792
42800
|
{
|
|
@@ -42797,22 +42805,22 @@ function EventDispatcherTab({ traits: traits2, schema }) {
|
|
|
42797
42805
|
children: event
|
|
42798
42806
|
}
|
|
42799
42807
|
),
|
|
42800
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-
|
|
42808
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground", children: transitions.map((t2) => `${t2.from} -> ${t2.to}`).join(", ") }),
|
|
42801
42809
|
transitions.some((tr) => tr.guard) && /* @__PURE__ */ jsx(Badge, { variant: "warning", size: "sm", children: t("debug.guarded") })
|
|
42802
42810
|
] }, event)) })
|
|
42803
42811
|
] }),
|
|
42804
42812
|
unavailableEvents.length > 0 && /* @__PURE__ */ jsxs("div", { className: "mb-3", children: [
|
|
42805
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-
|
|
42813
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground mb-1", children: t("debug.otherEvents") }),
|
|
42806
42814
|
/* @__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
42815
|
] }),
|
|
42808
42816
|
log11.length > 0 && /* @__PURE__ */ jsxs("div", { children: [
|
|
42809
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-
|
|
42817
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground mb-1", children: t("debug.recentTransitions") }),
|
|
42810
42818
|
/* @__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-
|
|
42819
|
+
/* @__PURE__ */ jsx("span", { className: "text-primary", children: entry.traitName }),
|
|
42812
42820
|
" ",
|
|
42813
|
-
/* @__PURE__ */ jsx("span", { className: "text-
|
|
42821
|
+
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: entry.from }),
|
|
42814
42822
|
" -> ",
|
|
42815
|
-
/* @__PURE__ */ jsx("span", { className: "text-
|
|
42823
|
+
/* @__PURE__ */ jsx("span", { className: "text-success", children: entry.to })
|
|
42816
42824
|
] }, i)) })
|
|
42817
42825
|
] })
|
|
42818
42826
|
] });
|
|
@@ -42838,21 +42846,21 @@ var init_RuntimeDebugger = __esm({
|
|
|
42838
42846
|
function ServerResponseRow({ sr }) {
|
|
42839
42847
|
const { t } = useTranslate();
|
|
42840
42848
|
const entityEntries = Object.entries(sr.dataEntities);
|
|
42841
|
-
return /* @__PURE__ */ jsxs("div", { className: "ml-4 pl-2 border-l border-
|
|
42849
|
+
return /* @__PURE__ */ jsxs("div", { className: "ml-4 pl-2 border-l border-primary py-0.5 text-xs font-mono", children: [
|
|
42842
42850
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
42843
|
-
/* @__PURE__ */ jsxs("span", { className: sr.success ? "text-
|
|
42851
|
+
/* @__PURE__ */ jsxs("span", { className: sr.success ? "text-success" : "text-error", children: [
|
|
42844
42852
|
sr.success ? "\u2713" : "\u2717",
|
|
42845
42853
|
" ",
|
|
42846
42854
|
t("debug.server")
|
|
42847
42855
|
] }),
|
|
42848
|
-
/* @__PURE__ */ jsx("span", { className: "text-
|
|
42849
|
-
sr.clientEffects > 0 && /* @__PURE__ */ jsx("span", { className: "px-1 rounded bg-
|
|
42850
|
-
sr.emittedEvents.length > 0 && /* @__PURE__ */ jsxs("span", { className: "px-1 rounded bg-
|
|
42856
|
+
/* @__PURE__ */ jsx("span", { className: "text-primary", children: sr.orbitalName }),
|
|
42857
|
+
sr.clientEffects > 0 && /* @__PURE__ */ jsx("span", { className: "px-1 rounded bg-primary/10 text-primary", children: t("debug.clientEffectsCount", { count: sr.clientEffects }) }),
|
|
42858
|
+
sr.emittedEvents.length > 0 && /* @__PURE__ */ jsxs("span", { className: "px-1 rounded bg-primary/10 text-primary", children: [
|
|
42851
42859
|
t("debug.emitLabel"),
|
|
42852
42860
|
" ",
|
|
42853
42861
|
sr.emittedEvents.join(", ")
|
|
42854
42862
|
] }),
|
|
42855
|
-
sr.error && /* @__PURE__ */ jsx("span", { className: "px-1 rounded bg-
|
|
42863
|
+
sr.error && /* @__PURE__ */ jsx("span", { className: "px-1 rounded bg-error/10 text-error truncate max-w-[300px]", children: sr.error })
|
|
42856
42864
|
] }),
|
|
42857
42865
|
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
42866
|
name,
|
|
@@ -42868,9 +42876,9 @@ function TransitionRow({ trace }) {
|
|
|
42868
42876
|
if (isServerEntry && trace.serverResponse) {
|
|
42869
42877
|
return /* @__PURE__ */ jsxs("div", { className: "py-0.5 border-b border-border last:border-0", children: [
|
|
42870
42878
|
/* @__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-
|
|
42879
|
+
/* @__PURE__ */ jsx("span", { className: "mt-1.5 w-1.5 h-1.5 rounded-full flex-shrink-0 bg-primary" }),
|
|
42872
42880
|
/* @__PURE__ */ jsx(Badge, { variant: "warning", size: "sm", className: "flex-shrink-0", children: trace.event }),
|
|
42873
|
-
/* @__PURE__ */ jsx("span", { className: "text-
|
|
42881
|
+
/* @__PURE__ */ jsx("span", { className: "text-primary flex-shrink-0", children: t("debug.serverResponse") })
|
|
42874
42882
|
] }),
|
|
42875
42883
|
/* @__PURE__ */ jsx(ServerResponseRow, { sr: trace.serverResponse })
|
|
42876
42884
|
] });
|
|
@@ -42879,7 +42887,7 @@ function TransitionRow({ trace }) {
|
|
|
42879
42887
|
/* @__PURE__ */ jsxs("div", { className: "flex items-start gap-2 text-xs font-mono", children: [
|
|
42880
42888
|
/* @__PURE__ */ jsx("span", { className: cn(
|
|
42881
42889
|
"mt-1.5 w-1.5 h-1.5 rounded-full flex-shrink-0",
|
|
42882
|
-
hasFailedEffects ? "bg-
|
|
42890
|
+
hasFailedEffects ? "bg-error" : "bg-success"
|
|
42883
42891
|
) }),
|
|
42884
42892
|
/* @__PURE__ */ jsx(Badge, { variant: "info", size: "sm", className: "flex-shrink-0", children: trace.event }),
|
|
42885
42893
|
/* @__PURE__ */ jsx("span", { className: "text-foreground flex-shrink-0", children: trace.traitName }),
|
|
@@ -42893,7 +42901,7 @@ function TransitionRow({ trace }) {
|
|
|
42893
42901
|
] }),
|
|
42894
42902
|
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
42903
|
"px-1 rounded text-xs",
|
|
42896
|
-
eff.status === "executed" ? "bg-
|
|
42904
|
+
eff.status === "executed" ? "bg-success/10 text-success" : eff.status === "failed" ? "bg-error/10 text-error" : "bg-warning/10 text-warning"
|
|
42897
42905
|
), children: [
|
|
42898
42906
|
eff.status === "executed" ? "\u2713" : eff.status === "failed" ? "\u2717" : "-",
|
|
42899
42907
|
" ",
|
|
@@ -42927,7 +42935,7 @@ function VerifyModePanel({
|
|
|
42927
42935
|
{
|
|
42928
42936
|
className: cn(
|
|
42929
42937
|
"runtime-debugger runtime-debugger--verify",
|
|
42930
|
-
"flex flex-col bg-[var(--color-card)] text-[var(--color-foreground)] border-t-2 border-
|
|
42938
|
+
"flex flex-col bg-[var(--color-card)] text-[var(--color-foreground)] border-t-2 border-accent",
|
|
42931
42939
|
hudBottom ? "" : "fixed bottom-0 left-0 right-0",
|
|
42932
42940
|
className
|
|
42933
42941
|
),
|
|
@@ -42948,8 +42956,8 @@ function VerifyModePanel({
|
|
|
42948
42956
|
/* @__PURE__ */ jsx("span", { className: "text-foreground/50 w-3", "aria-hidden": true, children: expanded ? "\u25BE" : "\u25B8" }),
|
|
42949
42957
|
/* @__PURE__ */ jsx(Badge, { variant: failedChecks > 0 ? "danger" : "success", size: "sm", children: failedChecks > 0 ? t("debug.failCount", { count: failedChecks }) : t("debug.ok") }),
|
|
42950
42958
|
/* @__PURE__ */ jsx("span", { className: "text-foreground/70", children: t("debug.localCount", { count: localCount }) }),
|
|
42951
|
-
/* @__PURE__ */ jsx("span", { className: "text-
|
|
42952
|
-
traitStates && /* @__PURE__ */ jsx("span", { className: "text-
|
|
42959
|
+
/* @__PURE__ */ jsx("span", { className: "text-primary", children: t("debug.serverCount", { count: serverCount }) }),
|
|
42960
|
+
traitStates && /* @__PURE__ */ jsx("span", { className: "text-accent truncate max-w-[400px]", children: traitStates }),
|
|
42953
42961
|
!expanded && transitions.length > 0 && /* @__PURE__ */ jsx("span", { className: "ml-auto text-foreground/50", children: t("debug.transitionsCount", { count: transitions.length }) })
|
|
42954
42962
|
]
|
|
42955
42963
|
}
|
|
@@ -43144,7 +43152,7 @@ function RuntimeDebugger({
|
|
|
43144
43152
|
title: t("debug.openDebugger"),
|
|
43145
43153
|
children: failedChecks > 0 ? /* @__PURE__ */ jsxs("span", { className: "relative", children: [
|
|
43146
43154
|
/* @__PURE__ */ jsx("span", { children: "V" }),
|
|
43147
|
-
/* @__PURE__ */ jsx("span", { className: "absolute -top-1 -right-2 w-2 h-2 bg-
|
|
43155
|
+
/* @__PURE__ */ jsx("span", { className: "absolute -top-1 -right-2 w-2 h-2 bg-error rounded-full" })
|
|
43148
43156
|
] }) : /* @__PURE__ */ jsx("span", { children: "V" })
|
|
43149
43157
|
}
|
|
43150
43158
|
) : /* @__PURE__ */ jsxs(Card, { className: "runtime-debugger__panel", children: [
|
|
@@ -43232,7 +43240,7 @@ var init_SegmentRenderer = __esm({
|
|
|
43232
43240
|
"div",
|
|
43233
43241
|
{
|
|
43234
43242
|
className: cn(
|
|
43235
|
-
"border border-
|
|
43243
|
+
"border border-border rounded-lg p-2 md:p-4 overflow-x-auto space-y-6",
|
|
43236
43244
|
containerClassName,
|
|
43237
43245
|
className
|
|
43238
43246
|
),
|
|
@@ -48784,8 +48792,8 @@ var SystemNode = ({ data }) => {
|
|
|
48784
48792
|
className: "rounded-lg border border-[var(--color-border)] bg-[var(--color-card)] px-3 py-2 shadow-sm",
|
|
48785
48793
|
style: { minWidth: 160, maxWidth: 220 },
|
|
48786
48794
|
children: [
|
|
48787
|
-
/* @__PURE__ */ jsx(Handle, { type: "target", position: Position.Left, className: "!w-2 !h-2 !bg-
|
|
48788
|
-
/* @__PURE__ */ jsx(Handle, { type: "source", position: Position.Right, className: "!w-2 !h-2 !bg-
|
|
48795
|
+
/* @__PURE__ */ jsx(Handle, { type: "target", position: Position.Left, className: "!w-2 !h-2 !bg-warning" }),
|
|
48796
|
+
/* @__PURE__ */ jsx(Handle, { type: "source", position: Position.Right, className: "!w-2 !h-2 !bg-warning" }),
|
|
48789
48797
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5 mb-1", children: [
|
|
48790
48798
|
/* @__PURE__ */ jsx("svg", { width: 14, height: 14, viewBox: "0 0 20 20", children: /* @__PURE__ */ jsx(AvlEntity, { x: 10, y: 10, r: 8, persistence }) }),
|
|
48791
48799
|
/* @__PURE__ */ jsx("span", { className: "text-xs font-semibold text-[var(--color-foreground)] truncate flex-1", children: orbitalName })
|
|
@@ -48937,9 +48945,9 @@ var AvlTransitionEdge = ({
|
|
|
48937
48945
|
className: "absolute pointer-events-all nodrag nopan flex items-center gap-1",
|
|
48938
48946
|
style: { transform: `translate(-50%, -50%) translate(${labelX}px, ${labelY}px)` },
|
|
48939
48947
|
children: [
|
|
48940
|
-
data?.hasGuard && /* @__PURE__ */ jsx("div", { className: "w-3 h-3 rotate-45 border border-
|
|
48948
|
+
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
48949
|
/* @__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-
|
|
48950
|
+
data?.hasEffects && /* @__PURE__ */ jsx("div", { className: "w-2.5 h-2.5 rounded-full bg-primary shrink-0", title: t("avl.effects") })
|
|
48943
48951
|
]
|
|
48944
48952
|
}
|
|
48945
48953
|
) })
|
|
@@ -49762,7 +49770,9 @@ function useResolvedSchema(schema, pageName) {
|
|
|
49762
49770
|
trait.listens = callSiteListens.map((l) => ({
|
|
49763
49771
|
event: l.event,
|
|
49764
49772
|
triggers: l.triggers,
|
|
49765
|
-
source: l.source
|
|
49773
|
+
source: l.source,
|
|
49774
|
+
guard: l.guard,
|
|
49775
|
+
payloadMapping: l.payloadMapping
|
|
49766
49776
|
}));
|
|
49767
49777
|
resolvedSchemaLog.info("listens:restored", {
|
|
49768
49778
|
trait: traitName,
|
|
@@ -51151,7 +51161,11 @@ function useTraitStateMachine(traitBindings, uiSlots, options) {
|
|
|
51151
51161
|
crossTraitLog.debug("listen:subscribed", { busKey, targetTrait: binding.trait.name, sourceOrbital, sourceTrait, listenEvent: listen.event, triggers: listen.triggers });
|
|
51152
51162
|
const unsub = eventBus.on(busKey, (event) => {
|
|
51153
51163
|
crossTraitLog.debug("listen:fired", { busKey, targetTrait: binding.trait.name, triggers: listen.triggers });
|
|
51154
|
-
enqueueAndDrain(
|
|
51164
|
+
enqueueAndDrain(
|
|
51165
|
+
listen.triggers,
|
|
51166
|
+
applyListenPayloadMapping(listen.payloadMapping, event.payload),
|
|
51167
|
+
binding.trait.name
|
|
51168
|
+
);
|
|
51155
51169
|
});
|
|
51156
51170
|
unsubscribes.push(() => {
|
|
51157
51171
|
crossTraitLog.debug("listen:unsubscribe", { busKey, targetTrait: binding.trait.name, triggers: listen.triggers });
|
|
@@ -51181,7 +51195,7 @@ function useTraitStateMachine(traitBindings, uiSlots, options) {
|
|
|
51181
51195
|
}
|
|
51182
51196
|
for (const event of eventsToFire) {
|
|
51183
51197
|
stateLog.debug("mount:fire-lifecycle", { event, traitCount: traitBindings.length });
|
|
51184
|
-
enqueueAndDrain(event, {});
|
|
51198
|
+
enqueueAndDrain(event, { ...optionsRef.current?.initPayload ?? {} });
|
|
51185
51199
|
}
|
|
51186
51200
|
return () => {
|
|
51187
51201
|
initedTraitsRef.current = /* @__PURE__ */ new Set();
|
|
@@ -51280,7 +51294,7 @@ function collectServerActiveTraits(ir, allTraits, mountedTraitNames) {
|
|
|
51280
51294
|
}
|
|
51281
51295
|
return active;
|
|
51282
51296
|
}
|
|
51283
|
-
function TraitInitializer({ traits: traits2, orbitalNames, onNavigate, onLocalFallback, persistence, traitConfigsByName, orbitalsByTrait, embeddedTraits, serverActiveTraits }) {
|
|
51297
|
+
function TraitInitializer({ traits: traits2, routeParams, orbitalNames, onNavigate, onLocalFallback, persistence, traitConfigsByName, orbitalsByTrait, embeddedTraits, serverActiveTraits }) {
|
|
51284
51298
|
const bridge = useServerBridge();
|
|
51285
51299
|
const activeTraitNames = useMemo(
|
|
51286
51300
|
() => new Set(traits2.map((b) => b.trait.name).filter((n) => !!n)),
|
|
@@ -51309,43 +51323,48 @@ function TraitInitializer({ traits: traits2, orbitalNames, onNavigate, onLocalFa
|
|
|
51309
51323
|
applyServerEffects(effects, uiSlots, onNavigate, embeddedTraits, activeTraitNames);
|
|
51310
51324
|
}
|
|
51311
51325
|
}, [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 };
|
|
51326
|
+
const opts = orbitalNames ? { onEventProcessed, navigate: onNavigate, traitConfigsByName, orbitalsByTrait, embeddedTraits, initPayload: routeParams } : { navigate: onNavigate, persistence, traitConfigsByName, orbitalsByTrait, embeddedTraits, initPayload: routeParams };
|
|
51313
51327
|
const { sendEvent } = useTraitStateMachine(traits2, uiSlots, opts);
|
|
51314
51328
|
const initSentRef = useRef(false);
|
|
51315
51329
|
const prevTraitsRef = useRef(void 0);
|
|
51330
|
+
const paramsKey = JSON.stringify(routeParams ?? {});
|
|
51331
|
+
const prevParamsKeyRef = useRef(void 0);
|
|
51316
51332
|
useEffect(() => {
|
|
51317
51333
|
const refChanged = prevTraitsRef.current !== void 0 && prevTraitsRef.current !== traits2;
|
|
51334
|
+
const paramsChanged = prevParamsKeyRef.current !== void 0 && prevParamsKeyRef.current !== paramsKey;
|
|
51318
51335
|
navLog.debug("page:traits-effect", () => ({
|
|
51319
51336
|
refChanged,
|
|
51337
|
+
paramsChanged,
|
|
51320
51338
|
traitsCount: Array.isArray(traits2) ? traits2.length : -1,
|
|
51321
51339
|
hadPrev: prevTraitsRef.current !== void 0
|
|
51322
51340
|
}));
|
|
51323
|
-
if (refChanged) {
|
|
51324
|
-
navLog.info("page:traits-reset", { traitsCount: Array.isArray(traits2) ? traits2.length : -1 });
|
|
51341
|
+
if (refChanged || paramsChanged) {
|
|
51342
|
+
navLog.info("page:traits-reset", { traitsCount: Array.isArray(traits2) ? traits2.length : -1, paramsChanged });
|
|
51325
51343
|
uiSlots.clearAll();
|
|
51326
51344
|
initSentRef.current = false;
|
|
51327
51345
|
}
|
|
51328
51346
|
prevTraitsRef.current = traits2;
|
|
51329
|
-
|
|
51347
|
+
prevParamsKeyRef.current = paramsKey;
|
|
51348
|
+
}, [traits2, uiSlots, paramsKey]);
|
|
51330
51349
|
useEffect(() => {
|
|
51331
51350
|
if (!orbitalNames?.length) {
|
|
51332
|
-
const t = setTimeout(() => sendEvent("INIT"), 50);
|
|
51351
|
+
const t = setTimeout(() => sendEvent("INIT", routeParams), 50);
|
|
51333
51352
|
return () => clearTimeout(t);
|
|
51334
51353
|
}
|
|
51335
51354
|
const fallback = setTimeout(() => {
|
|
51336
51355
|
if (!initSentRef.current) {
|
|
51337
|
-
sendEvent("INIT");
|
|
51356
|
+
sendEvent("INIT", routeParams);
|
|
51338
51357
|
onLocalFallback?.();
|
|
51339
51358
|
}
|
|
51340
51359
|
}, 5e3);
|
|
51341
51360
|
return () => clearTimeout(fallback);
|
|
51342
|
-
}, [traits2, orbitalNames, sendEvent, onLocalFallback]);
|
|
51361
|
+
}, [traits2, orbitalNames, sendEvent, onLocalFallback, routeParams]);
|
|
51343
51362
|
useEffect(() => {
|
|
51344
51363
|
if (!bridge.connected || !orbitalNames?.length || initSentRef.current) return;
|
|
51345
51364
|
initSentRef.current = true;
|
|
51346
51365
|
(async () => {
|
|
51347
51366
|
for (const name of orbitalNames) {
|
|
51348
|
-
const { effects, meta } = await bridge.sendEvent(name, "INIT", withActiveTraits({}));
|
|
51367
|
+
const { effects, meta } = await bridge.sendEvent(name, "INIT", withActiveTraits({ ...routeParams ?? {} }));
|
|
51349
51368
|
recordServerResponse(name, "INIT", meta);
|
|
51350
51369
|
const effectTraces = [
|
|
51351
51370
|
{ type: "fetch", args: [], status: "executed" },
|
|
@@ -51366,10 +51385,10 @@ function TraitInitializer({ traits: traits2, orbitalNames, onNavigate, onLocalFa
|
|
|
51366
51385
|
applyServerEffects(effects, uiSlots, onNavigate, embeddedTraits, activeTraitNames);
|
|
51367
51386
|
}
|
|
51368
51387
|
})();
|
|
51369
|
-
}, [bridge.connected, orbitalNames, bridge.sendEvent, uiSlots, onNavigate, embeddedTraits, activeTraitNames, withActiveTraits]);
|
|
51388
|
+
}, [bridge.connected, orbitalNames, bridge.sendEvent, uiSlots, onNavigate, embeddedTraits, activeTraitNames, withActiveTraits, routeParams]);
|
|
51370
51389
|
return null;
|
|
51371
51390
|
}
|
|
51372
|
-
function SchemaRunner({ schema, serverUrl, transport, mockData, pageName, onNavigate, onLocalFallback, persistence }) {
|
|
51391
|
+
function SchemaRunner({ schema, serverUrl, transport, mockData, pageName, routeParams, onNavigate, onLocalFallback, persistence }) {
|
|
51373
51392
|
const { traits: traits2, allEntities, allTraits, ir } = useResolvedSchema(schema, pageName);
|
|
51374
51393
|
const allPageTraits = useMemo(() => {
|
|
51375
51394
|
let base;
|
|
@@ -51511,6 +51530,7 @@ function SchemaRunner({ schema, serverUrl, transport, mockData, pageName, onNavi
|
|
|
51511
51530
|
TraitInitializer,
|
|
51512
51531
|
{
|
|
51513
51532
|
traits: allPageTraits,
|
|
51533
|
+
routeParams,
|
|
51514
51534
|
orbitalNames: serverUrl || transport ? pageOrbitalNames : void 0,
|
|
51515
51535
|
traitConfigsByName,
|
|
51516
51536
|
orbitalsByTrait,
|
|
@@ -51588,27 +51608,44 @@ function OrbPreview({
|
|
|
51588
51608
|
return [];
|
|
51589
51609
|
}
|
|
51590
51610
|
}, [parsedSchema]);
|
|
51591
|
-
const
|
|
51611
|
+
const initialPageMatch = useMemo(() => {
|
|
51592
51612
|
if (!initialPagePath) return void 0;
|
|
51593
|
-
const
|
|
51594
|
-
|
|
51613
|
+
for (const { page } of pages) {
|
|
51614
|
+
const params = page.path ? matchPath(page.path, initialPagePath) : null;
|
|
51615
|
+
if (params !== null) return { name: page.name, params };
|
|
51616
|
+
}
|
|
51617
|
+
return void 0;
|
|
51595
51618
|
}, [pages, initialPagePath]);
|
|
51619
|
+
const initialPageName = initialPageMatch?.name;
|
|
51596
51620
|
const [currentPage, setCurrentPage] = useState(initialPageName);
|
|
51621
|
+
const [routeParams, setRouteParams] = useState(initialPageMatch?.params ?? {});
|
|
51597
51622
|
const prevInitialPagePathRef = useRef(initialPagePath);
|
|
51598
51623
|
useEffect(() => {
|
|
51599
51624
|
if (prevInitialPagePathRef.current !== initialPagePath) {
|
|
51600
51625
|
prevInitialPagePathRef.current = initialPagePath;
|
|
51601
51626
|
setCurrentPage(initialPageName);
|
|
51627
|
+
setRouteParams(initialPageMatch?.params ?? {});
|
|
51602
51628
|
}
|
|
51603
|
-
}, [initialPagePath, initialPageName]);
|
|
51629
|
+
}, [initialPagePath, initialPageName, initialPageMatch]);
|
|
51604
51630
|
const handleNavigate = useCallback((path) => {
|
|
51605
|
-
|
|
51631
|
+
let match;
|
|
51632
|
+
let params = {};
|
|
51633
|
+
for (const entry of pages) {
|
|
51634
|
+
const m = entry.page.path ? matchPath(entry.page.path, path) : null;
|
|
51635
|
+
if (m !== null) {
|
|
51636
|
+
match = entry;
|
|
51637
|
+
params = m;
|
|
51638
|
+
break;
|
|
51639
|
+
}
|
|
51640
|
+
}
|
|
51606
51641
|
navLog.debug("handleNavigate", () => ({
|
|
51607
51642
|
path,
|
|
51608
51643
|
matched: match?.page.name ?? null,
|
|
51644
|
+
params,
|
|
51609
51645
|
availablePaths: pages.map((p) => p.page.path)
|
|
51610
51646
|
}));
|
|
51611
|
-
if (match) {
|
|
51647
|
+
if (match?.page.name) {
|
|
51648
|
+
setRouteParams(params);
|
|
51612
51649
|
setCurrentPage(match.page.name);
|
|
51613
51650
|
if (typeof window !== "undefined") {
|
|
51614
51651
|
const url = new URL(window.location.href);
|
|
@@ -51678,6 +51715,7 @@ function OrbPreview({
|
|
|
51678
51715
|
transport,
|
|
51679
51716
|
mockData: effectiveMockData,
|
|
51680
51717
|
pageName: currentPage,
|
|
51718
|
+
routeParams,
|
|
51681
51719
|
onNavigate: handleNavigate,
|
|
51682
51720
|
onLocalFallback: handleLocalFallback,
|
|
51683
51721
|
persistence
|
|
@@ -53426,9 +53464,9 @@ function OrbInspector({ node, schema, editable = false, userType = "builder", th
|
|
|
53426
53464
|
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground text-xs uppercase tracking-wider mb-2", children: t("avl.transition") }),
|
|
53427
53465
|
/* @__PURE__ */ jsxs("svg", { width: "100%", height: 44, viewBox: "0 0 280 44", children: [
|
|
53428
53466
|
/* @__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: "
|
|
53467
|
+
/* @__PURE__ */ jsx("line", { x1: 104, y1: 21, x2: 158, y2: 21, stroke: "var(--color-foreground)", strokeWidth: 2, markerEnd: "url(#orb-arrow)" }),
|
|
53430
53468
|
/* @__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: "
|
|
53469
|
+
/* @__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
53470
|
] }),
|
|
53433
53471
|
traitName && /* @__PURE__ */ jsxs(Typography, { variant: "small", className: "text-muted-foreground text-xs", children: [
|
|
53434
53472
|
traitName,
|
|
@@ -53539,7 +53577,7 @@ function OrbPatternTree({ config, depth }) {
|
|
|
53539
53577
|
return /* @__PURE__ */ jsxs(Box, { style: { paddingLeft: depth * 12 }, children: [
|
|
53540
53578
|
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-primary font-semibold text-xs", children: type }),
|
|
53541
53579
|
propEntries.slice(0, 5).map(([key, val]) => {
|
|
53542
|
-
const display = typeof val === "string" ? val.startsWith("@") ? /* @__PURE__ */ jsx("span", { className: "text-
|
|
53580
|
+
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
53581
|
"(",
|
|
53544
53582
|
val.map(String).join(" "),
|
|
53545
53583
|
")"
|