@almadar/ui 4.43.4 → 4.44.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 +40016 -40631
- package/dist/avl/index.js +50169 -50796
- package/dist/components/atoms/index.d.ts +1 -0
- package/dist/components/index.cjs +36991 -42153
- package/dist/components/index.js +19599 -24767
- package/dist/components/molecules/index.d.ts +10 -0
- package/dist/components/organisms/game/three/index.cjs +10 -54
- package/dist/components/organisms/game/three/index.js +7 -51
- package/dist/components/organisms/index.d.ts +1 -0
- package/dist/context/index.cjs +2 -50
- package/dist/context/index.js +1 -49
- package/dist/docs/index.cjs +12 -56
- package/dist/docs/index.js +7 -51
- package/dist/hooks/index.cjs +11 -55
- package/dist/hooks/index.js +7 -51
- package/dist/lib/index.cjs +2 -57
- package/dist/lib/index.d.ts +0 -1
- package/dist/lib/index.js +2 -55
- package/dist/marketing/index.cjs +12 -56
- package/dist/marketing/index.js +7 -51
- package/dist/providers/index.cjs +37689 -42916
- package/dist/providers/index.js +11999 -17226
- package/dist/runtime/index.cjs +40993 -44356
- package/dist/runtime/index.js +34505 -37868
- package/dist/runtime/ui/slot-types.d.ts +1 -1
- package/package.json +4 -3
- package/dist/lib/logger.d.ts +0 -16
package/dist/lib/index.cjs
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var clsx = require('clsx');
|
|
4
4
|
var tailwindMerge = require('tailwind-merge');
|
|
5
|
+
var logger = require('@almadar/logger');
|
|
5
6
|
|
|
6
7
|
var __defProp = Object.defineProperty;
|
|
7
8
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
@@ -430,61 +431,7 @@ function clearTraits() {
|
|
|
430
431
|
traits.clear();
|
|
431
432
|
notifyListeners4();
|
|
432
433
|
}
|
|
433
|
-
|
|
434
|
-
// lib/logger.ts
|
|
435
|
-
var LEVEL_PRIORITY = { DEBUG: 0, INFO: 1, WARN: 2, ERROR: 3 };
|
|
436
|
-
var ENV = typeof process !== "undefined" && process.env ? process.env : {};
|
|
437
|
-
function envGet(key) {
|
|
438
|
-
return ENV[key] ?? ENV[`VITE_${key}`];
|
|
439
|
-
}
|
|
440
|
-
var NODE_ENV = envGet("NODE_ENV") ?? "development";
|
|
441
|
-
var CONFIGURED_LEVEL = (envGet("LOG_LEVEL") ?? (NODE_ENV === "production" ? "info" : "debug")).toUpperCase();
|
|
442
|
-
var MIN_PRIORITY = LEVEL_PRIORITY[CONFIGURED_LEVEL] ?? 0;
|
|
443
|
-
var DEBUG_FILTER = (envGet("ALMADAR_DEBUG") ?? "").split(",").map((s) => s.trim()).filter(Boolean);
|
|
444
|
-
function matchesNamespace(namespace) {
|
|
445
|
-
if (DEBUG_FILTER.length === 0) return true;
|
|
446
|
-
return DEBUG_FILTER.some((pattern) => {
|
|
447
|
-
if (pattern === "*" || pattern === "almadar:*") return true;
|
|
448
|
-
if (pattern.endsWith(":*")) return namespace.startsWith(pattern.slice(0, -1));
|
|
449
|
-
return namespace === pattern;
|
|
450
|
-
});
|
|
451
|
-
}
|
|
452
|
-
function createLogger(namespace) {
|
|
453
|
-
const nsAllowed = matchesNamespace(namespace);
|
|
454
|
-
const log2 = (level, message, data, correlationId) => {
|
|
455
|
-
if (LEVEL_PRIORITY[level] < MIN_PRIORITY) return;
|
|
456
|
-
if (level === "DEBUG" && !nsAllowed) return;
|
|
457
|
-
const prefix = `[${namespace}]`;
|
|
458
|
-
const logData = correlationId ? { ...data, cid: correlationId } : data;
|
|
459
|
-
switch (level) {
|
|
460
|
-
case "DEBUG":
|
|
461
|
-
console.debug(prefix, message, logData ?? "");
|
|
462
|
-
break;
|
|
463
|
-
case "INFO":
|
|
464
|
-
console.info(prefix, message, logData ?? "");
|
|
465
|
-
break;
|
|
466
|
-
case "WARN":
|
|
467
|
-
console.warn(prefix, message, logData ?? "");
|
|
468
|
-
break;
|
|
469
|
-
case "ERROR":
|
|
470
|
-
console.error(prefix, message, logData ?? "");
|
|
471
|
-
break;
|
|
472
|
-
}
|
|
473
|
-
};
|
|
474
|
-
return {
|
|
475
|
-
debug: (msg, data, cid) => log2("DEBUG", msg, data, cid),
|
|
476
|
-
info: (msg, data, cid) => log2("INFO", msg, data, cid),
|
|
477
|
-
warn: (msg, data, cid) => log2("WARN", msg, data, cid),
|
|
478
|
-
error: (msg, data, cid) => log2("ERROR", msg, data, cid)
|
|
479
|
-
};
|
|
480
|
-
}
|
|
481
|
-
var _cidCounter = 0;
|
|
482
|
-
function generateCorrelationId() {
|
|
483
|
-
return `evt-${Date.now()}-${++_cidCounter}`;
|
|
484
|
-
}
|
|
485
|
-
|
|
486
|
-
// lib/verificationRegistry.ts
|
|
487
|
-
var log = createLogger("almadar:bridge");
|
|
434
|
+
var log = logger.createLogger("almadar:bridge");
|
|
488
435
|
var MAX_TRANSITIONS = 500;
|
|
489
436
|
function getState() {
|
|
490
437
|
if (typeof window !== "undefined") {
|
|
@@ -1561,7 +1508,6 @@ exports.clearTicks = clearTicks;
|
|
|
1561
1508
|
exports.clearTraits = clearTraits;
|
|
1562
1509
|
exports.clearVerification = clearVerification;
|
|
1563
1510
|
exports.cn = cn;
|
|
1564
|
-
exports.createLogger = createLogger;
|
|
1565
1511
|
exports.debug = debug;
|
|
1566
1512
|
exports.debugCollision = debugCollision;
|
|
1567
1513
|
exports.debugError = debugError;
|
|
@@ -1578,7 +1524,6 @@ exports.extractOutputsFromTransitions = extractOutputsFromTransitions;
|
|
|
1578
1524
|
exports.extractStateMachine = extractStateMachine;
|
|
1579
1525
|
exports.formatGuard = formatGuard;
|
|
1580
1526
|
exports.formatNestedFieldLabel = formatNestedFieldLabel;
|
|
1581
|
-
exports.generateCorrelationId = generateCorrelationId;
|
|
1582
1527
|
exports.getAllChecks = getAllChecks;
|
|
1583
1528
|
exports.getAllTicks = getAllTicks;
|
|
1584
1529
|
exports.getAllTraits = getAllTraits;
|
package/dist/lib/index.d.ts
CHANGED
package/dist/lib/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { clsx } from 'clsx';
|
|
2
2
|
import { twMerge } from 'tailwind-merge';
|
|
3
|
+
import { createLogger } from '@almadar/logger';
|
|
3
4
|
|
|
4
5
|
var __defProp = Object.defineProperty;
|
|
5
6
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
@@ -428,60 +429,6 @@ function clearTraits() {
|
|
|
428
429
|
traits.clear();
|
|
429
430
|
notifyListeners4();
|
|
430
431
|
}
|
|
431
|
-
|
|
432
|
-
// lib/logger.ts
|
|
433
|
-
var LEVEL_PRIORITY = { DEBUG: 0, INFO: 1, WARN: 2, ERROR: 3 };
|
|
434
|
-
var ENV = typeof process !== "undefined" && process.env ? process.env : {};
|
|
435
|
-
function envGet(key) {
|
|
436
|
-
return ENV[key] ?? ENV[`VITE_${key}`];
|
|
437
|
-
}
|
|
438
|
-
var NODE_ENV = envGet("NODE_ENV") ?? "development";
|
|
439
|
-
var CONFIGURED_LEVEL = (envGet("LOG_LEVEL") ?? (NODE_ENV === "production" ? "info" : "debug")).toUpperCase();
|
|
440
|
-
var MIN_PRIORITY = LEVEL_PRIORITY[CONFIGURED_LEVEL] ?? 0;
|
|
441
|
-
var DEBUG_FILTER = (envGet("ALMADAR_DEBUG") ?? "").split(",").map((s) => s.trim()).filter(Boolean);
|
|
442
|
-
function matchesNamespace(namespace) {
|
|
443
|
-
if (DEBUG_FILTER.length === 0) return true;
|
|
444
|
-
return DEBUG_FILTER.some((pattern) => {
|
|
445
|
-
if (pattern === "*" || pattern === "almadar:*") return true;
|
|
446
|
-
if (pattern.endsWith(":*")) return namespace.startsWith(pattern.slice(0, -1));
|
|
447
|
-
return namespace === pattern;
|
|
448
|
-
});
|
|
449
|
-
}
|
|
450
|
-
function createLogger(namespace) {
|
|
451
|
-
const nsAllowed = matchesNamespace(namespace);
|
|
452
|
-
const log2 = (level, message, data, correlationId) => {
|
|
453
|
-
if (LEVEL_PRIORITY[level] < MIN_PRIORITY) return;
|
|
454
|
-
if (level === "DEBUG" && !nsAllowed) return;
|
|
455
|
-
const prefix = `[${namespace}]`;
|
|
456
|
-
const logData = correlationId ? { ...data, cid: correlationId } : data;
|
|
457
|
-
switch (level) {
|
|
458
|
-
case "DEBUG":
|
|
459
|
-
console.debug(prefix, message, logData ?? "");
|
|
460
|
-
break;
|
|
461
|
-
case "INFO":
|
|
462
|
-
console.info(prefix, message, logData ?? "");
|
|
463
|
-
break;
|
|
464
|
-
case "WARN":
|
|
465
|
-
console.warn(prefix, message, logData ?? "");
|
|
466
|
-
break;
|
|
467
|
-
case "ERROR":
|
|
468
|
-
console.error(prefix, message, logData ?? "");
|
|
469
|
-
break;
|
|
470
|
-
}
|
|
471
|
-
};
|
|
472
|
-
return {
|
|
473
|
-
debug: (msg, data, cid) => log2("DEBUG", msg, data, cid),
|
|
474
|
-
info: (msg, data, cid) => log2("INFO", msg, data, cid),
|
|
475
|
-
warn: (msg, data, cid) => log2("WARN", msg, data, cid),
|
|
476
|
-
error: (msg, data, cid) => log2("ERROR", msg, data, cid)
|
|
477
|
-
};
|
|
478
|
-
}
|
|
479
|
-
var _cidCounter = 0;
|
|
480
|
-
function generateCorrelationId() {
|
|
481
|
-
return `evt-${Date.now()}-${++_cidCounter}`;
|
|
482
|
-
}
|
|
483
|
-
|
|
484
|
-
// lib/verificationRegistry.ts
|
|
485
432
|
var log = createLogger("almadar:bridge");
|
|
486
433
|
var MAX_TRANSITIONS = 500;
|
|
487
434
|
function getState() {
|
|
@@ -1546,4 +1493,4 @@ function parseContentSegments(content) {
|
|
|
1546
1493
|
return segments;
|
|
1547
1494
|
}
|
|
1548
1495
|
|
|
1549
|
-
export { ApiError, DEFAULT_CONFIG, apiClient, bindCanvasCapture, bindEventBus, bindTraitStateGetter, clearDebugEvents, clearEntityProvider, clearGuardHistory, clearTicks, clearTraits, clearVerification, cn,
|
|
1496
|
+
export { ApiError, DEFAULT_CONFIG, apiClient, bindCanvasCapture, bindEventBus, bindTraitStateGetter, clearDebugEvents, clearEntityProvider, clearGuardHistory, clearTicks, clearTraits, clearVerification, cn, debug, debugCollision, debugError, debugGameState, debugGroup, debugGroupEnd, debugInput, debugPhysics, debugTable, debugTime, debugTimeEnd, debugWarn, extractOutputsFromTransitions, extractStateMachine, formatGuard, formatNestedFieldLabel, getAllChecks, getAllTicks, getAllTraits, getBridgeHealth, getDebugEvents, getEffectSummary, getEntitiesByType, getEntityById, getEntitySnapshot, getEventsBySource, getEventsByType, getGuardEvaluationsForTrait, getGuardHistory, getNestedValue, getRecentEvents, getRecentGuardEvaluations, getSnapshot, getSummary, getTick, getTrait, getTraitSnapshots, getTransitions, getTransitionsForTrait, initDebugShortcut, isDebugEnabled, logDebugEvent, logEffectExecuted, logError, logEventFired, logInfo, logStateChange, logWarning, onDebugToggle, parseContentSegments, parseMarkdownWithCodeBlocks, recordGuardEvaluation, recordServerResponse, recordTransition, registerCheck, registerTick, registerTrait, registerTraitSnapshot, renderStateMachineToDomData, renderStateMachineToSvg, setDebugEnabled, setEntityProvider, setTickActive, subscribeToDebugEvents, subscribeToGuardChanges, subscribeToTickChanges, subscribeToTraitChanges, subscribeToVerification, toggleDebug, unregisterTick, unregisterTrait, updateAssetStatus, updateBridgeHealth, updateCheck, updateGuardResult, updateTickExecution, updateTraitState, waitForTransition };
|
package/dist/marketing/index.cjs
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var React6 = require('react');
|
|
4
|
+
var logger = require('@almadar/logger');
|
|
4
5
|
var jsxRuntime = require('react/jsx-runtime');
|
|
5
6
|
var LucideIcons = require('lucide-react');
|
|
6
7
|
|
|
@@ -2506,66 +2507,16 @@ var twMerge = /* @__PURE__ */ createTailwindMerge(getDefaultConfig);
|
|
|
2506
2507
|
function cn(...inputs) {
|
|
2507
2508
|
return twMerge(clsx(inputs));
|
|
2508
2509
|
}
|
|
2509
|
-
|
|
2510
|
-
|
|
2511
|
-
var LEVEL_PRIORITY = { DEBUG: 0, INFO: 1, WARN: 2, ERROR: 3 };
|
|
2512
|
-
var ENV = typeof process !== "undefined" && process.env ? process.env : {};
|
|
2513
|
-
function envGet(key) {
|
|
2514
|
-
return ENV[key] ?? ENV[`VITE_${key}`];
|
|
2515
|
-
}
|
|
2516
|
-
var NODE_ENV = envGet("NODE_ENV") ?? "development";
|
|
2517
|
-
var CONFIGURED_LEVEL = (envGet("LOG_LEVEL") ?? (NODE_ENV === "production" ? "info" : "debug")).toUpperCase();
|
|
2518
|
-
var MIN_PRIORITY = LEVEL_PRIORITY[CONFIGURED_LEVEL] ?? 0;
|
|
2519
|
-
var DEBUG_FILTER = (envGet("ALMADAR_DEBUG") ?? "").split(",").map((s) => s.trim()).filter(Boolean);
|
|
2520
|
-
function matchesNamespace(namespace) {
|
|
2521
|
-
if (DEBUG_FILTER.length === 0) return true;
|
|
2522
|
-
return DEBUG_FILTER.some((pattern) => {
|
|
2523
|
-
if (pattern === "*" || pattern === "almadar:*") return true;
|
|
2524
|
-
if (pattern.endsWith(":*")) return namespace.startsWith(pattern.slice(0, -1));
|
|
2525
|
-
return namespace === pattern;
|
|
2526
|
-
});
|
|
2527
|
-
}
|
|
2528
|
-
function createLogger(namespace) {
|
|
2529
|
-
const nsAllowed = matchesNamespace(namespace);
|
|
2530
|
-
const log2 = (level, message, data, correlationId) => {
|
|
2531
|
-
if (LEVEL_PRIORITY[level] < MIN_PRIORITY) return;
|
|
2532
|
-
if (level === "DEBUG" && !nsAllowed) return;
|
|
2533
|
-
const prefix = `[${namespace}]`;
|
|
2534
|
-
const logData = correlationId ? { ...data, cid: correlationId } : data;
|
|
2535
|
-
switch (level) {
|
|
2536
|
-
case "DEBUG":
|
|
2537
|
-
console.debug(prefix, message, logData ?? "");
|
|
2538
|
-
break;
|
|
2539
|
-
case "INFO":
|
|
2540
|
-
console.info(prefix, message, logData ?? "");
|
|
2541
|
-
break;
|
|
2542
|
-
case "WARN":
|
|
2543
|
-
console.warn(prefix, message, logData ?? "");
|
|
2544
|
-
break;
|
|
2545
|
-
case "ERROR":
|
|
2546
|
-
console.error(prefix, message, logData ?? "");
|
|
2547
|
-
break;
|
|
2548
|
-
}
|
|
2549
|
-
};
|
|
2550
|
-
return {
|
|
2551
|
-
debug: (msg, data, cid) => log2("DEBUG", msg, data, cid),
|
|
2552
|
-
info: (msg, data, cid) => log2("INFO", msg, data, cid),
|
|
2553
|
-
warn: (msg, data, cid) => log2("WARN", msg, data, cid),
|
|
2554
|
-
error: (msg, data, cid) => log2("ERROR", msg, data, cid)
|
|
2555
|
-
};
|
|
2556
|
-
}
|
|
2557
|
-
createLogger("almadar:eventbus");
|
|
2558
|
-
createLogger("almadar:eventbus:subscribe");
|
|
2510
|
+
logger.createLogger("almadar:eventbus");
|
|
2511
|
+
logger.createLogger("almadar:eventbus:subscribe");
|
|
2559
2512
|
var EventBusContext = React6.createContext(null);
|
|
2560
2513
|
var TraitScopeContext = React6.createContext(null);
|
|
2561
2514
|
function useTraitScope() {
|
|
2562
2515
|
return React6.useContext(TraitScopeContext);
|
|
2563
2516
|
}
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
var
|
|
2567
|
-
var subLog2 = createLogger("almadar:eventbus:subscribe");
|
|
2568
|
-
var scopeLog = createLogger("almadar:ui:trait-scope");
|
|
2517
|
+
var log = logger.createLogger("almadar:eventbus");
|
|
2518
|
+
var subLog2 = logger.createLogger("almadar:eventbus:subscribe");
|
|
2519
|
+
var scopeLog = logger.createLogger("almadar:ui:trait-scope");
|
|
2569
2520
|
function getGlobalEventBus() {
|
|
2570
2521
|
if (typeof window !== "undefined") {
|
|
2571
2522
|
return window.__kflowEventBus ?? null;
|
|
@@ -2659,7 +2610,12 @@ function useEventBus() {
|
|
|
2659
2610
|
const tail = type.slice(3);
|
|
2660
2611
|
const qualified = tail.includes(".") ? type : `UI:${scope.orbital}.${scope.trait}.${tail}`;
|
|
2661
2612
|
if (qualified !== type) {
|
|
2662
|
-
scopeLog.info("emit:qualified", {
|
|
2613
|
+
scopeLog.info("emit:qualified", {
|
|
2614
|
+
from: type,
|
|
2615
|
+
to: qualified,
|
|
2616
|
+
scopeOrbital: scope.orbital,
|
|
2617
|
+
scopeTrait: scope.trait
|
|
2618
|
+
});
|
|
2663
2619
|
}
|
|
2664
2620
|
baseBus.emit(qualified, payload, source);
|
|
2665
2621
|
return;
|
package/dist/marketing/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React6, { createContext, useCallback, useState, useRef, useEffect, useContext, useMemo, useId } from 'react';
|
|
2
|
+
import { createLogger } from '@almadar/logger';
|
|
2
3
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
3
4
|
import * as LucideIcons from 'lucide-react';
|
|
4
5
|
import { Loader2, Check, User } from 'lucide-react';
|
|
@@ -2482,54 +2483,6 @@ var twMerge = /* @__PURE__ */ createTailwindMerge(getDefaultConfig);
|
|
|
2482
2483
|
function cn(...inputs) {
|
|
2483
2484
|
return twMerge(clsx(inputs));
|
|
2484
2485
|
}
|
|
2485
|
-
|
|
2486
|
-
// lib/logger.ts
|
|
2487
|
-
var LEVEL_PRIORITY = { DEBUG: 0, INFO: 1, WARN: 2, ERROR: 3 };
|
|
2488
|
-
var ENV = typeof process !== "undefined" && process.env ? process.env : {};
|
|
2489
|
-
function envGet(key) {
|
|
2490
|
-
return ENV[key] ?? ENV[`VITE_${key}`];
|
|
2491
|
-
}
|
|
2492
|
-
var NODE_ENV = envGet("NODE_ENV") ?? "development";
|
|
2493
|
-
var CONFIGURED_LEVEL = (envGet("LOG_LEVEL") ?? (NODE_ENV === "production" ? "info" : "debug")).toUpperCase();
|
|
2494
|
-
var MIN_PRIORITY = LEVEL_PRIORITY[CONFIGURED_LEVEL] ?? 0;
|
|
2495
|
-
var DEBUG_FILTER = (envGet("ALMADAR_DEBUG") ?? "").split(",").map((s) => s.trim()).filter(Boolean);
|
|
2496
|
-
function matchesNamespace(namespace) {
|
|
2497
|
-
if (DEBUG_FILTER.length === 0) return true;
|
|
2498
|
-
return DEBUG_FILTER.some((pattern) => {
|
|
2499
|
-
if (pattern === "*" || pattern === "almadar:*") return true;
|
|
2500
|
-
if (pattern.endsWith(":*")) return namespace.startsWith(pattern.slice(0, -1));
|
|
2501
|
-
return namespace === pattern;
|
|
2502
|
-
});
|
|
2503
|
-
}
|
|
2504
|
-
function createLogger(namespace) {
|
|
2505
|
-
const nsAllowed = matchesNamespace(namespace);
|
|
2506
|
-
const log2 = (level, message, data, correlationId) => {
|
|
2507
|
-
if (LEVEL_PRIORITY[level] < MIN_PRIORITY) return;
|
|
2508
|
-
if (level === "DEBUG" && !nsAllowed) return;
|
|
2509
|
-
const prefix = `[${namespace}]`;
|
|
2510
|
-
const logData = correlationId ? { ...data, cid: correlationId } : data;
|
|
2511
|
-
switch (level) {
|
|
2512
|
-
case "DEBUG":
|
|
2513
|
-
console.debug(prefix, message, logData ?? "");
|
|
2514
|
-
break;
|
|
2515
|
-
case "INFO":
|
|
2516
|
-
console.info(prefix, message, logData ?? "");
|
|
2517
|
-
break;
|
|
2518
|
-
case "WARN":
|
|
2519
|
-
console.warn(prefix, message, logData ?? "");
|
|
2520
|
-
break;
|
|
2521
|
-
case "ERROR":
|
|
2522
|
-
console.error(prefix, message, logData ?? "");
|
|
2523
|
-
break;
|
|
2524
|
-
}
|
|
2525
|
-
};
|
|
2526
|
-
return {
|
|
2527
|
-
debug: (msg, data, cid) => log2("DEBUG", msg, data, cid),
|
|
2528
|
-
info: (msg, data, cid) => log2("INFO", msg, data, cid),
|
|
2529
|
-
warn: (msg, data, cid) => log2("WARN", msg, data, cid),
|
|
2530
|
-
error: (msg, data, cid) => log2("ERROR", msg, data, cid)
|
|
2531
|
-
};
|
|
2532
|
-
}
|
|
2533
2486
|
createLogger("almadar:eventbus");
|
|
2534
2487
|
createLogger("almadar:eventbus:subscribe");
|
|
2535
2488
|
var EventBusContext = createContext(null);
|
|
@@ -2537,8 +2490,6 @@ var TraitScopeContext = createContext(null);
|
|
|
2537
2490
|
function useTraitScope() {
|
|
2538
2491
|
return useContext(TraitScopeContext);
|
|
2539
2492
|
}
|
|
2540
|
-
|
|
2541
|
-
// hooks/useEventBus.ts
|
|
2542
2493
|
var log = createLogger("almadar:eventbus");
|
|
2543
2494
|
var subLog2 = createLogger("almadar:eventbus:subscribe");
|
|
2544
2495
|
var scopeLog = createLogger("almadar:ui:trait-scope");
|
|
@@ -2635,7 +2586,12 @@ function useEventBus() {
|
|
|
2635
2586
|
const tail = type.slice(3);
|
|
2636
2587
|
const qualified = tail.includes(".") ? type : `UI:${scope.orbital}.${scope.trait}.${tail}`;
|
|
2637
2588
|
if (qualified !== type) {
|
|
2638
|
-
scopeLog.info("emit:qualified", {
|
|
2589
|
+
scopeLog.info("emit:qualified", {
|
|
2590
|
+
from: type,
|
|
2591
|
+
to: qualified,
|
|
2592
|
+
scopeOrbital: scope.orbital,
|
|
2593
|
+
scopeTrait: scope.trait
|
|
2594
|
+
});
|
|
2639
2595
|
}
|
|
2640
2596
|
baseBus.emit(qualified, payload, source);
|
|
2641
2597
|
return;
|