@askrjs/askr 0.0.21 → 0.0.24

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 (294) hide show
  1. package/LICENSE +201 -201
  2. package/README.md +160 -46
  3. package/dist/_virtual/___vite-browser-external.js +1 -0
  4. package/dist/_virtual/__vite-browser-external.js +1 -0
  5. package/dist/_virtual/_commonjsHelpers.js +1 -0
  6. package/dist/_virtual/main.js +1 -0
  7. package/dist/_virtual/preload-helper.js +1 -0
  8. package/dist/{benchmark.d.ts → bench/benchmark-entry.d.ts} +3 -3
  9. package/dist/bench/benchmark-entry.d.ts.map +1 -0
  10. package/dist/benchmark.js +1 -1
  11. package/dist/boot/index.d.ts +70 -0
  12. package/dist/boot/index.d.ts.map +1 -0
  13. package/dist/boot/index.js +2 -0
  14. package/dist/common/component.d.ts +16 -0
  15. package/dist/common/component.d.ts.map +1 -0
  16. package/dist/common/errors.d.ts +53 -0
  17. package/dist/common/errors.d.ts.map +1 -0
  18. package/dist/common/index.d.ts +14 -0
  19. package/dist/common/index.d.ts.map +1 -0
  20. package/dist/common/jsx.d.ts +17 -0
  21. package/dist/common/jsx.d.ts.map +1 -0
  22. package/dist/common/jsx.js +1 -0
  23. package/dist/{jsx-CPjsGyEg.d.ts → common/props.d.ts} +6 -18
  24. package/dist/common/props.d.ts.map +1 -0
  25. package/dist/{router-DaGtH1Sq.d.ts → common/router.d.ts} +10 -7
  26. package/dist/common/router.d.ts.map +1 -0
  27. package/dist/common/ssr-errors.d.ts +8 -0
  28. package/dist/common/ssr-errors.d.ts.map +1 -0
  29. package/dist/common/ssr-errors.js +1 -0
  30. package/dist/common/ssr.d.ts +17 -0
  31. package/dist/common/ssr.d.ts.map +1 -0
  32. package/dist/common/vnode.d.ts +17 -0
  33. package/dist/common/vnode.d.ts.map +1 -0
  34. package/dist/common/vnode.js +1 -0
  35. package/dist/components/link.d.ts +56 -0
  36. package/dist/components/link.d.ts.map +1 -0
  37. package/dist/components/link.js +1 -0
  38. package/dist/dev/invariant.d.ts +83 -0
  39. package/dist/dev/invariant.d.ts.map +1 -0
  40. package/dist/dev/invariant.js +2 -0
  41. package/dist/dev/logger.d.ts +13 -0
  42. package/dist/dev/logger.d.ts.map +1 -0
  43. package/dist/dev/logger.js +1 -0
  44. package/dist/dev/vite-plugin-askr.d.ts +18 -0
  45. package/dist/dev/vite-plugin-askr.d.ts.map +1 -0
  46. package/dist/dev/warnings.d.ts +5 -0
  47. package/dist/dev/warnings.d.ts.map +1 -0
  48. package/dist/for/for.d.ts +16 -0
  49. package/dist/for/for.d.ts.map +1 -0
  50. package/dist/for/for.js +1 -0
  51. package/dist/for/index.d.ts +2 -63
  52. package/dist/for/index.d.ts.map +1 -0
  53. package/dist/for/index.js +1 -1
  54. package/dist/foundations/core.d.ts +23 -0
  55. package/dist/foundations/core.d.ts.map +1 -0
  56. package/dist/foundations/core.js +1 -0
  57. package/dist/foundations/index.d.ts +3 -669
  58. package/dist/foundations/index.d.ts.map +1 -0
  59. package/dist/foundations/index.js +1 -1
  60. package/dist/foundations/interactions/dismissable.d.ts +58 -0
  61. package/dist/foundations/interactions/dismissable.d.ts.map +1 -0
  62. package/dist/foundations/interactions/dismissable.js +1 -0
  63. package/dist/foundations/interactions/focusable.d.ts +16 -0
  64. package/dist/foundations/interactions/focusable.d.ts.map +1 -0
  65. package/dist/foundations/interactions/focusable.js +1 -0
  66. package/dist/foundations/interactions/hoverable.d.ts +19 -0
  67. package/dist/foundations/interactions/hoverable.d.ts.map +1 -0
  68. package/dist/foundations/interactions/hoverable.js +1 -0
  69. package/dist/foundations/interactions/index.d.ts +5 -0
  70. package/dist/foundations/interactions/index.d.ts.map +1 -0
  71. package/dist/foundations/interactions/interaction-policy.d.ts +96 -0
  72. package/dist/foundations/interactions/interaction-policy.d.ts.map +1 -0
  73. package/dist/foundations/interactions/interaction-policy.js +1 -0
  74. package/dist/foundations/interactions/pressable.d.ts +54 -0
  75. package/dist/foundations/interactions/pressable.d.ts.map +1 -0
  76. package/dist/foundations/interactions/pressable.js +1 -0
  77. package/dist/foundations/interactions/roving-focus.d.ts +117 -0
  78. package/dist/foundations/interactions/roving-focus.d.ts.map +1 -0
  79. package/dist/foundations/interactions/roving-focus.js +1 -0
  80. package/dist/foundations/state/controllable.d.ts +53 -0
  81. package/dist/foundations/state/controllable.d.ts.map +1 -0
  82. package/dist/foundations/state/controllable.js +1 -0
  83. package/dist/foundations/state/index.d.ts +2 -0
  84. package/dist/foundations/state/index.d.ts.map +1 -0
  85. package/dist/foundations/structures/collection.d.ts +67 -0
  86. package/dist/foundations/structures/collection.d.ts.map +1 -0
  87. package/dist/foundations/structures/collection.js +1 -0
  88. package/dist/foundations/structures/index.d.ts +5 -0
  89. package/dist/foundations/structures/index.d.ts.map +1 -0
  90. package/dist/foundations/structures/layer.d.ts +102 -0
  91. package/dist/foundations/structures/layer.d.ts.map +1 -0
  92. package/dist/foundations/structures/layer.js +1 -0
  93. package/dist/{layout-BINPv-nz.d.ts → foundations/structures/layout.d.ts} +3 -4
  94. package/dist/foundations/structures/layout.d.ts.map +1 -0
  95. package/dist/foundations/structures/layout.js +1 -0
  96. package/dist/foundations/structures/portal.d.ts +33 -0
  97. package/dist/foundations/structures/portal.d.ts.map +1 -0
  98. package/dist/foundations/structures/portal.js +1 -0
  99. package/dist/foundations/structures/presence.d.ts +30 -0
  100. package/dist/foundations/structures/presence.d.ts.map +1 -0
  101. package/dist/foundations/structures/presence.js +1 -0
  102. package/dist/foundations/structures/slot.d.ts +31 -0
  103. package/dist/foundations/structures/slot.d.ts.map +1 -0
  104. package/dist/foundations/structures/slot.js +1 -0
  105. package/dist/foundations/structures.d.ts +14 -0
  106. package/dist/foundations/structures.d.ts.map +1 -0
  107. package/dist/foundations/structures.js +1 -0
  108. package/dist/foundations/utilities/aria.d.ts +13 -0
  109. package/dist/foundations/utilities/aria.d.ts.map +1 -0
  110. package/dist/foundations/utilities/aria.js +1 -0
  111. package/dist/foundations/utilities/compose-handlers.d.ts +34 -0
  112. package/dist/foundations/utilities/compose-handlers.d.ts.map +1 -0
  113. package/dist/foundations/utilities/compose-handlers.js +1 -0
  114. package/dist/foundations/utilities/compose-ref.d.ts +24 -0
  115. package/dist/foundations/utilities/compose-ref.d.ts.map +1 -0
  116. package/dist/foundations/utilities/compose-ref.js +1 -0
  117. package/dist/foundations/utilities/event-types.d.ts +17 -0
  118. package/dist/foundations/utilities/event-types.d.ts.map +1 -0
  119. package/dist/foundations/utilities/index.d.ts +7 -0
  120. package/dist/foundations/utilities/index.d.ts.map +1 -0
  121. package/dist/foundations/utilities/merge-props.d.ts +2 -0
  122. package/dist/foundations/utilities/merge-props.d.ts.map +1 -0
  123. package/dist/foundations/utilities/merge-props.js +1 -0
  124. package/dist/foundations/utilities/use-id.d.ts +29 -0
  125. package/dist/foundations/utilities/use-id.d.ts.map +1 -0
  126. package/dist/foundations/utilities/use-id.js +1 -0
  127. package/dist/fx/fx.d.ts +30 -0
  128. package/dist/fx/fx.d.ts.map +1 -0
  129. package/dist/fx/fx.js +1 -0
  130. package/dist/fx/index.d.ts +5 -184
  131. package/dist/fx/index.d.ts.map +1 -0
  132. package/dist/fx/index.js +1 -1
  133. package/dist/fx/noop.d.ts +12 -0
  134. package/dist/fx/noop.d.ts.map +1 -0
  135. package/dist/fx/noop.js +1 -0
  136. package/dist/fx/timing.d.ts +155 -0
  137. package/dist/fx/timing.d.ts.map +1 -0
  138. package/dist/fx/timing.js +1 -0
  139. package/dist/index.d.ts +18 -37
  140. package/dist/index.d.ts.map +1 -0
  141. package/dist/index.js +1 -1
  142. package/dist/jsx/index.d.ts +4 -0
  143. package/dist/jsx/index.d.ts.map +1 -0
  144. package/dist/jsx/index.js +1 -0
  145. package/dist/jsx/jsx-dev-runtime.d.ts +4 -0
  146. package/dist/jsx/jsx-dev-runtime.d.ts.map +1 -0
  147. package/dist/jsx/jsx-runtime.d.ts +10 -0
  148. package/dist/jsx/jsx-runtime.d.ts.map +1 -0
  149. package/dist/{types-BTT0Fc9S.d.ts → jsx/types.d.ts} +6 -3
  150. package/dist/jsx/types.d.ts.map +1 -0
  151. package/dist/jsx/types.js +1 -0
  152. package/dist/jsx/utils.d.ts +4 -0
  153. package/dist/jsx/utils.d.ts.map +1 -0
  154. package/dist/jsx/utils.js +1 -0
  155. package/dist/jsx-dev-runtime.js +1 -1
  156. package/dist/jsx-runtime.js +1 -1
  157. package/dist/node_modules/esbuild/lib/main.js +65 -0
  158. package/dist/renderer/cleanup.d.ts +25 -0
  159. package/dist/renderer/cleanup.d.ts.map +1 -0
  160. package/dist/renderer/cleanup.js +1 -0
  161. package/dist/renderer/dom.d.ts +44 -0
  162. package/dist/renderer/dom.d.ts.map +1 -0
  163. package/dist/renderer/dom.js +1 -0
  164. package/dist/renderer/evaluate.d.ts +4 -0
  165. package/dist/renderer/evaluate.d.ts.map +1 -0
  166. package/dist/renderer/evaluate.js +1 -0
  167. package/dist/renderer/fastpath.d.ts +7 -0
  168. package/dist/renderer/fastpath.d.ts.map +1 -0
  169. package/dist/renderer/fastpath.js +1 -0
  170. package/dist/renderer/index.d.ts +6 -0
  171. package/dist/renderer/index.d.ts.map +1 -0
  172. package/dist/renderer/index.js +1 -0
  173. package/dist/renderer/keyed.d.ts +23 -0
  174. package/dist/renderer/keyed.d.ts.map +1 -0
  175. package/dist/renderer/keyed.js +1 -0
  176. package/dist/renderer/reconcile.d.ts +88 -0
  177. package/dist/renderer/reconcile.d.ts.map +1 -0
  178. package/dist/renderer/reconcile.js +1 -0
  179. package/dist/renderer/types.d.ts +3 -0
  180. package/dist/renderer/types.d.ts.map +1 -0
  181. package/dist/renderer/types.js +1 -0
  182. package/dist/renderer/utils.d.ts +63 -0
  183. package/dist/renderer/utils.d.ts.map +1 -0
  184. package/dist/renderer/utils.js +1 -0
  185. package/dist/resources/index.d.ts +7 -22
  186. package/dist/resources/index.d.ts.map +1 -0
  187. package/dist/resources/index.js +1 -1
  188. package/dist/router/index.d.ts +8 -87
  189. package/dist/router/index.d.ts.map +1 -0
  190. package/dist/router/index.js +1 -1
  191. package/dist/router/match.d.ts +22 -0
  192. package/dist/router/match.d.ts.map +1 -0
  193. package/dist/router/match.js +1 -0
  194. package/dist/router/navigate.d.ts +20 -0
  195. package/dist/router/navigate.d.ts.map +1 -0
  196. package/dist/router/navigate.js +1 -0
  197. package/dist/router/route.d.ts +52 -0
  198. package/dist/router/route.d.ts.map +1 -0
  199. package/dist/router/route.js +1 -0
  200. package/dist/runtime/component.d.ts +123 -0
  201. package/dist/runtime/component.d.ts.map +1 -0
  202. package/dist/runtime/component.js +1 -0
  203. package/dist/runtime/context.d.ts +80 -0
  204. package/dist/runtime/context.d.ts.map +1 -0
  205. package/dist/runtime/context.js +1 -0
  206. package/dist/runtime/derive.d.ts +7 -0
  207. package/dist/runtime/derive.d.ts.map +1 -0
  208. package/dist/runtime/derive.js +1 -0
  209. package/dist/runtime/dev-namespace.d.ts +31 -0
  210. package/dist/runtime/dev-namespace.d.ts.map +1 -0
  211. package/dist/runtime/dev-namespace.js +1 -0
  212. package/dist/runtime/events.d.ts +52 -0
  213. package/dist/runtime/events.d.ts.map +1 -0
  214. package/dist/runtime/events.js +1 -0
  215. package/dist/runtime/execution-model.d.ts +4 -0
  216. package/dist/runtime/execution-model.d.ts.map +1 -0
  217. package/dist/runtime/execution-model.js +1 -0
  218. package/dist/runtime/fastlane.d.ts +27 -0
  219. package/dist/runtime/fastlane.d.ts.map +1 -0
  220. package/dist/runtime/fastlane.js +1 -0
  221. package/dist/runtime/for.d.ts +52 -0
  222. package/dist/runtime/for.d.ts.map +1 -0
  223. package/dist/runtime/for.js +1 -0
  224. package/dist/runtime/hydration.d.ts +25 -0
  225. package/dist/runtime/hydration.d.ts.map +1 -0
  226. package/dist/runtime/operations.d.ts +39 -0
  227. package/dist/runtime/operations.d.ts.map +1 -0
  228. package/dist/runtime/operations.js +1 -0
  229. package/dist/runtime/resource-cell.d.ts +35 -0
  230. package/dist/runtime/resource-cell.d.ts.map +1 -0
  231. package/dist/runtime/resource-cell.js +1 -0
  232. package/dist/runtime/scheduler.d.ts +48 -0
  233. package/dist/runtime/scheduler.d.ts.map +1 -0
  234. package/dist/runtime/scheduler.js +1 -0
  235. package/dist/runtime/snapshot.d.ts +25 -0
  236. package/dist/runtime/snapshot.d.ts.map +1 -0
  237. package/dist/runtime/ssr-bridge.d.ts +10 -0
  238. package/dist/runtime/ssr-bridge.d.ts.map +1 -0
  239. package/dist/runtime/ssr-bridge.js +1 -0
  240. package/dist/runtime/state.d.ts +56 -0
  241. package/dist/runtime/state.d.ts.map +1 -0
  242. package/dist/runtime/state.js +1 -0
  243. package/dist/ssr/attrs.d.ts +26 -0
  244. package/dist/ssr/attrs.d.ts.map +1 -0
  245. package/dist/ssr/attrs.js +1 -0
  246. package/dist/ssr/context.d.ts +47 -0
  247. package/dist/ssr/context.d.ts.map +1 -0
  248. package/dist/ssr/context.js +1 -0
  249. package/dist/ssr/create-ssr.d.ts +19 -0
  250. package/dist/ssr/create-ssr.d.ts.map +1 -0
  251. package/dist/ssr/errors.d.ts +6 -0
  252. package/dist/ssr/errors.d.ts.map +1 -0
  253. package/dist/ssr/errors.js +1 -0
  254. package/dist/ssr/escape.d.ts +38 -0
  255. package/dist/ssr/escape.d.ts.map +1 -0
  256. package/dist/ssr/escape.js +1 -0
  257. package/dist/ssr/index.d.ts +18 -94
  258. package/dist/ssr/index.d.ts.map +1 -0
  259. package/dist/ssr/index.js +1 -1
  260. package/dist/ssr/render-keys.d.ts +39 -0
  261. package/dist/ssr/render-keys.d.ts.map +1 -0
  262. package/dist/ssr/render-keys.js +1 -0
  263. package/dist/ssr/sink.d.ts +23 -0
  264. package/dist/ssr/sink.d.ts.map +1 -0
  265. package/dist/ssr/sink.js +1 -0
  266. package/dist/ssr/stream-render.d.ts +7 -0
  267. package/dist/ssr/stream-render.d.ts.map +1 -0
  268. package/dist/ssr/stream-render.js +1 -0
  269. package/dist/ssr/types.d.ts +21 -0
  270. package/dist/ssr/types.d.ts.map +1 -0
  271. package/dist/vite/index.js +3 -1
  272. package/package.json +11 -10
  273. package/dist/chunk-37RC6ZT3.js +0 -1
  274. package/dist/chunk-3L6PFAJ3.js +0 -1
  275. package/dist/chunk-47D5SNYH.js +0 -1
  276. package/dist/chunk-4RTKQ7SC.js +0 -1
  277. package/dist/chunk-5PLQPS3O.js +0 -1
  278. package/dist/chunk-62D2TNHX.js +0 -1
  279. package/dist/chunk-BP2CKUO6.js +0 -1
  280. package/dist/chunk-D2JSJKCW.js +0 -1
  281. package/dist/chunk-EQ5S5GU4.js +0 -1
  282. package/dist/chunk-HGMOQ3I7.js +0 -1
  283. package/dist/chunk-HZKAD5DE.js +0 -1
  284. package/dist/chunk-ILZCMHZM.js +0 -2
  285. package/dist/chunk-NL44ANML.js +0 -2
  286. package/dist/chunk-YRY4OLQF.js +0 -1
  287. package/dist/component-AJMg1Gmv.d.ts +0 -177
  288. package/dist/jsx-dev-runtime.d.ts +0 -7
  289. package/dist/jsx-runtime.d.ts +0 -14
  290. package/dist/logger-NGZDJLVS.js +0 -1
  291. package/dist/main-EPE35NMW.js +0 -65
  292. package/dist/navigate-4VAVLF3A.js +0 -1
  293. package/dist/route-IVG3V65Y.js +0 -1
  294. package/dist/vite/index.d.ts +0 -17
