@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/providers/index.js
CHANGED
|
@@ -4623,15 +4623,15 @@ var init_TextHighlight = __esm({
|
|
|
4623
4623
|
const typeStyles = {
|
|
4624
4624
|
question: cn(
|
|
4625
4625
|
// Blue border for questions
|
|
4626
|
-
"bg-card border-b-2 border-primary
|
|
4626
|
+
"bg-card border-b-2 border-primary",
|
|
4627
4627
|
"hover:bg-muted",
|
|
4628
|
-
isActive && "bg-primary
|
|
4628
|
+
isActive && "bg-primary/10 ring-2 ring-primary"
|
|
4629
4629
|
),
|
|
4630
4630
|
note: cn(
|
|
4631
4631
|
// Yellow border for notes
|
|
4632
|
-
"bg-card border-b-2 border-
|
|
4632
|
+
"bg-card border-b-2 border-warning",
|
|
4633
4633
|
"hover:bg-muted",
|
|
4634
|
-
isActive && "bg-
|
|
4634
|
+
isActive && "bg-warning/10 ring-2 ring-warning"
|
|
4635
4635
|
)
|
|
4636
4636
|
};
|
|
4637
4637
|
return /* @__PURE__ */ jsx(
|
|
@@ -4977,7 +4977,7 @@ function DayCell({
|
|
|
4977
4977
|
{
|
|
4978
4978
|
className: cn(
|
|
4979
4979
|
"p-2 text-center cursor-pointer hover:bg-muted transition-colors",
|
|
4980
|
-
isToday && "bg-
|
|
4980
|
+
isToday && "bg-primary/10",
|
|
4981
4981
|
className
|
|
4982
4982
|
),
|
|
4983
4983
|
onClick: handleClick,
|
|
@@ -4988,7 +4988,7 @@ function DayCell({
|
|
|
4988
4988
|
variant: "small",
|
|
4989
4989
|
className: cn(
|
|
4990
4990
|
"font-medium",
|
|
4991
|
-
isToday ? "text-
|
|
4991
|
+
isToday ? "text-primary" : "text-muted-foreground"
|
|
4992
4992
|
),
|
|
4993
4993
|
children: dayAbbr
|
|
4994
4994
|
}
|
|
@@ -5000,7 +5000,7 @@ function DayCell({
|
|
|
5000
5000
|
rounded: "full",
|
|
5001
5001
|
className: cn(
|
|
5002
5002
|
"h-8 w-8 mx-auto items-center justify-center",
|
|
5003
|
-
isToday && "bg-
|
|
5003
|
+
isToday && "bg-primary text-primary-foreground"
|
|
5004
5004
|
),
|
|
5005
5005
|
children: /* @__PURE__ */ jsx(Typography, { variant: "body", className: "font-semibold", children: safeDate.getDate() })
|
|
5006
5006
|
}
|
|
@@ -12505,19 +12505,19 @@ var init_ActivationBlock = __esm({
|
|
|
12505
12505
|
"div",
|
|
12506
12506
|
{
|
|
12507
12507
|
className: cn(
|
|
12508
|
-
"bg-
|
|
12508
|
+
"bg-primary/10 border-2 border-primary rounded-lg p-5 mb-6",
|
|
12509
12509
|
className
|
|
12510
12510
|
),
|
|
12511
12511
|
children: /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-3", children: [
|
|
12512
|
-
/* @__PURE__ */ jsx(Lightbulb, { className: "text-
|
|
12512
|
+
/* @__PURE__ */ jsx(Lightbulb, { className: "text-primary flex-shrink-0 mt-1", size: 24 }),
|
|
12513
12513
|
/* @__PURE__ */ jsxs("div", { className: "flex-1", children: [
|
|
12514
|
-
/* @__PURE__ */ jsx("h4", { className: "font-semibold text-
|
|
12515
|
-
/* @__PURE__ */ jsx("p", { className: "text-
|
|
12514
|
+
/* @__PURE__ */ jsx("h4", { className: "font-semibold text-primary mb-2", children: "Before You Begin..." }),
|
|
12515
|
+
/* @__PURE__ */ jsx("p", { className: "text-foreground mb-3 text-sm md:text-base", children: question }),
|
|
12516
12516
|
isExpanded ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
12517
12517
|
/* @__PURE__ */ jsx(
|
|
12518
12518
|
"textarea",
|
|
12519
12519
|
{
|
|
12520
|
-
className: "w-full p-3 border border-
|
|
12520
|
+
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",
|
|
12521
12521
|
placeholder: "Jot down your thoughts...",
|
|
12522
12522
|
value: response,
|
|
12523
12523
|
onChange: (e) => setResponse(e.target.value),
|
|
@@ -12529,7 +12529,7 @@ var init_ActivationBlock = __esm({
|
|
|
12529
12529
|
"button",
|
|
12530
12530
|
{
|
|
12531
12531
|
onClick: handleSubmit,
|
|
12532
|
-
className: "px-4 py-2 bg-
|
|
12532
|
+
className: "px-4 py-2 bg-primary text-primary-foreground rounded-md hover:bg-primary-hover text-sm font-medium transition-colors",
|
|
12533
12533
|
children: "Continue to Lesson \u2192"
|
|
12534
12534
|
}
|
|
12535
12535
|
),
|
|
@@ -12540,7 +12540,7 @@ var init_ActivationBlock = __esm({
|
|
|
12540
12540
|
emit(`UI:${saveEvent}`, { response: "" });
|
|
12541
12541
|
setIsExpanded(false);
|
|
12542
12542
|
},
|
|
12543
|
-
className: "px-4 py-2 text-
|
|
12543
|
+
className: "px-4 py-2 text-primary hover:underline text-sm",
|
|
12544
12544
|
children: "Skip for now"
|
|
12545
12545
|
}
|
|
12546
12546
|
)
|
|
@@ -12549,7 +12549,7 @@ var init_ActivationBlock = __esm({
|
|
|
12549
12549
|
"button",
|
|
12550
12550
|
{
|
|
12551
12551
|
onClick: () => setIsExpanded(true),
|
|
12552
|
-
className: "text-sm text-
|
|
12552
|
+
className: "text-sm text-primary hover:underline font-medium",
|
|
12553
12553
|
children: "\u2713 Answered \xB7 Edit response"
|
|
12554
12554
|
}
|
|
12555
12555
|
)
|
|
@@ -13053,7 +13053,7 @@ var init_AuthLayout = __esm({
|
|
|
13053
13053
|
VStack,
|
|
13054
13054
|
{
|
|
13055
13055
|
className: cn(
|
|
13056
|
-
"hidden lg:flex lg:w-1/2 bg-primary
|
|
13056
|
+
"hidden lg:flex lg:w-1/2 bg-primary relative overflow-hidden",
|
|
13057
13057
|
"justify-between p-12"
|
|
13058
13058
|
),
|
|
13059
13059
|
style: backgroundImage ? {
|
|
@@ -13062,7 +13062,7 @@ var init_AuthLayout = __esm({
|
|
|
13062
13062
|
} : void 0,
|
|
13063
13063
|
gap: "none",
|
|
13064
13064
|
children: [
|
|
13065
|
-
/* @__PURE__ */ jsx(Box, { className: "absolute inset-0 bg-gradient-to-br from-primary
|
|
13065
|
+
/* @__PURE__ */ jsx(Box, { className: "absolute inset-0 bg-gradient-to-br from-primary/90 to-primary-hover/90" }),
|
|
13066
13066
|
/* @__PURE__ */ jsx(Box, { className: "relative z-10", children: /* @__PURE__ */ jsxs(Link, { to: "/", className: "flex items-center gap-3", children: [
|
|
13067
13067
|
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(
|
|
13068
13068
|
Typography,
|
|
@@ -13147,7 +13147,7 @@ var init_AuthLayout = __esm({
|
|
|
13147
13147
|
),
|
|
13148
13148
|
children: /* @__PURE__ */ jsxs(Box, { className: "w-full max-w-md", children: [
|
|
13149
13149
|
/* @__PURE__ */ jsx(Box, { className: "lg:hidden mb-8 text-center", children: /* @__PURE__ */ jsxs(Link, { to: "/", className: "inline-flex items-center gap-3", children: [
|
|
13150
|
-
logo || /* @__PURE__ */ jsx(Box, { className: "w-12 h-12 bg-primary
|
|
13150
|
+
logo || /* @__PURE__ */ jsx(Box, { className: "w-12 h-12 bg-primary rounded-xl flex items-center justify-center", children: /* @__PURE__ */ jsx(
|
|
13151
13151
|
Typography,
|
|
13152
13152
|
{
|
|
13153
13153
|
variant: "body1",
|
|
@@ -15138,7 +15138,7 @@ var init_CodeBlock = __esm({
|
|
|
15138
15138
|
{
|
|
15139
15139
|
justify: "between",
|
|
15140
15140
|
align: "center",
|
|
15141
|
-
className: "px-3 py-2 bg-[var(--color-card)] rounded-t-lg border-b border-
|
|
15141
|
+
className: "px-3 py-2 bg-[var(--color-card)] rounded-t-lg border-b border-border",
|
|
15142
15142
|
children: [
|
|
15143
15143
|
showLanguageBadge && /* @__PURE__ */ jsx(Badge, { variant: "default", size: "sm", children: language }),
|
|
15144
15144
|
effectiveCopy && /* @__PURE__ */ jsx(
|
|
@@ -15147,9 +15147,9 @@ var init_CodeBlock = __esm({
|
|
|
15147
15147
|
variant: "ghost",
|
|
15148
15148
|
size: "sm",
|
|
15149
15149
|
onClick: handleCopy,
|
|
15150
|
-
className: "opacity-0 group-hover:opacity-100 focus:opacity-100 transition-opacity text-muted-foreground hover:text-
|
|
15150
|
+
className: "opacity-0 group-hover:opacity-100 focus:opacity-100 transition-opacity text-muted-foreground hover:text-foreground",
|
|
15151
15151
|
"aria-label": t("common.copy"),
|
|
15152
|
-
children: copied ? /* @__PURE__ */ jsx(Icon, { name: "check", className: "w-4 h-4 text-
|
|
15152
|
+
children: copied ? /* @__PURE__ */ jsx(Icon, { name: "check", className: "w-4 h-4 text-success" }) : /* @__PURE__ */ jsx(Icon, { name: "copy", className: "w-4 h-4" })
|
|
15153
15153
|
}
|
|
15154
15154
|
)
|
|
15155
15155
|
]
|
|
@@ -15517,12 +15517,12 @@ var init_BloomQuizBlock = __esm({
|
|
|
15517
15517
|
init_useEventBus();
|
|
15518
15518
|
init_cn();
|
|
15519
15519
|
BLOOM_CONFIG = {
|
|
15520
|
-
remember: { color: "bg-
|
|
15521
|
-
understand: { color: "bg-
|
|
15522
|
-
apply: { color: "bg-
|
|
15523
|
-
analyze: { color: "bg-
|
|
15524
|
-
evaluate: { color: "bg-
|
|
15525
|
-
create: { color: "bg-
|
|
15520
|
+
remember: { color: "bg-secondary text-secondary-foreground", bgColor: "bg-muted", label: "Remember" },
|
|
15521
|
+
understand: { color: "bg-info text-info-foreground", bgColor: "bg-info/10", label: "Understand" },
|
|
15522
|
+
apply: { color: "bg-success text-success-foreground", bgColor: "bg-success/10", label: "Apply" },
|
|
15523
|
+
analyze: { color: "bg-warning text-warning-foreground", bgColor: "bg-warning/10", label: "Analyze" },
|
|
15524
|
+
evaluate: { color: "bg-accent text-accent-foreground", bgColor: "bg-accent/10", label: "Evaluate" },
|
|
15525
|
+
create: { color: "bg-primary text-primary-foreground", bgColor: "bg-primary/10", label: "Create" }
|
|
15526
15526
|
};
|
|
15527
15527
|
BloomQuizBlock = ({
|
|
15528
15528
|
level,
|
|
@@ -15548,22 +15548,22 @@ var init_BloomQuizBlock = __esm({
|
|
|
15548
15548
|
"div",
|
|
15549
15549
|
{
|
|
15550
15550
|
className: cn(
|
|
15551
|
-
"rounded-lg border border-
|
|
15551
|
+
"rounded-lg border border-primary p-4 my-4 transition-all",
|
|
15552
15552
|
config.bgColor,
|
|
15553
15553
|
className
|
|
15554
15554
|
),
|
|
15555
15555
|
children: [
|
|
15556
15556
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between mb-3", children: [
|
|
15557
15557
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 flex-wrap", children: [
|
|
15558
|
-
index !== void 0 && /* @__PURE__ */ jsxs("span", { className: "text-
|
|
15558
|
+
index !== void 0 && /* @__PURE__ */ jsxs("span", { className: "text-muted-foreground font-medium text-sm", children: [
|
|
15559
15559
|
"Question ",
|
|
15560
15560
|
index + 1
|
|
15561
15561
|
] }),
|
|
15562
|
-
/* @__PURE__ */ jsx("span", { className: cn(config.color, "text-
|
|
15562
|
+
/* @__PURE__ */ jsx("span", { className: cn(config.color, "text-xs px-2 py-1 rounded-full font-medium"), children: config.label })
|
|
15563
15563
|
] }),
|
|
15564
|
-
isAnswered && /* @__PURE__ */ jsx(CheckCircle, { className: "text-
|
|
15564
|
+
isAnswered && /* @__PURE__ */ jsx(CheckCircle, { className: "text-success flex-shrink-0", size: 20 })
|
|
15565
15565
|
] }),
|
|
15566
|
-
/* @__PURE__ */ jsx("div", { className: "font-semibold text-
|
|
15566
|
+
/* @__PURE__ */ jsx("div", { className: "font-semibold text-primary mb-3 space-y-2", children: questionSegments.map(
|
|
15567
15567
|
(segment, idx) => segment.type === "markdown" ? /* @__PURE__ */ jsx(MarkdownContent, { content: segment.content }, `q-md-${idx}`) : /* @__PURE__ */ jsx(
|
|
15568
15568
|
CodeBlock,
|
|
15569
15569
|
{
|
|
@@ -15577,13 +15577,13 @@ var init_BloomQuizBlock = __esm({
|
|
|
15577
15577
|
"button",
|
|
15578
15578
|
{
|
|
15579
15579
|
type: "button",
|
|
15580
|
-
className: "inline-flex items-center rounded-md bg-
|
|
15580
|
+
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",
|
|
15581
15581
|
onClick: handleReveal,
|
|
15582
15582
|
children: revealed ? "Hide Answer" : "Reveal Answer"
|
|
15583
15583
|
}
|
|
15584
15584
|
),
|
|
15585
|
-
revealed && /* @__PURE__ */ jsxs("div", { className: "rounded-lg bg-
|
|
15586
|
-
/* @__PURE__ */ jsx("div", { className: "text-xs text-
|
|
15585
|
+
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: [
|
|
15586
|
+
/* @__PURE__ */ jsx("div", { className: "text-xs text-muted-foreground mb-1 font-medium uppercase tracking-wide", children: "Answer:" }),
|
|
15587
15587
|
answerSegments.map(
|
|
15588
15588
|
(segment, idx) => segment.type === "markdown" ? /* @__PURE__ */ jsx(MarkdownContent, { content: segment.content }, `a-md-${idx}`) : /* @__PURE__ */ jsx(
|
|
15589
15589
|
CodeBlock,
|
|
@@ -15857,12 +15857,12 @@ var init_QuizBlock = __esm({
|
|
|
15857
15857
|
}) => {
|
|
15858
15858
|
const { t } = useTranslate();
|
|
15859
15859
|
const [revealed, setRevealed] = useState(false);
|
|
15860
|
-
return /* @__PURE__ */ jsx(Card2, { className: cn("my-4 border-
|
|
15860
|
+
return /* @__PURE__ */ jsx(Card2, { className: cn("my-4 border-primary", className), children: /* @__PURE__ */ jsxs(VStack, { gap: "sm", className: "p-4", children: [
|
|
15861
15861
|
/* @__PURE__ */ jsxs(HStack, { gap: "sm", align: "start", children: [
|
|
15862
|
-
/* @__PURE__ */ jsx(Icon, { icon: HelpCircle, size: "sm", className: "text-
|
|
15862
|
+
/* @__PURE__ */ jsx(Icon, { icon: HelpCircle, size: "sm", className: "text-primary mt-0.5 shrink-0" }),
|
|
15863
15863
|
/* @__PURE__ */ jsx(Typography, { variant: "body", className: "font-medium", children: question })
|
|
15864
15864
|
] }),
|
|
15865
|
-
revealed ? /* @__PURE__ */ jsx(Box, { className: "pl-7 pt-2 border-t border-
|
|
15865
|
+
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,
|
|
15866
15866
|
/* @__PURE__ */ jsx(
|
|
15867
15867
|
Button,
|
|
15868
15868
|
{
|
|
@@ -17774,7 +17774,7 @@ var init_BookTableOfContents = __esm({
|
|
|
17774
17774
|
className: cn(
|
|
17775
17775
|
"justify-start text-left w-full",
|
|
17776
17776
|
direction === "rtl" && "text-right",
|
|
17777
|
-
isCurrent && "bg-
|
|
17777
|
+
isCurrent && "bg-primary/10 text-primary"
|
|
17778
17778
|
),
|
|
17779
17779
|
children: /* @__PURE__ */ jsx(Box, { className: "truncate", children: /* @__PURE__ */ jsx(Typography, { variant: "body", children: String(chapter.title ?? "") }) })
|
|
17780
17780
|
},
|
|
@@ -19022,7 +19022,7 @@ function CalendarGrid({
|
|
|
19022
19022
|
border: true,
|
|
19023
19023
|
className: cn(
|
|
19024
19024
|
"cursor-pointer hover:shadow-sm transition-shadow text-xs truncate",
|
|
19025
|
-
color ? color : "bg-
|
|
19025
|
+
color ? color : "bg-primary/10 border-primary/30 text-primary"
|
|
19026
19026
|
),
|
|
19027
19027
|
onClick: (e) => handleEventClick(event, e),
|
|
19028
19028
|
children: /* @__PURE__ */ jsx(Typography, { variant: "small", className: "truncate font-medium", children: event.title })
|
|
@@ -19120,7 +19120,7 @@ function CalendarGrid({
|
|
|
19120
19120
|
onClick: () => handleSlotClick(day, time),
|
|
19121
19121
|
className: cn(
|
|
19122
19122
|
"border-l border-border",
|
|
19123
|
-
isToday && "bg-
|
|
19123
|
+
isToday && "bg-primary/10"
|
|
19124
19124
|
),
|
|
19125
19125
|
...longPressEvent ? {
|
|
19126
19126
|
onPointerDown: () => startLongPress(day, time),
|
|
@@ -21136,31 +21136,31 @@ var init_CodeRunnerPanel = __esm({
|
|
|
21136
21136
|
}
|
|
21137
21137
|
)
|
|
21138
21138
|
] }),
|
|
21139
|
-
hasOutput && /* @__PURE__ */ jsxs(Box, { className: "rounded-lg border border-
|
|
21139
|
+
hasOutput && /* @__PURE__ */ jsxs(Box, { className: "rounded-lg border border-border bg-foreground overflow-hidden", children: [
|
|
21140
21140
|
/* @__PURE__ */ jsxs(
|
|
21141
21141
|
HStack,
|
|
21142
21142
|
{
|
|
21143
21143
|
gap: "sm",
|
|
21144
21144
|
align: "center",
|
|
21145
|
-
className: "px-3 py-2 bg-
|
|
21145
|
+
className: "px-3 py-2 bg-card border-b border-border",
|
|
21146
21146
|
children: [
|
|
21147
|
-
/* @__PURE__ */ jsx(Terminal, { size: 16, className: "text-
|
|
21148
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-
|
|
21147
|
+
/* @__PURE__ */ jsx(Terminal, { size: 16, className: "text-muted-foreground" }),
|
|
21148
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-foreground font-medium", children: "Output" })
|
|
21149
21149
|
]
|
|
21150
21150
|
}
|
|
21151
21151
|
),
|
|
21152
|
-
/* @__PURE__ */ jsx(VStack, { gap: "none", className: "p-3 font-mono text-sm", children: error ? /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-
|
|
21153
|
-
output?.stdout ? /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-
|
|
21154
|
-
output?.stderr ? /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-
|
|
21155
|
-
!output?.stdout && !output?.stderr ? /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-
|
|
21156
|
-
output && output.testResults.length > 0 && /* @__PURE__ */ jsx(Box, { className: "mt-3 pt-3 border-t border-
|
|
21157
|
-
test.passed ? /* @__PURE__ */ jsx(CheckCircle, { size: 14, className: "text-
|
|
21152
|
+
/* @__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: [
|
|
21153
|
+
output?.stdout ? /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-background whitespace-pre-wrap", children: output.stdout }) : null,
|
|
21154
|
+
output?.stderr ? /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-error whitespace-pre-wrap", children: output.stderr }) : null,
|
|
21155
|
+
!output?.stdout && !output?.stderr ? /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-background italic", children: "No output" }) : null,
|
|
21156
|
+
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: [
|
|
21157
|
+
test.passed ? /* @__PURE__ */ jsx(CheckCircle, { size: 14, className: "text-success mt-0.5" }) : /* @__PURE__ */ jsx(XCircle, { size: 14, className: "text-error mt-0.5" }),
|
|
21158
21158
|
/* @__PURE__ */ jsxs(VStack, { gap: "xs", className: "flex-1", children: [
|
|
21159
21159
|
/* @__PURE__ */ jsxs(
|
|
21160
21160
|
Typography,
|
|
21161
21161
|
{
|
|
21162
21162
|
variant: "small",
|
|
21163
|
-
className: test.passed ? "text-
|
|
21163
|
+
className: test.passed ? "text-success" : "text-error",
|
|
21164
21164
|
children: [
|
|
21165
21165
|
"Test ",
|
|
21166
21166
|
index + 1,
|
|
@@ -21169,15 +21169,15 @@ var init_CodeRunnerPanel = __esm({
|
|
|
21169
21169
|
]
|
|
21170
21170
|
}
|
|
21171
21171
|
),
|
|
21172
|
-
/* @__PURE__ */ jsxs(Typography, { variant: "small", className: "text-
|
|
21172
|
+
/* @__PURE__ */ jsxs(Typography, { variant: "small", className: "text-background", children: [
|
|
21173
21173
|
"Input: ",
|
|
21174
21174
|
test.input
|
|
21175
21175
|
] }),
|
|
21176
|
-
/* @__PURE__ */ jsxs(Typography, { variant: "small", className: "text-
|
|
21176
|
+
/* @__PURE__ */ jsxs(Typography, { variant: "small", className: "text-background", children: [
|
|
21177
21177
|
"Expected: ",
|
|
21178
21178
|
test.expectedOutput
|
|
21179
21179
|
] }),
|
|
21180
|
-
/* @__PURE__ */ jsxs(Typography, { variant: "small", className: "text-
|
|
21180
|
+
/* @__PURE__ */ jsxs(Typography, { variant: "small", className: "text-background", children: [
|
|
21181
21181
|
"Actual: ",
|
|
21182
21182
|
test.actualOutput
|
|
21183
21183
|
] })
|
|
@@ -21362,14 +21362,14 @@ var init_ConnectionBlock = __esm({
|
|
|
21362
21362
|
"div",
|
|
21363
21363
|
{
|
|
21364
21364
|
className: cn(
|
|
21365
|
-
"bg-
|
|
21365
|
+
"bg-success/10 border-l-4 border-success rounded-r-lg p-5 mb-6",
|
|
21366
21366
|
className
|
|
21367
21367
|
),
|
|
21368
21368
|
children: /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-3", children: [
|
|
21369
|
-
/* @__PURE__ */ jsx(Link2, { className: "text-
|
|
21369
|
+
/* @__PURE__ */ jsx(Link2, { className: "text-success flex-shrink-0 mt-1", size: 20 }),
|
|
21370
21370
|
/* @__PURE__ */ jsxs("div", { className: "flex-1", children: [
|
|
21371
|
-
/* @__PURE__ */ jsx("h4", { className: "font-semibold text-
|
|
21372
|
-
/* @__PURE__ */ jsx("div", { className: "prose dark:prose-invert prose-sm max-w-none text-
|
|
21371
|
+
/* @__PURE__ */ jsx("h4", { className: "font-semibold text-success mb-2", children: "Building On What You Know" }),
|
|
21372
|
+
/* @__PURE__ */ jsx("div", { className: "prose dark:prose-invert prose-sm max-w-none text-foreground", children: /* @__PURE__ */ jsx(MarkdownContent, { content }) })
|
|
21373
21373
|
] })
|
|
21374
21374
|
] })
|
|
21375
21375
|
}
|
|
@@ -21456,7 +21456,7 @@ function CounterStandard({
|
|
|
21456
21456
|
variant: "h1",
|
|
21457
21457
|
className: cn(
|
|
21458
21458
|
sizeStyles8[size].display,
|
|
21459
|
-
"font-bold tabular-nums text-primary
|
|
21459
|
+
"font-bold tabular-nums text-primary"
|
|
21460
21460
|
),
|
|
21461
21461
|
children: resolved.count
|
|
21462
21462
|
}
|
|
@@ -21529,7 +21529,7 @@ function CounterFull({
|
|
|
21529
21529
|
variant: "h1",
|
|
21530
21530
|
className: cn(
|
|
21531
21531
|
sizeStyles8[size].display,
|
|
21532
|
-
"font-bold tabular-nums text-primary
|
|
21532
|
+
"font-bold tabular-nums text-primary"
|
|
21533
21533
|
),
|
|
21534
21534
|
children: resolved.count
|
|
21535
21535
|
}
|
|
@@ -21790,11 +21790,11 @@ var init_DashboardLayout = __esm({
|
|
|
21790
21790
|
className: "h-16 px-4 border-b border-border dark:border-border",
|
|
21791
21791
|
children: [
|
|
21792
21792
|
/* @__PURE__ */ jsxs(Link, { to: "/", className: "flex items-center gap-2", children: [
|
|
21793
|
-
logo || /* @__PURE__ */ jsx(Box, { className: "w-8 h-8 bg-primary
|
|
21793
|
+
logo || /* @__PURE__ */ jsx(Box, { className: "w-8 h-8 bg-primary rounded-lg flex items-center justify-center", children: /* @__PURE__ */ jsx(
|
|
21794
21794
|
Typography,
|
|
21795
21795
|
{
|
|
21796
21796
|
variant: "small",
|
|
21797
|
-
className: "text-
|
|
21797
|
+
className: "text-primary-foreground font-bold text-sm",
|
|
21798
21798
|
as: "span",
|
|
21799
21799
|
children: appName.charAt(0).toUpperCase()
|
|
21800
21800
|
}
|
|
@@ -21873,11 +21873,11 @@ var init_DashboardLayout = __esm({
|
|
|
21873
21873
|
className: "hidden @md/dashboard:flex items-center gap-1 overflow-x-auto",
|
|
21874
21874
|
children: [
|
|
21875
21875
|
/* @__PURE__ */ jsxs(Link, { to: "/", className: "flex items-center gap-2 mr-3 shrink-0", children: [
|
|
21876
|
-
logo || /* @__PURE__ */ jsx(Box, { className: "w-7 h-7 bg-primary
|
|
21876
|
+
logo || /* @__PURE__ */ jsx(Box, { className: "w-7 h-7 bg-primary rounded-lg flex items-center justify-center", children: /* @__PURE__ */ jsx(
|
|
21877
21877
|
Typography,
|
|
21878
21878
|
{
|
|
21879
21879
|
variant: "small",
|
|
21880
|
-
className: "text-
|
|
21880
|
+
className: "text-primary-foreground font-bold text-xs",
|
|
21881
21881
|
as: "span",
|
|
21882
21882
|
children: appName.charAt(0).toUpperCase()
|
|
21883
21883
|
}
|
|
@@ -21937,8 +21937,8 @@ var init_DashboardLayout = __esm({
|
|
|
21937
21937
|
{
|
|
21938
21938
|
as: "span",
|
|
21939
21939
|
className: cn(
|
|
21940
|
-
"absolute -top-0.5 -right-0.5 min-w-[18px] h-[18px] px-1 rounded-full text-xs font-semibold
|
|
21941
|
-
action.variant === "danger" ? "bg-error" : action.variant === "primary" ? "bg-primary" : "bg-foreground"
|
|
21940
|
+
"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",
|
|
21941
|
+
action.variant === "danger" ? "bg-error text-error-foreground" : action.variant === "primary" ? "bg-primary text-primary-foreground" : "bg-foreground text-background"
|
|
21942
21942
|
),
|
|
21943
21943
|
children: action.badge
|
|
21944
21944
|
}
|
|
@@ -21960,7 +21960,7 @@ var init_DashboardLayout = __esm({
|
|
|
21960
21960
|
Box,
|
|
21961
21961
|
{
|
|
21962
21962
|
as: "span",
|
|
21963
|
-
className: "absolute -top-0.5 -right-0.5 min-w-[18px] h-[18px] px-1 bg-error rounded-full text-xs font-semibold text-
|
|
21963
|
+
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",
|
|
21964
21964
|
children: unreadCount > 99 ? "99+" : unreadCount
|
|
21965
21965
|
}
|
|
21966
21966
|
)
|
|
@@ -22243,7 +22243,7 @@ function SubMenu({
|
|
|
22243
22243
|
),
|
|
22244
22244
|
children: [
|
|
22245
22245
|
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" })),
|
|
22246
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", className: cn("flex-1", isDanger && "text-
|
|
22246
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", className: cn("flex-1", isDanger && "text-error"), children: item.label }),
|
|
22247
22247
|
item.badge !== void 0 && /* @__PURE__ */ jsx("span", { className: "ml-auto text-xs font-medium", children: item.badge })
|
|
22248
22248
|
]
|
|
22249
22249
|
},
|
|
@@ -22300,7 +22300,7 @@ function MenuItemRow({
|
|
|
22300
22300
|
Typography,
|
|
22301
22301
|
{
|
|
22302
22302
|
variant: "small",
|
|
22303
|
-
className: cn("flex-1", isDanger && "text-
|
|
22303
|
+
className: cn("flex-1", isDanger && "text-error"),
|
|
22304
22304
|
children: item.label
|
|
22305
22305
|
}
|
|
22306
22306
|
),
|
|
@@ -23068,20 +23068,24 @@ function DataGrid({
|
|
|
23068
23068
|
const bodyFields = fieldDefs.filter((f3) => f3 !== titleField && !badgeFields.includes(f3));
|
|
23069
23069
|
const primaryActions = actionDefs.filter((a) => a.variant !== "danger");
|
|
23070
23070
|
const dangerActions = actionDefs.filter((a) => a.variant === "danger");
|
|
23071
|
-
const
|
|
23072
|
-
e.stopPropagation();
|
|
23073
|
-
const payload = {
|
|
23074
|
-
id: itemData.id,
|
|
23075
|
-
row: itemData
|
|
23076
|
-
};
|
|
23077
|
-
eventBus.emit(`UI:${action.event}`, payload);
|
|
23071
|
+
const fireAction = (action, itemData) => {
|
|
23078
23072
|
if (action.navigatesTo) {
|
|
23079
23073
|
const url = action.navigatesTo.replace(
|
|
23080
23074
|
/\{\{row\.(\w+(?:\.\w+)*)\}\}/g,
|
|
23081
23075
|
(_, field) => String(itemData[field] ?? "")
|
|
23082
23076
|
);
|
|
23083
|
-
eventBus.emit("UI:NAVIGATE", { url });
|
|
23077
|
+
eventBus.emit("UI:NAVIGATE", { url, row: itemData });
|
|
23078
|
+
return;
|
|
23084
23079
|
}
|
|
23080
|
+
const payload = {
|
|
23081
|
+
id: itemData.id,
|
|
23082
|
+
row: itemData
|
|
23083
|
+
};
|
|
23084
|
+
eventBus.emit(`UI:${action.event}`, payload);
|
|
23085
|
+
};
|
|
23086
|
+
const handleActionClick = (action, itemData) => (e) => {
|
|
23087
|
+
e.stopPropagation();
|
|
23088
|
+
fireAction(action, itemData);
|
|
23085
23089
|
};
|
|
23086
23090
|
const hasRenderProp = typeof children === "function";
|
|
23087
23091
|
useEffect(() => {
|
|
@@ -23183,10 +23187,7 @@ function DataGrid({
|
|
|
23183
23187
|
label: action.label,
|
|
23184
23188
|
icon: action.icon,
|
|
23185
23189
|
event: action.event,
|
|
23186
|
-
onClick: () =>
|
|
23187
|
-
id: itemData.id,
|
|
23188
|
-
row: itemData
|
|
23189
|
-
})
|
|
23190
|
+
onClick: () => fireAction(action, itemData)
|
|
23190
23191
|
}))
|
|
23191
23192
|
}
|
|
23192
23193
|
)
|
|
@@ -23328,10 +23329,7 @@ function DataGrid({
|
|
|
23328
23329
|
label: action.label,
|
|
23329
23330
|
icon: action.icon,
|
|
23330
23331
|
event: action.event,
|
|
23331
|
-
onClick: () =>
|
|
23332
|
-
id: itemData.id,
|
|
23333
|
-
row: itemData
|
|
23334
|
-
})
|
|
23332
|
+
onClick: () => fireAction(action, itemData)
|
|
23335
23333
|
}))
|
|
23336
23334
|
}
|
|
23337
23335
|
)
|
|
@@ -25258,8 +25256,8 @@ var init_RelationSelect = __esm({
|
|
|
25258
25256
|
disabled,
|
|
25259
25257
|
className: cn(
|
|
25260
25258
|
"w-full justify-between font-normal",
|
|
25261
|
-
error && "border-
|
|
25262
|
-
isOpen && "ring-2 ring-primary
|
|
25259
|
+
error && "border-error/50 focus:border-error focus:ring-error",
|
|
25260
|
+
isOpen && "ring-2 ring-primary border-primary"
|
|
25263
25261
|
),
|
|
25264
25262
|
children: [
|
|
25265
25263
|
/* @__PURE__ */ jsx(
|
|
@@ -25339,7 +25337,7 @@ var init_RelationSelect = __esm({
|
|
|
25339
25337
|
paddingY: "sm",
|
|
25340
25338
|
className: cn(
|
|
25341
25339
|
"text-left text-sm hover:bg-muted focus:outline-none focus:bg-muted",
|
|
25342
|
-
option.value === value && "bg-primary
|
|
25340
|
+
option.value === value && "bg-primary/10 text-primary",
|
|
25343
25341
|
option.disabled && "opacity-50 cursor-not-allowed"
|
|
25344
25342
|
),
|
|
25345
25343
|
onClick: () => handleSelect(option),
|
|
@@ -25496,7 +25494,7 @@ var init_SidePanel = __esm({
|
|
|
25496
25494
|
showOverlay && /* @__PURE__ */ jsx(Presence, { show: isOpen, animation: "overlay", children: /* @__PURE__ */ jsx(
|
|
25497
25495
|
Box,
|
|
25498
25496
|
{
|
|
25499
|
-
className: "fixed inset-0 bg-
|
|
25497
|
+
className: "fixed inset-0 bg-background/80 backdrop-blur-sm z-40 lg:hidden",
|
|
25500
25498
|
onClick: handleClose
|
|
25501
25499
|
}
|
|
25502
25500
|
) }),
|
|
@@ -25863,7 +25861,7 @@ var init_WizardNavigation = __esm({
|
|
|
25863
25861
|
/* @__PURE__ */ jsx(Icon, { name: "chevron-left", size: "sm" }),
|
|
25864
25862
|
resolvedBackLabel
|
|
25865
25863
|
] }) : /* @__PURE__ */ jsx(Box, {}),
|
|
25866
|
-
/* @__PURE__ */ jsx(HStack, { align: "center", gap: "sm", children: /* @__PURE__ */ jsx(Typography, { variant: "caption", className: "text-
|
|
25864
|
+
/* @__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) }) }) }),
|
|
25867
25865
|
isLastStep && showComplete ? /* @__PURE__ */ jsx(Button, { variant: "primary", onClick: handleComplete, disabled: !isValid, children: resolvedCompleteLabel }) : showNext ? /* @__PURE__ */ jsxs(Button, { variant: "primary", onClick: handleNext, disabled: !isValid, children: [
|
|
25868
25866
|
resolvedNextLabel,
|
|
25869
25867
|
/* @__PURE__ */ jsx(Icon, { name: "chevron-right", size: "sm" })
|
|
@@ -28020,6 +28018,7 @@ var init_Lightbox = __esm({
|
|
|
28020
28018
|
{
|
|
28021
28019
|
className: cn(
|
|
28022
28020
|
"fixed inset-0 z-50 flex items-center justify-center",
|
|
28021
|
+
// eslint-disable-next-line almadar/no-hardcoded-colors -- media overlay: lightbox scrim behind images
|
|
28023
28022
|
"bg-black bg-opacity-90",
|
|
28024
28023
|
className
|
|
28025
28024
|
),
|
|
@@ -28042,7 +28041,7 @@ var init_Lightbox = __esm({
|
|
|
28042
28041
|
"p-2 rounded-full",
|
|
28043
28042
|
"text-[var(--color-foreground)] bg-[var(--color-card)]",
|
|
28044
28043
|
"hover:bg-opacity-70 transition-opacity",
|
|
28045
|
-
"focus:outline-none focus:ring-2 focus:ring-
|
|
28044
|
+
"focus:outline-none focus:ring-2 focus:ring-ring"
|
|
28046
28045
|
),
|
|
28047
28046
|
"aria-label": t("aria.closeModal"),
|
|
28048
28047
|
children: /* @__PURE__ */ jsx(Icon, { name: "x", className: "w-6 h-6" })
|
|
@@ -28061,7 +28060,7 @@ var init_Lightbox = __esm({
|
|
|
28061
28060
|
"p-2 rounded-full",
|
|
28062
28061
|
"text-[var(--color-foreground)] bg-[var(--color-card)]",
|
|
28063
28062
|
"hover:bg-opacity-70 transition-opacity",
|
|
28064
|
-
"focus:outline-none focus:ring-2 focus:ring-
|
|
28063
|
+
"focus:outline-none focus:ring-2 focus:ring-ring"
|
|
28065
28064
|
),
|
|
28066
28065
|
"aria-label": t("aria.previousImage"),
|
|
28067
28066
|
children: /* @__PURE__ */ jsx(Icon, { name: "chevron-left", className: "w-8 h-8" })
|
|
@@ -28098,7 +28097,7 @@ var init_Lightbox = __esm({
|
|
|
28098
28097
|
"p-2 rounded-full",
|
|
28099
28098
|
"text-[var(--color-foreground)] bg-[var(--color-card)]",
|
|
28100
28099
|
"hover:bg-opacity-70 transition-opacity",
|
|
28101
|
-
"focus:outline-none focus:ring-2 focus:ring-
|
|
28100
|
+
"focus:outline-none focus:ring-2 focus:ring-ring"
|
|
28102
28101
|
),
|
|
28103
28102
|
"aria-label": t("aria.nextImage"),
|
|
28104
28103
|
children: /* @__PURE__ */ jsx(Icon, { name: "chevron-right", className: "w-8 h-8" })
|
|
@@ -31171,6 +31170,7 @@ var init_QrScanner = __esm({
|
|
|
31171
31170
|
overflow: "hidden",
|
|
31172
31171
|
rounded: "sm",
|
|
31173
31172
|
className: cn(
|
|
31173
|
+
// eslint-disable-next-line almadar/no-hardcoded-colors -- media overlay: always over a dark scrim
|
|
31174
31174
|
"bg-black",
|
|
31175
31175
|
"aspect-square w-full max-w-md",
|
|
31176
31176
|
className
|
|
@@ -31235,7 +31235,9 @@ var init_QrScanner = __esm({
|
|
|
31235
31235
|
type: "button",
|
|
31236
31236
|
onClick: togglePause,
|
|
31237
31237
|
className: cn(
|
|
31238
|
+
// eslint-disable-next-line almadar/no-hardcoded-colors -- media overlay: always over a dark scrim
|
|
31238
31239
|
"rounded-full bg-black bg-opacity-60 p-2 text-white",
|
|
31240
|
+
// eslint-disable-next-line almadar/no-hardcoded-colors -- media overlay: always over a dark scrim
|
|
31239
31241
|
"hover:bg-opacity-80 focus:outline-none focus:ring-2 focus:ring-white"
|
|
31240
31242
|
),
|
|
31241
31243
|
"aria-label": isPaused ? t("qrScanner.resumeScanning") : t("qrScanner.pauseScanning"),
|
|
@@ -31248,7 +31250,9 @@ var init_QrScanner = __esm({
|
|
|
31248
31250
|
type: "button",
|
|
31249
31251
|
onClick: toggleFacing,
|
|
31250
31252
|
className: cn(
|
|
31253
|
+
// eslint-disable-next-line almadar/no-hardcoded-colors -- media overlay: always over a dark scrim
|
|
31251
31254
|
"rounded-full bg-black bg-opacity-60 p-2 text-white",
|
|
31255
|
+
// eslint-disable-next-line almadar/no-hardcoded-colors -- media overlay: always over a dark scrim
|
|
31252
31256
|
"hover:bg-opacity-80 focus:outline-none focus:ring-2 focus:ring-white"
|
|
31253
31257
|
),
|
|
31254
31258
|
"aria-label": currentFacing === "environment" ? t("qrScanner.switchToFrontCamera") : t("qrScanner.switchToRearCamera"),
|
|
@@ -31261,7 +31265,9 @@ var init_QrScanner = __esm({
|
|
|
31261
31265
|
type: "button",
|
|
31262
31266
|
onClick: handleMockScan,
|
|
31263
31267
|
className: cn(
|
|
31268
|
+
// eslint-disable-next-line almadar/no-hardcoded-colors -- media overlay: always over a dark scrim
|
|
31264
31269
|
"rounded-full bg-black bg-opacity-60 px-3 py-2 text-xs text-white",
|
|
31270
|
+
// eslint-disable-next-line almadar/no-hardcoded-colors -- media overlay: always over a dark scrim
|
|
31265
31271
|
"hover:bg-opacity-80 focus:outline-none focus:ring-2 focus:ring-white"
|
|
31266
31272
|
),
|
|
31267
31273
|
"aria-label": t("aria.mockScanDev"),
|
|
@@ -33997,10 +34003,10 @@ var init_ModuleCard = __esm({
|
|
|
33997
34003
|
init_avl_atom_types();
|
|
33998
34004
|
init_MiniStateMachine();
|
|
33999
34005
|
PERSISTENCE_BORDER = {
|
|
34000
|
-
persistent: "border-l-[3px] border-l-
|
|
34001
|
-
runtime: "border-l-[3px] border-l-
|
|
34002
|
-
singleton: "border-l-[3px] border-l-
|
|
34003
|
-
instance: "border-l-[3px] border-l-
|
|
34006
|
+
persistent: "border-l-[3px] border-l-primary border-solid",
|
|
34007
|
+
runtime: "border-l-[3px] border-l-primary border-dashed",
|
|
34008
|
+
singleton: "border-l-[3px] border-l-primary border-double",
|
|
34009
|
+
instance: "border-l-[3px] border-l-primary border-dotted"
|
|
34004
34010
|
};
|
|
34005
34011
|
PERSISTENCE_ICON = {
|
|
34006
34012
|
persistent: "\u26C1",
|
|
@@ -34030,8 +34036,8 @@ var init_ModuleCard = __esm({
|
|
|
34030
34036
|
className: "rounded-lg border border-[var(--color-border)] bg-[var(--color-card)] shadow-sm overflow-hidden",
|
|
34031
34037
|
style: { minWidth: 280, maxWidth: 400 },
|
|
34032
34038
|
children: [
|
|
34033
|
-
/* @__PURE__ */ jsx(Handle, { type: "target", position: Position.Left, className: "!w-2.5 !h-2.5 !bg-
|
|
34034
|
-
/* @__PURE__ */ jsx(Handle, { type: "source", position: Position.Right, className: "!w-2.5 !h-2.5 !bg-
|
|
34039
|
+
/* @__PURE__ */ jsx(Handle, { type: "target", position: Position.Left, className: "!w-2.5 !h-2.5 !bg-warning" }),
|
|
34040
|
+
/* @__PURE__ */ jsx(Handle, { type: "source", position: Position.Right, className: "!w-2.5 !h-2.5 !bg-warning" }),
|
|
34035
34041
|
/* @__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 }) }),
|
|
34036
34042
|
/* @__PURE__ */ jsxs("div", { className: `px-3 py-2 border-b border-[var(--color-border)] ${PERSISTENCE_BORDER[persistence] ?? ""}`, children: [
|
|
34037
34043
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5 mb-1.5", children: [
|
|
@@ -36487,19 +36493,19 @@ var init_ReflectionBlock = __esm({
|
|
|
36487
36493
|
"div",
|
|
36488
36494
|
{
|
|
36489
36495
|
className: cn(
|
|
36490
|
-
"my-6 border-l-4 border-
|
|
36496
|
+
"my-6 border-l-4 border-warning bg-warning/10 rounded-r-lg p-4",
|
|
36491
36497
|
className
|
|
36492
36498
|
),
|
|
36493
36499
|
children: /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-3", children: [
|
|
36494
|
-
/* @__PURE__ */ jsx(PauseCircle, { className: "text-
|
|
36500
|
+
/* @__PURE__ */ jsx(PauseCircle, { className: "text-warning flex-shrink-0 mt-1", size: 20 }),
|
|
36495
36501
|
/* @__PURE__ */ jsxs("div", { className: "flex-1", children: [
|
|
36496
|
-
/* @__PURE__ */ jsx("div", { className: "font-medium text-
|
|
36497
|
-
/* @__PURE__ */ jsx("p", { className: "text-
|
|
36502
|
+
/* @__PURE__ */ jsx("div", { className: "font-medium text-warning mb-2", children: "Pause & Reflect" }),
|
|
36503
|
+
/* @__PURE__ */ jsx("p", { className: "text-foreground text-sm mb-3", children: prompt }),
|
|
36498
36504
|
isExpanded ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
36499
36505
|
/* @__PURE__ */ jsx(
|
|
36500
36506
|
"textarea",
|
|
36501
36507
|
{
|
|
36502
|
-
className: "w-full p-2 border border-
|
|
36508
|
+
className: "w-full p-2 border border-input rounded text-sm bg-card text-foreground focus:ring-2 focus:ring-ring focus:border-transparent",
|
|
36503
36509
|
placeholder: "Your thoughts...",
|
|
36504
36510
|
value: note,
|
|
36505
36511
|
onChange: (e) => setNote(e.target.value),
|
|
@@ -36510,7 +36516,7 @@ var init_ReflectionBlock = __esm({
|
|
|
36510
36516
|
"button",
|
|
36511
36517
|
{
|
|
36512
36518
|
onClick: handleSave,
|
|
36513
|
-
className: "mt-2 text-sm px-3 py-1 bg-
|
|
36519
|
+
className: "mt-2 text-sm px-3 py-1 bg-warning text-warning-foreground rounded hover:opacity-90 transition-colors",
|
|
36514
36520
|
children: "Save & Continue"
|
|
36515
36521
|
}
|
|
36516
36522
|
)
|
|
@@ -36518,7 +36524,7 @@ var init_ReflectionBlock = __esm({
|
|
|
36518
36524
|
"button",
|
|
36519
36525
|
{
|
|
36520
36526
|
onClick: () => setIsExpanded(true),
|
|
36521
|
-
className: "text-sm text-
|
|
36527
|
+
className: "text-sm text-warning hover:underline",
|
|
36522
36528
|
children: savedNote ? "\u2713 Answered \xB7 Edit" : "Answer this question"
|
|
36523
36529
|
}
|
|
36524
36530
|
)
|
|
@@ -36804,7 +36810,7 @@ function DataTable({
|
|
|
36804
36810
|
)),
|
|
36805
36811
|
rowActions && /* @__PURE__ */ jsx("th", { className: "w-12 px-4 py-3" })
|
|
36806
36812
|
] }) }),
|
|
36807
|
-
/* @__PURE__ */ jsx("tbody", { className: "divide-y divide-
|
|
36813
|
+
/* @__PURE__ */ jsx("tbody", { className: "divide-y divide-border", children: isLoading ? /* @__PURE__ */ jsx("tr", { children: /* @__PURE__ */ jsx(
|
|
36808
36814
|
"td",
|
|
36809
36815
|
{
|
|
36810
36816
|
colSpan: normalizedColumns.length + (selectable ? 1 : 0) + (rowActions ? 1 : 0),
|
|
@@ -37175,7 +37181,7 @@ var init_DetailPanel = __esm({
|
|
|
37175
37181
|
};
|
|
37176
37182
|
const effectiveFieldNames = isFieldDefArray(propFields) ? normalizeFieldDefs(propFields) : fieldNames;
|
|
37177
37183
|
const fieldTypeMap = isFieldDefArray(propFields) ? buildFieldTypeMap(propFields) : {};
|
|
37178
|
-
useCallback(
|
|
37184
|
+
const handleActionClick = useCallback(
|
|
37179
37185
|
(action, data2) => {
|
|
37180
37186
|
if (action.navigatesTo) {
|
|
37181
37187
|
const url = action.navigatesTo.replace(
|
|
@@ -37367,8 +37373,9 @@ var init_DetailPanel = __esm({
|
|
|
37367
37373
|
{
|
|
37368
37374
|
variant: action.variant || "secondary",
|
|
37369
37375
|
size: "sm",
|
|
37370
|
-
action: action.event,
|
|
37376
|
+
action: action.navigatesTo ? void 0 : action.event,
|
|
37371
37377
|
actionPayload: { row: normalizedData },
|
|
37378
|
+
onClick: action.navigatesTo ? () => handleActionClick(action, normalizedData) : void 0,
|
|
37372
37379
|
icon: action.icon,
|
|
37373
37380
|
"data-testid": action.event ? `action-${action.event}` : void 0,
|
|
37374
37381
|
"data-row-id": normalizedData?.id !== void 0 ? String(normalizedData.id) : void 0,
|
|
@@ -39411,8 +39418,9 @@ var init_MediaGallery = __esm({
|
|
|
39411
39418
|
)
|
|
39412
39419
|
}
|
|
39413
39420
|
),
|
|
39414
|
-
item.caption &&
|
|
39415
|
-
|
|
39421
|
+
item.caption && // eslint-disable-next-line almadar/no-hardcoded-colors -- media overlay: caption scrim over image
|
|
39422
|
+
/* @__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 }) }),
|
|
39423
|
+
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" }) })
|
|
39416
39424
|
]
|
|
39417
39425
|
},
|
|
39418
39426
|
item.id
|
|
@@ -39441,7 +39449,7 @@ var init_MediaGallery = __esm({
|
|
|
39441
39449
|
size: "sm",
|
|
39442
39450
|
icon: X,
|
|
39443
39451
|
action: "LIGHTBOX_CLOSE",
|
|
39444
|
-
className: "text-
|
|
39452
|
+
className: "text-foreground hover:bg-muted/50"
|
|
39445
39453
|
}
|
|
39446
39454
|
) }),
|
|
39447
39455
|
/* @__PURE__ */ jsx(
|
|
@@ -39452,7 +39460,7 @@ var init_MediaGallery = __esm({
|
|
|
39452
39460
|
className: "max-w-full max-h-[80vh] object-contain rounded-md"
|
|
39453
39461
|
}
|
|
39454
39462
|
),
|
|
39455
|
-
lightboxItem.caption && /* @__PURE__ */ jsx(Typography, { variant: "body", className: "text-
|
|
39463
|
+
lightboxItem.caption && /* @__PURE__ */ jsx(Typography, { variant: "body", className: "text-foreground mt-3 text-center", children: lightboxItem.caption })
|
|
39456
39464
|
]
|
|
39457
39465
|
}
|
|
39458
39466
|
)
|
|
@@ -39894,7 +39902,7 @@ function WalkMinimap() {
|
|
|
39894
39902
|
{
|
|
39895
39903
|
variant,
|
|
39896
39904
|
size: "sm",
|
|
39897
|
-
className: `flex-shrink-0 text-[9px] ${isActive ? "ring-1 ring-
|
|
39905
|
+
className: `flex-shrink-0 text-[9px] ${isActive ? "ring-1 ring-info" : ""}`,
|
|
39898
39906
|
children: [
|
|
39899
39907
|
isDone ? "\u2713" : isActive ? "\u25CF" : "\u25CB",
|
|
39900
39908
|
" ",
|
|
@@ -40035,13 +40043,13 @@ function WalkMinimap() {
|
|
|
40035
40043
|
})
|
|
40036
40044
|
] }) }),
|
|
40037
40045
|
/* @__PURE__ */ jsx(Box, { className: "px-2 py-1 border-t border-border", children: /* @__PURE__ */ jsxs(HStack, { gap: "sm", className: "items-center justify-between", children: [
|
|
40038
|
-
/* @__PURE__ */ jsxs(Typography, { variant: "caption", className: "text-xs font-mono text-
|
|
40046
|
+
/* @__PURE__ */ jsxs(Typography, { variant: "caption", className: "text-xs font-mono text-success", children: [
|
|
40039
40047
|
"Engine: ",
|
|
40040
40048
|
engineCount,
|
|
40041
40049
|
"/",
|
|
40042
40050
|
totalTransitions
|
|
40043
40051
|
] }),
|
|
40044
|
-
domCount > 0 && /* @__PURE__ */ jsxs(Typography, { variant: "caption", className: "text-xs font-mono text-
|
|
40052
|
+
domCount > 0 && /* @__PURE__ */ jsxs(Typography, { variant: "caption", className: "text-xs font-mono text-info", children: [
|
|
40045
40053
|
"DOM: ",
|
|
40046
40054
|
domCount
|
|
40047
40055
|
] }),
|
|
@@ -40074,13 +40082,13 @@ function TraitsTab({ traits: traits2 }) {
|
|
|
40074
40082
|
const accordionItems = traits2.map((trait) => ({
|
|
40075
40083
|
id: trait.id,
|
|
40076
40084
|
header: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 w-full", children: [
|
|
40077
|
-
/* @__PURE__ */ jsx(Typography, { variant: "body", weight: "semibold", className: "text-
|
|
40085
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body", weight: "semibold", className: "text-primary", children: trait.name }),
|
|
40078
40086
|
/* @__PURE__ */ jsx(Badge, { variant: "success", size: "sm", children: trait.currentState }),
|
|
40079
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-
|
|
40087
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground ml-auto", children: t("debug.transitionsCount", { count: trait.transitionCount }) })
|
|
40080
40088
|
] }),
|
|
40081
40089
|
content: /* @__PURE__ */ jsxs(Stack, { gap: "sm", children: [
|
|
40082
40090
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
40083
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-
|
|
40091
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground mb-2", children: t("debug.states") }),
|
|
40084
40092
|
/* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-1", children: trait.states.map((state) => /* @__PURE__ */ jsx(
|
|
40085
40093
|
Badge,
|
|
40086
40094
|
{
|
|
@@ -40092,18 +40100,18 @@ function TraitsTab({ traits: traits2 }) {
|
|
|
40092
40100
|
)) })
|
|
40093
40101
|
] }),
|
|
40094
40102
|
trait.transitions.length > 0 && /* @__PURE__ */ jsxs("div", { children: [
|
|
40095
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-
|
|
40103
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground mb-2", children: t("debug.transitions") }),
|
|
40096
40104
|
/* @__PURE__ */ jsx(Stack, { gap: "xs", children: trait.transitions.map((t2, i) => /* @__PURE__ */ jsxs(Typography, { variant: "small", className: "font-mono", children: [
|
|
40097
40105
|
t2.from,
|
|
40098
40106
|
" \u2192 ",
|
|
40099
40107
|
t2.to,
|
|
40100
40108
|
" ",
|
|
40101
|
-
/* @__PURE__ */ jsxs("span", { className: "text-
|
|
40109
|
+
/* @__PURE__ */ jsxs("span", { className: "text-muted-foreground", children: [
|
|
40102
40110
|
"(",
|
|
40103
40111
|
t2.event,
|
|
40104
40112
|
")"
|
|
40105
40113
|
] }),
|
|
40106
|
-
t2.guard && /* @__PURE__ */ jsxs("span", { className: "text-
|
|
40114
|
+
t2.guard && /* @__PURE__ */ jsxs("span", { className: "text-warning", children: [
|
|
40107
40115
|
" [",
|
|
40108
40116
|
t2.guard,
|
|
40109
40117
|
"]"
|
|
@@ -40111,7 +40119,7 @@ function TraitsTab({ traits: traits2 }) {
|
|
|
40111
40119
|
] }, i)) })
|
|
40112
40120
|
] }),
|
|
40113
40121
|
trait.guards.length > 0 && /* @__PURE__ */ jsxs("div", { children: [
|
|
40114
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-
|
|
40122
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground mb-2", children: t("debug.guards") }),
|
|
40115
40123
|
/* @__PURE__ */ jsx(Stack, { gap: "xs", children: trait.guards.map((g, i) => /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
|
|
40116
40124
|
/* @__PURE__ */ jsx(Typography, { variant: "small", children: g.name }),
|
|
40117
40125
|
/* @__PURE__ */ jsx(Badge, { variant: g.lastResult === true ? "success" : g.lastResult === false ? "danger" : "default", size: "sm", children: g.lastResult === void 0 ? "?" : g.lastResult ? "\u2713" : "\u2717" })
|
|
@@ -40154,11 +40162,11 @@ function TicksTab({ ticks: ticks2 }) {
|
|
|
40154
40162
|
};
|
|
40155
40163
|
const TickCard = ({ tick, active }) => /* @__PURE__ */ jsxs(Card, { className: `p-3 ${!active ? "opacity-50" : ""}`, children: [
|
|
40156
40164
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 mb-2", children: [
|
|
40157
|
-
/* @__PURE__ */ jsx("span", { className: `w-2 h-2 rounded-full ${active ? "bg-
|
|
40158
|
-
/* @__PURE__ */ jsx(Typography, { variant: "body", weight: "semibold", className: "text-
|
|
40159
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-
|
|
40165
|
+
/* @__PURE__ */ jsx("span", { className: `w-2 h-2 rounded-full ${active ? "bg-success" : "bg-muted-foreground"}` }),
|
|
40166
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body", weight: "semibold", className: "text-warning", children: tick.name }),
|
|
40167
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground", children: tick.traitName })
|
|
40160
40168
|
] }),
|
|
40161
|
-
/* @__PURE__ */ jsxs("div", { className: "flex gap-3 text-xs text-
|
|
40169
|
+
/* @__PURE__ */ jsxs("div", { className: "flex gap-3 text-xs text-muted-foreground", children: [
|
|
40162
40170
|
/* @__PURE__ */ jsxs("span", { children: [
|
|
40163
40171
|
tick.interval,
|
|
40164
40172
|
"ms"
|
|
@@ -40181,7 +40189,7 @@ function TicksTab({ ticks: ticks2 }) {
|
|
|
40181
40189
|
] });
|
|
40182
40190
|
return /* @__PURE__ */ jsxs("div", { className: "debug-tab debug-tab--ticks", children: [
|
|
40183
40191
|
activeTicks.length > 0 && /* @__PURE__ */ jsxs("div", { className: "mb-4", children: [
|
|
40184
|
-
/* @__PURE__ */ jsxs(Typography, { variant: "small", weight: "medium", className: "text-
|
|
40192
|
+
/* @__PURE__ */ jsxs(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground mb-2", children: [
|
|
40185
40193
|
"Active (",
|
|
40186
40194
|
activeTicks.length,
|
|
40187
40195
|
")"
|
|
@@ -40189,7 +40197,7 @@ function TicksTab({ ticks: ticks2 }) {
|
|
|
40189
40197
|
/* @__PURE__ */ jsx(Stack, { gap: "sm", children: activeTicks.map((tick) => /* @__PURE__ */ jsx(TickCard, { tick, active: true }, tick.id)) })
|
|
40190
40198
|
] }),
|
|
40191
40199
|
inactiveTicks.length > 0 && /* @__PURE__ */ jsxs("div", { children: [
|
|
40192
|
-
/* @__PURE__ */ jsxs(Typography, { variant: "small", weight: "medium", className: "text-
|
|
40200
|
+
/* @__PURE__ */ jsxs(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground mb-2", children: [
|
|
40193
40201
|
"Inactive (",
|
|
40194
40202
|
inactiveTicks.length,
|
|
40195
40203
|
")"
|
|
@@ -40237,33 +40245,33 @@ function EntitiesTab({ snapshot }) {
|
|
|
40237
40245
|
id: `singleton-${name}`,
|
|
40238
40246
|
header: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
40239
40247
|
/* @__PURE__ */ jsx(Badge, { variant: "primary", size: "sm", children: t("debug.singleton") }),
|
|
40240
|
-
/* @__PURE__ */ jsx(Typography, { variant: "body", weight: "semibold", className: "text-
|
|
40248
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body", weight: "semibold", className: "text-info", children: name })
|
|
40241
40249
|
] }),
|
|
40242
|
-
content: /* @__PURE__ */ jsx("pre", { className: "text-xs text-
|
|
40250
|
+
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) })
|
|
40243
40251
|
}));
|
|
40244
40252
|
const runtimeItems = runtimeEntities.slice(0, 20).map((entity) => ({
|
|
40245
40253
|
id: entity.id,
|
|
40246
40254
|
header: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
40247
|
-
/* @__PURE__ */ jsx(Typography, { variant: "body", weight: "semibold", className: "text-
|
|
40248
|
-
/* @__PURE__ */ jsxs(Typography, { variant: "small", className: "text-
|
|
40255
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body", weight: "semibold", className: "text-info", children: entity.type }),
|
|
40256
|
+
/* @__PURE__ */ jsxs(Typography, { variant: "small", className: "text-muted-foreground", children: [
|
|
40249
40257
|
"#",
|
|
40250
40258
|
entity.id.slice(0, 8)
|
|
40251
40259
|
] })
|
|
40252
40260
|
] }),
|
|
40253
|
-
content: /* @__PURE__ */ jsx("pre", { className: "text-xs text-
|
|
40261
|
+
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) })
|
|
40254
40262
|
}));
|
|
40255
40263
|
return /* @__PURE__ */ jsxs("div", { className: "debug-tab debug-tab--entities", children: [
|
|
40256
40264
|
singletonItems.length > 0 && /* @__PURE__ */ jsxs("div", { className: "mb-4", children: [
|
|
40257
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-
|
|
40265
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground mb-2", children: t("debug.singletonsCount", { count: singletonItems.length }) }),
|
|
40258
40266
|
/* @__PURE__ */ jsx(Accordion, { items: singletonItems, multiple: true })
|
|
40259
40267
|
] }),
|
|
40260
40268
|
runtimeItems.length > 0 && /* @__PURE__ */ jsxs("div", { className: "mb-4", children: [
|
|
40261
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-
|
|
40269
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground mb-2", children: t("debug.runtimeCount", { count: runtimeEntities.length }) }),
|
|
40262
40270
|
/* @__PURE__ */ jsx(Accordion, { items: runtimeItems, multiple: true }),
|
|
40263
|
-
runtimeEntities.length > 20 && /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-
|
|
40271
|
+
runtimeEntities.length > 20 && /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground text-center mt-2", children: t("debug.moreEntities", { count: runtimeEntities.length - 20 }) })
|
|
40264
40272
|
] }),
|
|
40265
40273
|
persistentEntries.length > 0 && /* @__PURE__ */ jsxs("div", { children: [
|
|
40266
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-
|
|
40274
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground mb-2", children: t("debug.persistent") }),
|
|
40267
40275
|
/* @__PURE__ */ jsx(Stack, { gap: "xs", children: persistentEntries.map(([type, info]) => /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between py-1", children: [
|
|
40268
40276
|
/* @__PURE__ */ jsx(Typography, { variant: "small", children: type }),
|
|
40269
40277
|
/* @__PURE__ */ jsx(Badge, { variant: info.loaded ? "success" : "default", size: "sm", children: info.loaded ? t("debug.loadedCount", { count: info.count }) : t("debug.notLoaded") })
|
|
@@ -40348,7 +40356,7 @@ function EventFlowTab({ events: events2 }) {
|
|
|
40348
40356
|
);
|
|
40349
40357
|
})
|
|
40350
40358
|
] }),
|
|
40351
|
-
/* @__PURE__ */ jsxs("label", { className: "flex items-center gap-1 text-xs text-
|
|
40359
|
+
/* @__PURE__ */ jsxs("label", { className: "flex items-center gap-1 text-xs text-muted-foreground ml-auto cursor-pointer", children: [
|
|
40352
40360
|
/* @__PURE__ */ jsx(
|
|
40353
40361
|
Checkbox,
|
|
40354
40362
|
{
|
|
@@ -40363,18 +40371,18 @@ function EventFlowTab({ events: events2 }) {
|
|
|
40363
40371
|
"div",
|
|
40364
40372
|
{
|
|
40365
40373
|
ref: containerRef,
|
|
40366
|
-
className: "max-h-64 overflow-y-auto space-y-1 bg-
|
|
40374
|
+
className: "max-h-64 overflow-y-auto space-y-1 bg-muted rounded p-2",
|
|
40367
40375
|
children: filteredEvents.slice(-100).map((event) => {
|
|
40368
40376
|
const { variant, icon } = TYPE_BADGES[event.type] || { variant: "default", icon: "\u2022" };
|
|
40369
40377
|
return /* @__PURE__ */ jsxs(
|
|
40370
40378
|
"div",
|
|
40371
40379
|
{
|
|
40372
|
-
className: "flex items-start gap-2 text-xs py-1 hover:bg-
|
|
40380
|
+
className: "flex items-start gap-2 text-xs py-1 hover:bg-muted/50 rounded px-1",
|
|
40373
40381
|
children: [
|
|
40374
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-
|
|
40382
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground font-mono min-w-[65px]", children: formatTime2(event.timestamp) }),
|
|
40375
40383
|
/* @__PURE__ */ jsx("span", { children: icon }),
|
|
40376
40384
|
/* @__PURE__ */ jsx(Badge, { variant, size: "sm", className: "min-w-[60px] justify-center", children: event.source }),
|
|
40377
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-
|
|
40385
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground", children: event.message })
|
|
40378
40386
|
]
|
|
40379
40387
|
},
|
|
40380
40388
|
event.id
|
|
@@ -40438,21 +40446,21 @@ function GuardsPanel({ guards }) {
|
|
|
40438
40446
|
id: guard.id,
|
|
40439
40447
|
header: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 w-full", children: [
|
|
40440
40448
|
/* @__PURE__ */ jsx(Badge, { variant: guard.result ? "success" : "danger", size: "sm", children: guard.result ? "\u2713" : "\u2717" }),
|
|
40441
|
-
/* @__PURE__ */ jsx(Typography, { variant: "body", weight: "semibold", className: "text-
|
|
40442
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-
|
|
40443
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-
|
|
40449
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body", weight: "semibold", className: "text-warning", children: guard.guardName }),
|
|
40450
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground", children: guard.context.type === "transition" ? `${guard.context.transitionFrom} \u2192 ${guard.context.transitionTo}` : guard.context.tickName }),
|
|
40451
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground ml-auto", children: formatTime2(guard.timestamp) })
|
|
40444
40452
|
] }),
|
|
40445
40453
|
content: /* @__PURE__ */ jsxs(Stack, { gap: "sm", children: [
|
|
40446
40454
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
40447
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-
|
|
40448
|
-
/* @__PURE__ */ jsx("code", { className: "block mt-1 text-xs text-
|
|
40455
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground", children: t("debug.expression") }),
|
|
40456
|
+
/* @__PURE__ */ jsx("code", { className: "block mt-1 text-xs text-warning bg-warning/10 px-2 py-1 rounded", children: guard.expression })
|
|
40449
40457
|
] }),
|
|
40450
40458
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
40451
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-
|
|
40452
|
-
/* @__PURE__ */ jsx("pre", { className: "mt-1 text-xs text-
|
|
40459
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground", children: t("debug.inputs") }),
|
|
40460
|
+
/* @__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) })
|
|
40453
40461
|
] }),
|
|
40454
40462
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
40455
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-
|
|
40463
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground", children: t("debug.trait") }),
|
|
40456
40464
|
/* @__PURE__ */ jsx(Typography, { variant: "small", children: guard.context.traitName })
|
|
40457
40465
|
] })
|
|
40458
40466
|
] })
|
|
@@ -40508,7 +40516,7 @@ function VerificationTab({ checks, summary }) {
|
|
|
40508
40516
|
(a, b) => (sortOrder[a.status] ?? 4) - (sortOrder[b.status] ?? 4)
|
|
40509
40517
|
);
|
|
40510
40518
|
return /* @__PURE__ */ jsxs("div", { className: "debug-tab debug-tab--verification", children: [
|
|
40511
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3 mb-3 p-2 bg-
|
|
40519
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3 mb-3 p-2 bg-muted rounded", children: [
|
|
40512
40520
|
/* @__PURE__ */ jsxs(Badge, { variant: "success", size: "sm", children: [
|
|
40513
40521
|
summary.passed,
|
|
40514
40522
|
" passed"
|
|
@@ -40525,7 +40533,7 @@ function VerificationTab({ checks, summary }) {
|
|
|
40525
40533
|
summary.pending,
|
|
40526
40534
|
" pending"
|
|
40527
40535
|
] }),
|
|
40528
|
-
/* @__PURE__ */ jsxs(Typography, { variant: "small", className: "text-
|
|
40536
|
+
/* @__PURE__ */ jsxs(Typography, { variant: "small", className: "text-muted-foreground ml-auto", children: [
|
|
40529
40537
|
summary.totalChecks,
|
|
40530
40538
|
" total checks"
|
|
40531
40539
|
] })
|
|
@@ -40535,12 +40543,12 @@ function VerificationTab({ checks, summary }) {
|
|
|
40535
40543
|
return /* @__PURE__ */ jsxs(
|
|
40536
40544
|
"div",
|
|
40537
40545
|
{
|
|
40538
|
-
className: "flex items-start gap-2 p-2 rounded hover:bg-
|
|
40546
|
+
className: "flex items-start gap-2 p-2 rounded hover:bg-muted/50",
|
|
40539
40547
|
children: [
|
|
40540
40548
|
/* @__PURE__ */ jsx(Badge, { variant: config.variant, size: "sm", className: "min-w-[20px] justify-center mt-0.5", children: config.icon }),
|
|
40541
40549
|
/* @__PURE__ */ jsxs("div", { className: "flex-1 min-w-0", children: [
|
|
40542
40550
|
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "break-words", children: check.label }),
|
|
40543
|
-
check.details && /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-
|
|
40551
|
+
check.details && /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground break-words", children: check.details })
|
|
40544
40552
|
] }),
|
|
40545
40553
|
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground font-mono text-xs shrink-0", children: new Date(check.updatedAt).toLocaleTimeString("en-US", {
|
|
40546
40554
|
hour12: false,
|
|
@@ -40575,10 +40583,10 @@ var init_VerificationTab = __esm({
|
|
|
40575
40583
|
function EffectBadge({ effect }) {
|
|
40576
40584
|
const variant = EFFECT_STATUS_VARIANT[effect.status] || "default";
|
|
40577
40585
|
const icon = effect.status === "executed" ? "\u2713" : effect.status === "failed" ? "\u2717" : "-";
|
|
40578
|
-
return /* @__PURE__ */ jsxs("span", { className: "inline-flex items-center gap-1 text-xs font-mono bg-
|
|
40586
|
+
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: [
|
|
40579
40587
|
/* @__PURE__ */ jsx(Badge, { variant, size: "sm", className: "!text-[9px] !px-1 !py-0", children: icon }),
|
|
40580
|
-
/* @__PURE__ */ jsx("span", { className: "text-
|
|
40581
|
-
effect.error && /* @__PURE__ */ jsx("span", { className: "text-
|
|
40588
|
+
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: effect.type }),
|
|
40589
|
+
effect.error && /* @__PURE__ */ jsx("span", { className: "text-error truncate max-w-[120px]", title: effect.error, children: effect.error })
|
|
40582
40590
|
] });
|
|
40583
40591
|
}
|
|
40584
40592
|
function TransitionTimeline({ transitions }) {
|
|
@@ -40613,8 +40621,8 @@ function TransitionTimeline({ transitions }) {
|
|
|
40613
40621
|
const sorted = [...transitions].reverse();
|
|
40614
40622
|
return /* @__PURE__ */ jsxs("div", { className: "debug-tab debug-tab--timeline", children: [
|
|
40615
40623
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between mb-2", children: [
|
|
40616
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-
|
|
40617
|
-
/* @__PURE__ */ jsxs("label", { className: "flex items-center gap-1 text-xs text-
|
|
40624
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground", children: t("debug.transitionsRecorded", { count: transitions.length }) }),
|
|
40625
|
+
/* @__PURE__ */ jsxs("label", { className: "flex items-center gap-1 text-xs text-muted-foreground cursor-pointer", children: [
|
|
40618
40626
|
/* @__PURE__ */ jsx(
|
|
40619
40627
|
Checkbox,
|
|
40620
40628
|
{
|
|
@@ -40639,22 +40647,22 @@ function TransitionTimeline({ transitions }) {
|
|
|
40639
40647
|
{
|
|
40640
40648
|
className: `
|
|
40641
40649
|
relative pl-6 pb-3 border-l-2 cursor-pointer
|
|
40642
|
-
hover:bg-
|
|
40643
|
-
${hasFailedEffects ? "border-
|
|
40650
|
+
hover:bg-muted/50 rounded-r
|
|
40651
|
+
${hasFailedEffects ? "border-error" : "border-border"}
|
|
40644
40652
|
`,
|
|
40645
40653
|
onClick: () => setExpandedId(isExpanded ? null : trace.id),
|
|
40646
40654
|
children: [
|
|
40647
40655
|
/* @__PURE__ */ jsx("div", { className: `
|
|
40648
40656
|
absolute left-[-5px] top-1 w-2 h-2 rounded-full
|
|
40649
|
-
${hasFailedEffects ? "bg-
|
|
40657
|
+
${hasFailedEffects ? "bg-error" : allPassed ? "bg-success" : "bg-muted-foreground"}
|
|
40650
40658
|
` }),
|
|
40651
40659
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 text-xs py-1 px-2", children: [
|
|
40652
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-
|
|
40660
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground font-mono min-w-[65px]", children: formatTime2(trace.timestamp) }),
|
|
40653
40661
|
/* @__PURE__ */ jsx(Badge, { variant: "primary", size: "sm", className: "min-w-[60px] justify-center", children: trace.traitName }),
|
|
40654
|
-
/* @__PURE__ */ jsxs(Typography, { variant: "small", className: "font-mono text-
|
|
40662
|
+
/* @__PURE__ */ jsxs(Typography, { variant: "small", className: "font-mono text-muted-foreground", children: [
|
|
40655
40663
|
trace.from,
|
|
40656
40664
|
" ",
|
|
40657
|
-
/* @__PURE__ */ jsx("span", { className: "text-
|
|
40665
|
+
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground/50", children: "\u2192" }),
|
|
40658
40666
|
" ",
|
|
40659
40667
|
trace.to
|
|
40660
40668
|
] }),
|
|
@@ -40671,9 +40679,9 @@ function TransitionTimeline({ transitions }) {
|
|
|
40671
40679
|
]
|
|
40672
40680
|
}
|
|
40673
40681
|
),
|
|
40674
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-
|
|
40682
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground ml-auto", children: t("debug.effectsCount", { count: trace.effects.length }) })
|
|
40675
40683
|
] }),
|
|
40676
|
-
isExpanded && trace.effects.length > 0 && /* @__PURE__ */ jsx("div", { className: "ml-2 mt-1 mb-2 pl-2 border-l border-
|
|
40684
|
+
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: [
|
|
40677
40685
|
/* @__PURE__ */ jsx(EffectBadge, { effect }),
|
|
40678
40686
|
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) }),
|
|
40679
40687
|
effect.durationMs !== void 0 && /* @__PURE__ */ jsxs(Typography, { variant: "small", className: "text-muted-foreground text-xs", children: [
|
|
@@ -40707,8 +40715,8 @@ var init_TransitionTimeline = __esm({
|
|
|
40707
40715
|
}
|
|
40708
40716
|
});
|
|
40709
40717
|
function StatRow({ label, value, variant }) {
|
|
40710
|
-
return /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between py-1.5 border-b border-
|
|
40711
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-
|
|
40718
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between py-1.5 border-b border-border last:border-b-0", children: [
|
|
40719
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground", children: label }),
|
|
40712
40720
|
variant ? /* @__PURE__ */ jsx(Badge, { variant, size: "sm", children: String(value) }) : /* @__PURE__ */ jsx(Typography, { variant: "small", weight: "semibold", className: "font-mono", children: String(value) })
|
|
40713
40721
|
] });
|
|
40714
40722
|
}
|
|
@@ -40737,7 +40745,7 @@ function ServerBridgeTab({ bridge }) {
|
|
|
40737
40745
|
return /* @__PURE__ */ jsx("div", { className: "debug-tab debug-tab--bridge", children: /* @__PURE__ */ jsxs(Stack, { gap: "sm", children: [
|
|
40738
40746
|
/* @__PURE__ */ jsxs(Card, { className: "p-3", children: [
|
|
40739
40747
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3 mb-3", children: [
|
|
40740
|
-
/* @__PURE__ */ jsx("div", { className: `w-3 h-3 rounded-full ${bridge.connected ? "bg-
|
|
40748
|
+
/* @__PURE__ */ jsx("div", { className: `w-3 h-3 rounded-full ${bridge.connected ? "bg-success animate-pulse" : "bg-error"}` }),
|
|
40741
40749
|
/* @__PURE__ */ jsx(Typography, { variant: "h6", children: bridge.connected ? t("debug.connected") : t("debug.disconnected") })
|
|
40742
40750
|
] }),
|
|
40743
40751
|
/* @__PURE__ */ jsxs(Stack, { gap: "xs", children: [
|
|
@@ -40772,11 +40780,11 @@ function ServerBridgeTab({ bridge }) {
|
|
|
40772
40780
|
)
|
|
40773
40781
|
] })
|
|
40774
40782
|
] }),
|
|
40775
|
-
bridge.lastError && /* @__PURE__ */ jsxs(Card, { className: "p-3 border-
|
|
40776
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "semibold", className: "text-
|
|
40777
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-
|
|
40783
|
+
bridge.lastError && /* @__PURE__ */ jsxs(Card, { className: "p-3 border-error/30 bg-error/10", children: [
|
|
40784
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "semibold", className: "text-error mb-1", children: t("debug.lastError") }),
|
|
40785
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-error font-mono break-all", children: bridge.lastError })
|
|
40778
40786
|
] }),
|
|
40779
|
-
bridge.connected && /* @__PURE__ */ jsx("div", { className: "text-center py-2", children: /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-
|
|
40787
|
+
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 }) }) })
|
|
40780
40788
|
] }) });
|
|
40781
40789
|
}
|
|
40782
40790
|
var init_ServerBridgeTab = __esm({
|
|
@@ -40902,7 +40910,7 @@ function EventDispatcherTab({ traits: traits2, schema }) {
|
|
|
40902
40910
|
};
|
|
40903
40911
|
return /* @__PURE__ */ jsxs("div", { className: "debug-tab debug-tab--dispatch", children: [
|
|
40904
40912
|
/* @__PURE__ */ jsxs("div", { className: "mb-3", children: [
|
|
40905
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-
|
|
40913
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground mb-1", children: t("debug.activeStates") }),
|
|
40906
40914
|
/* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-1", children: traits2.map((trait) => /* @__PURE__ */ jsxs(Badge, { variant: "success", size: "sm", children: [
|
|
40907
40915
|
trait.name,
|
|
40908
40916
|
": ",
|
|
@@ -40910,8 +40918,8 @@ function EventDispatcherTab({ traits: traits2, schema }) {
|
|
|
40910
40918
|
] }, trait.id)) })
|
|
40911
40919
|
] }),
|
|
40912
40920
|
/* @__PURE__ */ jsxs("div", { className: "mb-3", children: [
|
|
40913
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-
|
|
40914
|
-
availableEvents.length === 0 ? /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-
|
|
40921
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground mb-1", children: t("debug.availableEvents") }),
|
|
40922
|
+
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: [
|
|
40915
40923
|
/* @__PURE__ */ jsx(
|
|
40916
40924
|
Button,
|
|
40917
40925
|
{
|
|
@@ -40922,22 +40930,22 @@ function EventDispatcherTab({ traits: traits2, schema }) {
|
|
|
40922
40930
|
children: event
|
|
40923
40931
|
}
|
|
40924
40932
|
),
|
|
40925
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-
|
|
40933
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground", children: transitions.map((t2) => `${t2.from} -> ${t2.to}`).join(", ") }),
|
|
40926
40934
|
transitions.some((tr) => tr.guard) && /* @__PURE__ */ jsx(Badge, { variant: "warning", size: "sm", children: t("debug.guarded") })
|
|
40927
40935
|
] }, event)) })
|
|
40928
40936
|
] }),
|
|
40929
40937
|
unavailableEvents.length > 0 && /* @__PURE__ */ jsxs("div", { className: "mb-3", children: [
|
|
40930
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-
|
|
40938
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground mb-1", children: t("debug.otherEvents") }),
|
|
40931
40939
|
/* @__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)) })
|
|
40932
40940
|
] }),
|
|
40933
40941
|
log13.length > 0 && /* @__PURE__ */ jsxs("div", { children: [
|
|
40934
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-
|
|
40942
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground mb-1", children: t("debug.recentTransitions") }),
|
|
40935
40943
|
/* @__PURE__ */ jsx(Stack, { gap: "xs", children: log13.map((entry, i) => /* @__PURE__ */ jsxs(Typography, { variant: "small", className: "font-mono text-xs", children: [
|
|
40936
|
-
/* @__PURE__ */ jsx("span", { className: "text-
|
|
40944
|
+
/* @__PURE__ */ jsx("span", { className: "text-primary", children: entry.traitName }),
|
|
40937
40945
|
" ",
|
|
40938
|
-
/* @__PURE__ */ jsx("span", { className: "text-
|
|
40946
|
+
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: entry.from }),
|
|
40939
40947
|
" -> ",
|
|
40940
|
-
/* @__PURE__ */ jsx("span", { className: "text-
|
|
40948
|
+
/* @__PURE__ */ jsx("span", { className: "text-success", children: entry.to })
|
|
40941
40949
|
] }, i)) })
|
|
40942
40950
|
] })
|
|
40943
40951
|
] });
|
|
@@ -40963,21 +40971,21 @@ var init_RuntimeDebugger = __esm({
|
|
|
40963
40971
|
function ServerResponseRow({ sr }) {
|
|
40964
40972
|
const { t } = useTranslate();
|
|
40965
40973
|
const entityEntries = Object.entries(sr.dataEntities);
|
|
40966
|
-
return /* @__PURE__ */ jsxs("div", { className: "ml-4 pl-2 border-l border-
|
|
40974
|
+
return /* @__PURE__ */ jsxs("div", { className: "ml-4 pl-2 border-l border-primary py-0.5 text-xs font-mono", children: [
|
|
40967
40975
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
40968
|
-
/* @__PURE__ */ jsxs("span", { className: sr.success ? "text-
|
|
40976
|
+
/* @__PURE__ */ jsxs("span", { className: sr.success ? "text-success" : "text-error", children: [
|
|
40969
40977
|
sr.success ? "\u2713" : "\u2717",
|
|
40970
40978
|
" ",
|
|
40971
40979
|
t("debug.server")
|
|
40972
40980
|
] }),
|
|
40973
|
-
/* @__PURE__ */ jsx("span", { className: "text-
|
|
40974
|
-
sr.clientEffects > 0 && /* @__PURE__ */ jsx("span", { className: "px-1 rounded bg-
|
|
40975
|
-
sr.emittedEvents.length > 0 && /* @__PURE__ */ jsxs("span", { className: "px-1 rounded bg-
|
|
40981
|
+
/* @__PURE__ */ jsx("span", { className: "text-primary", children: sr.orbitalName }),
|
|
40982
|
+
sr.clientEffects > 0 && /* @__PURE__ */ jsx("span", { className: "px-1 rounded bg-primary/10 text-primary", children: t("debug.clientEffectsCount", { count: sr.clientEffects }) }),
|
|
40983
|
+
sr.emittedEvents.length > 0 && /* @__PURE__ */ jsxs("span", { className: "px-1 rounded bg-primary/10 text-primary", children: [
|
|
40976
40984
|
t("debug.emitLabel"),
|
|
40977
40985
|
" ",
|
|
40978
40986
|
sr.emittedEvents.join(", ")
|
|
40979
40987
|
] }),
|
|
40980
|
-
sr.error && /* @__PURE__ */ jsx("span", { className: "px-1 rounded bg-
|
|
40988
|
+
sr.error && /* @__PURE__ */ jsx("span", { className: "px-1 rounded bg-error/10 text-error truncate max-w-[300px]", children: sr.error })
|
|
40981
40989
|
] }),
|
|
40982
40990
|
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: [
|
|
40983
40991
|
name,
|
|
@@ -40993,9 +41001,9 @@ function TransitionRow({ trace }) {
|
|
|
40993
41001
|
if (isServerEntry && trace.serverResponse) {
|
|
40994
41002
|
return /* @__PURE__ */ jsxs("div", { className: "py-0.5 border-b border-border last:border-0", children: [
|
|
40995
41003
|
/* @__PURE__ */ jsxs("div", { className: "flex items-start gap-2 text-xs font-mono", children: [
|
|
40996
|
-
/* @__PURE__ */ jsx("span", { className: "mt-1.5 w-1.5 h-1.5 rounded-full flex-shrink-0 bg-
|
|
41004
|
+
/* @__PURE__ */ jsx("span", { className: "mt-1.5 w-1.5 h-1.5 rounded-full flex-shrink-0 bg-primary" }),
|
|
40997
41005
|
/* @__PURE__ */ jsx(Badge, { variant: "warning", size: "sm", className: "flex-shrink-0", children: trace.event }),
|
|
40998
|
-
/* @__PURE__ */ jsx("span", { className: "text-
|
|
41006
|
+
/* @__PURE__ */ jsx("span", { className: "text-primary flex-shrink-0", children: t("debug.serverResponse") })
|
|
40999
41007
|
] }),
|
|
41000
41008
|
/* @__PURE__ */ jsx(ServerResponseRow, { sr: trace.serverResponse })
|
|
41001
41009
|
] });
|
|
@@ -41004,7 +41012,7 @@ function TransitionRow({ trace }) {
|
|
|
41004
41012
|
/* @__PURE__ */ jsxs("div", { className: "flex items-start gap-2 text-xs font-mono", children: [
|
|
41005
41013
|
/* @__PURE__ */ jsx("span", { className: cn(
|
|
41006
41014
|
"mt-1.5 w-1.5 h-1.5 rounded-full flex-shrink-0",
|
|
41007
|
-
hasFailedEffects ? "bg-
|
|
41015
|
+
hasFailedEffects ? "bg-error" : "bg-success"
|
|
41008
41016
|
) }),
|
|
41009
41017
|
/* @__PURE__ */ jsx(Badge, { variant: "info", size: "sm", className: "flex-shrink-0", children: trace.event }),
|
|
41010
41018
|
/* @__PURE__ */ jsx("span", { className: "text-foreground flex-shrink-0", children: trace.traitName }),
|
|
@@ -41018,7 +41026,7 @@ function TransitionRow({ trace }) {
|
|
|
41018
41026
|
] }),
|
|
41019
41027
|
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(
|
|
41020
41028
|
"px-1 rounded text-xs",
|
|
41021
|
-
eff.status === "executed" ? "bg-
|
|
41029
|
+
eff.status === "executed" ? "bg-success/10 text-success" : eff.status === "failed" ? "bg-error/10 text-error" : "bg-warning/10 text-warning"
|
|
41022
41030
|
), children: [
|
|
41023
41031
|
eff.status === "executed" ? "\u2713" : eff.status === "failed" ? "\u2717" : "-",
|
|
41024
41032
|
" ",
|
|
@@ -41052,7 +41060,7 @@ function VerifyModePanel({
|
|
|
41052
41060
|
{
|
|
41053
41061
|
className: cn(
|
|
41054
41062
|
"runtime-debugger runtime-debugger--verify",
|
|
41055
|
-
"flex flex-col bg-[var(--color-card)] text-[var(--color-foreground)] border-t-2 border-
|
|
41063
|
+
"flex flex-col bg-[var(--color-card)] text-[var(--color-foreground)] border-t-2 border-accent",
|
|
41056
41064
|
hudBottom ? "" : "fixed bottom-0 left-0 right-0",
|
|
41057
41065
|
className
|
|
41058
41066
|
),
|
|
@@ -41073,8 +41081,8 @@ function VerifyModePanel({
|
|
|
41073
41081
|
/* @__PURE__ */ jsx("span", { className: "text-foreground/50 w-3", "aria-hidden": true, children: expanded ? "\u25BE" : "\u25B8" }),
|
|
41074
41082
|
/* @__PURE__ */ jsx(Badge, { variant: failedChecks > 0 ? "danger" : "success", size: "sm", children: failedChecks > 0 ? t("debug.failCount", { count: failedChecks }) : t("debug.ok") }),
|
|
41075
41083
|
/* @__PURE__ */ jsx("span", { className: "text-foreground/70", children: t("debug.localCount", { count: localCount }) }),
|
|
41076
|
-
/* @__PURE__ */ jsx("span", { className: "text-
|
|
41077
|
-
traitStates && /* @__PURE__ */ jsx("span", { className: "text-
|
|
41084
|
+
/* @__PURE__ */ jsx("span", { className: "text-primary", children: t("debug.serverCount", { count: serverCount }) }),
|
|
41085
|
+
traitStates && /* @__PURE__ */ jsx("span", { className: "text-accent truncate max-w-[400px]", children: traitStates }),
|
|
41078
41086
|
!expanded && transitions.length > 0 && /* @__PURE__ */ jsx("span", { className: "ml-auto text-foreground/50", children: t("debug.transitionsCount", { count: transitions.length }) })
|
|
41079
41087
|
]
|
|
41080
41088
|
}
|
|
@@ -41269,7 +41277,7 @@ function RuntimeDebugger({
|
|
|
41269
41277
|
title: t("debug.openDebugger"),
|
|
41270
41278
|
children: failedChecks > 0 ? /* @__PURE__ */ jsxs("span", { className: "relative", children: [
|
|
41271
41279
|
/* @__PURE__ */ jsx("span", { children: "V" }),
|
|
41272
|
-
/* @__PURE__ */ jsx("span", { className: "absolute -top-1 -right-2 w-2 h-2 bg-
|
|
41280
|
+
/* @__PURE__ */ jsx("span", { className: "absolute -top-1 -right-2 w-2 h-2 bg-error rounded-full" })
|
|
41273
41281
|
] }) : /* @__PURE__ */ jsx("span", { children: "V" })
|
|
41274
41282
|
}
|
|
41275
41283
|
) : /* @__PURE__ */ jsxs(Card, { className: "runtime-debugger__panel", children: [
|
|
@@ -41357,7 +41365,7 @@ var init_SegmentRenderer = __esm({
|
|
|
41357
41365
|
"div",
|
|
41358
41366
|
{
|
|
41359
41367
|
className: cn(
|
|
41360
|
-
"border border-
|
|
41368
|
+
"border border-border rounded-lg p-2 md:p-4 overflow-x-auto space-y-6",
|
|
41361
41369
|
containerClassName,
|
|
41362
41370
|
className
|
|
41363
41371
|
),
|
|
@@ -45654,6 +45662,66 @@ function useNavigationId2() {
|
|
|
45654
45662
|
init_useEventBus();
|
|
45655
45663
|
var xOrbitalLog = createLogger("almadar:runtime:cross-orbital");
|
|
45656
45664
|
var serverBridgeLog = createLogger("almadar:ui:server-bridge");
|
|
45665
|
+
function reEmitServerEvent(eventBus, emitted, origin) {
|
|
45666
|
+
const evTrait = emitted.source?.trait;
|
|
45667
|
+
if (!evTrait) {
|
|
45668
|
+
xOrbitalLog.warn("emit:dropped-no-source", { event: emitted.event, origin });
|
|
45669
|
+
return;
|
|
45670
|
+
}
|
|
45671
|
+
const key = emitted.source?.orbital ? `UI:${emitted.source.orbital}.${evTrait}.${emitted.event}` : `UI:${evTrait}.${emitted.event}`;
|
|
45672
|
+
xOrbitalLog.info("emit:rebroadcast", {
|
|
45673
|
+
busKey: key,
|
|
45674
|
+
sourceOrbital: emitted.source?.orbital,
|
|
45675
|
+
sourceTrait: evTrait,
|
|
45676
|
+
origin
|
|
45677
|
+
});
|
|
45678
|
+
eventBus.emit(key, emitted.payload);
|
|
45679
|
+
}
|
|
45680
|
+
function isBusPushEnvelope(value) {
|
|
45681
|
+
return value.type === "bus" && typeof value.event === "string";
|
|
45682
|
+
}
|
|
45683
|
+
var tabClientId;
|
|
45684
|
+
function getTabClientId() {
|
|
45685
|
+
if (tabClientId === void 0) tabClientId = crypto.randomUUID();
|
|
45686
|
+
return tabClientId;
|
|
45687
|
+
}
|
|
45688
|
+
var pushChannels = /* @__PURE__ */ new Map();
|
|
45689
|
+
function acquirePushChannel(url, subscriber) {
|
|
45690
|
+
let channel = pushChannels.get(url);
|
|
45691
|
+
if (channel === void 0) {
|
|
45692
|
+
const source = new EventSource(url);
|
|
45693
|
+
const created = { source, subscribers: /* @__PURE__ */ new Set() };
|
|
45694
|
+
source.onmessage = (ev) => {
|
|
45695
|
+
let parsed;
|
|
45696
|
+
try {
|
|
45697
|
+
parsed = JSON.parse(ev.data);
|
|
45698
|
+
} catch (err) {
|
|
45699
|
+
serverBridgeLog.warn("push:parse-failed", { error: err instanceof Error ? err.message : String(err) });
|
|
45700
|
+
return;
|
|
45701
|
+
}
|
|
45702
|
+
if (!isBusPushEnvelope(parsed)) return;
|
|
45703
|
+
for (const sub of created.subscribers) sub(parsed);
|
|
45704
|
+
};
|
|
45705
|
+
source.onerror = () => {
|
|
45706
|
+
serverBridgeLog.warn("push:connection-error", { url });
|
|
45707
|
+
};
|
|
45708
|
+
pushChannels.set(url, created);
|
|
45709
|
+
channel = created;
|
|
45710
|
+
}
|
|
45711
|
+
channel.subscribers.add(subscriber);
|
|
45712
|
+
return () => {
|
|
45713
|
+
channel.subscribers.delete(subscriber);
|
|
45714
|
+
if (channel.subscribers.size === 0) {
|
|
45715
|
+
channel.source.close();
|
|
45716
|
+
pushChannels.delete(url);
|
|
45717
|
+
}
|
|
45718
|
+
};
|
|
45719
|
+
}
|
|
45720
|
+
function deriveEventsUrl(serverUrl) {
|
|
45721
|
+
const trimmed = serverUrl.replace(/\/+$/, "");
|
|
45722
|
+
const apiRoot = trimmed.replace(/\/[^/]*$/, "");
|
|
45723
|
+
return `${apiRoot}/events`;
|
|
45724
|
+
}
|
|
45657
45725
|
function createHttpTransport(serverUrl) {
|
|
45658
45726
|
return {
|
|
45659
45727
|
register: async (schema) => {
|
|
@@ -45680,11 +45748,12 @@ function createHttpTransport(serverUrl) {
|
|
|
45680
45748
|
} catch {
|
|
45681
45749
|
}
|
|
45682
45750
|
},
|
|
45683
|
-
sendEvent: async (orbitalName, event, payload) => {
|
|
45751
|
+
sendEvent: async (orbitalName, event, payload, clientId) => {
|
|
45752
|
+
const body = { event, payload, clientId };
|
|
45684
45753
|
const res = await fetch(`${serverUrl}/${orbitalName}/events`, {
|
|
45685
45754
|
method: "POST",
|
|
45686
45755
|
headers: { "Content-Type": "application/json" },
|
|
45687
|
-
body: JSON.stringify(
|
|
45756
|
+
body: JSON.stringify(body)
|
|
45688
45757
|
});
|
|
45689
45758
|
return res.json();
|
|
45690
45759
|
}
|
|
@@ -45729,7 +45798,7 @@ function ServerBridgeProvider({
|
|
|
45729
45798
|
const emptyMeta = { success: false, clientEffects: 0, dataEntities: {}, emittedEvents: [] };
|
|
45730
45799
|
if (!connected) return { effects: [], meta: emptyMeta };
|
|
45731
45800
|
try {
|
|
45732
|
-
const result = await transport.sendEvent(orbitalName, event, payload);
|
|
45801
|
+
const result = await transport.sendEvent(orbitalName, event, payload, getTabClientId());
|
|
45733
45802
|
const effects = [];
|
|
45734
45803
|
const responseData = result.data || {};
|
|
45735
45804
|
const dataEntities = {};
|
|
@@ -45774,22 +45843,7 @@ function ServerBridgeProvider({
|
|
|
45774
45843
|
}
|
|
45775
45844
|
if (result.emittedEvents) {
|
|
45776
45845
|
for (const emitted of result.emittedEvents) {
|
|
45777
|
-
|
|
45778
|
-
if (!evTrait) {
|
|
45779
|
-
xOrbitalLog.warn("emit:dropped-no-source", {
|
|
45780
|
-
event: emitted.event,
|
|
45781
|
-
dispatchOrbital: orbitalName
|
|
45782
|
-
});
|
|
45783
|
-
continue;
|
|
45784
|
-
}
|
|
45785
|
-
const key = emitted.source?.orbital ? `UI:${emitted.source.orbital}.${evTrait}.${emitted.event}` : `UI:${evTrait}.${emitted.event}`;
|
|
45786
|
-
xOrbitalLog.info("emit:rebroadcast", {
|
|
45787
|
-
busKey: key,
|
|
45788
|
-
sourceOrbital: emitted.source?.orbital,
|
|
45789
|
-
sourceTrait: evTrait,
|
|
45790
|
-
dispatchOrbital: orbitalName
|
|
45791
|
-
});
|
|
45792
|
-
eventBus.emit(key, emitted.payload);
|
|
45846
|
+
reEmitServerEvent(eventBus, emitted, orbitalName);
|
|
45793
45847
|
}
|
|
45794
45848
|
}
|
|
45795
45849
|
} else if (result.error) {
|
|
@@ -45831,6 +45885,19 @@ function ServerBridgeProvider({
|
|
|
45831
45885
|
unregisterSchema();
|
|
45832
45886
|
};
|
|
45833
45887
|
}, [schema, registerSchema, unregisterSchema]);
|
|
45888
|
+
useEffect(() => {
|
|
45889
|
+
if (!serverUrl) return;
|
|
45890
|
+
if (typeof EventSource === "undefined") return;
|
|
45891
|
+
const url = `${deriveEventsUrl(serverUrl)}?clientId=${encodeURIComponent(getTabClientId())}`;
|
|
45892
|
+
return acquirePushChannel(url, (parsed) => {
|
|
45893
|
+
serverBridgeLog.debug("push:received", {
|
|
45894
|
+
event: parsed.event,
|
|
45895
|
+
sourceOrbital: parsed.source?.orbital,
|
|
45896
|
+
sourceTrait: parsed.source?.trait
|
|
45897
|
+
});
|
|
45898
|
+
reEmitServerEvent(eventBus, parsed, "push");
|
|
45899
|
+
});
|
|
45900
|
+
}, [serverUrl, eventBus]);
|
|
45834
45901
|
return /* @__PURE__ */ jsx(ServerBridgeContext.Provider, { value: { connected, sendEvent }, children });
|
|
45835
45902
|
}
|
|
45836
45903
|
var log12 = createLogger("almadar:ui:trait-provider");
|