@almadar/ui 4.44.1 → 4.46.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 +249 -174
- package/dist/avl/index.js +250 -175
- package/dist/components/atoms/index.d.ts +1 -1
- package/dist/components/index.cjs +185 -131
- package/dist/components/index.js +186 -132
- package/dist/components/molecules/game/ResourceBar.d.ts +1 -1
- package/dist/components/organisms/game/three/index.cjs +18 -15
- package/dist/components/organisms/game/three/index.js +18 -15
- 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/context/index.cjs +17 -12
- package/dist/context/index.js +17 -12
- package/dist/docs/index.cjs +2 -2
- package/dist/docs/index.js +2 -2
- package/dist/hooks/index.cjs +52 -40
- package/dist/hooks/index.js +52 -40
- package/dist/lib/debug.d.ts +15 -22
- package/dist/lib/index.cjs +61 -47
- package/dist/lib/index.js +62 -48
- package/dist/marketing/index.cjs +2 -2
- package/dist/marketing/index.js +2 -2
- package/dist/providers/EventBusProvider.d.ts +6 -2
- package/dist/providers/index.cjs +184 -115
- package/dist/providers/index.js +184 -115
- package/dist/renderer/index.cjs +57 -56
- package/dist/renderer/index.js +57 -56
- package/dist/runtime/index.cjs +174 -100
- package/dist/runtime/index.js +175 -101
- package/package.json +3 -3
- /package/dist/components/atoms/{StatCard.d.ts → MarketingStatCard.d.ts} +0 -0
package/dist/providers/index.cjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var React136 = require('react');
|
|
4
|
+
var logger = require('@almadar/logger');
|
|
4
5
|
var jsxRuntime = require('react/jsx-runtime');
|
|
5
6
|
var providers = require('@almadar/ui/providers');
|
|
6
|
-
var logger = require('@almadar/logger');
|
|
7
7
|
var clsx = require('clsx');
|
|
8
8
|
var tailwindMerge = require('tailwind-merge');
|
|
9
9
|
var LucideIcons = require('lucide-react');
|
|
@@ -136,10 +136,11 @@ function useTheme() {
|
|
|
136
136
|
}
|
|
137
137
|
return context;
|
|
138
138
|
}
|
|
139
|
-
var BUILT_IN_THEMES, ThemeContext, THEME_STORAGE_KEY, MODE_STORAGE_KEY, ThemeProvider;
|
|
139
|
+
var log, BUILT_IN_THEMES, ThemeContext, THEME_STORAGE_KEY, MODE_STORAGE_KEY, ThemeProvider;
|
|
140
140
|
var init_ThemeContext = __esm({
|
|
141
141
|
"context/ThemeContext.tsx"() {
|
|
142
142
|
"use client";
|
|
143
|
+
log = logger.createLogger("almadar:ui:theme");
|
|
143
144
|
BUILT_IN_THEMES = [
|
|
144
145
|
{
|
|
145
146
|
name: "wireframe",
|
|
@@ -319,9 +320,10 @@ var init_ThemeContext = __esm({
|
|
|
319
320
|
localStorage.setItem(THEME_STORAGE_KEY, newTheme);
|
|
320
321
|
}
|
|
321
322
|
} else {
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
323
|
+
log.warn("Theme not found", {
|
|
324
|
+
theme: newTheme,
|
|
325
|
+
available: availableThemes.map((t) => t.name)
|
|
326
|
+
});
|
|
325
327
|
}
|
|
326
328
|
},
|
|
327
329
|
[availableThemes]
|
|
@@ -446,11 +448,11 @@ function useEmitEvent() {
|
|
|
446
448
|
[eventBus]
|
|
447
449
|
);
|
|
448
450
|
}
|
|
449
|
-
var
|
|
451
|
+
var log2, subLog, scopeLog, fallbackListeners, fallbackAnyListeners, fallbackEventBus, useEventSubscription, useEventBus_default;
|
|
450
452
|
var init_useEventBus = __esm({
|
|
451
453
|
"hooks/useEventBus.ts"() {
|
|
452
454
|
"use client";
|
|
453
|
-
|
|
455
|
+
log2 = logger.createLogger("almadar:eventbus");
|
|
454
456
|
subLog = logger.createLogger("almadar:eventbus:subscribe");
|
|
455
457
|
scopeLog = logger.createLogger("almadar:ui:trait-scope");
|
|
456
458
|
fallbackListeners = /* @__PURE__ */ new Map();
|
|
@@ -464,13 +466,13 @@ var init_useEventBus = __esm({
|
|
|
464
466
|
source
|
|
465
467
|
};
|
|
466
468
|
const handlers = fallbackListeners.get(type);
|
|
467
|
-
|
|
469
|
+
log2.debug("emit", { type, payloadKeys: payload ? Object.keys(payload).length : 0, listenerCount: (handlers?.size ?? 0) + fallbackAnyListeners.size });
|
|
468
470
|
if (handlers) {
|
|
469
471
|
handlers.forEach((handler) => {
|
|
470
472
|
try {
|
|
471
473
|
handler(event);
|
|
472
474
|
} catch (error) {
|
|
473
|
-
|
|
475
|
+
log2.error("Error in listener", { type, error: error instanceof Error ? error : String(error) });
|
|
474
476
|
}
|
|
475
477
|
});
|
|
476
478
|
}
|
|
@@ -478,7 +480,7 @@ var init_useEventBus = __esm({
|
|
|
478
480
|
try {
|
|
479
481
|
handler(event);
|
|
480
482
|
} catch (error) {
|
|
481
|
-
|
|
483
|
+
log2.error("Error in onAny listener", { type, error: error instanceof Error ? error : String(error) });
|
|
482
484
|
}
|
|
483
485
|
});
|
|
484
486
|
},
|
|
@@ -6055,12 +6057,15 @@ function ControlButton({
|
|
|
6055
6057
|
sizeMap3[size] ?? sizeMap3.md,
|
|
6056
6058
|
shapeMap[shape] ?? shapeMap.circle,
|
|
6057
6059
|
variantMap[variant] ?? variantMap.secondary,
|
|
6058
|
-
actualPressed && "scale-95 brightness-110 border-
|
|
6060
|
+
actualPressed && "scale-95 brightness-110 border-foreground",
|
|
6059
6061
|
disabled && "opacity-50 cursor-not-allowed",
|
|
6060
6062
|
className
|
|
6061
6063
|
),
|
|
6062
6064
|
children: [
|
|
6063
|
-
icon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-2xl", children: icon
|
|
6065
|
+
icon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-2xl", children: typeof icon === "string" ? (() => {
|
|
6066
|
+
const I = resolveIcon(icon);
|
|
6067
|
+
return I ? /* @__PURE__ */ jsxRuntime.jsx(I, { className: "w-6 h-6" }) : null;
|
|
6068
|
+
})() : icon }),
|
|
6064
6069
|
label && !icon && /* @__PURE__ */ jsxRuntime.jsx("span", { children: label })
|
|
6065
6070
|
]
|
|
6066
6071
|
}
|
|
@@ -6072,6 +6077,7 @@ var init_ControlButton = __esm({
|
|
|
6072
6077
|
"use client";
|
|
6073
6078
|
init_cn();
|
|
6074
6079
|
init_useEventBus();
|
|
6080
|
+
init_Icon();
|
|
6075
6081
|
sizeMap3 = {
|
|
6076
6082
|
sm: "w-10 h-10 text-sm",
|
|
6077
6083
|
md: "w-14 h-14 text-base",
|
|
@@ -6084,9 +6090,9 @@ var init_ControlButton = __esm({
|
|
|
6084
6090
|
square: "rounded-md"
|
|
6085
6091
|
};
|
|
6086
6092
|
variantMap = {
|
|
6087
|
-
primary: "bg-
|
|
6088
|
-
secondary: "bg-
|
|
6089
|
-
ghost: "bg-transparent text-
|
|
6093
|
+
primary: "bg-primary text-primary-foreground border-primary hover:bg-primary-hover",
|
|
6094
|
+
secondary: "bg-secondary text-secondary-foreground border-border hover:bg-secondary-hover",
|
|
6095
|
+
ghost: "bg-transparent text-foreground border-border hover:bg-muted"
|
|
6090
6096
|
};
|
|
6091
6097
|
ControlButton.displayName = "ControlButton";
|
|
6092
6098
|
}
|
|
@@ -6814,8 +6820,8 @@ function ChoiceButton({
|
|
|
6814
6820
|
className: cn(
|
|
6815
6821
|
"w-full text-left px-4 py-2.5 rounded-md border transition-all duration-150",
|
|
6816
6822
|
"flex items-center gap-2",
|
|
6817
|
-
selected ? "bg-
|
|
6818
|
-
disabled && "opacity-40 cursor-not-allowed hover:bg-
|
|
6823
|
+
selected ? "bg-accent/15 border-accent text-foreground" : "bg-muted/40 border-border text-foreground hover:bg-muted hover:border-border",
|
|
6824
|
+
disabled && "opacity-40 cursor-not-allowed hover:bg-muted/40 hover:border-border",
|
|
6819
6825
|
className
|
|
6820
6826
|
),
|
|
6821
6827
|
children: [
|
|
@@ -6824,7 +6830,7 @@ function ChoiceButton({
|
|
|
6824
6830
|
{
|
|
6825
6831
|
className: cn(
|
|
6826
6832
|
"flex-shrink-0 font-mono font-bold text-sm",
|
|
6827
|
-
selected ? "text-
|
|
6833
|
+
selected ? "text-accent" : "text-muted-foreground"
|
|
6828
6834
|
),
|
|
6829
6835
|
children: [
|
|
6830
6836
|
index,
|
|
@@ -6865,7 +6871,7 @@ function ActionButton({
|
|
|
6865
6871
|
disabled: isDisabled,
|
|
6866
6872
|
onClick,
|
|
6867
6873
|
className: cn(
|
|
6868
|
-
"relative inline-flex items-center gap-1.5 rounded-md border font-medium
|
|
6874
|
+
"relative inline-flex items-center gap-1.5 rounded-md border font-medium overflow-hidden transition-colors duration-150",
|
|
6869
6875
|
sizes.button,
|
|
6870
6876
|
variantStyles8[variant],
|
|
6871
6877
|
isDisabled && "opacity-60 cursor-not-allowed",
|
|
@@ -6875,7 +6881,7 @@ function ActionButton({
|
|
|
6875
6881
|
onCooldown && /* @__PURE__ */ jsxRuntime.jsx(
|
|
6876
6882
|
"div",
|
|
6877
6883
|
{
|
|
6878
|
-
className: "absolute inset-0 bg-
|
|
6884
|
+
className: "absolute inset-0 bg-foreground/40 pointer-events-none",
|
|
6879
6885
|
style: {
|
|
6880
6886
|
clipPath: `conic-gradient(from 0deg, transparent ${360 - cooldownDeg}deg, black ${360 - cooldownDeg}deg)`,
|
|
6881
6887
|
WebkitClipPath: `conic-gradient(from 0deg, transparent ${360 - cooldownDeg}deg, black ${360 - cooldownDeg}deg)`,
|
|
@@ -6883,13 +6889,16 @@ function ActionButton({
|
|
|
6883
6889
|
}
|
|
6884
6890
|
}
|
|
6885
6891
|
),
|
|
6886
|
-
icon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("flex-shrink-0", sizes.icon), children: icon
|
|
6892
|
+
icon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("flex-shrink-0", sizes.icon), children: typeof icon === "string" ? (() => {
|
|
6893
|
+
const I = resolveIcon(icon);
|
|
6894
|
+
return I ? /* @__PURE__ */ jsxRuntime.jsx(I, { className: "w-4 h-4" }) : null;
|
|
6895
|
+
})() : icon }),
|
|
6887
6896
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "relative z-10", children: label }),
|
|
6888
6897
|
hotkey && /* @__PURE__ */ jsxRuntime.jsx(
|
|
6889
6898
|
"span",
|
|
6890
6899
|
{
|
|
6891
6900
|
className: cn(
|
|
6892
|
-
"absolute top-0.5 right-0.5 bg-
|
|
6901
|
+
"absolute top-0.5 right-0.5 bg-foreground/30 text-primary-foreground rounded font-mono leading-tight",
|
|
6893
6902
|
sizes.hotkey
|
|
6894
6903
|
),
|
|
6895
6904
|
children: hotkey
|
|
@@ -6903,15 +6912,16 @@ var sizeMap13, variantStyles8;
|
|
|
6903
6912
|
var init_ActionButton = __esm({
|
|
6904
6913
|
"components/atoms/game/ActionButton.tsx"() {
|
|
6905
6914
|
init_cn();
|
|
6915
|
+
init_Icon();
|
|
6906
6916
|
sizeMap13 = {
|
|
6907
6917
|
sm: { button: "px-3 py-1.5 text-xs", hotkey: "text-[9px] px-1", icon: "text-xs" },
|
|
6908
6918
|
md: { button: "px-4 py-2 text-sm", hotkey: "text-[10px] px-1.5", icon: "text-sm" },
|
|
6909
6919
|
lg: { button: "px-5 py-2.5 text-base", hotkey: "text-xs px-2", icon: "text-base" }
|
|
6910
6920
|
};
|
|
6911
6921
|
variantStyles8 = {
|
|
6912
|
-
primary: "bg-
|
|
6913
|
-
secondary: "bg-
|
|
6914
|
-
danger: "bg-
|
|
6922
|
+
primary: "bg-primary text-primary-foreground hover:bg-primary-hover border-primary",
|
|
6923
|
+
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary-hover border-border",
|
|
6924
|
+
danger: "bg-error text-error-foreground hover:bg-error/90 border-error"
|
|
6915
6925
|
};
|
|
6916
6926
|
ActionButton.displayName = "ActionButton";
|
|
6917
6927
|
}
|
|
@@ -7384,8 +7394,6 @@ var init_Skeleton = __esm({
|
|
|
7384
7394
|
Skeleton.displayName = "Skeleton";
|
|
7385
7395
|
}
|
|
7386
7396
|
});
|
|
7387
|
-
|
|
7388
|
-
// renderer/client-effect-executor.ts
|
|
7389
7397
|
function executeClientEffects(effects, config) {
|
|
7390
7398
|
if (!effects || effects.length === 0) {
|
|
7391
7399
|
return;
|
|
@@ -7394,11 +7402,10 @@ function executeClientEffects(effects, config) {
|
|
|
7394
7402
|
try {
|
|
7395
7403
|
executeEffect(effect, config);
|
|
7396
7404
|
} catch (error) {
|
|
7397
|
-
|
|
7398
|
-
|
|
7399
|
-
|
|
7400
|
-
|
|
7401
|
-
);
|
|
7405
|
+
log4.error("Error executing effect", () => ({
|
|
7406
|
+
effect: JSON.stringify(effect),
|
|
7407
|
+
error: error instanceof Error ? error : String(error)
|
|
7408
|
+
}));
|
|
7402
7409
|
}
|
|
7403
7410
|
}
|
|
7404
7411
|
config.onComplete?.();
|
|
@@ -7427,7 +7434,7 @@ function executeEffect(effect, config) {
|
|
|
7427
7434
|
break;
|
|
7428
7435
|
}
|
|
7429
7436
|
default:
|
|
7430
|
-
|
|
7437
|
+
log4.warn("Unknown effect type", { effectType: String(effectType) });
|
|
7431
7438
|
}
|
|
7432
7439
|
}
|
|
7433
7440
|
function executeRenderUI(slot, patternConfig, config) {
|
|
@@ -7442,8 +7449,10 @@ function executeNotify(message, options, config) {
|
|
|
7442
7449
|
function executeEmit(event, payload, config) {
|
|
7443
7450
|
config.eventBus.emit(event, payload);
|
|
7444
7451
|
}
|
|
7452
|
+
var log4;
|
|
7445
7453
|
var init_client_effect_executor = __esm({
|
|
7446
7454
|
"renderer/client-effect-executor.ts"() {
|
|
7455
|
+
log4 = logger.createLogger("almadar:ui:effects:client");
|
|
7447
7456
|
}
|
|
7448
7457
|
});
|
|
7449
7458
|
|
|
@@ -7604,11 +7613,12 @@ function useOfflineExecutor(options) {
|
|
|
7604
7613
|
clearQueue
|
|
7605
7614
|
};
|
|
7606
7615
|
}
|
|
7607
|
-
var effectIdCounter, OfflineExecutor;
|
|
7616
|
+
var log5, effectIdCounter, OfflineExecutor;
|
|
7608
7617
|
var init_offline_executor = __esm({
|
|
7609
7618
|
"renderer/offline-executor.ts"() {
|
|
7610
7619
|
"use client";
|
|
7611
7620
|
init_client_effect_executor();
|
|
7621
|
+
log5 = logger.createLogger("almadar:ui:effects:offline");
|
|
7612
7622
|
effectIdCounter = 0;
|
|
7613
7623
|
OfflineExecutor = class {
|
|
7614
7624
|
constructor(config) {
|
|
@@ -7662,7 +7672,7 @@ var init_offline_executor = __esm({
|
|
|
7662
7672
|
this.state.syncQueue = JSON.parse(stored);
|
|
7663
7673
|
}
|
|
7664
7674
|
} catch (error) {
|
|
7665
|
-
|
|
7675
|
+
log5.warn("Failed to load sync queue", { error: error instanceof Error ? error : String(error) });
|
|
7666
7676
|
}
|
|
7667
7677
|
}
|
|
7668
7678
|
/**
|
|
@@ -7673,7 +7683,7 @@ var init_offline_executor = __esm({
|
|
|
7673
7683
|
try {
|
|
7674
7684
|
this.storage.setItem("orbital-offline-queue", JSON.stringify(this.state.syncQueue));
|
|
7675
7685
|
} catch (error) {
|
|
7676
|
-
|
|
7686
|
+
log5.warn("Failed to save sync queue", { error: error instanceof Error ? error : String(error) });
|
|
7677
7687
|
}
|
|
7678
7688
|
}
|
|
7679
7689
|
/**
|
|
@@ -7743,7 +7753,7 @@ var init_offline_executor = __esm({
|
|
|
7743
7753
|
this.queueForSync(type, { args, event, payload });
|
|
7744
7754
|
break;
|
|
7745
7755
|
default:
|
|
7746
|
-
|
|
7756
|
+
log5.warn("Unknown effect type", { type });
|
|
7747
7757
|
}
|
|
7748
7758
|
}
|
|
7749
7759
|
}
|
|
@@ -10318,7 +10328,7 @@ function recordTransition(trace) {
|
|
|
10318
10328
|
...trace,
|
|
10319
10329
|
id: `t-${Date.now()}-${Math.random().toString(36).slice(2, 9)}`
|
|
10320
10330
|
};
|
|
10321
|
-
|
|
10331
|
+
log6.debug("transition:recorded", { trait: trace.traitName, from: trace.from, to: trace.to, event: trace.event, effectCount: trace.effects.length });
|
|
10322
10332
|
getState().transitions.push(entry);
|
|
10323
10333
|
if (getState().transitions.length > MAX_TRANSITIONS) {
|
|
10324
10334
|
getState().transitions.shift();
|
|
@@ -10387,7 +10397,7 @@ function getTraitSnapshots() {
|
|
|
10387
10397
|
try {
|
|
10388
10398
|
snapshots.push(getter());
|
|
10389
10399
|
} catch (err) {
|
|
10390
|
-
|
|
10400
|
+
log6.error("traitSnapshot getter failed", { trait: traitName, err: String(err) });
|
|
10391
10401
|
}
|
|
10392
10402
|
}
|
|
10393
10403
|
return snapshots;
|
|
@@ -10435,12 +10445,12 @@ function waitForTransition(event, timeoutMs = 1e4) {
|
|
|
10435
10445
|
}
|
|
10436
10446
|
function bindEventBus(eventBus) {
|
|
10437
10447
|
if (typeof window === "undefined") return;
|
|
10438
|
-
|
|
10448
|
+
log6.info("bindEventBus", { hasOnAny: !!eventBus.onAny });
|
|
10439
10449
|
exposeOnWindow();
|
|
10440
10450
|
if (window.__orbitalVerification) {
|
|
10441
10451
|
window.__orbitalVerification.sendEvent = (event, payload, traitScope) => {
|
|
10442
10452
|
const prefixed = event.startsWith("UI:") ? event : traitScope ? `UI:${traitScope}.${event}` : `UI:${event}`;
|
|
10443
|
-
|
|
10453
|
+
log6.debug("sendEvent", { event: prefixed, traitScope, payloadKeys: payload ? Object.keys(payload) : [] });
|
|
10444
10454
|
eventBus.emit(prefixed, payload);
|
|
10445
10455
|
};
|
|
10446
10456
|
const eventLog = [];
|
|
@@ -10489,10 +10499,10 @@ function updateAssetStatus(url, status) {
|
|
|
10489
10499
|
window.__orbitalVerification.assetStatus[url] = status;
|
|
10490
10500
|
}
|
|
10491
10501
|
}
|
|
10492
|
-
var
|
|
10502
|
+
var log6, MAX_TRANSITIONS;
|
|
10493
10503
|
var init_verificationRegistry = __esm({
|
|
10494
10504
|
"lib/verificationRegistry.ts"() {
|
|
10495
|
-
|
|
10505
|
+
log6 = logger.createLogger("almadar:bridge");
|
|
10496
10506
|
MAX_TRANSITIONS = 500;
|
|
10497
10507
|
exposeOnWindow();
|
|
10498
10508
|
}
|
|
@@ -12520,7 +12530,7 @@ var init_avl_elk_layout = __esm({
|
|
|
12520
12530
|
elk = new ELK__default.default();
|
|
12521
12531
|
}
|
|
12522
12532
|
});
|
|
12523
|
-
var SWIM_GUTTER, CENTER_W, BehaviorView;
|
|
12533
|
+
var log7, SWIM_GUTTER, CENTER_W, BehaviorView;
|
|
12524
12534
|
var init_BehaviorView = __esm({
|
|
12525
12535
|
"components/molecules/avl/BehaviorView.tsx"() {
|
|
12526
12536
|
"use client";
|
|
@@ -12529,6 +12539,7 @@ var init_BehaviorView = __esm({
|
|
|
12529
12539
|
init_AvlSwimLane();
|
|
12530
12540
|
init_types();
|
|
12531
12541
|
init_avl_elk_layout();
|
|
12542
|
+
log7 = logger.createLogger("almadar:ui:avl:behavior-view");
|
|
12532
12543
|
SWIM_GUTTER = 120;
|
|
12533
12544
|
CENTER_W = 360;
|
|
12534
12545
|
BehaviorView = ({ data }) => {
|
|
@@ -12538,7 +12549,7 @@ var init_BehaviorView = __esm({
|
|
|
12538
12549
|
const dataKey = React136.useMemo(() => JSON.stringify(traitData), [traitData]);
|
|
12539
12550
|
React136.useEffect(() => {
|
|
12540
12551
|
if (!traitData) return;
|
|
12541
|
-
computeTraitLayout(traitData).then(setLayout).catch(
|
|
12552
|
+
computeTraitLayout(traitData).then(setLayout).catch((err) => log7.error("compute-trait-layout-failed", { error: err instanceof Error ? err : String(err) }));
|
|
12542
12553
|
}, [dataKey]);
|
|
12543
12554
|
if (!traitData) {
|
|
12544
12555
|
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: "No trait data" });
|
|
@@ -12883,7 +12894,7 @@ function computeFoldRegions(code) {
|
|
|
12883
12894
|
}
|
|
12884
12895
|
return regions.sort((a, b) => a.start - b.start);
|
|
12885
12896
|
}
|
|
12886
|
-
var orbStyleOverrides, orbStyle, loloStyleOverrides, loloStyle, LINE_PROPS_FN, HIDDEN_LINE_NUMBERS, CodeBlock;
|
|
12897
|
+
var orbStyleOverrides, orbStyle, loloStyleOverrides, loloStyle, log8, LINE_PROPS_FN, HIDDEN_LINE_NUMBERS, CodeBlock;
|
|
12887
12898
|
var init_CodeBlock = __esm({
|
|
12888
12899
|
"components/molecules/markdown/CodeBlock.tsx"() {
|
|
12889
12900
|
init_Box();
|
|
@@ -12960,6 +12971,7 @@ var init_CodeBlock = __esm({
|
|
|
12960
12971
|
"lolo-op-async": { color: syntax.ORB_COLORS.dark.async }
|
|
12961
12972
|
};
|
|
12962
12973
|
loloStyle = { ...dark__default.default, ...loloStyleOverrides };
|
|
12974
|
+
log8 = logger.createLogger("almadar:ui:markdown-code");
|
|
12963
12975
|
LINE_PROPS_FN = (n) => ({ "data-line": String(n - 1) });
|
|
12964
12976
|
HIDDEN_LINE_NUMBERS = { display: "none" };
|
|
12965
12977
|
CodeBlock = React136__namespace.default.memo(
|
|
@@ -13158,7 +13170,7 @@ var init_CodeBlock = __esm({
|
|
|
13158
13170
|
eventBus.emit("UI:COPY_CODE", { language, success: true });
|
|
13159
13171
|
setTimeout(() => setCopied(false), 2e3);
|
|
13160
13172
|
} catch (err) {
|
|
13161
|
-
|
|
13173
|
+
log8.error("Failed to copy code", { error: err instanceof Error ? err : String(err) });
|
|
13162
13174
|
eventBus.emit("UI:COPY_CODE", { language, success: false });
|
|
13163
13175
|
}
|
|
13164
13176
|
};
|
|
@@ -16720,13 +16732,14 @@ function useSafeEventBus2() {
|
|
|
16720
16732
|
} };
|
|
16721
16733
|
}
|
|
16722
16734
|
}
|
|
16723
|
-
var ButtonGroup;
|
|
16735
|
+
var log9, ButtonGroup;
|
|
16724
16736
|
var init_ButtonGroup = __esm({
|
|
16725
16737
|
"components/molecules/ButtonGroup.tsx"() {
|
|
16726
16738
|
"use client";
|
|
16727
16739
|
init_cn();
|
|
16728
16740
|
init_atoms();
|
|
16729
16741
|
init_useEventBus();
|
|
16742
|
+
log9 = logger.createLogger("almadar:ui:button-group");
|
|
16730
16743
|
ButtonGroup = ({
|
|
16731
16744
|
children,
|
|
16732
16745
|
primary,
|
|
@@ -16799,7 +16812,7 @@ var init_ButtonGroup = __esm({
|
|
|
16799
16812
|
{
|
|
16800
16813
|
variant: "ghost",
|
|
16801
16814
|
onClick: () => {
|
|
16802
|
-
|
|
16815
|
+
log9.debug("Filter clicked", { field: filter.field });
|
|
16803
16816
|
},
|
|
16804
16817
|
children: filter.label
|
|
16805
16818
|
},
|
|
@@ -21560,7 +21573,7 @@ function DataGrid({
|
|
|
21560
21573
|
onClick: handleActionClick(action, itemData),
|
|
21561
21574
|
"data-testid": `action-${action.event}`,
|
|
21562
21575
|
"data-row-id": String(itemData.id),
|
|
21563
|
-
className: "text-error hover:bg-error/10 px-2",
|
|
21576
|
+
className: "text-error hover:text-error hover:bg-error/10 px-2",
|
|
21564
21577
|
children: [
|
|
21565
21578
|
action.icon && /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: action.icon, size: "xs" }),
|
|
21566
21579
|
action.label
|
|
@@ -22816,31 +22829,56 @@ var init_InputGroup = __esm({
|
|
|
22816
22829
|
InputGroup.displayName = "InputGroup";
|
|
22817
22830
|
}
|
|
22818
22831
|
});
|
|
22819
|
-
|
|
22820
|
-
|
|
22832
|
+
function gateEnabled(level, ns = NAMESPACE) {
|
|
22833
|
+
return logger.isLogLevelEnabled(level, ns);
|
|
22834
|
+
}
|
|
22821
22835
|
function isDebugEnabled() {
|
|
22822
|
-
|
|
22823
|
-
return typeof window !== "undefined" && window.__ALMADAR_DEBUG_VERIFY__ === true;
|
|
22836
|
+
return gateEnabled("DEBUG");
|
|
22824
22837
|
}
|
|
22825
22838
|
function debug(...args) {
|
|
22826
|
-
if (
|
|
22827
|
-
|
|
22839
|
+
if (!gateEnabled("DEBUG")) return;
|
|
22840
|
+
const [first, ...rest] = args;
|
|
22841
|
+
const message = typeof first === "string" ? first : "<debug>";
|
|
22842
|
+
if (rest.length === 0 && typeof first === "string") {
|
|
22843
|
+
log10.debug(message);
|
|
22844
|
+
} else {
|
|
22845
|
+
log10.debug(message, { args: rest.length > 0 ? formatArgs(rest) : formatArgs([first]) });
|
|
22828
22846
|
}
|
|
22829
22847
|
}
|
|
22830
22848
|
function debugGroup(label) {
|
|
22831
|
-
if (
|
|
22832
|
-
console.group(`[DEBUG] ${label}`);
|
|
22833
|
-
}
|
|
22849
|
+
if (gateEnabled("DEBUG")) console.group(`[${NAMESPACE}] ${label}`);
|
|
22834
22850
|
}
|
|
22835
22851
|
function debugGroupEnd() {
|
|
22836
|
-
if (
|
|
22837
|
-
|
|
22852
|
+
if (gateEnabled("DEBUG")) console.groupEnd();
|
|
22853
|
+
}
|
|
22854
|
+
function formatArgs(values) {
|
|
22855
|
+
if (values.length === 1) return toLogMetaValue(values[0]);
|
|
22856
|
+
return values.map(toLogMetaValue);
|
|
22857
|
+
}
|
|
22858
|
+
function toLogMetaValue(v) {
|
|
22859
|
+
if (v === null || v === void 0) return v;
|
|
22860
|
+
if (v instanceof Error) return v;
|
|
22861
|
+
const t = typeof v;
|
|
22862
|
+
if (t === "string" || t === "number" || t === "boolean") return v;
|
|
22863
|
+
if (Array.isArray(v)) return v.map(toLogMetaValue);
|
|
22864
|
+
if (t === "object") {
|
|
22865
|
+
const out = {};
|
|
22866
|
+
for (const [k, val] of Object.entries(v)) {
|
|
22867
|
+
out[k] = toLogMetaValue(val);
|
|
22868
|
+
}
|
|
22869
|
+
return out;
|
|
22838
22870
|
}
|
|
22871
|
+
return String(v);
|
|
22839
22872
|
}
|
|
22840
|
-
var
|
|
22873
|
+
var NAMESPACE, log10;
|
|
22841
22874
|
var init_debug = __esm({
|
|
22842
22875
|
"lib/debug.ts"() {
|
|
22843
|
-
|
|
22876
|
+
NAMESPACE = "almadar:ui:debug";
|
|
22877
|
+
log10 = logger.createLogger(NAMESPACE);
|
|
22878
|
+
logger.createLogger("almadar:ui:debug:input");
|
|
22879
|
+
logger.createLogger("almadar:ui:debug:collision");
|
|
22880
|
+
logger.createLogger("almadar:ui:debug:physics");
|
|
22881
|
+
logger.createLogger("almadar:ui:debug:game-state");
|
|
22844
22882
|
}
|
|
22845
22883
|
});
|
|
22846
22884
|
var isRelationsDebugEnabled, RelationSelect;
|
|
@@ -24128,7 +24166,7 @@ function StatBadge({
|
|
|
24128
24166
|
const I = resolveIcon(icon);
|
|
24129
24167
|
return I ? /* @__PURE__ */ jsxRuntime.jsx(I, { className: "w-4 h-4" }) : icon;
|
|
24130
24168
|
})() : icon }),
|
|
24131
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-
|
|
24169
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground font-medium", children: label }),
|
|
24132
24170
|
format === "hearts" && max && /* @__PURE__ */ jsxRuntime.jsx(
|
|
24133
24171
|
HealthBar,
|
|
24134
24172
|
{
|
|
@@ -24155,7 +24193,7 @@ function StatBadge({
|
|
|
24155
24193
|
animated: true
|
|
24156
24194
|
}
|
|
24157
24195
|
),
|
|
24158
|
-
format === "text" && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-bold text-
|
|
24196
|
+
format === "text" && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-bold text-foreground", children: value })
|
|
24159
24197
|
]
|
|
24160
24198
|
}
|
|
24161
24199
|
);
|
|
@@ -24173,11 +24211,11 @@ var init_StatBadge = __esm({
|
|
|
24173
24211
|
lg: "text-base px-4 py-2"
|
|
24174
24212
|
};
|
|
24175
24213
|
variantMap2 = {
|
|
24176
|
-
default: "bg-
|
|
24177
|
-
primary: "bg-
|
|
24178
|
-
success: "bg-
|
|
24179
|
-
warning: "bg-
|
|
24180
|
-
danger: "bg-
|
|
24214
|
+
default: "bg-card/80 border-border text-foreground",
|
|
24215
|
+
primary: "bg-primary/15 border-primary/40 text-foreground",
|
|
24216
|
+
success: "bg-success/15 border-success/40 text-foreground",
|
|
24217
|
+
warning: "bg-warning/15 border-warning/40 text-foreground",
|
|
24218
|
+
danger: "bg-error/15 border-error/40 text-foreground"
|
|
24181
24219
|
};
|
|
24182
24220
|
StatBadge.displayName = "StatBadge";
|
|
24183
24221
|
}
|
|
@@ -36750,9 +36788,45 @@ var init_List = __esm({
|
|
|
36750
36788
|
List3.displayName = "List";
|
|
36751
36789
|
}
|
|
36752
36790
|
});
|
|
36753
|
-
|
|
36791
|
+
function MasterDetail({
|
|
36792
|
+
entity,
|
|
36793
|
+
masterFields,
|
|
36794
|
+
detailFields: _detailFields,
|
|
36795
|
+
// Captured but not used here - detail handled separately
|
|
36796
|
+
loading: externalLoading,
|
|
36797
|
+
isLoading: externalIsLoading,
|
|
36798
|
+
error: externalError,
|
|
36799
|
+
className,
|
|
36800
|
+
...rest
|
|
36801
|
+
}) {
|
|
36802
|
+
const loading = externalLoading ?? false;
|
|
36803
|
+
const isLoading = externalIsLoading ?? false;
|
|
36804
|
+
const error = externalError ?? null;
|
|
36805
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
36806
|
+
DataTable,
|
|
36807
|
+
{
|
|
36808
|
+
fields: masterFields,
|
|
36809
|
+
columns: masterFields,
|
|
36810
|
+
entity,
|
|
36811
|
+
isLoading: loading || isLoading,
|
|
36812
|
+
error,
|
|
36813
|
+
className,
|
|
36814
|
+
emptyTitle: "No items found",
|
|
36815
|
+
emptyDescription: "Create your first item to get started.",
|
|
36816
|
+
...rest
|
|
36817
|
+
}
|
|
36818
|
+
);
|
|
36819
|
+
}
|
|
36754
36820
|
var init_MasterDetail = __esm({
|
|
36755
|
-
"components/organisms/
|
|
36821
|
+
"components/organisms/MasterDetail.tsx"() {
|
|
36822
|
+
"use client";
|
|
36823
|
+
init_DataTable();
|
|
36824
|
+
MasterDetail.displayName = "MasterDetail";
|
|
36825
|
+
}
|
|
36826
|
+
});
|
|
36827
|
+
var DefaultEmptyDetail, MasterDetailLayout;
|
|
36828
|
+
var init_MasterDetailLayout = __esm({
|
|
36829
|
+
"components/organisms/layout/MasterDetailLayout.tsx"() {
|
|
36756
36830
|
init_cn();
|
|
36757
36831
|
init_Typography();
|
|
36758
36832
|
DefaultEmptyDetail = () => /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center justify-center h-full border-2 border-dashed border-border", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -36763,7 +36837,7 @@ var init_MasterDetail = __esm({
|
|
|
36763
36837
|
children: "Select an item to view details"
|
|
36764
36838
|
}
|
|
36765
36839
|
) });
|
|
36766
|
-
|
|
36840
|
+
MasterDetailLayout = ({
|
|
36767
36841
|
master,
|
|
36768
36842
|
detail,
|
|
36769
36843
|
emptyDetail,
|
|
@@ -36798,7 +36872,7 @@ var init_MasterDetail = __esm({
|
|
|
36798
36872
|
}
|
|
36799
36873
|
);
|
|
36800
36874
|
};
|
|
36801
|
-
|
|
36875
|
+
MasterDetailLayout.displayName = "MasterDetailLayout";
|
|
36802
36876
|
}
|
|
36803
36877
|
});
|
|
36804
36878
|
var COLUMN_CLASSES, ASPECT_CLASSES, MediaGallery;
|
|
@@ -39197,7 +39271,7 @@ function getAllEvents(traits2) {
|
|
|
39197
39271
|
}
|
|
39198
39272
|
function EventDispatcherTab({ traits: traits2, schema }) {
|
|
39199
39273
|
const eventBus = useEventBus();
|
|
39200
|
-
const [
|
|
39274
|
+
const [log12, setLog] = React136__namespace.useState([]);
|
|
39201
39275
|
const prevStatesRef = React136__namespace.useRef(/* @__PURE__ */ new Map());
|
|
39202
39276
|
React136__namespace.useEffect(() => {
|
|
39203
39277
|
for (const trait of traits2) {
|
|
@@ -39261,9 +39335,9 @@ function EventDispatcherTab({ traits: traits2, schema }) {
|
|
|
39261
39335
|
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-1", children: "Other Events (not available from current state)" }),
|
|
39262
39336
|
/* @__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)) })
|
|
39263
39337
|
] }),
|
|
39264
|
-
|
|
39338
|
+
log12.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
39265
39339
|
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-1", children: "Recent Transitions" }),
|
|
39266
|
-
/* @__PURE__ */ jsxRuntime.jsx(Stack, { gap: "xs", children:
|
|
39340
|
+
/* @__PURE__ */ jsxRuntime.jsx(Stack, { gap: "xs", children: log12.map((entry, i) => /* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "small", className: "font-mono text-xs", children: [
|
|
39267
39341
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-purple-400", children: entry.traitName }),
|
|
39268
39342
|
" ",
|
|
39269
39343
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-gray-500", children: entry.from }),
|
|
@@ -43534,6 +43608,7 @@ var init_component_registry_generated = __esm({
|
|
|
43534
43608
|
init_LoadingState();
|
|
43535
43609
|
init_MarkdownContent();
|
|
43536
43610
|
init_MasterDetail();
|
|
43611
|
+
init_MasterDetailLayout();
|
|
43537
43612
|
init_MatrixQuestion();
|
|
43538
43613
|
init_MediaGallery();
|
|
43539
43614
|
init_Meter();
|
|
@@ -43828,6 +43903,7 @@ var init_component_registry_generated = __esm({
|
|
|
43828
43903
|
"MapViewPattern": MapViewPattern,
|
|
43829
43904
|
"MarkdownContent": MarkdownContent,
|
|
43830
43905
|
"MasterDetail": MasterDetail,
|
|
43906
|
+
"MasterDetailLayout": MasterDetailLayout,
|
|
43831
43907
|
"MatrixQuestion": MatrixQuestion,
|
|
43832
43908
|
"MediaGallery": MediaGallery,
|
|
43833
43909
|
"Menu": MenuPattern,
|
|
@@ -44836,24 +44912,24 @@ function captureSubscriberTag(listener) {
|
|
|
44836
44912
|
}
|
|
44837
44913
|
return "unknown";
|
|
44838
44914
|
}
|
|
44839
|
-
function EventBusProvider({ children
|
|
44915
|
+
function EventBusProvider({ children }) {
|
|
44840
44916
|
const listenersRef = React136.useRef(/* @__PURE__ */ new Map());
|
|
44841
44917
|
const anyListenersRef = React136.useRef(/* @__PURE__ */ new Set());
|
|
44842
44918
|
const deprecationWarningShown = React136.useRef(false);
|
|
44843
44919
|
const getSelectedEntity = React136.useCallback(() => {
|
|
44844
44920
|
if (!deprecationWarningShown.current) {
|
|
44845
|
-
|
|
44846
|
-
"
|
|
44847
|
-
);
|
|
44921
|
+
busLog.warn("deprecated:getSelectedEntity", {
|
|
44922
|
+
migration: "Use SelectionProvider and useSelection hook instead. See SelectionProvider.tsx for migration guide."
|
|
44923
|
+
});
|
|
44848
44924
|
deprecationWarningShown.current = true;
|
|
44849
44925
|
}
|
|
44850
44926
|
return null;
|
|
44851
44927
|
}, []);
|
|
44852
44928
|
const clearSelectedEntity = React136.useCallback(() => {
|
|
44853
44929
|
if (!deprecationWarningShown.current) {
|
|
44854
|
-
|
|
44855
|
-
"
|
|
44856
|
-
);
|
|
44930
|
+
busLog.warn("deprecated:clearSelectedEntity", {
|
|
44931
|
+
migration: "Use SelectionProvider and useSelection hook instead. See SelectionProvider.tsx for migration guide."
|
|
44932
|
+
});
|
|
44857
44933
|
deprecationWarningShown.current = true;
|
|
44858
44934
|
}
|
|
44859
44935
|
}, []);
|
|
@@ -44867,12 +44943,8 @@ function EventBusProvider({ children, debug: debug2 = false }) {
|
|
|
44867
44943
|
const listeners6 = listenersRef.current.get(type);
|
|
44868
44944
|
const listenerCount = (listeners6?.size ?? 0) + anyListenersRef.current.size;
|
|
44869
44945
|
busLog.debug("emit", { type, payloadKeys: payload ? Object.keys(payload).length : 0, listenerCount });
|
|
44870
|
-
if (
|
|
44871
|
-
|
|
44872
|
-
console.log(`[EventBus] Emit: ${type} \u2192 ${listenerCount} listener(s)`, payload);
|
|
44873
|
-
} else {
|
|
44874
|
-
console.warn(`[EventBus] Emit: ${type} (NO LISTENERS - event may be lost!)`, payload);
|
|
44875
|
-
}
|
|
44946
|
+
if (listenerCount === 0) {
|
|
44947
|
+
busLog.warn("emit:no-listeners", { type });
|
|
44876
44948
|
}
|
|
44877
44949
|
if (listeners6) {
|
|
44878
44950
|
const listenersCopy = Array.from(listeners6);
|
|
@@ -44887,7 +44959,7 @@ function EventBusProvider({ children, debug: debug2 = false }) {
|
|
|
44887
44959
|
try {
|
|
44888
44960
|
listener(event);
|
|
44889
44961
|
} catch (error) {
|
|
44890
|
-
|
|
44962
|
+
busLog.error("listener-threw", { type, error: error instanceof Error ? error : String(error) });
|
|
44891
44963
|
}
|
|
44892
44964
|
}
|
|
44893
44965
|
}
|
|
@@ -44903,10 +44975,10 @@ function EventBusProvider({ children, debug: debug2 = false }) {
|
|
|
44903
44975
|
try {
|
|
44904
44976
|
listener(event);
|
|
44905
44977
|
} catch (error) {
|
|
44906
|
-
|
|
44978
|
+
busLog.error("onAny-listener-threw", { type, error: error instanceof Error ? error : String(error) });
|
|
44907
44979
|
}
|
|
44908
44980
|
}
|
|
44909
|
-
}, [
|
|
44981
|
+
}, []);
|
|
44910
44982
|
const on = React136.useCallback((type, listener) => {
|
|
44911
44983
|
if (!listenersRef.current.has(type)) {
|
|
44912
44984
|
listenersRef.current.set(type, /* @__PURE__ */ new Set());
|
|
@@ -44915,19 +44987,14 @@ function EventBusProvider({ children, debug: debug2 = false }) {
|
|
|
44915
44987
|
listeners6.add(listener);
|
|
44916
44988
|
if (!listenerTags.has(listener)) listenerTags.set(listener, captureSubscriberTag(listener));
|
|
44917
44989
|
subLog2.debug("subscribe", { type, totalListeners: listeners6.size, tag: listenerTags.get(listener) });
|
|
44918
|
-
if (debug2) {
|
|
44919
|
-
console.log(`[EventBus] Subscribed to '${type}', total: ${listeners6.size}`);
|
|
44920
|
-
}
|
|
44921
44990
|
return () => {
|
|
44922
44991
|
listeners6.delete(listener);
|
|
44923
|
-
|
|
44924
|
-
console.log(`[EventBus] Unsubscribed from '${type}', remaining: ${listeners6.size}`);
|
|
44925
|
-
}
|
|
44992
|
+
subLog2.debug("unsubscribe", { type, remaining: listeners6.size });
|
|
44926
44993
|
if (listeners6.size === 0) {
|
|
44927
44994
|
listenersRef.current.delete(type);
|
|
44928
44995
|
}
|
|
44929
44996
|
};
|
|
44930
|
-
}, [
|
|
44997
|
+
}, []);
|
|
44931
44998
|
const once = React136.useCallback((type, listener) => {
|
|
44932
44999
|
const wrappedListener = (event) => {
|
|
44933
45000
|
listenersRef.current.get(type)?.delete(wrappedListener);
|
|
@@ -44943,16 +45010,11 @@ function EventBusProvider({ children, debug: debug2 = false }) {
|
|
|
44943
45010
|
anyListenersRef.current.add(listener);
|
|
44944
45011
|
if (!listenerTags.has(listener)) listenerTags.set(listener, captureSubscriberTag(listener));
|
|
44945
45012
|
subLog2.debug("subscribe:any", { totalAnyListeners: anyListenersRef.current.size, tag: listenerTags.get(listener) });
|
|
44946
|
-
if (debug2) {
|
|
44947
|
-
console.log(`[EventBus] onAny subscribed, total: ${anyListenersRef.current.size}`);
|
|
44948
|
-
}
|
|
44949
45013
|
return () => {
|
|
44950
45014
|
anyListenersRef.current.delete(listener);
|
|
44951
|
-
|
|
44952
|
-
console.log(`[EventBus] onAny unsubscribed, remaining: ${anyListenersRef.current.size}`);
|
|
44953
|
-
}
|
|
45015
|
+
subLog2.debug("unsubscribe:any", { remaining: anyListenersRef.current.size });
|
|
44954
45016
|
};
|
|
44955
|
-
}, [
|
|
45017
|
+
}, []);
|
|
44956
45018
|
const contextValue = React136.useMemo(
|
|
44957
45019
|
() => ({
|
|
44958
45020
|
emit,
|
|
@@ -44976,6 +45038,7 @@ function EventBusProvider({ children, debug: debug2 = false }) {
|
|
|
44976
45038
|
|
|
44977
45039
|
// providers/SelectionProvider.tsx
|
|
44978
45040
|
init_useEventBus();
|
|
45041
|
+
var log3 = logger.createLogger("almadar:ui:selection");
|
|
44979
45042
|
var SelectionContext = React136.createContext(null);
|
|
44980
45043
|
var defaultCompareEntities = (a, b) => {
|
|
44981
45044
|
if (a === b) return true;
|
|
@@ -44998,7 +45061,10 @@ function SelectionProvider({
|
|
|
44998
45061
|
(entity) => {
|
|
44999
45062
|
setSelectedState(entity);
|
|
45000
45063
|
if (debug2) {
|
|
45001
|
-
|
|
45064
|
+
log3.debug("Selection set", () => ({
|
|
45065
|
+
hasEntity: entity !== null && entity !== void 0,
|
|
45066
|
+
entityId: entity && typeof entity === "object" ? String(entity.id ?? "") : ""
|
|
45067
|
+
}));
|
|
45002
45068
|
}
|
|
45003
45069
|
},
|
|
45004
45070
|
[debug2]
|
|
@@ -45006,7 +45072,7 @@ function SelectionProvider({
|
|
|
45006
45072
|
const clearSelection = React136.useCallback(() => {
|
|
45007
45073
|
setSelectedState(null);
|
|
45008
45074
|
if (debug2) {
|
|
45009
|
-
|
|
45075
|
+
log3.debug("Selection cleared");
|
|
45010
45076
|
}
|
|
45011
45077
|
}, [debug2]);
|
|
45012
45078
|
const isSelected = React136.useCallback(
|
|
@@ -45021,14 +45087,17 @@ function SelectionProvider({
|
|
|
45021
45087
|
if (row) {
|
|
45022
45088
|
setSelected(row);
|
|
45023
45089
|
if (debug2) {
|
|
45024
|
-
|
|
45090
|
+
log3.debug("event received", () => ({
|
|
45091
|
+
type: event.type,
|
|
45092
|
+
rowId: row && typeof row === "object" ? String(row.id ?? "") : ""
|
|
45093
|
+
}));
|
|
45025
45094
|
}
|
|
45026
45095
|
}
|
|
45027
45096
|
};
|
|
45028
45097
|
const handleDeselect = (event) => {
|
|
45029
45098
|
clearSelection();
|
|
45030
45099
|
if (debug2) {
|
|
45031
|
-
|
|
45100
|
+
log3.debug("event received - clearing selection", { type: event.type });
|
|
45032
45101
|
}
|
|
45033
45102
|
};
|
|
45034
45103
|
const unsubView = eventBus.on("UI:VIEW", handleSelect);
|
|
@@ -45070,7 +45139,7 @@ init_UISlotRenderer();
|
|
|
45070
45139
|
// providers/VerificationProvider.tsx
|
|
45071
45140
|
init_useEventBus();
|
|
45072
45141
|
init_verificationRegistry();
|
|
45073
|
-
var
|
|
45142
|
+
var log11 = logger.createLogger("almadar:verify");
|
|
45074
45143
|
var DISPATCH_SUFFIX = ":DISPATCH";
|
|
45075
45144
|
var SUCCESS_SUFFIX = ":SUCCESS";
|
|
45076
45145
|
var ERROR_SUFFIX = ":ERROR";
|
|
@@ -45116,7 +45185,7 @@ function VerificationProvider({
|
|
|
45116
45185
|
const verificationProviderLifecycleListener = (evt) => {
|
|
45117
45186
|
const parsed = parseLifecycleEvent(evt.type);
|
|
45118
45187
|
if (!parsed) return;
|
|
45119
|
-
|
|
45188
|
+
log11.debug("lifecycle:event", { kind: parsed.kind, traitName: parsed.traitName, event: parsed.event, type: evt.type });
|
|
45120
45189
|
const payload = evt.payload ?? {};
|
|
45121
45190
|
if (parsed.kind === "dispatch") {
|
|
45122
45191
|
const key = `${parsed.traitName}:${String(payload["event"] ?? "")}`;
|
|
@@ -45171,7 +45240,7 @@ function VerificationProvider({
|
|
|
45171
45240
|
},
|
|
45172
45241
|
timestamp: Date.now()
|
|
45173
45242
|
});
|
|
45174
|
-
|
|
45243
|
+
log11.debug("transition:success", { trait: parsed.traitName, event: parsed.event, from: pending?.from, to: newState, effectCount: effects.length });
|
|
45175
45244
|
} else if (parsed.kind === "error" && parsed.event) {
|
|
45176
45245
|
const key = `${parsed.traitName}:${parsed.event}`;
|
|
45177
45246
|
const pending = pendingRef.current.get(key);
|
|
@@ -45201,7 +45270,7 @@ function VerificationProvider({
|
|
|
45201
45270
|
},
|
|
45202
45271
|
timestamp: Date.now()
|
|
45203
45272
|
});
|
|
45204
|
-
|
|
45273
|
+
log11.warn("transition:error", { trait: parsed.traitName, event: parsed.event, from: fromState, error: errorMsg });
|
|
45205
45274
|
}
|
|
45206
45275
|
};
|
|
45207
45276
|
Object.defineProperty(verificationProviderLifecycleListener, "name", {
|