@almadar/ui 2.13.0 → 2.13.1
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/{chunk-Y7IHEYYE.js → chunk-3CP74CBL.js} +524 -524
- package/dist/{chunk-4ZBSL37D.js → chunk-MNMASFYN.js} +212 -212
- package/dist/{chunk-PERGHHON.js → chunk-X2ZDE63F.js} +1 -1
- package/dist/{chunk-UYR7S2DP.js → chunk-XF7GGUTH.js} +3 -3
- package/dist/{chunk-DKQN5FVU.js → chunk-YLKXEXBP.js} +24 -24
- package/dist/{chunk-2GI2TR4Y.js → chunk-YYCP5CD7.js} +6 -4
- package/dist/components/index.d.ts +2 -2
- package/dist/components/index.js +9 -9
- package/dist/context/index.js +2 -2
- package/dist/hooks/index.d.ts +61 -61
- package/dist/hooks/index.js +2 -2
- package/dist/lib/index.d.ts +174 -174
- package/dist/lib/index.js +1 -1
- package/dist/providers/index.js +5 -5
- package/dist/runtime/index.js +6 -6
- package/package.json +1 -1
- package/themes/arctic.css +6 -6
- package/themes/copper.css +2 -2
- package/themes/ember.css +6 -6
- package/themes/forest.css +2 -2
- package/themes/lavender.css +2 -2
- package/themes/midnight.css +2 -2
- package/themes/minimalist.css +7 -7
- package/themes/neon.css +6 -6
- package/themes/ocean.css +2 -2
- package/themes/rose.css +2 -2
- package/themes/sand.css +6 -6
- package/themes/slate.css +6 -6
- package/themes/sunset.css +2 -2
- package/dist/{cn-C_ATNPvi.d.ts → parseContentSegments-BZrQRvgK.d.ts} +144 -144
package/dist/hooks/index.d.ts
CHANGED
|
@@ -7,67 +7,6 @@ import React__default, { ReactNode } from 'react';
|
|
|
7
7
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
8
8
|
import { Entity, getEntity, getByType, getAllEntities, getSingleton, spawnEntity, updateEntity, updateSingleton, removeEntity, clearEntities } from '../stores/index.js';
|
|
9
9
|
|
|
10
|
-
declare global {
|
|
11
|
-
interface Window {
|
|
12
|
-
__kflowEventBus?: EventBusContextType | null;
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* Hook for accessing the event bus.
|
|
17
|
-
*
|
|
18
|
-
* Uses EventBusProvider context if available, otherwise falls back to
|
|
19
|
-
* a simple in-memory event bus (for design system / Storybook).
|
|
20
|
-
*
|
|
21
|
-
* @returns Event bus instance with emit, on, once, and hasListeners methods
|
|
22
|
-
*
|
|
23
|
-
* @example
|
|
24
|
-
* ```tsx
|
|
25
|
-
* const eventBus = useEventBus();
|
|
26
|
-
*
|
|
27
|
-
* // Emit an event
|
|
28
|
-
* eventBus.emit('UI:CLICK', { id: '123' });
|
|
29
|
-
*
|
|
30
|
-
* // Subscribe to an event
|
|
31
|
-
* useEffect(() => {
|
|
32
|
-
* return eventBus.on('UI:CLICK', (event) => {
|
|
33
|
-
* console.log('Clicked:', event.payload);
|
|
34
|
-
* });
|
|
35
|
-
* }, []);
|
|
36
|
-
* ```
|
|
37
|
-
*/
|
|
38
|
-
declare function useEventBus(): EventBusContextType;
|
|
39
|
-
/**
|
|
40
|
-
* Hook for subscribing to a specific event.
|
|
41
|
-
* Automatically cleans up subscription on unmount.
|
|
42
|
-
*
|
|
43
|
-
* @param event - Event name to subscribe to
|
|
44
|
-
* @param handler - Event handler function
|
|
45
|
-
*
|
|
46
|
-
* @example
|
|
47
|
-
* ```tsx
|
|
48
|
-
* useEventListener('UI:CLICK', (event) => {
|
|
49
|
-
* console.log('Clicked:', event.payload);
|
|
50
|
-
* });
|
|
51
|
-
* ```
|
|
52
|
-
*/
|
|
53
|
-
declare function useEventListener(event: string, handler: EventListener): void;
|
|
54
|
-
/**
|
|
55
|
-
* Hook for emitting events.
|
|
56
|
-
* Returns a memoized emit function.
|
|
57
|
-
*
|
|
58
|
-
* @returns Function to emit events
|
|
59
|
-
*
|
|
60
|
-
* @example
|
|
61
|
-
* ```tsx
|
|
62
|
-
* const emit = useEmitEvent();
|
|
63
|
-
*
|
|
64
|
-
* const handleClick = () => {
|
|
65
|
-
* emit('UI:CLICK', { id: '123' });
|
|
66
|
-
* };
|
|
67
|
-
* ```
|
|
68
|
-
*/
|
|
69
|
-
declare function useEmitEvent(): (type: string, payload?: Record<string, unknown>) => void;
|
|
70
|
-
|
|
71
10
|
interface ChangeSummary {
|
|
72
11
|
added: number;
|
|
73
12
|
modified: number;
|
|
@@ -488,6 +427,67 @@ interface UseValidationResult {
|
|
|
488
427
|
}
|
|
489
428
|
declare function useValidation(): UseValidationResult;
|
|
490
429
|
|
|
430
|
+
declare global {
|
|
431
|
+
interface Window {
|
|
432
|
+
__kflowEventBus?: EventBusContextType | null;
|
|
433
|
+
}
|
|
434
|
+
}
|
|
435
|
+
/**
|
|
436
|
+
* Hook for accessing the event bus.
|
|
437
|
+
*
|
|
438
|
+
* Uses EventBusProvider context if available, otherwise falls back to
|
|
439
|
+
* a simple in-memory event bus (for design system / Storybook).
|
|
440
|
+
*
|
|
441
|
+
* @returns Event bus instance with emit, on, once, and hasListeners methods
|
|
442
|
+
*
|
|
443
|
+
* @example
|
|
444
|
+
* ```tsx
|
|
445
|
+
* const eventBus = useEventBus();
|
|
446
|
+
*
|
|
447
|
+
* // Emit an event
|
|
448
|
+
* eventBus.emit('UI:CLICK', { id: '123' });
|
|
449
|
+
*
|
|
450
|
+
* // Subscribe to an event
|
|
451
|
+
* useEffect(() => {
|
|
452
|
+
* return eventBus.on('UI:CLICK', (event) => {
|
|
453
|
+
* console.log('Clicked:', event.payload);
|
|
454
|
+
* });
|
|
455
|
+
* }, []);
|
|
456
|
+
* ```
|
|
457
|
+
*/
|
|
458
|
+
declare function useEventBus(): EventBusContextType;
|
|
459
|
+
/**
|
|
460
|
+
* Hook for subscribing to a specific event.
|
|
461
|
+
* Automatically cleans up subscription on unmount.
|
|
462
|
+
*
|
|
463
|
+
* @param event - Event name to subscribe to
|
|
464
|
+
* @param handler - Event handler function
|
|
465
|
+
*
|
|
466
|
+
* @example
|
|
467
|
+
* ```tsx
|
|
468
|
+
* useEventListener('UI:CLICK', (event) => {
|
|
469
|
+
* console.log('Clicked:', event.payload);
|
|
470
|
+
* });
|
|
471
|
+
* ```
|
|
472
|
+
*/
|
|
473
|
+
declare function useEventListener(event: string, handler: EventListener): void;
|
|
474
|
+
/**
|
|
475
|
+
* Hook for emitting events.
|
|
476
|
+
* Returns a memoized emit function.
|
|
477
|
+
*
|
|
478
|
+
* @returns Function to emit events
|
|
479
|
+
*
|
|
480
|
+
* @example
|
|
481
|
+
* ```tsx
|
|
482
|
+
* const emit = useEmitEvent();
|
|
483
|
+
*
|
|
484
|
+
* const handleClick = () => {
|
|
485
|
+
* emit('UI:CLICK', { id: '123' });
|
|
486
|
+
* };
|
|
487
|
+
* ```
|
|
488
|
+
*/
|
|
489
|
+
declare function useEmitEvent(): (type: string, payload?: Record<string, unknown>) => void;
|
|
490
|
+
|
|
491
491
|
/**
|
|
492
492
|
* Hook to bridge UI events to state machine dispatch
|
|
493
493
|
*
|
package/dist/hooks/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { ENTITY_EVENTS, useAgentChat, useAuthContext, useCompile, useConnectGitHub, useCreateEntity, useDeepAgentGeneration, useDeleteEntity, useDisconnectGitHub, useEntities, useEntitiesByType, useEntity as useEntityById, useEntityMutations, useExtensions, useFileEditor, useFileSystem, useGitHubBranches, useGitHubRepo, useGitHubRepos, useGitHubStatus, useInput, useOrbitalHistory, useOrbitalMutations, usePhysics, usePinchZoom, usePlayer, usePreview, useResolvedEntity, useSelectedEntity, useSendOrbitalEvent, useSingletonEntity, useUIEvents, useUpdateEntity, useValidation } from '../chunk-
|
|
1
|
+
export { ENTITY_EVENTS, useAgentChat, useAuthContext, useCompile, useConnectGitHub, useCreateEntity, useDeepAgentGeneration, useDeleteEntity, useDisconnectGitHub, useEntities, useEntitiesByType, useEntity as useEntityById, useEntityMutations, useExtensions, useFileEditor, useFileSystem, useGitHubBranches, useGitHubRepo, useGitHubRepos, useGitHubStatus, useInput, useOrbitalHistory, useOrbitalMutations, usePhysics, usePinchZoom, usePlayer, usePreview, useResolvedEntity, useSelectedEntity, useSendOrbitalEvent, useSingletonEntity, useUIEvents, useUpdateEntity, useValidation } from '../chunk-X2ZDE63F.js';
|
|
2
2
|
export { clearEntities, getAllEntities, getByType, getEntity, getSingleton, removeEntity, spawnEntity, updateEntity, updateSingleton } from '../chunk-N7MVUW4R.js';
|
|
3
3
|
import '../chunk-3HJHHULT.js';
|
|
4
|
-
export { EntityDataProvider, I18nProvider, createTranslate, entityDataKeys, parseQueryBinding, useDragReorder, useEntity, useEntityDataAdapter, useEntityDetail, useEntityList, useEntityListSuspense, useEntitySuspense, useInfiniteScroll, useLongPress, usePullToRefresh, useQuerySingleton, useSwipeGesture, useTranslate } from '../chunk-
|
|
4
|
+
export { EntityDataProvider, I18nProvider, createTranslate, entityDataKeys, parseQueryBinding, useDragReorder, useEntity, useEntityDataAdapter, useEntityDetail, useEntityList, useEntityListSuspense, useEntitySuspense, useInfiniteScroll, useLongPress, usePullToRefresh, useQuerySingleton, useSwipeGesture, useTranslate } from '../chunk-3CP74CBL.js';
|
|
5
5
|
export { useEmitEvent, useEventBus, useEventListener } from '../chunk-YXZM3WCF.js';
|
|
6
6
|
export { DEFAULT_SLOTS, useUISlotManager } from '../chunk-3JGAROCW.js';
|
|
7
7
|
import '../chunk-2XXSUIOK.js';
|
package/dist/lib/index.d.ts
CHANGED
|
@@ -1,179 +1,6 @@
|
|
|
1
|
-
export { A as AssetLoadStatus, B as BridgeHealth, C as CheckStatus, a as ContentSegment, D as DEFAULT_CONFIG, b as DomEntityBox, c as DomLayoutData, d as DomOutputsBox, e as DomStateNode, f as DomTransitionLabel, g as DomTransitionPath, E as EffectTrace, h as EntityDefinition, i as EventLogEntry, R as RenderOptions, S as StateDefinition, j as StateMachineDefinition, T as TransitionDefinition, k as TransitionTrace, V as VerificationCheck, l as VerificationSnapshot, m as VerificationSummary, n as VisualizerConfig, o as bindCanvasCapture, p as bindEventBus, q as bindTraitStateGetter, r as clearVerification, s as cn, t as extractOutputsFromTransitions, u as extractStateMachine, v as formatGuard, w as getAllChecks, x as getBridgeHealth, y as getEffectSummary, z as getSnapshot, F as getSummary, G as getTransitions, H as getTransitionsForTrait, I as parseContentSegments, J as parseMarkdownWithCodeBlocks, K as recordTransition, L as registerCheck, M as renderStateMachineToDomData, N as renderStateMachineToSvg, O as subscribeToVerification, P as updateAssetStatus, Q as updateBridgeHealth, U as updateCheck, W as waitForTransition } from '../
|
|
1
|
+
export { A as AssetLoadStatus, B as BridgeHealth, C as CheckStatus, a as ContentSegment, D as DEFAULT_CONFIG, b as DomEntityBox, c as DomLayoutData, d as DomOutputsBox, e as DomStateNode, f as DomTransitionLabel, g as DomTransitionPath, E as EffectTrace, h as EntityDefinition, i as EventLogEntry, R as RenderOptions, S as StateDefinition, j as StateMachineDefinition, T as TransitionDefinition, k as TransitionTrace, V as VerificationCheck, l as VerificationSnapshot, m as VerificationSummary, n as VisualizerConfig, o as bindCanvasCapture, p as bindEventBus, q as bindTraitStateGetter, r as clearVerification, s as cn, t as extractOutputsFromTransitions, u as extractStateMachine, v as formatGuard, w as getAllChecks, x as getBridgeHealth, y as getEffectSummary, z as getSnapshot, F as getSummary, G as getTransitions, H as getTransitionsForTrait, I as parseContentSegments, J as parseMarkdownWithCodeBlocks, K as recordTransition, L as registerCheck, M as renderStateMachineToDomData, N as renderStateMachineToSvg, O as subscribeToVerification, P as updateAssetStatus, Q as updateBridgeHealth, U as updateCheck, W as waitForTransition } from '../parseContentSegments-BZrQRvgK.js';
|
|
2
2
|
import 'clsx';
|
|
3
3
|
|
|
4
|
-
/**
|
|
5
|
-
* Trait Registry - Tracks active traits and their state machines for debugging
|
|
6
|
-
*
|
|
7
|
-
* @packageDocumentation
|
|
8
|
-
*/
|
|
9
|
-
interface TraitTransition {
|
|
10
|
-
from: string;
|
|
11
|
-
to: string;
|
|
12
|
-
event: string;
|
|
13
|
-
guard?: string;
|
|
14
|
-
}
|
|
15
|
-
interface TraitGuard {
|
|
16
|
-
name: string;
|
|
17
|
-
lastResult?: boolean;
|
|
18
|
-
}
|
|
19
|
-
interface TraitDebugInfo {
|
|
20
|
-
id: string;
|
|
21
|
-
name: string;
|
|
22
|
-
currentState: string;
|
|
23
|
-
states: string[];
|
|
24
|
-
transitions: TraitTransition[];
|
|
25
|
-
guards: TraitGuard[];
|
|
26
|
-
transitionCount: number;
|
|
27
|
-
}
|
|
28
|
-
type ChangeListener$3 = () => void;
|
|
29
|
-
declare function registerTrait(info: TraitDebugInfo): void;
|
|
30
|
-
declare function updateTraitState(id: string, newState: string): void;
|
|
31
|
-
declare function updateGuardResult(traitId: string, guardName: string, result: boolean): void;
|
|
32
|
-
declare function unregisterTrait(id: string): void;
|
|
33
|
-
declare function getAllTraits(): TraitDebugInfo[];
|
|
34
|
-
declare function getTrait(id: string): TraitDebugInfo | undefined;
|
|
35
|
-
declare function subscribeToTraitChanges(listener: ChangeListener$3): () => void;
|
|
36
|
-
declare function clearTraits(): void;
|
|
37
|
-
|
|
38
|
-
/**
|
|
39
|
-
* Tick Registry - Tracks scheduled tick executions for debugging
|
|
40
|
-
*
|
|
41
|
-
* @packageDocumentation
|
|
42
|
-
*/
|
|
43
|
-
interface TickExecution {
|
|
44
|
-
id: string;
|
|
45
|
-
traitName: string;
|
|
46
|
-
/** Tick name (display name) */
|
|
47
|
-
name: string;
|
|
48
|
-
/** Tick identifier */
|
|
49
|
-
tickName: string;
|
|
50
|
-
interval: number;
|
|
51
|
-
/** Last execution timestamp */
|
|
52
|
-
lastRun: number;
|
|
53
|
-
lastExecuted: number | null;
|
|
54
|
-
nextExecution: number | null;
|
|
55
|
-
/** Number of times this tick has run */
|
|
56
|
-
runCount: number;
|
|
57
|
-
executionCount: number;
|
|
58
|
-
/** Average execution time in ms */
|
|
59
|
-
executionTime: number;
|
|
60
|
-
/** Whether the tick is currently active */
|
|
61
|
-
active: boolean;
|
|
62
|
-
isActive: boolean;
|
|
63
|
-
/** Guard name if this tick has a guard */
|
|
64
|
-
guardName?: string;
|
|
65
|
-
/** Whether the guard passed on last evaluation */
|
|
66
|
-
guardPassed?: boolean;
|
|
67
|
-
}
|
|
68
|
-
type ChangeListener$2 = () => void;
|
|
69
|
-
declare function registerTick(tick: TickExecution): void;
|
|
70
|
-
declare function updateTickExecution(id: string, timestamp: number): void;
|
|
71
|
-
declare function setTickActive(id: string, isActive: boolean): void;
|
|
72
|
-
declare function unregisterTick(id: string): void;
|
|
73
|
-
declare function getAllTicks(): TickExecution[];
|
|
74
|
-
declare function getTick(id: string): TickExecution | undefined;
|
|
75
|
-
declare function subscribeToTickChanges(listener: ChangeListener$2): () => void;
|
|
76
|
-
declare function clearTicks(): void;
|
|
77
|
-
|
|
78
|
-
/**
|
|
79
|
-
* Guard Registry - Tracks guard evaluations for debugging
|
|
80
|
-
*
|
|
81
|
-
* @packageDocumentation
|
|
82
|
-
*/
|
|
83
|
-
interface GuardContext {
|
|
84
|
-
traitName?: string;
|
|
85
|
-
type?: "transition" | "tick";
|
|
86
|
-
transitionFrom?: string;
|
|
87
|
-
transitionTo?: string;
|
|
88
|
-
tickName?: string;
|
|
89
|
-
[key: string]: unknown;
|
|
90
|
-
}
|
|
91
|
-
interface GuardEvaluation {
|
|
92
|
-
id: string;
|
|
93
|
-
traitName: string;
|
|
94
|
-
guardName: string;
|
|
95
|
-
expression: string;
|
|
96
|
-
result: boolean;
|
|
97
|
-
context: GuardContext;
|
|
98
|
-
timestamp: number;
|
|
99
|
-
/** Input values used in guard evaluation */
|
|
100
|
-
inputs: Record<string, unknown>;
|
|
101
|
-
}
|
|
102
|
-
type ChangeListener$1 = () => void;
|
|
103
|
-
declare function recordGuardEvaluation(evaluation: Omit<GuardEvaluation, "id" | "timestamp">): void;
|
|
104
|
-
declare function getGuardHistory(): GuardEvaluation[];
|
|
105
|
-
declare function getRecentGuardEvaluations(count: number): GuardEvaluation[];
|
|
106
|
-
declare function getGuardEvaluationsForTrait(traitName: string): GuardEvaluation[];
|
|
107
|
-
declare function subscribeToGuardChanges(listener: ChangeListener$1): () => void;
|
|
108
|
-
declare function clearGuardHistory(): void;
|
|
109
|
-
|
|
110
|
-
/**
|
|
111
|
-
* Entity Debug - Provides entity state snapshots for debugging
|
|
112
|
-
*
|
|
113
|
-
* @packageDocumentation
|
|
114
|
-
*/
|
|
115
|
-
interface EntityState {
|
|
116
|
-
id: string;
|
|
117
|
-
type: string;
|
|
118
|
-
fields: Record<string, unknown>;
|
|
119
|
-
lastUpdated: number;
|
|
120
|
-
}
|
|
121
|
-
interface RuntimeEntity {
|
|
122
|
-
id: string;
|
|
123
|
-
type: string;
|
|
124
|
-
data: Record<string, unknown>;
|
|
125
|
-
}
|
|
126
|
-
interface PersistentEntityInfo {
|
|
127
|
-
loaded: boolean;
|
|
128
|
-
count: number;
|
|
129
|
-
}
|
|
130
|
-
interface EntitySnapshot {
|
|
131
|
-
entities: EntityState[];
|
|
132
|
-
timestamp: number;
|
|
133
|
-
totalCount: number;
|
|
134
|
-
/** Singleton entities by name */
|
|
135
|
-
singletons: Record<string, unknown>;
|
|
136
|
-
/** Runtime entities (in-memory) */
|
|
137
|
-
runtime: RuntimeEntity[];
|
|
138
|
-
/** Persistent entities info by type */
|
|
139
|
-
persistent: Record<string, PersistentEntityInfo>;
|
|
140
|
-
}
|
|
141
|
-
type EntityProvider = () => EntityState[];
|
|
142
|
-
declare function setEntityProvider(provider: EntityProvider): void;
|
|
143
|
-
declare function clearEntityProvider(): void;
|
|
144
|
-
declare function getEntitySnapshot(): EntitySnapshot | null;
|
|
145
|
-
declare function getEntityById(id: string): EntityState | undefined;
|
|
146
|
-
declare function getEntitiesByType(type: string): EntityState[];
|
|
147
|
-
|
|
148
|
-
/**
|
|
149
|
-
* Debug Registry - Central event log for debugging
|
|
150
|
-
*
|
|
151
|
-
* @packageDocumentation
|
|
152
|
-
*/
|
|
153
|
-
type DebugEventType = 'state-change' | 'event-fired' | 'effect-executed' | 'guard-evaluated' | 'error' | 'warning' | 'info';
|
|
154
|
-
interface DebugEvent {
|
|
155
|
-
id: string;
|
|
156
|
-
type: DebugEventType;
|
|
157
|
-
source: string;
|
|
158
|
-
message: string;
|
|
159
|
-
data?: Record<string, unknown>;
|
|
160
|
-
timestamp: number;
|
|
161
|
-
}
|
|
162
|
-
type ChangeListener = () => void;
|
|
163
|
-
declare function logDebugEvent(type: DebugEventType, source: string, message: string, data?: Record<string, unknown>): void;
|
|
164
|
-
declare function logStateChange(source: string, from: string, to: string, event?: string): void;
|
|
165
|
-
declare function logEventFired(source: string, eventName: string, payload?: unknown): void;
|
|
166
|
-
declare function logEffectExecuted(source: string, effectType: string, details?: unknown): void;
|
|
167
|
-
declare function logError(source: string, message: string, error?: unknown): void;
|
|
168
|
-
declare function logWarning(source: string, message: string, data?: Record<string, unknown>): void;
|
|
169
|
-
declare function logInfo(source: string, message: string, data?: Record<string, unknown>): void;
|
|
170
|
-
declare function getDebugEvents(): DebugEvent[];
|
|
171
|
-
declare function getRecentEvents(count: number): DebugEvent[];
|
|
172
|
-
declare function getEventsByType(type: DebugEventType): DebugEvent[];
|
|
173
|
-
declare function getEventsBySource(source: string): DebugEvent[];
|
|
174
|
-
declare function subscribeToDebugEvents(listener: ChangeListener): () => void;
|
|
175
|
-
declare function clearDebugEvents(): void;
|
|
176
|
-
|
|
177
4
|
/**
|
|
178
5
|
* API Client - HTTP client for backend API calls
|
|
179
6
|
*
|
|
@@ -283,6 +110,179 @@ declare function onDebugToggle(listener: DebugToggleListener): () => void;
|
|
|
283
110
|
*/
|
|
284
111
|
declare function initDebugShortcut(): () => void;
|
|
285
112
|
|
|
113
|
+
/**
|
|
114
|
+
* Entity Debug - Provides entity state snapshots for debugging
|
|
115
|
+
*
|
|
116
|
+
* @packageDocumentation
|
|
117
|
+
*/
|
|
118
|
+
interface EntityState {
|
|
119
|
+
id: string;
|
|
120
|
+
type: string;
|
|
121
|
+
fields: Record<string, unknown>;
|
|
122
|
+
lastUpdated: number;
|
|
123
|
+
}
|
|
124
|
+
interface RuntimeEntity {
|
|
125
|
+
id: string;
|
|
126
|
+
type: string;
|
|
127
|
+
data: Record<string, unknown>;
|
|
128
|
+
}
|
|
129
|
+
interface PersistentEntityInfo {
|
|
130
|
+
loaded: boolean;
|
|
131
|
+
count: number;
|
|
132
|
+
}
|
|
133
|
+
interface EntitySnapshot {
|
|
134
|
+
entities: EntityState[];
|
|
135
|
+
timestamp: number;
|
|
136
|
+
totalCount: number;
|
|
137
|
+
/** Singleton entities by name */
|
|
138
|
+
singletons: Record<string, unknown>;
|
|
139
|
+
/** Runtime entities (in-memory) */
|
|
140
|
+
runtime: RuntimeEntity[];
|
|
141
|
+
/** Persistent entities info by type */
|
|
142
|
+
persistent: Record<string, PersistentEntityInfo>;
|
|
143
|
+
}
|
|
144
|
+
type EntityProvider = () => EntityState[];
|
|
145
|
+
declare function setEntityProvider(provider: EntityProvider): void;
|
|
146
|
+
declare function clearEntityProvider(): void;
|
|
147
|
+
declare function getEntitySnapshot(): EntitySnapshot | null;
|
|
148
|
+
declare function getEntityById(id: string): EntityState | undefined;
|
|
149
|
+
declare function getEntitiesByType(type: string): EntityState[];
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
* Debug Registry - Central event log for debugging
|
|
153
|
+
*
|
|
154
|
+
* @packageDocumentation
|
|
155
|
+
*/
|
|
156
|
+
type DebugEventType = 'state-change' | 'event-fired' | 'effect-executed' | 'guard-evaluated' | 'error' | 'warning' | 'info';
|
|
157
|
+
interface DebugEvent {
|
|
158
|
+
id: string;
|
|
159
|
+
type: DebugEventType;
|
|
160
|
+
source: string;
|
|
161
|
+
message: string;
|
|
162
|
+
data?: Record<string, unknown>;
|
|
163
|
+
timestamp: number;
|
|
164
|
+
}
|
|
165
|
+
type ChangeListener$3 = () => void;
|
|
166
|
+
declare function logDebugEvent(type: DebugEventType, source: string, message: string, data?: Record<string, unknown>): void;
|
|
167
|
+
declare function logStateChange(source: string, from: string, to: string, event?: string): void;
|
|
168
|
+
declare function logEventFired(source: string, eventName: string, payload?: unknown): void;
|
|
169
|
+
declare function logEffectExecuted(source: string, effectType: string, details?: unknown): void;
|
|
170
|
+
declare function logError(source: string, message: string, error?: unknown): void;
|
|
171
|
+
declare function logWarning(source: string, message: string, data?: Record<string, unknown>): void;
|
|
172
|
+
declare function logInfo(source: string, message: string, data?: Record<string, unknown>): void;
|
|
173
|
+
declare function getDebugEvents(): DebugEvent[];
|
|
174
|
+
declare function getRecentEvents(count: number): DebugEvent[];
|
|
175
|
+
declare function getEventsByType(type: DebugEventType): DebugEvent[];
|
|
176
|
+
declare function getEventsBySource(source: string): DebugEvent[];
|
|
177
|
+
declare function subscribeToDebugEvents(listener: ChangeListener$3): () => void;
|
|
178
|
+
declare function clearDebugEvents(): void;
|
|
179
|
+
|
|
180
|
+
/**
|
|
181
|
+
* Guard Registry - Tracks guard evaluations for debugging
|
|
182
|
+
*
|
|
183
|
+
* @packageDocumentation
|
|
184
|
+
*/
|
|
185
|
+
interface GuardContext {
|
|
186
|
+
traitName?: string;
|
|
187
|
+
type?: "transition" | "tick";
|
|
188
|
+
transitionFrom?: string;
|
|
189
|
+
transitionTo?: string;
|
|
190
|
+
tickName?: string;
|
|
191
|
+
[key: string]: unknown;
|
|
192
|
+
}
|
|
193
|
+
interface GuardEvaluation {
|
|
194
|
+
id: string;
|
|
195
|
+
traitName: string;
|
|
196
|
+
guardName: string;
|
|
197
|
+
expression: string;
|
|
198
|
+
result: boolean;
|
|
199
|
+
context: GuardContext;
|
|
200
|
+
timestamp: number;
|
|
201
|
+
/** Input values used in guard evaluation */
|
|
202
|
+
inputs: Record<string, unknown>;
|
|
203
|
+
}
|
|
204
|
+
type ChangeListener$2 = () => void;
|
|
205
|
+
declare function recordGuardEvaluation(evaluation: Omit<GuardEvaluation, "id" | "timestamp">): void;
|
|
206
|
+
declare function getGuardHistory(): GuardEvaluation[];
|
|
207
|
+
declare function getRecentGuardEvaluations(count: number): GuardEvaluation[];
|
|
208
|
+
declare function getGuardEvaluationsForTrait(traitName: string): GuardEvaluation[];
|
|
209
|
+
declare function subscribeToGuardChanges(listener: ChangeListener$2): () => void;
|
|
210
|
+
declare function clearGuardHistory(): void;
|
|
211
|
+
|
|
212
|
+
/**
|
|
213
|
+
* Tick Registry - Tracks scheduled tick executions for debugging
|
|
214
|
+
*
|
|
215
|
+
* @packageDocumentation
|
|
216
|
+
*/
|
|
217
|
+
interface TickExecution {
|
|
218
|
+
id: string;
|
|
219
|
+
traitName: string;
|
|
220
|
+
/** Tick name (display name) */
|
|
221
|
+
name: string;
|
|
222
|
+
/** Tick identifier */
|
|
223
|
+
tickName: string;
|
|
224
|
+
interval: number;
|
|
225
|
+
/** Last execution timestamp */
|
|
226
|
+
lastRun: number;
|
|
227
|
+
lastExecuted: number | null;
|
|
228
|
+
nextExecution: number | null;
|
|
229
|
+
/** Number of times this tick has run */
|
|
230
|
+
runCount: number;
|
|
231
|
+
executionCount: number;
|
|
232
|
+
/** Average execution time in ms */
|
|
233
|
+
executionTime: number;
|
|
234
|
+
/** Whether the tick is currently active */
|
|
235
|
+
active: boolean;
|
|
236
|
+
isActive: boolean;
|
|
237
|
+
/** Guard name if this tick has a guard */
|
|
238
|
+
guardName?: string;
|
|
239
|
+
/** Whether the guard passed on last evaluation */
|
|
240
|
+
guardPassed?: boolean;
|
|
241
|
+
}
|
|
242
|
+
type ChangeListener$1 = () => void;
|
|
243
|
+
declare function registerTick(tick: TickExecution): void;
|
|
244
|
+
declare function updateTickExecution(id: string, timestamp: number): void;
|
|
245
|
+
declare function setTickActive(id: string, isActive: boolean): void;
|
|
246
|
+
declare function unregisterTick(id: string): void;
|
|
247
|
+
declare function getAllTicks(): TickExecution[];
|
|
248
|
+
declare function getTick(id: string): TickExecution | undefined;
|
|
249
|
+
declare function subscribeToTickChanges(listener: ChangeListener$1): () => void;
|
|
250
|
+
declare function clearTicks(): void;
|
|
251
|
+
|
|
252
|
+
/**
|
|
253
|
+
* Trait Registry - Tracks active traits and their state machines for debugging
|
|
254
|
+
*
|
|
255
|
+
* @packageDocumentation
|
|
256
|
+
*/
|
|
257
|
+
interface TraitTransition {
|
|
258
|
+
from: string;
|
|
259
|
+
to: string;
|
|
260
|
+
event: string;
|
|
261
|
+
guard?: string;
|
|
262
|
+
}
|
|
263
|
+
interface TraitGuard {
|
|
264
|
+
name: string;
|
|
265
|
+
lastResult?: boolean;
|
|
266
|
+
}
|
|
267
|
+
interface TraitDebugInfo {
|
|
268
|
+
id: string;
|
|
269
|
+
name: string;
|
|
270
|
+
currentState: string;
|
|
271
|
+
states: string[];
|
|
272
|
+
transitions: TraitTransition[];
|
|
273
|
+
guards: TraitGuard[];
|
|
274
|
+
transitionCount: number;
|
|
275
|
+
}
|
|
276
|
+
type ChangeListener = () => void;
|
|
277
|
+
declare function registerTrait(info: TraitDebugInfo): void;
|
|
278
|
+
declare function updateTraitState(id: string, newState: string): void;
|
|
279
|
+
declare function updateGuardResult(traitId: string, guardName: string, result: boolean): void;
|
|
280
|
+
declare function unregisterTrait(id: string): void;
|
|
281
|
+
declare function getAllTraits(): TraitDebugInfo[];
|
|
282
|
+
declare function getTrait(id: string): TraitDebugInfo | undefined;
|
|
283
|
+
declare function subscribeToTraitChanges(listener: ChangeListener): () => void;
|
|
284
|
+
declare function clearTraits(): void;
|
|
285
|
+
|
|
286
286
|
/**
|
|
287
287
|
* Get Nested Value Utility
|
|
288
288
|
*
|
package/dist/lib/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { DEFAULT_CONFIG, clearDebugEvents, clearEntityProvider, clearGuardHistory, clearTicks, extractOutputsFromTransitions, extractStateMachine, formatGuard, getAllTicks, getDebugEvents, getEffectSummary, getEntitiesByType, getEntityById, getEntitySnapshot, getEventsBySource, getEventsByType, getGuardEvaluationsForTrait, getGuardHistory, getRecentEvents, getRecentGuardEvaluations, getTick, initDebugShortcut, logDebugEvent, logEffectExecuted, logError, logEventFired, logInfo, logStateChange, logWarning, onDebugToggle, parseContentSegments, parseMarkdownWithCodeBlocks, recordGuardEvaluation, registerTick, renderStateMachineToDomData, renderStateMachineToSvg, setDebugEnabled, setEntityProvider, setTickActive, subscribeToDebugEvents, subscribeToGuardChanges, subscribeToTickChanges, toggleDebug, unregisterTick, updateTickExecution } from '../chunk-
|
|
1
|
+
export { DEFAULT_CONFIG, clearDebugEvents, clearEntityProvider, clearGuardHistory, clearTicks, extractOutputsFromTransitions, extractStateMachine, formatGuard, getAllTicks, getDebugEvents, getEffectSummary, getEntitiesByType, getEntityById, getEntitySnapshot, getEventsBySource, getEventsByType, getGuardEvaluationsForTrait, getGuardHistory, getRecentEvents, getRecentGuardEvaluations, getTick, initDebugShortcut, logDebugEvent, logEffectExecuted, logError, logEventFired, logInfo, logStateChange, logWarning, onDebugToggle, parseContentSegments, parseMarkdownWithCodeBlocks, recordGuardEvaluation, registerTick, renderStateMachineToDomData, renderStateMachineToSvg, setDebugEnabled, setEntityProvider, setTickActive, subscribeToDebugEvents, subscribeToGuardChanges, subscribeToTickChanges, toggleDebug, unregisterTick, updateTickExecution } from '../chunk-MNMASFYN.js';
|
|
2
2
|
export { clearTraits, getAllTraits, getTrait, registerTrait, subscribeToTraitChanges, unregisterTrait, updateGuardResult, updateTraitState } from '../chunk-42YQ6JVR.js';
|
|
3
3
|
export { ApiError, apiClient } from '../chunk-3HJHHULT.js';
|
|
4
4
|
export { bindCanvasCapture, bindEventBus, bindTraitStateGetter, clearVerification, cn, debug, debugCollision, debugError, debugGameState, debugGroup, debugGroupEnd, debugInput, debugPhysics, debugTable, debugTime, debugTimeEnd, debugWarn, formatNestedFieldLabel, getAllChecks, getBridgeHealth, getNestedValue, getSnapshot, getSummary, getTransitions, getTransitionsForTrait, isDebugEnabled, recordTransition, registerCheck, subscribeToVerification, updateAssetStatus, updateBridgeHealth, updateCheck, waitForTransition } from '../chunk-WCTZ7WZX.js';
|
package/dist/providers/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export { FetchedDataContext, FetchedDataProvider, OfflineModeProvider, OrbitalProvider, VerificationProvider, useFetchedData, useFetchedDataContext, useFetchedEntity, useOfflineMode, useOptionalOfflineMode } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
3
|
-
import '../chunk-
|
|
4
|
-
export { SelectionContext, SelectionProvider, useSelection, useSelectionOptional } from '../chunk-
|
|
1
|
+
export { FetchedDataContext, FetchedDataProvider, OfflineModeProvider, OrbitalProvider, VerificationProvider, useFetchedData, useFetchedDataContext, useFetchedEntity, useOfflineMode, useOptionalOfflineMode } from '../chunk-XF7GGUTH.js';
|
|
2
|
+
import '../chunk-YYCP5CD7.js';
|
|
3
|
+
import '../chunk-YLKXEXBP.js';
|
|
4
|
+
export { SelectionContext, SelectionProvider, useSelection, useSelectionOptional } from '../chunk-3CP74CBL.js';
|
|
5
5
|
export { EventBusContext, EventBusProvider } from '../chunk-YXZM3WCF.js';
|
|
6
6
|
import '../chunk-3JGAROCW.js';
|
|
7
|
-
import '../chunk-WCTZ7WZX.js';
|
|
8
7
|
import '../chunk-2XXSUIOK.js';
|
|
8
|
+
import '../chunk-WCTZ7WZX.js';
|
|
9
9
|
import '../chunk-K2D5D3WK.js';
|
|
10
10
|
import '../chunk-PKBMQBKP.js';
|
package/dist/runtime/index.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import '../chunk-
|
|
1
|
+
import '../chunk-X2ZDE63F.js';
|
|
2
2
|
import '../chunk-N7MVUW4R.js';
|
|
3
3
|
import { registerTrait, unregisterTrait, updateTraitState } from '../chunk-42YQ6JVR.js';
|
|
4
4
|
import '../chunk-3HJHHULT.js';
|
|
5
|
-
import { useFetchedDataContext } from '../chunk-
|
|
6
|
-
import '../chunk-
|
|
7
|
-
import '../chunk-
|
|
8
|
-
import '../chunk-
|
|
5
|
+
import { useFetchedDataContext } from '../chunk-XF7GGUTH.js';
|
|
6
|
+
import '../chunk-YYCP5CD7.js';
|
|
7
|
+
import '../chunk-YLKXEXBP.js';
|
|
8
|
+
import '../chunk-3CP74CBL.js';
|
|
9
9
|
import { useEventBus } from '../chunk-YXZM3WCF.js';
|
|
10
10
|
import '../chunk-3JGAROCW.js';
|
|
11
|
-
import { recordTransition } from '../chunk-WCTZ7WZX.js';
|
|
12
11
|
import '../chunk-2XXSUIOK.js';
|
|
12
|
+
import { recordTransition } from '../chunk-WCTZ7WZX.js';
|
|
13
13
|
import '../chunk-K2D5D3WK.js';
|
|
14
14
|
import '../chunk-PKBMQBKP.js';
|
|
15
15
|
import { createContext, useMemo, useContext, useState, useRef, useEffect, useCallback } from 'react';
|
package/package.json
CHANGED
package/themes/arctic.css
CHANGED
|
@@ -25,8 +25,8 @@
|
|
|
25
25
|
/* Border radius - Precise, clean */
|
|
26
26
|
--radius-none: 0px;
|
|
27
27
|
--radius-sm: 4px;
|
|
28
|
-
--radius-md:
|
|
29
|
-
--radius-lg:
|
|
28
|
+
--radius-md: 8px;
|
|
29
|
+
--radius-lg: 12px;
|
|
30
30
|
--radius-xl: 14px;
|
|
31
31
|
--radius-full: 9999px;
|
|
32
32
|
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
|
|
72
72
|
/* Typography */
|
|
73
73
|
--font-family:
|
|
74
|
-
"Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
|
|
74
|
+
"Plus Jakarta Sans", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
|
|
75
75
|
--font-weight-normal: 400;
|
|
76
76
|
--font-weight-medium: 500;
|
|
77
77
|
--font-weight-bold: 600;
|
|
@@ -119,8 +119,8 @@
|
|
|
119
119
|
/* Border radius - Precise, clean */
|
|
120
120
|
--radius-none: 0px;
|
|
121
121
|
--radius-sm: 4px;
|
|
122
|
-
--radius-md:
|
|
123
|
-
--radius-lg:
|
|
122
|
+
--radius-md: 8px;
|
|
123
|
+
--radius-lg: 12px;
|
|
124
124
|
--radius-xl: 14px;
|
|
125
125
|
--radius-full: 9999px;
|
|
126
126
|
|
|
@@ -165,7 +165,7 @@
|
|
|
165
165
|
|
|
166
166
|
/* Typography */
|
|
167
167
|
--font-family:
|
|
168
|
-
"Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
|
|
168
|
+
"Plus Jakarta Sans", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
|
|
169
169
|
--font-weight-normal: 400;
|
|
170
170
|
--font-weight-medium: 500;
|
|
171
171
|
--font-weight-bold: 600;
|
package/themes/copper.css
CHANGED
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
|
|
72
72
|
/* Typography - Heavier weights, functional */
|
|
73
73
|
--font-family:
|
|
74
|
-
"Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
|
|
74
|
+
"Plus Jakarta Sans", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
|
|
75
75
|
--font-weight-normal: 500;
|
|
76
76
|
--font-weight-medium: 600;
|
|
77
77
|
--font-weight-bold: 700;
|
|
@@ -165,7 +165,7 @@
|
|
|
165
165
|
|
|
166
166
|
/* Typography - Heavier weights, functional */
|
|
167
167
|
--font-family:
|
|
168
|
-
"Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
|
|
168
|
+
"Plus Jakarta Sans", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
|
|
169
169
|
--font-weight-normal: 500;
|
|
170
170
|
--font-weight-medium: 600;
|
|
171
171
|
--font-weight-bold: 700;
|
package/themes/ember.css
CHANGED
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
/* Border radius - Controlled, not too rounded */
|
|
27
27
|
--radius-none: 0px;
|
|
28
28
|
--radius-sm: 4px;
|
|
29
|
-
--radius-md:
|
|
30
|
-
--radius-lg:
|
|
29
|
+
--radius-md: 8px;
|
|
30
|
+
--radius-lg: 12px;
|
|
31
31
|
--radius-xl: 12px;
|
|
32
32
|
--radius-full: 9999px;
|
|
33
33
|
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
|
|
73
73
|
/* Typography - Bold, heavy */
|
|
74
74
|
--font-family:
|
|
75
|
-
"Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
|
|
75
|
+
"Plus Jakarta Sans", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
|
|
76
76
|
--font-weight-normal: 500;
|
|
77
77
|
--font-weight-medium: 600;
|
|
78
78
|
--font-weight-bold: 800;
|
|
@@ -122,8 +122,8 @@
|
|
|
122
122
|
/* Border radius - Controlled, not too rounded */
|
|
123
123
|
--radius-none: 0px;
|
|
124
124
|
--radius-sm: 4px;
|
|
125
|
-
--radius-md:
|
|
126
|
-
--radius-lg:
|
|
125
|
+
--radius-md: 8px;
|
|
126
|
+
--radius-lg: 12px;
|
|
127
127
|
--radius-xl: 12px;
|
|
128
128
|
--radius-full: 9999px;
|
|
129
129
|
|
|
@@ -168,7 +168,7 @@
|
|
|
168
168
|
|
|
169
169
|
/* Typography - Bold, heavy */
|
|
170
170
|
--font-family:
|
|
171
|
-
"Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
|
|
171
|
+
"Plus Jakarta Sans", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
|
|
172
172
|
--font-weight-normal: 500;
|
|
173
173
|
--font-weight-medium: 600;
|
|
174
174
|
--font-weight-bold: 800;
|
package/themes/forest.css
CHANGED
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
|
|
73
73
|
/* Typography - Natural, grounded */
|
|
74
74
|
--font-family:
|
|
75
|
-
"Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
|
|
75
|
+
"Plus Jakarta Sans", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
|
|
76
76
|
--font-weight-normal: 400;
|
|
77
77
|
--font-weight-medium: 500;
|
|
78
78
|
--font-weight-bold: 600;
|
|
@@ -168,7 +168,7 @@
|
|
|
168
168
|
|
|
169
169
|
/* Typography - Natural, grounded */
|
|
170
170
|
--font-family:
|
|
171
|
-
"Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
|
|
171
|
+
"Plus Jakarta Sans", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
|
|
172
172
|
--font-weight-normal: 400;
|
|
173
173
|
--font-weight-medium: 500;
|
|
174
174
|
--font-weight-bold: 600;
|