@almadar/ui 6.15.0 → 6.17.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/{EntityBindingContext-EJoTtuTR.d.cts → EntityBindingContext-Dglbi9ks.d.cts} +1 -1
- package/dist/{EntityBindingContext-EJoTtuTR.d.ts → EntityBindingContext-Dglbi9ks.d.ts} +1 -1
- package/dist/avl/index.cjs +179 -83
- package/dist/avl/index.js +179 -83
- package/dist/{avl-schema-parser-B25PL-a8.d.cts → avl-schema-parser-dGHC5jUf.d.cts} +5 -5
- package/dist/{avl-schema-parser-CM0pQo8E.d.ts → avl-schema-parser-tzl7qXDY.d.ts} +5 -5
- package/dist/components/index.cjs +118 -57
- package/dist/components/index.d.cts +49 -19
- package/dist/components/index.d.ts +49 -19
- package/dist/components/index.js +118 -57
- package/dist/lib/drawable/three/index.cjs +25 -5
- package/dist/lib/drawable/three/index.d.cts +2 -2
- package/dist/lib/drawable/three/index.d.ts +2 -2
- package/dist/lib/drawable/three/index.js +25 -5
- package/dist/lib/index.cjs +22 -0
- package/dist/lib/index.d.cts +10 -2
- package/dist/lib/index.d.ts +10 -2
- package/dist/lib/index.js +20 -1
- package/dist/providers/index.cjs +141 -65
- package/dist/providers/index.d.cts +1 -1
- package/dist/providers/index.d.ts +1 -1
- package/dist/providers/index.js +141 -65
- package/dist/runtime/index.cjs +177 -81
- package/dist/runtime/index.d.cts +17 -5
- package/dist/runtime/index.d.ts +17 -5
- package/dist/runtime/index.js +177 -81
- package/package.json +4 -4
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as CanvasPointLightConfig, I as IsometricTile, a as IsometricUnit, b as IsometricFeature, A as ApplicationLevelData, O as OrbitalLevelData, T as TraitLevelData, c as TransitionLevelData } from '../../../avl-schema-parser-
|
|
2
|
-
export { d as Canvas3DHost, e as Canvas3DHostHandle, f as Canvas3DHostProps, d as GameCanvas3D, U as UnitAnimationState } from '../../../avl-schema-parser-
|
|
1
|
+
import { C as CanvasPointLightConfig, I as IsometricTile, a as IsometricUnit, b as IsometricFeature, A as ApplicationLevelData, O as OrbitalLevelData, T as TraitLevelData, c as TransitionLevelData } from '../../../avl-schema-parser-dGHC5jUf.cjs';
|
|
2
|
+
export { d as Canvas3DHost, e as Canvas3DHostHandle, f as Canvas3DHostProps, d as GameCanvas3D, U as UnitAnimationState } from '../../../avl-schema-parser-dGHC5jUf.cjs';
|
|
3
3
|
import * as React$1 from 'react';
|
|
4
4
|
import React__default, { Component, ReactNode, ErrorInfo } from 'react';
|
|
5
5
|
import * as THREE from 'three';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as CanvasPointLightConfig, I as IsometricTile, a as IsometricUnit, b as IsometricFeature, A as ApplicationLevelData, O as OrbitalLevelData, T as TraitLevelData, c as TransitionLevelData } from '../../../avl-schema-parser-
|
|
2
|
-
export { d as Canvas3DHost, e as Canvas3DHostHandle, f as Canvas3DHostProps, d as GameCanvas3D, U as UnitAnimationState } from '../../../avl-schema-parser-
|
|
1
|
+
import { C as CanvasPointLightConfig, I as IsometricTile, a as IsometricUnit, b as IsometricFeature, A as ApplicationLevelData, O as OrbitalLevelData, T as TraitLevelData, c as TransitionLevelData } from '../../../avl-schema-parser-tzl7qXDY.js';
|
|
2
|
+
export { d as Canvas3DHost, e as Canvas3DHostHandle, f as Canvas3DHostProps, d as GameCanvas3D, U as UnitAnimationState } from '../../../avl-schema-parser-tzl7qXDY.js';
|
|
3
3
|
import * as React$1 from 'react';
|
|
4
4
|
import React__default, { Component, ReactNode, ErrorInfo } from 'react';
|
|
5
5
|
import * as THREE from 'three';
|
|
@@ -150,6 +150,25 @@ function useEmitEvent() {
|
|
|
150
150
|
);
|
|
151
151
|
}
|
|
152
152
|
|
|
153
|
+
// lib/keyMapEvent.ts
|
|
154
|
+
function isEditableTarget(target) {
|
|
155
|
+
if (!(target instanceof HTMLElement)) return false;
|
|
156
|
+
const tag = target.tagName;
|
|
157
|
+
if (tag === "INPUT" || tag === "TEXTAREA" || tag === "SELECT") return true;
|
|
158
|
+
return target.isContentEditable || target.contentEditable === "true";
|
|
159
|
+
}
|
|
160
|
+
function keyMapCode(e) {
|
|
161
|
+
let code = e.code;
|
|
162
|
+
if (e.altKey) code = `Alt+${code}`;
|
|
163
|
+
if (e.shiftKey) code = `Shift+${code}`;
|
|
164
|
+
if (e.metaKey || e.ctrlKey) code = `Mod+${code}`;
|
|
165
|
+
return code;
|
|
166
|
+
}
|
|
167
|
+
function resolveKeyMapEvent(map, e) {
|
|
168
|
+
if (!map || isEditableTarget(e.target)) return void 0;
|
|
169
|
+
return map[keyMapCode(e)] ?? map[e.code];
|
|
170
|
+
}
|
|
171
|
+
|
|
153
172
|
// lib/drawable/contract.ts
|
|
154
173
|
function isValidScenePos(pos) {
|
|
155
174
|
return Number.isFinite(pos?.x) && Number.isFinite(pos?.y);
|
|
@@ -2063,17 +2082,18 @@ var Canvas3DHost = forwardRef(
|
|
|
2063
2082
|
useEffect(() => {
|
|
2064
2083
|
if (!keyMap && !keyUpMap) return;
|
|
2065
2084
|
const down = (e) => {
|
|
2066
|
-
|
|
2067
|
-
keysRef.current.
|
|
2068
|
-
|
|
2085
|
+
const code = keyMapCode(e);
|
|
2086
|
+
if (keysRef.current.has(code)) return;
|
|
2087
|
+
keysRef.current.add(code);
|
|
2088
|
+
const ev = resolveKeyMapEvent(keyMap, e);
|
|
2069
2089
|
if (ev) {
|
|
2070
2090
|
eventBus.emit(`UI:${ev}`, {});
|
|
2071
2091
|
e.preventDefault();
|
|
2072
2092
|
}
|
|
2073
2093
|
};
|
|
2074
2094
|
const up = (e) => {
|
|
2075
|
-
keysRef.current.delete(e
|
|
2076
|
-
const ev = keyUpMap
|
|
2095
|
+
keysRef.current.delete(keyMapCode(e));
|
|
2096
|
+
const ev = resolveKeyMapEvent(keyUpMap, e);
|
|
2077
2097
|
if (ev) eventBus.emit(`UI:${ev}`, {});
|
|
2078
2098
|
};
|
|
2079
2099
|
window.addEventListener("keydown", down);
|
package/dist/lib/index.cjs
CHANGED
|
@@ -942,6 +942,25 @@ function formatNestedFieldLabel(path) {
|
|
|
942
942
|
return lastPart.replace(/([A-Z])/g, " $1").replace(/^./, (str) => str.toUpperCase()).replace(/Id$/, "").trim();
|
|
943
943
|
}
|
|
944
944
|
|
|
945
|
+
// lib/keyMapEvent.ts
|
|
946
|
+
function isEditableTarget(target) {
|
|
947
|
+
if (!(target instanceof HTMLElement)) return false;
|
|
948
|
+
const tag = target.tagName;
|
|
949
|
+
if (tag === "INPUT" || tag === "TEXTAREA" || tag === "SELECT") return true;
|
|
950
|
+
return target.isContentEditable || target.contentEditable === "true";
|
|
951
|
+
}
|
|
952
|
+
function keyMapCode(e) {
|
|
953
|
+
let code = e.code;
|
|
954
|
+
if (e.altKey) code = `Alt+${code}`;
|
|
955
|
+
if (e.shiftKey) code = `Shift+${code}`;
|
|
956
|
+
if (e.metaKey || e.ctrlKey) code = `Mod+${code}`;
|
|
957
|
+
return code;
|
|
958
|
+
}
|
|
959
|
+
function resolveKeyMapEvent(map, e) {
|
|
960
|
+
if (!map || isEditableTarget(e.target)) return void 0;
|
|
961
|
+
return map[keyMapCode(e)] ?? map[e.code];
|
|
962
|
+
}
|
|
963
|
+
|
|
945
964
|
// lib/visualizer/index.ts
|
|
946
965
|
function formatSExprGuardToDomain(guard, _entityName) {
|
|
947
966
|
if (Array.isArray(guard)) {
|
|
@@ -2579,8 +2598,10 @@ exports.humanizeEnumValue = humanizeEnumValue;
|
|
|
2579
2598
|
exports.humanizeFieldName = humanizeFieldName;
|
|
2580
2599
|
exports.initDebugShortcut = initDebugShortcut;
|
|
2581
2600
|
exports.isDebugEnabled = isDebugEnabled;
|
|
2601
|
+
exports.isEditableTarget = isEditableTarget;
|
|
2582
2602
|
exports.isEditorMotion = isEditorMotion;
|
|
2583
2603
|
exports.isEditorOperator = isEditorOperator;
|
|
2604
|
+
exports.keyMapCode = keyMapCode;
|
|
2584
2605
|
exports.lockIconPath = lockIconPath;
|
|
2585
2606
|
exports.logDebugEvent = logDebugEvent;
|
|
2586
2607
|
exports.logEffectExecuted = logEffectExecuted;
|
|
@@ -2606,6 +2627,7 @@ exports.registerTraitSnapshot = registerTraitSnapshot;
|
|
|
2606
2627
|
exports.renderStateMachineToDomData = renderStateMachineToDomData;
|
|
2607
2628
|
exports.renderStateMachineToSvg = renderStateMachineToSvg;
|
|
2608
2629
|
exports.resolveImageUrl = resolveImageUrl;
|
|
2630
|
+
exports.resolveKeyMapEvent = resolveKeyMapEvent;
|
|
2609
2631
|
exports.setDebugEnabled = setDebugEnabled;
|
|
2610
2632
|
exports.setEntityProvider = setEntityProvider;
|
|
2611
2633
|
exports.setTickActive = setTickActive;
|
package/dist/lib/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { A as ApplyOperatorInput, a as ApplyOperatorResult, C 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 EDITOR_MOTIONS, h as EDITOR_OPERATORS, i as EditorMotion, j as EditorOperator, k as EntityDefinition, I as INDENT_UNIT, L as LessonSegment, R as RenderOptions, S as StateDefinition, l as StateMachineDefinition, T as TransitionDefinition, V as VisualizerConfig, m as applyMotion, n as applyOperator, o as cn, p as extractOutputsFromTransitions, q as extractStateMachine, r as formatGuard, s as getEffectSummary, t as isEditorMotion, u as isEditorOperator, v as motionRange, w as parseContentSegments, x as parseLessonSegments, y as parseMarkdownWithCodeBlocks, z as renderStateMachineToDomData, B as renderStateMachineToSvg } from '../cn-Do5gsPBm.cjs';
|
|
2
|
-
import { FieldValue, EntityRow } from '@almadar/core';
|
|
2
|
+
import { FieldValue, EntityRow, EventKey } from '@almadar/core';
|
|
3
3
|
export { AssetLoadStatus, BridgeHealth, CheckStatus, EffectTrace, EventLogEntry, OrbitalVerificationAPI, ServerResponseTrace, TraitStateSnapshot, TransitionTrace, VerificationCheck, VerificationSnapshot, VerificationSummary, getNestedValue } from '@almadar/core';
|
|
4
4
|
export { p as profilerOnRender, u as usePerfBuffer } from '../perf-DaVdsbU0.cjs';
|
|
5
5
|
export { T as TraitSnapshotGetter, b as bindCanvasCapture, a as bindEventBus, c as bindLastDrawables, d as bindTraitStateGetter, e as clearVerification, g as getAllChecks, f as getBridgeHealth, h as getSnapshot, i as getSummary, j as getTraitSnapshots, k as getTransitions, l as getTransitionsForTrait, r as recordServerResponse, m as recordTransition, n as registerCheck, o as registerTraitSnapshot, s as subscribeToVerification, u as updateAssetStatus, p as updateBridgeHealth, q as updateCheck, w as waitForTransition } from '../verificationRegistry-DTrKDRoa.cjs';
|
|
@@ -408,6 +408,14 @@ declare function resolveImageUrl(value: FieldValue | undefined): string | undefi
|
|
|
408
408
|
*/
|
|
409
409
|
declare function formatNestedFieldLabel(path: string): string;
|
|
410
410
|
|
|
411
|
+
type KeyMap = Record<string, EventKey>;
|
|
412
|
+
declare function isEditableTarget(target: EventTarget | null): boolean;
|
|
413
|
+
declare function keyMapCode(e: KeyboardEvent): string;
|
|
414
|
+
/** A modified entry (`Mod+`/`Shift+`/`Alt+` prefixed) wins over the bare code; a bare
|
|
415
|
+
* entry still fires under modifiers it never declared (existing boards keep their
|
|
416
|
+
* bindings); keystrokes in editable elements never route. */
|
|
417
|
+
declare function resolveKeyMapEvent(map: KeyMap | undefined, e: KeyboardEvent): EventKey | undefined;
|
|
418
|
+
|
|
411
419
|
/**
|
|
412
420
|
* Shared types for the Al-Jazari state machine visualization.
|
|
413
421
|
* Pure TypeScript — zero React/DOM dependencies.
|
|
@@ -593,4 +601,4 @@ declare function eightPointedStarPath(cx: number, cy: number, outerR: number, in
|
|
|
593
601
|
*/
|
|
594
602
|
declare function arrowheadPath(size: number): string;
|
|
595
603
|
|
|
596
|
-
export { ApiError, type CommandSendPump, type DebugEvent, type DebugEventType, type EntitySnapshot, type EntityState, type GuardContext, type GuardEvaluation, JAZARI_COLORS, type JazariArmLayout, type JazariEffectInfo, type JazariGearLayout, type JazariGuardInfo, type JazariLayout, type LayoutInput, type LayoutState, type LayoutTransition, type PersistentEntityInfo, type RuntimeEntity, type SortDirection, type TickExecution, type TickSendRelay, type TraitDebugInfo, type TraitGuard, type TraitTransition, type ValueFormat, apiClient, arrowheadPath, brainIconPath, clearDebugEvents, clearEntityProvider, clearGuardHistory, clearTicks, clearTraits, compareCellValues, computeJazariLayout, createCommandSendPump, createTickSendRelay, debug, debugCollision, debugError, debugGameState, debugGroup, debugGroupEnd, debugInput, debugPhysics, debugTable, debugTime, debugTimeEnd, debugWarn, eightPointedStarPath, formatDate, formatDateTime, formatNestedFieldLabel, formatTime, formatValue, gearTeethPath, getAllTicks, getAllTraits, getDebugEvents, getEntitiesByType, getEntityById, getEntitySnapshot, getEventsBySource, getEventsByType, getGuardEvaluationsForTrait, getGuardHistory, getRecentEvents, getRecentGuardEvaluations, getTick, getTrait, humanizeEnumValue, humanizeFieldName, initDebugShortcut, isDebugEnabled, lockIconPath, logDebugEvent, logEffectExecuted, logError, logEventFired, logInfo, logStateChange, logWarning, onDebugToggle, pipeIconPath, recordGuardEvaluation, registerTick, registerTrait, resolveImageUrl, setDebugEnabled, setEntityProvider, setTickActive, sortRows, subscribeToDebugEvents, subscribeToGuardChanges, subscribeToTickChanges, subscribeToTraitChanges, toggleDebug, unregisterTick, unregisterTrait, updateGuardResult, updateTickExecution, updateTraitState };
|
|
604
|
+
export { ApiError, type CommandSendPump, type DebugEvent, type DebugEventType, type EntitySnapshot, type EntityState, type GuardContext, type GuardEvaluation, JAZARI_COLORS, type JazariArmLayout, type JazariEffectInfo, type JazariGearLayout, type JazariGuardInfo, type JazariLayout, type KeyMap, type LayoutInput, type LayoutState, type LayoutTransition, type PersistentEntityInfo, type RuntimeEntity, type SortDirection, type TickExecution, type TickSendRelay, type TraitDebugInfo, type TraitGuard, type TraitTransition, type ValueFormat, apiClient, arrowheadPath, brainIconPath, clearDebugEvents, clearEntityProvider, clearGuardHistory, clearTicks, clearTraits, compareCellValues, computeJazariLayout, createCommandSendPump, createTickSendRelay, debug, debugCollision, debugError, debugGameState, debugGroup, debugGroupEnd, debugInput, debugPhysics, debugTable, debugTime, debugTimeEnd, debugWarn, eightPointedStarPath, formatDate, formatDateTime, formatNestedFieldLabel, formatTime, formatValue, gearTeethPath, getAllTicks, getAllTraits, getDebugEvents, getEntitiesByType, getEntityById, getEntitySnapshot, getEventsBySource, getEventsByType, getGuardEvaluationsForTrait, getGuardHistory, getRecentEvents, getRecentGuardEvaluations, getTick, getTrait, humanizeEnumValue, humanizeFieldName, initDebugShortcut, isDebugEnabled, isEditableTarget, keyMapCode, lockIconPath, logDebugEvent, logEffectExecuted, logError, logEventFired, logInfo, logStateChange, logWarning, onDebugToggle, pipeIconPath, recordGuardEvaluation, registerTick, registerTrait, resolveImageUrl, resolveKeyMapEvent, setDebugEnabled, setEntityProvider, setTickActive, sortRows, subscribeToDebugEvents, subscribeToGuardChanges, subscribeToTickChanges, subscribeToTraitChanges, toggleDebug, unregisterTick, unregisterTrait, updateGuardResult, updateTickExecution, updateTraitState };
|
package/dist/lib/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { A as ApplyOperatorInput, a as ApplyOperatorResult, C 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 EDITOR_MOTIONS, h as EDITOR_OPERATORS, i as EditorMotion, j as EditorOperator, k as EntityDefinition, I as INDENT_UNIT, L as LessonSegment, R as RenderOptions, S as StateDefinition, l as StateMachineDefinition, T as TransitionDefinition, V as VisualizerConfig, m as applyMotion, n as applyOperator, o as cn, p as extractOutputsFromTransitions, q as extractStateMachine, r as formatGuard, s as getEffectSummary, t as isEditorMotion, u as isEditorOperator, v as motionRange, w as parseContentSegments, x as parseLessonSegments, y as parseMarkdownWithCodeBlocks, z as renderStateMachineToDomData, B as renderStateMachineToSvg } from '../cn-Do5gsPBm.js';
|
|
2
|
-
import { FieldValue, EntityRow } from '@almadar/core';
|
|
2
|
+
import { FieldValue, EntityRow, EventKey } from '@almadar/core';
|
|
3
3
|
export { AssetLoadStatus, BridgeHealth, CheckStatus, EffectTrace, EventLogEntry, OrbitalVerificationAPI, ServerResponseTrace, TraitStateSnapshot, TransitionTrace, VerificationCheck, VerificationSnapshot, VerificationSummary, getNestedValue } from '@almadar/core';
|
|
4
4
|
export { p as profilerOnRender, u as usePerfBuffer } from '../perf-DaVdsbU0.js';
|
|
5
5
|
export { T as TraitSnapshotGetter, b as bindCanvasCapture, a as bindEventBus, c as bindLastDrawables, d as bindTraitStateGetter, e as clearVerification, g as getAllChecks, f as getBridgeHealth, h as getSnapshot, i as getSummary, j as getTraitSnapshots, k as getTransitions, l as getTransitionsForTrait, r as recordServerResponse, m as recordTransition, n as registerCheck, o as registerTraitSnapshot, s as subscribeToVerification, u as updateAssetStatus, p as updateBridgeHealth, q as updateCheck, w as waitForTransition } from '../verificationRegistry-Cwa52VyK.js';
|
|
@@ -408,6 +408,14 @@ declare function resolveImageUrl(value: FieldValue | undefined): string | undefi
|
|
|
408
408
|
*/
|
|
409
409
|
declare function formatNestedFieldLabel(path: string): string;
|
|
410
410
|
|
|
411
|
+
type KeyMap = Record<string, EventKey>;
|
|
412
|
+
declare function isEditableTarget(target: EventTarget | null): boolean;
|
|
413
|
+
declare function keyMapCode(e: KeyboardEvent): string;
|
|
414
|
+
/** A modified entry (`Mod+`/`Shift+`/`Alt+` prefixed) wins over the bare code; a bare
|
|
415
|
+
* entry still fires under modifiers it never declared (existing boards keep their
|
|
416
|
+
* bindings); keystrokes in editable elements never route. */
|
|
417
|
+
declare function resolveKeyMapEvent(map: KeyMap | undefined, e: KeyboardEvent): EventKey | undefined;
|
|
418
|
+
|
|
411
419
|
/**
|
|
412
420
|
* Shared types for the Al-Jazari state machine visualization.
|
|
413
421
|
* Pure TypeScript — zero React/DOM dependencies.
|
|
@@ -593,4 +601,4 @@ declare function eightPointedStarPath(cx: number, cy: number, outerR: number, in
|
|
|
593
601
|
*/
|
|
594
602
|
declare function arrowheadPath(size: number): string;
|
|
595
603
|
|
|
596
|
-
export { ApiError, type CommandSendPump, type DebugEvent, type DebugEventType, type EntitySnapshot, type EntityState, type GuardContext, type GuardEvaluation, JAZARI_COLORS, type JazariArmLayout, type JazariEffectInfo, type JazariGearLayout, type JazariGuardInfo, type JazariLayout, type LayoutInput, type LayoutState, type LayoutTransition, type PersistentEntityInfo, type RuntimeEntity, type SortDirection, type TickExecution, type TickSendRelay, type TraitDebugInfo, type TraitGuard, type TraitTransition, type ValueFormat, apiClient, arrowheadPath, brainIconPath, clearDebugEvents, clearEntityProvider, clearGuardHistory, clearTicks, clearTraits, compareCellValues, computeJazariLayout, createCommandSendPump, createTickSendRelay, debug, debugCollision, debugError, debugGameState, debugGroup, debugGroupEnd, debugInput, debugPhysics, debugTable, debugTime, debugTimeEnd, debugWarn, eightPointedStarPath, formatDate, formatDateTime, formatNestedFieldLabel, formatTime, formatValue, gearTeethPath, getAllTicks, getAllTraits, getDebugEvents, getEntitiesByType, getEntityById, getEntitySnapshot, getEventsBySource, getEventsByType, getGuardEvaluationsForTrait, getGuardHistory, getRecentEvents, getRecentGuardEvaluations, getTick, getTrait, humanizeEnumValue, humanizeFieldName, initDebugShortcut, isDebugEnabled, lockIconPath, logDebugEvent, logEffectExecuted, logError, logEventFired, logInfo, logStateChange, logWarning, onDebugToggle, pipeIconPath, recordGuardEvaluation, registerTick, registerTrait, resolveImageUrl, setDebugEnabled, setEntityProvider, setTickActive, sortRows, subscribeToDebugEvents, subscribeToGuardChanges, subscribeToTickChanges, subscribeToTraitChanges, toggleDebug, unregisterTick, unregisterTrait, updateGuardResult, updateTickExecution, updateTraitState };
|
|
604
|
+
export { ApiError, type CommandSendPump, type DebugEvent, type DebugEventType, type EntitySnapshot, type EntityState, type GuardContext, type GuardEvaluation, JAZARI_COLORS, type JazariArmLayout, type JazariEffectInfo, type JazariGearLayout, type JazariGuardInfo, type JazariLayout, type KeyMap, type LayoutInput, type LayoutState, type LayoutTransition, type PersistentEntityInfo, type RuntimeEntity, type SortDirection, type TickExecution, type TickSendRelay, type TraitDebugInfo, type TraitGuard, type TraitTransition, type ValueFormat, apiClient, arrowheadPath, brainIconPath, clearDebugEvents, clearEntityProvider, clearGuardHistory, clearTicks, clearTraits, compareCellValues, computeJazariLayout, createCommandSendPump, createTickSendRelay, debug, debugCollision, debugError, debugGameState, debugGroup, debugGroupEnd, debugInput, debugPhysics, debugTable, debugTime, debugTimeEnd, debugWarn, eightPointedStarPath, formatDate, formatDateTime, formatNestedFieldLabel, formatTime, formatValue, gearTeethPath, getAllTicks, getAllTraits, getDebugEvents, getEntitiesByType, getEntityById, getEntitySnapshot, getEventsBySource, getEventsByType, getGuardEvaluationsForTrait, getGuardHistory, getRecentEvents, getRecentGuardEvaluations, getTick, getTrait, humanizeEnumValue, humanizeFieldName, initDebugShortcut, isDebugEnabled, isEditableTarget, keyMapCode, lockIconPath, logDebugEvent, logEffectExecuted, logError, logEventFired, logInfo, logStateChange, logWarning, onDebugToggle, pipeIconPath, recordGuardEvaluation, registerTick, registerTrait, resolveImageUrl, resolveKeyMapEvent, setDebugEnabled, setEntityProvider, setTickActive, sortRows, subscribeToDebugEvents, subscribeToGuardChanges, subscribeToTickChanges, subscribeToTraitChanges, toggleDebug, unregisterTick, unregisterTrait, updateGuardResult, updateTickExecution, updateTraitState };
|
package/dist/lib/index.js
CHANGED
|
@@ -942,6 +942,25 @@ function formatNestedFieldLabel(path) {
|
|
|
942
942
|
return lastPart.replace(/([A-Z])/g, " $1").replace(/^./, (str) => str.toUpperCase()).replace(/Id$/, "").trim();
|
|
943
943
|
}
|
|
944
944
|
|
|
945
|
+
// lib/keyMapEvent.ts
|
|
946
|
+
function isEditableTarget(target) {
|
|
947
|
+
if (!(target instanceof HTMLElement)) return false;
|
|
948
|
+
const tag = target.tagName;
|
|
949
|
+
if (tag === "INPUT" || tag === "TEXTAREA" || tag === "SELECT") return true;
|
|
950
|
+
return target.isContentEditable || target.contentEditable === "true";
|
|
951
|
+
}
|
|
952
|
+
function keyMapCode(e) {
|
|
953
|
+
let code = e.code;
|
|
954
|
+
if (e.altKey) code = `Alt+${code}`;
|
|
955
|
+
if (e.shiftKey) code = `Shift+${code}`;
|
|
956
|
+
if (e.metaKey || e.ctrlKey) code = `Mod+${code}`;
|
|
957
|
+
return code;
|
|
958
|
+
}
|
|
959
|
+
function resolveKeyMapEvent(map, e) {
|
|
960
|
+
if (!map || isEditableTarget(e.target)) return void 0;
|
|
961
|
+
return map[keyMapCode(e)] ?? map[e.code];
|
|
962
|
+
}
|
|
963
|
+
|
|
945
964
|
// lib/visualizer/index.ts
|
|
946
965
|
function formatSExprGuardToDomain(guard, _entityName) {
|
|
947
966
|
if (Array.isArray(guard)) {
|
|
@@ -2473,4 +2492,4 @@ function applyOperator(input) {
|
|
|
2473
2492
|
}
|
|
2474
2493
|
}
|
|
2475
2494
|
|
|
2476
|
-
export { ApiError, DEFAULT_CONFIG, EDITOR_MOTIONS, EDITOR_OPERATORS, INDENT_UNIT, JAZARI_COLORS, apiClient, applyMotion, applyOperator, arrowheadPath, bindCanvasCapture, bindEventBus, bindLastDrawables, bindTraitStateGetter, brainIconPath, clearDebugEvents, clearEntityProvider, clearGuardHistory, clearTicks, clearTraits, clearVerification, cn, compareCellValues, computeJazariLayout, createCommandSendPump, createTickSendRelay, debug, debugCollision, debugError, debugGameState, debugGroup, debugGroupEnd, debugInput, debugPhysics, debugTable, debugTime, debugTimeEnd, debugWarn, eightPointedStarPath, extractOutputsFromTransitions, extractStateMachine, formatDate, formatDateTime, formatGuard, formatNestedFieldLabel, formatTime, formatValue, gearTeethPath, getAllChecks, getAllTicks, getAllTraits, getBridgeHealth, getDebugEvents, getEffectSummary, getEntitiesByType, getEntityById, getEntitySnapshot, getEventsBySource, getEventsByType, getGuardEvaluationsForTrait, getGuardHistory, getRecentEvents, getRecentGuardEvaluations, getSnapshot, getSummary, getTick, getTrait, getTraitSnapshots, getTransitions, getTransitionsForTrait, humanizeEnumValue, humanizeFieldName, initDebugShortcut, isDebugEnabled, isEditorMotion, isEditorOperator, lockIconPath, logDebugEvent, logEffectExecuted, logError, logEventFired, logInfo, logStateChange, logWarning, motionRange, onDebugToggle, parseContentSegments, parseLessonSegments, parseMarkdownWithCodeBlocks, pipeIconPath, profilerOnRender, recordGuardEvaluation, recordServerResponse, recordTransition, registerCheck, registerTick, registerTrait, registerTraitSnapshot, renderStateMachineToDomData, renderStateMachineToSvg, resolveImageUrl, setDebugEnabled, setEntityProvider, setTickActive, sortRows, subscribeToDebugEvents, subscribeToGuardChanges, subscribeToTickChanges, subscribeToTraitChanges, subscribeToVerification, toggleDebug, unregisterTick, unregisterTrait, updateAssetStatus, updateBridgeHealth, updateCheck, updateGuardResult, updateTickExecution, updateTraitState, usePerfBuffer, waitForTransition };
|
|
2495
|
+
export { ApiError, DEFAULT_CONFIG, EDITOR_MOTIONS, EDITOR_OPERATORS, INDENT_UNIT, JAZARI_COLORS, apiClient, applyMotion, applyOperator, arrowheadPath, bindCanvasCapture, bindEventBus, bindLastDrawables, bindTraitStateGetter, brainIconPath, clearDebugEvents, clearEntityProvider, clearGuardHistory, clearTicks, clearTraits, clearVerification, cn, compareCellValues, computeJazariLayout, createCommandSendPump, createTickSendRelay, debug, debugCollision, debugError, debugGameState, debugGroup, debugGroupEnd, debugInput, debugPhysics, debugTable, debugTime, debugTimeEnd, debugWarn, eightPointedStarPath, extractOutputsFromTransitions, extractStateMachine, formatDate, formatDateTime, formatGuard, formatNestedFieldLabel, formatTime, formatValue, gearTeethPath, getAllChecks, getAllTicks, getAllTraits, getBridgeHealth, getDebugEvents, getEffectSummary, getEntitiesByType, getEntityById, getEntitySnapshot, getEventsBySource, getEventsByType, getGuardEvaluationsForTrait, getGuardHistory, getRecentEvents, getRecentGuardEvaluations, getSnapshot, getSummary, getTick, getTrait, getTraitSnapshots, getTransitions, getTransitionsForTrait, humanizeEnumValue, humanizeFieldName, initDebugShortcut, isDebugEnabled, isEditableTarget, isEditorMotion, isEditorOperator, keyMapCode, lockIconPath, logDebugEvent, logEffectExecuted, logError, logEventFired, logInfo, logStateChange, logWarning, motionRange, onDebugToggle, parseContentSegments, parseLessonSegments, parseMarkdownWithCodeBlocks, pipeIconPath, profilerOnRender, recordGuardEvaluation, recordServerResponse, recordTransition, registerCheck, registerTick, registerTrait, registerTraitSnapshot, renderStateMachineToDomData, renderStateMachineToSvg, resolveImageUrl, resolveKeyMapEvent, setDebugEnabled, setEntityProvider, setTickActive, sortRows, subscribeToDebugEvents, subscribeToGuardChanges, subscribeToTickChanges, subscribeToTraitChanges, subscribeToVerification, toggleDebug, unregisterTick, unregisterTrait, updateAssetStatus, updateBridgeHealth, updateCheck, updateGuardResult, updateTickExecution, updateTraitState, usePerfBuffer, waitForTransition };
|