@almadar/ui 4.45.0 → 4.47.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/avl/index.cjs +173 -58
- package/dist/avl/index.js +174 -59
- package/dist/components/atoms/index.d.ts +1 -1
- package/dist/components/index.cjs +82 -69
- package/dist/components/index.js +82 -69
- package/dist/components/molecules/game/ResourceBar.d.ts +1 -1
- package/dist/components/organisms/layout/{MasterDetail.d.ts → MasterDetailLayout.d.ts} +3 -3
- package/dist/components/organisms/layout/index.d.ts +1 -1
- package/dist/providers/index.cjs +73 -27
- package/dist/providers/index.js +73 -27
- package/dist/runtime/index.cjs +192 -39
- package/dist/runtime/index.d.ts +1 -0
- package/dist/runtime/index.js +186 -41
- package/dist/runtime/perf.d.ts +34 -0
- package/package.json +1 -1
- /package/dist/components/atoms/{StatCard.d.ts → MarketingStatCard.d.ts} +0 -0
package/dist/avl/index.cjs
CHANGED
|
@@ -9981,8 +9981,8 @@ function Seigaiha({ size, color, strokeWidth }) {
|
|
|
9981
9981
|
[s, s * 0.1]
|
|
9982
9982
|
];
|
|
9983
9983
|
for (const [cx, cy] of centers) {
|
|
9984
|
-
for (let
|
|
9985
|
-
const cr = r2 * (
|
|
9984
|
+
for (let ring2 = 1; ring2 <= 3; ring2++) {
|
|
9985
|
+
const cr = r2 * (ring2 / 3);
|
|
9986
9986
|
paths.push(
|
|
9987
9987
|
`M ${f(cx - cr)},${f(cy)} A ${f(cr)} ${f(cr)} 0 0 1 ${f(cx + cr)},${f(cy)}`
|
|
9988
9988
|
);
|
|
@@ -10079,8 +10079,8 @@ function Arch({ size, color, strokeWidth }) {
|
|
|
10079
10079
|
const h = size * 1.5;
|
|
10080
10080
|
const cx = w / 2;
|
|
10081
10081
|
const paths = [];
|
|
10082
|
-
for (let
|
|
10083
|
-
const scale = 1 -
|
|
10082
|
+
for (let ring2 = 0; ring2 < 4; ring2++) {
|
|
10083
|
+
const scale = 1 - ring2 * 0.2;
|
|
10084
10084
|
const archW = w * 0.48 * scale;
|
|
10085
10085
|
const archH = h * 0.7 * scale;
|
|
10086
10086
|
const baseY = h * 0.85;
|
|
@@ -10095,7 +10095,7 @@ function Arch({ size, color, strokeWidth }) {
|
|
|
10095
10095
|
paths.push(
|
|
10096
10096
|
`M ${f(lx)},${f(baseY)} A ${f(radius)} ${f(radius)} 0 0 1 ${f(cx)},${f(tipY)} A ${f(radius)} ${f(radius)} 0 0 1 ${f(rx)},${f(baseY)}`
|
|
10097
10097
|
);
|
|
10098
|
-
if (
|
|
10098
|
+
if (ring2 === 0) {
|
|
10099
10099
|
paths.push(`M ${f(lx)},${f(baseY)} L ${f(rx)},${f(baseY)}`);
|
|
10100
10100
|
}
|
|
10101
10101
|
}
|
|
@@ -10785,12 +10785,15 @@ function ControlButton({
|
|
|
10785
10785
|
sizeMap3[size] ?? sizeMap3.md,
|
|
10786
10786
|
shapeMap[shape] ?? shapeMap.circle,
|
|
10787
10787
|
variantMap[variant] ?? variantMap.secondary,
|
|
10788
|
-
actualPressed && "scale-95 brightness-110 border-
|
|
10788
|
+
actualPressed && "scale-95 brightness-110 border-foreground",
|
|
10789
10789
|
disabled && "opacity-50 cursor-not-allowed",
|
|
10790
10790
|
className
|
|
10791
10791
|
),
|
|
10792
10792
|
children: [
|
|
10793
|
-
icon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-2xl", children: icon
|
|
10793
|
+
icon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-2xl", children: typeof icon === "string" ? (() => {
|
|
10794
|
+
const I = resolveIcon(icon);
|
|
10795
|
+
return I ? /* @__PURE__ */ jsxRuntime.jsx(I, { className: "w-6 h-6" }) : null;
|
|
10796
|
+
})() : icon }),
|
|
10794
10797
|
label && !icon && /* @__PURE__ */ jsxRuntime.jsx("span", { children: label })
|
|
10795
10798
|
]
|
|
10796
10799
|
}
|
|
@@ -10802,6 +10805,7 @@ var init_ControlButton = __esm({
|
|
|
10802
10805
|
"use client";
|
|
10803
10806
|
init_cn();
|
|
10804
10807
|
init_useEventBus();
|
|
10808
|
+
init_Icon();
|
|
10805
10809
|
sizeMap3 = {
|
|
10806
10810
|
sm: "w-10 h-10 text-sm",
|
|
10807
10811
|
md: "w-14 h-14 text-base",
|
|
@@ -10814,9 +10818,9 @@ var init_ControlButton = __esm({
|
|
|
10814
10818
|
square: "rounded-md"
|
|
10815
10819
|
};
|
|
10816
10820
|
variantMap = {
|
|
10817
|
-
primary: "bg-
|
|
10818
|
-
secondary: "bg-
|
|
10819
|
-
ghost: "bg-transparent text-
|
|
10821
|
+
primary: "bg-primary text-primary-foreground border-primary hover:bg-primary-hover",
|
|
10822
|
+
secondary: "bg-secondary text-secondary-foreground border-border hover:bg-secondary-hover",
|
|
10823
|
+
ghost: "bg-transparent text-foreground border-border hover:bg-muted"
|
|
10820
10824
|
};
|
|
10821
10825
|
ControlButton.displayName = "ControlButton";
|
|
10822
10826
|
}
|
|
@@ -11544,8 +11548,8 @@ function ChoiceButton({
|
|
|
11544
11548
|
className: cn(
|
|
11545
11549
|
"w-full text-left px-4 py-2.5 rounded-md border transition-all duration-150",
|
|
11546
11550
|
"flex items-center gap-2",
|
|
11547
|
-
selected ? "bg-
|
|
11548
|
-
disabled && "opacity-40 cursor-not-allowed hover:bg-
|
|
11551
|
+
selected ? "bg-accent/15 border-accent text-foreground" : "bg-muted/40 border-border text-foreground hover:bg-muted hover:border-border",
|
|
11552
|
+
disabled && "opacity-40 cursor-not-allowed hover:bg-muted/40 hover:border-border",
|
|
11549
11553
|
className
|
|
11550
11554
|
),
|
|
11551
11555
|
children: [
|
|
@@ -11554,7 +11558,7 @@ function ChoiceButton({
|
|
|
11554
11558
|
{
|
|
11555
11559
|
className: cn(
|
|
11556
11560
|
"flex-shrink-0 font-mono font-bold text-sm",
|
|
11557
|
-
selected ? "text-
|
|
11561
|
+
selected ? "text-accent" : "text-muted-foreground"
|
|
11558
11562
|
),
|
|
11559
11563
|
children: [
|
|
11560
11564
|
index,
|
|
@@ -11595,7 +11599,7 @@ function ActionButton({
|
|
|
11595
11599
|
disabled: isDisabled,
|
|
11596
11600
|
onClick,
|
|
11597
11601
|
className: cn(
|
|
11598
|
-
"relative inline-flex items-center gap-1.5 rounded-md border font-medium
|
|
11602
|
+
"relative inline-flex items-center gap-1.5 rounded-md border font-medium overflow-hidden transition-colors duration-150",
|
|
11599
11603
|
sizes.button,
|
|
11600
11604
|
variantStyles8[variant],
|
|
11601
11605
|
isDisabled && "opacity-60 cursor-not-allowed",
|
|
@@ -11605,7 +11609,7 @@ function ActionButton({
|
|
|
11605
11609
|
onCooldown && /* @__PURE__ */ jsxRuntime.jsx(
|
|
11606
11610
|
"div",
|
|
11607
11611
|
{
|
|
11608
|
-
className: "absolute inset-0 bg-
|
|
11612
|
+
className: "absolute inset-0 bg-foreground/40 pointer-events-none",
|
|
11609
11613
|
style: {
|
|
11610
11614
|
clipPath: `conic-gradient(from 0deg, transparent ${360 - cooldownDeg}deg, black ${360 - cooldownDeg}deg)`,
|
|
11611
11615
|
WebkitClipPath: `conic-gradient(from 0deg, transparent ${360 - cooldownDeg}deg, black ${360 - cooldownDeg}deg)`,
|
|
@@ -11613,13 +11617,16 @@ function ActionButton({
|
|
|
11613
11617
|
}
|
|
11614
11618
|
}
|
|
11615
11619
|
),
|
|
11616
|
-
icon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("flex-shrink-0", sizes.icon), children: icon
|
|
11620
|
+
icon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("flex-shrink-0", sizes.icon), children: typeof icon === "string" ? (() => {
|
|
11621
|
+
const I = resolveIcon(icon);
|
|
11622
|
+
return I ? /* @__PURE__ */ jsxRuntime.jsx(I, { className: "w-4 h-4" }) : null;
|
|
11623
|
+
})() : icon }),
|
|
11617
11624
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "relative z-10", children: label }),
|
|
11618
11625
|
hotkey && /* @__PURE__ */ jsxRuntime.jsx(
|
|
11619
11626
|
"span",
|
|
11620
11627
|
{
|
|
11621
11628
|
className: cn(
|
|
11622
|
-
"absolute top-0.5 right-0.5 bg-
|
|
11629
|
+
"absolute top-0.5 right-0.5 bg-foreground/30 text-primary-foreground rounded font-mono leading-tight",
|
|
11623
11630
|
sizes.hotkey
|
|
11624
11631
|
),
|
|
11625
11632
|
children: hotkey
|
|
@@ -11633,15 +11640,16 @@ var sizeMap13, variantStyles8;
|
|
|
11633
11640
|
var init_ActionButton = __esm({
|
|
11634
11641
|
"components/atoms/game/ActionButton.tsx"() {
|
|
11635
11642
|
init_cn();
|
|
11643
|
+
init_Icon();
|
|
11636
11644
|
sizeMap13 = {
|
|
11637
11645
|
sm: { button: "px-3 py-1.5 text-xs", hotkey: "text-[9px] px-1", icon: "text-xs" },
|
|
11638
11646
|
md: { button: "px-4 py-2 text-sm", hotkey: "text-[10px] px-1.5", icon: "text-sm" },
|
|
11639
11647
|
lg: { button: "px-5 py-2.5 text-base", hotkey: "text-xs px-2", icon: "text-base" }
|
|
11640
11648
|
};
|
|
11641
11649
|
variantStyles8 = {
|
|
11642
|
-
primary: "bg-
|
|
11643
|
-
secondary: "bg-
|
|
11644
|
-
danger: "bg-
|
|
11650
|
+
primary: "bg-primary text-primary-foreground hover:bg-primary-hover border-primary",
|
|
11651
|
+
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary-hover border-border",
|
|
11652
|
+
danger: "bg-error text-error-foreground hover:bg-error/90 border-error"
|
|
11645
11653
|
};
|
|
11646
11654
|
ActionButton.displayName = "ActionButton";
|
|
11647
11655
|
}
|
|
@@ -21741,20 +21749,20 @@ function CanvasEffectEngine({
|
|
|
21741
21749
|
return img?.complete ? img : void 0;
|
|
21742
21750
|
}, []);
|
|
21743
21751
|
React147.useEffect(() => {
|
|
21744
|
-
const
|
|
21752
|
+
const now2 = performance.now();
|
|
21745
21753
|
const effectX = x || width / 2;
|
|
21746
21754
|
const effectY = y || height / 2;
|
|
21747
21755
|
const preset = presets[actionType](effectX, effectY);
|
|
21748
21756
|
const state = stateRef.current;
|
|
21749
21757
|
for (const emitter of preset.particles) {
|
|
21750
21758
|
const scaledEmitter = { ...emitter, count: Math.round(emitter.count * intensity) };
|
|
21751
|
-
state.particles.push(...spawnParticles(scaledEmitter,
|
|
21759
|
+
state.particles.push(...spawnParticles(scaledEmitter, now2));
|
|
21752
21760
|
}
|
|
21753
21761
|
for (const seqConfig of preset.sequences) {
|
|
21754
|
-
state.sequences.push(spawnSequence(seqConfig,
|
|
21762
|
+
state.sequences.push(spawnSequence(seqConfig, now2));
|
|
21755
21763
|
}
|
|
21756
21764
|
for (const ovConfig of preset.overlays) {
|
|
21757
|
-
state.overlays.push(spawnOverlay(ovConfig,
|
|
21765
|
+
state.overlays.push(spawnOverlay(ovConfig, now2));
|
|
21758
21766
|
}
|
|
21759
21767
|
if (preset.screenShake > 0) {
|
|
21760
21768
|
shakeRef.current.intensity = preset.screenShake * intensity;
|
|
@@ -25150,7 +25158,7 @@ function DataGrid({
|
|
|
25150
25158
|
onClick: handleActionClick(action, itemData),
|
|
25151
25159
|
"data-testid": `action-${action.event}`,
|
|
25152
25160
|
"data-row-id": String(itemData.id),
|
|
25153
|
-
className: "text-error hover:bg-error/10 px-2",
|
|
25161
|
+
className: "text-error hover:text-error hover:bg-error/10 px-2",
|
|
25154
25162
|
children: [
|
|
25155
25163
|
action.icon && /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: action.icon, size: "xs" }),
|
|
25156
25164
|
action.label
|
|
@@ -27743,7 +27751,7 @@ function StatBadge({
|
|
|
27743
27751
|
const I = resolveIcon(icon);
|
|
27744
27752
|
return I ? /* @__PURE__ */ jsxRuntime.jsx(I, { className: "w-4 h-4" }) : icon;
|
|
27745
27753
|
})() : icon }),
|
|
27746
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-
|
|
27754
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground font-medium", children: label }),
|
|
27747
27755
|
format === "hearts" && max && /* @__PURE__ */ jsxRuntime.jsx(
|
|
27748
27756
|
HealthBar,
|
|
27749
27757
|
{
|
|
@@ -27770,7 +27778,7 @@ function StatBadge({
|
|
|
27770
27778
|
animated: true
|
|
27771
27779
|
}
|
|
27772
27780
|
),
|
|
27773
|
-
format === "text" && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-bold text-
|
|
27781
|
+
format === "text" && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-bold text-foreground", children: value })
|
|
27774
27782
|
]
|
|
27775
27783
|
}
|
|
27776
27784
|
);
|
|
@@ -27788,11 +27796,11 @@ var init_StatBadge = __esm({
|
|
|
27788
27796
|
lg: "text-base px-4 py-2"
|
|
27789
27797
|
};
|
|
27790
27798
|
variantMap2 = {
|
|
27791
|
-
default: "bg-
|
|
27792
|
-
primary: "bg-
|
|
27793
|
-
success: "bg-
|
|
27794
|
-
warning: "bg-
|
|
27795
|
-
danger: "bg-
|
|
27799
|
+
default: "bg-card/80 border-border text-foreground",
|
|
27800
|
+
primary: "bg-primary/15 border-primary/40 text-foreground",
|
|
27801
|
+
success: "bg-success/15 border-success/40 text-foreground",
|
|
27802
|
+
warning: "bg-warning/15 border-warning/40 text-foreground",
|
|
27803
|
+
danger: "bg-error/15 border-error/40 text-foreground"
|
|
27796
27804
|
};
|
|
27797
27805
|
StatBadge.displayName = "StatBadge";
|
|
27798
27806
|
}
|
|
@@ -39962,9 +39970,45 @@ var init_List = __esm({
|
|
|
39962
39970
|
List3.displayName = "List";
|
|
39963
39971
|
}
|
|
39964
39972
|
});
|
|
39965
|
-
|
|
39973
|
+
function MasterDetail({
|
|
39974
|
+
entity,
|
|
39975
|
+
masterFields,
|
|
39976
|
+
detailFields: _detailFields,
|
|
39977
|
+
// Captured but not used here - detail handled separately
|
|
39978
|
+
loading: externalLoading,
|
|
39979
|
+
isLoading: externalIsLoading,
|
|
39980
|
+
error: externalError,
|
|
39981
|
+
className,
|
|
39982
|
+
...rest
|
|
39983
|
+
}) {
|
|
39984
|
+
const loading = externalLoading ?? false;
|
|
39985
|
+
const isLoading = externalIsLoading ?? false;
|
|
39986
|
+
const error = externalError ?? null;
|
|
39987
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
39988
|
+
DataTable,
|
|
39989
|
+
{
|
|
39990
|
+
fields: masterFields,
|
|
39991
|
+
columns: masterFields,
|
|
39992
|
+
entity,
|
|
39993
|
+
isLoading: loading || isLoading,
|
|
39994
|
+
error,
|
|
39995
|
+
className,
|
|
39996
|
+
emptyTitle: "No items found",
|
|
39997
|
+
emptyDescription: "Create your first item to get started.",
|
|
39998
|
+
...rest
|
|
39999
|
+
}
|
|
40000
|
+
);
|
|
40001
|
+
}
|
|
39966
40002
|
var init_MasterDetail = __esm({
|
|
39967
|
-
"components/organisms/
|
|
40003
|
+
"components/organisms/MasterDetail.tsx"() {
|
|
40004
|
+
"use client";
|
|
40005
|
+
init_DataTable();
|
|
40006
|
+
MasterDetail.displayName = "MasterDetail";
|
|
40007
|
+
}
|
|
40008
|
+
});
|
|
40009
|
+
var DefaultEmptyDetail, MasterDetailLayout;
|
|
40010
|
+
var init_MasterDetailLayout = __esm({
|
|
40011
|
+
"components/organisms/layout/MasterDetailLayout.tsx"() {
|
|
39968
40012
|
init_cn();
|
|
39969
40013
|
init_Typography();
|
|
39970
40014
|
DefaultEmptyDetail = () => /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center justify-center h-full border-2 border-dashed border-border", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -39975,7 +40019,7 @@ var init_MasterDetail = __esm({
|
|
|
39975
40019
|
children: "Select an item to view details"
|
|
39976
40020
|
}
|
|
39977
40021
|
) });
|
|
39978
|
-
|
|
40022
|
+
MasterDetailLayout = ({
|
|
39979
40023
|
master,
|
|
39980
40024
|
detail,
|
|
39981
40025
|
emptyDetail,
|
|
@@ -40010,7 +40054,7 @@ var init_MasterDetail = __esm({
|
|
|
40010
40054
|
}
|
|
40011
40055
|
);
|
|
40012
40056
|
};
|
|
40013
|
-
|
|
40057
|
+
MasterDetailLayout.displayName = "MasterDetailLayout";
|
|
40014
40058
|
}
|
|
40015
40059
|
});
|
|
40016
40060
|
var COLUMN_CLASSES, ASPECT_CLASSES, MediaGallery;
|
|
@@ -42428,7 +42472,7 @@ function getAllEvents(traits2) {
|
|
|
42428
42472
|
}
|
|
42429
42473
|
function EventDispatcherTab({ traits: traits2, schema }) {
|
|
42430
42474
|
const eventBus = useEventBus();
|
|
42431
|
-
const [
|
|
42475
|
+
const [log19, setLog] = React147__namespace.useState([]);
|
|
42432
42476
|
const prevStatesRef = React147__namespace.useRef(/* @__PURE__ */ new Map());
|
|
42433
42477
|
React147__namespace.useEffect(() => {
|
|
42434
42478
|
for (const trait of traits2) {
|
|
@@ -42492,9 +42536,9 @@ function EventDispatcherTab({ traits: traits2, schema }) {
|
|
|
42492
42536
|
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-1", children: "Other Events (not available from current state)" }),
|
|
42493
42537
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-wrap gap-1", children: unavailableEvents.map((event) => /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: "default", size: "sm", className: "opacity-50", children: event }, event)) })
|
|
42494
42538
|
] }),
|
|
42495
|
-
|
|
42539
|
+
log19.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
42496
42540
|
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-1", children: "Recent Transitions" }),
|
|
42497
|
-
/* @__PURE__ */ jsxRuntime.jsx(Stack, { gap: "xs", children:
|
|
42541
|
+
/* @__PURE__ */ jsxRuntime.jsx(Stack, { gap: "xs", children: log19.map((entry, i) => /* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "small", className: "font-mono text-xs", children: [
|
|
42498
42542
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-purple-400", children: entry.traitName }),
|
|
42499
42543
|
" ",
|
|
42500
42544
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-gray-500", children: entry.from }),
|
|
@@ -52237,6 +52281,7 @@ var init_component_registry_generated = __esm({
|
|
|
52237
52281
|
init_LoadingState();
|
|
52238
52282
|
init_MarkdownContent();
|
|
52239
52283
|
init_MasterDetail();
|
|
52284
|
+
init_MasterDetailLayout();
|
|
52240
52285
|
init_MatrixQuestion();
|
|
52241
52286
|
init_MediaGallery();
|
|
52242
52287
|
init_Meter();
|
|
@@ -52531,6 +52576,7 @@ var init_component_registry_generated = __esm({
|
|
|
52531
52576
|
"MapViewPattern": MapViewPattern,
|
|
52532
52577
|
"MarkdownContent": MarkdownContent,
|
|
52533
52578
|
"MasterDetail": MasterDetail,
|
|
52579
|
+
"MasterDetailLayout": MasterDetailLayout,
|
|
52534
52580
|
"MatrixQuestion": MatrixQuestion,
|
|
52535
52581
|
"MediaGallery": MediaGallery,
|
|
52536
52582
|
"Menu": MenuPattern,
|
|
@@ -56461,11 +56507,11 @@ function VerificationProvider({
|
|
|
56461
56507
|
runtimeManager,
|
|
56462
56508
|
traitStateGetter
|
|
56463
56509
|
}) {
|
|
56464
|
-
const
|
|
56510
|
+
const isEnabled2 = enabled ?? (typeof process !== "undefined" && process.env?.NODE_ENV !== "production");
|
|
56465
56511
|
const eventBus = useEventBus();
|
|
56466
56512
|
const pendingRef = React147.useRef(/* @__PURE__ */ new Map());
|
|
56467
56513
|
React147.useEffect(() => {
|
|
56468
|
-
if (!
|
|
56514
|
+
if (!isEnabled2) return;
|
|
56469
56515
|
if (!eventBus.onAny) return;
|
|
56470
56516
|
const verificationProviderLifecycleListener = (evt) => {
|
|
56471
56517
|
const parsed = parseLifecycleEvent(evt.type);
|
|
@@ -56568,9 +56614,9 @@ function VerificationProvider({
|
|
|
56568
56614
|
"pass"
|
|
56569
56615
|
);
|
|
56570
56616
|
return unsub;
|
|
56571
|
-
}, [
|
|
56617
|
+
}, [isEnabled2, eventBus]);
|
|
56572
56618
|
React147.useEffect(() => {
|
|
56573
|
-
if (!
|
|
56619
|
+
if (!isEnabled2) return;
|
|
56574
56620
|
if (!runtimeManager) return;
|
|
56575
56621
|
runtimeManager.setObserver({
|
|
56576
56622
|
onTransition(trace) {
|
|
@@ -56590,20 +56636,20 @@ function VerificationProvider({
|
|
|
56590
56636
|
"VerificationProvider active (runtime path)",
|
|
56591
56637
|
"pass"
|
|
56592
56638
|
);
|
|
56593
|
-
}, [
|
|
56639
|
+
}, [isEnabled2, runtimeManager]);
|
|
56594
56640
|
React147.useEffect(() => {
|
|
56595
|
-
if (!
|
|
56641
|
+
if (!isEnabled2) return;
|
|
56596
56642
|
bindEventBus(eventBus);
|
|
56597
|
-
}, [
|
|
56643
|
+
}, [isEnabled2, eventBus]);
|
|
56598
56644
|
React147.useEffect(() => {
|
|
56599
|
-
if (!
|
|
56645
|
+
if (!isEnabled2) return;
|
|
56600
56646
|
if (traitStateGetter) {
|
|
56601
56647
|
bindTraitStateGetter(traitStateGetter);
|
|
56602
56648
|
} else if (runtimeManager?.getState) {
|
|
56603
56649
|
const mgr = runtimeManager;
|
|
56604
56650
|
bindTraitStateGetter((traitName) => mgr.getState(traitName));
|
|
56605
56651
|
}
|
|
56606
|
-
}, [
|
|
56652
|
+
}, [isEnabled2, traitStateGetter, runtimeManager]);
|
|
56607
56653
|
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children });
|
|
56608
56654
|
}
|
|
56609
56655
|
VerificationProvider.displayName = "VerificationProvider";
|
|
@@ -57817,6 +57863,66 @@ function ServerBridgeProvider({
|
|
|
57817
57863
|
// runtime/OrbPreview.tsx
|
|
57818
57864
|
init_navigation();
|
|
57819
57865
|
init_verificationRegistry();
|
|
57866
|
+
var PERF_NAMESPACE = "almadar:perf:canvas";
|
|
57867
|
+
var log17 = logger.createLogger(PERF_NAMESPACE);
|
|
57868
|
+
var RING_SIZE = 50;
|
|
57869
|
+
var ring = [];
|
|
57870
|
+
var writeIdx = 0;
|
|
57871
|
+
var subscribers = /* @__PURE__ */ new Set();
|
|
57872
|
+
function push(entry) {
|
|
57873
|
+
if (ring.length < RING_SIZE) {
|
|
57874
|
+
ring.push(entry);
|
|
57875
|
+
} else {
|
|
57876
|
+
ring[writeIdx] = entry;
|
|
57877
|
+
}
|
|
57878
|
+
writeIdx = (writeIdx + 1) % RING_SIZE;
|
|
57879
|
+
for (const fn of subscribers) fn();
|
|
57880
|
+
}
|
|
57881
|
+
function isEnabled() {
|
|
57882
|
+
return logger.isLogLevelEnabled("DEBUG", PERF_NAMESPACE);
|
|
57883
|
+
}
|
|
57884
|
+
function now() {
|
|
57885
|
+
return typeof performance !== "undefined" && typeof performance.now === "function" ? performance.now() : Date.now();
|
|
57886
|
+
}
|
|
57887
|
+
function perfStart(name) {
|
|
57888
|
+
if (!isEnabled()) return -1;
|
|
57889
|
+
if (typeof performance !== "undefined" && typeof performance.mark === "function") {
|
|
57890
|
+
try {
|
|
57891
|
+
performance.mark(`${name}-start`);
|
|
57892
|
+
} catch {
|
|
57893
|
+
}
|
|
57894
|
+
}
|
|
57895
|
+
return now();
|
|
57896
|
+
}
|
|
57897
|
+
function perfEnd(name, startToken, detail) {
|
|
57898
|
+
if (startToken < 0 || !isEnabled()) return;
|
|
57899
|
+
const endTs = now();
|
|
57900
|
+
const durationMs = endTs - startToken;
|
|
57901
|
+
if (typeof performance !== "undefined" && typeof performance.measure === "function") {
|
|
57902
|
+
try {
|
|
57903
|
+
performance.mark(`${name}-end`);
|
|
57904
|
+
performance.measure(name, `${name}-start`, `${name}-end`);
|
|
57905
|
+
} catch {
|
|
57906
|
+
}
|
|
57907
|
+
}
|
|
57908
|
+
push({ name, durationMs, ts: endTs, detail });
|
|
57909
|
+
log17.debug(name, () => ({ durationMs, ...detail ?? {} }));
|
|
57910
|
+
}
|
|
57911
|
+
var profilerOnRender = (id, phase, actualDuration, baseDuration, _startTime, commitTime) => {
|
|
57912
|
+
if (!isEnabled()) return;
|
|
57913
|
+
push({
|
|
57914
|
+
name: `profiler:${id}:${phase}`,
|
|
57915
|
+
durationMs: actualDuration,
|
|
57916
|
+
ts: commitTime,
|
|
57917
|
+
detail: { baseDuration }
|
|
57918
|
+
});
|
|
57919
|
+
log17.debug(`profiler:${id}:${phase}`, () => ({ actualDuration, baseDuration }));
|
|
57920
|
+
};
|
|
57921
|
+
function bumpRevision() {
|
|
57922
|
+
}
|
|
57923
|
+
subscribers.add(bumpRevision);
|
|
57924
|
+
|
|
57925
|
+
// runtime/prepareSchemaForPreview.ts
|
|
57820
57926
|
function generateEntityRow(entity, idx) {
|
|
57821
57927
|
const row = { id: String(idx) };
|
|
57822
57928
|
for (const f3 of entity.fields) {
|
|
@@ -57842,6 +57948,7 @@ function generateFieldValue(entityName, field, idx) {
|
|
|
57842
57948
|
}
|
|
57843
57949
|
}
|
|
57844
57950
|
function buildMockData(schema) {
|
|
57951
|
+
const t = perfStart("build-mock-data");
|
|
57845
57952
|
const result = {};
|
|
57846
57953
|
for (const orbital of schema.orbitals) {
|
|
57847
57954
|
const entity = orbital.entity;
|
|
@@ -57859,6 +57966,7 @@ function buildMockData(schema) {
|
|
|
57859
57966
|
);
|
|
57860
57967
|
result[entityName] = rows;
|
|
57861
57968
|
}
|
|
57969
|
+
perfEnd("build-mock-data", t, { orbitalCount: schema.orbitals.length, entityCount: Object.keys(result).length });
|
|
57862
57970
|
return result;
|
|
57863
57971
|
}
|
|
57864
57972
|
function isInlineTrait2(traitRef) {
|
|
@@ -58421,7 +58529,7 @@ function entityNameOf(ref) {
|
|
|
58421
58529
|
}
|
|
58422
58530
|
var eventHandleLog = logger.createLogger("almadar:ui:nan-coord");
|
|
58423
58531
|
var orbPreviewLog = logger.createLogger("almadar:ui:orb-preview-node");
|
|
58424
|
-
orbPreviewLog.
|
|
58532
|
+
orbPreviewLog.debug("module-init", () => ({ browserPlayground: typeof BrowserPlayground }));
|
|
58425
58533
|
var ScreenSizeContext = React147.createContext("tablet");
|
|
58426
58534
|
var PatternSelectionContext = React147.createContext({ selected: null, select: () => {
|
|
58427
58535
|
} });
|
|
@@ -58878,11 +58986,11 @@ var OrbPreviewNodeInner = (props) => {
|
|
|
58878
58986
|
};
|
|
58879
58987
|
var OrbPreviewNode = React147__namespace.default.memo(OrbPreviewNodeInner);
|
|
58880
58988
|
OrbPreviewNode.displayName = "OrbPreviewNode";
|
|
58881
|
-
orbPreviewLog.
|
|
58989
|
+
orbPreviewLog.debug("export-resolved", () => ({
|
|
58882
58990
|
type: typeof OrbPreviewNode,
|
|
58883
|
-
displayName: OrbPreviewNode.displayName,
|
|
58991
|
+
displayName: OrbPreviewNode.displayName ?? null,
|
|
58884
58992
|
innerDefined: typeof OrbPreviewNodeInner === "function"
|
|
58885
|
-
});
|
|
58993
|
+
}));
|
|
58886
58994
|
var edgeLog = logger.createLogger("almadar:ui:nan-coord");
|
|
58887
58995
|
var EventFlowEdgeInner = (props) => {
|
|
58888
58996
|
const {
|
|
@@ -59714,12 +59822,12 @@ var NODE_TYPES = {
|
|
|
59714
59822
|
preview: OrbPreviewNode,
|
|
59715
59823
|
behaviorCompose: BehaviorComposeNode
|
|
59716
59824
|
};
|
|
59717
|
-
flowCanvasLog.
|
|
59825
|
+
flowCanvasLog.debug("node-type-registry", () => ({
|
|
59718
59826
|
registered: Object.keys(NODE_TYPES),
|
|
59719
59827
|
preview: typeof OrbPreviewNode,
|
|
59720
59828
|
previewIsValid: typeof OrbPreviewNode === "function" || typeof OrbPreviewNode === "object" && OrbPreviewNode !== null,
|
|
59721
59829
|
behaviorCompose: typeof BehaviorComposeNode
|
|
59722
|
-
});
|
|
59830
|
+
}));
|
|
59723
59831
|
var DEFAULT_EDGE_OPTIONS = {
|
|
59724
59832
|
markerEnd: { type: react.MarkerType.ArrowClosed, width: 12, height: 12 }
|
|
59725
59833
|
};
|
|
@@ -59781,9 +59889,16 @@ function FlowCanvasInner({
|
|
|
59781
59889
|
}), [selectedPattern]);
|
|
59782
59890
|
const [atBehaviorLevel, setAtBehaviorLevel] = React147.useState(composeLevel === "behavior");
|
|
59783
59891
|
const { composeNodes, composeEdges, overviewNodes, overviewEdges, expandedNodes, expandedEdges } = React147.useMemo(() => {
|
|
59892
|
+
const t = perfStart("compose-graph");
|
|
59784
59893
|
const compose = composeLevel === "behavior" && behaviorEntries?.length ? behaviorsToComposeGraph(behaviorEntries, behaviorWires ?? [], layoutHint) : { nodes: [], edges: [] };
|
|
59785
59894
|
const overview = schemaToOverviewGraph(parsedSchema, mockData, behaviorMeta, layoutHint);
|
|
59786
59895
|
const expanded = expandedOrbital ? orbitalToExpandedGraph(parsedSchema, expandedOrbital, mockData) : { nodes: [], edges: [] };
|
|
59896
|
+
perfEnd("compose-graph", t, {
|
|
59897
|
+
composeNodes: compose.nodes.length,
|
|
59898
|
+
overviewNodes: overview.nodes.length,
|
|
59899
|
+
expandedNodes: expanded.nodes.length,
|
|
59900
|
+
orbitalCount: parsedSchema.orbitals?.length ?? 0
|
|
59901
|
+
});
|
|
59787
59902
|
return {
|
|
59788
59903
|
composeNodes: compose.nodes,
|
|
59789
59904
|
composeEdges: compose.edges,
|
|
@@ -59792,7 +59907,7 @@ function FlowCanvasInner({
|
|
|
59792
59907
|
expandedNodes: expanded.nodes,
|
|
59793
59908
|
expandedEdges: expanded.edges
|
|
59794
59909
|
};
|
|
59795
|
-
}, [parsedSchema, expandedOrbital, behaviorMeta, layoutHint, composeLevel, behaviorEntries, behaviorWires]);
|
|
59910
|
+
}, [parsedSchema, expandedOrbital, behaviorMeta, layoutHint, composeLevel, behaviorEntries, behaviorWires, mockData]);
|
|
59796
59911
|
const activeNodes = atBehaviorLevel && composeNodes.length > 0 ? composeNodes : level === "overview" ? overviewNodes : expandedNodes;
|
|
59797
59912
|
const activeEdges = atBehaviorLevel && composeEdges.length > 0 ? composeEdges : level === "overview" ? overviewEdges : expandedEdges;
|
|
59798
59913
|
const [nodes, setNodes, onNodesChange] = react.useNodesState(activeNodes);
|
|
@@ -60050,7 +60165,7 @@ function FlowCanvasInner({
|
|
|
60050
60165
|
) }) });
|
|
60051
60166
|
}
|
|
60052
60167
|
var FlowCanvas = (props) => {
|
|
60053
|
-
return /* @__PURE__ */ jsxRuntime.jsx(react.ReactFlowProvider, { children: /* @__PURE__ */ jsxRuntime.jsx(FlowCanvasInner, { ...props }) });
|
|
60168
|
+
return /* @__PURE__ */ jsxRuntime.jsx(React147.Profiler, { id: "flow-canvas", onRender: profilerOnRender, children: /* @__PURE__ */ jsxRuntime.jsx(react.ReactFlowProvider, { children: /* @__PURE__ */ jsxRuntime.jsx(FlowCanvasInner, { ...props }) }) });
|
|
60054
60169
|
};
|
|
60055
60170
|
FlowCanvas.displayName = "FlowCanvas";
|
|
60056
60171
|
var BAND_LABELS = {
|
|
@@ -60177,7 +60292,7 @@ init_AvlTransitionLane();
|
|
|
60177
60292
|
init_AvlSwimLane();
|
|
60178
60293
|
init_types();
|
|
60179
60294
|
init_avl_elk_layout();
|
|
60180
|
-
var
|
|
60295
|
+
var log18 = logger.createLogger("almadar:ui:avl:trait-scene");
|
|
60181
60296
|
var SWIM_GUTTER2 = 120;
|
|
60182
60297
|
var CENTER_W2 = 360;
|
|
60183
60298
|
var AvlTraitScene = ({
|
|
@@ -60189,7 +60304,7 @@ var AvlTraitScene = ({
|
|
|
60189
60304
|
const dataKey = React147.useMemo(() => JSON.stringify(data), [data]);
|
|
60190
60305
|
React147.useEffect(() => {
|
|
60191
60306
|
computeTraitLayout(data).then(setLayout).catch((error) => {
|
|
60192
|
-
|
|
60307
|
+
log18.error("computeTraitLayout failed", { error: error instanceof Error ? error : String(error) });
|
|
60193
60308
|
});
|
|
60194
60309
|
}, [dataKey]);
|
|
60195
60310
|
if (!layout) {
|