@almadar/ui 5.53.0 → 5.55.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 +84 -54
- package/dist/avl/index.js +84 -54
- package/dist/components/index.cjs +25 -2
- package/dist/components/index.js +25 -2
- package/dist/providers/index.cjs +76 -46
- package/dist/providers/index.js +76 -46
- package/dist/runtime/index.cjs +71 -41
- package/dist/runtime/index.js +71 -41
- package/package.json +1 -1
package/dist/runtime/index.cjs
CHANGED
|
@@ -8468,6 +8468,16 @@ var init_Skeleton = __esm({
|
|
|
8468
8468
|
Skeleton.displayName = "Skeleton";
|
|
8469
8469
|
}
|
|
8470
8470
|
});
|
|
8471
|
+
function isKnownPattern(type) {
|
|
8472
|
+
return type in componentMapping;
|
|
8473
|
+
}
|
|
8474
|
+
var componentMapping;
|
|
8475
|
+
var init_pattern_resolver = __esm({
|
|
8476
|
+
"renderer/pattern-resolver.ts"() {
|
|
8477
|
+
logger.createLogger("almadar:ui:pattern-resolver");
|
|
8478
|
+
componentMapping = {};
|
|
8479
|
+
}
|
|
8480
|
+
});
|
|
8471
8481
|
|
|
8472
8482
|
// renderer/slot-definitions.ts
|
|
8473
8483
|
function isPortalSlot(slot) {
|
|
@@ -8576,6 +8586,7 @@ var init_navigation = __esm({
|
|
|
8576
8586
|
// renderer/index.ts
|
|
8577
8587
|
var init_renderer = __esm({
|
|
8578
8588
|
"renderer/index.ts"() {
|
|
8589
|
+
init_pattern_resolver();
|
|
8579
8590
|
init_slot_definitions();
|
|
8580
8591
|
}
|
|
8581
8592
|
});
|
|
@@ -10279,7 +10290,7 @@ function recordTransition(trace) {
|
|
|
10279
10290
|
...trace,
|
|
10280
10291
|
id: `t-${Date.now()}-${Math.random().toString(36).slice(2, 9)}`
|
|
10281
10292
|
};
|
|
10282
|
-
|
|
10293
|
+
log5.debug("transition:recorded", { trait: trace.traitName, from: trace.from, to: trace.to, event: trace.event, effectCount: trace.effects.length });
|
|
10283
10294
|
getState().transitions.push(entry);
|
|
10284
10295
|
if (getState().transitions.length > MAX_TRANSITIONS) {
|
|
10285
10296
|
getState().transitions.shift();
|
|
@@ -10378,7 +10389,7 @@ function getTraitSnapshots() {
|
|
|
10378
10389
|
try {
|
|
10379
10390
|
snapshots.push(getter());
|
|
10380
10391
|
} catch (err) {
|
|
10381
|
-
|
|
10392
|
+
log5.error("traitSnapshot getter failed", { trait: traitName, err: String(err) });
|
|
10382
10393
|
}
|
|
10383
10394
|
}
|
|
10384
10395
|
return snapshots;
|
|
@@ -10477,10 +10488,10 @@ function updateAssetStatus(url, status) {
|
|
|
10477
10488
|
window.__orbitalVerification.assetStatus[url] = status;
|
|
10478
10489
|
}
|
|
10479
10490
|
}
|
|
10480
|
-
var
|
|
10491
|
+
var log5, MAX_TRANSITIONS;
|
|
10481
10492
|
var init_verificationRegistry = __esm({
|
|
10482
10493
|
"lib/verificationRegistry.ts"() {
|
|
10483
|
-
|
|
10494
|
+
log5 = logger.createLogger("almadar:bridge");
|
|
10484
10495
|
MAX_TRANSITIONS = 500;
|
|
10485
10496
|
exposeOnWindow();
|
|
10486
10497
|
}
|
|
@@ -12774,7 +12785,7 @@ var init_avl_elk_layout = __esm({
|
|
|
12774
12785
|
elk = new ELK__default.default();
|
|
12775
12786
|
}
|
|
12776
12787
|
});
|
|
12777
|
-
var
|
|
12788
|
+
var log6, SWIM_GUTTER, CENTER_W, BehaviorView;
|
|
12778
12789
|
var init_BehaviorView = __esm({
|
|
12779
12790
|
"components/avl/molecules/BehaviorView.tsx"() {
|
|
12780
12791
|
"use client";
|
|
@@ -12783,7 +12794,7 @@ var init_BehaviorView = __esm({
|
|
|
12783
12794
|
init_AvlSwimLane();
|
|
12784
12795
|
init_types();
|
|
12785
12796
|
init_avl_elk_layout();
|
|
12786
|
-
|
|
12797
|
+
log6 = logger.createLogger("almadar:ui:avl:behavior-view");
|
|
12787
12798
|
SWIM_GUTTER = 120;
|
|
12788
12799
|
CENTER_W = 360;
|
|
12789
12800
|
BehaviorView = ({ data }) => {
|
|
@@ -12794,7 +12805,7 @@ var init_BehaviorView = __esm({
|
|
|
12794
12805
|
const dataKey = React81.useMemo(() => JSON.stringify(traitData), [traitData]);
|
|
12795
12806
|
React81.useEffect(() => {
|
|
12796
12807
|
if (!traitData) return;
|
|
12797
|
-
computeTraitLayout(traitData).then(setLayout).catch((err) =>
|
|
12808
|
+
computeTraitLayout(traitData).then(setLayout).catch((err) => log6.error("compute-trait-layout-failed", { error: err instanceof Error ? err : String(err) }));
|
|
12798
12809
|
}, [dataKey]);
|
|
12799
12810
|
if (!traitData) {
|
|
12800
12811
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "rounded-lg border border-[var(--color-border)] bg-[var(--color-card)] p-4 text-center text-[var(--color-muted-foreground)] text-sm", children: t("avl.noTraitData") });
|
|
@@ -13205,7 +13216,7 @@ function generateDiff(oldVal, newVal) {
|
|
|
13205
13216
|
}
|
|
13206
13217
|
return diff;
|
|
13207
13218
|
}
|
|
13208
|
-
var orbStyleOverrides, orbStyle, loloStyleOverrides, loloStyle,
|
|
13219
|
+
var orbStyleOverrides, orbStyle, loloStyleOverrides, loloStyle, log7, CODE_LANGUAGES, CODE_LANGUAGE_SET, DIFF_STYLES, LINE_PROPS_FN, HIDDEN_LINE_NUMBERS, CodeBlock;
|
|
13209
13220
|
var init_CodeBlock = __esm({
|
|
13210
13221
|
"components/core/molecules/markdown/CodeBlock.tsx"() {
|
|
13211
13222
|
init_cn();
|
|
@@ -13288,7 +13299,7 @@ var init_CodeBlock = __esm({
|
|
|
13288
13299
|
"lolo-op-async": { color: syntax.ORB_COLORS.dark.async }
|
|
13289
13300
|
};
|
|
13290
13301
|
loloStyle = { ...dark__default.default, ...loloStyleOverrides };
|
|
13291
|
-
|
|
13302
|
+
log7 = logger.createLogger("almadar:ui:markdown-code");
|
|
13292
13303
|
CODE_LANGUAGES = [
|
|
13293
13304
|
"text",
|
|
13294
13305
|
"json",
|
|
@@ -13552,7 +13563,7 @@ var init_CodeBlock = __esm({
|
|
|
13552
13563
|
eventBus.emit("UI:COPY_CODE", { language: activeLanguage, success: true });
|
|
13553
13564
|
setTimeout(() => setCopied(false), 2e3);
|
|
13554
13565
|
} catch (err) {
|
|
13555
|
-
|
|
13566
|
+
log7.error("Failed to copy code", { error: err instanceof Error ? err : String(err) });
|
|
13556
13567
|
eventBus.emit("UI:COPY_CODE", { language: activeLanguage, success: false });
|
|
13557
13568
|
}
|
|
13558
13569
|
};
|
|
@@ -17433,14 +17444,14 @@ function useSafeEventBus2() {
|
|
|
17433
17444
|
} };
|
|
17434
17445
|
}
|
|
17435
17446
|
}
|
|
17436
|
-
var
|
|
17447
|
+
var log8, lookStyles4, ButtonGroup;
|
|
17437
17448
|
var init_ButtonGroup = __esm({
|
|
17438
17449
|
"components/core/molecules/ButtonGroup.tsx"() {
|
|
17439
17450
|
"use client";
|
|
17440
17451
|
init_cn();
|
|
17441
17452
|
init_atoms2();
|
|
17442
17453
|
init_useEventBus();
|
|
17443
|
-
|
|
17454
|
+
log8 = logger.createLogger("almadar:ui:button-group");
|
|
17444
17455
|
lookStyles4 = {
|
|
17445
17456
|
"right-aligned-buttons": "",
|
|
17446
17457
|
"floating-bar": "fixed bottom-section left-1/2 -translate-x-1/2 shadow-elevation-toast bg-card p-card-sm rounded-container",
|
|
@@ -17521,7 +17532,7 @@ var init_ButtonGroup = __esm({
|
|
|
17521
17532
|
{
|
|
17522
17533
|
variant: "ghost",
|
|
17523
17534
|
onClick: () => {
|
|
17524
|
-
|
|
17535
|
+
log8.debug("Filter clicked", { field: filter.field });
|
|
17525
17536
|
},
|
|
17526
17537
|
children: filter.label
|
|
17527
17538
|
},
|
|
@@ -25183,9 +25194,9 @@ function debug(...args) {
|
|
|
25183
25194
|
const [first, ...rest] = args;
|
|
25184
25195
|
const message = typeof first === "string" ? first : "<debug>";
|
|
25185
25196
|
if (rest.length === 0 && typeof first === "string") {
|
|
25186
|
-
|
|
25197
|
+
log9.debug(message);
|
|
25187
25198
|
} else {
|
|
25188
|
-
|
|
25199
|
+
log9.debug(message, { args: rest.length > 0 ? formatArgs(rest) : formatArgs([first]) });
|
|
25189
25200
|
}
|
|
25190
25201
|
}
|
|
25191
25202
|
function debugGroup(label) {
|
|
@@ -25213,11 +25224,11 @@ function toLogMetaValue(v) {
|
|
|
25213
25224
|
}
|
|
25214
25225
|
return String(v);
|
|
25215
25226
|
}
|
|
25216
|
-
var NAMESPACE,
|
|
25227
|
+
var NAMESPACE, log9;
|
|
25217
25228
|
var init_debug = __esm({
|
|
25218
25229
|
"lib/debug.ts"() {
|
|
25219
25230
|
NAMESPACE = "almadar:ui:debug";
|
|
25220
|
-
|
|
25231
|
+
log9 = logger.createLogger(NAMESPACE);
|
|
25221
25232
|
logger.createLogger("almadar:ui:debug:input");
|
|
25222
25233
|
logger.createLogger("almadar:ui:debug:collision");
|
|
25223
25234
|
logger.createLogger("almadar:ui:debug:physics");
|
|
@@ -28628,12 +28639,18 @@ function PlatformerCanvas({
|
|
|
28628
28639
|
camX = Math.max(0, Math.min(px - cw / 2, ww - cw));
|
|
28629
28640
|
camY = Math.max(0, Math.min(py - ch / 2 - 50, wh - ch));
|
|
28630
28641
|
}
|
|
28631
|
-
|
|
28642
|
+
const shouldDiag = plats.length !== lastPlatCountRef.current;
|
|
28643
|
+
if (shouldDiag) {
|
|
28632
28644
|
lastPlatCountRef.current = plats.length;
|
|
28633
28645
|
canvasLog.debug("draw:platforms", {
|
|
28634
28646
|
platformCount: plats.length,
|
|
28635
28647
|
camX,
|
|
28636
28648
|
camY,
|
|
28649
|
+
plat0: JSON.stringify(plats[0]),
|
|
28650
|
+
plat2: JSON.stringify(plats[2]),
|
|
28651
|
+
tSpritesType: tSprites ? tSprites instanceof Map ? "Map" : typeof tSprites : "none",
|
|
28652
|
+
canvasW: canvas.width,
|
|
28653
|
+
canvasH: canvas.height,
|
|
28637
28654
|
player: { x: px, y: py },
|
|
28638
28655
|
worldWidth: ww,
|
|
28639
28656
|
canvasWidth: cw,
|
|
@@ -28674,6 +28691,19 @@ function PlatformerCanvas({
|
|
|
28674
28691
|
const platType = plat.type ?? "ground";
|
|
28675
28692
|
const spriteUrl = tSprites?.[platType];
|
|
28676
28693
|
const tileImg = spriteUrl ? loadImage(spriteUrl) : null;
|
|
28694
|
+
if (shouldDiag) {
|
|
28695
|
+
canvasLog.debug("plat:draw", {
|
|
28696
|
+
platType,
|
|
28697
|
+
platX,
|
|
28698
|
+
platY,
|
|
28699
|
+
w: plat.width,
|
|
28700
|
+
h: plat.height,
|
|
28701
|
+
branch: tileImg ? "tile" : "color",
|
|
28702
|
+
natW: tileImg?.naturalWidth,
|
|
28703
|
+
natH: tileImg?.naturalHeight,
|
|
28704
|
+
spriteUrl: spriteUrl ?? null
|
|
28705
|
+
});
|
|
28706
|
+
}
|
|
28677
28707
|
if (tileImg) {
|
|
28678
28708
|
const tileW = tileImg.naturalWidth;
|
|
28679
28709
|
const tileH = tileImg.naturalHeight;
|
|
@@ -41489,11 +41519,11 @@ var init_Canvas3DErrorBoundary = __esm({
|
|
|
41489
41519
|
"components/game/molecules/three/components/Canvas3DErrorBoundary.css"() {
|
|
41490
41520
|
}
|
|
41491
41521
|
});
|
|
41492
|
-
var
|
|
41522
|
+
var log10, Canvas3DErrorBoundary;
|
|
41493
41523
|
var init_Canvas3DErrorBoundary2 = __esm({
|
|
41494
41524
|
"components/game/molecules/three/components/Canvas3DErrorBoundary.tsx"() {
|
|
41495
41525
|
init_Canvas3DErrorBoundary();
|
|
41496
|
-
|
|
41526
|
+
log10 = logger.createLogger("almadar:ui:game:canvas3d:error-boundary");
|
|
41497
41527
|
Canvas3DErrorBoundary = class extends React81.Component {
|
|
41498
41528
|
constructor(props) {
|
|
41499
41529
|
super(props);
|
|
@@ -41521,8 +41551,8 @@ var init_Canvas3DErrorBoundary2 = __esm({
|
|
|
41521
41551
|
componentDidCatch(error, errorInfo) {
|
|
41522
41552
|
this.setState({ errorInfo });
|
|
41523
41553
|
this.props.onError?.(error, errorInfo);
|
|
41524
|
-
|
|
41525
|
-
|
|
41554
|
+
log10.error("Error caught", { error });
|
|
41555
|
+
log10.error("Component stack", { componentStack: errorInfo.componentStack ?? "<none>" });
|
|
41526
41556
|
}
|
|
41527
41557
|
render() {
|
|
41528
41558
|
if (this.state.hasError) {
|
|
@@ -41585,7 +41615,7 @@ function useGLTFModel(url, resourceBasePath) {
|
|
|
41585
41615
|
setState({ model: null, isLoading: false, error: null });
|
|
41586
41616
|
return;
|
|
41587
41617
|
}
|
|
41588
|
-
|
|
41618
|
+
log11.debug("Loading", { url });
|
|
41589
41619
|
setState((prev) => ({ ...prev, isLoading: true, error: null }));
|
|
41590
41620
|
const assetRoot = resourceBasePath || detectAssetRoot2(url);
|
|
41591
41621
|
const loader = new GLTFLoader.GLTFLoader();
|
|
@@ -41593,7 +41623,7 @@ function useGLTFModel(url, resourceBasePath) {
|
|
|
41593
41623
|
loader.load(
|
|
41594
41624
|
url,
|
|
41595
41625
|
(gltf) => {
|
|
41596
|
-
|
|
41626
|
+
log11.debug("Loaded", { url });
|
|
41597
41627
|
setState({
|
|
41598
41628
|
model: gltf.scene,
|
|
41599
41629
|
isLoading: false,
|
|
@@ -41602,7 +41632,7 @@ function useGLTFModel(url, resourceBasePath) {
|
|
|
41602
41632
|
},
|
|
41603
41633
|
void 0,
|
|
41604
41634
|
(err) => {
|
|
41605
|
-
|
|
41635
|
+
log11.warn("Failed", { url, error: err instanceof Error ? err : String(err) });
|
|
41606
41636
|
setState({
|
|
41607
41637
|
model: null,
|
|
41608
41638
|
isLoading: false,
|
|
@@ -41718,11 +41748,11 @@ function ModelLoader({
|
|
|
41718
41748
|
}
|
|
41719
41749
|
);
|
|
41720
41750
|
}
|
|
41721
|
-
var
|
|
41751
|
+
var log11;
|
|
41722
41752
|
var init_ModelLoader = __esm({
|
|
41723
41753
|
"components/game/molecules/three/components/ModelLoader.tsx"() {
|
|
41724
41754
|
"use client";
|
|
41725
|
-
|
|
41755
|
+
log11 = logger.createLogger("almadar:ui:game:model-loader");
|
|
41726
41756
|
}
|
|
41727
41757
|
});
|
|
41728
41758
|
|
|
@@ -46027,7 +46057,7 @@ function getAllEvents(traits2) {
|
|
|
46027
46057
|
function EventDispatcherTab({ traits: traits2, schema }) {
|
|
46028
46058
|
const eventBus = useEventBus();
|
|
46029
46059
|
const { t } = hooks.useTranslate();
|
|
46030
|
-
const [
|
|
46060
|
+
const [log15, setLog] = React81__namespace.useState([]);
|
|
46031
46061
|
const prevStatesRef = React81__namespace.useRef(/* @__PURE__ */ new Map());
|
|
46032
46062
|
React81__namespace.useEffect(() => {
|
|
46033
46063
|
for (const trait of traits2) {
|
|
@@ -46091,9 +46121,9 @@ function EventDispatcherTab({ traits: traits2, schema }) {
|
|
|
46091
46121
|
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-1", children: t("debug.otherEvents") }),
|
|
46092
46122
|
/* @__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)) })
|
|
46093
46123
|
] }),
|
|
46094
|
-
|
|
46124
|
+
log15.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
46095
46125
|
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-1", children: t("debug.recentTransitions") }),
|
|
46096
|
-
/* @__PURE__ */ jsxRuntime.jsx(Stack, { gap: "xs", children:
|
|
46126
|
+
/* @__PURE__ */ jsxRuntime.jsx(Stack, { gap: "xs", children: log15.map((entry, i) => /* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "small", className: "font-mono text-xs", children: [
|
|
46097
46127
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-purple-400", children: entry.traitName }),
|
|
46098
46128
|
" ",
|
|
46099
46129
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-gray-500", children: entry.from }),
|
|
@@ -50958,7 +50988,7 @@ function isPatternConfig(value) {
|
|
|
50958
50988
|
if (value instanceof Date) return false;
|
|
50959
50989
|
if (typeof value === "function") return false;
|
|
50960
50990
|
const record = value;
|
|
50961
|
-
return "type" in record && typeof record.type === "string";
|
|
50991
|
+
return "type" in record && typeof record.type === "string" && isKnownPattern(record.type);
|
|
50962
50992
|
}
|
|
50963
50993
|
function isPlainConfigObject(value) {
|
|
50964
50994
|
if (React81__namespace.default.isValidElement(value)) return false;
|
|
@@ -51705,7 +51735,7 @@ function useTraitStateMachine(traitBindings, uiSlots, options) {
|
|
|
51705
51735
|
};
|
|
51706
51736
|
}, [traitBindings]);
|
|
51707
51737
|
const executeTransitionEffects = React81.useCallback(async (params) => {
|
|
51708
|
-
const { binding, previousState, newState, payload, flushEvent, syncOnly, log:
|
|
51738
|
+
const { binding, previousState, newState, payload, flushEvent, syncOnly, log: log15 } = params;
|
|
51709
51739
|
const traitName = binding.trait.name;
|
|
51710
51740
|
const linkedEntity = binding.linkedEntity || "";
|
|
51711
51741
|
const entityId = payload?.entityId;
|
|
@@ -51793,7 +51823,7 @@ function useTraitStateMachine(traitBindings, uiSlots, options) {
|
|
|
51793
51823
|
...handlers,
|
|
51794
51824
|
set: async (targetId, field, value) => {
|
|
51795
51825
|
if (baseSet) await baseSet(targetId, field, value);
|
|
51796
|
-
|
|
51826
|
+
log15.debug("set:write", {
|
|
51797
51827
|
traitName,
|
|
51798
51828
|
field,
|
|
51799
51829
|
value: JSON.stringify(value),
|
|
@@ -51833,7 +51863,7 @@ function useTraitStateMachine(traitBindings, uiSlots, options) {
|
|
|
51833
51863
|
const executor = new runtime.EffectExecutor({ handlers: trackingHandlers, bindings: bindingCtx, context: effectContext });
|
|
51834
51864
|
try {
|
|
51835
51865
|
await executor.executeAll(effects);
|
|
51836
|
-
|
|
51866
|
+
log15.debug("effects:executed", () => ({
|
|
51837
51867
|
traitName,
|
|
51838
51868
|
transition: `${previousState}->${newState}`,
|
|
51839
51869
|
event: flushEvent,
|
|
@@ -51843,7 +51873,7 @@ function useTraitStateMachine(traitBindings, uiSlots, options) {
|
|
|
51843
51873
|
slotsTouched: Array.from(pendingSlots.keys()).join(",")
|
|
51844
51874
|
}));
|
|
51845
51875
|
for (const [slot, patterns] of pendingSlots) {
|
|
51846
|
-
|
|
51876
|
+
log15.debug("flush:slot", {
|
|
51847
51877
|
traitName,
|
|
51848
51878
|
slot,
|
|
51849
51879
|
patternCount: patterns.length,
|
|
@@ -51858,7 +51888,7 @@ function useTraitStateMachine(traitBindings, uiSlots, options) {
|
|
|
51858
51888
|
});
|
|
51859
51889
|
}
|
|
51860
51890
|
} catch (error) {
|
|
51861
|
-
|
|
51891
|
+
log15.error("effects:error", {
|
|
51862
51892
|
traitName,
|
|
51863
51893
|
transition: `${previousState}->${newState}`,
|
|
51864
51894
|
event: flushEvent,
|
|
@@ -52330,7 +52360,7 @@ function clearSchemaCache() {
|
|
|
52330
52360
|
|
|
52331
52361
|
// runtime/index.ts
|
|
52332
52362
|
init_EntitySchemaContext();
|
|
52333
|
-
var
|
|
52363
|
+
var log12 = logger.createLogger("almadar:ui:trait-provider");
|
|
52334
52364
|
var TraitContext = React81.createContext(null);
|
|
52335
52365
|
function TraitProvider({
|
|
52336
52366
|
traits: traitBindings,
|
|
@@ -52347,7 +52377,7 @@ function TraitProvider({
|
|
|
52347
52377
|
currentState: stateName,
|
|
52348
52378
|
availableEvents: trait.transitions.filter((t) => t.from === stateName).map((t) => t.event),
|
|
52349
52379
|
dispatch: (eventKey, payload) => {
|
|
52350
|
-
|
|
52380
|
+
log12.debug("Dispatch", () => ({
|
|
52351
52381
|
trait: trait.name,
|
|
52352
52382
|
event: eventKey,
|
|
52353
52383
|
payloadKeys: payload ? Object.keys(payload) : []
|
|
@@ -53097,7 +53127,7 @@ OrbitalThemeProvider.displayName = "OrbitalThemeProvider";
|
|
|
53097
53127
|
init_navigation();
|
|
53098
53128
|
init_verificationRegistry();
|
|
53099
53129
|
var PERF_NAMESPACE = "almadar:perf:canvas";
|
|
53100
|
-
var
|
|
53130
|
+
var log14 = logger.createLogger(PERF_NAMESPACE);
|
|
53101
53131
|
var RING_SIZE = 50;
|
|
53102
53132
|
var ring = [];
|
|
53103
53133
|
var writeIdx = 0;
|
|
@@ -53152,7 +53182,7 @@ function perfEnd(name, startToken, detail) {
|
|
|
53152
53182
|
}
|
|
53153
53183
|
}
|
|
53154
53184
|
push({ name, durationMs, ts: endTs, detail });
|
|
53155
|
-
|
|
53185
|
+
log14.debug(name, () => ({ durationMs, ...detail ?? {} }));
|
|
53156
53186
|
}
|
|
53157
53187
|
function perfTime(name, fn, detail) {
|
|
53158
53188
|
const t = perfStart(name);
|
|
@@ -53170,7 +53200,7 @@ var profilerOnRender = (id, phase, actualDuration, baseDuration, _startTime, com
|
|
|
53170
53200
|
ts: commitTime,
|
|
53171
53201
|
detail: { baseDuration }
|
|
53172
53202
|
});
|
|
53173
|
-
|
|
53203
|
+
log14.debug(`profiler:${id}:${phase}`, () => ({ actualDuration, baseDuration }));
|
|
53174
53204
|
};
|
|
53175
53205
|
function getPerfSnapshot() {
|
|
53176
53206
|
if (ring.length < RING_SIZE) return ring.slice();
|