@almadar/shell-web 0.0.0-stage → 1.0.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.
Files changed (266) hide show
  1. package/bundling.d.mts +18 -0
  2. package/bundling.mjs +28 -0
  3. package/dist/ArbitraryClassCompiler-CO_iASBn.d.ts +195 -0
  4. package/dist/AvlGlyph-EPJKFEO3.js +6 -0
  5. package/dist/AvlStateMachine-RKZIKNGC.js +9 -0
  6. package/dist/AvlTransitionDetail-63SD6GZF.js +11 -0
  7. package/dist/AvlTransitionExplainer-ZBTLOM3T.js +12 -0
  8. package/dist/BehaviorView-YS5G4GNB.js +11 -0
  9. package/dist/Canvas3DHost-BkZQB5l2.d.ts +552 -0
  10. package/dist/EventBusProvider-BFFHfN4O.d.ts +296 -0
  11. package/dist/FileTree-BCFnBEuQ.d.ts +254 -0
  12. package/dist/FlowCanvas-3JRMNJLV.css +1756 -0
  13. package/dist/FlowCanvas-AUMTWMNG.js +26 -0
  14. package/dist/GameAudioProvider-ceM_n0ey.d.ts +90 -0
  15. package/dist/KaTeX_AMS-Regular-CYEKBG2K.woff +0 -0
  16. package/dist/KaTeX_AMS-Regular-JKX5W2C4.ttf +0 -0
  17. package/dist/KaTeX_AMS-Regular-U6PRYMIZ.woff2 +0 -0
  18. package/dist/KaTeX_Caligraphic-Bold-5QL5CMTE.woff2 +0 -0
  19. package/dist/KaTeX_Caligraphic-Bold-WZ3QSGD3.woff +0 -0
  20. package/dist/KaTeX_Caligraphic-Bold-ZTS3R3HK.ttf +0 -0
  21. package/dist/KaTeX_Caligraphic-Regular-3LKEU76G.woff +0 -0
  22. package/dist/KaTeX_Caligraphic-Regular-A7XRTZ5Q.ttf +0 -0
  23. package/dist/KaTeX_Caligraphic-Regular-KX5MEWCF.woff2 +0 -0
  24. package/dist/KaTeX_Fraktur-Bold-2QVFK6NQ.woff2 +0 -0
  25. package/dist/KaTeX_Fraktur-Bold-T4SWXBMT.woff +0 -0
  26. package/dist/KaTeX_Fraktur-Bold-WGHVTYOR.ttf +0 -0
  27. package/dist/KaTeX_Fraktur-Regular-2PEIFJSJ.woff2 +0 -0
  28. package/dist/KaTeX_Fraktur-Regular-5U4OPH2X.ttf +0 -0
  29. package/dist/KaTeX_Fraktur-Regular-PQMHCIK6.woff +0 -0
  30. package/dist/KaTeX_Main-Bold-2GA4IZIN.woff +0 -0
  31. package/dist/KaTeX_Main-Bold-W5FBVCZM.ttf +0 -0
  32. package/dist/KaTeX_Main-Bold-YP5VVQRP.woff2 +0 -0
  33. package/dist/KaTeX_Main-BoldItalic-4P4C7HJH.woff +0 -0
  34. package/dist/KaTeX_Main-BoldItalic-N4V3DX7S.woff2 +0 -0
  35. package/dist/KaTeX_Main-BoldItalic-ODMLBJJQ.ttf +0 -0
  36. package/dist/KaTeX_Main-Italic-I43T2HSR.ttf +0 -0
  37. package/dist/KaTeX_Main-Italic-RELBIK7M.woff2 +0 -0
  38. package/dist/KaTeX_Main-Italic-SASNQFN2.woff +0 -0
  39. package/dist/KaTeX_Main-Regular-ARRPAO67.woff2 +0 -0
  40. package/dist/KaTeX_Main-Regular-P5I74A2A.woff +0 -0
  41. package/dist/KaTeX_Main-Regular-W74P5G27.ttf +0 -0
  42. package/dist/KaTeX_Math-BoldItalic-6EBV3DK5.woff +0 -0
  43. package/dist/KaTeX_Math-BoldItalic-K4WTGH3J.woff2 +0 -0
  44. package/dist/KaTeX_Math-BoldItalic-VB447A4D.ttf +0 -0
  45. package/dist/KaTeX_Math-Italic-6KGCHLFN.woff2 +0 -0
  46. package/dist/KaTeX_Math-Italic-KKK3USB2.woff +0 -0
  47. package/dist/KaTeX_Math-Italic-SON4MRCA.ttf +0 -0
  48. package/dist/KaTeX_SansSerif-Bold-RRNVJFFW.woff2 +0 -0
  49. package/dist/KaTeX_SansSerif-Bold-STQ6RXC7.ttf +0 -0
  50. package/dist/KaTeX_SansSerif-Bold-X5M5EMOD.woff +0 -0
  51. package/dist/KaTeX_SansSerif-Italic-HMPFTM52.woff2 +0 -0
  52. package/dist/KaTeX_SansSerif-Italic-PSN4QKYX.woff +0 -0
  53. package/dist/KaTeX_SansSerif-Italic-WTBAZBGY.ttf +0 -0
  54. package/dist/KaTeX_SansSerif-Regular-2TL3USAE.ttf +0 -0
  55. package/dist/KaTeX_SansSerif-Regular-OQCII6EP.woff +0 -0
  56. package/dist/KaTeX_SansSerif-Regular-XIQ62X4E.woff2 +0 -0
  57. package/dist/KaTeX_Script-Regular-72OLXYNA.ttf +0 -0
  58. package/dist/KaTeX_Script-Regular-A5IFOEBS.woff +0 -0
  59. package/dist/KaTeX_Script-Regular-APUWIHLP.woff2 +0 -0
  60. package/dist/KaTeX_Size1-Regular-4HRHTS65.woff +0 -0
  61. package/dist/KaTeX_Size1-Regular-5LRUTBFT.woff2 +0 -0
  62. package/dist/KaTeX_Size1-Regular-7K6AASVL.ttf +0 -0
  63. package/dist/KaTeX_Size2-Regular-222HN3GT.ttf +0 -0
  64. package/dist/KaTeX_Size2-Regular-K5ZHAIS6.woff +0 -0
  65. package/dist/KaTeX_Size2-Regular-LELKET5D.woff2 +0 -0
  66. package/dist/KaTeX_Size3-Regular-TLFPAHDE.woff +0 -0
  67. package/dist/KaTeX_Size3-Regular-UFCO6WCA.ttf +0 -0
  68. package/dist/KaTeX_Size3-Regular-WQRQ47UD.woff2 +0 -0
  69. package/dist/KaTeX_Size4-Regular-7PGNVPQK.ttf +0 -0
  70. package/dist/KaTeX_Size4-Regular-CDMV7U5C.woff2 +0 -0
  71. package/dist/KaTeX_Size4-Regular-PKMWZHNC.woff +0 -0
  72. package/dist/KaTeX_Typewriter-Regular-3F5K6SQ6.ttf +0 -0
  73. package/dist/KaTeX_Typewriter-Regular-MJMFSK64.woff +0 -0
  74. package/dist/KaTeX_Typewriter-Regular-VBYJ4NRC.woff2 +0 -0
  75. package/dist/KernelEngineContext-CcxGYtlr.d.ts +33 -0
  76. package/dist/LayersPanel-M2LHWUFF.js +6 -0
  77. package/dist/ModuleCard-QHDGK5XK.js +7 -0
  78. package/dist/OrbInspector-MHLJ6OEE.css +1756 -0
  79. package/dist/OrbInspector-QCPEPUPH.js +26 -0
  80. package/dist/Select-B-iDdnvE.d.ts +185 -0
  81. package/dist/ServerBridge-Bqsj-lOU.d.ts +124 -0
  82. package/dist/ThemeContext-DJmO59xd.d.ts +147 -0
  83. package/dist/UISlotContext-Dl_ewwCI.d.ts +79 -0
  84. package/dist/UISlotRenderer-C7WWOK43.js +26 -0
  85. package/dist/UISlotRenderer-KVFO6J7R.css +1756 -0
  86. package/dist/auth/browser/index.d.ts +2 -0
  87. package/dist/auth/browser/index.js +2 -0
  88. package/dist/auth/react/index.d.ts +56 -0
  89. package/dist/auth/react/index.js +157 -0
  90. package/dist/avl/index.css +1756 -0
  91. package/dist/avl/index.d.ts +2248 -0
  92. package/dist/avl/index.js +2693 -0
  93. package/dist/avl-3d-context-BycmO6tG.d.ts +201 -0
  94. package/dist/avl-schema-parser-CtJxJ9KU.d.ts +132 -0
  95. package/dist/avl-zoom-state-CKMVuBFg.d.ts +17 -0
  96. package/dist/chunk-3BBUBJFF.js +339 -0
  97. package/dist/chunk-3S54FWRC.js +131 -0
  98. package/dist/chunk-3VZ36ZKO.js +775 -0
  99. package/dist/chunk-4T3P43NS.js +1133 -0
  100. package/dist/chunk-4YXBKHHM.js +11488 -0
  101. package/dist/chunk-57DC34LY.js +525 -0
  102. package/dist/chunk-5QTYQTPS.js +15 -0
  103. package/dist/chunk-A2LR6VQQ.js +349 -0
  104. package/dist/chunk-AB3X7QTE.js +505 -0
  105. package/dist/chunk-AE7VCQB6.js +561 -0
  106. package/dist/chunk-AGXD77SL.js +98 -0
  107. package/dist/chunk-AU7O65OX.js +66 -0
  108. package/dist/chunk-CPLN6NBQ.js +701 -0
  109. package/dist/chunk-DZBQA2OW.js +176 -0
  110. package/dist/chunk-E6KA4J6N.js +227 -0
  111. package/dist/chunk-EOWMARUB.js +16 -0
  112. package/dist/chunk-G7DCAZ22.js +19 -0
  113. package/dist/chunk-GFXCPUMX.js +1334 -0
  114. package/dist/chunk-HH5KSMH5.js +311 -0
  115. package/dist/chunk-ILQXJ2AR.js +280 -0
  116. package/dist/chunk-ILZ7ORX7.js +432 -0
  117. package/dist/chunk-K4MOPSEL.js +674 -0
  118. package/dist/chunk-LHP2TK7O.js +47587 -0
  119. package/dist/chunk-P4ZFUQFF.js +93 -0
  120. package/dist/chunk-PCR37T3U.js +296 -0
  121. package/dist/chunk-PRXQGGCO.js +580 -0
  122. package/dist/chunk-REXYVBUO.js +191 -0
  123. package/dist/chunk-ROICKAU7.js +24 -0
  124. package/dist/chunk-SP5CDJ6K.js +338 -0
  125. package/dist/chunk-TUPZWTRE.js +1051 -0
  126. package/dist/chunk-TXAUOLWZ.js +490 -0
  127. package/dist/chunk-TZZBINQY.js +82 -0
  128. package/dist/chunk-UTDC2NEA.js +14 -0
  129. package/dist/chunk-UU57VNS2.js +1053 -0
  130. package/dist/chunk-UXLE3IPR.js +421 -0
  131. package/dist/chunk-VO2TTLS5.js +94 -0
  132. package/dist/chunk-X3DMMX27.js +11 -0
  133. package/dist/chunk-YHMRX6YA.js +455 -0
  134. package/dist/components/index.css +1756 -0
  135. package/dist/components/index.d.ts +11299 -0
  136. package/dist/components/index.js +1110 -0
  137. package/dist/context/index.d.ts +8 -0
  138. package/dist/context/index.js +8 -0
  139. package/dist/core.d.ts +2599 -0
  140. package/dist/core.js +3 -0
  141. package/dist/design-classes/index.cjs +431 -0
  142. package/dist/design-classes/index.d.cts +165 -0
  143. package/dist/design-classes/index.d.ts +165 -0
  144. package/dist/design-classes/index.js +399 -0
  145. package/dist/emojiItems-QGSNAABW.js +20 -0
  146. package/dist/fx-CmQjnHmT.d.ts +371 -0
  147. package/dist/hooks/index.d.ts +971 -0
  148. package/dist/hooks/index.js +8 -0
  149. package/dist/index.d.ts +408 -0
  150. package/dist/index.js +178 -0
  151. package/dist/katexPlugin-FA7NX4PE.css +1161 -0
  152. package/dist/katexPlugin-NCDKOOQY.js +2 -0
  153. package/dist/kernel-client-TZKGHJRY.js +516 -0
  154. package/dist/kernel-wire-wNdAPfhJ.d.ts +88 -0
  155. package/dist/lib/index.d.ts +602 -0
  156. package/dist/lib/index.js +1289 -0
  157. package/dist/paintDispatch-CuJLsr9Y.d.ts +688 -0
  158. package/dist/parseLessonSegments-GpCeMrb2.d.ts +334 -0
  159. package/dist/perf-CKiBKbkw.d.ts +22 -0
  160. package/dist/perf-Dr28-AgT.d.ts +57 -0
  161. package/dist/prism-X5YWKXO5.js +136 -0
  162. package/dist/providers/index.css +1756 -0
  163. package/dist/providers/index.d.ts +355 -0
  164. package/dist/providers/index.js +29 -0
  165. package/dist/renderer/index.d.ts +465 -0
  166. package/dist/renderer/index.js +4 -0
  167. package/dist/runtime/index.css +1756 -0
  168. package/dist/runtime/index.d.ts +239 -0
  169. package/dist/runtime/index.js +28 -0
  170. package/dist/slot-host-CPzrxLo9.d.ts +48 -0
  171. package/dist/ssr/index.cjs +9739 -0
  172. package/dist/ssr/index.d.cts +464 -0
  173. package/dist/ssr/index.d.ts +464 -0
  174. package/dist/ssr/index.js +9703 -0
  175. package/dist/storage/browser/index.d.ts +1 -0
  176. package/dist/storage/browser/index.js +2 -0
  177. package/dist/test-support.d.ts +42 -0
  178. package/dist/test-support.js +181 -0
  179. package/dist/themeTokens-CRd8AEDF.d.ts +125 -0
  180. package/dist/three/index.css +503 -0
  181. package/dist/three/index.d.ts +1185 -0
  182. package/dist/three/index.js +3908 -0
  183. package/dist/useUISlots-CiobNFGb.d.ts +211 -0
  184. package/dist/verification-C5pTeMJv.d.ts +66 -0
  185. package/dist/verificationRegistry-CVrcxG1s.d.ts +122 -0
  186. package/dist/wrapCallbackForEvent-B9QLbhxX.d.ts +19 -0
  187. package/index.css +199 -0
  188. package/package.json +273 -3
  189. package/src/core/lib/band-shapes.json +7 -0
  190. package/src/core/locales/ar.json +1276 -0
  191. package/src/core/locales/en.json +1276 -0
  192. package/src/core/locales/index.ts +54 -0
  193. package/src/core/locales/sl.json +1276 -0
  194. package/src/core/tokens/native-tokens.json +369 -0
  195. package/tailwind-compile.cjs +29 -0
  196. package/tailwind-preset.cjs +1020 -0
  197. package/themes/_base.css +451 -0
  198. package/themes/_contract.md +307 -0
  199. package/themes/_fonts-kenney.css +11 -0
  200. package/themes/_fonts.css +12 -0
  201. package/themes/_foundation.css +105 -0
  202. package/themes/_head.css +22 -0
  203. package/themes/_presets.css +67 -0
  204. package/themes/almadar-heritage.css +455 -0
  205. package/themes/almadar-website.css +269 -0
  206. package/themes/almadar.css +269 -0
  207. package/themes/aqua.css +455 -0
  208. package/themes/arabesque.css +459 -0
  209. package/themes/art-deco.css +457 -0
  210. package/themes/art-nouveau.css +459 -0
  211. package/themes/atelier.css +463 -0
  212. package/themes/bauhaus.css +461 -0
  213. package/themes/bloomberg-dense.css +463 -0
  214. package/themes/blueprint.css +457 -0
  215. package/themes/clay.css +449 -0
  216. package/themes/comic.css +453 -0
  217. package/themes/constructivist.css +457 -0
  218. package/themes/corporate.css +449 -0
  219. package/themes/cyberpunk.css +453 -0
  220. package/themes/frutiger-aero.css +458 -0
  221. package/themes/game-adventure.css +201 -0
  222. package/themes/game-rpg.css +203 -0
  223. package/themes/game-sci-fi.css +201 -0
  224. package/themes/game-ui-pack.css +200 -0
  225. package/themes/gazette.css +449 -0
  226. package/themes/glass.css +457 -0
  227. package/themes/gothic.css +453 -0
  228. package/themes/index.css +21 -0
  229. package/themes/ink-wash.css +459 -0
  230. package/themes/kawaii.css +459 -0
  231. package/themes/kflow.css +310 -0
  232. package/themes/kiosk.css +449 -0
  233. package/themes/linear-clean.css +463 -0
  234. package/themes/luxury.css +451 -0
  235. package/themes/mac-classic.css +455 -0
  236. package/themes/material.css +463 -0
  237. package/themes/memphis.css +453 -0
  238. package/themes/mid-century.css +455 -0
  239. package/themes/minimalist.css +449 -0
  240. package/themes/mudcloth.css +459 -0
  241. package/themes/nata.css +310 -0
  242. package/themes/neon.css +453 -0
  243. package/themes/neumorphic.css +451 -0
  244. package/themes/newsprint.css +455 -0
  245. package/themes/notion-editorial.css +463 -0
  246. package/themes/orb.css +465 -0
  247. package/themes/pixel.css +449 -0
  248. package/themes/prism.css +309 -0
  249. package/themes/rawi.css +310 -0
  250. package/themes/retro.css +452 -0
  251. package/themes/risograph.css +463 -0
  252. package/themes/scandi.css +469 -0
  253. package/themes/sketch.css +455 -0
  254. package/themes/solarpunk.css +469 -0
  255. package/themes/steampunk.css +451 -0
  256. package/themes/swiss.css +455 -0
  257. package/themes/terminal.css +466 -0
  258. package/themes/trait-wars.css +487 -0
  259. package/themes/ukiyo-e.css +459 -0
  260. package/themes/vaporwave.css +455 -0
  261. package/themes/victorian.css +453 -0
  262. package/themes/wabi-sabi.css +459 -0
  263. package/themes/win95.css +455 -0
  264. package/themes/wireframe.css +439 -0
  265. package/themes/zine.css +455 -0
  266. package/README.md +0 -3
