acrylblends 0.6.3 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (285) hide show
  1. package/README.md +4 -3
  2. package/docs/framework/README.md +2 -2
  3. package/docs/framework/UPSTREAM.md +1 -1
  4. package/docs/framework/guides/jsx.md +51 -1
  5. package/docs/framework/helpers/ssg.md +3 -6
  6. package/docs/framework/middleware/builtin/jsx-renderer.md +0 -3
  7. package/docs/framework/upstream.json +2 -2
  8. package/lib/accepts.d.ts +1 -1
  9. package/lib/acryl-base.d.ts +1 -1
  10. package/lib/adapter.d.ts +1 -1
  11. package/lib/{app-wFwpg-bt.d.ts → app-D8riatvv.d.ts} +1 -1
  12. package/lib/{base-ddiVmiE7.js → base-NSN_SNv-.js} +1 -0
  13. package/lib/basic-auth.d.ts +1 -1
  14. package/lib/bearer-auth.d.ts +1 -1
  15. package/lib/body-limit.d.ts +1 -1
  16. package/lib/cache.d.ts +1 -1
  17. package/lib/cache.js +4 -4
  18. package/lib/{client-BHTr318g.js → client-DDLXwhBo.js} +2 -125
  19. package/lib/client.d.ts +2 -2
  20. package/lib/client.js +2 -1
  21. package/lib/combine.d.ts +1 -1
  22. package/lib/{components-DYZdxJIJ.js → components-JXVm45kK.js} +1 -1
  23. package/lib/{components-Ce5FRyHU.js → components-cEW3ovK0.js} +3 -3
  24. package/lib/compress.d.ts +1 -1
  25. package/lib/conninfo.d.ts +2 -2
  26. package/lib/{context-DVQBjuns.d.ts → context-DS3fYyG-.d.ts} +1 -1
  27. package/lib/context-storage.d.ts +1 -1
  28. package/lib/cookie.d.ts +1 -1
  29. package/lib/cors.d.ts +1 -1
  30. package/lib/csrf.d.ts +1 -1
  31. package/lib/dev.d.ts +2 -2
  32. package/lib/etag.d.ts +1 -1
  33. package/lib/factory.d.ts +2 -2
  34. package/lib/{hooks-Bq5q9IMl.js → hooks-w72iLeFR.js} +6 -6
  35. package/lib/{index-CUTfU69R.d.ts → index-Bb7YJKCq.d.ts} +2 -2
  36. package/lib/{index-CsvB-F9j.d.ts → index-BvFh1Gfx.d.ts} +1 -1
  37. package/lib/{index-Cqcdluyn.d.ts → index-CTy4N7ng.d.ts} +2 -2
  38. package/lib/index.d.ts +4 -4
  39. package/lib/ip-restriction.d.ts +2 -2
  40. package/lib/jsx/dom/client.js +1 -1
  41. package/lib/jsx/dom/jsx-dev-runtime.js +1 -1
  42. package/lib/jsx/dom/jsx-runtime.js +1 -1
  43. package/lib/jsx/dom/server.js +2 -2
  44. package/lib/jsx/dom.js +4 -4
  45. package/lib/jsx/jsx-dev-runtime.js +1 -1
  46. package/lib/jsx/jsx-runtime.js +1 -1
  47. package/lib/jsx/streaming.js +1 -1
  48. package/lib/{jsx-dev-runtime-kAhR_4C7.js → jsx-dev-runtime-CWLRA2F3.js} +2 -2
  49. package/lib/jsx-renderer.d.ts +75 -0
  50. package/lib/jsx-renderer.js +99 -0
  51. package/lib/jsx.js +4 -4
  52. package/lib/jwk.d.ts +1 -1
  53. package/lib/jwt.d.ts +1 -1
  54. package/lib/language.d.ts +1 -1
  55. package/lib/logger.d.ts +1 -1
  56. package/lib/loopback-only.d.ts +1 -1
  57. package/lib/method-not-allowed.d.ts +2 -2
  58. package/lib/method-override.d.ts +2 -2
  59. package/lib/mount.d.ts +1 -1
  60. package/lib/node-server/conninfo.d.ts +1 -1
  61. package/lib/node-server/register.d.ts +1 -0
  62. package/lib/node-server/register.js +73 -0
  63. package/lib/node-server/serve-static.d.ts +1 -1
  64. package/lib/node-server/serve-static.js +1 -1
  65. package/lib/node-server.d.ts +1 -1
  66. package/lib/node-server.js +1 -1
  67. package/lib/powered-by.d.ts +1 -1
  68. package/lib/pretty-json.d.ts +1 -1
  69. package/lib/quick.d.ts +1 -1
  70. package/lib/request-id.d.ts +1 -1
  71. package/lib/request.d.ts +1 -1
  72. package/lib/route.d.ts +1 -1
  73. package/lib/schema-validator.d.ts +1 -1
  74. package/lib/secure-headers.d.ts +1 -1
  75. package/lib/{serve-static-Cw23shXv.js → serve-static-B14MF1Va.js} +1 -0
  76. package/lib/serve-static.d.ts +1 -1
  77. package/lib/ssg-BwjcA-Ge.js +389 -0
  78. package/lib/ssg.d.ts +156 -0
  79. package/lib/ssg.js +2 -0
  80. package/lib/streaming.d.ts +1 -1
  81. package/lib/testing.d.ts +3 -3
  82. package/lib/testing.js +1 -1
  83. package/lib/timeout.d.ts +1 -1
  84. package/lib/timing.d.ts +1 -1
  85. package/lib/tiny.d.ts +1 -1
  86. package/lib/trailing-slash.d.ts +1 -1
  87. package/lib/{types-nEL8VPDC.d.ts → types-Dv_nV2cv.d.ts} +1 -1
  88. package/lib/{types-CQiGmsWW.d.ts → types-zNxyEpG2.d.ts} +2 -2
  89. package/lib/types.d.ts +1 -1
  90. package/lib/utils/body.d.ts +1 -1
  91. package/lib/utils/ipaddr.d.ts +1 -1
  92. package/lib/utils-Cx61GFMC.js +125 -0
  93. package/lib/validator.d.ts +1 -1
  94. package/lib/ws.d.ts +1 -1
  95. package/package.json +13 -1
  96. package/plugins/acryl-inspect/upstream.json +1 -1
  97. package/plugins/acryl-node-server/src/register.ts +86 -0
  98. package/plugins/acryl-node-server/upstream.json +5 -3
  99. package/plugins/acryl-router/src/core/helper/ssg/index.ts +14 -0
  100. package/plugins/acryl-router/src/core/helper/ssg/middleware.ts +83 -0
  101. package/plugins/acryl-router/src/core/helper/ssg/plugins.ts +72 -0
  102. package/plugins/acryl-router/src/core/helper/ssg/ssg.ts +471 -0
  103. package/plugins/acryl-router/src/core/helper/ssg/utils.ts +118 -0
  104. package/plugins/acryl-router/src/core/jsx/dom/render.ts +6 -6
  105. package/plugins/acryl-router/src/core/middleware/cache/index.ts +4 -4
  106. package/plugins/acryl-router/src/core/middleware/jsx-renderer/index.ts +162 -0
  107. package/plugins/acryl-router/src/helpers/index.ts +1 -0
  108. package/plugins/acryl-router/src/middleware/index.ts +1 -0
  109. package/plugins/acryl-router/upstream.json +2 -2
  110. package/plugins/acryl-router-http/upstream.json +1 -1
  111. package/plugins/acryl-state/upstream.json +1 -1
  112. package/plugins/desktop/main.ts +4 -1
  113. package/plugins/desktop/upstream.json +1 -1
  114. package/plugins/desktop-web/main.ts +3 -1
  115. package/plugins/desktop-web/upstream.json +1 -1
  116. package/plugins/extensions/resolve.ts +4 -0
  117. package/shared/AGENTS.core.md +3 -0
  118. package/templates/agent/package.json +7 -3
  119. package/templates/agent/tsconfig.json +10 -2
  120. package/templates/blank/package.json +7 -3
  121. package/templates/blank/src/about.tsx +14 -0
  122. package/templates/blank/src/routes.ts +2 -0
  123. package/templates/blank/test/app.test.ts +15 -0
  124. package/templates/blank/tsconfig.json +3 -1
  125. package/templates/todo/package.json +7 -3
  126. package/templates/todo/tsconfig.json +3 -1
  127. package/templates/todo/upstream.json +1 -1
  128. package/plugins/acryl-inspect/tests/report.spec.ts +0 -69
  129. package/plugins/acryl-inspect/tests/service.spec.ts +0 -121
  130. package/plugins/acryl-node-server/tests/adapter/app.ts +0 -76
  131. package/plugins/acryl-node-server/tests/adapter/assets/.static/plain.txt +0 -1
  132. package/plugins/acryl-node-server/tests/adapter/assets/favicon.ico +0 -0
  133. package/plugins/acryl-node-server/tests/adapter/assets/secret.txt +0 -1
  134. package/plugins/acryl-node-server/tests/adapter/assets/static/acryl.html +0 -1
  135. package/plugins/acryl-node-server/tests/adapter/assets/static/admin/secret.txt +0 -1
  136. package/plugins/acryl-node-server/tests/adapter/assets/static/data.json +0 -5
  137. package/plugins/acryl-node-server/tests/adapter/assets/static/extensionless +0 -1
  138. package/plugins/acryl-node-server/tests/adapter/assets/static/foo..bar.txt +0 -0
  139. package/plugins/acryl-node-server/tests/adapter/assets/static/index.html +0 -1
  140. package/plugins/acryl-node-server/tests/adapter/assets/static/plain.txt +0 -1
  141. package/plugins/acryl-node-server/tests/adapter/assets/static-with-context-path/plain.txt +0 -1
  142. package/plugins/acryl-node-server/tests/adapter/assets/static-with-precompressed/hello.bin +0 -1
  143. package/plugins/acryl-node-server/tests/adapter/assets/static-with-precompressed/hello.bin.br +0 -1
  144. package/plugins/acryl-node-server/tests/adapter/assets/static-with-precompressed/hello.txt +0 -1
  145. package/plugins/acryl-node-server/tests/adapter/assets/static-with-precompressed/hello.txt.br +0 -1
  146. package/plugins/acryl-node-server/tests/adapter/assets/static-with-precompressed/hello.txt.zst +0 -1
  147. package/plugins/acryl-node-server/tests/adapter/conninfo.test.ts +0 -34
  148. package/plugins/acryl-node-server/tests/adapter/content-length.test.ts +0 -248
  149. package/plugins/acryl-node-server/tests/adapter/early-hints.test.ts +0 -457
  150. package/plugins/acryl-node-server/tests/adapter/fixtures/keys/agent1-cert.pem +0 -23
  151. package/plugins/acryl-node-server/tests/adapter/fixtures/keys/agent1-key.pem +0 -27
  152. package/plugins/acryl-node-server/tests/adapter/headers.test.ts +0 -252
  153. package/plugins/acryl-node-server/tests/adapter/helpers/request.ts +0 -190
  154. package/plugins/acryl-node-server/tests/adapter/listener.test.ts +0 -727
  155. package/plugins/acryl-node-server/tests/adapter/request-client-disconnect.test.ts +0 -189
  156. package/plugins/acryl-node-server/tests/adapter/request.test.ts +0 -1230
  157. package/plugins/acryl-node-server/tests/adapter/response.test.ts +0 -285
  158. package/plugins/acryl-node-server/tests/adapter/serve-static.test.ts +0 -849
  159. package/plugins/acryl-node-server/tests/adapter/server-socket.test.ts +0 -790
  160. package/plugins/acryl-node-server/tests/adapter/server.test.ts +0 -1312
  161. package/plugins/acryl-node-server/tests/adapter/setup.ts +0 -16
  162. package/plugins/acryl-node-server/tests/adapter/url.test.ts +0 -76
  163. package/plugins/acryl-node-server/tests/adapter/utils/response.test.ts +0 -23
  164. package/plugins/acryl-node-server/tests/adapter/utils/stream.test.ts +0 -75
  165. package/plugins/acryl-node-server/tests/adapter/utils.test.ts +0 -235
  166. package/plugins/acryl-node-server/tests/adapter/websocket.test.ts +0 -260
  167. package/plugins/acryl-node-server/tests/server.spec.ts +0 -141
  168. package/plugins/acryl-router/src/core/app.test.ts +0 -3833
  169. package/plugins/acryl-router/src/core/client/client.test.ts +0 -2313
  170. package/plugins/acryl-router/src/core/client/types.test.ts +0 -149
  171. package/plugins/acryl-router/src/core/client/utils.test.ts +0 -405
  172. package/plugins/acryl-router/src/core/compose.test.ts +0 -751
  173. package/plugins/acryl-router/src/core/context.test.ts +0 -629
  174. package/plugins/acryl-router/src/core/helper/accepts/accepts.test.ts +0 -344
  175. package/plugins/acryl-router/src/core/helper/adapter/index.test.ts +0 -55
  176. package/plugins/acryl-router/src/core/helper/cookie/index.test.ts +0 -510
  177. package/plugins/acryl-router/src/core/helper/css/common.case.test.tsx +0 -506
  178. package/plugins/acryl-router/src/core/helper/css/index.test.tsx +0 -678
  179. package/plugins/acryl-router/src/core/helper/dev/index.test.ts +0 -181
  180. package/plugins/acryl-router/src/core/helper/factory/index.test.ts +0 -434
  181. package/plugins/acryl-router/src/core/helper/html/index.test.ts +0 -78
  182. package/plugins/acryl-router/src/core/helper/proxy/index.test.ts +0 -356
  183. package/plugins/acryl-router/src/core/helper/route/index.test.ts +0 -259
  184. package/plugins/acryl-router/src/core/helper/streaming/sse.test.tsx +0 -557
  185. package/plugins/acryl-router/src/core/helper/streaming/stream.test.ts +0 -128
  186. package/plugins/acryl-router/src/core/helper/streaming/text.test.ts +0 -34
  187. package/plugins/acryl-router/src/core/helper/testing/index.test.ts +0 -42
  188. package/plugins/acryl-router/src/core/helper/websocket/index.test.ts +0 -124
  189. package/plugins/acryl-router/src/core/http-exception.test.ts +0 -45
  190. package/plugins/acryl-router/src/core/jsx/base.test.tsx +0 -97
  191. package/plugins/acryl-router/src/core/jsx/children.test.ts +0 -52
  192. package/plugins/acryl-router/src/core/jsx/components.test.tsx +0 -936
  193. package/plugins/acryl-router/src/core/jsx/context-isolation.test.ts +0 -655
  194. package/plugins/acryl-router/src/core/jsx/dom/client.test.tsx +0 -128
  195. package/plugins/acryl-router/src/core/jsx/dom/components.test.tsx +0 -330
  196. package/plugins/acryl-router/src/core/jsx/dom/context.test.tsx +0 -184
  197. package/plugins/acryl-router/src/core/jsx/dom/css.test.tsx +0 -149
  198. package/plugins/acryl-router/src/core/jsx/dom/hooks/index.test.tsx +0 -172
  199. package/plugins/acryl-router/src/core/jsx/dom/index.test.tsx +0 -3681
  200. package/plugins/acryl-router/src/core/jsx/dom/intrinsic-element/components.test.tsx +0 -1344
  201. package/plugins/acryl-router/src/core/jsx/dom/server.test.tsx +0 -199
  202. package/plugins/acryl-router/src/core/jsx/hooks/dom.test.tsx +0 -859
  203. package/plugins/acryl-router/src/core/jsx/hooks/string.test.tsx +0 -40
  204. package/plugins/acryl-router/src/core/jsx/index.test.tsx +0 -1744
  205. package/plugins/acryl-router/src/core/jsx/intrinsic-element/components.test.tsx +0 -666
  206. package/plugins/acryl-router/src/core/jsx/jsx-runtime.test.tsx +0 -85
  207. package/plugins/acryl-router/src/core/jsx/streaming.test.tsx +0 -1281
  208. package/plugins/acryl-router/src/core/jsx/utils.test.ts +0 -366
  209. package/plugins/acryl-router/src/core/middleware/basic-auth/index.test.ts +0 -434
  210. package/plugins/acryl-router/src/core/middleware/bearer-auth/index.test.ts +0 -1018
  211. package/plugins/acryl-router/src/core/middleware/body-limit/index.test.ts +0 -273
  212. package/plugins/acryl-router/src/core/middleware/cache/index.test.ts +0 -1211
  213. package/plugins/acryl-router/src/core/middleware/combine/index.test.ts +0 -355
  214. package/plugins/acryl-router/src/core/middleware/compress/index.test.ts +0 -535
  215. package/plugins/acryl-router/src/core/middleware/context-storage/index.test.ts +0 -43
  216. package/plugins/acryl-router/src/core/middleware/cors/index.test.ts +0 -532
  217. package/plugins/acryl-router/src/core/middleware/csrf/index.test.ts +0 -534
  218. package/plugins/acryl-router/src/core/middleware/etag/digest.test.ts +0 -21
  219. package/plugins/acryl-router/src/core/middleware/etag/index.test.ts +0 -503
  220. package/plugins/acryl-router/src/core/middleware/ip-restriction/index.test.ts +0 -217
  221. package/plugins/acryl-router/src/core/middleware/jwk/index.test.ts +0 -1135
  222. package/plugins/acryl-router/src/core/middleware/jwk/keys.test.json +0 -48
  223. package/plugins/acryl-router/src/core/middleware/jwt/index.test.ts +0 -802
  224. package/plugins/acryl-router/src/core/middleware/language/index.test.ts +0 -552
  225. package/plugins/acryl-router/src/core/middleware/logger/index.test.ts +0 -204
  226. package/plugins/acryl-router/src/core/middleware/method-not-allowed/index.test.ts +0 -292
  227. package/plugins/acryl-router/src/core/middleware/method-override/index.test.ts +0 -221
  228. package/plugins/acryl-router/src/core/middleware/mount/index.test.ts +0 -334
  229. package/plugins/acryl-router/src/core/middleware/powered-by/index.test.ts +0 -37
  230. package/plugins/acryl-router/src/core/middleware/pretty-json/index.test.ts +0 -218
  231. package/plugins/acryl-router/src/core/middleware/request-id/index.test.ts +0 -168
  232. package/plugins/acryl-router/src/core/middleware/secure-headers/index.test.ts +0 -671
  233. package/plugins/acryl-router/src/core/middleware/serve-static/index.test.ts +0 -450
  234. package/plugins/acryl-router/src/core/middleware/serve-static/path.test.ts +0 -50
  235. package/plugins/acryl-router/src/core/middleware/timeout/index.test.ts +0 -70
  236. package/plugins/acryl-router/src/core/middleware/timing/index.test.ts +0 -310
  237. package/plugins/acryl-router/src/core/middleware/trailing-slash/index.test.ts +0 -381
  238. package/plugins/acryl-router/src/core/preset/quick.test.ts +0 -42
  239. package/plugins/acryl-router/src/core/preset/tiny.test.ts +0 -42
  240. package/plugins/acryl-router/src/core/request.test.ts +0 -751
  241. package/plugins/acryl-router/src/core/router/common.case.test.ts +0 -1132
  242. package/plugins/acryl-router/src/core/router/linear-router/router.test.ts +0 -80
  243. package/plugins/acryl-router/src/core/router/pattern-router/router.test.ts +0 -46
  244. package/plugins/acryl-router/src/core/router/reg-exp-router/prepared-router.test.ts +0 -154
  245. package/plugins/acryl-router/src/core/router/reg-exp-router/router.test.ts +0 -265
  246. package/plugins/acryl-router/src/core/router/smart-router/router.test.ts +0 -13
  247. package/plugins/acryl-router/src/core/router/trie-router/node.test.ts +0 -896
  248. package/plugins/acryl-router/src/core/router/trie-router/router.test.ts +0 -8
  249. package/plugins/acryl-router/src/core/types.test.ts +0 -4134
  250. package/plugins/acryl-router/src/core/utils/accept.test.ts +0 -299
  251. package/plugins/acryl-router/src/core/utils/basic-auth.test.ts +0 -56
  252. package/plugins/acryl-router/src/core/utils/body.test.ts +0 -496
  253. package/plugins/acryl-router/src/core/utils/buffer.test.ts +0 -147
  254. package/plugins/acryl-router/src/core/utils/color.test.ts +0 -23
  255. package/plugins/acryl-router/src/core/utils/concurrent.test.ts +0 -69
  256. package/plugins/acryl-router/src/core/utils/cookie.test.ts +0 -460
  257. package/plugins/acryl-router/src/core/utils/crypto.test.ts +0 -43
  258. package/plugins/acryl-router/src/core/utils/encode.test.ts +0 -61
  259. package/plugins/acryl-router/src/core/utils/filepath.test.ts +0 -78
  260. package/plugins/acryl-router/src/core/utils/html.test.ts +0 -16
  261. package/plugins/acryl-router/src/core/utils/ipaddr.test.ts +0 -149
  262. package/plugins/acryl-router/src/core/utils/jwt/jwa.test.ts +0 -86
  263. package/plugins/acryl-router/src/core/utils/jwt/jwt.test.ts +0 -1788
  264. package/plugins/acryl-router/src/core/utils/mime.test.ts +0 -64
  265. package/plugins/acryl-router/src/core/utils/stream.test.ts +0 -212
  266. package/plugins/acryl-router/src/core/utils/types.test.ts +0 -295
  267. package/plugins/acryl-router/src/core/utils/url.test.ts +0 -384
  268. package/plugins/acryl-router/src/core/validator/utils.test.ts +0 -82
  269. package/plugins/acryl-router/src/core/validator/validator.test.ts +0 -1488
  270. package/plugins/acryl-router/tests/docs-examples.spec.ts +0 -152
  271. package/plugins/acryl-router/tests/jsx.spec.tsx +0 -63
  272. package/plugins/acryl-router/tests/live-install.spec.ts +0 -64
  273. package/plugins/acryl-router/tests/loader.spec.ts +0 -72
  274. package/plugins/acryl-router/tests/loopback-only.spec.ts +0 -80
  275. package/plugins/acryl-router/tests/no-dom/consumer.ts +0 -11
  276. package/plugins/acryl-router/tests/no-dom/tsconfig.json +0 -13
  277. package/plugins/acryl-router/tests/service.spec.ts +0 -426
  278. package/plugins/acryl-router/tests/shadow-state.spec.ts +0 -79
  279. package/plugins/acryl-router-http/tests/adapter.spec.ts +0 -174
  280. package/plugins/acryl-router-http/tests/stream.spec.ts +0 -133
  281. package/plugins/acryl-router-http/tests/surfaces.spec.ts +0 -101
  282. package/plugins/acryl-state/src/react.ts +0 -11
  283. package/plugins/acryl-state/tests/cell.spec.ts +0 -71
  284. package/plugins/acryl-state/tests/react.spec.ts +0 -39
  285. package/plugins/acryl-state/tests/service.spec.ts +0 -132
