@askrjs/askr 0.0.28 → 0.0.30

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 (457) hide show
  1. package/README.md +44 -172
  2. package/dist/_virtual/_rolldown/runtime.js +7 -0
  3. package/dist/bench/components/benchmark-row.d.ts +20 -0
  4. package/dist/bench/components/benchmark-row.d.ts.map +1 -0
  5. package/dist/bench/components/benchmark-row.js +42 -0
  6. package/dist/bench/components/benchmark-row.js.map +1 -0
  7. package/dist/bench/components/benchmark-table.js +25 -0
  8. package/dist/bench/components/benchmark-table.js.map +1 -0
  9. package/dist/benchmark.d.ts +22 -0
  10. package/dist/benchmark.d.ts.map +1 -0
  11. package/dist/benchmark.js +64 -1
  12. package/dist/benchmark.js.map +1 -0
  13. package/dist/bin/askr-ssg.d.ts +22 -26
  14. package/dist/bin/askr-ssg.d.ts.map +1 -1
  15. package/dist/bin/askr-ssg.js +149 -2
  16. package/dist/bin/askr-ssg.js.map +1 -0
  17. package/dist/boot/index.d.ts +64 -42
  18. package/dist/boot/index.d.ts.map +1 -1
  19. package/dist/boot/index.js +416 -2
  20. package/dist/boot/index.js.map +1 -0
  21. package/dist/common/component.d.ts +14 -13
  22. package/dist/common/component.d.ts.map +1 -1
  23. package/dist/common/control.d.ts +13 -0
  24. package/dist/common/control.d.ts.map +1 -0
  25. package/dist/common/control.js +14 -0
  26. package/dist/common/control.js.map +1 -0
  27. package/dist/common/env.js +47 -0
  28. package/dist/common/env.js.map +1 -0
  29. package/dist/common/jsx.d.ts +17 -15
  30. package/dist/common/jsx.d.ts.map +1 -1
  31. package/dist/common/jsx.js +8 -1
  32. package/dist/common/jsx.js.map +1 -0
  33. package/dist/common/props.d.ts +14 -11
  34. package/dist/common/props.d.ts.map +1 -1
  35. package/dist/common/router.d.ts +190 -32
  36. package/dist/common/router.d.ts.map +1 -1
  37. package/dist/common/ssr-errors.d.ts +6 -3
  38. package/dist/common/ssr-errors.d.ts.map +1 -1
  39. package/dist/common/ssr-errors.js +16 -1
  40. package/dist/common/ssr-errors.js.map +1 -0
  41. package/dist/common/ssr.d.ts +12 -9
  42. package/dist/common/ssr.d.ts.map +1 -1
  43. package/dist/common/vnode.d.ts +17 -15
  44. package/dist/common/vnode.d.ts.map +1 -1
  45. package/dist/common/vnode.js +10 -1
  46. package/dist/common/vnode.js.map +1 -0
  47. package/dist/components/link.d.ts +37 -25
  48. package/dist/components/link.d.ts.map +1 -1
  49. package/dist/components/link.js +64 -1
  50. package/dist/components/link.js.map +1 -0
  51. package/dist/control/case.d.ts +17 -0
  52. package/dist/control/case.d.ts.map +1 -0
  53. package/dist/control/case.js +69 -0
  54. package/dist/control/case.js.map +1 -0
  55. package/dist/control/for.d.ts +23 -0
  56. package/dist/control/for.d.ts.map +1 -0
  57. package/dist/control/for.js +62 -0
  58. package/dist/control/for.js.map +1 -0
  59. package/dist/control/index.d.ts +4 -0
  60. package/dist/control/index.js +4 -0
  61. package/dist/control/shared.js +20 -0
  62. package/dist/control/shared.js.map +1 -0
  63. package/dist/control/show.d.ts +14 -0
  64. package/dist/control/show.d.ts.map +1 -0
  65. package/dist/control/show.js +33 -0
  66. package/dist/control/show.js.map +1 -0
  67. package/dist/dev/invariant.js +29 -2
  68. package/dist/dev/invariant.js.map +1 -0
  69. package/dist/dev/logger.js +37 -1
  70. package/dist/dev/logger.js.map +1 -0
  71. package/dist/foundations/core.d.ts +15 -23
  72. package/dist/foundations/core.js +13 -1
  73. package/dist/foundations/icon/icon.d.ts +53 -0
  74. package/dist/foundations/icon/icon.d.ts.map +1 -0
  75. package/dist/foundations/icon/icon.js +88 -0
  76. package/dist/foundations/icon/icon.js.map +1 -0
  77. package/dist/foundations/icon/icon.types.d.ts +21 -0
  78. package/dist/foundations/icon/icon.types.d.ts.map +1 -0
  79. package/dist/foundations/index.d.ts +23 -3
  80. package/dist/foundations/index.js +22 -1
  81. package/dist/foundations/interactions/dismissable.d.ts +25 -17
  82. package/dist/foundations/interactions/dismissable.d.ts.map +1 -1
  83. package/dist/foundations/interactions/dismissable.js +26 -1
  84. package/dist/foundations/interactions/dismissable.js.map +1 -0
  85. package/dist/foundations/interactions/focusable.d.ts +13 -7
  86. package/dist/foundations/interactions/focusable.d.ts.map +1 -1
  87. package/dist/foundations/interactions/focusable.js +18 -1
  88. package/dist/foundations/interactions/focusable.js.map +1 -0
  89. package/dist/foundations/interactions/hoverable.d.ts +17 -10
  90. package/dist/foundations/interactions/hoverable.d.ts.map +1 -1
  91. package/dist/foundations/interactions/hoverable.js +15 -1
  92. package/dist/foundations/interactions/hoverable.js.map +1 -0
  93. package/dist/foundations/interactions/interaction-policy.d.ts +32 -78
  94. package/dist/foundations/interactions/interaction-policy.d.ts.map +1 -1
  95. package/dist/foundations/interactions/interaction-policy.js +122 -1
  96. package/dist/foundations/interactions/interaction-policy.js.map +1 -0
  97. package/dist/foundations/interactions/pressable.d.ts +25 -18
  98. package/dist/foundations/interactions/pressable.d.ts.map +1 -1
  99. package/dist/foundations/interactions/pressable.js +51 -1
  100. package/dist/foundations/interactions/pressable.js.map +1 -0
  101. package/dist/foundations/interactions/roving-focus.d.ts +49 -114
  102. package/dist/foundations/interactions/roving-focus.d.ts.map +1 -1
  103. package/dist/foundations/interactions/roving-focus.js +71 -1
  104. package/dist/foundations/interactions/roving-focus.js.map +1 -0
  105. package/dist/foundations/state/controllable.d.ts +22 -41
  106. package/dist/foundations/state/controllable.d.ts.map +1 -1
  107. package/dist/foundations/state/controllable.js +81 -1
  108. package/dist/foundations/state/controllable.js.map +1 -0
  109. package/dist/foundations/structures/collection.d.ts +25 -40
  110. package/dist/foundations/structures/collection.d.ts.map +1 -1
  111. package/dist/foundations/structures/collection.js +51 -1
  112. package/dist/foundations/structures/collection.js.map +1 -0
  113. package/dist/foundations/structures/layer.d.ts +47 -68
  114. package/dist/foundations/structures/layer.d.ts.map +1 -1
  115. package/dist/foundations/structures/layer.js +81 -1
  116. package/dist/foundations/structures/layer.js.map +1 -0
  117. package/dist/foundations/structures/layout.d.ts +6 -3
  118. package/dist/foundations/structures/layout.d.ts.map +1 -1
  119. package/dist/foundations/structures/layout.js +13 -1
  120. package/dist/foundations/structures/layout.js.map +1 -0
  121. package/dist/foundations/structures/portal.d.ts +17 -10
  122. package/dist/foundations/structures/portal.d.ts.map +1 -1
  123. package/dist/foundations/structures/portal.js +105 -1
  124. package/dist/foundations/structures/portal.js.map +1 -0
  125. package/dist/foundations/structures/presence.d.ts +11 -5
  126. package/dist/foundations/structures/presence.d.ts.map +1 -1
  127. package/dist/foundations/structures/presence.js +39 -1
  128. package/dist/foundations/structures/presence.js.map +1 -0
  129. package/dist/foundations/structures/slot.d.ts +11 -8
  130. package/dist/foundations/structures/slot.d.ts.map +1 -1
  131. package/dist/foundations/structures/slot.js +41 -1
  132. package/dist/foundations/structures/slot.js.map +1 -0
  133. package/dist/foundations/structures.d.ts +7 -14
  134. package/dist/foundations/structures.js +6 -1
  135. package/dist/foundations/utilities/aria.d.ts +9 -6
  136. package/dist/foundations/utilities/aria.d.ts.map +1 -1
  137. package/dist/foundations/utilities/aria.js +17 -1
  138. package/dist/foundations/utilities/aria.js.map +1 -0
  139. package/dist/foundations/utilities/compose-handlers.d.ts +10 -7
  140. package/dist/foundations/utilities/compose-handlers.d.ts.map +1 -1
  141. package/dist/foundations/utilities/compose-handlers.js +20 -1
  142. package/dist/foundations/utilities/compose-handlers.js.map +1 -0
  143. package/dist/foundations/utilities/compose-ref.d.ts +7 -4
  144. package/dist/foundations/utilities/compose-ref.d.ts.map +1 -1
  145. package/dist/foundations/utilities/compose-ref.js +18 -1
  146. package/dist/foundations/utilities/compose-ref.js.map +1 -0
  147. package/dist/foundations/utilities/event-types.d.ts +14 -11
  148. package/dist/foundations/utilities/event-types.d.ts.map +1 -1
  149. package/dist/foundations/utilities/merge-props.d.ts +4 -1
  150. package/dist/foundations/utilities/merge-props.d.ts.map +1 -1
  151. package/dist/foundations/utilities/merge-props.js +49 -1
  152. package/dist/foundations/utilities/merge-props.js.map +1 -0
  153. package/dist/foundations/utilities/use-id.d.ts +9 -6
  154. package/dist/foundations/utilities/use-id.d.ts.map +1 -1
  155. package/dist/foundations/utilities/use-id.js +29 -1
  156. package/dist/foundations/utilities/use-id.js.map +1 -0
  157. package/dist/fx/fx.d.ts +24 -21
  158. package/dist/fx/fx.d.ts.map +1 -1
  159. package/dist/fx/fx.js +212 -1
  160. package/dist/fx/fx.js.map +1 -0
  161. package/dist/fx/index.d.ts +4 -7
  162. package/dist/fx/index.js +4 -1
  163. package/dist/fx/noop.js +9 -1
  164. package/dist/fx/noop.js.map +1 -0
  165. package/dist/fx/timing.d.ts +24 -21
  166. package/dist/fx/timing.d.ts.map +1 -1
  167. package/dist/fx/timing.js +236 -1
  168. package/dist/fx/timing.js.map +1 -0
  169. package/dist/index.d.ts +21 -23
  170. package/dist/index.js +34 -1
  171. package/dist/index.js.map +1 -0
  172. package/dist/jsx/index.d.ts +1 -4
  173. package/dist/jsx/index.js +3 -1
  174. package/dist/jsx/types.d.ts +18 -25
  175. package/dist/jsx/types.d.ts.map +1 -1
  176. package/dist/jsx/types.js +1 -1
  177. package/dist/jsx/utils.d.ts +4 -3
  178. package/dist/jsx/utils.d.ts.map +1 -1
  179. package/dist/jsx/utils.js +19 -1
  180. package/dist/jsx/utils.js.map +1 -0
  181. package/dist/jsx-dev-runtime.d.ts +8 -0
  182. package/dist/jsx-dev-runtime.d.ts.map +1 -0
  183. package/dist/jsx-dev-runtime.js +32 -1
  184. package/dist/jsx-dev-runtime.js.map +1 -0
  185. package/dist/jsx-runtime.d.ts +12 -0
  186. package/dist/jsx-runtime.d.ts.map +1 -0
  187. package/dist/jsx-runtime.js +45 -1
  188. package/dist/jsx-runtime.js.map +1 -0
  189. package/dist/jsx-runtime2.d.ts +2 -0
  190. package/dist/jsx-runtime2.js +3 -0
  191. package/dist/renderer/children.js +293 -0
  192. package/dist/renderer/children.js.map +1 -0
  193. package/dist/renderer/cleanup.js +150 -1
  194. package/dist/renderer/cleanup.js.map +1 -0
  195. package/dist/renderer/dom.js +2439 -1
  196. package/dist/renderer/dom.js.map +1 -0
  197. package/dist/renderer/env.js +1 -0
  198. package/dist/renderer/evaluate.js +450 -1
  199. package/dist/renderer/evaluate.js.map +1 -0
  200. package/dist/renderer/fastpath.js +145 -1
  201. package/dist/renderer/fastpath.js.map +1 -0
  202. package/dist/renderer/index.js +24 -1
  203. package/dist/renderer/index.js.map +1 -0
  204. package/dist/renderer/keyed.js +119 -1
  205. package/dist/renderer/keyed.js.map +1 -0
  206. package/dist/renderer/reconcile.js +359 -1
  207. package/dist/renderer/reconcile.js.map +1 -0
  208. package/dist/renderer/types.js +1 -1
  209. package/dist/renderer/utils.js +220 -1
  210. package/dist/renderer/utils.js.map +1 -0
  211. package/dist/resources/index.d.ts +3 -9
  212. package/dist/resources/index.js +3 -1
  213. package/dist/router/index.d.ts +6 -10
  214. package/dist/router/index.js +5 -1
  215. package/dist/router/match.js +83 -1
  216. package/dist/router/match.js.map +1 -0
  217. package/dist/router/navigate.d.ts +20 -8
  218. package/dist/router/navigate.d.ts.map +1 -1
  219. package/dist/router/navigate.js +288 -1
  220. package/dist/router/navigate.js.map +1 -0
  221. package/dist/router/policy.d.ts +22 -0
  222. package/dist/router/policy.d.ts.map +1 -0
  223. package/dist/router/policy.js +116 -0
  224. package/dist/router/policy.js.map +1 -0
  225. package/dist/router/route-context.js +79 -0
  226. package/dist/router/route-context.js.map +1 -0
  227. package/dist/router/route.d.ts +101 -34
  228. package/dist/router/route.d.ts.map +1 -1
  229. package/dist/router/route.js +599 -1
  230. package/dist/router/route.js.map +1 -0
  231. package/dist/runtime/child-scope.d.ts +21 -0
  232. package/dist/runtime/child-scope.d.ts.map +1 -0
  233. package/dist/runtime/child-scope.js +77 -0
  234. package/dist/runtime/child-scope.js.map +1 -0
  235. package/dist/runtime/component.d.ts +67 -56
  236. package/dist/runtime/component.d.ts.map +1 -1
  237. package/dist/runtime/component.js +462 -1
  238. package/dist/runtime/component.js.map +1 -0
  239. package/dist/runtime/context.d.ts +28 -42
  240. package/dist/runtime/context.d.ts.map +1 -1
  241. package/dist/runtime/context.js +205 -1
  242. package/dist/runtime/context.js.map +1 -0
  243. package/dist/runtime/control.d.ts +43 -0
  244. package/dist/runtime/control.d.ts.map +1 -0
  245. package/dist/runtime/control.js +125 -0
  246. package/dist/runtime/control.js.map +1 -0
  247. package/dist/runtime/derive.d.ts +12 -9
  248. package/dist/runtime/derive.d.ts.map +1 -1
  249. package/dist/runtime/derive.js +134 -1
  250. package/dist/runtime/derive.js.map +1 -0
  251. package/dist/runtime/dev-namespace.js +57 -1
  252. package/dist/runtime/dev-namespace.js.map +1 -0
  253. package/dist/runtime/effect.d.ts +32 -0
  254. package/dist/runtime/effect.d.ts.map +1 -0
  255. package/dist/runtime/effect.js +146 -0
  256. package/dist/runtime/effect.js.map +1 -0
  257. package/dist/runtime/events.js +162 -1
  258. package/dist/runtime/events.js.map +1 -0
  259. package/dist/runtime/execution-model.js +15 -1
  260. package/dist/runtime/execution-model.js.map +1 -0
  261. package/dist/runtime/fastlane.js +204 -1
  262. package/dist/runtime/fastlane.js.map +1 -0
  263. package/dist/runtime/for-bench.d.ts +41 -0
  264. package/dist/runtime/for-bench.d.ts.map +1 -0
  265. package/dist/runtime/for-bench.js +173 -0
  266. package/dist/runtime/for-bench.js.map +1 -0
  267. package/dist/runtime/for.d.ts +62 -49
  268. package/dist/runtime/for.d.ts.map +1 -1
  269. package/dist/runtime/for.js +668 -1
  270. package/dist/runtime/for.js.map +1 -0
  271. package/dist/runtime/operations.d.ts +18 -15
  272. package/dist/runtime/operations.d.ts.map +1 -1
  273. package/dist/runtime/operations.js +209 -1
  274. package/dist/runtime/operations.js.map +1 -0
  275. package/dist/runtime/perf-metrics.js +64 -1
  276. package/dist/runtime/perf-metrics.js.map +1 -0
  277. package/dist/runtime/readable.d.ts +24 -18
  278. package/dist/runtime/readable.d.ts.map +1 -1
  279. package/dist/runtime/readable.js +118 -1
  280. package/dist/runtime/readable.js.map +1 -0
  281. package/dist/runtime/resource-cell.js +102 -1
  282. package/dist/runtime/resource-cell.js.map +1 -0
  283. package/dist/runtime/scheduler.d.ts +51 -50
  284. package/dist/runtime/scheduler.d.ts.map +1 -1
  285. package/dist/runtime/scheduler.js +328 -1
  286. package/dist/runtime/scheduler.js.map +1 -0
  287. package/dist/runtime/selector.d.ts +7 -5
  288. package/dist/runtime/selector.d.ts.map +1 -1
  289. package/dist/runtime/selector.js +188 -1
  290. package/dist/runtime/selector.js.map +1 -0
  291. package/dist/runtime/ssr-bridge.js +24 -1
  292. package/dist/runtime/ssr-bridge.js.map +1 -0
  293. package/dist/runtime/state.d.ts +11 -19
  294. package/dist/runtime/state.d.ts.map +1 -1
  295. package/dist/runtime/state.js +99 -1
  296. package/dist/runtime/state.js.map +1 -0
  297. package/dist/ssg/batch-render.d.ts +10 -10
  298. package/dist/ssg/batch-render.d.ts.map +1 -1
  299. package/dist/ssg/batch-render.js +84 -1
  300. package/dist/ssg/batch-render.js.map +1 -0
  301. package/dist/ssg/create-static-gen.d.ts +28 -29
  302. package/dist/ssg/create-static-gen.d.ts.map +1 -1
  303. package/dist/ssg/create-static-gen.js +282 -1
  304. package/dist/ssg/create-static-gen.js.map +1 -0
  305. package/dist/ssg/generate-metadata.d.ts +12 -15
  306. package/dist/ssg/generate-metadata.d.ts.map +1 -1
  307. package/dist/ssg/generate-metadata.js +94 -1
  308. package/dist/ssg/generate-metadata.js.map +1 -0
  309. package/dist/ssg/incremental-manifest.js +56 -1
  310. package/dist/ssg/incremental-manifest.js.map +1 -0
  311. package/dist/ssg/index.d.ts +8 -28
  312. package/dist/ssg/index.js +7 -1
  313. package/dist/ssg/resolve-ssg-data.d.ts +10 -13
  314. package/dist/ssg/resolve-ssg-data.d.ts.map +1 -1
  315. package/dist/ssg/resolve-ssg-data.js +46 -1
  316. package/dist/ssg/resolve-ssg-data.js.map +1 -0
  317. package/dist/ssg/route-utils.d.ts +14 -10
  318. package/dist/ssg/route-utils.d.ts.map +1 -1
  319. package/dist/ssg/route-utils.js +24 -1
  320. package/dist/ssg/route-utils.js.map +1 -0
  321. package/dist/ssg/types.d.ts +157 -144
  322. package/dist/ssg/types.d.ts.map +1 -1
  323. package/dist/ssg/write-static-files.d.ts +8 -14
  324. package/dist/ssg/write-static-files.d.ts.map +1 -1
  325. package/dist/ssg/write-static-files.js +73 -1
  326. package/dist/ssg/write-static-files.js.map +1 -0
  327. package/dist/ssr/attrs.js +93 -1
  328. package/dist/ssr/attrs.js.map +1 -0
  329. package/dist/ssr/context.d.ts +31 -35
  330. package/dist/ssr/context.d.ts.map +1 -1
  331. package/dist/ssr/context.js +63 -1
  332. package/dist/ssr/context.js.map +1 -0
  333. package/dist/ssr/errors.d.ts +6 -4
  334. package/dist/ssr/errors.d.ts.map +1 -1
  335. package/dist/ssr/errors.js +4 -1
  336. package/dist/ssr/errors.js.map +1 -0
  337. package/dist/ssr/escape.js +153 -1
  338. package/dist/ssr/escape.js.map +1 -0
  339. package/dist/ssr/index.d.ts +74 -72
  340. package/dist/ssr/index.d.ts.map +1 -1
  341. package/dist/ssr/index.js +543 -1
  342. package/dist/ssr/index.js.map +1 -0
  343. package/dist/ssr/render-keys.d.ts +27 -29
  344. package/dist/ssr/render-keys.d.ts.map +1 -1
  345. package/dist/ssr/render-keys.js +39 -1
  346. package/dist/ssr/render-keys.js.map +1 -0
  347. package/dist/ssr/sink.js +86 -1
  348. package/dist/ssr/sink.js.map +1 -0
  349. package/dist/ssr/stream-render.js +76 -1
  350. package/dist/ssr/stream-render.js.map +1 -0
  351. package/dist/ssr/types.d.ts +14 -13
  352. package/dist/ssr/types.d.ts.map +1 -1
  353. package/package.json +49 -69
  354. package/dist/_virtual/___vite-browser-external.js +0 -1
  355. package/dist/_virtual/__vite-browser-external.js +0 -1
  356. package/dist/_virtual/_commonjsHelpers.js +0 -1
  357. package/dist/_virtual/_fs.js +0 -1
  358. package/dist/_virtual/_path.js +0 -1
  359. package/dist/_virtual/main.js +0 -1
  360. package/dist/_virtual/preload-helper.js +0 -1
  361. package/dist/bench/benchmark-entry.d.ts +0 -14
  362. package/dist/bench/benchmark-entry.d.ts.map +0 -1
  363. package/dist/common/errors.d.ts +0 -53
  364. package/dist/common/errors.d.ts.map +0 -1
  365. package/dist/common/index.d.ts +0 -14
  366. package/dist/common/index.d.ts.map +0 -1
  367. package/dist/dev/invariant.d.ts +0 -83
  368. package/dist/dev/invariant.d.ts.map +0 -1
  369. package/dist/dev/logger.d.ts +0 -13
  370. package/dist/dev/logger.d.ts.map +0 -1
  371. package/dist/dev/vite-plugin-askr.d.ts +0 -25
  372. package/dist/dev/vite-plugin-askr.d.ts.map +0 -1
  373. package/dist/dev/warnings.d.ts +0 -5
  374. package/dist/dev/warnings.d.ts.map +0 -1
  375. package/dist/for/for.d.ts +0 -16
  376. package/dist/for/for.d.ts.map +0 -1
  377. package/dist/for/for.js +0 -1
  378. package/dist/for/index.d.ts +0 -2
  379. package/dist/for/index.d.ts.map +0 -1
  380. package/dist/for/index.js +0 -1
  381. package/dist/foundations/core.d.ts.map +0 -1
  382. package/dist/foundations/index.d.ts.map +0 -1
  383. package/dist/foundations/interactions/index.d.ts +0 -5
  384. package/dist/foundations/interactions/index.d.ts.map +0 -1
  385. package/dist/foundations/state/index.d.ts +0 -2
  386. package/dist/foundations/state/index.d.ts.map +0 -1
  387. package/dist/foundations/structures/index.d.ts +0 -5
  388. package/dist/foundations/structures/index.d.ts.map +0 -1
  389. package/dist/foundations/structures.d.ts.map +0 -1
  390. package/dist/foundations/utilities/index.d.ts +0 -7
  391. package/dist/foundations/utilities/index.d.ts.map +0 -1
  392. package/dist/fx/index.d.ts.map +0 -1
  393. package/dist/fx/noop.d.ts +0 -12
  394. package/dist/fx/noop.d.ts.map +0 -1
  395. package/dist/index.d.ts.map +0 -1
  396. package/dist/jsx/index.d.ts.map +0 -1
  397. package/dist/jsx/jsx-dev-runtime.d.ts +0 -4
  398. package/dist/jsx/jsx-dev-runtime.d.ts.map +0 -1
  399. package/dist/jsx/jsx-runtime.d.ts +0 -10
  400. package/dist/jsx/jsx-runtime.d.ts.map +0 -1
  401. package/dist/node_modules/esbuild/lib/main.js +0 -65
  402. package/dist/renderer/cleanup.d.ts +0 -28
  403. package/dist/renderer/cleanup.d.ts.map +0 -1
  404. package/dist/renderer/dom.d.ts +0 -64
  405. package/dist/renderer/dom.d.ts.map +0 -1
  406. package/dist/renderer/evaluate.d.ts +0 -4
  407. package/dist/renderer/evaluate.d.ts.map +0 -1
  408. package/dist/renderer/fastpath.d.ts +0 -7
  409. package/dist/renderer/fastpath.d.ts.map +0 -1
  410. package/dist/renderer/index.d.ts +0 -6
  411. package/dist/renderer/index.d.ts.map +0 -1
  412. package/dist/renderer/keyed.d.ts +0 -23
  413. package/dist/renderer/keyed.d.ts.map +0 -1
  414. package/dist/renderer/reconcile.d.ts +0 -88
  415. package/dist/renderer/reconcile.d.ts.map +0 -1
  416. package/dist/renderer/types.d.ts +0 -3
  417. package/dist/renderer/types.d.ts.map +0 -1
  418. package/dist/renderer/utils.d.ts +0 -63
  419. package/dist/renderer/utils.d.ts.map +0 -1
  420. package/dist/resources/index.d.ts.map +0 -1
  421. package/dist/router/index.d.ts.map +0 -1
  422. package/dist/router/match.d.ts +0 -22
  423. package/dist/router/match.d.ts.map +0 -1
  424. package/dist/runtime/dev-namespace.d.ts +0 -31
  425. package/dist/runtime/dev-namespace.d.ts.map +0 -1
  426. package/dist/runtime/events.d.ts +0 -53
  427. package/dist/runtime/events.d.ts.map +0 -1
  428. package/dist/runtime/execution-model.d.ts +0 -4
  429. package/dist/runtime/execution-model.d.ts.map +0 -1
  430. package/dist/runtime/fastlane.d.ts +0 -27
  431. package/dist/runtime/fastlane.d.ts.map +0 -1
  432. package/dist/runtime/hydration.d.ts +0 -25
  433. package/dist/runtime/hydration.d.ts.map +0 -1
  434. package/dist/runtime/perf-metrics.d.ts +0 -25
  435. package/dist/runtime/perf-metrics.d.ts.map +0 -1
  436. package/dist/runtime/resource-cell.d.ts +0 -35
  437. package/dist/runtime/resource-cell.d.ts.map +0 -1
  438. package/dist/runtime/snapshot.d.ts +0 -25
  439. package/dist/runtime/snapshot.d.ts.map +0 -1
  440. package/dist/runtime/ssr-bridge.d.ts +0 -10
  441. package/dist/runtime/ssr-bridge.d.ts.map +0 -1
  442. package/dist/ssg/discover-resources.d.ts +0 -15
  443. package/dist/ssg/discover-resources.d.ts.map +0 -1
  444. package/dist/ssg/incremental-manifest.d.ts +0 -23
  445. package/dist/ssg/incremental-manifest.d.ts.map +0 -1
  446. package/dist/ssg/index.d.ts.map +0 -1
  447. package/dist/ssr/attrs.d.ts +0 -26
  448. package/dist/ssr/attrs.d.ts.map +0 -1
  449. package/dist/ssr/create-ssr.d.ts +0 -19
  450. package/dist/ssr/create-ssr.d.ts.map +0 -1
  451. package/dist/ssr/escape.d.ts +0 -38
  452. package/dist/ssr/escape.d.ts.map +0 -1
  453. package/dist/ssr/sink.d.ts +0 -23
  454. package/dist/ssr/sink.d.ts.map +0 -1
  455. package/dist/ssr/stream-render.d.ts +0 -7
  456. package/dist/ssr/stream-render.d.ts.map +0 -1
  457. package/dist/vite/index.js +0 -4
