@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,971 @@
1
+ import { OrbitalSchema, FieldValue, EventPayload, BusEventSource, EntityFrameState, EntityFieldWrite, PageMeta, PageAccess, PageIndexing, LocaleAlternate } from '@almadar/core';
2
+ export { BusEvent, BusEventListener, BusEventSource, BusEventListener as EventListener, UISlot, Unsubscribe } from '@almadar/core';
3
+ export { D as DEFAULT_SLOTS, S as SlotChangeCallback, a as SlotContent, b as SlotRenderConfig, U as UISlotManager, u as useUISlotManager } from '../useUISlots-CiobNFGb.js';
4
+ import { useEventBus } from '../core.js';
5
+ import * as React$1 from 'react';
6
+ import React__default from 'react';
7
+ import * as _tanstack_react_query from '@tanstack/react-query';
8
+
9
+ interface FileSystemTree {
10
+ [name: string]: {
11
+ file: {
12
+ contents: string;
13
+ };
14
+ } | {
15
+ directory: FileSystemTree;
16
+ };
17
+ }
18
+ interface FileNode {
19
+ path: string;
20
+ name: string;
21
+ type: 'file' | 'directory';
22
+ children?: FileNode[];
23
+ }
24
+ type FileSystemStatus = 'idle' | 'booting' | 'ready' | 'running' | 'error';
25
+ interface FileSystemFile {
26
+ path: string;
27
+ content: string;
28
+ }
29
+ interface SelectedFile {
30
+ path: string;
31
+ content: string;
32
+ language?: string;
33
+ isDirty?: boolean;
34
+ }
35
+ interface UseFileSystemResult {
36
+ status: FileSystemStatus;
37
+ error: string | null;
38
+ isLoading: boolean;
39
+ files: FileNode[];
40
+ selectedFile: SelectedFile | null;
41
+ selectedPath: string | null;
42
+ previewUrl: string | null;
43
+ boot: () => Promise<void>;
44
+ mountFiles: (files: FileSystemFile[] | FileSystemTree) => Promise<void>;
45
+ readFile: (path: string) => Promise<string>;
46
+ writeFile: (path: string, content: string) => Promise<void>;
47
+ selectFile: (path: string) => Promise<void>;
48
+ updateContent: (pathOrContent: string, content?: string) => void;
49
+ updateSelectedContent: (content: string) => void;
50
+ refreshTree: () => Promise<void>;
51
+ runCommand: (command: string) => Promise<{
52
+ exitCode: number;
53
+ output: string;
54
+ }>;
55
+ startDevServer: () => Promise<void>;
56
+ }
57
+ declare function useFileSystem(): UseFileSystemResult;
58
+
59
+ interface Extension {
60
+ id: string;
61
+ name: string;
62
+ language?: string;
63
+ loaded: boolean;
64
+ }
65
+ interface ExtensionEntry {
66
+ file: string;
67
+ language?: string;
68
+ }
69
+ interface ExtensionManifest {
70
+ languages: Record<string, {
71
+ extensions: string[];
72
+ icon?: string;
73
+ color?: string;
74
+ }>;
75
+ extensions: ExtensionEntry[];
76
+ }
77
+ interface UseExtensionsOptions {
78
+ appId: string;
79
+ loadOnMount?: boolean;
80
+ }
81
+ interface UseExtensionsResult {
82
+ extensions: Extension[];
83
+ manifest: ExtensionManifest;
84
+ isLoading: boolean;
85
+ error: string | null;
86
+ loadExtension: (extensionId: string) => Promise<void>;
87
+ loadExtensions: () => Promise<void>;
88
+ getExtensionForFile: (filename: string) => Extension | null;
89
+ }
90
+ declare function useExtensions(options: UseExtensionsOptions): UseExtensionsResult;
91
+
92
+ interface OpenFile {
93
+ path: string;
94
+ content: string;
95
+ isDirty: boolean;
96
+ language?: string;
97
+ }
98
+ interface UseFileEditorOptions {
99
+ extensions: UseExtensionsResult;
100
+ fileSystem: UseFileSystemResult;
101
+ onSchemaUpdate?: (schema: OrbitalSchema) => Promise<void>;
102
+ }
103
+ interface FileEditResult {
104
+ success: boolean;
105
+ action?: 'updated_schema' | 'converted_extension' | 'saved_extension' | 'saved';
106
+ error?: string;
107
+ }
108
+ interface UseFileEditorResult {
109
+ openFiles: OpenFile[];
110
+ activeFile: OpenFile | null;
111
+ isSaving: boolean;
112
+ openFile: (path: string) => Promise<void>;
113
+ closeFile: (path: string) => void;
114
+ setActiveFile: (path: string) => void;
115
+ updateFileContent: (path: string, content: string) => void;
116
+ handleFileEdit: (path: string, content: string) => Promise<FileEditResult>;
117
+ saveFile: (path: string) => Promise<void>;
118
+ saveAllFiles: () => Promise<void>;
119
+ }
120
+ declare function useFileEditor(options: UseFileEditorOptions): UseFileEditorResult;
121
+
122
+ type CompileStage = 'idle' | 'compiling' | 'done' | 'error';
123
+ interface CompileResult {
124
+ success: boolean;
125
+ files?: Array<{
126
+ path: string;
127
+ content: string;
128
+ }>;
129
+ errors?: string[];
130
+ }
131
+ interface UseCompileResult {
132
+ isCompiling: boolean;
133
+ stage: CompileStage;
134
+ lastResult: CompileResult | null;
135
+ error: string | null;
136
+ compileSchema: (schema: OrbitalSchema) => Promise<CompileResult | null>;
137
+ }
138
+ declare function useCompile(): UseCompileResult;
139
+
140
+ interface PreviewApp {
141
+ id: string;
142
+ name: string;
143
+ status: 'loading' | 'ready' | 'error';
144
+ schema?: OrbitalSchema;
145
+ graphView: {
146
+ version: string;
147
+ };
148
+ }
149
+ interface Notification {
150
+ id: string;
151
+ type: 'info' | 'warning' | 'error' | 'success';
152
+ title: string;
153
+ message: string;
154
+ timestamp: number;
155
+ read?: boolean;
156
+ actionLabel?: string;
157
+ onAction?: () => void;
158
+ autoDismiss?: boolean;
159
+ dismissAfter?: number;
160
+ }
161
+ interface NotificationsState {
162
+ notifications: Notification[];
163
+ isPanelOpen: boolean;
164
+ closePanel: () => void;
165
+ dismissNotification: (id: string) => void;
166
+ markAsRead: (id: string) => void;
167
+ clearAll: () => void;
168
+ }
169
+ interface ErrorToast {
170
+ message: string;
171
+ }
172
+ interface UsePreviewResult {
173
+ previewUrl: string | null;
174
+ isLoading: boolean;
175
+ error: string | null;
176
+ loadError: string | null;
177
+ app: PreviewApp | null;
178
+ isFullscreen: boolean;
179
+ isExecutingEvent: boolean;
180
+ errorToast: ErrorToast | null;
181
+ currentStateName: string | null;
182
+ notifications: NotificationsState;
183
+ startPreview: () => Promise<void>;
184
+ stopPreview: () => Promise<void>;
185
+ refresh: () => Promise<void>;
186
+ handleRefresh: () => Promise<void>;
187
+ handleReset: () => Promise<void>;
188
+ toggleFullscreen: () => void;
189
+ setErrorToast: (toast: ErrorToast | null) => void;
190
+ dismissErrorToast: () => void;
191
+ }
192
+ interface UsePreviewOptions {
193
+ appId?: string;
194
+ }
195
+ declare function usePreview(options?: UsePreviewOptions): UsePreviewResult;
196
+
197
+ interface DeepAgentActionRequest {
198
+ id: string;
199
+ type: string;
200
+ tool: string;
201
+ args: Record<string, FieldValue>;
202
+ description?: string;
203
+ allowedDecisions: ('approve' | 'edit' | 'reject')[];
204
+ status: 'pending' | 'approved' | 'rejected' | 'edited';
205
+ }
206
+ interface DeepAgentInterrupt {
207
+ id: string;
208
+ type: 'tool_calls' | 'confirmation' | 'error';
209
+ message?: string;
210
+ actionRequests: DeepAgentActionRequest[];
211
+ timestamp: number;
212
+ threadId?: string;
213
+ }
214
+ interface GenerationRequest {
215
+ id: string;
216
+ prompt: string;
217
+ status: 'pending' | 'running' | 'completed' | 'failed';
218
+ result?: OrbitalSchema;
219
+ error?: string;
220
+ }
221
+ interface GenerationProgress {
222
+ stage: string;
223
+ percent: number;
224
+ message: string;
225
+ }
226
+ interface UseDeepAgentGenerationResult {
227
+ requests: GenerationRequest[];
228
+ currentRequest: GenerationRequest | null;
229
+ isGenerating: boolean;
230
+ isLoading: boolean;
231
+ isComplete: boolean;
232
+ progress: GenerationProgress;
233
+ error: string | null;
234
+ interrupt: DeepAgentInterrupt | null;
235
+ generate: (prompt: string) => Promise<OrbitalSchema | null>;
236
+ startGeneration: (skill: string, prompt: string, options?: Record<string, FieldValue>) => Promise<void>;
237
+ cancelGeneration: () => void;
238
+ clearRequests: () => void;
239
+ submitInterruptDecisions: (decisions: FieldValue[]) => void;
240
+ }
241
+ declare function useDeepAgentGeneration(): UseDeepAgentGenerationResult;
242
+
243
+ interface ChatMessage {
244
+ id: string;
245
+ role: 'user' | 'assistant' | 'system';
246
+ content: string;
247
+ timestamp: number;
248
+ }
249
+ type AvatarRole = 'user' | 'assistant' | 'system';
250
+ type FileOperation = 'ls' | 'read_file' | 'write_file' | 'edit_file';
251
+ type Activity = {
252
+ type: 'message';
253
+ role: AvatarRole;
254
+ content: string;
255
+ timestamp: number;
256
+ isStreaming?: boolean;
257
+ } | {
258
+ type: 'tool_call';
259
+ tool: string;
260
+ args: Record<string, FieldValue>;
261
+ timestamp: number;
262
+ isExecuting?: boolean;
263
+ } | {
264
+ type: 'tool_result';
265
+ tool: string;
266
+ result: FieldValue | null;
267
+ success: boolean;
268
+ timestamp: number;
269
+ } | {
270
+ type: 'file_operation';
271
+ operation: FileOperation;
272
+ path: string;
273
+ success?: boolean;
274
+ timestamp: number;
275
+ } | {
276
+ type: 'schema_diff';
277
+ filePath: string;
278
+ hunks: DiffHunk[];
279
+ timestamp: number;
280
+ } | {
281
+ type: 'error';
282
+ message: string;
283
+ code?: string;
284
+ timestamp: number;
285
+ };
286
+ interface TodoActivity {
287
+ type: 'thinking' | 'tool_call' | 'tool_result' | 'code_change';
288
+ content: string;
289
+ timestamp: number;
290
+ tool?: string;
291
+ success?: boolean;
292
+ filePath?: string;
293
+ diff?: string;
294
+ }
295
+ interface Todo {
296
+ id: string;
297
+ task: string;
298
+ status: 'pending' | 'in_progress' | 'completed';
299
+ latestActivity?: TodoActivity;
300
+ activityHistory?: TodoActivity[];
301
+ }
302
+ interface DiffHunk {
303
+ oldStart: number;
304
+ oldLines: number;
305
+ newStart: number;
306
+ newLines: number;
307
+ lines: Array<{
308
+ type: 'add' | 'remove' | 'context';
309
+ content: string;
310
+ }>;
311
+ }
312
+ interface SchemaDiff {
313
+ id: string;
314
+ filePath: string;
315
+ hunks: DiffHunk[];
316
+ timestamp: number;
317
+ addedLines: number;
318
+ removedLines: number;
319
+ }
320
+ type AgentStatus = 'idle' | 'running' | 'complete' | 'error' | 'interrupted';
321
+ interface UseAgentChatOptions {
322
+ appId?: string;
323
+ onComplete?: (schema?: OrbitalSchema) => void;
324
+ onSchemaChange?: (diff?: OrbitalSchema) => void;
325
+ onError?: (error: Error | string) => void;
326
+ }
327
+ interface UseAgentChatResult {
328
+ messages: ChatMessage[];
329
+ status: AgentStatus;
330
+ activities: Activity[];
331
+ todos: Todo[];
332
+ schemaDiffs: SchemaDiff[];
333
+ isLoading: boolean;
334
+ error: string | null;
335
+ threadId: string | null;
336
+ interrupt: DeepAgentInterrupt | null;
337
+ sendMessage: (content: string) => Promise<void>;
338
+ startGeneration: (skill: string | string[], prompt: string, options?: Record<string, FieldValue>) => Promise<void>;
339
+ continueConversation: (message: string | string[]) => Promise<void>;
340
+ resumeWithDecision: (decisions: FieldValue[]) => Promise<void>;
341
+ cancel: () => void;
342
+ clearMessages: () => void;
343
+ clearHistory: () => void;
344
+ }
345
+ declare function useAgentChat(options?: UseAgentChatOptions): UseAgentChatResult;
346
+
347
+ interface LLMErrorContext {
348
+ rawValuePreview?: string;
349
+ expectedType?: string;
350
+ actualType?: string;
351
+ source?: {
352
+ agent: 'requirements' | 'builder' | 'view-planner';
353
+ operation: string;
354
+ promptHash?: string;
355
+ };
356
+ tokenUsage?: {
357
+ prompt: number;
358
+ completion: number;
359
+ };
360
+ }
361
+ interface ValidationError {
362
+ code: string;
363
+ message: string;
364
+ path?: string;
365
+ severity: 'error' | 'warning';
366
+ suggestion?: string;
367
+ validValues?: string[];
368
+ expectedShape?: string;
369
+ fixGuidance?: string;
370
+ llmContext?: LLMErrorContext;
371
+ }
372
+ interface ValidationResult {
373
+ valid: boolean;
374
+ errors: ValidationError[];
375
+ warnings: ValidationError[];
376
+ }
377
+ type ValidationStage = 'idle' | 'validating' | 'fixing' | 'complete';
378
+ interface UseValidationResult {
379
+ result: ValidationResult | null;
380
+ isValidating: boolean;
381
+ error: string | null;
382
+ stage: ValidationStage;
383
+ isFixing: boolean;
384
+ progressMessage: string | null;
385
+ errors: ValidationError[];
386
+ warnings: ValidationError[];
387
+ isValid: boolean;
388
+ validate: (appId: string) => Promise<ValidationResult>;
389
+ clearResult: () => void;
390
+ reset: () => void;
391
+ }
392
+ declare function useValidation(): UseValidationResult;
393
+
394
+ interface KeyCaptureEntry {
395
+ mode: string;
396
+ keys: ReadonlySet<string>;
397
+ }
398
+ /** keyed by editorId, or the literal 'shell' for chrome-level bindings */
399
+ type KeyCaptureTable = Readonly<Record<string, KeyCaptureEntry>>;
400
+ interface EditorKeyEvent {
401
+ editorId: string;
402
+ key: string;
403
+ code: string;
404
+ ctrl: boolean;
405
+ alt: boolean;
406
+ shift: boolean;
407
+ meta: boolean;
408
+ repeat: boolean;
409
+ }
410
+ /**
411
+ * Merges several plugins' capture tables into one, per target: keys UNION
412
+ * across every table that declares the target; `mode` is `'any'` if any
413
+ * input says so, else the shared mode when every input agrees, else the
414
+ * distinct modes sorted and `|`-joined. A target present in only one table
415
+ * passes through unchanged. Pure, deterministic — no heuristics.
416
+ */
417
+ declare function mergeCaptureTables(tables: readonly KeyCaptureTable[]): KeyCaptureTable;
418
+ /** `"Control+Shift+P"`-style spelling of a keydown: modifiers in the fixed order Control, Alt, Shift, Meta, then `event.key`. */
419
+ declare function keyChord(event: Pick<KeyboardEvent, 'key' | 'ctrlKey' | 'altKey' | 'shiftKey' | 'metaKey'>): string;
420
+ interface UseKeyboardRouterOptions {
421
+ /** declared data; caller owns it; re-read on every keydown (kept in a ref) */
422
+ captureTable: KeyCaptureTable;
423
+ /** default 'KEY' -> emits UI:KEY */
424
+ keyEvent?: string;
425
+ /** default true */
426
+ enabled?: boolean;
427
+ }
428
+ declare function useKeyboardRouter(options: UseKeyboardRouterOptions): void;
429
+
430
+ /**
431
+ * Hook to bridge UI events to state machine dispatch.
432
+ *
433
+ * @param dispatch - The state machine dispatch function
434
+ * @param traitName - Owning trait name; used to construct the qualified
435
+ * subscription key `UI:{traitName}.{event}`. Required — bare-key
436
+ * subscriptions were removed when the bus namespace unified on the
437
+ * listens grammar (gap #13, Phase 4 of the cross-orbital plan).
438
+ * @param validEvents - Local event names (transition triggers) the
439
+ * trait reacts to. The hook subscribes to `UI:{traitName}.{event}`
440
+ * for each entry.
441
+ * @param eventBusInstance - Optional event bus instance (for testing)
442
+ */
443
+ declare function useUIEvents<E extends string>(dispatch: (event: E, payload?: EventPayload) => void | Promise<void>, traitName: string, validEvents: readonly E[], eventBusInstance?: ReturnType<typeof useEventBus>): void;
444
+ /**
445
+ * Hook to subscribe to cross-trait listens (gap #13, Phase 4 codegen).
446
+ *
447
+ * The schema's `listens { Source EVENT -> TRIGGER }` block resolves at
448
+ * lower-time to a typed `ListenSource` enum (intra-orbital `Trait` or
449
+ * cross-orbital `Orbital.Trait`). Codegen materializes one
450
+ * `useTraitListens` call per trait, listing every `(sourceTrait,
451
+ * sourceEvent, localTrigger)` tuple from the listens block. The hook
452
+ * subscribes to the qualified bus key — `UI:Trait.EVENT` (intra-orbital)
453
+ * or `UI:Orbital.Trait.EVENT` (cross-orbital) — and dispatches the
454
+ * local trigger when the source fires.
455
+ *
456
+ * Replaces the old bare-event cross-trait fan-out that lived inside
457
+ * `useUIEvents`. Pre-unification, `useUIEvents` subscribed to bare
458
+ * `EVENT` keys and matched on `source.trait !== own`; post-unification,
459
+ * the qualified bus key carries the source identity directly, no
460
+ * `source` filtering needed.
461
+ */
462
+ interface TraitListenSpec<E extends string> {
463
+ /** Qualified `Trait.EVENT` or `Orbital.Trait.EVENT` source. */
464
+ sourceKey: string;
465
+ /** Local trigger event to dispatch when the source fires. */
466
+ trigger: E;
467
+ }
468
+ declare function useTraitListens<E extends string>(dispatch: (event: E, payload?: EventPayload) => void, listens: readonly TraitListenSpec<E>[], eventBusInstance?: ReturnType<typeof useEventBus>): void;
469
+
470
+ /**
471
+ * At-most-once delivery: one physical emit reaches a trait once per triggered
472
+ * event. Every key one emit fans to (scope-chain bubbling, a listen route)
473
+ * carries the same `source` object, so the first delivery to a (trait, event)
474
+ * claims it and the rest are the same event again. A sourceless emit is never
475
+ * deduplicated. Shared by the runtime ingress (`useBusIngress`), `useUIEvents`
476
+ * and compiled listens.
477
+ */
478
+
479
+ declare function claimDelivery(source: BusEventSource | undefined, trait: string, event: string): boolean;
480
+
481
+ /** Notification callback fired after a `commit()` for the subscribed entity id. */
482
+ type SharedEntitySubscriber = () => void;
483
+ /**
484
+ * One writer trait's per-frame step: reads the live running scratch
485
+ * (reflecting every earlier writer's writes this frame) and returns its own
486
+ * field writes. Pure — writers never call `store.commit`; only `runTickFrame`
487
+ * does, once per frame.
488
+ */
489
+ type SharedEntityWriter = (scratch: EntityFrameState) => readonly EntityFieldWrite[];
490
+ /** Manager surface, keyed by entity id. */
491
+ interface SharedEntityStore {
492
+ getSnapshot: (entityId: string) => EntityFrameState;
493
+ subscribe: (entityId: string, callback: SharedEntitySubscriber) => () => void;
494
+ commit: (entityId: string, nextState: EntityFrameState) => void;
495
+ /**
496
+ * Set the initial state for an entity id, but ONLY if nothing is committed
497
+ * yet — idempotent, and (unlike `commit`) does NOT notify subscribers, so it
498
+ * is safe to call during render. Both execution paths seed from the entity's
499
+ * declared field defaults at init, so frame 0 reads the defaults on both.
500
+ */
501
+ seed: (entityId: string, initialState: EntityFrameState) => void;
502
+ }
503
+ /**
504
+ * Create a standalone shared-entity store. Plain factory — no React — so a
505
+ * clock owner (the kernel's tick clock, or a codegen rAF
506
+ * `useEffect`) can hold one instance and pass it to `runTickFrame` without
507
+ * going through a hook.
508
+ */
509
+ declare function createSharedEntityStore(): SharedEntityStore;
510
+ /**
511
+ * React hook: one stable `SharedEntityStore` instance for this component's
512
+ * lifetime (useUISlotManager's ref-backed-instance pattern — no re-creation
513
+ * across re-renders). Callers own one store per running orbital instance and
514
+ * thread it to each writer trait plus the render trait via `runTickFrame` /
515
+ * `useSharedEntitySnapshot`.
516
+ */
517
+ declare function useSharedEntityStore(): SharedEntityStore;
518
+ /**
519
+ * Cross-component access to ONE `SharedEntityStore` instance. `useSharedEntityStore`
520
+ * is `useRef`-scoped to its own call site — correct for a single owner (the JS
521
+ * runtime path's `useTraitStateMachine` interprets a whole orbital in one hook
522
+ * call), but the compiled path (`orbital-rust`'s TS-shell codegen) generates one
523
+ * hook + component PER TRAIT, so several independent trait hooks bound to the
524
+ * SAME `[shared]` entity need the SAME store instance. A page-level owner calls
525
+ * `useSharedEntityStore()` once and provides it here; every trait hook on that
526
+ * page reads it back via `useSharedEntityStoreContext()` instead of creating its
527
+ * own disconnected store. Not used by the JS runtime path today — purely
528
+ * additive, zero effect on `useSharedEntityStore`'s existing single-caller
529
+ * behavior.
530
+ */
531
+ declare const SharedEntityStoreContext: React$1.Context<SharedEntityStore | null>;
532
+ /** Read the page-level `SharedEntityStore` provided by `SharedEntityStoreContext`. */
533
+ declare function useSharedEntityStoreContext(): SharedEntityStore;
534
+ /**
535
+ * Bridge one entity's snapshot into React via `useSyncExternalStore` (the
536
+ * codebase's established store->React bridge, see `lib/perf.ts`). The render
537
+ * trait re-renders exactly when `runTickFrame` commits this entity — never on
538
+ * an intermediate per-writer write, since those never call `store.commit`.
539
+ */
540
+ declare function useSharedEntitySnapshot(store: SharedEntityStore, entityId: string): EntityFrameState;
541
+ /**
542
+ * Run one frame for `entityId`: fold each writer's writes into a running
543
+ * scratch in binding order via `mergeEntityFrame` (field-level, so writer
544
+ * k+1 reads writer k's same-frame writes), then commit the merged result
545
+ * exactly ONCE. Clock-agnostic — the caller (a kernel-clock tick or a
546
+ * codegen rAF loop) invokes this once per frame; it owns no timer itself.
547
+ */
548
+ declare function runTickFrame(entityId: string, orderedWriters: readonly SharedEntityWriter[], store: SharedEntityStore): EntityFrameState;
549
+
550
+ /**
551
+ * Query state for filters and search
552
+ */
553
+ interface QueryState {
554
+ search?: string;
555
+ filters?: Record<string, FieldValue>;
556
+ sortField?: string;
557
+ sortDirection?: 'asc' | 'desc';
558
+ }
559
+ /**
560
+ * Query singleton entity reference
561
+ */
562
+ interface QuerySingletonEntity {
563
+ name: string;
564
+ fields: Record<string, FieldValue>;
565
+ }
566
+ /**
567
+ * Query singleton result type
568
+ */
569
+ interface QuerySingletonResult {
570
+ state: QueryState;
571
+ setState: (state: Partial<QueryState>) => void;
572
+ reset: () => void;
573
+ }
574
+ interface QuerySingletonState {
575
+ /** Current search term */
576
+ search: string;
577
+ /** Set search term */
578
+ setSearch: (value: string) => void;
579
+ /** Current filters */
580
+ filters: Record<string, FieldValue>;
581
+ /** Set a filter value */
582
+ setFilter: (key: string, value: FieldValue) => void;
583
+ /** Clear all filters */
584
+ clearFilters: () => void;
585
+ /** Current sort field */
586
+ sortField?: string;
587
+ /** Current sort direction */
588
+ sortDirection?: 'asc' | 'desc';
589
+ /** Set sort */
590
+ setSort: (field: string, direction: 'asc' | 'desc') => void;
591
+ }
592
+ /**
593
+ * Hook for accessing a query singleton by name
594
+ *
595
+ * @param query - Query singleton name (e.g., "@TaskQuery")
596
+ * @returns Query singleton state or null if no query provided
597
+ *
598
+ * @example
599
+ * ```tsx
600
+ * const queryState = useQuerySingleton('@TaskQuery');
601
+ *
602
+ * // Use search state
603
+ * queryState?.search
604
+ * queryState?.setSearch('new search term')
605
+ * ```
606
+ */
607
+ declare function useQuerySingleton(query?: string): QuerySingletonState | null;
608
+ /**
609
+ * Parse a query binding string to extract the query singleton name
610
+ *
611
+ * @param binding - Binding string like "@TaskQuery.search" or "@TaskQuery"
612
+ * @returns Object with query name and optional field path
613
+ *
614
+ * @example
615
+ * ```tsx
616
+ * parseQueryBinding('@TaskQuery.search')
617
+ * // { query: 'TaskQuery', field: 'search' }
618
+ *
619
+ * parseQueryBinding('@TaskQuery')
620
+ * // { query: 'TaskQuery', field: undefined }
621
+ * ```
622
+ */
623
+ declare function parseQueryBinding(binding: string): {
624
+ query: string;
625
+ field?: string;
626
+ };
627
+
628
+ /**
629
+ * Auth Context Hook Stub
630
+ *
631
+ * Provides a placeholder auth context for the design system.
632
+ * Applications should provide their own AuthContext provider
633
+ * that implements this interface.
634
+ */
635
+ interface AuthUser {
636
+ uid: string;
637
+ email: string | null;
638
+ displayName: string | null;
639
+ photoURL: string | null;
640
+ }
641
+ interface AuthContextValue {
642
+ user: AuthUser | null;
643
+ loading: boolean;
644
+ signIn?: () => Promise<void>;
645
+ signOut?: () => Promise<void>;
646
+ }
647
+ /**
648
+ * Stub hook that returns empty auth context.
649
+ * Applications should wrap their app with an AuthProvider
650
+ * that supplies real auth state.
651
+ */
652
+ declare function useAuthContext(): AuthContextValue;
653
+
654
+ interface SwipeGestureOptions {
655
+ /** Minimum distance in px to trigger a swipe (default: 50) */
656
+ threshold?: number;
657
+ /** Minimum velocity in px/ms to qualify (default: 0.3) */
658
+ velocityThreshold?: number;
659
+ /** Prevent default touch behavior during swipe (default: false) */
660
+ preventDefault?: boolean;
661
+ }
662
+ interface SwipeGestureResult {
663
+ onSwipeLeft?: () => void;
664
+ onSwipeRight?: () => void;
665
+ onSwipeUp?: () => void;
666
+ onSwipeDown?: () => void;
667
+ }
668
+ interface SwipeHandlers {
669
+ onPointerDown: (e: React__default.PointerEvent) => void;
670
+ onPointerMove: (e: React__default.PointerEvent) => void;
671
+ onPointerUp: (e: React__default.PointerEvent) => void;
672
+ onPointerCancel: (e: React__default.PointerEvent) => void;
673
+ /** Current horizontal offset during swipe (for animation) */
674
+ offsetX: number;
675
+ /** Whether a swipe gesture is in progress */
676
+ isSwiping: boolean;
677
+ }
678
+
679
+ declare function useSwipeGesture(callbacks: SwipeGestureResult, options?: SwipeGestureOptions): SwipeHandlers;
680
+
681
+ interface LongPressOptions {
682
+ /** Hold duration in ms before triggering (default: 500) */
683
+ duration?: number;
684
+ /** Movement tolerance in px before canceling (default: 10) */
685
+ moveThreshold?: number;
686
+ }
687
+ interface LongPressHandlers {
688
+ onPointerDown: (e: React__default.PointerEvent) => void;
689
+ onPointerMove: (e: React__default.PointerEvent) => void;
690
+ onPointerUp: () => void;
691
+ onPointerCancel: () => void;
692
+ /** Whether the long press is currently active (held down, timer running) */
693
+ isPressed: boolean;
694
+ }
695
+ declare function useLongPress(onLongPress: () => void, options?: LongPressOptions): LongPressHandlers;
696
+
697
+ interface DragReorderResult<T> {
698
+ /** The reordered items array */
699
+ items: T[];
700
+ /** Index of the item currently being dragged (-1 if not dragging) */
701
+ dragIndex: number;
702
+ /** Index of the drop target (-1 if not over any target) */
703
+ dragOverIndex: number;
704
+ /** Whether a drag is in progress */
705
+ isDragging: boolean;
706
+ /** Props to spread on the drag handle element for a given index */
707
+ getDragHandleProps: (index: number) => {
708
+ onPointerDown: (e: React__default.PointerEvent) => void;
709
+ style: React__default.CSSProperties;
710
+ 'aria-grabbed': boolean;
711
+ role: 'button';
712
+ };
713
+ /** Props to spread on each list item for a given index */
714
+ getItemProps: (index: number) => {
715
+ onPointerMove: (e: React__default.PointerEvent) => void;
716
+ onPointerUp: () => void;
717
+ 'aria-dropeffect': string;
718
+ style: React__default.CSSProperties;
719
+ };
720
+ }
721
+ declare function useDragReorder<T>(initialItems: T[], onReorder: (fromIndex: number, toIndex: number, item: T) => void): DragReorderResult<T>;
722
+
723
+ interface PullToRefreshOptions {
724
+ /** Distance in px to pull before triggering refresh (default: 60) */
725
+ threshold?: number;
726
+ /** Maximum pull distance in px (default: 120) */
727
+ maxPull?: number;
728
+ }
729
+ interface PullToRefreshResult {
730
+ /** Current pull distance in px */
731
+ pullDistance: number;
732
+ /** Whether the user is actively pulling */
733
+ isPulling: boolean;
734
+ /** Whether a refresh was triggered and is in progress */
735
+ isRefreshing: boolean;
736
+ /** Props to spread on the scrollable container */
737
+ containerProps: {
738
+ onTouchStart: (e: React__default.TouchEvent) => void;
739
+ onTouchMove: (e: React__default.TouchEvent) => void;
740
+ onTouchEnd: () => void;
741
+ style: React__default.CSSProperties;
742
+ };
743
+ /** Call this when the refresh operation completes */
744
+ endRefresh: () => void;
745
+ }
746
+ declare function usePullToRefresh(onRefresh: () => void, options?: PullToRefreshOptions): PullToRefreshResult;
747
+
748
+ /**
749
+ * Unified pointer/touch gesture detection for canvas surfaces (graph, isometric, etc.).
750
+ *
751
+ * It owns the hard part — pointer tracking + two-finger pinch (scale factor + centroid) —
752
+ * and DELEGATES application to the consumer via callbacks, so each canvas applies pan/zoom
753
+ * in its own coordinate convention (screen-offset vs world-camera). A single pointer is
754
+ * passed straight through to the consumer's domain handlers (pan / node-drag / tile-select);
755
+ * a second pointer takes over as a pinch and cancels any in-flight single-pointer action.
756
+ *
757
+ * Pointer Events cover mouse, touch and pen, so this REPLACES mouse handlers — no dual paths.
758
+ */
759
+ interface CanvasGestureCallbacks {
760
+ /** Single-pointer down — start the consumer's pan / drag / select (domain-specific). */
761
+ onPointerDown?: (e: React.PointerEvent<HTMLCanvasElement>) => void;
762
+ /** Single-pointer move. */
763
+ onPointerMove?: (e: React.PointerEvent<HTMLCanvasElement>) => void;
764
+ /** Single-pointer up. */
765
+ onPointerUp?: (e: React.PointerEvent<HTMLCanvasElement>) => void;
766
+ /**
767
+ * Multiplicative zoom around a canvas-local point. Fired by wheel and by pinch.
768
+ * Consumer applies `newZoom = clamp(oldZoom * factor)` keeping (centerX,centerY) fixed.
769
+ */
770
+ onZoom?: (factor: number, centerX: number, centerY: number) => void;
771
+ /** Two-finger pan delta in canvas-local px (fired alongside pinch). */
772
+ onPanDelta?: (dx: number, dy: number) => void;
773
+ /** A second pointer arrived — cancel any single-pointer pan/drag the consumer started. */
774
+ onMultiTouchStart?: () => void;
775
+ }
776
+ interface UseCanvasGesturesOptions extends CanvasGestureCallbacks {
777
+ /** The canvas being gestured on (for coordinate translation). */
778
+ canvasRef: React.RefObject<HTMLCanvasElement | null>;
779
+ /** When false, all gestures are inert. Default true. */
780
+ enabled?: boolean;
781
+ /** Wheel zoom step per notch (>1). Default 1.1. */
782
+ wheelStep?: number;
783
+ }
784
+ interface CanvasGestureHandlers {
785
+ onPointerDown: (e: React.PointerEvent<HTMLCanvasElement>) => void;
786
+ onPointerMove: (e: React.PointerEvent<HTMLCanvasElement>) => void;
787
+ onPointerUp: (e: React.PointerEvent<HTMLCanvasElement>) => void;
788
+ onPointerCancel: (e: React.PointerEvent<HTMLCanvasElement>) => void;
789
+ onWheel: (e: WheelEvent) => void;
790
+ }
791
+ declare function useCanvasGestures(options: UseCanvasGesturesOptions): CanvasGestureHandlers;
792
+
793
+ /** Discriminated payload carried by every drag operation. */
794
+ interface DraggablePayload {
795
+ kind: 'pattern' | 'behavior' | 'tree-node' | 'event-wire';
796
+ data: EventPayload;
797
+ }
798
+ interface UseDraggableOptions {
799
+ /** The payload that will be serialised into dataTransfer. */
800
+ payload: DraggablePayload;
801
+ /** When true the element cannot be dragged. */
802
+ disabled?: boolean;
803
+ }
804
+ interface UseDraggableResult {
805
+ /** Spread these onto the draggable element. */
806
+ dragProps: {
807
+ draggable: boolean;
808
+ onDragStart: (e: React.DragEvent) => void;
809
+ onDragEnd: (e: React.DragEvent) => void;
810
+ 'aria-grabbed': boolean;
811
+ };
812
+ /** True while the element is being dragged. */
813
+ isDragging: boolean;
814
+ }
815
+ declare const ALMADAR_DND_MIME = "application/x-almadar-dnd";
816
+ declare function useDraggable({ payload, disabled }: UseDraggableOptions): UseDraggableResult;
817
+
818
+ interface UseDropZoneOptions {
819
+ /** Which payload kinds this zone accepts. */
820
+ accepts: DraggablePayload['kind'][];
821
+ /** Called when a valid payload is dropped. */
822
+ onDrop: (payload: DraggablePayload, position: {
823
+ x: number;
824
+ y: number;
825
+ }) => void;
826
+ /** When true the zone rejects all drops. */
827
+ disabled?: boolean;
828
+ }
829
+ interface UseDropZoneResult {
830
+ /** Spread these onto the drop-target element. */
831
+ dropProps: {
832
+ onDragOver: (e: React.DragEvent) => void;
833
+ onDragLeave: (e: React.DragEvent) => void;
834
+ onDrop: (e: React.DragEvent) => void;
835
+ };
836
+ /** True while a valid drag payload is hovering over this zone. */
837
+ isOver: boolean;
838
+ }
839
+ declare function useDropZone({ accepts, onDrop, disabled }: UseDropZoneOptions): UseDropZoneResult;
840
+
841
+ interface Positioned {
842
+ id: string;
843
+ x: number;
844
+ y: number;
845
+ }
846
+ interface RenderInterpolationOptions {
847
+ /** Expected tick interval in ms (default: 1000/30 ≈ 33.3ms) */
848
+ tickIntervalMs?: number;
849
+ }
850
+ interface RenderInterpolationHandle<T extends Positioned> {
851
+ /** Call when a new authoritative snapshot arrives from the model */
852
+ onSnapshot: (entities: readonly T[]) => void;
853
+ /** Returns interpolated positions for the current rAF timestamp; falls back to authoritative values */
854
+ getInterpolated: (now: number) => Map<string, {
855
+ x: number;
856
+ y: number;
857
+ }>;
858
+ /** Start the rAF loop; call the supplied draw fn on every frame */
859
+ startLoop: (draw: (positions: Map<string, {
860
+ x: number;
861
+ y: number;
862
+ }>) => void) => () => void;
863
+ }
864
+ /**
865
+ * Fixed-timestep render interpolation between the last two authoritative model snapshots.
866
+ *
867
+ * Buffers two snapshots. On each rAF frame computes
868
+ * alpha = clamp((now - lastArrival) / tickIntervalMs, 0, 1)
869
+ * and lerps x/y between prev and curr, matched by entity id.
870
+ * New or removed entities fall back to their authoritative value directly.
871
+ * Never throws; never causes a React re-render per frame.
872
+ */
873
+ declare function useRenderInterpolation<T extends Positioned>(options?: RenderInterpolationOptions): RenderInterpolationHandle<T>;
874
+
875
+ /**
876
+ * GitHub connection status
877
+ */
878
+ interface GitHubStatus {
879
+ connected: boolean;
880
+ username?: string;
881
+ avatarUrl?: string;
882
+ scopes?: string[];
883
+ connectedAt?: number;
884
+ lastUsedAt?: number;
885
+ }
886
+ /**
887
+ * GitHub repository
888
+ */
889
+ interface GitHubRepo {
890
+ id: number;
891
+ name: string;
892
+ fullName: string;
893
+ owner: string;
894
+ isPrivate: boolean;
895
+ description: string | null;
896
+ defaultBranch: string;
897
+ url: string;
898
+ }
899
+ /**
900
+ * Hook to get GitHub connection status
901
+ */
902
+ declare function useGitHubStatus(): _tanstack_react_query.UseQueryResult<GitHubStatus, Error>;
903
+ /**
904
+ * Hook to connect GitHub (initiate OAuth flow)
905
+ */
906
+ declare function useConnectGitHub(): {
907
+ connectGitHub: () => void;
908
+ };
909
+ /**
910
+ * Hook to disconnect GitHub
911
+ */
912
+ declare function useDisconnectGitHub(): _tanstack_react_query.UseMutationResult<unknown, Error, void, unknown>;
913
+ /**
914
+ * Hook to list GitHub repositories
915
+ */
916
+ declare function useGitHubRepos(page?: number, perPage?: number): _tanstack_react_query.UseQueryResult<{
917
+ repos: GitHubRepo[];
918
+ page: number;
919
+ perPage: number;
920
+ }, Error>;
921
+ /**
922
+ * Hook to get repository details
923
+ */
924
+ declare function useGitHubRepo(owner: string, repo: string, enabled?: boolean): _tanstack_react_query.UseQueryResult<{
925
+ repo: GitHubRepo;
926
+ }, Error>;
927
+ /**
928
+ * Hook to list repository branches
929
+ */
930
+ declare function useGitHubBranches(owner: string, repo: string, enabled?: boolean): _tanstack_react_query.UseQueryResult<{
931
+ branches: string[];
932
+ }, Error>;
933
+
934
+ /**
935
+ * The active page's document head on client navigation — the same declared
936
+ * contract the build writes into each route document: title, description,
937
+ * canonical, social tags and the robots directive, with `i18n/t` metadata
938
+ * resolved from the active locale's catalog. The tags it writes are marked
939
+ * and replaced on every page change; entering an `authenticated` or
940
+ * `noindex` page drops the public tags and declares `noindex`.
941
+ *
942
+ * @packageDocumentation
943
+ */
944
+
945
+ interface PageHeadInput {
946
+ title?: PageMeta;
947
+ description?: PageMeta;
948
+ access?: PageAccess;
949
+ indexing?: PageIndexing;
950
+ /** The app's `origin:`, for the canonical URL. */
951
+ origin?: string;
952
+ /** The app's `siteName:` — the document title of a page that declares none. */
953
+ siteName?: string;
954
+ /** The concrete path on screen. */
955
+ path: string;
956
+ /** The page's translations (`localeAlternates`), written as hreflang links. */
957
+ alternates?: readonly LocaleAlternate[];
958
+ /** The app's first locale, the `x-default` alternate. */
959
+ defaultLocale?: string;
960
+ }
961
+ /** Writes `input`'s head into the document; `null` writes nothing. */
962
+ declare function usePageHead(input: PageHeadInput | null): void;
963
+
964
+ /**
965
+ * Whether a `[visible]` tick may fire now: its trait group is not off screen (LOLO §11).
966
+ * Watches the group while mounted so `TraitScopeProvider` tracks the group's output.
967
+ */
968
+ declare function useTickVisibility(traits: readonly string[]): () => boolean;
969
+
970
+ export { ALMADAR_DND_MIME, SharedEntityStoreContext, claimDelivery, createSharedEntityStore, keyChord, mergeCaptureTables, parseQueryBinding, runTickFrame, useAgentChat, useAuthContext, useCanvasGestures, useCompile, useConnectGitHub, useDeepAgentGeneration, useDisconnectGitHub, useDragReorder, useDraggable, useDropZone, useExtensions, useFileEditor, useFileSystem, useGitHubBranches, useGitHubRepo, useGitHubRepos, useGitHubStatus, useKeyboardRouter, useLongPress, usePageHead, usePreview, usePullToRefresh, useQuerySingleton, useRenderInterpolation, useSharedEntitySnapshot, useSharedEntityStore, useSharedEntityStoreContext, useSwipeGesture, useTickVisibility, useTraitListens, useUIEvents, useValidation };
971
+ export type { AuthContextValue, AuthUser, CanvasGestureCallbacks, CanvasGestureHandlers, CompileResult, CompileStage, DragReorderResult, DraggablePayload, EditorKeyEvent, Extension, ExtensionManifest, FileSystemFile, FileSystemStatus, GitHubRepo, GitHubStatus, KeyCaptureEntry, KeyCaptureTable, LongPressHandlers, LongPressOptions, OpenFile, PageHeadInput, Positioned, PullToRefreshOptions, PullToRefreshResult, QuerySingletonEntity, QuerySingletonResult, QuerySingletonState, QueryState, RenderInterpolationHandle, RenderInterpolationOptions, SelectedFile, SharedEntityStore, SharedEntitySubscriber, SharedEntityWriter, SwipeGestureOptions, SwipeGestureResult, SwipeHandlers, TraitListenSpec, UseCanvasGesturesOptions, UseCompileResult, UseDraggableOptions, UseDraggableResult, UseDropZoneOptions, UseDropZoneResult, UseExtensionsOptions, UseExtensionsResult, UseFileEditorOptions, UseFileEditorResult, UseFileSystemResult, UseKeyboardRouterOptions };