@@ -0,0 +1,602 @@
1
+ import { FieldValue, EntityRow, EventKey, EnterAnimation } from '@almadar/core';
2
+ export { AssetLoadStatus, BridgeHealth, CheckStatus, EffectTrace, EventLogEntry, OrbitalVerificationAPI, ServerResponseTrace, TraitStateSnapshot, TransitionTrace, VerificationCheck, VerificationSnapshot, VerificationSummary, getNestedValue } from '@almadar/core';
3
+ export { p as profilerOnRender, u as usePerfBuffer } from '../perf-CKiBKbkw.js';
4
+ export { T as TraitSnapshotGetter, b as bindCanvasCapture, a as bindConfigApplier, c as bindEventBus, d as bindLastDrawables, e as bindTraitStateGetter, f as clearVerification, g as getAllChecks, h as getBridgeHealth, i as getSnapshot, j as getSummary, k as getTraitSnapshots, l as getTransitions, m as getTransitionsForTrait, r as recordOrbitalResponse, n as recordServerResponse, o as recordTransition, p as recordingTransport, q as registerCheck, s as registerTraitSnapshot, t as serverEffectTraces, u as subscribeToVerification, v as updateAssetStatus, w as updateBridgeHealth, x as updateCheck, y as verifierAttached, z as waitForTransition } from '../verificationRegistry-CVrcxG1s.js';
5
+ export { A as ApplyOperatorInput, a as ApplyOperatorResult, C as ContentSegment, E as EDITOR_MOTIONS, b as EDITOR_OPERATORS, c as EditorMotion, d as EditorOperator, I as INDENT_UNIT, L as LessonSegment, e as applyMotion, f as applyOperator, i as isEditorMotion, g as isEditorOperator, m as motionRange, p as parseContentSegments, h as parseLessonSegments, j as parseMarkdownWithCodeBlocks } from '../parseLessonSegments-GpCeMrb2.js';
6
+ export { D as DENSITY_ELEMENT_VARS, a as DENSITY_SPACING_VARS, b as DIAGRAM_VARS, E as ELEVATION_VARS, F as FlatVarEntry, G as GEOMETRY_VARS, I as ICONOGRAPHY_VARS, L as LEGACY_PREFIXES, M as MOTION_DURATION_KEYS, c as MOTION_EASING_KEYS, d as MOTION_INTENT_VARS, e as MOTION_SHAPE_VARS, S as SCENE_VARS, f as SURFACE_VARS, g as StringValueKey, h as TYPE_FAMILY_VARS, i as TYPE_HEADING_VARS, j as TYPE_INTENT_VARS, k as TYPE_SIZE_KEYS, T as ThemeMode, l as enterKeyframe, r as resolveThemeForRuntime, t as themeTokensToCssVars } from '../themeTokens-CRd8AEDF.js';
7
+ export { a as PERF_NAMESPACE, P as PerfEntry, c as clearPerf, p as perfEnd, g as perfGauge, b as perfStart, d as perfTime, i as perfTimeAsync } from '../perf-Dr28-AgT.js';
8
+ import 'react';
9
+ import '../verification-C5pTeMJv.js';
10
+ import '../paintDispatch-CuJLsr9Y.js';
11
+ import '../fx-CmQjnHmT.js';
12
+ import 'lucide-react';
13
+ import '../EventBusProvider-BFFHfN4O.js';
14
+ import '@almadar/shell-runtime/client/EventTransport';
15
+
16
+ /**
17
+ * Trait Registry - Tracks active traits and their state machines for debugging
18
+ *
19
+ * @packageDocumentation
20
+ */
21
+ interface TraitTransition {
22
+ from: string;
23
+ to: string;
24
+ event: string;
25
+ guard?: string;
26
+ }
27
+ interface TraitGuard {
28
+ name: string;
29
+ lastResult?: boolean;
30
+ }
31
+ interface TraitDebugInfo {
32
+ id: string;
33
+ name: string;
34
+ currentState: string;
35
+ states: string[];
36
+ transitions: TraitTransition[];
37
+ guards: TraitGuard[];
38
+ transitionCount: number;
39
+ }
40
+ type ChangeListener$3 = () => void;
41
+ declare function registerTrait(info: TraitDebugInfo): void;
42
+ declare function updateTraitState(id: string, newState: string): void;
43
+ declare function updateGuardResult(traitId: string, guardName: string, result: boolean): void;
44
+ declare function unregisterTrait(id: string): void;
45
+ declare function getAllTraits(): TraitDebugInfo[];
46
+ declare function getTrait(id: string): TraitDebugInfo | undefined;
47
+ declare function subscribeToTraitChanges(listener: ChangeListener$3): () => void;
48
+ declare function clearTraits(): void;
49
+
50
+ /**
51
+ * Tick Registry - Tracks scheduled tick executions for debugging
52
+ *
53
+ * @packageDocumentation
54
+ */
55
+ interface TickExecution {
56
+ id: string;
57
+ traitName: string;
58
+ /** Tick name (display name) */
59
+ name: string;
60
+ /** Tick identifier */
61
+ tickName: string;
62
+ interval: number;
63
+ /** Last execution timestamp */
64
+ lastRun: number;
65
+ lastExecuted: number | null;
66
+ nextExecution: number | null;
67
+ /** Number of times this tick has run */
68
+ runCount: number;
69
+ executionCount: number;
70
+ /** Average execution time in ms */
71
+ executionTime: number;
72
+ /** Whether the tick is currently active */
73
+ active: boolean;
74
+ isActive: boolean;
75
+ /** Guard name if this tick has a guard */
76
+ guardName?: string;
77
+ /** Whether the guard passed on last evaluation */
78
+ guardPassed?: boolean;
79
+ }
80
+ type ChangeListener$2 = () => void;
81
+ declare function registerTick(tick: TickExecution): void;
82
+ declare function updateTickExecution(id: string, timestamp: number): void;
83
+ declare function setTickActive(id: string, isActive: boolean): void;
84
+ declare function unregisterTick(id: string): void;
85
+ declare function getAllTicks(): TickExecution[];
86
+ declare function getTick(id: string): TickExecution | undefined;
87
+ declare function subscribeToTickChanges(listener: ChangeListener$2): () => void;
88
+ declare function clearTicks(): void;
89
+
90
+ /**
91
+ * Guard Registry - Tracks guard evaluations for debugging
92
+ *
93
+ * @packageDocumentation
94
+ */
95
+
96
+ interface GuardContext {
97
+ traitName?: string;
98
+ type?: "transition" | "tick";
99
+ transitionFrom?: string;
100
+ transitionTo?: string;
101
+ tickName?: string;
102
+ [key: string]: FieldValue | undefined;
103
+ }
104
+ interface GuardEvaluation {
105
+ id: string;
106
+ traitName: string;
107
+ guardName: string;
108
+ expression: string;
109
+ result: boolean;
110
+ context: GuardContext;
111
+ timestamp: number;
112
+ /** Input values used in guard evaluation */
113
+ inputs: Record<string, FieldValue>;
114
+ }
115
+ type ChangeListener$1 = () => void;
116
+ declare function recordGuardEvaluation(evaluation: Omit<GuardEvaluation, "id" | "timestamp">): void;
117
+ declare function getGuardHistory(): GuardEvaluation[];
118
+ declare function getRecentGuardEvaluations(count: number): GuardEvaluation[];
119
+ declare function getGuardEvaluationsForTrait(traitName: string): GuardEvaluation[];
120
+ declare function subscribeToGuardChanges(listener: ChangeListener$1): () => void;
121
+ declare function clearGuardHistory(): void;
122
+
123
+ /**
124
+ * Entity Debug - Provides entity state snapshots for debugging
125
+ *
126
+ * @packageDocumentation
127
+ */
128
+
129
+ interface EntityState {
130
+ id: string;
131
+ type: string;
132
+ fields: Record<string, FieldValue>;
133
+ lastUpdated: number;
134
+ }
135
+ interface RuntimeEntity {
136
+ id: string;
137
+ type: string;
138
+ data: Record<string, FieldValue>;
139
+ }
140
+ interface PersistentEntityInfo {
141
+ loaded: boolean;
142
+ count: number;
143
+ }
144
+ interface EntitySnapshot {
145
+ entities: EntityState[];
146
+ timestamp: number;
147
+ totalCount: number;
148
+ /** Singleton entities by name */
149
+ singletons: Record<string, EntityRow>;
150
+ /** Runtime entities (in-memory) */
151
+ runtime: RuntimeEntity[];
152
+ /** Persistent entities info by type */
153
+ persistent: Record<string, PersistentEntityInfo>;
154
+ }
155
+ type EntityProvider = () => EntityState[];
156
+ declare function setEntityProvider(provider: EntityProvider): void;
157
+ declare function clearEntityProvider(): void;
158
+ declare function getEntitySnapshot(): EntitySnapshot | null;
159
+ declare function getEntityById(id: string): EntityState | undefined;
160
+ declare function getEntitiesByType(type: string): EntityState[];
161
+
162
+ /**
163
+ * Debug Registry - Central event log for debugging
164
+ *
165
+ * @packageDocumentation
166
+ */
167
+
168
+ type DebugEventType = 'state-change' | 'event-fired' | 'effect-executed' | 'guard-evaluated' | 'error' | 'warning' | 'info';
169
+ interface DebugEvent {
170
+ id: string;
171
+ type: DebugEventType;
172
+ source: string;
173
+ message: string;
174
+ data?: Record<string, FieldValue>;
175
+ timestamp: number;
176
+ }
177
+ type ChangeListener = () => void;
178
+ declare function logDebugEvent(type: DebugEventType, source: string, message: string, data?: Record<string, FieldValue>): void;
179
+ declare function logStateChange(source: string, from: string, to: string, event?: string): void;
180
+ declare function logEventFired(source: string, eventName: string, payload?: FieldValue): void;
181
+ declare function logEffectExecuted(source: string, effectType: string, details?: FieldValue): void;
182
+ declare function logError(source: string, message: string, error?: Error | null): void;
183
+ declare function logWarning(source: string, message: string, data?: Record<string, FieldValue>): void;
184
+ declare function logInfo(source: string, message: string, data?: Record<string, FieldValue>): void;
185
+ declare function getDebugEvents(): DebugEvent[];
186
+ declare function getRecentEvents(count: number): DebugEvent[];
187
+ declare function getEventsByType(type: DebugEventType): DebugEvent[];
188
+ declare function getEventsBySource(source: string): DebugEvent[];
189
+ declare function subscribeToDebugEvents(listener: ChangeListener): () => void;
190
+ declare function clearDebugEvents(): void;
191
+
192
+ /**
193
+ * API Client - HTTP client for backend API calls
194
+ *
195
+ * Provides typed methods for making API requests.
196
+ * All requests go through the backend server, NOT directly to Firestore.
197
+ *
198
+ * @packageDocumentation
199
+ */
200
+
201
+ /**
202
+ * API Error class for handling HTTP errors
203
+ */
204
+ declare class ApiError extends Error {
205
+ status: number;
206
+ statusText: string;
207
+ constructor(status: number, statusText: string, message?: string);
208
+ }
209
+ /**
210
+ * API client with typed methods
211
+ */
212
+ declare const apiClient: {
213
+ /**
214
+ * GET request
215
+ */
216
+ get<T>(endpoint: string): Promise<T>;
217
+ /**
218
+ * POST request
219
+ */
220
+ post<T>(endpoint: string, data?: Record<string, FieldValue>): Promise<T>;
221
+ /**
222
+ * PUT request
223
+ */
224
+ put<T>(endpoint: string, data?: Record<string, FieldValue>): Promise<T>;
225
+ /**
226
+ * PATCH request
227
+ */
228
+ patch<T>(endpoint: string, data?: Record<string, FieldValue>): Promise<T>;
229
+ /**
230
+ * DELETE request
231
+ */
232
+ delete<T = void>(endpoint: string): Promise<T>;
233
+ };
234
+
235
+ /**
236
+ * Legacy debug helpers, now routed through `@almadar/logger`.
237
+ *
238
+ * The variadic `debug(...args)` shape is preserved for the many existing
239
+ * call sites (Form.tsx, RelationSelect.tsx, game helpers, etc.), but the
240
+ * gate is no longer a separate localStorage check — every helper here
241
+ * runs through the same priority/namespace gate the rest of the codebase
242
+ * uses. `setLogLevel('WARN')` silences them. `globalThis.__ALMADAR_DEBUG__`
243
+ * filters them by namespace.
244
+ *
245
+ * Namespace: `almadar:ui:debug` (plus per-area suffixes for input,
246
+ * collision, physics, game-state).
247
+ */
248
+ declare function isDebugEnabled(): boolean;
249
+ /**
250
+ * Variadic legacy debug. The first arg is the message; the rest is
251
+ * stringified into the LogData. Routes through the shared gate.
252
+ */
253
+ declare function debug(...args: unknown[]): void;
254
+ declare function debugGroup(label: string): void;
255
+ declare function debugGroupEnd(): void;
256
+ declare function debugWarn(...args: unknown[]): void;
257
+ declare function debugError(...args: unknown[]): void;
258
+ declare function debugTable(data: unknown): void;
259
+ declare function debugTime(label: string): void;
260
+ declare function debugTimeEnd(label: string): void;
261
+ declare function debugInput(inputType: string, data: unknown): void;
262
+ declare function debugCollision(entityA: {
263
+ id?: string;
264
+ type?: string;
265
+ }, entityB: {
266
+ id?: string;
267
+ type?: string;
268
+ }, details?: unknown): void;
269
+ declare function debugPhysics(entityId: string, physics: unknown): void;
270
+ declare function debugGameState(stateName: string, value: unknown): void;
271
+
272
+ /**
273
+ * Debug Utilities - Functions for toggling and checking debug mode
274
+ *
275
+ * @packageDocumentation
276
+ */
277
+ type DebugToggleListener = (enabled: boolean) => void;
278
+ /**
279
+ * Enable or disable debug mode
280
+ */
281
+ declare function setDebugEnabled(enabled: boolean): void;
282
+ /**
283
+ * Toggle debug mode
284
+ */
285
+ declare function toggleDebug(): boolean;
286
+ /**
287
+ * Subscribe to debug mode changes
288
+ */
289
+ declare function onDebugToggle(listener: DebugToggleListener): () => void;
290
+ /**
291
+ * Initialize debug mode from keyboard shortcut (Ctrl+Shift+D)
292
+ */
293
+ declare function initDebugShortcut(): () => void;
294
+
295
+ /**
296
+ * Command send pump (T7, docs/Almadar_Tick_Loop.md §3a item 2).
297
+ *
298
+ * Command-class events are a lossless ordered stream: two OW_DAMAGE hits must
299
+ * land twice, and the server must apply them in the exact order the client
300
+ * executed them. Pre-T7 the actor-queue drain `await`ed the server round trip
301
+ * per entry, so network latency sat on the input path — a keyup's local
302
+ * transition didn't run until every queued command ahead of it had completed
303
+ * its round trip (R-COMMAND-DRAIN-AWAIT-INPUT-LAG: 400-900ms typical, 1.6s
304
+ * peak under rapid platformer input).
305
+ *
306
+ * The pump restores ordering without the stall: jobs run strictly one at a
307
+ * time in enqueue order (request N+1 leaves only after response N arrived, so
308
+ * the server sees ordered commands and responses arrive in order — no seq
309
+ * numbers, no server machinery), while the caller's continuation runs when
310
+ * its own job settles and the drain moves on immediately. Tick-class traffic
311
+ * never passes through here — it is lossy and goes through
312
+ * `tick-send-relay.ts` instead.
313
+ *
314
+ * @packageDocumentation
315
+ */
316
+ interface CommandSendPump {
317
+ /** Run `job` after every previously enqueued job settles, in FIFO order. */
318
+ enqueue: <T>(job: () => Promise<T>) => Promise<T>;
319
+ }
320
+ declare function createCommandSendPump(): CommandSendPump;
321
+
322
+ /**
323
+ * Resolve a field value that may be a raw URL string (legacy `image`/`url` fields) or a
324
+ * structured `file`-typed {@link FileValue} into the URL an `<img src>` can use. Gallery/card
325
+ * grid image tiles only ever rendered the raw-string case before the file-type promotion —
326
+ * this keeps them working once a field is retyped to `file`.
327
+ */
328
+ declare function resolveImageUrl(value: FieldValue | undefined): string | undefined;
329
+
330
+ type KeyMap = Record<string, EventKey>;
331
+ declare function isEditableTarget(target: EventTarget | null): boolean;
332
+ declare function keyMapCode(e: KeyboardEvent): string;
333
+ /** A modified entry (`Mod+`/`Shift+`/`Alt+` prefixed) wins over the bare code; a bare
334
+ * entry still fires under modifiers it never declared (existing boards keep their
335
+ * bindings); keystrokes in editable elements never route. */
336
+ declare function resolveKeyMapEvent(map: KeyMap | undefined, e: KeyboardEvent): EventKey | undefined;
337
+
338
+ /**
339
+ * Shared types for the Al-Jazari state machine visualization.
340
+ * Pure TypeScript — zero React/DOM dependencies.
341
+ */
342
+ /** Layout for a single gear (state node) */
343
+ interface JazariGearLayout {
344
+ /** State name */
345
+ name: string;
346
+ /** Center X coordinate */
347
+ cx: number;
348
+ /** Center Y coordinate */
349
+ cy: number;
350
+ /** Gear outer radius */
351
+ radius: number;
352
+ /** Whether this is the initial state */
353
+ isInitial: boolean;
354
+ /** Whether this is a terminal state */
355
+ isTerminal: boolean;
356
+ }
357
+ /** Guard info attached to an arm */
358
+ interface JazariGuardInfo {
359
+ /** Position X along the arm (30% point) */
360
+ x: number;
361
+ /** Position Y along the arm (30% point) */
362
+ y: number;
363
+ /** Whether this is an AI guard (call-service) vs deterministic */
364
+ isAI: boolean;
365
+ }
366
+ /** Effect info attached to an arm */
367
+ interface JazariEffectInfo {
368
+ /** Position X along the arm (70% point) */
369
+ x: number;
370
+ /** Position Y along the arm (70% point) */
371
+ y: number;
372
+ /** Number of effects */
373
+ count: number;
374
+ /** Effect labels for tooltip display */
375
+ names: string[];
376
+ }
377
+ /** Layout for a single transition arm */
378
+ interface JazariArmLayout {
379
+ /** Source state name */
380
+ from: string;
381
+ /** Target state name */
382
+ to: string;
383
+ /** Event name label */
384
+ event: string;
385
+ /** SVG path d attribute for the arm curve */
386
+ path: string;
387
+ /** Label position X (midpoint of arm) */
388
+ labelX: number;
389
+ /** Label position Y (midpoint of arm) */
390
+ labelY: number;
391
+ /** Guard info if transition has guards */
392
+ guard: JazariGuardInfo | null;
393
+ /** Effect info if transition has effects */
394
+ effect: JazariEffectInfo | null;
395
+ /** Whether this is a self-loop */
396
+ isSelfLoop: boolean;
397
+ }
398
+ /** Complete layout result for an entire state machine diagram */
399
+ interface JazariLayout {
400
+ /** Total SVG width */
401
+ width: number;
402
+ /** Total SVG height */
403
+ height: number;
404
+ /** All gear positions */
405
+ gears: JazariGearLayout[];
406
+ /** All transition arm paths */
407
+ arms: JazariArmLayout[];
408
+ /** Golden axis Y position */
409
+ axisY: number;
410
+ /** Golden axis start X */
411
+ axisStartX: number;
412
+ /** Golden axis end X */
413
+ axisEndX: number;
414
+ /** Entity field labels to display on the axis */
415
+ entityFields: string[];
416
+ /** Text direction */
417
+ direction: 'ltr' | 'rtl';
418
+ }
419
+ /** Al-Jazari color palette constants */
420
+ declare const JAZARI_COLORS: {
421
+ readonly brass: "#B87333";
422
+ readonly gold: "#C8A951";
423
+ readonly sky: "#0EA5E9";
424
+ readonly crimson: "#DC2626";
425
+ readonly lapis: "#1E40AF";
426
+ readonly ivory: "#FFFBEB";
427
+ readonly darkBg: "#1a1a2e";
428
+ };
429
+
430
+ /**
431
+ * Layout algorithm for the Al-Jazari state machine visualization.
432
+ * Pure TypeScript — zero React/DOM dependencies.
433
+ *
434
+ * 1. BFS from initial state to order states by graph distance.
435
+ * 2. Horizontal distribution of gears along the golden axis.
436
+ * 3. Transition arm routing: forward arcs above, backward arcs below, self-loops above.
437
+ * 4. Guard icons at 30% along arm, effect icons at 70%.
438
+ */
439
+
440
+ interface LayoutState {
441
+ name: string;
442
+ isInitial?: boolean;
443
+ isTerminal?: boolean;
444
+ isFinal?: boolean;
445
+ }
446
+ interface LayoutTransition {
447
+ from: string;
448
+ to: string;
449
+ event: string;
450
+ guard?: FieldValue;
451
+ effects?: FieldValue[];
452
+ }
453
+ interface LayoutInput {
454
+ states: LayoutState[];
455
+ transitions: LayoutTransition[];
456
+ entityFields?: string[];
457
+ direction?: 'ltr' | 'rtl';
458
+ }
459
+ declare function computeJazariLayout(input: LayoutInput): JazariLayout;
460
+
461
+ /**
462
+ * SVG path generators for the Al-Jazari state machine visualization.
463
+ * Pure TypeScript — zero React/DOM dependencies.
464
+ *
465
+ * Generates paths for gear teeth, arabesque borders, pipe shapes, and lock icons.
466
+ */
467
+ /**
468
+ * Generate an SVG path for gear teeth around a circle.
469
+ *
470
+ * @param cx - Center X
471
+ * @param cy - Center Y
472
+ * @param innerRadius - Inner radius (base circle)
473
+ * @param outerRadius - Outer radius (tip of teeth)
474
+ * @param numTeeth - Number of teeth around the gear
475
+ * @returns SVG path d attribute string
476
+ */
477
+ declare function gearTeethPath(cx: number, cy: number, innerRadius: number, outerRadius: number, numTeeth: number): string;
478
+ /**
479
+ * Generate an SVG path for a small gear-shaped lock icon.
480
+ *
481
+ * @param cx - Center X
482
+ * @param cy - Center Y
483
+ * @param size - Overall size of the lock icon
484
+ * @returns SVG path d attribute for the lock body + shackle
485
+ */
486
+ declare function lockIconPath(cx: number, cy: number, size: number): string;
487
+ /**
488
+ * Generate a simple brain-like icon path.
489
+ *
490
+ * @param cx - Center X
491
+ * @param cy - Center Y
492
+ * @param size - Overall size
493
+ * @returns SVG path d attribute
494
+ */
495
+ declare function brainIconPath(cx: number, cy: number, size: number): string;
496
+ /**
497
+ * Generate a simple pipe/tube icon path.
498
+ *
499
+ * @param cx - Center X
500
+ * @param cy - Center Y
501
+ * @param size - Overall size
502
+ * @returns SVG path d attribute
503
+ */
504
+ declare function pipeIconPath(cx: number, cy: number, size: number): string;
505
+ /**
506
+ * Generate a single 8-pointed star path for the arabesque border pattern.
507
+ *
508
+ * @param cx - Center X
509
+ * @param cy - Center Y
510
+ * @param outerR - Outer radius (star tips)
511
+ * @param innerR - Inner radius (star valleys)
512
+ * @returns SVG path d attribute
513
+ */
514
+ declare function eightPointedStarPath(cx: number, cy: number, outerR: number, innerR: number): string;
515
+ /**
516
+ * Generate a simple arrowhead path for transition arm endpoints.
517
+ *
518
+ * @param size - Arrow size
519
+ * @returns SVG path d attribute
520
+ */
521
+ declare function arrowheadPath(size: number): string;
522
+
523
+ /**
524
+ * Lucide canonical icon name → native platform glyph (Layer 1 Iconography
525
+ * axis, native path). `lib/iconFamily.tsx` resolves a canonical name to a
526
+ * React component for the web/runtime path; this table is the same
527
+ * dispatch for the compiled iOS/Android shells, which have no React DOM to
528
+ * render into and instead need a platform symbol name.
529
+ *
530
+ * Hand-curated (no fuzzy matching — see `resolveNativeIcon`). Covers:
531
+ * (a) every alias key in `components/core/atoms/Icon.tsx` `iconAliases`
532
+ * and `lib/iconFamily.tsx` `lucideAliases`
533
+ * (b) every icon name appearing as an icon-prop `default` or in an
534
+ * icon-prop description's quoted examples in
535
+ * `orbital-rust/crates/orbital-compiler/src/baked/patterns-registry.json`
536
+ * (c) every icon name used by the wave-1 native pattern set's React
537
+ * components under `components/core/**`
538
+ * (d) the common Lucide vocabulary: navigation, actions, files,
539
+ * communication, status, media, arrows, editing.
540
+ *
541
+ * `sfSymbol` values are real SF Symbols 5 names; `materialSymbol` values are
542
+ * real Material Symbols names. The table is `lib/iconNativeMap.json`, the one source
543
+ * `orb shell-renderers icon-map` also reads to emit `IconMap.swift`/`IconMap.kt`; edit the
544
+ * JSON, then regenerate. The JSON also carries each icon's `categories` entry and the
545
+ * per-icon rationale `notes` (the former inline comments); the TS ignores both.
546
+ */
547
+ interface NativeIconGlyph {
548
+ sfSymbol: string;
549
+ materialSymbol: string;
550
+ }
551
+ declare const ICON_FALLBACK: NativeIconGlyph;
552
+ declare const ICON_NATIVE_MAP: Readonly<Record<string, NativeIconGlyph>>;
553
+ /**
554
+ * Every non-standard name from `iconAliases` (`components/core/atoms/Icon.tsx`)
555
+ * and `lucideAliases` (`lib/iconFamily.tsx`) — the names that don't kebab→Pascal
556
+ * to a real Lucide export. Each one is also a first-class `ICON_NATIVE_MAP` key
557
+ * (requirement (a)); exported so the alias set has one pinned source of truth
558
+ * a test can check against, independent of whatever else the map grows to cover.
559
+ */
560
+ declare const ICON_ALIASES: ReadonlyArray<string>;
561
+ /** Exact key match, then an `iconAliases` alias, then the deterministic fallback — no fuzzy matching. */
562
+ declare function resolveNativeIcon(name: string): NativeIconGlyph;
563
+
564
+ /** One line of a line-level diff between two texts. */
565
+ interface LineDiffLine {
566
+ type: 'added' | 'removed' | 'unchanged';
567
+ beforeLineNumber?: number;
568
+ afterLineNumber?: number;
569
+ content: string;
570
+ }
571
+ /**
572
+ * Minimal line diff — the one diff every diff view renders. Empty text has no lines.
573
+ * Myers' O(ND) algorithm with the linear-space middle-snake split (what git uses):
574
+ * time grows with the size of the change, memory with the size of the texts.
575
+ */
576
+ declare function computeLineDiff(before: string, after: string): LineDiffLine[];
577
+
578
+ /**
579
+ * Element entry — the one mechanism behind a render-ui node's `enter` and a
580
+ * slot's theme-default entry. Pure CSS (`themes/_base.css`): the classes name
581
+ * keyframes whose shape, timing and default are theme tokens. Both execution
582
+ * paths call these helpers — the runtime renderer per node, and the compiled
583
+ * emitter's generated JSX — so the two never diverge.
584
+ *
585
+ * Off when the theme sets `--motion-enable: off`; the OS reduced-motion
586
+ * setting collapses the keyframes in `_base.css`.
587
+ */
588
+
589
+ /** Plays the theme's `--motion-enter-default` keyframe on a slot's content box. */
590
+ declare const ENTER_SLOT_CLASS = "almadar-enter-slot";
591
+ /** Narrows a prop value to the entry vocabulary (anything else is not an entry). */
592
+ declare function asEnterAnimation(value: string | undefined): EnterAnimation | undefined;
593
+ /** Highest `enterDelay` step (`almadar-enter-delay-1` … `-8` in `_base.css`). */
594
+ declare const MAX_ENTER_DELAY: 8;
595
+ /**
596
+ * The class a node's declared `enter` (+ optional stagger step `enterDelay`)
597
+ * adds to its element. `none` and an unset `enter` add nothing.
598
+ */
599
+ declare function enterClassName(enter: EnterAnimation | undefined, enterDelay?: number): string | undefined;
600
+
601
+ export { ApiError, ENTER_SLOT_CLASS, ICON_ALIASES, ICON_FALLBACK, ICON_NATIVE_MAP, JAZARI_COLORS, MAX_ENTER_DELAY, apiClient, arrowheadPath, asEnterAnimation, brainIconPath, clearDebugEvents, clearEntityProvider, clearGuardHistory, clearTicks, clearTraits, computeJazariLayout, computeLineDiff, createCommandSendPump, debug, debugCollision, debugError, debugGameState, debugGroup, debugGroupEnd, debugInput, debugPhysics, debugTable, debugTime, debugTimeEnd, debugWarn, eightPointedStarPath, enterClassName, gearTeethPath, getAllTicks, getAllTraits, getDebugEvents, getEntitiesByType, getEntityById, getEntitySnapshot, getEventsBySource, getEventsByType, getGuardEvaluationsForTrait, getGuardHistory, getRecentEvents, getRecentGuardEvaluations, getTick, getTrait, initDebugShortcut, isDebugEnabled, isEditableTarget, keyMapCode, lockIconPath, logDebugEvent, logEffectExecuted, logError, logEventFired, logInfo, logStateChange, logWarning, onDebugToggle, pipeIconPath, recordGuardEvaluation, registerTick, registerTrait, resolveImageUrl, resolveKeyMapEvent, resolveNativeIcon, setDebugEnabled, setEntityProvider, setTickActive, subscribeToDebugEvents, subscribeToGuardChanges, subscribeToTickChanges, subscribeToTraitChanges, toggleDebug, unregisterTick, unregisterTrait, updateGuardResult, updateTickExecution, updateTraitState };
602
+ export type { CommandSendPump, DebugEvent, DebugEventType, EntitySnapshot, EntityState, GuardContext, GuardEvaluation, JazariArmLayout, JazariEffectInfo, JazariGearLayout, JazariGuardInfo, JazariLayout, KeyMap, LayoutInput, LayoutState, LayoutTransition, LineDiffLine, NativeIconGlyph, PersistentEntityInfo, RuntimeEntity, TickExecution, TraitDebugInfo, TraitGuard, TraitTransition };