@@ -0,0 +1,88 @@
1
+ import { jsx, jsxs } from "../../jsx-runtime.js";
2
+ //#region src/foundations/icon/icon.tsx
3
+ const ICON_SIZE_TOKENS = [
4
+ "sm",
5
+ "md",
6
+ "lg",
7
+ "xl"
8
+ ];
9
+ function isIconSizeToken(value) {
10
+ return typeof value === "string" && ICON_SIZE_TOKENS.includes(value);
11
+ }
12
+ function normalizeIconSizeValue(size) {
13
+ if (typeof size === "number") return `${size}px`;
14
+ return size;
15
+ }
16
+ function resolveIconSizeVariable(size) {
17
+ if (isIconSizeToken(size)) return `var(--ak-icon-size-${size}, var(--ak-icon-size-md, 1.25rem))`;
18
+ return normalizeIconSizeValue(size);
19
+ }
20
+ function resolveIconStrokeWidthVariable(strokeWidth, sizeToken) {
21
+ if (sizeToken) return `var(--ak-icon-stroke-width-${sizeToken}, var(--ak-icon-stroke-width-md, ${strokeWidth}))`;
22
+ return `var(--ak-icon-stroke-width-md, ${strokeWidth})`;
23
+ }
24
+ function camelToKebab(key) {
25
+ return key.replace(/([A-Z])/g, (match) => `-${match.toLowerCase()}`);
26
+ }
27
+ function serializeIconStyle(style) {
28
+ if (!style) return "";
29
+ if (typeof style === "string") return style.trim();
30
+ return Object.entries(style).filter(([, value]) => value !== void 0 && value !== null).map(([key, value]) => `${camelToKebab(key)}:${String(value)}`).join(";");
31
+ }
32
+ function joinIconStyle(...styles) {
33
+ const merged = styles.map((style) => style?.trim()).filter(Boolean);
34
+ return merged.length > 0 ? merged.join(";") : void 0;
35
+ }
36
+ function getIconContractProps({ size = 20, strokeWidth = 2, color = "currentColor", title, style, iconName }) {
37
+ const sizeToken = isIconSizeToken(size) ? size : void 0;
38
+ const decorative = title ? void 0 : "true";
39
+ const resolvedSize = resolveIconSizeVariable(size);
40
+ const resolvedStrokeWidth = resolveIconStrokeWidthVariable(strokeWidth, sizeToken);
41
+ const iconStyle = joinIconStyle(`--ak-icon-size:${resolvedSize}`, `--ak-icon-stroke-width:${resolvedStrokeWidth}`, "display:inline-block", "flex-shrink:0", "width:var(--ak-icon-size)", "height:var(--ak-icon-size)", "stroke-width:var(--ak-icon-stroke-width)", serializeIconStyle(style));
42
+ return {
43
+ sizeToken,
44
+ decorative,
45
+ iconStyle,
46
+ attrs: {
47
+ xmlns: "http://www.w3.org/2000/svg",
48
+ width: "24",
49
+ height: "24",
50
+ fill: "none",
51
+ stroke: color,
52
+ "stroke-width": "var(--ak-icon-stroke-width)",
53
+ role: "img",
54
+ "aria-hidden": title ? void 0 : "true",
55
+ style: iconStyle,
56
+ "data-slot": "icon",
57
+ "data-icon": iconName,
58
+ "data-size": sizeToken,
59
+ "data-decorative": decorative,
60
+ "data-color": color === "currentColor" ? "current" : void 0
61
+ }
62
+ };
63
+ }
64
+ function IconBase({ size = 20, strokeWidth = 2, color = "currentColor", title, class: className, style, iconName, children, ref, ...rest }) {
65
+ const { attrs } = getIconContractProps({
66
+ size,
67
+ strokeWidth,
68
+ color,
69
+ title,
70
+ style,
71
+ iconName
72
+ });
73
+ const finalChildren = title ? [jsx("title", { children: title }), children] : children;
74
+ return jsxs("svg", {
75
+ ...rest,
76
+ ...attrs,
77
+ viewBox: rest.viewBox ?? "0 0 24 24",
78
+ "stroke-linecap": rest["stroke-linecap"] ?? "round",
79
+ "stroke-linejoin": rest["stroke-linejoin"] ?? "round",
80
+ class: className,
81
+ ref,
82
+ children: finalChildren
83
+ });
84
+ }
85
+ //#endregion
86
+ export { IconBase, getIconContractProps, isIconSizeToken, joinIconStyle, normalizeIconSizeValue, resolveIconSizeVariable, resolveIconStrokeWidthVariable, serializeIconStyle };
87
+
88
+ //# sourceMappingURL=icon.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"icon.js","names":[],"sources":["../../../src/foundations/icon/icon.tsx"],"sourcesContent":["/* eslint-disable askr/no-hardcoded-theme-tokens -- Icon exposes a stable CSS variable contract consumed by themes. */\nimport { jsx, jsxs } from '../../jsx/jsx-runtime';\nimport type { IconProps, IconSizeToken, IconStyleObject } from './icon.types';\n\nconst ICON_SIZE_TOKENS: readonly IconSizeToken[] = ['sm', 'md', 'lg', 'xl'];\n\nexport function isIconSizeToken(value: unknown): value is IconSizeToken {\n return (\n typeof value === 'string' &&\n ICON_SIZE_TOKENS.includes(value as IconSizeToken)\n );\n}\n\nexport function normalizeIconSizeValue(size: number | string): string {\n if (typeof size === 'number') return `${size}px`;\n return size;\n}\n\nexport function resolveIconSizeVariable(size: number | string): string {\n if (isIconSizeToken(size)) {\n return `var(--ak-icon-size-${size}, var(--ak-icon-size-md, 1.25rem))`;\n }\n return normalizeIconSizeValue(size);\n}\n\nexport function resolveIconStrokeWidthVariable(\n strokeWidth: number,\n sizeToken: IconSizeToken | undefined\n): string {\n if (sizeToken) {\n return `var(--ak-icon-stroke-width-${sizeToken}, var(--ak-icon-stroke-width-md, ${strokeWidth}))`;\n }\n return `var(--ak-icon-stroke-width-md, ${strokeWidth})`;\n}\n\nfunction camelToKebab(key: string): string {\n return key.replace(/([A-Z])/g, (match) => `-${match.toLowerCase()}`);\n}\n\nexport function serializeIconStyle(\n style: string | IconStyleObject | undefined\n): string {\n if (!style) return '';\n if (typeof style === 'string') return style.trim();\n return Object.entries(style)\n .filter(([, value]) => value !== undefined && value !== null)\n .map(([key, value]) => `${camelToKebab(key)}:${String(value)}`)\n .join(';');\n}\n\nexport function joinIconStyle(\n ...styles: Array<string | undefined>\n): string | undefined {\n const merged = styles.map((style) => style?.trim()).filter(Boolean);\n return merged.length > 0 ? merged.join(';') : undefined;\n}\n\nexport function getIconContractProps({\n size = 20,\n strokeWidth = 2,\n color = 'currentColor',\n title,\n style,\n iconName,\n}: Pick<\n IconProps,\n 'color' | 'iconName' | 'size' | 'strokeWidth' | 'style' | 'title'\n>) {\n const sizeToken = isIconSizeToken(size) ? size : undefined;\n const decorative = title ? undefined : 'true';\n const resolvedSize = resolveIconSizeVariable(size);\n const resolvedStrokeWidth = resolveIconStrokeWidthVariable(\n strokeWidth,\n sizeToken\n );\n const iconStyle = joinIconStyle(\n `--ak-icon-size:${resolvedSize}`,\n `--ak-icon-stroke-width:${resolvedStrokeWidth}`,\n 'display:inline-block',\n 'flex-shrink:0',\n 'width:var(--ak-icon-size)',\n 'height:var(--ak-icon-size)',\n 'stroke-width:var(--ak-icon-stroke-width)',\n serializeIconStyle(style)\n );\n\n return {\n sizeToken,\n decorative,\n iconStyle,\n attrs: {\n xmlns: 'http://www.w3.org/2000/svg',\n width: '24',\n height: '24',\n fill: 'none',\n stroke: color,\n 'stroke-width': 'var(--ak-icon-stroke-width)',\n role: 'img',\n 'aria-hidden': title ? undefined : 'true',\n style: iconStyle,\n 'data-slot': 'icon',\n 'data-icon': iconName,\n 'data-size': sizeToken,\n 'data-decorative': decorative,\n 'data-color': color === 'currentColor' ? 'current' : undefined,\n },\n };\n}\n\nexport function IconBase({\n size = 20,\n strokeWidth = 2,\n color = 'currentColor',\n title,\n class: className,\n style,\n iconName,\n children,\n ref,\n ...rest\n}: IconProps) {\n const { attrs } = getIconContractProps({\n size,\n strokeWidth,\n color,\n title,\n style,\n iconName,\n });\n\n const finalChildren = title\n ? [jsx('title', { children: title }), children]\n : children;\n\n return jsxs('svg', {\n ...rest,\n ...attrs,\n viewBox: rest.viewBox ?? '0 0 24 24',\n 'stroke-linecap': rest['stroke-linecap'] ?? 'round',\n 'stroke-linejoin': rest['stroke-linejoin'] ?? 'round',\n class: className,\n ref,\n children: finalChildren,\n });\n}\n"],"mappings":";;AAIA,MAAM,mBAA6C;CAAC;CAAM;CAAM;CAAM;CAAK;AAE3E,SAAgB,gBAAgB,OAAwC;AACtE,QACE,OAAO,UAAU,YACjB,iBAAiB,SAAS,MAAuB;;AAIrD,SAAgB,uBAAuB,MAA+B;AACpE,KAAI,OAAO,SAAS,SAAU,QAAO,GAAG,KAAK;AAC7C,QAAO;;AAGT,SAAgB,wBAAwB,MAA+B;AACrE,KAAI,gBAAgB,KAAK,CACvB,QAAO,sBAAsB,KAAK;AAEpC,QAAO,uBAAuB,KAAK;;AAGrC,SAAgB,+BACd,aACA,WACQ;AACR,KAAI,UACF,QAAO,8BAA8B,UAAU,mCAAmC,YAAY;AAEhG,QAAO,kCAAkC,YAAY;;AAGvD,SAAS,aAAa,KAAqB;AACzC,QAAO,IAAI,QAAQ,aAAa,UAAU,IAAI,MAAM,aAAa,GAAG;;AAGtE,SAAgB,mBACd,OACQ;AACR,KAAI,CAAC,MAAO,QAAO;AACnB,KAAI,OAAO,UAAU,SAAU,QAAO,MAAM,MAAM;AAClD,QAAO,OAAO,QAAQ,MAAM,CACzB,QAAQ,GAAG,WAAW,UAAU,UAAa,UAAU,KAAK,CAC5D,KAAK,CAAC,KAAK,WAAW,GAAG,aAAa,IAAI,CAAC,GAAG,OAAO,MAAM,GAAG,CAC9D,KAAK,IAAI;;AAGd,SAAgB,cACd,GAAG,QACiB;CACpB,MAAM,SAAS,OAAO,KAAK,UAAU,OAAO,MAAM,CAAC,CAAC,OAAO,QAAQ;AACnE,QAAO,OAAO,SAAS,IAAI,OAAO,KAAK,IAAI,GAAG;;AAGhD,SAAgB,qBAAqB,EACnC,OAAO,IACP,cAAc,GACd,QAAQ,gBACR,OACA,OACA,YAIC;CACD,MAAM,YAAY,gBAAgB,KAAK,GAAG,OAAO;CACjD,MAAM,aAAa,QAAQ,SAAY;CACvC,MAAM,eAAe,wBAAwB,KAAK;CAClD,MAAM,sBAAsB,+BAC1B,aACA,UACD;CACD,MAAM,YAAY,cAChB,kBAAkB,gBAClB,0BAA0B,uBAC1B,wBACA,iBACA,6BACA,8BACA,4CACA,mBAAmB,MAAM,CAC1B;AAED,QAAO;EACL;EACA;EACA;EACA,OAAO;GACL,OAAO;GACP,OAAO;GACP,QAAQ;GACR,MAAM;GACN,QAAQ;GACR,gBAAgB;GAChB,MAAM;GACN,eAAe,QAAQ,SAAY;GACnC,OAAO;GACP,aAAa;GACb,aAAa;GACb,aAAa;GACb,mBAAmB;GACnB,cAAc,UAAU,iBAAiB,YAAY;GACtD;EACF;;AAGH,SAAgB,SAAS,EACvB,OAAO,IACP,cAAc,GACd,QAAQ,gBACR,OACA,OAAO,WACP,OACA,UACA,UACA,KACA,GAAG,QACS;CACZ,MAAM,EAAE,UAAU,qBAAqB;EACrC;EACA;EACA;EACA;EACA;EACA;EACD,CAAC;CAEF,MAAM,gBAAgB,QAClB,CAAC,IAAI,SAAS,EAAE,UAAU,OAAO,CAAC,EAAE,SAAS,GAC7C;AAEJ,QAAO,KAAK,OAAO;EACjB,GAAG;EACH,GAAG;EACH,SAAS,KAAK,WAAW;EACzB,kBAAkB,KAAK,qBAAqB;EAC5C,mBAAmB,KAAK,sBAAsB;EAC9C,OAAO;EACP;EACA,UAAU;EACX,CAAC"}
@@ -0,0 +1,21 @@
1
+ import { Ref } from "../utilities/compose-ref.js";
2
+
3
+ //#region src/foundations/icon/icon.types.d.ts
4
+ type IconSizeToken = 'sm' | 'md' | 'lg' | 'xl';
5
+ type IconStyleObject = Record<string, unknown>;
6
+ type IconOwnProps = {
7
+ size?: number | string;
8
+ strokeWidth?: number;
9
+ color?: string;
10
+ title?: string;
11
+ class?: string;
12
+ style?: string | IconStyleObject;
13
+ iconName?: string;
14
+ };
15
+ type IconProps = Omit<JSX.IntrinsicElements['svg'], 'children' | 'class' | 'color' | 'height' | 'ref' | 'role' | 'stroke' | 'stroke-width' | 'style' | 'title' | 'width'> & IconOwnProps & {
16
+ children?: unknown;
17
+ ref?: Ref<SVGSVGElement>;
18
+ };
19
+ //#endregion
20
+ export { IconOwnProps, IconProps, IconSizeToken, IconStyleObject };
21
+ //# sourceMappingURL=icon.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"icon.types.d.ts","names":[],"sources":["../../../src/foundations/icon/icon.types.ts"],"mappings":";;;KAEY,aAAA;AAAA,KAEA,eAAA,GAAkB,MAAA;AAAA,KAElB,YAAA;EACV,IAAA;EACA,WAAA;EACA,KAAA;EACA,KAAA;EACA,KAAA;EACA,KAAA,YAAiB,eAAA;EACjB,QAAA;AAAA;AAAA,KAGU,SAAA,GAAY,IAAA,CACtB,GAAA,CAAI,iBAAA,iIAaJ,YAAA;EACE,QAAA;EACA,GAAA,GAAM,GAAA,CAAI,aAAA;AAAA"}
@@ -1,3 +1,23 @@
1
- export * from './core';
2
- export * from './structures';
3
- //# sourceMappingURL=index.d.ts.map
1
+ import { JSXElement } from "../common/jsx.js";
2
+ import { ComposeHandlersOptions, composeHandlers } from "./utilities/compose-handlers.js";
3
+ import { mergeProps } from "./utilities/merge-props.js";
4
+ import { ariaDisabled, ariaExpanded, ariaSelected } from "./utilities/aria.js";
5
+ import { Ref, composeRefs, setRef } from "./utilities/compose-ref.js";
6
+ import { FormatIdOptions, formatId } from "./utilities/use-id.js";
7
+ import { DefaultPreventable, FocusLikeEvent, KeyboardLikeEvent, PointerLikeEvent, PropagationStoppable } from "./utilities/event-types.js";
8
+ import { PressableOptions, PressableResult, pressable } from "./interactions/pressable.js";
9
+ import { DismissableOptions, dismissable } from "./interactions/dismissable.js";
10
+ import { FocusableOptions, FocusableResult, focusable } from "./interactions/focusable.js";
11
+ import { HoverableOptions, HoverableResult, hoverable } from "./interactions/hoverable.js";
12
+ import { Orientation, RovingFocusOptions, RovingFocusResult, rovingFocus } from "./interactions/roving-focus.js";
13
+ import { InteractionPolicyInput, applyInteractionPolicy, mergeInteractionProps } from "./interactions/interaction-policy.js";
14
+ import { ControllableState, controllableState, isControlled, makeControllable, resolveControllable } from "./state/controllable.js";
15
+ import { IconOwnProps, IconProps, IconSizeToken, IconStyleObject } from "./icon/icon.types.js";
16
+ import { IconBase, getIconContractProps, isIconSizeToken, joinIconStyle, normalizeIconSizeValue, resolveIconSizeVariable, resolveIconStrokeWidthVariable, serializeIconStyle } from "./icon/icon.js";
17
+ import { LayoutComponent, layout } from "./structures/layout.js";
18
+ import { Slot, SlotProps } from "./structures/slot.js";
19
+ import { Presence, PresenceProps } from "./structures/presence.js";
20
+ import { DefaultPortal, Portal, PortalProps, definePortal } from "./structures/portal.js";
21
+ import { Collection, CollectionItem, createCollection } from "./structures/collection.js";
22
+ import { Layer, LayerManager, LayerOptions, createLayer } from "./structures/layer.js";
23
+ export { Collection, CollectionItem, ComposeHandlersOptions, ControllableState, DefaultPortal, DefaultPreventable, DismissableOptions, FocusLikeEvent, FocusableOptions, FocusableResult, FormatIdOptions, HoverableOptions, HoverableResult, IconBase, type IconOwnProps, type IconProps, type IconSizeToken, type IconStyleObject, InteractionPolicyInput, JSXElement, KeyboardLikeEvent, Layer, LayerManager, LayerOptions, LayoutComponent, Orientation, PointerLikeEvent, Portal, PortalProps, Presence, PresenceProps, PressableOptions, PressableResult, PropagationStoppable, Ref, RovingFocusOptions, RovingFocusResult, Slot, SlotProps, applyInteractionPolicy, ariaDisabled, ariaExpanded, ariaSelected, composeHandlers, composeRefs, controllableState, createCollection, createLayer, definePortal, dismissable, focusable, formatId, getIconContractProps, hoverable, isControlled, isIconSizeToken, joinIconStyle, layout, makeControllable, mergeInteractionProps, mergeProps, normalizeIconSizeValue, pressable, resolveControllable, resolveIconSizeVariable, resolveIconStrokeWidthVariable, rovingFocus, serializeIconStyle, setRef };
@@ -1 +1,22 @@
1
- import"./core.js";import"./structures.js";import{DefaultPortal as a,definePortal as l}from"./structures/portal.js";import{Presence as m}from"./structures/presence.js";import{Slot as x}from"./structures/slot.js";import{applyInteractionPolicy as i,mergeInteractionProps as n}from"./interactions/interaction-policy.js";import{ariaDisabled as d,ariaExpanded as b,ariaSelected as P}from"./utilities/aria.js";import{composeHandlers as y}from"./utilities/compose-handlers.js";import{composeRefs as g,setRef as v}from"./utilities/compose-ref.js";import{controllableState as S,isControlled as D,makeControllable as R,resolveControllable as h}from"./state/controllable.js";import{createCollection as E}from"./structures/collection.js";import{createLayer as H}from"./structures/layer.js";import{dismissable as j}from"./interactions/dismissable.js";import{focusable as w}from"./interactions/focusable.js";import{formatId as A}from"./utilities/use-id.js";import{hoverable as G}from"./interactions/hoverable.js";import{layout as K}from"./structures/layout.js";import{mergeProps as N}from"./utilities/merge-props.js";import{pressable as Q}from"./interactions/pressable.js";import{rovingFocus as U}from"./interactions/roving-focus.js";export{a as DefaultPortal,m as Presence,x as Slot,i as applyInteractionPolicy,d as ariaDisabled,b as ariaExpanded,P as ariaSelected,y as composeHandlers,g as composeRefs,S as controllableState,E as createCollection,H as createLayer,l as definePortal,j as dismissable,w as focusable,A as formatId,G as hoverable,D as isControlled,K as layout,R as makeControllable,n as mergeInteractionProps,N as mergeProps,Q as pressable,h as resolveControllable,U as rovingFocus,v as setRef};
1
+ import { DefaultPortal, Portal, definePortal } from "./structures/portal.js";
2
+ import { ariaDisabled, ariaExpanded, ariaSelected } from "./utilities/aria.js";
3
+ import { pressable } from "./interactions/pressable.js";
4
+ import { composeHandlers } from "./utilities/compose-handlers.js";
5
+ import { composeRefs, setRef } from "./utilities/compose-ref.js";
6
+ import { mergeProps } from "./utilities/merge-props.js";
7
+ import { applyInteractionPolicy, mergeInteractionProps } from "./interactions/interaction-policy.js";
8
+ import { layout } from "./structures/layout.js";
9
+ import { Slot } from "./structures/slot.js";
10
+ import { Presence } from "./structures/presence.js";
11
+ import { createCollection } from "./structures/collection.js";
12
+ import { createLayer } from "./structures/layer.js";
13
+ import "./structures.js";
14
+ import { formatId } from "./utilities/use-id.js";
15
+ import { dismissable } from "./interactions/dismissable.js";
16
+ import { focusable } from "./interactions/focusable.js";
17
+ import { hoverable } from "./interactions/hoverable.js";
18
+ import { rovingFocus } from "./interactions/roving-focus.js";
19
+ import { controllableState, isControlled, makeControllable, resolveControllable } from "./state/controllable.js";
20
+ import { IconBase, getIconContractProps, isIconSizeToken, joinIconStyle, normalizeIconSizeValue, resolveIconSizeVariable, resolveIconStrokeWidthVariable, serializeIconStyle } from "./icon/icon.js";
21
+ import "./core.js";
22
+ export { DefaultPortal, IconBase, Portal, Presence, Slot, applyInteractionPolicy, ariaDisabled, ariaExpanded, ariaSelected, composeHandlers, composeRefs, controllableState, createCollection, createLayer, definePortal, dismissable, focusable, formatId, getIconContractProps, hoverable, isControlled, isIconSizeToken, joinIconStyle, layout, makeControllable, mergeInteractionProps, mergeProps, normalizeIconSizeValue, pressable, resolveControllable, resolveIconSizeVariable, resolveIconStrokeWidthVariable, rovingFocus, serializeIconStyle, setRef };
@@ -1,3 +1,6 @@
1
+ import { KeyboardLikeEvent, PointerLikeEvent } from "../utilities/event-types.js";
2
+
3
+ //#region src/foundations/interactions/dismissable.d.ts
1
4
  /**
2
5
  * dismissable
3
6
  *
@@ -36,23 +39,28 @@
36
39
  * ❌ Can't create custom escape handler - this is the only one
37
40
  * ❌ Can't bypass via direct event listeners - mergeProps composes correctly
38
41
  */
