acrylblends 1.0.4 → 1.0.6

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 (351) hide show
  1. package/docs/framework/agents/index.md +7 -5
  2. package/lib/accept-CNNHu4Cf.js +193 -0
  3. package/lib/{accepts-XBuZPVRI.js → accepts-Btq83xPd.js} +1 -1
  4. package/lib/accepts.js +1 -1
  5. package/lib/acryl-base.js +1 -331
  6. package/lib/adapter-CaZ6FZUU.js +37 -0
  7. package/lib/adapter.js +1 -36
  8. package/lib/{app-BM0rTCp7.js → app-CQcGWjrk.js} +4 -4
  9. package/lib/app-base-CpRMZL4v.js +332 -0
  10. package/lib/{audit-D5z9uwOP.d.ts → audit-GcLtvNLV.d.ts} +4 -2
  11. package/lib/{base-NSN_SNv-.js → base-D_6kfOr-.js} +1 -1
  12. package/lib/basic-auth-C0HTRpXh.js +20 -0
  13. package/lib/basic-auth-DFLflXNe.js +95 -0
  14. package/lib/basic-auth.js +1 -94
  15. package/lib/bearer-auth-Cwxt-vgS.js +94 -0
  16. package/lib/bearer-auth.js +1 -93
  17. package/lib/body-D7f4e7w_.js +94 -0
  18. package/lib/body-limit-WmIjWRLt.js +66 -0
  19. package/lib/body-limit.js +1 -65
  20. package/lib/buffer-CkEOJCcY.js +51 -0
  21. package/lib/bun.js +3 -3
  22. package/lib/cache-B0bHH7s5.js +169 -0
  23. package/lib/cache.js +1 -168
  24. package/lib/{client-DDLXwhBo.js → client-BrMFnMEd.js} +1 -1
  25. package/lib/{client-modules-CLvWOjbd.js → client-modules-drj4mjhj.js} +4 -4
  26. package/lib/client.js +1 -1
  27. package/lib/color-COa3DplO.js +37 -0
  28. package/lib/combine-TWuGdcbC.js +137 -0
  29. package/lib/combine.js +1 -136
  30. package/lib/{components-cEW3ovK0.js → components-B2ka9Ax1.js} +4 -4
  31. package/lib/{components-JXVm45kK.js → components-PVXwaOaC.js} +2 -2
  32. package/lib/compress-BzWqsHF1.js +79 -0
  33. package/lib/compress-C-9vK4B2.d.ts +11 -0
  34. package/lib/compress-DCyrrQ5D.js +11 -0
  35. package/lib/compress.d.ts +1 -1
  36. package/lib/compress.js +2 -78
  37. package/lib/concurrent-DrF3d2c-.js +30 -0
  38. package/lib/conninfo-BCROmdnf.d.ts +11 -0
  39. package/lib/conninfo-CWJwieh4.js +19 -0
  40. package/lib/constants-CBSEudrb.js +7 -0
  41. package/lib/{context-DDO0cfuP.js → context-CkOh7Ygv.js} +2 -2
  42. package/lib/context-storage-iuPoI_CR.js +52 -0
  43. package/lib/context-storage.js +1 -51
  44. package/lib/cookie-B1LlkzOe.js +125 -0
  45. package/lib/cookie-BHIduy2T.js +82 -0
  46. package/lib/cookie.js +1 -81
  47. package/lib/cordis/db-sqlite.d.ts +1 -1
  48. package/lib/cordis/door.d.ts +99 -5
  49. package/lib/cordis/door.js +562 -20
  50. package/lib/cordis/inspect.js +4 -4
  51. package/lib/cordis/kv-db.d.ts +1 -1
  52. package/lib/cordis/kv-db.js +1 -1
  53. package/lib/cordis/kv-json.d.ts +1 -1
  54. package/lib/cordis/kv-json.js +1 -1
  55. package/lib/cordis/node-server.d.ts +1 -1
  56. package/lib/cordis/node-server.js +3 -116
  57. package/lib/cordis/router-http.js +2 -2
  58. package/lib/cordis/router.js +4 -4
  59. package/lib/cordis/state.js +7 -7
  60. package/lib/{core-CaY8XDZ6.js → core-BOu1jYua.js} +1 -1
  61. package/lib/cors-CbAQ-8qU.js +106 -0
  62. package/lib/cors.js +1 -105
  63. package/lib/crypto-iVP-N-tS.js +34 -0
  64. package/lib/csrf-DqqOZtgy.js +101 -0
  65. package/lib/csrf.js +1 -100
  66. package/lib/css-C5CPVMvM.js +134 -0
  67. package/lib/css.js +2 -133
  68. package/lib/db/sqlite.d.ts +1 -25
  69. package/lib/dev-CLgu-JRe.js +50 -0
  70. package/lib/dev.js +1 -49
  71. package/lib/dom-YjND9Jt3.js +74 -0
  72. package/lib/door/host.d.ts +2 -2
  73. package/lib/door/host.js +1 -1
  74. package/lib/door/page.d.ts +3 -1
  75. package/lib/door/page.js +2 -2
  76. package/lib/door/protocol.d.ts +1 -1
  77. package/lib/door/protocol.js +1 -212
  78. package/lib/encode-BhbNLrjp.js +33 -0
  79. package/lib/factory-CLdSf-xS.js +30 -0
  80. package/lib/factory.js +1 -29
  81. package/lib/handler-C0wZ0KwO.js +12 -0
  82. package/lib/helpers-BEjcdbgw.js +5 -0
  83. package/lib/{hooks-w72iLeFR.js → hooks-CfC07ri0.js} +1 -1
  84. package/lib/html-CgNa89xw.js +31 -0
  85. package/lib/html-DGExBFNg.js +103 -0
  86. package/lib/html.d.ts +2 -5
  87. package/lib/html.js +2 -30
  88. package/lib/http-exception-MjWkT89V.js +54 -0
  89. package/lib/http-exception.js +1 -53
  90. package/lib/index-dAzQsJG9.d.ts +6 -0
  91. package/lib/index.js +3 -3
  92. package/lib/ip-restriction-jKtKCRM_.js +166 -0
  93. package/lib/ip-restriction.js +1 -165
  94. package/lib/ipaddr-DCoIo528.js +238 -0
  95. package/lib/jsx/dom/client.js +1 -1
  96. package/lib/jsx/dom/jsx-dev-runtime.js +1 -1
  97. package/lib/jsx/dom/jsx-runtime.js +2 -1
  98. package/lib/jsx/dom/server.js +3 -3
  99. package/lib/jsx/dom.js +5 -73
  100. package/lib/jsx/jsx-dev-runtime.d.ts +2 -5
  101. package/lib/jsx/jsx-dev-runtime.js +2 -13
  102. package/lib/jsx/jsx-runtime.d.ts +2 -2
  103. package/lib/jsx/jsx-runtime.js +4 -4
  104. package/lib/jsx/streaming.js +1 -1
  105. package/lib/jsx-CUQgttxU.js +47 -0
  106. package/lib/jsx-dev-runtime-B4WTyq8r.js +14 -0
  107. package/lib/{jsx-dev-runtime-CWLRA2F3.js → jsx-dev-runtime-BLfA-EhI.js} +2 -2
  108. package/lib/jsx-dev-runtime-CGt4kNYr.d.ts +6 -0
  109. package/lib/jsx-renderer-CfifM4hT.js +99 -0
  110. package/lib/jsx-renderer.js +1 -98
  111. package/lib/jsx-runtime-COCRWBJ9.js +2 -0
  112. package/lib/jsx.js +5 -46
  113. package/lib/{jwk-LkzeoaU8.js → jwk-CDPpYQpD.js} +3 -3
  114. package/lib/jwk.js +1 -1
  115. package/lib/{jwt-BGJBw5AF.js → jwt-BXoIA2fQ.js} +2 -2
  116. package/lib/{jwt-CskdhEW9.js → jwt-lyS4Q3mT.js} +3 -3
  117. package/lib/jwt.js +2 -2
  118. package/lib/kv/db.d.ts +1 -10
  119. package/lib/kv/db.js +1 -56
  120. package/lib/kv/json.d.ts +1 -9
  121. package/lib/kv/json.js +1 -223
  122. package/lib/{language-D9a4zqvn.js → language-DeGRtLJt.js} +2 -2
  123. package/lib/language.js +1 -1
  124. package/lib/{linear-router-C3FPib6h.js → linear-router-CmZn_JLV.js} +2 -2
  125. package/lib/logger-Ckxu8diz.js +54 -0
  126. package/lib/logger.js +1 -53
  127. package/lib/loopback-only-BbasoF7R.js +90 -0
  128. package/lib/loopback-only.js +1 -89
  129. package/lib/method-not-allowed-TO2_hnfl.js +82 -0
  130. package/lib/method-not-allowed.js +1 -81
  131. package/lib/method-override-DnZKfJbV.js +103 -0
  132. package/lib/method-override.js +1 -102
  133. package/lib/middleware-BfG_fp8P.js +12 -0
  134. package/lib/mime-BnScXkQn.js +77 -0
  135. package/lib/mount-QkK_3NtJ.js +67 -0
  136. package/lib/mount.js +1 -66
  137. package/lib/node-server/conninfo.d.ts +1 -10
  138. package/lib/node-server/conninfo.js +1 -18
  139. package/lib/node-server/register.js +25 -2
  140. package/lib/node-server/serve-static.d.ts +1 -17
  141. package/lib/node-server/serve-static.js +1 -1
  142. package/lib/node-server.d.ts +2 -2
  143. package/lib/node-server.js +4 -4
  144. package/lib/open-BqK4D2Wn.d.ts +11 -0
  145. package/lib/open-But9E2rL.js +57 -0
  146. package/lib/open-CULVJgOc.d.ts +12 -0
  147. package/lib/open-Dp4sxspc.js +224 -0
  148. package/lib/open-T7kgbO2O.d.ts +27 -0
  149. package/lib/{pattern-router-HZxjDGEQ.js → pattern-router-CJBecJBd.js} +1 -1
  150. package/lib/powered-by-CXQNjNIX.js +24 -0
  151. package/lib/powered-by.js +1 -23
  152. package/lib/pretty-json-CeC1yvYt.js +39 -0
  153. package/lib/pretty-json.js +1 -38
  154. package/lib/{protocol-C37gPePD.d.ts → protocol-CR31M7K_.d.ts} +2 -0
  155. package/lib/protocol-Dt0AZBOz.js +213 -0
  156. package/lib/proxy-C2w_mH7k.js +121 -0
  157. package/lib/proxy.js +1 -120
  158. package/lib/quick.js +4 -4
  159. package/lib/{reg-exp-router-DC1R3qoY.js → reg-exp-router-C_WV84eV.js} +2 -2
  160. package/lib/request-DvMgGtlW.js +323 -0
  161. package/lib/request.js +1 -322
  162. package/lib/route-D8m-a2I1.js +126 -0
  163. package/lib/route.js +1 -125
  164. package/lib/router/linear-router.js +1 -1
  165. package/lib/router/pattern-router.js +1 -1
  166. package/lib/router/reg-exp-router.js +1 -1
  167. package/lib/router/smart-router.js +1 -1
  168. package/lib/router/trie-router.js +1 -1
  169. package/lib/router-Be_o6nFu.js +35 -0
  170. package/lib/router.js +1 -34
  171. package/lib/schema-validator-EK3cUUCt.js +22 -0
  172. package/lib/schema-validator.js +1 -21
  173. package/lib/{secure-headers-mP3j6Hm6.js → secure-headers-C5ZOcXqk.js} +1 -1
  174. package/lib/secure-headers.js +1 -1
  175. package/lib/serve-static-B7sqnftW.d.ts +18 -0
  176. package/lib/{serve-static-3uo_9rjF.js → serve-static-C1Nkj_xB.js} +2 -2
  177. package/lib/{serve-static-Cp5adzGo.js → serve-static-EiJf1zkO.js} +4 -4
  178. package/lib/serve-static.js +1 -1
  179. package/lib/{smart-router-C5CZ5XSM.js → smart-router-BjxkDQCE.js} +1 -1
  180. package/lib/{snapshot-text-BLz8nlSc.js → snapshot-text-CtQm3n8n.js} +23 -14
  181. package/lib/{src-dy3Fk9tA.js → src-BTBm4OPD.js} +6 -6
  182. package/lib/src-LX0E4ec4.js +117 -0
  183. package/lib/{ssg-BwjcA-Ge.js → ssg-BEl7MHqg.js} +5 -5
  184. package/lib/ssg.js +1 -1
  185. package/lib/stream-CzM_SHkq.js +88 -0
  186. package/lib/{streaming-DHST3Scg.js → streaming-BlDaph8U.js} +3 -3
  187. package/lib/streaming.js +1 -1
  188. package/lib/{test-websocket-D8WWqE5G.js → test-websocket-BLeEvybj.js} +2 -2
  189. package/lib/testing-BQx5T_UX.js +17 -0
  190. package/lib/testing.js +1 -16
  191. package/lib/timeout-FeqZ9A-0.js +42 -0
  192. package/lib/timeout.js +1 -41
  193. package/lib/tiny.js +2 -2
  194. package/lib/trailing-slash-DwTx-1sk.js +85 -0
  195. package/lib/trailing-slash.js +1 -84
  196. package/lib/{trie-router-CfFbapzL.js → trie-router-JydLKUa2.js} +2 -2
  197. package/lib/url-BPh4d6j-.js +197 -0
  198. package/lib/utils/accept.js +1 -192
  199. package/lib/utils/basic-auth.js +1 -19
  200. package/lib/utils/body.js +1 -93
  201. package/lib/utils/buffer.js +1 -50
  202. package/lib/utils/color.js +1 -36
  203. package/lib/utils/compress.d.ts +1 -10
  204. package/lib/utils/compress.js +1 -10
  205. package/lib/utils/concurrent.js +1 -29
  206. package/lib/utils/constants.js +1 -6
  207. package/lib/utils/cookie.js +1 -124
  208. package/lib/utils/crypto.js +1 -33
  209. package/lib/utils/encode.js +1 -32
  210. package/lib/utils/handler.js +1 -11
  211. package/lib/utils/html.js +1 -102
  212. package/lib/utils/ipaddr.js +1 -237
  213. package/lib/utils/jwt.js +1 -1
  214. package/lib/utils/mime.js +1 -76
  215. package/lib/utils/stream.js +1 -87
  216. package/lib/utils/url.js +1 -196
  217. package/lib/{validator-D84mq-dO.js → validator-Btiyt5VJ.js} +3 -3
  218. package/lib/validator.js +1 -1
  219. package/lib/websocket-DsyBIKVA.js +56 -0
  220. package/lib/ws.js +1 -55
  221. package/package.json +1 -1
  222. package/plugins/acryl-door/src/cli/acryl.ts +36 -5
  223. package/plugins/acryl-door/src/host/channel.ts +14 -6
  224. package/plugins/acryl-door/src/host/chat-tools.ts +2 -0
  225. package/plugins/acryl-door/src/host/door.ts +97 -12
  226. package/plugins/acryl-door/src/host/page-routes.ts +3 -1
  227. package/plugins/acryl-door/src/host/shell.ts +147 -0
  228. package/plugins/acryl-door/src/host/shim.ts +39 -3
  229. package/plugins/acryl-door/src/host/verbs.ts +39 -2
  230. package/plugins/acryl-door/src/index.ts +22 -3
  231. package/plugins/acryl-door/src/page/channel.ts +3 -1
  232. package/plugins/acryl-door/src/page/index.ts +2 -1
  233. package/plugins/acryl-door/src/page/protocol.ts +2 -0
  234. package/plugins/acryl-door/src/shell/protocol.ts +130 -0
  235. package/plugins/acryl-node-server/src/register.ts +29 -2
  236. package/plugins/agent/model.ts +6 -1
  237. package/plugins/agent/tools.ts +12 -2
  238. package/plugins/agent-panel/client/describe.ts +44 -0
  239. package/plugins/agent-panel/client/main.ts +4 -1
  240. package/plugins/agent-panel/headless.ts +29 -8
  241. package/plugins/agent-panel/index.ts +22 -10
  242. package/plugins/agent-panel/launch.ts +67 -0
  243. package/plugins/desktop/attach.ts +72 -0
  244. package/plugins/desktop/door-shell.ts +379 -0
  245. package/plugins/desktop/main.ts +82 -15
  246. package/plugins/extensions/index.ts +3 -4
  247. package/plugins/extensions/stage.ts +33 -5
  248. package/plugins/openai/index.ts +1 -1
  249. package/templates/agent/AGENTS.md +4 -0
  250. package/templates/agent/blend.yaml +4 -1
  251. package/templates/agent/src/app.ts +2 -0
  252. package/templates/agent/src/routes.ts +1 -1
  253. package/templates/agent/template.json +1 -0
  254. package/templates/agent/test/builder.test.ts +26 -21
  255. package/lib/helpers-CvTauQT5.js +0 -5
  256. package/lib/middleware-CPQ8himN.js +0 -12
  257. package/plugins/acryl-router/src/connection.d.ts +0 -25
  258. package/plugins/acryl-router/src/core/app-base.d.ts +0 -215
  259. package/plugins/acryl-router/src/core/app.d.ts +0 -19
  260. package/plugins/acryl-router/src/core/client/client.d.ts +0 -4
  261. package/plugins/acryl-router/src/core/client/fetch-result-please.d.ts +0 -35
  262. package/plugins/acryl-router/src/core/client/index.d.ts +0 -7
  263. package/plugins/acryl-router/src/core/client/types.d.ts +0 -229
  264. package/plugins/acryl-router/src/core/client/utils.d.ts +0 -18
  265. package/plugins/acryl-router/src/core/compose.d.ts +0 -14
  266. package/plugins/acryl-router/src/core/context.d.ts +0 -443
  267. package/plugins/acryl-router/src/core/helper/accepts/accepts.d.ts +0 -30
  268. package/plugins/acryl-router/src/core/helper/accepts/index.d.ts +0 -5
  269. package/plugins/acryl-router/src/core/helper/conninfo/index.d.ts +0 -5
  270. package/plugins/acryl-router/src/core/helper/conninfo/types.d.ts +0 -36
  271. package/plugins/acryl-router/src/core/helper/cookie/index.d.ts +0 -25
  272. package/plugins/acryl-router/src/core/helper/css/common.d.ts +0 -59
  273. package/plugins/acryl-router/src/core/helper/css/index.d.ts +0 -80
  274. package/plugins/acryl-router/src/core/helper/dev/index.d.ts +0 -20
  275. package/plugins/acryl-router/src/core/helper/factory/index.d.ts +0 -82
  276. package/plugins/acryl-router/src/core/helper/html/index.d.ts +0 -8
  277. package/plugins/acryl-router/src/core/helper/proxy/index.d.ts +0 -73
  278. package/plugins/acryl-router/src/core/helper/route/index.d.ts +0 -75
  279. package/plugins/acryl-router/src/core/helper/ssg/index.d.ts +0 -7
  280. package/plugins/acryl-router/src/core/helper/ssg/middleware.d.ts +0 -44
  281. package/plugins/acryl-router/src/core/helper/ssg/plugins.d.ts +0 -27
  282. package/plugins/acryl-router/src/core/helper/ssg/ssg.d.ts +0 -91
  283. package/plugins/acryl-router/src/core/helper/ssg/utils.d.ts +0 -16
  284. package/plugins/acryl-router/src/core/helper/streaming/index.d.ts +0 -8
  285. package/plugins/acryl-router/src/core/helper/streaming/sse.d.ts +0 -13
  286. package/plugins/acryl-router/src/core/helper/streaming/stream.d.ts +0 -3
  287. package/plugins/acryl-router/src/core/helper/streaming/text.d.ts +0 -3
  288. package/plugins/acryl-router/src/core/helper/streaming/utils.d.ts +0 -1
  289. package/plugins/acryl-router/src/core/helper/testing/index.d.ts +0 -13
  290. package/plugins/acryl-router/src/core/helper/websocket/index.d.ts +0 -70
  291. package/plugins/acryl-router/src/core/http-exception.d.ts +0 -58
  292. package/plugins/acryl-router/src/core/index.d.ts +0 -37
  293. package/plugins/acryl-router/src/core/jsx/base.d.ts +0 -61
  294. package/plugins/acryl-router/src/core/jsx/children.d.ts +0 -9
  295. package/plugins/acryl-router/src/core/jsx/components.d.ts +0 -15
  296. package/plugins/acryl-router/src/core/jsx/constants.d.ts +0 -6
  297. package/plugins/acryl-router/src/core/jsx/context.d.ts +0 -51
  298. package/plugins/acryl-router/src/core/jsx/dom/components.d.ts +0 -10
  299. package/plugins/acryl-router/src/core/jsx/dom/context.d.ts +0 -3
  300. package/plugins/acryl-router/src/core/jsx/dom/css.d.ts +0 -83
  301. package/plugins/acryl-router/src/core/jsx/dom/hooks/index.d.ts +0 -39
  302. package/plugins/acryl-router/src/core/jsx/dom/intrinsic-element/components.d.ts +0 -16
  303. package/plugins/acryl-router/src/core/jsx/dom/jsx-dev-runtime.d.ts +0 -8
  304. package/plugins/acryl-router/src/core/jsx/dom/jsx-runtime.d.ts +0 -7
  305. package/plugins/acryl-router/src/core/jsx/dom/render.d.ts +0 -73
  306. package/plugins/acryl-router/src/core/jsx/dom/utils.d.ts +0 -1
  307. package/plugins/acryl-router/src/core/jsx/hooks/index.d.ts +0 -47
  308. package/plugins/acryl-router/src/core/jsx/index.d.ts +0 -76
  309. package/plugins/acryl-router/src/core/jsx/intrinsic-element/common.d.ts +0 -6
  310. package/plugins/acryl-router/src/core/jsx/intrinsic-element/components.d.ts +0 -13
  311. package/plugins/acryl-router/src/core/jsx/intrinsic-elements.d.ts +0 -735
  312. package/plugins/acryl-router/src/core/jsx/streaming.d.ts +0 -36
  313. package/plugins/acryl-router/src/core/jsx/types.d.ts +0 -36
  314. package/plugins/acryl-router/src/core/jsx/utils.d.ts +0 -4
  315. package/plugins/acryl-router/src/core/request/constants.d.ts +0 -1
  316. package/plugins/acryl-router/src/core/request.d.ts +0 -306
  317. package/plugins/acryl-router/src/core/router/reg-exp-router/index.d.ts +0 -6
  318. package/plugins/acryl-router/src/core/router/reg-exp-router/matcher.d.ts +0 -7
  319. package/plugins/acryl-router/src/core/router/reg-exp-router/node.d.ts +0 -13
  320. package/plugins/acryl-router/src/core/router/reg-exp-router/prepared-router.d.ts +0 -17
  321. package/plugins/acryl-router/src/core/router/reg-exp-router/router.d.ts +0 -11
  322. package/plugins/acryl-router/src/core/router/reg-exp-router/trie.d.ts +0 -8
  323. package/plugins/acryl-router/src/core/router/smart-router/index.d.ts +0 -5
  324. package/plugins/acryl-router/src/core/router/smart-router/router.d.ts +0 -11
  325. package/plugins/acryl-router/src/core/router/trie-router/index.d.ts +0 -5
  326. package/plugins/acryl-router/src/core/router/trie-router/node.d.ts +0 -6
  327. package/plugins/acryl-router/src/core/router/trie-router/router.d.ts +0 -7
  328. package/plugins/acryl-router/src/core/router/utils.d.ts +0 -1
  329. package/plugins/acryl-router/src/core/router.d.ts +0 -97
  330. package/plugins/acryl-router/src/core/types.d.ts +0 -573
  331. package/plugins/acryl-router/src/core/utils/accept.d.ts +0 -6
  332. package/plugins/acryl-router/src/core/utils/body.d.ts +0 -79
  333. package/plugins/acryl-router/src/core/utils/buffer.d.ts +0 -17
  334. package/plugins/acryl-router/src/core/utils/color.d.ts +0 -21
  335. package/plugins/acryl-router/src/core/utils/concurrent.d.ts +0 -11
  336. package/plugins/acryl-router/src/core/utils/constants.d.ts +0 -4
  337. package/plugins/acryl-router/src/core/utils/cookie.d.ts +0 -41
  338. package/plugins/acryl-router/src/core/utils/crypto.d.ts +0 -15
  339. package/plugins/acryl-router/src/core/utils/handler.d.ts +0 -6
  340. package/plugins/acryl-router/src/core/utils/headers.d.ts +0 -8
  341. package/plugins/acryl-router/src/core/utils/html.d.ts +0 -44
  342. package/plugins/acryl-router/src/core/utils/http-status.d.ts +0 -32
  343. package/plugins/acryl-router/src/core/utils/mime.d.ts +0 -70
  344. package/plugins/acryl-router/src/core/utils/stream.d.ts +0 -31
  345. package/plugins/acryl-router/src/core/utils/types.d.ts +0 -128
  346. package/plugins/acryl-router/src/core/utils/url.d.ts +0 -44
  347. package/plugins/acryl-router/src/core/validator/index.d.ts +0 -7
  348. package/plugins/acryl-router/src/core/validator/utils.d.ts +0 -29
  349. package/plugins/acryl-router/src/core/validator/validator.d.ts +0 -16
  350. package/plugins/acryl-router/src/helpers/index.d.ts +0 -17
  351. package/plugins/acryl-router/src/helpers/schema-validator.d.ts +0 -54
