@almadar/ui 5.122.14 → 5.124.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{TraitProvider-YkK6tXDw.d.cts → TraitProvider-Ch79cUcb.d.cts} +6 -1
- package/dist/{TraitProvider-YkK6tXDw.d.ts → TraitProvider-Ch79cUcb.d.ts} +6 -1
- package/dist/{UserContext-bziZwgFL.d.cts → UserContext-BKckAUv7.d.cts} +5 -5
- package/dist/{UserContext-bziZwgFL.d.ts → UserContext-BKckAUv7.d.ts} +5 -5
- package/dist/avl/index.cjs +354 -234
- package/dist/avl/index.js +356 -236
- package/dist/components/index.cjs +273 -198
- package/dist/components/index.d.cts +18 -12
- package/dist/components/index.d.ts +18 -12
- package/dist/components/index.js +273 -198
- package/dist/context/index.cjs +34 -66
- package/dist/context/index.d.cts +1 -1
- package/dist/context/index.d.ts +1 -1
- package/dist/context/index.js +34 -66
- package/dist/hooks/index.cjs +8 -0
- package/dist/hooks/index.js +8 -0
- package/dist/lib/drawable/three/index.cjs +6 -0
- package/dist/lib/drawable/three/index.js +6 -0
- package/dist/marketing/index.cjs +7 -0
- package/dist/marketing/index.js +7 -0
- package/dist/providers/index.cjs +343 -217
- package/dist/providers/index.d.cts +6 -6
- package/dist/providers/index.d.ts +6 -6
- package/dist/providers/index.js +343 -217
- package/dist/runtime/index.cjs +347 -227
- package/dist/runtime/index.d.cts +4 -2
- package/dist/runtime/index.d.ts +4 -2
- package/dist/runtime/index.js +349 -229
- package/package.json +8 -7
- package/themes/_contract.md +2 -0
- package/themes/almadar-website.css +3 -3
- package/themes/almadar.css +4 -4
- package/themes/bloomberg-dense.css +2 -2
- package/themes/clay.css +417 -0
- package/themes/corporate.css +411 -0
- package/themes/game-adventure.css +3 -3
- package/themes/game-rpg.css +2 -2
- package/themes/game-sci-fi.css +1 -1
- package/themes/game-ui-pack.css +2 -2
- package/themes/gazette.css +2 -2
- package/themes/glass.css +428 -0
- package/themes/index.css +9 -13
- package/themes/kiosk.css +5 -5
- package/themes/linear-clean.css +1 -1
- package/themes/minimalist.css +2 -2
- package/themes/neon.css +3 -3
- package/themes/notion-editorial.css +1 -1
- package/themes/prism.css +3 -3
- package/themes/retro.css +410 -0
- package/themes/terminal.css +1 -1
- package/themes/trait-wars.css +8 -8
- package/themes/wireframe.css +2 -2
- package/themes/arctic.css +0 -235
- package/themes/copper.css +0 -235
- package/themes/ember.css +0 -238
- package/themes/forest.css +0 -238
- package/themes/lavender.css +0 -233
- package/themes/midnight.css +0 -234
- package/themes/ocean.css +0 -238
- package/themes/rose.css +0 -233
- package/themes/sand.css +0 -234
- package/themes/slate.css +0 -233
- package/themes/sunset.css +0 -238
package/dist/runtime/index.cjs
CHANGED
|
@@ -1642,6 +1642,7 @@ var init_Button = __esm({
|
|
|
1642
1642
|
"button",
|
|
1643
1643
|
{
|
|
1644
1644
|
ref,
|
|
1645
|
+
type: "button",
|
|
1645
1646
|
disabled: disabled || isLoading,
|
|
1646
1647
|
className: cn(
|
|
1647
1648
|
"relative inline-flex items-center justify-center gap-2",
|
|
@@ -1735,6 +1736,11 @@ var init_Typography = __esm({
|
|
|
1735
1736
|
inherit: "text-inherit"
|
|
1736
1737
|
};
|
|
1737
1738
|
weightStyles = {
|
|
1739
|
+
// Neutral: an atom default of "none" must not override the variant's baked
|
|
1740
|
+
// weight (C-PATTERN-ENUM-BLOCKS-NEUTRAL-OVERRIDE — `variant={h2}` rendered
|
|
1741
|
+
// tiny because the ui-typography atom's `weight: light`/`size: xs` defaults
|
|
1742
|
+
// clobbered every variant).
|
|
1743
|
+
none: "",
|
|
1738
1744
|
light: "font-light",
|
|
1739
1745
|
normal: "font-normal",
|
|
1740
1746
|
medium: "font-medium",
|
|
@@ -1760,6 +1766,7 @@ var init_Typography = __esm({
|
|
|
1760
1766
|
label: "span"
|
|
1761
1767
|
};
|
|
1762
1768
|
typographySizeStyles = {
|
|
1769
|
+
none: "",
|
|
1763
1770
|
xs: "text-xs",
|
|
1764
1771
|
sm: "text-sm",
|
|
1765
1772
|
md: "text-base",
|
|
@@ -5169,15 +5176,15 @@ var init_TextHighlight = __esm({
|
|
|
5169
5176
|
const typeStyles = {
|
|
5170
5177
|
question: cn(
|
|
5171
5178
|
// Blue border for questions
|
|
5172
|
-
"bg-card border-b-2 border-primary
|
|
5179
|
+
"bg-card border-b-2 border-primary",
|
|
5173
5180
|
"hover:bg-muted",
|
|
5174
|
-
isActive && "bg-primary
|
|
5181
|
+
isActive && "bg-primary/10 ring-2 ring-primary"
|
|
5175
5182
|
),
|
|
5176
5183
|
note: cn(
|
|
5177
5184
|
// Yellow border for notes
|
|
5178
|
-
"bg-card border-b-2 border-
|
|
5185
|
+
"bg-card border-b-2 border-warning",
|
|
5179
5186
|
"hover:bg-muted",
|
|
5180
|
-
isActive && "bg-
|
|
5187
|
+
isActive && "bg-warning/10 ring-2 ring-warning"
|
|
5181
5188
|
)
|
|
5182
5189
|
};
|
|
5183
5190
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -5523,7 +5530,7 @@ function DayCell({
|
|
|
5523
5530
|
{
|
|
5524
5531
|
className: cn(
|
|
5525
5532
|
"p-2 text-center cursor-pointer hover:bg-muted transition-colors",
|
|
5526
|
-
isToday && "bg-
|
|
5533
|
+
isToday && "bg-primary/10",
|
|
5527
5534
|
className
|
|
5528
5535
|
),
|
|
5529
5536
|
onClick: handleClick,
|
|
@@ -5534,7 +5541,7 @@ function DayCell({
|
|
|
5534
5541
|
variant: "small",
|
|
5535
5542
|
className: cn(
|
|
5536
5543
|
"font-medium",
|
|
5537
|
-
isToday ? "text-
|
|
5544
|
+
isToday ? "text-primary" : "text-muted-foreground"
|
|
5538
5545
|
),
|
|
5539
5546
|
children: dayAbbr
|
|
5540
5547
|
}
|
|
@@ -5546,7 +5553,7 @@ function DayCell({
|
|
|
5546
5553
|
rounded: "full",
|
|
5547
5554
|
className: cn(
|
|
5548
5555
|
"h-8 w-8 mx-auto items-center justify-center",
|
|
5549
|
-
isToday && "bg-
|
|
5556
|
+
isToday && "bg-primary text-primary-foreground"
|
|
5550
5557
|
),
|
|
5551
5558
|
children: /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body", className: "font-semibold", children: safeDate.getDate() })
|
|
5552
5559
|
}
|
|
@@ -12258,19 +12265,19 @@ var init_ActivationBlock = __esm({
|
|
|
12258
12265
|
"div",
|
|
12259
12266
|
{
|
|
12260
12267
|
className: cn(
|
|
12261
|
-
"bg-
|
|
12268
|
+
"bg-primary/10 border-2 border-primary rounded-lg p-5 mb-6",
|
|
12262
12269
|
className
|
|
12263
12270
|
),
|
|
12264
12271
|
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-3", children: [
|
|
12265
|
-
/* @__PURE__ */ jsxRuntime.jsx(LucideIcons2.Lightbulb, { className: "text-
|
|
12272
|
+
/* @__PURE__ */ jsxRuntime.jsx(LucideIcons2.Lightbulb, { className: "text-primary flex-shrink-0 mt-1", size: 24 }),
|
|
12266
12273
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1", children: [
|
|
12267
|
-
/* @__PURE__ */ jsxRuntime.jsx("h4", { className: "font-semibold text-
|
|
12268
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-
|
|
12274
|
+
/* @__PURE__ */ jsxRuntime.jsx("h4", { className: "font-semibold text-primary mb-2", children: "Before You Begin..." }),
|
|
12275
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-foreground mb-3 text-sm md:text-base", children: question }),
|
|
12269
12276
|
isExpanded ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
12270
12277
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
12271
12278
|
"textarea",
|
|
12272
12279
|
{
|
|
12273
|
-
className: "w-full p-3 border border-
|
|
12280
|
+
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",
|
|
12274
12281
|
placeholder: "Jot down your thoughts...",
|
|
12275
12282
|
value: response,
|
|
12276
12283
|
onChange: (e) => setResponse(e.target.value),
|
|
@@ -12282,7 +12289,7 @@ var init_ActivationBlock = __esm({
|
|
|
12282
12289
|
"button",
|
|
12283
12290
|
{
|
|
12284
12291
|
onClick: handleSubmit,
|
|
12285
|
-
className: "px-4 py-2 bg-
|
|
12292
|
+
className: "px-4 py-2 bg-primary text-primary-foreground rounded-md hover:bg-primary-hover text-sm font-medium transition-colors",
|
|
12286
12293
|
children: "Continue to Lesson \u2192"
|
|
12287
12294
|
}
|
|
12288
12295
|
),
|
|
@@ -12293,7 +12300,7 @@ var init_ActivationBlock = __esm({
|
|
|
12293
12300
|
emit(`UI:${saveEvent}`, { response: "" });
|
|
12294
12301
|
setIsExpanded(false);
|
|
12295
12302
|
},
|
|
12296
|
-
className: "px-4 py-2 text-
|
|
12303
|
+
className: "px-4 py-2 text-primary hover:underline text-sm",
|
|
12297
12304
|
children: "Skip for now"
|
|
12298
12305
|
}
|
|
12299
12306
|
)
|
|
@@ -12302,7 +12309,7 @@ var init_ActivationBlock = __esm({
|
|
|
12302
12309
|
"button",
|
|
12303
12310
|
{
|
|
12304
12311
|
onClick: () => setIsExpanded(true),
|
|
12305
|
-
className: "text-sm text-
|
|
12312
|
+
className: "text-sm text-primary hover:underline font-medium",
|
|
12306
12313
|
children: "\u2713 Answered \xB7 Edit response"
|
|
12307
12314
|
}
|
|
12308
12315
|
)
|
|
@@ -12806,7 +12813,7 @@ var init_AuthLayout = __esm({
|
|
|
12806
12813
|
VStack,
|
|
12807
12814
|
{
|
|
12808
12815
|
className: cn(
|
|
12809
|
-
"hidden lg:flex lg:w-1/2 bg-primary
|
|
12816
|
+
"hidden lg:flex lg:w-1/2 bg-primary relative overflow-hidden",
|
|
12810
12817
|
"justify-between p-12"
|
|
12811
12818
|
),
|
|
12812
12819
|
style: backgroundImage ? {
|
|
@@ -12815,7 +12822,7 @@ var init_AuthLayout = __esm({
|
|
|
12815
12822
|
} : void 0,
|
|
12816
12823
|
gap: "none",
|
|
12817
12824
|
children: [
|
|
12818
|
-
/* @__PURE__ */ jsxRuntime.jsx(Box, { className: "absolute inset-0 bg-gradient-to-br from-primary
|
|
12825
|
+
/* @__PURE__ */ jsxRuntime.jsx(Box, { className: "absolute inset-0 bg-gradient-to-br from-primary/90 to-primary-hover/90" }),
|
|
12819
12826
|
/* @__PURE__ */ jsxRuntime.jsx(Box, { className: "relative z-10", children: /* @__PURE__ */ jsxRuntime.jsxs(reactRouterDom.Link, { to: "/", className: "flex items-center gap-3", children: [
|
|
12820
12827
|
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(
|
|
12821
12828
|
Typography,
|
|
@@ -12900,7 +12907,7 @@ var init_AuthLayout = __esm({
|
|
|
12900
12907
|
),
|
|
12901
12908
|
children: /* @__PURE__ */ jsxRuntime.jsxs(Box, { className: "w-full max-w-md", children: [
|
|
12902
12909
|
/* @__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: [
|
|
12903
|
-
logo || /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "w-12 h-12 bg-primary
|
|
12910
|
+
logo || /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "w-12 h-12 bg-primary rounded-xl flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
12904
12911
|
Typography,
|
|
12905
12912
|
{
|
|
12906
12913
|
variant: "body1",
|
|
@@ -14891,7 +14898,7 @@ var init_CodeBlock = __esm({
|
|
|
14891
14898
|
{
|
|
14892
14899
|
justify: "between",
|
|
14893
14900
|
align: "center",
|
|
14894
|
-
className: "px-3 py-2 bg-[var(--color-card)] rounded-t-lg border-b border-
|
|
14901
|
+
className: "px-3 py-2 bg-[var(--color-card)] rounded-t-lg border-b border-border",
|
|
14895
14902
|
children: [
|
|
14896
14903
|
showLanguageBadge && /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: "default", size: "sm", children: language }),
|
|
14897
14904
|
effectiveCopy && /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -14900,9 +14907,9 @@ var init_CodeBlock = __esm({
|
|
|
14900
14907
|
variant: "ghost",
|
|
14901
14908
|
size: "sm",
|
|
14902
14909
|
onClick: handleCopy,
|
|
14903
|
-
className: "opacity-0 group-hover:opacity-100 focus:opacity-100 transition-opacity text-muted-foreground hover:text-
|
|
14910
|
+
className: "opacity-0 group-hover:opacity-100 focus:opacity-100 transition-opacity text-muted-foreground hover:text-foreground",
|
|
14904
14911
|
"aria-label": t("common.copy"),
|
|
14905
|
-
children: copied ? /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: "check", className: "w-4 h-4 text-
|
|
14912
|
+
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" })
|
|
14906
14913
|
}
|
|
14907
14914
|
)
|
|
14908
14915
|
]
|
|
@@ -15270,12 +15277,12 @@ var init_BloomQuizBlock = __esm({
|
|
|
15270
15277
|
init_useEventBus();
|
|
15271
15278
|
init_cn();
|
|
15272
15279
|
BLOOM_CONFIG = {
|
|
15273
|
-
remember: { color: "bg-
|
|
15274
|
-
understand: { color: "bg-
|
|
15275
|
-
apply: { color: "bg-
|
|
15276
|
-
analyze: { color: "bg-
|
|
15277
|
-
evaluate: { color: "bg-
|
|
15278
|
-
create: { color: "bg-
|
|
15280
|
+
remember: { color: "bg-secondary text-secondary-foreground", bgColor: "bg-muted", label: "Remember" },
|
|
15281
|
+
understand: { color: "bg-info text-info-foreground", bgColor: "bg-info/10", label: "Understand" },
|
|
15282
|
+
apply: { color: "bg-success text-success-foreground", bgColor: "bg-success/10", label: "Apply" },
|
|
15283
|
+
analyze: { color: "bg-warning text-warning-foreground", bgColor: "bg-warning/10", label: "Analyze" },
|
|
15284
|
+
evaluate: { color: "bg-accent text-accent-foreground", bgColor: "bg-accent/10", label: "Evaluate" },
|
|
15285
|
+
create: { color: "bg-primary text-primary-foreground", bgColor: "bg-primary/10", label: "Create" }
|
|
15279
15286
|
};
|
|
15280
15287
|
BloomQuizBlock = ({
|
|
15281
15288
|
level,
|
|
@@ -15301,22 +15308,22 @@ var init_BloomQuizBlock = __esm({
|
|
|
15301
15308
|
"div",
|
|
15302
15309
|
{
|
|
15303
15310
|
className: cn(
|
|
15304
|
-
"rounded-lg border border-
|
|
15311
|
+
"rounded-lg border border-primary p-4 my-4 transition-all",
|
|
15305
15312
|
config.bgColor,
|
|
15306
15313
|
className
|
|
15307
15314
|
),
|
|
15308
15315
|
children: [
|
|
15309
15316
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between mb-3", children: [
|
|
15310
15317
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 flex-wrap", children: [
|
|
15311
|
-
index !== void 0 && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-
|
|
15318
|
+
index !== void 0 && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-muted-foreground font-medium text-sm", children: [
|
|
15312
15319
|
"Question ",
|
|
15313
15320
|
index + 1
|
|
15314
15321
|
] }),
|
|
15315
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: cn(config.color, "text-
|
|
15322
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: cn(config.color, "text-xs px-2 py-1 rounded-full font-medium"), children: config.label })
|
|
15316
15323
|
] }),
|
|
15317
|
-
isAnswered && /* @__PURE__ */ jsxRuntime.jsx(LucideIcons2.CheckCircle, { className: "text-
|
|
15324
|
+
isAnswered && /* @__PURE__ */ jsxRuntime.jsx(LucideIcons2.CheckCircle, { className: "text-success flex-shrink-0", size: 20 })
|
|
15318
15325
|
] }),
|
|
15319
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "font-semibold text-
|
|
15326
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "font-semibold text-primary mb-3 space-y-2", children: questionSegments.map(
|
|
15320
15327
|
(segment, idx) => segment.type === "markdown" ? /* @__PURE__ */ jsxRuntime.jsx(MarkdownContent, { content: segment.content }, `q-md-${idx}`) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
15321
15328
|
CodeBlock,
|
|
15322
15329
|
{
|
|
@@ -15330,13 +15337,13 @@ var init_BloomQuizBlock = __esm({
|
|
|
15330
15337
|
"button",
|
|
15331
15338
|
{
|
|
15332
15339
|
type: "button",
|
|
15333
|
-
className: "inline-flex items-center rounded-md bg-
|
|
15340
|
+
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",
|
|
15334
15341
|
onClick: handleReveal,
|
|
15335
15342
|
children: revealed ? "Hide Answer" : "Reveal Answer"
|
|
15336
15343
|
}
|
|
15337
15344
|
),
|
|
15338
|
-
revealed && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rounded-lg bg-
|
|
15339
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-xs text-
|
|
15345
|
+
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: [
|
|
15346
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-xs text-muted-foreground mb-1 font-medium uppercase tracking-wide", children: "Answer:" }),
|
|
15340
15347
|
answerSegments.map(
|
|
15341
15348
|
(segment, idx) => segment.type === "markdown" ? /* @__PURE__ */ jsxRuntime.jsx(MarkdownContent, { content: segment.content }, `a-md-${idx}`) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
15342
15349
|
CodeBlock,
|
|
@@ -15560,12 +15567,12 @@ var init_QuizBlock = __esm({
|
|
|
15560
15567
|
}) => {
|
|
15561
15568
|
const { t } = hooks.useTranslate();
|
|
15562
15569
|
const [revealed, setRevealed] = React82.useState(false);
|
|
15563
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Card2, { className: cn("my-4 border-
|
|
15570
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Card2, { className: cn("my-4 border-primary", className), children: /* @__PURE__ */ jsxRuntime.jsxs(VStack, { gap: "sm", className: "p-4", children: [
|
|
15564
15571
|
/* @__PURE__ */ jsxRuntime.jsxs(HStack, { gap: "sm", align: "start", children: [
|
|
15565
|
-
/* @__PURE__ */ jsxRuntime.jsx(Icon, { icon: LucideIcons2.HelpCircle, size: "sm", className: "text-
|
|
15572
|
+
/* @__PURE__ */ jsxRuntime.jsx(Icon, { icon: LucideIcons2.HelpCircle, size: "sm", className: "text-primary mt-0.5 shrink-0" }),
|
|
15566
15573
|
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body", className: "font-medium", children: question })
|
|
15567
15574
|
] }),
|
|
15568
|
-
revealed ? /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "pl-7 pt-2 border-t border-
|
|
15575
|
+
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,
|
|
15569
15576
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
15570
15577
|
Button,
|
|
15571
15578
|
{
|
|
@@ -17477,7 +17484,7 @@ var init_BookTableOfContents = __esm({
|
|
|
17477
17484
|
className: cn(
|
|
17478
17485
|
"justify-start text-left w-full",
|
|
17479
17486
|
direction === "rtl" && "text-right",
|
|
17480
|
-
isCurrent && "bg-
|
|
17487
|
+
isCurrent && "bg-primary/10 text-primary"
|
|
17481
17488
|
),
|
|
17482
17489
|
children: /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "truncate", children: /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body", children: String(chapter.title ?? "") }) })
|
|
17483
17490
|
},
|
|
@@ -18658,7 +18665,7 @@ function CalendarGrid({
|
|
|
18658
18665
|
border: true,
|
|
18659
18666
|
className: cn(
|
|
18660
18667
|
"cursor-pointer hover:shadow-sm transition-shadow text-xs truncate",
|
|
18661
|
-
color ? color : "bg-
|
|
18668
|
+
color ? color : "bg-primary/10 border-primary/30 text-primary"
|
|
18662
18669
|
),
|
|
18663
18670
|
onClick: (e) => handleEventClick(event, e),
|
|
18664
18671
|
children: /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "truncate font-medium", children: event.title })
|
|
@@ -18756,7 +18763,7 @@ function CalendarGrid({
|
|
|
18756
18763
|
onClick: () => handleSlotClick(day, time),
|
|
18757
18764
|
className: cn(
|
|
18758
18765
|
"border-l border-border",
|
|
18759
|
-
isToday && "bg-
|
|
18766
|
+
isToday && "bg-primary/10"
|
|
18760
18767
|
),
|
|
18761
18768
|
...longPressEvent ? {
|
|
18762
18769
|
onPointerDown: () => startLongPress(day, time),
|
|
@@ -20772,31 +20779,31 @@ var init_CodeRunnerPanel = __esm({
|
|
|
20772
20779
|
}
|
|
20773
20780
|
)
|
|
20774
20781
|
] }),
|
|
20775
|
-
hasOutput && /* @__PURE__ */ jsxRuntime.jsxs(Box, { className: "rounded-lg border border-
|
|
20782
|
+
hasOutput && /* @__PURE__ */ jsxRuntime.jsxs(Box, { className: "rounded-lg border border-border bg-foreground overflow-hidden", children: [
|
|
20776
20783
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
20777
20784
|
HStack,
|
|
20778
20785
|
{
|
|
20779
20786
|
gap: "sm",
|
|
20780
20787
|
align: "center",
|
|
20781
|
-
className: "px-3 py-2 bg-
|
|
20788
|
+
className: "px-3 py-2 bg-card border-b border-border",
|
|
20782
20789
|
children: [
|
|
20783
|
-
/* @__PURE__ */ jsxRuntime.jsx(LucideIcons2.Terminal, { size: 16, className: "text-
|
|
20784
|
-
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-
|
|
20790
|
+
/* @__PURE__ */ jsxRuntime.jsx(LucideIcons2.Terminal, { size: 16, className: "text-muted-foreground" }),
|
|
20791
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-foreground font-medium", children: "Output" })
|
|
20785
20792
|
]
|
|
20786
20793
|
}
|
|
20787
20794
|
),
|
|
20788
|
-
/* @__PURE__ */ jsxRuntime.jsx(VStack, { gap: "none", className: "p-3 font-mono text-sm", children: error ? /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-
|
|
20789
|
-
output?.stdout ? /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-
|
|
20790
|
-
output?.stderr ? /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-
|
|
20791
|
-
!output?.stdout && !output?.stderr ? /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-
|
|
20792
|
-
output && output.testResults.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "mt-3 pt-3 border-t border-
|
|
20793
|
-
test.passed ? /* @__PURE__ */ jsxRuntime.jsx(LucideIcons2.CheckCircle, { size: 14, className: "text-
|
|
20795
|
+
/* @__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: [
|
|
20796
|
+
output?.stdout ? /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-background whitespace-pre-wrap", children: output.stdout }) : null,
|
|
20797
|
+
output?.stderr ? /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-error whitespace-pre-wrap", children: output.stderr }) : null,
|
|
20798
|
+
!output?.stdout && !output?.stderr ? /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-background italic", children: "No output" }) : null,
|
|
20799
|
+
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: [
|
|
20800
|
+
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" }),
|
|
20794
20801
|
/* @__PURE__ */ jsxRuntime.jsxs(VStack, { gap: "xs", className: "flex-1", children: [
|
|
20795
20802
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
20796
20803
|
Typography,
|
|
20797
20804
|
{
|
|
20798
20805
|
variant: "small",
|
|
20799
|
-
className: test.passed ? "text-
|
|
20806
|
+
className: test.passed ? "text-success" : "text-error",
|
|
20800
20807
|
children: [
|
|
20801
20808
|
"Test ",
|
|
20802
20809
|
index + 1,
|
|
@@ -20805,15 +20812,15 @@ var init_CodeRunnerPanel = __esm({
|
|
|
20805
20812
|
]
|
|
20806
20813
|
}
|
|
20807
20814
|
),
|
|
20808
|
-
/* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "small", className: "text-
|
|
20815
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "small", className: "text-background", children: [
|
|
20809
20816
|
"Input: ",
|
|
20810
20817
|
test.input
|
|
20811
20818
|
] }),
|
|
20812
|
-
/* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "small", className: "text-
|
|
20819
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "small", className: "text-background", children: [
|
|
20813
20820
|
"Expected: ",
|
|
20814
20821
|
test.expectedOutput
|
|
20815
20822
|
] }),
|
|
20816
|
-
/* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "small", className: "text-
|
|
20823
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "small", className: "text-background", children: [
|
|
20817
20824
|
"Actual: ",
|
|
20818
20825
|
test.actualOutput
|
|
20819
20826
|
] })
|
|
@@ -20998,14 +21005,14 @@ var init_ConnectionBlock = __esm({
|
|
|
20998
21005
|
"div",
|
|
20999
21006
|
{
|
|
21000
21007
|
className: cn(
|
|
21001
|
-
"bg-
|
|
21008
|
+
"bg-success/10 border-l-4 border-success rounded-r-lg p-5 mb-6",
|
|
21002
21009
|
className
|
|
21003
21010
|
),
|
|
21004
21011
|
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-3", children: [
|
|
21005
|
-
/* @__PURE__ */ jsxRuntime.jsx(LucideIcons2.Link2, { className: "text-
|
|
21012
|
+
/* @__PURE__ */ jsxRuntime.jsx(LucideIcons2.Link2, { className: "text-success flex-shrink-0 mt-1", size: 20 }),
|
|
21006
21013
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1", children: [
|
|
21007
|
-
/* @__PURE__ */ jsxRuntime.jsx("h4", { className: "font-semibold text-
|
|
21008
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "prose dark:prose-invert prose-sm max-w-none text-
|
|
21014
|
+
/* @__PURE__ */ jsxRuntime.jsx("h4", { className: "font-semibold text-success mb-2", children: "Building On What You Know" }),
|
|
21015
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "prose dark:prose-invert prose-sm max-w-none text-foreground", children: /* @__PURE__ */ jsxRuntime.jsx(MarkdownContent, { content }) })
|
|
21009
21016
|
] })
|
|
21010
21017
|
] })
|
|
21011
21018
|
}
|
|
@@ -21092,7 +21099,7 @@ function CounterStandard({
|
|
|
21092
21099
|
variant: "h1",
|
|
21093
21100
|
className: cn(
|
|
21094
21101
|
sizeStyles8[size].display,
|
|
21095
|
-
"font-bold tabular-nums text-primary
|
|
21102
|
+
"font-bold tabular-nums text-primary"
|
|
21096
21103
|
),
|
|
21097
21104
|
children: resolved.count
|
|
21098
21105
|
}
|
|
@@ -21165,7 +21172,7 @@ function CounterFull({
|
|
|
21165
21172
|
variant: "h1",
|
|
21166
21173
|
className: cn(
|
|
21167
21174
|
sizeStyles8[size].display,
|
|
21168
|
-
"font-bold tabular-nums text-primary
|
|
21175
|
+
"font-bold tabular-nums text-primary"
|
|
21169
21176
|
),
|
|
21170
21177
|
children: resolved.count
|
|
21171
21178
|
}
|
|
@@ -21412,11 +21419,11 @@ var init_DashboardLayout = __esm({
|
|
|
21412
21419
|
className: "h-16 px-4 border-b border-border dark:border-border",
|
|
21413
21420
|
children: [
|
|
21414
21421
|
/* @__PURE__ */ jsxRuntime.jsxs(reactRouterDom.Link, { to: "/", className: "flex items-center gap-2", children: [
|
|
21415
|
-
logo || /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "w-8 h-8 bg-primary
|
|
21422
|
+
logo || /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "w-8 h-8 bg-primary rounded-lg flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
21416
21423
|
Typography,
|
|
21417
21424
|
{
|
|
21418
21425
|
variant: "small",
|
|
21419
|
-
className: "text-
|
|
21426
|
+
className: "text-primary-foreground font-bold text-sm",
|
|
21420
21427
|
as: "span",
|
|
21421
21428
|
children: appName.charAt(0).toUpperCase()
|
|
21422
21429
|
}
|
|
@@ -21495,11 +21502,11 @@ var init_DashboardLayout = __esm({
|
|
|
21495
21502
|
className: "hidden @md/dashboard:flex items-center gap-1 overflow-x-auto",
|
|
21496
21503
|
children: [
|
|
21497
21504
|
/* @__PURE__ */ jsxRuntime.jsxs(reactRouterDom.Link, { to: "/", className: "flex items-center gap-2 mr-3 shrink-0", children: [
|
|
21498
|
-
logo || /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "w-7 h-7 bg-primary
|
|
21505
|
+
logo || /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "w-7 h-7 bg-primary rounded-lg flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
21499
21506
|
Typography,
|
|
21500
21507
|
{
|
|
21501
21508
|
variant: "small",
|
|
21502
|
-
className: "text-
|
|
21509
|
+
className: "text-primary-foreground font-bold text-xs",
|
|
21503
21510
|
as: "span",
|
|
21504
21511
|
children: appName.charAt(0).toUpperCase()
|
|
21505
21512
|
}
|
|
@@ -21559,8 +21566,8 @@ var init_DashboardLayout = __esm({
|
|
|
21559
21566
|
{
|
|
21560
21567
|
as: "span",
|
|
21561
21568
|
className: cn(
|
|
21562
|
-
"absolute -top-0.5 -right-0.5 min-w-[18px] h-[18px] px-1 rounded-full text-xs font-semibold
|
|
21563
|
-
action.variant === "danger" ? "bg-error" : action.variant === "primary" ? "bg-primary" : "bg-foreground"
|
|
21569
|
+
"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",
|
|
21570
|
+
action.variant === "danger" ? "bg-error text-error-foreground" : action.variant === "primary" ? "bg-primary text-primary-foreground" : "bg-foreground text-background"
|
|
21564
21571
|
),
|
|
21565
21572
|
children: action.badge
|
|
21566
21573
|
}
|
|
@@ -21582,7 +21589,7 @@ var init_DashboardLayout = __esm({
|
|
|
21582
21589
|
Box,
|
|
21583
21590
|
{
|
|
21584
21591
|
as: "span",
|
|
21585
|
-
className: "absolute -top-0.5 -right-0.5 min-w-[18px] h-[18px] px-1 bg-error rounded-full text-xs font-semibold text-
|
|
21592
|
+
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",
|
|
21586
21593
|
children: unreadCount > 99 ? "99+" : unreadCount
|
|
21587
21594
|
}
|
|
21588
21595
|
)
|
|
@@ -21865,7 +21872,7 @@ function SubMenu({
|
|
|
21865
21872
|
),
|
|
21866
21873
|
children: [
|
|
21867
21874
|
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" })),
|
|
21868
|
-
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: cn("flex-1", isDanger && "text-
|
|
21875
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: cn("flex-1", isDanger && "text-error"), children: item.label }),
|
|
21869
21876
|
item.badge !== void 0 && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-auto text-xs font-medium", children: item.badge })
|
|
21870
21877
|
]
|
|
21871
21878
|
},
|
|
@@ -21922,7 +21929,7 @@ function MenuItemRow({
|
|
|
21922
21929
|
Typography,
|
|
21923
21930
|
{
|
|
21924
21931
|
variant: "small",
|
|
21925
|
-
className: cn("flex-1", isDanger && "text-
|
|
21932
|
+
className: cn("flex-1", isDanger && "text-error"),
|
|
21926
21933
|
children: item.label
|
|
21927
21934
|
}
|
|
21928
21935
|
),
|
|
@@ -22690,14 +22697,25 @@ function DataGrid({
|
|
|
22690
22697
|
const bodyFields = fieldDefs.filter((f3) => f3 !== titleField && !badgeFields.includes(f3));
|
|
22691
22698
|
const primaryActions = actionDefs.filter((a) => a.variant !== "danger");
|
|
22692
22699
|
const dangerActions = actionDefs.filter((a) => a.variant === "danger");
|
|
22693
|
-
const
|
|
22694
|
-
|
|
22700
|
+
const fireAction = (action, itemData) => {
|
|
22701
|
+
if (action.navigatesTo) {
|
|
22702
|
+
const url = action.navigatesTo.replace(
|
|
22703
|
+
/\{\{row\.(\w+(?:\.\w+)*)\}\}/g,
|
|
22704
|
+
(_, field) => String(itemData[field] ?? "")
|
|
22705
|
+
);
|
|
22706
|
+
eventBus.emit("UI:NAVIGATE", { url, row: itemData });
|
|
22707
|
+
return;
|
|
22708
|
+
}
|
|
22695
22709
|
const payload = {
|
|
22696
22710
|
id: itemData.id,
|
|
22697
22711
|
row: itemData
|
|
22698
22712
|
};
|
|
22699
22713
|
eventBus.emit(`UI:${action.event}`, payload);
|
|
22700
22714
|
};
|
|
22715
|
+
const handleActionClick = (action, itemData) => (e) => {
|
|
22716
|
+
e.stopPropagation();
|
|
22717
|
+
fireAction(action, itemData);
|
|
22718
|
+
};
|
|
22701
22719
|
const hasRenderProp = typeof children === "function";
|
|
22702
22720
|
React82.useEffect(() => {
|
|
22703
22721
|
if (data.length > 0 && !hasRenderProp && fieldDefs.length === 0) {
|
|
@@ -22764,13 +22782,46 @@ function DataGrid({
|
|
|
22764
22782
|
const wrapDnd = (node) => dnd.isZone ? /* @__PURE__ */ jsxRuntime.jsx(dnd.SortableItem, { id: dndId, children: node }, dndId) : node;
|
|
22765
22783
|
if (hasRenderProp) {
|
|
22766
22784
|
return wrapDnd(
|
|
22767
|
-
/* @__PURE__ */ jsxRuntime.
|
|
22785
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
22768
22786
|
Box,
|
|
22769
22787
|
{
|
|
22770
22788
|
"data-entity-row": true,
|
|
22771
22789
|
"data-entity-id": id,
|
|
22772
22790
|
className: cn(isSelected && "ring-2 ring-primary rounded-lg"),
|
|
22773
|
-
children:
|
|
22791
|
+
children: [
|
|
22792
|
+
children(itemData, index),
|
|
22793
|
+
actionDefs.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "px-4 py-3 border-t border-border", children: /* @__PURE__ */ jsxRuntime.jsxs(HStack, { gap: "sm", className: "justify-end", children: [
|
|
22794
|
+
(maxInlineActions != null ? actionDefs.slice(0, maxInlineActions) : actionDefs).map((action, idx) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
22795
|
+
Button,
|
|
22796
|
+
{
|
|
22797
|
+
variant: action.variant === "primary" ? "primary" : "ghost",
|
|
22798
|
+
size: "sm",
|
|
22799
|
+
onClick: handleActionClick(action, itemData),
|
|
22800
|
+
"data-testid": `action-${action.event}`,
|
|
22801
|
+
"data-row-id": String(itemData.id),
|
|
22802
|
+
className: action.variant === "danger" ? "text-error hover:text-error hover:bg-error/10" : void 0,
|
|
22803
|
+
children: [
|
|
22804
|
+
action.icon && renderIconInput(action.icon, { size: "xs", className: "mr-1" }),
|
|
22805
|
+
action.label
|
|
22806
|
+
]
|
|
22807
|
+
},
|
|
22808
|
+
idx
|
|
22809
|
+
)),
|
|
22810
|
+
maxInlineActions != null && actionDefs.length > maxInlineActions && /* @__PURE__ */ jsxRuntime.jsx(
|
|
22811
|
+
Menu,
|
|
22812
|
+
{
|
|
22813
|
+
position: "bottom-end",
|
|
22814
|
+
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" }) }),
|
|
22815
|
+
items: actionDefs.slice(maxInlineActions).map((action) => ({
|
|
22816
|
+
label: action.label,
|
|
22817
|
+
icon: action.icon,
|
|
22818
|
+
event: action.event,
|
|
22819
|
+
onClick: () => fireAction(action, itemData)
|
|
22820
|
+
}))
|
|
22821
|
+
}
|
|
22822
|
+
)
|
|
22823
|
+
] }) })
|
|
22824
|
+
]
|
|
22774
22825
|
},
|
|
22775
22826
|
id
|
|
22776
22827
|
)
|
|
@@ -22907,10 +22958,7 @@ function DataGrid({
|
|
|
22907
22958
|
label: action.label,
|
|
22908
22959
|
icon: action.icon,
|
|
22909
22960
|
event: action.event,
|
|
22910
|
-
onClick: () =>
|
|
22911
|
-
id: itemData.id,
|
|
22912
|
-
row: itemData
|
|
22913
|
-
})
|
|
22961
|
+
onClick: () => fireAction(action, itemData)
|
|
22914
22962
|
}))
|
|
22915
22963
|
}
|
|
22916
22964
|
)
|
|
@@ -23730,7 +23778,9 @@ var init_FilterGroup = __esm({
|
|
|
23730
23778
|
showIcon = true,
|
|
23731
23779
|
query,
|
|
23732
23780
|
isLoading,
|
|
23733
|
-
look = "toolbar"
|
|
23781
|
+
look = "toolbar",
|
|
23782
|
+
event,
|
|
23783
|
+
clearEvent
|
|
23734
23784
|
}) => {
|
|
23735
23785
|
const { t } = hooks.useTranslate();
|
|
23736
23786
|
const eventBus = useEventBus();
|
|
@@ -23767,14 +23817,18 @@ var init_FilterGroup = __esm({
|
|
|
23767
23817
|
queryState.setFilter(field, value === "all" ? null : value);
|
|
23768
23818
|
}
|
|
23769
23819
|
onFilterChange?.(field, value === "all" ? null : value);
|
|
23770
|
-
|
|
23820
|
+
const payload = {
|
|
23771
23821
|
entity,
|
|
23772
23822
|
field,
|
|
23773
23823
|
value: value === "all" || value === null ? "" : value,
|
|
23774
23824
|
query
|
|
23775
|
-
}
|
|
23825
|
+
};
|
|
23826
|
+
if (event && event !== "FILTER") {
|
|
23827
|
+
eventBus.emit(`UI:${event}`, payload);
|
|
23828
|
+
}
|
|
23829
|
+
eventBus.emit("UI:FILTER", payload);
|
|
23776
23830
|
},
|
|
23777
|
-
[onFilterChange, queryState, eventBus, entity, query]
|
|
23831
|
+
[onFilterChange, queryState, eventBus, entity, query, event]
|
|
23778
23832
|
);
|
|
23779
23833
|
const handleClearAll = React82.useCallback(() => {
|
|
23780
23834
|
setSelectedValues({});
|
|
@@ -23782,8 +23836,11 @@ var init_FilterGroup = __esm({
|
|
|
23782
23836
|
queryState.clearFilters();
|
|
23783
23837
|
}
|
|
23784
23838
|
onClearAll?.();
|
|
23839
|
+
if (clearEvent && clearEvent !== "CLEAR_FILTERS") {
|
|
23840
|
+
eventBus.emit(`UI:${clearEvent}`, { entity, query });
|
|
23841
|
+
}
|
|
23785
23842
|
eventBus.emit("UI:CLEAR_FILTERS", { entity, query });
|
|
23786
|
-
}, [onClearAll, queryState, eventBus, entity, query]);
|
|
23843
|
+
}, [onClearAll, queryState, eventBus, entity, query, clearEvent]);
|
|
23787
23844
|
const activeFilterCount = Object.keys(selectedValues).length;
|
|
23788
23845
|
if (variant === "pills") {
|
|
23789
23846
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -24764,8 +24821,8 @@ var init_RelationSelect = __esm({
|
|
|
24764
24821
|
disabled,
|
|
24765
24822
|
className: cn(
|
|
24766
24823
|
"w-full justify-between font-normal",
|
|
24767
|
-
error && "border-
|
|
24768
|
-
isOpen && "ring-2 ring-primary
|
|
24824
|
+
error && "border-error/50 focus:border-error focus:ring-error",
|
|
24825
|
+
isOpen && "ring-2 ring-primary border-primary"
|
|
24769
24826
|
),
|
|
24770
24827
|
children: [
|
|
24771
24828
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -24845,7 +24902,7 @@ var init_RelationSelect = __esm({
|
|
|
24845
24902
|
paddingY: "sm",
|
|
24846
24903
|
className: cn(
|
|
24847
24904
|
"text-left text-sm hover:bg-muted focus:outline-none focus:bg-muted",
|
|
24848
|
-
option.value === value && "bg-primary
|
|
24905
|
+
option.value === value && "bg-primary/10 text-primary",
|
|
24849
24906
|
option.disabled && "opacity-50 cursor-not-allowed"
|
|
24850
24907
|
),
|
|
24851
24908
|
onClick: () => handleSelect(option),
|
|
@@ -24911,7 +24968,7 @@ var init_SearchInput = __esm({
|
|
|
24911
24968
|
queryState.setSearch(newValue);
|
|
24912
24969
|
}
|
|
24913
24970
|
onSearch?.(newValue);
|
|
24914
|
-
if (event) {
|
|
24971
|
+
if (event && event !== "SEARCH") {
|
|
24915
24972
|
eventBus.emit(`UI:${event}`, { searchTerm: newValue, entity });
|
|
24916
24973
|
}
|
|
24917
24974
|
if (event || entity || query) {
|
|
@@ -25002,7 +25059,7 @@ var init_SidePanel = __esm({
|
|
|
25002
25059
|
showOverlay && /* @__PURE__ */ jsxRuntime.jsx(Presence, { show: isOpen, animation: "overlay", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
25003
25060
|
Box,
|
|
25004
25061
|
{
|
|
25005
|
-
className: "fixed inset-0 bg-
|
|
25062
|
+
className: "fixed inset-0 bg-background/80 backdrop-blur-sm z-40 lg:hidden",
|
|
25006
25063
|
onClick: handleClose
|
|
25007
25064
|
}
|
|
25008
25065
|
) }),
|
|
@@ -25369,7 +25426,7 @@ var init_WizardNavigation = __esm({
|
|
|
25369
25426
|
/* @__PURE__ */ jsxRuntime.jsx(Icon, { name: "chevron-left", size: "sm" }),
|
|
25370
25427
|
resolvedBackLabel
|
|
25371
25428
|
] }) : /* @__PURE__ */ jsxRuntime.jsx(Box, {}),
|
|
25372
|
-
/* @__PURE__ */ jsxRuntime.jsx(HStack, { align: "center", gap: "sm", children: /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "caption", className: "text-
|
|
25429
|
+
/* @__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) }) }) }),
|
|
25373
25430
|
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: [
|
|
25374
25431
|
resolvedNextLabel,
|
|
25375
25432
|
/* @__PURE__ */ jsxRuntime.jsx(Icon, { name: "chevron-right", size: "sm" })
|
|
@@ -27526,6 +27583,7 @@ var init_Lightbox = __esm({
|
|
|
27526
27583
|
{
|
|
27527
27584
|
className: cn(
|
|
27528
27585
|
"fixed inset-0 z-50 flex items-center justify-center",
|
|
27586
|
+
// eslint-disable-next-line almadar/no-hardcoded-colors -- media overlay: lightbox scrim behind images
|
|
27529
27587
|
"bg-black bg-opacity-90",
|
|
27530
27588
|
className
|
|
27531
27589
|
),
|
|
@@ -27548,7 +27606,7 @@ var init_Lightbox = __esm({
|
|
|
27548
27606
|
"p-2 rounded-full",
|
|
27549
27607
|
"text-[var(--color-foreground)] bg-[var(--color-card)]",
|
|
27550
27608
|
"hover:bg-opacity-70 transition-opacity",
|
|
27551
|
-
"focus:outline-none focus:ring-2 focus:ring-
|
|
27609
|
+
"focus:outline-none focus:ring-2 focus:ring-ring"
|
|
27552
27610
|
),
|
|
27553
27611
|
"aria-label": t("aria.closeModal"),
|
|
27554
27612
|
children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: "x", className: "w-6 h-6" })
|
|
@@ -27567,7 +27625,7 @@ var init_Lightbox = __esm({
|
|
|
27567
27625
|
"p-2 rounded-full",
|
|
27568
27626
|
"text-[var(--color-foreground)] bg-[var(--color-card)]",
|
|
27569
27627
|
"hover:bg-opacity-70 transition-opacity",
|
|
27570
|
-
"focus:outline-none focus:ring-2 focus:ring-
|
|
27628
|
+
"focus:outline-none focus:ring-2 focus:ring-ring"
|
|
27571
27629
|
),
|
|
27572
27630
|
"aria-label": t("aria.previousImage"),
|
|
27573
27631
|
children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: "chevron-left", className: "w-8 h-8" })
|
|
@@ -27604,7 +27662,7 @@ var init_Lightbox = __esm({
|
|
|
27604
27662
|
"p-2 rounded-full",
|
|
27605
27663
|
"text-[var(--color-foreground)] bg-[var(--color-card)]",
|
|
27606
27664
|
"hover:bg-opacity-70 transition-opacity",
|
|
27607
|
-
"focus:outline-none focus:ring-2 focus:ring-
|
|
27665
|
+
"focus:outline-none focus:ring-2 focus:ring-ring"
|
|
27608
27666
|
),
|
|
27609
27667
|
"aria-label": t("aria.nextImage"),
|
|
27610
27668
|
children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: "chevron-right", className: "w-8 h-8" })
|
|
@@ -30539,6 +30597,7 @@ var init_QrScanner = __esm({
|
|
|
30539
30597
|
overflow: "hidden",
|
|
30540
30598
|
rounded: "sm",
|
|
30541
30599
|
className: cn(
|
|
30600
|
+
// eslint-disable-next-line almadar/no-hardcoded-colors -- media overlay: always over a dark scrim
|
|
30542
30601
|
"bg-black",
|
|
30543
30602
|
"aspect-square w-full max-w-md",
|
|
30544
30603
|
className
|
|
@@ -30603,7 +30662,9 @@ var init_QrScanner = __esm({
|
|
|
30603
30662
|
type: "button",
|
|
30604
30663
|
onClick: togglePause,
|
|
30605
30664
|
className: cn(
|
|
30665
|
+
// eslint-disable-next-line almadar/no-hardcoded-colors -- media overlay: always over a dark scrim
|
|
30606
30666
|
"rounded-full bg-black bg-opacity-60 p-2 text-white",
|
|
30667
|
+
// eslint-disable-next-line almadar/no-hardcoded-colors -- media overlay: always over a dark scrim
|
|
30607
30668
|
"hover:bg-opacity-80 focus:outline-none focus:ring-2 focus:ring-white"
|
|
30608
30669
|
),
|
|
30609
30670
|
"aria-label": isPaused ? t("qrScanner.resumeScanning") : t("qrScanner.pauseScanning"),
|
|
@@ -30616,7 +30677,9 @@ var init_QrScanner = __esm({
|
|
|
30616
30677
|
type: "button",
|
|
30617
30678
|
onClick: toggleFacing,
|
|
30618
30679
|
className: cn(
|
|
30680
|
+
// eslint-disable-next-line almadar/no-hardcoded-colors -- media overlay: always over a dark scrim
|
|
30619
30681
|
"rounded-full bg-black bg-opacity-60 p-2 text-white",
|
|
30682
|
+
// eslint-disable-next-line almadar/no-hardcoded-colors -- media overlay: always over a dark scrim
|
|
30620
30683
|
"hover:bg-opacity-80 focus:outline-none focus:ring-2 focus:ring-white"
|
|
30621
30684
|
),
|
|
30622
30685
|
"aria-label": currentFacing === "environment" ? t("qrScanner.switchToFrontCamera") : t("qrScanner.switchToRearCamera"),
|
|
@@ -30629,7 +30692,9 @@ var init_QrScanner = __esm({
|
|
|
30629
30692
|
type: "button",
|
|
30630
30693
|
onClick: handleMockScan,
|
|
30631
30694
|
className: cn(
|
|
30695
|
+
// eslint-disable-next-line almadar/no-hardcoded-colors -- media overlay: always over a dark scrim
|
|
30632
30696
|
"rounded-full bg-black bg-opacity-60 px-3 py-2 text-xs text-white",
|
|
30697
|
+
// eslint-disable-next-line almadar/no-hardcoded-colors -- media overlay: always over a dark scrim
|
|
30633
30698
|
"hover:bg-opacity-80 focus:outline-none focus:ring-2 focus:ring-white"
|
|
30634
30699
|
),
|
|
30635
30700
|
"aria-label": t("aria.mockScanDev"),
|
|
@@ -33365,10 +33430,10 @@ var init_ModuleCard = __esm({
|
|
|
33365
33430
|
init_avl_atom_types();
|
|
33366
33431
|
init_MiniStateMachine();
|
|
33367
33432
|
PERSISTENCE_BORDER = {
|
|
33368
|
-
persistent: "border-l-[3px] border-l-
|
|
33369
|
-
runtime: "border-l-[3px] border-l-
|
|
33370
|
-
singleton: "border-l-[3px] border-l-
|
|
33371
|
-
instance: "border-l-[3px] border-l-
|
|
33433
|
+
persistent: "border-l-[3px] border-l-primary border-solid",
|
|
33434
|
+
runtime: "border-l-[3px] border-l-primary border-dashed",
|
|
33435
|
+
singleton: "border-l-[3px] border-l-primary border-double",
|
|
33436
|
+
instance: "border-l-[3px] border-l-primary border-dotted"
|
|
33372
33437
|
};
|
|
33373
33438
|
PERSISTENCE_ICON = {
|
|
33374
33439
|
persistent: "\u26C1",
|
|
@@ -33398,8 +33463,8 @@ var init_ModuleCard = __esm({
|
|
|
33398
33463
|
className: "rounded-lg border border-[var(--color-border)] bg-[var(--color-card)] shadow-sm overflow-hidden",
|
|
33399
33464
|
style: { minWidth: 280, maxWidth: 400 },
|
|
33400
33465
|
children: [
|
|
33401
|
-
/* @__PURE__ */ jsxRuntime.jsx(react.Handle, { type: "target", position: react.Position.Left, className: "!w-2.5 !h-2.5 !bg-
|
|
33402
|
-
/* @__PURE__ */ jsxRuntime.jsx(react.Handle, { type: "source", position: react.Position.Right, className: "!w-2.5 !h-2.5 !bg-
|
|
33466
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.Handle, { type: "target", position: react.Position.Left, className: "!w-2.5 !h-2.5 !bg-warning" }),
|
|
33467
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.Handle, { type: "source", position: react.Position.Right, className: "!w-2.5 !h-2.5 !bg-warning" }),
|
|
33403
33468
|
/* @__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 }) }),
|
|
33404
33469
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: `px-3 py-2 border-b border-[var(--color-border)] ${PERSISTENCE_BORDER[persistence] ?? ""}`, children: [
|
|
33405
33470
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1.5 mb-1.5", children: [
|
|
@@ -35855,19 +35920,19 @@ var init_ReflectionBlock = __esm({
|
|
|
35855
35920
|
"div",
|
|
35856
35921
|
{
|
|
35857
35922
|
className: cn(
|
|
35858
|
-
"my-6 border-l-4 border-
|
|
35923
|
+
"my-6 border-l-4 border-warning bg-warning/10 rounded-r-lg p-4",
|
|
35859
35924
|
className
|
|
35860
35925
|
),
|
|
35861
35926
|
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-3", children: [
|
|
35862
|
-
/* @__PURE__ */ jsxRuntime.jsx(LucideIcons2.PauseCircle, { className: "text-
|
|
35927
|
+
/* @__PURE__ */ jsxRuntime.jsx(LucideIcons2.PauseCircle, { className: "text-warning flex-shrink-0 mt-1", size: 20 }),
|
|
35863
35928
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1", children: [
|
|
35864
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "font-medium text-
|
|
35865
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-
|
|
35929
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "font-medium text-warning mb-2", children: "Pause & Reflect" }),
|
|
35930
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-foreground text-sm mb-3", children: prompt }),
|
|
35866
35931
|
isExpanded ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
35867
35932
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
35868
35933
|
"textarea",
|
|
35869
35934
|
{
|
|
35870
|
-
className: "w-full p-2 border border-
|
|
35935
|
+
className: "w-full p-2 border border-input rounded text-sm bg-card text-foreground focus:ring-2 focus:ring-ring focus:border-transparent",
|
|
35871
35936
|
placeholder: "Your thoughts...",
|
|
35872
35937
|
value: note,
|
|
35873
35938
|
onChange: (e) => setNote(e.target.value),
|
|
@@ -35878,7 +35943,7 @@ var init_ReflectionBlock = __esm({
|
|
|
35878
35943
|
"button",
|
|
35879
35944
|
{
|
|
35880
35945
|
onClick: handleSave,
|
|
35881
|
-
className: "mt-2 text-sm px-3 py-1 bg-
|
|
35946
|
+
className: "mt-2 text-sm px-3 py-1 bg-warning text-warning-foreground rounded hover:opacity-90 transition-colors",
|
|
35882
35947
|
children: "Save & Continue"
|
|
35883
35948
|
}
|
|
35884
35949
|
)
|
|
@@ -35886,7 +35951,7 @@ var init_ReflectionBlock = __esm({
|
|
|
35886
35951
|
"button",
|
|
35887
35952
|
{
|
|
35888
35953
|
onClick: () => setIsExpanded(true),
|
|
35889
|
-
className: "text-sm text-
|
|
35954
|
+
className: "text-sm text-warning hover:underline",
|
|
35890
35955
|
children: savedNote ? "\u2713 Answered \xB7 Edit" : "Answer this question"
|
|
35891
35956
|
}
|
|
35892
35957
|
)
|
|
@@ -36172,7 +36237,7 @@ function DataTable({
|
|
|
36172
36237
|
)),
|
|
36173
36238
|
rowActions && /* @__PURE__ */ jsxRuntime.jsx("th", { className: "w-12 px-4 py-3" })
|
|
36174
36239
|
] }) }),
|
|
36175
|
-
/* @__PURE__ */ jsxRuntime.jsx("tbody", { className: "divide-y divide-
|
|
36240
|
+
/* @__PURE__ */ jsxRuntime.jsx("tbody", { className: "divide-y divide-border", children: isLoading ? /* @__PURE__ */ jsxRuntime.jsx("tr", { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
36176
36241
|
"td",
|
|
36177
36242
|
{
|
|
36178
36243
|
colSpan: normalizedColumns.length + (selectable ? 1 : 0) + (rowActions ? 1 : 0),
|
|
@@ -36543,7 +36608,7 @@ var init_DetailPanel = __esm({
|
|
|
36543
36608
|
};
|
|
36544
36609
|
const effectiveFieldNames = isFieldDefArray(propFields) ? normalizeFieldDefs(propFields) : fieldNames;
|
|
36545
36610
|
const fieldTypeMap = isFieldDefArray(propFields) ? buildFieldTypeMap(propFields) : {};
|
|
36546
|
-
React82.useCallback(
|
|
36611
|
+
const handleActionClick = React82.useCallback(
|
|
36547
36612
|
(action, data2) => {
|
|
36548
36613
|
if (action.navigatesTo) {
|
|
36549
36614
|
const url = action.navigatesTo.replace(
|
|
@@ -36735,8 +36800,9 @@ var init_DetailPanel = __esm({
|
|
|
36735
36800
|
{
|
|
36736
36801
|
variant: action.variant || "secondary",
|
|
36737
36802
|
size: "sm",
|
|
36738
|
-
action: action.event,
|
|
36803
|
+
action: action.navigatesTo ? void 0 : action.event,
|
|
36739
36804
|
actionPayload: { row: normalizedData },
|
|
36805
|
+
onClick: action.navigatesTo ? () => handleActionClick(action, normalizedData) : void 0,
|
|
36740
36806
|
icon: action.icon,
|
|
36741
36807
|
"data-testid": action.event ? `action-${action.event}` : void 0,
|
|
36742
36808
|
"data-row-id": normalizedData?.id !== void 0 ? String(normalizedData.id) : void 0,
|
|
@@ -38779,8 +38845,9 @@ var init_MediaGallery = __esm({
|
|
|
38779
38845
|
)
|
|
38780
38846
|
}
|
|
38781
38847
|
),
|
|
38782
|
-
item.caption &&
|
|
38783
|
-
|
|
38848
|
+
item.caption && // eslint-disable-next-line almadar/no-hardcoded-colors -- media overlay: caption scrim over image
|
|
38849
|
+
/* @__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 }) }),
|
|
38850
|
+
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" }) })
|
|
38784
38851
|
]
|
|
38785
38852
|
},
|
|
38786
38853
|
item.id
|
|
@@ -38809,7 +38876,7 @@ var init_MediaGallery = __esm({
|
|
|
38809
38876
|
size: "sm",
|
|
38810
38877
|
icon: LucideIcons2.X,
|
|
38811
38878
|
action: "LIGHTBOX_CLOSE",
|
|
38812
|
-
className: "text-
|
|
38879
|
+
className: "text-foreground hover:bg-muted/50"
|
|
38813
38880
|
}
|
|
38814
38881
|
) }),
|
|
38815
38882
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -38820,7 +38887,7 @@ var init_MediaGallery = __esm({
|
|
|
38820
38887
|
className: "max-w-full max-h-[80vh] object-contain rounded-md"
|
|
38821
38888
|
}
|
|
38822
38889
|
),
|
|
38823
|
-
lightboxItem.caption && /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body", className: "text-
|
|
38890
|
+
lightboxItem.caption && /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body", className: "text-foreground mt-3 text-center", children: lightboxItem.caption })
|
|
38824
38891
|
]
|
|
38825
38892
|
}
|
|
38826
38893
|
)
|
|
@@ -39281,7 +39348,7 @@ function WalkMinimap() {
|
|
|
39281
39348
|
{
|
|
39282
39349
|
variant,
|
|
39283
39350
|
size: "sm",
|
|
39284
|
-
className: `flex-shrink-0 text-[9px] ${isActive ? "ring-1 ring-
|
|
39351
|
+
className: `flex-shrink-0 text-[9px] ${isActive ? "ring-1 ring-info" : ""}`,
|
|
39285
39352
|
children: [
|
|
39286
39353
|
isDone ? "\u2713" : isActive ? "\u25CF" : "\u25CB",
|
|
39287
39354
|
" ",
|
|
@@ -39422,13 +39489,13 @@ function WalkMinimap() {
|
|
|
39422
39489
|
})
|
|
39423
39490
|
] }) }),
|
|
39424
39491
|
/* @__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: [
|
|
39425
|
-
/* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "caption", className: "text-xs font-mono text-
|
|
39492
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "caption", className: "text-xs font-mono text-success", children: [
|
|
39426
39493
|
"Engine: ",
|
|
39427
39494
|
engineCount,
|
|
39428
39495
|
"/",
|
|
39429
39496
|
totalTransitions
|
|
39430
39497
|
] }),
|
|
39431
|
-
domCount > 0 && /* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "caption", className: "text-xs font-mono text-
|
|
39498
|
+
domCount > 0 && /* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "caption", className: "text-xs font-mono text-info", children: [
|
|
39432
39499
|
"DOM: ",
|
|
39433
39500
|
domCount
|
|
39434
39501
|
] }),
|
|
@@ -39461,13 +39528,13 @@ function TraitsTab({ traits: traits2 }) {
|
|
|
39461
39528
|
const accordionItems = traits2.map((trait) => ({
|
|
39462
39529
|
id: trait.id,
|
|
39463
39530
|
header: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 w-full", children: [
|
|
39464
|
-
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body", weight: "semibold", className: "text-
|
|
39531
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body", weight: "semibold", className: "text-primary", children: trait.name }),
|
|
39465
39532
|
/* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: "success", size: "sm", children: trait.currentState }),
|
|
39466
|
-
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-
|
|
39533
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-muted-foreground ml-auto", children: t("debug.transitionsCount", { count: trait.transitionCount }) })
|
|
39467
39534
|
] }),
|
|
39468
39535
|
content: /* @__PURE__ */ jsxRuntime.jsxs(Stack, { gap: "sm", children: [
|
|
39469
39536
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
39470
|
-
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-
|
|
39537
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground mb-2", children: t("debug.states") }),
|
|
39471
39538
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-wrap gap-1", children: trait.states.map((state) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
39472
39539
|
Badge,
|
|
39473
39540
|
{
|
|
@@ -39479,18 +39546,18 @@ function TraitsTab({ traits: traits2 }) {
|
|
|
39479
39546
|
)) })
|
|
39480
39547
|
] }),
|
|
39481
39548
|
trait.transitions.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
39482
|
-
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-
|
|
39549
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground mb-2", children: t("debug.transitions") }),
|
|
39483
39550
|
/* @__PURE__ */ jsxRuntime.jsx(Stack, { gap: "xs", children: trait.transitions.map((t2, i) => /* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "small", className: "font-mono", children: [
|
|
39484
39551
|
t2.from,
|
|
39485
39552
|
" \u2192 ",
|
|
39486
39553
|
t2.to,
|
|
39487
39554
|
" ",
|
|
39488
|
-
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-
|
|
39555
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-muted-foreground", children: [
|
|
39489
39556
|
"(",
|
|
39490
39557
|
t2.event,
|
|
39491
39558
|
")"
|
|
39492
39559
|
] }),
|
|
39493
|
-
t2.guard && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-
|
|
39560
|
+
t2.guard && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-warning", children: [
|
|
39494
39561
|
" [",
|
|
39495
39562
|
t2.guard,
|
|
39496
39563
|
"]"
|
|
@@ -39498,7 +39565,7 @@ function TraitsTab({ traits: traits2 }) {
|
|
|
39498
39565
|
] }, i)) })
|
|
39499
39566
|
] }),
|
|
39500
39567
|
trait.guards.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
39501
|
-
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-
|
|
39568
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground mb-2", children: t("debug.guards") }),
|
|
39502
39569
|
/* @__PURE__ */ jsxRuntime.jsx(Stack, { gap: "xs", children: trait.guards.map((g, i) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
39503
39570
|
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", children: g.name }),
|
|
39504
39571
|
/* @__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" })
|
|
@@ -39541,11 +39608,11 @@ function TicksTab({ ticks: ticks2 }) {
|
|
|
39541
39608
|
};
|
|
39542
39609
|
const TickCard = ({ tick, active }) => /* @__PURE__ */ jsxRuntime.jsxs(Card, { className: `p-3 ${!active ? "opacity-50" : ""}`, children: [
|
|
39543
39610
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 mb-2", children: [
|
|
39544
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: `w-2 h-2 rounded-full ${active ? "bg-
|
|
39545
|
-
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body", weight: "semibold", className: "text-
|
|
39546
|
-
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-
|
|
39611
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: `w-2 h-2 rounded-full ${active ? "bg-success" : "bg-muted-foreground"}` }),
|
|
39612
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body", weight: "semibold", className: "text-warning", children: tick.name }),
|
|
39613
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-muted-foreground", children: tick.traitName })
|
|
39547
39614
|
] }),
|
|
39548
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-3 text-xs text-
|
|
39615
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-3 text-xs text-muted-foreground", children: [
|
|
39549
39616
|
/* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
|
|
39550
39617
|
tick.interval,
|
|
39551
39618
|
"ms"
|
|
@@ -39568,7 +39635,7 @@ function TicksTab({ ticks: ticks2 }) {
|
|
|
39568
39635
|
] });
|
|
39569
39636
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "debug-tab debug-tab--ticks", children: [
|
|
39570
39637
|
activeTicks.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-4", children: [
|
|
39571
|
-
/* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "small", weight: "medium", className: "text-
|
|
39638
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground mb-2", children: [
|
|
39572
39639
|
"Active (",
|
|
39573
39640
|
activeTicks.length,
|
|
39574
39641
|
")"
|
|
@@ -39576,7 +39643,7 @@ function TicksTab({ ticks: ticks2 }) {
|
|
|
39576
39643
|
/* @__PURE__ */ jsxRuntime.jsx(Stack, { gap: "sm", children: activeTicks.map((tick) => /* @__PURE__ */ jsxRuntime.jsx(TickCard, { tick, active: true }, tick.id)) })
|
|
39577
39644
|
] }),
|
|
39578
39645
|
inactiveTicks.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
39579
|
-
/* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "small", weight: "medium", className: "text-
|
|
39646
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground mb-2", children: [
|
|
39580
39647
|
"Inactive (",
|
|
39581
39648
|
inactiveTicks.length,
|
|
39582
39649
|
")"
|
|
@@ -39624,33 +39691,33 @@ function EntitiesTab({ snapshot }) {
|
|
|
39624
39691
|
id: `singleton-${name}`,
|
|
39625
39692
|
header: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
39626
39693
|
/* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: "primary", size: "sm", children: t("debug.singleton") }),
|
|
39627
|
-
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body", weight: "semibold", className: "text-
|
|
39694
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body", weight: "semibold", className: "text-info", children: name })
|
|
39628
39695
|
] }),
|
|
39629
|
-
content: /* @__PURE__ */ jsxRuntime.jsx("pre", { className: "text-xs text-
|
|
39696
|
+
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) })
|
|
39630
39697
|
}));
|
|
39631
39698
|
const runtimeItems = runtimeEntities.slice(0, 20).map((entity) => ({
|
|
39632
39699
|
id: entity.id,
|
|
39633
39700
|
header: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
39634
|
-
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body", weight: "semibold", className: "text-
|
|
39635
|
-
/* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "small", className: "text-
|
|
39701
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body", weight: "semibold", className: "text-info", children: entity.type }),
|
|
39702
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "small", className: "text-muted-foreground", children: [
|
|
39636
39703
|
"#",
|
|
39637
39704
|
entity.id.slice(0, 8)
|
|
39638
39705
|
] })
|
|
39639
39706
|
] }),
|
|
39640
|
-
content: /* @__PURE__ */ jsxRuntime.jsx("pre", { className: "text-xs text-
|
|
39707
|
+
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) })
|
|
39641
39708
|
}));
|
|
39642
39709
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "debug-tab debug-tab--entities", children: [
|
|
39643
39710
|
singletonItems.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-4", children: [
|
|
39644
|
-
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-
|
|
39711
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground mb-2", children: t("debug.singletonsCount", { count: singletonItems.length }) }),
|
|
39645
39712
|
/* @__PURE__ */ jsxRuntime.jsx(Accordion, { items: singletonItems, multiple: true })
|
|
39646
39713
|
] }),
|
|
39647
39714
|
runtimeItems.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-4", children: [
|
|
39648
|
-
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-
|
|
39715
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground mb-2", children: t("debug.runtimeCount", { count: runtimeEntities.length }) }),
|
|
39649
39716
|
/* @__PURE__ */ jsxRuntime.jsx(Accordion, { items: runtimeItems, multiple: true }),
|
|
39650
|
-
runtimeEntities.length > 20 && /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-
|
|
39717
|
+
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 }) })
|
|
39651
39718
|
] }),
|
|
39652
39719
|
persistentEntries.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
39653
|
-
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-
|
|
39720
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground mb-2", children: t("debug.persistent") }),
|
|
39654
39721
|
/* @__PURE__ */ jsxRuntime.jsx(Stack, { gap: "xs", children: persistentEntries.map(([type, info]) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between py-1", children: [
|
|
39655
39722
|
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", children: type }),
|
|
39656
39723
|
/* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: info.loaded ? "success" : "default", size: "sm", children: info.loaded ? t("debug.loadedCount", { count: info.count }) : t("debug.notLoaded") })
|
|
@@ -39735,7 +39802,7 @@ function EventFlowTab({ events: events2 }) {
|
|
|
39735
39802
|
);
|
|
39736
39803
|
})
|
|
39737
39804
|
] }),
|
|
39738
|
-
/* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex items-center gap-1 text-xs text-
|
|
39805
|
+
/* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex items-center gap-1 text-xs text-muted-foreground ml-auto cursor-pointer", children: [
|
|
39739
39806
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
39740
39807
|
Checkbox,
|
|
39741
39808
|
{
|
|
@@ -39750,18 +39817,18 @@ function EventFlowTab({ events: events2 }) {
|
|
|
39750
39817
|
"div",
|
|
39751
39818
|
{
|
|
39752
39819
|
ref: containerRef,
|
|
39753
|
-
className: "max-h-64 overflow-y-auto space-y-1 bg-
|
|
39820
|
+
className: "max-h-64 overflow-y-auto space-y-1 bg-muted rounded p-2",
|
|
39754
39821
|
children: filteredEvents.slice(-100).map((event) => {
|
|
39755
39822
|
const { variant, icon } = TYPE_BADGES[event.type] || { variant: "default", icon: "\u2022" };
|
|
39756
39823
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
39757
39824
|
"div",
|
|
39758
39825
|
{
|
|
39759
|
-
className: "flex items-start gap-2 text-xs py-1 hover:bg-
|
|
39826
|
+
className: "flex items-start gap-2 text-xs py-1 hover:bg-muted/50 rounded px-1",
|
|
39760
39827
|
children: [
|
|
39761
|
-
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-
|
|
39828
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-muted-foreground font-mono min-w-[65px]", children: formatTime2(event.timestamp) }),
|
|
39762
39829
|
/* @__PURE__ */ jsxRuntime.jsx("span", { children: icon }),
|
|
39763
39830
|
/* @__PURE__ */ jsxRuntime.jsx(Badge, { variant, size: "sm", className: "min-w-[60px] justify-center", children: event.source }),
|
|
39764
|
-
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-
|
|
39831
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-muted-foreground", children: event.message })
|
|
39765
39832
|
]
|
|
39766
39833
|
},
|
|
39767
39834
|
event.id
|
|
@@ -39825,21 +39892,21 @@ function GuardsPanel({ guards }) {
|
|
|
39825
39892
|
id: guard.id,
|
|
39826
39893
|
header: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 w-full", children: [
|
|
39827
39894
|
/* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: guard.result ? "success" : "danger", size: "sm", children: guard.result ? "\u2713" : "\u2717" }),
|
|
39828
|
-
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body", weight: "semibold", className: "text-
|
|
39829
|
-
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-
|
|
39830
|
-
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-
|
|
39895
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body", weight: "semibold", className: "text-warning", children: guard.guardName }),
|
|
39896
|
+
/* @__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 }),
|
|
39897
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-muted-foreground ml-auto", children: formatTime2(guard.timestamp) })
|
|
39831
39898
|
] }),
|
|
39832
39899
|
content: /* @__PURE__ */ jsxRuntime.jsxs(Stack, { gap: "sm", children: [
|
|
39833
39900
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
39834
|
-
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-
|
|
39835
|
-
/* @__PURE__ */ jsxRuntime.jsx("code", { className: "block mt-1 text-xs text-
|
|
39901
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground", children: t("debug.expression") }),
|
|
39902
|
+
/* @__PURE__ */ jsxRuntime.jsx("code", { className: "block mt-1 text-xs text-warning bg-warning/10 px-2 py-1 rounded", children: guard.expression })
|
|
39836
39903
|
] }),
|
|
39837
39904
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
39838
|
-
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-
|
|
39839
|
-
/* @__PURE__ */ jsxRuntime.jsx("pre", { className: "mt-1 text-xs text-
|
|
39905
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground", children: t("debug.inputs") }),
|
|
39906
|
+
/* @__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) })
|
|
39840
39907
|
] }),
|
|
39841
39908
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
39842
|
-
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-
|
|
39909
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground", children: t("debug.trait") }),
|
|
39843
39910
|
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", children: guard.context.traitName })
|
|
39844
39911
|
] })
|
|
39845
39912
|
] })
|
|
@@ -39895,7 +39962,7 @@ function VerificationTab({ checks, summary }) {
|
|
|
39895
39962
|
(a, b) => (sortOrder[a.status] ?? 4) - (sortOrder[b.status] ?? 4)
|
|
39896
39963
|
);
|
|
39897
39964
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "debug-tab debug-tab--verification", children: [
|
|
39898
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3 mb-3 p-2 bg-
|
|
39965
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3 mb-3 p-2 bg-muted rounded", children: [
|
|
39899
39966
|
/* @__PURE__ */ jsxRuntime.jsxs(Badge, { variant: "success", size: "sm", children: [
|
|
39900
39967
|
summary.passed,
|
|
39901
39968
|
" passed"
|
|
@@ -39912,7 +39979,7 @@ function VerificationTab({ checks, summary }) {
|
|
|
39912
39979
|
summary.pending,
|
|
39913
39980
|
" pending"
|
|
39914
39981
|
] }),
|
|
39915
|
-
/* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "small", className: "text-
|
|
39982
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "small", className: "text-muted-foreground ml-auto", children: [
|
|
39916
39983
|
summary.totalChecks,
|
|
39917
39984
|
" total checks"
|
|
39918
39985
|
] })
|
|
@@ -39922,12 +39989,12 @@ function VerificationTab({ checks, summary }) {
|
|
|
39922
39989
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
39923
39990
|
"div",
|
|
39924
39991
|
{
|
|
39925
|
-
className: "flex items-start gap-2 p-2 rounded hover:bg-
|
|
39992
|
+
className: "flex items-start gap-2 p-2 rounded hover:bg-muted/50",
|
|
39926
39993
|
children: [
|
|
39927
39994
|
/* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: config.variant, size: "sm", className: "min-w-[20px] justify-center mt-0.5", children: config.icon }),
|
|
39928
39995
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 min-w-0", children: [
|
|
39929
39996
|
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "break-words", children: check.label }),
|
|
39930
|
-
check.details && /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-
|
|
39997
|
+
check.details && /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-muted-foreground break-words", children: check.details })
|
|
39931
39998
|
] }),
|
|
39932
39999
|
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-muted-foreground font-mono text-xs shrink-0", children: new Date(check.updatedAt).toLocaleTimeString("en-US", {
|
|
39933
40000
|
hour12: false,
|
|
@@ -39962,10 +40029,10 @@ var init_VerificationTab = __esm({
|
|
|
39962
40029
|
function EffectBadge({ effect }) {
|
|
39963
40030
|
const variant = EFFECT_STATUS_VARIANT[effect.status] || "default";
|
|
39964
40031
|
const icon = effect.status === "executed" ? "\u2713" : effect.status === "failed" ? "\u2717" : "-";
|
|
39965
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "inline-flex items-center gap-1 text-xs font-mono bg-
|
|
40032
|
+
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: [
|
|
39966
40033
|
/* @__PURE__ */ jsxRuntime.jsx(Badge, { variant, size: "sm", className: "!text-[9px] !px-1 !py-0", children: icon }),
|
|
39967
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-
|
|
39968
|
-
effect.error && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-
|
|
40034
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: effect.type }),
|
|
40035
|
+
effect.error && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-error truncate max-w-[120px]", title: effect.error, children: effect.error })
|
|
39969
40036
|
] });
|
|
39970
40037
|
}
|
|
39971
40038
|
function TransitionTimeline({ transitions }) {
|
|
@@ -40000,8 +40067,8 @@ function TransitionTimeline({ transitions }) {
|
|
|
40000
40067
|
const sorted = [...transitions].reverse();
|
|
40001
40068
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "debug-tab debug-tab--timeline", children: [
|
|
40002
40069
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between mb-2", children: [
|
|
40003
|
-
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-
|
|
40004
|
-
/* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex items-center gap-1 text-xs text-
|
|
40070
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-muted-foreground", children: t("debug.transitionsRecorded", { count: transitions.length }) }),
|
|
40071
|
+
/* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex items-center gap-1 text-xs text-muted-foreground cursor-pointer", children: [
|
|
40005
40072
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
40006
40073
|
Checkbox,
|
|
40007
40074
|
{
|
|
@@ -40026,22 +40093,22 @@ function TransitionTimeline({ transitions }) {
|
|
|
40026
40093
|
{
|
|
40027
40094
|
className: `
|
|
40028
40095
|
relative pl-6 pb-3 border-l-2 cursor-pointer
|
|
40029
|
-
hover:bg-
|
|
40030
|
-
${hasFailedEffects ? "border-
|
|
40096
|
+
hover:bg-muted/50 rounded-r
|
|
40097
|
+
${hasFailedEffects ? "border-error" : "border-border"}
|
|
40031
40098
|
`,
|
|
40032
40099
|
onClick: () => setExpandedId(isExpanded ? null : trace.id),
|
|
40033
40100
|
children: [
|
|
40034
40101
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: `
|
|
40035
40102
|
absolute left-[-5px] top-1 w-2 h-2 rounded-full
|
|
40036
|
-
${hasFailedEffects ? "bg-
|
|
40103
|
+
${hasFailedEffects ? "bg-error" : allPassed ? "bg-success" : "bg-muted-foreground"}
|
|
40037
40104
|
` }),
|
|
40038
40105
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 text-xs py-1 px-2", children: [
|
|
40039
|
-
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-
|
|
40106
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-muted-foreground font-mono min-w-[65px]", children: formatTime2(trace.timestamp) }),
|
|
40040
40107
|
/* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: "primary", size: "sm", className: "min-w-[60px] justify-center", children: trace.traitName }),
|
|
40041
|
-
/* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "small", className: "font-mono text-
|
|
40108
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "small", className: "font-mono text-muted-foreground", children: [
|
|
40042
40109
|
trace.from,
|
|
40043
40110
|
" ",
|
|
40044
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-
|
|
40111
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground/50", children: "\u2192" }),
|
|
40045
40112
|
" ",
|
|
40046
40113
|
trace.to
|
|
40047
40114
|
] }),
|
|
@@ -40058,9 +40125,9 @@ function TransitionTimeline({ transitions }) {
|
|
|
40058
40125
|
]
|
|
40059
40126
|
}
|
|
40060
40127
|
),
|
|
40061
|
-
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-
|
|
40128
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-muted-foreground ml-auto", children: t("debug.effectsCount", { count: trace.effects.length }) })
|
|
40062
40129
|
] }),
|
|
40063
|
-
isExpanded && trace.effects.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "ml-2 mt-1 mb-2 pl-2 border-l border-
|
|
40130
|
+
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: [
|
|
40064
40131
|
/* @__PURE__ */ jsxRuntime.jsx(EffectBadge, { effect }),
|
|
40065
40132
|
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) }),
|
|
40066
40133
|
effect.durationMs !== void 0 && /* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "small", className: "text-muted-foreground text-xs", children: [
|
|
@@ -40094,8 +40161,8 @@ var init_TransitionTimeline = __esm({
|
|
|
40094
40161
|
}
|
|
40095
40162
|
});
|
|
40096
40163
|
function StatRow({ label, value, variant }) {
|
|
40097
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between py-1.5 border-b border-
|
|
40098
|
-
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-
|
|
40164
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between py-1.5 border-b border-border last:border-b-0", children: [
|
|
40165
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-muted-foreground", children: label }),
|
|
40099
40166
|
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) })
|
|
40100
40167
|
] });
|
|
40101
40168
|
}
|
|
@@ -40124,7 +40191,7 @@ function ServerBridgeTab({ bridge }) {
|
|
|
40124
40191
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "debug-tab debug-tab--bridge", children: /* @__PURE__ */ jsxRuntime.jsxs(Stack, { gap: "sm", children: [
|
|
40125
40192
|
/* @__PURE__ */ jsxRuntime.jsxs(Card, { className: "p-3", children: [
|
|
40126
40193
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3 mb-3", children: [
|
|
40127
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: `w-3 h-3 rounded-full ${bridge.connected ? "bg-
|
|
40194
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: `w-3 h-3 rounded-full ${bridge.connected ? "bg-success animate-pulse" : "bg-error"}` }),
|
|
40128
40195
|
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "h6", children: bridge.connected ? t("debug.connected") : t("debug.disconnected") })
|
|
40129
40196
|
] }),
|
|
40130
40197
|
/* @__PURE__ */ jsxRuntime.jsxs(Stack, { gap: "xs", children: [
|
|
@@ -40159,11 +40226,11 @@ function ServerBridgeTab({ bridge }) {
|
|
|
40159
40226
|
)
|
|
40160
40227
|
] })
|
|
40161
40228
|
] }),
|
|
40162
|
-
bridge.lastError && /* @__PURE__ */ jsxRuntime.jsxs(Card, { className: "p-3 border-
|
|
40163
|
-
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "semibold", className: "text-
|
|
40164
|
-
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-
|
|
40229
|
+
bridge.lastError && /* @__PURE__ */ jsxRuntime.jsxs(Card, { className: "p-3 border-error/30 bg-error/10", children: [
|
|
40230
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "semibold", className: "text-error mb-1", children: t("debug.lastError") }),
|
|
40231
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-error font-mono break-all", children: bridge.lastError })
|
|
40165
40232
|
] }),
|
|
40166
|
-
bridge.connected && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-center py-2", children: /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-
|
|
40233
|
+
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 }) }) })
|
|
40167
40234
|
] }) });
|
|
40168
40235
|
}
|
|
40169
40236
|
var init_ServerBridgeTab = __esm({
|
|
@@ -40289,7 +40356,7 @@ function EventDispatcherTab({ traits: traits2, schema }) {
|
|
|
40289
40356
|
};
|
|
40290
40357
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "debug-tab debug-tab--dispatch", children: [
|
|
40291
40358
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-3", children: [
|
|
40292
|
-
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-
|
|
40359
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground mb-1", children: t("debug.activeStates") }),
|
|
40293
40360
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-wrap gap-1", children: traits2.map((trait) => /* @__PURE__ */ jsxRuntime.jsxs(Badge, { variant: "success", size: "sm", children: [
|
|
40294
40361
|
trait.name,
|
|
40295
40362
|
": ",
|
|
@@ -40297,8 +40364,8 @@ function EventDispatcherTab({ traits: traits2, schema }) {
|
|
|
40297
40364
|
] }, trait.id)) })
|
|
40298
40365
|
] }),
|
|
40299
40366
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-3", children: [
|
|
40300
|
-
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-
|
|
40301
|
-
availableEvents.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-
|
|
40367
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground mb-1", children: t("debug.availableEvents") }),
|
|
40368
|
+
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: [
|
|
40302
40369
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
40303
40370
|
Button,
|
|
40304
40371
|
{
|
|
@@ -40309,22 +40376,22 @@ function EventDispatcherTab({ traits: traits2, schema }) {
|
|
|
40309
40376
|
children: event
|
|
40310
40377
|
}
|
|
40311
40378
|
),
|
|
40312
|
-
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-
|
|
40379
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-muted-foreground", children: transitions.map((t2) => `${t2.from} -> ${t2.to}`).join(", ") }),
|
|
40313
40380
|
transitions.some((tr) => tr.guard) && /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: "warning", size: "sm", children: t("debug.guarded") })
|
|
40314
40381
|
] }, event)) })
|
|
40315
40382
|
] }),
|
|
40316
40383
|
unavailableEvents.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-3", children: [
|
|
40317
|
-
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-
|
|
40384
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground mb-1", children: t("debug.otherEvents") }),
|
|
40318
40385
|
/* @__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)) })
|
|
40319
40386
|
] }),
|
|
40320
40387
|
log9.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
40321
|
-
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-
|
|
40388
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground mb-1", children: t("debug.recentTransitions") }),
|
|
40322
40389
|
/* @__PURE__ */ jsxRuntime.jsx(Stack, { gap: "xs", children: log9.map((entry, i) => /* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "small", className: "font-mono text-xs", children: [
|
|
40323
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-
|
|
40390
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary", children: entry.traitName }),
|
|
40324
40391
|
" ",
|
|
40325
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-
|
|
40392
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: entry.from }),
|
|
40326
40393
|
" -> ",
|
|
40327
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-
|
|
40394
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-success", children: entry.to })
|
|
40328
40395
|
] }, i)) })
|
|
40329
40396
|
] })
|
|
40330
40397
|
] });
|
|
@@ -40350,21 +40417,21 @@ var init_RuntimeDebugger = __esm({
|
|
|
40350
40417
|
function ServerResponseRow({ sr }) {
|
|
40351
40418
|
const { t } = hooks.useTranslate();
|
|
40352
40419
|
const entityEntries = Object.entries(sr.dataEntities);
|
|
40353
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ml-4 pl-2 border-l border-
|
|
40420
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ml-4 pl-2 border-l border-primary py-0.5 text-xs font-mono", children: [
|
|
40354
40421
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
40355
|
-
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: sr.success ? "text-
|
|
40422
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: sr.success ? "text-success" : "text-error", children: [
|
|
40356
40423
|
sr.success ? "\u2713" : "\u2717",
|
|
40357
40424
|
" ",
|
|
40358
40425
|
t("debug.server")
|
|
40359
40426
|
] }),
|
|
40360
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-
|
|
40361
|
-
sr.clientEffects > 0 && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "px-1 rounded bg-
|
|
40362
|
-
sr.emittedEvents.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "px-1 rounded bg-
|
|
40427
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary", children: sr.orbitalName }),
|
|
40428
|
+
sr.clientEffects > 0 && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "px-1 rounded bg-primary/10 text-primary", children: t("debug.clientEffectsCount", { count: sr.clientEffects }) }),
|
|
40429
|
+
sr.emittedEvents.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "px-1 rounded bg-primary/10 text-primary", children: [
|
|
40363
40430
|
t("debug.emitLabel"),
|
|
40364
40431
|
" ",
|
|
40365
40432
|
sr.emittedEvents.join(", ")
|
|
40366
40433
|
] }),
|
|
40367
|
-
sr.error && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "px-1 rounded bg-
|
|
40434
|
+
sr.error && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "px-1 rounded bg-error/10 text-error truncate max-w-[300px]", children: sr.error })
|
|
40368
40435
|
] }),
|
|
40369
40436
|
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: [
|
|
40370
40437
|
name,
|
|
@@ -40380,9 +40447,9 @@ function TransitionRow({ trace }) {
|
|
|
40380
40447
|
if (isServerEntry && trace.serverResponse) {
|
|
40381
40448
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "py-0.5 border-b border-border last:border-0", children: [
|
|
40382
40449
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-2 text-xs font-mono", children: [
|
|
40383
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "mt-1.5 w-1.5 h-1.5 rounded-full flex-shrink-0 bg-
|
|
40450
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "mt-1.5 w-1.5 h-1.5 rounded-full flex-shrink-0 bg-primary" }),
|
|
40384
40451
|
/* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: "warning", size: "sm", className: "flex-shrink-0", children: trace.event }),
|
|
40385
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-
|
|
40452
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary flex-shrink-0", children: t("debug.serverResponse") })
|
|
40386
40453
|
] }),
|
|
40387
40454
|
/* @__PURE__ */ jsxRuntime.jsx(ServerResponseRow, { sr: trace.serverResponse })
|
|
40388
40455
|
] });
|
|
@@ -40391,7 +40458,7 @@ function TransitionRow({ trace }) {
|
|
|
40391
40458
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-2 text-xs font-mono", children: [
|
|
40392
40459
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: cn(
|
|
40393
40460
|
"mt-1.5 w-1.5 h-1.5 rounded-full flex-shrink-0",
|
|
40394
|
-
hasFailedEffects ? "bg-
|
|
40461
|
+
hasFailedEffects ? "bg-error" : "bg-success"
|
|
40395
40462
|
) }),
|
|
40396
40463
|
/* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: "info", size: "sm", className: "flex-shrink-0", children: trace.event }),
|
|
40397
40464
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-foreground flex-shrink-0", children: trace.traitName }),
|
|
@@ -40405,7 +40472,7 @@ function TransitionRow({ trace }) {
|
|
|
40405
40472
|
] }),
|
|
40406
40473
|
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(
|
|
40407
40474
|
"px-1 rounded text-xs",
|
|
40408
|
-
eff.status === "executed" ? "bg-
|
|
40475
|
+
eff.status === "executed" ? "bg-success/10 text-success" : eff.status === "failed" ? "bg-error/10 text-error" : "bg-warning/10 text-warning"
|
|
40409
40476
|
), children: [
|
|
40410
40477
|
eff.status === "executed" ? "\u2713" : eff.status === "failed" ? "\u2717" : "-",
|
|
40411
40478
|
" ",
|
|
@@ -40439,7 +40506,7 @@ function VerifyModePanel({
|
|
|
40439
40506
|
{
|
|
40440
40507
|
className: cn(
|
|
40441
40508
|
"runtime-debugger runtime-debugger--verify",
|
|
40442
|
-
"flex flex-col bg-[var(--color-card)] text-[var(--color-foreground)] border-t-2 border-
|
|
40509
|
+
"flex flex-col bg-[var(--color-card)] text-[var(--color-foreground)] border-t-2 border-accent",
|
|
40443
40510
|
hudBottom ? "" : "fixed bottom-0 left-0 right-0",
|
|
40444
40511
|
className
|
|
40445
40512
|
),
|
|
@@ -40460,8 +40527,8 @@ function VerifyModePanel({
|
|
|
40460
40527
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-foreground/50 w-3", "aria-hidden": true, children: expanded ? "\u25BE" : "\u25B8" }),
|
|
40461
40528
|
/* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: failedChecks > 0 ? "danger" : "success", size: "sm", children: failedChecks > 0 ? t("debug.failCount", { count: failedChecks }) : t("debug.ok") }),
|
|
40462
40529
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-foreground/70", children: t("debug.localCount", { count: localCount }) }),
|
|
40463
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-
|
|
40464
|
-
traitStates && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-
|
|
40530
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary", children: t("debug.serverCount", { count: serverCount }) }),
|
|
40531
|
+
traitStates && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-accent truncate max-w-[400px]", children: traitStates }),
|
|
40465
40532
|
!expanded && transitions.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-auto text-foreground/50", children: t("debug.transitionsCount", { count: transitions.length }) })
|
|
40466
40533
|
]
|
|
40467
40534
|
}
|
|
@@ -40656,7 +40723,7 @@ function RuntimeDebugger({
|
|
|
40656
40723
|
title: t("debug.openDebugger"),
|
|
40657
40724
|
children: failedChecks > 0 ? /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "relative", children: [
|
|
40658
40725
|
/* @__PURE__ */ jsxRuntime.jsx("span", { children: "V" }),
|
|
40659
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "absolute -top-1 -right-2 w-2 h-2 bg-
|
|
40726
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "absolute -top-1 -right-2 w-2 h-2 bg-error rounded-full" })
|
|
40660
40727
|
] }) : /* @__PURE__ */ jsxRuntime.jsx("span", { children: "V" })
|
|
40661
40728
|
}
|
|
40662
40729
|
) : /* @__PURE__ */ jsxRuntime.jsxs(Card, { className: "runtime-debugger__panel", children: [
|
|
@@ -40744,7 +40811,7 @@ var init_SegmentRenderer = __esm({
|
|
|
40744
40811
|
"div",
|
|
40745
40812
|
{
|
|
40746
40813
|
className: cn(
|
|
40747
|
-
"border border-
|
|
40814
|
+
"border border-border rounded-lg p-2 md:p-4 overflow-x-auto space-y-6",
|
|
40748
40815
|
containerClassName,
|
|
40749
40816
|
className
|
|
40750
40817
|
),
|
|
@@ -44327,6 +44394,14 @@ function createSharedEntityWriter(binding, tick, traitStatesRef, emit) {
|
|
|
44327
44394
|
return writes;
|
|
44328
44395
|
};
|
|
44329
44396
|
}
|
|
44397
|
+
function containsConfigForward(value) {
|
|
44398
|
+
if (typeof value === "string") return value.startsWith("@config.");
|
|
44399
|
+
if (Array.isArray(value)) return value.some(containsConfigForward);
|
|
44400
|
+
if (value !== null && typeof value === "object") {
|
|
44401
|
+
return Object.values(value).some(containsConfigForward);
|
|
44402
|
+
}
|
|
44403
|
+
return false;
|
|
44404
|
+
}
|
|
44330
44405
|
function getBindingConfig(binding) {
|
|
44331
44406
|
const raw = binding.config;
|
|
44332
44407
|
const normalized = runtime.normalizeCallSiteConfigToValues(raw);
|
|
@@ -44679,7 +44754,7 @@ function useTraitStateMachine(traitBindings, uiSlots, options) {
|
|
|
44679
44754
|
const sharedCallSite = sharedCallSiteRaw ? runtime.resolveCallSitePayloadCaptures(
|
|
44680
44755
|
Object.fromEntries(
|
|
44681
44756
|
Object.entries(sharedCallSiteRaw).filter(
|
|
44682
|
-
([, v]) => !(
|
|
44757
|
+
([, v]) => !containsConfigForward(v)
|
|
44683
44758
|
)
|
|
44684
44759
|
),
|
|
44685
44760
|
payload || {}
|
|
@@ -44744,7 +44819,7 @@ function useTraitStateMachine(traitBindings, uiSlots, options) {
|
|
|
44744
44819
|
const callSiteOverrides = callSiteConfig ? runtime.resolveCallSitePayloadCaptures(
|
|
44745
44820
|
Object.fromEntries(
|
|
44746
44821
|
Object.entries(callSiteConfig).filter(
|
|
44747
|
-
([, v]) => !(
|
|
44822
|
+
([, v]) => !containsConfigForward(v)
|
|
44748
44823
|
)
|
|
44749
44824
|
),
|
|
44750
44825
|
payload || {}
|
|
@@ -44986,7 +45061,7 @@ function useTraitStateMachine(traitBindings, uiSlots, options) {
|
|
|
44986
45061
|
}
|
|
44987
45062
|
return () => scheduler.stopAll();
|
|
44988
45063
|
}, [traitBindings, runTickEffects, sharedGroups, sharedEntityStore, emitFromSharedWriter]);
|
|
44989
|
-
const processEventQueued = React82.useCallback(async (eventKey, payload) => {
|
|
45064
|
+
const processEventQueued = React82.useCallback(async (eventKey, payload, targetTrait) => {
|
|
44990
45065
|
const normalizedEvent = normalizeEventKey(eventKey);
|
|
44991
45066
|
const bindings = traitBindingsRef.current;
|
|
44992
45067
|
const currentManager = managerRef.current;
|
|
@@ -45015,7 +45090,9 @@ function useTraitStateMachine(traitBindings, uiSlots, options) {
|
|
|
45015
45090
|
normalizedEvent,
|
|
45016
45091
|
payload,
|
|
45017
45092
|
void 0,
|
|
45018
|
-
entityByTrait
|
|
45093
|
+
entityByTrait,
|
|
45094
|
+
void 0,
|
|
45095
|
+
targetTrait
|
|
45019
45096
|
);
|
|
45020
45097
|
crossTraitLog.debug("processEvent:results", {
|
|
45021
45098
|
event: normalizedEvent,
|
|
@@ -45108,8 +45185,11 @@ function useTraitStateMachine(traitBindings, uiSlots, options) {
|
|
|
45108
45185
|
const effectTraces = result.effects.map(
|
|
45109
45186
|
(e) => {
|
|
45110
45187
|
if (Array.isArray(e)) {
|
|
45188
|
+
const head = String(e[0] ?? "unknown");
|
|
45189
|
+
const entityName = head === "fetch" && typeof e[1] === "string" ? e[1] : head === "persist" && typeof e[2] === "string" ? e[2] : void 0;
|
|
45111
45190
|
return {
|
|
45112
|
-
type:
|
|
45191
|
+
type: head,
|
|
45192
|
+
...entityName !== void 0 ? { entityName } : {},
|
|
45113
45193
|
args: e.slice(1),
|
|
45114
45194
|
status: "executed"
|
|
45115
45195
|
};
|
|
@@ -45162,7 +45242,8 @@ function useTraitStateMachine(traitBindings, uiSlots, options) {
|
|
|
45162
45242
|
const orbital = orbitalsByTrait?.[traitName];
|
|
45163
45243
|
if (orbital) dispatchedOrbitals.add(orbital);
|
|
45164
45244
|
}
|
|
45165
|
-
|
|
45245
|
+
const relayPayload = targetTrait !== void 0 ? { ...payload ?? {}, _targetTrait: targetTrait } : payload;
|
|
45246
|
+
await onEventProcessed(normalizedEvent, relayPayload, dispatchedOrbitals);
|
|
45166
45247
|
}
|
|
45167
45248
|
}, [entities, eventBus, sharedEntityStore]);
|
|
45168
45249
|
const drainEventQueue = React82.useCallback(async () => {
|
|
@@ -45171,14 +45252,14 @@ function useTraitStateMachine(traitBindings, uiSlots, options) {
|
|
|
45171
45252
|
try {
|
|
45172
45253
|
while (eventQueueRef.current.length > 0) {
|
|
45173
45254
|
const entry = eventQueueRef.current.shift();
|
|
45174
|
-
await processEventQueued(entry.eventKey, entry.payload);
|
|
45255
|
+
await processEventQueued(entry.eventKey, entry.payload, entry.targetTrait);
|
|
45175
45256
|
}
|
|
45176
45257
|
} finally {
|
|
45177
45258
|
processingRef.current = false;
|
|
45178
45259
|
}
|
|
45179
45260
|
}, [processEventQueued]);
|
|
45180
|
-
const enqueueAndDrain = React82.useCallback((eventKey, payload) => {
|
|
45181
|
-
eventQueueRef.current.push({ eventKey, payload });
|
|
45261
|
+
const enqueueAndDrain = React82.useCallback((eventKey, payload, targetTrait) => {
|
|
45262
|
+
eventQueueRef.current.push({ eventKey, payload, targetTrait });
|
|
45182
45263
|
void drainEventQueue();
|
|
45183
45264
|
}, [drainEventQueue]);
|
|
45184
45265
|
React82.useCallback((eventKey, payload) => {
|
|
@@ -45275,7 +45356,11 @@ function useTraitStateMachine(traitBindings, uiSlots, options) {
|
|
|
45275
45356
|
crossTraitLog.debug("listen:subscribed", { busKey, targetTrait: binding.trait.name, sourceOrbital, sourceTrait, listenEvent: listen.event, triggers: listen.triggers });
|
|
45276
45357
|
const unsub = eventBus.on(busKey, (event) => {
|
|
45277
45358
|
crossTraitLog.debug("listen:fired", { busKey, targetTrait: binding.trait.name, triggers: listen.triggers });
|
|
45278
|
-
enqueueAndDrain(
|
|
45359
|
+
enqueueAndDrain(
|
|
45360
|
+
listen.triggers,
|
|
45361
|
+
core.applyListenPayloadMapping(listen.payloadMapping, event.payload),
|
|
45362
|
+
binding.trait.name
|
|
45363
|
+
);
|
|
45279
45364
|
});
|
|
45280
45365
|
unsubscribes.push(() => {
|
|
45281
45366
|
crossTraitLog.debug("listen:unsubscribe", { busKey, targetTrait: binding.trait.name, triggers: listen.triggers });
|
|
@@ -45305,7 +45390,7 @@ function useTraitStateMachine(traitBindings, uiSlots, options) {
|
|
|
45305
45390
|
}
|
|
45306
45391
|
for (const event of eventsToFire) {
|
|
45307
45392
|
stateLog.debug("mount:fire-lifecycle", { event, traitCount: traitBindings.length });
|
|
45308
|
-
enqueueAndDrain(event, {});
|
|
45393
|
+
enqueueAndDrain(event, { ...optionsRef.current?.initPayload ?? {} });
|
|
45309
45394
|
}
|
|
45310
45395
|
return () => {
|
|
45311
45396
|
initedTraitsRef.current = /* @__PURE__ */ new Set();
|
|
@@ -45346,7 +45431,9 @@ function useResolvedSchema(schema, pageName) {
|
|
|
45346
45431
|
trait.listens = callSiteListens.map((l) => ({
|
|
45347
45432
|
event: l.event,
|
|
45348
45433
|
triggers: l.triggers,
|
|
45349
|
-
source: l.source
|
|
45434
|
+
source: l.source,
|
|
45435
|
+
guard: l.guard,
|
|
45436
|
+
payloadMapping: l.payloadMapping
|
|
45350
45437
|
}));
|
|
45351
45438
|
resolvedSchemaLog.info("listens:restored", {
|
|
45352
45439
|
trait: traitName,
|
|
@@ -45505,7 +45592,7 @@ function collectServerActiveTraits(ir, allTraits, mountedTraitNames) {
|
|
|
45505
45592
|
}
|
|
45506
45593
|
return active;
|
|
45507
45594
|
}
|
|
45508
|
-
function TraitInitializer({ traits: traits2, orbitalNames, onNavigate, onLocalFallback, persistence, traitConfigsByName, orbitalsByTrait, embeddedTraits, serverActiveTraits }) {
|
|
45595
|
+
function TraitInitializer({ traits: traits2, routeParams, orbitalNames, onNavigate, onLocalFallback, persistence, traitConfigsByName, orbitalsByTrait, embeddedTraits, serverActiveTraits }) {
|
|
45509
45596
|
const bridge = providers.useServerBridge();
|
|
45510
45597
|
const activeTraitNames = React82.useMemo(
|
|
45511
45598
|
() => new Set(traits2.map((b) => b.trait.name).filter((n) => !!n)),
|
|
@@ -45534,43 +45621,48 @@ function TraitInitializer({ traits: traits2, orbitalNames, onNavigate, onLocalFa
|
|
|
45534
45621
|
applyServerEffects(effects, uiSlots, onNavigate, embeddedTraits, activeTraitNames);
|
|
45535
45622
|
}
|
|
45536
45623
|
}, [bridge.connected, bridge.sendEvent, orbitalNames, uiSlots, onNavigate, embeddedTraits, activeTraitNames, withActiveTraits]);
|
|
45537
|
-
const opts = orbitalNames ? { onEventProcessed, navigate: onNavigate, traitConfigsByName, orbitalsByTrait, embeddedTraits } : { navigate: onNavigate, persistence, traitConfigsByName, orbitalsByTrait, embeddedTraits };
|
|
45624
|
+
const opts = orbitalNames ? { onEventProcessed, navigate: onNavigate, traitConfigsByName, orbitalsByTrait, embeddedTraits, initPayload: routeParams } : { navigate: onNavigate, persistence, traitConfigsByName, orbitalsByTrait, embeddedTraits, initPayload: routeParams };
|
|
45538
45625
|
const { sendEvent } = useTraitStateMachine(traits2, uiSlots, opts);
|
|
45539
45626
|
const initSentRef = React82.useRef(false);
|
|
45540
45627
|
const prevTraitsRef = React82.useRef(void 0);
|
|
45628
|
+
const paramsKey = JSON.stringify(routeParams ?? {});
|
|
45629
|
+
const prevParamsKeyRef = React82.useRef(void 0);
|
|
45541
45630
|
React82.useEffect(() => {
|
|
45542
45631
|
const refChanged = prevTraitsRef.current !== void 0 && prevTraitsRef.current !== traits2;
|
|
45632
|
+
const paramsChanged = prevParamsKeyRef.current !== void 0 && prevParamsKeyRef.current !== paramsKey;
|
|
45543
45633
|
navLog.debug("page:traits-effect", () => ({
|
|
45544
45634
|
refChanged,
|
|
45635
|
+
paramsChanged,
|
|
45545
45636
|
traitsCount: Array.isArray(traits2) ? traits2.length : -1,
|
|
45546
45637
|
hadPrev: prevTraitsRef.current !== void 0
|
|
45547
45638
|
}));
|
|
45548
|
-
if (refChanged) {
|
|
45549
|
-
navLog.info("page:traits-reset", { traitsCount: Array.isArray(traits2) ? traits2.length : -1 });
|
|
45639
|
+
if (refChanged || paramsChanged) {
|
|
45640
|
+
navLog.info("page:traits-reset", { traitsCount: Array.isArray(traits2) ? traits2.length : -1, paramsChanged });
|
|
45550
45641
|
uiSlots.clearAll();
|
|
45551
45642
|
initSentRef.current = false;
|
|
45552
45643
|
}
|
|
45553
45644
|
prevTraitsRef.current = traits2;
|
|
45554
|
-
|
|
45645
|
+
prevParamsKeyRef.current = paramsKey;
|
|
45646
|
+
}, [traits2, uiSlots, paramsKey]);
|
|
45555
45647
|
React82.useEffect(() => {
|
|
45556
45648
|
if (!orbitalNames?.length) {
|
|
45557
|
-
const t = setTimeout(() => sendEvent("INIT"), 50);
|
|
45649
|
+
const t = setTimeout(() => sendEvent("INIT", routeParams), 50);
|
|
45558
45650
|
return () => clearTimeout(t);
|
|
45559
45651
|
}
|
|
45560
45652
|
const fallback = setTimeout(() => {
|
|
45561
45653
|
if (!initSentRef.current) {
|
|
45562
|
-
sendEvent("INIT");
|
|
45654
|
+
sendEvent("INIT", routeParams);
|
|
45563
45655
|
onLocalFallback?.();
|
|
45564
45656
|
}
|
|
45565
45657
|
}, 5e3);
|
|
45566
45658
|
return () => clearTimeout(fallback);
|
|
45567
|
-
}, [traits2, orbitalNames, sendEvent, onLocalFallback]);
|
|
45659
|
+
}, [traits2, orbitalNames, sendEvent, onLocalFallback, routeParams]);
|
|
45568
45660
|
React82.useEffect(() => {
|
|
45569
45661
|
if (!bridge.connected || !orbitalNames?.length || initSentRef.current) return;
|
|
45570
45662
|
initSentRef.current = true;
|
|
45571
45663
|
(async () => {
|
|
45572
45664
|
for (const name of orbitalNames) {
|
|
45573
|
-
const { effects, meta } = await bridge.sendEvent(name, "INIT", withActiveTraits({}));
|
|
45665
|
+
const { effects, meta } = await bridge.sendEvent(name, "INIT", withActiveTraits({ ...routeParams ?? {} }));
|
|
45574
45666
|
recordServerResponse(name, "INIT", meta);
|
|
45575
45667
|
const effectTraces = [
|
|
45576
45668
|
{ type: "fetch", args: [], status: "executed" },
|
|
@@ -45591,10 +45683,10 @@ function TraitInitializer({ traits: traits2, orbitalNames, onNavigate, onLocalFa
|
|
|
45591
45683
|
applyServerEffects(effects, uiSlots, onNavigate, embeddedTraits, activeTraitNames);
|
|
45592
45684
|
}
|
|
45593
45685
|
})();
|
|
45594
|
-
}, [bridge.connected, orbitalNames, bridge.sendEvent, uiSlots, onNavigate, embeddedTraits, activeTraitNames, withActiveTraits]);
|
|
45686
|
+
}, [bridge.connected, orbitalNames, bridge.sendEvent, uiSlots, onNavigate, embeddedTraits, activeTraitNames, withActiveTraits, routeParams]);
|
|
45595
45687
|
return null;
|
|
45596
45688
|
}
|
|
45597
|
-
function SchemaRunner({ schema, serverUrl, transport, mockData, pageName, onNavigate, onLocalFallback, persistence }) {
|
|
45689
|
+
function SchemaRunner({ schema, serverUrl, transport, mockData, pageName, routeParams, onNavigate, onLocalFallback, persistence }) {
|
|
45598
45690
|
const { traits: traits2, allEntities, allTraits, ir } = useResolvedSchema(schema, pageName);
|
|
45599
45691
|
const allPageTraits = React82.useMemo(() => {
|
|
45600
45692
|
let base;
|
|
@@ -45736,6 +45828,7 @@ function SchemaRunner({ schema, serverUrl, transport, mockData, pageName, onNavi
|
|
|
45736
45828
|
TraitInitializer,
|
|
45737
45829
|
{
|
|
45738
45830
|
traits: allPageTraits,
|
|
45831
|
+
routeParams,
|
|
45739
45832
|
orbitalNames: serverUrl || transport ? pageOrbitalNames : void 0,
|
|
45740
45833
|
traitConfigsByName,
|
|
45741
45834
|
orbitalsByTrait,
|
|
@@ -45813,27 +45906,44 @@ function OrbPreview({
|
|
|
45813
45906
|
return [];
|
|
45814
45907
|
}
|
|
45815
45908
|
}, [parsedSchema]);
|
|
45816
|
-
const
|
|
45909
|
+
const initialPageMatch = React82.useMemo(() => {
|
|
45817
45910
|
if (!initialPagePath) return void 0;
|
|
45818
|
-
const
|
|
45819
|
-
|
|
45911
|
+
for (const { page } of pages) {
|
|
45912
|
+
const params = page.path ? providers.matchPath(page.path, initialPagePath) : null;
|
|
45913
|
+
if (params !== null) return { name: page.name, params };
|
|
45914
|
+
}
|
|
45915
|
+
return void 0;
|
|
45820
45916
|
}, [pages, initialPagePath]);
|
|
45917
|
+
const initialPageName = initialPageMatch?.name;
|
|
45821
45918
|
const [currentPage, setCurrentPage] = React82.useState(initialPageName);
|
|
45919
|
+
const [routeParams, setRouteParams] = React82.useState(initialPageMatch?.params ?? {});
|
|
45822
45920
|
const prevInitialPagePathRef = React82.useRef(initialPagePath);
|
|
45823
45921
|
React82.useEffect(() => {
|
|
45824
45922
|
if (prevInitialPagePathRef.current !== initialPagePath) {
|
|
45825
45923
|
prevInitialPagePathRef.current = initialPagePath;
|
|
45826
45924
|
setCurrentPage(initialPageName);
|
|
45925
|
+
setRouteParams(initialPageMatch?.params ?? {});
|
|
45827
45926
|
}
|
|
45828
|
-
}, [initialPagePath, initialPageName]);
|
|
45927
|
+
}, [initialPagePath, initialPageName, initialPageMatch]);
|
|
45829
45928
|
const handleNavigate = React82.useCallback((path) => {
|
|
45830
|
-
|
|
45929
|
+
let match;
|
|
45930
|
+
let params = {};
|
|
45931
|
+
for (const entry of pages) {
|
|
45932
|
+
const m = entry.page.path ? providers.matchPath(entry.page.path, path) : null;
|
|
45933
|
+
if (m !== null) {
|
|
45934
|
+
match = entry;
|
|
45935
|
+
params = m;
|
|
45936
|
+
break;
|
|
45937
|
+
}
|
|
45938
|
+
}
|
|
45831
45939
|
navLog.debug("handleNavigate", () => ({
|
|
45832
45940
|
path,
|
|
45833
45941
|
matched: match?.page.name ?? null,
|
|
45942
|
+
params,
|
|
45834
45943
|
availablePaths: pages.map((p) => p.page.path)
|
|
45835
45944
|
}));
|
|
45836
|
-
if (match) {
|
|
45945
|
+
if (match?.page.name) {
|
|
45946
|
+
setRouteParams(params);
|
|
45837
45947
|
setCurrentPage(match.page.name);
|
|
45838
45948
|
if (typeof window !== "undefined") {
|
|
45839
45949
|
const url = new URL(window.location.href);
|
|
@@ -45843,6 +45953,15 @@ function OrbPreview({
|
|
|
45843
45953
|
}
|
|
45844
45954
|
}
|
|
45845
45955
|
}, [pages]);
|
|
45956
|
+
React82.useEffect(() => {
|
|
45957
|
+
const unsubscribe = eventBus.on("UI:NAVIGATE", (event) => {
|
|
45958
|
+
const url = event.payload?.url;
|
|
45959
|
+
if (typeof url === "string" && url.length > 0) {
|
|
45960
|
+
handleNavigate(url);
|
|
45961
|
+
}
|
|
45962
|
+
});
|
|
45963
|
+
return unsubscribe;
|
|
45964
|
+
}, [eventBus, handleNavigate]);
|
|
45846
45965
|
if (!parseResult.ok) {
|
|
45847
45966
|
return /* @__PURE__ */ jsxRuntime.jsx(Box, { className, style: { height }, children: /* @__PURE__ */ jsxRuntime.jsxs(Typography, { as: "pre", color: "error", variant: "small", className: "font-mono whitespace-pre-wrap break-all m-0 p-4", children: [
|
|
45848
45967
|
"Parse error: ",
|
|
@@ -45894,6 +46013,7 @@ function OrbPreview({
|
|
|
45894
46013
|
transport,
|
|
45895
46014
|
mockData: effectiveMockData,
|
|
45896
46015
|
pageName: currentPage,
|
|
46016
|
+
routeParams,
|
|
45897
46017
|
onNavigate: handleNavigate,
|
|
45898
46018
|
onLocalFallback: handleLocalFallback,
|
|
45899
46019
|
persistence
|