39
- export interface DismissableOptions {
40
- /**
41
- * Reference to the element for outside click detection
42
- */
43
- node?: Node | null;
44
- /**
45
- * Whether dismiss is disabled
46
- */
47
- disabled?: boolean;
48
- /**
49
- * Called when dismiss is triggered (Escape or outside click)
50
- */
51
- onDismiss?: (trigger: 'escape' | 'outside') => void;
42
+ interface DismissableOptions {
43
+ /**
44
+ * Reference to the element for outside click detection
45
+ */
46
+ node?: Node | null;
47
+ /**
48
+ * Whether dismiss is disabled
49
+ */
50
+ disabled?: boolean;
51
+ /**
52
+ * Called when dismiss is triggered (Escape or outside click)
53
+ */
54
+ onDismiss?: (trigger: 'escape' | 'outside') => void;
52
55
  }
53
- import type { KeyboardLikeEvent, PointerLikeEvent } from '../utilities/event-types';
54
- export declare function dismissable({ node, disabled, onDismiss }: DismissableOptions): {
55
- onKeyDown: (e: KeyboardLikeEvent) => void;
56
- onPointerDownCapture: (e: PointerLikeEvent) => void;
56
+ declare function dismissable({
57
+ node,
58
+ disabled,
59
+ onDismiss
60
+ }: DismissableOptions): {
61
+ onKeyDown: (e: KeyboardLikeEvent) => void;
62
+ onPointerDownCapture: (e: PointerLikeEvent) => void;
57
63
  };
64
+ //#endregion
65
+ export { DismissableOptions, dismissable };
58
66
  //# sourceMappingURL=dismissable.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"dismissable.d.ts","sourceRoot":"","sources":["../../../src/foundations/interactions/dismissable.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AAEH,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IAEnB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;OAEG;IACH,SAAS,CAAC,EAAE,CAAC,OAAO,EAAE,QAAQ,GAAG,SAAS,KAAK,IAAI,CAAC;CACrD;AAED,OAAO,KAAK,EACV,iBAAiB,EACjB,gBAAgB,EACjB,MAAM,0BAA0B,CAAC;AAElC,wBAAgB,WAAW,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,kBAAkB;mBACjD,iBAAiB;8BASN,gBAAgB;EAoBtD"}
1
+ {"version":3,"file":"dismissable.d.ts","names":[],"sources":["../../../src/foundations/interactions/dismissable.ts"],"mappings":";;;;;;AAuCA;;;;;;;;;;;AAsBA;;;;;;;;;;;;;;;;;;;;;;;;UAtBiB,kBAAA;EAgCsC;;;EA5BrD,IAAA,GAAO,IAAA;;;;EAKP,QAAA;;;;EAKA,SAAA,IAAa,OAAA;AAAA;AAAA,iBAQC,WAAA,CAAA;EAAc,IAAA;EAAM,QAAA;EAAU;AAAA,GAAa,kBAAA;iBAC/B,iBAAA;4BASW,gBAAA;AAAA"}
@@ -1 +1,26 @@
1
- function u({node:t,disabled:e,onDismiss:r}){function i(n){e||n.key==="Escape"&&(n.preventDefault?.(),n.stopPropagation?.(),r?.("escape"))}function a(n){if(e)return;const o=n.target;o instanceof Node&&t&&(t.contains(o)||r?.("outside"))}return{onKeyDown:i,onPointerDownCapture:a}}export{u as dismissable};
1
+ //#region src/foundations/interactions/dismissable.ts
2
+ function dismissable({ node, disabled, onDismiss }) {
3
+ function handleKeyDown(e) {
4
+ if (disabled) return;
5
+ if (e.key === "Escape") {
6
+ e.preventDefault?.();
7
+ e.stopPropagation?.();
8
+ onDismiss?.("escape");
9
+ }
10
+ }
11
+ function handlePointerDownCapture(e) {
12
+ if (disabled) return;
13
+ const target = e.target;
14
+ if (!(target instanceof Node)) return;
15
+ if (!node) return;
16
+ if (!node.contains(target)) onDismiss?.("outside");
17
+ }
18
+ return {
19
+ onKeyDown: handleKeyDown,
20
+ onPointerDownCapture: handlePointerDownCapture
21
+ };
22
+ }
23
+ //#endregion
24
+ export { dismissable };
25
+
26
+ //# sourceMappingURL=dismissable.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dismissable.js","names":[],"sources":["../../../src/foundations/interactions/dismissable.ts"],"sourcesContent":["/**\n * dismissable\n *\n * THE dismissal primitive. Handles Escape key and outside interactions.\n *\n * INVARIANTS:\n * 1. Returns props that compose via mergeProps (no factories)\n * 2. Disabled state respected exactly once, here\n * 3. No side effects - pure props generation\n * 4. Outside detection requires explicit node reference\n * 5. This is the ONLY dismissal primitive - do not create alternatives\n *\n * DESIGN:\n * - Returns standard event handler props (onKeyDown, onPointerDownCapture)\n * - Composable via mergeProps with other foundations\n * - Caller provides node reference for outside detection\n * - Single onDismiss callback for all dismiss triggers\n *\n * PIT OF SUCCESS:\n * ✓ Can't accidentally bypass (only way to get dismiss behavior)\n * ✓ Can't duplicate (disabled checked once)\n * ✓ Composes via mergeProps (standard props)\n * ✓ Wrong usage is hard (no factories to misuse)\n *\n * USAGE:\n * const props = dismissable({\n * node: elementRef,\n * disabled: false,\n * onDismiss: () => close()\n * });\n *\n * <div ref={elementRef} {...props}>Content</div>\n *\n * MISUSE EXAMPLE (PREVENTED):\n * ❌ Can't forget to check disabled - checked inside dismissable\n * ❌ Can't create custom escape handler - this is the only one\n * ❌ Can't bypass via direct event listeners - mergeProps composes correctly\n */\n\nexport interface DismissableOptions {\n /**\n * Reference to the element for outside click detection\n */\n node?: Node | null;\n\n /**\n * Whether dismiss is disabled\n */\n disabled?: boolean;\n\n /**\n * Called when dismiss is triggered (Escape or outside click)\n */\n onDismiss?: (trigger: 'escape' | 'outside') => void;\n}\n\nimport type {\n KeyboardLikeEvent,\n PointerLikeEvent,\n} from '../utilities/event-types';\n\nexport function dismissable({ node, disabled, onDismiss }: DismissableOptions) {\n function handleKeyDown(e: KeyboardLikeEvent) {\n if (disabled) return;\n if (e.key === 'Escape') {\n e.preventDefault?.();\n e.stopPropagation?.();\n onDismiss?.('escape');\n }\n }\n\n function handlePointerDownCapture(e: PointerLikeEvent) {\n if (disabled) return;\n\n const target = e.target;\n if (!(target instanceof Node)) return;\n\n // If no node provided, can't detect outside clicks\n if (!node) return;\n\n // Check if click is outside\n if (!node.contains(target)) {\n onDismiss?.('outside');\n }\n }\n\n return {\n onKeyDown: handleKeyDown,\n // Use capture phase to catch events before they bubble\n onPointerDownCapture: handlePointerDownCapture,\n };\n}\n"],"mappings":";AA6DA,SAAgB,YAAY,EAAE,MAAM,UAAU,aAAiC;CAC7E,SAAS,cAAc,GAAsB;AAC3C,MAAI,SAAU;AACd,MAAI,EAAE,QAAQ,UAAU;AACtB,KAAE,kBAAkB;AACpB,KAAE,mBAAmB;AACrB,eAAY,SAAS;;;CAIzB,SAAS,yBAAyB,GAAqB;AACrD,MAAI,SAAU;EAEd,MAAM,SAAS,EAAE;AACjB,MAAI,EAAE,kBAAkB,MAAO;AAG/B,MAAI,CAAC,KAAM;AAGX,MAAI,CAAC,KAAK,SAAS,OAAO,CACxB,aAAY,UAAU;;AAI1B,QAAO;EACL,WAAW;EAEX,sBAAsB;EACvB"}
@@ -1,16 +1,22 @@
1
+ //#region src/foundations/interactions/focusable.d.ts
1
2
  /**
2
3
  * focusable
3
4
  *
4
5
  * Normalize focus-related props for hosts.
5
6
  * - No DOM manipulation here; returns props that the runtime may attach.
6
7
  */
7
- export interface FocusableOptions {
8
- disabled?: boolean;
9
- tabIndex?: number | undefined;
8
+ interface FocusableOptions {
9
+ disabled?: boolean;
10
+ tabIndex?: number | undefined;
10
11
  }
11
- export interface FocusableResult {
12
- tabIndex?: number;
13
- 'aria-disabled'?: 'true';
12
+ interface FocusableResult {
13
+ tabIndex?: number;
14
+ 'aria-disabled'?: 'true';
14
15
  }
15
- export declare function focusable({ disabled, tabIndex, }: FocusableOptions): FocusableResult;
16
+ declare function focusable({
17
+ disabled,
18
+ tabIndex
19
+ }: FocusableOptions): FocusableResult;
20
+ //#endregion
21
+ export { FocusableOptions, FocusableResult, focusable };
16
22
  //# sourceMappingURL=focusable.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"focusable.d.ts","sourceRoot":"","sources":["../../../src/foundations/interactions/focusable.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC/B;AAED,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,wBAAgB,SAAS,CAAC,EACxB,QAAQ,EACR,QAAQ,GACT,EAAE,gBAAgB,GAAG,eAAe,CAKpC"}
1
+ {"version":3,"file":"focusable.d.ts","names":[],"sources":["../../../src/foundations/interactions/focusable.ts"],"mappings":";;AASA;;;;;UAAiB,gBAAA;EACf,QAAA;EACA,QAAA;AAAA;AAAA,UAGe,eAAA;EACf,QAAA;EACA,eAAA;AAAA;AAAA,iBAGc,SAAA,CAAA;EACd,QAAA;EACA;AAAA,GACC,gBAAA,GAAmB,eAAA"}
@@ -1 +1,18 @@
1
- import{ariaDisabled as i}from"../utilities/aria.js";function a({disabled:o,tabIndex:r}){return{tabIndex:o?-1:r===void 0?0:r,...i(o)}}export{a as focusable};
1
+ import { ariaDisabled } from "../utilities/aria.js";
2
+ //#region src/foundations/interactions/focusable.ts
3
+ /**
4
+ * focusable
5
+ *
6
+ * Normalize focus-related props for hosts.
7
+ * - No DOM manipulation here; returns props that the runtime may attach.
8
+ */
9
+ function focusable({ disabled, tabIndex }) {
10
+ return {
11
+ tabIndex: disabled ? -1 : tabIndex === void 0 ? 0 : tabIndex,
12
+ ...ariaDisabled(disabled)
13
+ };
14
+ }
15
+ //#endregion
16
+ export { focusable };
17
+
18
+ //# sourceMappingURL=focusable.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"focusable.js","names":[],"sources":["../../../src/foundations/interactions/focusable.ts"],"sourcesContent":["/**\n * focusable\n *\n * Normalize focus-related props for hosts.\n * - No DOM manipulation here; returns props that the runtime may attach.\n */\n\nimport { ariaDisabled } from '../utilities/aria';\n\nexport interface FocusableOptions {\n disabled?: boolean;\n tabIndex?: number | undefined;\n}\n\nexport interface FocusableResult {\n tabIndex?: number;\n 'aria-disabled'?: 'true';\n}\n\nexport function focusable({\n disabled,\n tabIndex,\n}: FocusableOptions): FocusableResult {\n return {\n tabIndex: disabled ? -1 : tabIndex === undefined ? 0 : tabIndex,\n ...ariaDisabled(disabled),\n };\n}\n"],"mappings":";;;;;;;;AAmBA,SAAgB,UAAU,EACxB,UACA,YACoC;AACpC,QAAO;EACL,UAAU,WAAW,KAAK,aAAa,SAAY,IAAI;EACvD,GAAG,aAAa,SAAS;EAC1B"}
@@ -1,19 +1,26 @@
1
+ import { DefaultPreventable, PropagationStoppable } from "../utilities/event-types.js";
2
+
3
+ //#region src/foundations/interactions/hoverable.d.ts
1
4
  /**
2
5
  * hoverable
3
6
  *
4
7
  * Produces props for pointer enter/leave handling. Pure and deterministic.
5
8
  */
6
- export interface HoverableOptions {
7
- disabled?: boolean;
8
- onEnter?: (e: HoverEvent) => void;
9
- onLeave?: (e: HoverEvent) => void;
9
+ interface HoverableOptions {
10
+ disabled?: boolean;
11
+ onEnter?: (e: HoverEvent) => void;
12
+ onLeave?: (e: HoverEvent) => void;
10
13
  }
11
- import type { DefaultPreventable, PropagationStoppable } from '../utilities/event-types';
12
14
  type HoverEvent = DefaultPreventable & PropagationStoppable;
13
- export interface HoverableResult {
14
- onPointerEnter?: (e: HoverEvent) => void;
15
- onPointerLeave?: (e: HoverEvent) => void;
15
+ interface HoverableResult {
16
+ onPointerEnter?: (e: HoverEvent) => void;
17
+ onPointerLeave?: (e: HoverEvent) => void;
16
18
  }
17
- export declare function hoverable({ disabled, onEnter, onLeave, }: HoverableOptions): HoverableResult;
18
- export {};
19
+ declare function hoverable({
20
+ disabled,
21
+ onEnter,
22
+ onLeave
23
+ }: HoverableOptions): HoverableResult;
24
+ //#endregion
25
+ export { HoverableOptions, HoverableResult, hoverable };
19
26
  //# sourceMappingURL=hoverable.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"hoverable.d.ts","sourceRoot":"","sources":["../../../src/foundations/interactions/hoverable.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,UAAU,KAAK,IAAI,CAAC;IAClC,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,UAAU,KAAK,IAAI,CAAC;CACnC;AAED,OAAO,KAAK,EACV,kBAAkB,EAClB,oBAAoB,EACrB,MAAM,0BAA0B,CAAC;AAElC,KAAK,UAAU,GAAG,kBAAkB,GAAG,oBAAoB,CAAC;AAE5D,MAAM,WAAW,eAAe;IAC9B,cAAc,CAAC,EAAE,CAAC,CAAC,EAAE,UAAU,KAAK,IAAI,CAAC;IACzC,cAAc,CAAC,EAAE,CAAC,CAAC,EAAE,UAAU,KAAK,IAAI,CAAC;CAC1C;AAED,wBAAgB,SAAS,CAAC,EACxB,QAAQ,EACR,OAAO,EACP,OAAO,GACR,EAAE,gBAAgB,GAAG,eAAe,CAapC"}
1
+ {"version":3,"file":"hoverable.d.ts","names":[],"sources":["../../../src/foundations/interactions/hoverable.ts"],"mappings":";;;;;;AAMA;;UAAiB,gBAAA;EACf,QAAA;EACA,OAAA,IAAW,CAAA,EAAG,UAAA;EACd,OAAA,IAAW,CAAA,EAAG,UAAA;AAAA;AAAA,KAQX,UAAA,GAAa,kBAAA,GAAqB,oBAAA;AAAA,UAEtB,eAAA;EACf,cAAA,IAAkB,CAAA,EAAG,UAAA;EACrB,cAAA,IAAkB,CAAA,EAAG,UAAA;AAAA;AAAA,iBAGP,SAAA,CAAA;EACd,QAAA;EACA,OAAA;EACA;AAAA,GACC,gBAAA,GAAmB,eAAA"}
@@ -1 +1,15 @@
1
- function t({disabled:e,onEnter:n,onLeave:r}){return{onPointerEnter:e?void 0:o=>{n?.(o)},onPointerLeave:e?void 0:o=>{r?.(o)}}}export{t as hoverable};
1
+ //#region src/foundations/interactions/hoverable.ts
2
+ function hoverable({ disabled, onEnter, onLeave }) {
3
+ return {
4
+ onPointerEnter: disabled ? void 0 : (e) => {
5
+ onEnter?.(e);
6
+ },
7
+ onPointerLeave: disabled ? void 0 : (e) => {
8
+ onLeave?.(e);
9
+ }
10
+ };
11
+ }
12
+ //#endregion
13
+ export { hoverable };
14
+
15
+ //# sourceMappingURL=hoverable.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hoverable.js","names":[],"sources":["../../../src/foundations/interactions/hoverable.ts"],"sourcesContent":["/**\n * hoverable\n *\n * Produces props for pointer enter/leave handling. Pure and deterministic.\n */\n\nexport interface HoverableOptions {\n disabled?: boolean;\n onEnter?: (e: HoverEvent) => void;\n onLeave?: (e: HoverEvent) => void;\n}\n\nimport type {\n DefaultPreventable,\n PropagationStoppable,\n} from '../utilities/event-types';\n\ntype HoverEvent = DefaultPreventable & PropagationStoppable;\n\nexport interface HoverableResult {\n onPointerEnter?: (e: HoverEvent) => void;\n onPointerLeave?: (e: HoverEvent) => void;\n}\n\nexport function hoverable({\n disabled,\n onEnter,\n onLeave,\n}: HoverableOptions): HoverableResult {\n return {\n onPointerEnter: disabled\n ? undefined\n : (e) => {\n onEnter?.(e);\n },\n onPointerLeave: disabled\n ? undefined\n : (e) => {\n onLeave?.(e);\n },\n };\n}\n"],"mappings":";AAwBA,SAAgB,UAAU,EACxB,UACA,SACA,WACoC;AACpC,QAAO;EACL,gBAAgB,WACZ,UACC,MAAM;AACL,aAAU,EAAE;;EAElB,gBAAgB,WACZ,UACC,MAAM;AACL,aAAU,EAAE;;EAEnB"}
@@ -1,86 +1,38 @@
1
- /**
2
- * INTERACTION POLICY (FRAMEWORK LAW)
3
- *
4
- * This is THE ONLY way to create interactive elements. Components MUST NOT
5
- * implement interaction logic directly.
6
- *
7
- * INVARIANTS (ENFORCED):
8
- * 1. "Press" is the semantic. Click/touch/Enter/Space are implementation details.
9
- * 2. Disabled is enforced exactly once, here. Components may not check disabled.
10
- * 3. Keyboard handling is automatic. Components may not add onKeyDown for activation.
11
- * 4. Native elements opt out of polyfills, not semantics.
12
- * 5. asChild may replace the host element, not interaction behavior.
13
- * 6. This policy is the SINGLE SOURCE OF TRUTH for interactive behavior.
14
- *
15
- * DESIGN:
16
- * - Single public function: applyInteractionPolicy
17
- * - Returns props that compose via mergeProps
18
- * - Delegates to pressable for mechanics
19
- * - Enforces disabled once and only once
20
- * - No configuration beyond disabled and native element type
21
- *
22
- * PIT OF SUCCESS:
23
- * ✓ Can't bypass policy (only way to get interaction behavior)
24
- * ✓ Can't duplicate disabled checks (enforced once, here)
25
- * ✓ Can't write custom keyboard handlers for buttons (policy owns it)
26
- * ✓ Composes via mergeProps (standard props)
27
- * ✓ Wrong usage is impossible (no escape hatch)
28
- *
29
- * USAGE:
30
- * function Button({ onPress, disabled }) {
31
- * const interaction = applyInteractionPolicy({
32
- * isNative: true,
33
- * disabled,
34
- * onPress
35
- * });
36
- *
37
- * return <button {...interaction}>Click me</button>;
38
- * }
39
- *
40
- * MISUSE EXAMPLE (PREVENTED):
41
- * ❌ Button checking disabled again:
42
- * function Button({ disabled, onPress }) {
43
- * if (disabled) return; // NO! Policy handles this
44
- * const interaction = applyInteractionPolicy(...);
45
- * }
46
- *
47
- * ❌ Custom keyboard handler:
48
- * function Button({ onPress }) {
49
- * const interaction = applyInteractionPolicy(...);
50
- * return <button {...interaction} onKeyDown={...}>; // NO! Policy owns this
51
- * }
52
- *
53
- * ❌ Direct event handler:
54
- * <button onClick={onPress}>; // NO! Use applyInteractionPolicy
55
- */
56
- import { Ref } from '../utilities/compose-ref';
57
- export interface InteractionPolicyInput {
58
- /** Whether the host element is a native interactive element (button, a, etc) */
59
- isNative: boolean;
60
- /** Disabled state - checked ONLY here, never in components */
61
- disabled: boolean;
62
- /** User-provided press handler - semantic action, not DOM event */
63
- onPress?: (e: Event) => void;
64
- /** Optional ref to compose */
65
- ref?: Ref<unknown>;
1
+ import { Ref } from "../utilities/compose-ref.js";
2
+ import { DefaultPreventable, KeyboardLikeEvent, PropagationStoppable } from "../utilities/event-types.js";
3
+ //#region src/foundations/interactions/interaction-policy.d.ts
4
+ interface InteractionPolicyInput {
5
+ /** Whether the host element is a native interactive element (button, a, etc) */
6
+ isNative: boolean;
7
+ /** Disabled state - checked ONLY here, never in components */
8
+ disabled: boolean;
9
+ /** User-provided press handler - semantic action, not DOM event */
10
+ onPress?: (e: Event) => void;
11
+ /** Optional ref to compose */
12
+ ref?: Ref<unknown>;
66
13
  }
67
14
  /**
68
15
  * THE interaction policy. Components MUST use this, NEVER implement
69
16
  * interaction logic directly.
70
17
  */
71
- export declare function applyInteractionPolicy({ isNative, disabled, onPress, ref, }: InteractionPolicyInput): {
72
- disabled: true | undefined;
73
- onClick: (e: Event) => void;
74
- ref: Ref<unknown>;
18
+ declare function applyInteractionPolicy({
19
+ isNative,
20
+ disabled,
21
+ onPress,
22
+ ref
23
+ }: InteractionPolicyInput): {
24
+ disabled: true | undefined;
25
+ onClick: (e: Event) => void;
26
+ ref: Ref<unknown>;
75
27
  } | {
76
- 'aria-disabled': true | undefined;
77
- tabIndex: number;
78
- ref: Ref<unknown>;
79
- onClick: (e: import("../utilities").DefaultPreventable & import("../utilities").PropagationStoppable) => void;
80
- disabled?: true;
81
- role?: "button";
82
- onKeyDown?: (e: import("../utilities").KeyboardLikeEvent) => void;
83
- onKeyUp?: (e: import("../utilities").KeyboardLikeEvent) => void;
28
+ 'aria-disabled': true | undefined;
29
+ tabIndex: number;
30
+ ref: Ref<unknown>;
31
+ onClick: (e: DefaultPreventable & PropagationStoppable) => void;
32
+ disabled?: true;
33
+ role?: "button";
34
+ onKeyDown?: (e: KeyboardLikeEvent) => void;
35
+ onKeyUp?: (e: KeyboardLikeEvent) => void;
84
36
  };
85
37
  /**
86
38
  * Merge rule for Slot / asChild
@@ -92,5 +44,7 @@ export declare function applyInteractionPolicy({ isNative, disabled, onPress, re
92
44
  * Refs are always composed.
93
45
  * Policy props MUST take precedence to enforce invariants.
94
46
  */
95
- export declare function mergeInteractionProps(childProps: Record<string, unknown>, policyProps: Record<string, unknown>, userProps?: Record<string, unknown>): Record<string, unknown>;
47
+ declare function mergeInteractionProps(childProps: Record<string, unknown>, policyProps: Record<string, unknown>, userProps?: Record<string, unknown>): Record<string, unknown>;
48
+ //#endregion
49
+ export { InteractionPolicyInput, applyInteractionPolicy, mergeInteractionProps };
96
50
  //# sourceMappingURL=interaction-policy.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"interaction-policy.d.ts","sourceRoot":"","sources":["../../../src/foundations/interactions/interaction-policy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsDG;AAIH,OAAO,EAAe,GAAG,EAAE,MAAM,0BAA0B,CAAC;AAG5D,MAAM,WAAW,sBAAsB;IACrC,gFAAgF;IAChF,QAAQ,EAAE,OAAO,CAAC;IAClB,8DAA8D;IAC9D,QAAQ,EAAE,OAAO,CAAC;IAClB,mEAAmE;IACnE,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,KAAK,IAAI,CAAC;IAC7B,8BAA8B;IAC9B,GAAG,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC;CACpB;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,EACrC,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,GAAG,GACJ,EAAE,sBAAsB;;iBAcN,KAAK;;;;;;;;;;;EAkBvB;AAED;;;;;;;;;GASG;AACH,wBAAgB,qBAAqB,CACnC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACnC,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACpC,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,2BAiCpC"}
1
+ {"version":3,"file":"interaction-policy.d.ts","names":[],"sources":["../../../src/foundations/interactions/interaction-policy.ts"],"mappings":";;;UA6DiB,sBAAA;;EAEf,QAAA;;EAEA,QAAA;;EAEA,OAAA,IAAW,CAAA,EAAG,KAAA;;EAEd,GAAA,GAAM,GAAA;AAAA;;;AAwDR;;iBAjDgB,sBAAA,CAAA;EACd,QAAA;EACA,QAAA;EACA,OAAA;EACA;AAAA,GACC,sBAAA;;eAcgB,KAAA;;;;;;;;;;;;;;;;;;;;;;iBA8BH,qBAAA,CACd,UAAA,EAAY,MAAA,mBACZ,WAAA,EAAa,MAAA,mBACb,SAAA,GAAY,MAAA,oBAAuB,MAAA"}