@almadar/ui 5.123.0 → 5.124.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{TraitProvider-YkK6tXDw.d.cts → TraitProvider-Ch79cUcb.d.cts} +6 -1
- package/dist/{TraitProvider-YkK6tXDw.d.ts → TraitProvider-Ch79cUcb.d.ts} +6 -1
- package/dist/{UserContext-bziZwgFL.d.cts → UserContext-BKckAUv7.d.cts} +5 -5
- package/dist/{UserContext-bziZwgFL.d.ts → UserContext-BKckAUv7.d.ts} +5 -5
- package/dist/avl/index.cjs +265 -227
- package/dist/avl/index.js +267 -229
- package/dist/components/index.cjs +208 -200
- package/dist/components/index.d.cts +4 -3
- package/dist/components/index.d.ts +4 -3
- package/dist/components/index.js +208 -200
- package/dist/context/index.cjs +25 -66
- package/dist/context/index.d.cts +1 -1
- package/dist/context/index.d.ts +1 -1
- package/dist/context/index.js +25 -66
- package/dist/providers/index.cjs +286 -219
- package/dist/providers/index.d.cts +4 -4
- package/dist/providers/index.d.ts +4 -4
- package/dist/providers/index.js +286 -219
- package/dist/runtime/index.cjs +258 -220
- package/dist/runtime/index.d.cts +4 -2
- package/dist/runtime/index.d.ts +4 -2
- package/dist/runtime/index.js +260 -222
- package/package.json +8 -7
- package/themes/_contract.md +2 -0
- package/themes/almadar-website.css +3 -3
- package/themes/almadar.css +4 -4
- package/themes/bloomberg-dense.css +2 -2
- package/themes/clay.css +417 -0
- package/themes/corporate.css +411 -0
- package/themes/game-adventure.css +3 -3
- package/themes/game-rpg.css +2 -2
- package/themes/game-sci-fi.css +1 -1
- package/themes/game-ui-pack.css +2 -2
- package/themes/gazette.css +2 -2
- package/themes/glass.css +428 -0
- package/themes/index.css +9 -13
- package/themes/kiosk.css +5 -5
- package/themes/linear-clean.css +1 -1
- package/themes/minimalist.css +2 -2
- package/themes/neon.css +3 -3
- package/themes/notion-editorial.css +1 -1
- package/themes/prism.css +3 -3
- package/themes/retro.css +410 -0
- package/themes/terminal.css +1 -1
- package/themes/trait-wars.css +8 -8
- package/themes/wireframe.css +2 -2
- package/themes/arctic.css +0 -235
- package/themes/copper.css +0 -235
- package/themes/ember.css +0 -238
- package/themes/forest.css +0 -238
- package/themes/lavender.css +0 -233
- package/themes/midnight.css +0 -234
- package/themes/ocean.css +0 -238
- package/themes/rose.css +0 -233
- package/themes/sand.css +0 -234
- package/themes/slate.css +0 -233
- package/themes/sunset.css +0 -238
package/dist/providers/index.cjs
CHANGED
|
@@ -4698,15 +4698,15 @@ var init_TextHighlight = __esm({
|
|
|
4698
4698
|
const typeStyles = {
|
|
4699
4699
|
question: cn(
|
|
4700
4700
|
// Blue border for questions
|
|
4701
|
-
"bg-card border-b-2 border-primary
|
|
4701
|
+
"bg-card border-b-2 border-primary",
|
|
4702
4702
|
"hover:bg-muted",
|
|
4703
|
-
isActive && "bg-primary
|
|
4703
|
+
isActive && "bg-primary/10 ring-2 ring-primary"
|
|
4704
4704
|
),
|
|
4705
4705
|
note: cn(
|
|
4706
4706
|
// Yellow border for notes
|
|
4707
|
-
"bg-card border-b-2 border-
|
|
4707
|
+
"bg-card border-b-2 border-warning",
|
|
4708
4708
|
"hover:bg-muted",
|
|
4709
|
-
isActive && "bg-
|
|
4709
|
+
isActive && "bg-warning/10 ring-2 ring-warning"
|
|
4710
4710
|
)
|
|
4711
4711
|
};
|
|
4712
4712
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -5052,7 +5052,7 @@ function DayCell({
|
|
|
5052
5052
|
{
|
|
5053
5053
|
className: cn(
|
|
5054
5054
|
"p-2 text-center cursor-pointer hover:bg-muted transition-colors",
|
|
5055
|
-
isToday && "bg-
|
|
5055
|
+
isToday && "bg-primary/10",
|
|
5056
5056
|
className
|
|
5057
5057
|
),
|
|
5058
5058
|
onClick: handleClick,
|
|
@@ -5063,7 +5063,7 @@ function DayCell({
|
|
|
5063
5063
|
variant: "small",
|
|
5064
5064
|
className: cn(
|
|
5065
5065
|
"font-medium",
|
|
5066
|
-
isToday ? "text-
|
|
5066
|
+
isToday ? "text-primary" : "text-muted-foreground"
|
|
5067
5067
|
),
|
|
5068
5068
|
children: dayAbbr
|
|
5069
5069
|
}
|
|
@@ -5075,7 +5075,7 @@ function DayCell({
|
|
|
5075
5075
|
rounded: "full",
|
|
5076
5076
|
className: cn(
|
|
5077
5077
|
"h-8 w-8 mx-auto items-center justify-center",
|
|
5078
|
-
isToday && "bg-
|
|
5078
|
+
isToday && "bg-primary text-primary-foreground"
|
|
5079
5079
|
),
|
|
5080
5080
|
children: /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body", className: "font-semibold", children: safeDate.getDate() })
|
|
5081
5081
|
}
|
|
@@ -12580,19 +12580,19 @@ var init_ActivationBlock = __esm({
|
|
|
12580
12580
|
"div",
|
|
12581
12581
|
{
|
|
12582
12582
|
className: cn(
|
|
12583
|
-
"bg-
|
|
12583
|
+
"bg-primary/10 border-2 border-primary rounded-lg p-5 mb-6",
|
|
12584
12584
|
className
|
|
12585
12585
|
),
|
|
12586
12586
|
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-3", children: [
|
|
12587
|
-
/* @__PURE__ */ jsxRuntime.jsx(LucideIcons2.Lightbulb, { className: "text-
|
|
12587
|
+
/* @__PURE__ */ jsxRuntime.jsx(LucideIcons2.Lightbulb, { className: "text-primary flex-shrink-0 mt-1", size: 24 }),
|
|
12588
12588
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1", children: [
|
|
12589
|
-
/* @__PURE__ */ jsxRuntime.jsx("h4", { className: "font-semibold text-
|
|
12590
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-
|
|
12589
|
+
/* @__PURE__ */ jsxRuntime.jsx("h4", { className: "font-semibold text-primary mb-2", children: "Before You Begin..." }),
|
|
12590
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-foreground mb-3 text-sm md:text-base", children: question }),
|
|
12591
12591
|
isExpanded ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
12592
12592
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
12593
12593
|
"textarea",
|
|
12594
12594
|
{
|
|
12595
|
-
className: "w-full p-3 border border-
|
|
12595
|
+
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",
|
|
12596
12596
|
placeholder: "Jot down your thoughts...",
|
|
12597
12597
|
value: response,
|
|
12598
12598
|
onChange: (e) => setResponse(e.target.value),
|
|
@@ -12604,7 +12604,7 @@ var init_ActivationBlock = __esm({
|
|
|
12604
12604
|
"button",
|
|
12605
12605
|
{
|
|
12606
12606
|
onClick: handleSubmit,
|
|
12607
|
-
className: "px-4 py-2 bg-
|
|
12607
|
+
className: "px-4 py-2 bg-primary text-primary-foreground rounded-md hover:bg-primary-hover text-sm font-medium transition-colors",
|
|
12608
12608
|
children: "Continue to Lesson \u2192"
|
|
12609
12609
|
}
|
|
12610
12610
|
),
|
|
@@ -12615,7 +12615,7 @@ var init_ActivationBlock = __esm({
|
|
|
12615
12615
|
emit(`UI:${saveEvent}`, { response: "" });
|
|
12616
12616
|
setIsExpanded(false);
|
|
12617
12617
|
},
|
|
12618
|
-
className: "px-4 py-2 text-
|
|
12618
|
+
className: "px-4 py-2 text-primary hover:underline text-sm",
|
|
12619
12619
|
children: "Skip for now"
|
|
12620
12620
|
}
|
|
12621
12621
|
)
|
|
@@ -12624,7 +12624,7 @@ var init_ActivationBlock = __esm({
|
|
|
12624
12624
|
"button",
|
|
12625
12625
|
{
|
|
12626
12626
|
onClick: () => setIsExpanded(true),
|
|
12627
|
-
className: "text-sm text-
|
|
12627
|
+
className: "text-sm text-primary hover:underline font-medium",
|
|
12628
12628
|
children: "\u2713 Answered \xB7 Edit response"
|
|
12629
12629
|
}
|
|
12630
12630
|
)
|
|
@@ -13128,7 +13128,7 @@ var init_AuthLayout = __esm({
|
|
|
13128
13128
|
VStack,
|
|
13129
13129
|
{
|
|
13130
13130
|
className: cn(
|
|
13131
|
-
"hidden lg:flex lg:w-1/2 bg-primary
|
|
13131
|
+
"hidden lg:flex lg:w-1/2 bg-primary relative overflow-hidden",
|
|
13132
13132
|
"justify-between p-12"
|
|
13133
13133
|
),
|
|
13134
13134
|
style: backgroundImage ? {
|
|
@@ -13137,7 +13137,7 @@ var init_AuthLayout = __esm({
|
|
|
13137
13137
|
} : void 0,
|
|
13138
13138
|
gap: "none",
|
|
13139
13139
|
children: [
|
|
13140
|
-
/* @__PURE__ */ jsxRuntime.jsx(Box, { className: "absolute inset-0 bg-gradient-to-br from-primary
|
|
13140
|
+
/* @__PURE__ */ jsxRuntime.jsx(Box, { className: "absolute inset-0 bg-gradient-to-br from-primary/90 to-primary-hover/90" }),
|
|
13141
13141
|
/* @__PURE__ */ jsxRuntime.jsx(Box, { className: "relative z-10", children: /* @__PURE__ */ jsxRuntime.jsxs(reactRouterDom.Link, { to: "/", className: "flex items-center gap-3", children: [
|
|
13142
13142
|
logo || /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "w-10 h-10 bg-[var(--color-card)]/20 rounded-xl flex items-center justify-center backdrop-blur", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
13143
13143
|
Typography,
|
|
@@ -13222,7 +13222,7 @@ var init_AuthLayout = __esm({
|
|
|
13222
13222
|
),
|
|
13223
13223
|
children: /* @__PURE__ */ jsxRuntime.jsxs(Box, { className: "w-full max-w-md", children: [
|
|
13224
13224
|
/* @__PURE__ */ jsxRuntime.jsx(Box, { className: "lg:hidden mb-8 text-center", children: /* @__PURE__ */ jsxRuntime.jsxs(reactRouterDom.Link, { to: "/", className: "inline-flex items-center gap-3", children: [
|
|
13225
|
-
logo || /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "w-12 h-12 bg-primary
|
|
13225
|
+
logo || /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "w-12 h-12 bg-primary rounded-xl flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
13226
13226
|
Typography,
|
|
13227
13227
|
{
|
|
13228
13228
|
variant: "body1",
|
|
@@ -15213,7 +15213,7 @@ var init_CodeBlock = __esm({
|
|
|
15213
15213
|
{
|
|
15214
15214
|
justify: "between",
|
|
15215
15215
|
align: "center",
|
|
15216
|
-
className: "px-3 py-2 bg-[var(--color-card)] rounded-t-lg border-b border-
|
|
15216
|
+
className: "px-3 py-2 bg-[var(--color-card)] rounded-t-lg border-b border-border",
|
|
15217
15217
|
children: [
|
|
15218
15218
|
showLanguageBadge && /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: "default", size: "sm", children: language }),
|
|
15219
15219
|
effectiveCopy && /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -15222,9 +15222,9 @@ var init_CodeBlock = __esm({
|
|
|
15222
15222
|
variant: "ghost",
|
|
15223
15223
|
size: "sm",
|
|
15224
15224
|
onClick: handleCopy,
|
|
15225
|
-
className: "opacity-0 group-hover:opacity-100 focus:opacity-100 transition-opacity text-muted-foreground hover:text-
|
|
15225
|
+
className: "opacity-0 group-hover:opacity-100 focus:opacity-100 transition-opacity text-muted-foreground hover:text-foreground",
|
|
15226
15226
|
"aria-label": t("common.copy"),
|
|
15227
|
-
children: copied ? /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: "check", className: "w-4 h-4 text-
|
|
15227
|
+
children: copied ? /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: "check", className: "w-4 h-4 text-success" }) : /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: "copy", className: "w-4 h-4" })
|
|
15228
15228
|
}
|
|
15229
15229
|
)
|
|
15230
15230
|
]
|
|
@@ -15592,12 +15592,12 @@ var init_BloomQuizBlock = __esm({
|
|
|
15592
15592
|
init_useEventBus();
|
|
15593
15593
|
init_cn();
|
|
15594
15594
|
BLOOM_CONFIG = {
|
|
15595
|
-
remember: { color: "bg-
|
|
15596
|
-
understand: { color: "bg-
|
|
15597
|
-
apply: { color: "bg-
|
|
15598
|
-
analyze: { color: "bg-
|
|
15599
|
-
evaluate: { color: "bg-
|
|
15600
|
-
create: { color: "bg-
|
|
15595
|
+
remember: { color: "bg-secondary text-secondary-foreground", bgColor: "bg-muted", label: "Remember" },
|
|
15596
|
+
understand: { color: "bg-info text-info-foreground", bgColor: "bg-info/10", label: "Understand" },
|
|
15597
|
+
apply: { color: "bg-success text-success-foreground", bgColor: "bg-success/10", label: "Apply" },
|
|
15598
|
+
analyze: { color: "bg-warning text-warning-foreground", bgColor: "bg-warning/10", label: "Analyze" },
|
|
15599
|
+
evaluate: { color: "bg-accent text-accent-foreground", bgColor: "bg-accent/10", label: "Evaluate" },
|
|
15600
|
+
create: { color: "bg-primary text-primary-foreground", bgColor: "bg-primary/10", label: "Create" }
|
|
15601
15601
|
};
|
|
15602
15602
|
BloomQuizBlock = ({
|
|
15603
15603
|
level,
|
|
@@ -15623,22 +15623,22 @@ var init_BloomQuizBlock = __esm({
|
|
|
15623
15623
|
"div",
|
|
15624
15624
|
{
|
|
15625
15625
|
className: cn(
|
|
15626
|
-
"rounded-lg border border-
|
|
15626
|
+
"rounded-lg border border-primary p-4 my-4 transition-all",
|
|
15627
15627
|
config.bgColor,
|
|
15628
15628
|
className
|
|
15629
15629
|
),
|
|
15630
15630
|
children: [
|
|
15631
15631
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between mb-3", children: [
|
|
15632
15632
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 flex-wrap", children: [
|
|
15633
|
-
index !== void 0 && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-
|
|
15633
|
+
index !== void 0 && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-muted-foreground font-medium text-sm", children: [
|
|
15634
15634
|
"Question ",
|
|
15635
15635
|
index + 1
|
|
15636
15636
|
] }),
|
|
15637
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: cn(config.color, "text-
|
|
15637
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: cn(config.color, "text-xs px-2 py-1 rounded-full font-medium"), children: config.label })
|
|
15638
15638
|
] }),
|
|
15639
|
-
isAnswered && /* @__PURE__ */ jsxRuntime.jsx(LucideIcons2.CheckCircle, { className: "text-
|
|
15639
|
+
isAnswered && /* @__PURE__ */ jsxRuntime.jsx(LucideIcons2.CheckCircle, { className: "text-success flex-shrink-0", size: 20 })
|
|
15640
15640
|
] }),
|
|
15641
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "font-semibold text-
|
|
15641
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "font-semibold text-primary mb-3 space-y-2", children: questionSegments.map(
|
|
15642
15642
|
(segment, idx) => segment.type === "markdown" ? /* @__PURE__ */ jsxRuntime.jsx(MarkdownContent, { content: segment.content }, `q-md-${idx}`) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
15643
15643
|
CodeBlock,
|
|
15644
15644
|
{
|
|
@@ -15652,13 +15652,13 @@ var init_BloomQuizBlock = __esm({
|
|
|
15652
15652
|
"button",
|
|
15653
15653
|
{
|
|
15654
15654
|
type: "button",
|
|
15655
|
-
className: "inline-flex items-center rounded-md bg-
|
|
15655
|
+
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",
|
|
15656
15656
|
onClick: handleReveal,
|
|
15657
15657
|
children: revealed ? "Hide Answer" : "Reveal Answer"
|
|
15658
15658
|
}
|
|
15659
15659
|
),
|
|
15660
|
-
revealed && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rounded-lg bg-
|
|
15661
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-xs text-
|
|
15660
|
+
revealed && /* @__PURE__ */ jsxRuntime.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: [
|
|
15661
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-xs text-muted-foreground mb-1 font-medium uppercase tracking-wide", children: "Answer:" }),
|
|
15662
15662
|
answerSegments.map(
|
|
15663
15663
|
(segment, idx) => segment.type === "markdown" ? /* @__PURE__ */ jsxRuntime.jsx(MarkdownContent, { content: segment.content }, `a-md-${idx}`) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
15664
15664
|
CodeBlock,
|
|
@@ -15932,12 +15932,12 @@ var init_QuizBlock = __esm({
|
|
|
15932
15932
|
}) => {
|
|
15933
15933
|
const { t } = hooks.useTranslate();
|
|
15934
15934
|
const [revealed, setRevealed] = React84.useState(false);
|
|
15935
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Card2, { className: cn("my-4 border-
|
|
15935
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Card2, { className: cn("my-4 border-primary", className), children: /* @__PURE__ */ jsxRuntime.jsxs(VStack, { gap: "sm", className: "p-4", children: [
|
|
15936
15936
|
/* @__PURE__ */ jsxRuntime.jsxs(HStack, { gap: "sm", align: "start", children: [
|
|
15937
|
-
/* @__PURE__ */ jsxRuntime.jsx(Icon, { icon: LucideIcons2.HelpCircle, size: "sm", className: "text-
|
|
15937
|
+
/* @__PURE__ */ jsxRuntime.jsx(Icon, { icon: LucideIcons2.HelpCircle, size: "sm", className: "text-primary mt-0.5 shrink-0" }),
|
|
15938
15938
|
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body", className: "font-medium", children: question })
|
|
15939
15939
|
] }),
|
|
15940
|
-
revealed ? /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "pl-7 pt-2 border-t border-
|
|
15940
|
+
revealed ? /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "pl-7 pt-2 border-t border-border", children: /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body", className: "text-foreground", children: answer }) }) : null,
|
|
15941
15941
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
15942
15942
|
Button,
|
|
15943
15943
|
{
|
|
@@ -17849,7 +17849,7 @@ var init_BookTableOfContents = __esm({
|
|
|
17849
17849
|
className: cn(
|
|
17850
17850
|
"justify-start text-left w-full",
|
|
17851
17851
|
direction === "rtl" && "text-right",
|
|
17852
|
-
isCurrent && "bg-
|
|
17852
|
+
isCurrent && "bg-primary/10 text-primary"
|
|
17853
17853
|
),
|
|
17854
17854
|
children: /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "truncate", children: /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body", children: String(chapter.title ?? "") }) })
|
|
17855
17855
|
},
|
|
@@ -19097,7 +19097,7 @@ function CalendarGrid({
|
|
|
19097
19097
|
border: true,
|
|
19098
19098
|
className: cn(
|
|
19099
19099
|
"cursor-pointer hover:shadow-sm transition-shadow text-xs truncate",
|
|
19100
|
-
color ? color : "bg-
|
|
19100
|
+
color ? color : "bg-primary/10 border-primary/30 text-primary"
|
|
19101
19101
|
),
|
|
19102
19102
|
onClick: (e) => handleEventClick(event, e),
|
|
19103
19103
|
children: /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "truncate font-medium", children: event.title })
|
|
@@ -19195,7 +19195,7 @@ function CalendarGrid({
|
|
|
19195
19195
|
onClick: () => handleSlotClick(day, time),
|
|
19196
19196
|
className: cn(
|
|
19197
19197
|
"border-l border-border",
|
|
19198
|
-
isToday && "bg-
|
|
19198
|
+
isToday && "bg-primary/10"
|
|
19199
19199
|
),
|
|
19200
19200
|
...longPressEvent ? {
|
|
19201
19201
|
onPointerDown: () => startLongPress(day, time),
|
|
@@ -21211,31 +21211,31 @@ var init_CodeRunnerPanel = __esm({
|
|
|
21211
21211
|
}
|
|
21212
21212
|
)
|
|
21213
21213
|
] }),
|
|
21214
|
-
hasOutput && /* @__PURE__ */ jsxRuntime.jsxs(Box, { className: "rounded-lg border border-
|
|
21214
|
+
hasOutput && /* @__PURE__ */ jsxRuntime.jsxs(Box, { className: "rounded-lg border border-border bg-foreground overflow-hidden", children: [
|
|
21215
21215
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
21216
21216
|
HStack,
|
|
21217
21217
|
{
|
|
21218
21218
|
gap: "sm",
|
|
21219
21219
|
align: "center",
|
|
21220
|
-
className: "px-3 py-2 bg-
|
|
21220
|
+
className: "px-3 py-2 bg-card border-b border-border",
|
|
21221
21221
|
children: [
|
|
21222
|
-
/* @__PURE__ */ jsxRuntime.jsx(LucideIcons2.Terminal, { size: 16, className: "text-
|
|
21223
|
-
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-
|
|
21222
|
+
/* @__PURE__ */ jsxRuntime.jsx(LucideIcons2.Terminal, { size: 16, className: "text-muted-foreground" }),
|
|
21223
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-foreground font-medium", children: "Output" })
|
|
21224
21224
|
]
|
|
21225
21225
|
}
|
|
21226
21226
|
),
|
|
21227
|
-
/* @__PURE__ */ jsxRuntime.jsx(VStack, { gap: "none", className: "p-3 font-mono text-sm", children: error ? /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-
|
|
21228
|
-
output?.stdout ? /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-
|
|
21229
|
-
output?.stderr ? /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-
|
|
21230
|
-
!output?.stdout && !output?.stderr ? /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-
|
|
21231
|
-
output && output.testResults.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "mt-3 pt-3 border-t border-
|
|
21232
|
-
test.passed ? /* @__PURE__ */ jsxRuntime.jsx(LucideIcons2.CheckCircle, { size: 14, className: "text-
|
|
21227
|
+
/* @__PURE__ */ jsxRuntime.jsx(VStack, { gap: "none", className: "p-3 font-mono text-sm", children: error ? /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-error whitespace-pre-wrap", children: error }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
21228
|
+
output?.stdout ? /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-background whitespace-pre-wrap", children: output.stdout }) : null,
|
|
21229
|
+
output?.stderr ? /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-error whitespace-pre-wrap", children: output.stderr }) : null,
|
|
21230
|
+
!output?.stdout && !output?.stderr ? /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-background italic", children: "No output" }) : null,
|
|
21231
|
+
output && output.testResults.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "mt-3 pt-3 border-t border-border space-y-2", children: output.testResults.map((test, index) => /* @__PURE__ */ jsxRuntime.jsxs(HStack, { gap: "sm", align: "start", className: "text-xs", children: [
|
|
21232
|
+
test.passed ? /* @__PURE__ */ jsxRuntime.jsx(LucideIcons2.CheckCircle, { size: 14, className: "text-success mt-0.5" }) : /* @__PURE__ */ jsxRuntime.jsx(LucideIcons2.XCircle, { size: 14, className: "text-error mt-0.5" }),
|
|
21233
21233
|
/* @__PURE__ */ jsxRuntime.jsxs(VStack, { gap: "xs", className: "flex-1", children: [
|
|
21234
21234
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
21235
21235
|
Typography,
|
|
21236
21236
|
{
|
|
21237
21237
|
variant: "small",
|
|
21238
|
-
className: test.passed ? "text-
|
|
21238
|
+
className: test.passed ? "text-success" : "text-error",
|
|
21239
21239
|
children: [
|
|
21240
21240
|
"Test ",
|
|
21241
21241
|
index + 1,
|
|
@@ -21244,15 +21244,15 @@ var init_CodeRunnerPanel = __esm({
|
|
|
21244
21244
|
]
|
|
21245
21245
|
}
|
|
21246
21246
|
),
|
|
21247
|
-
/* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "small", className: "text-
|
|
21247
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "small", className: "text-background", children: [
|
|
21248
21248
|
"Input: ",
|
|
21249
21249
|
test.input
|
|
21250
21250
|
] }),
|
|
21251
|
-
/* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "small", className: "text-
|
|
21251
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "small", className: "text-background", children: [
|
|
21252
21252
|
"Expected: ",
|
|
21253
21253
|
test.expectedOutput
|
|
21254
21254
|
] }),
|
|
21255
|
-
/* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "small", className: "text-
|
|
21255
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "small", className: "text-background", children: [
|
|
21256
21256
|
"Actual: ",
|
|
21257
21257
|
test.actualOutput
|
|
21258
21258
|
] })
|
|
@@ -21437,14 +21437,14 @@ var init_ConnectionBlock = __esm({
|
|
|
21437
21437
|
"div",
|
|
21438
21438
|
{
|
|
21439
21439
|
className: cn(
|
|
21440
|
-
"bg-
|
|
21440
|
+
"bg-success/10 border-l-4 border-success rounded-r-lg p-5 mb-6",
|
|
21441
21441
|
className
|
|
21442
21442
|
),
|
|
21443
21443
|
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-3", children: [
|
|
21444
|
-
/* @__PURE__ */ jsxRuntime.jsx(LucideIcons2.Link2, { className: "text-
|
|
21444
|
+
/* @__PURE__ */ jsxRuntime.jsx(LucideIcons2.Link2, { className: "text-success flex-shrink-0 mt-1", size: 20 }),
|
|
21445
21445
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1", children: [
|
|
21446
|
-
/* @__PURE__ */ jsxRuntime.jsx("h4", { className: "font-semibold text-
|
|
21447
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "prose dark:prose-invert prose-sm max-w-none text-
|
|
21446
|
+
/* @__PURE__ */ jsxRuntime.jsx("h4", { className: "font-semibold text-success mb-2", children: "Building On What You Know" }),
|
|
21447
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "prose dark:prose-invert prose-sm max-w-none text-foreground", children: /* @__PURE__ */ jsxRuntime.jsx(MarkdownContent, { content }) })
|
|
21448
21448
|
] })
|
|
21449
21449
|
] })
|
|
21450
21450
|
}
|
|
@@ -21531,7 +21531,7 @@ function CounterStandard({
|
|
|
21531
21531
|
variant: "h1",
|
|
21532
21532
|
className: cn(
|
|
21533
21533
|
sizeStyles8[size].display,
|
|
21534
|
-
"font-bold tabular-nums text-primary
|
|
21534
|
+
"font-bold tabular-nums text-primary"
|
|
21535
21535
|
),
|
|
21536
21536
|
children: resolved.count
|
|
21537
21537
|
}
|
|
@@ -21604,7 +21604,7 @@ function CounterFull({
|
|
|
21604
21604
|
variant: "h1",
|
|
21605
21605
|
className: cn(
|
|
21606
21606
|
sizeStyles8[size].display,
|
|
21607
|
-
"font-bold tabular-nums text-primary
|
|
21607
|
+
"font-bold tabular-nums text-primary"
|
|
21608
21608
|
),
|
|
21609
21609
|
children: resolved.count
|
|
21610
21610
|
}
|
|
@@ -21865,11 +21865,11 @@ var init_DashboardLayout = __esm({
|
|
|
21865
21865
|
className: "h-16 px-4 border-b border-border dark:border-border",
|
|
21866
21866
|
children: [
|
|
21867
21867
|
/* @__PURE__ */ jsxRuntime.jsxs(reactRouterDom.Link, { to: "/", className: "flex items-center gap-2", children: [
|
|
21868
|
-
logo || /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "w-8 h-8 bg-primary
|
|
21868
|
+
logo || /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "w-8 h-8 bg-primary rounded-lg flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
21869
21869
|
Typography,
|
|
21870
21870
|
{
|
|
21871
21871
|
variant: "small",
|
|
21872
|
-
className: "text-
|
|
21872
|
+
className: "text-primary-foreground font-bold text-sm",
|
|
21873
21873
|
as: "span",
|
|
21874
21874
|
children: appName.charAt(0).toUpperCase()
|
|
21875
21875
|
}
|
|
@@ -21948,11 +21948,11 @@ var init_DashboardLayout = __esm({
|
|
|
21948
21948
|
className: "hidden @md/dashboard:flex items-center gap-1 overflow-x-auto",
|
|
21949
21949
|
children: [
|
|
21950
21950
|
/* @__PURE__ */ jsxRuntime.jsxs(reactRouterDom.Link, { to: "/", className: "flex items-center gap-2 mr-3 shrink-0", children: [
|
|
21951
|
-
logo || /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "w-7 h-7 bg-primary
|
|
21951
|
+
logo || /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "w-7 h-7 bg-primary rounded-lg flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
21952
21952
|
Typography,
|
|
21953
21953
|
{
|
|
21954
21954
|
variant: "small",
|
|
21955
|
-
className: "text-
|
|
21955
|
+
className: "text-primary-foreground font-bold text-xs",
|
|
21956
21956
|
as: "span",
|
|
21957
21957
|
children: appName.charAt(0).toUpperCase()
|
|
21958
21958
|
}
|
|
@@ -22012,8 +22012,8 @@ var init_DashboardLayout = __esm({
|
|
|
22012
22012
|
{
|
|
22013
22013
|
as: "span",
|
|
22014
22014
|
className: cn(
|
|
22015
|
-
"absolute -top-0.5 -right-0.5 min-w-[18px] h-[18px] px-1 rounded-full text-xs font-semibold
|
|
22016
|
-
action.variant === "danger" ? "bg-error" : action.variant === "primary" ? "bg-primary" : "bg-foreground"
|
|
22015
|
+
"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",
|
|
22016
|
+
action.variant === "danger" ? "bg-error text-error-foreground" : action.variant === "primary" ? "bg-primary text-primary-foreground" : "bg-foreground text-background"
|
|
22017
22017
|
),
|
|
22018
22018
|
children: action.badge
|
|
22019
22019
|
}
|
|
@@ -22035,7 +22035,7 @@ var init_DashboardLayout = __esm({
|
|
|
22035
22035
|
Box,
|
|
22036
22036
|
{
|
|
22037
22037
|
as: "span",
|
|
22038
|
-
className: "absolute -top-0.5 -right-0.5 min-w-[18px] h-[18px] px-1 bg-error rounded-full text-xs font-semibold text-
|
|
22038
|
+
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",
|
|
22039
22039
|
children: unreadCount > 99 ? "99+" : unreadCount
|
|
22040
22040
|
}
|
|
22041
22041
|
)
|
|
@@ -22318,7 +22318,7 @@ function SubMenu({
|
|
|
22318
22318
|
),
|
|
22319
22319
|
children: [
|
|
22320
22320
|
item.icon && (typeof item.icon === "string" ? /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: item.icon, size: "sm", className: "flex-shrink-0" }) : /* @__PURE__ */ jsxRuntime.jsx(Icon, { icon: item.icon, size: "sm", className: "flex-shrink-0" })),
|
|
22321
|
-
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: cn("flex-1", isDanger && "text-
|
|
22321
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: cn("flex-1", isDanger && "text-error"), children: item.label }),
|
|
22322
22322
|
item.badge !== void 0 && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-auto text-xs font-medium", children: item.badge })
|
|
22323
22323
|
]
|
|
22324
22324
|
},
|
|
@@ -22375,7 +22375,7 @@ function MenuItemRow({
|
|
|
22375
22375
|
Typography,
|
|
22376
22376
|
{
|
|
22377
22377
|
variant: "small",
|
|
22378
|
-
className: cn("flex-1", isDanger && "text-
|
|
22378
|
+
className: cn("flex-1", isDanger && "text-error"),
|
|
22379
22379
|
children: item.label
|
|
22380
22380
|
}
|
|
22381
22381
|
),
|
|
@@ -23143,20 +23143,24 @@ function DataGrid({
|
|
|
23143
23143
|
const bodyFields = fieldDefs.filter((f3) => f3 !== titleField && !badgeFields.includes(f3));
|
|
23144
23144
|
const primaryActions = actionDefs.filter((a) => a.variant !== "danger");
|
|
23145
23145
|
const dangerActions = actionDefs.filter((a) => a.variant === "danger");
|
|
23146
|
-
const
|
|
23147
|
-
e.stopPropagation();
|
|
23148
|
-
const payload = {
|
|
23149
|
-
id: itemData.id,
|
|
23150
|
-
row: itemData
|
|
23151
|
-
};
|
|
23152
|
-
eventBus.emit(`UI:${action.event}`, payload);
|
|
23146
|
+
const fireAction = (action, itemData) => {
|
|
23153
23147
|
if (action.navigatesTo) {
|
|
23154
23148
|
const url = action.navigatesTo.replace(
|
|
23155
23149
|
/\{\{row\.(\w+(?:\.\w+)*)\}\}/g,
|
|
23156
23150
|
(_, field) => String(itemData[field] ?? "")
|
|
23157
23151
|
);
|
|
23158
|
-
eventBus.emit("UI:NAVIGATE", { url });
|
|
23152
|
+
eventBus.emit("UI:NAVIGATE", { url, row: itemData });
|
|
23153
|
+
return;
|
|
23159
23154
|
}
|
|
23155
|
+
const payload = {
|
|
23156
|
+
id: itemData.id,
|
|
23157
|
+
row: itemData
|
|
23158
|
+
};
|
|
23159
|
+
eventBus.emit(`UI:${action.event}`, payload);
|
|
23160
|
+
};
|
|
23161
|
+
const handleActionClick = (action, itemData) => (e) => {
|
|
23162
|
+
e.stopPropagation();
|
|
23163
|
+
fireAction(action, itemData);
|
|
23160
23164
|
};
|
|
23161
23165
|
const hasRenderProp = typeof children === "function";
|
|
23162
23166
|
React84.useEffect(() => {
|
|
@@ -23258,10 +23262,7 @@ function DataGrid({
|
|
|
23258
23262
|
label: action.label,
|
|
23259
23263
|
icon: action.icon,
|
|
23260
23264
|
event: action.event,
|
|
23261
|
-
onClick: () =>
|
|
23262
|
-
id: itemData.id,
|
|
23263
|
-
row: itemData
|
|
23264
|
-
})
|
|
23265
|
+
onClick: () => fireAction(action, itemData)
|
|
23265
23266
|
}))
|
|
23266
23267
|
}
|
|
23267
23268
|
)
|
|
@@ -23403,10 +23404,7 @@ function DataGrid({
|
|
|
23403
23404
|
label: action.label,
|
|
23404
23405
|
icon: action.icon,
|
|
23405
23406
|
event: action.event,
|
|
23406
|
-
onClick: () =>
|
|
23407
|
-
id: itemData.id,
|
|
23408
|
-
row: itemData
|
|
23409
|
-
})
|
|
23407
|
+
onClick: () => fireAction(action, itemData)
|
|
23410
23408
|
}))
|
|
23411
23409
|
}
|
|
23412
23410
|
)
|
|
@@ -25333,8 +25331,8 @@ var init_RelationSelect = __esm({
|
|
|
25333
25331
|
disabled,
|
|
25334
25332
|
className: cn(
|
|
25335
25333
|
"w-full justify-between font-normal",
|
|
25336
|
-
error && "border-
|
|
25337
|
-
isOpen && "ring-2 ring-primary
|
|
25334
|
+
error && "border-error/50 focus:border-error focus:ring-error",
|
|
25335
|
+
isOpen && "ring-2 ring-primary border-primary"
|
|
25338
25336
|
),
|
|
25339
25337
|
children: [
|
|
25340
25338
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -25414,7 +25412,7 @@ var init_RelationSelect = __esm({
|
|
|
25414
25412
|
paddingY: "sm",
|
|
25415
25413
|
className: cn(
|
|
25416
25414
|
"text-left text-sm hover:bg-muted focus:outline-none focus:bg-muted",
|
|
25417
|
-
option.value === value && "bg-primary
|
|
25415
|
+
option.value === value && "bg-primary/10 text-primary",
|
|
25418
25416
|
option.disabled && "opacity-50 cursor-not-allowed"
|
|
25419
25417
|
),
|
|
25420
25418
|
onClick: () => handleSelect(option),
|
|
@@ -25571,7 +25569,7 @@ var init_SidePanel = __esm({
|
|
|
25571
25569
|
showOverlay && /* @__PURE__ */ jsxRuntime.jsx(Presence, { show: isOpen, animation: "overlay", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
25572
25570
|
Box,
|
|
25573
25571
|
{
|
|
25574
|
-
className: "fixed inset-0 bg-
|
|
25572
|
+
className: "fixed inset-0 bg-background/80 backdrop-blur-sm z-40 lg:hidden",
|
|
25575
25573
|
onClick: handleClose
|
|
25576
25574
|
}
|
|
25577
25575
|
) }),
|
|
@@ -25938,7 +25936,7 @@ var init_WizardNavigation = __esm({
|
|
|
25938
25936
|
/* @__PURE__ */ jsxRuntime.jsx(Icon, { name: "chevron-left", size: "sm" }),
|
|
25939
25937
|
resolvedBackLabel
|
|
25940
25938
|
] }) : /* @__PURE__ */ jsxRuntime.jsx(Box, {}),
|
|
25941
|
-
/* @__PURE__ */ jsxRuntime.jsx(HStack, { align: "center", gap: "sm", children: /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "caption", className: "text-
|
|
25939
|
+
/* @__PURE__ */ jsxRuntime.jsx(HStack, { align: "center", gap: "sm", children: /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "caption", className: "text-muted-foreground", children: t("wizard.stepOf", { current: String(currentStep + 1), total: String(totalSteps) }) }) }),
|
|
25942
25940
|
isLastStep && showComplete ? /* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "primary", onClick: handleComplete, disabled: !isValid, children: resolvedCompleteLabel }) : showNext ? /* @__PURE__ */ jsxRuntime.jsxs(Button, { variant: "primary", onClick: handleNext, disabled: !isValid, children: [
|
|
25943
25941
|
resolvedNextLabel,
|
|
25944
25942
|
/* @__PURE__ */ jsxRuntime.jsx(Icon, { name: "chevron-right", size: "sm" })
|
|
@@ -28095,6 +28093,7 @@ var init_Lightbox = __esm({
|
|
|
28095
28093
|
{
|
|
28096
28094
|
className: cn(
|
|
28097
28095
|
"fixed inset-0 z-50 flex items-center justify-center",
|
|
28096
|
+
// eslint-disable-next-line almadar/no-hardcoded-colors -- media overlay: lightbox scrim behind images
|
|
28098
28097
|
"bg-black bg-opacity-90",
|
|
28099
28098
|
className
|
|
28100
28099
|
),
|
|
@@ -28117,7 +28116,7 @@ var init_Lightbox = __esm({
|
|
|
28117
28116
|
"p-2 rounded-full",
|
|
28118
28117
|
"text-[var(--color-foreground)] bg-[var(--color-card)]",
|
|
28119
28118
|
"hover:bg-opacity-70 transition-opacity",
|
|
28120
|
-
"focus:outline-none focus:ring-2 focus:ring-
|
|
28119
|
+
"focus:outline-none focus:ring-2 focus:ring-ring"
|
|
28121
28120
|
),
|
|
28122
28121
|
"aria-label": t("aria.closeModal"),
|
|
28123
28122
|
children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: "x", className: "w-6 h-6" })
|
|
@@ -28136,7 +28135,7 @@ var init_Lightbox = __esm({
|
|
|
28136
28135
|
"p-2 rounded-full",
|
|
28137
28136
|
"text-[var(--color-foreground)] bg-[var(--color-card)]",
|
|
28138
28137
|
"hover:bg-opacity-70 transition-opacity",
|
|
28139
|
-
"focus:outline-none focus:ring-2 focus:ring-
|
|
28138
|
+
"focus:outline-none focus:ring-2 focus:ring-ring"
|
|
28140
28139
|
),
|
|
28141
28140
|
"aria-label": t("aria.previousImage"),
|
|
28142
28141
|
children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: "chevron-left", className: "w-8 h-8" })
|
|
@@ -28173,7 +28172,7 @@ var init_Lightbox = __esm({
|
|
|
28173
28172
|
"p-2 rounded-full",
|
|
28174
28173
|
"text-[var(--color-foreground)] bg-[var(--color-card)]",
|
|
28175
28174
|
"hover:bg-opacity-70 transition-opacity",
|
|
28176
|
-
"focus:outline-none focus:ring-2 focus:ring-
|
|
28175
|
+
"focus:outline-none focus:ring-2 focus:ring-ring"
|
|
28177
28176
|
),
|
|
28178
28177
|
"aria-label": t("aria.nextImage"),
|
|
28179
28178
|
children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: "chevron-right", className: "w-8 h-8" })
|
|
@@ -31246,6 +31245,7 @@ var init_QrScanner = __esm({
|
|
|
31246
31245
|
overflow: "hidden",
|
|
31247
31246
|
rounded: "sm",
|
|
31248
31247
|
className: cn(
|
|
31248
|
+
// eslint-disable-next-line almadar/no-hardcoded-colors -- media overlay: always over a dark scrim
|
|
31249
31249
|
"bg-black",
|
|
31250
31250
|
"aspect-square w-full max-w-md",
|
|
31251
31251
|
className
|
|
@@ -31310,7 +31310,9 @@ var init_QrScanner = __esm({
|
|
|
31310
31310
|
type: "button",
|
|
31311
31311
|
onClick: togglePause,
|
|
31312
31312
|
className: cn(
|
|
31313
|
+
// eslint-disable-next-line almadar/no-hardcoded-colors -- media overlay: always over a dark scrim
|
|
31313
31314
|
"rounded-full bg-black bg-opacity-60 p-2 text-white",
|
|
31315
|
+
// eslint-disable-next-line almadar/no-hardcoded-colors -- media overlay: always over a dark scrim
|
|
31314
31316
|
"hover:bg-opacity-80 focus:outline-none focus:ring-2 focus:ring-white"
|
|
31315
31317
|
),
|
|
31316
31318
|
"aria-label": isPaused ? t("qrScanner.resumeScanning") : t("qrScanner.pauseScanning"),
|
|
@@ -31323,7 +31325,9 @@ var init_QrScanner = __esm({
|
|
|
31323
31325
|
type: "button",
|
|
31324
31326
|
onClick: toggleFacing,
|
|
31325
31327
|
className: cn(
|
|
31328
|
+
// eslint-disable-next-line almadar/no-hardcoded-colors -- media overlay: always over a dark scrim
|
|
31326
31329
|
"rounded-full bg-black bg-opacity-60 p-2 text-white",
|
|
31330
|
+
// eslint-disable-next-line almadar/no-hardcoded-colors -- media overlay: always over a dark scrim
|
|
31327
31331
|
"hover:bg-opacity-80 focus:outline-none focus:ring-2 focus:ring-white"
|
|
31328
31332
|
),
|
|
31329
31333
|
"aria-label": currentFacing === "environment" ? t("qrScanner.switchToFrontCamera") : t("qrScanner.switchToRearCamera"),
|
|
@@ -31336,7 +31340,9 @@ var init_QrScanner = __esm({
|
|
|
31336
31340
|
type: "button",
|
|
31337
31341
|
onClick: handleMockScan,
|
|
31338
31342
|
className: cn(
|
|
31343
|
+
// eslint-disable-next-line almadar/no-hardcoded-colors -- media overlay: always over a dark scrim
|
|
31339
31344
|
"rounded-full bg-black bg-opacity-60 px-3 py-2 text-xs text-white",
|
|
31345
|
+
// eslint-disable-next-line almadar/no-hardcoded-colors -- media overlay: always over a dark scrim
|
|
31340
31346
|
"hover:bg-opacity-80 focus:outline-none focus:ring-2 focus:ring-white"
|
|
31341
31347
|
),
|
|
31342
31348
|
"aria-label": t("aria.mockScanDev"),
|
|
@@ -34072,10 +34078,10 @@ var init_ModuleCard = __esm({
|
|
|
34072
34078
|
init_avl_atom_types();
|
|
34073
34079
|
init_MiniStateMachine();
|
|
34074
34080
|
PERSISTENCE_BORDER = {
|
|
34075
|
-
persistent: "border-l-[3px] border-l-
|
|
34076
|
-
runtime: "border-l-[3px] border-l-
|
|
34077
|
-
singleton: "border-l-[3px] border-l-
|
|
34078
|
-
instance: "border-l-[3px] border-l-
|
|
34081
|
+
persistent: "border-l-[3px] border-l-primary border-solid",
|
|
34082
|
+
runtime: "border-l-[3px] border-l-primary border-dashed",
|
|
34083
|
+
singleton: "border-l-[3px] border-l-primary border-double",
|
|
34084
|
+
instance: "border-l-[3px] border-l-primary border-dotted"
|
|
34079
34085
|
};
|
|
34080
34086
|
PERSISTENCE_ICON = {
|
|
34081
34087
|
persistent: "\u26C1",
|
|
@@ -34105,8 +34111,8 @@ var init_ModuleCard = __esm({
|
|
|
34105
34111
|
className: "rounded-lg border border-[var(--color-border)] bg-[var(--color-card)] shadow-sm overflow-hidden",
|
|
34106
34112
|
style: { minWidth: 280, maxWidth: 400 },
|
|
34107
34113
|
children: [
|
|
34108
|
-
/* @__PURE__ */ jsxRuntime.jsx(react.Handle, { type: "target", position: react.Position.Left, className: "!w-2.5 !h-2.5 !bg-
|
|
34109
|
-
/* @__PURE__ */ jsxRuntime.jsx(react.Handle, { type: "source", position: react.Position.Right, className: "!w-2.5 !h-2.5 !bg-
|
|
34114
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.Handle, { type: "target", position: react.Position.Left, className: "!w-2.5 !h-2.5 !bg-warning" }),
|
|
34115
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.Handle, { type: "source", position: react.Position.Right, className: "!w-2.5 !h-2.5 !bg-warning" }),
|
|
34110
34116
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-3 py-2 border-b border-[var(--color-border)]", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-base font-bold text-[var(--color-foreground)]", children: orbitalName }) }),
|
|
34111
34117
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: `px-3 py-2 border-b border-[var(--color-border)] ${PERSISTENCE_BORDER[persistence] ?? ""}`, children: [
|
|
34112
34118
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1.5 mb-1.5", children: [
|
|
@@ -36562,19 +36568,19 @@ var init_ReflectionBlock = __esm({
|
|
|
36562
36568
|
"div",
|
|
36563
36569
|
{
|
|
36564
36570
|
className: cn(
|
|
36565
|
-
"my-6 border-l-4 border-
|
|
36571
|
+
"my-6 border-l-4 border-warning bg-warning/10 rounded-r-lg p-4",
|
|
36566
36572
|
className
|
|
36567
36573
|
),
|
|
36568
36574
|
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-3", children: [
|
|
36569
|
-
/* @__PURE__ */ jsxRuntime.jsx(LucideIcons2.PauseCircle, { className: "text-
|
|
36575
|
+
/* @__PURE__ */ jsxRuntime.jsx(LucideIcons2.PauseCircle, { className: "text-warning flex-shrink-0 mt-1", size: 20 }),
|
|
36570
36576
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1", children: [
|
|
36571
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "font-medium text-
|
|
36572
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-
|
|
36577
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "font-medium text-warning mb-2", children: "Pause & Reflect" }),
|
|
36578
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-foreground text-sm mb-3", children: prompt }),
|
|
36573
36579
|
isExpanded ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
36574
36580
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
36575
36581
|
"textarea",
|
|
36576
36582
|
{
|
|
36577
|
-
className: "w-full p-2 border border-
|
|
36583
|
+
className: "w-full p-2 border border-input rounded text-sm bg-card text-foreground focus:ring-2 focus:ring-ring focus:border-transparent",
|
|
36578
36584
|
placeholder: "Your thoughts...",
|
|
36579
36585
|
value: note,
|
|
36580
36586
|
onChange: (e) => setNote(e.target.value),
|
|
@@ -36585,7 +36591,7 @@ var init_ReflectionBlock = __esm({
|
|
|
36585
36591
|
"button",
|
|
36586
36592
|
{
|
|
36587
36593
|
onClick: handleSave,
|
|
36588
|
-
className: "mt-2 text-sm px-3 py-1 bg-
|
|
36594
|
+
className: "mt-2 text-sm px-3 py-1 bg-warning text-warning-foreground rounded hover:opacity-90 transition-colors",
|
|
36589
36595
|
children: "Save & Continue"
|
|
36590
36596
|
}
|
|
36591
36597
|
)
|
|
@@ -36593,7 +36599,7 @@ var init_ReflectionBlock = __esm({
|
|
|
36593
36599
|
"button",
|
|
36594
36600
|
{
|
|
36595
36601
|
onClick: () => setIsExpanded(true),
|
|
36596
|
-
className: "text-sm text-
|
|
36602
|
+
className: "text-sm text-warning hover:underline",
|
|
36597
36603
|
children: savedNote ? "\u2713 Answered \xB7 Edit" : "Answer this question"
|
|
36598
36604
|
}
|
|
36599
36605
|
)
|
|
@@ -36879,7 +36885,7 @@ function DataTable({
|
|
|
36879
36885
|
)),
|
|
36880
36886
|
rowActions && /* @__PURE__ */ jsxRuntime.jsx("th", { className: "w-12 px-4 py-3" })
|
|
36881
36887
|
] }) }),
|
|
36882
|
-
/* @__PURE__ */ jsxRuntime.jsx("tbody", { className: "divide-y divide-
|
|
36888
|
+
/* @__PURE__ */ jsxRuntime.jsx("tbody", { className: "divide-y divide-border", children: isLoading ? /* @__PURE__ */ jsxRuntime.jsx("tr", { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
36883
36889
|
"td",
|
|
36884
36890
|
{
|
|
36885
36891
|
colSpan: normalizedColumns.length + (selectable ? 1 : 0) + (rowActions ? 1 : 0),
|
|
@@ -37250,7 +37256,7 @@ var init_DetailPanel = __esm({
|
|
|
37250
37256
|
};
|
|
37251
37257
|
const effectiveFieldNames = isFieldDefArray(propFields) ? normalizeFieldDefs(propFields) : fieldNames;
|
|
37252
37258
|
const fieldTypeMap = isFieldDefArray(propFields) ? buildFieldTypeMap(propFields) : {};
|
|
37253
|
-
React84.useCallback(
|
|
37259
|
+
const handleActionClick = React84.useCallback(
|
|
37254
37260
|
(action, data2) => {
|
|
37255
37261
|
if (action.navigatesTo) {
|
|
37256
37262
|
const url = action.navigatesTo.replace(
|
|
@@ -37442,8 +37448,9 @@ var init_DetailPanel = __esm({
|
|
|
37442
37448
|
{
|
|
37443
37449
|
variant: action.variant || "secondary",
|
|
37444
37450
|
size: "sm",
|
|
37445
|
-
action: action.event,
|
|
37451
|
+
action: action.navigatesTo ? void 0 : action.event,
|
|
37446
37452
|
actionPayload: { row: normalizedData },
|
|
37453
|
+
onClick: action.navigatesTo ? () => handleActionClick(action, normalizedData) : void 0,
|
|
37447
37454
|
icon: action.icon,
|
|
37448
37455
|
"data-testid": action.event ? `action-${action.event}` : void 0,
|
|
37449
37456
|
"data-row-id": normalizedData?.id !== void 0 ? String(normalizedData.id) : void 0,
|
|
@@ -39486,8 +39493,9 @@ var init_MediaGallery = __esm({
|
|
|
39486
39493
|
)
|
|
39487
39494
|
}
|
|
39488
39495
|
),
|
|
39489
|
-
item.caption &&
|
|
39490
|
-
|
|
39496
|
+
item.caption && // eslint-disable-next-line almadar/no-hardcoded-colors -- media overlay: caption scrim over image
|
|
39497
|
+
/* @__PURE__ */ jsxRuntime.jsx(Box, { className: "absolute bottom-0 left-0 right-0 p-2 bg-gradient-to-t from-black/60 to-transparent", children: /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "caption", className: "text-white truncate", children: item.caption }) }),
|
|
39498
|
+
selectable && isSelected && /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "absolute top-2 right-2 w-5 h-5 rounded-full bg-primary flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "caption", className: "text-primary-foreground text-xs", children: "\u2713" }) })
|
|
39491
39499
|
]
|
|
39492
39500
|
},
|
|
39493
39501
|
item.id
|
|
@@ -39516,7 +39524,7 @@ var init_MediaGallery = __esm({
|
|
|
39516
39524
|
size: "sm",
|
|
39517
39525
|
icon: LucideIcons2.X,
|
|
39518
39526
|
action: "LIGHTBOX_CLOSE",
|
|
39519
|
-
className: "text-
|
|
39527
|
+
className: "text-foreground hover:bg-muted/50"
|
|
39520
39528
|
}
|
|
39521
39529
|
) }),
|
|
39522
39530
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -39527,7 +39535,7 @@ var init_MediaGallery = __esm({
|
|
|
39527
39535
|
className: "max-w-full max-h-[80vh] object-contain rounded-md"
|
|
39528
39536
|
}
|
|
39529
39537
|
),
|
|
39530
|
-
lightboxItem.caption && /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body", className: "text-
|
|
39538
|
+
lightboxItem.caption && /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body", className: "text-foreground mt-3 text-center", children: lightboxItem.caption })
|
|
39531
39539
|
]
|
|
39532
39540
|
}
|
|
39533
39541
|
)
|
|
@@ -39969,7 +39977,7 @@ function WalkMinimap() {
|
|
|
39969
39977
|
{
|
|
39970
39978
|
variant,
|
|
39971
39979
|
size: "sm",
|
|
39972
|
-
className: `flex-shrink-0 text-[9px] ${isActive ? "ring-1 ring-
|
|
39980
|
+
className: `flex-shrink-0 text-[9px] ${isActive ? "ring-1 ring-info" : ""}`,
|
|
39973
39981
|
children: [
|
|
39974
39982
|
isDone ? "\u2713" : isActive ? "\u25CF" : "\u25CB",
|
|
39975
39983
|
" ",
|
|
@@ -40110,13 +40118,13 @@ function WalkMinimap() {
|
|
|
40110
40118
|
})
|
|
40111
40119
|
] }) }),
|
|
40112
40120
|
/* @__PURE__ */ jsxRuntime.jsx(Box, { className: "px-2 py-1 border-t border-border", children: /* @__PURE__ */ jsxRuntime.jsxs(HStack, { gap: "sm", className: "items-center justify-between", children: [
|
|
40113
|
-
/* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "caption", className: "text-xs font-mono text-
|
|
40121
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "caption", className: "text-xs font-mono text-success", children: [
|
|
40114
40122
|
"Engine: ",
|
|
40115
40123
|
engineCount,
|
|
40116
40124
|
"/",
|
|
40117
40125
|
totalTransitions
|
|
40118
40126
|
] }),
|
|
40119
|
-
domCount > 0 && /* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "caption", className: "text-xs font-mono text-
|
|
40127
|
+
domCount > 0 && /* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "caption", className: "text-xs font-mono text-info", children: [
|
|
40120
40128
|
"DOM: ",
|
|
40121
40129
|
domCount
|
|
40122
40130
|
] }),
|
|
@@ -40149,13 +40157,13 @@ function TraitsTab({ traits: traits2 }) {
|
|
|
40149
40157
|
const accordionItems = traits2.map((trait) => ({
|
|
40150
40158
|
id: trait.id,
|
|
40151
40159
|
header: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 w-full", children: [
|
|
40152
|
-
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body", weight: "semibold", className: "text-
|
|
40160
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body", weight: "semibold", className: "text-primary", children: trait.name }),
|
|
40153
40161
|
/* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: "success", size: "sm", children: trait.currentState }),
|
|
40154
|
-
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-
|
|
40162
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-muted-foreground ml-auto", children: t("debug.transitionsCount", { count: trait.transitionCount }) })
|
|
40155
40163
|
] }),
|
|
40156
40164
|
content: /* @__PURE__ */ jsxRuntime.jsxs(Stack, { gap: "sm", children: [
|
|
40157
40165
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
40158
|
-
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-
|
|
40166
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground mb-2", children: t("debug.states") }),
|
|
40159
40167
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-wrap gap-1", children: trait.states.map((state) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
40160
40168
|
Badge,
|
|
40161
40169
|
{
|
|
@@ -40167,18 +40175,18 @@ function TraitsTab({ traits: traits2 }) {
|
|
|
40167
40175
|
)) })
|
|
40168
40176
|
] }),
|
|
40169
40177
|
trait.transitions.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
40170
|
-
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-
|
|
40178
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground mb-2", children: t("debug.transitions") }),
|
|
40171
40179
|
/* @__PURE__ */ jsxRuntime.jsx(Stack, { gap: "xs", children: trait.transitions.map((t2, i) => /* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "small", className: "font-mono", children: [
|
|
40172
40180
|
t2.from,
|
|
40173
40181
|
" \u2192 ",
|
|
40174
40182
|
t2.to,
|
|
40175
40183
|
" ",
|
|
40176
|
-
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-
|
|
40184
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-muted-foreground", children: [
|
|
40177
40185
|
"(",
|
|
40178
40186
|
t2.event,
|
|
40179
40187
|
")"
|
|
40180
40188
|
] }),
|
|
40181
|
-
t2.guard && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-
|
|
40189
|
+
t2.guard && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-warning", children: [
|
|
40182
40190
|
" [",
|
|
40183
40191
|
t2.guard,
|
|
40184
40192
|
"]"
|
|
@@ -40186,7 +40194,7 @@ function TraitsTab({ traits: traits2 }) {
|
|
|
40186
40194
|
] }, i)) })
|
|
40187
40195
|
] }),
|
|
40188
40196
|
trait.guards.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
40189
|
-
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-
|
|
40197
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground mb-2", children: t("debug.guards") }),
|
|
40190
40198
|
/* @__PURE__ */ jsxRuntime.jsx(Stack, { gap: "xs", children: trait.guards.map((g, i) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
40191
40199
|
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", children: g.name }),
|
|
40192
40200
|
/* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: g.lastResult === true ? "success" : g.lastResult === false ? "danger" : "default", size: "sm", children: g.lastResult === void 0 ? "?" : g.lastResult ? "\u2713" : "\u2717" })
|
|
@@ -40229,11 +40237,11 @@ function TicksTab({ ticks: ticks2 }) {
|
|
|
40229
40237
|
};
|
|
40230
40238
|
const TickCard = ({ tick, active }) => /* @__PURE__ */ jsxRuntime.jsxs(Card, { className: `p-3 ${!active ? "opacity-50" : ""}`, children: [
|
|
40231
40239
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 mb-2", children: [
|
|
40232
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: `w-2 h-2 rounded-full ${active ? "bg-
|
|
40233
|
-
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body", weight: "semibold", className: "text-
|
|
40234
|
-
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-
|
|
40240
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: `w-2 h-2 rounded-full ${active ? "bg-success" : "bg-muted-foreground"}` }),
|
|
40241
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body", weight: "semibold", className: "text-warning", children: tick.name }),
|
|
40242
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-muted-foreground", children: tick.traitName })
|
|
40235
40243
|
] }),
|
|
40236
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-3 text-xs text-
|
|
40244
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-3 text-xs text-muted-foreground", children: [
|
|
40237
40245
|
/* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
|
|
40238
40246
|
tick.interval,
|
|
40239
40247
|
"ms"
|
|
@@ -40256,7 +40264,7 @@ function TicksTab({ ticks: ticks2 }) {
|
|
|
40256
40264
|
] });
|
|
40257
40265
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "debug-tab debug-tab--ticks", children: [
|
|
40258
40266
|
activeTicks.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-4", children: [
|
|
40259
|
-
/* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "small", weight: "medium", className: "text-
|
|
40267
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground mb-2", children: [
|
|
40260
40268
|
"Active (",
|
|
40261
40269
|
activeTicks.length,
|
|
40262
40270
|
")"
|
|
@@ -40264,7 +40272,7 @@ function TicksTab({ ticks: ticks2 }) {
|
|
|
40264
40272
|
/* @__PURE__ */ jsxRuntime.jsx(Stack, { gap: "sm", children: activeTicks.map((tick) => /* @__PURE__ */ jsxRuntime.jsx(TickCard, { tick, active: true }, tick.id)) })
|
|
40265
40273
|
] }),
|
|
40266
40274
|
inactiveTicks.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
40267
|
-
/* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "small", weight: "medium", className: "text-
|
|
40275
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground mb-2", children: [
|
|
40268
40276
|
"Inactive (",
|
|
40269
40277
|
inactiveTicks.length,
|
|
40270
40278
|
")"
|
|
@@ -40312,33 +40320,33 @@ function EntitiesTab({ snapshot }) {
|
|
|
40312
40320
|
id: `singleton-${name}`,
|
|
40313
40321
|
header: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
40314
40322
|
/* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: "primary", size: "sm", children: t("debug.singleton") }),
|
|
40315
|
-
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body", weight: "semibold", className: "text-
|
|
40323
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body", weight: "semibold", className: "text-info", children: name })
|
|
40316
40324
|
] }),
|
|
40317
|
-
content: /* @__PURE__ */ jsxRuntime.jsx("pre", { className: "text-xs text-
|
|
40325
|
+
content: /* @__PURE__ */ jsxRuntime.jsx("pre", { className: "text-xs text-muted-foreground bg-muted p-2 rounded overflow-auto max-h-40", children: JSON.stringify(data, null, 2) })
|
|
40318
40326
|
}));
|
|
40319
40327
|
const runtimeItems = runtimeEntities.slice(0, 20).map((entity) => ({
|
|
40320
40328
|
id: entity.id,
|
|
40321
40329
|
header: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
40322
|
-
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body", weight: "semibold", className: "text-
|
|
40323
|
-
/* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "small", className: "text-
|
|
40330
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body", weight: "semibold", className: "text-info", children: entity.type }),
|
|
40331
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "small", className: "text-muted-foreground", children: [
|
|
40324
40332
|
"#",
|
|
40325
40333
|
entity.id.slice(0, 8)
|
|
40326
40334
|
] })
|
|
40327
40335
|
] }),
|
|
40328
|
-
content: /* @__PURE__ */ jsxRuntime.jsx("pre", { className: "text-xs text-
|
|
40336
|
+
content: /* @__PURE__ */ jsxRuntime.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) })
|
|
40329
40337
|
}));
|
|
40330
40338
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "debug-tab debug-tab--entities", children: [
|
|
40331
40339
|
singletonItems.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-4", children: [
|
|
40332
|
-
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-
|
|
40340
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground mb-2", children: t("debug.singletonsCount", { count: singletonItems.length }) }),
|
|
40333
40341
|
/* @__PURE__ */ jsxRuntime.jsx(Accordion, { items: singletonItems, multiple: true })
|
|
40334
40342
|
] }),
|
|
40335
40343
|
runtimeItems.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-4", children: [
|
|
40336
|
-
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-
|
|
40344
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground mb-2", children: t("debug.runtimeCount", { count: runtimeEntities.length }) }),
|
|
40337
40345
|
/* @__PURE__ */ jsxRuntime.jsx(Accordion, { items: runtimeItems, multiple: true }),
|
|
40338
|
-
runtimeEntities.length > 20 && /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-
|
|
40346
|
+
runtimeEntities.length > 20 && /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-muted-foreground text-center mt-2", children: t("debug.moreEntities", { count: runtimeEntities.length - 20 }) })
|
|
40339
40347
|
] }),
|
|
40340
40348
|
persistentEntries.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
40341
|
-
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-
|
|
40349
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground mb-2", children: t("debug.persistent") }),
|
|
40342
40350
|
/* @__PURE__ */ jsxRuntime.jsx(Stack, { gap: "xs", children: persistentEntries.map(([type, info]) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between py-1", children: [
|
|
40343
40351
|
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", children: type }),
|
|
40344
40352
|
/* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: info.loaded ? "success" : "default", size: "sm", children: info.loaded ? t("debug.loadedCount", { count: info.count }) : t("debug.notLoaded") })
|
|
@@ -40423,7 +40431,7 @@ function EventFlowTab({ events: events2 }) {
|
|
|
40423
40431
|
);
|
|
40424
40432
|
})
|
|
40425
40433
|
] }),
|
|
40426
|
-
/* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex items-center gap-1 text-xs text-
|
|
40434
|
+
/* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex items-center gap-1 text-xs text-muted-foreground ml-auto cursor-pointer", children: [
|
|
40427
40435
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
40428
40436
|
Checkbox,
|
|
40429
40437
|
{
|
|
@@ -40438,18 +40446,18 @@ function EventFlowTab({ events: events2 }) {
|
|
|
40438
40446
|
"div",
|
|
40439
40447
|
{
|
|
40440
40448
|
ref: containerRef,
|
|
40441
|
-
className: "max-h-64 overflow-y-auto space-y-1 bg-
|
|
40449
|
+
className: "max-h-64 overflow-y-auto space-y-1 bg-muted rounded p-2",
|
|
40442
40450
|
children: filteredEvents.slice(-100).map((event) => {
|
|
40443
40451
|
const { variant, icon } = TYPE_BADGES[event.type] || { variant: "default", icon: "\u2022" };
|
|
40444
40452
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
40445
40453
|
"div",
|
|
40446
40454
|
{
|
|
40447
|
-
className: "flex items-start gap-2 text-xs py-1 hover:bg-
|
|
40455
|
+
className: "flex items-start gap-2 text-xs py-1 hover:bg-muted/50 rounded px-1",
|
|
40448
40456
|
children: [
|
|
40449
|
-
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-
|
|
40457
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-muted-foreground font-mono min-w-[65px]", children: formatTime2(event.timestamp) }),
|
|
40450
40458
|
/* @__PURE__ */ jsxRuntime.jsx("span", { children: icon }),
|
|
40451
40459
|
/* @__PURE__ */ jsxRuntime.jsx(Badge, { variant, size: "sm", className: "min-w-[60px] justify-center", children: event.source }),
|
|
40452
|
-
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-
|
|
40460
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-muted-foreground", children: event.message })
|
|
40453
40461
|
]
|
|
40454
40462
|
},
|
|
40455
40463
|
event.id
|
|
@@ -40513,21 +40521,21 @@ function GuardsPanel({ guards }) {
|
|
|
40513
40521
|
id: guard.id,
|
|
40514
40522
|
header: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 w-full", children: [
|
|
40515
40523
|
/* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: guard.result ? "success" : "danger", size: "sm", children: guard.result ? "\u2713" : "\u2717" }),
|
|
40516
|
-
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body", weight: "semibold", className: "text-
|
|
40517
|
-
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-
|
|
40518
|
-
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-
|
|
40524
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body", weight: "semibold", className: "text-warning", children: guard.guardName }),
|
|
40525
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-muted-foreground", children: guard.context.type === "transition" ? `${guard.context.transitionFrom} \u2192 ${guard.context.transitionTo}` : guard.context.tickName }),
|
|
40526
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-muted-foreground ml-auto", children: formatTime2(guard.timestamp) })
|
|
40519
40527
|
] }),
|
|
40520
40528
|
content: /* @__PURE__ */ jsxRuntime.jsxs(Stack, { gap: "sm", children: [
|
|
40521
40529
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
40522
|
-
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-
|
|
40523
|
-
/* @__PURE__ */ jsxRuntime.jsx("code", { className: "block mt-1 text-xs text-
|
|
40530
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground", children: t("debug.expression") }),
|
|
40531
|
+
/* @__PURE__ */ jsxRuntime.jsx("code", { className: "block mt-1 text-xs text-warning bg-warning/10 px-2 py-1 rounded", children: guard.expression })
|
|
40524
40532
|
] }),
|
|
40525
40533
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
40526
|
-
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-
|
|
40527
|
-
/* @__PURE__ */ jsxRuntime.jsx("pre", { className: "mt-1 text-xs text-
|
|
40534
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground", children: t("debug.inputs") }),
|
|
40535
|
+
/* @__PURE__ */ jsxRuntime.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) })
|
|
40528
40536
|
] }),
|
|
40529
40537
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
40530
|
-
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-
|
|
40538
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground", children: t("debug.trait") }),
|
|
40531
40539
|
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", children: guard.context.traitName })
|
|
40532
40540
|
] })
|
|
40533
40541
|
] })
|
|
@@ -40583,7 +40591,7 @@ function VerificationTab({ checks, summary }) {
|
|
|
40583
40591
|
(a, b) => (sortOrder[a.status] ?? 4) - (sortOrder[b.status] ?? 4)
|
|
40584
40592
|
);
|
|
40585
40593
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "debug-tab debug-tab--verification", children: [
|
|
40586
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3 mb-3 p-2 bg-
|
|
40594
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3 mb-3 p-2 bg-muted rounded", children: [
|
|
40587
40595
|
/* @__PURE__ */ jsxRuntime.jsxs(Badge, { variant: "success", size: "sm", children: [
|
|
40588
40596
|
summary.passed,
|
|
40589
40597
|
" passed"
|
|
@@ -40600,7 +40608,7 @@ function VerificationTab({ checks, summary }) {
|
|
|
40600
40608
|
summary.pending,
|
|
40601
40609
|
" pending"
|
|
40602
40610
|
] }),
|
|
40603
|
-
/* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "small", className: "text-
|
|
40611
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "small", className: "text-muted-foreground ml-auto", children: [
|
|
40604
40612
|
summary.totalChecks,
|
|
40605
40613
|
" total checks"
|
|
40606
40614
|
] })
|
|
@@ -40610,12 +40618,12 @@ function VerificationTab({ checks, summary }) {
|
|
|
40610
40618
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
40611
40619
|
"div",
|
|
40612
40620
|
{
|
|
40613
|
-
className: "flex items-start gap-2 p-2 rounded hover:bg-
|
|
40621
|
+
className: "flex items-start gap-2 p-2 rounded hover:bg-muted/50",
|
|
40614
40622
|
children: [
|
|
40615
40623
|
/* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: config.variant, size: "sm", className: "min-w-[20px] justify-center mt-0.5", children: config.icon }),
|
|
40616
40624
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 min-w-0", children: [
|
|
40617
40625
|
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "break-words", children: check.label }),
|
|
40618
|
-
check.details && /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-
|
|
40626
|
+
check.details && /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-muted-foreground break-words", children: check.details })
|
|
40619
40627
|
] }),
|
|
40620
40628
|
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-muted-foreground font-mono text-xs shrink-0", children: new Date(check.updatedAt).toLocaleTimeString("en-US", {
|
|
40621
40629
|
hour12: false,
|
|
@@ -40650,10 +40658,10 @@ var init_VerificationTab = __esm({
|
|
|
40650
40658
|
function EffectBadge({ effect }) {
|
|
40651
40659
|
const variant = EFFECT_STATUS_VARIANT[effect.status] || "default";
|
|
40652
40660
|
const icon = effect.status === "executed" ? "\u2713" : effect.status === "failed" ? "\u2717" : "-";
|
|
40653
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "inline-flex items-center gap-1 text-xs font-mono bg-
|
|
40661
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "inline-flex items-center gap-1 text-xs font-mono bg-muted rounded px-1.5 py-0.5", children: [
|
|
40654
40662
|
/* @__PURE__ */ jsxRuntime.jsx(Badge, { variant, size: "sm", className: "!text-[9px] !px-1 !py-0", children: icon }),
|
|
40655
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-
|
|
40656
|
-
effect.error && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-
|
|
40663
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: effect.type }),
|
|
40664
|
+
effect.error && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-error truncate max-w-[120px]", title: effect.error, children: effect.error })
|
|
40657
40665
|
] });
|
|
40658
40666
|
}
|
|
40659
40667
|
function TransitionTimeline({ transitions }) {
|
|
@@ -40688,8 +40696,8 @@ function TransitionTimeline({ transitions }) {
|
|
|
40688
40696
|
const sorted = [...transitions].reverse();
|
|
40689
40697
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "debug-tab debug-tab--timeline", children: [
|
|
40690
40698
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between mb-2", children: [
|
|
40691
|
-
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-
|
|
40692
|
-
/* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex items-center gap-1 text-xs text-
|
|
40699
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-muted-foreground", children: t("debug.transitionsRecorded", { count: transitions.length }) }),
|
|
40700
|
+
/* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex items-center gap-1 text-xs text-muted-foreground cursor-pointer", children: [
|
|
40693
40701
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
40694
40702
|
Checkbox,
|
|
40695
40703
|
{
|
|
@@ -40714,22 +40722,22 @@ function TransitionTimeline({ transitions }) {
|
|
|
40714
40722
|
{
|
|
40715
40723
|
className: `
|
|
40716
40724
|
relative pl-6 pb-3 border-l-2 cursor-pointer
|
|
40717
|
-
hover:bg-
|
|
40718
|
-
${hasFailedEffects ? "border-
|
|
40725
|
+
hover:bg-muted/50 rounded-r
|
|
40726
|
+
${hasFailedEffects ? "border-error" : "border-border"}
|
|
40719
40727
|
`,
|
|
40720
40728
|
onClick: () => setExpandedId(isExpanded ? null : trace.id),
|
|
40721
40729
|
children: [
|
|
40722
40730
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: `
|
|
40723
40731
|
absolute left-[-5px] top-1 w-2 h-2 rounded-full
|
|
40724
|
-
${hasFailedEffects ? "bg-
|
|
40732
|
+
${hasFailedEffects ? "bg-error" : allPassed ? "bg-success" : "bg-muted-foreground"}
|
|
40725
40733
|
` }),
|
|
40726
40734
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 text-xs py-1 px-2", children: [
|
|
40727
|
-
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-
|
|
40735
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-muted-foreground font-mono min-w-[65px]", children: formatTime2(trace.timestamp) }),
|
|
40728
40736
|
/* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: "primary", size: "sm", className: "min-w-[60px] justify-center", children: trace.traitName }),
|
|
40729
|
-
/* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "small", className: "font-mono text-
|
|
40737
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "small", className: "font-mono text-muted-foreground", children: [
|
|
40730
40738
|
trace.from,
|
|
40731
40739
|
" ",
|
|
40732
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-
|
|
40740
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground/50", children: "\u2192" }),
|
|
40733
40741
|
" ",
|
|
40734
40742
|
trace.to
|
|
40735
40743
|
] }),
|
|
@@ -40746,9 +40754,9 @@ function TransitionTimeline({ transitions }) {
|
|
|
40746
40754
|
]
|
|
40747
40755
|
}
|
|
40748
40756
|
),
|
|
40749
|
-
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-
|
|
40757
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-muted-foreground ml-auto", children: t("debug.effectsCount", { count: trace.effects.length }) })
|
|
40750
40758
|
] }),
|
|
40751
|
-
isExpanded && trace.effects.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "ml-2 mt-1 mb-2 pl-2 border-l border-
|
|
40759
|
+
isExpanded && trace.effects.length > 0 && /* @__PURE__ */ jsxRuntime.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__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1", children: [
|
|
40752
40760
|
/* @__PURE__ */ jsxRuntime.jsx(EffectBadge, { effect }),
|
|
40753
40761
|
effect.args.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-muted-foreground font-mono text-xs truncate max-w-[200px]", children: JSON.stringify(effect.args) }),
|
|
40754
40762
|
effect.durationMs !== void 0 && /* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "small", className: "text-muted-foreground text-xs", children: [
|
|
@@ -40782,8 +40790,8 @@ var init_TransitionTimeline = __esm({
|
|
|
40782
40790
|
}
|
|
40783
40791
|
});
|
|
40784
40792
|
function StatRow({ label, value, variant }) {
|
|
40785
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between py-1.5 border-b border-
|
|
40786
|
-
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-
|
|
40793
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between py-1.5 border-b border-border last:border-b-0", children: [
|
|
40794
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-muted-foreground", children: label }),
|
|
40787
40795
|
variant ? /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant, size: "sm", children: String(value) }) : /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "semibold", className: "font-mono", children: String(value) })
|
|
40788
40796
|
] });
|
|
40789
40797
|
}
|
|
@@ -40812,7 +40820,7 @@ function ServerBridgeTab({ bridge }) {
|
|
|
40812
40820
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "debug-tab debug-tab--bridge", children: /* @__PURE__ */ jsxRuntime.jsxs(Stack, { gap: "sm", children: [
|
|
40813
40821
|
/* @__PURE__ */ jsxRuntime.jsxs(Card, { className: "p-3", children: [
|
|
40814
40822
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3 mb-3", children: [
|
|
40815
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: `w-3 h-3 rounded-full ${bridge.connected ? "bg-
|
|
40823
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: `w-3 h-3 rounded-full ${bridge.connected ? "bg-success animate-pulse" : "bg-error"}` }),
|
|
40816
40824
|
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "h6", children: bridge.connected ? t("debug.connected") : t("debug.disconnected") })
|
|
40817
40825
|
] }),
|
|
40818
40826
|
/* @__PURE__ */ jsxRuntime.jsxs(Stack, { gap: "xs", children: [
|
|
@@ -40847,11 +40855,11 @@ function ServerBridgeTab({ bridge }) {
|
|
|
40847
40855
|
)
|
|
40848
40856
|
] })
|
|
40849
40857
|
] }),
|
|
40850
|
-
bridge.lastError && /* @__PURE__ */ jsxRuntime.jsxs(Card, { className: "p-3 border-
|
|
40851
|
-
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "semibold", className: "text-
|
|
40852
|
-
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-
|
|
40858
|
+
bridge.lastError && /* @__PURE__ */ jsxRuntime.jsxs(Card, { className: "p-3 border-error/30 bg-error/10", children: [
|
|
40859
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "semibold", className: "text-error mb-1", children: t("debug.lastError") }),
|
|
40860
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-error font-mono break-all", children: bridge.lastError })
|
|
40853
40861
|
] }),
|
|
40854
|
-
bridge.connected && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-center py-2", children: /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-
|
|
40862
|
+
bridge.connected && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-center py-2", children: /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-muted-foreground", children: t("debug.totalEventsProcessed", { count: bridge.eventsForwarded + bridge.eventsReceived }) }) })
|
|
40855
40863
|
] }) });
|
|
40856
40864
|
}
|
|
40857
40865
|
var init_ServerBridgeTab = __esm({
|
|
@@ -40977,7 +40985,7 @@ function EventDispatcherTab({ traits: traits2, schema }) {
|
|
|
40977
40985
|
};
|
|
40978
40986
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "debug-tab debug-tab--dispatch", children: [
|
|
40979
40987
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-3", children: [
|
|
40980
|
-
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-
|
|
40988
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground mb-1", children: t("debug.activeStates") }),
|
|
40981
40989
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-wrap gap-1", children: traits2.map((trait) => /* @__PURE__ */ jsxRuntime.jsxs(Badge, { variant: "success", size: "sm", children: [
|
|
40982
40990
|
trait.name,
|
|
40983
40991
|
": ",
|
|
@@ -40985,8 +40993,8 @@ function EventDispatcherTab({ traits: traits2, schema }) {
|
|
|
40985
40993
|
] }, trait.id)) })
|
|
40986
40994
|
] }),
|
|
40987
40995
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-3", children: [
|
|
40988
|
-
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-
|
|
40989
|
-
availableEvents.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-
|
|
40996
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground mb-1", children: t("debug.availableEvents") }),
|
|
40997
|
+
availableEvents.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-muted-foreground italic", children: t("debug.noTransitionsFromState") }) : /* @__PURE__ */ jsxRuntime.jsx(Stack, { gap: "xs", children: availableEvents.map(({ event, transitions }) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
40990
40998
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
40991
40999
|
Button,
|
|
40992
41000
|
{
|
|
@@ -40997,22 +41005,22 @@ function EventDispatcherTab({ traits: traits2, schema }) {
|
|
|
40997
41005
|
children: event
|
|
40998
41006
|
}
|
|
40999
41007
|
),
|
|
41000
|
-
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-
|
|
41008
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-muted-foreground", children: transitions.map((t2) => `${t2.from} -> ${t2.to}`).join(", ") }),
|
|
41001
41009
|
transitions.some((tr) => tr.guard) && /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: "warning", size: "sm", children: t("debug.guarded") })
|
|
41002
41010
|
] }, event)) })
|
|
41003
41011
|
] }),
|
|
41004
41012
|
unavailableEvents.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-3", children: [
|
|
41005
|
-
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-
|
|
41013
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground mb-1", children: t("debug.otherEvents") }),
|
|
41006
41014
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-wrap gap-1", children: unavailableEvents.map((event) => /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: "default", size: "sm", className: "opacity-50", children: event }, event)) })
|
|
41007
41015
|
] }),
|
|
41008
41016
|
log13.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
41009
|
-
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-
|
|
41017
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground mb-1", children: t("debug.recentTransitions") }),
|
|
41010
41018
|
/* @__PURE__ */ jsxRuntime.jsx(Stack, { gap: "xs", children: log13.map((entry, i) => /* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "small", className: "font-mono text-xs", children: [
|
|
41011
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-
|
|
41019
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary", children: entry.traitName }),
|
|
41012
41020
|
" ",
|
|
41013
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-
|
|
41021
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: entry.from }),
|
|
41014
41022
|
" -> ",
|
|
41015
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-
|
|
41023
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-success", children: entry.to })
|
|
41016
41024
|
] }, i)) })
|
|
41017
41025
|
] })
|
|
41018
41026
|
] });
|
|
@@ -41038,21 +41046,21 @@ var init_RuntimeDebugger = __esm({
|
|
|
41038
41046
|
function ServerResponseRow({ sr }) {
|
|
41039
41047
|
const { t } = hooks.useTranslate();
|
|
41040
41048
|
const entityEntries = Object.entries(sr.dataEntities);
|
|
41041
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ml-4 pl-2 border-l border-
|
|
41049
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ml-4 pl-2 border-l border-primary py-0.5 text-xs font-mono", children: [
|
|
41042
41050
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
41043
|
-
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: sr.success ? "text-
|
|
41051
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: sr.success ? "text-success" : "text-error", children: [
|
|
41044
41052
|
sr.success ? "\u2713" : "\u2717",
|
|
41045
41053
|
" ",
|
|
41046
41054
|
t("debug.server")
|
|
41047
41055
|
] }),
|
|
41048
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-
|
|
41049
|
-
sr.clientEffects > 0 && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "px-1 rounded bg-
|
|
41050
|
-
sr.emittedEvents.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "px-1 rounded bg-
|
|
41056
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary", children: sr.orbitalName }),
|
|
41057
|
+
sr.clientEffects > 0 && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "px-1 rounded bg-primary/10 text-primary", children: t("debug.clientEffectsCount", { count: sr.clientEffects }) }),
|
|
41058
|
+
sr.emittedEvents.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "px-1 rounded bg-primary/10 text-primary", children: [
|
|
41051
41059
|
t("debug.emitLabel"),
|
|
41052
41060
|
" ",
|
|
41053
41061
|
sr.emittedEvents.join(", ")
|
|
41054
41062
|
] }),
|
|
41055
|
-
sr.error && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "px-1 rounded bg-
|
|
41063
|
+
sr.error && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "px-1 rounded bg-error/10 text-error truncate max-w-[300px]", children: sr.error })
|
|
41056
41064
|
] }),
|
|
41057
41065
|
entityEntries.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-wrap gap-1 mt-0.5", children: entityEntries.map(([name, count]) => /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "px-1 rounded bg-[var(--color-card)] text-foreground", children: [
|
|
41058
41066
|
name,
|
|
@@ -41068,9 +41076,9 @@ function TransitionRow({ trace }) {
|
|
|
41068
41076
|
if (isServerEntry && trace.serverResponse) {
|
|
41069
41077
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "py-0.5 border-b border-border last:border-0", children: [
|
|
41070
41078
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-2 text-xs font-mono", children: [
|
|
41071
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "mt-1.5 w-1.5 h-1.5 rounded-full flex-shrink-0 bg-
|
|
41079
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "mt-1.5 w-1.5 h-1.5 rounded-full flex-shrink-0 bg-primary" }),
|
|
41072
41080
|
/* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: "warning", size: "sm", className: "flex-shrink-0", children: trace.event }),
|
|
41073
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-
|
|
41081
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary flex-shrink-0", children: t("debug.serverResponse") })
|
|
41074
41082
|
] }),
|
|
41075
41083
|
/* @__PURE__ */ jsxRuntime.jsx(ServerResponseRow, { sr: trace.serverResponse })
|
|
41076
41084
|
] });
|
|
@@ -41079,7 +41087,7 @@ function TransitionRow({ trace }) {
|
|
|
41079
41087
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-2 text-xs font-mono", children: [
|
|
41080
41088
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: cn(
|
|
41081
41089
|
"mt-1.5 w-1.5 h-1.5 rounded-full flex-shrink-0",
|
|
41082
|
-
hasFailedEffects ? "bg-
|
|
41090
|
+
hasFailedEffects ? "bg-error" : "bg-success"
|
|
41083
41091
|
) }),
|
|
41084
41092
|
/* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: "info", size: "sm", className: "flex-shrink-0", children: trace.event }),
|
|
41085
41093
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-foreground flex-shrink-0", children: trace.traitName }),
|
|
@@ -41093,7 +41101,7 @@ function TransitionRow({ trace }) {
|
|
|
41093
41101
|
] }),
|
|
41094
41102
|
trace.effects.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-wrap gap-1 ml-6 mt-0.5", children: trace.effects.map((eff, i) => /* @__PURE__ */ jsxRuntime.jsxs("span", { className: cn(
|
|
41095
41103
|
"px-1 rounded text-xs",
|
|
41096
|
-
eff.status === "executed" ? "bg-
|
|
41104
|
+
eff.status === "executed" ? "bg-success/10 text-success" : eff.status === "failed" ? "bg-error/10 text-error" : "bg-warning/10 text-warning"
|
|
41097
41105
|
), children: [
|
|
41098
41106
|
eff.status === "executed" ? "\u2713" : eff.status === "failed" ? "\u2717" : "-",
|
|
41099
41107
|
" ",
|
|
@@ -41127,7 +41135,7 @@ function VerifyModePanel({
|
|
|
41127
41135
|
{
|
|
41128
41136
|
className: cn(
|
|
41129
41137
|
"runtime-debugger runtime-debugger--verify",
|
|
41130
|
-
"flex flex-col bg-[var(--color-card)] text-[var(--color-foreground)] border-t-2 border-
|
|
41138
|
+
"flex flex-col bg-[var(--color-card)] text-[var(--color-foreground)] border-t-2 border-accent",
|
|
41131
41139
|
hudBottom ? "" : "fixed bottom-0 left-0 right-0",
|
|
41132
41140
|
className
|
|
41133
41141
|
),
|
|
@@ -41148,8 +41156,8 @@ function VerifyModePanel({
|
|
|
41148
41156
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-foreground/50 w-3", "aria-hidden": true, children: expanded ? "\u25BE" : "\u25B8" }),
|
|
41149
41157
|
/* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: failedChecks > 0 ? "danger" : "success", size: "sm", children: failedChecks > 0 ? t("debug.failCount", { count: failedChecks }) : t("debug.ok") }),
|
|
41150
41158
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-foreground/70", children: t("debug.localCount", { count: localCount }) }),
|
|
41151
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-
|
|
41152
|
-
traitStates && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-
|
|
41159
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary", children: t("debug.serverCount", { count: serverCount }) }),
|
|
41160
|
+
traitStates && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-accent truncate max-w-[400px]", children: traitStates }),
|
|
41153
41161
|
!expanded && transitions.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-auto text-foreground/50", children: t("debug.transitionsCount", { count: transitions.length }) })
|
|
41154
41162
|
]
|
|
41155
41163
|
}
|
|
@@ -41344,7 +41352,7 @@ function RuntimeDebugger({
|
|
|
41344
41352
|
title: t("debug.openDebugger"),
|
|
41345
41353
|
children: failedChecks > 0 ? /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "relative", children: [
|
|
41346
41354
|
/* @__PURE__ */ jsxRuntime.jsx("span", { children: "V" }),
|
|
41347
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "absolute -top-1 -right-2 w-2 h-2 bg-
|
|
41355
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "absolute -top-1 -right-2 w-2 h-2 bg-error rounded-full" })
|
|
41348
41356
|
] }) : /* @__PURE__ */ jsxRuntime.jsx("span", { children: "V" })
|
|
41349
41357
|
}
|
|
41350
41358
|
) : /* @__PURE__ */ jsxRuntime.jsxs(Card, { className: "runtime-debugger__panel", children: [
|
|
@@ -41432,7 +41440,7 @@ var init_SegmentRenderer = __esm({
|
|
|
41432
41440
|
"div",
|
|
41433
41441
|
{
|
|
41434
41442
|
className: cn(
|
|
41435
|
-
"border border-
|
|
41443
|
+
"border border-border rounded-lg p-2 md:p-4 overflow-x-auto space-y-6",
|
|
41436
41444
|
containerClassName,
|
|
41437
41445
|
className
|
|
41438
41446
|
),
|
|
@@ -45729,6 +45737,66 @@ function useNavigationId2() {
|
|
|
45729
45737
|
init_useEventBus();
|
|
45730
45738
|
var xOrbitalLog = logger.createLogger("almadar:runtime:cross-orbital");
|
|
45731
45739
|
var serverBridgeLog = logger.createLogger("almadar:ui:server-bridge");
|
|
45740
|
+
function reEmitServerEvent(eventBus, emitted, origin) {
|
|
45741
|
+
const evTrait = emitted.source?.trait;
|
|
45742
|
+
if (!evTrait) {
|
|
45743
|
+
xOrbitalLog.warn("emit:dropped-no-source", { event: emitted.event, origin });
|
|
45744
|
+
return;
|
|
45745
|
+
}
|
|
45746
|
+
const key = emitted.source?.orbital ? `UI:${emitted.source.orbital}.${evTrait}.${emitted.event}` : `UI:${evTrait}.${emitted.event}`;
|
|
45747
|
+
xOrbitalLog.info("emit:rebroadcast", {
|
|
45748
|
+
busKey: key,
|
|
45749
|
+
sourceOrbital: emitted.source?.orbital,
|
|
45750
|
+
sourceTrait: evTrait,
|
|
45751
|
+
origin
|
|
45752
|
+
});
|
|
45753
|
+
eventBus.emit(key, emitted.payload);
|
|
45754
|
+
}
|
|
45755
|
+
function isBusPushEnvelope(value) {
|
|
45756
|
+
return value.type === "bus" && typeof value.event === "string";
|
|
45757
|
+
}
|
|
45758
|
+
var tabClientId;
|
|
45759
|
+
function getTabClientId() {
|
|
45760
|
+
if (tabClientId === void 0) tabClientId = crypto.randomUUID();
|
|
45761
|
+
return tabClientId;
|
|
45762
|
+
}
|
|
45763
|
+
var pushChannels = /* @__PURE__ */ new Map();
|
|
45764
|
+
function acquirePushChannel(url, subscriber) {
|
|
45765
|
+
let channel = pushChannels.get(url);
|
|
45766
|
+
if (channel === void 0) {
|
|
45767
|
+
const source = new EventSource(url);
|
|
45768
|
+
const created = { source, subscribers: /* @__PURE__ */ new Set() };
|
|
45769
|
+
source.onmessage = (ev) => {
|
|
45770
|
+
let parsed;
|
|
45771
|
+
try {
|
|
45772
|
+
parsed = JSON.parse(ev.data);
|
|
45773
|
+
} catch (err) {
|
|
45774
|
+
serverBridgeLog.warn("push:parse-failed", { error: err instanceof Error ? err.message : String(err) });
|
|
45775
|
+
return;
|
|
45776
|
+
}
|
|
45777
|
+
if (!isBusPushEnvelope(parsed)) return;
|
|
45778
|
+
for (const sub of created.subscribers) sub(parsed);
|
|
45779
|
+
};
|
|
45780
|
+
source.onerror = () => {
|
|
45781
|
+
serverBridgeLog.warn("push:connection-error", { url });
|
|
45782
|
+
};
|
|
45783
|
+
pushChannels.set(url, created);
|
|
45784
|
+
channel = created;
|
|
45785
|
+
}
|
|
45786
|
+
channel.subscribers.add(subscriber);
|
|
45787
|
+
return () => {
|
|
45788
|
+
channel.subscribers.delete(subscriber);
|
|
45789
|
+
if (channel.subscribers.size === 0) {
|
|
45790
|
+
channel.source.close();
|
|
45791
|
+
pushChannels.delete(url);
|
|
45792
|
+
}
|
|
45793
|
+
};
|
|
45794
|
+
}
|
|
45795
|
+
function deriveEventsUrl(serverUrl) {
|
|
45796
|
+
const trimmed = serverUrl.replace(/\/+$/, "");
|
|
45797
|
+
const apiRoot = trimmed.replace(/\/[^/]*$/, "");
|
|
45798
|
+
return `${apiRoot}/events`;
|
|
45799
|
+
}
|
|
45732
45800
|
function createHttpTransport(serverUrl) {
|
|
45733
45801
|
return {
|
|
45734
45802
|
register: async (schema) => {
|
|
@@ -45755,11 +45823,12 @@ function createHttpTransport(serverUrl) {
|
|
|
45755
45823
|
} catch {
|
|
45756
45824
|
}
|
|
45757
45825
|
},
|
|
45758
|
-
sendEvent: async (orbitalName, event, payload) => {
|
|
45826
|
+
sendEvent: async (orbitalName, event, payload, clientId) => {
|
|
45827
|
+
const body = { event, payload, clientId };
|
|
45759
45828
|
const res = await fetch(`${serverUrl}/${orbitalName}/events`, {
|
|
45760
45829
|
method: "POST",
|
|
45761
45830
|
headers: { "Content-Type": "application/json" },
|
|
45762
|
-
body: JSON.stringify(
|
|
45831
|
+
body: JSON.stringify(body)
|
|
45763
45832
|
});
|
|
45764
45833
|
return res.json();
|
|
45765
45834
|
}
|
|
@@ -45804,7 +45873,7 @@ function ServerBridgeProvider({
|
|
|
45804
45873
|
const emptyMeta = { success: false, clientEffects: 0, dataEntities: {}, emittedEvents: [] };
|
|
45805
45874
|
if (!connected) return { effects: [], meta: emptyMeta };
|
|
45806
45875
|
try {
|
|
45807
|
-
const result = await transport.sendEvent(orbitalName, event, payload);
|
|
45876
|
+
const result = await transport.sendEvent(orbitalName, event, payload, getTabClientId());
|
|
45808
45877
|
const effects = [];
|
|
45809
45878
|
const responseData = result.data || {};
|
|
45810
45879
|
const dataEntities = {};
|
|
@@ -45849,22 +45918,7 @@ function ServerBridgeProvider({
|
|
|
45849
45918
|
}
|
|
45850
45919
|
if (result.emittedEvents) {
|
|
45851
45920
|
for (const emitted of result.emittedEvents) {
|
|
45852
|
-
|
|
45853
|
-
if (!evTrait) {
|
|
45854
|
-
xOrbitalLog.warn("emit:dropped-no-source", {
|
|
45855
|
-
event: emitted.event,
|
|
45856
|
-
dispatchOrbital: orbitalName
|
|
45857
|
-
});
|
|
45858
|
-
continue;
|
|
45859
|
-
}
|
|
45860
|
-
const key = emitted.source?.orbital ? `UI:${emitted.source.orbital}.${evTrait}.${emitted.event}` : `UI:${evTrait}.${emitted.event}`;
|
|
45861
|
-
xOrbitalLog.info("emit:rebroadcast", {
|
|
45862
|
-
busKey: key,
|
|
45863
|
-
sourceOrbital: emitted.source?.orbital,
|
|
45864
|
-
sourceTrait: evTrait,
|
|
45865
|
-
dispatchOrbital: orbitalName
|
|
45866
|
-
});
|
|
45867
|
-
eventBus.emit(key, emitted.payload);
|
|
45921
|
+
reEmitServerEvent(eventBus, emitted, orbitalName);
|
|
45868
45922
|
}
|
|
45869
45923
|
}
|
|
45870
45924
|
} else if (result.error) {
|
|
@@ -45906,6 +45960,19 @@ function ServerBridgeProvider({
|
|
|
45906
45960
|
unregisterSchema();
|
|
45907
45961
|
};
|
|
45908
45962
|
}, [schema, registerSchema, unregisterSchema]);
|
|
45963
|
+
React84.useEffect(() => {
|
|
45964
|
+
if (!serverUrl) return;
|
|
45965
|
+
if (typeof EventSource === "undefined") return;
|
|
45966
|
+
const url = `${deriveEventsUrl(serverUrl)}?clientId=${encodeURIComponent(getTabClientId())}`;
|
|
45967
|
+
return acquirePushChannel(url, (parsed) => {
|
|
45968
|
+
serverBridgeLog.debug("push:received", {
|
|
45969
|
+
event: parsed.event,
|
|
45970
|
+
sourceOrbital: parsed.source?.orbital,
|
|
45971
|
+
sourceTrait: parsed.source?.trait
|
|
45972
|
+
});
|
|
45973
|
+
reEmitServerEvent(eventBus, parsed, "push");
|
|
45974
|
+
});
|
|
45975
|
+
}, [serverUrl, eventBus]);
|
|
45909
45976
|
return /* @__PURE__ */ jsxRuntime.jsx(ServerBridgeContext.Provider, { value: { connected, sendEvent }, children });
|
|
45910
45977
|
}
|
|
45911
45978
|
var log12 = logger.createLogger("almadar:ui:trait-provider");
|