@almadar/ui 1.0.31 → 1.0.32
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-LRI6C6UI.js → chunk-BTXQJGFB.js} +25 -2
- package/dist/chunk-N6DJVKZ6.js +747 -0
- package/dist/chunk-PE2H3NAW.js +383 -0
- package/dist/{chunk-WRL6TBOL.js → chunk-RFD6G3ZR.js} +22 -90
- package/dist/chunk-UCXZS2YJ.js +9501 -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/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 +20 -11
- 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,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 };
|