package/README.md CHANGED
@@ -273,13 +273,14 @@ See [Node.js](https://github.com/acryldev/acryl/blob/main/docs/framework/getting
273
273
  | `acrylblends/utils/*` | the utilities the framework is built from |
274
274
  | `acrylblends/tiny`, `acrylblends/quick` | the presets: `Acryl` with another router (`PatternRouter`; `LinearRouter` and `TrieRouter`) ([presets](https://github.com/acryldev/acryl/blob/main/docs/framework/api/presets.md)) |
275
275
  | `acrylblends/cache`, `acrylblends/mount` | the cache middleware and mounting another framework's fetch handler |
276
+ | `acrylblends/ssg` | static site generation: `toSSG` writes every route as a file ([SSG helper](https://github.com/acryldev/acryl/blob/main/docs/framework/helpers/ssg.md)) |
276
277
  | `acrylblends/proxy`, `acrylblends/dev` | the proxy helper and the dev helpers (`showRoutes`, `inspectRoutes`, `getRouterName`) |
277
- | `acrylblends/jsx` | JSX on the server: `jsxImportSource: 'acrylblends/jsx'`, with `jsx/streaming` ([JSX guide](https://github.com/acryldev/acryl/blob/main/docs/framework/guides/jsx.md)) |
278
+ | `acrylblends/jsx` | JSX on the server: `jsxImportSource: 'acrylblends/jsx'`, `.tsx` files run on Node with `node --import acrylblends/node-server/register`, with `jsx/streaming`, and `acrylblends/jsx-renderer` for a layout behind `c.render` ([JSX guide](https://github.com/acryldev/acryl/blob/main/docs/framework/guides/jsx.md)) |
278
279
  | `acrylblends/jsx/dom` | JSX in the browser: hooks and `render` (needs the DOM library) ([client components](https://github.com/acryldev/acryl/blob/main/docs/framework/guides/jsx-dom.md)) |
279
280
  | `acrylblends/css` | CSS in JSX: `css`, `cx`, `keyframes`, `Style` ([CSS helper](https://github.com/acryldev/acryl/blob/main/docs/framework/helpers/css.md)) |
280
- | `acrylblends/node-server` | `serve`, `createAdaptorServer`, `getRequestListener`; with `node-server/serve-static` and `node-server/conninfo` |
281
+ | `acrylblends/node-server` | `serve`, `createAdaptorServer`, `getRequestListener`; with `node-server/serve-static`, `node-server/conninfo`, and `node-server/register` (compiles `.tsx` with the app's `typescript`) |
281
282
 
282
- Every subpath is listed in the package's `exports`. The JSX renderer middleware, SSG and other runtimes' adapters are being ported. The docs mark them "not yet available" until they ship
283
+ Every subpath is listed in the package's `exports`. The adapters of other runtimes are being ported. The docs mark them "not yet available" until they ship
283
284
  ([FAQ](https://github.com/acryldev/acryl/blob/main/docs/framework/guides/faq.md)).
284
285
 
285
286
  To extend the context's typed variables, augment the root module:
@@ -39,8 +39,8 @@ Verified: Node.js. Bun is experimental. The other runtimes the framework could t
39
39
 
40
40
  ## Not yet available
41
41
 
42
- Some parts of the documented API surface are not part of the package yet, and their pages say so at the top: the JSX renderer middleware, static site generation
43
- and the adapters of the runtimes other than Node.js. They are enabled as they are ported.
42
+ Some parts of the documented API surface are not part of the package yet, and their pages say so at the top: the adapters of the runtimes other than Node.js.
43
+ They are enabled as they are ported.
44
44
 
45
45
  ## Where to read next
46
46
 
@@ -1,3 +1,3 @@
1
1
  # Generated copy
2
2
 
3
- This folder is a copy of `docs/framework` of acryldev/acryl at commit `60491f81b7346d1f3867fa01ee4e2caffc7baf47`, made by `scripts/sync-framework.mjs`. Do not edit it here: change the text in ACRYL and sync again. `pnpm run verify:framework` fails when a page differs from the recorded digest.
3
+ This folder is a copy of `docs/framework` of acryldev/acryl at commit `7bba3ed0420d87e61d8256fa60614d22af734c8f`, made by `scripts/sync-framework.mjs`. Do not edit it here: change the text in ACRYL and sync again. `pnpm run verify:framework` fails when a page differs from the recorded digest.
@@ -26,9 +26,34 @@ Alternatively, use the pragma directives:
26
26
  /** @jsxImportSource acrylblends/jsx */
27
27
  ```
28
28
 
29
+ ## Run `.tsx` on Node.js
30
+
31
+ Node.js strips TypeScript's types but does not compile JSX, so a `.tsx` file needs one flag: `--import acrylblends/node-server/register`.
32
+ It compiles each `.tsx` (and `.jsx`) module as Node.js loads it, with your app's own `typescript` (a development dependency) and the
33
+ `jsxImportSource` of your `tsconfig.json` (`acrylblends/jsx` without one); every other module runs exactly as before. Stack traces point at
34
+ the `.tsx` lines.
35
+
36
+ `package.json`:
37
+
38
+ ```json
39
+ {
40
+ "scripts": {
41
+ "dev": "node --watch --import acrylblends/node-server/register src/index.tsx",
42
+ "start": "node --import acrylblends/node-server/register src/index.tsx",
43
+ "test": "node --import acrylblends/node-server/register --test \"src/**/*.test.{ts,tsx}\""
44
+ },
45
+ "devDependencies": {
46
+ "typescript": "^6.0.3"
47
+ }
48
+ }
49
+ ```
50
+
51
+ `node --test` looks only for `.js` and `.ts` test files on its own, so the `test` script names the `.tsx` ones with a pattern. Without `typescript` in the app, the first `.tsx` module stops with a message that says to install it. Bun compiles JSX itself and needs
52
+ no flag.
53
+
29
54
  ## Usage
30
55
 
31
- > **Note.** If you are coming straight from the [Quick Start](../README.md#quick-start), the main file has a `.ts` extension - you need to change it to `.tsx` - otherwise you will not be able to run the application at all. You should additionally modify the `package.json` (or `deno.json` if you are using Deno) to reflect that change (e.g. instead of having `bun run --hot src/index.ts` in dev script, you should have `bun run --hot src/index.tsx`).
56
+ > **Note.** If you are coming straight from the [Quick Start](../README.md#quick-start), the main file has a `.ts` extension - you need to change it to `.tsx` - otherwise you will not be able to run the application at all. Change the scripts in `package.json` to match: on Node.js, as [above](#run-tsx-on-nodejs); on Bun, `bun run --hot src/index.tsx` instead of `bun run --hot src/index.ts`.
32
57
 
33
58
  `index.tsx`:
34
59
 
@@ -69,6 +94,31 @@ app.get('/', (c) => {
69
94
  export default app
70
95
  ```
71
96
 
97
+ ## Without compiling: `jsx()`
98
+
99
+ A `.ts` file can build the same nodes without JSX syntax and without the register flag: write the call that JSX compiles to.
100
+ `jsx(tag, props, ...children)` takes the children after the props, and a node renders with `toString()`. The `` html`...` `` template
101
+ from `acrylblends/html` is the other build-free choice.
102
+
103
+ ```ts
104
+ import { Acryl } from 'acrylblends'
105
+ import { jsx } from 'acrylblends/jsx'
106
+ import type { PropsWithChildren } from 'acrylblends/jsx'
107
+
108
+ const Layout = (props: PropsWithChildren<{ title: string }>) =>
109
+ jsx('html', { lang: 'en' }, jsx('head', null, jsx('title', null, props.title)), jsx('body', null, props.children))
110
+
111
+ const About = () =>
112
+ jsx(Layout, { title: 'About' }, jsx('h1', null, 'About'), jsx('p', { class: 'lead' }, 'Rendered on the server.'))
113
+
114
+ const app = new Acryl()
115
+ app.get('/about', (c) => c.html(jsx(About, null).toString()))
116
+
117
+ export default app
118
+ ```
119
+
120
+ Pass the children as arguments after the props. A `children` entry inside the props object is not rendered by this form.
121
+
72
122
  ## Metadata hoisting
73
123
 
74
124
  You can write document metadata tags such as `<title>`, `<link>`, and `<meta>` directly inside your components. These tags will be automatically hoisted to the `<head>` section of the document. This is especially useful when the `<head>` element is rendered far from the component that determines the appropriate metadata.
@@ -1,8 +1,5 @@
1
1
  # SSG Helper
2
2
 
3
- > **Not yet available.** Static site generation (`acrylblends/ssg`) is documented here so the page structure matches the rest of the framework, and is not part of acrylblends yet. The code on this page is not checked by the docs tests.
4
-
5
-
6
3
  SSG Helper generates a static site from your Acryl application. It will retrieve the contents of registered routes and save them as static files.
7
4
 
8
5
  ## Usage
@@ -237,7 +234,7 @@ Plugins allow you to extend the functionality of the static site generation proc
237
234
 
238
235
  ### Default Plugin
239
236
 
240
- By default, `toSSG` uses `defaultPlugin` which skips non-200 status responses (like redirects, errors, or 404s). This prevents generating files for unsuccessful responses.
237
+ By default, `toSSG` uses `defaultPlugin()`, which skips non-200 status responses (like redirects, errors, or 404s). This prevents generating files for unsuccessful responses.
241
238
 
242
239
  ```ts
243
240
  import { toSSG, defaultPlugin } from 'acrylblends/ssg'
@@ -246,14 +243,14 @@ import { toSSG, defaultPlugin } from 'acrylblends/ssg'
246
243
  toSSG(app, fs)
247
244
 
248
245
  // Equivalent to:
249
- toSSG(app, fs, { plugins: [defaultPlugin] })
246
+ toSSG(app, fs, { plugins: [defaultPlugin()] })
250
247
  ```
251
248
 
252
249
  If you specify custom plugins, `defaultPlugin` is **not** automatically included. To keep the default behavior while adding custom plugins, explicitly include it:
253
250
 
254
251
  ```ts
255
252
  toSSG(app, fs, {
256
- plugins: [defaultPlugin, myCustomPlugin],
253
+ plugins: [defaultPlugin(), myCustomPlugin],
257
254
  })
258
255
  ```
259
256
 
@@ -1,8 +1,5 @@
1
1
  # JSX Renderer Middleware
2
2
 
3
- > **Not yet available.** The JSX renderer middleware (`acrylblends/jsx-renderer`) is documented here so the page structure matches the rest of the framework, and is not part of acrylblends yet. The code on this page is not checked by the docs tests.
4
-
5
-
6
3
  JSX Renderer Middleware allows you to set up the layout when rendering JSX with the `c.render()` function, without the need for using `c.setRenderer()`. Additionally, it enables access to instances of Context within components through the use of `useRequestContext()`.
7
4
 
8
5
  ## Import
@@ -2,8 +2,8 @@
2
2
  "source": {
3
3
  "repo": "acryldev/acryl",
4
4
  "path": "docs/framework",
5
- "commit": "60491f81b7346d1f3867fa01ee4e2caffc7baf47"
5
+ "commit": "7bba3ed0420d87e61d8256fa60614d22af734c8f"
6
6
  },
7
7
  "files": 88,
8
- "digest": "sha256:c8ac3dd071b4cbc2a1f0265695dea71ea48e71cba455e2b778f9d567ca50f957"
8
+ "digest": "sha256:1f7e213ee1fd287a98b5bead17a0b197311fcd75013ddf5912ca4a476657cece"
9
9
  }
package/lib/accepts.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { t as Context } from "./context-DVQBjuns.js";
1
+ import { t as Context } from "./context-DS3fYyG-.js";
2
2
  import { t as AcceptHeader } from "./headers-tu2YYN8T.js";
3
3
 
4
4
  //#region ../../plugins/acryl-router/src/core/helper/accepts/accepts.d.ts
@@ -1,2 +1,2 @@
1
- import { $ as Acryl, et as AcrylOptions } from "./context-DVQBjuns.js";
1
+ import { et as Acryl, tt as AcrylOptions } from "./context-DS3fYyG-.js";
2
2
  export { Acryl as AcrylBase, AcrylOptions };
package/lib/adapter.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { t as Context } from "./context-DVQBjuns.js";
1
+ import { t as Context } from "./context-DS3fYyG-.js";
2
2
 
3
3
  //#region ../../plugins/acryl-router/src/core/helper/adapter/index.d.ts
4
4
  type Runtime = 'node' | 'deno' | 'bun' | 'workerd' | 'fastly' | 'edge-light' | 'other';
@@ -1,4 +1,4 @@
1
- import { $ as Acryl$1, J as Schema, _ as Env, et as AcrylOptions, h as BlankSchema, p as BlankEnv } from "./context-DVQBjuns.js";
1
+ import { Y as Schema, et as Acryl$1, g as BlankSchema, m as BlankEnv, tt as AcrylOptions, v as Env } from "./context-DS3fYyG-.js";
2
2
 
3
3
  //#region ../../plugins/acryl-router/src/core/app.d.ts
4
4
  /**
@@ -1,5 +1,6 @@
1
1
  import { escapeToBuffer, raw, resolveCallbackSync, stringBufferToString } from "./utils/html.js";
2
2
  import { i as DOM_RENDERER, n as DOM_INTERNAL_TAG, o as PERMALINK, r as DOM_MEMO, t as DOM_ERROR_HANDLER } from "./constants-BR9jM9BC.js";
3
+ import "node:module";
3
4
  //#region \0rolldown/runtime.js
4
5
  var __defProp = Object.defineProperty;
5
6
  var __exportAll = (all, no_symbols) => {
@@ -1,4 +1,4 @@
1
- import { I as MiddlewareHandler, t as Context } from "./context-DVQBjuns.js";
1
+ import { L as MiddlewareHandler, t as Context } from "./context-DS3fYyG-.js";
2
2
 
3
3
  //#region ../../plugins/acryl-router/src/core/middleware/basic-auth/index.d.ts
4
4
  type MessageFunction = (c: Context) => string | object | Promise<string | object>;
@@ -1,4 +1,4 @@
1
- import { I as MiddlewareHandler, _ as Env, t as Context } from "./context-DVQBjuns.js";
1
+ import { L as MiddlewareHandler, t as Context, v as Env } from "./context-DS3fYyG-.js";
2
2
 
3
3
  //#region ../../plugins/acryl-router/src/core/middleware/bearer-auth/index.d.ts
4
4
  type MessageFunction = (c: Context) => string | object | Promise<string | object>;
@@ -1,4 +1,4 @@
1
- import { I as MiddlewareHandler, t as Context } from "./context-DVQBjuns.js";
1
+ import { L as MiddlewareHandler, t as Context } from "./context-DS3fYyG-.js";
2
2
 
3
3
  //#region ../../plugins/acryl-router/src/core/middleware/body-limit/index.d.ts
4
4
  type OnError = (c: Context) => Response | Promise<Response>;
package/lib/cache.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { I as MiddlewareHandler, t as Context } from "./context-DVQBjuns.js";
1
+ import { L as MiddlewareHandler, t as Context } from "./context-DS3fYyG-.js";
2
2
  import { c as StatusCode } from "./http-status-DaAwGAFL.js";
3
3
 
4
4
  //#region ../../plugins/acryl-router/src/core/middleware/cache/index.d.ts
package/lib/cache.js CHANGED
@@ -7,10 +7,10 @@ import { cloneRawRequest } from "./request.js";
7
7
  const defaultCacheableStatusCodes = [200];
8
8
  const defaultMaxQueryBodySize = 64 * 1024;
9
9
  const cacheKeyPath = "/.acryl-router/cache";
10
- const cacheKeyParameter = "__hono_cache_key";
11
- const cacheMethodKeyParameter = "__hono_cache_method";
12
- const queryDigestKeyParameter = "__hono_query_digest";
13
- const cacheVaryKeyParameter = "__hono_cache_vary";
10
+ const cacheKeyParameter = "__acryl_cache_key";
11
+ const cacheMethodKeyParameter = "__acryl_cache_method";
12
+ const queryDigestKeyParameter = "__acryl_query_digest";
13
+ const cacheVaryKeyParameter = "__acryl_cache_vary";
14
14
  const queryRepresentationMetadataHeaders = [
15
15
  "content-type",
16
16
  "content-encoding",
@@ -1,128 +1,5 @@
1
1
  import { serialize } from "./utils/cookie.js";
2
- //#region ../../plugins/acryl-router/src/core/client/fetch-result-please.ts
3
- /**
4
- * @description This file is a modified version of `fetch-result-please` (`ofetch`), minimalized and adapted to Acryl's custom needs.
5
- *
6
- * @link https://www.npmjs.com/package/fetch-result-please
7
- */
8
- const nullBodyResponses = /* @__PURE__ */ new Set([
9
- 101,
10
- 204,
11
- 205,
12
- 304
13
- ]);
14
- /**
15
- * Smartly parses and return the consumable result from a fetch `Response`.
16
- *
17
- * Throwing a structured error if the response is not `ok`. ({@link DetailedError})
18
- */
19
- async function fetchRP(fetchRes) {
20
- const _fetchRes = await fetchRes;
21
- if ((_fetchRes.body || _fetchRes._bodyInit) && !nullBodyResponses.has(_fetchRes.status)) _fetchRes._data = await _fetchRes[detectResponseType(_fetchRes)]();
22
- if (!_fetchRes.ok) throw new DetailedError(`${_fetchRes.status} ${_fetchRes.statusText}`, {
23
- statusCode: _fetchRes?.status,
24
- detail: {
25
- data: _fetchRes?._data,
26
- statusText: _fetchRes?.statusText
27
- }
28
- });
29
- return _fetchRes._data;
30
- }
31
- var DetailedError = class extends Error {
32
- /**
33
- * Additional `message` that will be logged AND returned to client
34
- */
35
- detail;
36
- /**
37
- * Additional `code` that will be logged AND returned to client
38
- */
39
- code;
40
- /**
41
- * Additional value that will be logged AND NOT returned to client
42
- */
43
- log;
44
- /**
45
- * Optionally set the status code to return, in a web server context
46
- */
47
- statusCode;
48
- constructor(message, options = {}) {
49
- super(message);
50
- this.name = "DetailedError";
51
- this.log = options.log;
52
- this.detail = options.detail;
53
- this.code = options.code;
54
- this.statusCode = options.statusCode;
55
- }
56
- };
57
- const jsonRegex = /^application\/(?:[\w!#$%&*.^`~-]*\+)?json(?:;.+)?$/i;
58
- function detectResponseType(response) {
59
- const _contentType = response.headers.get("content-type");
60
- if (!_contentType) return "text";
61
- const contentType = _contentType.split(";").shift();
62
- if (jsonRegex.test(contentType)) return "json";
63
- return "text";
64
- }
65
- //#endregion
66
- //#region ../../plugins/acryl-router/src/core/client/utils.ts
67
- const mergePath = (base, path) => {
68
- base = base.replace(/\/+$/, "");
69
- base = base + "/";
70
- path = path.replace(/^\/+/, "");
71
- return base + path;
72
- };
73
- const replaceUrlParam = (urlString, params) => {
74
- for (const [k, v] of Object.entries(params)) {
75
- const reg = new RegExp("/:" + k + "(?:{[^/]+})?\\??(?=/|$)");
76
- urlString = urlString.replace(reg, () => v ? `/${v}` : "");
77
- }
78
- return urlString;
79
- };
80
- const buildSearchParams = (query) => {
81
- const searchParams = new URLSearchParams();
82
- for (const [k, v] of Object.entries(query)) {
83
- if (v === void 0) continue;
84
- if (Array.isArray(v)) for (const v2 of v) {
85
- if (v2 === void 0) continue;
86
- searchParams.append(k, v2);
87
- }
88
- else searchParams.set(k, v);
89
- }
90
- return searchParams;
91
- };
92
- const replaceUrlProtocol = (urlString, protocol) => {
93
- switch (protocol) {
94
- case "ws": return urlString.replace(/^http/, "ws");
95
- case "http": return urlString.replace(/^ws/, "http");
96
- }
97
- };
98
- const removeIndexString = (urlString) => {
99
- if (/^https?:\/\/[^\/]+?\/index(?=\?|$)/.test(urlString)) return urlString.replace(/\/index(?=\?|$)/, "/");
100
- return urlString.replace(/\/index(?=\?|$)/, "");
101
- };
102
- function isObject(item) {
103
- return typeof item === "object" && item !== null && !Array.isArray(item);
104
- }
105
- function deepMerge(target, source) {
106
- if (!isObject(target) && !isObject(source)) return source;
107
- const merged = { ...target };
108
- for (const key in source) {
109
- const value = source[key];
110
- if (isObject(merged[key]) && isObject(value)) merged[key] = deepMerge(merged[key], value);
111
- else merged[key] = value;
112
- }
113
- return merged;
114
- }
115
- /**
116
- * Shortcut to get a consumable response from `hc`'s fetch calls (Response), with types inference.
117
- *
118
- * Smartly parse the response data, throwing a structured error if the response is not `ok`. ({@link DetailedError})
119
- *
120
- * @example const result = await parseResponse(client.posts.$get())
121
- */
122
- async function parseResponse(fetchRes) {
123
- return fetchRP(fetchRes);
124
- }
125
- //#endregion
2
+ import { a as removeIndexString, n as deepMerge, o as replaceUrlParam, r as mergePath, s as replaceUrlProtocol, t as buildSearchParams } from "./utils-Cx61GFMC.js";
126
3
  //#region ../../plugins/acryl-router/src/core/client/client.ts
127
4
  const createProxy = (callback, path) => {
128
5
  return new Proxy(() => {}, {
@@ -263,4 +140,4 @@ const hc = (baseUrl, options) => createProxy(function proxyCallback(opts) {
263
140
  return req;
264
141
  }, []);
265
142
  //#endregion
266
- export { parseResponse as n, DetailedError as r, hc as t };
143
+ export { hc as t };
package/lib/client.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- import { a as ClientResponse, c as InferRequestType, i as ClientRequestOptions, l as InferResponseType, o as Fetch, r as ClientRequest, t as ApplyGlobalResponse, u as PickResponseByStatusCode } from "./types-CQiGmsWW.js";
2
- import { n as DetailedError, r as hc, t as parseResponse } from "./index-CUTfU69R.js";
1
+ import { a as ClientResponse, c as InferRequestType, i as ClientRequestOptions, l as InferResponseType, o as Fetch, r as ClientRequest, t as ApplyGlobalResponse, u as PickResponseByStatusCode } from "./types-zNxyEpG2.js";
2
+ import { n as DetailedError, r as hc, t as parseResponse } from "./index-Bb7YJKCq.js";
3
3
  export { type ApplyGlobalResponse, type ClientRequest, type ClientRequestOptions, type ClientResponse, DetailedError, type Fetch, type InferRequestType, type InferResponseType, type PickResponseByStatusCode, hc, parseResponse };
package/lib/client.js CHANGED
@@ -1,2 +1,3 @@
1
- import { n as parseResponse, r as DetailedError, t as hc } from "./client-BHTr318g.js";
1
+ import { c as DetailedError, i as parseResponse } from "./utils-Cx61GFMC.js";
2
+ import { t as hc } from "./client-DDLXwhBo.js";
2
3
  export { DetailedError, hc, parseResponse };
package/lib/combine.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { I as MiddlewareHandler, t as Context } from "./context-DVQBjuns.js";
1
+ import { L as MiddlewareHandler, t as Context } from "./context-DS3fYyG-.js";
2
2
 
3
3
  //#region ../../plugins/acryl-router/src/core/middleware/combine/index.d.ts
4
4
  type Condition = (c: Context) => boolean;
@@ -1,5 +1,5 @@
1
1
  import { t as DOM_ERROR_HANDLER } from "./constants-BR9jM9BC.js";
2
- import { t as Fragment } from "./jsx-dev-runtime-kAhR_4C7.js";
2
+ import { t as Fragment } from "./jsx-dev-runtime-CWLRA2F3.js";
3
3
  import "./jsx/dom/jsx-runtime.js";
4
4
  //#region ../../plugins/acryl-router/src/core/jsx/dom/components.ts
5
5
  const ErrorBoundary = (({ children, fallback, fallbackRender, onError }) => {
@@ -1,8 +1,8 @@
1
- import { C as captureRenderContext, E as useContext, d as renderUntrustedObject, i as isUntrustedObject, n as JSXNode, o as jsx, t as Fragment, u as renderChildren, w as createContext } from "./base-ddiVmiE7.js";
1
+ import { C as captureRenderContext, E as useContext, d as renderUntrustedObject, i as isUntrustedObject, n as JSXNode, o as jsx, t as Fragment, u as renderChildren, w as createContext } from "./base-NSN_SNv-.js";
2
2
  import { HtmlEscapedCallbackPhase, raw, resolveCallback } from "./utils/html.js";
3
3
  import { a as DOM_STASH, i as DOM_RENDERER } from "./constants-BR9jM9BC.js";
4
- import { x as buildDataStack } from "./hooks-Bq5q9IMl.js";
5
- import { n as Suspense$1, t as ErrorBoundary$1 } from "./components-DYZdxJIJ.js";
4
+ import { x as buildDataStack } from "./hooks-w72iLeFR.js";
5
+ import { n as Suspense$1, t as ErrorBoundary$1 } from "./components-JXVm45kK.js";
6
6
  //#region ../../plugins/acryl-router/src/core/jsx/streaming.ts
7
7
  /**
8
8
  * @module
package/lib/compress.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { I as MiddlewareHandler } from "./context-DVQBjuns.js";
1
+ import { L as MiddlewareHandler } from "./context-DS3fYyG-.js";
2
2
  import { COMPRESSIBLE_CONTENT_TYPE_REGEX } from "./utils/compress.js";
3
3
 
4
4
  //#region ../../plugins/acryl-router/src/core/middleware/compress/index.d.ts
package/lib/conninfo.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { t as Context } from "./context-DVQBjuns.js";
2
- import { i as NetAddrInfo, n as ConnInfo, r as GetConnInfo, t as AddressType } from "./types-nEL8VPDC.js";
1
+ import { t as Context } from "./context-DS3fYyG-.js";
2
+ import { i as NetAddrInfo, n as ConnInfo, r as GetConnInfo, t as AddressType } from "./types-Dv_nV2cv.js";
3
3
 
4
4
  //#region ../../plugins/acryl-router/src/connection.d.ts
5
5
  /** An in-process caller (the terminal UI, a test) passes nothing, so a handler that needs a trusted peer must refuse an empty one. */
@@ -1231,4 +1231,4 @@ declare class Context<E extends Env = any, P extends string = any, I extends Inp
1231
1231
  notFound: () => ReturnType<NotFoundHandler>;
1232
1232
  }
1233
1233
  //#endregion
1234
- export { Acryl as $, Input as A, NotFoundResponse as B, FetchEventLike as C, Handler as D, HTTPResponseError as E, MergeSchemaPath as F, RemoveQuestion as G, ParamKeyToRecord as H, MiddlewareHandler as I, Schema as J, ResponseFormat as K, MiddlewareHandlerInterface as L, IntersectNonAnyTypes as M, KnownResponseFormat as N, HandlerInterface as O, MergePath as P, Variables as Q, Next as R, ExtractSchemaForStatusCode as S, H as T, ParamKeys as U, OnHandlerInterface as V, ParsedFormValue as W, TypedResponse as X, ToSchema as Y, ValidationTargets as Z, Env as _, ExecutionContext as a, ExtractInput as b, BodyData as c, AddParam as d, AcrylOptions as et, Bindings as f, Endpoint as g, BlankSchema as h, Data as i, InputToDataByTarget as j, HandlerResponse as k, ParseBodyOptions as l, BlankInput as m, ContextRenderer as n, AcrylRequest as o, BlankEnv as p, RouterRoute as q, ContextVariableMap as r, cloneRawRequest as s, Context as t, parseBody as u, ErrorHandler as v, FormValue as w, ExtractSchema as x, ExtractHandlerResponse as y, NotFoundHandler as z };
1234
+ export { Variables as $, HandlerResponse as A, NotFoundHandler as B, ExtractSchemaForStatusCode as C, HTTPResponseError as D, H as E, MergePath as F, ParsedFormValue as G, OnHandlerInterface as H, MergeSchemaPath as I, RouterRoute as J, RemoveQuestion as K, MiddlewareHandler as L, InputToDataByTarget as M, IntersectNonAnyTypes as N, Handler as O, KnownResponseFormat as P, ValidationTargets as Q, MiddlewareHandlerInterface as R, ExtractSchema as S, FormValue as T, ParamKeyToRecord as U, NotFoundResponse as V, ParamKeys as W, ToSchema as X, Schema as Y, TypedResponse as Z, Endpoint as _, ExecutionContext as a, ExtractHandlerResponse as b, cloneRawRequest as c, parseBody as d, Acryl as et, AddParam as f, BlankSchema as g, BlankInput as h, Data as i, Input as j, HandlerInterface as k, BodyData as l, BlankEnv as m, ContextRenderer as n, PropsForRenderer as o, Bindings as p, ResponseFormat as q, ContextVariableMap as r, AcrylRequest as s, Context as t, AcrylOptions as tt, ParseBodyOptions as u, Env as v, FetchEventLike as w, ExtractInput as x, ErrorHandler as y, Next as z };
@@ -1,4 +1,4 @@
1
- import { I as MiddlewareHandler, _ as Env, t as Context } from "./context-DVQBjuns.js";
1
+ import { L as MiddlewareHandler, t as Context, v as Env } from "./context-DS3fYyG-.js";
2
2
 
3
3
  //#region ../../plugins/acryl-router/src/core/middleware/context-storage/index.d.ts
4
4
  /**
package/lib/cookie.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { t as Context } from "./context-DVQBjuns.js";
1
+ import { t as Context } from "./context-DS3fYyG-.js";
2
2
  import { n as BufferSource } from "./types-Lqx5BxQF.js";
3
3
  import { a as SignedCookie, i as CookiePrefixOptions, r as CookieOptions, t as Cookie } from "./cookie-CCelEqky.js";
4
4
 
package/lib/cors.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { I as MiddlewareHandler, t as Context } from "./context-DVQBjuns.js";
1
+ import { L as MiddlewareHandler, t as Context } from "./context-DS3fYyG-.js";
2
2
 
3
3
  //#region ../../plugins/acryl-router/src/core/middleware/cors/index.d.ts
4
4
  type CORSOptions = {
package/lib/csrf.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { I as MiddlewareHandler, t as Context } from "./context-DVQBjuns.js";
1
+ import { L as MiddlewareHandler, t as Context } from "./context-DS3fYyG-.js";
2
2
 
3
3
  //#region ../../plugins/acryl-router/src/core/middleware/csrf/index.d.ts
4
4
  type IsAllowedOriginHandler = (origin: string, context: Context) => boolean | Promise<boolean>;
package/lib/dev.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { _ as Env } from "./context-DVQBjuns.js";
2
- import { t as Acryl } from "./app-wFwpg-bt.js";
1
+ import { v as Env } from "./context-DS3fYyG-.js";
2
+ import { t as Acryl } from "./app-D8riatvv.js";
3
3
 
4
4
  //#region ../../plugins/acryl-router/src/core/helper/dev/index.d.ts
5
5
  interface ShowRoutesOptions {
package/lib/etag.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { I as MiddlewareHandler } from "./context-DVQBjuns.js";
1
+ import { L as MiddlewareHandler } from "./context-DS3fYyG-.js";
2
2
 
3
3
  //#region ../../plugins/acryl-router/src/core/middleware/etag/index.d.ts
4
4
  type ETagOptions = {
package/lib/factory.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { A as Input, I as MiddlewareHandler, M as IntersectNonAnyTypes, T as H, _ as Env, et as AcrylOptions, k as HandlerResponse } from "./context-DVQBjuns.js";
2
- import { t as Acryl } from "./app-wFwpg-bt.js";
1
+ import { A as HandlerResponse, E as H, L as MiddlewareHandler, N as IntersectNonAnyTypes, j as Input, tt as AcrylOptions, v as Env } from "./context-DS3fYyG-.js";
2
+ import { t as Acryl } from "./app-D8riatvv.js";
3
3
 
4
4
  //#region ../../plugins/acryl-router/src/core/helper/factory/index.d.ts
5
5
  type InitApp<E extends Env = Env> = (app: Acryl<E>) => void;
@@ -1,7 +1,7 @@
1
- import { D as createContext, E as useContext, T as globalContexts, _ as toArray, h as styleObjectForEach, m as normalizeIntrinsicElementKey } from "./base-ddiVmiE7.js";
1
+ import { D as createContext, E as useContext, T as globalContexts, _ as toArray, h as styleObjectForEach, m as normalizeIntrinsicElementKey } from "./base-NSN_SNv-.js";
2
2
  import { a as DOM_STASH, i as DOM_RENDERER, n as DOM_INTERNAL_TAG, r as DOM_MEMO, t as DOM_ERROR_HANDLER } from "./constants-BR9jM9BC.js";
3
3
  //#region ../../plugins/acryl-router/src/core/jsx/dom/render.ts
4
- const HONO_PORTAL_ELEMENT = "_hp";
4
+ const ACRYL_PORTAL_ELEMENT = "_hp";
5
5
  const eventAliasMap = {
6
6
  Change: "Input",
7
7
  DoubleClick: "DblClick"
@@ -146,7 +146,7 @@ const getNextChildren = (node, container, nextChildren, childrenToRemove, callba
146
146
  });
147
147
  };
148
148
  const findInsertBefore = (node) => {
149
- while (node && (node.tag === HONO_PORTAL_ELEMENT || !node.e)) node = node.tag === HONO_PORTAL_ELEMENT || !node.vC?.[0] ? node.nN : node.vC[0];
149
+ while (node && (node.tag === ACRYL_PORTAL_ELEMENT || !node.e)) node = node.tag === ACRYL_PORTAL_ELEMENT || !node.vC?.[0] ? node.nN : node.vC[0];
150
150
  return node?.e;
151
151
  };
152
152
  const removeNode = (node) => {
@@ -192,7 +192,7 @@ const applyNodeObject = (node, container, isNew) => {
192
192
  if (offsetByNextNode !== void 0) {
193
193
  insertBeforeNode = childNodes[offsetByNextNode];
194
194
  offset = offsetByNextNode;
195
- } else offset = findChildNodeIndex(childNodes, next.find((n) => n.tag !== HONO_PORTAL_ELEMENT && n.e)?.e) ?? -1;
195
+ } else offset = findChildNodeIndex(childNodes, next.find((n) => n.tag !== ACRYL_PORTAL_ELEMENT && n.e)?.e) ?? -1;
196
196
  if (offset === -1) isNew = true;
197
197
  }
198
198
  for (let i = 0, len = next.length; i < len; i++, offset++) {
@@ -214,7 +214,7 @@ const applyNodeObject = (node, container, isNew) => {
214
214
  if (child.tag === "select") applySelectValue(el, child.props);
215
215
  }
216
216
  }
217
- if (child.tag === HONO_PORTAL_ELEMENT) offset--;
217
+ if (child.tag === ACRYL_PORTAL_ELEMENT) offset--;
218
218
  else if (isNew) {
219
219
  if (!el.parentNode) container.appendChild(el);
220
220
  } else if (childNodes[offset] !== el && childNodes[offset - 1] !== el) if (childNodes[offset + 1] === el) container.appendChild(childNodes[offset]);
@@ -497,7 +497,7 @@ const flushSync = (callback) => {
497
497
  currentUpdateSets.pop();
498
498
  };
499
499
  const createPortal = (children, container, key) => ({
500
- tag: HONO_PORTAL_ELEMENT,
500
+ tag: ACRYL_PORTAL_ELEMENT,
501
501
  props: { children },
502
502
  key,
503
503
  e: container,
@@ -1,7 +1,7 @@
1
1
  import { n as ContentfulStatusCode, s as ServerErrorStatusCode, t as ClientErrorStatusCode } from "./http-status-DaAwGAFL.js";
2
2
  import { D as UnionToIntersection } from "./types-Lqx5BxQF.js";
3
- import { t as Acryl } from "./app-wFwpg-bt.js";
4
- import { a as ClientResponse, i as ClientRequestOptions, n as Client, s as FilterClientResponseByStatusCode } from "./types-CQiGmsWW.js";
3
+ import { t as Acryl } from "./app-D8riatvv.js";
4
+ import { a as ClientResponse, i as ClientRequestOptions, n as Client, s as FilterClientResponseByStatusCode } from "./types-zNxyEpG2.js";
5
5
 
6
6
  //#region ../../plugins/acryl-router/src/core/client/client.d.ts
7
7
  declare const hc: <T extends Acryl<any, any, any>, Prefix extends string = string>(baseUrl: Prefix, options?: ClientRequestOptions) => UnionToIntersection<Client<T, Prefix>>;
@@ -1,4 +1,4 @@
1
- import { I as MiddlewareHandler, X as TypedResponse, t as Context } from "./context-DVQBjuns.js";
1
+ import { L as MiddlewareHandler, Z as TypedResponse, t as Context } from "./context-DS3fYyG-.js";
2
2
  import { c as StatusCode } from "./http-status-DaAwGAFL.js";
3
3
  import { b as MessageEvent, r as CloseEvent, t as BinaryType } from "./types-Lqx5BxQF.js";
4
4
 
@@ -1,5 +1,5 @@
1
- import { A as Input, J as Schema, _ as Env, h as BlankSchema, o as AcrylRequest, p as BlankEnv } from "./context-DVQBjuns.js";
2
- import { t as Acryl } from "./app-wFwpg-bt.js";
1
+ import { Y as Schema, g as BlankSchema, j as Input, m as BlankEnv, s as AcrylRequest, v as Env } from "./context-DS3fYyG-.js";
2
+ import { t as Acryl } from "./app-D8riatvv.js";
3
3
 
4
4
  //#region ../../plugins/acryl-router/src/deprecated.d.ts
5
5
  /** @deprecated Use `Acryl` (`new Acryl()`); `App` is the 0.4 name and goes away in the next release. */
package/lib/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { A as Input, B as NotFoundResponse, D as Handler, I as MiddlewareHandler, J as Schema, R as Next, X as TypedResponse, Y as ToSchema, Z as ValidationTargets, _ as Env, a as ExecutionContext, n as ContextRenderer, o as AcrylRequest, r as ContextVariableMap, t as Context, v as ErrorHandler, z as NotFoundHandler } from "./context-DVQBjuns.js";
2
- import { t as Acryl } from "./app-wFwpg-bt.js";
3
- import { c as InferRequestType, i as ClientRequestOptions, l as InferResponseType } from "./types-CQiGmsWW.js";
4
- import { n as AppRequest, t as App } from "./index-Cqcdluyn.js";
1
+ import { B as NotFoundHandler, L as MiddlewareHandler, O as Handler, Q as ValidationTargets, V as NotFoundResponse, X as ToSchema, Y as Schema, Z as TypedResponse, a as ExecutionContext, j as Input, n as ContextRenderer, r as ContextVariableMap, s as AcrylRequest, t as Context, v as Env, y as ErrorHandler, z as Next } from "./context-DS3fYyG-.js";
2
+ import { t as Acryl } from "./app-D8riatvv.js";
3
+ import { c as InferRequestType, i as ClientRequestOptions, l as InferResponseType } from "./types-zNxyEpG2.js";
4
+ import { n as AppRequest, t as App } from "./index-CTy4N7ng.js";
5
5
  export { Acryl, type AcrylRequest, App, type AppRequest, type ClientRequestOptions, Context, type ContextRenderer, type ContextVariableMap, type Env, type ErrorHandler, type ExecutionContext, type Handler, type InferRequestType, type InferResponseType, type Input, type MiddlewareHandler, type Next, type NotFoundHandler, type NotFoundResponse, type Schema, type ToSchema, type TypedResponse, type ValidationTargets };
@@ -1,5 +1,5 @@
1
- import { I as MiddlewareHandler, t as Context } from "./context-DVQBjuns.js";
2
- import { r as GetConnInfo, t as AddressType } from "./types-nEL8VPDC.js";
1
+ import { L as MiddlewareHandler, t as Context } from "./context-DS3fYyG-.js";
2
+ import { r as GetConnInfo, t as AddressType } from "./types-Dv_nV2cv.js";
3
3
 
4
4
  //#region ../../plugins/acryl-router/src/core/middleware/ip-restriction/index.d.ts
5
5
  /**
@@ -1,4 +1,4 @@
1
- import { D as renderNode, S as buildNode, _ as useState } from "../../hooks-Bq5q9IMl.js";
1
+ import { D as renderNode, S as buildNode, _ as useState } from "../../hooks-w72iLeFR.js";
2
2
  //#region ../../plugins/acryl-router/src/core/jsx/dom/client.ts
3
3
  /**
4
4
  * Create a root object for rendering