@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/avl/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
2
2
|
import * as React91 from 'react';
|
|
3
3
|
import React91__default, { createContext, useState, useMemo, useRef, useEffect, useContext, useCallback, Suspense, useLayoutEffect, Profiler, useReducer, useSyncExternalStore, lazy, useId } from 'react';
|
|
4
|
-
import { getAllPages, OrbitalProvider, EventBusContext, useTraitScopeChain, ServerBridgeProvider, VerificationProvider, EntitySchemaProvider, OrbitalThemeProvider, useServerBridge, useEntitySchema, useEntitySchemaOptional, TraitScopeProvider, useCurrentPagePath, useGameAudioContextOptional } from '@almadar/ui/providers';
|
|
4
|
+
import { getAllPages, matchPath, OrbitalProvider, EventBusContext, useTraitScopeChain, ServerBridgeProvider, VerificationProvider, EntitySchemaProvider, OrbitalThemeProvider, useServerBridge, useEntitySchema, useEntitySchemaOptional, TraitScopeProvider, useCurrentPagePath, useGameAudioContextOptional } from '@almadar/ui/providers';
|
|
5
5
|
import { createLogger, setNamespaceLevel, isLogLevelEnabled } from '@almadar/logger';
|
|
6
6
|
import ELK from 'elkjs/lib/elk.bundled.js';
|
|
7
7
|
import { MarkerType, useReactFlow, Handle, Position, getBezierPath, EdgeLabelRenderer, useNodeId, ReactFlowProvider, BaseEdge, useNodesState, useEdgesState, ReactFlow, Controls, Background, BackgroundVariant } from '@xyflow/react';
|
|
@@ -66,7 +66,7 @@ import ReactMarkdown from 'react-markdown';
|
|
|
66
66
|
import remarkGfm from 'remark-gfm';
|
|
67
67
|
import remarkMath from 'remark-math';
|
|
68
68
|
import rehypeKatex from 'rehype-katex';
|
|
69
|
-
import { FieldTypeSchema, isInlineTrait, isPageReference, buildResolvedTraitConfigs, schemaToIR, getPage, mergeEntityFrame, isCircuitEvent, walkSExpr, isSExpr, isEventPayloadValue } from '@almadar/core';
|
|
69
|
+
import { FieldTypeSchema, isInlineTrait, isPageReference, buildResolvedTraitConfigs, schemaToIR, getPage, mergeEntityFrame, isCircuitEvent, applyListenPayloadMapping, walkSExpr, isSExpr, isEventPayloadValue } from '@almadar/core';
|
|
70
70
|
import { useDroppable, useDraggable, DndContext, DragOverlay, useSensors, useSensor, PointerSensor, KeyboardSensor, pointerWithin, rectIntersection, closestCorners } from '@dnd-kit/core';
|
|
71
71
|
import { sortableKeyboardCoordinates, useSortable, arrayMove, SortableContext, rectSortingStrategy, verticalListSortingStrategy } from '@dnd-kit/sortable';
|
|
72
72
|
import { CSS } from '@dnd-kit/utilities';
|
|
@@ -3149,6 +3149,11 @@ var init_Typography = __esm({
|
|
|
3149
3149
|
inherit: "text-inherit"
|
|
3150
3150
|
};
|
|
3151
3151
|
weightStyles = {
|
|
3152
|
+
// Neutral: an atom default of "none" must not override the variant's baked
|
|
3153
|
+
// weight (C-PATTERN-ENUM-BLOCKS-NEUTRAL-OVERRIDE — `variant={h2}` rendered
|
|
3154
|
+
// tiny because the ui-typography atom's `weight: light`/`size: xs` defaults
|
|
3155
|
+
// clobbered every variant).
|
|
3156
|
+
none: "",
|
|
3152
3157
|
light: "font-light",
|
|
3153
3158
|
normal: "font-normal",
|
|
3154
3159
|
medium: "font-medium",
|
|
@@ -3174,6 +3179,7 @@ var init_Typography = __esm({
|
|
|
3174
3179
|
label: "span"
|
|
3175
3180
|
};
|
|
3176
3181
|
typographySizeStyles = {
|
|
3182
|
+
none: "",
|
|
3177
3183
|
xs: "text-xs",
|
|
3178
3184
|
sm: "text-sm",
|
|
3179
3185
|
md: "text-base",
|
|
@@ -4277,10 +4283,10 @@ var init_ModuleCard = __esm({
|
|
|
4277
4283
|
init_avl_atom_types();
|
|
4278
4284
|
init_MiniStateMachine();
|
|
4279
4285
|
PERSISTENCE_BORDER = {
|
|
4280
|
-
persistent: "border-l-[3px] border-l-
|
|
4281
|
-
runtime: "border-l-[3px] border-l-
|
|
4282
|
-
singleton: "border-l-[3px] border-l-
|
|
4283
|
-
instance: "border-l-[3px] border-l-
|
|
4286
|
+
persistent: "border-l-[3px] border-l-primary border-solid",
|
|
4287
|
+
runtime: "border-l-[3px] border-l-primary border-dashed",
|
|
4288
|
+
singleton: "border-l-[3px] border-l-primary border-double",
|
|
4289
|
+
instance: "border-l-[3px] border-l-primary border-dotted"
|
|
4284
4290
|
};
|
|
4285
4291
|
PERSISTENCE_ICON = {
|
|
4286
4292
|
persistent: "\u26C1",
|
|
@@ -4310,8 +4316,8 @@ var init_ModuleCard = __esm({
|
|
|
4310
4316
|
className: "rounded-lg border border-[var(--color-border)] bg-[var(--color-card)] shadow-sm overflow-hidden",
|
|
4311
4317
|
style: { minWidth: 280, maxWidth: 400 },
|
|
4312
4318
|
children: [
|
|
4313
|
-
/* @__PURE__ */ jsx(Handle, { type: "target", position: Position.Left, className: "!w-2.5 !h-2.5 !bg-
|
|
4314
|
-
/* @__PURE__ */ jsx(Handle, { type: "source", position: Position.Right, className: "!w-2.5 !h-2.5 !bg-
|
|
4319
|
+
/* @__PURE__ */ jsx(Handle, { type: "target", position: Position.Left, className: "!w-2.5 !h-2.5 !bg-warning" }),
|
|
4320
|
+
/* @__PURE__ */ jsx(Handle, { type: "source", position: Position.Right, className: "!w-2.5 !h-2.5 !bg-warning" }),
|
|
4315
4321
|
/* @__PURE__ */ jsx("div", { className: "px-3 py-2 border-b border-[var(--color-border)]", children: /* @__PURE__ */ jsx("span", { className: "text-base font-bold text-[var(--color-foreground)]", children: orbitalName }) }),
|
|
4316
4322
|
/* @__PURE__ */ jsxs("div", { className: `px-3 py-2 border-b border-[var(--color-border)] ${PERSISTENCE_BORDER[persistence] ?? ""}`, children: [
|
|
4317
4323
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5 mb-1.5", children: [
|
|
@@ -5035,6 +5041,7 @@ var init_Button = __esm({
|
|
|
5035
5041
|
"button",
|
|
5036
5042
|
{
|
|
5037
5043
|
ref,
|
|
5044
|
+
type: "button",
|
|
5038
5045
|
disabled: disabled || isLoading,
|
|
5039
5046
|
className: cn(
|
|
5040
5047
|
"relative inline-flex items-center justify-center gap-2",
|
|
@@ -8359,15 +8366,15 @@ var init_TextHighlight = __esm({
|
|
|
8359
8366
|
const typeStyles = {
|
|
8360
8367
|
question: cn(
|
|
8361
8368
|
// Blue border for questions
|
|
8362
|
-
"bg-card border-b-2 border-primary
|
|
8369
|
+
"bg-card border-b-2 border-primary",
|
|
8363
8370
|
"hover:bg-muted",
|
|
8364
|
-
isActive && "bg-primary
|
|
8371
|
+
isActive && "bg-primary/10 ring-2 ring-primary"
|
|
8365
8372
|
),
|
|
8366
8373
|
note: cn(
|
|
8367
8374
|
// Yellow border for notes
|
|
8368
|
-
"bg-card border-b-2 border-
|
|
8375
|
+
"bg-card border-b-2 border-warning",
|
|
8369
8376
|
"hover:bg-muted",
|
|
8370
|
-
isActive && "bg-
|
|
8377
|
+
isActive && "bg-warning/10 ring-2 ring-warning"
|
|
8371
8378
|
)
|
|
8372
8379
|
};
|
|
8373
8380
|
return /* @__PURE__ */ jsx(
|
|
@@ -8713,7 +8720,7 @@ function DayCell({
|
|
|
8713
8720
|
{
|
|
8714
8721
|
className: cn(
|
|
8715
8722
|
"p-2 text-center cursor-pointer hover:bg-muted transition-colors",
|
|
8716
|
-
isToday && "bg-
|
|
8723
|
+
isToday && "bg-primary/10",
|
|
8717
8724
|
className
|
|
8718
8725
|
),
|
|
8719
8726
|
onClick: handleClick,
|
|
@@ -8724,7 +8731,7 @@ function DayCell({
|
|
|
8724
8731
|
variant: "small",
|
|
8725
8732
|
className: cn(
|
|
8726
8733
|
"font-medium",
|
|
8727
|
-
isToday ? "text-
|
|
8734
|
+
isToday ? "text-primary" : "text-muted-foreground"
|
|
8728
8735
|
),
|
|
8729
8736
|
children: dayAbbr
|
|
8730
8737
|
}
|
|
@@ -8736,7 +8743,7 @@ function DayCell({
|
|
|
8736
8743
|
rounded: "full",
|
|
8737
8744
|
className: cn(
|
|
8738
8745
|
"h-8 w-8 mx-auto items-center justify-center",
|
|
8739
|
-
isToday && "bg-
|
|
8746
|
+
isToday && "bg-primary text-primary-foreground"
|
|
8740
8747
|
),
|
|
8741
8748
|
children: /* @__PURE__ */ jsx(Typography, { variant: "body", className: "font-semibold", children: safeDate.getDate() })
|
|
8742
8749
|
}
|
|
@@ -15590,19 +15597,19 @@ var init_ActivationBlock = __esm({
|
|
|
15590
15597
|
"div",
|
|
15591
15598
|
{
|
|
15592
15599
|
className: cn(
|
|
15593
|
-
"bg-
|
|
15600
|
+
"bg-primary/10 border-2 border-primary rounded-lg p-5 mb-6",
|
|
15594
15601
|
className
|
|
15595
15602
|
),
|
|
15596
15603
|
children: /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-3", children: [
|
|
15597
|
-
/* @__PURE__ */ jsx(Lightbulb, { className: "text-
|
|
15604
|
+
/* @__PURE__ */ jsx(Lightbulb, { className: "text-primary flex-shrink-0 mt-1", size: 24 }),
|
|
15598
15605
|
/* @__PURE__ */ jsxs("div", { className: "flex-1", children: [
|
|
15599
|
-
/* @__PURE__ */ jsx("h4", { className: "font-semibold text-
|
|
15600
|
-
/* @__PURE__ */ jsx("p", { className: "text-
|
|
15606
|
+
/* @__PURE__ */ jsx("h4", { className: "font-semibold text-primary mb-2", children: "Before You Begin..." }),
|
|
15607
|
+
/* @__PURE__ */ jsx("p", { className: "text-foreground mb-3 text-sm md:text-base", children: question }),
|
|
15601
15608
|
isExpanded ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
15602
15609
|
/* @__PURE__ */ jsx(
|
|
15603
15610
|
"textarea",
|
|
15604
15611
|
{
|
|
15605
|
-
className: "w-full p-3 border border-
|
|
15612
|
+
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",
|
|
15606
15613
|
placeholder: "Jot down your thoughts...",
|
|
15607
15614
|
value: response,
|
|
15608
15615
|
onChange: (e) => setResponse(e.target.value),
|
|
@@ -15614,7 +15621,7 @@ var init_ActivationBlock = __esm({
|
|
|
15614
15621
|
"button",
|
|
15615
15622
|
{
|
|
15616
15623
|
onClick: handleSubmit,
|
|
15617
|
-
className: "px-4 py-2 bg-
|
|
15624
|
+
className: "px-4 py-2 bg-primary text-primary-foreground rounded-md hover:bg-primary-hover text-sm font-medium transition-colors",
|
|
15618
15625
|
children: "Continue to Lesson \u2192"
|
|
15619
15626
|
}
|
|
15620
15627
|
),
|
|
@@ -15625,7 +15632,7 @@ var init_ActivationBlock = __esm({
|
|
|
15625
15632
|
emit(`UI:${saveEvent}`, { response: "" });
|
|
15626
15633
|
setIsExpanded(false);
|
|
15627
15634
|
},
|
|
15628
|
-
className: "px-4 py-2 text-
|
|
15635
|
+
className: "px-4 py-2 text-primary hover:underline text-sm",
|
|
15629
15636
|
children: "Skip for now"
|
|
15630
15637
|
}
|
|
15631
15638
|
)
|
|
@@ -15634,7 +15641,7 @@ var init_ActivationBlock = __esm({
|
|
|
15634
15641
|
"button",
|
|
15635
15642
|
{
|
|
15636
15643
|
onClick: () => setIsExpanded(true),
|
|
15637
|
-
className: "text-sm text-
|
|
15644
|
+
className: "text-sm text-primary hover:underline font-medium",
|
|
15638
15645
|
children: "\u2713 Answered \xB7 Edit response"
|
|
15639
15646
|
}
|
|
15640
15647
|
)
|
|
@@ -16138,7 +16145,7 @@ var init_AuthLayout = __esm({
|
|
|
16138
16145
|
VStack,
|
|
16139
16146
|
{
|
|
16140
16147
|
className: cn(
|
|
16141
|
-
"hidden lg:flex lg:w-1/2 bg-primary
|
|
16148
|
+
"hidden lg:flex lg:w-1/2 bg-primary relative overflow-hidden",
|
|
16142
16149
|
"justify-between p-12"
|
|
16143
16150
|
),
|
|
16144
16151
|
style: backgroundImage ? {
|
|
@@ -16147,7 +16154,7 @@ var init_AuthLayout = __esm({
|
|
|
16147
16154
|
} : void 0,
|
|
16148
16155
|
gap: "none",
|
|
16149
16156
|
children: [
|
|
16150
|
-
/* @__PURE__ */ jsx(Box, { className: "absolute inset-0 bg-gradient-to-br from-primary
|
|
16157
|
+
/* @__PURE__ */ jsx(Box, { className: "absolute inset-0 bg-gradient-to-br from-primary/90 to-primary-hover/90" }),
|
|
16151
16158
|
/* @__PURE__ */ jsx(Box, { className: "relative z-10", children: /* @__PURE__ */ jsxs(Link, { to: "/", className: "flex items-center gap-3", children: [
|
|
16152
16159
|
logo || /* @__PURE__ */ jsx(Box, { className: "w-10 h-10 bg-[var(--color-card)]/20 rounded-xl flex items-center justify-center backdrop-blur", children: /* @__PURE__ */ jsx(
|
|
16153
16160
|
Typography,
|
|
@@ -16232,7 +16239,7 @@ var init_AuthLayout = __esm({
|
|
|
16232
16239
|
),
|
|
16233
16240
|
children: /* @__PURE__ */ jsxs(Box, { className: "w-full max-w-md", children: [
|
|
16234
16241
|
/* @__PURE__ */ jsx(Box, { className: "lg:hidden mb-8 text-center", children: /* @__PURE__ */ jsxs(Link, { to: "/", className: "inline-flex items-center gap-3", children: [
|
|
16235
|
-
logo || /* @__PURE__ */ jsx(Box, { className: "w-12 h-12 bg-primary
|
|
16242
|
+
logo || /* @__PURE__ */ jsx(Box, { className: "w-12 h-12 bg-primary rounded-xl flex items-center justify-center", children: /* @__PURE__ */ jsx(
|
|
16236
16243
|
Typography,
|
|
16237
16244
|
{
|
|
16238
16245
|
variant: "body1",
|
|
@@ -17396,7 +17403,7 @@ var init_CodeBlock = __esm({
|
|
|
17396
17403
|
{
|
|
17397
17404
|
justify: "between",
|
|
17398
17405
|
align: "center",
|
|
17399
|
-
className: "px-3 py-2 bg-[var(--color-card)] rounded-t-lg border-b border-
|
|
17406
|
+
className: "px-3 py-2 bg-[var(--color-card)] rounded-t-lg border-b border-border",
|
|
17400
17407
|
children: [
|
|
17401
17408
|
showLanguageBadge && /* @__PURE__ */ jsx(Badge, { variant: "default", size: "sm", children: language }),
|
|
17402
17409
|
effectiveCopy && /* @__PURE__ */ jsx(
|
|
@@ -17405,9 +17412,9 @@ var init_CodeBlock = __esm({
|
|
|
17405
17412
|
variant: "ghost",
|
|
17406
17413
|
size: "sm",
|
|
17407
17414
|
onClick: handleCopy,
|
|
17408
|
-
className: "opacity-0 group-hover:opacity-100 focus:opacity-100 transition-opacity text-muted-foreground hover:text-
|
|
17415
|
+
className: "opacity-0 group-hover:opacity-100 focus:opacity-100 transition-opacity text-muted-foreground hover:text-foreground",
|
|
17409
17416
|
"aria-label": t("common.copy"),
|
|
17410
|
-
children: copied ? /* @__PURE__ */ jsx(Icon, { name: "check", className: "w-4 h-4 text-
|
|
17417
|
+
children: copied ? /* @__PURE__ */ jsx(Icon, { name: "check", className: "w-4 h-4 text-success" }) : /* @__PURE__ */ jsx(Icon, { name: "copy", className: "w-4 h-4" })
|
|
17411
17418
|
}
|
|
17412
17419
|
)
|
|
17413
17420
|
]
|
|
@@ -17775,12 +17782,12 @@ var init_BloomQuizBlock = __esm({
|
|
|
17775
17782
|
init_useEventBus();
|
|
17776
17783
|
init_cn();
|
|
17777
17784
|
BLOOM_CONFIG = {
|
|
17778
|
-
remember: { color: "bg-
|
|
17779
|
-
understand: { color: "bg-
|
|
17780
|
-
apply: { color: "bg-
|
|
17781
|
-
analyze: { color: "bg-
|
|
17782
|
-
evaluate: { color: "bg-
|
|
17783
|
-
create: { color: "bg-
|
|
17785
|
+
remember: { color: "bg-secondary text-secondary-foreground", bgColor: "bg-muted", label: "Remember" },
|
|
17786
|
+
understand: { color: "bg-info text-info-foreground", bgColor: "bg-info/10", label: "Understand" },
|
|
17787
|
+
apply: { color: "bg-success text-success-foreground", bgColor: "bg-success/10", label: "Apply" },
|
|
17788
|
+
analyze: { color: "bg-warning text-warning-foreground", bgColor: "bg-warning/10", label: "Analyze" },
|
|
17789
|
+
evaluate: { color: "bg-accent text-accent-foreground", bgColor: "bg-accent/10", label: "Evaluate" },
|
|
17790
|
+
create: { color: "bg-primary text-primary-foreground", bgColor: "bg-primary/10", label: "Create" }
|
|
17784
17791
|
};
|
|
17785
17792
|
BloomQuizBlock = ({
|
|
17786
17793
|
level,
|
|
@@ -17806,22 +17813,22 @@ var init_BloomQuizBlock = __esm({
|
|
|
17806
17813
|
"div",
|
|
17807
17814
|
{
|
|
17808
17815
|
className: cn(
|
|
17809
|
-
"rounded-lg border border-
|
|
17816
|
+
"rounded-lg border border-primary p-4 my-4 transition-all",
|
|
17810
17817
|
config.bgColor,
|
|
17811
17818
|
className
|
|
17812
17819
|
),
|
|
17813
17820
|
children: [
|
|
17814
17821
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between mb-3", children: [
|
|
17815
17822
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 flex-wrap", children: [
|
|
17816
|
-
index !== void 0 && /* @__PURE__ */ jsxs("span", { className: "text-
|
|
17823
|
+
index !== void 0 && /* @__PURE__ */ jsxs("span", { className: "text-muted-foreground font-medium text-sm", children: [
|
|
17817
17824
|
"Question ",
|
|
17818
17825
|
index + 1
|
|
17819
17826
|
] }),
|
|
17820
|
-
/* @__PURE__ */ jsx("span", { className: cn(config.color, "text-
|
|
17827
|
+
/* @__PURE__ */ jsx("span", { className: cn(config.color, "text-xs px-2 py-1 rounded-full font-medium"), children: config.label })
|
|
17821
17828
|
] }),
|
|
17822
|
-
isAnswered && /* @__PURE__ */ jsx(CheckCircle, { className: "text-
|
|
17829
|
+
isAnswered && /* @__PURE__ */ jsx(CheckCircle, { className: "text-success flex-shrink-0", size: 20 })
|
|
17823
17830
|
] }),
|
|
17824
|
-
/* @__PURE__ */ jsx("div", { className: "font-semibold text-
|
|
17831
|
+
/* @__PURE__ */ jsx("div", { className: "font-semibold text-primary mb-3 space-y-2", children: questionSegments.map(
|
|
17825
17832
|
(segment, idx) => segment.type === "markdown" ? /* @__PURE__ */ jsx(MarkdownContent, { content: segment.content }, `q-md-${idx}`) : /* @__PURE__ */ jsx(
|
|
17826
17833
|
CodeBlock,
|
|
17827
17834
|
{
|
|
@@ -17835,13 +17842,13 @@ var init_BloomQuizBlock = __esm({
|
|
|
17835
17842
|
"button",
|
|
17836
17843
|
{
|
|
17837
17844
|
type: "button",
|
|
17838
|
-
className: "inline-flex items-center rounded-md bg-
|
|
17845
|
+
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",
|
|
17839
17846
|
onClick: handleReveal,
|
|
17840
17847
|
children: revealed ? "Hide Answer" : "Reveal Answer"
|
|
17841
17848
|
}
|
|
17842
17849
|
),
|
|
17843
|
-
revealed && /* @__PURE__ */ jsxs("div", { className: "rounded-lg bg-
|
|
17844
|
-
/* @__PURE__ */ jsx("div", { className: "text-xs text-
|
|
17850
|
+
revealed && /* @__PURE__ */ jsxs("div", { className: "rounded-lg bg-card/80 p-3 text-sm text-foreground shadow-sm border border-primary mt-3 space-y-2", children: [
|
|
17851
|
+
/* @__PURE__ */ jsx("div", { className: "text-xs text-muted-foreground mb-1 font-medium uppercase tracking-wide", children: "Answer:" }),
|
|
17845
17852
|
answerSegments.map(
|
|
17846
17853
|
(segment, idx) => segment.type === "markdown" ? /* @__PURE__ */ jsx(MarkdownContent, { content: segment.content }, `a-md-${idx}`) : /* @__PURE__ */ jsx(
|
|
17847
17854
|
CodeBlock,
|
|
@@ -18115,12 +18122,12 @@ var init_QuizBlock = __esm({
|
|
|
18115
18122
|
}) => {
|
|
18116
18123
|
const { t } = useTranslate();
|
|
18117
18124
|
const [revealed, setRevealed] = useState(false);
|
|
18118
|
-
return /* @__PURE__ */ jsx(Card2, { className: cn("my-4 border-
|
|
18125
|
+
return /* @__PURE__ */ jsx(Card2, { className: cn("my-4 border-primary", className), children: /* @__PURE__ */ jsxs(VStack, { gap: "sm", className: "p-4", children: [
|
|
18119
18126
|
/* @__PURE__ */ jsxs(HStack, { gap: "sm", align: "start", children: [
|
|
18120
|
-
/* @__PURE__ */ jsx(Icon, { icon: HelpCircle, size: "sm", className: "text-
|
|
18127
|
+
/* @__PURE__ */ jsx(Icon, { icon: HelpCircle, size: "sm", className: "text-primary mt-0.5 shrink-0" }),
|
|
18121
18128
|
/* @__PURE__ */ jsx(Typography, { variant: "body", className: "font-medium", children: question })
|
|
18122
18129
|
] }),
|
|
18123
|
-
revealed ? /* @__PURE__ */ jsx(Box, { className: "pl-7 pt-2 border-t border-
|
|
18130
|
+
revealed ? /* @__PURE__ */ jsx(Box, { className: "pl-7 pt-2 border-t border-border", children: /* @__PURE__ */ jsx(Typography, { variant: "body", className: "text-foreground", children: answer }) }) : null,
|
|
18124
18131
|
/* @__PURE__ */ jsx(
|
|
18125
18132
|
Button,
|
|
18126
18133
|
{
|
|
@@ -20032,7 +20039,7 @@ var init_BookTableOfContents = __esm({
|
|
|
20032
20039
|
className: cn(
|
|
20033
20040
|
"justify-start text-left w-full",
|
|
20034
20041
|
direction === "rtl" && "text-right",
|
|
20035
|
-
isCurrent && "bg-
|
|
20042
|
+
isCurrent && "bg-primary/10 text-primary"
|
|
20036
20043
|
),
|
|
20037
20044
|
children: /* @__PURE__ */ jsx(Box, { className: "truncate", children: /* @__PURE__ */ jsx(Typography, { variant: "body", children: String(chapter.title ?? "") }) })
|
|
20038
20045
|
},
|
|
@@ -21280,7 +21287,7 @@ function CalendarGrid({
|
|
|
21280
21287
|
border: true,
|
|
21281
21288
|
className: cn(
|
|
21282
21289
|
"cursor-pointer hover:shadow-sm transition-shadow text-xs truncate",
|
|
21283
|
-
color ? color : "bg-
|
|
21290
|
+
color ? color : "bg-primary/10 border-primary/30 text-primary"
|
|
21284
21291
|
),
|
|
21285
21292
|
onClick: (e) => handleEventClick(event, e),
|
|
21286
21293
|
children: /* @__PURE__ */ jsx(Typography, { variant: "small", className: "truncate font-medium", children: event.title })
|
|
@@ -21378,7 +21385,7 @@ function CalendarGrid({
|
|
|
21378
21385
|
onClick: () => handleSlotClick(day, time),
|
|
21379
21386
|
className: cn(
|
|
21380
21387
|
"border-l border-border",
|
|
21381
|
-
isToday && "bg-
|
|
21388
|
+
isToday && "bg-primary/10"
|
|
21382
21389
|
),
|
|
21383
21390
|
...longPressEvent ? {
|
|
21384
21391
|
onPointerDown: () => startLongPress(day, time),
|
|
@@ -23394,31 +23401,31 @@ var init_CodeRunnerPanel = __esm({
|
|
|
23394
23401
|
}
|
|
23395
23402
|
)
|
|
23396
23403
|
] }),
|
|
23397
|
-
hasOutput && /* @__PURE__ */ jsxs(Box, { className: "rounded-lg border border-
|
|
23404
|
+
hasOutput && /* @__PURE__ */ jsxs(Box, { className: "rounded-lg border border-border bg-foreground overflow-hidden", children: [
|
|
23398
23405
|
/* @__PURE__ */ jsxs(
|
|
23399
23406
|
HStack,
|
|
23400
23407
|
{
|
|
23401
23408
|
gap: "sm",
|
|
23402
23409
|
align: "center",
|
|
23403
|
-
className: "px-3 py-2 bg-
|
|
23410
|
+
className: "px-3 py-2 bg-card border-b border-border",
|
|
23404
23411
|
children: [
|
|
23405
|
-
/* @__PURE__ */ jsx(Terminal, { size: 16, className: "text-
|
|
23406
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-
|
|
23412
|
+
/* @__PURE__ */ jsx(Terminal, { size: 16, className: "text-muted-foreground" }),
|
|
23413
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-foreground font-medium", children: "Output" })
|
|
23407
23414
|
]
|
|
23408
23415
|
}
|
|
23409
23416
|
),
|
|
23410
|
-
/* @__PURE__ */ jsx(VStack, { gap: "none", className: "p-3 font-mono text-sm", children: error ? /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-
|
|
23411
|
-
output?.stdout ? /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-
|
|
23412
|
-
output?.stderr ? /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-
|
|
23413
|
-
!output?.stdout && !output?.stderr ? /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-
|
|
23414
|
-
output && output.testResults.length > 0 && /* @__PURE__ */ jsx(Box, { className: "mt-3 pt-3 border-t border-
|
|
23415
|
-
test.passed ? /* @__PURE__ */ jsx(CheckCircle, { size: 14, className: "text-
|
|
23417
|
+
/* @__PURE__ */ jsx(VStack, { gap: "none", className: "p-3 font-mono text-sm", children: error ? /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-error whitespace-pre-wrap", children: error }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
23418
|
+
output?.stdout ? /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-background whitespace-pre-wrap", children: output.stdout }) : null,
|
|
23419
|
+
output?.stderr ? /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-error whitespace-pre-wrap", children: output.stderr }) : null,
|
|
23420
|
+
!output?.stdout && !output?.stderr ? /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-background italic", children: "No output" }) : null,
|
|
23421
|
+
output && output.testResults.length > 0 && /* @__PURE__ */ jsx(Box, { className: "mt-3 pt-3 border-t border-border space-y-2", children: output.testResults.map((test, index) => /* @__PURE__ */ jsxs(HStack, { gap: "sm", align: "start", className: "text-xs", children: [
|
|
23422
|
+
test.passed ? /* @__PURE__ */ jsx(CheckCircle, { size: 14, className: "text-success mt-0.5" }) : /* @__PURE__ */ jsx(XCircle, { size: 14, className: "text-error mt-0.5" }),
|
|
23416
23423
|
/* @__PURE__ */ jsxs(VStack, { gap: "xs", className: "flex-1", children: [
|
|
23417
23424
|
/* @__PURE__ */ jsxs(
|
|
23418
23425
|
Typography,
|
|
23419
23426
|
{
|
|
23420
23427
|
variant: "small",
|
|
23421
|
-
className: test.passed ? "text-
|
|
23428
|
+
className: test.passed ? "text-success" : "text-error",
|
|
23422
23429
|
children: [
|
|
23423
23430
|
"Test ",
|
|
23424
23431
|
index + 1,
|
|
@@ -23427,15 +23434,15 @@ var init_CodeRunnerPanel = __esm({
|
|
|
23427
23434
|
]
|
|
23428
23435
|
}
|
|
23429
23436
|
),
|
|
23430
|
-
/* @__PURE__ */ jsxs(Typography, { variant: "small", className: "text-
|
|
23437
|
+
/* @__PURE__ */ jsxs(Typography, { variant: "small", className: "text-background", children: [
|
|
23431
23438
|
"Input: ",
|
|
23432
23439
|
test.input
|
|
23433
23440
|
] }),
|
|
23434
|
-
/* @__PURE__ */ jsxs(Typography, { variant: "small", className: "text-
|
|
23441
|
+
/* @__PURE__ */ jsxs(Typography, { variant: "small", className: "text-background", children: [
|
|
23435
23442
|
"Expected: ",
|
|
23436
23443
|
test.expectedOutput
|
|
23437
23444
|
] }),
|
|
23438
|
-
/* @__PURE__ */ jsxs(Typography, { variant: "small", className: "text-
|
|
23445
|
+
/* @__PURE__ */ jsxs(Typography, { variant: "small", className: "text-background", children: [
|
|
23439
23446
|
"Actual: ",
|
|
23440
23447
|
test.actualOutput
|
|
23441
23448
|
] })
|
|
@@ -23620,14 +23627,14 @@ var init_ConnectionBlock = __esm({
|
|
|
23620
23627
|
"div",
|
|
23621
23628
|
{
|
|
23622
23629
|
className: cn(
|
|
23623
|
-
"bg-
|
|
23630
|
+
"bg-success/10 border-l-4 border-success rounded-r-lg p-5 mb-6",
|
|
23624
23631
|
className
|
|
23625
23632
|
),
|
|
23626
23633
|
children: /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-3", children: [
|
|
23627
|
-
/* @__PURE__ */ jsx(Link2, { className: "text-
|
|
23634
|
+
/* @__PURE__ */ jsx(Link2, { className: "text-success flex-shrink-0 mt-1", size: 20 }),
|
|
23628
23635
|
/* @__PURE__ */ jsxs("div", { className: "flex-1", children: [
|
|
23629
|
-
/* @__PURE__ */ jsx("h4", { className: "font-semibold text-
|
|
23630
|
-
/* @__PURE__ */ jsx("div", { className: "prose dark:prose-invert prose-sm max-w-none text-
|
|
23636
|
+
/* @__PURE__ */ jsx("h4", { className: "font-semibold text-success mb-2", children: "Building On What You Know" }),
|
|
23637
|
+
/* @__PURE__ */ jsx("div", { className: "prose dark:prose-invert prose-sm max-w-none text-foreground", children: /* @__PURE__ */ jsx(MarkdownContent, { content }) })
|
|
23631
23638
|
] })
|
|
23632
23639
|
] })
|
|
23633
23640
|
}
|
|
@@ -23714,7 +23721,7 @@ function CounterStandard({
|
|
|
23714
23721
|
variant: "h1",
|
|
23715
23722
|
className: cn(
|
|
23716
23723
|
sizeStyles8[size].display,
|
|
23717
|
-
"font-bold tabular-nums text-primary
|
|
23724
|
+
"font-bold tabular-nums text-primary"
|
|
23718
23725
|
),
|
|
23719
23726
|
children: resolved.count
|
|
23720
23727
|
}
|
|
@@ -23787,7 +23794,7 @@ function CounterFull({
|
|
|
23787
23794
|
variant: "h1",
|
|
23788
23795
|
className: cn(
|
|
23789
23796
|
sizeStyles8[size].display,
|
|
23790
|
-
"font-bold tabular-nums text-primary
|
|
23797
|
+
"font-bold tabular-nums text-primary"
|
|
23791
23798
|
),
|
|
23792
23799
|
children: resolved.count
|
|
23793
23800
|
}
|
|
@@ -24048,11 +24055,11 @@ var init_DashboardLayout = __esm({
|
|
|
24048
24055
|
className: "h-16 px-4 border-b border-border dark:border-border",
|
|
24049
24056
|
children: [
|
|
24050
24057
|
/* @__PURE__ */ jsxs(Link, { to: "/", className: "flex items-center gap-2", children: [
|
|
24051
|
-
logo || /* @__PURE__ */ jsx(Box, { className: "w-8 h-8 bg-primary
|
|
24058
|
+
logo || /* @__PURE__ */ jsx(Box, { className: "w-8 h-8 bg-primary rounded-lg flex items-center justify-center", children: /* @__PURE__ */ jsx(
|
|
24052
24059
|
Typography,
|
|
24053
24060
|
{
|
|
24054
24061
|
variant: "small",
|
|
24055
|
-
className: "text-
|
|
24062
|
+
className: "text-primary-foreground font-bold text-sm",
|
|
24056
24063
|
as: "span",
|
|
24057
24064
|
children: appName.charAt(0).toUpperCase()
|
|
24058
24065
|
}
|
|
@@ -24131,11 +24138,11 @@ var init_DashboardLayout = __esm({
|
|
|
24131
24138
|
className: "hidden @md/dashboard:flex items-center gap-1 overflow-x-auto",
|
|
24132
24139
|
children: [
|
|
24133
24140
|
/* @__PURE__ */ jsxs(Link, { to: "/", className: "flex items-center gap-2 mr-3 shrink-0", children: [
|
|
24134
|
-
logo || /* @__PURE__ */ jsx(Box, { className: "w-7 h-7 bg-primary
|
|
24141
|
+
logo || /* @__PURE__ */ jsx(Box, { className: "w-7 h-7 bg-primary rounded-lg flex items-center justify-center", children: /* @__PURE__ */ jsx(
|
|
24135
24142
|
Typography,
|
|
24136
24143
|
{
|
|
24137
24144
|
variant: "small",
|
|
24138
|
-
className: "text-
|
|
24145
|
+
className: "text-primary-foreground font-bold text-xs",
|
|
24139
24146
|
as: "span",
|
|
24140
24147
|
children: appName.charAt(0).toUpperCase()
|
|
24141
24148
|
}
|
|
@@ -24195,8 +24202,8 @@ var init_DashboardLayout = __esm({
|
|
|
24195
24202
|
{
|
|
24196
24203
|
as: "span",
|
|
24197
24204
|
className: cn(
|
|
24198
|
-
"absolute -top-0.5 -right-0.5 min-w-[18px] h-[18px] px-1 rounded-full text-xs font-semibold
|
|
24199
|
-
action.variant === "danger" ? "bg-error" : action.variant === "primary" ? "bg-primary" : "bg-foreground"
|
|
24205
|
+
"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",
|
|
24206
|
+
action.variant === "danger" ? "bg-error text-error-foreground" : action.variant === "primary" ? "bg-primary text-primary-foreground" : "bg-foreground text-background"
|
|
24200
24207
|
),
|
|
24201
24208
|
children: action.badge
|
|
24202
24209
|
}
|
|
@@ -24218,7 +24225,7 @@ var init_DashboardLayout = __esm({
|
|
|
24218
24225
|
Box,
|
|
24219
24226
|
{
|
|
24220
24227
|
as: "span",
|
|
24221
|
-
className: "absolute -top-0.5 -right-0.5 min-w-[18px] h-[18px] px-1 bg-error rounded-full text-xs font-semibold text-
|
|
24228
|
+
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",
|
|
24222
24229
|
children: unreadCount > 99 ? "99+" : unreadCount
|
|
24223
24230
|
}
|
|
24224
24231
|
)
|
|
@@ -24501,7 +24508,7 @@ function SubMenu({
|
|
|
24501
24508
|
),
|
|
24502
24509
|
children: [
|
|
24503
24510
|
item.icon && (typeof item.icon === "string" ? /* @__PURE__ */ jsx(Icon, { name: item.icon, size: "sm", className: "flex-shrink-0" }) : /* @__PURE__ */ jsx(Icon, { icon: item.icon, size: "sm", className: "flex-shrink-0" })),
|
|
24504
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", className: cn("flex-1", isDanger && "text-
|
|
24511
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", className: cn("flex-1", isDanger && "text-error"), children: item.label }),
|
|
24505
24512
|
item.badge !== void 0 && /* @__PURE__ */ jsx("span", { className: "ml-auto text-xs font-medium", children: item.badge })
|
|
24506
24513
|
]
|
|
24507
24514
|
},
|
|
@@ -24558,7 +24565,7 @@ function MenuItemRow({
|
|
|
24558
24565
|
Typography,
|
|
24559
24566
|
{
|
|
24560
24567
|
variant: "small",
|
|
24561
|
-
className: cn("flex-1", isDanger && "text-
|
|
24568
|
+
className: cn("flex-1", isDanger && "text-error"),
|
|
24562
24569
|
children: item.label
|
|
24563
24570
|
}
|
|
24564
24571
|
),
|
|
@@ -25326,14 +25333,25 @@ function DataGrid({
|
|
|
25326
25333
|
const bodyFields = fieldDefs.filter((f3) => f3 !== titleField && !badgeFields.includes(f3));
|
|
25327
25334
|
const primaryActions = actionDefs.filter((a) => a.variant !== "danger");
|
|
25328
25335
|
const dangerActions = actionDefs.filter((a) => a.variant === "danger");
|
|
25329
|
-
const
|
|
25330
|
-
|
|
25336
|
+
const fireAction = (action, itemData) => {
|
|
25337
|
+
if (action.navigatesTo) {
|
|
25338
|
+
const url = action.navigatesTo.replace(
|
|
25339
|
+
/\{\{row\.(\w+(?:\.\w+)*)\}\}/g,
|
|
25340
|
+
(_, field) => String(itemData[field] ?? "")
|
|
25341
|
+
);
|
|
25342
|
+
eventBus.emit("UI:NAVIGATE", { url, row: itemData });
|
|
25343
|
+
return;
|
|
25344
|
+
}
|
|
25331
25345
|
const payload = {
|
|
25332
25346
|
id: itemData.id,
|
|
25333
25347
|
row: itemData
|
|
25334
25348
|
};
|
|
25335
25349
|
eventBus.emit(`UI:${action.event}`, payload);
|
|
25336
25350
|
};
|
|
25351
|
+
const handleActionClick = (action, itemData) => (e) => {
|
|
25352
|
+
e.stopPropagation();
|
|
25353
|
+
fireAction(action, itemData);
|
|
25354
|
+
};
|
|
25337
25355
|
const hasRenderProp = typeof children === "function";
|
|
25338
25356
|
useEffect(() => {
|
|
25339
25357
|
if (data.length > 0 && !hasRenderProp && fieldDefs.length === 0) {
|
|
@@ -25400,13 +25418,46 @@ function DataGrid({
|
|
|
25400
25418
|
const wrapDnd = (node) => dnd.isZone ? /* @__PURE__ */ jsx(dnd.SortableItem, { id: dndId, children: node }, dndId) : node;
|
|
25401
25419
|
if (hasRenderProp) {
|
|
25402
25420
|
return wrapDnd(
|
|
25403
|
-
/* @__PURE__ */
|
|
25421
|
+
/* @__PURE__ */ jsxs(
|
|
25404
25422
|
Box,
|
|
25405
25423
|
{
|
|
25406
25424
|
"data-entity-row": true,
|
|
25407
25425
|
"data-entity-id": id,
|
|
25408
25426
|
className: cn(isSelected && "ring-2 ring-primary rounded-lg"),
|
|
25409
|
-
children:
|
|
25427
|
+
children: [
|
|
25428
|
+
children(itemData, index),
|
|
25429
|
+
actionDefs.length > 0 && /* @__PURE__ */ jsx(Box, { className: "px-4 py-3 border-t border-border", children: /* @__PURE__ */ jsxs(HStack, { gap: "sm", className: "justify-end", children: [
|
|
25430
|
+
(maxInlineActions != null ? actionDefs.slice(0, maxInlineActions) : actionDefs).map((action, idx) => /* @__PURE__ */ jsxs(
|
|
25431
|
+
Button,
|
|
25432
|
+
{
|
|
25433
|
+
variant: action.variant === "primary" ? "primary" : "ghost",
|
|
25434
|
+
size: "sm",
|
|
25435
|
+
onClick: handleActionClick(action, itemData),
|
|
25436
|
+
"data-testid": `action-${action.event}`,
|
|
25437
|
+
"data-row-id": String(itemData.id),
|
|
25438
|
+
className: action.variant === "danger" ? "text-error hover:text-error hover:bg-error/10" : void 0,
|
|
25439
|
+
children: [
|
|
25440
|
+
action.icon && renderIconInput(action.icon, { size: "xs", className: "mr-1" }),
|
|
25441
|
+
action.label
|
|
25442
|
+
]
|
|
25443
|
+
},
|
|
25444
|
+
idx
|
|
25445
|
+
)),
|
|
25446
|
+
maxInlineActions != null && actionDefs.length > maxInlineActions && /* @__PURE__ */ jsx(
|
|
25447
|
+
Menu,
|
|
25448
|
+
{
|
|
25449
|
+
position: "bottom-end",
|
|
25450
|
+
trigger: /* @__PURE__ */ jsx(Button, { variant: "ghost", size: "sm", "aria-label": t("common.actions"), "data-testid": "action-overflow", children: /* @__PURE__ */ jsx(Icon, { name: "more-horizontal", size: "xs" }) }),
|
|
25451
|
+
items: actionDefs.slice(maxInlineActions).map((action) => ({
|
|
25452
|
+
label: action.label,
|
|
25453
|
+
icon: action.icon,
|
|
25454
|
+
event: action.event,
|
|
25455
|
+
onClick: () => fireAction(action, itemData)
|
|
25456
|
+
}))
|
|
25457
|
+
}
|
|
25458
|
+
)
|
|
25459
|
+
] }) })
|
|
25460
|
+
]
|
|
25410
25461
|
},
|
|
25411
25462
|
id
|
|
25412
25463
|
)
|
|
@@ -25543,10 +25594,7 @@ function DataGrid({
|
|
|
25543
25594
|
label: action.label,
|
|
25544
25595
|
icon: action.icon,
|
|
25545
25596
|
event: action.event,
|
|
25546
|
-
onClick: () =>
|
|
25547
|
-
id: itemData.id,
|
|
25548
|
-
row: itemData
|
|
25549
|
-
})
|
|
25597
|
+
onClick: () => fireAction(action, itemData)
|
|
25550
25598
|
}))
|
|
25551
25599
|
}
|
|
25552
25600
|
)
|
|
@@ -26430,7 +26478,9 @@ var init_FilterGroup = __esm({
|
|
|
26430
26478
|
showIcon = true,
|
|
26431
26479
|
query,
|
|
26432
26480
|
isLoading,
|
|
26433
|
-
look = "toolbar"
|
|
26481
|
+
look = "toolbar",
|
|
26482
|
+
event,
|
|
26483
|
+
clearEvent
|
|
26434
26484
|
}) => {
|
|
26435
26485
|
const { t } = useTranslate();
|
|
26436
26486
|
const eventBus = useEventBus();
|
|
@@ -26467,14 +26517,18 @@ var init_FilterGroup = __esm({
|
|
|
26467
26517
|
queryState.setFilter(field, value === "all" ? null : value);
|
|
26468
26518
|
}
|
|
26469
26519
|
onFilterChange?.(field, value === "all" ? null : value);
|
|
26470
|
-
|
|
26520
|
+
const payload = {
|
|
26471
26521
|
entity,
|
|
26472
26522
|
field,
|
|
26473
26523
|
value: value === "all" || value === null ? "" : value,
|
|
26474
26524
|
query
|
|
26475
|
-
}
|
|
26525
|
+
};
|
|
26526
|
+
if (event && event !== "FILTER") {
|
|
26527
|
+
eventBus.emit(`UI:${event}`, payload);
|
|
26528
|
+
}
|
|
26529
|
+
eventBus.emit("UI:FILTER", payload);
|
|
26476
26530
|
},
|
|
26477
|
-
[onFilterChange, queryState, eventBus, entity, query]
|
|
26531
|
+
[onFilterChange, queryState, eventBus, entity, query, event]
|
|
26478
26532
|
);
|
|
26479
26533
|
const handleClearAll = useCallback(() => {
|
|
26480
26534
|
setSelectedValues({});
|
|
@@ -26482,8 +26536,11 @@ var init_FilterGroup = __esm({
|
|
|
26482
26536
|
queryState.clearFilters();
|
|
26483
26537
|
}
|
|
26484
26538
|
onClearAll?.();
|
|
26539
|
+
if (clearEvent && clearEvent !== "CLEAR_FILTERS") {
|
|
26540
|
+
eventBus.emit(`UI:${clearEvent}`, { entity, query });
|
|
26541
|
+
}
|
|
26485
26542
|
eventBus.emit("UI:CLEAR_FILTERS", { entity, query });
|
|
26486
|
-
}, [onClearAll, queryState, eventBus, entity, query]);
|
|
26543
|
+
}, [onClearAll, queryState, eventBus, entity, query, clearEvent]);
|
|
26487
26544
|
const activeFilterCount = Object.keys(selectedValues).length;
|
|
26488
26545
|
if (variant === "pills") {
|
|
26489
26546
|
return /* @__PURE__ */ jsxs(
|
|
@@ -27464,8 +27521,8 @@ var init_RelationSelect = __esm({
|
|
|
27464
27521
|
disabled,
|
|
27465
27522
|
className: cn(
|
|
27466
27523
|
"w-full justify-between font-normal",
|
|
27467
|
-
error && "border-
|
|
27468
|
-
isOpen && "ring-2 ring-primary
|
|
27524
|
+
error && "border-error/50 focus:border-error focus:ring-error",
|
|
27525
|
+
isOpen && "ring-2 ring-primary border-primary"
|
|
27469
27526
|
),
|
|
27470
27527
|
children: [
|
|
27471
27528
|
/* @__PURE__ */ jsx(
|
|
@@ -27545,7 +27602,7 @@ var init_RelationSelect = __esm({
|
|
|
27545
27602
|
paddingY: "sm",
|
|
27546
27603
|
className: cn(
|
|
27547
27604
|
"text-left text-sm hover:bg-muted focus:outline-none focus:bg-muted",
|
|
27548
|
-
option.value === value && "bg-primary
|
|
27605
|
+
option.value === value && "bg-primary/10 text-primary",
|
|
27549
27606
|
option.disabled && "opacity-50 cursor-not-allowed"
|
|
27550
27607
|
),
|
|
27551
27608
|
onClick: () => handleSelect(option),
|
|
@@ -27611,7 +27668,7 @@ var init_SearchInput = __esm({
|
|
|
27611
27668
|
queryState.setSearch(newValue);
|
|
27612
27669
|
}
|
|
27613
27670
|
onSearch?.(newValue);
|
|
27614
|
-
if (event) {
|
|
27671
|
+
if (event && event !== "SEARCH") {
|
|
27615
27672
|
eventBus.emit(`UI:${event}`, { searchTerm: newValue, entity });
|
|
27616
27673
|
}
|
|
27617
27674
|
if (event || entity || query) {
|
|
@@ -27702,7 +27759,7 @@ var init_SidePanel = __esm({
|
|
|
27702
27759
|
showOverlay && /* @__PURE__ */ jsx(Presence, { show: isOpen, animation: "overlay", children: /* @__PURE__ */ jsx(
|
|
27703
27760
|
Box,
|
|
27704
27761
|
{
|
|
27705
|
-
className: "fixed inset-0 bg-
|
|
27762
|
+
className: "fixed inset-0 bg-background/80 backdrop-blur-sm z-40 lg:hidden",
|
|
27706
27763
|
onClick: handleClose
|
|
27707
27764
|
}
|
|
27708
27765
|
) }),
|
|
@@ -28069,7 +28126,7 @@ var init_WizardNavigation = __esm({
|
|
|
28069
28126
|
/* @__PURE__ */ jsx(Icon, { name: "chevron-left", size: "sm" }),
|
|
28070
28127
|
resolvedBackLabel
|
|
28071
28128
|
] }) : /* @__PURE__ */ jsx(Box, {}),
|
|
28072
|
-
/* @__PURE__ */ jsx(HStack, { align: "center", gap: "sm", children: /* @__PURE__ */ jsx(Typography, { variant: "caption", className: "text-
|
|
28129
|
+
/* @__PURE__ */ jsx(HStack, { align: "center", gap: "sm", children: /* @__PURE__ */ jsx(Typography, { variant: "caption", className: "text-muted-foreground", children: t("wizard.stepOf", { current: String(currentStep + 1), total: String(totalSteps) }) }) }),
|
|
28073
28130
|
isLastStep && showComplete ? /* @__PURE__ */ jsx(Button, { variant: "primary", onClick: handleComplete, disabled: !isValid, children: resolvedCompleteLabel }) : showNext ? /* @__PURE__ */ jsxs(Button, { variant: "primary", onClick: handleNext, disabled: !isValid, children: [
|
|
28074
28131
|
resolvedNextLabel,
|
|
28075
28132
|
/* @__PURE__ */ jsx(Icon, { name: "chevron-right", size: "sm" })
|
|
@@ -30226,6 +30283,7 @@ var init_Lightbox = __esm({
|
|
|
30226
30283
|
{
|
|
30227
30284
|
className: cn(
|
|
30228
30285
|
"fixed inset-0 z-50 flex items-center justify-center",
|
|
30286
|
+
// eslint-disable-next-line almadar/no-hardcoded-colors -- media overlay: lightbox scrim behind images
|
|
30229
30287
|
"bg-black bg-opacity-90",
|
|
30230
30288
|
className
|
|
30231
30289
|
),
|
|
@@ -30248,7 +30306,7 @@ var init_Lightbox = __esm({
|
|
|
30248
30306
|
"p-2 rounded-full",
|
|
30249
30307
|
"text-[var(--color-foreground)] bg-[var(--color-card)]",
|
|
30250
30308
|
"hover:bg-opacity-70 transition-opacity",
|
|
30251
|
-
"focus:outline-none focus:ring-2 focus:ring-
|
|
30309
|
+
"focus:outline-none focus:ring-2 focus:ring-ring"
|
|
30252
30310
|
),
|
|
30253
30311
|
"aria-label": t("aria.closeModal"),
|
|
30254
30312
|
children: /* @__PURE__ */ jsx(Icon, { name: "x", className: "w-6 h-6" })
|
|
@@ -30267,7 +30325,7 @@ var init_Lightbox = __esm({
|
|
|
30267
30325
|
"p-2 rounded-full",
|
|
30268
30326
|
"text-[var(--color-foreground)] bg-[var(--color-card)]",
|
|
30269
30327
|
"hover:bg-opacity-70 transition-opacity",
|
|
30270
|
-
"focus:outline-none focus:ring-2 focus:ring-
|
|
30328
|
+
"focus:outline-none focus:ring-2 focus:ring-ring"
|
|
30271
30329
|
),
|
|
30272
30330
|
"aria-label": t("aria.previousImage"),
|
|
30273
30331
|
children: /* @__PURE__ */ jsx(Icon, { name: "chevron-left", className: "w-8 h-8" })
|
|
@@ -30304,7 +30362,7 @@ var init_Lightbox = __esm({
|
|
|
30304
30362
|
"p-2 rounded-full",
|
|
30305
30363
|
"text-[var(--color-foreground)] bg-[var(--color-card)]",
|
|
30306
30364
|
"hover:bg-opacity-70 transition-opacity",
|
|
30307
|
-
"focus:outline-none focus:ring-2 focus:ring-
|
|
30365
|
+
"focus:outline-none focus:ring-2 focus:ring-ring"
|
|
30308
30366
|
),
|
|
30309
30367
|
"aria-label": t("aria.nextImage"),
|
|
30310
30368
|
children: /* @__PURE__ */ jsx(Icon, { name: "chevron-right", className: "w-8 h-8" })
|
|
@@ -33377,6 +33435,7 @@ var init_QrScanner = __esm({
|
|
|
33377
33435
|
overflow: "hidden",
|
|
33378
33436
|
rounded: "sm",
|
|
33379
33437
|
className: cn(
|
|
33438
|
+
// eslint-disable-next-line almadar/no-hardcoded-colors -- media overlay: always over a dark scrim
|
|
33380
33439
|
"bg-black",
|
|
33381
33440
|
"aspect-square w-full max-w-md",
|
|
33382
33441
|
className
|
|
@@ -33441,7 +33500,9 @@ var init_QrScanner = __esm({
|
|
|
33441
33500
|
type: "button",
|
|
33442
33501
|
onClick: togglePause,
|
|
33443
33502
|
className: cn(
|
|
33503
|
+
// eslint-disable-next-line almadar/no-hardcoded-colors -- media overlay: always over a dark scrim
|
|
33444
33504
|
"rounded-full bg-black bg-opacity-60 p-2 text-white",
|
|
33505
|
+
// eslint-disable-next-line almadar/no-hardcoded-colors -- media overlay: always over a dark scrim
|
|
33445
33506
|
"hover:bg-opacity-80 focus:outline-none focus:ring-2 focus:ring-white"
|
|
33446
33507
|
),
|
|
33447
33508
|
"aria-label": isPaused ? t("qrScanner.resumeScanning") : t("qrScanner.pauseScanning"),
|
|
@@ -33454,7 +33515,9 @@ var init_QrScanner = __esm({
|
|
|
33454
33515
|
type: "button",
|
|
33455
33516
|
onClick: toggleFacing,
|
|
33456
33517
|
className: cn(
|
|
33518
|
+
// eslint-disable-next-line almadar/no-hardcoded-colors -- media overlay: always over a dark scrim
|
|
33457
33519
|
"rounded-full bg-black bg-opacity-60 p-2 text-white",
|
|
33520
|
+
// eslint-disable-next-line almadar/no-hardcoded-colors -- media overlay: always over a dark scrim
|
|
33458
33521
|
"hover:bg-opacity-80 focus:outline-none focus:ring-2 focus:ring-white"
|
|
33459
33522
|
),
|
|
33460
33523
|
"aria-label": currentFacing === "environment" ? t("qrScanner.switchToFrontCamera") : t("qrScanner.switchToRearCamera"),
|
|
@@ -33467,7 +33530,9 @@ var init_QrScanner = __esm({
|
|
|
33467
33530
|
type: "button",
|
|
33468
33531
|
onClick: handleMockScan,
|
|
33469
33532
|
className: cn(
|
|
33533
|
+
// eslint-disable-next-line almadar/no-hardcoded-colors -- media overlay: always over a dark scrim
|
|
33470
33534
|
"rounded-full bg-black bg-opacity-60 px-3 py-2 text-xs text-white",
|
|
33535
|
+
// eslint-disable-next-line almadar/no-hardcoded-colors -- media overlay: always over a dark scrim
|
|
33471
33536
|
"hover:bg-opacity-80 focus:outline-none focus:ring-2 focus:ring-white"
|
|
33472
33537
|
),
|
|
33473
33538
|
"aria-label": t("aria.mockScanDev"),
|
|
@@ -38284,19 +38349,19 @@ var init_ReflectionBlock = __esm({
|
|
|
38284
38349
|
"div",
|
|
38285
38350
|
{
|
|
38286
38351
|
className: cn(
|
|
38287
|
-
"my-6 border-l-4 border-
|
|
38352
|
+
"my-6 border-l-4 border-warning bg-warning/10 rounded-r-lg p-4",
|
|
38288
38353
|
className
|
|
38289
38354
|
),
|
|
38290
38355
|
children: /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-3", children: [
|
|
38291
|
-
/* @__PURE__ */ jsx(PauseCircle, { className: "text-
|
|
38356
|
+
/* @__PURE__ */ jsx(PauseCircle, { className: "text-warning flex-shrink-0 mt-1", size: 20 }),
|
|
38292
38357
|
/* @__PURE__ */ jsxs("div", { className: "flex-1", children: [
|
|
38293
|
-
/* @__PURE__ */ jsx("div", { className: "font-medium text-
|
|
38294
|
-
/* @__PURE__ */ jsx("p", { className: "text-
|
|
38358
|
+
/* @__PURE__ */ jsx("div", { className: "font-medium text-warning mb-2", children: "Pause & Reflect" }),
|
|
38359
|
+
/* @__PURE__ */ jsx("p", { className: "text-foreground text-sm mb-3", children: prompt }),
|
|
38295
38360
|
isExpanded ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
38296
38361
|
/* @__PURE__ */ jsx(
|
|
38297
38362
|
"textarea",
|
|
38298
38363
|
{
|
|
38299
|
-
className: "w-full p-2 border border-
|
|
38364
|
+
className: "w-full p-2 border border-input rounded text-sm bg-card text-foreground focus:ring-2 focus:ring-ring focus:border-transparent",
|
|
38300
38365
|
placeholder: "Your thoughts...",
|
|
38301
38366
|
value: note,
|
|
38302
38367
|
onChange: (e) => setNote(e.target.value),
|
|
@@ -38307,7 +38372,7 @@ var init_ReflectionBlock = __esm({
|
|
|
38307
38372
|
"button",
|
|
38308
38373
|
{
|
|
38309
38374
|
onClick: handleSave,
|
|
38310
|
-
className: "mt-2 text-sm px-3 py-1 bg-
|
|
38375
|
+
className: "mt-2 text-sm px-3 py-1 bg-warning text-warning-foreground rounded hover:opacity-90 transition-colors",
|
|
38311
38376
|
children: "Save & Continue"
|
|
38312
38377
|
}
|
|
38313
38378
|
)
|
|
@@ -38315,7 +38380,7 @@ var init_ReflectionBlock = __esm({
|
|
|
38315
38380
|
"button",
|
|
38316
38381
|
{
|
|
38317
38382
|
onClick: () => setIsExpanded(true),
|
|
38318
|
-
className: "text-sm text-
|
|
38383
|
+
className: "text-sm text-warning hover:underline",
|
|
38319
38384
|
children: savedNote ? "\u2713 Answered \xB7 Edit" : "Answer this question"
|
|
38320
38385
|
}
|
|
38321
38386
|
)
|
|
@@ -38601,7 +38666,7 @@ function DataTable({
|
|
|
38601
38666
|
)),
|
|
38602
38667
|
rowActions && /* @__PURE__ */ jsx("th", { className: "w-12 px-4 py-3" })
|
|
38603
38668
|
] }) }),
|
|
38604
|
-
/* @__PURE__ */ jsx("tbody", { className: "divide-y divide-
|
|
38669
|
+
/* @__PURE__ */ jsx("tbody", { className: "divide-y divide-border", children: isLoading ? /* @__PURE__ */ jsx("tr", { children: /* @__PURE__ */ jsx(
|
|
38605
38670
|
"td",
|
|
38606
38671
|
{
|
|
38607
38672
|
colSpan: normalizedColumns.length + (selectable ? 1 : 0) + (rowActions ? 1 : 0),
|
|
@@ -38972,7 +39037,7 @@ var init_DetailPanel = __esm({
|
|
|
38972
39037
|
};
|
|
38973
39038
|
const effectiveFieldNames = isFieldDefArray(propFields) ? normalizeFieldDefs(propFields) : fieldNames;
|
|
38974
39039
|
const fieldTypeMap = isFieldDefArray(propFields) ? buildFieldTypeMap(propFields) : {};
|
|
38975
|
-
useCallback(
|
|
39040
|
+
const handleActionClick = useCallback(
|
|
38976
39041
|
(action, data2) => {
|
|
38977
39042
|
if (action.navigatesTo) {
|
|
38978
39043
|
const url = action.navigatesTo.replace(
|
|
@@ -39164,8 +39229,9 @@ var init_DetailPanel = __esm({
|
|
|
39164
39229
|
{
|
|
39165
39230
|
variant: action.variant || "secondary",
|
|
39166
39231
|
size: "sm",
|
|
39167
|
-
action: action.event,
|
|
39232
|
+
action: action.navigatesTo ? void 0 : action.event,
|
|
39168
39233
|
actionPayload: { row: normalizedData },
|
|
39234
|
+
onClick: action.navigatesTo ? () => handleActionClick(action, normalizedData) : void 0,
|
|
39169
39235
|
icon: action.icon,
|
|
39170
39236
|
"data-testid": action.event ? `action-${action.event}` : void 0,
|
|
39171
39237
|
"data-row-id": normalizedData?.id !== void 0 ? String(normalizedData.id) : void 0,
|
|
@@ -41208,8 +41274,9 @@ var init_MediaGallery = __esm({
|
|
|
41208
41274
|
)
|
|
41209
41275
|
}
|
|
41210
41276
|
),
|
|
41211
|
-
item.caption &&
|
|
41212
|
-
|
|
41277
|
+
item.caption && // eslint-disable-next-line almadar/no-hardcoded-colors -- media overlay: caption scrim over image
|
|
41278
|
+
/* @__PURE__ */ jsx(Box, { className: "absolute bottom-0 left-0 right-0 p-2 bg-gradient-to-t from-black/60 to-transparent", children: /* @__PURE__ */ jsx(Typography, { variant: "caption", className: "text-white truncate", children: item.caption }) }),
|
|
41279
|
+
selectable && isSelected && /* @__PURE__ */ jsx(Box, { className: "absolute top-2 right-2 w-5 h-5 rounded-full bg-primary flex items-center justify-center", children: /* @__PURE__ */ jsx(Typography, { variant: "caption", className: "text-primary-foreground text-xs", children: "\u2713" }) })
|
|
41213
41280
|
]
|
|
41214
41281
|
},
|
|
41215
41282
|
item.id
|
|
@@ -41238,7 +41305,7 @@ var init_MediaGallery = __esm({
|
|
|
41238
41305
|
size: "sm",
|
|
41239
41306
|
icon: X,
|
|
41240
41307
|
action: "LIGHTBOX_CLOSE",
|
|
41241
|
-
className: "text-
|
|
41308
|
+
className: "text-foreground hover:bg-muted/50"
|
|
41242
41309
|
}
|
|
41243
41310
|
) }),
|
|
41244
41311
|
/* @__PURE__ */ jsx(
|
|
@@ -41249,7 +41316,7 @@ var init_MediaGallery = __esm({
|
|
|
41249
41316
|
className: "max-w-full max-h-[80vh] object-contain rounded-md"
|
|
41250
41317
|
}
|
|
41251
41318
|
),
|
|
41252
|
-
lightboxItem.caption && /* @__PURE__ */ jsx(Typography, { variant: "body", className: "text-
|
|
41319
|
+
lightboxItem.caption && /* @__PURE__ */ jsx(Typography, { variant: "body", className: "text-foreground mt-3 text-center", children: lightboxItem.caption })
|
|
41253
41320
|
]
|
|
41254
41321
|
}
|
|
41255
41322
|
)
|
|
@@ -41710,7 +41777,7 @@ function WalkMinimap() {
|
|
|
41710
41777
|
{
|
|
41711
41778
|
variant,
|
|
41712
41779
|
size: "sm",
|
|
41713
|
-
className: `flex-shrink-0 text-[9px] ${isActive ? "ring-1 ring-
|
|
41780
|
+
className: `flex-shrink-0 text-[9px] ${isActive ? "ring-1 ring-info" : ""}`,
|
|
41714
41781
|
children: [
|
|
41715
41782
|
isDone ? "\u2713" : isActive ? "\u25CF" : "\u25CB",
|
|
41716
41783
|
" ",
|
|
@@ -41851,13 +41918,13 @@ function WalkMinimap() {
|
|
|
41851
41918
|
})
|
|
41852
41919
|
] }) }),
|
|
41853
41920
|
/* @__PURE__ */ jsx(Box, { className: "px-2 py-1 border-t border-border", children: /* @__PURE__ */ jsxs(HStack, { gap: "sm", className: "items-center justify-between", children: [
|
|
41854
|
-
/* @__PURE__ */ jsxs(Typography, { variant: "caption", className: "text-xs font-mono text-
|
|
41921
|
+
/* @__PURE__ */ jsxs(Typography, { variant: "caption", className: "text-xs font-mono text-success", children: [
|
|
41855
41922
|
"Engine: ",
|
|
41856
41923
|
engineCount,
|
|
41857
41924
|
"/",
|
|
41858
41925
|
totalTransitions
|
|
41859
41926
|
] }),
|
|
41860
|
-
domCount > 0 && /* @__PURE__ */ jsxs(Typography, { variant: "caption", className: "text-xs font-mono text-
|
|
41927
|
+
domCount > 0 && /* @__PURE__ */ jsxs(Typography, { variant: "caption", className: "text-xs font-mono text-info", children: [
|
|
41861
41928
|
"DOM: ",
|
|
41862
41929
|
domCount
|
|
41863
41930
|
] }),
|
|
@@ -41890,13 +41957,13 @@ function TraitsTab({ traits: traits2 }) {
|
|
|
41890
41957
|
const accordionItems = traits2.map((trait) => ({
|
|
41891
41958
|
id: trait.id,
|
|
41892
41959
|
header: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 w-full", children: [
|
|
41893
|
-
/* @__PURE__ */ jsx(Typography, { variant: "body", weight: "semibold", className: "text-
|
|
41960
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body", weight: "semibold", className: "text-primary", children: trait.name }),
|
|
41894
41961
|
/* @__PURE__ */ jsx(Badge, { variant: "success", size: "sm", children: trait.currentState }),
|
|
41895
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-
|
|
41962
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground ml-auto", children: t("debug.transitionsCount", { count: trait.transitionCount }) })
|
|
41896
41963
|
] }),
|
|
41897
41964
|
content: /* @__PURE__ */ jsxs(Stack, { gap: "sm", children: [
|
|
41898
41965
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
41899
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-
|
|
41966
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground mb-2", children: t("debug.states") }),
|
|
41900
41967
|
/* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-1", children: trait.states.map((state) => /* @__PURE__ */ jsx(
|
|
41901
41968
|
Badge,
|
|
41902
41969
|
{
|
|
@@ -41908,18 +41975,18 @@ function TraitsTab({ traits: traits2 }) {
|
|
|
41908
41975
|
)) })
|
|
41909
41976
|
] }),
|
|
41910
41977
|
trait.transitions.length > 0 && /* @__PURE__ */ jsxs("div", { children: [
|
|
41911
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-
|
|
41978
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground mb-2", children: t("debug.transitions") }),
|
|
41912
41979
|
/* @__PURE__ */ jsx(Stack, { gap: "xs", children: trait.transitions.map((t2, i) => /* @__PURE__ */ jsxs(Typography, { variant: "small", className: "font-mono", children: [
|
|
41913
41980
|
t2.from,
|
|
41914
41981
|
" \u2192 ",
|
|
41915
41982
|
t2.to,
|
|
41916
41983
|
" ",
|
|
41917
|
-
/* @__PURE__ */ jsxs("span", { className: "text-
|
|
41984
|
+
/* @__PURE__ */ jsxs("span", { className: "text-muted-foreground", children: [
|
|
41918
41985
|
"(",
|
|
41919
41986
|
t2.event,
|
|
41920
41987
|
")"
|
|
41921
41988
|
] }),
|
|
41922
|
-
t2.guard && /* @__PURE__ */ jsxs("span", { className: "text-
|
|
41989
|
+
t2.guard && /* @__PURE__ */ jsxs("span", { className: "text-warning", children: [
|
|
41923
41990
|
" [",
|
|
41924
41991
|
t2.guard,
|
|
41925
41992
|
"]"
|
|
@@ -41927,7 +41994,7 @@ function TraitsTab({ traits: traits2 }) {
|
|
|
41927
41994
|
] }, i)) })
|
|
41928
41995
|
] }),
|
|
41929
41996
|
trait.guards.length > 0 && /* @__PURE__ */ jsxs("div", { children: [
|
|
41930
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-
|
|
41997
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground mb-2", children: t("debug.guards") }),
|
|
41931
41998
|
/* @__PURE__ */ jsx(Stack, { gap: "xs", children: trait.guards.map((g, i) => /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
|
|
41932
41999
|
/* @__PURE__ */ jsx(Typography, { variant: "small", children: g.name }),
|
|
41933
42000
|
/* @__PURE__ */ jsx(Badge, { variant: g.lastResult === true ? "success" : g.lastResult === false ? "danger" : "default", size: "sm", children: g.lastResult === void 0 ? "?" : g.lastResult ? "\u2713" : "\u2717" })
|
|
@@ -41970,11 +42037,11 @@ function TicksTab({ ticks: ticks2 }) {
|
|
|
41970
42037
|
};
|
|
41971
42038
|
const TickCard = ({ tick, active }) => /* @__PURE__ */ jsxs(Card, { className: `p-3 ${!active ? "opacity-50" : ""}`, children: [
|
|
41972
42039
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 mb-2", children: [
|
|
41973
|
-
/* @__PURE__ */ jsx("span", { className: `w-2 h-2 rounded-full ${active ? "bg-
|
|
41974
|
-
/* @__PURE__ */ jsx(Typography, { variant: "body", weight: "semibold", className: "text-
|
|
41975
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-
|
|
42040
|
+
/* @__PURE__ */ jsx("span", { className: `w-2 h-2 rounded-full ${active ? "bg-success" : "bg-muted-foreground"}` }),
|
|
42041
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body", weight: "semibold", className: "text-warning", children: tick.name }),
|
|
42042
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground", children: tick.traitName })
|
|
41976
42043
|
] }),
|
|
41977
|
-
/* @__PURE__ */ jsxs("div", { className: "flex gap-3 text-xs text-
|
|
42044
|
+
/* @__PURE__ */ jsxs("div", { className: "flex gap-3 text-xs text-muted-foreground", children: [
|
|
41978
42045
|
/* @__PURE__ */ jsxs("span", { children: [
|
|
41979
42046
|
tick.interval,
|
|
41980
42047
|
"ms"
|
|
@@ -41997,7 +42064,7 @@ function TicksTab({ ticks: ticks2 }) {
|
|
|
41997
42064
|
] });
|
|
41998
42065
|
return /* @__PURE__ */ jsxs("div", { className: "debug-tab debug-tab--ticks", children: [
|
|
41999
42066
|
activeTicks.length > 0 && /* @__PURE__ */ jsxs("div", { className: "mb-4", children: [
|
|
42000
|
-
/* @__PURE__ */ jsxs(Typography, { variant: "small", weight: "medium", className: "text-
|
|
42067
|
+
/* @__PURE__ */ jsxs(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground mb-2", children: [
|
|
42001
42068
|
"Active (",
|
|
42002
42069
|
activeTicks.length,
|
|
42003
42070
|
")"
|
|
@@ -42005,7 +42072,7 @@ function TicksTab({ ticks: ticks2 }) {
|
|
|
42005
42072
|
/* @__PURE__ */ jsx(Stack, { gap: "sm", children: activeTicks.map((tick) => /* @__PURE__ */ jsx(TickCard, { tick, active: true }, tick.id)) })
|
|
42006
42073
|
] }),
|
|
42007
42074
|
inactiveTicks.length > 0 && /* @__PURE__ */ jsxs("div", { children: [
|
|
42008
|
-
/* @__PURE__ */ jsxs(Typography, { variant: "small", weight: "medium", className: "text-
|
|
42075
|
+
/* @__PURE__ */ jsxs(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground mb-2", children: [
|
|
42009
42076
|
"Inactive (",
|
|
42010
42077
|
inactiveTicks.length,
|
|
42011
42078
|
")"
|
|
@@ -42053,33 +42120,33 @@ function EntitiesTab({ snapshot }) {
|
|
|
42053
42120
|
id: `singleton-${name}`,
|
|
42054
42121
|
header: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
42055
42122
|
/* @__PURE__ */ jsx(Badge, { variant: "primary", size: "sm", children: t("debug.singleton") }),
|
|
42056
|
-
/* @__PURE__ */ jsx(Typography, { variant: "body", weight: "semibold", className: "text-
|
|
42123
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body", weight: "semibold", className: "text-info", children: name })
|
|
42057
42124
|
] }),
|
|
42058
|
-
content: /* @__PURE__ */ jsx("pre", { className: "text-xs text-
|
|
42125
|
+
content: /* @__PURE__ */ jsx("pre", { className: "text-xs text-muted-foreground bg-muted p-2 rounded overflow-auto max-h-40", children: JSON.stringify(data, null, 2) })
|
|
42059
42126
|
}));
|
|
42060
42127
|
const runtimeItems = runtimeEntities.slice(0, 20).map((entity) => ({
|
|
42061
42128
|
id: entity.id,
|
|
42062
42129
|
header: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
42063
|
-
/* @__PURE__ */ jsx(Typography, { variant: "body", weight: "semibold", className: "text-
|
|
42064
|
-
/* @__PURE__ */ jsxs(Typography, { variant: "small", className: "text-
|
|
42130
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body", weight: "semibold", className: "text-info", children: entity.type }),
|
|
42131
|
+
/* @__PURE__ */ jsxs(Typography, { variant: "small", className: "text-muted-foreground", children: [
|
|
42065
42132
|
"#",
|
|
42066
42133
|
entity.id.slice(0, 8)
|
|
42067
42134
|
] })
|
|
42068
42135
|
] }),
|
|
42069
|
-
content: /* @__PURE__ */ jsx("pre", { className: "text-xs text-
|
|
42136
|
+
content: /* @__PURE__ */ jsx("pre", { className: "text-xs text-muted-foreground bg-muted p-2 rounded overflow-auto max-h-40", children: JSON.stringify(entity.data, null, 2) })
|
|
42070
42137
|
}));
|
|
42071
42138
|
return /* @__PURE__ */ jsxs("div", { className: "debug-tab debug-tab--entities", children: [
|
|
42072
42139
|
singletonItems.length > 0 && /* @__PURE__ */ jsxs("div", { className: "mb-4", children: [
|
|
42073
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-
|
|
42140
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground mb-2", children: t("debug.singletonsCount", { count: singletonItems.length }) }),
|
|
42074
42141
|
/* @__PURE__ */ jsx(Accordion, { items: singletonItems, multiple: true })
|
|
42075
42142
|
] }),
|
|
42076
42143
|
runtimeItems.length > 0 && /* @__PURE__ */ jsxs("div", { className: "mb-4", children: [
|
|
42077
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-
|
|
42144
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground mb-2", children: t("debug.runtimeCount", { count: runtimeEntities.length }) }),
|
|
42078
42145
|
/* @__PURE__ */ jsx(Accordion, { items: runtimeItems, multiple: true }),
|
|
42079
|
-
runtimeEntities.length > 20 && /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-
|
|
42146
|
+
runtimeEntities.length > 20 && /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground text-center mt-2", children: t("debug.moreEntities", { count: runtimeEntities.length - 20 }) })
|
|
42080
42147
|
] }),
|
|
42081
42148
|
persistentEntries.length > 0 && /* @__PURE__ */ jsxs("div", { children: [
|
|
42082
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-
|
|
42149
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground mb-2", children: t("debug.persistent") }),
|
|
42083
42150
|
/* @__PURE__ */ jsx(Stack, { gap: "xs", children: persistentEntries.map(([type, info]) => /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between py-1", children: [
|
|
42084
42151
|
/* @__PURE__ */ jsx(Typography, { variant: "small", children: type }),
|
|
42085
42152
|
/* @__PURE__ */ jsx(Badge, { variant: info.loaded ? "success" : "default", size: "sm", children: info.loaded ? t("debug.loadedCount", { count: info.count }) : t("debug.notLoaded") })
|
|
@@ -42164,7 +42231,7 @@ function EventFlowTab({ events: events2 }) {
|
|
|
42164
42231
|
);
|
|
42165
42232
|
})
|
|
42166
42233
|
] }),
|
|
42167
|
-
/* @__PURE__ */ jsxs("label", { className: "flex items-center gap-1 text-xs text-
|
|
42234
|
+
/* @__PURE__ */ jsxs("label", { className: "flex items-center gap-1 text-xs text-muted-foreground ml-auto cursor-pointer", children: [
|
|
42168
42235
|
/* @__PURE__ */ jsx(
|
|
42169
42236
|
Checkbox,
|
|
42170
42237
|
{
|
|
@@ -42179,18 +42246,18 @@ function EventFlowTab({ events: events2 }) {
|
|
|
42179
42246
|
"div",
|
|
42180
42247
|
{
|
|
42181
42248
|
ref: containerRef,
|
|
42182
|
-
className: "max-h-64 overflow-y-auto space-y-1 bg-
|
|
42249
|
+
className: "max-h-64 overflow-y-auto space-y-1 bg-muted rounded p-2",
|
|
42183
42250
|
children: filteredEvents.slice(-100).map((event) => {
|
|
42184
42251
|
const { variant, icon } = TYPE_BADGES[event.type] || { variant: "default", icon: "\u2022" };
|
|
42185
42252
|
return /* @__PURE__ */ jsxs(
|
|
42186
42253
|
"div",
|
|
42187
42254
|
{
|
|
42188
|
-
className: "flex items-start gap-2 text-xs py-1 hover:bg-
|
|
42255
|
+
className: "flex items-start gap-2 text-xs py-1 hover:bg-muted/50 rounded px-1",
|
|
42189
42256
|
children: [
|
|
42190
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-
|
|
42257
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground font-mono min-w-[65px]", children: formatTime2(event.timestamp) }),
|
|
42191
42258
|
/* @__PURE__ */ jsx("span", { children: icon }),
|
|
42192
42259
|
/* @__PURE__ */ jsx(Badge, { variant, size: "sm", className: "min-w-[60px] justify-center", children: event.source }),
|
|
42193
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-
|
|
42260
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground", children: event.message })
|
|
42194
42261
|
]
|
|
42195
42262
|
},
|
|
42196
42263
|
event.id
|
|
@@ -42254,21 +42321,21 @@ function GuardsPanel({ guards }) {
|
|
|
42254
42321
|
id: guard.id,
|
|
42255
42322
|
header: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 w-full", children: [
|
|
42256
42323
|
/* @__PURE__ */ jsx(Badge, { variant: guard.result ? "success" : "danger", size: "sm", children: guard.result ? "\u2713" : "\u2717" }),
|
|
42257
|
-
/* @__PURE__ */ jsx(Typography, { variant: "body", weight: "semibold", className: "text-
|
|
42258
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-
|
|
42259
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-
|
|
42324
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body", weight: "semibold", className: "text-warning", children: guard.guardName }),
|
|
42325
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground", children: guard.context.type === "transition" ? `${guard.context.transitionFrom} \u2192 ${guard.context.transitionTo}` : guard.context.tickName }),
|
|
42326
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground ml-auto", children: formatTime2(guard.timestamp) })
|
|
42260
42327
|
] }),
|
|
42261
42328
|
content: /* @__PURE__ */ jsxs(Stack, { gap: "sm", children: [
|
|
42262
42329
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
42263
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-
|
|
42264
|
-
/* @__PURE__ */ jsx("code", { className: "block mt-1 text-xs text-
|
|
42330
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground", children: t("debug.expression") }),
|
|
42331
|
+
/* @__PURE__ */ jsx("code", { className: "block mt-1 text-xs text-warning bg-warning/10 px-2 py-1 rounded", children: guard.expression })
|
|
42265
42332
|
] }),
|
|
42266
42333
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
42267
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-
|
|
42268
|
-
/* @__PURE__ */ jsx("pre", { className: "mt-1 text-xs text-
|
|
42334
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground", children: t("debug.inputs") }),
|
|
42335
|
+
/* @__PURE__ */ jsx("pre", { className: "mt-1 text-xs text-muted-foreground bg-muted p-2 rounded overflow-auto max-h-24", children: JSON.stringify(guard.inputs, null, 2) })
|
|
42269
42336
|
] }),
|
|
42270
42337
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
42271
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-
|
|
42338
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground", children: t("debug.trait") }),
|
|
42272
42339
|
/* @__PURE__ */ jsx(Typography, { variant: "small", children: guard.context.traitName })
|
|
42273
42340
|
] })
|
|
42274
42341
|
] })
|
|
@@ -42324,7 +42391,7 @@ function VerificationTab({ checks, summary }) {
|
|
|
42324
42391
|
(a, b) => (sortOrder[a.status] ?? 4) - (sortOrder[b.status] ?? 4)
|
|
42325
42392
|
);
|
|
42326
42393
|
return /* @__PURE__ */ jsxs("div", { className: "debug-tab debug-tab--verification", children: [
|
|
42327
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3 mb-3 p-2 bg-
|
|
42394
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3 mb-3 p-2 bg-muted rounded", children: [
|
|
42328
42395
|
/* @__PURE__ */ jsxs(Badge, { variant: "success", size: "sm", children: [
|
|
42329
42396
|
summary.passed,
|
|
42330
42397
|
" passed"
|
|
@@ -42341,7 +42408,7 @@ function VerificationTab({ checks, summary }) {
|
|
|
42341
42408
|
summary.pending,
|
|
42342
42409
|
" pending"
|
|
42343
42410
|
] }),
|
|
42344
|
-
/* @__PURE__ */ jsxs(Typography, { variant: "small", className: "text-
|
|
42411
|
+
/* @__PURE__ */ jsxs(Typography, { variant: "small", className: "text-muted-foreground ml-auto", children: [
|
|
42345
42412
|
summary.totalChecks,
|
|
42346
42413
|
" total checks"
|
|
42347
42414
|
] })
|
|
@@ -42351,12 +42418,12 @@ function VerificationTab({ checks, summary }) {
|
|
|
42351
42418
|
return /* @__PURE__ */ jsxs(
|
|
42352
42419
|
"div",
|
|
42353
42420
|
{
|
|
42354
|
-
className: "flex items-start gap-2 p-2 rounded hover:bg-
|
|
42421
|
+
className: "flex items-start gap-2 p-2 rounded hover:bg-muted/50",
|
|
42355
42422
|
children: [
|
|
42356
42423
|
/* @__PURE__ */ jsx(Badge, { variant: config.variant, size: "sm", className: "min-w-[20px] justify-center mt-0.5", children: config.icon }),
|
|
42357
42424
|
/* @__PURE__ */ jsxs("div", { className: "flex-1 min-w-0", children: [
|
|
42358
42425
|
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "break-words", children: check.label }),
|
|
42359
|
-
check.details && /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-
|
|
42426
|
+
check.details && /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground break-words", children: check.details })
|
|
42360
42427
|
] }),
|
|
42361
42428
|
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground font-mono text-xs shrink-0", children: new Date(check.updatedAt).toLocaleTimeString("en-US", {
|
|
42362
42429
|
hour12: false,
|
|
@@ -42391,10 +42458,10 @@ var init_VerificationTab = __esm({
|
|
|
42391
42458
|
function EffectBadge({ effect }) {
|
|
42392
42459
|
const variant = EFFECT_STATUS_VARIANT[effect.status] || "default";
|
|
42393
42460
|
const icon = effect.status === "executed" ? "\u2713" : effect.status === "failed" ? "\u2717" : "-";
|
|
42394
|
-
return /* @__PURE__ */ jsxs("span", { className: "inline-flex items-center gap-1 text-xs font-mono bg-
|
|
42461
|
+
return /* @__PURE__ */ jsxs("span", { className: "inline-flex items-center gap-1 text-xs font-mono bg-muted rounded px-1.5 py-0.5", children: [
|
|
42395
42462
|
/* @__PURE__ */ jsx(Badge, { variant, size: "sm", className: "!text-[9px] !px-1 !py-0", children: icon }),
|
|
42396
|
-
/* @__PURE__ */ jsx("span", { className: "text-
|
|
42397
|
-
effect.error && /* @__PURE__ */ jsx("span", { className: "text-
|
|
42463
|
+
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: effect.type }),
|
|
42464
|
+
effect.error && /* @__PURE__ */ jsx("span", { className: "text-error truncate max-w-[120px]", title: effect.error, children: effect.error })
|
|
42398
42465
|
] });
|
|
42399
42466
|
}
|
|
42400
42467
|
function TransitionTimeline({ transitions }) {
|
|
@@ -42429,8 +42496,8 @@ function TransitionTimeline({ transitions }) {
|
|
|
42429
42496
|
const sorted = [...transitions].reverse();
|
|
42430
42497
|
return /* @__PURE__ */ jsxs("div", { className: "debug-tab debug-tab--timeline", children: [
|
|
42431
42498
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between mb-2", children: [
|
|
42432
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-
|
|
42433
|
-
/* @__PURE__ */ jsxs("label", { className: "flex items-center gap-1 text-xs text-
|
|
42499
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground", children: t("debug.transitionsRecorded", { count: transitions.length }) }),
|
|
42500
|
+
/* @__PURE__ */ jsxs("label", { className: "flex items-center gap-1 text-xs text-muted-foreground cursor-pointer", children: [
|
|
42434
42501
|
/* @__PURE__ */ jsx(
|
|
42435
42502
|
Checkbox,
|
|
42436
42503
|
{
|
|
@@ -42455,22 +42522,22 @@ function TransitionTimeline({ transitions }) {
|
|
|
42455
42522
|
{
|
|
42456
42523
|
className: `
|
|
42457
42524
|
relative pl-6 pb-3 border-l-2 cursor-pointer
|
|
42458
|
-
hover:bg-
|
|
42459
|
-
${hasFailedEffects ? "border-
|
|
42525
|
+
hover:bg-muted/50 rounded-r
|
|
42526
|
+
${hasFailedEffects ? "border-error" : "border-border"}
|
|
42460
42527
|
`,
|
|
42461
42528
|
onClick: () => setExpandedId(isExpanded ? null : trace.id),
|
|
42462
42529
|
children: [
|
|
42463
42530
|
/* @__PURE__ */ jsx("div", { className: `
|
|
42464
42531
|
absolute left-[-5px] top-1 w-2 h-2 rounded-full
|
|
42465
|
-
${hasFailedEffects ? "bg-
|
|
42532
|
+
${hasFailedEffects ? "bg-error" : allPassed ? "bg-success" : "bg-muted-foreground"}
|
|
42466
42533
|
` }),
|
|
42467
42534
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 text-xs py-1 px-2", children: [
|
|
42468
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-
|
|
42535
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground font-mono min-w-[65px]", children: formatTime2(trace.timestamp) }),
|
|
42469
42536
|
/* @__PURE__ */ jsx(Badge, { variant: "primary", size: "sm", className: "min-w-[60px] justify-center", children: trace.traitName }),
|
|
42470
|
-
/* @__PURE__ */ jsxs(Typography, { variant: "small", className: "font-mono text-
|
|
42537
|
+
/* @__PURE__ */ jsxs(Typography, { variant: "small", className: "font-mono text-muted-foreground", children: [
|
|
42471
42538
|
trace.from,
|
|
42472
42539
|
" ",
|
|
42473
|
-
/* @__PURE__ */ jsx("span", { className: "text-
|
|
42540
|
+
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground/50", children: "\u2192" }),
|
|
42474
42541
|
" ",
|
|
42475
42542
|
trace.to
|
|
42476
42543
|
] }),
|
|
@@ -42487,9 +42554,9 @@ function TransitionTimeline({ transitions }) {
|
|
|
42487
42554
|
]
|
|
42488
42555
|
}
|
|
42489
42556
|
),
|
|
42490
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-
|
|
42557
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground ml-auto", children: t("debug.effectsCount", { count: trace.effects.length }) })
|
|
42491
42558
|
] }),
|
|
42492
|
-
isExpanded && trace.effects.length > 0 && /* @__PURE__ */ jsx("div", { className: "ml-2 mt-1 mb-2 pl-2 border-l border-
|
|
42559
|
+
isExpanded && trace.effects.length > 0 && /* @__PURE__ */ jsx("div", { className: "ml-2 mt-1 mb-2 pl-2 border-l border-border space-y-1", children: trace.effects.map((effect, eIdx) => /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1", children: [
|
|
42493
42560
|
/* @__PURE__ */ jsx(EffectBadge, { effect }),
|
|
42494
42561
|
effect.args.length > 0 && /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground font-mono text-xs truncate max-w-[200px]", children: JSON.stringify(effect.args) }),
|
|
42495
42562
|
effect.durationMs !== void 0 && /* @__PURE__ */ jsxs(Typography, { variant: "small", className: "text-muted-foreground text-xs", children: [
|
|
@@ -42523,8 +42590,8 @@ var init_TransitionTimeline = __esm({
|
|
|
42523
42590
|
}
|
|
42524
42591
|
});
|
|
42525
42592
|
function StatRow({ label, value, variant }) {
|
|
42526
|
-
return /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between py-1.5 border-b border-
|
|
42527
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-
|
|
42593
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between py-1.5 border-b border-border last:border-b-0", children: [
|
|
42594
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground", children: label }),
|
|
42528
42595
|
variant ? /* @__PURE__ */ jsx(Badge, { variant, size: "sm", children: String(value) }) : /* @__PURE__ */ jsx(Typography, { variant: "small", weight: "semibold", className: "font-mono", children: String(value) })
|
|
42529
42596
|
] });
|
|
42530
42597
|
}
|
|
@@ -42553,7 +42620,7 @@ function ServerBridgeTab({ bridge }) {
|
|
|
42553
42620
|
return /* @__PURE__ */ jsx("div", { className: "debug-tab debug-tab--bridge", children: /* @__PURE__ */ jsxs(Stack, { gap: "sm", children: [
|
|
42554
42621
|
/* @__PURE__ */ jsxs(Card, { className: "p-3", children: [
|
|
42555
42622
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3 mb-3", children: [
|
|
42556
|
-
/* @__PURE__ */ jsx("div", { className: `w-3 h-3 rounded-full ${bridge.connected ? "bg-
|
|
42623
|
+
/* @__PURE__ */ jsx("div", { className: `w-3 h-3 rounded-full ${bridge.connected ? "bg-success animate-pulse" : "bg-error"}` }),
|
|
42557
42624
|
/* @__PURE__ */ jsx(Typography, { variant: "h6", children: bridge.connected ? t("debug.connected") : t("debug.disconnected") })
|
|
42558
42625
|
] }),
|
|
42559
42626
|
/* @__PURE__ */ jsxs(Stack, { gap: "xs", children: [
|
|
@@ -42588,11 +42655,11 @@ function ServerBridgeTab({ bridge }) {
|
|
|
42588
42655
|
)
|
|
42589
42656
|
] })
|
|
42590
42657
|
] }),
|
|
42591
|
-
bridge.lastError && /* @__PURE__ */ jsxs(Card, { className: "p-3 border-
|
|
42592
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "semibold", className: "text-
|
|
42593
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-
|
|
42658
|
+
bridge.lastError && /* @__PURE__ */ jsxs(Card, { className: "p-3 border-error/30 bg-error/10", children: [
|
|
42659
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "semibold", className: "text-error mb-1", children: t("debug.lastError") }),
|
|
42660
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-error font-mono break-all", children: bridge.lastError })
|
|
42594
42661
|
] }),
|
|
42595
|
-
bridge.connected && /* @__PURE__ */ jsx("div", { className: "text-center py-2", children: /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-
|
|
42662
|
+
bridge.connected && /* @__PURE__ */ jsx("div", { className: "text-center py-2", children: /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground", children: t("debug.totalEventsProcessed", { count: bridge.eventsForwarded + bridge.eventsReceived }) }) })
|
|
42596
42663
|
] }) });
|
|
42597
42664
|
}
|
|
42598
42665
|
var init_ServerBridgeTab = __esm({
|
|
@@ -42718,7 +42785,7 @@ function EventDispatcherTab({ traits: traits2, schema }) {
|
|
|
42718
42785
|
};
|
|
42719
42786
|
return /* @__PURE__ */ jsxs("div", { className: "debug-tab debug-tab--dispatch", children: [
|
|
42720
42787
|
/* @__PURE__ */ jsxs("div", { className: "mb-3", children: [
|
|
42721
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-
|
|
42788
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground mb-1", children: t("debug.activeStates") }),
|
|
42722
42789
|
/* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-1", children: traits2.map((trait) => /* @__PURE__ */ jsxs(Badge, { variant: "success", size: "sm", children: [
|
|
42723
42790
|
trait.name,
|
|
42724
42791
|
": ",
|
|
@@ -42726,8 +42793,8 @@ function EventDispatcherTab({ traits: traits2, schema }) {
|
|
|
42726
42793
|
] }, trait.id)) })
|
|
42727
42794
|
] }),
|
|
42728
42795
|
/* @__PURE__ */ jsxs("div", { className: "mb-3", children: [
|
|
42729
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-
|
|
42730
|
-
availableEvents.length === 0 ? /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-
|
|
42796
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground mb-1", children: t("debug.availableEvents") }),
|
|
42797
|
+
availableEvents.length === 0 ? /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground italic", children: t("debug.noTransitionsFromState") }) : /* @__PURE__ */ jsx(Stack, { gap: "xs", children: availableEvents.map(({ event, transitions }) => /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
42731
42798
|
/* @__PURE__ */ jsx(
|
|
42732
42799
|
Button,
|
|
42733
42800
|
{
|
|
@@ -42738,22 +42805,22 @@ function EventDispatcherTab({ traits: traits2, schema }) {
|
|
|
42738
42805
|
children: event
|
|
42739
42806
|
}
|
|
42740
42807
|
),
|
|
42741
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-
|
|
42808
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground", children: transitions.map((t2) => `${t2.from} -> ${t2.to}`).join(", ") }),
|
|
42742
42809
|
transitions.some((tr) => tr.guard) && /* @__PURE__ */ jsx(Badge, { variant: "warning", size: "sm", children: t("debug.guarded") })
|
|
42743
42810
|
] }, event)) })
|
|
42744
42811
|
] }),
|
|
42745
42812
|
unavailableEvents.length > 0 && /* @__PURE__ */ jsxs("div", { className: "mb-3", children: [
|
|
42746
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-
|
|
42813
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground mb-1", children: t("debug.otherEvents") }),
|
|
42747
42814
|
/* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-1", children: unavailableEvents.map((event) => /* @__PURE__ */ jsx(Badge, { variant: "default", size: "sm", className: "opacity-50", children: event }, event)) })
|
|
42748
42815
|
] }),
|
|
42749
42816
|
log11.length > 0 && /* @__PURE__ */ jsxs("div", { children: [
|
|
42750
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-
|
|
42817
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground mb-1", children: t("debug.recentTransitions") }),
|
|
42751
42818
|
/* @__PURE__ */ jsx(Stack, { gap: "xs", children: log11.map((entry, i) => /* @__PURE__ */ jsxs(Typography, { variant: "small", className: "font-mono text-xs", children: [
|
|
42752
|
-
/* @__PURE__ */ jsx("span", { className: "text-
|
|
42819
|
+
/* @__PURE__ */ jsx("span", { className: "text-primary", children: entry.traitName }),
|
|
42753
42820
|
" ",
|
|
42754
|
-
/* @__PURE__ */ jsx("span", { className: "text-
|
|
42821
|
+
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: entry.from }),
|
|
42755
42822
|
" -> ",
|
|
42756
|
-
/* @__PURE__ */ jsx("span", { className: "text-
|
|
42823
|
+
/* @__PURE__ */ jsx("span", { className: "text-success", children: entry.to })
|
|
42757
42824
|
] }, i)) })
|
|
42758
42825
|
] })
|
|
42759
42826
|
] });
|
|
@@ -42779,21 +42846,21 @@ var init_RuntimeDebugger = __esm({
|
|
|
42779
42846
|
function ServerResponseRow({ sr }) {
|
|
42780
42847
|
const { t } = useTranslate();
|
|
42781
42848
|
const entityEntries = Object.entries(sr.dataEntities);
|
|
42782
|
-
return /* @__PURE__ */ jsxs("div", { className: "ml-4 pl-2 border-l border-
|
|
42849
|
+
return /* @__PURE__ */ jsxs("div", { className: "ml-4 pl-2 border-l border-primary py-0.5 text-xs font-mono", children: [
|
|
42783
42850
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
42784
|
-
/* @__PURE__ */ jsxs("span", { className: sr.success ? "text-
|
|
42851
|
+
/* @__PURE__ */ jsxs("span", { className: sr.success ? "text-success" : "text-error", children: [
|
|
42785
42852
|
sr.success ? "\u2713" : "\u2717",
|
|
42786
42853
|
" ",
|
|
42787
42854
|
t("debug.server")
|
|
42788
42855
|
] }),
|
|
42789
|
-
/* @__PURE__ */ jsx("span", { className: "text-
|
|
42790
|
-
sr.clientEffects > 0 && /* @__PURE__ */ jsx("span", { className: "px-1 rounded bg-
|
|
42791
|
-
sr.emittedEvents.length > 0 && /* @__PURE__ */ jsxs("span", { className: "px-1 rounded bg-
|
|
42856
|
+
/* @__PURE__ */ jsx("span", { className: "text-primary", children: sr.orbitalName }),
|
|
42857
|
+
sr.clientEffects > 0 && /* @__PURE__ */ jsx("span", { className: "px-1 rounded bg-primary/10 text-primary", children: t("debug.clientEffectsCount", { count: sr.clientEffects }) }),
|
|
42858
|
+
sr.emittedEvents.length > 0 && /* @__PURE__ */ jsxs("span", { className: "px-1 rounded bg-primary/10 text-primary", children: [
|
|
42792
42859
|
t("debug.emitLabel"),
|
|
42793
42860
|
" ",
|
|
42794
42861
|
sr.emittedEvents.join(", ")
|
|
42795
42862
|
] }),
|
|
42796
|
-
sr.error && /* @__PURE__ */ jsx("span", { className: "px-1 rounded bg-
|
|
42863
|
+
sr.error && /* @__PURE__ */ jsx("span", { className: "px-1 rounded bg-error/10 text-error truncate max-w-[300px]", children: sr.error })
|
|
42797
42864
|
] }),
|
|
42798
42865
|
entityEntries.length > 0 && /* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-1 mt-0.5", children: entityEntries.map(([name, count]) => /* @__PURE__ */ jsxs("span", { className: "px-1 rounded bg-[var(--color-card)] text-foreground", children: [
|
|
42799
42866
|
name,
|
|
@@ -42809,9 +42876,9 @@ function TransitionRow({ trace }) {
|
|
|
42809
42876
|
if (isServerEntry && trace.serverResponse) {
|
|
42810
42877
|
return /* @__PURE__ */ jsxs("div", { className: "py-0.5 border-b border-border last:border-0", children: [
|
|
42811
42878
|
/* @__PURE__ */ jsxs("div", { className: "flex items-start gap-2 text-xs font-mono", children: [
|
|
42812
|
-
/* @__PURE__ */ jsx("span", { className: "mt-1.5 w-1.5 h-1.5 rounded-full flex-shrink-0 bg-
|
|
42879
|
+
/* @__PURE__ */ jsx("span", { className: "mt-1.5 w-1.5 h-1.5 rounded-full flex-shrink-0 bg-primary" }),
|
|
42813
42880
|
/* @__PURE__ */ jsx(Badge, { variant: "warning", size: "sm", className: "flex-shrink-0", children: trace.event }),
|
|
42814
|
-
/* @__PURE__ */ jsx("span", { className: "text-
|
|
42881
|
+
/* @__PURE__ */ jsx("span", { className: "text-primary flex-shrink-0", children: t("debug.serverResponse") })
|
|
42815
42882
|
] }),
|
|
42816
42883
|
/* @__PURE__ */ jsx(ServerResponseRow, { sr: trace.serverResponse })
|
|
42817
42884
|
] });
|
|
@@ -42820,7 +42887,7 @@ function TransitionRow({ trace }) {
|
|
|
42820
42887
|
/* @__PURE__ */ jsxs("div", { className: "flex items-start gap-2 text-xs font-mono", children: [
|
|
42821
42888
|
/* @__PURE__ */ jsx("span", { className: cn(
|
|
42822
42889
|
"mt-1.5 w-1.5 h-1.5 rounded-full flex-shrink-0",
|
|
42823
|
-
hasFailedEffects ? "bg-
|
|
42890
|
+
hasFailedEffects ? "bg-error" : "bg-success"
|
|
42824
42891
|
) }),
|
|
42825
42892
|
/* @__PURE__ */ jsx(Badge, { variant: "info", size: "sm", className: "flex-shrink-0", children: trace.event }),
|
|
42826
42893
|
/* @__PURE__ */ jsx("span", { className: "text-foreground flex-shrink-0", children: trace.traitName }),
|
|
@@ -42834,7 +42901,7 @@ function TransitionRow({ trace }) {
|
|
|
42834
42901
|
] }),
|
|
42835
42902
|
trace.effects.length > 0 && /* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-1 ml-6 mt-0.5", children: trace.effects.map((eff, i) => /* @__PURE__ */ jsxs("span", { className: cn(
|
|
42836
42903
|
"px-1 rounded text-xs",
|
|
42837
|
-
eff.status === "executed" ? "bg-
|
|
42904
|
+
eff.status === "executed" ? "bg-success/10 text-success" : eff.status === "failed" ? "bg-error/10 text-error" : "bg-warning/10 text-warning"
|
|
42838
42905
|
), children: [
|
|
42839
42906
|
eff.status === "executed" ? "\u2713" : eff.status === "failed" ? "\u2717" : "-",
|
|
42840
42907
|
" ",
|
|
@@ -42868,7 +42935,7 @@ function VerifyModePanel({
|
|
|
42868
42935
|
{
|
|
42869
42936
|
className: cn(
|
|
42870
42937
|
"runtime-debugger runtime-debugger--verify",
|
|
42871
|
-
"flex flex-col bg-[var(--color-card)] text-[var(--color-foreground)] border-t-2 border-
|
|
42938
|
+
"flex flex-col bg-[var(--color-card)] text-[var(--color-foreground)] border-t-2 border-accent",
|
|
42872
42939
|
hudBottom ? "" : "fixed bottom-0 left-0 right-0",
|
|
42873
42940
|
className
|
|
42874
42941
|
),
|
|
@@ -42889,8 +42956,8 @@ function VerifyModePanel({
|
|
|
42889
42956
|
/* @__PURE__ */ jsx("span", { className: "text-foreground/50 w-3", "aria-hidden": true, children: expanded ? "\u25BE" : "\u25B8" }),
|
|
42890
42957
|
/* @__PURE__ */ jsx(Badge, { variant: failedChecks > 0 ? "danger" : "success", size: "sm", children: failedChecks > 0 ? t("debug.failCount", { count: failedChecks }) : t("debug.ok") }),
|
|
42891
42958
|
/* @__PURE__ */ jsx("span", { className: "text-foreground/70", children: t("debug.localCount", { count: localCount }) }),
|
|
42892
|
-
/* @__PURE__ */ jsx("span", { className: "text-
|
|
42893
|
-
traitStates && /* @__PURE__ */ jsx("span", { className: "text-
|
|
42959
|
+
/* @__PURE__ */ jsx("span", { className: "text-primary", children: t("debug.serverCount", { count: serverCount }) }),
|
|
42960
|
+
traitStates && /* @__PURE__ */ jsx("span", { className: "text-accent truncate max-w-[400px]", children: traitStates }),
|
|
42894
42961
|
!expanded && transitions.length > 0 && /* @__PURE__ */ jsx("span", { className: "ml-auto text-foreground/50", children: t("debug.transitionsCount", { count: transitions.length }) })
|
|
42895
42962
|
]
|
|
42896
42963
|
}
|
|
@@ -43085,7 +43152,7 @@ function RuntimeDebugger({
|
|
|
43085
43152
|
title: t("debug.openDebugger"),
|
|
43086
43153
|
children: failedChecks > 0 ? /* @__PURE__ */ jsxs("span", { className: "relative", children: [
|
|
43087
43154
|
/* @__PURE__ */ jsx("span", { children: "V" }),
|
|
43088
|
-
/* @__PURE__ */ jsx("span", { className: "absolute -top-1 -right-2 w-2 h-2 bg-
|
|
43155
|
+
/* @__PURE__ */ jsx("span", { className: "absolute -top-1 -right-2 w-2 h-2 bg-error rounded-full" })
|
|
43089
43156
|
] }) : /* @__PURE__ */ jsx("span", { children: "V" })
|
|
43090
43157
|
}
|
|
43091
43158
|
) : /* @__PURE__ */ jsxs(Card, { className: "runtime-debugger__panel", children: [
|
|
@@ -43173,7 +43240,7 @@ var init_SegmentRenderer = __esm({
|
|
|
43173
43240
|
"div",
|
|
43174
43241
|
{
|
|
43175
43242
|
className: cn(
|
|
43176
|
-
"border border-
|
|
43243
|
+
"border border-border rounded-lg p-2 md:p-4 overflow-x-auto space-y-6",
|
|
43177
43244
|
containerClassName,
|
|
43178
43245
|
className
|
|
43179
43246
|
),
|
|
@@ -48725,8 +48792,8 @@ var SystemNode = ({ data }) => {
|
|
|
48725
48792
|
className: "rounded-lg border border-[var(--color-border)] bg-[var(--color-card)] px-3 py-2 shadow-sm",
|
|
48726
48793
|
style: { minWidth: 160, maxWidth: 220 },
|
|
48727
48794
|
children: [
|
|
48728
|
-
/* @__PURE__ */ jsx(Handle, { type: "target", position: Position.Left, className: "!w-2 !h-2 !bg-
|
|
48729
|
-
/* @__PURE__ */ jsx(Handle, { type: "source", position: Position.Right, className: "!w-2 !h-2 !bg-
|
|
48795
|
+
/* @__PURE__ */ jsx(Handle, { type: "target", position: Position.Left, className: "!w-2 !h-2 !bg-warning" }),
|
|
48796
|
+
/* @__PURE__ */ jsx(Handle, { type: "source", position: Position.Right, className: "!w-2 !h-2 !bg-warning" }),
|
|
48730
48797
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5 mb-1", children: [
|
|
48731
48798
|
/* @__PURE__ */ jsx("svg", { width: 14, height: 14, viewBox: "0 0 20 20", children: /* @__PURE__ */ jsx(AvlEntity, { x: 10, y: 10, r: 8, persistence }) }),
|
|
48732
48799
|
/* @__PURE__ */ jsx("span", { className: "text-xs font-semibold text-[var(--color-foreground)] truncate flex-1", children: orbitalName })
|
|
@@ -48878,9 +48945,9 @@ var AvlTransitionEdge = ({
|
|
|
48878
48945
|
className: "absolute pointer-events-all nodrag nopan flex items-center gap-1",
|
|
48879
48946
|
style: { transform: `translate(-50%, -50%) translate(${labelX}px, ${labelY}px)` },
|
|
48880
48947
|
children: [
|
|
48881
|
-
data?.hasGuard && /* @__PURE__ */ jsx("div", { className: "w-3 h-3 rotate-45 border border-
|
|
48948
|
+
data?.hasGuard && /* @__PURE__ */ jsx("div", { className: "w-3 h-3 rotate-45 border border-warning bg-warning/10 shrink-0", title: t("avl.guard") }),
|
|
48882
48949
|
/* @__PURE__ */ jsx("div", { className: "px-2 py-0.5 text-xs font-medium rounded-full bg-[var(--color-card)] border border-[var(--color-border)] text-[var(--color-foreground)] truncate max-w-[160px]", children: data?.event ?? "" }),
|
|
48883
|
-
data?.hasEffects && /* @__PURE__ */ jsx("div", { className: "w-2.5 h-2.5 rounded-full bg-
|
|
48950
|
+
data?.hasEffects && /* @__PURE__ */ jsx("div", { className: "w-2.5 h-2.5 rounded-full bg-primary shrink-0", title: t("avl.effects") })
|
|
48884
48951
|
]
|
|
48885
48952
|
}
|
|
48886
48953
|
) })
|
|
@@ -49703,7 +49770,9 @@ function useResolvedSchema(schema, pageName) {
|
|
|
49703
49770
|
trait.listens = callSiteListens.map((l) => ({
|
|
49704
49771
|
event: l.event,
|
|
49705
49772
|
triggers: l.triggers,
|
|
49706
|
-
source: l.source
|
|
49773
|
+
source: l.source,
|
|
49774
|
+
guard: l.guard,
|
|
49775
|
+
payloadMapping: l.payloadMapping
|
|
49707
49776
|
}));
|
|
49708
49777
|
resolvedSchemaLog.info("listens:restored", {
|
|
49709
49778
|
trait: traitName,
|
|
@@ -50130,6 +50199,14 @@ function createSharedEntityWriter(binding, tick, traitStatesRef, emit) {
|
|
|
50130
50199
|
return writes;
|
|
50131
50200
|
};
|
|
50132
50201
|
}
|
|
50202
|
+
function containsConfigForward(value) {
|
|
50203
|
+
if (typeof value === "string") return value.startsWith("@config.");
|
|
50204
|
+
if (Array.isArray(value)) return value.some(containsConfigForward);
|
|
50205
|
+
if (value !== null && typeof value === "object") {
|
|
50206
|
+
return Object.values(value).some(containsConfigForward);
|
|
50207
|
+
}
|
|
50208
|
+
return false;
|
|
50209
|
+
}
|
|
50133
50210
|
function getBindingConfig(binding) {
|
|
50134
50211
|
const raw = binding.config;
|
|
50135
50212
|
const normalized = normalizeCallSiteConfigToValues(raw);
|
|
@@ -50482,7 +50559,7 @@ function useTraitStateMachine(traitBindings, uiSlots, options) {
|
|
|
50482
50559
|
const sharedCallSite = sharedCallSiteRaw ? resolveCallSitePayloadCaptures(
|
|
50483
50560
|
Object.fromEntries(
|
|
50484
50561
|
Object.entries(sharedCallSiteRaw).filter(
|
|
50485
|
-
([, v]) => !(
|
|
50562
|
+
([, v]) => !containsConfigForward(v)
|
|
50486
50563
|
)
|
|
50487
50564
|
),
|
|
50488
50565
|
payload || {}
|
|
@@ -50547,7 +50624,7 @@ function useTraitStateMachine(traitBindings, uiSlots, options) {
|
|
|
50547
50624
|
const callSiteOverrides = callSiteConfig ? resolveCallSitePayloadCaptures(
|
|
50548
50625
|
Object.fromEntries(
|
|
50549
50626
|
Object.entries(callSiteConfig).filter(
|
|
50550
|
-
([, v]) => !(
|
|
50627
|
+
([, v]) => !containsConfigForward(v)
|
|
50551
50628
|
)
|
|
50552
50629
|
),
|
|
50553
50630
|
payload || {}
|
|
@@ -50789,7 +50866,7 @@ function useTraitStateMachine(traitBindings, uiSlots, options) {
|
|
|
50789
50866
|
}
|
|
50790
50867
|
return () => scheduler.stopAll();
|
|
50791
50868
|
}, [traitBindings, runTickEffects, sharedGroups, sharedEntityStore, emitFromSharedWriter]);
|
|
50792
|
-
const processEventQueued = useCallback(async (eventKey, payload) => {
|
|
50869
|
+
const processEventQueued = useCallback(async (eventKey, payload, targetTrait) => {
|
|
50793
50870
|
const normalizedEvent = normalizeEventKey(eventKey);
|
|
50794
50871
|
const bindings = traitBindingsRef.current;
|
|
50795
50872
|
const currentManager = managerRef.current;
|
|
@@ -50818,7 +50895,9 @@ function useTraitStateMachine(traitBindings, uiSlots, options) {
|
|
|
50818
50895
|
normalizedEvent,
|
|
50819
50896
|
payload,
|
|
50820
50897
|
void 0,
|
|
50821
|
-
entityByTrait
|
|
50898
|
+
entityByTrait,
|
|
50899
|
+
void 0,
|
|
50900
|
+
targetTrait
|
|
50822
50901
|
);
|
|
50823
50902
|
crossTraitLog.debug("processEvent:results", {
|
|
50824
50903
|
event: normalizedEvent,
|
|
@@ -50911,8 +50990,11 @@ function useTraitStateMachine(traitBindings, uiSlots, options) {
|
|
|
50911
50990
|
const effectTraces = result.effects.map(
|
|
50912
50991
|
(e) => {
|
|
50913
50992
|
if (Array.isArray(e)) {
|
|
50993
|
+
const head = String(e[0] ?? "unknown");
|
|
50994
|
+
const entityName = head === "fetch" && typeof e[1] === "string" ? e[1] : head === "persist" && typeof e[2] === "string" ? e[2] : void 0;
|
|
50914
50995
|
return {
|
|
50915
|
-
type:
|
|
50996
|
+
type: head,
|
|
50997
|
+
...entityName !== void 0 ? { entityName } : {},
|
|
50916
50998
|
args: e.slice(1),
|
|
50917
50999
|
status: "executed"
|
|
50918
51000
|
};
|
|
@@ -50965,7 +51047,8 @@ function useTraitStateMachine(traitBindings, uiSlots, options) {
|
|
|
50965
51047
|
const orbital = orbitalsByTrait?.[traitName];
|
|
50966
51048
|
if (orbital) dispatchedOrbitals.add(orbital);
|
|
50967
51049
|
}
|
|
50968
|
-
|
|
51050
|
+
const relayPayload = targetTrait !== void 0 ? { ...payload ?? {}, _targetTrait: targetTrait } : payload;
|
|
51051
|
+
await onEventProcessed(normalizedEvent, relayPayload, dispatchedOrbitals);
|
|
50969
51052
|
}
|
|
50970
51053
|
}, [entities, eventBus, sharedEntityStore]);
|
|
50971
51054
|
const drainEventQueue = useCallback(async () => {
|
|
@@ -50974,14 +51057,14 @@ function useTraitStateMachine(traitBindings, uiSlots, options) {
|
|
|
50974
51057
|
try {
|
|
50975
51058
|
while (eventQueueRef.current.length > 0) {
|
|
50976
51059
|
const entry = eventQueueRef.current.shift();
|
|
50977
|
-
await processEventQueued(entry.eventKey, entry.payload);
|
|
51060
|
+
await processEventQueued(entry.eventKey, entry.payload, entry.targetTrait);
|
|
50978
51061
|
}
|
|
50979
51062
|
} finally {
|
|
50980
51063
|
processingRef.current = false;
|
|
50981
51064
|
}
|
|
50982
51065
|
}, [processEventQueued]);
|
|
50983
|
-
const enqueueAndDrain = useCallback((eventKey, payload) => {
|
|
50984
|
-
eventQueueRef.current.push({ eventKey, payload });
|
|
51066
|
+
const enqueueAndDrain = useCallback((eventKey, payload, targetTrait) => {
|
|
51067
|
+
eventQueueRef.current.push({ eventKey, payload, targetTrait });
|
|
50985
51068
|
void drainEventQueue();
|
|
50986
51069
|
}, [drainEventQueue]);
|
|
50987
51070
|
useCallback((eventKey, payload) => {
|
|
@@ -51078,7 +51161,11 @@ function useTraitStateMachine(traitBindings, uiSlots, options) {
|
|
|
51078
51161
|
crossTraitLog.debug("listen:subscribed", { busKey, targetTrait: binding.trait.name, sourceOrbital, sourceTrait, listenEvent: listen.event, triggers: listen.triggers });
|
|
51079
51162
|
const unsub = eventBus.on(busKey, (event) => {
|
|
51080
51163
|
crossTraitLog.debug("listen:fired", { busKey, targetTrait: binding.trait.name, triggers: listen.triggers });
|
|
51081
|
-
enqueueAndDrain(
|
|
51164
|
+
enqueueAndDrain(
|
|
51165
|
+
listen.triggers,
|
|
51166
|
+
applyListenPayloadMapping(listen.payloadMapping, event.payload),
|
|
51167
|
+
binding.trait.name
|
|
51168
|
+
);
|
|
51082
51169
|
});
|
|
51083
51170
|
unsubscribes.push(() => {
|
|
51084
51171
|
crossTraitLog.debug("listen:unsubscribe", { busKey, targetTrait: binding.trait.name, triggers: listen.triggers });
|
|
@@ -51108,7 +51195,7 @@ function useTraitStateMachine(traitBindings, uiSlots, options) {
|
|
|
51108
51195
|
}
|
|
51109
51196
|
for (const event of eventsToFire) {
|
|
51110
51197
|
stateLog.debug("mount:fire-lifecycle", { event, traitCount: traitBindings.length });
|
|
51111
|
-
enqueueAndDrain(event, {});
|
|
51198
|
+
enqueueAndDrain(event, { ...optionsRef.current?.initPayload ?? {} });
|
|
51112
51199
|
}
|
|
51113
51200
|
return () => {
|
|
51114
51201
|
initedTraitsRef.current = /* @__PURE__ */ new Set();
|
|
@@ -51207,7 +51294,7 @@ function collectServerActiveTraits(ir, allTraits, mountedTraitNames) {
|
|
|
51207
51294
|
}
|
|
51208
51295
|
return active;
|
|
51209
51296
|
}
|
|
51210
|
-
function TraitInitializer({ traits: traits2, orbitalNames, onNavigate, onLocalFallback, persistence, traitConfigsByName, orbitalsByTrait, embeddedTraits, serverActiveTraits }) {
|
|
51297
|
+
function TraitInitializer({ traits: traits2, routeParams, orbitalNames, onNavigate, onLocalFallback, persistence, traitConfigsByName, orbitalsByTrait, embeddedTraits, serverActiveTraits }) {
|
|
51211
51298
|
const bridge = useServerBridge();
|
|
51212
51299
|
const activeTraitNames = useMemo(
|
|
51213
51300
|
() => new Set(traits2.map((b) => b.trait.name).filter((n) => !!n)),
|
|
@@ -51236,43 +51323,48 @@ function TraitInitializer({ traits: traits2, orbitalNames, onNavigate, onLocalFa
|
|
|
51236
51323
|
applyServerEffects(effects, uiSlots, onNavigate, embeddedTraits, activeTraitNames);
|
|
51237
51324
|
}
|
|
51238
51325
|
}, [bridge.connected, bridge.sendEvent, orbitalNames, uiSlots, onNavigate, embeddedTraits, activeTraitNames, withActiveTraits]);
|
|
51239
|
-
const opts = orbitalNames ? { onEventProcessed, navigate: onNavigate, traitConfigsByName, orbitalsByTrait, embeddedTraits } : { navigate: onNavigate, persistence, traitConfigsByName, orbitalsByTrait, embeddedTraits };
|
|
51326
|
+
const opts = orbitalNames ? { onEventProcessed, navigate: onNavigate, traitConfigsByName, orbitalsByTrait, embeddedTraits, initPayload: routeParams } : { navigate: onNavigate, persistence, traitConfigsByName, orbitalsByTrait, embeddedTraits, initPayload: routeParams };
|
|
51240
51327
|
const { sendEvent } = useTraitStateMachine(traits2, uiSlots, opts);
|
|
51241
51328
|
const initSentRef = useRef(false);
|
|
51242
51329
|
const prevTraitsRef = useRef(void 0);
|
|
51330
|
+
const paramsKey = JSON.stringify(routeParams ?? {});
|
|
51331
|
+
const prevParamsKeyRef = useRef(void 0);
|
|
51243
51332
|
useEffect(() => {
|
|
51244
51333
|
const refChanged = prevTraitsRef.current !== void 0 && prevTraitsRef.current !== traits2;
|
|
51334
|
+
const paramsChanged = prevParamsKeyRef.current !== void 0 && prevParamsKeyRef.current !== paramsKey;
|
|
51245
51335
|
navLog.debug("page:traits-effect", () => ({
|
|
51246
51336
|
refChanged,
|
|
51337
|
+
paramsChanged,
|
|
51247
51338
|
traitsCount: Array.isArray(traits2) ? traits2.length : -1,
|
|
51248
51339
|
hadPrev: prevTraitsRef.current !== void 0
|
|
51249
51340
|
}));
|
|
51250
|
-
if (refChanged) {
|
|
51251
|
-
navLog.info("page:traits-reset", { traitsCount: Array.isArray(traits2) ? traits2.length : -1 });
|
|
51341
|
+
if (refChanged || paramsChanged) {
|
|
51342
|
+
navLog.info("page:traits-reset", { traitsCount: Array.isArray(traits2) ? traits2.length : -1, paramsChanged });
|
|
51252
51343
|
uiSlots.clearAll();
|
|
51253
51344
|
initSentRef.current = false;
|
|
51254
51345
|
}
|
|
51255
51346
|
prevTraitsRef.current = traits2;
|
|
51256
|
-
|
|
51347
|
+
prevParamsKeyRef.current = paramsKey;
|
|
51348
|
+
}, [traits2, uiSlots, paramsKey]);
|
|
51257
51349
|
useEffect(() => {
|
|
51258
51350
|
if (!orbitalNames?.length) {
|
|
51259
|
-
const t = setTimeout(() => sendEvent("INIT"), 50);
|
|
51351
|
+
const t = setTimeout(() => sendEvent("INIT", routeParams), 50);
|
|
51260
51352
|
return () => clearTimeout(t);
|
|
51261
51353
|
}
|
|
51262
51354
|
const fallback = setTimeout(() => {
|
|
51263
51355
|
if (!initSentRef.current) {
|
|
51264
|
-
sendEvent("INIT");
|
|
51356
|
+
sendEvent("INIT", routeParams);
|
|
51265
51357
|
onLocalFallback?.();
|
|
51266
51358
|
}
|
|
51267
51359
|
}, 5e3);
|
|
51268
51360
|
return () => clearTimeout(fallback);
|
|
51269
|
-
}, [traits2, orbitalNames, sendEvent, onLocalFallback]);
|
|
51361
|
+
}, [traits2, orbitalNames, sendEvent, onLocalFallback, routeParams]);
|
|
51270
51362
|
useEffect(() => {
|
|
51271
51363
|
if (!bridge.connected || !orbitalNames?.length || initSentRef.current) return;
|
|
51272
51364
|
initSentRef.current = true;
|
|
51273
51365
|
(async () => {
|
|
51274
51366
|
for (const name of orbitalNames) {
|
|
51275
|
-
const { effects, meta } = await bridge.sendEvent(name, "INIT", withActiveTraits({}));
|
|
51367
|
+
const { effects, meta } = await bridge.sendEvent(name, "INIT", withActiveTraits({ ...routeParams ?? {} }));
|
|
51276
51368
|
recordServerResponse(name, "INIT", meta);
|
|
51277
51369
|
const effectTraces = [
|
|
51278
51370
|
{ type: "fetch", args: [], status: "executed" },
|
|
@@ -51293,10 +51385,10 @@ function TraitInitializer({ traits: traits2, orbitalNames, onNavigate, onLocalFa
|
|
|
51293
51385
|
applyServerEffects(effects, uiSlots, onNavigate, embeddedTraits, activeTraitNames);
|
|
51294
51386
|
}
|
|
51295
51387
|
})();
|
|
51296
|
-
}, [bridge.connected, orbitalNames, bridge.sendEvent, uiSlots, onNavigate, embeddedTraits, activeTraitNames, withActiveTraits]);
|
|
51388
|
+
}, [bridge.connected, orbitalNames, bridge.sendEvent, uiSlots, onNavigate, embeddedTraits, activeTraitNames, withActiveTraits, routeParams]);
|
|
51297
51389
|
return null;
|
|
51298
51390
|
}
|
|
51299
|
-
function SchemaRunner({ schema, serverUrl, transport, mockData, pageName, onNavigate, onLocalFallback, persistence }) {
|
|
51391
|
+
function SchemaRunner({ schema, serverUrl, transport, mockData, pageName, routeParams, onNavigate, onLocalFallback, persistence }) {
|
|
51300
51392
|
const { traits: traits2, allEntities, allTraits, ir } = useResolvedSchema(schema, pageName);
|
|
51301
51393
|
const allPageTraits = useMemo(() => {
|
|
51302
51394
|
let base;
|
|
@@ -51438,6 +51530,7 @@ function SchemaRunner({ schema, serverUrl, transport, mockData, pageName, onNavi
|
|
|
51438
51530
|
TraitInitializer,
|
|
51439
51531
|
{
|
|
51440
51532
|
traits: allPageTraits,
|
|
51533
|
+
routeParams,
|
|
51441
51534
|
orbitalNames: serverUrl || transport ? pageOrbitalNames : void 0,
|
|
51442
51535
|
traitConfigsByName,
|
|
51443
51536
|
orbitalsByTrait,
|
|
@@ -51515,27 +51608,44 @@ function OrbPreview({
|
|
|
51515
51608
|
return [];
|
|
51516
51609
|
}
|
|
51517
51610
|
}, [parsedSchema]);
|
|
51518
|
-
const
|
|
51611
|
+
const initialPageMatch = useMemo(() => {
|
|
51519
51612
|
if (!initialPagePath) return void 0;
|
|
51520
|
-
const
|
|
51521
|
-
|
|
51613
|
+
for (const { page } of pages) {
|
|
51614
|
+
const params = page.path ? matchPath(page.path, initialPagePath) : null;
|
|
51615
|
+
if (params !== null) return { name: page.name, params };
|
|
51616
|
+
}
|
|
51617
|
+
return void 0;
|
|
51522
51618
|
}, [pages, initialPagePath]);
|
|
51619
|
+
const initialPageName = initialPageMatch?.name;
|
|
51523
51620
|
const [currentPage, setCurrentPage] = useState(initialPageName);
|
|
51621
|
+
const [routeParams, setRouteParams] = useState(initialPageMatch?.params ?? {});
|
|
51524
51622
|
const prevInitialPagePathRef = useRef(initialPagePath);
|
|
51525
51623
|
useEffect(() => {
|
|
51526
51624
|
if (prevInitialPagePathRef.current !== initialPagePath) {
|
|
51527
51625
|
prevInitialPagePathRef.current = initialPagePath;
|
|
51528
51626
|
setCurrentPage(initialPageName);
|
|
51627
|
+
setRouteParams(initialPageMatch?.params ?? {});
|
|
51529
51628
|
}
|
|
51530
|
-
}, [initialPagePath, initialPageName]);
|
|
51629
|
+
}, [initialPagePath, initialPageName, initialPageMatch]);
|
|
51531
51630
|
const handleNavigate = useCallback((path) => {
|
|
51532
|
-
|
|
51631
|
+
let match;
|
|
51632
|
+
let params = {};
|
|
51633
|
+
for (const entry of pages) {
|
|
51634
|
+
const m = entry.page.path ? matchPath(entry.page.path, path) : null;
|
|
51635
|
+
if (m !== null) {
|
|
51636
|
+
match = entry;
|
|
51637
|
+
params = m;
|
|
51638
|
+
break;
|
|
51639
|
+
}
|
|
51640
|
+
}
|
|
51533
51641
|
navLog.debug("handleNavigate", () => ({
|
|
51534
51642
|
path,
|
|
51535
51643
|
matched: match?.page.name ?? null,
|
|
51644
|
+
params,
|
|
51536
51645
|
availablePaths: pages.map((p) => p.page.path)
|
|
51537
51646
|
}));
|
|
51538
|
-
if (match) {
|
|
51647
|
+
if (match?.page.name) {
|
|
51648
|
+
setRouteParams(params);
|
|
51539
51649
|
setCurrentPage(match.page.name);
|
|
51540
51650
|
if (typeof window !== "undefined") {
|
|
51541
51651
|
const url = new URL(window.location.href);
|
|
@@ -51545,6 +51655,15 @@ function OrbPreview({
|
|
|
51545
51655
|
}
|
|
51546
51656
|
}
|
|
51547
51657
|
}, [pages]);
|
|
51658
|
+
useEffect(() => {
|
|
51659
|
+
const unsubscribe = eventBus.on("UI:NAVIGATE", (event) => {
|
|
51660
|
+
const url = event.payload?.url;
|
|
51661
|
+
if (typeof url === "string" && url.length > 0) {
|
|
51662
|
+
handleNavigate(url);
|
|
51663
|
+
}
|
|
51664
|
+
});
|
|
51665
|
+
return unsubscribe;
|
|
51666
|
+
}, [eventBus, handleNavigate]);
|
|
51548
51667
|
if (!parseResult.ok) {
|
|
51549
51668
|
return /* @__PURE__ */ jsx(Box, { className, style: { height }, children: /* @__PURE__ */ jsxs(Typography, { as: "pre", color: "error", variant: "small", className: "font-mono whitespace-pre-wrap break-all m-0 p-4", children: [
|
|
51550
51669
|
"Parse error: ",
|
|
@@ -51596,6 +51715,7 @@ function OrbPreview({
|
|
|
51596
51715
|
transport,
|
|
51597
51716
|
mockData: effectiveMockData,
|
|
51598
51717
|
pageName: currentPage,
|
|
51718
|
+
routeParams,
|
|
51599
51719
|
onNavigate: handleNavigate,
|
|
51600
51720
|
onLocalFallback: handleLocalFallback,
|
|
51601
51721
|
persistence
|
|
@@ -53344,9 +53464,9 @@ function OrbInspector({ node, schema, editable = false, userType = "builder", th
|
|
|
53344
53464
|
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground text-xs uppercase tracking-wider mb-2", children: t("avl.transition") }),
|
|
53345
53465
|
/* @__PURE__ */ jsxs("svg", { width: "100%", height: 44, viewBox: "0 0 280 44", children: [
|
|
53346
53466
|
/* @__PURE__ */ jsx(AvlState, { x: 8, y: 8, name: fromState, role: getStateRole(fromState), width: 90, height: 26 }),
|
|
53347
|
-
/* @__PURE__ */ jsx("line", { x1: 104, y1: 21, x2: 158, y2: 21, stroke: "
|
|
53467
|
+
/* @__PURE__ */ jsx("line", { x1: 104, y1: 21, x2: 158, y2: 21, stroke: "var(--color-foreground)", strokeWidth: 2, markerEnd: "url(#orb-arrow)" }),
|
|
53348
53468
|
/* @__PURE__ */ jsx(AvlState, { x: 164, y: 8, name: toState, role: getStateRole(toState), width: 90, height: 26 }),
|
|
53349
|
-
/* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsx("marker", { id: "orb-arrow", markerWidth: 8, markerHeight: 6, refX: 8, refY: 3, orient: "auto", children: /* @__PURE__ */ jsx("path", { d: "M0,0 L8,3 L0,6 Z", fill: "
|
|
53469
|
+
/* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsx("marker", { id: "orb-arrow", markerWidth: 8, markerHeight: 6, refX: 8, refY: 3, orient: "auto", children: /* @__PURE__ */ jsx("path", { d: "M0,0 L8,3 L0,6 Z", fill: "var(--color-foreground)" }) }) })
|
|
53350
53470
|
] }),
|
|
53351
53471
|
traitName && /* @__PURE__ */ jsxs(Typography, { variant: "small", className: "text-muted-foreground text-xs", children: [
|
|
53352
53472
|
traitName,
|
|
@@ -53457,7 +53577,7 @@ function OrbPatternTree({ config, depth }) {
|
|
|
53457
53577
|
return /* @__PURE__ */ jsxs(Box, { style: { paddingLeft: depth * 12 }, children: [
|
|
53458
53578
|
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-primary font-semibold text-xs", children: type }),
|
|
53459
53579
|
propEntries.slice(0, 5).map(([key, val]) => {
|
|
53460
|
-
const display = typeof val === "string" ? val.startsWith("@") ? /* @__PURE__ */ jsx("span", { className: "text-
|
|
53580
|
+
const display = typeof val === "string" ? val.startsWith("@") ? /* @__PURE__ */ jsx("span", { className: "text-primary", children: val }) : `"${val}"` : Array.isArray(val) && val.length > 0 && typeof val[0] === "string" && val[0].includes("/") ? /* @__PURE__ */ jsxs("span", { className: "text-warning", children: [
|
|
53461
53581
|
"(",
|
|
53462
53582
|
val.map(String).join(" "),
|
|
53463
53583
|
")"
|