@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.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
2
2
|
import { OrbitControls as OrbitControls$1, Grid as Grid$1, Stars, Sparkles, Html, RoundedBox } from '@react-three/drei';
|
|
3
3
|
import * as React147 from 'react';
|
|
4
|
-
import React147__default, { createContext, useState, useEffect, useMemo, useContext, useRef, useCallback, Suspense, useLayoutEffect, useReducer, lazy, useId, forwardRef, useImperativeHandle, Component } from 'react';
|
|
4
|
+
import React147__default, { createContext, useState, useEffect, useMemo, useContext, useRef, useCallback, Suspense, useLayoutEffect, Profiler, useReducer, lazy, useId, forwardRef, useImperativeHandle, Component } from 'react';
|
|
5
5
|
import { createLogger, isLogLevelEnabled } from '@almadar/logger';
|
|
6
6
|
import ELK from 'elkjs/lib/elk.bundled.js';
|
|
7
7
|
import { MarkerType, Handle, Position, getBezierPath, EdgeLabelRenderer, BaseEdge, ReactFlowProvider, useNodesState, useEdgesState, useReactFlow, ReactFlow, Controls, Background, BackgroundVariant } from '@xyflow/react';
|
|
@@ -9935,8 +9935,8 @@ function Seigaiha({ size, color, strokeWidth }) {
|
|
|
9935
9935
|
[s, s * 0.1]
|
|
9936
9936
|
];
|
|
9937
9937
|
for (const [cx, cy] of centers) {
|
|
9938
|
-
for (let
|
|
9939
|
-
const cr = r2 * (
|
|
9938
|
+
for (let ring2 = 1; ring2 <= 3; ring2++) {
|
|
9939
|
+
const cr = r2 * (ring2 / 3);
|
|
9940
9940
|
paths.push(
|
|
9941
9941
|
`M ${f(cx - cr)},${f(cy)} A ${f(cr)} ${f(cr)} 0 0 1 ${f(cx + cr)},${f(cy)}`
|
|
9942
9942
|
);
|
|
@@ -10033,8 +10033,8 @@ function Arch({ size, color, strokeWidth }) {
|
|
|
10033
10033
|
const h = size * 1.5;
|
|
10034
10034
|
const cx = w / 2;
|
|
10035
10035
|
const paths = [];
|
|
10036
|
-
for (let
|
|
10037
|
-
const scale = 1 -
|
|
10036
|
+
for (let ring2 = 0; ring2 < 4; ring2++) {
|
|
10037
|
+
const scale = 1 - ring2 * 0.2;
|
|
10038
10038
|
const archW = w * 0.48 * scale;
|
|
10039
10039
|
const archH = h * 0.7 * scale;
|
|
10040
10040
|
const baseY = h * 0.85;
|
|
@@ -10049,7 +10049,7 @@ function Arch({ size, color, strokeWidth }) {
|
|
|
10049
10049
|
paths.push(
|
|
10050
10050
|
`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)}`
|
|
10051
10051
|
);
|
|
10052
|
-
if (
|
|
10052
|
+
if (ring2 === 0) {
|
|
10053
10053
|
paths.push(`M ${f(lx)},${f(baseY)} L ${f(rx)},${f(baseY)}`);
|
|
10054
10054
|
}
|
|
10055
10055
|
}
|
|
@@ -10739,12 +10739,15 @@ function ControlButton({
|
|
|
10739
10739
|
sizeMap3[size] ?? sizeMap3.md,
|
|
10740
10740
|
shapeMap[shape] ?? shapeMap.circle,
|
|
10741
10741
|
variantMap[variant] ?? variantMap.secondary,
|
|
10742
|
-
actualPressed && "scale-95 brightness-110 border-
|
|
10742
|
+
actualPressed && "scale-95 brightness-110 border-foreground",
|
|
10743
10743
|
disabled && "opacity-50 cursor-not-allowed",
|
|
10744
10744
|
className
|
|
10745
10745
|
),
|
|
10746
10746
|
children: [
|
|
10747
|
-
icon && /* @__PURE__ */ jsx("span", { className: "text-2xl", children: icon
|
|
10747
|
+
icon && /* @__PURE__ */ jsx("span", { className: "text-2xl", children: typeof icon === "string" ? (() => {
|
|
10748
|
+
const I = resolveIcon(icon);
|
|
10749
|
+
return I ? /* @__PURE__ */ jsx(I, { className: "w-6 h-6" }) : null;
|
|
10750
|
+
})() : icon }),
|
|
10748
10751
|
label && !icon && /* @__PURE__ */ jsx("span", { children: label })
|
|
10749
10752
|
]
|
|
10750
10753
|
}
|
|
@@ -10756,6 +10759,7 @@ var init_ControlButton = __esm({
|
|
|
10756
10759
|
"use client";
|
|
10757
10760
|
init_cn();
|
|
10758
10761
|
init_useEventBus();
|
|
10762
|
+
init_Icon();
|
|
10759
10763
|
sizeMap3 = {
|
|
10760
10764
|
sm: "w-10 h-10 text-sm",
|
|
10761
10765
|
md: "w-14 h-14 text-base",
|
|
@@ -10768,9 +10772,9 @@ var init_ControlButton = __esm({
|
|
|
10768
10772
|
square: "rounded-md"
|
|
10769
10773
|
};
|
|
10770
10774
|
variantMap = {
|
|
10771
|
-
primary: "bg-
|
|
10772
|
-
secondary: "bg-
|
|
10773
|
-
ghost: "bg-transparent text-
|
|
10775
|
+
primary: "bg-primary text-primary-foreground border-primary hover:bg-primary-hover",
|
|
10776
|
+
secondary: "bg-secondary text-secondary-foreground border-border hover:bg-secondary-hover",
|
|
10777
|
+
ghost: "bg-transparent text-foreground border-border hover:bg-muted"
|
|
10774
10778
|
};
|
|
10775
10779
|
ControlButton.displayName = "ControlButton";
|
|
10776
10780
|
}
|
|
@@ -11498,8 +11502,8 @@ function ChoiceButton({
|
|
|
11498
11502
|
className: cn(
|
|
11499
11503
|
"w-full text-left px-4 py-2.5 rounded-md border transition-all duration-150",
|
|
11500
11504
|
"flex items-center gap-2",
|
|
11501
|
-
selected ? "bg-
|
|
11502
|
-
disabled && "opacity-40 cursor-not-allowed hover:bg-
|
|
11505
|
+
selected ? "bg-accent/15 border-accent text-foreground" : "bg-muted/40 border-border text-foreground hover:bg-muted hover:border-border",
|
|
11506
|
+
disabled && "opacity-40 cursor-not-allowed hover:bg-muted/40 hover:border-border",
|
|
11503
11507
|
className
|
|
11504
11508
|
),
|
|
11505
11509
|
children: [
|
|
@@ -11508,7 +11512,7 @@ function ChoiceButton({
|
|
|
11508
11512
|
{
|
|
11509
11513
|
className: cn(
|
|
11510
11514
|
"flex-shrink-0 font-mono font-bold text-sm",
|
|
11511
|
-
selected ? "text-
|
|
11515
|
+
selected ? "text-accent" : "text-muted-foreground"
|
|
11512
11516
|
),
|
|
11513
11517
|
children: [
|
|
11514
11518
|
index,
|
|
@@ -11549,7 +11553,7 @@ function ActionButton({
|
|
|
11549
11553
|
disabled: isDisabled,
|
|
11550
11554
|
onClick,
|
|
11551
11555
|
className: cn(
|
|
11552
|
-
"relative inline-flex items-center gap-1.5 rounded-md border font-medium
|
|
11556
|
+
"relative inline-flex items-center gap-1.5 rounded-md border font-medium overflow-hidden transition-colors duration-150",
|
|
11553
11557
|
sizes.button,
|
|
11554
11558
|
variantStyles8[variant],
|
|
11555
11559
|
isDisabled && "opacity-60 cursor-not-allowed",
|
|
@@ -11559,7 +11563,7 @@ function ActionButton({
|
|
|
11559
11563
|
onCooldown && /* @__PURE__ */ jsx(
|
|
11560
11564
|
"div",
|
|
11561
11565
|
{
|
|
11562
|
-
className: "absolute inset-0 bg-
|
|
11566
|
+
className: "absolute inset-0 bg-foreground/40 pointer-events-none",
|
|
11563
11567
|
style: {
|
|
11564
11568
|
clipPath: `conic-gradient(from 0deg, transparent ${360 - cooldownDeg}deg, black ${360 - cooldownDeg}deg)`,
|
|
11565
11569
|
WebkitClipPath: `conic-gradient(from 0deg, transparent ${360 - cooldownDeg}deg, black ${360 - cooldownDeg}deg)`,
|
|
@@ -11567,13 +11571,16 @@ function ActionButton({
|
|
|
11567
11571
|
}
|
|
11568
11572
|
}
|
|
11569
11573
|
),
|
|
11570
|
-
icon && /* @__PURE__ */ jsx("span", { className: cn("flex-shrink-0", sizes.icon), children: icon
|
|
11574
|
+
icon && /* @__PURE__ */ jsx("span", { className: cn("flex-shrink-0", sizes.icon), children: typeof icon === "string" ? (() => {
|
|
11575
|
+
const I = resolveIcon(icon);
|
|
11576
|
+
return I ? /* @__PURE__ */ jsx(I, { className: "w-4 h-4" }) : null;
|
|
11577
|
+
})() : icon }),
|
|
11571
11578
|
/* @__PURE__ */ jsx("span", { className: "relative z-10", children: label }),
|
|
11572
11579
|
hotkey && /* @__PURE__ */ jsx(
|
|
11573
11580
|
"span",
|
|
11574
11581
|
{
|
|
11575
11582
|
className: cn(
|
|
11576
|
-
"absolute top-0.5 right-0.5 bg-
|
|
11583
|
+
"absolute top-0.5 right-0.5 bg-foreground/30 text-primary-foreground rounded font-mono leading-tight",
|
|
11577
11584
|
sizes.hotkey
|
|
11578
11585
|
),
|
|
11579
11586
|
children: hotkey
|
|
@@ -11587,15 +11594,16 @@ var sizeMap13, variantStyles8;
|
|
|
11587
11594
|
var init_ActionButton = __esm({
|
|
11588
11595
|
"components/atoms/game/ActionButton.tsx"() {
|
|
11589
11596
|
init_cn();
|
|
11597
|
+
init_Icon();
|
|
11590
11598
|
sizeMap13 = {
|
|
11591
11599
|
sm: { button: "px-3 py-1.5 text-xs", hotkey: "text-[9px] px-1", icon: "text-xs" },
|
|
11592
11600
|
md: { button: "px-4 py-2 text-sm", hotkey: "text-[10px] px-1.5", icon: "text-sm" },
|
|
11593
11601
|
lg: { button: "px-5 py-2.5 text-base", hotkey: "text-xs px-2", icon: "text-base" }
|
|
11594
11602
|
};
|
|
11595
11603
|
variantStyles8 = {
|
|
11596
|
-
primary: "bg-
|
|
11597
|
-
secondary: "bg-
|
|
11598
|
-
danger: "bg-
|
|
11604
|
+
primary: "bg-primary text-primary-foreground hover:bg-primary-hover border-primary",
|
|
11605
|
+
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary-hover border-border",
|
|
11606
|
+
danger: "bg-error text-error-foreground hover:bg-error/90 border-error"
|
|
11599
11607
|
};
|
|
11600
11608
|
ActionButton.displayName = "ActionButton";
|
|
11601
11609
|
}
|
|
@@ -21695,20 +21703,20 @@ function CanvasEffectEngine({
|
|
|
21695
21703
|
return img?.complete ? img : void 0;
|
|
21696
21704
|
}, []);
|
|
21697
21705
|
useEffect(() => {
|
|
21698
|
-
const
|
|
21706
|
+
const now2 = performance.now();
|
|
21699
21707
|
const effectX = x || width / 2;
|
|
21700
21708
|
const effectY = y || height / 2;
|
|
21701
21709
|
const preset = presets[actionType](effectX, effectY);
|
|
21702
21710
|
const state = stateRef.current;
|
|
21703
21711
|
for (const emitter of preset.particles) {
|
|
21704
21712
|
const scaledEmitter = { ...emitter, count: Math.round(emitter.count * intensity) };
|
|
21705
|
-
state.particles.push(...spawnParticles(scaledEmitter,
|
|
21713
|
+
state.particles.push(...spawnParticles(scaledEmitter, now2));
|
|
21706
21714
|
}
|
|
21707
21715
|
for (const seqConfig of preset.sequences) {
|
|
21708
|
-
state.sequences.push(spawnSequence(seqConfig,
|
|
21716
|
+
state.sequences.push(spawnSequence(seqConfig, now2));
|
|
21709
21717
|
}
|
|
21710
21718
|
for (const ovConfig of preset.overlays) {
|
|
21711
|
-
state.overlays.push(spawnOverlay(ovConfig,
|
|
21719
|
+
state.overlays.push(spawnOverlay(ovConfig, now2));
|
|
21712
21720
|
}
|
|
21713
21721
|
if (preset.screenShake > 0) {
|
|
21714
21722
|
shakeRef.current.intensity = preset.screenShake * intensity;
|
|
@@ -25104,7 +25112,7 @@ function DataGrid({
|
|
|
25104
25112
|
onClick: handleActionClick(action, itemData),
|
|
25105
25113
|
"data-testid": `action-${action.event}`,
|
|
25106
25114
|
"data-row-id": String(itemData.id),
|
|
25107
|
-
className: "text-error hover:bg-error/10 px-2",
|
|
25115
|
+
className: "text-error hover:text-error hover:bg-error/10 px-2",
|
|
25108
25116
|
children: [
|
|
25109
25117
|
action.icon && /* @__PURE__ */ jsx(Icon, { name: action.icon, size: "xs" }),
|
|
25110
25118
|
action.label
|
|
@@ -27697,7 +27705,7 @@ function StatBadge({
|
|
|
27697
27705
|
const I = resolveIcon(icon);
|
|
27698
27706
|
return I ? /* @__PURE__ */ jsx(I, { className: "w-4 h-4" }) : icon;
|
|
27699
27707
|
})() : icon }),
|
|
27700
|
-
/* @__PURE__ */ jsx("span", { className: "text-
|
|
27708
|
+
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground font-medium", children: label }),
|
|
27701
27709
|
format === "hearts" && max && /* @__PURE__ */ jsx(
|
|
27702
27710
|
HealthBar,
|
|
27703
27711
|
{
|
|
@@ -27724,7 +27732,7 @@ function StatBadge({
|
|
|
27724
27732
|
animated: true
|
|
27725
27733
|
}
|
|
27726
27734
|
),
|
|
27727
|
-
format === "text" && /* @__PURE__ */ jsx("span", { className: "font-bold text-
|
|
27735
|
+
format === "text" && /* @__PURE__ */ jsx("span", { className: "font-bold text-foreground", children: value })
|
|
27728
27736
|
]
|
|
27729
27737
|
}
|
|
27730
27738
|
);
|
|
@@ -27742,11 +27750,11 @@ var init_StatBadge = __esm({
|
|
|
27742
27750
|
lg: "text-base px-4 py-2"
|
|
27743
27751
|
};
|
|
27744
27752
|
variantMap2 = {
|
|
27745
|
-
default: "bg-
|
|
27746
|
-
primary: "bg-
|
|
27747
|
-
success: "bg-
|
|
27748
|
-
warning: "bg-
|
|
27749
|
-
danger: "bg-
|
|
27753
|
+
default: "bg-card/80 border-border text-foreground",
|
|
27754
|
+
primary: "bg-primary/15 border-primary/40 text-foreground",
|
|
27755
|
+
success: "bg-success/15 border-success/40 text-foreground",
|
|
27756
|
+
warning: "bg-warning/15 border-warning/40 text-foreground",
|
|
27757
|
+
danger: "bg-error/15 border-error/40 text-foreground"
|
|
27750
27758
|
};
|
|
27751
27759
|
StatBadge.displayName = "StatBadge";
|
|
27752
27760
|
}
|
|
@@ -39916,9 +39924,45 @@ var init_List = __esm({
|
|
|
39916
39924
|
List3.displayName = "List";
|
|
39917
39925
|
}
|
|
39918
39926
|
});
|
|
39919
|
-
|
|
39927
|
+
function MasterDetail({
|
|
39928
|
+
entity,
|
|
39929
|
+
masterFields,
|
|
39930
|
+
detailFields: _detailFields,
|
|
39931
|
+
// Captured but not used here - detail handled separately
|
|
39932
|
+
loading: externalLoading,
|
|
39933
|
+
isLoading: externalIsLoading,
|
|
39934
|
+
error: externalError,
|
|
39935
|
+
className,
|
|
39936
|
+
...rest
|
|
39937
|
+
}) {
|
|
39938
|
+
const loading = externalLoading ?? false;
|
|
39939
|
+
const isLoading = externalIsLoading ?? false;
|
|
39940
|
+
const error = externalError ?? null;
|
|
39941
|
+
return /* @__PURE__ */ jsx(
|
|
39942
|
+
DataTable,
|
|
39943
|
+
{
|
|
39944
|
+
fields: masterFields,
|
|
39945
|
+
columns: masterFields,
|
|
39946
|
+
entity,
|
|
39947
|
+
isLoading: loading || isLoading,
|
|
39948
|
+
error,
|
|
39949
|
+
className,
|
|
39950
|
+
emptyTitle: "No items found",
|
|
39951
|
+
emptyDescription: "Create your first item to get started.",
|
|
39952
|
+
...rest
|
|
39953
|
+
}
|
|
39954
|
+
);
|
|
39955
|
+
}
|
|
39920
39956
|
var init_MasterDetail = __esm({
|
|
39921
|
-
"components/organisms/
|
|
39957
|
+
"components/organisms/MasterDetail.tsx"() {
|
|
39958
|
+
"use client";
|
|
39959
|
+
init_DataTable();
|
|
39960
|
+
MasterDetail.displayName = "MasterDetail";
|
|
39961
|
+
}
|
|
39962
|
+
});
|
|
39963
|
+
var DefaultEmptyDetail, MasterDetailLayout;
|
|
39964
|
+
var init_MasterDetailLayout = __esm({
|
|
39965
|
+
"components/organisms/layout/MasterDetailLayout.tsx"() {
|
|
39922
39966
|
init_cn();
|
|
39923
39967
|
init_Typography();
|
|
39924
39968
|
DefaultEmptyDetail = () => /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center h-full border-2 border-dashed border-border", children: /* @__PURE__ */ jsx(
|
|
@@ -39929,7 +39973,7 @@ var init_MasterDetail = __esm({
|
|
|
39929
39973
|
children: "Select an item to view details"
|
|
39930
39974
|
}
|
|
39931
39975
|
) });
|
|
39932
|
-
|
|
39976
|
+
MasterDetailLayout = ({
|
|
39933
39977
|
master,
|
|
39934
39978
|
detail,
|
|
39935
39979
|
emptyDetail,
|
|
@@ -39964,7 +40008,7 @@ var init_MasterDetail = __esm({
|
|
|
39964
40008
|
}
|
|
39965
40009
|
);
|
|
39966
40010
|
};
|
|
39967
|
-
|
|
40011
|
+
MasterDetailLayout.displayName = "MasterDetailLayout";
|
|
39968
40012
|
}
|
|
39969
40013
|
});
|
|
39970
40014
|
var COLUMN_CLASSES, ASPECT_CLASSES, MediaGallery;
|
|
@@ -42382,7 +42426,7 @@ function getAllEvents(traits2) {
|
|
|
42382
42426
|
}
|
|
42383
42427
|
function EventDispatcherTab({ traits: traits2, schema }) {
|
|
42384
42428
|
const eventBus = useEventBus();
|
|
42385
|
-
const [
|
|
42429
|
+
const [log19, setLog] = React147.useState([]);
|
|
42386
42430
|
const prevStatesRef = React147.useRef(/* @__PURE__ */ new Map());
|
|
42387
42431
|
React147.useEffect(() => {
|
|
42388
42432
|
for (const trait of traits2) {
|
|
@@ -42446,9 +42490,9 @@ function EventDispatcherTab({ traits: traits2, schema }) {
|
|
|
42446
42490
|
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-1", children: "Other Events (not available from current state)" }),
|
|
42447
42491
|
/* @__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)) })
|
|
42448
42492
|
] }),
|
|
42449
|
-
|
|
42493
|
+
log19.length > 0 && /* @__PURE__ */ jsxs("div", { children: [
|
|
42450
42494
|
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-1", children: "Recent Transitions" }),
|
|
42451
|
-
/* @__PURE__ */ jsx(Stack, { gap: "xs", children:
|
|
42495
|
+
/* @__PURE__ */ jsx(Stack, { gap: "xs", children: log19.map((entry, i) => /* @__PURE__ */ jsxs(Typography, { variant: "small", className: "font-mono text-xs", children: [
|
|
42452
42496
|
/* @__PURE__ */ jsx("span", { className: "text-purple-400", children: entry.traitName }),
|
|
42453
42497
|
" ",
|
|
42454
42498
|
/* @__PURE__ */ jsx("span", { className: "text-gray-500", children: entry.from }),
|
|
@@ -52191,6 +52235,7 @@ var init_component_registry_generated = __esm({
|
|
|
52191
52235
|
init_LoadingState();
|
|
52192
52236
|
init_MarkdownContent();
|
|
52193
52237
|
init_MasterDetail();
|
|
52238
|
+
init_MasterDetailLayout();
|
|
52194
52239
|
init_MatrixQuestion();
|
|
52195
52240
|
init_MediaGallery();
|
|
52196
52241
|
init_Meter();
|
|
@@ -52485,6 +52530,7 @@ var init_component_registry_generated = __esm({
|
|
|
52485
52530
|
"MapViewPattern": MapViewPattern,
|
|
52486
52531
|
"MarkdownContent": MarkdownContent,
|
|
52487
52532
|
"MasterDetail": MasterDetail,
|
|
52533
|
+
"MasterDetailLayout": MasterDetailLayout,
|
|
52488
52534
|
"MatrixQuestion": MatrixQuestion,
|
|
52489
52535
|
"MediaGallery": MediaGallery,
|
|
52490
52536
|
"Menu": MenuPattern,
|
|
@@ -56415,11 +56461,11 @@ function VerificationProvider({
|
|
|
56415
56461
|
runtimeManager,
|
|
56416
56462
|
traitStateGetter
|
|
56417
56463
|
}) {
|
|
56418
|
-
const
|
|
56464
|
+
const isEnabled2 = enabled ?? (typeof process !== "undefined" && process.env?.NODE_ENV !== "production");
|
|
56419
56465
|
const eventBus = useEventBus();
|
|
56420
56466
|
const pendingRef = useRef(/* @__PURE__ */ new Map());
|
|
56421
56467
|
useEffect(() => {
|
|
56422
|
-
if (!
|
|
56468
|
+
if (!isEnabled2) return;
|
|
56423
56469
|
if (!eventBus.onAny) return;
|
|
56424
56470
|
const verificationProviderLifecycleListener = (evt) => {
|
|
56425
56471
|
const parsed = parseLifecycleEvent(evt.type);
|
|
@@ -56522,9 +56568,9 @@ function VerificationProvider({
|
|
|
56522
56568
|
"pass"
|
|
56523
56569
|
);
|
|
56524
56570
|
return unsub;
|
|
56525
|
-
}, [
|
|
56571
|
+
}, [isEnabled2, eventBus]);
|
|
56526
56572
|
useEffect(() => {
|
|
56527
|
-
if (!
|
|
56573
|
+
if (!isEnabled2) return;
|
|
56528
56574
|
if (!runtimeManager) return;
|
|
56529
56575
|
runtimeManager.setObserver({
|
|
56530
56576
|
onTransition(trace) {
|
|
@@ -56544,20 +56590,20 @@ function VerificationProvider({
|
|
|
56544
56590
|
"VerificationProvider active (runtime path)",
|
|
56545
56591
|
"pass"
|
|
56546
56592
|
);
|
|
56547
|
-
}, [
|
|
56593
|
+
}, [isEnabled2, runtimeManager]);
|
|
56548
56594
|
useEffect(() => {
|
|
56549
|
-
if (!
|
|
56595
|
+
if (!isEnabled2) return;
|
|
56550
56596
|
bindEventBus(eventBus);
|
|
56551
|
-
}, [
|
|
56597
|
+
}, [isEnabled2, eventBus]);
|
|
56552
56598
|
useEffect(() => {
|
|
56553
|
-
if (!
|
|
56599
|
+
if (!isEnabled2) return;
|
|
56554
56600
|
if (traitStateGetter) {
|
|
56555
56601
|
bindTraitStateGetter(traitStateGetter);
|
|
56556
56602
|
} else if (runtimeManager?.getState) {
|
|
56557
56603
|
const mgr = runtimeManager;
|
|
56558
56604
|
bindTraitStateGetter((traitName) => mgr.getState(traitName));
|
|
56559
56605
|
}
|
|
56560
|
-
}, [
|
|
56606
|
+
}, [isEnabled2, traitStateGetter, runtimeManager]);
|
|
56561
56607
|
return /* @__PURE__ */ jsx(Fragment, { children });
|
|
56562
56608
|
}
|
|
56563
56609
|
VerificationProvider.displayName = "VerificationProvider";
|
|
@@ -57771,6 +57817,66 @@ function ServerBridgeProvider({
|
|
|
57771
57817
|
// runtime/OrbPreview.tsx
|
|
57772
57818
|
init_navigation();
|
|
57773
57819
|
init_verificationRegistry();
|
|
57820
|
+
var PERF_NAMESPACE = "almadar:perf:canvas";
|
|
57821
|
+
var log17 = createLogger(PERF_NAMESPACE);
|
|
57822
|
+
var RING_SIZE = 50;
|
|
57823
|
+
var ring = [];
|
|
57824
|
+
var writeIdx = 0;
|
|
57825
|
+
var subscribers = /* @__PURE__ */ new Set();
|
|
57826
|
+
function push(entry) {
|
|
57827
|
+
if (ring.length < RING_SIZE) {
|
|
57828
|
+
ring.push(entry);
|
|
57829
|
+
} else {
|
|
57830
|
+
ring[writeIdx] = entry;
|
|
57831
|
+
}
|
|
57832
|
+
writeIdx = (writeIdx + 1) % RING_SIZE;
|
|
57833
|
+
for (const fn of subscribers) fn();
|
|
57834
|
+
}
|
|
57835
|
+
function isEnabled() {
|
|
57836
|
+
return isLogLevelEnabled("DEBUG", PERF_NAMESPACE);
|
|
57837
|
+
}
|
|
57838
|
+
function now() {
|
|
57839
|
+
return typeof performance !== "undefined" && typeof performance.now === "function" ? performance.now() : Date.now();
|
|
57840
|
+
}
|
|
57841
|
+
function perfStart(name) {
|
|
57842
|
+
if (!isEnabled()) return -1;
|
|
57843
|
+
if (typeof performance !== "undefined" && typeof performance.mark === "function") {
|
|
57844
|
+
try {
|
|
57845
|
+
performance.mark(`${name}-start`);
|
|
57846
|
+
} catch {
|
|
57847
|
+
}
|
|
57848
|
+
}
|
|
57849
|
+
return now();
|
|
57850
|
+
}
|
|
57851
|
+
function perfEnd(name, startToken, detail) {
|
|
57852
|
+
if (startToken < 0 || !isEnabled()) return;
|
|
57853
|
+
const endTs = now();
|
|
57854
|
+
const durationMs = endTs - startToken;
|
|
57855
|
+
if (typeof performance !== "undefined" && typeof performance.measure === "function") {
|
|
57856
|
+
try {
|
|
57857
|
+
performance.mark(`${name}-end`);
|
|
57858
|
+
performance.measure(name, `${name}-start`, `${name}-end`);
|
|
57859
|
+
} catch {
|
|
57860
|
+
}
|
|
57861
|
+
}
|
|
57862
|
+
push({ name, durationMs, ts: endTs, detail });
|
|
57863
|
+
log17.debug(name, () => ({ durationMs, ...detail ?? {} }));
|
|
57864
|
+
}
|
|
57865
|
+
var profilerOnRender = (id, phase, actualDuration, baseDuration, _startTime, commitTime) => {
|
|
57866
|
+
if (!isEnabled()) return;
|
|
57867
|
+
push({
|
|
57868
|
+
name: `profiler:${id}:${phase}`,
|
|
57869
|
+
durationMs: actualDuration,
|
|
57870
|
+
ts: commitTime,
|
|
57871
|
+
detail: { baseDuration }
|
|
57872
|
+
});
|
|
57873
|
+
log17.debug(`profiler:${id}:${phase}`, () => ({ actualDuration, baseDuration }));
|
|
57874
|
+
};
|
|
57875
|
+
function bumpRevision() {
|
|
57876
|
+
}
|
|
57877
|
+
subscribers.add(bumpRevision);
|
|
57878
|
+
|
|
57879
|
+
// runtime/prepareSchemaForPreview.ts
|
|
57774
57880
|
function generateEntityRow(entity, idx) {
|
|
57775
57881
|
const row = { id: String(idx) };
|
|
57776
57882
|
for (const f3 of entity.fields) {
|
|
@@ -57796,6 +57902,7 @@ function generateFieldValue(entityName, field, idx) {
|
|
|
57796
57902
|
}
|
|
57797
57903
|
}
|
|
57798
57904
|
function buildMockData(schema) {
|
|
57905
|
+
const t = perfStart("build-mock-data");
|
|
57799
57906
|
const result = {};
|
|
57800
57907
|
for (const orbital of schema.orbitals) {
|
|
57801
57908
|
const entity = orbital.entity;
|
|
@@ -57813,6 +57920,7 @@ function buildMockData(schema) {
|
|
|
57813
57920
|
);
|
|
57814
57921
|
result[entityName] = rows;
|
|
57815
57922
|
}
|
|
57923
|
+
perfEnd("build-mock-data", t, { orbitalCount: schema.orbitals.length, entityCount: Object.keys(result).length });
|
|
57816
57924
|
return result;
|
|
57817
57925
|
}
|
|
57818
57926
|
function isInlineTrait2(traitRef) {
|
|
@@ -58375,7 +58483,7 @@ function entityNameOf(ref) {
|
|
|
58375
58483
|
}
|
|
58376
58484
|
var eventHandleLog = createLogger("almadar:ui:nan-coord");
|
|
58377
58485
|
var orbPreviewLog = createLogger("almadar:ui:orb-preview-node");
|
|
58378
|
-
orbPreviewLog.
|
|
58486
|
+
orbPreviewLog.debug("module-init", () => ({ browserPlayground: typeof BrowserPlayground }));
|
|
58379
58487
|
var ScreenSizeContext = createContext("tablet");
|
|
58380
58488
|
var PatternSelectionContext = createContext({ selected: null, select: () => {
|
|
58381
58489
|
} });
|
|
@@ -58832,11 +58940,11 @@ var OrbPreviewNodeInner = (props) => {
|
|
|
58832
58940
|
};
|
|
58833
58941
|
var OrbPreviewNode = React147__default.memo(OrbPreviewNodeInner);
|
|
58834
58942
|
OrbPreviewNode.displayName = "OrbPreviewNode";
|
|
58835
|
-
orbPreviewLog.
|
|
58943
|
+
orbPreviewLog.debug("export-resolved", () => ({
|
|
58836
58944
|
type: typeof OrbPreviewNode,
|
|
58837
|
-
displayName: OrbPreviewNode.displayName,
|
|
58945
|
+
displayName: OrbPreviewNode.displayName ?? null,
|
|
58838
58946
|
innerDefined: typeof OrbPreviewNodeInner === "function"
|
|
58839
|
-
});
|
|
58947
|
+
}));
|
|
58840
58948
|
var edgeLog = createLogger("almadar:ui:nan-coord");
|
|
58841
58949
|
var EventFlowEdgeInner = (props) => {
|
|
58842
58950
|
const {
|
|
@@ -59668,12 +59776,12 @@ var NODE_TYPES = {
|
|
|
59668
59776
|
preview: OrbPreviewNode,
|
|
59669
59777
|
behaviorCompose: BehaviorComposeNode
|
|
59670
59778
|
};
|
|
59671
|
-
flowCanvasLog.
|
|
59779
|
+
flowCanvasLog.debug("node-type-registry", () => ({
|
|
59672
59780
|
registered: Object.keys(NODE_TYPES),
|
|
59673
59781
|
preview: typeof OrbPreviewNode,
|
|
59674
59782
|
previewIsValid: typeof OrbPreviewNode === "function" || typeof OrbPreviewNode === "object" && OrbPreviewNode !== null,
|
|
59675
59783
|
behaviorCompose: typeof BehaviorComposeNode
|
|
59676
|
-
});
|
|
59784
|
+
}));
|
|
59677
59785
|
var DEFAULT_EDGE_OPTIONS = {
|
|
59678
59786
|
markerEnd: { type: MarkerType.ArrowClosed, width: 12, height: 12 }
|
|
59679
59787
|
};
|
|
@@ -59735,9 +59843,16 @@ function FlowCanvasInner({
|
|
|
59735
59843
|
}), [selectedPattern]);
|
|
59736
59844
|
const [atBehaviorLevel, setAtBehaviorLevel] = useState(composeLevel === "behavior");
|
|
59737
59845
|
const { composeNodes, composeEdges, overviewNodes, overviewEdges, expandedNodes, expandedEdges } = useMemo(() => {
|
|
59846
|
+
const t = perfStart("compose-graph");
|
|
59738
59847
|
const compose = composeLevel === "behavior" && behaviorEntries?.length ? behaviorsToComposeGraph(behaviorEntries, behaviorWires ?? [], layoutHint) : { nodes: [], edges: [] };
|
|
59739
59848
|
const overview = schemaToOverviewGraph(parsedSchema, mockData, behaviorMeta, layoutHint);
|
|
59740
59849
|
const expanded = expandedOrbital ? orbitalToExpandedGraph(parsedSchema, expandedOrbital, mockData) : { nodes: [], edges: [] };
|
|
59850
|
+
perfEnd("compose-graph", t, {
|
|
59851
|
+
composeNodes: compose.nodes.length,
|
|
59852
|
+
overviewNodes: overview.nodes.length,
|
|
59853
|
+
expandedNodes: expanded.nodes.length,
|
|
59854
|
+
orbitalCount: parsedSchema.orbitals?.length ?? 0
|
|
59855
|
+
});
|
|
59741
59856
|
return {
|
|
59742
59857
|
composeNodes: compose.nodes,
|
|
59743
59858
|
composeEdges: compose.edges,
|
|
@@ -59746,7 +59861,7 @@ function FlowCanvasInner({
|
|
|
59746
59861
|
expandedNodes: expanded.nodes,
|
|
59747
59862
|
expandedEdges: expanded.edges
|
|
59748
59863
|
};
|
|
59749
|
-
}, [parsedSchema, expandedOrbital, behaviorMeta, layoutHint, composeLevel, behaviorEntries, behaviorWires]);
|
|
59864
|
+
}, [parsedSchema, expandedOrbital, behaviorMeta, layoutHint, composeLevel, behaviorEntries, behaviorWires, mockData]);
|
|
59750
59865
|
const activeNodes = atBehaviorLevel && composeNodes.length > 0 ? composeNodes : level === "overview" ? overviewNodes : expandedNodes;
|
|
59751
59866
|
const activeEdges = atBehaviorLevel && composeEdges.length > 0 ? composeEdges : level === "overview" ? overviewEdges : expandedEdges;
|
|
59752
59867
|
const [nodes, setNodes, onNodesChange] = useNodesState(activeNodes);
|
|
@@ -60004,7 +60119,7 @@ function FlowCanvasInner({
|
|
|
60004
60119
|
) }) });
|
|
60005
60120
|
}
|
|
60006
60121
|
var FlowCanvas = (props) => {
|
|
60007
|
-
return /* @__PURE__ */ jsx(ReactFlowProvider, { children: /* @__PURE__ */ jsx(FlowCanvasInner, { ...props }) });
|
|
60122
|
+
return /* @__PURE__ */ jsx(Profiler, { id: "flow-canvas", onRender: profilerOnRender, children: /* @__PURE__ */ jsx(ReactFlowProvider, { children: /* @__PURE__ */ jsx(FlowCanvasInner, { ...props }) }) });
|
|
60008
60123
|
};
|
|
60009
60124
|
FlowCanvas.displayName = "FlowCanvas";
|
|
60010
60125
|
var BAND_LABELS = {
|
|
@@ -60131,7 +60246,7 @@ init_AvlTransitionLane();
|
|
|
60131
60246
|
init_AvlSwimLane();
|
|
60132
60247
|
init_types();
|
|
60133
60248
|
init_avl_elk_layout();
|
|
60134
|
-
var
|
|
60249
|
+
var log18 = createLogger("almadar:ui:avl:trait-scene");
|
|
60135
60250
|
var SWIM_GUTTER2 = 120;
|
|
60136
60251
|
var CENTER_W2 = 360;
|
|
60137
60252
|
var AvlTraitScene = ({
|
|
@@ -60143,7 +60258,7 @@ var AvlTraitScene = ({
|
|
|
60143
60258
|
const dataKey = useMemo(() => JSON.stringify(data), [data]);
|
|
60144
60259
|
useEffect(() => {
|
|
60145
60260
|
computeTraitLayout(data).then(setLayout).catch((error) => {
|
|
60146
|
-
|
|
60261
|
+
log18.error("computeTraitLayout failed", { error: error instanceof Error ? error : String(error) });
|
|
60147
60262
|
});
|
|
60148
60263
|
}, [dataKey]);
|
|
60149
60264
|
if (!layout) {
|
|
@@ -37,7 +37,7 @@ export { InfiniteScrollSentinel, type InfiniteScrollSentinelProps } from "./Infi
|
|
|
37
37
|
export { ConfettiEffect, type ConfettiEffectProps } from "./ConfettiEffect";
|
|
38
38
|
export { TypewriterText, type TypewriterTextProps } from "./TypewriterText";
|
|
39
39
|
export { SectionHeader, type SectionHeaderProps } from "./SectionHeader";
|
|
40
|
-
export { MarketingStatCard, type StatCardProps as MarketingStatCardProps, type StatCardSize } from "./
|
|
40
|
+
export { MarketingStatCard, type StatCardProps as MarketingStatCardProps, type StatCardSize } from "./MarketingStatCard";
|
|
41
41
|
export { ContentSection, type ContentSectionProps, type ContentSectionBackground, type ContentSectionPadding, } from "./ContentSection";
|
|
42
42
|
export { PatternTile, getTileDimensions, type PatternTileProps, type PatternVariant } from "./PatternTile";
|
|
43
43
|
export { AnimatedReveal, type AnimatedRevealProps, type RevealTrigger, type RevealAnimation } from "./AnimatedReveal";
|