@@ -1,186 +1,7 @@
1
1
  /**
2
- * Timing utilities — pure helpers for common async patterns
3
- * No framework coupling. No lifecycle awareness.
2
+ * Standard library — pure helpers for common patterns
3
+ * Zero framework coupling
4
4
  */
5
- interface DebounceOptions {
6
- leading?: boolean;
7
- trailing?: boolean;
8
- }
9
- interface ThrottleOptions {
10
- leading?: boolean;
11
- trailing?: boolean;
12
- }
13
- interface RetryOptions$1 {
14
- maxAttempts?: number;
15
- delayMs?: number;
16
- backoff?: (attemptIndex: number) => number;
17
- }
18
- /**
19
- * Debounce — delay execution, coalesce rapid calls
20
- *
21
- * Useful for: text input, resize, autosave
22
- *
23
- * @param fn Function to debounce
24
- * @param ms Delay in milliseconds
25
- * @param options trailing (default true), leading
26
- * @returns Debounced function with cancel() method
27
- *
28
- * @example
29
- * ```ts
30
- * const save = debounce((text) => api.save(text), 500);
31
- * input.addEventListener('input', (e) => save(e.target.value));
32
- * save.cancel(); // stop any pending execution
33
- * ```
34
- */
35
- declare function debounce<T extends (...args: unknown[]) => unknown>(fn: T, ms: number, options?: DebounceOptions): T & {
36
- cancel(): void;
37
- };
38
- /**
39
- * Throttle — rate-limit execution, keep first/last
40
- *
41
- * Useful for: scroll, mouse move, high-frequency events
42
- *
43
- * @param fn Function to throttle
44
- * @param ms Minimum interval between calls in milliseconds
45
- * @param options leading (default true), trailing (default true)
46
- * @returns Throttled function with cancel() method
47
- *
48
- * @example
49
- * ```ts
50
- * const handleScroll = throttle(updateUI, 100);
51
- * window.addEventListener('scroll', handleScroll);
52
- * handleScroll.cancel();
53
- * ```
54
- */
55
- declare function throttle<T extends (...args: unknown[]) => unknown>(fn: T, ms: number, options?: ThrottleOptions): T & {
56
- cancel(): void;
57
- };
58
- /**
59
- * Once — guard against double execution
60
- *
61
- * Useful for: init logic, event safety
62
- *
63
- * @param fn Function to call at most once
64
- * @returns Function that executes fn only on first call
65
- *
66
- * @example
67
- * ```ts
68
- * const init = once(setup);
69
- * init(); // runs
70
- * init(); // does nothing
71
- * init(); // does nothing
72
- * ```
73
- */
74
- declare function once<T extends (...args: unknown[]) => unknown>(fn: T): T;
75
- /**
76
- * Defer — schedule on microtask queue
77
- *
78
- * Useful for: run-after-current-stack logic
79
- * More reliable than setTimeout(..., 0)
80
- *
81
- * @param fn Function to defer
82
- *
83
- * @example
84
- * ```ts
85
- * defer(() => update()); // runs after current stack, before next macrotask
86
- * ```
87
- */
88
- declare function defer(fn: () => void): void;
89
- /**
90
- * RAF — coalesce multiple updates into single frame
91
- *
92
- * Useful for: animation, layout work, render updates
93
- *
94
- * @param fn Function to schedule on next animation frame
95
- * @returns Function that schedules fn on requestAnimationFrame
96
- *
97
- * @example
98
- * ```ts
99
- * const update = raf(render);
100
- * update(); // schedules on next frame
101
- * update(); // same frame, no duplicate
102
- * ```
103
- */
104
- declare function raf<T extends (...args: unknown[]) => unknown>(fn: T): T;
105
- /**
106
- * Idle — schedule low-priority work
107
- *
108
- * Useful for: background prep, non-urgent updates
109
- * Falls back to setTimeout if requestIdleCallback unavailable
110
- *
111
- * @param fn Function to call when idle
112
- * @param options timeout for fallback
113
- *
114
- * @example
115
- * ```ts
116
- * idle(() => prefetchData());
117
- * ```
118
- */
119
- declare function idle(fn: () => void, options?: {
120
- timeout?: number;
121
- }): void;
122
- /**
123
- * Timeout — Promise-based delay
124
- *
125
- * Useful for: readable async code, waiting between retries
126
- *
127
- * @param ms Milliseconds to wait
128
- * @returns Promise that resolves after delay
129
- *
130
- * @example
131
- * ```ts
132
- * await timeout(300);
133
- * console.log('300ms later');
134
- * ```
135
- */
136
- declare function timeout(ms: number): Promise<void>;
137
- /**
138
- * Retry — attempt function with backoff
139
- *
140
- * Useful for: network calls, transient failures
141
- *
142
- * @param fn Async function to retry
143
- * @param options maxAttempts, delayMs, backoff function
144
- * @returns Promise with final result or error
145
- *
146
- * @example
147
- * ```ts
148
- * const data = await retry(() => fetch(url), {
149
- * maxAttempts: 3,
150
- * delayMs: 100,
151
- * });
152
- * ```
153
- */
154
- declare function retry<T>(fn: () => Promise<T>, options?: RetryOptions$1): Promise<T>;
155
-
156
- type CancelFn = () => void;
157
- declare function debounceEvent(ms: number, handler: EventListener, options?: {
158
- leading?: boolean;
159
- trailing?: boolean;
160
- }): EventListener & {
161
- cancel(): void;
162
- flush(): void;
163
- };
164
- declare function throttleEvent(ms: number, handler: EventListener, options?: {
165
- leading?: boolean;
166
- trailing?: boolean;
167
- }): EventListener & {
168
- cancel(): void;
169
- };
170
- declare function rafEvent(handler: EventListener): EventListener & {
171
- cancel(): void;
172
- };
173
- declare function scheduleTimeout(ms: number, fn: () => void): CancelFn;
174
- declare function scheduleIdle(fn: () => void, options?: {
175
- timeout?: number;
176
- }): CancelFn;
177
- interface RetryOptions {
178
- maxAttempts?: number;
179
- delayMs?: number;
180
- backoff?: (attemptIndex: number) => number;
181
- }
182
- declare function scheduleRetry<T>(fn: () => Promise<T>, options?: RetryOptions): {
183
- cancel(): void;
184
- };
185
-
186
- export { type DebounceOptions, type RetryOptions$1 as RetryOptions, type ThrottleOptions, debounce, debounceEvent, defer, idle, once, raf, rafEvent, retry, scheduleIdle, scheduleRetry, scheduleTimeout, throttle, throttleEvent, timeout };
5
+ export { debounce, throttle, once, defer, raf, idle, timeout, retry, type DebounceOptions, type ThrottleOptions, type RetryOptions, } from './timing';
6
+ export { debounceEvent, throttleEvent, rafEvent, scheduleTimeout, scheduleIdle, scheduleRetry, } from './fx';
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/fx/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACL,QAAQ,EACR,QAAQ,EACR,IAAI,EACJ,KAAK,EACL,GAAG,EACH,IAAI,EACJ,OAAO,EACP,KAAK,EACL,KAAK,eAAe,EACpB,KAAK,eAAe,EACpB,KAAK,YAAY,GAClB,MAAM,UAAU,CAAC;AAElB,OAAO,EACL,aAAa,EACb,aAAa,EACb,QAAQ,EACR,eAAe,EACf,YAAY,EACZ,aAAa,GACd,MAAM,MAAM,CAAC"}
package/dist/fx/index.js CHANGED
@@ -1 +1 @@
1
- import {j,b as b$1}from'../chunk-ILZCMHZM.js';import {a}from'../chunk-HGMOQ3I7.js';import'../chunk-BP2CKUO6.js';import'../chunk-37RC6ZT3.js';import'../chunk-62D2TNHX.js';function k(l,t,n){let e=null,{leading:r=false,trailing:i=true}=n||{},o=null,u=null,a=0,s=function(...f){let c=Date.now();o=f,u=this,e!==null&&clearTimeout(e),r&&c-a>=t&&(l.apply(this,f),a=c),i&&(e=setTimeout(()=>{l.apply(u,o),e=null,a=Date.now();},t));};return s.cancel=()=>{e!==null&&(clearTimeout(e),e=null);},s}function E(l,t,n){let e=0,r=null,{leading:i=true,trailing:o=true}=n||{},u=null,a=null,s=function(...f){let c=Date.now();u=f,a=this,i&&c-e>=t?(l.apply(this,f),e=c,r!==null&&(clearTimeout(r),r=null)):!i&&e===0&&(e=c),o&&r===null&&(r=setTimeout(()=>{l.apply(a,u),e=Date.now(),r=null;},t-(c-e)));};return s.cancel=()=>{r!==null&&(clearTimeout(r),r=null);},s}function x(l){let t=false,n;return((...e)=>(t||(t=true,n=l(...e)),n))}function g(l){Promise.resolve().then(l);}function F(l){let t=null,n=null,e=null;return function(...r){n=r,e=this,t===null&&(t=requestAnimationFrame(()=>{l.apply(e,n),t=null;}));}}function I(l,t){typeof requestIdleCallback<"u"?requestIdleCallback(l,t?{timeout:t.timeout}:void 0):Promise.resolve().then(()=>{setTimeout(l,0);});}function b(l){return new Promise(t=>setTimeout(t,l))}async function R(l,t){let{maxAttempts:n=3,delayMs:e=100,backoff:r=o=>e*Math.pow(2,o)}=t||{},i=null;for(let o=0;o<n;o++)try{return await l()}catch(u){if(i=u,o<n-1){let a=r(o);await b(a);}}throw i||new Error("Retry failed")}var h=Object.assign(l=>{},{cancel(){}}),y=Object.assign(l=>{},{cancel(){},flush(){}});function p(){if(j()!==null)throw new Error("[Askr] calling FX handler during render is not allowed. Move calls to event handlers or effects.")}function d(l){b$1.enqueue(()=>{try{l();}catch(t){a.error("[Askr] FX handler error:",t);}});}function C(l,t,n){let{leading:e=false,trailing:r=true}=n||{},i=j();if(i&&i.ssr)return y;let o=null,u=null,a=0,s=function(f){p();let c=Date.now();u=f,o!==null&&(clearTimeout(o),o=null),e&&c-a>=l&&(d(()=>t.call(null,f)),a=c),r&&(o=setTimeout(()=>{u&&d(()=>t.call(null,u)),o=null,a=Date.now();},l));};return s.cancel=()=>{o!==null&&(clearTimeout(o),o=null),u=null;},s.flush=()=>{if(o!==null){clearTimeout(o);let f=u;u=null,o=null,f&&d(()=>t.call(null,f));}},i&&i.cleanupFns.push(()=>{s.cancel();}),s}function A(l,t,n){let{leading:e=true,trailing:r=true}=n||{},i=j();if(i&&i.ssr)return h;let o=0,u=null,a=null,s=function(f){p();let c=Date.now();if(a=f,e&&c-o>=l?(d(()=>t.call(null,f)),o=c,u!==null&&(clearTimeout(u),u=null)):!e&&o===0&&(o=c),r&&u===null){let w=l-(c-o);u=setTimeout(()=>{a&&d(()=>t.call(null,a)),o=Date.now(),u=null;},Math.max(0,w));}};return s.cancel=()=>{u!==null&&(clearTimeout(u),u=null),a=null;},i&&i.cleanupFns.push(()=>s.cancel()),s}function L(l){let t=j();if(t&&t.ssr)return h;let n=null,e=null,r=()=>{n=(typeof requestAnimationFrame<"u"?requestAnimationFrame:u=>setTimeout(()=>u(Date.now()),16))(()=>{if(n=null,e){let u=e;e=null,d(()=>l.call(null,u));}});},i=function(o){p(),e=o,n===null&&r();};return i.cancel=()=>{n!==null&&(typeof cancelAnimationFrame<"u"&&typeof n=="number"?cancelAnimationFrame(n):clearTimeout(n),n=null),e=null;},t&&t.cleanupFns.push(()=>i.cancel()),i}function q(l,t){p();let n=j();if(n&&n.ssr)return ()=>{};let e=setTimeout(()=>{e=null,d(t);},l),r=()=>{e!==null&&(clearTimeout(e),e=null);};return n&&n.cleanupFns.push(r),r}function D(l,t){p();let n=j();if(n&&n.ssr)return ()=>{};let e=null,r=false;typeof requestIdleCallback<"u"?(r=true,e=requestIdleCallback(()=>{e=null,d(l);},t)):e=setTimeout(()=>{e=null,d(l);},0);let i=()=>{e!==null&&(r&&typeof cancelIdleCallback<"u"&&typeof e=="number"?cancelIdleCallback(e):clearTimeout(e),e=null);};return n&&n.cleanupFns.push(i),i}function O(l,t){p();let n=j();if(n&&n.ssr)return {cancel:()=>{}};let{maxAttempts:e=3,delayMs:r=100,backoff:i=s=>r*Math.pow(2,s)}=t||{},o=false,u=s=>{o||b$1.enqueue(()=>{if(o)return;l().then(()=>{},()=>{if(!o&&s+1<e){let c=i(s);setTimeout(()=>{u(s+1);},c);}}).catch(c=>{a.error("[Askr] scheduleRetry error:",c);});});};u(0);let a$1=()=>{o=true;};return n&&n.cleanupFns.push(a$1),{cancel:a$1}}export{k as debounce,C as debounceEvent,g as defer,I as idle,x as once,F as raf,L as rafEvent,R as retry,D as scheduleIdle,O as scheduleRetry,q as scheduleTimeout,E as throttle,A as throttleEvent,b as timeout};
1
+ import{debounce as r,defer as o,idle as d,once as l,raf as u,retry as c,throttle as n,timeout as f}from"./timing.js";import{debounceEvent as m,rafEvent as i,scheduleIdle as s,scheduleRetry as v,scheduleTimeout as E,throttleEvent as a}from"./fx.js";export{r as debounce,m as debounceEvent,o as defer,d as idle,l as once,u as raf,i as rafEvent,c as retry,s as scheduleIdle,v as scheduleRetry,E as scheduleTimeout,n as throttle,a as throttleEvent,f as timeout};
@@ -0,0 +1,12 @@
1
+ export declare const noop: () => void;
2
+ export declare const noopEventListener: EventListener & {
3
+ cancel(): void;
4
+ };
5
+ export declare const noopEventListenerWithFlush: EventListener & {
6
+ cancel(): void;
7
+ flush(): void;
8
+ };
9
+ export declare const noopCancel: {
10
+ cancel(): void;
11
+ };
12
+ //# sourceMappingURL=noop.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"noop.d.ts","sourceRoot":"","sources":["../../src/fx/noop.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,IAAI,EAAE,MAAM,IAAe,CAAC;AAEzC,eAAO,MAAM,iBAAiB,EAAE,aAAa,GAAG;IAAE,MAAM,IAAI,IAAI,CAAA;CACX,CAAC;AAEtD,eAAO,MAAM,0BAA0B,EAAE,aAAa,GAAG;IACvD,MAAM,IAAI,IAAI,CAAC;IACf,KAAK,IAAI,IAAI,CAAC;CACmD,CAAC;AAEpE,eAAO,MAAM,UAAU,EAAE;IAAE,MAAM,IAAI,IAAI,CAAA;CAAoB,CAAC"}
@@ -0,0 +1 @@
1
+ const e=()=>{},c=Object.assign(n=>{},{cancel(){}}),o=Object.assign(n=>{},{cancel(){},flush(){}}),s={cancel(){}};export{e as noop,s as noopCancel,c as noopEventListener,o as noopEventListenerWithFlush};
@@ -0,0 +1,155 @@
1
+ /**
2
+ * Timing utilities — pure helpers for common async patterns
3
+ * No framework coupling. No lifecycle awareness.
4
+ */
5
+ export interface DebounceOptions {
6
+ leading?: boolean;
7
+ trailing?: boolean;
8
+ }
9
+ export interface ThrottleOptions {
10
+ leading?: boolean;
11
+ trailing?: boolean;
12
+ }
13
+ export interface RetryOptions {
14
+ maxAttempts?: number;
15
+ delayMs?: number;
16
+ backoff?: (attemptIndex: number) => number;
17
+ }
18
+ /**
19
+ * Debounce — delay execution, coalesce rapid calls
20
+ *
21
+ * Useful for: text input, resize, autosave
22
+ *
23
+ * @param fn Function to debounce
24
+ * @param ms Delay in milliseconds
25
+ * @param options trailing (default true), leading
26
+ * @returns Debounced function with cancel() method
27
+ *
28
+ * @example
29
+ * ```ts
30
+ * const save = debounce((text) => api.save(text), 500);
31
+ * input.addEventListener('input', (e) => save(e.target.value));
32
+ * save.cancel(); // stop any pending execution
33
+ * ```
34
+ */
35
+ export declare function debounce<T extends (...args: unknown[]) => unknown>(fn: T, ms: number, options?: DebounceOptions): T & {
36
+ cancel(): void;
37
+ };
38
+ /**
39
+ * Throttle — rate-limit execution, keep first/last
40
+ *
41
+ * Useful for: scroll, mouse move, high-frequency events
42
+ *
43
+ * @param fn Function to throttle
44
+ * @param ms Minimum interval between calls in milliseconds
45
+ * @param options leading (default true), trailing (default true)
46
+ * @returns Throttled function with cancel() method
47
+ *
48
+ * @example
49
+ * ```ts
50
+ * const handleScroll = throttle(updateUI, 100);
51
+ * window.addEventListener('scroll', handleScroll);
52
+ * handleScroll.cancel();
53
+ * ```
54
+ */
55
+ export declare function throttle<T extends (...args: unknown[]) => unknown>(fn: T, ms: number, options?: ThrottleOptions): T & {
56
+ cancel(): void;
57
+ };
58
+ /**
59
+ * Once — guard against double execution
60
+ *
61
+ * Useful for: init logic, event safety
62
+ *
63
+ * @param fn Function to call at most once
64
+ * @returns Function that executes fn only on first call
65
+ *
66
+ * @example
67
+ * ```ts
68
+ * const init = once(setup);
69
+ * init(); // runs
70
+ * init(); // does nothing
71
+ * init(); // does nothing
72
+ * ```
73
+ */
74
+ export declare function once<T extends (...args: unknown[]) => unknown>(fn: T): T;
75
+ /**
76
+ * Defer — schedule on microtask queue
77
+ *
78
+ * Useful for: run-after-current-stack logic
79
+ * More reliable than setTimeout(..., 0)
80
+ *
81
+ * @param fn Function to defer
82
+ *
83
+ * @example
84
+ * ```ts
85
+ * defer(() => update()); // runs after current stack, before next macrotask
86
+ * ```
87
+ */
88
+ export declare function defer(fn: () => void): void;
89
+ /**
90
+ * RAF — coalesce multiple updates into single frame
91
+ *
92
+ * Useful for: animation, layout work, render updates
93
+ *
94
+ * @param fn Function to schedule on next animation frame
95
+ * @returns Function that schedules fn on requestAnimationFrame
96
+ *
97
+ * @example
98
+ * ```ts
99
+ * const update = raf(render);
100
+ * update(); // schedules on next frame
101
+ * update(); // same frame, no duplicate
102
+ * ```
103
+ */
104
+ export declare function raf<T extends (...args: unknown[]) => unknown>(fn: T): T;
105
+ /**
106
+ * Idle — schedule low-priority work
107
+ *
108
+ * Useful for: background prep, non-urgent updates
109
+ * Falls back to setTimeout if requestIdleCallback unavailable
110
+ *
111
+ * @param fn Function to call when idle
112
+ * @param options timeout for fallback
113
+ *
114
+ * @example
115
+ * ```ts
116
+ * idle(() => prefetchData());
117
+ * ```
118
+ */
119
+ export declare function idle(fn: () => void, options?: {
120
+ timeout?: number;
121
+ }): void;
122
+ /**
123
+ * Timeout — Promise-based delay
124
+ *
125
+ * Useful for: readable async code, waiting between retries
126
+ *
127
+ * @param ms Milliseconds to wait
128
+ * @returns Promise that resolves after delay
129
+ *
130
+ * @example
131
+ * ```ts
132
+ * await timeout(300);
133
+ * console.log('300ms later');
134
+ * ```
135
+ */
136
+ export declare function timeout(ms: number): Promise<void>;
137
+ /**
138
+ * Retry — attempt function with backoff
139
+ *
140
+ * Useful for: network calls, transient failures
141
+ *
142
+ * @param fn Async function to retry
143
+ * @param options maxAttempts, delayMs, backoff function
144
+ * @returns Promise with final result or error
145
+ *
146
+ * @example
147
+ * ```ts
148
+ * const data = await retry(() => fetch(url), {
149
+ * maxAttempts: 3,
150
+ * delayMs: 100,
151
+ * });
152
+ * ```
153
+ */
154
+ export declare function retry<T>(fn: () => Promise<T>, options?: RetryOptions): Promise<T>;
155
+ //# sourceMappingURL=timing.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"timing.d.ts","sourceRoot":"","sources":["../../src/fx/timing.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,WAAW,eAAe;IAC9B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,eAAe;IAC9B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,YAAY;IAC3B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,MAAM,CAAC;CAC5C;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,QAAQ,CAAC,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,OAAO,EAChE,EAAE,EAAE,CAAC,EACL,EAAE,EAAE,MAAM,EACV,OAAO,CAAC,EAAE,eAAe,GACxB,CAAC,GAAG;IAAE,MAAM,IAAI,IAAI,CAAA;CAAE,CAuCxB;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,QAAQ,CAAC,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,OAAO,EAChE,EAAE,EAAE,CAAC,EACL,EAAE,EAAE,MAAM,EACV,OAAO,CAAC,EAAE,eAAe,GACxB,CAAC,GAAG;IAAE,MAAM,IAAI,IAAI,CAAA;CAAE,CA4CxB;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,IAAI,CAAC,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,OAAO,EAAE,EAAE,EAAE,CAAC,GAAG,CAAC,CAWxE;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,KAAK,CAAC,EAAE,EAAE,MAAM,IAAI,GAAG,IAAI,CAE1C;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,GAAG,CAAC,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,OAAO,EAAE,EAAE,EAAE,CAAC,GAAG,CAAC,CAiBvE;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,IAAI,CAAC,EAAE,EAAE,MAAM,IAAI,EAAE,OAAO,CAAC,EAAE;IAAE,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CASzE;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,OAAO,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAEjD;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAsB,KAAK,CAAC,CAAC,EAC3B,EAAE,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,EACpB,OAAO,CAAC,EAAE,YAAY,GACrB,OAAO,CAAC,CAAC,CAAC,CAsBZ"}
@@ -0,0 +1 @@
1
+ function d(e,l,i){let t=null;const{leading:n=!1,trailing:o=!0}=i||{};let u=null,a=null,r=0;const c=function(...f){const s=Date.now();u=f,a=this,t!==null&&clearTimeout(t),n&&s-r>=l&&(e.apply(this,f),r=s),o&&(t=setTimeout(()=>{e.apply(a,u),t=null,r=Date.now()},l))};return c.cancel=()=>{t!==null&&(clearTimeout(t),t=null)},c}function h(e,l,i){let t=0,n=null;const{leading:o=!0,trailing:u=!0}=i||{};let a=null,r=null;const c=function(...f){const s=Date.now();a=f,r=this,o&&s-t>=l?(e.apply(this,f),t=s,n!==null&&(clearTimeout(n),n=null)):!o&&t===0&&(t=s),u&&n===null&&(n=setTimeout(()=>{e.apply(r,a),t=Date.now(),n=null},l-(s-t)))};return c.cancel=()=>{n!==null&&(clearTimeout(n),n=null)},c}function T(e){let l=!1,i;return((...t)=>(l||(l=!0,i=e(...t)),i))}function p(e){Promise.resolve().then(e)}function y(e){let l=null,i=null,t=null;return function(...n){i=n,t=this,l===null&&(l=requestAnimationFrame(()=>{e.apply(t,i),l=null}))}}function w(e,l){typeof requestIdleCallback<"u"?requestIdleCallback(e,l?{timeout:l.timeout}:void 0):Promise.resolve().then(()=>{setTimeout(e,0)})}function m(e){return new Promise(l=>setTimeout(l,e))}async function b(e,l){const{maxAttempts:i=3,delayMs:t=100,backoff:n=u=>t*Math.pow(2,u)}=l||{};let o=null;for(let u=0;u<i;u++)try{return await e()}catch(a){if(o=a,u<i-1){const r=n(u);await m(r)}}throw o||new Error("Retry failed")}export{d as debounce,p as defer,w as idle,T as once,y as raf,b as retry,h as throttle,m as timeout};
package/dist/index.d.ts CHANGED
@@ -1,39 +1,20 @@
1
- import { C as ComponentFunction } from './component-AJMg1Gmv.js';
2
- export { S as State, s as state } from './component-AJMg1Gmv.js';
3
- import { R as Route } from './router-DaGtH1Sq.js';
4
- export { For, ForOptions } from './for/index.js';
5
- export { P as Props } from './jsx-CPjsGyEg.js';
6
-
7
1
  /**
8
- * App bootstrap and mount
2
+ * Askr: Actor-backed deterministic UI framework
3
+ *
4
+ * Public API surface — autopilot-safe core only.
5
+ *
6
+ * Root exports are intentionally minimal and free of timing/lifecycle nuance.
7
+ * Lower tiers are exposed via explicit subpaths:
8
+ * - askr/for (list iteration primitive)
9
+ * - askr/resources (async data policy)
10
+ * - askr/fx (timing / side effects)
9
11
  */
