acrylblends 0.6.3 → 0.6.4

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 (269) hide show
  1. package/README.md +3 -2
  2. package/docs/framework/README.md +2 -2
  3. package/docs/framework/UPSTREAM.md +1 -1
  4. package/docs/framework/guides/jsx.md +24 -0
  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/basic-auth.d.ts +1 -1
  13. package/lib/bearer-auth.d.ts +1 -1
  14. package/lib/body-limit.d.ts +1 -1
  15. package/lib/cache.d.ts +1 -1
  16. package/lib/cache.js +4 -4
  17. package/lib/{client-BHTr318g.js → client-DDLXwhBo.js} +2 -125
  18. package/lib/client.d.ts +2 -2
  19. package/lib/client.js +2 -1
  20. package/lib/combine.d.ts +1 -1
  21. package/lib/{components-Ce5FRyHU.js → components-0o0CBYNv.js} +2 -2
  22. package/lib/{components-DYZdxJIJ.js → components-DdI7-ns7.js} +1 -1
  23. package/lib/compress.d.ts +1 -1
  24. package/lib/conninfo.d.ts +2 -2
  25. package/lib/{context-DVQBjuns.d.ts → context-DS3fYyG-.d.ts} +1 -1
  26. package/lib/context-storage.d.ts +1 -1
  27. package/lib/cookie.d.ts +1 -1
  28. package/lib/cors.d.ts +1 -1
  29. package/lib/csrf.d.ts +1 -1
  30. package/lib/dev.d.ts +2 -2
  31. package/lib/etag.d.ts +1 -1
  32. package/lib/factory.d.ts +2 -2
  33. package/lib/{hooks-Bq5q9IMl.js → hooks-BMw6BAyP.js} +5 -5
  34. package/lib/{index-CUTfU69R.d.ts → index-Bb7YJKCq.d.ts} +2 -2
  35. package/lib/{index-CsvB-F9j.d.ts → index-BvFh1Gfx.d.ts} +1 -1
  36. package/lib/{index-Cqcdluyn.d.ts → index-CTy4N7ng.d.ts} +2 -2
  37. package/lib/index.d.ts +4 -4
  38. package/lib/ip-restriction.d.ts +2 -2
  39. package/lib/jsx/dom/client.js +1 -1
  40. package/lib/jsx/dom/jsx-dev-runtime.js +1 -1
  41. package/lib/jsx/dom/jsx-runtime.js +1 -1
  42. package/lib/jsx/dom/server.js +1 -1
  43. package/lib/jsx/dom.js +3 -3
  44. package/lib/jsx/streaming.js +1 -1
  45. package/lib/{jsx-dev-runtime-kAhR_4C7.js → jsx-dev-runtime-D18Y35TI.js} +1 -1
  46. package/lib/jsx-renderer.d.ts +75 -0
  47. package/lib/jsx-renderer.js +99 -0
  48. package/lib/jsx.js +3 -3
  49. package/lib/jwk.d.ts +1 -1
  50. package/lib/jwt.d.ts +1 -1
  51. package/lib/language.d.ts +1 -1
  52. package/lib/logger.d.ts +1 -1
  53. package/lib/loopback-only.d.ts +1 -1
  54. package/lib/method-not-allowed.d.ts +2 -2
  55. package/lib/method-override.d.ts +2 -2
  56. package/lib/mount.d.ts +1 -1
  57. package/lib/node-server/conninfo.d.ts +1 -1
  58. package/lib/node-server/serve-static.d.ts +1 -1
  59. package/lib/node-server/serve-static.js +1 -1
  60. package/lib/node-server.d.ts +1 -1
  61. package/lib/node-server.js +1 -1
  62. package/lib/powered-by.d.ts +1 -1
  63. package/lib/pretty-json.d.ts +1 -1
  64. package/lib/quick.d.ts +1 -1
  65. package/lib/request-id.d.ts +1 -1
  66. package/lib/request.d.ts +1 -1
  67. package/lib/route.d.ts +1 -1
  68. package/lib/schema-validator.d.ts +1 -1
  69. package/lib/secure-headers.d.ts +1 -1
  70. package/lib/{serve-static-Cw23shXv.js → serve-static-B14MF1Va.js} +1 -0
  71. package/lib/serve-static.d.ts +1 -1
  72. package/lib/ssg-BwjcA-Ge.js +389 -0
  73. package/lib/ssg.d.ts +156 -0
  74. package/lib/ssg.js +2 -0
  75. package/lib/streaming.d.ts +1 -1
  76. package/lib/testing.d.ts +3 -3
  77. package/lib/testing.js +1 -1
  78. package/lib/timeout.d.ts +1 -1
  79. package/lib/timing.d.ts +1 -1
  80. package/lib/tiny.d.ts +1 -1
  81. package/lib/trailing-slash.d.ts +1 -1
  82. package/lib/{types-nEL8VPDC.d.ts → types-Dv_nV2cv.d.ts} +1 -1
  83. package/lib/{types-CQiGmsWW.d.ts → types-zNxyEpG2.d.ts} +2 -2
  84. package/lib/types.d.ts +1 -1
  85. package/lib/utils/body.d.ts +1 -1
  86. package/lib/utils/ipaddr.d.ts +1 -1
  87. package/lib/utils-Cx61GFMC.js +125 -0
  88. package/lib/validator.d.ts +1 -1
  89. package/lib/ws.d.ts +1 -1
  90. package/package.json +9 -1
  91. package/plugins/acryl-inspect/upstream.json +1 -1
  92. package/plugins/acryl-node-server/upstream.json +1 -1
  93. package/plugins/acryl-router/src/core/helper/ssg/index.ts +14 -0
  94. package/plugins/acryl-router/src/core/helper/ssg/middleware.ts +83 -0
  95. package/plugins/acryl-router/src/core/helper/ssg/plugins.ts +72 -0
  96. package/plugins/acryl-router/src/core/helper/ssg/ssg.ts +471 -0
  97. package/plugins/acryl-router/src/core/helper/ssg/utils.ts +118 -0
  98. package/plugins/acryl-router/src/core/jsx/dom/render.ts +6 -6
  99. package/plugins/acryl-router/src/core/middleware/cache/index.ts +4 -4
  100. package/plugins/acryl-router/src/core/middleware/jsx-renderer/index.ts +162 -0
  101. package/plugins/acryl-router/src/helpers/index.ts +1 -0
  102. package/plugins/acryl-router/src/middleware/index.ts +1 -0
  103. package/plugins/acryl-router/upstream.json +2 -2
  104. package/plugins/acryl-router-http/upstream.json +1 -1
  105. package/plugins/acryl-state/upstream.json +1 -1
  106. package/plugins/desktop/upstream.json +1 -1
  107. package/plugins/desktop-web/upstream.json +1 -1
  108. package/plugins/extensions/resolve.ts +4 -0
  109. package/shared/AGENTS.core.md +4 -0
  110. package/templates/agent/tsconfig.json +7 -1
  111. package/templates/todo/upstream.json +1 -1
  112. package/plugins/acryl-inspect/tests/report.spec.ts +0 -69
  113. package/plugins/acryl-inspect/tests/service.spec.ts +0 -121
  114. package/plugins/acryl-node-server/tests/adapter/app.ts +0 -76
  115. package/plugins/acryl-node-server/tests/adapter/assets/.static/plain.txt +0 -1
  116. package/plugins/acryl-node-server/tests/adapter/assets/favicon.ico +0 -0
  117. package/plugins/acryl-node-server/tests/adapter/assets/secret.txt +0 -1
  118. package/plugins/acryl-node-server/tests/adapter/assets/static/acryl.html +0 -1
  119. package/plugins/acryl-node-server/tests/adapter/assets/static/admin/secret.txt +0 -1
  120. package/plugins/acryl-node-server/tests/adapter/assets/static/data.json +0 -5
  121. package/plugins/acryl-node-server/tests/adapter/assets/static/extensionless +0 -1
  122. package/plugins/acryl-node-server/tests/adapter/assets/static/foo..bar.txt +0 -0
  123. package/plugins/acryl-node-server/tests/adapter/assets/static/index.html +0 -1
  124. package/plugins/acryl-node-server/tests/adapter/assets/static/plain.txt +0 -1
  125. package/plugins/acryl-node-server/tests/adapter/assets/static-with-context-path/plain.txt +0 -1
  126. package/plugins/acryl-node-server/tests/adapter/assets/static-with-precompressed/hello.bin +0 -1
  127. package/plugins/acryl-node-server/tests/adapter/assets/static-with-precompressed/hello.bin.br +0 -1
  128. package/plugins/acryl-node-server/tests/adapter/assets/static-with-precompressed/hello.txt +0 -1
  129. package/plugins/acryl-node-server/tests/adapter/assets/static-with-precompressed/hello.txt.br +0 -1
  130. package/plugins/acryl-node-server/tests/adapter/assets/static-with-precompressed/hello.txt.zst +0 -1
  131. package/plugins/acryl-node-server/tests/adapter/conninfo.test.ts +0 -34
  132. package/plugins/acryl-node-server/tests/adapter/content-length.test.ts +0 -248
  133. package/plugins/acryl-node-server/tests/adapter/early-hints.test.ts +0 -457
  134. package/plugins/acryl-node-server/tests/adapter/fixtures/keys/agent1-cert.pem +0 -23
  135. package/plugins/acryl-node-server/tests/adapter/fixtures/keys/agent1-key.pem +0 -27
  136. package/plugins/acryl-node-server/tests/adapter/headers.test.ts +0 -252
  137. package/plugins/acryl-node-server/tests/adapter/helpers/request.ts +0 -190
  138. package/plugins/acryl-node-server/tests/adapter/listener.test.ts +0 -727
  139. package/plugins/acryl-node-server/tests/adapter/request-client-disconnect.test.ts +0 -189
  140. package/plugins/acryl-node-server/tests/adapter/request.test.ts +0 -1230
  141. package/plugins/acryl-node-server/tests/adapter/response.test.ts +0 -285
  142. package/plugins/acryl-node-server/tests/adapter/serve-static.test.ts +0 -849
  143. package/plugins/acryl-node-server/tests/adapter/server-socket.test.ts +0 -790
  144. package/plugins/acryl-node-server/tests/adapter/server.test.ts +0 -1312
  145. package/plugins/acryl-node-server/tests/adapter/setup.ts +0 -16
  146. package/plugins/acryl-node-server/tests/adapter/url.test.ts +0 -76
  147. package/plugins/acryl-node-server/tests/adapter/utils/response.test.ts +0 -23
  148. package/plugins/acryl-node-server/tests/adapter/utils/stream.test.ts +0 -75
  149. package/plugins/acryl-node-server/tests/adapter/utils.test.ts +0 -235
  150. package/plugins/acryl-node-server/tests/adapter/websocket.test.ts +0 -260
  151. package/plugins/acryl-node-server/tests/server.spec.ts +0 -141
  152. package/plugins/acryl-router/src/core/app.test.ts +0 -3833
  153. package/plugins/acryl-router/src/core/client/client.test.ts +0 -2313
  154. package/plugins/acryl-router/src/core/client/types.test.ts +0 -149
  155. package/plugins/acryl-router/src/core/client/utils.test.ts +0 -405
  156. package/plugins/acryl-router/src/core/compose.test.ts +0 -751
  157. package/plugins/acryl-router/src/core/context.test.ts +0 -629
  158. package/plugins/acryl-router/src/core/helper/accepts/accepts.test.ts +0 -344
  159. package/plugins/acryl-router/src/core/helper/adapter/index.test.ts +0 -55
  160. package/plugins/acryl-router/src/core/helper/cookie/index.test.ts +0 -510
  161. package/plugins/acryl-router/src/core/helper/css/common.case.test.tsx +0 -506
  162. package/plugins/acryl-router/src/core/helper/css/index.test.tsx +0 -678
  163. package/plugins/acryl-router/src/core/helper/dev/index.test.ts +0 -181
  164. package/plugins/acryl-router/src/core/helper/factory/index.test.ts +0 -434
  165. package/plugins/acryl-router/src/core/helper/html/index.test.ts +0 -78
  166. package/plugins/acryl-router/src/core/helper/proxy/index.test.ts +0 -356
  167. package/plugins/acryl-router/src/core/helper/route/index.test.ts +0 -259
  168. package/plugins/acryl-router/src/core/helper/streaming/sse.test.tsx +0 -557
  169. package/plugins/acryl-router/src/core/helper/streaming/stream.test.ts +0 -128
  170. package/plugins/acryl-router/src/core/helper/streaming/text.test.ts +0 -34
  171. package/plugins/acryl-router/src/core/helper/testing/index.test.ts +0 -42
  172. package/plugins/acryl-router/src/core/helper/websocket/index.test.ts +0 -124
  173. package/plugins/acryl-router/src/core/http-exception.test.ts +0 -45
  174. package/plugins/acryl-router/src/core/jsx/base.test.tsx +0 -97
  175. package/plugins/acryl-router/src/core/jsx/children.test.ts +0 -52
  176. package/plugins/acryl-router/src/core/jsx/components.test.tsx +0 -936
  177. package/plugins/acryl-router/src/core/jsx/context-isolation.test.ts +0 -655
  178. package/plugins/acryl-router/src/core/jsx/dom/client.test.tsx +0 -128
  179. package/plugins/acryl-router/src/core/jsx/dom/components.test.tsx +0 -330
  180. package/plugins/acryl-router/src/core/jsx/dom/context.test.tsx +0 -184
  181. package/plugins/acryl-router/src/core/jsx/dom/css.test.tsx +0 -149
  182. package/plugins/acryl-router/src/core/jsx/dom/hooks/index.test.tsx +0 -172
  183. package/plugins/acryl-router/src/core/jsx/dom/index.test.tsx +0 -3681
  184. package/plugins/acryl-router/src/core/jsx/dom/intrinsic-element/components.test.tsx +0 -1344
  185. package/plugins/acryl-router/src/core/jsx/dom/server.test.tsx +0 -199
  186. package/plugins/acryl-router/src/core/jsx/hooks/dom.test.tsx +0 -859
  187. package/plugins/acryl-router/src/core/jsx/hooks/string.test.tsx +0 -40
  188. package/plugins/acryl-router/src/core/jsx/index.test.tsx +0 -1744
  189. package/plugins/acryl-router/src/core/jsx/intrinsic-element/components.test.tsx +0 -666
  190. package/plugins/acryl-router/src/core/jsx/jsx-runtime.test.tsx +0 -85
  191. package/plugins/acryl-router/src/core/jsx/streaming.test.tsx +0 -1281
  192. package/plugins/acryl-router/src/core/jsx/utils.test.ts +0 -366
  193. package/plugins/acryl-router/src/core/middleware/basic-auth/index.test.ts +0 -434
  194. package/plugins/acryl-router/src/core/middleware/bearer-auth/index.test.ts +0 -1018
  195. package/plugins/acryl-router/src/core/middleware/body-limit/index.test.ts +0 -273
  196. package/plugins/acryl-router/src/core/middleware/cache/index.test.ts +0 -1211
  197. package/plugins/acryl-router/src/core/middleware/combine/index.test.ts +0 -355
  198. package/plugins/acryl-router/src/core/middleware/compress/index.test.ts +0 -535
  199. package/plugins/acryl-router/src/core/middleware/context-storage/index.test.ts +0 -43
  200. package/plugins/acryl-router/src/core/middleware/cors/index.test.ts +0 -532
  201. package/plugins/acryl-router/src/core/middleware/csrf/index.test.ts +0 -534
  202. package/plugins/acryl-router/src/core/middleware/etag/digest.test.ts +0 -21
  203. package/plugins/acryl-router/src/core/middleware/etag/index.test.ts +0 -503
  204. package/plugins/acryl-router/src/core/middleware/ip-restriction/index.test.ts +0 -217
  205. package/plugins/acryl-router/src/core/middleware/jwk/index.test.ts +0 -1135
  206. package/plugins/acryl-router/src/core/middleware/jwk/keys.test.json +0 -48
  207. package/plugins/acryl-router/src/core/middleware/jwt/index.test.ts +0 -802
  208. package/plugins/acryl-router/src/core/middleware/language/index.test.ts +0 -552
  209. package/plugins/acryl-router/src/core/middleware/logger/index.test.ts +0 -204
  210. package/plugins/acryl-router/src/core/middleware/method-not-allowed/index.test.ts +0 -292
  211. package/plugins/acryl-router/src/core/middleware/method-override/index.test.ts +0 -221
  212. package/plugins/acryl-router/src/core/middleware/mount/index.test.ts +0 -334
  213. package/plugins/acryl-router/src/core/middleware/powered-by/index.test.ts +0 -37
  214. package/plugins/acryl-router/src/core/middleware/pretty-json/index.test.ts +0 -218
  215. package/plugins/acryl-router/src/core/middleware/request-id/index.test.ts +0 -168
  216. package/plugins/acryl-router/src/core/middleware/secure-headers/index.test.ts +0 -671
  217. package/plugins/acryl-router/src/core/middleware/serve-static/index.test.ts +0 -450
  218. package/plugins/acryl-router/src/core/middleware/serve-static/path.test.ts +0 -50
  219. package/plugins/acryl-router/src/core/middleware/timeout/index.test.ts +0 -70
  220. package/plugins/acryl-router/src/core/middleware/timing/index.test.ts +0 -310
  221. package/plugins/acryl-router/src/core/middleware/trailing-slash/index.test.ts +0 -381
  222. package/plugins/acryl-router/src/core/preset/quick.test.ts +0 -42
  223. package/plugins/acryl-router/src/core/preset/tiny.test.ts +0 -42
  224. package/plugins/acryl-router/src/core/request.test.ts +0 -751
  225. package/plugins/acryl-router/src/core/router/common.case.test.ts +0 -1132
  226. package/plugins/acryl-router/src/core/router/linear-router/router.test.ts +0 -80
  227. package/plugins/acryl-router/src/core/router/pattern-router/router.test.ts +0 -46
  228. package/plugins/acryl-router/src/core/router/reg-exp-router/prepared-router.test.ts +0 -154
  229. package/plugins/acryl-router/src/core/router/reg-exp-router/router.test.ts +0 -265
  230. package/plugins/acryl-router/src/core/router/smart-router/router.test.ts +0 -13
  231. package/plugins/acryl-router/src/core/router/trie-router/node.test.ts +0 -896
  232. package/plugins/acryl-router/src/core/router/trie-router/router.test.ts +0 -8
  233. package/plugins/acryl-router/src/core/types.test.ts +0 -4134
  234. package/plugins/acryl-router/src/core/utils/accept.test.ts +0 -299
  235. package/plugins/acryl-router/src/core/utils/basic-auth.test.ts +0 -56
  236. package/plugins/acryl-router/src/core/utils/body.test.ts +0 -496
  237. package/plugins/acryl-router/src/core/utils/buffer.test.ts +0 -147
  238. package/plugins/acryl-router/src/core/utils/color.test.ts +0 -23
  239. package/plugins/acryl-router/src/core/utils/concurrent.test.ts +0 -69
  240. package/plugins/acryl-router/src/core/utils/cookie.test.ts +0 -460
  241. package/plugins/acryl-router/src/core/utils/crypto.test.ts +0 -43
  242. package/plugins/acryl-router/src/core/utils/encode.test.ts +0 -61
  243. package/plugins/acryl-router/src/core/utils/filepath.test.ts +0 -78
  244. package/plugins/acryl-router/src/core/utils/html.test.ts +0 -16
  245. package/plugins/acryl-router/src/core/utils/ipaddr.test.ts +0 -149
  246. package/plugins/acryl-router/src/core/utils/jwt/jwa.test.ts +0 -86
  247. package/plugins/acryl-router/src/core/utils/jwt/jwt.test.ts +0 -1788
  248. package/plugins/acryl-router/src/core/utils/mime.test.ts +0 -64
  249. package/plugins/acryl-router/src/core/utils/stream.test.ts +0 -212
  250. package/plugins/acryl-router/src/core/utils/types.test.ts +0 -295
  251. package/plugins/acryl-router/src/core/utils/url.test.ts +0 -384
  252. package/plugins/acryl-router/src/core/validator/utils.test.ts +0 -82
  253. package/plugins/acryl-router/src/core/validator/validator.test.ts +0 -1488
  254. package/plugins/acryl-router/tests/docs-examples.spec.ts +0 -152
  255. package/plugins/acryl-router/tests/jsx.spec.tsx +0 -63
  256. package/plugins/acryl-router/tests/live-install.spec.ts +0 -64
  257. package/plugins/acryl-router/tests/loader.spec.ts +0 -72
  258. package/plugins/acryl-router/tests/loopback-only.spec.ts +0 -80
  259. package/plugins/acryl-router/tests/no-dom/consumer.ts +0 -11
  260. package/plugins/acryl-router/tests/no-dom/tsconfig.json +0 -13
  261. package/plugins/acryl-router/tests/service.spec.ts +0 -426
  262. package/plugins/acryl-router/tests/shadow-state.spec.ts +0 -79
  263. package/plugins/acryl-router-http/tests/adapter.spec.ts +0 -174
  264. package/plugins/acryl-router-http/tests/stream.spec.ts +0 -133
  265. package/plugins/acryl-router-http/tests/surfaces.spec.ts +0 -101
  266. package/plugins/acryl-state/src/react.ts +0 -11
  267. package/plugins/acryl-state/tests/cell.spec.ts +0 -71
  268. package/plugins/acryl-state/tests/react.spec.ts +0 -39
  269. 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'`, 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