@@ -1,37 +0,0 @@
1
- /**
2
- * @module
3
- *
4
- * Acryl - Web Framework built on Web Standards
5
- *
6
- * @example
7
- * ```ts
8
- * import { Acryl } from 'acrylblends'
9
- * const app = new Acryl()
10
- *
11
- * app.get('/', (c) => c.text('Acryl!'))
12
- *
13
- * export default app
14
- * ```
15
- */
16
- import { Acryl } from './app.ts';
17
- /**
18
- * Types for environment variables, error handlers, handlers, middleware handlers, and more.
19
- */
20
- export type { Env, ErrorHandler, Handler, MiddlewareHandler, Next, NotFoundResponse, NotFoundHandler, ValidationTargets, Input, Schema, ToSchema, TypedResponse, } from './types.ts';
21
- /**
22
- * Types for context, context variable map, context renderer, and execution context.
23
- */
24
- export { Context } from './context.ts';
25
- export type { ContextVariableMap, ContextRenderer, ExecutionContext } from './context.ts';
26
- /**
27
- * Type for AcrylRequest.
28
- */
29
- export type { AcrylRequest } from './request.ts';
30
- /**
31
- * Types for inferring request and response types and client request options.
32
- */
33
- export type { InferRequestType, InferResponseType, ClientRequestOptions } from './client/index.ts';
34
- /**
35
- * Acryl framework for building web applications.
36
- */
37
- export { Acryl };
@@ -1,61 +0,0 @@
1
- import type { HtmlEscaped, HtmlEscapedString, StringBufferWithCallbacks } from '../utils/html.ts';
2
- import { DOM_MEMO } from './constants.ts';
3
- import type { Context } from './context.ts';
4
- import type { JSX as AcrylJSX } from './intrinsic-elements.ts';
5
- export type Props = Record<string, any>;
6
- type FunctionComponentResult = HtmlEscapedString | JSXNode | Child[] | Promise<HtmlEscapedString | JSXNode | Child[]> | null;
7
- export type FC<P = Props> = {
8
- (props: P): FunctionComponentResult;
9
- defaultProps?: Partial<P> | undefined;
10
- displayName?: string | undefined;
11
- };
12
- export type DOMAttributes = AcrylJSX.HTMLAttributes;
13
- export declare namespace JSX {
14
- type Element = HtmlEscapedString | Promise<HtmlEscapedString>;
15
- type ElementType = string | ((props: never) => FunctionComponentResult);
16
- interface ElementChildrenAttribute {
17
- children: Child;
18
- }
19
- interface IntrinsicElements extends AcrylJSX.IntrinsicElements {
20
- [tagName: string]: Props;
21
- }
22
- interface IntrinsicAttributes {
23
- key?: string | number | bigint | null | undefined;
24
- }
25
- }
26
- export declare const getNameSpaceContext: () => Context<string> | undefined;
27
- export declare const booleanAttributes: string[];
28
- export type Child = string | Promise<string> | number | JSXNode | null | undefined | boolean | Child[];
29
- export declare const renderChildren: (children: Child[]) => HtmlEscapedString | Promise<HtmlEscapedString>;
30
- export declare const isUntrustedObject: (value: unknown) => boolean;
31
- export declare const renderUntrustedObject: (value: unknown) => HtmlEscapedString | Promise<HtmlEscapedString>;
32
- export declare class JSXNode implements HtmlEscaped {
33
- tag: string | Function;
34
- props: Props;
35
- key?: string;
36
- children: Child[];
37
- isEscaped: true;
38
- constructor(tag: string | Function, props: Props, children: Child[]);
39
- get type(): string | Function;
40
- get ref(): any;
41
- toString(): string | Promise<string>;
42
- toStringToBuffer(buffer: StringBufferWithCallbacks): void;
43
- }
44
- export declare class JSXFragmentNode extends JSXNode {
45
- toStringToBuffer(buffer: StringBufferWithCallbacks): void;
46
- }
47
- export declare const jsx: (tag: string | Function, props: Props | null, ...children: Child[]) => JSXNode;
48
- export declare const jsxFn: (tag: string | Function, props: Props, children: Child[]) => JSXNode;
49
- export declare const shallowEqual: (a: Props, b: Props) => boolean;
50
- export type MemorableFC<T> = FC<T> & {
51
- [DOM_MEMO]: (prevProps: Readonly<T>, nextProps: Readonly<T>) => boolean;
52
- };
53
- export declare const memo: <T>(component: FC<T>, propsAreEqual?: (prevProps: Readonly<T>, nextProps: Readonly<T>) => boolean) => FC<T>;
54
- export declare const Fragment: ({ children, }: {
55
- key?: string;
56
- children?: Child | HtmlEscapedString;
57
- }) => HtmlEscapedString;
58
- export declare const isValidElement: (element: unknown) => element is JSXNode;
59
- export declare const cloneElement: <T extends JSXNode | JSX.Element>(element: T, props: Partial<Props>, ...children: Child[]) => T;
60
- export declare const reactAPICompatVersion = "19.0.0-acryl-jsx";
61
- export {};
@@ -1,9 +0,0 @@
1
- import type { Child } from './base.ts';
2
- export declare const toArray: (children: Child) => Child[];
3
- export declare const Children: {
4
- map: (children: Child[], fn: (child: Child, index: number) => Child) => Child[];
5
- forEach: (children: Child[], fn: (child: Child, index: number) => void) => void;
6
- count: (children: Child[]) => number;
7
- only: (_children: Child[]) => Child;
8
- toArray: (children: Child) => Child[];
9
- };
@@ -1,15 +0,0 @@
1
- import type { HtmlEscapedString } from '../utils/html.ts';
2
- import type { Child, FC, PropsWithChildren } from './index.ts';
3
- export declare const childrenToString: (children: Child[]) => Promise<HtmlEscapedString[]>;
4
- export type ErrorHandler = (error: Error) => void;
5
- export type FallbackRender = (error: Error) => Child;
6
- /**
7
- * @experimental
8
- * `ErrorBoundary` is an experimental feature.
9
- * The API might be changed.
10
- */
11
- export declare const ErrorBoundary: FC<PropsWithChildren<{
12
- fallback?: Child;
13
- fallbackRender?: FallbackRender;
14
- onError?: ErrorHandler;
15
- }>>;
@@ -1,6 +0,0 @@
1
- export declare const DOM_RENDERER: unique symbol;
2
- export declare const DOM_ERROR_HANDLER: unique symbol;
3
- export declare const DOM_STASH: unique symbol;
4
- export declare const DOM_INTERNAL_TAG: unique symbol;
5
- export declare const DOM_MEMO: unique symbol;
6
- export declare const PERMALINK: unique symbol;
@@ -1,51 +0,0 @@
1
- import type { FC, PropsWithChildren } from './index.ts';
2
- export interface Context<T> extends FC<PropsWithChildren<{
3
- value: T;
4
- }>> {
5
- values: T[];
6
- Provider: FC<PropsWithChildren<{
7
- value: T;
8
- }>>;
9
- }
10
- export declare const globalContexts: Context<unknown>[];
11
- /** Per-render context store, isolated per request so values never leak across renders. */
12
- type RenderStore = WeakMap<Context<unknown>, unknown[]>;
13
- /**
14
- * Establish the request-scoped context store for a render.
15
- *
16
- * `resumeStore` continues a suspended subtree in the same store on the fallback
17
- * path (ignored when `AsyncLocalStorage` is available, where isolation is
18
- * automatic).
19
- *
20
- * Without `AsyncLocalStorage` a render can't be followed across `await`, so the
21
- * store lives in `fallbackStore` only during synchronous work (mirroring
22
- * React's request storage). Reading context after `await` then finds no store
23
- * and falls back to the default value — never another request's value.
24
- */
25
- export declare const runWithRenderContext: <T>(callback: () => T, resumeStore?: RenderStore) => T;
26
- /**
27
- * Capture the current render store and return a resumer that re-establishes it
28
- * around a deferred continuation (e.g. a re-render after a suspended promise
29
- * settles). Shared by every suspension point so none reimplements it.
30
- */
31
- export declare const captureRenderContext: () => (<T>(callback: () => T) => T);
32
- /**
33
- * Create a context whose value can be provided with `<Context.Provider>` and
34
- * read with {@link useContext}.
35
- *
36
- * Server-side renders are isolated per request, so a provided value never leaks
37
- * into a concurrent request — even across `await` in an async component, when
38
- * `AsyncLocalStorage` is available (Node.js >= 20.16, Deno, Bun, Cloudflare
39
- * Workers with `nodejs_compat`). Without it, reading context after `await`
40
- * returns the default value; synchronous components and `use()`-based
41
- * suspension are unaffected.
42
- */
43
- export declare const createContext: <T>(defaultValue: T) => Context<T>;
44
- /**
45
- * Read the current value of a context created with {@link createContext}.
46
- *
47
- * Safe to call from async components after `await`. See {@link createContext}
48
- * for the per-runtime isolation guarantees.
49
- */
50
- export declare const useContext: <T>(context: Context<T>) => T;
51
- export {};
@@ -1,10 +0,0 @@
1
- import type { Child, FC, PropsWithChildren } from '../index.ts';
2
- import type { ErrorHandler, FallbackRender } from '../components.ts';
3
- export declare const ErrorBoundary: FC<PropsWithChildren<{
4
- fallback?: Child;
5
- fallbackRender?: FallbackRender;
6
- onError?: ErrorHandler;
7
- }>>;
8
- export declare const Suspense: FC<PropsWithChildren<{
9
- fallback: any;
10
- }>>;
@@ -1,3 +0,0 @@
1
- import type { Context } from '../context.ts';
2
- export declare const createContextProviderFunction: <T>(values: T[]) => Function;
3
- export declare const createContext: <T>(defaultValue: T) => Context<T>;
@@ -1,83 +0,0 @@
1
- /**
2
- * @module
3
- * This module provides APIs that enable `acryl-router/jsx/dom` to support.
4
- */
5
- import type { FC, PropsWithChildren } from '../index.ts';
6
- import type { ClassNameSlug, CssClassName, CssVariableType, OnInvalidSlug } from '../../helper/css/common.ts';
7
- export { rawCssString } from '../../helper/css/common.ts';
8
- interface CreateCssJsxDomObjectsType {
9
- (args: {
10
- id: Readonly<string>;
11
- }): readonly [
12
- {
13
- toString(this: CssClassName): string;
14
- },
15
- FC<PropsWithChildren<void>>
16
- ];
17
- }
18
- export declare const createCssJsxDomObjects: CreateCssJsxDomObjectsType;
19
- interface CssType {
20
- (strings: TemplateStringsArray, ...values: CssVariableType[]): string;
21
- }
22
- interface CxType {
23
- (...args: (string | boolean | null | undefined)[]): string;
24
- }
25
- interface KeyframesType {
26
- (strings: TemplateStringsArray, ...values: CssVariableType[]): CssClassName;
27
- }
28
- interface ViewTransitionType {
29
- (strings: TemplateStringsArray, ...values: CssVariableType[]): string;
30
- (content: string): string;
31
- (): string;
32
- }
33
- interface DefaultContextType {
34
- css: CssType;
35
- cx: CxType;
36
- keyframes: KeyframesType;
37
- viewTransition: ViewTransitionType;
38
- Style: FC<PropsWithChildren<void>>;
39
- }
40
- /**
41
- * @experimental
42
- * `createCssContext` is an experimental feature.
43
- * The API might be changed.
44
- *
45
- * @param options.id - The ID for the style element
46
- * @param options.classNameSlug - Optional function to customize generated CSS class names
47
- * @param options.onInvalidSlug - Optional callback function called when an invalid slug is returned from ClassNameSlug
48
- */
49
- export declare const createCssContext: ({ id, classNameSlug, onInvalidSlug, }: {
50
- id: Readonly<string>;
51
- classNameSlug?: ClassNameSlug;
52
- onInvalidSlug?: OnInvalidSlug;
53
- }) => DefaultContextType;
54
- /**
55
- * @experimental
56
- * `css` is an experimental feature.
57
- * The API might be changed.
58
- */
59
- export declare const css: CssType;
60
- /**
61
- * @experimental
62
- * `cx` is an experimental feature.
63
- * The API might be changed.
64
- */
65
- export declare const cx: CxType;
66
- /**
67
- * @experimental
68
- * `keyframes` is an experimental feature.
69
- * The API might be changed.
70
- */
71
- export declare const keyframes: KeyframesType;
72
- /**
73
- * @experimental
74
- * `viewTransition` is an experimental feature.
75
- * The API might be changed.
76
- */
77
- export declare const viewTransition: ViewTransitionType;
78
- /**
79
- * @experimental
80
- * `Style` is an experimental feature.
81
- * The API might be changed.
82
- */
83
- export declare const Style: FC<PropsWithChildren<void>>;
@@ -1,39 +0,0 @@
1
- /**
2
- * Provide hooks used only in jsx/dom
3
- */
4
- import type { Context } from '../../context.ts';
5
- type FormStatus = {
6
- pending: false;
7
- data: null;
8
- method: null;
9
- action: null;
10
- } | {
11
- pending: true;
12
- data: FormData;
13
- method: 'get' | 'post';
14
- action: string | ((formData: FormData) => void | Promise<void>);
15
- };
16
- export declare const FormContext: Context<FormStatus>;
17
- export declare const registerAction: (action: Promise<unknown>) => void;
18
- /**
19
- * This hook returns the current form status
20
- * @returns FormStatus
21
- */
22
- export declare const useFormStatus: () => FormStatus;
23
- /**
24
- * This hook returns the current state and a function to update the state optimistically
25
- * The current state is updated optimistically and then reverted to the original state when all actions are resolved
26
- * @param state
27
- * @param updateState
28
- * @returns [T, (action: N) => void]
29
- */
30
- export declare const useOptimistic: <T, N>(state: T, updateState: (currentState: T, action: N) => T) => [T, (action: N) => void];
31
- /**
32
- * This hook returns the current state and a function to update the state by form action
33
- * @param fn
34
- * @param initialState
35
- * @param permalink
36
- * @returns [T, (data: FormData) => void]
37
- */
38
- export declare const useActionState: <T>(fn: Function, initialState: T, permalink?: string) => [T, Function];
39
- export {};
@@ -1,16 +0,0 @@
1
- import type { IntrinsicElements } from '../../intrinsic-elements.ts';
2
- import type { FC, PropsWithChildren, RefObject } from '../../types.ts';
3
- export declare const clearCache: () => void;
4
- export declare const composeRef: <T>(ref: RefObject<T | null> | Function | undefined, cb: (e: T) => void | (() => void)) => ((e: T) => () => void);
5
- export declare const title: FC<PropsWithChildren>;
6
- export declare const script: FC<PropsWithChildren<IntrinsicElements['script']>>;
7
- export declare const style: FC<PropsWithChildren<IntrinsicElements['style']>>;
8
- export declare const link: FC<PropsWithChildren<IntrinsicElements['link']>>;
9
- export declare const meta: FC<PropsWithChildren>;
10
- export declare const form: FC<PropsWithChildren<{
11
- action?: Function | string;
12
- method?: 'get' | 'post';
13
- ref?: RefObject<HTMLFormElement | null> | ((e: HTMLFormElement | null) => void | (() => void));
14
- }>>;
15
- export declare const input: FC<PropsWithChildren<IntrinsicElements['input']>>;
16
- export declare const button: FC<PropsWithChildren<IntrinsicElements['button']>>;
@@ -1,8 +0,0 @@
1
- /**
2
- * @module
3
- * This module provides the `acryl-router/jsx/dom` dev runtime.
4
- */
5
- import type { JSXNode, Props } from '../base.ts';
6
- export type { JSX } from '../base.ts';
7
- export declare const jsxDEV: (tag: string | Function, props: Props, key?: string) => JSXNode;
8
- export declare const Fragment: (props: Record<string, unknown>) => JSXNode;
@@ -1,7 +0,0 @@
1
- /**
2
- * @module
3
- * This module provides the `acryl-router/jsx/dom` runtime.
4
- */
5
- export { jsxDEV as jsx, Fragment } from './jsx-dev-runtime.ts';
6
- export { jsxDEV as jsxs } from './jsx-dev-runtime.ts';
7
- export type { JSX } from './jsx-dev-runtime.ts';
@@ -1,73 +0,0 @@
1
- import type { Child, FC, JSXNode, Props } from '../base.ts';
2
- import { DOM_RENDERER, DOM_STASH } from '../constants.ts';
3
- import type { Context as JSXContext } from '../context.ts';
4
- export type HasRenderToDom = FC<any> & {
5
- [DOM_RENDERER]: FC<any>;
6
- };
7
- export type ErrorHandler = (error: any, retry: () => void) => Child | undefined;
8
- type Container = HTMLElement | DocumentFragment;
9
- type LocalJSXContexts = [JSXContext<unknown>, unknown][] | undefined;
10
- type SupportedElement = HTMLElement | SVGElement | MathMLElement;
11
- export type PreserveNodeType = 1 | 2;
12
- export type NodeObject = {
13
- pP: Props | undefined;
14
- nN: Node | undefined;
15
- vC: Node[];
16
- pC?: Node[];
17
- vR: Node[];
18
- n?: string;
19
- f?: boolean;
20
- s?: boolean;
21
- c: Container | undefined;
22
- e: SupportedElement | Text | undefined;
23
- p?: PreserveNodeType;
24
- a?: boolean;
25
- o?: NodeObject;
26
- [DOM_STASH]: [
27
- number,
28
- any[][],
29
- LocalJSXContexts,
30
- [
31
- Context,
32
- Function,
33
- NodeObject
34
- ]
35
- ] | [number, any[][]];
36
- } & JSXNode;
37
- type NodeString = {
38
- t: string;
39
- d: boolean;
40
- s?: boolean;
41
- } & {
42
- e?: Text;
43
- vC: undefined;
44
- nN: undefined;
45
- p?: true;
46
- key: undefined;
47
- tag: undefined;
48
- };
49
- export type Node = NodeString | NodeObject;
50
- export type PendingType = 0 | 1 | 2;
51
- export type UpdateHook = (context: Context, node: Node, cb: (context: Context) => void) => Promise<void>;
52
- export type Context = [
53
- PendingType,
54
- boolean,
55
- UpdateHook,
56
- boolean,
57
- boolean,
58
- [
59
- Context,
60
- Function,
61
- NodeObject
62
- ][]
63
- ] | [PendingType, boolean, UpdateHook, boolean] | [PendingType, boolean, UpdateHook] | [PendingType, boolean] | [PendingType] | [];
64
- export declare const buildDataStack: [Context, Node][];
65
- export declare const getNameSpaceContext: () => JSXContext<string> | undefined;
66
- export declare const build: (context: Context, node: NodeObject, children?: Child[]) => void;
67
- export declare const buildNode: (node: Child) => Node | undefined;
68
- export declare const update: (context: Context, node: NodeObject) => Promise<NodeObject | undefined>;
69
- export declare const renderNode: (node: NodeObject, container: Container) => void;
70
- export declare const render: (jsxNode: Child, container: Container) => void;
71
- export declare const flushSync: (callback: () => void) => void;
72
- export declare const createPortal: (children: Child, container: HTMLElement, key?: string) => Child;
73
- export {};
@@ -1 +0,0 @@
1
- export declare const setInternalTagFlag: (fn: Function) => Function;
@@ -1,47 +0,0 @@
1
- import type { JSX } from '../base.ts';
2
- type UpdateStateFunction<T> = (newState: T | ((currentState: T) => T)) => void;
3
- export declare const STASH_EFFECT = 1;
4
- export type EffectData = [
5
- readonly unknown[] | undefined,
6
- // deps
7
- (() => void | (() => void)) | undefined,
8
- // layout effect
9
- (() => void) | undefined,
10
- // cleanup
11
- (() => void) | undefined,
12
- // effect
13
- (() => void) | undefined
14
- ];
15
- export declare const startViewTransition: (callback: () => void) => void;
16
- export declare const useViewTransition: () => [boolean, (callback: () => void) => void];
17
- export declare const startTransition: (callback: () => void) => void;
18
- export declare const useTransition: () => [boolean, (callback: () => void | Promise<void>) => void];
19
- type UseDeferredValue = <T>(value: T, initialValue?: T) => T;
20
- export declare const useDeferredValue: UseDeferredValue;
21
- type UseStateType = {
22
- <T>(initialState: T | (() => T)): [T, UpdateStateFunction<T>];
23
- <T = undefined>(): [T | undefined, UpdateStateFunction<T | undefined>];
24
- };
25
- export declare const useState: UseStateType;
26
- export declare const useReducer: <T, A>(reducer: (state: T, action: A) => T, initialArg: T, init?: (initialState: T) => T) => [T, (action: A) => void];
27
- export declare const useEffect: (effect: () => void | (() => void), deps?: readonly unknown[]) => void;
28
- export declare const useLayoutEffect: (effect: () => void | (() => void), deps?: readonly unknown[]) => void;
29
- export declare const useInsertionEffect: (effect: () => void | (() => void), deps?: readonly unknown[]) => void;
30
- export declare const useCallback: <T extends Function>(callback: T, deps: readonly unknown[]) => T;
31
- export type RefObject<T> = {
32
- current: T;
33
- };
34
- export declare function useRef<T>(initialValue: T): RefObject<T>;
35
- export declare function useRef<T>(initialValue: T | null): RefObject<T | null>;
36
- export declare function useRef<T>(initialValue: T | undefined): RefObject<T | undefined>;
37
- export declare const use: <T>(promise: Promise<T>) => T;
38
- export declare const useMemo: <T>(factory: () => T, deps: readonly unknown[]) => T;
39
- export declare const useId: () => string;
40
- export declare const useDebugValue: (_value: unknown, _formatter?: (value: unknown) => string) => void;
41
- export declare const createRef: <T>() => RefObject<T | null>;
42
- export declare const forwardRef: <T, P = {}>(Component: (props: P, ref?: RefObject<T | null>) => JSX.Element) => ((props: P & {
43
- ref?: RefObject<T | null>;
44
- }) => JSX.Element);
45
- export declare const useImperativeHandle: <T>(ref: RefObject<T | null>, createHandle: () => T, deps: readonly unknown[]) => void;
46
- export declare const useSyncExternalStore: <T>(subscribe: (callback: () => void) => () => void, getSnapshot: () => T, getServerSnapshot?: () => T) => T;
47
- export {};
@@ -1,76 +0,0 @@
1
- /**
2
- * @module
3
- * JSX for Acryl.
4
- */
5
- import { Fragment, cloneElement, isValidElement, jsx, memo, reactAPICompatVersion } from './base.ts';
6
- import type { DOMAttributes } from './base.ts';
7
- import { Children } from './children.ts';
8
- import { ErrorBoundary } from './components.ts';
9
- import { createContext, useContext } from './context.ts';
10
- import { useActionState, useOptimistic } from './dom/hooks/index.ts';
11
- import { createRef, forwardRef, startTransition, startViewTransition, use, useCallback, useDebugValue, useDeferredValue, useEffect, useId, useImperativeHandle, useInsertionEffect, useLayoutEffect, useMemo, useReducer, useRef, useState, useSyncExternalStore, useTransition, useViewTransition } from './hooks/index.ts';
12
- import { Suspense } from './streaming.ts';
13
- export { reactAPICompatVersion as version, jsx, memo, Fragment, Fragment as StrictMode, isValidElement, jsx as createElement, cloneElement, ErrorBoundary, createContext, useContext, useState, useEffect, useRef, useCallback, useReducer, useId, useDebugValue, use, startTransition, useTransition, useDeferredValue, startViewTransition, useViewTransition, useMemo, useLayoutEffect, useInsertionEffect, createRef, forwardRef, useImperativeHandle, useSyncExternalStore, useActionState, useOptimistic, Suspense, Children, };
14
- export type { DOMAttributes };
15
- declare const _default: {
16
- version: string;
17
- memo: <T>(component: import("./base.ts").FC<T>, propsAreEqual?: (prevProps: Readonly<T>, nextProps: Readonly<T>) => boolean) => import("./base.ts").FC<T>;
18
- Fragment: ({ children, }: {
19
- key?: string;
20
- children?: import("./base.ts").Child | import("../utils/html.ts").HtmlEscapedString;
21
- }) => import("../utils/html.ts").HtmlEscapedString;
22
- StrictMode: ({ children, }: {
23
- key?: string;
24
- children?: import("./base.ts").Child | import("../utils/html.ts").HtmlEscapedString;
25
- }) => import("../utils/html.ts").HtmlEscapedString;
26
- isValidElement: (element: unknown) => element is import("./base.ts").JSXNode;
27
- createElement: (tag: string | Function, props: import("./base.ts").Props | null, ...children: import("./base.ts").Child[]) => import("./base.ts").JSXNode;
28
- cloneElement: <T extends import("./base.ts").JSXNode | import("./base.ts").JSX.Element>(element: T, props: Partial<import("./base.ts").Props>, ...children: import("./base.ts").Child[]) => T;
29
- ErrorBoundary: import("./base.ts").FC<import("./types.ts").PropsWithChildren<{
30
- fallback?: import("./base.ts").Child;
31
- fallbackRender?: import("./components.ts").FallbackRender;
32
- onError?: import("./components.ts").ErrorHandler;
33
- }>>;
34
- createContext: <T>(defaultValue: T) => import("./context.ts").Context<T>;
35
- useContext: <T>(context: import("./context.ts").Context<T>) => T;
36
- useState: {
37
- <T>(initialState: T | (() => T)): [T, (newState: T | ((currentState: T) => T)) => void];
38
- <T = undefined>(): [T | undefined, (newState: T | ((currentState: T | undefined) => T | undefined) | undefined) => void];
39
- };
40
- useEffect: (effect: () => void | (() => void), deps?: readonly unknown[]) => void;
41
- useRef: typeof useRef;
42
- useCallback: <T extends Function>(callback: T, deps: readonly unknown[]) => T;
43
- useReducer: <T, A>(reducer: (state: T, action: A) => T, initialArg: T, init?: (initialState: T) => T) => [T, (action: A) => void];
44
- useId: () => string;
45
- useDebugValue: (_value: unknown, _formatter?: (value: unknown) => string) => void;
46
- use: <T>(promise: Promise<T>) => T;
47
- startTransition: (callback: () => void) => void;
48
- useTransition: () => [boolean, (callback: () => void | Promise<void>) => void];
49
- useDeferredValue: <T>(value: T, initialValue?: T) => T;
50
- startViewTransition: (callback: () => void) => void;
51
- useViewTransition: () => [boolean, (callback: () => void) => void];
52
- useMemo: <T>(factory: () => T, deps: readonly unknown[]) => T;
53
- useLayoutEffect: (effect: () => void | (() => void), deps?: readonly unknown[]) => void;
54
- useInsertionEffect: (effect: () => void | (() => void), deps?: readonly unknown[]) => void;
55
- createRef: <T>() => import("./types.ts").RefObject<T | null>;
56
- forwardRef: <T, P = {}>(Component: (props: P, ref?: import("./types.ts").RefObject<T | null>) => import("./base.ts").JSX.Element) => ((props: P & {
57
- ref?: import("./types.ts").RefObject<T | null>;
58
- }) => import("./base.ts").JSX.Element);
59
- useImperativeHandle: <T>(ref: import("./types.ts").RefObject<T | null>, createHandle: () => T, deps: readonly unknown[]) => void;
60
- useSyncExternalStore: <T>(subscribe: (callback: () => void) => () => void, getSnapshot: () => T, getServerSnapshot?: () => T) => T;
61
- useActionState: <T>(fn: Function, initialState: T, permalink?: string) => [T, Function];
62
- useOptimistic: <T, N>(state: T, updateState: (currentState: T, action: N) => T) => [T, (action: N) => void];
63
- Suspense: import("./base.ts").FC<import("./types.ts").PropsWithChildren<{
64
- fallback: any;
65
- }>>;
66
- Children: {
67
- map: (children: import("./base.ts").Child[], fn: (child: import("./base.ts").Child, index: number) => import("./base.ts").Child) => import("./base.ts").Child[];
68
- forEach: (children: import("./base.ts").Child[], fn: (child: import("./base.ts").Child, index: number) => void) => void;
69
- count: (children: import("./base.ts").Child[]) => number;
70
- only: (_children: import("./base.ts").Child[]) => import("./base.ts").Child;
71
- toArray: (children: import("./base.ts").Child) => import("./base.ts").Child[];
72
- };
73
- };
74
- export default _default;
75
- export type * from './types.ts';
76
- export type { JSX } from './intrinsic-elements.ts';
@@ -1,6 +0,0 @@
1
- import type { Props } from '../base.ts';
2
- export declare const deDupeKeyMap: Record<string, string[]>;
3
- export declare const domRenderers: Record<string, Function>;
4
- export declare const dataPrecedenceAttr = "data-precedence";
5
- export declare const isStylesheetLinkWithPrecedence: (props: Props) => boolean;
6
- export declare const shouldDeDupeByKey: (tagName: string, supportSort: boolean) => boolean;
@@ -1,13 +0,0 @@
1
- import type { IntrinsicElements } from '../intrinsic-elements.ts';
2
- import type { FC, PropsWithChildren } from '../types.ts';
3
- export declare const title: FC<PropsWithChildren>;
4
- export declare const script: FC<PropsWithChildren<IntrinsicElements['script']>>;
5
- export declare const style: FC<PropsWithChildren<IntrinsicElements['style']>>;
6
- export declare const link: FC<PropsWithChildren<IntrinsicElements['link']>>;
7
- export declare const meta: FC<PropsWithChildren>;
8
- export declare const form: FC<PropsWithChildren<{
9
- action?: Function | string;
10
- method?: 'get' | 'post';
11
- }>>;
12
- export declare const input: (props: PropsWithChildren) => unknown;
13
- export declare const button: (props: PropsWithChildren) => unknown;