@almadar/ui 1.0.31 → 1.0.33
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/KaTeX_AMS-Regular-CYEKBG2K.woff +0 -0
- package/dist/KaTeX_AMS-Regular-JKX5W2C4.ttf +0 -0
- package/dist/KaTeX_AMS-Regular-U6PRYMIZ.woff2 +0 -0
- package/dist/KaTeX_Caligraphic-Bold-5QL5CMTE.woff2 +0 -0
- package/dist/KaTeX_Caligraphic-Bold-WZ3QSGD3.woff +0 -0
- package/dist/KaTeX_Caligraphic-Bold-ZTS3R3HK.ttf +0 -0
- package/dist/KaTeX_Caligraphic-Regular-3LKEU76G.woff +0 -0
- package/dist/KaTeX_Caligraphic-Regular-A7XRTZ5Q.ttf +0 -0
- package/dist/KaTeX_Caligraphic-Regular-KX5MEWCF.woff2 +0 -0
- package/dist/KaTeX_Fraktur-Bold-2QVFK6NQ.woff2 +0 -0
- package/dist/KaTeX_Fraktur-Bold-T4SWXBMT.woff +0 -0
- package/dist/KaTeX_Fraktur-Bold-WGHVTYOR.ttf +0 -0
- package/dist/KaTeX_Fraktur-Regular-2PEIFJSJ.woff2 +0 -0
- package/dist/KaTeX_Fraktur-Regular-5U4OPH2X.ttf +0 -0
- package/dist/KaTeX_Fraktur-Regular-PQMHCIK6.woff +0 -0
- package/dist/KaTeX_Main-Bold-2GA4IZIN.woff +0 -0
- package/dist/KaTeX_Main-Bold-W5FBVCZM.ttf +0 -0
- package/dist/KaTeX_Main-Bold-YP5VVQRP.woff2 +0 -0
- package/dist/KaTeX_Main-BoldItalic-4P4C7HJH.woff +0 -0
- package/dist/KaTeX_Main-BoldItalic-N4V3DX7S.woff2 +0 -0
- package/dist/KaTeX_Main-BoldItalic-ODMLBJJQ.ttf +0 -0
- package/dist/KaTeX_Main-Italic-I43T2HSR.ttf +0 -0
- package/dist/KaTeX_Main-Italic-RELBIK7M.woff2 +0 -0
- package/dist/KaTeX_Main-Italic-SASNQFN2.woff +0 -0
- package/dist/KaTeX_Main-Regular-ARRPAO67.woff2 +0 -0
- package/dist/KaTeX_Main-Regular-P5I74A2A.woff +0 -0
- package/dist/KaTeX_Main-Regular-W74P5G27.ttf +0 -0
- package/dist/KaTeX_Math-BoldItalic-6EBV3DK5.woff +0 -0
- package/dist/KaTeX_Math-BoldItalic-K4WTGH3J.woff2 +0 -0
- package/dist/KaTeX_Math-BoldItalic-VB447A4D.ttf +0 -0
- package/dist/KaTeX_Math-Italic-6KGCHLFN.woff2 +0 -0
- package/dist/KaTeX_Math-Italic-KKK3USB2.woff +0 -0
- package/dist/KaTeX_Math-Italic-SON4MRCA.ttf +0 -0
- package/dist/KaTeX_SansSerif-Bold-RRNVJFFW.woff2 +0 -0
- package/dist/KaTeX_SansSerif-Bold-STQ6RXC7.ttf +0 -0
- package/dist/KaTeX_SansSerif-Bold-X5M5EMOD.woff +0 -0
- package/dist/KaTeX_SansSerif-Italic-HMPFTM52.woff2 +0 -0
- package/dist/KaTeX_SansSerif-Italic-PSN4QKYX.woff +0 -0
- package/dist/KaTeX_SansSerif-Italic-WTBAZBGY.ttf +0 -0
- package/dist/KaTeX_SansSerif-Regular-2TL3USAE.ttf +0 -0
- package/dist/KaTeX_SansSerif-Regular-OQCII6EP.woff +0 -0
- package/dist/KaTeX_SansSerif-Regular-XIQ62X4E.woff2 +0 -0
- package/dist/KaTeX_Script-Regular-72OLXYNA.ttf +0 -0
- package/dist/KaTeX_Script-Regular-A5IFOEBS.woff +0 -0
- package/dist/KaTeX_Script-Regular-APUWIHLP.woff2 +0 -0
- package/dist/KaTeX_Size1-Regular-4HRHTS65.woff +0 -0
- package/dist/KaTeX_Size1-Regular-5LRUTBFT.woff2 +0 -0
- package/dist/KaTeX_Size1-Regular-7K6AASVL.ttf +0 -0
- package/dist/KaTeX_Size2-Regular-222HN3GT.ttf +0 -0
- package/dist/KaTeX_Size2-Regular-K5ZHAIS6.woff +0 -0
- package/dist/KaTeX_Size2-Regular-LELKET5D.woff2 +0 -0
- package/dist/KaTeX_Size3-Regular-TLFPAHDE.woff +0 -0
- package/dist/KaTeX_Size3-Regular-UFCO6WCA.ttf +0 -0
- package/dist/KaTeX_Size3-Regular-WQRQ47UD.woff2 +0 -0
- package/dist/KaTeX_Size4-Regular-7PGNVPQK.ttf +0 -0
- package/dist/KaTeX_Size4-Regular-CDMV7U5C.woff2 +0 -0
- package/dist/KaTeX_Size4-Regular-PKMWZHNC.woff +0 -0
- package/dist/KaTeX_Typewriter-Regular-3F5K6SQ6.ttf +0 -0
- package/dist/KaTeX_Typewriter-Regular-MJMFSK64.woff +0 -0
- package/dist/KaTeX_Typewriter-Regular-VBYJ4NRC.woff2 +0 -0
- package/dist/chunk-45CTDYBT.js +174 -0
- package/dist/{chunk-WRL6TBOL.js → chunk-BKC4XU44.js} +22 -90
- package/dist/{chunk-LRI6C6UI.js → chunk-BTXQJGFB.js} +25 -2
- package/dist/chunk-FZJ73RDM.js +9501 -0
- package/dist/chunk-N6DJVKZ6.js +747 -0
- package/dist/chunk-PE2H3NAW.js +383 -0
- package/dist/{chunk-RUGU4MSK.js → chunk-YXZM3WCF.js} +37 -1
- package/dist/cn-BoBXsxuX.d.ts +194 -0
- package/dist/components/index.css +1154 -0
- package/dist/components/index.d.ts +804 -329
- package/dist/components/index.js +8095 -15387
- package/dist/components/organisms/game/three/index.d.ts +0 -107
- package/dist/components/organisms/game/three/index.js +1 -1
- package/dist/context/index.d.ts +2 -2
- package/dist/context/index.js +2 -3
- package/dist/{event-bus-types-8-cjyMxw.d.ts → event-bus-types-CjJduURa.d.ts} +8 -0
- package/dist/hooks/index.d.ts +83 -120
- package/dist/hooks/index.js +4 -4
- package/dist/lib/index.d.ts +117 -153
- package/dist/lib/index.js +4 -683
- package/dist/locales/index.d.ts +22 -0
- package/dist/locales/index.js +334 -0
- package/dist/providers/index.css +1154 -0
- package/dist/providers/index.d.ts +79 -3
- package/dist/providers/index.js +158 -10
- package/dist/{useUISlots-mnggE9X9.d.ts → useUISlots-D0mttBSP.d.ts} +0 -20
- package/package.json +23 -10
- package/dist/chunk-VLWZZA6A.js +0 -239
- package/dist/chunk-W5YTXLXL.js +0 -29
- package/dist/cn-mqkxz8Sd.d.ts +0 -9
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
// lib/verificationRegistry.ts
|
|
2
|
+
var checks = /* @__PURE__ */ new Map();
|
|
3
|
+
var transitions = [];
|
|
4
|
+
var bridgeHealth = null;
|
|
5
|
+
var MAX_TRANSITIONS = 500;
|
|
6
|
+
var listeners = /* @__PURE__ */ new Set();
|
|
7
|
+
function notifyListeners() {
|
|
8
|
+
listeners.forEach((l) => l());
|
|
9
|
+
exposeOnWindow();
|
|
10
|
+
}
|
|
11
|
+
function registerCheck(id, label, status = "pending", details) {
|
|
12
|
+
checks.set(id, { id, label, status, details, updatedAt: Date.now() });
|
|
13
|
+
notifyListeners();
|
|
14
|
+
}
|
|
15
|
+
function updateCheck(id, status, details) {
|
|
16
|
+
const check = checks.get(id);
|
|
17
|
+
if (check) {
|
|
18
|
+
check.status = status;
|
|
19
|
+
if (details !== void 0) check.details = details;
|
|
20
|
+
check.updatedAt = Date.now();
|
|
21
|
+
} else {
|
|
22
|
+
checks.set(id, { id, label: id, status, details, updatedAt: Date.now() });
|
|
23
|
+
}
|
|
24
|
+
notifyListeners();
|
|
25
|
+
}
|
|
26
|
+
function getAllChecks() {
|
|
27
|
+
return Array.from(checks.values());
|
|
28
|
+
}
|
|
29
|
+
function recordTransition(trace) {
|
|
30
|
+
const entry = {
|
|
31
|
+
...trace,
|
|
32
|
+
id: `t-${Date.now()}-${Math.random().toString(36).slice(2, 9)}`
|
|
33
|
+
};
|
|
34
|
+
transitions.push(entry);
|
|
35
|
+
if (transitions.length > MAX_TRANSITIONS) {
|
|
36
|
+
transitions.shift();
|
|
37
|
+
}
|
|
38
|
+
if (entry.event === "INIT") {
|
|
39
|
+
const hasFetch = entry.effects.some((e) => e.type === "fetch");
|
|
40
|
+
const checkId = `init-fetch-${entry.traitName}`;
|
|
41
|
+
if (hasFetch) {
|
|
42
|
+
registerCheck(
|
|
43
|
+
checkId,
|
|
44
|
+
`INIT transition for "${entry.traitName}" has fetch effect`,
|
|
45
|
+
"pass"
|
|
46
|
+
);
|
|
47
|
+
} else {
|
|
48
|
+
const hasRenderUI = entry.effects.some((e) => e.type === "render-ui");
|
|
49
|
+
if (hasRenderUI) {
|
|
50
|
+
registerCheck(
|
|
51
|
+
checkId,
|
|
52
|
+
`INIT transition for "${entry.traitName}" missing fetch effect`,
|
|
53
|
+
"fail",
|
|
54
|
+
"Entity-bound render-ui without a fetch effect will show empty data"
|
|
55
|
+
);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
const failedEffects = entry.effects.filter((e) => e.status === "failed");
|
|
60
|
+
if (failedEffects.length > 0) {
|
|
61
|
+
registerCheck(
|
|
62
|
+
`effects-${entry.id}`,
|
|
63
|
+
`Effects failed in ${entry.traitName}: ${entry.from} -> ${entry.to}`,
|
|
64
|
+
"fail",
|
|
65
|
+
failedEffects.map((e) => `${e.type}: ${e.error}`).join("; ")
|
|
66
|
+
);
|
|
67
|
+
}
|
|
68
|
+
notifyListeners();
|
|
69
|
+
}
|
|
70
|
+
function getTransitions() {
|
|
71
|
+
return [...transitions];
|
|
72
|
+
}
|
|
73
|
+
function getTransitionsForTrait(traitName) {
|
|
74
|
+
return transitions.filter((t) => t.traitName === traitName);
|
|
75
|
+
}
|
|
76
|
+
function updateBridgeHealth(health) {
|
|
77
|
+
bridgeHealth = { ...health };
|
|
78
|
+
const checkId = "server-bridge";
|
|
79
|
+
if (health.connected) {
|
|
80
|
+
registerCheck(checkId, "Server bridge connected", "pass");
|
|
81
|
+
} else {
|
|
82
|
+
registerCheck(
|
|
83
|
+
checkId,
|
|
84
|
+
"Server bridge disconnected",
|
|
85
|
+
"fail",
|
|
86
|
+
health.lastError || "Bridge is not connected"
|
|
87
|
+
);
|
|
88
|
+
}
|
|
89
|
+
notifyListeners();
|
|
90
|
+
}
|
|
91
|
+
function getBridgeHealth() {
|
|
92
|
+
return bridgeHealth ? { ...bridgeHealth } : null;
|
|
93
|
+
}
|
|
94
|
+
function getSummary() {
|
|
95
|
+
const allChecks = getAllChecks();
|
|
96
|
+
return {
|
|
97
|
+
totalChecks: allChecks.length,
|
|
98
|
+
passed: allChecks.filter((c) => c.status === "pass").length,
|
|
99
|
+
failed: allChecks.filter((c) => c.status === "fail").length,
|
|
100
|
+
warnings: allChecks.filter((c) => c.status === "warn").length,
|
|
101
|
+
pending: allChecks.filter((c) => c.status === "pending").length
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
function getSnapshot() {
|
|
105
|
+
return {
|
|
106
|
+
checks: getAllChecks(),
|
|
107
|
+
transitions: getTransitions(),
|
|
108
|
+
bridge: getBridgeHealth(),
|
|
109
|
+
summary: getSummary()
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
function subscribeToVerification(listener) {
|
|
113
|
+
listeners.add(listener);
|
|
114
|
+
return () => listeners.delete(listener);
|
|
115
|
+
}
|
|
116
|
+
function exposeOnWindow() {
|
|
117
|
+
if (typeof window === "undefined") return;
|
|
118
|
+
if (!window.__orbitalVerification) {
|
|
119
|
+
window.__orbitalVerification = {
|
|
120
|
+
getSnapshot,
|
|
121
|
+
getChecks: getAllChecks,
|
|
122
|
+
getTransitions,
|
|
123
|
+
getBridge: getBridgeHealth,
|
|
124
|
+
getSummary,
|
|
125
|
+
waitForTransition
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
function waitForTransition(event, timeoutMs = 1e4) {
|
|
130
|
+
return new Promise((resolve) => {
|
|
131
|
+
const existing = transitions.find((t) => t.event === event);
|
|
132
|
+
if (existing) {
|
|
133
|
+
resolve(existing);
|
|
134
|
+
return;
|
|
135
|
+
}
|
|
136
|
+
const timeout = setTimeout(() => {
|
|
137
|
+
unsub();
|
|
138
|
+
resolve(null);
|
|
139
|
+
}, timeoutMs);
|
|
140
|
+
const unsub = subscribeToVerification(() => {
|
|
141
|
+
const found = transitions.find((t) => t.event === event);
|
|
142
|
+
if (found) {
|
|
143
|
+
clearTimeout(timeout);
|
|
144
|
+
unsub();
|
|
145
|
+
resolve(found);
|
|
146
|
+
}
|
|
147
|
+
});
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
function bindEventBus(eventBus) {
|
|
151
|
+
if (typeof window === "undefined") return;
|
|
152
|
+
exposeOnWindow();
|
|
153
|
+
if (window.__orbitalVerification) {
|
|
154
|
+
window.__orbitalVerification.sendEvent = (event, payload) => {
|
|
155
|
+
eventBus.emit(event, payload);
|
|
156
|
+
};
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
function bindTraitStateGetter(getter) {
|
|
160
|
+
if (typeof window === "undefined") return;
|
|
161
|
+
exposeOnWindow();
|
|
162
|
+
if (window.__orbitalVerification) {
|
|
163
|
+
window.__orbitalVerification.getTraitState = getter;
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
function clearVerification() {
|
|
167
|
+
checks.clear();
|
|
168
|
+
transitions.length = 0;
|
|
169
|
+
bridgeHealth = null;
|
|
170
|
+
notifyListeners();
|
|
171
|
+
}
|
|
172
|
+
exposeOnWindow();
|
|
173
|
+
|
|
174
|
+
export { bindEventBus, bindTraitStateGetter, clearVerification, getAllChecks, getBridgeHealth, getSnapshot, getSummary, getTransitions, getTransitionsForTrait, recordTransition, registerCheck, subscribeToVerification, updateBridgeHealth, updateCheck, waitForTransition };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { apiClient } from './chunk-XSEDIUM6.js';
|
|
2
|
-
import { SelectionContext, entityDataKeys } from './chunk-
|
|
2
|
+
import { SelectionContext, entityDataKeys, useEntityList } from './chunk-PE2H3NAW.js';
|
|
3
|
+
import { useEventBus } from './chunk-YXZM3WCF.js';
|
|
3
4
|
import { subscribe, getSnapshot, clearEntities, removeEntity, updateSingleton, updateEntity, spawnEntity, getSingleton, getAllEntities, getByType, getEntity } from './chunk-N7MVUW4R.js';
|
|
4
|
-
import {
|
|
5
|
-
import { createContext, useCallback, useState, useEffect, useMemo, useContext, useSyncExternalStore } from 'react';
|
|
5
|
+
import { useCallback, useState, useEffect, useMemo, useContext, useSyncExternalStore } from 'react';
|
|
6
6
|
import { useQueryClient, useMutation, useQuery } from '@tanstack/react-query';
|
|
7
7
|
|
|
8
8
|
function useOrbitalHistory(options) {
|
|
@@ -988,72 +988,6 @@ function useSelectionContext() {
|
|
|
988
988
|
const context = useContext(SelectionContext);
|
|
989
989
|
return context;
|
|
990
990
|
}
|
|
991
|
-
var queryStores = /* @__PURE__ */ new Map();
|
|
992
|
-
function getOrCreateStore(query) {
|
|
993
|
-
if (!queryStores.has(query)) {
|
|
994
|
-
queryStores.set(query, {
|
|
995
|
-
search: "",
|
|
996
|
-
filters: {},
|
|
997
|
-
sortField: void 0,
|
|
998
|
-
sortDirection: void 0,
|
|
999
|
-
listeners: /* @__PURE__ */ new Set()
|
|
1000
|
-
});
|
|
1001
|
-
}
|
|
1002
|
-
return queryStores.get(query);
|
|
1003
|
-
}
|
|
1004
|
-
function useQuerySingleton(query) {
|
|
1005
|
-
const [, forceUpdate] = useState({});
|
|
1006
|
-
if (!query) {
|
|
1007
|
-
return null;
|
|
1008
|
-
}
|
|
1009
|
-
const store = useMemo(() => getOrCreateStore(query), [query]);
|
|
1010
|
-
useMemo(() => {
|
|
1011
|
-
const listener = () => forceUpdate({});
|
|
1012
|
-
store.listeners.add(listener);
|
|
1013
|
-
return () => {
|
|
1014
|
-
store.listeners.delete(listener);
|
|
1015
|
-
};
|
|
1016
|
-
}, [store]);
|
|
1017
|
-
const notifyListeners = useCallback(() => {
|
|
1018
|
-
store.listeners.forEach((listener) => listener());
|
|
1019
|
-
}, [store]);
|
|
1020
|
-
const setSearch = useCallback((value) => {
|
|
1021
|
-
store.search = value;
|
|
1022
|
-
notifyListeners();
|
|
1023
|
-
}, [store, notifyListeners]);
|
|
1024
|
-
const setFilter = useCallback((key, value) => {
|
|
1025
|
-
store.filters = { ...store.filters, [key]: value };
|
|
1026
|
-
notifyListeners();
|
|
1027
|
-
}, [store, notifyListeners]);
|
|
1028
|
-
const clearFilters = useCallback(() => {
|
|
1029
|
-
store.filters = {};
|
|
1030
|
-
store.search = "";
|
|
1031
|
-
notifyListeners();
|
|
1032
|
-
}, [store, notifyListeners]);
|
|
1033
|
-
const setSort = useCallback((field, direction) => {
|
|
1034
|
-
store.sortField = field;
|
|
1035
|
-
store.sortDirection = direction;
|
|
1036
|
-
notifyListeners();
|
|
1037
|
-
}, [store, notifyListeners]);
|
|
1038
|
-
return {
|
|
1039
|
-
search: store.search,
|
|
1040
|
-
setSearch,
|
|
1041
|
-
filters: store.filters,
|
|
1042
|
-
setFilter,
|
|
1043
|
-
clearFilters,
|
|
1044
|
-
sortField: store.sortField,
|
|
1045
|
-
sortDirection: store.sortDirection,
|
|
1046
|
-
setSort
|
|
1047
|
-
};
|
|
1048
|
-
}
|
|
1049
|
-
function parseQueryBinding(binding) {
|
|
1050
|
-
const cleaned = binding.startsWith("@") ? binding.slice(1) : binding;
|
|
1051
|
-
const parts = cleaned.split(".");
|
|
1052
|
-
return {
|
|
1053
|
-
query: parts[0],
|
|
1054
|
-
field: parts.length > 1 ? parts.slice(1).join(".") : void 0
|
|
1055
|
-
};
|
|
1056
|
-
}
|
|
1057
991
|
var ENTITY_EVENTS = {
|
|
1058
992
|
CREATE: "ENTITY_CREATE",
|
|
1059
993
|
UPDATE: "ENTITY_UPDATE",
|
|
@@ -1389,27 +1323,25 @@ function useInput() {
|
|
|
1389
1323
|
}, [input?.id]);
|
|
1390
1324
|
return { input, updateInput: update };
|
|
1391
1325
|
}
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
}
|
|
1403
|
-
function createTranslate(messages) {
|
|
1404
|
-
return (key, params) => {
|
|
1405
|
-
let msg = messages[key] ?? key;
|
|
1406
|
-
if (params) {
|
|
1407
|
-
for (const [k, v] of Object.entries(params)) {
|
|
1408
|
-
msg = msg.split(`{{${k}}}`).join(String(v));
|
|
1409
|
-
}
|
|
1326
|
+
function useResolvedEntity(entity, data) {
|
|
1327
|
+
const shouldFetch = !data && !!entity;
|
|
1328
|
+
const fetched = useEntityList(entity, { skip: !shouldFetch });
|
|
1329
|
+
return useMemo(() => {
|
|
1330
|
+
if (data) {
|
|
1331
|
+
return {
|
|
1332
|
+
data,
|
|
1333
|
+
isLocal: true,
|
|
1334
|
+
isLoading: false,
|
|
1335
|
+
error: null
|
|
1336
|
+
};
|
|
1410
1337
|
}
|
|
1411
|
-
return
|
|
1412
|
-
|
|
1338
|
+
return {
|
|
1339
|
+
data: fetched.data,
|
|
1340
|
+
isLocal: false,
|
|
1341
|
+
isLoading: fetched.isLoading,
|
|
1342
|
+
error: fetched.error
|
|
1343
|
+
};
|
|
1344
|
+
}, [data, fetched.data, fetched.isLoading, fetched.error]);
|
|
1413
1345
|
}
|
|
1414
1346
|
|
|
1415
1347
|
// hooks/useAuthContext.ts
|
|
@@ -1497,4 +1429,4 @@ function useGitHubBranches(owner, repo, enabled = true) {
|
|
|
1497
1429
|
});
|
|
1498
1430
|
}
|
|
1499
1431
|
|
|
1500
|
-
export { ENTITY_EVENTS,
|
|
1432
|
+
export { ENTITY_EVENTS, useAgentChat, useAuthContext, useCompile, useConnectGitHub, useCreateEntity, useDeepAgentGeneration, useDeleteEntity, useDisconnectGitHub, useEntities, useEntitiesByType, useEntity, useEntityMutations, useExtensions, useFileEditor, useFileSystem, useGitHubBranches, useGitHubRepo, useGitHubRepos, useGitHubStatus, useInput, useOrbitalHistory, useOrbitalMutations, usePhysics, usePlayer, usePreview, useResolvedEntity, useSelectedEntity, useSendOrbitalEvent, useSingletonEntity, useUIEvents, useUpdateEntity, useValidation };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import { useUISlotManager } from './chunk-7NEWMNNU.js';
|
|
1
2
|
import { createContext, useMemo, useState, useEffect, useCallback, useContext } from 'react';
|
|
2
3
|
import { jsx } from 'react/jsx-runtime';
|
|
3
4
|
|
|
4
|
-
// context/ThemeContext.tsx
|
|
5
5
|
var BUILT_IN_THEMES = [
|
|
6
6
|
{
|
|
7
7
|
name: "wireframe",
|
|
@@ -252,5 +252,28 @@ function useTheme() {
|
|
|
252
252
|
return context;
|
|
253
253
|
}
|
|
254
254
|
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
|
+
}
|
|
255
278
|
|
|
256
|
-
export { BUILT_IN_THEMES, ThemeContext_default, ThemeProvider, useTheme };
|
|
279
|
+
export { BUILT_IN_THEMES, ThemeContext_default, ThemeProvider, UISlotContext, UISlotProvider, useSlotContent, useSlotHasContent, useTheme, useUISlots };
|