281
  | `acrylblends/node-server` | `serve`, `createAdaptorServer`, `getRequestListener`; with `node-server/serve-static` and `node-server/conninfo` |
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 `fd1f7dcaaff8b757c0562294002c0d32d6e0a893`, 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.
@@ -4,6 +4,30 @@ You can write HTML with JSX syntax with `acrylblends/jsx`.
4
4
 
5
5
  Although `acrylblends/jsx` works on the client, you will probably use it most often when rendering content on the server side. Here are some things related to JSX that are common to both server and client.
6
6
 
7
+ ## Node.js runs `jsx()`, not JSX syntax
8
+
9
+ The apps `npm create acrylblends@latest` makes run their TypeScript on Node.js by stripping the types (no build step). That does **not** compile JSX: a `.tsx` file does not load. Either compile the file first (`tsc`
10
+ or a bundler, with the settings below), or write the call that JSX compiles to. `jsx(tag, props, ...children)` takes the children after the props, and a node renders with `toString()`:
11
+
12
+ ```ts
13
+ import { Acryl } from 'acrylblends'
14
+ import { jsx } from 'acrylblends/jsx'
15
+ import type { PropsWithChildren } from 'acrylblends/jsx'
16
+
17
+ const Layout = (props: PropsWithChildren<{ title: string }>) =>
18
+ jsx('html', { lang: 'en' }, jsx('head', null, jsx('title', null, props.title)), jsx('body', null, props.children))
19
+
20
+ const About = () =>
21
+ jsx(Layout, { title: 'About' }, jsx('h1', null, 'About'), jsx('p', { class: 'lead' }, 'Rendered on the server.'))
22
+
23
+ const app = new Acryl()
24
+ app.get('/about', (c) => c.html(jsx(About, null).toString()))
25
+
26
+ export default app
27
+ ```
28
+
29
+ Pass the children as arguments after the props. A `children` entry inside the props object is not rendered by this form.
30
+
7
31
  ## Settings
