@almadar/ui 5.122.14 → 5.124.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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 +354 -234
- package/dist/avl/index.js +356 -236
- package/dist/components/index.cjs +273 -198
- package/dist/components/index.d.cts +18 -12
- package/dist/components/index.d.ts +18 -12
- package/dist/components/index.js +273 -198
- package/dist/context/index.cjs +34 -66
- package/dist/context/index.d.cts +1 -1
- package/dist/context/index.d.ts +1 -1
- package/dist/context/index.js +34 -66
- package/dist/hooks/index.cjs +8 -0
- package/dist/hooks/index.js +8 -0
- package/dist/lib/drawable/three/index.cjs +6 -0
- package/dist/lib/drawable/three/index.js +6 -0
- package/dist/marketing/index.cjs +7 -0
- package/dist/marketing/index.js +7 -0
- package/dist/providers/index.cjs +343 -217
- package/dist/providers/index.d.cts +6 -6
- package/dist/providers/index.d.ts +6 -6
- package/dist/providers/index.js +343 -217
- package/dist/runtime/index.cjs +347 -227
- package/dist/runtime/index.d.cts +4 -2
- package/dist/runtime/index.d.ts +4 -2
- package/dist/runtime/index.js +349 -229
- 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
|
@@ -1089,6 +1089,7 @@ var init_Button = __esm({
|
|
|
1089
1089
|
"button",
|
|
1090
1090
|
{
|
|
1091
1091
|
ref,
|
|
1092
|
+
type: "button",
|
|
1092
1093
|
disabled: disabled || isLoading,
|
|
1093
1094
|
className: cn(
|
|
1094
1095
|
"relative inline-flex items-center justify-center gap-2",
|
|
@@ -1182,6 +1183,11 @@ var init_Typography = __esm({
|
|
|
1182
1183
|
inherit: "text-inherit"
|
|
1183
1184
|
};
|
|
1184
1185
|
weightStyles = {
|
|
1186
|
+
// Neutral: an atom default of "none" must not override the variant's baked
|
|
1187
|
+
// weight (C-PATTERN-ENUM-BLOCKS-NEUTRAL-OVERRIDE — `variant={h2}` rendered
|
|
1188
|
+
// tiny because the ui-typography atom's `weight: light`/`size: xs` defaults
|
|
1189
|
+
// clobbered every variant).
|
|
1190
|
+
none: "",
|
|
1185
1191
|
light: "font-light",
|
|
1186
1192
|
normal: "font-normal",
|
|
1187
1193
|
medium: "font-medium",
|
|
@@ -1207,6 +1213,7 @@ var init_Typography = __esm({
|
|
|
1207
1213
|
label: "span"
|
|
1208
1214
|
};
|
|
1209
1215
|
typographySizeStyles = {
|
|
1216
|
+
none: "",
|
|
1210
1217
|
xs: "text-xs",
|
|
1211
1218
|
sm: "text-sm",
|
|
1212
1219
|
md: "text-base",
|
|
@@ -4616,15 +4623,15 @@ var init_TextHighlight = __esm({
|
|
|
4616
4623
|
const typeStyles = {
|
|
4617
4624
|
question: cn(
|
|
4618
4625
|
// Blue border for questions
|
|
4619
|
-
"bg-card border-b-2 border-primary
|
|
4626
|
+
"bg-card border-b-2 border-primary",
|
|
4620
4627
|
"hover:bg-muted",
|
|
4621
|
-
isActive && "bg-primary
|
|
4628
|
+
isActive && "bg-primary/10 ring-2 ring-primary"
|
|
4622
4629
|
),
|
|
4623
4630
|
note: cn(
|
|
4624
4631
|
// Yellow border for notes
|
|
4625
|
-
"bg-card border-b-2 border-
|
|
4632
|
+
"bg-card border-b-2 border-warning",
|
|
4626
4633
|
"hover:bg-muted",
|
|
4627
|
-
isActive && "bg-
|
|
4634
|
+
isActive && "bg-warning/10 ring-2 ring-warning"
|
|
4628
4635
|
)
|
|
4629
4636
|
};
|
|
4630
4637
|
return /* @__PURE__ */ jsx(
|
|
@@ -4970,7 +4977,7 @@ function DayCell({
|
|
|
4970
4977
|
{
|
|
4971
4978
|
className: cn(
|
|
4972
4979
|
"p-2 text-center cursor-pointer hover:bg-muted transition-colors",
|
|
4973
|
-
isToday && "bg-
|
|
4980
|
+
isToday && "bg-primary/10",
|
|
4974
4981
|
className
|
|
4975
4982
|
),
|
|
4976
4983
|
onClick: handleClick,
|
|
@@ -4981,7 +4988,7 @@ function DayCell({
|
|
|
4981
4988
|
variant: "small",
|
|
4982
4989
|
className: cn(
|
|
4983
4990
|
"font-medium",
|
|
4984
|
-
isToday ? "text-
|
|
4991
|
+
isToday ? "text-primary" : "text-muted-foreground"
|
|
4985
4992
|
),
|
|
4986
4993
|
children: dayAbbr
|
|
4987
4994
|
}
|
|
@@ -4993,7 +5000,7 @@ function DayCell({
|
|
|
4993
5000
|
rounded: "full",
|
|
4994
5001
|
className: cn(
|
|
4995
5002
|
"h-8 w-8 mx-auto items-center justify-center",
|
|
4996
|
-
isToday && "bg-
|
|
5003
|
+
isToday && "bg-primary text-primary-foreground"
|
|
4997
5004
|
),
|
|
4998
5005
|
children: /* @__PURE__ */ jsx(Typography, { variant: "body", className: "font-semibold", children: safeDate.getDate() })
|
|
4999
5006
|
}
|
|
@@ -12498,19 +12505,19 @@ var init_ActivationBlock = __esm({
|
|
|
12498
12505
|
"div",
|
|
12499
12506
|
{
|
|
12500
12507
|
className: cn(
|
|
12501
|
-
"bg-
|
|
12508
|
+
"bg-primary/10 border-2 border-primary rounded-lg p-5 mb-6",
|
|
12502
12509
|
className
|
|
12503
12510
|
),
|
|
12504
12511
|
children: /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-3", children: [
|
|
12505
|
-
/* @__PURE__ */ jsx(Lightbulb, { className: "text-
|
|
12512
|
+
/* @__PURE__ */ jsx(Lightbulb, { className: "text-primary flex-shrink-0 mt-1", size: 24 }),
|
|
12506
12513
|
/* @__PURE__ */ jsxs("div", { className: "flex-1", children: [
|
|
12507
|
-
/* @__PURE__ */ jsx("h4", { className: "font-semibold text-
|
|
12508
|
-
/* @__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 }),
|
|
12509
12516
|
isExpanded ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
12510
12517
|
/* @__PURE__ */ jsx(
|
|
12511
12518
|
"textarea",
|
|
12512
12519
|
{
|
|
12513
|
-
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",
|
|
12514
12521
|
placeholder: "Jot down your thoughts...",
|
|
12515
12522
|
value: response,
|
|
12516
12523
|
onChange: (e) => setResponse(e.target.value),
|
|
@@ -12522,7 +12529,7 @@ var init_ActivationBlock = __esm({
|
|
|
12522
12529
|
"button",
|
|
12523
12530
|
{
|
|
12524
12531
|
onClick: handleSubmit,
|
|
12525
|
-
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",
|
|
12526
12533
|
children: "Continue to Lesson \u2192"
|
|
12527
12534
|
}
|
|
12528
12535
|
),
|
|
@@ -12533,7 +12540,7 @@ var init_ActivationBlock = __esm({
|
|
|
12533
12540
|
emit(`UI:${saveEvent}`, { response: "" });
|
|
12534
12541
|
setIsExpanded(false);
|
|
12535
12542
|
},
|
|
12536
|
-
className: "px-4 py-2 text-
|
|
12543
|
+
className: "px-4 py-2 text-primary hover:underline text-sm",
|
|
12537
12544
|
children: "Skip for now"
|
|
12538
12545
|
}
|
|
12539
12546
|
)
|
|
@@ -12542,7 +12549,7 @@ var init_ActivationBlock = __esm({
|
|
|
12542
12549
|
"button",
|
|
12543
12550
|
{
|
|
12544
12551
|
onClick: () => setIsExpanded(true),
|
|
12545
|
-
className: "text-sm text-
|
|
12552
|
+
className: "text-sm text-primary hover:underline font-medium",
|
|
12546
12553
|
children: "\u2713 Answered \xB7 Edit response"
|
|
12547
12554
|
}
|
|
12548
12555
|
)
|
|
@@ -13046,7 +13053,7 @@ var init_AuthLayout = __esm({
|
|
|
13046
13053
|
VStack,
|
|
13047
13054
|
{
|
|
13048
13055
|
className: cn(
|
|
13049
|
-
"hidden lg:flex lg:w-1/2 bg-primary
|
|
13056
|
+
"hidden lg:flex lg:w-1/2 bg-primary relative overflow-hidden",
|
|
13050
13057
|
"justify-between p-12"
|
|
13051
13058
|
),
|
|
13052
13059
|
style: backgroundImage ? {
|
|
@@ -13055,7 +13062,7 @@ var init_AuthLayout = __esm({
|
|
|
13055
13062
|
} : void 0,
|
|
13056
13063
|
gap: "none",
|
|
13057
13064
|
children: [
|
|
13058
|
-
/* @__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" }),
|
|
13059
13066
|
/* @__PURE__ */ jsx(Box, { className: "relative z-10", children: /* @__PURE__ */ jsxs(Link, { to: "/", className: "flex items-center gap-3", children: [
|
|
13060
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(
|
|
13061
13068
|
Typography,
|
|
@@ -13140,7 +13147,7 @@ var init_AuthLayout = __esm({
|
|
|
13140
13147
|
),
|
|
13141
13148
|
children: /* @__PURE__ */ jsxs(Box, { className: "w-full max-w-md", children: [
|
|
13142
13149
|
/* @__PURE__ */ jsx(Box, { className: "lg:hidden mb-8 text-center", children: /* @__PURE__ */ jsxs(Link, { to: "/", className: "inline-flex items-center gap-3", children: [
|
|
13143
|
-
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(
|
|
13144
13151
|
Typography,
|
|
13145
13152
|
{
|
|
13146
13153
|
variant: "body1",
|
|
@@ -15131,7 +15138,7 @@ var init_CodeBlock = __esm({
|
|
|
15131
15138
|
{
|
|
15132
15139
|
justify: "between",
|
|
15133
15140
|
align: "center",
|
|
15134
|
-
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",
|
|
15135
15142
|
children: [
|
|
15136
15143
|
showLanguageBadge && /* @__PURE__ */ jsx(Badge, { variant: "default", size: "sm", children: language }),
|
|
15137
15144
|
effectiveCopy && /* @__PURE__ */ jsx(
|
|
@@ -15140,9 +15147,9 @@ var init_CodeBlock = __esm({
|
|
|
15140
15147
|
variant: "ghost",
|
|
15141
15148
|
size: "sm",
|
|
15142
15149
|
onClick: handleCopy,
|
|
15143
|
-
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",
|
|
15144
15151
|
"aria-label": t("common.copy"),
|
|
15145
|
-
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" })
|
|
15146
15153
|
}
|
|
15147
15154
|
)
|
|
15148
15155
|
]
|
|
@@ -15510,12 +15517,12 @@ var init_BloomQuizBlock = __esm({
|
|
|
15510
15517
|
init_useEventBus();
|
|
15511
15518
|
init_cn();
|
|
15512
15519
|
BLOOM_CONFIG = {
|
|
15513
|
-
remember: { color: "bg-
|
|
15514
|
-
understand: { color: "bg-
|
|
15515
|
-
apply: { color: "bg-
|
|
15516
|
-
analyze: { color: "bg-
|
|
15517
|
-
evaluate: { color: "bg-
|
|
15518
|
-
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" }
|
|
15519
15526
|
};
|
|
15520
15527
|
BloomQuizBlock = ({
|
|
15521
15528
|
level,
|
|
@@ -15541,22 +15548,22 @@ var init_BloomQuizBlock = __esm({
|
|
|
15541
15548
|
"div",
|
|
15542
15549
|
{
|
|
15543
15550
|
className: cn(
|
|
15544
|
-
"rounded-lg border border-
|
|
15551
|
+
"rounded-lg border border-primary p-4 my-4 transition-all",
|
|
15545
15552
|
config.bgColor,
|
|
15546
15553
|
className
|
|
15547
15554
|
),
|
|
15548
15555
|
children: [
|
|
15549
15556
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between mb-3", children: [
|
|
15550
15557
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 flex-wrap", children: [
|
|
15551
|
-
index !== void 0 && /* @__PURE__ */ jsxs("span", { className: "text-
|
|
15558
|
+
index !== void 0 && /* @__PURE__ */ jsxs("span", { className: "text-muted-foreground font-medium text-sm", children: [
|
|
15552
15559
|
"Question ",
|
|
15553
15560
|
index + 1
|
|
15554
15561
|
] }),
|
|
15555
|
-
/* @__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 })
|
|
15556
15563
|
] }),
|
|
15557
|
-
isAnswered && /* @__PURE__ */ jsx(CheckCircle, { className: "text-
|
|
15564
|
+
isAnswered && /* @__PURE__ */ jsx(CheckCircle, { className: "text-success flex-shrink-0", size: 20 })
|
|
15558
15565
|
] }),
|
|
15559
|
-
/* @__PURE__ */ jsx("div", { className: "font-semibold text-
|
|
15566
|
+
/* @__PURE__ */ jsx("div", { className: "font-semibold text-primary mb-3 space-y-2", children: questionSegments.map(
|
|
15560
15567
|
(segment, idx) => segment.type === "markdown" ? /* @__PURE__ */ jsx(MarkdownContent, { content: segment.content }, `q-md-${idx}`) : /* @__PURE__ */ jsx(
|
|
15561
15568
|
CodeBlock,
|
|
15562
15569
|
{
|
|
@@ -15570,13 +15577,13 @@ var init_BloomQuizBlock = __esm({
|
|
|
15570
15577
|
"button",
|
|
15571
15578
|
{
|
|
15572
15579
|
type: "button",
|
|
15573
|
-
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",
|
|
15574
15581
|
onClick: handleReveal,
|
|
15575
15582
|
children: revealed ? "Hide Answer" : "Reveal Answer"
|
|
15576
15583
|
}
|
|
15577
15584
|
),
|
|
15578
|
-
revealed && /* @__PURE__ */ jsxs("div", { className: "rounded-lg bg-
|
|
15579
|
-
/* @__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:" }),
|
|
15580
15587
|
answerSegments.map(
|
|
15581
15588
|
(segment, idx) => segment.type === "markdown" ? /* @__PURE__ */ jsx(MarkdownContent, { content: segment.content }, `a-md-${idx}`) : /* @__PURE__ */ jsx(
|
|
15582
15589
|
CodeBlock,
|
|
@@ -15850,12 +15857,12 @@ var init_QuizBlock = __esm({
|
|
|
15850
15857
|
}) => {
|
|
15851
15858
|
const { t } = useTranslate();
|
|
15852
15859
|
const [revealed, setRevealed] = useState(false);
|
|
15853
|
-
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: [
|
|
15854
15861
|
/* @__PURE__ */ jsxs(HStack, { gap: "sm", align: "start", children: [
|
|
15855
|
-
/* @__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" }),
|
|
15856
15863
|
/* @__PURE__ */ jsx(Typography, { variant: "body", className: "font-medium", children: question })
|
|
15857
15864
|
] }),
|
|
15858
|
-
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,
|
|
15859
15866
|
/* @__PURE__ */ jsx(
|
|
15860
15867
|
Button,
|
|
15861
15868
|
{
|
|
@@ -17767,7 +17774,7 @@ var init_BookTableOfContents = __esm({
|
|
|
17767
17774
|
className: cn(
|
|
17768
17775
|
"justify-start text-left w-full",
|
|
17769
17776
|
direction === "rtl" && "text-right",
|
|
17770
|
-
isCurrent && "bg-
|
|
17777
|
+
isCurrent && "bg-primary/10 text-primary"
|
|
17771
17778
|
),
|
|
17772
17779
|
children: /* @__PURE__ */ jsx(Box, { className: "truncate", children: /* @__PURE__ */ jsx(Typography, { variant: "body", children: String(chapter.title ?? "") }) })
|
|
17773
17780
|
},
|
|
@@ -19015,7 +19022,7 @@ function CalendarGrid({
|
|
|
19015
19022
|
border: true,
|
|
19016
19023
|
className: cn(
|
|
19017
19024
|
"cursor-pointer hover:shadow-sm transition-shadow text-xs truncate",
|
|
19018
|
-
color ? color : "bg-
|
|
19025
|
+
color ? color : "bg-primary/10 border-primary/30 text-primary"
|
|
19019
19026
|
),
|
|
19020
19027
|
onClick: (e) => handleEventClick(event, e),
|
|
19021
19028
|
children: /* @__PURE__ */ jsx(Typography, { variant: "small", className: "truncate font-medium", children: event.title })
|
|
@@ -19113,7 +19120,7 @@ function CalendarGrid({
|
|
|
19113
19120
|
onClick: () => handleSlotClick(day, time),
|
|
19114
19121
|
className: cn(
|
|
19115
19122
|
"border-l border-border",
|
|
19116
|
-
isToday && "bg-
|
|
19123
|
+
isToday && "bg-primary/10"
|
|
19117
19124
|
),
|
|
19118
19125
|
...longPressEvent ? {
|
|
19119
19126
|
onPointerDown: () => startLongPress(day, time),
|
|
@@ -21129,31 +21136,31 @@ var init_CodeRunnerPanel = __esm({
|
|
|
21129
21136
|
}
|
|
21130
21137
|
)
|
|
21131
21138
|
] }),
|
|
21132
|
-
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: [
|
|
21133
21140
|
/* @__PURE__ */ jsxs(
|
|
21134
21141
|
HStack,
|
|
21135
21142
|
{
|
|
21136
21143
|
gap: "sm",
|
|
21137
21144
|
align: "center",
|
|
21138
|
-
className: "px-3 py-2 bg-
|
|
21145
|
+
className: "px-3 py-2 bg-card border-b border-border",
|
|
21139
21146
|
children: [
|
|
21140
|
-
/* @__PURE__ */ jsx(Terminal, { size: 16, className: "text-
|
|
21141
|
-
/* @__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" })
|
|
21142
21149
|
]
|
|
21143
21150
|
}
|
|
21144
21151
|
),
|
|
21145
|
-
/* @__PURE__ */ jsx(VStack, { gap: "none", className: "p-3 font-mono text-sm", children: error ? /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-
|
|
21146
|
-
output?.stdout ? /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-
|
|
21147
|
-
output?.stderr ? /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-
|
|
21148
|
-
!output?.stdout && !output?.stderr ? /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-
|
|
21149
|
-
output && output.testResults.length > 0 && /* @__PURE__ */ jsx(Box, { className: "mt-3 pt-3 border-t border-
|
|
21150
|
-
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" }),
|
|
21151
21158
|
/* @__PURE__ */ jsxs(VStack, { gap: "xs", className: "flex-1", children: [
|
|
21152
21159
|
/* @__PURE__ */ jsxs(
|
|
21153
21160
|
Typography,
|
|
21154
21161
|
{
|
|
21155
21162
|
variant: "small",
|
|
21156
|
-
className: test.passed ? "text-
|
|
21163
|
+
className: test.passed ? "text-success" : "text-error",
|
|
21157
21164
|
children: [
|
|
21158
21165
|
"Test ",
|
|
21159
21166
|
index + 1,
|
|
@@ -21162,15 +21169,15 @@ var init_CodeRunnerPanel = __esm({
|
|
|
21162
21169
|
]
|
|
21163
21170
|
}
|
|
21164
21171
|
),
|
|
21165
|
-
/* @__PURE__ */ jsxs(Typography, { variant: "small", className: "text-
|
|
21172
|
+
/* @__PURE__ */ jsxs(Typography, { variant: "small", className: "text-background", children: [
|
|
21166
21173
|
"Input: ",
|
|
21167
21174
|
test.input
|
|
21168
21175
|
] }),
|
|
21169
|
-
/* @__PURE__ */ jsxs(Typography, { variant: "small", className: "text-
|
|
21176
|
+
/* @__PURE__ */ jsxs(Typography, { variant: "small", className: "text-background", children: [
|
|
21170
21177
|
"Expected: ",
|
|
21171
21178
|
test.expectedOutput
|
|
21172
21179
|
] }),
|
|
21173
|
-
/* @__PURE__ */ jsxs(Typography, { variant: "small", className: "text-
|
|
21180
|
+
/* @__PURE__ */ jsxs(Typography, { variant: "small", className: "text-background", children: [
|
|
21174
21181
|
"Actual: ",
|
|
21175
21182
|
test.actualOutput
|
|
21176
21183
|
] })
|
|
@@ -21355,14 +21362,14 @@ var init_ConnectionBlock = __esm({
|
|
|
21355
21362
|
"div",
|
|
21356
21363
|
{
|
|
21357
21364
|
className: cn(
|
|
21358
|
-
"bg-
|
|
21365
|
+
"bg-success/10 border-l-4 border-success rounded-r-lg p-5 mb-6",
|
|
21359
21366
|
className
|
|
21360
21367
|
),
|
|
21361
21368
|
children: /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-3", children: [
|
|
21362
|
-
/* @__PURE__ */ jsx(Link2, { className: "text-
|
|
21369
|
+
/* @__PURE__ */ jsx(Link2, { className: "text-success flex-shrink-0 mt-1", size: 20 }),
|
|
21363
21370
|
/* @__PURE__ */ jsxs("div", { className: "flex-1", children: [
|
|
21364
|
-
/* @__PURE__ */ jsx("h4", { className: "font-semibold text-
|
|
21365
|
-
/* @__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 }) })
|
|
21366
21373
|
] })
|
|
21367
21374
|
] })
|
|
21368
21375
|
}
|
|
@@ -21449,7 +21456,7 @@ function CounterStandard({
|
|
|
21449
21456
|
variant: "h1",
|
|
21450
21457
|
className: cn(
|
|
21451
21458
|
sizeStyles8[size].display,
|
|
21452
|
-
"font-bold tabular-nums text-primary
|
|
21459
|
+
"font-bold tabular-nums text-primary"
|
|
21453
21460
|
),
|
|
21454
21461
|
children: resolved.count
|
|
21455
21462
|
}
|
|
@@ -21522,7 +21529,7 @@ function CounterFull({
|
|
|
21522
21529
|
variant: "h1",
|
|
21523
21530
|
className: cn(
|
|
21524
21531
|
sizeStyles8[size].display,
|
|
21525
|
-
"font-bold tabular-nums text-primary
|
|
21532
|
+
"font-bold tabular-nums text-primary"
|
|
21526
21533
|
),
|
|
21527
21534
|
children: resolved.count
|
|
21528
21535
|
}
|
|
@@ -21783,11 +21790,11 @@ var init_DashboardLayout = __esm({
|
|
|
21783
21790
|
className: "h-16 px-4 border-b border-border dark:border-border",
|
|
21784
21791
|
children: [
|
|
21785
21792
|
/* @__PURE__ */ jsxs(Link, { to: "/", className: "flex items-center gap-2", children: [
|
|
21786
|
-
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(
|
|
21787
21794
|
Typography,
|
|
21788
21795
|
{
|
|
21789
21796
|
variant: "small",
|
|
21790
|
-
className: "text-
|
|
21797
|
+
className: "text-primary-foreground font-bold text-sm",
|
|
21791
21798
|
as: "span",
|
|
21792
21799
|
children: appName.charAt(0).toUpperCase()
|
|
21793
21800
|
}
|
|
@@ -21866,11 +21873,11 @@ var init_DashboardLayout = __esm({
|
|
|
21866
21873
|
className: "hidden @md/dashboard:flex items-center gap-1 overflow-x-auto",
|
|
21867
21874
|
children: [
|
|
21868
21875
|
/* @__PURE__ */ jsxs(Link, { to: "/", className: "flex items-center gap-2 mr-3 shrink-0", children: [
|
|
21869
|
-
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(
|
|
21870
21877
|
Typography,
|
|
21871
21878
|
{
|
|
21872
21879
|
variant: "small",
|
|
21873
|
-
className: "text-
|
|
21880
|
+
className: "text-primary-foreground font-bold text-xs",
|
|
21874
21881
|
as: "span",
|
|
21875
21882
|
children: appName.charAt(0).toUpperCase()
|
|
21876
21883
|
}
|
|
@@ -21930,8 +21937,8 @@ var init_DashboardLayout = __esm({
|
|
|
21930
21937
|
{
|
|
21931
21938
|
as: "span",
|
|
21932
21939
|
className: cn(
|
|
21933
|
-
"absolute -top-0.5 -right-0.5 min-w-[18px] h-[18px] px-1 rounded-full text-xs font-semibold
|
|
21934
|
-
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"
|
|
21935
21942
|
),
|
|
21936
21943
|
children: action.badge
|
|
21937
21944
|
}
|
|
@@ -21953,7 +21960,7 @@ var init_DashboardLayout = __esm({
|
|
|
21953
21960
|
Box,
|
|
21954
21961
|
{
|
|
21955
21962
|
as: "span",
|
|
21956
|
-
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",
|
|
21957
21964
|
children: unreadCount > 99 ? "99+" : unreadCount
|
|
21958
21965
|
}
|
|
21959
21966
|
)
|
|
@@ -22236,7 +22243,7 @@ function SubMenu({
|
|
|
22236
22243
|
),
|
|
22237
22244
|
children: [
|
|
22238
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" })),
|
|
22239
|
-
/* @__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 }),
|
|
22240
22247
|
item.badge !== void 0 && /* @__PURE__ */ jsx("span", { className: "ml-auto text-xs font-medium", children: item.badge })
|
|
22241
22248
|
]
|
|
22242
22249
|
},
|
|
@@ -22293,7 +22300,7 @@ function MenuItemRow({
|
|
|
22293
22300
|
Typography,
|
|
22294
22301
|
{
|
|
22295
22302
|
variant: "small",
|
|
22296
|
-
className: cn("flex-1", isDanger && "text-
|
|
22303
|
+
className: cn("flex-1", isDanger && "text-error"),
|
|
22297
22304
|
children: item.label
|
|
22298
22305
|
}
|
|
22299
22306
|
),
|
|
@@ -23061,14 +23068,25 @@ function DataGrid({
|
|
|
23061
23068
|
const bodyFields = fieldDefs.filter((f3) => f3 !== titleField && !badgeFields.includes(f3));
|
|
23062
23069
|
const primaryActions = actionDefs.filter((a) => a.variant !== "danger");
|
|
23063
23070
|
const dangerActions = actionDefs.filter((a) => a.variant === "danger");
|
|
23064
|
-
const
|
|
23065
|
-
|
|
23071
|
+
const fireAction = (action, itemData) => {
|
|
23072
|
+
if (action.navigatesTo) {
|
|
23073
|
+
const url = action.navigatesTo.replace(
|
|
23074
|
+
/\{\{row\.(\w+(?:\.\w+)*)\}\}/g,
|
|
23075
|
+
(_, field) => String(itemData[field] ?? "")
|
|
23076
|
+
);
|
|
23077
|
+
eventBus.emit("UI:NAVIGATE", { url, row: itemData });
|
|
23078
|
+
return;
|
|
23079
|
+
}
|
|
23066
23080
|
const payload = {
|
|
23067
23081
|
id: itemData.id,
|
|
23068
23082
|
row: itemData
|
|
23069
23083
|
};
|
|
23070
23084
|
eventBus.emit(`UI:${action.event}`, payload);
|
|
23071
23085
|
};
|
|
23086
|
+
const handleActionClick = (action, itemData) => (e) => {
|
|
23087
|
+
e.stopPropagation();
|
|
23088
|
+
fireAction(action, itemData);
|
|
23089
|
+
};
|
|
23072
23090
|
const hasRenderProp = typeof children === "function";
|
|
23073
23091
|
useEffect(() => {
|
|
23074
23092
|
if (data.length > 0 && !hasRenderProp && fieldDefs.length === 0) {
|
|
@@ -23135,13 +23153,46 @@ function DataGrid({
|
|
|
23135
23153
|
const wrapDnd = (node) => dnd.isZone ? /* @__PURE__ */ jsx(dnd.SortableItem, { id: dndId, children: node }, dndId) : node;
|
|
23136
23154
|
if (hasRenderProp) {
|
|
23137
23155
|
return wrapDnd(
|
|
23138
|
-
/* @__PURE__ */
|
|
23156
|
+
/* @__PURE__ */ jsxs(
|
|
23139
23157
|
Box,
|
|
23140
23158
|
{
|
|
23141
23159
|
"data-entity-row": true,
|
|
23142
23160
|
"data-entity-id": id,
|
|
23143
23161
|
className: cn(isSelected && "ring-2 ring-primary rounded-lg"),
|
|
23144
|
-
children:
|
|
23162
|
+
children: [
|
|
23163
|
+
children(itemData, index),
|
|
23164
|
+
actionDefs.length > 0 && /* @__PURE__ */ jsx(Box, { className: "px-4 py-3 border-t border-border", children: /* @__PURE__ */ jsxs(HStack, { gap: "sm", className: "justify-end", children: [
|
|
23165
|
+
(maxInlineActions != null ? actionDefs.slice(0, maxInlineActions) : actionDefs).map((action, idx) => /* @__PURE__ */ jsxs(
|
|
23166
|
+
Button,
|
|
23167
|
+
{
|
|
23168
|
+
variant: action.variant === "primary" ? "primary" : "ghost",
|
|
23169
|
+
size: "sm",
|
|
23170
|
+
onClick: handleActionClick(action, itemData),
|
|
23171
|
+
"data-testid": `action-${action.event}`,
|
|
23172
|
+
"data-row-id": String(itemData.id),
|
|
23173
|
+
className: action.variant === "danger" ? "text-error hover:text-error hover:bg-error/10" : void 0,
|
|
23174
|
+
children: [
|
|
23175
|
+
action.icon && renderIconInput(action.icon, { size: "xs", className: "mr-1" }),
|
|
23176
|
+
action.label
|
|
23177
|
+
]
|
|
23178
|
+
},
|
|
23179
|
+
idx
|
|
23180
|
+
)),
|
|
23181
|
+
maxInlineActions != null && actionDefs.length > maxInlineActions && /* @__PURE__ */ jsx(
|
|
23182
|
+
Menu,
|
|
23183
|
+
{
|
|
23184
|
+
position: "bottom-end",
|
|
23185
|
+
trigger: /* @__PURE__ */ jsx(Button, { variant: "ghost", size: "sm", "aria-label": t("common.actions"), "data-testid": "action-overflow", children: /* @__PURE__ */ jsx(Icon, { name: "more-horizontal", size: "xs" }) }),
|
|
23186
|
+
items: actionDefs.slice(maxInlineActions).map((action) => ({
|
|
23187
|
+
label: action.label,
|
|
23188
|
+
icon: action.icon,
|
|
23189
|
+
event: action.event,
|
|
23190
|
+
onClick: () => fireAction(action, itemData)
|
|
23191
|
+
}))
|
|
23192
|
+
}
|
|
23193
|
+
)
|
|
23194
|
+
] }) })
|
|
23195
|
+
]
|
|
23145
23196
|
},
|
|
23146
23197
|
id
|
|
23147
23198
|
)
|
|
@@ -23278,10 +23329,7 @@ function DataGrid({
|
|
|
23278
23329
|
label: action.label,
|
|
23279
23330
|
icon: action.icon,
|
|
23280
23331
|
event: action.event,
|
|
23281
|
-
onClick: () =>
|
|
23282
|
-
id: itemData.id,
|
|
23283
|
-
row: itemData
|
|
23284
|
-
})
|
|
23332
|
+
onClick: () => fireAction(action, itemData)
|
|
23285
23333
|
}))
|
|
23286
23334
|
}
|
|
23287
23335
|
)
|
|
@@ -24165,7 +24213,9 @@ var init_FilterGroup = __esm({
|
|
|
24165
24213
|
showIcon = true,
|
|
24166
24214
|
query,
|
|
24167
24215
|
isLoading,
|
|
24168
|
-
look = "toolbar"
|
|
24216
|
+
look = "toolbar",
|
|
24217
|
+
event,
|
|
24218
|
+
clearEvent
|
|
24169
24219
|
}) => {
|
|
24170
24220
|
const { t } = useTranslate();
|
|
24171
24221
|
const eventBus = useEventBus();
|
|
@@ -24202,14 +24252,18 @@ var init_FilterGroup = __esm({
|
|
|
24202
24252
|
queryState.setFilter(field, value === "all" ? null : value);
|
|
24203
24253
|
}
|
|
24204
24254
|
onFilterChange?.(field, value === "all" ? null : value);
|
|
24205
|
-
|
|
24255
|
+
const payload = {
|
|
24206
24256
|
entity,
|
|
24207
24257
|
field,
|
|
24208
24258
|
value: value === "all" || value === null ? "" : value,
|
|
24209
24259
|
query
|
|
24210
|
-
}
|
|
24260
|
+
};
|
|
24261
|
+
if (event && event !== "FILTER") {
|
|
24262
|
+
eventBus.emit(`UI:${event}`, payload);
|
|
24263
|
+
}
|
|
24264
|
+
eventBus.emit("UI:FILTER", payload);
|
|
24211
24265
|
},
|
|
24212
|
-
[onFilterChange, queryState, eventBus, entity, query]
|
|
24266
|
+
[onFilterChange, queryState, eventBus, entity, query, event]
|
|
24213
24267
|
);
|
|
24214
24268
|
const handleClearAll = useCallback(() => {
|
|
24215
24269
|
setSelectedValues({});
|
|
@@ -24217,8 +24271,11 @@ var init_FilterGroup = __esm({
|
|
|
24217
24271
|
queryState.clearFilters();
|
|
24218
24272
|
}
|
|
24219
24273
|
onClearAll?.();
|
|
24274
|
+
if (clearEvent && clearEvent !== "CLEAR_FILTERS") {
|
|
24275
|
+
eventBus.emit(`UI:${clearEvent}`, { entity, query });
|
|
24276
|
+
}
|
|
24220
24277
|
eventBus.emit("UI:CLEAR_FILTERS", { entity, query });
|
|
24221
|
-
}, [onClearAll, queryState, eventBus, entity, query]);
|
|
24278
|
+
}, [onClearAll, queryState, eventBus, entity, query, clearEvent]);
|
|
24222
24279
|
const activeFilterCount = Object.keys(selectedValues).length;
|
|
24223
24280
|
if (variant === "pills") {
|
|
24224
24281
|
return /* @__PURE__ */ jsxs(
|
|
@@ -25199,8 +25256,8 @@ var init_RelationSelect = __esm({
|
|
|
25199
25256
|
disabled,
|
|
25200
25257
|
className: cn(
|
|
25201
25258
|
"w-full justify-between font-normal",
|
|
25202
|
-
error && "border-
|
|
25203
|
-
isOpen && "ring-2 ring-primary
|
|
25259
|
+
error && "border-error/50 focus:border-error focus:ring-error",
|
|
25260
|
+
isOpen && "ring-2 ring-primary border-primary"
|
|
25204
25261
|
),
|
|
25205
25262
|
children: [
|
|
25206
25263
|
/* @__PURE__ */ jsx(
|
|
@@ -25280,7 +25337,7 @@ var init_RelationSelect = __esm({
|
|
|
25280
25337
|
paddingY: "sm",
|
|
25281
25338
|
className: cn(
|
|
25282
25339
|
"text-left text-sm hover:bg-muted focus:outline-none focus:bg-muted",
|
|
25283
|
-
option.value === value && "bg-primary
|
|
25340
|
+
option.value === value && "bg-primary/10 text-primary",
|
|
25284
25341
|
option.disabled && "opacity-50 cursor-not-allowed"
|
|
25285
25342
|
),
|
|
25286
25343
|
onClick: () => handleSelect(option),
|
|
@@ -25346,7 +25403,7 @@ var init_SearchInput = __esm({
|
|
|
25346
25403
|
queryState.setSearch(newValue);
|
|
25347
25404
|
}
|
|
25348
25405
|
onSearch?.(newValue);
|
|
25349
|
-
if (event) {
|
|
25406
|
+
if (event && event !== "SEARCH") {
|
|
25350
25407
|
eventBus.emit(`UI:${event}`, { searchTerm: newValue, entity });
|
|
25351
25408
|
}
|
|
25352
25409
|
if (event || entity || query) {
|
|
@@ -25437,7 +25494,7 @@ var init_SidePanel = __esm({
|
|
|
25437
25494
|
showOverlay && /* @__PURE__ */ jsx(Presence, { show: isOpen, animation: "overlay", children: /* @__PURE__ */ jsx(
|
|
25438
25495
|
Box,
|
|
25439
25496
|
{
|
|
25440
|
-
className: "fixed inset-0 bg-
|
|
25497
|
+
className: "fixed inset-0 bg-background/80 backdrop-blur-sm z-40 lg:hidden",
|
|
25441
25498
|
onClick: handleClose
|
|
25442
25499
|
}
|
|
25443
25500
|
) }),
|
|
@@ -25804,7 +25861,7 @@ var init_WizardNavigation = __esm({
|
|
|
25804
25861
|
/* @__PURE__ */ jsx(Icon, { name: "chevron-left", size: "sm" }),
|
|
25805
25862
|
resolvedBackLabel
|
|
25806
25863
|
] }) : /* @__PURE__ */ jsx(Box, {}),
|
|
25807
|
-
/* @__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) }) }) }),
|
|
25808
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: [
|
|
25809
25866
|
resolvedNextLabel,
|
|
25810
25867
|
/* @__PURE__ */ jsx(Icon, { name: "chevron-right", size: "sm" })
|
|
@@ -27961,6 +28018,7 @@ var init_Lightbox = __esm({
|
|
|
27961
28018
|
{
|
|
27962
28019
|
className: cn(
|
|
27963
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
|
|
27964
28022
|
"bg-black bg-opacity-90",
|
|
27965
28023
|
className
|
|
27966
28024
|
),
|
|
@@ -27983,7 +28041,7 @@ var init_Lightbox = __esm({
|
|
|
27983
28041
|
"p-2 rounded-full",
|
|
27984
28042
|
"text-[var(--color-foreground)] bg-[var(--color-card)]",
|
|
27985
28043
|
"hover:bg-opacity-70 transition-opacity",
|
|
27986
|
-
"focus:outline-none focus:ring-2 focus:ring-
|
|
28044
|
+
"focus:outline-none focus:ring-2 focus:ring-ring"
|
|
27987
28045
|
),
|
|
27988
28046
|
"aria-label": t("aria.closeModal"),
|
|
27989
28047
|
children: /* @__PURE__ */ jsx(Icon, { name: "x", className: "w-6 h-6" })
|
|
@@ -28002,7 +28060,7 @@ var init_Lightbox = __esm({
|
|
|
28002
28060
|
"p-2 rounded-full",
|
|
28003
28061
|
"text-[var(--color-foreground)] bg-[var(--color-card)]",
|
|
28004
28062
|
"hover:bg-opacity-70 transition-opacity",
|
|
28005
|
-
"focus:outline-none focus:ring-2 focus:ring-
|
|
28063
|
+
"focus:outline-none focus:ring-2 focus:ring-ring"
|
|
28006
28064
|
),
|
|
28007
28065
|
"aria-label": t("aria.previousImage"),
|
|
28008
28066
|
children: /* @__PURE__ */ jsx(Icon, { name: "chevron-left", className: "w-8 h-8" })
|
|
@@ -28039,7 +28097,7 @@ var init_Lightbox = __esm({
|
|
|
28039
28097
|
"p-2 rounded-full",
|
|
28040
28098
|
"text-[var(--color-foreground)] bg-[var(--color-card)]",
|
|
28041
28099
|
"hover:bg-opacity-70 transition-opacity",
|
|
28042
|
-
"focus:outline-none focus:ring-2 focus:ring-
|
|
28100
|
+
"focus:outline-none focus:ring-2 focus:ring-ring"
|
|
28043
28101
|
),
|
|
28044
28102
|
"aria-label": t("aria.nextImage"),
|
|
28045
28103
|
children: /* @__PURE__ */ jsx(Icon, { name: "chevron-right", className: "w-8 h-8" })
|
|
@@ -31112,6 +31170,7 @@ var init_QrScanner = __esm({
|
|
|
31112
31170
|
overflow: "hidden",
|
|
31113
31171
|
rounded: "sm",
|
|
31114
31172
|
className: cn(
|
|
31173
|
+
// eslint-disable-next-line almadar/no-hardcoded-colors -- media overlay: always over a dark scrim
|
|
31115
31174
|
"bg-black",
|
|
31116
31175
|
"aspect-square w-full max-w-md",
|
|
31117
31176
|
className
|
|
@@ -31176,7 +31235,9 @@ var init_QrScanner = __esm({
|
|
|
31176
31235
|
type: "button",
|
|
31177
31236
|
onClick: togglePause,
|
|
31178
31237
|
className: cn(
|
|
31238
|
+
// eslint-disable-next-line almadar/no-hardcoded-colors -- media overlay: always over a dark scrim
|
|
31179
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
|
|
31180
31241
|
"hover:bg-opacity-80 focus:outline-none focus:ring-2 focus:ring-white"
|
|
31181
31242
|
),
|
|
31182
31243
|
"aria-label": isPaused ? t("qrScanner.resumeScanning") : t("qrScanner.pauseScanning"),
|
|
@@ -31189,7 +31250,9 @@ var init_QrScanner = __esm({
|
|
|
31189
31250
|
type: "button",
|
|
31190
31251
|
onClick: toggleFacing,
|
|
31191
31252
|
className: cn(
|
|
31253
|
+
// eslint-disable-next-line almadar/no-hardcoded-colors -- media overlay: always over a dark scrim
|
|
31192
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
|
|
31193
31256
|
"hover:bg-opacity-80 focus:outline-none focus:ring-2 focus:ring-white"
|
|
31194
31257
|
),
|
|
31195
31258
|
"aria-label": currentFacing === "environment" ? t("qrScanner.switchToFrontCamera") : t("qrScanner.switchToRearCamera"),
|
|
@@ -31202,7 +31265,9 @@ var init_QrScanner = __esm({
|
|
|
31202
31265
|
type: "button",
|
|
31203
31266
|
onClick: handleMockScan,
|
|
31204
31267
|
className: cn(
|
|
31268
|
+
// eslint-disable-next-line almadar/no-hardcoded-colors -- media overlay: always over a dark scrim
|
|
31205
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
|
|
31206
31271
|
"hover:bg-opacity-80 focus:outline-none focus:ring-2 focus:ring-white"
|
|
31207
31272
|
),
|
|
31208
31273
|
"aria-label": t("aria.mockScanDev"),
|
|
@@ -33938,10 +34003,10 @@ var init_ModuleCard = __esm({
|
|
|
33938
34003
|
init_avl_atom_types();
|
|
33939
34004
|
init_MiniStateMachine();
|
|
33940
34005
|
PERSISTENCE_BORDER = {
|
|
33941
|
-
persistent: "border-l-[3px] border-l-
|
|
33942
|
-
runtime: "border-l-[3px] border-l-
|
|
33943
|
-
singleton: "border-l-[3px] border-l-
|
|
33944
|
-
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"
|
|
33945
34010
|
};
|
|
33946
34011
|
PERSISTENCE_ICON = {
|
|
33947
34012
|
persistent: "\u26C1",
|
|
@@ -33971,8 +34036,8 @@ var init_ModuleCard = __esm({
|
|
|
33971
34036
|
className: "rounded-lg border border-[var(--color-border)] bg-[var(--color-card)] shadow-sm overflow-hidden",
|
|
33972
34037
|
style: { minWidth: 280, maxWidth: 400 },
|
|
33973
34038
|
children: [
|
|
33974
|
-
/* @__PURE__ */ jsx(Handle, { type: "target", position: Position.Left, className: "!w-2.5 !h-2.5 !bg-
|
|
33975
|
-
/* @__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" }),
|
|
33976
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 }) }),
|
|
33977
34042
|
/* @__PURE__ */ jsxs("div", { className: `px-3 py-2 border-b border-[var(--color-border)] ${PERSISTENCE_BORDER[persistence] ?? ""}`, children: [
|
|
33978
34043
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5 mb-1.5", children: [
|
|
@@ -36428,19 +36493,19 @@ var init_ReflectionBlock = __esm({
|
|
|
36428
36493
|
"div",
|
|
36429
36494
|
{
|
|
36430
36495
|
className: cn(
|
|
36431
|
-
"my-6 border-l-4 border-
|
|
36496
|
+
"my-6 border-l-4 border-warning bg-warning/10 rounded-r-lg p-4",
|
|
36432
36497
|
className
|
|
36433
36498
|
),
|
|
36434
36499
|
children: /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-3", children: [
|
|
36435
|
-
/* @__PURE__ */ jsx(PauseCircle, { className: "text-
|
|
36500
|
+
/* @__PURE__ */ jsx(PauseCircle, { className: "text-warning flex-shrink-0 mt-1", size: 20 }),
|
|
36436
36501
|
/* @__PURE__ */ jsxs("div", { className: "flex-1", children: [
|
|
36437
|
-
/* @__PURE__ */ jsx("div", { className: "font-medium text-
|
|
36438
|
-
/* @__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 }),
|
|
36439
36504
|
isExpanded ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
36440
36505
|
/* @__PURE__ */ jsx(
|
|
36441
36506
|
"textarea",
|
|
36442
36507
|
{
|
|
36443
|
-
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",
|
|
36444
36509
|
placeholder: "Your thoughts...",
|
|
36445
36510
|
value: note,
|
|
36446
36511
|
onChange: (e) => setNote(e.target.value),
|
|
@@ -36451,7 +36516,7 @@ var init_ReflectionBlock = __esm({
|
|
|
36451
36516
|
"button",
|
|
36452
36517
|
{
|
|
36453
36518
|
onClick: handleSave,
|
|
36454
|
-
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",
|
|
36455
36520
|
children: "Save & Continue"
|
|
36456
36521
|
}
|
|
36457
36522
|
)
|
|
@@ -36459,7 +36524,7 @@ var init_ReflectionBlock = __esm({
|
|
|
36459
36524
|
"button",
|
|
36460
36525
|
{
|
|
36461
36526
|
onClick: () => setIsExpanded(true),
|
|
36462
|
-
className: "text-sm text-
|
|
36527
|
+
className: "text-sm text-warning hover:underline",
|
|
36463
36528
|
children: savedNote ? "\u2713 Answered \xB7 Edit" : "Answer this question"
|
|
36464
36529
|
}
|
|
36465
36530
|
)
|
|
@@ -36745,7 +36810,7 @@ function DataTable({
|
|
|
36745
36810
|
)),
|
|
36746
36811
|
rowActions && /* @__PURE__ */ jsx("th", { className: "w-12 px-4 py-3" })
|
|
36747
36812
|
] }) }),
|
|
36748
|
-
/* @__PURE__ */ jsx("tbody", { className: "divide-y divide-
|
|
36813
|
+
/* @__PURE__ */ jsx("tbody", { className: "divide-y divide-border", children: isLoading ? /* @__PURE__ */ jsx("tr", { children: /* @__PURE__ */ jsx(
|
|
36749
36814
|
"td",
|
|
36750
36815
|
{
|
|
36751
36816
|
colSpan: normalizedColumns.length + (selectable ? 1 : 0) + (rowActions ? 1 : 0),
|
|
@@ -37116,7 +37181,7 @@ var init_DetailPanel = __esm({
|
|
|
37116
37181
|
};
|
|
37117
37182
|
const effectiveFieldNames = isFieldDefArray(propFields) ? normalizeFieldDefs(propFields) : fieldNames;
|
|
37118
37183
|
const fieldTypeMap = isFieldDefArray(propFields) ? buildFieldTypeMap(propFields) : {};
|
|
37119
|
-
useCallback(
|
|
37184
|
+
const handleActionClick = useCallback(
|
|
37120
37185
|
(action, data2) => {
|
|
37121
37186
|
if (action.navigatesTo) {
|
|
37122
37187
|
const url = action.navigatesTo.replace(
|
|
@@ -37308,8 +37373,9 @@ var init_DetailPanel = __esm({
|
|
|
37308
37373
|
{
|
|
37309
37374
|
variant: action.variant || "secondary",
|
|
37310
37375
|
size: "sm",
|
|
37311
|
-
action: action.event,
|
|
37376
|
+
action: action.navigatesTo ? void 0 : action.event,
|
|
37312
37377
|
actionPayload: { row: normalizedData },
|
|
37378
|
+
onClick: action.navigatesTo ? () => handleActionClick(action, normalizedData) : void 0,
|
|
37313
37379
|
icon: action.icon,
|
|
37314
37380
|
"data-testid": action.event ? `action-${action.event}` : void 0,
|
|
37315
37381
|
"data-row-id": normalizedData?.id !== void 0 ? String(normalizedData.id) : void 0,
|
|
@@ -39352,8 +39418,9 @@ var init_MediaGallery = __esm({
|
|
|
39352
39418
|
)
|
|
39353
39419
|
}
|
|
39354
39420
|
),
|
|
39355
|
-
item.caption &&
|
|
39356
|
-
|
|
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" }) })
|
|
39357
39424
|
]
|
|
39358
39425
|
},
|
|
39359
39426
|
item.id
|
|
@@ -39382,7 +39449,7 @@ var init_MediaGallery = __esm({
|
|
|
39382
39449
|
size: "sm",
|
|
39383
39450
|
icon: X,
|
|
39384
39451
|
action: "LIGHTBOX_CLOSE",
|
|
39385
|
-
className: "text-
|
|
39452
|
+
className: "text-foreground hover:bg-muted/50"
|
|
39386
39453
|
}
|
|
39387
39454
|
) }),
|
|
39388
39455
|
/* @__PURE__ */ jsx(
|
|
@@ -39393,7 +39460,7 @@ var init_MediaGallery = __esm({
|
|
|
39393
39460
|
className: "max-w-full max-h-[80vh] object-contain rounded-md"
|
|
39394
39461
|
}
|
|
39395
39462
|
),
|
|
39396
|
-
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 })
|
|
39397
39464
|
]
|
|
39398
39465
|
}
|
|
39399
39466
|
)
|
|
@@ -39835,7 +39902,7 @@ function WalkMinimap() {
|
|
|
39835
39902
|
{
|
|
39836
39903
|
variant,
|
|
39837
39904
|
size: "sm",
|
|
39838
|
-
className: `flex-shrink-0 text-[9px] ${isActive ? "ring-1 ring-
|
|
39905
|
+
className: `flex-shrink-0 text-[9px] ${isActive ? "ring-1 ring-info" : ""}`,
|
|
39839
39906
|
children: [
|
|
39840
39907
|
isDone ? "\u2713" : isActive ? "\u25CF" : "\u25CB",
|
|
39841
39908
|
" ",
|
|
@@ -39976,13 +40043,13 @@ function WalkMinimap() {
|
|
|
39976
40043
|
})
|
|
39977
40044
|
] }) }),
|
|
39978
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: [
|
|
39979
|
-
/* @__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: [
|
|
39980
40047
|
"Engine: ",
|
|
39981
40048
|
engineCount,
|
|
39982
40049
|
"/",
|
|
39983
40050
|
totalTransitions
|
|
39984
40051
|
] }),
|
|
39985
|
-
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: [
|
|
39986
40053
|
"DOM: ",
|
|
39987
40054
|
domCount
|
|
39988
40055
|
] }),
|
|
@@ -40015,13 +40082,13 @@ function TraitsTab({ traits: traits2 }) {
|
|
|
40015
40082
|
const accordionItems = traits2.map((trait) => ({
|
|
40016
40083
|
id: trait.id,
|
|
40017
40084
|
header: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 w-full", children: [
|
|
40018
|
-
/* @__PURE__ */ jsx(Typography, { variant: "body", weight: "semibold", className: "text-
|
|
40085
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body", weight: "semibold", className: "text-primary", children: trait.name }),
|
|
40019
40086
|
/* @__PURE__ */ jsx(Badge, { variant: "success", size: "sm", children: trait.currentState }),
|
|
40020
|
-
/* @__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 }) })
|
|
40021
40088
|
] }),
|
|
40022
40089
|
content: /* @__PURE__ */ jsxs(Stack, { gap: "sm", children: [
|
|
40023
40090
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
40024
|
-
/* @__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") }),
|
|
40025
40092
|
/* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-1", children: trait.states.map((state) => /* @__PURE__ */ jsx(
|
|
40026
40093
|
Badge,
|
|
40027
40094
|
{
|
|
@@ -40033,18 +40100,18 @@ function TraitsTab({ traits: traits2 }) {
|
|
|
40033
40100
|
)) })
|
|
40034
40101
|
] }),
|
|
40035
40102
|
trait.transitions.length > 0 && /* @__PURE__ */ jsxs("div", { children: [
|
|
40036
|
-
/* @__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") }),
|
|
40037
40104
|
/* @__PURE__ */ jsx(Stack, { gap: "xs", children: trait.transitions.map((t2, i) => /* @__PURE__ */ jsxs(Typography, { variant: "small", className: "font-mono", children: [
|
|
40038
40105
|
t2.from,
|
|
40039
40106
|
" \u2192 ",
|
|
40040
40107
|
t2.to,
|
|
40041
40108
|
" ",
|
|
40042
|
-
/* @__PURE__ */ jsxs("span", { className: "text-
|
|
40109
|
+
/* @__PURE__ */ jsxs("span", { className: "text-muted-foreground", children: [
|
|
40043
40110
|
"(",
|
|
40044
40111
|
t2.event,
|
|
40045
40112
|
")"
|
|
40046
40113
|
] }),
|
|
40047
|
-
t2.guard && /* @__PURE__ */ jsxs("span", { className: "text-
|
|
40114
|
+
t2.guard && /* @__PURE__ */ jsxs("span", { className: "text-warning", children: [
|
|
40048
40115
|
" [",
|
|
40049
40116
|
t2.guard,
|
|
40050
40117
|
"]"
|
|
@@ -40052,7 +40119,7 @@ function TraitsTab({ traits: traits2 }) {
|
|
|
40052
40119
|
] }, i)) })
|
|
40053
40120
|
] }),
|
|
40054
40121
|
trait.guards.length > 0 && /* @__PURE__ */ jsxs("div", { children: [
|
|
40055
|
-
/* @__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") }),
|
|
40056
40123
|
/* @__PURE__ */ jsx(Stack, { gap: "xs", children: trait.guards.map((g, i) => /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
|
|
40057
40124
|
/* @__PURE__ */ jsx(Typography, { variant: "small", children: g.name }),
|
|
40058
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" })
|
|
@@ -40095,11 +40162,11 @@ function TicksTab({ ticks: ticks2 }) {
|
|
|
40095
40162
|
};
|
|
40096
40163
|
const TickCard = ({ tick, active }) => /* @__PURE__ */ jsxs(Card, { className: `p-3 ${!active ? "opacity-50" : ""}`, children: [
|
|
40097
40164
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 mb-2", children: [
|
|
40098
|
-
/* @__PURE__ */ jsx("span", { className: `w-2 h-2 rounded-full ${active ? "bg-
|
|
40099
|
-
/* @__PURE__ */ jsx(Typography, { variant: "body", weight: "semibold", className: "text-
|
|
40100
|
-
/* @__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 })
|
|
40101
40168
|
] }),
|
|
40102
|
-
/* @__PURE__ */ jsxs("div", { className: "flex gap-3 text-xs text-
|
|
40169
|
+
/* @__PURE__ */ jsxs("div", { className: "flex gap-3 text-xs text-muted-foreground", children: [
|
|
40103
40170
|
/* @__PURE__ */ jsxs("span", { children: [
|
|
40104
40171
|
tick.interval,
|
|
40105
40172
|
"ms"
|
|
@@ -40122,7 +40189,7 @@ function TicksTab({ ticks: ticks2 }) {
|
|
|
40122
40189
|
] });
|
|
40123
40190
|
return /* @__PURE__ */ jsxs("div", { className: "debug-tab debug-tab--ticks", children: [
|
|
40124
40191
|
activeTicks.length > 0 && /* @__PURE__ */ jsxs("div", { className: "mb-4", children: [
|
|
40125
|
-
/* @__PURE__ */ jsxs(Typography, { variant: "small", weight: "medium", className: "text-
|
|
40192
|
+
/* @__PURE__ */ jsxs(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground mb-2", children: [
|
|
40126
40193
|
"Active (",
|
|
40127
40194
|
activeTicks.length,
|
|
40128
40195
|
")"
|
|
@@ -40130,7 +40197,7 @@ function TicksTab({ ticks: ticks2 }) {
|
|
|
40130
40197
|
/* @__PURE__ */ jsx(Stack, { gap: "sm", children: activeTicks.map((tick) => /* @__PURE__ */ jsx(TickCard, { tick, active: true }, tick.id)) })
|
|
40131
40198
|
] }),
|
|
40132
40199
|
inactiveTicks.length > 0 && /* @__PURE__ */ jsxs("div", { children: [
|
|
40133
|
-
/* @__PURE__ */ jsxs(Typography, { variant: "small", weight: "medium", className: "text-
|
|
40200
|
+
/* @__PURE__ */ jsxs(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground mb-2", children: [
|
|
40134
40201
|
"Inactive (",
|
|
40135
40202
|
inactiveTicks.length,
|
|
40136
40203
|
")"
|
|
@@ -40178,33 +40245,33 @@ function EntitiesTab({ snapshot }) {
|
|
|
40178
40245
|
id: `singleton-${name}`,
|
|
40179
40246
|
header: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
40180
40247
|
/* @__PURE__ */ jsx(Badge, { variant: "primary", size: "sm", children: t("debug.singleton") }),
|
|
40181
|
-
/* @__PURE__ */ jsx(Typography, { variant: "body", weight: "semibold", className: "text-
|
|
40248
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body", weight: "semibold", className: "text-info", children: name })
|
|
40182
40249
|
] }),
|
|
40183
|
-
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) })
|
|
40184
40251
|
}));
|
|
40185
40252
|
const runtimeItems = runtimeEntities.slice(0, 20).map((entity) => ({
|
|
40186
40253
|
id: entity.id,
|
|
40187
40254
|
header: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
40188
|
-
/* @__PURE__ */ jsx(Typography, { variant: "body", weight: "semibold", className: "text-
|
|
40189
|
-
/* @__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: [
|
|
40190
40257
|
"#",
|
|
40191
40258
|
entity.id.slice(0, 8)
|
|
40192
40259
|
] })
|
|
40193
40260
|
] }),
|
|
40194
|
-
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) })
|
|
40195
40262
|
}));
|
|
40196
40263
|
return /* @__PURE__ */ jsxs("div", { className: "debug-tab debug-tab--entities", children: [
|
|
40197
40264
|
singletonItems.length > 0 && /* @__PURE__ */ jsxs("div", { className: "mb-4", children: [
|
|
40198
|
-
/* @__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 }) }),
|
|
40199
40266
|
/* @__PURE__ */ jsx(Accordion, { items: singletonItems, multiple: true })
|
|
40200
40267
|
] }),
|
|
40201
40268
|
runtimeItems.length > 0 && /* @__PURE__ */ jsxs("div", { className: "mb-4", children: [
|
|
40202
|
-
/* @__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 }) }),
|
|
40203
40270
|
/* @__PURE__ */ jsx(Accordion, { items: runtimeItems, multiple: true }),
|
|
40204
|
-
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 }) })
|
|
40205
40272
|
] }),
|
|
40206
40273
|
persistentEntries.length > 0 && /* @__PURE__ */ jsxs("div", { children: [
|
|
40207
|
-
/* @__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") }),
|
|
40208
40275
|
/* @__PURE__ */ jsx(Stack, { gap: "xs", children: persistentEntries.map(([type, info]) => /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between py-1", children: [
|
|
40209
40276
|
/* @__PURE__ */ jsx(Typography, { variant: "small", children: type }),
|
|
40210
40277
|
/* @__PURE__ */ jsx(Badge, { variant: info.loaded ? "success" : "default", size: "sm", children: info.loaded ? t("debug.loadedCount", { count: info.count }) : t("debug.notLoaded") })
|
|
@@ -40289,7 +40356,7 @@ function EventFlowTab({ events: events2 }) {
|
|
|
40289
40356
|
);
|
|
40290
40357
|
})
|
|
40291
40358
|
] }),
|
|
40292
|
-
/* @__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: [
|
|
40293
40360
|
/* @__PURE__ */ jsx(
|
|
40294
40361
|
Checkbox,
|
|
40295
40362
|
{
|
|
@@ -40304,18 +40371,18 @@ function EventFlowTab({ events: events2 }) {
|
|
|
40304
40371
|
"div",
|
|
40305
40372
|
{
|
|
40306
40373
|
ref: containerRef,
|
|
40307
|
-
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",
|
|
40308
40375
|
children: filteredEvents.slice(-100).map((event) => {
|
|
40309
40376
|
const { variant, icon } = TYPE_BADGES[event.type] || { variant: "default", icon: "\u2022" };
|
|
40310
40377
|
return /* @__PURE__ */ jsxs(
|
|
40311
40378
|
"div",
|
|
40312
40379
|
{
|
|
40313
|
-
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",
|
|
40314
40381
|
children: [
|
|
40315
|
-
/* @__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) }),
|
|
40316
40383
|
/* @__PURE__ */ jsx("span", { children: icon }),
|
|
40317
40384
|
/* @__PURE__ */ jsx(Badge, { variant, size: "sm", className: "min-w-[60px] justify-center", children: event.source }),
|
|
40318
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-
|
|
40385
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground", children: event.message })
|
|
40319
40386
|
]
|
|
40320
40387
|
},
|
|
40321
40388
|
event.id
|
|
@@ -40379,21 +40446,21 @@ function GuardsPanel({ guards }) {
|
|
|
40379
40446
|
id: guard.id,
|
|
40380
40447
|
header: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 w-full", children: [
|
|
40381
40448
|
/* @__PURE__ */ jsx(Badge, { variant: guard.result ? "success" : "danger", size: "sm", children: guard.result ? "\u2713" : "\u2717" }),
|
|
40382
|
-
/* @__PURE__ */ jsx(Typography, { variant: "body", weight: "semibold", className: "text-
|
|
40383
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-
|
|
40384
|
-
/* @__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) })
|
|
40385
40452
|
] }),
|
|
40386
40453
|
content: /* @__PURE__ */ jsxs(Stack, { gap: "sm", children: [
|
|
40387
40454
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
40388
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-
|
|
40389
|
-
/* @__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 })
|
|
40390
40457
|
] }),
|
|
40391
40458
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
40392
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-
|
|
40393
|
-
/* @__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) })
|
|
40394
40461
|
] }),
|
|
40395
40462
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
40396
|
-
/* @__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") }),
|
|
40397
40464
|
/* @__PURE__ */ jsx(Typography, { variant: "small", children: guard.context.traitName })
|
|
40398
40465
|
] })
|
|
40399
40466
|
] })
|
|
@@ -40449,7 +40516,7 @@ function VerificationTab({ checks, summary }) {
|
|
|
40449
40516
|
(a, b) => (sortOrder[a.status] ?? 4) - (sortOrder[b.status] ?? 4)
|
|
40450
40517
|
);
|
|
40451
40518
|
return /* @__PURE__ */ jsxs("div", { className: "debug-tab debug-tab--verification", children: [
|
|
40452
|
-
/* @__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: [
|
|
40453
40520
|
/* @__PURE__ */ jsxs(Badge, { variant: "success", size: "sm", children: [
|
|
40454
40521
|
summary.passed,
|
|
40455
40522
|
" passed"
|
|
@@ -40466,7 +40533,7 @@ function VerificationTab({ checks, summary }) {
|
|
|
40466
40533
|
summary.pending,
|
|
40467
40534
|
" pending"
|
|
40468
40535
|
] }),
|
|
40469
|
-
/* @__PURE__ */ jsxs(Typography, { variant: "small", className: "text-
|
|
40536
|
+
/* @__PURE__ */ jsxs(Typography, { variant: "small", className: "text-muted-foreground ml-auto", children: [
|
|
40470
40537
|
summary.totalChecks,
|
|
40471
40538
|
" total checks"
|
|
40472
40539
|
] })
|
|
@@ -40476,12 +40543,12 @@ function VerificationTab({ checks, summary }) {
|
|
|
40476
40543
|
return /* @__PURE__ */ jsxs(
|
|
40477
40544
|
"div",
|
|
40478
40545
|
{
|
|
40479
|
-
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",
|
|
40480
40547
|
children: [
|
|
40481
40548
|
/* @__PURE__ */ jsx(Badge, { variant: config.variant, size: "sm", className: "min-w-[20px] justify-center mt-0.5", children: config.icon }),
|
|
40482
40549
|
/* @__PURE__ */ jsxs("div", { className: "flex-1 min-w-0", children: [
|
|
40483
40550
|
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "break-words", children: check.label }),
|
|
40484
|
-
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 })
|
|
40485
40552
|
] }),
|
|
40486
40553
|
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground font-mono text-xs shrink-0", children: new Date(check.updatedAt).toLocaleTimeString("en-US", {
|
|
40487
40554
|
hour12: false,
|
|
@@ -40516,10 +40583,10 @@ var init_VerificationTab = __esm({
|
|
|
40516
40583
|
function EffectBadge({ effect }) {
|
|
40517
40584
|
const variant = EFFECT_STATUS_VARIANT[effect.status] || "default";
|
|
40518
40585
|
const icon = effect.status === "executed" ? "\u2713" : effect.status === "failed" ? "\u2717" : "-";
|
|
40519
|
-
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: [
|
|
40520
40587
|
/* @__PURE__ */ jsx(Badge, { variant, size: "sm", className: "!text-[9px] !px-1 !py-0", children: icon }),
|
|
40521
|
-
/* @__PURE__ */ jsx("span", { className: "text-
|
|
40522
|
-
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 })
|
|
40523
40590
|
] });
|
|
40524
40591
|
}
|
|
40525
40592
|
function TransitionTimeline({ transitions }) {
|
|
@@ -40554,8 +40621,8 @@ function TransitionTimeline({ transitions }) {
|
|
|
40554
40621
|
const sorted = [...transitions].reverse();
|
|
40555
40622
|
return /* @__PURE__ */ jsxs("div", { className: "debug-tab debug-tab--timeline", children: [
|
|
40556
40623
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between mb-2", children: [
|
|
40557
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-
|
|
40558
|
-
/* @__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: [
|
|
40559
40626
|
/* @__PURE__ */ jsx(
|
|
40560
40627
|
Checkbox,
|
|
40561
40628
|
{
|
|
@@ -40580,22 +40647,22 @@ function TransitionTimeline({ transitions }) {
|
|
|
40580
40647
|
{
|
|
40581
40648
|
className: `
|
|
40582
40649
|
relative pl-6 pb-3 border-l-2 cursor-pointer
|
|
40583
|
-
hover:bg-
|
|
40584
|
-
${hasFailedEffects ? "border-
|
|
40650
|
+
hover:bg-muted/50 rounded-r
|
|
40651
|
+
${hasFailedEffects ? "border-error" : "border-border"}
|
|
40585
40652
|
`,
|
|
40586
40653
|
onClick: () => setExpandedId(isExpanded ? null : trace.id),
|
|
40587
40654
|
children: [
|
|
40588
40655
|
/* @__PURE__ */ jsx("div", { className: `
|
|
40589
40656
|
absolute left-[-5px] top-1 w-2 h-2 rounded-full
|
|
40590
|
-
${hasFailedEffects ? "bg-
|
|
40657
|
+
${hasFailedEffects ? "bg-error" : allPassed ? "bg-success" : "bg-muted-foreground"}
|
|
40591
40658
|
` }),
|
|
40592
40659
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 text-xs py-1 px-2", children: [
|
|
40593
|
-
/* @__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) }),
|
|
40594
40661
|
/* @__PURE__ */ jsx(Badge, { variant: "primary", size: "sm", className: "min-w-[60px] justify-center", children: trace.traitName }),
|
|
40595
|
-
/* @__PURE__ */ jsxs(Typography, { variant: "small", className: "font-mono text-
|
|
40662
|
+
/* @__PURE__ */ jsxs(Typography, { variant: "small", className: "font-mono text-muted-foreground", children: [
|
|
40596
40663
|
trace.from,
|
|
40597
40664
|
" ",
|
|
40598
|
-
/* @__PURE__ */ jsx("span", { className: "text-
|
|
40665
|
+
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground/50", children: "\u2192" }),
|
|
40599
40666
|
" ",
|
|
40600
40667
|
trace.to
|
|
40601
40668
|
] }),
|
|
@@ -40612,9 +40679,9 @@ function TransitionTimeline({ transitions }) {
|
|
|
40612
40679
|
]
|
|
40613
40680
|
}
|
|
40614
40681
|
),
|
|
40615
|
-
/* @__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 }) })
|
|
40616
40683
|
] }),
|
|
40617
|
-
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: [
|
|
40618
40685
|
/* @__PURE__ */ jsx(EffectBadge, { effect }),
|
|
40619
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) }),
|
|
40620
40687
|
effect.durationMs !== void 0 && /* @__PURE__ */ jsxs(Typography, { variant: "small", className: "text-muted-foreground text-xs", children: [
|
|
@@ -40648,8 +40715,8 @@ var init_TransitionTimeline = __esm({
|
|
|
40648
40715
|
}
|
|
40649
40716
|
});
|
|
40650
40717
|
function StatRow({ label, value, variant }) {
|
|
40651
|
-
return /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between py-1.5 border-b border-
|
|
40652
|
-
/* @__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 }),
|
|
40653
40720
|
variant ? /* @__PURE__ */ jsx(Badge, { variant, size: "sm", children: String(value) }) : /* @__PURE__ */ jsx(Typography, { variant: "small", weight: "semibold", className: "font-mono", children: String(value) })
|
|
40654
40721
|
] });
|
|
40655
40722
|
}
|
|
@@ -40678,7 +40745,7 @@ function ServerBridgeTab({ bridge }) {
|
|
|
40678
40745
|
return /* @__PURE__ */ jsx("div", { className: "debug-tab debug-tab--bridge", children: /* @__PURE__ */ jsxs(Stack, { gap: "sm", children: [
|
|
40679
40746
|
/* @__PURE__ */ jsxs(Card, { className: "p-3", children: [
|
|
40680
40747
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3 mb-3", children: [
|
|
40681
|
-
/* @__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"}` }),
|
|
40682
40749
|
/* @__PURE__ */ jsx(Typography, { variant: "h6", children: bridge.connected ? t("debug.connected") : t("debug.disconnected") })
|
|
40683
40750
|
] }),
|
|
40684
40751
|
/* @__PURE__ */ jsxs(Stack, { gap: "xs", children: [
|
|
@@ -40713,11 +40780,11 @@ function ServerBridgeTab({ bridge }) {
|
|
|
40713
40780
|
)
|
|
40714
40781
|
] })
|
|
40715
40782
|
] }),
|
|
40716
|
-
bridge.lastError && /* @__PURE__ */ jsxs(Card, { className: "p-3 border-
|
|
40717
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "semibold", className: "text-
|
|
40718
|
-
/* @__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 })
|
|
40719
40786
|
] }),
|
|
40720
|
-
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 }) }) })
|
|
40721
40788
|
] }) });
|
|
40722
40789
|
}
|
|
40723
40790
|
var init_ServerBridgeTab = __esm({
|
|
@@ -40843,7 +40910,7 @@ function EventDispatcherTab({ traits: traits2, schema }) {
|
|
|
40843
40910
|
};
|
|
40844
40911
|
return /* @__PURE__ */ jsxs("div", { className: "debug-tab debug-tab--dispatch", children: [
|
|
40845
40912
|
/* @__PURE__ */ jsxs("div", { className: "mb-3", children: [
|
|
40846
|
-
/* @__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") }),
|
|
40847
40914
|
/* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-1", children: traits2.map((trait) => /* @__PURE__ */ jsxs(Badge, { variant: "success", size: "sm", children: [
|
|
40848
40915
|
trait.name,
|
|
40849
40916
|
": ",
|
|
@@ -40851,8 +40918,8 @@ function EventDispatcherTab({ traits: traits2, schema }) {
|
|
|
40851
40918
|
] }, trait.id)) })
|
|
40852
40919
|
] }),
|
|
40853
40920
|
/* @__PURE__ */ jsxs("div", { className: "mb-3", children: [
|
|
40854
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-
|
|
40855
|
-
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: [
|
|
40856
40923
|
/* @__PURE__ */ jsx(
|
|
40857
40924
|
Button,
|
|
40858
40925
|
{
|
|
@@ -40863,22 +40930,22 @@ function EventDispatcherTab({ traits: traits2, schema }) {
|
|
|
40863
40930
|
children: event
|
|
40864
40931
|
}
|
|
40865
40932
|
),
|
|
40866
|
-
/* @__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(", ") }),
|
|
40867
40934
|
transitions.some((tr) => tr.guard) && /* @__PURE__ */ jsx(Badge, { variant: "warning", size: "sm", children: t("debug.guarded") })
|
|
40868
40935
|
] }, event)) })
|
|
40869
40936
|
] }),
|
|
40870
40937
|
unavailableEvents.length > 0 && /* @__PURE__ */ jsxs("div", { className: "mb-3", children: [
|
|
40871
|
-
/* @__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") }),
|
|
40872
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)) })
|
|
40873
40940
|
] }),
|
|
40874
40941
|
log13.length > 0 && /* @__PURE__ */ jsxs("div", { children: [
|
|
40875
|
-
/* @__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") }),
|
|
40876
40943
|
/* @__PURE__ */ jsx(Stack, { gap: "xs", children: log13.map((entry, i) => /* @__PURE__ */ jsxs(Typography, { variant: "small", className: "font-mono text-xs", children: [
|
|
40877
|
-
/* @__PURE__ */ jsx("span", { className: "text-
|
|
40944
|
+
/* @__PURE__ */ jsx("span", { className: "text-primary", children: entry.traitName }),
|
|
40878
40945
|
" ",
|
|
40879
|
-
/* @__PURE__ */ jsx("span", { className: "text-
|
|
40946
|
+
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: entry.from }),
|
|
40880
40947
|
" -> ",
|
|
40881
|
-
/* @__PURE__ */ jsx("span", { className: "text-
|
|
40948
|
+
/* @__PURE__ */ jsx("span", { className: "text-success", children: entry.to })
|
|
40882
40949
|
] }, i)) })
|
|
40883
40950
|
] })
|
|
40884
40951
|
] });
|
|
@@ -40904,21 +40971,21 @@ var init_RuntimeDebugger = __esm({
|
|
|
40904
40971
|
function ServerResponseRow({ sr }) {
|
|
40905
40972
|
const { t } = useTranslate();
|
|
40906
40973
|
const entityEntries = Object.entries(sr.dataEntities);
|
|
40907
|
-
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: [
|
|
40908
40975
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
40909
|
-
/* @__PURE__ */ jsxs("span", { className: sr.success ? "text-
|
|
40976
|
+
/* @__PURE__ */ jsxs("span", { className: sr.success ? "text-success" : "text-error", children: [
|
|
40910
40977
|
sr.success ? "\u2713" : "\u2717",
|
|
40911
40978
|
" ",
|
|
40912
40979
|
t("debug.server")
|
|
40913
40980
|
] }),
|
|
40914
|
-
/* @__PURE__ */ jsx("span", { className: "text-
|
|
40915
|
-
sr.clientEffects > 0 && /* @__PURE__ */ jsx("span", { className: "px-1 rounded bg-
|
|
40916
|
-
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: [
|
|
40917
40984
|
t("debug.emitLabel"),
|
|
40918
40985
|
" ",
|
|
40919
40986
|
sr.emittedEvents.join(", ")
|
|
40920
40987
|
] }),
|
|
40921
|
-
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 })
|
|
40922
40989
|
] }),
|
|
40923
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: [
|
|
40924
40991
|
name,
|
|
@@ -40934,9 +41001,9 @@ function TransitionRow({ trace }) {
|
|
|
40934
41001
|
if (isServerEntry && trace.serverResponse) {
|
|
40935
41002
|
return /* @__PURE__ */ jsxs("div", { className: "py-0.5 border-b border-border last:border-0", children: [
|
|
40936
41003
|
/* @__PURE__ */ jsxs("div", { className: "flex items-start gap-2 text-xs font-mono", children: [
|
|
40937
|
-
/* @__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" }),
|
|
40938
41005
|
/* @__PURE__ */ jsx(Badge, { variant: "warning", size: "sm", className: "flex-shrink-0", children: trace.event }),
|
|
40939
|
-
/* @__PURE__ */ jsx("span", { className: "text-
|
|
41006
|
+
/* @__PURE__ */ jsx("span", { className: "text-primary flex-shrink-0", children: t("debug.serverResponse") })
|
|
40940
41007
|
] }),
|
|
40941
41008
|
/* @__PURE__ */ jsx(ServerResponseRow, { sr: trace.serverResponse })
|
|
40942
41009
|
] });
|
|
@@ -40945,7 +41012,7 @@ function TransitionRow({ trace }) {
|
|
|
40945
41012
|
/* @__PURE__ */ jsxs("div", { className: "flex items-start gap-2 text-xs font-mono", children: [
|
|
40946
41013
|
/* @__PURE__ */ jsx("span", { className: cn(
|
|
40947
41014
|
"mt-1.5 w-1.5 h-1.5 rounded-full flex-shrink-0",
|
|
40948
|
-
hasFailedEffects ? "bg-
|
|
41015
|
+
hasFailedEffects ? "bg-error" : "bg-success"
|
|
40949
41016
|
) }),
|
|
40950
41017
|
/* @__PURE__ */ jsx(Badge, { variant: "info", size: "sm", className: "flex-shrink-0", children: trace.event }),
|
|
40951
41018
|
/* @__PURE__ */ jsx("span", { className: "text-foreground flex-shrink-0", children: trace.traitName }),
|
|
@@ -40959,7 +41026,7 @@ function TransitionRow({ trace }) {
|
|
|
40959
41026
|
] }),
|
|
40960
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(
|
|
40961
41028
|
"px-1 rounded text-xs",
|
|
40962
|
-
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"
|
|
40963
41030
|
), children: [
|
|
40964
41031
|
eff.status === "executed" ? "\u2713" : eff.status === "failed" ? "\u2717" : "-",
|
|
40965
41032
|
" ",
|
|
@@ -40993,7 +41060,7 @@ function VerifyModePanel({
|
|
|
40993
41060
|
{
|
|
40994
41061
|
className: cn(
|
|
40995
41062
|
"runtime-debugger runtime-debugger--verify",
|
|
40996
|
-
"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",
|
|
40997
41064
|
hudBottom ? "" : "fixed bottom-0 left-0 right-0",
|
|
40998
41065
|
className
|
|
40999
41066
|
),
|
|
@@ -41014,8 +41081,8 @@ function VerifyModePanel({
|
|
|
41014
41081
|
/* @__PURE__ */ jsx("span", { className: "text-foreground/50 w-3", "aria-hidden": true, children: expanded ? "\u25BE" : "\u25B8" }),
|
|
41015
41082
|
/* @__PURE__ */ jsx(Badge, { variant: failedChecks > 0 ? "danger" : "success", size: "sm", children: failedChecks > 0 ? t("debug.failCount", { count: failedChecks }) : t("debug.ok") }),
|
|
41016
41083
|
/* @__PURE__ */ jsx("span", { className: "text-foreground/70", children: t("debug.localCount", { count: localCount }) }),
|
|
41017
|
-
/* @__PURE__ */ jsx("span", { className: "text-
|
|
41018
|
-
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 }),
|
|
41019
41086
|
!expanded && transitions.length > 0 && /* @__PURE__ */ jsx("span", { className: "ml-auto text-foreground/50", children: t("debug.transitionsCount", { count: transitions.length }) })
|
|
41020
41087
|
]
|
|
41021
41088
|
}
|
|
@@ -41210,7 +41277,7 @@ function RuntimeDebugger({
|
|
|
41210
41277
|
title: t("debug.openDebugger"),
|
|
41211
41278
|
children: failedChecks > 0 ? /* @__PURE__ */ jsxs("span", { className: "relative", children: [
|
|
41212
41279
|
/* @__PURE__ */ jsx("span", { children: "V" }),
|
|
41213
|
-
/* @__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" })
|
|
41214
41281
|
] }) : /* @__PURE__ */ jsx("span", { children: "V" })
|
|
41215
41282
|
}
|
|
41216
41283
|
) : /* @__PURE__ */ jsxs(Card, { className: "runtime-debugger__panel", children: [
|
|
@@ -41298,7 +41365,7 @@ var init_SegmentRenderer = __esm({
|
|
|
41298
41365
|
"div",
|
|
41299
41366
|
{
|
|
41300
41367
|
className: cn(
|
|
41301
|
-
"border border-
|
|
41368
|
+
"border border-border rounded-lg p-2 md:p-4 overflow-x-auto space-y-6",
|
|
41302
41369
|
containerClassName,
|
|
41303
41370
|
className
|
|
41304
41371
|
),
|
|
@@ -45595,6 +45662,66 @@ function useNavigationId2() {
|
|
|
45595
45662
|
init_useEventBus();
|
|
45596
45663
|
var xOrbitalLog = createLogger("almadar:runtime:cross-orbital");
|
|
45597
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
|
+
}
|
|
45598
45725
|
function createHttpTransport(serverUrl) {
|
|
45599
45726
|
return {
|
|
45600
45727
|
register: async (schema) => {
|
|
@@ -45621,11 +45748,12 @@ function createHttpTransport(serverUrl) {
|
|
|
45621
45748
|
} catch {
|
|
45622
45749
|
}
|
|
45623
45750
|
},
|
|
45624
|
-
sendEvent: async (orbitalName, event, payload) => {
|
|
45751
|
+
sendEvent: async (orbitalName, event, payload, clientId) => {
|
|
45752
|
+
const body = { event, payload, clientId };
|
|
45625
45753
|
const res = await fetch(`${serverUrl}/${orbitalName}/events`, {
|
|
45626
45754
|
method: "POST",
|
|
45627
45755
|
headers: { "Content-Type": "application/json" },
|
|
45628
|
-
body: JSON.stringify(
|
|
45756
|
+
body: JSON.stringify(body)
|
|
45629
45757
|
});
|
|
45630
45758
|
return res.json();
|
|
45631
45759
|
}
|
|
@@ -45670,7 +45798,7 @@ function ServerBridgeProvider({
|
|
|
45670
45798
|
const emptyMeta = { success: false, clientEffects: 0, dataEntities: {}, emittedEvents: [] };
|
|
45671
45799
|
if (!connected) return { effects: [], meta: emptyMeta };
|
|
45672
45800
|
try {
|
|
45673
|
-
const result = await transport.sendEvent(orbitalName, event, payload);
|
|
45801
|
+
const result = await transport.sendEvent(orbitalName, event, payload, getTabClientId());
|
|
45674
45802
|
const effects = [];
|
|
45675
45803
|
const responseData = result.data || {};
|
|
45676
45804
|
const dataEntities = {};
|
|
@@ -45715,22 +45843,7 @@ function ServerBridgeProvider({
|
|
|
45715
45843
|
}
|
|
45716
45844
|
if (result.emittedEvents) {
|
|
45717
45845
|
for (const emitted of result.emittedEvents) {
|
|
45718
|
-
|
|
45719
|
-
if (!evTrait) {
|
|
45720
|
-
xOrbitalLog.warn("emit:dropped-no-source", {
|
|
45721
|
-
event: emitted.event,
|
|
45722
|
-
dispatchOrbital: orbitalName
|
|
45723
|
-
});
|
|
45724
|
-
continue;
|
|
45725
|
-
}
|
|
45726
|
-
const key = emitted.source?.orbital ? `UI:${emitted.source.orbital}.${evTrait}.${emitted.event}` : `UI:${evTrait}.${emitted.event}`;
|
|
45727
|
-
xOrbitalLog.info("emit:rebroadcast", {
|
|
45728
|
-
busKey: key,
|
|
45729
|
-
sourceOrbital: emitted.source?.orbital,
|
|
45730
|
-
sourceTrait: evTrait,
|
|
45731
|
-
dispatchOrbital: orbitalName
|
|
45732
|
-
});
|
|
45733
|
-
eventBus.emit(key, emitted.payload);
|
|
45846
|
+
reEmitServerEvent(eventBus, emitted, orbitalName);
|
|
45734
45847
|
}
|
|
45735
45848
|
}
|
|
45736
45849
|
} else if (result.error) {
|
|
@@ -45772,6 +45885,19 @@ function ServerBridgeProvider({
|
|
|
45772
45885
|
unregisterSchema();
|
|
45773
45886
|
};
|
|
45774
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]);
|
|
45775
45901
|
return /* @__PURE__ */ jsx(ServerBridgeContext.Provider, { value: { connected, sendEvent }, children });
|
|
45776
45902
|
}
|
|
45777
45903
|
var log12 = createLogger("almadar:ui:trait-provider");
|