@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
|
@@ -1,3 +1,215 @@
|
|
|
1
|
+
// lib/debugUtils.ts
|
|
2
|
+
var DEBUG_STORAGE_KEY = "orbital-debug";
|
|
3
|
+
var listeners = /* @__PURE__ */ new Set();
|
|
4
|
+
function isDebugEnabled() {
|
|
5
|
+
if (typeof window === "undefined") return false;
|
|
6
|
+
return localStorage.getItem(DEBUG_STORAGE_KEY) === "true";
|
|
7
|
+
}
|
|
8
|
+
function setDebugEnabled(enabled) {
|
|
9
|
+
if (typeof window === "undefined") return;
|
|
10
|
+
localStorage.setItem(DEBUG_STORAGE_KEY, String(enabled));
|
|
11
|
+
listeners.forEach((listener) => listener(enabled));
|
|
12
|
+
}
|
|
13
|
+
function toggleDebug() {
|
|
14
|
+
const newValue = !isDebugEnabled();
|
|
15
|
+
setDebugEnabled(newValue);
|
|
16
|
+
return newValue;
|
|
17
|
+
}
|
|
18
|
+
function onDebugToggle(listener) {
|
|
19
|
+
listeners.add(listener);
|
|
20
|
+
return () => listeners.delete(listener);
|
|
21
|
+
}
|
|
22
|
+
function initDebugShortcut() {
|
|
23
|
+
if (typeof window === "undefined") return () => {
|
|
24
|
+
};
|
|
25
|
+
const handleKeyDown = (e) => {
|
|
26
|
+
if (e.ctrlKey && e.shiftKey && e.key === "D") {
|
|
27
|
+
e.preventDefault();
|
|
28
|
+
toggleDebug();
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
window.addEventListener("keydown", handleKeyDown);
|
|
32
|
+
return () => window.removeEventListener("keydown", handleKeyDown);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
// lib/entityDebug.ts
|
|
36
|
+
var entityProvider = null;
|
|
37
|
+
function setEntityProvider(provider) {
|
|
38
|
+
entityProvider = provider;
|
|
39
|
+
}
|
|
40
|
+
function clearEntityProvider() {
|
|
41
|
+
entityProvider = null;
|
|
42
|
+
}
|
|
43
|
+
function getEntitySnapshot() {
|
|
44
|
+
if (!entityProvider) {
|
|
45
|
+
return null;
|
|
46
|
+
}
|
|
47
|
+
const entities = entityProvider();
|
|
48
|
+
return {
|
|
49
|
+
entities,
|
|
50
|
+
timestamp: Date.now(),
|
|
51
|
+
totalCount: entities.length,
|
|
52
|
+
singletons: {},
|
|
53
|
+
runtime: entities.map((e) => ({ id: e.id, type: e.type, data: e.fields })),
|
|
54
|
+
persistent: {}
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
function getEntityById(id) {
|
|
58
|
+
if (!entityProvider) {
|
|
59
|
+
return void 0;
|
|
60
|
+
}
|
|
61
|
+
return entityProvider().find((e) => e.id === id);
|
|
62
|
+
}
|
|
63
|
+
function getEntitiesByType(type) {
|
|
64
|
+
if (!entityProvider) {
|
|
65
|
+
return [];
|
|
66
|
+
}
|
|
67
|
+
return entityProvider().filter((e) => e.type === type);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
// lib/debugRegistry.ts
|
|
71
|
+
var events = [];
|
|
72
|
+
var listeners2 = /* @__PURE__ */ new Set();
|
|
73
|
+
var MAX_EVENTS = 500;
|
|
74
|
+
function notifyListeners() {
|
|
75
|
+
listeners2.forEach((listener) => listener());
|
|
76
|
+
}
|
|
77
|
+
function logDebugEvent(type, source, message, data) {
|
|
78
|
+
const event = {
|
|
79
|
+
id: `event-${Date.now()}-${Math.random().toString(36).slice(2, 9)}`,
|
|
80
|
+
type,
|
|
81
|
+
source,
|
|
82
|
+
message,
|
|
83
|
+
data,
|
|
84
|
+
timestamp: Date.now()
|
|
85
|
+
};
|
|
86
|
+
events.unshift(event);
|
|
87
|
+
if (events.length > MAX_EVENTS) {
|
|
88
|
+
events.pop();
|
|
89
|
+
}
|
|
90
|
+
notifyListeners();
|
|
91
|
+
}
|
|
92
|
+
function logStateChange(source, from, to, event) {
|
|
93
|
+
logDebugEvent("state-change", source, `${from} \u2192 ${to}`, { from, to, event });
|
|
94
|
+
}
|
|
95
|
+
function logEventFired(source, eventName, payload) {
|
|
96
|
+
logDebugEvent("event-fired", source, eventName, { eventName, payload });
|
|
97
|
+
}
|
|
98
|
+
function logEffectExecuted(source, effectType, details) {
|
|
99
|
+
logDebugEvent("effect-executed", source, effectType, { effectType, details });
|
|
100
|
+
}
|
|
101
|
+
function logError(source, message, error) {
|
|
102
|
+
logDebugEvent("error", source, message, { error });
|
|
103
|
+
}
|
|
104
|
+
function logWarning(source, message, data) {
|
|
105
|
+
logDebugEvent("warning", source, message, data);
|
|
106
|
+
}
|
|
107
|
+
function logInfo(source, message, data) {
|
|
108
|
+
logDebugEvent("info", source, message, data);
|
|
109
|
+
}
|
|
110
|
+
function getDebugEvents() {
|
|
111
|
+
return [...events];
|
|
112
|
+
}
|
|
113
|
+
function getRecentEvents(count) {
|
|
114
|
+
return events.slice(0, count);
|
|
115
|
+
}
|
|
116
|
+
function getEventsByType(type) {
|
|
117
|
+
return events.filter((e) => e.type === type);
|
|
118
|
+
}
|
|
119
|
+
function getEventsBySource(source) {
|
|
120
|
+
return events.filter((e) => e.source === source);
|
|
121
|
+
}
|
|
122
|
+
function subscribeToDebugEvents(listener) {
|
|
123
|
+
listeners2.add(listener);
|
|
124
|
+
return () => listeners2.delete(listener);
|
|
125
|
+
}
|
|
126
|
+
function clearDebugEvents() {
|
|
127
|
+
events.length = 0;
|
|
128
|
+
notifyListeners();
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
// lib/guardRegistry.ts
|
|
132
|
+
var guardHistory = [];
|
|
133
|
+
var listeners3 = /* @__PURE__ */ new Set();
|
|
134
|
+
var MAX_HISTORY = 100;
|
|
135
|
+
function notifyListeners2() {
|
|
136
|
+
listeners3.forEach((listener) => listener());
|
|
137
|
+
}
|
|
138
|
+
function recordGuardEvaluation(evaluation) {
|
|
139
|
+
const entry = {
|
|
140
|
+
...evaluation,
|
|
141
|
+
id: `guard-${Date.now()}-${Math.random().toString(36).slice(2, 9)}`,
|
|
142
|
+
timestamp: Date.now()
|
|
143
|
+
};
|
|
144
|
+
guardHistory.unshift(entry);
|
|
145
|
+
if (guardHistory.length > MAX_HISTORY) {
|
|
146
|
+
guardHistory.pop();
|
|
147
|
+
}
|
|
148
|
+
notifyListeners2();
|
|
149
|
+
}
|
|
150
|
+
function getGuardHistory() {
|
|
151
|
+
return [...guardHistory];
|
|
152
|
+
}
|
|
153
|
+
function getRecentGuardEvaluations(count) {
|
|
154
|
+
return guardHistory.slice(0, count);
|
|
155
|
+
}
|
|
156
|
+
function getGuardEvaluationsForTrait(traitName) {
|
|
157
|
+
return guardHistory.filter((g) => g.traitName === traitName);
|
|
158
|
+
}
|
|
159
|
+
function subscribeToGuardChanges(listener) {
|
|
160
|
+
listeners3.add(listener);
|
|
161
|
+
return () => listeners3.delete(listener);
|
|
162
|
+
}
|
|
163
|
+
function clearGuardHistory() {
|
|
164
|
+
guardHistory.length = 0;
|
|
165
|
+
notifyListeners2();
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
// lib/tickRegistry.ts
|
|
169
|
+
var ticks = /* @__PURE__ */ new Map();
|
|
170
|
+
var listeners4 = /* @__PURE__ */ new Set();
|
|
171
|
+
function notifyListeners3() {
|
|
172
|
+
listeners4.forEach((listener) => listener());
|
|
173
|
+
}
|
|
174
|
+
function registerTick(tick) {
|
|
175
|
+
ticks.set(tick.id, tick);
|
|
176
|
+
notifyListeners3();
|
|
177
|
+
}
|
|
178
|
+
function updateTickExecution(id, timestamp) {
|
|
179
|
+
const tick = ticks.get(id);
|
|
180
|
+
if (tick) {
|
|
181
|
+
tick.lastExecuted = timestamp;
|
|
182
|
+
tick.nextExecution = timestamp + tick.interval;
|
|
183
|
+
tick.executionCount++;
|
|
184
|
+
notifyListeners3();
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
function setTickActive(id, isActive) {
|
|
188
|
+
const tick = ticks.get(id);
|
|
189
|
+
if (tick) {
|
|
190
|
+
tick.isActive = isActive;
|
|
191
|
+
notifyListeners3();
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
function unregisterTick(id) {
|
|
195
|
+
ticks.delete(id);
|
|
196
|
+
notifyListeners3();
|
|
197
|
+
}
|
|
198
|
+
function getAllTicks() {
|
|
199
|
+
return Array.from(ticks.values());
|
|
200
|
+
}
|
|
201
|
+
function getTick(id) {
|
|
202
|
+
return ticks.get(id);
|
|
203
|
+
}
|
|
204
|
+
function subscribeToTickChanges(listener) {
|
|
205
|
+
listeners4.add(listener);
|
|
206
|
+
return () => listeners4.delete(listener);
|
|
207
|
+
}
|
|
208
|
+
function clearTicks() {
|
|
209
|
+
ticks.clear();
|
|
210
|
+
notifyListeners3();
|
|
211
|
+
}
|
|
212
|
+
|
|
1
213
|
// lib/visualizer/index.ts
|
|
2
214
|
function formatSExprGuardToDomain(guard, _entityName) {
|
|
3
215
|
if (Array.isArray(guard)) {
|
|
@@ -744,216 +956,4 @@ function parseContentSegments(content) {
|
|
|
744
956
|
return segments;
|
|
745
957
|
}
|
|
746
958
|
|
|
747
|
-
// lib/tickRegistry.ts
|
|
748
|
-
var ticks = /* @__PURE__ */ new Map();
|
|
749
|
-
var listeners = /* @__PURE__ */ new Set();
|
|
750
|
-
function notifyListeners() {
|
|
751
|
-
listeners.forEach((listener) => listener());
|
|
752
|
-
}
|
|
753
|
-
function registerTick(tick) {
|
|
754
|
-
ticks.set(tick.id, tick);
|
|
755
|
-
notifyListeners();
|
|
756
|
-
}
|
|
757
|
-
function updateTickExecution(id, timestamp) {
|
|
758
|
-
const tick = ticks.get(id);
|
|
759
|
-
if (tick) {
|
|
760
|
-
tick.lastExecuted = timestamp;
|
|
761
|
-
tick.nextExecution = timestamp + tick.interval;
|
|
762
|
-
tick.executionCount++;
|
|
763
|
-
notifyListeners();
|
|
764
|
-
}
|
|
765
|
-
}
|
|
766
|
-
function setTickActive(id, isActive) {
|
|
767
|
-
const tick = ticks.get(id);
|
|
768
|
-
if (tick) {
|
|
769
|
-
tick.isActive = isActive;
|
|
770
|
-
notifyListeners();
|
|
771
|
-
}
|
|
772
|
-
}
|
|
773
|
-
function unregisterTick(id) {
|
|
774
|
-
ticks.delete(id);
|
|
775
|
-
notifyListeners();
|
|
776
|
-
}
|
|
777
|
-
function getAllTicks() {
|
|
778
|
-
return Array.from(ticks.values());
|
|
779
|
-
}
|
|
780
|
-
function getTick(id) {
|
|
781
|
-
return ticks.get(id);
|
|
782
|
-
}
|
|
783
|
-
function subscribeToTickChanges(listener) {
|
|
784
|
-
listeners.add(listener);
|
|
785
|
-
return () => listeners.delete(listener);
|
|
786
|
-
}
|
|
787
|
-
function clearTicks() {
|
|
788
|
-
ticks.clear();
|
|
789
|
-
notifyListeners();
|
|
790
|
-
}
|
|
791
|
-
|
|
792
|
-
// lib/guardRegistry.ts
|
|
793
|
-
var guardHistory = [];
|
|
794
|
-
var listeners2 = /* @__PURE__ */ new Set();
|
|
795
|
-
var MAX_HISTORY = 100;
|
|
796
|
-
function notifyListeners2() {
|
|
797
|
-
listeners2.forEach((listener) => listener());
|
|
798
|
-
}
|
|
799
|
-
function recordGuardEvaluation(evaluation) {
|
|
800
|
-
const entry = {
|
|
801
|
-
...evaluation,
|
|
802
|
-
id: `guard-${Date.now()}-${Math.random().toString(36).slice(2, 9)}`,
|
|
803
|
-
timestamp: Date.now()
|
|
804
|
-
};
|
|
805
|
-
guardHistory.unshift(entry);
|
|
806
|
-
if (guardHistory.length > MAX_HISTORY) {
|
|
807
|
-
guardHistory.pop();
|
|
808
|
-
}
|
|
809
|
-
notifyListeners2();
|
|
810
|
-
}
|
|
811
|
-
function getGuardHistory() {
|
|
812
|
-
return [...guardHistory];
|
|
813
|
-
}
|
|
814
|
-
function getRecentGuardEvaluations(count) {
|
|
815
|
-
return guardHistory.slice(0, count);
|
|
816
|
-
}
|
|
817
|
-
function getGuardEvaluationsForTrait(traitName) {
|
|
818
|
-
return guardHistory.filter((g) => g.traitName === traitName);
|
|
819
|
-
}
|
|
820
|
-
function subscribeToGuardChanges(listener) {
|
|
821
|
-
listeners2.add(listener);
|
|
822
|
-
return () => listeners2.delete(listener);
|
|
823
|
-
}
|
|
824
|
-
function clearGuardHistory() {
|
|
825
|
-
guardHistory.length = 0;
|
|
826
|
-
notifyListeners2();
|
|
827
|
-
}
|
|
828
|
-
|
|
829
|
-
// lib/entityDebug.ts
|
|
830
|
-
var entityProvider = null;
|
|
831
|
-
function setEntityProvider(provider) {
|
|
832
|
-
entityProvider = provider;
|
|
833
|
-
}
|
|
834
|
-
function clearEntityProvider() {
|
|
835
|
-
entityProvider = null;
|
|
836
|
-
}
|
|
837
|
-
function getEntitySnapshot() {
|
|
838
|
-
if (!entityProvider) {
|
|
839
|
-
return null;
|
|
840
|
-
}
|
|
841
|
-
const entities = entityProvider();
|
|
842
|
-
return {
|
|
843
|
-
entities,
|
|
844
|
-
timestamp: Date.now(),
|
|
845
|
-
totalCount: entities.length,
|
|
846
|
-
singletons: {},
|
|
847
|
-
runtime: entities.map((e) => ({ id: e.id, type: e.type, data: e.fields })),
|
|
848
|
-
persistent: {}
|
|
849
|
-
};
|
|
850
|
-
}
|
|
851
|
-
function getEntityById(id) {
|
|
852
|
-
if (!entityProvider) {
|
|
853
|
-
return void 0;
|
|
854
|
-
}
|
|
855
|
-
return entityProvider().find((e) => e.id === id);
|
|
856
|
-
}
|
|
857
|
-
function getEntitiesByType(type) {
|
|
858
|
-
if (!entityProvider) {
|
|
859
|
-
return [];
|
|
860
|
-
}
|
|
861
|
-
return entityProvider().filter((e) => e.type === type);
|
|
862
|
-
}
|
|
863
|
-
|
|
864
|
-
// lib/debugRegistry.ts
|
|
865
|
-
var events = [];
|
|
866
|
-
var listeners3 = /* @__PURE__ */ new Set();
|
|
867
|
-
var MAX_EVENTS = 500;
|
|
868
|
-
function notifyListeners3() {
|
|
869
|
-
listeners3.forEach((listener) => listener());
|
|
870
|
-
}
|
|
871
|
-
function logDebugEvent(type, source, message, data) {
|
|
872
|
-
const event = {
|
|
873
|
-
id: `event-${Date.now()}-${Math.random().toString(36).slice(2, 9)}`,
|
|
874
|
-
type,
|
|
875
|
-
source,
|
|
876
|
-
message,
|
|
877
|
-
data,
|
|
878
|
-
timestamp: Date.now()
|
|
879
|
-
};
|
|
880
|
-
events.unshift(event);
|
|
881
|
-
if (events.length > MAX_EVENTS) {
|
|
882
|
-
events.pop();
|
|
883
|
-
}
|
|
884
|
-
notifyListeners3();
|
|
885
|
-
}
|
|
886
|
-
function logStateChange(source, from, to, event) {
|
|
887
|
-
logDebugEvent("state-change", source, `${from} \u2192 ${to}`, { from, to, event });
|
|
888
|
-
}
|
|
889
|
-
function logEventFired(source, eventName, payload) {
|
|
890
|
-
logDebugEvent("event-fired", source, eventName, { eventName, payload });
|
|
891
|
-
}
|
|
892
|
-
function logEffectExecuted(source, effectType, details) {
|
|
893
|
-
logDebugEvent("effect-executed", source, effectType, { effectType, details });
|
|
894
|
-
}
|
|
895
|
-
function logError(source, message, error) {
|
|
896
|
-
logDebugEvent("error", source, message, { error });
|
|
897
|
-
}
|
|
898
|
-
function logWarning(source, message, data) {
|
|
899
|
-
logDebugEvent("warning", source, message, data);
|
|
900
|
-
}
|
|
901
|
-
function logInfo(source, message, data) {
|
|
902
|
-
logDebugEvent("info", source, message, data);
|
|
903
|
-
}
|
|
904
|
-
function getDebugEvents() {
|
|
905
|
-
return [...events];
|
|
906
|
-
}
|
|
907
|
-
function getRecentEvents(count) {
|
|
908
|
-
return events.slice(0, count);
|
|
909
|
-
}
|
|
910
|
-
function getEventsByType(type) {
|
|
911
|
-
return events.filter((e) => e.type === type);
|
|
912
|
-
}
|
|
913
|
-
function getEventsBySource(source) {
|
|
914
|
-
return events.filter((e) => e.source === source);
|
|
915
|
-
}
|
|
916
|
-
function subscribeToDebugEvents(listener) {
|
|
917
|
-
listeners3.add(listener);
|
|
918
|
-
return () => listeners3.delete(listener);
|
|
919
|
-
}
|
|
920
|
-
function clearDebugEvents() {
|
|
921
|
-
events.length = 0;
|
|
922
|
-
notifyListeners3();
|
|
923
|
-
}
|
|
924
|
-
|
|
925
|
-
// lib/debugUtils.ts
|
|
926
|
-
var DEBUG_STORAGE_KEY = "orbital-debug";
|
|
927
|
-
var listeners4 = /* @__PURE__ */ new Set();
|
|
928
|
-
function isDebugEnabled() {
|
|
929
|
-
if (typeof window === "undefined") return false;
|
|
930
|
-
return localStorage.getItem(DEBUG_STORAGE_KEY) === "true";
|
|
931
|
-
}
|
|
932
|
-
function setDebugEnabled(enabled) {
|
|
933
|
-
if (typeof window === "undefined") return;
|
|
934
|
-
localStorage.setItem(DEBUG_STORAGE_KEY, String(enabled));
|
|
935
|
-
listeners4.forEach((listener) => listener(enabled));
|
|
936
|
-
}
|
|
937
|
-
function toggleDebug() {
|
|
938
|
-
const newValue = !isDebugEnabled();
|
|
939
|
-
setDebugEnabled(newValue);
|
|
940
|
-
return newValue;
|
|
941
|
-
}
|
|
942
|
-
function onDebugToggle(listener) {
|
|
943
|
-
listeners4.add(listener);
|
|
944
|
-
return () => listeners4.delete(listener);
|
|
945
|
-
}
|
|
946
|
-
function initDebugShortcut() {
|
|
947
|
-
if (typeof window === "undefined") return () => {
|
|
948
|
-
};
|
|
949
|
-
const handleKeyDown = (e) => {
|
|
950
|
-
if (e.ctrlKey && e.shiftKey && e.key === "D") {
|
|
951
|
-
e.preventDefault();
|
|
952
|
-
toggleDebug();
|
|
953
|
-
}
|
|
954
|
-
};
|
|
955
|
-
window.addEventListener("keydown", handleKeyDown);
|
|
956
|
-
return () => window.removeEventListener("keydown", handleKeyDown);
|
|
957
|
-
}
|
|
958
|
-
|
|
959
959
|
export { DEFAULT_CONFIG, clearDebugEvents, clearEntityProvider, clearGuardHistory, clearTicks, extractOutputsFromTransitions, extractStateMachine, formatGuard, getAllTicks, getDebugEvents, getEffectSummary, getEntitiesByType, getEntityById, getEntitySnapshot, getEventsBySource, getEventsByType, getGuardEvaluationsForTrait, getGuardHistory, getRecentEvents, getRecentGuardEvaluations, getTick, initDebugShortcut, isDebugEnabled, logDebugEvent, logEffectExecuted, logError, logEventFired, logInfo, logStateChange, logWarning, onDebugToggle, parseContentSegments, parseMarkdownWithCodeBlocks, recordGuardEvaluation, registerTick, renderStateMachineToDomData, renderStateMachineToSvg, setDebugEnabled, setEntityProvider, setTickActive, subscribeToDebugEvents, subscribeToGuardChanges, subscribeToTickChanges, toggleDebug, unregisterTick, updateTickExecution };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { subscribe, getSnapshot, clearEntities, removeEntity, updateSingleton, updateEntity, spawnEntity, getSingleton, getAllEntities, getByType, getEntity } from './chunk-N7MVUW4R.js';
|
|
2
2
|
import { apiClient } from './chunk-3HJHHULT.js';
|
|
3
|
-
import { SelectionContext, entityDataKeys, useEntityList } from './chunk-
|
|
3
|
+
import { SelectionContext, entityDataKeys, useEntityList } from './chunk-3CP74CBL.js';
|
|
4
4
|
import { useEventBus } from './chunk-YXZM3WCF.js';
|
|
5
5
|
import { useCallback, useState, useEffect, useMemo, useContext, useSyncExternalStore, useRef } from 'react';
|
|
6
6
|
import { useQueryClient, useMutation, useQuery } from '@tanstack/react-query';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { SuspenseConfigProvider } from './chunk-
|
|
2
|
-
import { ThemeProvider } from './chunk-
|
|
3
|
-
import { SelectionProvider, EntityDataProvider } from './chunk-
|
|
1
|
+
import { SuspenseConfigProvider } from './chunk-YYCP5CD7.js';
|
|
2
|
+
import { ThemeProvider } from './chunk-YLKXEXBP.js';
|
|
3
|
+
import { SelectionProvider, EntityDataProvider } from './chunk-3CP74CBL.js';
|
|
4
4
|
import { useEventBus, EventBusProvider } from './chunk-YXZM3WCF.js';
|
|
5
5
|
import { recordTransition, registerCheck, bindEventBus, bindTraitStateGetter } from './chunk-WCTZ7WZX.js';
|
|
6
6
|
import { useOfflineExecutor } from './chunk-K2D5D3WK.js';
|
|
@@ -1,7 +1,30 @@
|
|
|
1
1
|
import { useUISlotManager } from './chunk-3JGAROCW.js';
|
|
2
|
-
import { createContext, useMemo, useState, useEffect, useCallback
|
|
2
|
+
import { createContext, useMemo, useContext, useState, useEffect, useCallback } from 'react';
|
|
3
3
|
import { jsx } from 'react/jsx-runtime';
|
|
4
4
|
|
|
5
|
+
var UISlotContext = createContext(null);
|
|
6
|
+
function UISlotProvider({ children }) {
|
|
7
|
+
const slotManager = useUISlotManager();
|
|
8
|
+
const contextValue = useMemo(() => slotManager, [slotManager]);
|
|
9
|
+
return /* @__PURE__ */ jsx(UISlotContext.Provider, { value: contextValue, children });
|
|
10
|
+
}
|
|
11
|
+
function useUISlots() {
|
|
12
|
+
const context = useContext(UISlotContext);
|
|
13
|
+
if (!context) {
|
|
14
|
+
throw new Error(
|
|
15
|
+
"useUISlots must be used within a UISlotProvider. Make sure your component tree is wrapped with <UISlotProvider>."
|
|
16
|
+
);
|
|
17
|
+
}
|
|
18
|
+
return context;
|
|
19
|
+
}
|
|
20
|
+
function useSlotContent(slot) {
|
|
21
|
+
const { getContent } = useUISlots();
|
|
22
|
+
return getContent(slot);
|
|
23
|
+
}
|
|
24
|
+
function useSlotHasContent(slot) {
|
|
25
|
+
const { hasContent } = useUISlots();
|
|
26
|
+
return hasContent(slot);
|
|
27
|
+
}
|
|
5
28
|
var BUILT_IN_THEMES = [
|
|
6
29
|
{
|
|
7
30
|
name: "wireframe",
|
|
@@ -252,28 +275,5 @@ function useTheme() {
|
|
|
252
275
|
return context;
|
|
253
276
|
}
|
|
254
277
|
var ThemeContext_default = ThemeContext;
|
|
255
|
-
var UISlotContext = createContext(null);
|
|
256
|
-
function UISlotProvider({ children }) {
|
|
257
|
-
const slotManager = useUISlotManager();
|
|
258
|
-
const contextValue = useMemo(() => slotManager, [slotManager]);
|
|
259
|
-
return /* @__PURE__ */ jsx(UISlotContext.Provider, { value: contextValue, children });
|
|
260
|
-
}
|
|
261
|
-
function useUISlots() {
|
|
262
|
-
const context = useContext(UISlotContext);
|
|
263
|
-
if (!context) {
|
|
264
|
-
throw new Error(
|
|
265
|
-
"useUISlots must be used within a UISlotProvider. Make sure your component tree is wrapped with <UISlotProvider>."
|
|
266
|
-
);
|
|
267
|
-
}
|
|
268
|
-
return context;
|
|
269
|
-
}
|
|
270
|
-
function useSlotContent(slot) {
|
|
271
|
-
const { getContent } = useUISlots();
|
|
272
|
-
return getContent(slot);
|
|
273
|
-
}
|
|
274
|
-
function useSlotHasContent(slot) {
|
|
275
|
-
const { hasContent } = useUISlots();
|
|
276
|
-
return hasContent(slot);
|
|
277
|
-
}
|
|
278
278
|
|
|
279
279
|
export { BUILT_IN_THEMES, ThemeContext_default, ThemeProvider, UISlotContext, UISlotProvider, useSlotContent, useSlotHasContent, useTheme, useUISlots };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { useTheme, useUISlots } from './chunk-
|
|
2
|
-
import { useTranslate, useInfiniteScroll, useQuerySingleton, useLongPress, useSwipeGesture, useDragReorder, usePullToRefresh } from './chunk-
|
|
1
|
+
import { useTheme, useUISlots } from './chunk-YLKXEXBP.js';
|
|
2
|
+
import { useTranslate, useInfiniteScroll, useQuerySingleton, useLongPress, useSwipeGesture, useDragReorder, usePullToRefresh } from './chunk-3CP74CBL.js';
|
|
3
3
|
import { useEventBus } from './chunk-YXZM3WCF.js';
|
|
4
4
|
import { cn, debugGroup, debug, debugGroupEnd, updateAssetStatus, bindCanvasCapture, getNestedValue, isDebugEnabled } from './chunk-WCTZ7WZX.js';
|
|
5
5
|
import { isPortalSlot } from './chunk-K2D5D3WK.js';
|
|
@@ -12254,6 +12254,7 @@ var DataGrid = ({
|
|
|
12254
12254
|
Box,
|
|
12255
12255
|
{
|
|
12256
12256
|
"data-entity-row": true,
|
|
12257
|
+
"data-entity-id": id,
|
|
12257
12258
|
className: cn(
|
|
12258
12259
|
"bg-[var(--color-card)] rounded-[var(--radius-lg)]",
|
|
12259
12260
|
"border border-[var(--color-border)]",
|
|
@@ -12272,6 +12273,7 @@ var DataGrid = ({
|
|
|
12272
12273
|
Box,
|
|
12273
12274
|
{
|
|
12274
12275
|
"data-entity-row": true,
|
|
12276
|
+
"data-entity-id": id,
|
|
12275
12277
|
className: cn(
|
|
12276
12278
|
"bg-[var(--color-card)] rounded-[var(--radius-lg)]",
|
|
12277
12279
|
"border border-[var(--color-border)]",
|
|
@@ -12581,7 +12583,7 @@ var DataList = ({
|
|
|
12581
12583
|
const renderItem = (itemData, index, isLast) => {
|
|
12582
12584
|
if (hasRenderProp) {
|
|
12583
12585
|
const id2 = itemData.id || String(index);
|
|
12584
|
-
return /* @__PURE__ */ jsxs(Box, { "data-entity-row": true, children: [
|
|
12586
|
+
return /* @__PURE__ */ jsxs(Box, { "data-entity-row": true, "data-entity-id": id2, children: [
|
|
12585
12587
|
/* @__PURE__ */ jsxs(
|
|
12586
12588
|
Box,
|
|
12587
12589
|
{
|
|
@@ -12628,7 +12630,7 @@ var DataList = ({
|
|
|
12628
12630
|
}
|
|
12629
12631
|
const id = itemData.id || String(index);
|
|
12630
12632
|
const titleValue = getNestedValue(itemData, titleField?.name ?? "");
|
|
12631
|
-
return /* @__PURE__ */ jsxs(Box, { "data-entity-row": true, children: [
|
|
12633
|
+
return /* @__PURE__ */ jsxs(Box, { "data-entity-row": true, "data-entity-id": id, children: [
|
|
12632
12634
|
/* @__PURE__ */ jsxs(
|
|
12633
12635
|
Box,
|
|
12634
12636
|
{
|
|
@@ -8,8 +8,8 @@ import { E as EventBusContextType } from '../event-bus-types-CjJduURa.js';
|
|
|
8
8
|
export { a as EventListener, K as KFlowEvent, U as Unsubscribe } from '../event-bus-types-CjJduURa.js';
|
|
9
9
|
import { I as IsometricTile, a as IsometricUnit, b as IsometricFeature, C as CameraState } from '../isometric-ynNHVPZx.js';
|
|
10
10
|
import { OrbitalEntity } from '@almadar/core';
|
|
11
|
-
import { c as DomLayoutData, e as DomStateNode, n as VisualizerConfig, f as DomTransitionLabel, a as ContentSegment } from '../
|
|
12
|
-
export { s as cn } from '../
|
|
11
|
+
import { c as DomLayoutData, e as DomStateNode, n as VisualizerConfig, f as DomTransitionLabel, a as ContentSegment } from '../parseContentSegments-BZrQRvgK.js';
|
|
12
|
+
export { s as cn } from '../parseContentSegments-BZrQRvgK.js';
|
|
13
13
|
import { S as SlotContent, a as UISlot } from '../useUISlots-BBjNvQtb.js';
|
|
14
14
|
export { D as DEFAULT_SLOTS, R as RenderUIConfig, b as SlotAnimation, c as SlotChangeCallback, U as UISlotManager, u as useUISlotManager } from '../useUISlots-BBjNvQtb.js';
|
|
15
15
|
export { Entity, clearEntities, getAllEntities, getByType, getEntity, getSingleton, removeEntity, spawnEntity, updateEntity, updateSingleton } from '../stores/index.js';
|
package/dist/components/index.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { DEFAULT_CONFIG, renderStateMachineToDomData, parseContentSegments, isDebugEnabled, onDebugToggle, subscribeToTickChanges, subscribeToGuardChanges, subscribeToDebugEvents, getEntitySnapshot, getDebugEvents, getGuardHistory, getAllTicks } from '../chunk-
|
|
2
|
-
import { useAuthContext } from '../chunk-
|
|
3
|
-
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
|
+
import { DEFAULT_CONFIG, renderStateMachineToDomData, parseContentSegments, isDebugEnabled, onDebugToggle, subscribeToTickChanges, subscribeToGuardChanges, subscribeToDebugEvents, getEntitySnapshot, getDebugEvents, getGuardHistory, getAllTicks } from '../chunk-MNMASFYN.js';
|
|
2
|
+
import { useAuthContext } from '../chunk-X2ZDE63F.js';
|
|
3
|
+
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';
|
|
4
4
|
export { clearEntities, getAllEntities, getByType, getEntity, getSingleton, removeEntity, spawnEntity, updateEntity, updateSingleton } from '../chunk-N7MVUW4R.js';
|
|
5
5
|
import { subscribeToTraitChanges, getAllTraits } from '../chunk-42YQ6JVR.js';
|
|
6
6
|
import '../chunk-3HJHHULT.js';
|
|
7
|
-
import { VStack, HStack, Typography, Button, Icon, Box, Card, Avatar, Badge, SearchInput, Checkbox, Menu as Menu$1, Pagination, LoadingState, EmptyState, Modal, ErrorState, QuizBlock, CodeBlock, ScaledDiagram, MarkdownContent, Divider, ProgressBar, isoToScreen, IsometricCanvas_default, Stack, Select, Drawer, Toast, Tabs, Input, ThemeToggle, TILE_WIDTH, EntityDisplayEvents, StateIndicator, Accordion, ButtonGroup, Container } from '../chunk-
|
|
8
|
-
export { ALL_PRESETS, Accordion, ActionButton, ActionButtons, Card2 as ActionCard, Alert, AnimatedCounter, Avatar, Badge, Box, Breadcrumb, Button, ButtonGroup, CalendarGrid, CanvasEffect, Card, CardBody, CardContent, CardFooter, CardGrid, CardHeader, CardTitle, Carousel, Center, Chart, ChartLegend, Checkbox, ChoiceButton, CodeBlock, CombatLog, ComboCounter, ConditionalWrapper, ConfettiEffect, Container, ControlButton, CraftingRecipe, DIAMOND_TOP_Y, DPad, DamageNumber, DataGrid, DataList, DataTable, DateRangeSelector, DayCell, DetailPanel, DialogueBox, DialogueBubble, Divider, Drawer, EmptyState, EnemyPlate, EntityDisplayEvents, ErrorBoundary, ErrorState, FEATURE_COLORS, FLOOR_HEIGHT, FilterGroup, Flex, FlipCard, FlipContainer, FloatingActionButton, Form, FormField, FormSectionHeader, GameCanvas2D, GameHud, GameMenu, GameOverScreen, GraphView, Grid, HStack, Heading, HealthBar, HealthPanel, Icon, InfiniteScrollSentinel, Input, InputGroup, InventoryGrid, InventoryPanel, IsometricCanvas, ItemSlot, Label, LawReferenceTooltip, Lightbox, LineChart, LoadingState, MapView, MarkdownContent, MasterDetail, Menu, Meter, MiniMap, Modal, NumberStepper, Overlay, PageHeader, Pagination, PlatformerCanvas, Popover, PowerupSlots, ProgressBar, ProgressDots, PullToRefresh, QuestTracker, QuizBlock, Radio, RangeSlider, RelationSelect, RepeatableFormSection, ResourceBar, ResourceCounter, ScaledDiagram, ScoreBoard, ScoreDisplay, SearchInput, Select, SidePanel, SimpleGrid, SimulationCanvas, SimulationControls, SimulationGraph, Skeleton, SlotContentRenderer, SortableList, Spacer, Spinner, Sprite, Stack, StarRating, StatBadge, StatCard, StatDisplay, StateIndicator, StatusDot, StatusEffect, SwipeableRow, Switch, TILE_HEIGHT, TILE_WIDTH, Tabs, Text, TextHighlight, Textarea, ThemeSelector, ThemeToggle, TimeSlotCell, TimerDisplay, Toast, Tooltip, TrendIndicator, TurnIndicator, TurnPanel, TypewriterText, Typography, UISlotComponent, UISlotRenderer, UnitCommandBar, UploadDropZone, VStack, ViolationAlert, WaypointMarker, WizardNavigation, WizardProgress, XPBar, drawSprite, isoToScreen, pendulum, projectileMotion, screenToIso, springOscillator, useCamera, useImageCache } from '../chunk-
|
|
9
|
-
import '../chunk-
|
|
10
|
-
import { useTranslate } from '../chunk-
|
|
11
|
-
export { EntityDataProvider, I18nProvider, createTranslate, entityDataKeys, parseQueryBinding, useDragReorder, useEntity, useEntityDataAdapter, useEntityDetail, useEntityList, useEntityListSuspense, useEntitySuspense, useInfiniteScroll, useLongPress, usePullToRefresh, useQuerySingleton, useSwipeGesture, useTranslate } from '../chunk-
|
|
7
|
+
import { VStack, HStack, Typography, Button, Icon, Box, Card, Avatar, Badge, SearchInput, Checkbox, Menu as Menu$1, Pagination, LoadingState, EmptyState, Modal, ErrorState, QuizBlock, CodeBlock, ScaledDiagram, MarkdownContent, Divider, ProgressBar, isoToScreen, IsometricCanvas_default, Stack, Select, Drawer, Toast, Tabs, Input, ThemeToggle, TILE_WIDTH, EntityDisplayEvents, StateIndicator, Accordion, ButtonGroup, Container } from '../chunk-YYCP5CD7.js';
|
|
8
|
+
export { ALL_PRESETS, Accordion, ActionButton, ActionButtons, Card2 as ActionCard, Alert, AnimatedCounter, Avatar, Badge, Box, Breadcrumb, Button, ButtonGroup, CalendarGrid, CanvasEffect, Card, CardBody, CardContent, CardFooter, CardGrid, CardHeader, CardTitle, Carousel, Center, Chart, ChartLegend, Checkbox, ChoiceButton, CodeBlock, CombatLog, ComboCounter, ConditionalWrapper, ConfettiEffect, Container, ControlButton, CraftingRecipe, DIAMOND_TOP_Y, DPad, DamageNumber, DataGrid, DataList, DataTable, DateRangeSelector, DayCell, DetailPanel, DialogueBox, DialogueBubble, Divider, Drawer, EmptyState, EnemyPlate, EntityDisplayEvents, ErrorBoundary, ErrorState, FEATURE_COLORS, FLOOR_HEIGHT, FilterGroup, Flex, FlipCard, FlipContainer, FloatingActionButton, Form, FormField, FormSectionHeader, GameCanvas2D, GameHud, GameMenu, GameOverScreen, GraphView, Grid, HStack, Heading, HealthBar, HealthPanel, Icon, InfiniteScrollSentinel, Input, InputGroup, InventoryGrid, InventoryPanel, IsometricCanvas, ItemSlot, Label, LawReferenceTooltip, Lightbox, LineChart, LoadingState, MapView, MarkdownContent, MasterDetail, Menu, Meter, MiniMap, Modal, NumberStepper, Overlay, PageHeader, Pagination, PlatformerCanvas, Popover, PowerupSlots, ProgressBar, ProgressDots, PullToRefresh, QuestTracker, QuizBlock, Radio, RangeSlider, RelationSelect, RepeatableFormSection, ResourceBar, ResourceCounter, ScaledDiagram, ScoreBoard, ScoreDisplay, SearchInput, Select, SidePanel, SimpleGrid, SimulationCanvas, SimulationControls, SimulationGraph, Skeleton, SlotContentRenderer, SortableList, Spacer, Spinner, Sprite, Stack, StarRating, StatBadge, StatCard, StatDisplay, StateIndicator, StatusDot, StatusEffect, SwipeableRow, Switch, TILE_HEIGHT, TILE_WIDTH, Tabs, Text, TextHighlight, Textarea, ThemeSelector, ThemeToggle, TimeSlotCell, TimerDisplay, Toast, Tooltip, TrendIndicator, TurnIndicator, TurnPanel, TypewriterText, Typography, UISlotComponent, UISlotRenderer, UnitCommandBar, UploadDropZone, VStack, ViolationAlert, WaypointMarker, WizardNavigation, WizardProgress, XPBar, drawSprite, isoToScreen, pendulum, projectileMotion, screenToIso, springOscillator, useCamera, useImageCache } from '../chunk-YYCP5CD7.js';
|
|
9
|
+
import '../chunk-YLKXEXBP.js';
|
|
10
|
+
import { useTranslate } from '../chunk-3CP74CBL.js';
|
|
11
|
+
export { EntityDataProvider, I18nProvider, createTranslate, entityDataKeys, parseQueryBinding, useDragReorder, useEntity, useEntityDataAdapter, useEntityDetail, useEntityList, useEntityListSuspense, useEntitySuspense, useInfiniteScroll, useLongPress, usePullToRefresh, useQuerySingleton, useSwipeGesture, useTranslate } from '../chunk-3CP74CBL.js';
|
|
12
12
|
import { useEventBus, useEventListener } from '../chunk-YXZM3WCF.js';
|
|
13
13
|
export { useEmitEvent, useEventBus, useEventListener } from '../chunk-YXZM3WCF.js';
|
|
14
14
|
export { DEFAULT_SLOTS, useUISlotManager } from '../chunk-3JGAROCW.js';
|
|
15
|
+
import '../chunk-2XXSUIOK.js';
|
|
15
16
|
import { cn, getNestedValue, subscribeToVerification, getSummary, getBridgeHealth, getTransitions, getAllChecks } from '../chunk-WCTZ7WZX.js';
|
|
16
17
|
export { cn } from '../chunk-WCTZ7WZX.js';
|
|
17
|
-
import '../chunk-2XXSUIOK.js';
|
|
18
18
|
import '../chunk-K2D5D3WK.js';
|
|
19
19
|
import { __publicField } from '../chunk-PKBMQBKP.js';
|
|
20
20
|
import * as React44 from 'react';
|
package/dist/context/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ThemeProvider, useTheme } from '../chunk-
|
|
2
|
-
export { BUILT_IN_THEMES, ThemeContext_default as ThemeContext, ThemeProvider, UISlotContext, UISlotProvider, useSlotContent, useSlotHasContent, useTheme, useUISlots } from '../chunk-
|
|
1
|
+
import { ThemeProvider, useTheme } from '../chunk-YLKXEXBP.js';
|
|
2
|
+
export { BUILT_IN_THEMES, ThemeContext_default as ThemeContext, ThemeProvider, UISlotContext, UISlotProvider, useSlotContent, useSlotHasContent, useTheme, useUISlots } from '../chunk-YLKXEXBP.js';
|
|
3
3
|
import '../chunk-3JGAROCW.js';
|
|
4
4
|
import '../chunk-PKBMQBKP.js';
|
|
5
5
|
import { createContext, useCallback, useMemo, useContext } from 'react';
|