@almadar/ui 5.123.0 → 5.125.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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 +332 -275
- package/dist/avl/index.js +334 -277
- package/dist/components/index.cjs +284 -248
- package/dist/components/index.d.cts +4 -3
- package/dist/components/index.d.ts +4 -3
- package/dist/components/index.js +284 -248
- 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/{offline-executor-aRuNznZx.d.cts → offline-executor-Qz4b6GpF.d.cts} +19 -1
- package/dist/{offline-executor-aRuNznZx.d.ts → offline-executor-Qz4b6GpF.d.ts} +19 -1
- package/dist/providers/index.cjs +395 -275
- package/dist/providers/index.d.cts +6 -6
- package/dist/providers/index.d.ts +6 -6
- package/dist/providers/index.js +394 -276
- package/dist/renderer/index.cjs +8 -0
- package/dist/renderer/index.d.cts +2 -2
- package/dist/renderer/index.d.ts +2 -2
- package/dist/renderer/index.js +1 -1
- package/dist/runtime/index.cjs +325 -268
- package/dist/runtime/index.d.cts +4 -2
- package/dist/runtime/index.d.ts +4 -2
- package/dist/runtime/index.js +327 -270
- package/package.json +13 -11
- 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
|
)
|
|
@@ -23314,13 +23315,13 @@ function DataGrid({
|
|
|
23314
23315
|
}
|
|
23315
23316
|
),
|
|
23316
23317
|
/* @__PURE__ */ jsxRuntime.jsxs(VStack, { gap: "xs", className: "flex-1 min-w-0", children: [
|
|
23317
|
-
titleValue !== void 0 && titleValue !== null && /* @__PURE__ */ jsxRuntime.jsxs(HStack, { gap: "xs", className: "items-center", children: [
|
|
23318
|
+
titleValue !== void 0 && titleValue !== null && /* @__PURE__ */ jsxRuntime.jsxs(HStack, { gap: "xs", className: "items-center min-w-0", children: [
|
|
23318
23319
|
titleField?.icon && renderIconInput(titleField.icon, { size: "sm", className: "text-primary flex-shrink-0" }),
|
|
23319
23320
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
23320
23321
|
Typography,
|
|
23321
23322
|
{
|
|
23322
23323
|
variant: titleField?.variant === "h3" ? "h3" : "h4",
|
|
23323
|
-
className: "font-semibold truncate",
|
|
23324
|
+
className: "font-semibold truncate min-w-0",
|
|
23324
23325
|
children: String(titleValue)
|
|
23325
23326
|
}
|
|
23326
23327
|
)
|
|
@@ -23378,7 +23379,7 @@ function DataGrid({
|
|
|
23378
23379
|
)
|
|
23379
23380
|
] }, field.name);
|
|
23380
23381
|
}) }) }),
|
|
23381
|
-
primaryActions.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "px-4 py-3 mt-auto border-t border-border", children: /* @__PURE__ */ jsxRuntime.jsxs(HStack, { gap: "sm", className: "justify-end", children: [
|
|
23382
|
+
primaryActions.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "px-4 py-3 mt-auto border-t border-border", children: /* @__PURE__ */ jsxRuntime.jsxs(HStack, { gap: "sm", className: "justify-end flex-wrap", children: [
|
|
23382
23383
|
(maxInlineActions != null ? primaryActions.slice(0, maxInlineActions) : primaryActions).map((action, idx) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
23383
23384
|
Button,
|
|
23384
23385
|
{
|
|
@@ -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" })
|
|
@@ -28393,7 +28392,7 @@ function TableView({
|
|
|
28393
28392
|
col.key
|
|
28394
28393
|
);
|
|
28395
28394
|
}),
|
|
28396
|
-
hasActions && /* @__PURE__ */ jsxRuntime.jsx(Box, { "aria-hidden": true })
|
|
28395
|
+
hasActions && /* @__PURE__ */ jsxRuntime.jsx(Box, { "aria-hidden": true, className: "sticky right-0 bg-[var(--color-surface-subtle)]" })
|
|
28397
28396
|
]
|
|
28398
28397
|
}
|
|
28399
28398
|
);
|
|
@@ -28437,41 +28436,54 @@ function TableView({
|
|
|
28437
28436
|
}
|
|
28438
28437
|
return /* @__PURE__ */ jsxRuntime.jsx(Box, { role: "cell", className: cellBase, children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate", children: formatCell(raw, col.format) }) }, col.key);
|
|
28439
28438
|
}),
|
|
28440
|
-
itemActions && itemActions.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
28441
|
-
|
|
28442
|
-
|
|
28443
|
-
|
|
28444
|
-
|
|
28445
|
-
|
|
28446
|
-
|
|
28447
|
-
|
|
28448
|
-
"
|
|
28449
|
-
|
|
28450
|
-
|
|
28451
|
-
|
|
28452
|
-
|
|
28453
|
-
|
|
28454
|
-
|
|
28455
|
-
|
|
28456
|
-
|
|
28457
|
-
|
|
28458
|
-
|
|
28459
|
-
|
|
28460
|
-
|
|
28461
|
-
|
|
28462
|
-
|
|
28463
|
-
|
|
28464
|
-
|
|
28465
|
-
|
|
28466
|
-
|
|
28467
|
-
|
|
28468
|
-
|
|
28469
|
-
|
|
28470
|
-
|
|
28471
|
-
|
|
28472
|
-
|
|
28473
|
-
|
|
28474
|
-
|
|
28439
|
+
itemActions && itemActions.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
28440
|
+
HStack,
|
|
28441
|
+
{
|
|
28442
|
+
gap: "xs",
|
|
28443
|
+
className: cn(
|
|
28444
|
+
// Pinned: the fixed column tracks routinely overflow the caller's
|
|
28445
|
+
// scroll container, which used to leave the actions off-screen.
|
|
28446
|
+
// Opaque so scrolled cells pass underneath it.
|
|
28447
|
+
"justify-end flex-shrink-0 sticky right-0 z-[1] transition-colors",
|
|
28448
|
+
lk.striped && index % 2 === 1 ? "bg-[var(--color-surface-subtle)]" : "bg-[var(--color-card)] group-hover:bg-[var(--color-surface-subtle)]"
|
|
28449
|
+
),
|
|
28450
|
+
children: [
|
|
28451
|
+
(maxInlineActions != null ? itemActions.slice(0, maxInlineActions) : itemActions).map((action, i) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
28452
|
+
Button,
|
|
28453
|
+
{
|
|
28454
|
+
variant: action.variant ?? "ghost",
|
|
28455
|
+
size: "sm",
|
|
28456
|
+
onClick: handleActionClick(action, row),
|
|
28457
|
+
"data-testid": `action-${action.event}`,
|
|
28458
|
+
"data-row-id": String(row.id),
|
|
28459
|
+
className: cn(action.variant === "danger" && "text-error hover:bg-error/10"),
|
|
28460
|
+
children: [
|
|
28461
|
+
action.icon && renderIconInput3(action.icon, { size: "xs", className: "mr-1" }),
|
|
28462
|
+
action.label
|
|
28463
|
+
]
|
|
28464
|
+
},
|
|
28465
|
+
i
|
|
28466
|
+
)),
|
|
28467
|
+
maxInlineActions != null && itemActions.length > maxInlineActions && /* @__PURE__ */ jsxRuntime.jsx(
|
|
28468
|
+
Menu,
|
|
28469
|
+
{
|
|
28470
|
+
position: "bottom-end",
|
|
28471
|
+
trigger: /* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "ghost", size: "sm", "aria-label": t("common.actions"), "data-testid": "action-overflow", children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: "more-horizontal", size: "xs" }) }),
|
|
28472
|
+
items: itemActions.slice(maxInlineActions).map((action) => ({
|
|
28473
|
+
label: action.label,
|
|
28474
|
+
icon: action.icon,
|
|
28475
|
+
event: action.event,
|
|
28476
|
+
variant: action.variant === "danger" ? "danger" : "default",
|
|
28477
|
+
onClick: () => eventBus.emit(`UI:${action.event}`, {
|
|
28478
|
+
id: row.id,
|
|
28479
|
+
row
|
|
28480
|
+
})
|
|
28481
|
+
}))
|
|
28482
|
+
}
|
|
28483
|
+
)
|
|
28484
|
+
]
|
|
28485
|
+
}
|
|
28486
|
+
)
|
|
28475
28487
|
]
|
|
28476
28488
|
}
|
|
28477
28489
|
);
|
|
@@ -31246,6 +31258,7 @@ var init_QrScanner = __esm({
|
|
|
31246
31258
|
overflow: "hidden",
|
|
31247
31259
|
rounded: "sm",
|
|
31248
31260
|
className: cn(
|
|
31261
|
+
// eslint-disable-next-line almadar/no-hardcoded-colors -- media overlay: always over a dark scrim
|
|
31249
31262
|
"bg-black",
|
|
31250
31263
|
"aspect-square w-full max-w-md",
|
|
31251
31264
|
className
|
|
@@ -31310,7 +31323,9 @@ var init_QrScanner = __esm({
|
|
|
31310
31323
|
type: "button",
|
|
31311
31324
|
onClick: togglePause,
|
|
31312
31325
|
className: cn(
|
|
31326
|
+
// eslint-disable-next-line almadar/no-hardcoded-colors -- media overlay: always over a dark scrim
|
|
31313
31327
|
"rounded-full bg-black bg-opacity-60 p-2 text-white",
|
|
31328
|
+
// eslint-disable-next-line almadar/no-hardcoded-colors -- media overlay: always over a dark scrim
|
|
31314
31329
|
"hover:bg-opacity-80 focus:outline-none focus:ring-2 focus:ring-white"
|
|
31315
31330
|
),
|
|
31316
31331
|
"aria-label": isPaused ? t("qrScanner.resumeScanning") : t("qrScanner.pauseScanning"),
|
|
@@ -31323,7 +31338,9 @@ var init_QrScanner = __esm({
|
|
|
31323
31338
|
type: "button",
|
|
31324
31339
|
onClick: toggleFacing,
|
|
31325
31340
|
className: cn(
|
|
31341
|
+
// eslint-disable-next-line almadar/no-hardcoded-colors -- media overlay: always over a dark scrim
|
|
31326
31342
|
"rounded-full bg-black bg-opacity-60 p-2 text-white",
|
|
31343
|
+
// eslint-disable-next-line almadar/no-hardcoded-colors -- media overlay: always over a dark scrim
|
|
31327
31344
|
"hover:bg-opacity-80 focus:outline-none focus:ring-2 focus:ring-white"
|
|
31328
31345
|
),
|
|
31329
31346
|
"aria-label": currentFacing === "environment" ? t("qrScanner.switchToFrontCamera") : t("qrScanner.switchToRearCamera"),
|
|
@@ -31336,7 +31353,9 @@ var init_QrScanner = __esm({
|
|
|
31336
31353
|
type: "button",
|
|
31337
31354
|
onClick: handleMockScan,
|
|
31338
31355
|
className: cn(
|
|
31356
|
+
// eslint-disable-next-line almadar/no-hardcoded-colors -- media overlay: always over a dark scrim
|
|
31339
31357
|
"rounded-full bg-black bg-opacity-60 px-3 py-2 text-xs text-white",
|
|
31358
|
+
// eslint-disable-next-line almadar/no-hardcoded-colors -- media overlay: always over a dark scrim
|
|
31340
31359
|
"hover:bg-opacity-80 focus:outline-none focus:ring-2 focus:ring-white"
|
|
31341
31360
|
),
|
|
31342
31361
|
"aria-label": t("aria.mockScanDev"),
|
|
@@ -34072,10 +34091,10 @@ var init_ModuleCard = __esm({
|
|
|
34072
34091
|
init_avl_atom_types();
|
|
34073
34092
|
init_MiniStateMachine();
|
|
34074
34093
|
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-
|
|
34094
|
+
persistent: "border-l-[3px] border-l-primary border-solid",
|
|
34095
|
+
runtime: "border-l-[3px] border-l-primary border-dashed",
|
|
34096
|
+
singleton: "border-l-[3px] border-l-primary border-double",
|
|
34097
|
+
instance: "border-l-[3px] border-l-primary border-dotted"
|
|
34079
34098
|
};
|
|
34080
34099
|
PERSISTENCE_ICON = {
|
|
34081
34100
|
persistent: "\u26C1",
|
|
@@ -34105,8 +34124,8 @@ var init_ModuleCard = __esm({
|
|
|
34105
34124
|
className: "rounded-lg border border-[var(--color-border)] bg-[var(--color-card)] shadow-sm overflow-hidden",
|
|
34106
34125
|
style: { minWidth: 280, maxWidth: 400 },
|
|
34107
34126
|
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-
|
|
34127
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.Handle, { type: "target", position: react.Position.Left, className: "!w-2.5 !h-2.5 !bg-warning" }),
|
|
34128
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.Handle, { type: "source", position: react.Position.Right, className: "!w-2.5 !h-2.5 !bg-warning" }),
|
|
34110
34129
|
/* @__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
34130
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: `px-3 py-2 border-b border-[var(--color-border)] ${PERSISTENCE_BORDER[persistence] ?? ""}`, children: [
|
|
34112
34131
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1.5 mb-1.5", children: [
|
|
@@ -36562,19 +36581,19 @@ var init_ReflectionBlock = __esm({
|
|
|
36562
36581
|
"div",
|
|
36563
36582
|
{
|
|
36564
36583
|
className: cn(
|
|
36565
|
-
"my-6 border-l-4 border-
|
|
36584
|
+
"my-6 border-l-4 border-warning bg-warning/10 rounded-r-lg p-4",
|
|
36566
36585
|
className
|
|
36567
36586
|
),
|
|
36568
36587
|
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-3", children: [
|
|
36569
|
-
/* @__PURE__ */ jsxRuntime.jsx(LucideIcons2.PauseCircle, { className: "text-
|
|
36588
|
+
/* @__PURE__ */ jsxRuntime.jsx(LucideIcons2.PauseCircle, { className: "text-warning flex-shrink-0 mt-1", size: 20 }),
|
|
36570
36589
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1", children: [
|
|
36571
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "font-medium text-
|
|
36572
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-
|
|
36590
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "font-medium text-warning mb-2", children: "Pause & Reflect" }),
|
|
36591
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-foreground text-sm mb-3", children: prompt }),
|
|
36573
36592
|
isExpanded ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
36574
36593
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
36575
36594
|
"textarea",
|
|
36576
36595
|
{
|
|
36577
|
-
className: "w-full p-2 border border-
|
|
36596
|
+
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
36597
|
placeholder: "Your thoughts...",
|
|
36579
36598
|
value: note,
|
|
36580
36599
|
onChange: (e) => setNote(e.target.value),
|
|
@@ -36585,7 +36604,7 @@ var init_ReflectionBlock = __esm({
|
|
|
36585
36604
|
"button",
|
|
36586
36605
|
{
|
|
36587
36606
|
onClick: handleSave,
|
|
36588
|
-
className: "mt-2 text-sm px-3 py-1 bg-
|
|
36607
|
+
className: "mt-2 text-sm px-3 py-1 bg-warning text-warning-foreground rounded hover:opacity-90 transition-colors",
|
|
36589
36608
|
children: "Save & Continue"
|
|
36590
36609
|
}
|
|
36591
36610
|
)
|
|
@@ -36593,7 +36612,7 @@ var init_ReflectionBlock = __esm({
|
|
|
36593
36612
|
"button",
|
|
36594
36613
|
{
|
|
36595
36614
|
onClick: () => setIsExpanded(true),
|
|
36596
|
-
className: "text-sm text-
|
|
36615
|
+
className: "text-sm text-warning hover:underline",
|
|
36597
36616
|
children: savedNote ? "\u2713 Answered \xB7 Edit" : "Answer this question"
|
|
36598
36617
|
}
|
|
36599
36618
|
)
|
|
@@ -36879,7 +36898,7 @@ function DataTable({
|
|
|
36879
36898
|
)),
|
|
36880
36899
|
rowActions && /* @__PURE__ */ jsxRuntime.jsx("th", { className: "w-12 px-4 py-3" })
|
|
36881
36900
|
] }) }),
|
|
36882
|
-
/* @__PURE__ */ jsxRuntime.jsx("tbody", { className: "divide-y divide-
|
|
36901
|
+
/* @__PURE__ */ jsxRuntime.jsx("tbody", { className: "divide-y divide-border", children: isLoading ? /* @__PURE__ */ jsxRuntime.jsx("tr", { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
36883
36902
|
"td",
|
|
36884
36903
|
{
|
|
36885
36904
|
colSpan: normalizedColumns.length + (selectable ? 1 : 0) + (rowActions ? 1 : 0),
|
|
@@ -37199,6 +37218,16 @@ function normalizeFieldDefs(fields) {
|
|
|
37199
37218
|
return String(f3);
|
|
37200
37219
|
});
|
|
37201
37220
|
}
|
|
37221
|
+
function buildFieldLabelMap(fields) {
|
|
37222
|
+
const map = {};
|
|
37223
|
+
if (!fields) return map;
|
|
37224
|
+
for (const f3 of fields) {
|
|
37225
|
+
if (typeof f3 === "object" && "key" in f3 && f3.header !== void 0 && f3.header !== "") {
|
|
37226
|
+
map[f3.key] = f3.header;
|
|
37227
|
+
}
|
|
37228
|
+
}
|
|
37229
|
+
return map;
|
|
37230
|
+
}
|
|
37202
37231
|
function buildFieldTypeMap(fields) {
|
|
37203
37232
|
const map = {};
|
|
37204
37233
|
if (!fields) return map;
|
|
@@ -37250,7 +37279,9 @@ var init_DetailPanel = __esm({
|
|
|
37250
37279
|
};
|
|
37251
37280
|
const effectiveFieldNames = isFieldDefArray(propFields) ? normalizeFieldDefs(propFields) : fieldNames;
|
|
37252
37281
|
const fieldTypeMap = isFieldDefArray(propFields) ? buildFieldTypeMap(propFields) : {};
|
|
37253
|
-
|
|
37282
|
+
const fieldLabelMap = isFieldDefArray(propFields) ? buildFieldLabelMap(propFields) : {};
|
|
37283
|
+
const labelFor = (field) => fieldLabelMap[field] ?? formatFieldLabel(field);
|
|
37284
|
+
const handleActionClick = React84.useCallback(
|
|
37254
37285
|
(action, data2) => {
|
|
37255
37286
|
if (action.navigatesTo) {
|
|
37256
37287
|
const url = action.navigatesTo.replace(
|
|
@@ -37285,7 +37316,7 @@ var init_DetailPanel = __esm({
|
|
|
37285
37316
|
if (typeof field === "string") {
|
|
37286
37317
|
const value = getNestedValue(normalizedData, field);
|
|
37287
37318
|
return {
|
|
37288
|
-
label:
|
|
37319
|
+
label: labelFor(field),
|
|
37289
37320
|
value: formatFieldValue(value, field),
|
|
37290
37321
|
icon: getFieldIcon(field)
|
|
37291
37322
|
};
|
|
@@ -37296,7 +37327,10 @@ var init_DetailPanel = __esm({
|
|
|
37296
37327
|
}
|
|
37297
37328
|
if (normalizedData && effectiveFieldNames) {
|
|
37298
37329
|
const primaryField = effectiveFieldNames[0];
|
|
37299
|
-
|
|
37330
|
+
const titleDerivedFromPrimary = Boolean(
|
|
37331
|
+
!title && primaryField && normalizedData[primaryField]
|
|
37332
|
+
);
|
|
37333
|
+
if (titleDerivedFromPrimary) {
|
|
37300
37334
|
title = String(normalizedData[primaryField]);
|
|
37301
37335
|
}
|
|
37302
37336
|
const statusFields = effectiveFieldNames.filter(
|
|
@@ -37315,16 +37349,16 @@ var init_DetailPanel = __esm({
|
|
|
37315
37349
|
(f3) => f3.toLowerCase().includes("description") || f3.toLowerCase().includes("note")
|
|
37316
37350
|
);
|
|
37317
37351
|
const otherFields = effectiveFieldNames.filter(
|
|
37318
|
-
(f3) => f3 !== primaryField && !statusFields.includes(f3) && !progressFields.includes(f3) && !metricFields.includes(f3) && !dateFields.includes(f3) && !descriptionFields.includes(f3)
|
|
37352
|
+
(f3) => (!titleDerivedFromPrimary || f3 !== primaryField) && !statusFields.includes(f3) && !progressFields.includes(f3) && !metricFields.includes(f3) && !dateFields.includes(f3) && !descriptionFields.includes(f3)
|
|
37319
37353
|
);
|
|
37320
37354
|
sections = [];
|
|
37321
37355
|
if (statusFields.length > 0 || otherFields.length > 0) {
|
|
37322
37356
|
const overviewFields = [];
|
|
37323
|
-
[...statusFields, ...otherFields
|
|
37357
|
+
[...statusFields, ...otherFields].forEach((field) => {
|
|
37324
37358
|
const value = getNestedValue(normalizedData, field);
|
|
37325
37359
|
if (value !== void 0 && value !== null) {
|
|
37326
37360
|
overviewFields.push({
|
|
37327
|
-
label:
|
|
37361
|
+
label: labelFor(field),
|
|
37328
37362
|
value: renderRichFieldValue(value, field, fieldTypeMap[field]),
|
|
37329
37363
|
icon: getFieldIcon(field)
|
|
37330
37364
|
});
|
|
@@ -37340,7 +37374,7 @@ var init_DetailPanel = __esm({
|
|
|
37340
37374
|
const value = getNestedValue(normalizedData, field);
|
|
37341
37375
|
if (value !== void 0 && value !== null) {
|
|
37342
37376
|
metricsFields.push({
|
|
37343
|
-
label:
|
|
37377
|
+
label: labelFor(field),
|
|
37344
37378
|
value: renderRichFieldValue(value, field, fieldTypeMap[field]),
|
|
37345
37379
|
icon: getFieldIcon(field)
|
|
37346
37380
|
});
|
|
@@ -37356,7 +37390,7 @@ var init_DetailPanel = __esm({
|
|
|
37356
37390
|
const value = getNestedValue(normalizedData, field);
|
|
37357
37391
|
if (value !== void 0 && value !== null) {
|
|
37358
37392
|
timelineFields.push({
|
|
37359
|
-
label:
|
|
37393
|
+
label: labelFor(field),
|
|
37360
37394
|
value: renderRichFieldValue(value, field, fieldTypeMap[field]),
|
|
37361
37395
|
icon: getFieldIcon(field)
|
|
37362
37396
|
});
|
|
@@ -37372,7 +37406,7 @@ var init_DetailPanel = __esm({
|
|
|
37372
37406
|
const value = getNestedValue(normalizedData, field);
|
|
37373
37407
|
if (value !== void 0 && value !== null) {
|
|
37374
37408
|
descFields.push({
|
|
37375
|
-
label:
|
|
37409
|
+
label: labelFor(field),
|
|
37376
37410
|
value: renderRichFieldValue(value, field, fieldTypeMap[field]),
|
|
37377
37411
|
icon: getFieldIcon(field)
|
|
37378
37412
|
});
|
|
@@ -37420,7 +37454,7 @@ var init_DetailPanel = __esm({
|
|
|
37420
37454
|
if (typeof field === "string") {
|
|
37421
37455
|
const value = normalizedData ? getNestedValue(normalizedData, field) : void 0;
|
|
37422
37456
|
allFields.push({
|
|
37423
|
-
label:
|
|
37457
|
+
label: labelFor(field),
|
|
37424
37458
|
value: renderRichFieldValue(value, field, fieldTypeMap[field]),
|
|
37425
37459
|
icon: getFieldIcon(field)
|
|
37426
37460
|
});
|
|
@@ -37442,8 +37476,9 @@ var init_DetailPanel = __esm({
|
|
|
37442
37476
|
{
|
|
37443
37477
|
variant: action.variant || "secondary",
|
|
37444
37478
|
size: "sm",
|
|
37445
|
-
action: action.event,
|
|
37479
|
+
action: action.navigatesTo ? void 0 : action.event,
|
|
37446
37480
|
actionPayload: { row: normalizedData },
|
|
37481
|
+
onClick: action.navigatesTo ? () => handleActionClick(action, normalizedData) : void 0,
|
|
37447
37482
|
icon: action.icon,
|
|
37448
37483
|
"data-testid": action.event ? `action-${action.event}` : void 0,
|
|
37449
37484
|
"data-row-id": normalizedData?.id !== void 0 ? String(normalizedData.id) : void 0,
|
|
@@ -39486,8 +39521,9 @@ var init_MediaGallery = __esm({
|
|
|
39486
39521
|
)
|
|
39487
39522
|
}
|
|
39488
39523
|
),
|
|
39489
|
-
item.caption &&
|
|
39490
|
-
|
|
39524
|
+
item.caption && // eslint-disable-next-line almadar/no-hardcoded-colors -- media overlay: caption scrim over image
|
|
39525
|
+
/* @__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 }) }),
|
|
39526
|
+
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
39527
|
]
|
|
39492
39528
|
},
|
|
39493
39529
|
item.id
|
|
@@ -39516,7 +39552,7 @@ var init_MediaGallery = __esm({
|
|
|
39516
39552
|
size: "sm",
|
|
39517
39553
|
icon: LucideIcons2.X,
|
|
39518
39554
|
action: "LIGHTBOX_CLOSE",
|
|
39519
|
-
className: "text-
|
|
39555
|
+
className: "text-foreground hover:bg-muted/50"
|
|
39520
39556
|
}
|
|
39521
39557
|
) }),
|
|
39522
39558
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -39527,7 +39563,7 @@ var init_MediaGallery = __esm({
|
|
|
39527
39563
|
className: "max-w-full max-h-[80vh] object-contain rounded-md"
|
|
39528
39564
|
}
|
|
39529
39565
|
),
|
|
39530
|
-
lightboxItem.caption && /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body", className: "text-
|
|
39566
|
+
lightboxItem.caption && /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body", className: "text-foreground mt-3 text-center", children: lightboxItem.caption })
|
|
39531
39567
|
]
|
|
39532
39568
|
}
|
|
39533
39569
|
)
|
|
@@ -39969,7 +40005,7 @@ function WalkMinimap() {
|
|
|
39969
40005
|
{
|
|
39970
40006
|
variant,
|
|
39971
40007
|
size: "sm",
|
|
39972
|
-
className: `flex-shrink-0 text-[9px] ${isActive ? "ring-1 ring-
|
|
40008
|
+
className: `flex-shrink-0 text-[9px] ${isActive ? "ring-1 ring-info" : ""}`,
|
|
39973
40009
|
children: [
|
|
39974
40010
|
isDone ? "\u2713" : isActive ? "\u25CF" : "\u25CB",
|
|
39975
40011
|
" ",
|
|
@@ -40110,13 +40146,13 @@ function WalkMinimap() {
|
|
|
40110
40146
|
})
|
|
40111
40147
|
] }) }),
|
|
40112
40148
|
/* @__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-
|
|
40149
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "caption", className: "text-xs font-mono text-success", children: [
|
|
40114
40150
|
"Engine: ",
|
|
40115
40151
|
engineCount,
|
|
40116
40152
|
"/",
|
|
40117
40153
|
totalTransitions
|
|
40118
40154
|
] }),
|
|
40119
|
-
domCount > 0 && /* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "caption", className: "text-xs font-mono text-
|
|
40155
|
+
domCount > 0 && /* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "caption", className: "text-xs font-mono text-info", children: [
|
|
40120
40156
|
"DOM: ",
|
|
40121
40157
|
domCount
|
|
40122
40158
|
] }),
|
|
@@ -40149,13 +40185,13 @@ function TraitsTab({ traits: traits2 }) {
|
|
|
40149
40185
|
const accordionItems = traits2.map((trait) => ({
|
|
40150
40186
|
id: trait.id,
|
|
40151
40187
|
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-
|
|
40188
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body", weight: "semibold", className: "text-primary", children: trait.name }),
|
|
40153
40189
|
/* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: "success", size: "sm", children: trait.currentState }),
|
|
40154
|
-
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-
|
|
40190
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-muted-foreground ml-auto", children: t("debug.transitionsCount", { count: trait.transitionCount }) })
|
|
40155
40191
|
] }),
|
|
40156
40192
|
content: /* @__PURE__ */ jsxRuntime.jsxs(Stack, { gap: "sm", children: [
|
|
40157
40193
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
40158
|
-
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-
|
|
40194
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground mb-2", children: t("debug.states") }),
|
|
40159
40195
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-wrap gap-1", children: trait.states.map((state) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
40160
40196
|
Badge,
|
|
40161
40197
|
{
|
|
@@ -40167,18 +40203,18 @@ function TraitsTab({ traits: traits2 }) {
|
|
|
40167
40203
|
)) })
|
|
40168
40204
|
] }),
|
|
40169
40205
|
trait.transitions.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
40170
|
-
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-
|
|
40206
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground mb-2", children: t("debug.transitions") }),
|
|
40171
40207
|
/* @__PURE__ */ jsxRuntime.jsx(Stack, { gap: "xs", children: trait.transitions.map((t2, i) => /* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "small", className: "font-mono", children: [
|
|
40172
40208
|
t2.from,
|
|
40173
40209
|
" \u2192 ",
|
|
40174
40210
|
t2.to,
|
|
40175
40211
|
" ",
|
|
40176
|
-
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-
|
|
40212
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-muted-foreground", children: [
|
|
40177
40213
|
"(",
|
|
40178
40214
|
t2.event,
|
|
40179
40215
|
")"
|
|
40180
40216
|
] }),
|
|
40181
|
-
t2.guard && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-
|
|
40217
|
+
t2.guard && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-warning", children: [
|
|
40182
40218
|
" [",
|
|
40183
40219
|
t2.guard,
|
|
40184
40220
|
"]"
|
|
@@ -40186,7 +40222,7 @@ function TraitsTab({ traits: traits2 }) {
|
|
|
40186
40222
|
] }, i)) })
|
|
40187
40223
|
] }),
|
|
40188
40224
|
trait.guards.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
40189
|
-
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-
|
|
40225
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground mb-2", children: t("debug.guards") }),
|
|
40190
40226
|
/* @__PURE__ */ jsxRuntime.jsx(Stack, { gap: "xs", children: trait.guards.map((g, i) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
40191
40227
|
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", children: g.name }),
|
|
40192
40228
|
/* @__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 +40265,11 @@ function TicksTab({ ticks: ticks2 }) {
|
|
|
40229
40265
|
};
|
|
40230
40266
|
const TickCard = ({ tick, active }) => /* @__PURE__ */ jsxRuntime.jsxs(Card, { className: `p-3 ${!active ? "opacity-50" : ""}`, children: [
|
|
40231
40267
|
/* @__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-
|
|
40268
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: `w-2 h-2 rounded-full ${active ? "bg-success" : "bg-muted-foreground"}` }),
|
|
40269
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body", weight: "semibold", className: "text-warning", children: tick.name }),
|
|
40270
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-muted-foreground", children: tick.traitName })
|
|
40235
40271
|
] }),
|
|
40236
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-3 text-xs text-
|
|
40272
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-3 text-xs text-muted-foreground", children: [
|
|
40237
40273
|
/* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
|
|
40238
40274
|
tick.interval,
|
|
40239
40275
|
"ms"
|
|
@@ -40256,7 +40292,7 @@ function TicksTab({ ticks: ticks2 }) {
|
|
|
40256
40292
|
] });
|
|
40257
40293
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "debug-tab debug-tab--ticks", children: [
|
|
40258
40294
|
activeTicks.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-4", children: [
|
|
40259
|
-
/* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "small", weight: "medium", className: "text-
|
|
40295
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground mb-2", children: [
|
|
40260
40296
|
"Active (",
|
|
40261
40297
|
activeTicks.length,
|
|
40262
40298
|
")"
|
|
@@ -40264,7 +40300,7 @@ function TicksTab({ ticks: ticks2 }) {
|
|
|
40264
40300
|
/* @__PURE__ */ jsxRuntime.jsx(Stack, { gap: "sm", children: activeTicks.map((tick) => /* @__PURE__ */ jsxRuntime.jsx(TickCard, { tick, active: true }, tick.id)) })
|
|
40265
40301
|
] }),
|
|
40266
40302
|
inactiveTicks.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
40267
|
-
/* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "small", weight: "medium", className: "text-
|
|
40303
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground mb-2", children: [
|
|
40268
40304
|
"Inactive (",
|
|
40269
40305
|
inactiveTicks.length,
|
|
40270
40306
|
")"
|
|
@@ -40312,33 +40348,33 @@ function EntitiesTab({ snapshot }) {
|
|
|
40312
40348
|
id: `singleton-${name}`,
|
|
40313
40349
|
header: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
40314
40350
|
/* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: "primary", size: "sm", children: t("debug.singleton") }),
|
|
40315
|
-
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body", weight: "semibold", className: "text-
|
|
40351
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body", weight: "semibold", className: "text-info", children: name })
|
|
40316
40352
|
] }),
|
|
40317
|
-
content: /* @__PURE__ */ jsxRuntime.jsx("pre", { className: "text-xs text-
|
|
40353
|
+
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
40354
|
}));
|
|
40319
40355
|
const runtimeItems = runtimeEntities.slice(0, 20).map((entity) => ({
|
|
40320
40356
|
id: entity.id,
|
|
40321
40357
|
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-
|
|
40358
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body", weight: "semibold", className: "text-info", children: entity.type }),
|
|
40359
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "small", className: "text-muted-foreground", children: [
|
|
40324
40360
|
"#",
|
|
40325
40361
|
entity.id.slice(0, 8)
|
|
40326
40362
|
] })
|
|
40327
40363
|
] }),
|
|
40328
|
-
content: /* @__PURE__ */ jsxRuntime.jsx("pre", { className: "text-xs text-
|
|
40364
|
+
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
40365
|
}));
|
|
40330
40366
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "debug-tab debug-tab--entities", children: [
|
|
40331
40367
|
singletonItems.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-4", children: [
|
|
40332
|
-
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-
|
|
40368
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground mb-2", children: t("debug.singletonsCount", { count: singletonItems.length }) }),
|
|
40333
40369
|
/* @__PURE__ */ jsxRuntime.jsx(Accordion, { items: singletonItems, multiple: true })
|
|
40334
40370
|
] }),
|
|
40335
40371
|
runtimeItems.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-4", children: [
|
|
40336
|
-
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-
|
|
40372
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground mb-2", children: t("debug.runtimeCount", { count: runtimeEntities.length }) }),
|
|
40337
40373
|
/* @__PURE__ */ jsxRuntime.jsx(Accordion, { items: runtimeItems, multiple: true }),
|
|
40338
|
-
runtimeEntities.length > 20 && /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-
|
|
40374
|
+
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
40375
|
] }),
|
|
40340
40376
|
persistentEntries.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
40341
|
-
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-
|
|
40377
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground mb-2", children: t("debug.persistent") }),
|
|
40342
40378
|
/* @__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
40379
|
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", children: type }),
|
|
40344
40380
|
/* @__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 +40459,7 @@ function EventFlowTab({ events: events2 }) {
|
|
|
40423
40459
|
);
|
|
40424
40460
|
})
|
|
40425
40461
|
] }),
|
|
40426
|
-
/* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex items-center gap-1 text-xs text-
|
|
40462
|
+
/* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex items-center gap-1 text-xs text-muted-foreground ml-auto cursor-pointer", children: [
|
|
40427
40463
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
40428
40464
|
Checkbox,
|
|
40429
40465
|
{
|
|
@@ -40438,18 +40474,18 @@ function EventFlowTab({ events: events2 }) {
|
|
|
40438
40474
|
"div",
|
|
40439
40475
|
{
|
|
40440
40476
|
ref: containerRef,
|
|
40441
|
-
className: "max-h-64 overflow-y-auto space-y-1 bg-
|
|
40477
|
+
className: "max-h-64 overflow-y-auto space-y-1 bg-muted rounded p-2",
|
|
40442
40478
|
children: filteredEvents.slice(-100).map((event) => {
|
|
40443
40479
|
const { variant, icon } = TYPE_BADGES[event.type] || { variant: "default", icon: "\u2022" };
|
|
40444
40480
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
40445
40481
|
"div",
|
|
40446
40482
|
{
|
|
40447
|
-
className: "flex items-start gap-2 text-xs py-1 hover:bg-
|
|
40483
|
+
className: "flex items-start gap-2 text-xs py-1 hover:bg-muted/50 rounded px-1",
|
|
40448
40484
|
children: [
|
|
40449
|
-
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-
|
|
40485
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-muted-foreground font-mono min-w-[65px]", children: formatTime2(event.timestamp) }),
|
|
40450
40486
|
/* @__PURE__ */ jsxRuntime.jsx("span", { children: icon }),
|
|
40451
40487
|
/* @__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-
|
|
40488
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-muted-foreground", children: event.message })
|
|
40453
40489
|
]
|
|
40454
40490
|
},
|
|
40455
40491
|
event.id
|
|
@@ -40513,21 +40549,21 @@ function GuardsPanel({ guards }) {
|
|
|
40513
40549
|
id: guard.id,
|
|
40514
40550
|
header: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 w-full", children: [
|
|
40515
40551
|
/* @__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-
|
|
40552
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body", weight: "semibold", className: "text-warning", children: guard.guardName }),
|
|
40553
|
+
/* @__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 }),
|
|
40554
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-muted-foreground ml-auto", children: formatTime2(guard.timestamp) })
|
|
40519
40555
|
] }),
|
|
40520
40556
|
content: /* @__PURE__ */ jsxRuntime.jsxs(Stack, { gap: "sm", children: [
|
|
40521
40557
|
/* @__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-
|
|
40558
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground", children: t("debug.expression") }),
|
|
40559
|
+
/* @__PURE__ */ jsxRuntime.jsx("code", { className: "block mt-1 text-xs text-warning bg-warning/10 px-2 py-1 rounded", children: guard.expression })
|
|
40524
40560
|
] }),
|
|
40525
40561
|
/* @__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-
|
|
40562
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground", children: t("debug.inputs") }),
|
|
40563
|
+
/* @__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
40564
|
] }),
|
|
40529
40565
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
40530
|
-
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-
|
|
40566
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground", children: t("debug.trait") }),
|
|
40531
40567
|
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", children: guard.context.traitName })
|
|
40532
40568
|
] })
|
|
40533
40569
|
] })
|
|
@@ -40583,7 +40619,7 @@ function VerificationTab({ checks, summary }) {
|
|
|
40583
40619
|
(a, b) => (sortOrder[a.status] ?? 4) - (sortOrder[b.status] ?? 4)
|
|
40584
40620
|
);
|
|
40585
40621
|
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-
|
|
40622
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3 mb-3 p-2 bg-muted rounded", children: [
|
|
40587
40623
|
/* @__PURE__ */ jsxRuntime.jsxs(Badge, { variant: "success", size: "sm", children: [
|
|
40588
40624
|
summary.passed,
|
|
40589
40625
|
" passed"
|
|
@@ -40600,7 +40636,7 @@ function VerificationTab({ checks, summary }) {
|
|
|
40600
40636
|
summary.pending,
|
|
40601
40637
|
" pending"
|
|
40602
40638
|
] }),
|
|
40603
|
-
/* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "small", className: "text-
|
|
40639
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "small", className: "text-muted-foreground ml-auto", children: [
|
|
40604
40640
|
summary.totalChecks,
|
|
40605
40641
|
" total checks"
|
|
40606
40642
|
] })
|
|
@@ -40610,12 +40646,12 @@ function VerificationTab({ checks, summary }) {
|
|
|
40610
40646
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
40611
40647
|
"div",
|
|
40612
40648
|
{
|
|
40613
|
-
className: "flex items-start gap-2 p-2 rounded hover:bg-
|
|
40649
|
+
className: "flex items-start gap-2 p-2 rounded hover:bg-muted/50",
|
|
40614
40650
|
children: [
|
|
40615
40651
|
/* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: config.variant, size: "sm", className: "min-w-[20px] justify-center mt-0.5", children: config.icon }),
|
|
40616
40652
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 min-w-0", children: [
|
|
40617
40653
|
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "break-words", children: check.label }),
|
|
40618
|
-
check.details && /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-
|
|
40654
|
+
check.details && /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-muted-foreground break-words", children: check.details })
|
|
40619
40655
|
] }),
|
|
40620
40656
|
/* @__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
40657
|
hour12: false,
|
|
@@ -40650,10 +40686,10 @@ var init_VerificationTab = __esm({
|
|
|
40650
40686
|
function EffectBadge({ effect }) {
|
|
40651
40687
|
const variant = EFFECT_STATUS_VARIANT[effect.status] || "default";
|
|
40652
40688
|
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-
|
|
40689
|
+
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
40690
|
/* @__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-
|
|
40691
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: effect.type }),
|
|
40692
|
+
effect.error && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-error truncate max-w-[120px]", title: effect.error, children: effect.error })
|
|
40657
40693
|
] });
|
|
40658
40694
|
}
|
|
40659
40695
|
function TransitionTimeline({ transitions }) {
|
|
@@ -40688,8 +40724,8 @@ function TransitionTimeline({ transitions }) {
|
|
|
40688
40724
|
const sorted = [...transitions].reverse();
|
|
40689
40725
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "debug-tab debug-tab--timeline", children: [
|
|
40690
40726
|
/* @__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-
|
|
40727
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-muted-foreground", children: t("debug.transitionsRecorded", { count: transitions.length }) }),
|
|
40728
|
+
/* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex items-center gap-1 text-xs text-muted-foreground cursor-pointer", children: [
|
|
40693
40729
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
40694
40730
|
Checkbox,
|
|
40695
40731
|
{
|
|
@@ -40714,22 +40750,22 @@ function TransitionTimeline({ transitions }) {
|
|
|
40714
40750
|
{
|
|
40715
40751
|
className: `
|
|
40716
40752
|
relative pl-6 pb-3 border-l-2 cursor-pointer
|
|
40717
|
-
hover:bg-
|
|
40718
|
-
${hasFailedEffects ? "border-
|
|
40753
|
+
hover:bg-muted/50 rounded-r
|
|
40754
|
+
${hasFailedEffects ? "border-error" : "border-border"}
|
|
40719
40755
|
`,
|
|
40720
40756
|
onClick: () => setExpandedId(isExpanded ? null : trace.id),
|
|
40721
40757
|
children: [
|
|
40722
40758
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: `
|
|
40723
40759
|
absolute left-[-5px] top-1 w-2 h-2 rounded-full
|
|
40724
|
-
${hasFailedEffects ? "bg-
|
|
40760
|
+
${hasFailedEffects ? "bg-error" : allPassed ? "bg-success" : "bg-muted-foreground"}
|
|
40725
40761
|
` }),
|
|
40726
40762
|
/* @__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-
|
|
40763
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-muted-foreground font-mono min-w-[65px]", children: formatTime2(trace.timestamp) }),
|
|
40728
40764
|
/* @__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-
|
|
40765
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "small", className: "font-mono text-muted-foreground", children: [
|
|
40730
40766
|
trace.from,
|
|
40731
40767
|
" ",
|
|
40732
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-
|
|
40768
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground/50", children: "\u2192" }),
|
|
40733
40769
|
" ",
|
|
40734
40770
|
trace.to
|
|
40735
40771
|
] }),
|
|
@@ -40746,9 +40782,9 @@ function TransitionTimeline({ transitions }) {
|
|
|
40746
40782
|
]
|
|
40747
40783
|
}
|
|
40748
40784
|
),
|
|
40749
|
-
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-
|
|
40785
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-muted-foreground ml-auto", children: t("debug.effectsCount", { count: trace.effects.length }) })
|
|
40750
40786
|
] }),
|
|
40751
|
-
isExpanded && trace.effects.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "ml-2 mt-1 mb-2 pl-2 border-l border-
|
|
40787
|
+
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
40788
|
/* @__PURE__ */ jsxRuntime.jsx(EffectBadge, { effect }),
|
|
40753
40789
|
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
40790
|
effect.durationMs !== void 0 && /* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "small", className: "text-muted-foreground text-xs", children: [
|
|
@@ -40782,8 +40818,8 @@ var init_TransitionTimeline = __esm({
|
|
|
40782
40818
|
}
|
|
40783
40819
|
});
|
|
40784
40820
|
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-
|
|
40821
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between py-1.5 border-b border-border last:border-b-0", children: [
|
|
40822
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-muted-foreground", children: label }),
|
|
40787
40823
|
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
40824
|
] });
|
|
40789
40825
|
}
|
|
@@ -40812,7 +40848,7 @@ function ServerBridgeTab({ bridge }) {
|
|
|
40812
40848
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "debug-tab debug-tab--bridge", children: /* @__PURE__ */ jsxRuntime.jsxs(Stack, { gap: "sm", children: [
|
|
40813
40849
|
/* @__PURE__ */ jsxRuntime.jsxs(Card, { className: "p-3", children: [
|
|
40814
40850
|
/* @__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-
|
|
40851
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: `w-3 h-3 rounded-full ${bridge.connected ? "bg-success animate-pulse" : "bg-error"}` }),
|
|
40816
40852
|
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "h6", children: bridge.connected ? t("debug.connected") : t("debug.disconnected") })
|
|
40817
40853
|
] }),
|
|
40818
40854
|
/* @__PURE__ */ jsxRuntime.jsxs(Stack, { gap: "xs", children: [
|
|
@@ -40847,11 +40883,11 @@ function ServerBridgeTab({ bridge }) {
|
|
|
40847
40883
|
)
|
|
40848
40884
|
] })
|
|
40849
40885
|
] }),
|
|
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-
|
|
40886
|
+
bridge.lastError && /* @__PURE__ */ jsxRuntime.jsxs(Card, { className: "p-3 border-error/30 bg-error/10", children: [
|
|
40887
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "semibold", className: "text-error mb-1", children: t("debug.lastError") }),
|
|
40888
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-error font-mono break-all", children: bridge.lastError })
|
|
40853
40889
|
] }),
|
|
40854
|
-
bridge.connected && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-center py-2", children: /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-
|
|
40890
|
+
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
40891
|
] }) });
|
|
40856
40892
|
}
|
|
40857
40893
|
var init_ServerBridgeTab = __esm({
|
|
@@ -40977,7 +41013,7 @@ function EventDispatcherTab({ traits: traits2, schema }) {
|
|
|
40977
41013
|
};
|
|
40978
41014
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "debug-tab debug-tab--dispatch", children: [
|
|
40979
41015
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-3", children: [
|
|
40980
|
-
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-
|
|
41016
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground mb-1", children: t("debug.activeStates") }),
|
|
40981
41017
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-wrap gap-1", children: traits2.map((trait) => /* @__PURE__ */ jsxRuntime.jsxs(Badge, { variant: "success", size: "sm", children: [
|
|
40982
41018
|
trait.name,
|
|
40983
41019
|
": ",
|
|
@@ -40985,8 +41021,8 @@ function EventDispatcherTab({ traits: traits2, schema }) {
|
|
|
40985
41021
|
] }, trait.id)) })
|
|
40986
41022
|
] }),
|
|
40987
41023
|
/* @__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-
|
|
41024
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground mb-1", children: t("debug.availableEvents") }),
|
|
41025
|
+
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
41026
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
40991
41027
|
Button,
|
|
40992
41028
|
{
|
|
@@ -40997,22 +41033,22 @@ function EventDispatcherTab({ traits: traits2, schema }) {
|
|
|
40997
41033
|
children: event
|
|
40998
41034
|
}
|
|
40999
41035
|
),
|
|
41000
|
-
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-
|
|
41036
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-muted-foreground", children: transitions.map((t2) => `${t2.from} -> ${t2.to}`).join(", ") }),
|
|
41001
41037
|
transitions.some((tr) => tr.guard) && /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: "warning", size: "sm", children: t("debug.guarded") })
|
|
41002
41038
|
] }, event)) })
|
|
41003
41039
|
] }),
|
|
41004
41040
|
unavailableEvents.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-3", children: [
|
|
41005
|
-
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-
|
|
41041
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground mb-1", children: t("debug.otherEvents") }),
|
|
41006
41042
|
/* @__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
41043
|
] }),
|
|
41008
41044
|
log13.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
41009
|
-
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-
|
|
41045
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground mb-1", children: t("debug.recentTransitions") }),
|
|
41010
41046
|
/* @__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-
|
|
41047
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary", children: entry.traitName }),
|
|
41012
41048
|
" ",
|
|
41013
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-
|
|
41049
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: entry.from }),
|
|
41014
41050
|
" -> ",
|
|
41015
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-
|
|
41051
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-success", children: entry.to })
|
|
41016
41052
|
] }, i)) })
|
|
41017
41053
|
] })
|
|
41018
41054
|
] });
|
|
@@ -41038,21 +41074,21 @@ var init_RuntimeDebugger = __esm({
|
|
|
41038
41074
|
function ServerResponseRow({ sr }) {
|
|
41039
41075
|
const { t } = hooks.useTranslate();
|
|
41040
41076
|
const entityEntries = Object.entries(sr.dataEntities);
|
|
41041
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ml-4 pl-2 border-l border-
|
|
41077
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ml-4 pl-2 border-l border-primary py-0.5 text-xs font-mono", children: [
|
|
41042
41078
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
41043
|
-
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: sr.success ? "text-
|
|
41079
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: sr.success ? "text-success" : "text-error", children: [
|
|
41044
41080
|
sr.success ? "\u2713" : "\u2717",
|
|
41045
41081
|
" ",
|
|
41046
41082
|
t("debug.server")
|
|
41047
41083
|
] }),
|
|
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-
|
|
41084
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary", children: sr.orbitalName }),
|
|
41085
|
+
sr.clientEffects > 0 && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "px-1 rounded bg-primary/10 text-primary", children: t("debug.clientEffectsCount", { count: sr.clientEffects }) }),
|
|
41086
|
+
sr.emittedEvents.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "px-1 rounded bg-primary/10 text-primary", children: [
|
|
41051
41087
|
t("debug.emitLabel"),
|
|
41052
41088
|
" ",
|
|
41053
41089
|
sr.emittedEvents.join(", ")
|
|
41054
41090
|
] }),
|
|
41055
|
-
sr.error && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "px-1 rounded bg-
|
|
41091
|
+
sr.error && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "px-1 rounded bg-error/10 text-error truncate max-w-[300px]", children: sr.error })
|
|
41056
41092
|
] }),
|
|
41057
41093
|
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
41094
|
name,
|
|
@@ -41068,9 +41104,9 @@ function TransitionRow({ trace }) {
|
|
|
41068
41104
|
if (isServerEntry && trace.serverResponse) {
|
|
41069
41105
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "py-0.5 border-b border-border last:border-0", children: [
|
|
41070
41106
|
/* @__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-
|
|
41107
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "mt-1.5 w-1.5 h-1.5 rounded-full flex-shrink-0 bg-primary" }),
|
|
41072
41108
|
/* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: "warning", size: "sm", className: "flex-shrink-0", children: trace.event }),
|
|
41073
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-
|
|
41109
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary flex-shrink-0", children: t("debug.serverResponse") })
|
|
41074
41110
|
] }),
|
|
41075
41111
|
/* @__PURE__ */ jsxRuntime.jsx(ServerResponseRow, { sr: trace.serverResponse })
|
|
41076
41112
|
] });
|
|
@@ -41079,7 +41115,7 @@ function TransitionRow({ trace }) {
|
|
|
41079
41115
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-2 text-xs font-mono", children: [
|
|
41080
41116
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: cn(
|
|
41081
41117
|
"mt-1.5 w-1.5 h-1.5 rounded-full flex-shrink-0",
|
|
41082
|
-
hasFailedEffects ? "bg-
|
|
41118
|
+
hasFailedEffects ? "bg-error" : "bg-success"
|
|
41083
41119
|
) }),
|
|
41084
41120
|
/* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: "info", size: "sm", className: "flex-shrink-0", children: trace.event }),
|
|
41085
41121
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-foreground flex-shrink-0", children: trace.traitName }),
|
|
@@ -41093,7 +41129,7 @@ function TransitionRow({ trace }) {
|
|
|
41093
41129
|
] }),
|
|
41094
41130
|
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
41131
|
"px-1 rounded text-xs",
|
|
41096
|
-
eff.status === "executed" ? "bg-
|
|
41132
|
+
eff.status === "executed" ? "bg-success/10 text-success" : eff.status === "failed" ? "bg-error/10 text-error" : "bg-warning/10 text-warning"
|
|
41097
41133
|
), children: [
|
|
41098
41134
|
eff.status === "executed" ? "\u2713" : eff.status === "failed" ? "\u2717" : "-",
|
|
41099
41135
|
" ",
|
|
@@ -41127,7 +41163,7 @@ function VerifyModePanel({
|
|
|
41127
41163
|
{
|
|
41128
41164
|
className: cn(
|
|
41129
41165
|
"runtime-debugger runtime-debugger--verify",
|
|
41130
|
-
"flex flex-col bg-[var(--color-card)] text-[var(--color-foreground)] border-t-2 border-
|
|
41166
|
+
"flex flex-col bg-[var(--color-card)] text-[var(--color-foreground)] border-t-2 border-accent",
|
|
41131
41167
|
hudBottom ? "" : "fixed bottom-0 left-0 right-0",
|
|
41132
41168
|
className
|
|
41133
41169
|
),
|
|
@@ -41148,8 +41184,8 @@ function VerifyModePanel({
|
|
|
41148
41184
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-foreground/50 w-3", "aria-hidden": true, children: expanded ? "\u25BE" : "\u25B8" }),
|
|
41149
41185
|
/* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: failedChecks > 0 ? "danger" : "success", size: "sm", children: failedChecks > 0 ? t("debug.failCount", { count: failedChecks }) : t("debug.ok") }),
|
|
41150
41186
|
/* @__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-
|
|
41187
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary", children: t("debug.serverCount", { count: serverCount }) }),
|
|
41188
|
+
traitStates && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-accent truncate max-w-[400px]", children: traitStates }),
|
|
41153
41189
|
!expanded && transitions.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-auto text-foreground/50", children: t("debug.transitionsCount", { count: transitions.length }) })
|
|
41154
41190
|
]
|
|
41155
41191
|
}
|
|
@@ -41344,7 +41380,7 @@ function RuntimeDebugger({
|
|
|
41344
41380
|
title: t("debug.openDebugger"),
|
|
41345
41381
|
children: failedChecks > 0 ? /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "relative", children: [
|
|
41346
41382
|
/* @__PURE__ */ jsxRuntime.jsx("span", { children: "V" }),
|
|
41347
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "absolute -top-1 -right-2 w-2 h-2 bg-
|
|
41383
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "absolute -top-1 -right-2 w-2 h-2 bg-error rounded-full" })
|
|
41348
41384
|
] }) : /* @__PURE__ */ jsxRuntime.jsx("span", { children: "V" })
|
|
41349
41385
|
}
|
|
41350
41386
|
) : /* @__PURE__ */ jsxRuntime.jsxs(Card, { className: "runtime-debugger__panel", children: [
|
|
@@ -41432,7 +41468,7 @@ var init_SegmentRenderer = __esm({
|
|
|
41432
41468
|
"div",
|
|
41433
41469
|
{
|
|
41434
41470
|
className: cn(
|
|
41435
|
-
"border border-
|
|
41471
|
+
"border border-border rounded-lg p-2 md:p-4 overflow-x-auto space-y-6",
|
|
41436
41472
|
containerClassName,
|
|
41437
41473
|
className
|
|
41438
41474
|
),
|
|
@@ -45528,6 +45564,28 @@ function extractRouteParams2(pattern, path) {
|
|
|
45528
45564
|
function pathMatches2(pattern, path) {
|
|
45529
45565
|
return matchPath2(pattern, path) !== null;
|
|
45530
45566
|
}
|
|
45567
|
+
function comparePathSpecificity2(a, b) {
|
|
45568
|
+
const aParts = a.split("/").filter(Boolean);
|
|
45569
|
+
const bParts = b.split("/").filter(Boolean);
|
|
45570
|
+
const shared = Math.min(aParts.length, bParts.length);
|
|
45571
|
+
for (let i = 0; i < shared; i++) {
|
|
45572
|
+
const aParam = aParts[i].startsWith(":");
|
|
45573
|
+
const bParam = bParts[i].startsWith(":");
|
|
45574
|
+
if (aParam !== bParam) return aParam ? 1 : -1;
|
|
45575
|
+
}
|
|
45576
|
+
return 0;
|
|
45577
|
+
}
|
|
45578
|
+
function matchPathAmong2(candidates, path, pathOf) {
|
|
45579
|
+
const routed = candidates.filter((candidate) => Boolean(pathOf(candidate)));
|
|
45580
|
+
const ranked = [...routed].sort(
|
|
45581
|
+
(a, b) => comparePathSpecificity2(pathOf(a), pathOf(b))
|
|
45582
|
+
);
|
|
45583
|
+
for (const candidate of ranked) {
|
|
45584
|
+
const params = matchPath2(pathOf(candidate), path);
|
|
45585
|
+
if (params !== null) return { candidate, params };
|
|
45586
|
+
}
|
|
45587
|
+
return null;
|
|
45588
|
+
}
|
|
45531
45589
|
function isInlineOrbital(orbital) {
|
|
45532
45590
|
return "name" in orbital && typeof orbital.name === "string";
|
|
45533
45591
|
}
|
|
@@ -45536,21 +45594,22 @@ function isInlinePage(page) {
|
|
|
45536
45594
|
}
|
|
45537
45595
|
function findPageByPath2(schema, path) {
|
|
45538
45596
|
if (!schema.orbitals) return null;
|
|
45597
|
+
const candidates = [];
|
|
45539
45598
|
for (const orbital of schema.orbitals) {
|
|
45540
45599
|
if (!isInlineOrbital(orbital)) continue;
|
|
45541
45600
|
if (!orbital.pages) continue;
|
|
45542
45601
|
for (const pageRef of orbital.pages) {
|
|
45543
45602
|
if (!isInlinePage(pageRef)) continue;
|
|
45544
|
-
|
|
45545
|
-
const pagePath = page.path;
|
|
45546
|
-
if (!pagePath) continue;
|
|
45547
|
-
const params = matchPath2(pagePath, path);
|
|
45548
|
-
if (params !== null) {
|
|
45549
|
-
return { page, params, orbitalName: orbital.name };
|
|
45550
|
-
}
|
|
45603
|
+
candidates.push({ page: pageRef, orbitalName: orbital.name });
|
|
45551
45604
|
}
|
|
45552
45605
|
}
|
|
45553
|
-
|
|
45606
|
+
const hit = matchPathAmong2(candidates, path, (entry) => entry.page.path);
|
|
45607
|
+
if (!hit) return null;
|
|
45608
|
+
return {
|
|
45609
|
+
page: hit.candidate.page,
|
|
45610
|
+
params: hit.params,
|
|
45611
|
+
orbitalName: hit.candidate.orbitalName
|
|
45612
|
+
};
|
|
45554
45613
|
}
|
|
45555
45614
|
function findPageByName2(schema, pageName) {
|
|
45556
45615
|
if (!schema.orbitals) return null;
|
|
@@ -45729,6 +45788,66 @@ function useNavigationId2() {
|
|
|
45729
45788
|
init_useEventBus();
|
|
45730
45789
|
var xOrbitalLog = logger.createLogger("almadar:runtime:cross-orbital");
|
|
45731
45790
|
var serverBridgeLog = logger.createLogger("almadar:ui:server-bridge");
|
|
45791
|
+
function reEmitServerEvent(eventBus, emitted, origin) {
|
|
45792
|
+
const evTrait = emitted.source?.trait;
|
|
45793
|
+
if (!evTrait) {
|
|
45794
|
+
xOrbitalLog.warn("emit:dropped-no-source", { event: emitted.event, origin });
|
|
45795
|
+
return;
|
|
45796
|
+
}
|
|
45797
|
+
const key = emitted.source?.orbital ? `UI:${emitted.source.orbital}.${evTrait}.${emitted.event}` : `UI:${evTrait}.${emitted.event}`;
|
|
45798
|
+
xOrbitalLog.info("emit:rebroadcast", {
|
|
45799
|
+
busKey: key,
|
|
45800
|
+
sourceOrbital: emitted.source?.orbital,
|
|
45801
|
+
sourceTrait: evTrait,
|
|
45802
|
+
origin
|
|
45803
|
+
});
|
|
45804
|
+
eventBus.emit(key, emitted.payload);
|
|
45805
|
+
}
|
|
45806
|
+
function isBusPushEnvelope(value) {
|
|
45807
|
+
return value.type === "bus" && typeof value.event === "string";
|
|
45808
|
+
}
|
|
45809
|
+
var tabClientId;
|
|
45810
|
+
function getTabClientId() {
|
|
45811
|
+
if (tabClientId === void 0) tabClientId = crypto.randomUUID();
|
|
45812
|
+
return tabClientId;
|
|
45813
|
+
}
|
|
45814
|
+
var pushChannels = /* @__PURE__ */ new Map();
|
|
45815
|
+
function acquirePushChannel(url, subscriber) {
|
|
45816
|
+
let channel = pushChannels.get(url);
|
|
45817
|
+
if (channel === void 0) {
|
|
45818
|
+
const source = new EventSource(url);
|
|
45819
|
+
const created = { source, subscribers: /* @__PURE__ */ new Set() };
|
|
45820
|
+
source.onmessage = (ev) => {
|
|
45821
|
+
let parsed;
|
|
45822
|
+
try {
|
|
45823
|
+
parsed = JSON.parse(ev.data);
|
|
45824
|
+
} catch (err) {
|
|
45825
|
+
serverBridgeLog.warn("push:parse-failed", { error: err instanceof Error ? err.message : String(err) });
|
|
45826
|
+
return;
|
|
45827
|
+
}
|
|
45828
|
+
if (!isBusPushEnvelope(parsed)) return;
|
|
45829
|
+
for (const sub of created.subscribers) sub(parsed);
|
|
45830
|
+
};
|
|
45831
|
+
source.onerror = () => {
|
|
45832
|
+
serverBridgeLog.warn("push:connection-error", { url });
|
|
45833
|
+
};
|
|
45834
|
+
pushChannels.set(url, created);
|
|
45835
|
+
channel = created;
|
|
45836
|
+
}
|
|
45837
|
+
channel.subscribers.add(subscriber);
|
|
45838
|
+
return () => {
|
|
45839
|
+
channel.subscribers.delete(subscriber);
|
|
45840
|
+
if (channel.subscribers.size === 0) {
|
|
45841
|
+
channel.source.close();
|
|
45842
|
+
pushChannels.delete(url);
|
|
45843
|
+
}
|
|
45844
|
+
};
|
|
45845
|
+
}
|
|
45846
|
+
function deriveEventsUrl(serverUrl) {
|
|
45847
|
+
const trimmed = serverUrl.replace(/\/+$/, "");
|
|
45848
|
+
const apiRoot = trimmed.replace(/\/[^/]*$/, "");
|
|
45849
|
+
return `${apiRoot}/events`;
|
|
45850
|
+
}
|
|
45732
45851
|
function createHttpTransport(serverUrl) {
|
|
45733
45852
|
return {
|
|
45734
45853
|
register: async (schema) => {
|
|
@@ -45755,11 +45874,12 @@ function createHttpTransport(serverUrl) {
|
|
|
45755
45874
|
} catch {
|
|
45756
45875
|
}
|
|
45757
45876
|
},
|
|
45758
|
-
sendEvent: async (orbitalName, event, payload) => {
|
|
45877
|
+
sendEvent: async (orbitalName, event, payload, clientId) => {
|
|
45878
|
+
const body = { event, payload, clientId };
|
|
45759
45879
|
const res = await fetch(`${serverUrl}/${orbitalName}/events`, {
|
|
45760
45880
|
method: "POST",
|
|
45761
45881
|
headers: { "Content-Type": "application/json" },
|
|
45762
|
-
body: JSON.stringify(
|
|
45882
|
+
body: JSON.stringify(body)
|
|
45763
45883
|
});
|
|
45764
45884
|
return res.json();
|
|
45765
45885
|
}
|
|
@@ -45804,7 +45924,7 @@ function ServerBridgeProvider({
|
|
|
45804
45924
|
const emptyMeta = { success: false, clientEffects: 0, dataEntities: {}, emittedEvents: [] };
|
|
45805
45925
|
if (!connected) return { effects: [], meta: emptyMeta };
|
|
45806
45926
|
try {
|
|
45807
|
-
const result = await transport.sendEvent(orbitalName, event, payload);
|
|
45927
|
+
const result = await transport.sendEvent(orbitalName, event, payload, getTabClientId());
|
|
45808
45928
|
const effects = [];
|
|
45809
45929
|
const responseData = result.data || {};
|
|
45810
45930
|
const dataEntities = {};
|
|
@@ -45849,22 +45969,7 @@ function ServerBridgeProvider({
|
|
|
45849
45969
|
}
|
|
45850
45970
|
if (result.emittedEvents) {
|
|
45851
45971
|
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);
|
|
45972
|
+
reEmitServerEvent(eventBus, emitted, orbitalName);
|
|
45868
45973
|
}
|
|
45869
45974
|
}
|
|
45870
45975
|
} else if (result.error) {
|
|
@@ -45906,6 +46011,19 @@ function ServerBridgeProvider({
|
|
|
45906
46011
|
unregisterSchema();
|
|
45907
46012
|
};
|
|
45908
46013
|
}, [schema, registerSchema, unregisterSchema]);
|
|
46014
|
+
React84.useEffect(() => {
|
|
46015
|
+
if (!serverUrl) return;
|
|
46016
|
+
if (typeof EventSource === "undefined") return;
|
|
46017
|
+
const url = `${deriveEventsUrl(serverUrl)}?clientId=${encodeURIComponent(getTabClientId())}`;
|
|
46018
|
+
return acquirePushChannel(url, (parsed) => {
|
|
46019
|
+
serverBridgeLog.debug("push:received", {
|
|
46020
|
+
event: parsed.event,
|
|
46021
|
+
sourceOrbital: parsed.source?.orbital,
|
|
46022
|
+
sourceTrait: parsed.source?.trait
|
|
46023
|
+
});
|
|
46024
|
+
reEmitServerEvent(eventBus, parsed, "push");
|
|
46025
|
+
});
|
|
46026
|
+
}, [serverUrl, eventBus]);
|
|
45909
46027
|
return /* @__PURE__ */ jsxRuntime.jsx(ServerBridgeContext.Provider, { value: { connected, sendEvent }, children });
|
|
45910
46028
|
}
|
|
45911
46029
|
var log12 = logger.createLogger("almadar:ui:trait-provider");
|
|
@@ -46114,12 +46232,14 @@ exports.TraitScopeProvider = TraitScopeProvider3;
|
|
|
46114
46232
|
exports.UserContext = UserContext;
|
|
46115
46233
|
exports.UserProvider = UserProvider;
|
|
46116
46234
|
exports.VerificationProvider = VerificationProvider;
|
|
46235
|
+
exports.comparePathSpecificity = comparePathSpecificity2;
|
|
46117
46236
|
exports.extractRouteParams = extractRouteParams2;
|
|
46118
46237
|
exports.findPageByName = findPageByName2;
|
|
46119
46238
|
exports.findPageByPath = findPageByPath2;
|
|
46120
46239
|
exports.getAllPages = getAllPages2;
|
|
46121
46240
|
exports.getDefaultPage = getDefaultPage2;
|
|
46122
46241
|
exports.matchPath = matchPath2;
|
|
46242
|
+
exports.matchPathAmong = matchPathAmong2;
|
|
46123
46243
|
exports.pathMatches = pathMatches2;
|
|
46124
46244
|
exports.useActivePage = useActivePage2;
|
|
46125
46245
|
exports.useCurrentPagePath = useCurrentPagePath2;
|