10
-
11
- type IslandConfig = {
12
- root: Element | string;
13
- component: ComponentFunction;
14
- cleanupStrict?: boolean;
15
- routes?: never;
16
- };
17
- type SPAConfig = {
18
- root: Element | string;
19
- routes: Route[];
20
- cleanupStrict?: boolean;
21
- component?: never;
22
- };
23
- /**
24
- * createIsland: Enhances existing DOM (no router, mounts once)
25
- */
26
- declare function createIsland(config: IslandConfig): void;
27
- /**
28
- * createSPA: Initializes router and mounts the app with provided route table
29
- */
30
- declare function createSPA(config: SPAConfig): Promise<void>;
31
-
32
- declare function derive<TOut>(fn: () => TOut): TOut | null;
33
- declare function derive<TIn, TOut>(source: {
34
- value: TIn | null;
35
- pending?: boolean;
36
- error?: Error | null;
37
- } | TIn | (() => TIn), map: (value: TIn) => TOut): TOut | null;
38
-
39
- export { type IslandConfig, type SPAConfig, createIsland, createSPA, derive };
12
+ export { createSPA, createIsland } from './boot';
13
+ export type { SPAConfig, IslandConfig } from './boot';
14
+ export { state } from './runtime/state';
15
+ export type { State } from './runtime/state';
16
+ export { derive } from './runtime/derive';
17
+ export { For } from './for';
18
+ export type { Props } from './common/props';
19
+ export { isEventDelegationEnabled, disableEventDelegation, enableEventDelegation, setGlobalDelegationContainer, } from './runtime/events';
20
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AACjD,YAAY,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAGtD,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACxC,YAAY,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAG1C,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAG5B,YAAY,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAG5C,OAAO,EACL,wBAAwB,EACxB,sBAAsB,EACtB,qBAAqB,EACrB,4BAA4B,GAC7B,MAAM,kBAAkB,CAAC"}
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- export{a as createIsland,b as createSPA,c as derive}from'./chunk-47D5SNYH.js';export{a as For}from'./chunk-5PLQPS3O.js';export{a as state}from'./chunk-3L6PFAJ3.js';import'./chunk-4RTKQ7SC.js';import'./chunk-D2JSJKCW.js';import'./chunk-ILZCMHZM.js';import'./chunk-HGMOQ3I7.js';import'./chunk-BP2CKUO6.js';import'./chunk-37RC6ZT3.js';import'./chunk-62D2TNHX.js';
1
+ import{createIsland as r,createSPA as a}from"./boot/index.js";import{state as l}from"./runtime/state.js";import{derive as m}from"./runtime/derive.js";import"./for/index.js";import{disableEventDelegation as f,enableEventDelegation as s,isEventDelegationEnabled as x,setGlobalDelegationContainer as b}from"./runtime/events.js";import{For as g}from"./for/for.js";export{g as For,r as createIsland,a as createSPA,m as derive,f as disableEventDelegation,s as enableEventDelegation,x as isEventDelegationEnabled,b as setGlobalDelegationContainer,l as state};
@@ -0,0 +1,4 @@
1
+ export { Fragment, ELEMENT_TYPE } from './types';
2
+ export type { JSXElement } from './types';
3
+ export { isElement, cloneElement } from './utils';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/jsx/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACjD,YAAY,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAE1C,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC"}
@@ -0,0 +1 @@
1
+ import"./types.js";import{cloneElement as t,isElement as l}from"./utils.js";export{t as cloneElement,l as isElement};
@@ -0,0 +1,4 @@
1
+ import { Fragment, type JSXElement } from './types';
2
+ export declare function jsxDEV(type: unknown, props: Record<string, unknown> | null, key?: string | number): JSXElement;
3
+ export { Fragment };
4
+ //# sourceMappingURL=jsx-dev-runtime.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"jsx-dev-runtime.d.ts","sourceRoot":"","sources":["../../src/jsx/jsx-dev-runtime.ts"],"names":[],"mappings":"AAKA,OAAO,EAAgB,QAAQ,EAAE,KAAK,UAAU,EAAE,MAAM,SAAS,CAAC;AAElE,wBAAgB,MAAM,CACpB,IAAI,EAAE,OAAO,EACb,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,EACrC,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM,GACpB,UAAU,CAOZ;AAGD,OAAO,EAAE,QAAQ,EAAE,CAAC"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * JSX runtime factory
3
+ * Same element shape as production runtime.
4
+ */
5
+ import { Fragment, type JSXElement } from './types';
6
+ export declare function jsxDEV(type: unknown, props: Record<string, unknown> | null, key?: string | number): JSXElement;
7
+ export declare function jsx(type: unknown, props: Record<string, unknown> | null, key?: string | number): JSXElement;
8
+ export declare function jsxs(type: unknown, props: Record<string, unknown> | null, key?: string | number): JSXElement;
9
+ export { Fragment };
10
+ //# sourceMappingURL=jsx-runtime.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"jsx-runtime.d.ts","sourceRoot":"","sources":["../../src/jsx/jsx-runtime.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAgB,QAAQ,EAAE,KAAK,UAAU,EAAE,MAAM,SAAS,CAAC;AAElE,wBAAgB,MAAM,CACpB,IAAI,EAAE,OAAO,EACb,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,EACrC,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM,GACpB,UAAU,CAOZ;AAGD,wBAAgB,GAAG,CACjB,IAAI,EAAE,OAAO,EACb,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,EACrC,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM,cAGtB;AAED,wBAAgB,IAAI,CAClB,IAAI,EAAE,OAAO,EACb,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,EACrC,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM,cAGtB;AAGD,OAAO,EAAE,QAAQ,EAAE,CAAC"}
@@ -1,5 +1,3 @@
1
- import { J as JSXElement, P as Props } from './jsx-CPjsGyEg.js';
2
-
3
1
  /**
4
2
  * JSX type definitions
5
3
  *
@@ -9,7 +7,10 @@ import { J as JSXElement, P as Props } from './jsx-CPjsGyEg.js';
9
7
  * - Slot / cloneElement
10
8
  * - the reconciler
11
9
  */