8
32
 
9
33
  To use JSX, modify the `tsconfig.json`:
@@ -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": "fd1f7dcaaff8b757c0562294002c0d32d6e0a893"
6
6
  },
7
7
  "files": 88,
8
- "digest": "sha256:c8ac3dd071b4cbc2a1f0265695dea71ea48e71cba455e2b778f9d567ca50f957"
8
+ "digest": "sha256:5e6989c7fe1b3006f8917926d8cc3e84e14c2af03440682c18d22bec0045c3d2"
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,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,8 +1,8 @@
1
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";
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-BMw6BAyP.js";
5
+ import { n as Suspense$1, t as ErrorBoundary$1 } from "./components-DdI7-ns7.js";
6
6
  //#region ../../plugins/acryl-router/src/core/jsx/streaming.ts
7
7
  /**
8
8
  * @module
@@ -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-D18Y35TI.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 }) => {
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
1
  import { D as createContext, E as useContext, T as globalContexts, _ as toArray, h as styleObjectForEach, m as normalizeIntrinsicElementKey } from "./base-ddiVmiE7.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-BMw6BAyP.js";
2
2
  //#region ../../plugins/acryl-router/src/core/jsx/dom/client.ts
3
3
  /**
4
4
  * Create a root object for rendering
@@ -1,2 +1,2 @@
1
- import { n as jsxDEV, t as Fragment } from "../../jsx-dev-runtime-kAhR_4C7.js";
1
+ import { n as jsxDEV, t as Fragment } from "../../jsx-dev-runtime-D18Y35TI.js";
2
2
  export { Fragment, jsxDEV };
@@ -1,2 +1,2 @@
1
- import { n as jsxDEV, t as Fragment } from "../../jsx-dev-runtime-kAhR_4C7.js";
1
+ import { n as jsxDEV, t as Fragment } from "../../jsx-dev-runtime-D18Y35TI.js";
2
2
  export { Fragment, jsxDEV as jsx, jsxDEV as jsxs };
@@ -1,5 +1,5 @@
1
1
  import { u as renderChildren } from "../../base-ddiVmiE7.js";
2
- import { i as renderToReadableStream$1 } from "../../components-Ce5FRyHU.js";
2
+ import { i as renderToReadableStream$1 } from "../../components-0o0CBYNv.js";
3
3
  import dom_default from "../dom.js";
4
4
  //#region ../../plugins/acryl-router/src/core/jsx/dom/server.ts
5
5
  const prepareRoot = (element) => typeof element === "string" || Array.isArray(element) ? renderChildren([element]) : element;
package/lib/jsx/dom.js CHANGED
@@ -1,9 +1,9 @@
1
1
  import { D as createContext, E as useContext, a as isValidElement, f as shallowEqual, g as Children, l as reactAPICompatVersion } from "../base-ddiVmiE7.js";
2
2
  import { r as DOM_MEMO } from "../constants-BR9jM9BC.js";
3
- import { C as createPortal, E as render, _ as useState, a as use, b as useViewTransition, c as useDeferredValue, d as useImperativeHandle, f as useInsertionEffect, g as useRef, h as useReducer, i as startViewTransition, l as useEffect, m as useMemo, n as forwardRef, o as useCallback, p as useLayoutEffect, r as startTransition, s as useDebugValue, t as createRef, u as useId, v as useSyncExternalStore, w as flushSync, y as useTransition } from "../hooks-Bq5q9IMl.js";
4
- import { a as useOptimistic, i as useFormStatus, n as jsxDEV, r as useActionState, t as Fragment } from "../jsx-dev-runtime-kAhR_4C7.js";
3
+ import { C as createPortal, E as render, _ as useState, a as use, b as useViewTransition, c as useDeferredValue, d as useImperativeHandle, f as useInsertionEffect, g as useRef, h as useReducer, i as startViewTransition, l as useEffect, m as useMemo, n as forwardRef, o as useCallback, p as useLayoutEffect, r as startTransition, s as useDebugValue, t as createRef, u as useId, v as useSyncExternalStore, w as flushSync, y as useTransition } from "../hooks-BMw6BAyP.js";
4
+ import { a as useOptimistic, i as useFormStatus, n as jsxDEV, r as useActionState, t as Fragment } from "../jsx-dev-runtime-D18Y35TI.js";
5
5
  import "./dom/jsx-runtime.js";
6
- import { n as Suspense, t as ErrorBoundary } from "../components-DYZdxJIJ.js";
6
+ import { n as Suspense, t as ErrorBoundary } from "../components-DdI7-ns7.js";
7
7
  //#region ../../plugins/acryl-router/src/core/jsx/dom/index.ts
8
8
  /**
9
9
  * @module
@@ -1,2 +1,2 @@
1
- import { i as renderToReadableStream, n as StreamingContext, r as Suspense } from "../components-Ce5FRyHU.js";
1
+ import { i as renderToReadableStream, n as StreamingContext, r as Suspense } from "../components-0o0CBYNv.js";
2
2
  export { StreamingContext, Suspense, renderToReadableStream };