12
-
10
+ import type { Props } from '../common/props';
11
+ import type { JSXElement } from '../common/jsx';
12
+ export { ELEMENT_TYPE, Fragment } from '../common/jsx';
13
+ export type { JSXElement } from '../common/jsx';
13
14
  declare global {
14
15
  namespace JSX {
15
16
  interface Element extends JSXElement {
@@ -23,3 +24,5 @@ declare global {
23
24
  }
24
25
  }
25
26
  }
27
+ export {};
28
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/jsx/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAEhD,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACvD,YAAY,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAEhD,OAAO,CAAC,MAAM,CAAC;IAEb,UAAU,GAAG,CAAC;QAEZ,UAAU,OAAQ,SAAQ,UAAU;YAClC,QAAQ,CAAC,qBAAqB,CAAC,EAAE,KAAK,CAAC;SACxC;QAED,UAAU,iBAAiB;YACzB,CAAC,IAAI,EAAE,MAAM,GAAG,KAAK,CAAC;SACvB;QAED,UAAU,yBAAyB;YACjC,KAAK,EAAE,KAAK,CAAC;SACd;KACF;CACF;AAED,OAAO,EAAE,CAAC"}
@@ -0,0 +1 @@
1
+ import{ELEMENT_TYPE as e,Fragment as m}from"../common/jsx.js";export{e as ELEMENT_TYPE,m as Fragment};
@@ -0,0 +1,4 @@
1
+ import { JSXElement } from './types';
2
+ export declare function isElement(value: unknown): value is JSXElement;
3
+ export declare function cloneElement(element: JSXElement, props: Record<string, unknown>): JSXElement;
4
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/jsx/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,UAAU,EAAE,MAAM,SAAS,CAAC;AAEnD,wBAAgB,SAAS,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,UAAU,CAM7D;AAED,wBAAgB,YAAY,CAC1B,OAAO,EAAE,UAAU,EACnB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC7B,UAAU,CAKZ"}
@@ -0,0 +1 @@
1
+ import"./types.js";import{ELEMENT_TYPE as r}from"../common/jsx.js";function e(o){return typeof o=="object"&&o!==null&&o.$$typeof===r}function E(o,t){return{...o,props:{...o.props,...t}}}export{E as cloneElement,e as isElement};
@@ -1 +1 @@
1
- import {a}from'./chunk-37RC6ZT3.js';export{b as Fragment}from'./chunk-37RC6ZT3.js';import'./chunk-62D2TNHX.js';function m(o,r,p){return {$$typeof:a,type:o,props:r??{},key:p??null}}export{m as jsxDEV};
1
+ import"./jsx/types.js";import{ELEMENT_TYPE as p}from"./common/jsx.js";import{Fragment as i}from"./common/jsx.js";function n(r,o,t){return{$$typeof:p,type:r,props:o??{},key:t??null}}export{i as Fragment,n as jsxDEV};
@@ -1 +1 @@
1
- export{b as jsx,a as jsxDEV,c as jsxs}from'./chunk-BP2CKUO6.js';export{b as Fragment}from'./chunk-37RC6ZT3.js';import'./chunk-62D2TNHX.js';
1
+ import"./jsx/types.js";import{ELEMENT_TYPE as e}from"./common/jsx.js";import{Fragment as x}from"./common/jsx.js";function o(r,t,n){return{$$typeof:e,type:r,props:t??{},key:n??null}}function f(r,t,n){return o(r,t,n)}function i(r,t,n){return o(r,t,n)}export{x as Fragment,f as jsx,o as jsxDEV,i as jsxs};