create-jen-app 1.2.2 → 1.2.3

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 (588) hide show
  1. package/README.md +3 -1
  2. package/dist/index.js +1 -6
  3. package/package.json +2 -2
  4. package/templates/static/.esbuild/jen.config.js +18 -0
  5. package/templates/static/README.md +63 -67
  6. package/templates/static/build.js +4 -6
  7. package/templates/static/jen.config.ts +3 -5
  8. package/templates/static/jenjs.d.ts +3 -3
  9. package/templates/static/lib/api/(hello).d.ts +5 -5
  10. package/templates/static/lib/api/(hello).js +7 -7
  11. package/templates/static/lib/auth/cookie-utils.d.ts +20 -11
  12. package/templates/static/lib/auth/cookie-utils.js +66 -69
  13. package/templates/static/lib/auth/jwt.d.ts +28 -0
  14. package/templates/static/lib/auth/jwt.js +50 -6
  15. package/templates/static/lib/auth/session.d.ts +34 -34
  16. package/templates/static/lib/auth/session.js +79 -81
  17. package/templates/static/lib/build/asset-hashing.js +4 -4
  18. package/templates/static/lib/build/asset-manifest.js +4 -4
  19. package/templates/static/lib/build/build.d.ts +20 -0
  20. package/templates/static/lib/build/build.js +43 -6
  21. package/templates/static/lib/build/island-hydration.js +2 -2
  22. package/templates/static/lib/build/minifier.js +12 -12
  23. package/templates/static/lib/build/page-renderer.d.ts +2 -2
  24. package/templates/static/lib/build/page-renderer.js +3 -3
  25. package/templates/static/lib/build/production-build.d.ts +1 -1
  26. package/templates/static/lib/build/production-build.js +4 -4
  27. package/templates/static/lib/build/ssg-pipeline.d.ts +1 -1
  28. package/templates/static/lib/build/ssg-pipeline.js +19 -19
  29. package/templates/static/lib/build-tools/build-site.d.ts +3 -3
  30. package/templates/static/lib/build-tools/build-site.js +27 -30
  31. package/templates/static/lib/cache/index.d.ts +8 -0
  32. package/templates/static/lib/cache/index.js +8 -0
  33. package/templates/static/lib/cache/memory.d.ts +31 -4
  34. package/templates/static/lib/cache/memory.js +38 -12
  35. package/templates/static/lib/cache/redis.d.ts +43 -4
  36. package/templates/static/lib/cache/redis.js +59 -14
  37. package/templates/static/lib/cli/banner.d.ts +5 -1
  38. package/templates/static/lib/cli/banner.js +18 -14
  39. package/templates/static/lib/cli/templates/ssg/jen.config.js +29 -29
  40. package/templates/static/lib/cli/templates/ssg/site/index.js +6 -1
  41. package/templates/static/lib/cli/templates/ssr/jen.config.js +29 -29
  42. package/templates/static/lib/cli/templates/ssr/site/index.js +6 -1
  43. package/templates/static/lib/compilers/esbuild-plugins.js +96 -98
  44. package/templates/static/lib/compilers/svelte.d.ts +10 -10
  45. package/templates/static/lib/compilers/svelte.js +31 -31
  46. package/templates/static/lib/compilers/vue.d.ts +8 -8
  47. package/templates/static/lib/compilers/vue.js +76 -68
  48. package/templates/static/lib/core/config.d.ts +217 -50
  49. package/templates/static/lib/core/http.d.ts +55 -2
  50. package/templates/static/lib/core/http.js +66 -20
  51. package/templates/static/lib/core/middleware-hooks.d.ts +204 -31
  52. package/templates/static/lib/core/middleware-hooks.js +86 -41
  53. package/templates/static/lib/core/paths.d.ts +42 -4
  54. package/templates/static/lib/core/paths.js +34 -2
  55. package/templates/static/lib/core/routes/match.d.ts +51 -3
  56. package/templates/static/lib/core/routes/match.js +44 -11
  57. package/templates/static/lib/core/routes/scan.d.ts +49 -5
  58. package/templates/static/lib/core/routes/scan.js +174 -115
  59. package/templates/static/lib/core/types.d.ts +148 -13
  60. package/templates/static/lib/css/compiler.d.ts +16 -13
  61. package/templates/static/lib/css/compiler.js +62 -58
  62. package/templates/static/lib/db/connector.d.ts +27 -1
  63. package/templates/static/lib/db/connector.js +37 -11
  64. package/templates/static/lib/db/drivers/jdb.d.ts +13 -9
  65. package/templates/static/lib/db/drivers/jdb.js +41 -39
  66. package/templates/static/lib/db/drivers/sql.d.ts +16 -12
  67. package/templates/static/lib/db/drivers/sql.js +152 -135
  68. package/templates/static/lib/db/index.d.ts +20 -12
  69. package/templates/static/lib/db/index.js +41 -41
  70. package/templates/static/lib/db/types.d.ts +22 -18
  71. package/templates/static/lib/graphql/index.d.ts +47 -0
  72. package/templates/static/lib/graphql/index.js +50 -3
  73. package/templates/static/lib/graphql/resolvers.d.ts +51 -11
  74. package/templates/static/lib/graphql/resolvers.js +22 -6
  75. package/templates/static/lib/graphql/schema.d.ts +34 -0
  76. package/templates/static/lib/graphql/schema.js +34 -2
  77. package/templates/static/lib/i18n/en.json +2 -2
  78. package/templates/static/lib/i18n/es.json +2 -2
  79. package/templates/static/lib/i18n/index.d.ts +4 -4
  80. package/templates/static/lib/i18n/index.js +10 -10
  81. package/templates/static/lib/import/jen-import.d.ts +39 -10
  82. package/templates/static/lib/import/jen-import.js +130 -80
  83. package/templates/static/lib/index.d.ts +42 -11
  84. package/templates/static/lib/index.js +21 -8
  85. package/templates/static/lib/jdb/engine.d.ts +35 -6
  86. package/templates/static/lib/jdb/engine.js +260 -144
  87. package/templates/static/lib/jdb/index.d.ts +32 -0
  88. package/templates/static/lib/jdb/index.js +32 -0
  89. package/templates/static/lib/jdb/types.d.ts +212 -30
  90. package/templates/static/lib/jdb/utils.d.ts +60 -0
  91. package/templates/static/lib/jdb/utils.js +159 -107
  92. package/templates/static/lib/middleware/builtins/body-parser.d.ts +15 -0
  93. package/templates/static/lib/middleware/builtins/body-parser.js +53 -35
  94. package/templates/static/lib/middleware/builtins/cors.d.ts +8 -6
  95. package/templates/static/lib/middleware/builtins/cors.js +52 -48
  96. package/templates/static/lib/middleware/builtins/logger.d.ts +18 -0
  97. package/templates/static/lib/middleware/builtins/logger.js +31 -13
  98. package/templates/static/lib/middleware/builtins/rate-limit.d.ts +19 -2
  99. package/templates/static/lib/middleware/builtins/rate-limit.js +75 -55
  100. package/templates/static/lib/middleware/builtins/request-id.d.ts +18 -0
  101. package/templates/static/lib/middleware/builtins/request-id.js +26 -5
  102. package/templates/static/lib/middleware/builtins/security-headers.d.ts +18 -0
  103. package/templates/static/lib/middleware/builtins/security-headers.js +51 -20
  104. package/templates/static/lib/middleware/context.d.ts +102 -15
  105. package/templates/static/lib/middleware/context.js +121 -30
  106. package/templates/static/lib/middleware/decorators.d.ts +18 -1
  107. package/templates/static/lib/middleware/decorators.js +83 -34
  108. package/templates/static/lib/middleware/errors/handler.js +22 -24
  109. package/templates/static/lib/middleware/errors/http-error.d.ts +3 -3
  110. package/templates/static/lib/middleware/errors/http-error.js +8 -8
  111. package/templates/static/lib/middleware/kernel.d.ts +67 -4
  112. package/templates/static/lib/middleware/kernel.js +80 -17
  113. package/templates/static/lib/middleware/pipeline.d.ts +51 -2
  114. package/templates/static/lib/middleware/pipeline.js +143 -45
  115. package/templates/static/lib/middleware/registry.d.ts +67 -8
  116. package/templates/static/lib/middleware/registry.js +83 -22
  117. package/templates/static/lib/middleware/response.d.ts +73 -11
  118. package/templates/static/lib/middleware/response.js +104 -40
  119. package/templates/static/lib/middleware/utils/matcher.js +11 -12
  120. package/templates/static/lib/native/bundle.d.ts +13 -8
  121. package/templates/static/lib/native/bundle.js +14 -14
  122. package/templates/static/lib/native/dev-server.d.ts +11 -4
  123. package/templates/static/lib/native/dev-server.js +14 -12
  124. package/templates/static/lib/native/index.d.ts +20 -20
  125. package/templates/static/lib/native/index.js +23 -21
  126. package/templates/static/lib/native/optimizer.d.ts +14 -10
  127. package/templates/static/lib/native/optimizer.js +14 -14
  128. package/templates/static/lib/native/style-compiler.d.ts +17 -8
  129. package/templates/static/lib/native/style-compiler.js +9 -9
  130. package/templates/static/lib/plugin/loader.d.ts +8 -6
  131. package/templates/static/lib/plugin/loader.js +25 -31
  132. package/templates/static/lib/runtime/client-runtime.d.ts +15 -0
  133. package/templates/static/lib/runtime/client-runtime.js +23 -9
  134. package/templates/static/lib/runtime/hmr.d.ts +23 -1
  135. package/templates/static/lib/runtime/hmr.js +27 -5
  136. package/templates/static/lib/runtime/hydrate.d.ts +17 -0
  137. package/templates/static/lib/runtime/hydrate.js +48 -21
  138. package/templates/static/lib/runtime/island-hydration-client.d.ts +5 -2
  139. package/templates/static/lib/runtime/island-hydration-client.js +122 -91
  140. package/templates/static/lib/runtime/islands.d.ts +82 -27
  141. package/templates/static/lib/runtime/islands.js +92 -54
  142. package/templates/static/lib/runtime/render.d.ts +36 -9
  143. package/templates/static/lib/runtime/render.js +208 -130
  144. package/templates/static/lib/server/api-routes.d.ts +96 -28
  145. package/templates/static/lib/server/api-routes.js +214 -156
  146. package/templates/static/lib/server/api.d.ts +3 -3
  147. package/templates/static/lib/server/api.js +93 -92
  148. package/templates/static/lib/server/app.d.ts +37 -3
  149. package/templates/static/lib/server/app.js +328 -254
  150. package/templates/static/lib/server/runtimeServe.d.ts +56 -0
  151. package/templates/static/lib/server/runtimeServe.js +130 -69
  152. package/templates/static/lib/server/ssr.d.ts +161 -0
  153. package/templates/static/lib/server/ssr.js +219 -0
  154. package/templates/static/lib/shared/log.d.ts +47 -3
  155. package/templates/static/lib/shared/log.js +60 -10
  156. package/templates/static/server.js +4 -6
  157. package/templates/static/site/(home).tsx +30 -12
  158. package/templates/static/site/styles/global.scss +89 -78
  159. package/templates/static/tsconfig.json +39 -39
  160. package/templates/static/node_modules/.bin/esbuild +0 -16
  161. package/templates/static/node_modules/.bin/esbuild.cmd +0 -17
  162. package/templates/static/node_modules/.bin/esbuild.ps1 +0 -28
  163. package/templates/static/node_modules/.bin/tsc +0 -16
  164. package/templates/static/node_modules/.bin/tsc.cmd +0 -17
  165. package/templates/static/node_modules/.bin/tsc.ps1 +0 -28
  166. package/templates/static/node_modules/.bin/tsserver +0 -16
  167. package/templates/static/node_modules/.bin/tsserver.cmd +0 -17
  168. package/templates/static/node_modules/.bin/tsserver.ps1 +0 -28
  169. package/templates/static/node_modules/.jen/cache/B__Jen.js_packages_create-jen-app_templates_static_site_(home).tsx.mjs +0 -14
  170. package/templates/static/node_modules/.jen/cache/B__Jen.js_packages_create-jen-app_yo_site_(home).tsx.mjs +0 -11
  171. package/templates/static/node_modules/.package-lock.json +0 -585
  172. package/templates/static/node_modules/@esbuild/win32-x64/README.md +0 -3
  173. package/templates/static/node_modules/@esbuild/win32-x64/esbuild.exe +0 -0
  174. package/templates/static/node_modules/@esbuild/win32-x64/package.json +0 -20
  175. package/templates/static/node_modules/@jenjs/master/README.md +0 -24
  176. package/templates/static/node_modules/@jenjs/master/index.js +0 -3655
  177. package/templates/static/node_modules/@jenjs/master/package.json +0 -36
  178. package/templates/static/node_modules/@polka/url/build.js +0 -49
  179. package/templates/static/node_modules/@polka/url/build.mjs +0 -47
  180. package/templates/static/node_modules/@polka/url/index.d.ts +0 -11
  181. package/templates/static/node_modules/@polka/url/package.json +0 -30
  182. package/templates/static/node_modules/@polka/url/readme.md +0 -68
  183. package/templates/static/node_modules/@types/node/LICENSE +0 -21
  184. package/templates/static/node_modules/@types/node/README.md +0 -15
  185. package/templates/static/node_modules/@types/node/assert/strict.d.ts +0 -111
  186. package/templates/static/node_modules/@types/node/assert.d.ts +0 -1078
  187. package/templates/static/node_modules/@types/node/async_hooks.d.ts +0 -603
  188. package/templates/static/node_modules/@types/node/buffer.buffer.d.ts +0 -472
  189. package/templates/static/node_modules/@types/node/buffer.d.ts +0 -1934
  190. package/templates/static/node_modules/@types/node/child_process.d.ts +0 -1476
  191. package/templates/static/node_modules/@types/node/cluster.d.ts +0 -578
  192. package/templates/static/node_modules/@types/node/compatibility/disposable.d.ts +0 -14
  193. package/templates/static/node_modules/@types/node/compatibility/index.d.ts +0 -9
  194. package/templates/static/node_modules/@types/node/compatibility/indexable.d.ts +0 -20
  195. package/templates/static/node_modules/@types/node/compatibility/iterators.d.ts +0 -20
  196. package/templates/static/node_modules/@types/node/console.d.ts +0 -452
  197. package/templates/static/node_modules/@types/node/constants.d.ts +0 -21
  198. package/templates/static/node_modules/@types/node/crypto.d.ts +0 -4545
  199. package/templates/static/node_modules/@types/node/dgram.d.ts +0 -600
  200. package/templates/static/node_modules/@types/node/diagnostics_channel.d.ts +0 -578
  201. package/templates/static/node_modules/@types/node/dns/promises.d.ts +0 -503
  202. package/templates/static/node_modules/@types/node/dns.d.ts +0 -923
  203. package/templates/static/node_modules/@types/node/domain.d.ts +0 -170
  204. package/templates/static/node_modules/@types/node/events.d.ts +0 -976
  205. package/templates/static/node_modules/@types/node/fs/promises.d.ts +0 -1295
  206. package/templates/static/node_modules/@types/node/fs.d.ts +0 -4461
  207. package/templates/static/node_modules/@types/node/globals.d.ts +0 -172
  208. package/templates/static/node_modules/@types/node/globals.typedarray.d.ts +0 -38
  209. package/templates/static/node_modules/@types/node/http.d.ts +0 -2089
  210. package/templates/static/node_modules/@types/node/http2.d.ts +0 -2644
  211. package/templates/static/node_modules/@types/node/https.d.ts +0 -579
  212. package/templates/static/node_modules/@types/node/index.d.ts +0 -97
  213. package/templates/static/node_modules/@types/node/inspector.d.ts +0 -253
  214. package/templates/static/node_modules/@types/node/inspector.generated.d.ts +0 -4052
  215. package/templates/static/node_modules/@types/node/module.d.ts +0 -891
  216. package/templates/static/node_modules/@types/node/net.d.ts +0 -1057
  217. package/templates/static/node_modules/@types/node/os.d.ts +0 -506
  218. package/templates/static/node_modules/@types/node/package.json +0 -145
  219. package/templates/static/node_modules/@types/node/path.d.ts +0 -200
  220. package/templates/static/node_modules/@types/node/perf_hooks.d.ts +0 -968
  221. package/templates/static/node_modules/@types/node/process.d.ts +0 -2089
  222. package/templates/static/node_modules/@types/node/punycode.d.ts +0 -117
  223. package/templates/static/node_modules/@types/node/querystring.d.ts +0 -152
  224. package/templates/static/node_modules/@types/node/readline/promises.d.ts +0 -161
  225. package/templates/static/node_modules/@types/node/readline.d.ts +0 -594
  226. package/templates/static/node_modules/@types/node/repl.d.ts +0 -428
  227. package/templates/static/node_modules/@types/node/sea.d.ts +0 -153
  228. package/templates/static/node_modules/@types/node/sqlite.d.ts +0 -721
  229. package/templates/static/node_modules/@types/node/stream/consumers.d.ts +0 -38
  230. package/templates/static/node_modules/@types/node/stream/promises.d.ts +0 -90
  231. package/templates/static/node_modules/@types/node/stream/web.d.ts +0 -622
  232. package/templates/static/node_modules/@types/node/stream.d.ts +0 -1664
  233. package/templates/static/node_modules/@types/node/string_decoder.d.ts +0 -67
  234. package/templates/static/node_modules/@types/node/test.d.ts +0 -2163
  235. package/templates/static/node_modules/@types/node/timers/promises.d.ts +0 -108
  236. package/templates/static/node_modules/@types/node/timers.d.ts +0 -287
  237. package/templates/static/node_modules/@types/node/tls.d.ts +0 -1319
  238. package/templates/static/node_modules/@types/node/trace_events.d.ts +0 -197
  239. package/templates/static/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +0 -468
  240. package/templates/static/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +0 -34
  241. package/templates/static/node_modules/@types/node/ts5.6/index.d.ts +0 -97
  242. package/templates/static/node_modules/@types/node/tty.d.ts +0 -208
  243. package/templates/static/node_modules/@types/node/url.d.ts +0 -984
  244. package/templates/static/node_modules/@types/node/util.d.ts +0 -2606
  245. package/templates/static/node_modules/@types/node/v8.d.ts +0 -920
  246. package/templates/static/node_modules/@types/node/vm.d.ts +0 -1000
  247. package/templates/static/node_modules/@types/node/wasi.d.ts +0 -181
  248. package/templates/static/node_modules/@types/node/web-globals/abortcontroller.d.ts +0 -34
  249. package/templates/static/node_modules/@types/node/web-globals/domexception.d.ts +0 -68
  250. package/templates/static/node_modules/@types/node/web-globals/events.d.ts +0 -97
  251. package/templates/static/node_modules/@types/node/web-globals/fetch.d.ts +0 -55
  252. package/templates/static/node_modules/@types/node/web-globals/navigator.d.ts +0 -22
  253. package/templates/static/node_modules/@types/node/web-globals/storage.d.ts +0 -24
  254. package/templates/static/node_modules/@types/node/worker_threads.d.ts +0 -784
  255. package/templates/static/node_modules/@types/node/zlib.d.ts +0 -683
  256. package/templates/static/node_modules/esbuild/LICENSE.md +0 -21
  257. package/templates/static/node_modules/esbuild/README.md +0 -3
  258. package/templates/static/node_modules/esbuild/bin/esbuild +0 -223
  259. package/templates/static/node_modules/esbuild/install.js +0 -289
  260. package/templates/static/node_modules/esbuild/lib/main.d.ts +0 -716
  261. package/templates/static/node_modules/esbuild/lib/main.js +0 -2242
  262. package/templates/static/node_modules/esbuild/package.json +0 -49
  263. package/templates/static/node_modules/mrmime/index.d.ts +0 -2
  264. package/templates/static/node_modules/mrmime/index.js +0 -449
  265. package/templates/static/node_modules/mrmime/index.mjs +0 -448
  266. package/templates/static/node_modules/mrmime/license +0 -21
  267. package/templates/static/node_modules/mrmime/package.json +0 -44
  268. package/templates/static/node_modules/mrmime/readme.md +0 -130
  269. package/templates/static/node_modules/preact/LICENSE +0 -21
  270. package/templates/static/node_modules/preact/README.md +0 -185
  271. package/templates/static/node_modules/preact/compat/client.d.ts +0 -13
  272. package/templates/static/node_modules/preact/compat/client.js +0 -21
  273. package/templates/static/node_modules/preact/compat/client.mjs +0 -24
  274. package/templates/static/node_modules/preact/compat/dist/compat.js +0 -2
  275. package/templates/static/node_modules/preact/compat/dist/compat.js.map +0 -1
  276. package/templates/static/node_modules/preact/compat/dist/compat.mjs +0 -2
  277. package/templates/static/node_modules/preact/compat/dist/compat.module.js +0 -2
  278. package/templates/static/node_modules/preact/compat/dist/compat.module.js.map +0 -1
  279. package/templates/static/node_modules/preact/compat/dist/compat.umd.js +0 -2
  280. package/templates/static/node_modules/preact/compat/dist/compat.umd.js.map +0 -1
  281. package/templates/static/node_modules/preact/compat/jsx-dev-runtime.js +0 -3
  282. package/templates/static/node_modules/preact/compat/jsx-dev-runtime.mjs +0 -3
  283. package/templates/static/node_modules/preact/compat/jsx-runtime.js +0 -3
  284. package/templates/static/node_modules/preact/compat/jsx-runtime.mjs +0 -3
  285. package/templates/static/node_modules/preact/compat/package.json +0 -55
  286. package/templates/static/node_modules/preact/compat/scheduler.js +0 -15
  287. package/templates/static/node_modules/preact/compat/scheduler.mjs +0 -23
  288. package/templates/static/node_modules/preact/compat/server.browser.js +0 -11
  289. package/templates/static/node_modules/preact/compat/server.js +0 -36
  290. package/templates/static/node_modules/preact/compat/server.mjs +0 -17
  291. package/templates/static/node_modules/preact/compat/src/Children.js +0 -21
  292. package/templates/static/node_modules/preact/compat/src/PureComponent.js +0 -16
  293. package/templates/static/node_modules/preact/compat/src/forwardRef.js +0 -44
  294. package/templates/static/node_modules/preact/compat/src/hooks.js +0 -70
  295. package/templates/static/node_modules/preact/compat/src/index.d.ts +0 -351
  296. package/templates/static/node_modules/preact/compat/src/index.js +0 -238
  297. package/templates/static/node_modules/preact/compat/src/internal.d.ts +0 -48
  298. package/templates/static/node_modules/preact/compat/src/memo.js +0 -35
  299. package/templates/static/node_modules/preact/compat/src/portals.js +0 -78
  300. package/templates/static/node_modules/preact/compat/src/render.js +0 -313
  301. package/templates/static/node_modules/preact/compat/src/suspense-list.d.ts +0 -16
  302. package/templates/static/node_modules/preact/compat/src/suspense-list.js +0 -127
  303. package/templates/static/node_modules/preact/compat/src/suspense.d.ts +0 -19
  304. package/templates/static/node_modules/preact/compat/src/suspense.js +0 -291
  305. package/templates/static/node_modules/preact/compat/src/util.js +0 -33
  306. package/templates/static/node_modules/preact/compat/test-utils.js +0 -1
  307. package/templates/static/node_modules/preact/compat/test-utils.mjs +0 -1
  308. package/templates/static/node_modules/preact/debug/dist/debug.js +0 -2
  309. package/templates/static/node_modules/preact/debug/dist/debug.js.map +0 -1
  310. package/templates/static/node_modules/preact/debug/dist/debug.mjs +0 -2
  311. package/templates/static/node_modules/preact/debug/dist/debug.module.js +0 -2
  312. package/templates/static/node_modules/preact/debug/dist/debug.module.js.map +0 -1
  313. package/templates/static/node_modules/preact/debug/dist/debug.umd.js +0 -2
  314. package/templates/static/node_modules/preact/debug/dist/debug.umd.js.map +0 -1
  315. package/templates/static/node_modules/preact/debug/package.json +0 -27
  316. package/templates/static/node_modules/preact/debug/src/check-props.js +0 -54
  317. package/templates/static/node_modules/preact/debug/src/component-stack.js +0 -146
  318. package/templates/static/node_modules/preact/debug/src/constants.js +0 -3
  319. package/templates/static/node_modules/preact/debug/src/debug.js +0 -593
  320. package/templates/static/node_modules/preact/debug/src/index.d.ts +0 -23
  321. package/templates/static/node_modules/preact/debug/src/index.js +0 -12
  322. package/templates/static/node_modules/preact/debug/src/internal.d.ts +0 -82
  323. package/templates/static/node_modules/preact/debug/src/util.js +0 -15
  324. package/templates/static/node_modules/preact/devtools/dist/devtools.js +0 -2
  325. package/templates/static/node_modules/preact/devtools/dist/devtools.js.map +0 -1
  326. package/templates/static/node_modules/preact/devtools/dist/devtools.mjs +0 -2
  327. package/templates/static/node_modules/preact/devtools/dist/devtools.module.js +0 -2
  328. package/templates/static/node_modules/preact/devtools/dist/devtools.module.js.map +0 -1
  329. package/templates/static/node_modules/preact/devtools/dist/devtools.umd.js +0 -2
  330. package/templates/static/node_modules/preact/devtools/dist/devtools.umd.js.map +0 -1
  331. package/templates/static/node_modules/preact/devtools/package.json +0 -25
  332. package/templates/static/node_modules/preact/devtools/src/devtools.js +0 -21
  333. package/templates/static/node_modules/preact/devtools/src/index.d.ts +0 -8
  334. package/templates/static/node_modules/preact/devtools/src/index.js +0 -15
  335. package/templates/static/node_modules/preact/dist/preact.js +0 -2
  336. package/templates/static/node_modules/preact/dist/preact.js.map +0 -1
  337. package/templates/static/node_modules/preact/dist/preact.min.js +0 -2
  338. package/templates/static/node_modules/preact/dist/preact.min.js.map +0 -1
  339. package/templates/static/node_modules/preact/dist/preact.min.module.js +0 -2
  340. package/templates/static/node_modules/preact/dist/preact.min.module.js.map +0 -1
  341. package/templates/static/node_modules/preact/dist/preact.min.umd.js +0 -2
  342. package/templates/static/node_modules/preact/dist/preact.min.umd.js.map +0 -1
  343. package/templates/static/node_modules/preact/dist/preact.mjs +0 -2
  344. package/templates/static/node_modules/preact/dist/preact.module.js +0 -2
  345. package/templates/static/node_modules/preact/dist/preact.module.js.map +0 -1
  346. package/templates/static/node_modules/preact/dist/preact.umd.js +0 -2
  347. package/templates/static/node_modules/preact/dist/preact.umd.js.map +0 -1
  348. package/templates/static/node_modules/preact/hooks/dist/hooks.js +0 -2
  349. package/templates/static/node_modules/preact/hooks/dist/hooks.js.map +0 -1
  350. package/templates/static/node_modules/preact/hooks/dist/hooks.mjs +0 -2
  351. package/templates/static/node_modules/preact/hooks/dist/hooks.module.js +0 -2
  352. package/templates/static/node_modules/preact/hooks/dist/hooks.module.js.map +0 -1
  353. package/templates/static/node_modules/preact/hooks/dist/hooks.umd.js +0 -2
  354. package/templates/static/node_modules/preact/hooks/dist/hooks.umd.js.map +0 -1
  355. package/templates/static/node_modules/preact/hooks/package.json +0 -35
  356. package/templates/static/node_modules/preact/hooks/src/index.d.ts +0 -145
  357. package/templates/static/node_modules/preact/hooks/src/index.js +0 -555
  358. package/templates/static/node_modules/preact/hooks/src/internal.d.ts +0 -103
  359. package/templates/static/node_modules/preact/jsx-runtime/dist/jsxRuntime.js +0 -2
  360. package/templates/static/node_modules/preact/jsx-runtime/dist/jsxRuntime.js.map +0 -1
  361. package/templates/static/node_modules/preact/jsx-runtime/dist/jsxRuntime.mjs +0 -2
  362. package/templates/static/node_modules/preact/jsx-runtime/dist/jsxRuntime.module.js +0 -2
  363. package/templates/static/node_modules/preact/jsx-runtime/dist/jsxRuntime.module.js.map +0 -1
  364. package/templates/static/node_modules/preact/jsx-runtime/dist/jsxRuntime.umd.js +0 -2
  365. package/templates/static/node_modules/preact/jsx-runtime/dist/jsxRuntime.umd.js.map +0 -1
  366. package/templates/static/node_modules/preact/jsx-runtime/package.json +0 -28
  367. package/templates/static/node_modules/preact/jsx-runtime/src/index.d.ts +0 -62
  368. package/templates/static/node_modules/preact/jsx-runtime/src/index.js +0 -206
  369. package/templates/static/node_modules/preact/jsx-runtime/src/utils.js +0 -36
  370. package/templates/static/node_modules/preact/package.json +0 -258
  371. package/templates/static/node_modules/preact/src/cjs.js +0 -3
  372. package/templates/static/node_modules/preact/src/clone-element.js +0 -48
  373. package/templates/static/node_modules/preact/src/component.js +0 -249
  374. package/templates/static/node_modules/preact/src/constants.js +0 -22
  375. package/templates/static/node_modules/preact/src/create-context.js +0 -60
  376. package/templates/static/node_modules/preact/src/create-element.js +0 -97
  377. package/templates/static/node_modules/preact/src/diff/catch-error.js +0 -46
  378. package/templates/static/node_modules/preact/src/diff/children.js +0 -451
  379. package/templates/static/node_modules/preact/src/diff/index.js +0 -684
  380. package/templates/static/node_modules/preact/src/diff/props.js +0 -173
  381. package/templates/static/node_modules/preact/src/dom.d.ts +0 -2476
  382. package/templates/static/node_modules/preact/src/index-5.d.ts +0 -399
  383. package/templates/static/node_modules/preact/src/index.d.ts +0 -402
  384. package/templates/static/node_modules/preact/src/index.js +0 -13
  385. package/templates/static/node_modules/preact/src/internal.d.ts +0 -190
  386. package/templates/static/node_modules/preact/src/jsx.d.ts +0 -2878
  387. package/templates/static/node_modules/preact/src/options.js +0 -16
  388. package/templates/static/node_modules/preact/src/render.js +0 -78
  389. package/templates/static/node_modules/preact/src/util.js +0 -28
  390. package/templates/static/node_modules/preact/test-utils/dist/testUtils.js +0 -2
  391. package/templates/static/node_modules/preact/test-utils/dist/testUtils.js.map +0 -1
  392. package/templates/static/node_modules/preact/test-utils/dist/testUtils.mjs +0 -2
  393. package/templates/static/node_modules/preact/test-utils/dist/testUtils.module.js +0 -2
  394. package/templates/static/node_modules/preact/test-utils/dist/testUtils.module.js.map +0 -1
  395. package/templates/static/node_modules/preact/test-utils/dist/testUtils.umd.js +0 -2
  396. package/templates/static/node_modules/preact/test-utils/dist/testUtils.umd.js.map +0 -1
  397. package/templates/static/node_modules/preact/test-utils/package.json +0 -28
  398. package/templates/static/node_modules/preact/test-utils/src/index.d.ts +0 -3
  399. package/templates/static/node_modules/preact/test-utils/src/index.js +0 -129
  400. package/templates/static/node_modules/preact-render-to-string/LICENSE +0 -21
  401. package/templates/static/node_modules/preact-render-to-string/README.md +0 -149
  402. package/templates/static/node_modules/preact-render-to-string/dist/commonjs.js +0 -2
  403. package/templates/static/node_modules/preact-render-to-string/dist/index.d.ts +0 -17
  404. package/templates/static/node_modules/preact-render-to-string/dist/index.js +0 -6
  405. package/templates/static/node_modules/preact-render-to-string/dist/index.js.map +0 -1
  406. package/templates/static/node_modules/preact-render-to-string/dist/index.mjs +0 -2
  407. package/templates/static/node_modules/preact-render-to-string/dist/index.module.js +0 -2
  408. package/templates/static/node_modules/preact-render-to-string/dist/index.module.js.map +0 -1
  409. package/templates/static/node_modules/preact-render-to-string/dist/index.umd.js +0 -2
  410. package/templates/static/node_modules/preact-render-to-string/dist/index.umd.js.map +0 -1
  411. package/templates/static/node_modules/preact-render-to-string/dist/internal.d.ts +0 -35
  412. package/templates/static/node_modules/preact-render-to-string/dist/jsx/commonjs.js +0 -2
  413. package/templates/static/node_modules/preact-render-to-string/dist/jsx/index.js +0 -4
  414. package/templates/static/node_modules/preact-render-to-string/dist/jsx/index.js.map +0 -1
  415. package/templates/static/node_modules/preact-render-to-string/dist/jsx/index.mjs +0 -2
  416. package/templates/static/node_modules/preact-render-to-string/dist/jsx/index.module.js +0 -2
  417. package/templates/static/node_modules/preact-render-to-string/dist/jsx/index.module.js.map +0 -1
  418. package/templates/static/node_modules/preact-render-to-string/dist/jsx/index.umd.js +0 -2
  419. package/templates/static/node_modules/preact-render-to-string/dist/jsx/index.umd.js.map +0 -1
  420. package/templates/static/node_modules/preact-render-to-string/dist/jsx.d.ts +0 -24
  421. package/templates/static/node_modules/preact-render-to-string/dist/stream/index.js +0 -2
  422. package/templates/static/node_modules/preact-render-to-string/dist/stream/index.js.map +0 -1
  423. package/templates/static/node_modules/preact-render-to-string/dist/stream/index.mjs +0 -2
  424. package/templates/static/node_modules/preact-render-to-string/dist/stream/index.module.js +0 -2
  425. package/templates/static/node_modules/preact-render-to-string/dist/stream/index.module.js.map +0 -1
  426. package/templates/static/node_modules/preact-render-to-string/dist/stream/index.umd.js +0 -2
  427. package/templates/static/node_modules/preact-render-to-string/dist/stream/index.umd.js.map +0 -1
  428. package/templates/static/node_modules/preact-render-to-string/dist/stream/node/index.js +0 -884
  429. package/templates/static/node_modules/preact-render-to-string/dist/stream/node/index.js.map +0 -1
  430. package/templates/static/node_modules/preact-render-to-string/dist/stream/node/index.mjs +0 -884
  431. package/templates/static/node_modules/preact-render-to-string/dist/stream/node/index.module.js +0 -884
  432. package/templates/static/node_modules/preact-render-to-string/dist/stream/node/index.module.js.map +0 -1
  433. package/templates/static/node_modules/preact-render-to-string/dist/stream/node/index.umd.js +0 -888
  434. package/templates/static/node_modules/preact-render-to-string/dist/stream/node/index.umd.js.map +0 -1
  435. package/templates/static/node_modules/preact-render-to-string/dist/stream-node.d.ts +0 -19
  436. package/templates/static/node_modules/preact-render-to-string/dist/stream.d.ts +0 -10
  437. package/templates/static/node_modules/preact-render-to-string/jsx.d.ts +0 -24
  438. package/templates/static/node_modules/preact-render-to-string/jsx.js +0 -1
  439. package/templates/static/node_modules/preact-render-to-string/package.json +0 -152
  440. package/templates/static/node_modules/preact-render-to-string/src/index.d.ts +0 -17
  441. package/templates/static/node_modules/preact-render-to-string/src/index.js +0 -764
  442. package/templates/static/node_modules/preact-render-to-string/src/internal.d.ts +0 -35
  443. package/templates/static/node_modules/preact-render-to-string/src/jsx.d.ts +0 -24
  444. package/templates/static/node_modules/preact-render-to-string/src/jsx.js +0 -102
  445. package/templates/static/node_modules/preact-render-to-string/src/lib/chunked.js +0 -97
  446. package/templates/static/node_modules/preact-render-to-string/src/lib/client.js +0 -62
  447. package/templates/static/node_modules/preact-render-to-string/src/lib/constants.js +0 -20
  448. package/templates/static/node_modules/preact-render-to-string/src/lib/polyfills.js +0 -8
  449. package/templates/static/node_modules/preact-render-to-string/src/lib/util.js +0 -208
  450. package/templates/static/node_modules/preact-render-to-string/src/pretty.js +0 -491
  451. package/templates/static/node_modules/preact-render-to-string/src/stream-node.d.ts +0 -19
  452. package/templates/static/node_modules/preact-render-to-string/src/stream-node.js +0 -84
  453. package/templates/static/node_modules/preact-render-to-string/src/stream.d.ts +0 -10
  454. package/templates/static/node_modules/preact-render-to-string/src/stream.js +0 -43
  455. package/templates/static/node_modules/preact-render-to-string/typings.json +0 -5
  456. package/templates/static/node_modules/sirv/build.js +0 -197
  457. package/templates/static/node_modules/sirv/build.mjs +0 -197
  458. package/templates/static/node_modules/sirv/index.d.mts +0 -29
  459. package/templates/static/node_modules/sirv/index.d.ts +0 -33
  460. package/templates/static/node_modules/sirv/package.json +0 -40
  461. package/templates/static/node_modules/sirv/readme.md +0 -238
  462. package/templates/static/node_modules/totalist/dist/index.js +0 -24
  463. package/templates/static/node_modules/totalist/dist/index.mjs +0 -22
  464. package/templates/static/node_modules/totalist/index.d.ts +0 -3
  465. package/templates/static/node_modules/totalist/license +0 -21
  466. package/templates/static/node_modules/totalist/package.json +0 -55
  467. package/templates/static/node_modules/totalist/readme.md +0 -109
  468. package/templates/static/node_modules/totalist/sync/index.d.ts +0 -3
  469. package/templates/static/node_modules/totalist/sync/index.js +0 -17
  470. package/templates/static/node_modules/totalist/sync/index.mjs +0 -15
  471. package/templates/static/node_modules/typescript/bin/tsc +0 -2
  472. package/templates/static/node_modules/typescript/bin/tsserver +0 -2
  473. package/templates/static/node_modules/typescript/lib/cs/diagnosticMessages.generated.json +0 -2122
  474. package/templates/static/node_modules/typescript/lib/de/diagnosticMessages.generated.json +0 -2122
  475. package/templates/static/node_modules/typescript/lib/es/diagnosticMessages.generated.json +0 -2122
  476. package/templates/static/node_modules/typescript/lib/fr/diagnosticMessages.generated.json +0 -2122
  477. package/templates/static/node_modules/typescript/lib/it/diagnosticMessages.generated.json +0 -2122
  478. package/templates/static/node_modules/typescript/lib/ja/diagnosticMessages.generated.json +0 -2122
  479. package/templates/static/node_modules/typescript/lib/ko/diagnosticMessages.generated.json +0 -2122
  480. package/templates/static/node_modules/typescript/lib/lib.d.ts +0 -22
  481. package/templates/static/node_modules/typescript/lib/lib.decorators.d.ts +0 -384
  482. package/templates/static/node_modules/typescript/lib/lib.decorators.legacy.d.ts +0 -22
  483. package/templates/static/node_modules/typescript/lib/lib.dom.asynciterable.d.ts +0 -41
  484. package/templates/static/node_modules/typescript/lib/lib.dom.d.ts +0 -39429
  485. package/templates/static/node_modules/typescript/lib/lib.dom.iterable.d.ts +0 -571
  486. package/templates/static/node_modules/typescript/lib/lib.es2015.collection.d.ts +0 -147
  487. package/templates/static/node_modules/typescript/lib/lib.es2015.core.d.ts +0 -597
  488. package/templates/static/node_modules/typescript/lib/lib.es2015.d.ts +0 -28
  489. package/templates/static/node_modules/typescript/lib/lib.es2015.generator.d.ts +0 -77
  490. package/templates/static/node_modules/typescript/lib/lib.es2015.iterable.d.ts +0 -605
  491. package/templates/static/node_modules/typescript/lib/lib.es2015.promise.d.ts +0 -81
  492. package/templates/static/node_modules/typescript/lib/lib.es2015.proxy.d.ts +0 -128
  493. package/templates/static/node_modules/typescript/lib/lib.es2015.reflect.d.ts +0 -144
  494. package/templates/static/node_modules/typescript/lib/lib.es2015.symbol.d.ts +0 -46
  495. package/templates/static/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts +0 -326
  496. package/templates/static/node_modules/typescript/lib/lib.es2016.array.include.d.ts +0 -116
  497. package/templates/static/node_modules/typescript/lib/lib.es2016.d.ts +0 -21
  498. package/templates/static/node_modules/typescript/lib/lib.es2016.full.d.ts +0 -23
  499. package/templates/static/node_modules/typescript/lib/lib.es2016.intl.d.ts +0 -31
  500. package/templates/static/node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts +0 -21
  501. package/templates/static/node_modules/typescript/lib/lib.es2017.d.ts +0 -26
  502. package/templates/static/node_modules/typescript/lib/lib.es2017.date.d.ts +0 -31
  503. package/templates/static/node_modules/typescript/lib/lib.es2017.full.d.ts +0 -23
  504. package/templates/static/node_modules/typescript/lib/lib.es2017.intl.d.ts +0 -44
  505. package/templates/static/node_modules/typescript/lib/lib.es2017.object.d.ts +0 -49
  506. package/templates/static/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts +0 -135
  507. package/templates/static/node_modules/typescript/lib/lib.es2017.string.d.ts +0 -45
  508. package/templates/static/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts +0 -53
  509. package/templates/static/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts +0 -77
  510. package/templates/static/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts +0 -53
  511. package/templates/static/node_modules/typescript/lib/lib.es2018.d.ts +0 -24
  512. package/templates/static/node_modules/typescript/lib/lib.es2018.full.d.ts +0 -24
  513. package/templates/static/node_modules/typescript/lib/lib.es2018.intl.d.ts +0 -83
  514. package/templates/static/node_modules/typescript/lib/lib.es2018.promise.d.ts +0 -30
  515. package/templates/static/node_modules/typescript/lib/lib.es2018.regexp.d.ts +0 -37
  516. package/templates/static/node_modules/typescript/lib/lib.es2019.array.d.ts +0 -79
  517. package/templates/static/node_modules/typescript/lib/lib.es2019.d.ts +0 -24
  518. package/templates/static/node_modules/typescript/lib/lib.es2019.full.d.ts +0 -24
  519. package/templates/static/node_modules/typescript/lib/lib.es2019.intl.d.ts +0 -23
  520. package/templates/static/node_modules/typescript/lib/lib.es2019.object.d.ts +0 -33
  521. package/templates/static/node_modules/typescript/lib/lib.es2019.string.d.ts +0 -37
  522. package/templates/static/node_modules/typescript/lib/lib.es2019.symbol.d.ts +0 -24
  523. package/templates/static/node_modules/typescript/lib/lib.es2020.bigint.d.ts +0 -765
  524. package/templates/static/node_modules/typescript/lib/lib.es2020.d.ts +0 -27
  525. package/templates/static/node_modules/typescript/lib/lib.es2020.date.d.ts +0 -42
  526. package/templates/static/node_modules/typescript/lib/lib.es2020.full.d.ts +0 -24
  527. package/templates/static/node_modules/typescript/lib/lib.es2020.intl.d.ts +0 -474
  528. package/templates/static/node_modules/typescript/lib/lib.es2020.number.d.ts +0 -28
  529. package/templates/static/node_modules/typescript/lib/lib.es2020.promise.d.ts +0 -47
  530. package/templates/static/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts +0 -99
  531. package/templates/static/node_modules/typescript/lib/lib.es2020.string.d.ts +0 -44
  532. package/templates/static/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts +0 -41
  533. package/templates/static/node_modules/typescript/lib/lib.es2021.d.ts +0 -23
  534. package/templates/static/node_modules/typescript/lib/lib.es2021.full.d.ts +0 -24
  535. package/templates/static/node_modules/typescript/lib/lib.es2021.intl.d.ts +0 -166
  536. package/templates/static/node_modules/typescript/lib/lib.es2021.promise.d.ts +0 -48
  537. package/templates/static/node_modules/typescript/lib/lib.es2021.string.d.ts +0 -33
  538. package/templates/static/node_modules/typescript/lib/lib.es2021.weakref.d.ts +0 -78
  539. package/templates/static/node_modules/typescript/lib/lib.es2022.array.d.ts +0 -121
  540. package/templates/static/node_modules/typescript/lib/lib.es2022.d.ts +0 -25
  541. package/templates/static/node_modules/typescript/lib/lib.es2022.error.d.ts +0 -75
  542. package/templates/static/node_modules/typescript/lib/lib.es2022.full.d.ts +0 -24
  543. package/templates/static/node_modules/typescript/lib/lib.es2022.intl.d.ts +0 -145
  544. package/templates/static/node_modules/typescript/lib/lib.es2022.object.d.ts +0 -26
  545. package/templates/static/node_modules/typescript/lib/lib.es2022.regexp.d.ts +0 -39
  546. package/templates/static/node_modules/typescript/lib/lib.es2022.string.d.ts +0 -25
  547. package/templates/static/node_modules/typescript/lib/lib.es2023.array.d.ts +0 -924
  548. package/templates/static/node_modules/typescript/lib/lib.es2023.collection.d.ts +0 -21
  549. package/templates/static/node_modules/typescript/lib/lib.es2023.d.ts +0 -22
  550. package/templates/static/node_modules/typescript/lib/lib.es2023.full.d.ts +0 -24
  551. package/templates/static/node_modules/typescript/lib/lib.es2023.intl.d.ts +0 -56
  552. package/templates/static/node_modules/typescript/lib/lib.es2024.arraybuffer.d.ts +0 -65
  553. package/templates/static/node_modules/typescript/lib/lib.es2024.collection.d.ts +0 -29
  554. package/templates/static/node_modules/typescript/lib/lib.es2024.d.ts +0 -26
  555. package/templates/static/node_modules/typescript/lib/lib.es2024.full.d.ts +0 -24
  556. package/templates/static/node_modules/typescript/lib/lib.es2024.object.d.ts +0 -29
  557. package/templates/static/node_modules/typescript/lib/lib.es2024.promise.d.ts +0 -35
  558. package/templates/static/node_modules/typescript/lib/lib.es2024.regexp.d.ts +0 -25
  559. package/templates/static/node_modules/typescript/lib/lib.es2024.sharedmemory.d.ts +0 -68
  560. package/templates/static/node_modules/typescript/lib/lib.es2024.string.d.ts +0 -29
  561. package/templates/static/node_modules/typescript/lib/lib.es5.d.ts +0 -4601
  562. package/templates/static/node_modules/typescript/lib/lib.es6.d.ts +0 -23
  563. package/templates/static/node_modules/typescript/lib/lib.esnext.array.d.ts +0 -35
  564. package/templates/static/node_modules/typescript/lib/lib.esnext.collection.d.ts +0 -96
  565. package/templates/static/node_modules/typescript/lib/lib.esnext.d.ts +0 -29
  566. package/templates/static/node_modules/typescript/lib/lib.esnext.decorators.d.ts +0 -28
  567. package/templates/static/node_modules/typescript/lib/lib.esnext.disposable.d.ts +0 -193
  568. package/templates/static/node_modules/typescript/lib/lib.esnext.error.d.ts +0 -24
  569. package/templates/static/node_modules/typescript/lib/lib.esnext.float16.d.ts +0 -445
  570. package/templates/static/node_modules/typescript/lib/lib.esnext.full.d.ts +0 -24
  571. package/templates/static/node_modules/typescript/lib/lib.esnext.intl.d.ts +0 -21
  572. package/templates/static/node_modules/typescript/lib/lib.esnext.iterator.d.ts +0 -148
  573. package/templates/static/node_modules/typescript/lib/lib.esnext.promise.d.ts +0 -34
  574. package/templates/static/node_modules/typescript/lib/lib.esnext.sharedmemory.d.ts +0 -25
  575. package/templates/static/node_modules/typescript/lib/lib.scripthost.d.ts +0 -322
  576. package/templates/static/node_modules/typescript/lib/lib.webworker.asynciterable.d.ts +0 -41
  577. package/templates/static/node_modules/typescript/lib/lib.webworker.d.ts +0 -13150
  578. package/templates/static/node_modules/typescript/lib/lib.webworker.importscripts.d.ts +0 -23
  579. package/templates/static/node_modules/typescript/lib/lib.webworker.iterable.d.ts +0 -340
  580. package/templates/static/node_modules/typescript/lib/pl/diagnosticMessages.generated.json +0 -2122
  581. package/templates/static/node_modules/typescript/lib/pt-br/diagnosticMessages.generated.json +0 -2122
  582. package/templates/static/node_modules/typescript/lib/ru/diagnosticMessages.generated.json +0 -2122
  583. package/templates/static/node_modules/typescript/lib/tr/diagnosticMessages.generated.json +0 -2122
  584. package/templates/static/node_modules/typescript/lib/tsc.js +0 -8
  585. package/templates/static/node_modules/typescript/lib/tsserver.js +0 -8
  586. package/templates/static/node_modules/typescript/lib/tsserverlibrary.d.ts +0 -17
  587. package/templates/static/node_modules/typescript/lib/tsserverlibrary.js +0 -21
  588. package/templates/static/node_modules/typescript/lib/typescript.d.ts +0 -11437
@@ -1,16 +0,0 @@
1
- import { _catchError } from './diff/catch-error';
2
-
3
- /**
4
- * The `option` object can potentially contain callback functions
5
- * that are called during various stages of our renderer. This is the
6
- * foundation on which all our addons like `preact/debug`, `preact/compat`,
7
- * and `preact/hooks` are based on. See the `Options` type in `internal.d.ts`
8
- * for a full list of available option hooks (most editors/IDEs allow you to
9
- * ctrl+click or cmd+click on mac the type definition below).
10
- * @type {import('./internal').Options}
11
- */
12
- const options = {
13
- _catchError
14
- };
15
-
16
- export default options;
@@ -1,78 +0,0 @@
1
- import { EMPTY_OBJ, NULL } from './constants';
2
- import { commitRoot, diff } from './diff/index';
3
- import { createElement, Fragment } from './create-element';
4
- import options from './options';
5
- import { slice } from './util';
6
-
7
- /**
8
- * Render a Preact virtual node into a DOM element
9
- * @param {import('./internal').ComponentChild} vnode The virtual node to render
10
- * @param {import('./internal').PreactElement} parentDom The DOM element to render into
11
- * @param {import('./internal').PreactElement | object} [replaceNode] Optional: Attempt to re-use an
12
- * existing DOM tree rooted at `replaceNode`
13
- */
14
- export function render(vnode, parentDom, replaceNode) {
15
- // https://github.com/preactjs/preact/issues/3794
16
- if (parentDom == document) {
17
- parentDom = document.documentElement;
18
- }
19
-
20
- if (options._root) options._root(vnode, parentDom);
21
-
22
- // We abuse the `replaceNode` parameter in `hydrate()` to signal if we are in
23
- // hydration mode or not by passing the `hydrate` function instead of a DOM
24
- // element..
25
- let isHydrating = typeof replaceNode == 'function';
26
-
27
- // To be able to support calling `render()` multiple times on the same
28
- // DOM node, we need to obtain a reference to the previous tree. We do
29
- // this by assigning a new `_children` property to DOM nodes which points
30
- // to the last rendered tree. By default this property is not present, which
31
- // means that we are mounting a new tree for the first time.
32
- let oldVNode = isHydrating
33
- ? NULL
34
- : (replaceNode && replaceNode._children) || parentDom._children;
35
-
36
- vnode = ((!isHydrating && replaceNode) || parentDom)._children =
37
- createElement(Fragment, NULL, [vnode]);
38
-
39
- // List of effects that need to be called after diffing.
40
- let commitQueue = [],
41
- refQueue = [];
42
- diff(
43
- parentDom,
44
- // Determine the new vnode tree and store it on the DOM element on
45
- // our custom `_children` property.
46
- vnode,
47
- oldVNode || EMPTY_OBJ,
48
- EMPTY_OBJ,
49
- parentDom.namespaceURI,
50
- !isHydrating && replaceNode
51
- ? [replaceNode]
52
- : oldVNode
53
- ? NULL
54
- : parentDom.firstChild
55
- ? slice.call(parentDom.childNodes)
56
- : NULL,
57
- commitQueue,
58
- !isHydrating && replaceNode
59
- ? replaceNode
60
- : oldVNode
61
- ? oldVNode._dom
62
- : parentDom.firstChild,
63
- isHydrating,
64
- refQueue
65
- );
66
-
67
- // Flush all queued effects
68
- commitRoot(commitQueue, vnode, refQueue);
69
- }
70
-
71
- /**
72
- * Update an existing DOM element with data from a Preact virtual node
73
- * @param {import('./internal').ComponentChild} vnode The virtual node to render
74
- * @param {import('./internal').PreactElement} parentDom The DOM element to update
75
- */
76
- export function hydrate(vnode, parentDom) {
77
- render(vnode, parentDom, hydrate);
78
- }
@@ -1,28 +0,0 @@
1
- import { EMPTY_ARR } from './constants';
2
-
3
- export const isArray = Array.isArray;
4
-
5
- /**
6
- * Assign properties from `props` to `obj`
7
- * @template O, P The obj and props types
8
- * @param {O} obj The object to copy properties to
9
- * @param {P} props The object to copy properties from
10
- * @returns {O & P}
11
- */
12
- export function assign(obj, props) {
13
- // @ts-expect-error We change the type of `obj` to be `O & P`
14
- for (let i in props) obj[i] = props[i];
15
- return /** @type {O & P} */ (obj);
16
- }
17
-
18
- /**
19
- * Remove a child node from its parent if attached. This is a workaround for
20
- * IE11 which doesn't support `Element.prototype.remove()`. Using this function
21
- * is smaller than including a dedicated polyfill.
22
- * @param {import('./index').ContainerNode} node The node to remove
23
- */
24
- export function removeNode(node) {
25
- if (node && node.parentNode) node.parentNode.removeChild(node);
26
- }
27
-
28
- export const slice = EMPTY_ARR.slice;
@@ -1,2 +0,0 @@
1
- var r=require("preact");function t(){return r.options.t=r.options.debounceRendering,r.options.debounceRendering=function(t){return r.options.o=t},function(){return r.options.o&&r.options.o()}}var n=function(r){return null!=r&&"function"==typeof r.then},o=0;function e(){r.options.o&&(r.options.o(),delete r.options.o),void 0!==r.options.t?(r.options.debounceRendering=r.options.t,delete r.options.t):r.options.debounceRendering=void 0}exports.act=function(u){if(++o>1){try{var i=u();if(n(i))return i.then(function(){--o},function(r){throw--o,r})}catch(r){throw--o,r}return--o,Promise.resolve()}var c,f=r.options.requestAnimationFrame,a=t(),h=[];r.options.requestAnimationFrame=function(r){return h.push(r)};var v,l,p=function(){try{for(a();h.length;)c=h,h=[],c.forEach(function(r){return r()}),a()}catch(r){v||(v=r)}finally{e()}r.options.requestAnimationFrame=f,--o};try{l=u()}catch(r){v=r}if(n(l))return l.then(p,function(r){throw p(),r});if(p(),v)throw v;return Promise.resolve()},exports.setupRerender=t,exports.teardown=e;
2
- //# sourceMappingURL=testUtils.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"testUtils.js","sources":["../src/index.js"],"sourcesContent":["import { options } from 'preact';\n\n/**\n * Setup a rerender function that will drain the queue of pending renders\n * @returns {() => void}\n */\nexport function setupRerender() {\n\toptions.__test__previousDebounce = options.debounceRendering;\n\toptions.debounceRendering = cb => (options.__test__drainQueue = cb);\n\treturn () => options.__test__drainQueue && options.__test__drainQueue();\n}\n\nconst isThenable = value => value != null && typeof value.then == 'function';\n\n/** Depth of nested calls to `act`. */\nlet actDepth = 0;\n\n/**\n * Run a test function, and flush all effects and rerenders after invoking it.\n *\n * Returns a Promise which resolves \"immediately\" if the callback is\n * synchronous or when the callback's result resolves if it is asynchronous.\n *\n * @param {() => void|Promise<void>} cb The function under test. This may be sync or async.\n * @return {Promise<void>}\n */\nexport function act(cb) {\n\tif (++actDepth > 1) {\n\t\t// If calls to `act` are nested, a flush happens only when the\n\t\t// outermost call returns. In the inner call, we just execute the\n\t\t// callback and return since the infrastructure for flushing has already\n\t\t// been set up.\n\t\t//\n\t\t// If an exception occurs, the outermost `act` will handle cleanup.\n\t\ttry {\n\t\t\tconst result = cb();\n\t\t\tif (isThenable(result)) {\n\t\t\t\treturn result.then(\n\t\t\t\t\t() => {\n\t\t\t\t\t\t--actDepth;\n\t\t\t\t\t},\n\t\t\t\t\te => {\n\t\t\t\t\t\t--actDepth;\n\t\t\t\t\t\tthrow e;\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t}\n\t\t} catch (e) {\n\t\t\t--actDepth;\n\t\t\tthrow e;\n\t\t}\n\t\t--actDepth;\n\t\treturn Promise.resolve();\n\t}\n\n\tconst previousRequestAnimationFrame = options.requestAnimationFrame;\n\tconst rerender = setupRerender();\n\n\t/** @type {() => void} */\n\tlet flushes = [], toFlush;\n\n\t// Override requestAnimationFrame so we can flush pending hooks.\n\toptions.requestAnimationFrame = fc => flushes.push(fc);\n\n\tconst finish = () => {\n\t\ttry {\n\t\t\trerender();\n\t\t\twhile (flushes.length) {\n\t\t\t\ttoFlush = flushes;\n\t\t\t\tflushes = [];\n\n\t\t\t\ttoFlush.forEach(x => x());\n\t\t\t\trerender();\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tif (!err) {\n\t\t\t\terr = e;\n\t\t\t}\n\t\t} finally {\n\t\t\tteardown();\n\t\t}\n\n\t\toptions.requestAnimationFrame = previousRequestAnimationFrame;\n\t\t--actDepth;\n\t};\n\n\tlet err;\n\tlet result;\n\n\ttry {\n\t\tresult = cb();\n\t} catch (e) {\n\t\terr = e;\n\t}\n\n\tif (isThenable(result)) {\n\t\treturn result.then(finish, err => {\n\t\t\tfinish();\n\t\t\tthrow err;\n\t\t});\n\t}\n\n\t// nb. If the callback is synchronous, effects must be flushed before\n\t// `act` returns, so that the caller does not have to await the result,\n\t// even though React recommends this.\n\tfinish();\n\tif (err) {\n\t\tthrow err;\n\t}\n\treturn Promise.resolve();\n}\n\n/**\n * Teardown test environment and reset preact's internal state\n */\nexport function teardown() {\n\tif (options.__test__drainQueue) {\n\t\t// Flush any pending updates leftover by test\n\t\toptions.__test__drainQueue();\n\t\tdelete options.__test__drainQueue;\n\t}\n\n\tif (typeof options.__test__previousDebounce != 'undefined') {\n\t\toptions.debounceRendering = options.__test__previousDebounce;\n\t\tdelete options.__test__previousDebounce;\n\t} else {\n\t\toptions.debounceRendering = undefined;\n\t}\n}\n"],"names":["setupRerender","options","__test__previousDebounce","debounceRendering","cb","__test__drainQueue","isThenable","value","then","actDepth","teardown","undefined","result","e","Promise","resolve","toFlush","previousRequestAnimationFrame","requestAnimationFrame","rerender","flushes","fc","push","err","finish","length","forEach","x"],"mappings":"wBAMgB,SAAAA,IAGf,OAFAC,UAAQC,EAA2BD,EAAOA,QAACE,kBAC3CF,UAAQE,kBAAoB,SAAAC,GAAE,OAAKH,EAAOA,QAACI,EAAqBD,CAAE,oBACrDH,UAAQI,GAAsBJ,EAAOA,QAACI,GAAoB,CACxE,CAEA,IAAMC,EAAa,SAAAC,UAAkB,MAATA,GAAsC,mBAAdA,EAAMC,IAAkB,EAGxEC,EAAW,EAoGC,SAAAC,IACXT,EAAOA,QAACI,IAEXJ,UAAQI,WACDJ,UAAQI,QAG+B,IAApCJ,UAAQC,GAClBD,EAAAA,QAAQE,kBAAoBF,UAAQC,SAC7BD,EAAAA,QAAQC,GAEfD,EAAAA,QAAQE,uBAAoBQ,CAE9B,aAtGO,SAAaP,GACnB,KAAMK,EAAW,EAAG,CAOnB,IACC,IAAMG,EAASR,IACf,GAAIE,EAAWM,GACd,OAAOA,EAAOJ,KACb,aACGC,CACH,EACA,SAAAI,GAEC,OADEJ,EACII,CACP,EAMH,CAHE,MAAOA,GAER,OADEJ,EACII,CACP,CAEA,QADEJ,EACKK,QAAQC,SAChB,CAEA,IAIkBC,EAJZC,EAAgChB,UAAQiB,sBACxCC,EAAWnB,IAGboB,EAAU,GAGdnB,UAAQiB,sBAAwB,SAAAG,GAAE,OAAID,EAAQE,KAAKD,EAAG,EAEtD,IAsBIE,EACAX,EAvBEY,EAAS,WACd,IAEC,IADAL,IACOC,EAAQK,QACdT,EAAUI,EACVA,EAAU,GAEVJ,EAAQU,QAAQ,SAAAC,UAAKA,GAAG,GACxBR,GAQF,CANE,MAAON,GACHU,IACJA,EAAMV,EAER,CAAC,QACAH,GACD,CAEAT,UAAQiB,sBAAwBD,IAC9BR,CACH,EAKA,IACCG,EAASR,GAGV,CAFE,MAAOS,GACRU,EAAMV,CACP,CAEA,GAAIP,EAAWM,GACd,OAAOA,EAAOJ,KAAKgB,EAAQ,SAAAD,GAE1B,MADAC,IACMD,CACP,GAOD,GADAC,IACID,EACH,MAAMA,EAEP,OAAOT,QAAQC,SAChB"}
@@ -1,2 +0,0 @@
1
- import{options as t}from"preact";function n(){return t.t=t.debounceRendering,t.debounceRendering=function(n){return t.o=n},function(){return t.o&&t.o()}}var r=function(t){return null!=t&&"function"==typeof t.then},o=0;function u(u){if(++o>1){try{var e=u();if(r(e))return e.then(function(){--o},function(t){throw--o,t})}catch(t){throw--o,t}return--o,Promise.resolve()}var f,c=t.requestAnimationFrame,a=n(),h=[];t.requestAnimationFrame=function(t){return h.push(t)};var l,v,y=function(){try{for(a();h.length;)f=h,h=[],f.forEach(function(t){return t()}),a()}catch(t){l||(l=t)}finally{i()}t.requestAnimationFrame=c,--o};try{v=u()}catch(t){l=t}if(r(v))return v.then(y,function(t){throw y(),t});if(y(),l)throw l;return Promise.resolve()}function i(){t.o&&(t.o(),delete t.o),void 0!==t.t?(t.debounceRendering=t.t,delete t.t):t.debounceRendering=void 0}export{u as act,n as setupRerender,i as teardown};
2
- //# sourceMappingURL=testUtils.module.js.map
@@ -1,2 +0,0 @@
1
- import{options as t}from"preact";function n(){return t.t=t.debounceRendering,t.debounceRendering=function(n){return t.o=n},function(){return t.o&&t.o()}}var r=function(t){return null!=t&&"function"==typeof t.then},o=0;function u(u){if(++o>1){try{var e=u();if(r(e))return e.then(function(){--o},function(t){throw--o,t})}catch(t){throw--o,t}return--o,Promise.resolve()}var f,c=t.requestAnimationFrame,a=n(),h=[];t.requestAnimationFrame=function(t){return h.push(t)};var l,v,y=function(){try{for(a();h.length;)f=h,h=[],f.forEach(function(t){return t()}),a()}catch(t){l||(l=t)}finally{i()}t.requestAnimationFrame=c,--o};try{v=u()}catch(t){l=t}if(r(v))return v.then(y,function(t){throw y(),t});if(y(),l)throw l;return Promise.resolve()}function i(){t.o&&(t.o(),delete t.o),void 0!==t.t?(t.debounceRendering=t.t,delete t.t):t.debounceRendering=void 0}export{u as act,n as setupRerender,i as teardown};
2
- //# sourceMappingURL=testUtils.module.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"testUtils.module.js","sources":["../src/index.js"],"sourcesContent":["import { options } from 'preact';\n\n/**\n * Setup a rerender function that will drain the queue of pending renders\n * @returns {() => void}\n */\nexport function setupRerender() {\n\toptions.__test__previousDebounce = options.debounceRendering;\n\toptions.debounceRendering = cb => (options.__test__drainQueue = cb);\n\treturn () => options.__test__drainQueue && options.__test__drainQueue();\n}\n\nconst isThenable = value => value != null && typeof value.then == 'function';\n\n/** Depth of nested calls to `act`. */\nlet actDepth = 0;\n\n/**\n * Run a test function, and flush all effects and rerenders after invoking it.\n *\n * Returns a Promise which resolves \"immediately\" if the callback is\n * synchronous or when the callback's result resolves if it is asynchronous.\n *\n * @param {() => void|Promise<void>} cb The function under test. This may be sync or async.\n * @return {Promise<void>}\n */\nexport function act(cb) {\n\tif (++actDepth > 1) {\n\t\t// If calls to `act` are nested, a flush happens only when the\n\t\t// outermost call returns. In the inner call, we just execute the\n\t\t// callback and return since the infrastructure for flushing has already\n\t\t// been set up.\n\t\t//\n\t\t// If an exception occurs, the outermost `act` will handle cleanup.\n\t\ttry {\n\t\t\tconst result = cb();\n\t\t\tif (isThenable(result)) {\n\t\t\t\treturn result.then(\n\t\t\t\t\t() => {\n\t\t\t\t\t\t--actDepth;\n\t\t\t\t\t},\n\t\t\t\t\te => {\n\t\t\t\t\t\t--actDepth;\n\t\t\t\t\t\tthrow e;\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t}\n\t\t} catch (e) {\n\t\t\t--actDepth;\n\t\t\tthrow e;\n\t\t}\n\t\t--actDepth;\n\t\treturn Promise.resolve();\n\t}\n\n\tconst previousRequestAnimationFrame = options.requestAnimationFrame;\n\tconst rerender = setupRerender();\n\n\t/** @type {() => void} */\n\tlet flushes = [], toFlush;\n\n\t// Override requestAnimationFrame so we can flush pending hooks.\n\toptions.requestAnimationFrame = fc => flushes.push(fc);\n\n\tconst finish = () => {\n\t\ttry {\n\t\t\trerender();\n\t\t\twhile (flushes.length) {\n\t\t\t\ttoFlush = flushes;\n\t\t\t\tflushes = [];\n\n\t\t\t\ttoFlush.forEach(x => x());\n\t\t\t\trerender();\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tif (!err) {\n\t\t\t\terr = e;\n\t\t\t}\n\t\t} finally {\n\t\t\tteardown();\n\t\t}\n\n\t\toptions.requestAnimationFrame = previousRequestAnimationFrame;\n\t\t--actDepth;\n\t};\n\n\tlet err;\n\tlet result;\n\n\ttry {\n\t\tresult = cb();\n\t} catch (e) {\n\t\terr = e;\n\t}\n\n\tif (isThenable(result)) {\n\t\treturn result.then(finish, err => {\n\t\t\tfinish();\n\t\t\tthrow err;\n\t\t});\n\t}\n\n\t// nb. If the callback is synchronous, effects must be flushed before\n\t// `act` returns, so that the caller does not have to await the result,\n\t// even though React recommends this.\n\tfinish();\n\tif (err) {\n\t\tthrow err;\n\t}\n\treturn Promise.resolve();\n}\n\n/**\n * Teardown test environment and reset preact's internal state\n */\nexport function teardown() {\n\tif (options.__test__drainQueue) {\n\t\t// Flush any pending updates leftover by test\n\t\toptions.__test__drainQueue();\n\t\tdelete options.__test__drainQueue;\n\t}\n\n\tif (typeof options.__test__previousDebounce != 'undefined') {\n\t\toptions.debounceRendering = options.__test__previousDebounce;\n\t\tdelete options.__test__previousDebounce;\n\t} else {\n\t\toptions.debounceRendering = undefined;\n\t}\n}\n"],"names":["setupRerender","options","__test__previousDebounce","debounceRendering","cb","__test__drainQueue","isThenable","value","then","actDepth","act","result","e","Promise","resolve","toFlush","previousRequestAnimationFrame","requestAnimationFrame","rerender","flushes","fc","push","err","finish","length","forEach","x","teardown","undefined"],"mappings":"iCAMgB,SAAAA,IAGf,OAFAC,EAAQC,EAA2BD,EAAQE,kBAC3CF,EAAQE,kBAAoB,SAAAC,GAAE,OAAKH,EAAQI,EAAqBD,CAAE,oBACrDH,EAAQI,GAAsBJ,EAAQI,GAAoB,CACxE,CAEA,IAAMC,EAAa,SAAAC,UAAkB,MAATA,GAAsC,mBAAdA,EAAMC,IAAkB,EAGxEC,EAAW,EAWR,SAASC,EAAIN,GACnB,KAAMK,EAAW,EAAG,CAOnB,IACC,IAAME,EAASP,IACf,GAAIE,EAAWK,GACd,OAAOA,EAAOH,KACb,aACGC,CACH,EACA,SAAAG,GAEC,OADEH,EACIG,CACP,EAMH,CAHE,MAAOA,GAER,OADEH,EACIG,CACP,CAEA,QADEH,EACKI,QAAQC,SAChB,CAEA,IAIkBC,EAJZC,EAAgCf,EAAQgB,sBACxCC,EAAWlB,IAGbmB,EAAU,GAGdlB,EAAQgB,sBAAwB,SAAAG,GAAE,OAAID,EAAQE,KAAKD,EAAG,EAEtD,IAsBIE,EACAX,EAvBEY,EAAS,WACd,IAEC,IADAL,IACOC,EAAQK,QACdT,EAAUI,EACVA,EAAU,GAEVJ,EAAQU,QAAQ,SAAAC,UAAKA,GAAG,GACxBR,GAQF,CANE,MAAON,GACHU,IACJA,EAAMV,EAER,CAAC,QACAe,GACD,CAEA1B,EAAQgB,sBAAwBD,IAC9BP,CACH,EAKA,IACCE,EAASP,GAGV,CAFE,MAAOQ,GACRU,EAAMV,CACP,CAEA,GAAIN,EAAWK,GACd,OAAOA,EAAOH,KAAKe,EAAQ,SAAAD,GAE1B,MADAC,IACMD,CACP,GAOD,GADAC,IACID,EACH,MAAMA,EAEP,OAAOT,QAAQC,SAChB,CAKgB,SAAAa,IACX1B,EAAQI,IAEXJ,EAAQI,WACDJ,EAAQI,QAG+B,IAApCJ,EAAQC,GAClBD,EAAQE,kBAAoBF,EAAQC,SAC7BD,EAAQC,GAEfD,EAAQE,uBAAoByB,CAE9B"}
@@ -1,2 +0,0 @@
1
- !function(n,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("preact")):"function"==typeof define&&define.amd?define(["exports","preact"],t):t((n||self).preactTestUtils={},n.preact)}(this,function(n,t){function e(){return t.options.t=t.options.debounceRendering,t.options.debounceRendering=function(n){return t.options.o=n},function(){return t.options.o&&t.options.o()}}var r=function(n){return null!=n&&"function"==typeof n.then},o=0;function i(){t.options.o&&(t.options.o(),delete t.options.o),void 0!==t.options.t?(t.options.debounceRendering=t.options.t,delete t.options.t):t.options.debounceRendering=void 0}n.act=function(n){if(++o>1){try{var f=n();if(r(f))return f.then(function(){--o},function(n){throw--o,n})}catch(n){throw--o,n}return--o,Promise.resolve()}var u,c=t.options.requestAnimationFrame,a=e(),d=[];t.options.requestAnimationFrame=function(n){return d.push(n)};var l,h,p=function(){try{for(a();d.length;)u=d,d=[],u.forEach(function(n){return n()}),a()}catch(n){l||(l=n)}finally{i()}t.options.requestAnimationFrame=c,--o};try{h=n()}catch(n){l=n}if(r(h))return h.then(p,function(n){throw p(),n});if(p(),l)throw l;return Promise.resolve()},n.setupRerender=e,n.teardown=i});
2
- //# sourceMappingURL=testUtils.umd.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"testUtils.umd.js","sources":["../src/index.js"],"sourcesContent":["import { options } from 'preact';\n\n/**\n * Setup a rerender function that will drain the queue of pending renders\n * @returns {() => void}\n */\nexport function setupRerender() {\n\toptions.__test__previousDebounce = options.debounceRendering;\n\toptions.debounceRendering = cb => (options.__test__drainQueue = cb);\n\treturn () => options.__test__drainQueue && options.__test__drainQueue();\n}\n\nconst isThenable = value => value != null && typeof value.then == 'function';\n\n/** Depth of nested calls to `act`. */\nlet actDepth = 0;\n\n/**\n * Run a test function, and flush all effects and rerenders after invoking it.\n *\n * Returns a Promise which resolves \"immediately\" if the callback is\n * synchronous or when the callback's result resolves if it is asynchronous.\n *\n * @param {() => void|Promise<void>} cb The function under test. This may be sync or async.\n * @return {Promise<void>}\n */\nexport function act(cb) {\n\tif (++actDepth > 1) {\n\t\t// If calls to `act` are nested, a flush happens only when the\n\t\t// outermost call returns. In the inner call, we just execute the\n\t\t// callback and return since the infrastructure for flushing has already\n\t\t// been set up.\n\t\t//\n\t\t// If an exception occurs, the outermost `act` will handle cleanup.\n\t\ttry {\n\t\t\tconst result = cb();\n\t\t\tif (isThenable(result)) {\n\t\t\t\treturn result.then(\n\t\t\t\t\t() => {\n\t\t\t\t\t\t--actDepth;\n\t\t\t\t\t},\n\t\t\t\t\te => {\n\t\t\t\t\t\t--actDepth;\n\t\t\t\t\t\tthrow e;\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t}\n\t\t} catch (e) {\n\t\t\t--actDepth;\n\t\t\tthrow e;\n\t\t}\n\t\t--actDepth;\n\t\treturn Promise.resolve();\n\t}\n\n\tconst previousRequestAnimationFrame = options.requestAnimationFrame;\n\tconst rerender = setupRerender();\n\n\t/** @type {() => void} */\n\tlet flushes = [], toFlush;\n\n\t// Override requestAnimationFrame so we can flush pending hooks.\n\toptions.requestAnimationFrame = fc => flushes.push(fc);\n\n\tconst finish = () => {\n\t\ttry {\n\t\t\trerender();\n\t\t\twhile (flushes.length) {\n\t\t\t\ttoFlush = flushes;\n\t\t\t\tflushes = [];\n\n\t\t\t\ttoFlush.forEach(x => x());\n\t\t\t\trerender();\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tif (!err) {\n\t\t\t\terr = e;\n\t\t\t}\n\t\t} finally {\n\t\t\tteardown();\n\t\t}\n\n\t\toptions.requestAnimationFrame = previousRequestAnimationFrame;\n\t\t--actDepth;\n\t};\n\n\tlet err;\n\tlet result;\n\n\ttry {\n\t\tresult = cb();\n\t} catch (e) {\n\t\terr = e;\n\t}\n\n\tif (isThenable(result)) {\n\t\treturn result.then(finish, err => {\n\t\t\tfinish();\n\t\t\tthrow err;\n\t\t});\n\t}\n\n\t// nb. If the callback is synchronous, effects must be flushed before\n\t// `act` returns, so that the caller does not have to await the result,\n\t// even though React recommends this.\n\tfinish();\n\tif (err) {\n\t\tthrow err;\n\t}\n\treturn Promise.resolve();\n}\n\n/**\n * Teardown test environment and reset preact's internal state\n */\nexport function teardown() {\n\tif (options.__test__drainQueue) {\n\t\t// Flush any pending updates leftover by test\n\t\toptions.__test__drainQueue();\n\t\tdelete options.__test__drainQueue;\n\t}\n\n\tif (typeof options.__test__previousDebounce != 'undefined') {\n\t\toptions.debounceRendering = options.__test__previousDebounce;\n\t\tdelete options.__test__previousDebounce;\n\t} else {\n\t\toptions.debounceRendering = undefined;\n\t}\n}\n"],"names":["setupRerender","options","__test__previousDebounce","debounceRendering","cb","__test__drainQueue","isThenable","value","then","actDepth","teardown","undefined","result","e","Promise","resolve","toFlush","previousRequestAnimationFrame","requestAnimationFrame","rerender","flushes","fc","push","err","finish","length","forEach","x"],"mappings":"+QAMgB,SAAAA,IAGf,OAFAC,UAAQC,EAA2BD,EAAOA,QAACE,kBAC3CF,UAAQE,kBAAoB,SAAAC,GAAE,OAAKH,EAAOA,QAACI,EAAqBD,CAAE,oBACrDH,UAAQI,GAAsBJ,EAAOA,QAACI,GAAoB,CACxE,CAEA,IAAMC,EAAa,SAAAC,UAAkB,MAATA,GAAsC,mBAAdA,EAAMC,IAAkB,EAGxEC,EAAW,EAoGC,SAAAC,IACXT,EAAOA,QAACI,IAEXJ,UAAQI,WACDJ,UAAQI,QAG+B,IAApCJ,UAAQC,GAClBD,EAAAA,QAAQE,kBAAoBF,UAAQC,SAC7BD,EAAAA,QAAQC,GAEfD,EAAAA,QAAQE,uBAAoBQ,CAE9B,OAtGO,SAAaP,GACnB,KAAMK,EAAW,EAAG,CAOnB,IACC,IAAMG,EAASR,IACf,GAAIE,EAAWM,GACd,OAAOA,EAAOJ,KACb,aACGC,CACH,EACA,SAAAI,GAEC,OADEJ,EACII,CACP,EAMH,CAHE,MAAOA,GAER,OADEJ,EACII,CACP,CAEA,QADEJ,EACKK,QAAQC,SAChB,CAEA,IAIkBC,EAJZC,EAAgChB,UAAQiB,sBACxCC,EAAWnB,IAGboB,EAAU,GAGdnB,UAAQiB,sBAAwB,SAAAG,GAAE,OAAID,EAAQE,KAAKD,EAAG,EAEtD,IAsBIE,EACAX,EAvBEY,EAAS,WACd,IAEC,IADAL,IACOC,EAAQK,QACdT,EAAUI,EACVA,EAAU,GAEVJ,EAAQU,QAAQ,SAAAC,UAAKA,GAAG,GACxBR,GAQF,CANE,MAAON,GACHU,IACJA,EAAMV,EAER,CAAC,QACAH,GACD,CAEAT,UAAQiB,sBAAwBD,IAC9BR,CACH,EAKA,IACCG,EAASR,GAGV,CAFE,MAAOS,GACRU,EAAMV,CACP,CAEA,GAAIP,EAAWM,GACd,OAAOA,EAAOJ,KAAKgB,EAAQ,SAAAD,GAE1B,MADAC,IACMD,CACP,GAOD,GADAC,IACID,EACH,MAAMA,EAEP,OAAOT,QAAQC,SAChB"}
@@ -1,28 +0,0 @@
1
- {
2
- "name": "test-utils",
3
- "amdName": "preactTestUtils",
4
- "version": "0.1.0",
5
- "private": true,
6
- "description": "Test-utils for Preact",
7
- "main": "dist/testUtils.js",
8
- "module": "dist/testUtils.module.js",
9
- "umd:main": "dist/testUtils.umd.js",
10
- "source": "src/index.js",
11
- "license": "MIT",
12
- "types": "src/index.d.ts",
13
- "peerDependencies": {
14
- "preact": "^10.0.0"
15
- },
16
- "mangle": {
17
- "regex": "^_"
18
- },
19
- "exports": {
20
- ".": {
21
- "types": "./src/index.d.ts",
22
- "browser": "./dist/testUtils.module.js",
23
- "umd": "./dist/testUtils.umd.js",
24
- "import": "./dist/testUtils.mjs",
25
- "require": "./dist/testUtils.js"
26
- }
27
- }
28
- }
@@ -1,3 +0,0 @@
1
- export function setupRerender(): () => void;
2
- export function act(callback: () => void | Promise<void>): Promise<void>;
3
- export function teardown(): void;
@@ -1,129 +0,0 @@
1
- import { options } from 'preact';
2
-
3
- /**
4
- * Setup a rerender function that will drain the queue of pending renders
5
- * @returns {() => void}
6
- */
7
- export function setupRerender() {
8
- options.__test__previousDebounce = options.debounceRendering;
9
- options.debounceRendering = cb => (options.__test__drainQueue = cb);
10
- return () => options.__test__drainQueue && options.__test__drainQueue();
11
- }
12
-
13
- const isThenable = value => value != null && typeof value.then == 'function';
14
-
15
- /** Depth of nested calls to `act`. */
16
- let actDepth = 0;
17
-
18
- /**
19
- * Run a test function, and flush all effects and rerenders after invoking it.
20
- *
21
- * Returns a Promise which resolves "immediately" if the callback is
22
- * synchronous or when the callback's result resolves if it is asynchronous.
23
- *
24
- * @param {() => void|Promise<void>} cb The function under test. This may be sync or async.
25
- * @return {Promise<void>}
26
- */
27
- export function act(cb) {
28
- if (++actDepth > 1) {
29
- // If calls to `act` are nested, a flush happens only when the
30
- // outermost call returns. In the inner call, we just execute the
31
- // callback and return since the infrastructure for flushing has already
32
- // been set up.
33
- //
34
- // If an exception occurs, the outermost `act` will handle cleanup.
35
- try {
36
- const result = cb();
37
- if (isThenable(result)) {
38
- return result.then(
39
- () => {
40
- --actDepth;
41
- },
42
- e => {
43
- --actDepth;
44
- throw e;
45
- }
46
- );
47
- }
48
- } catch (e) {
49
- --actDepth;
50
- throw e;
51
- }
52
- --actDepth;
53
- return Promise.resolve();
54
- }
55
-
56
- const previousRequestAnimationFrame = options.requestAnimationFrame;
57
- const rerender = setupRerender();
58
-
59
- /** @type {() => void} */
60
- let flushes = [], toFlush;
61
-
62
- // Override requestAnimationFrame so we can flush pending hooks.
63
- options.requestAnimationFrame = fc => flushes.push(fc);
64
-
65
- const finish = () => {
66
- try {
67
- rerender();
68
- while (flushes.length) {
69
- toFlush = flushes;
70
- flushes = [];
71
-
72
- toFlush.forEach(x => x());
73
- rerender();
74
- }
75
- } catch (e) {
76
- if (!err) {
77
- err = e;
78
- }
79
- } finally {
80
- teardown();
81
- }
82
-
83
- options.requestAnimationFrame = previousRequestAnimationFrame;
84
- --actDepth;
85
- };
86
-
87
- let err;
88
- let result;
89
-
90
- try {
91
- result = cb();
92
- } catch (e) {
93
- err = e;
94
- }
95
-
96
- if (isThenable(result)) {
97
- return result.then(finish, err => {
98
- finish();
99
- throw err;
100
- });
101
- }
102
-
103
- // nb. If the callback is synchronous, effects must be flushed before
104
- // `act` returns, so that the caller does not have to await the result,
105
- // even though React recommends this.
106
- finish();
107
- if (err) {
108
- throw err;
109
- }
110
- return Promise.resolve();
111
- }
112
-
113
- /**
114
- * Teardown test environment and reset preact's internal state
115
- */
116
- export function teardown() {
117
- if (options.__test__drainQueue) {
118
- // Flush any pending updates leftover by test
119
- options.__test__drainQueue();
120
- delete options.__test__drainQueue;
121
- }
122
-
123
- if (typeof options.__test__previousDebounce != 'undefined') {
124
- options.debounceRendering = options.__test__previousDebounce;
125
- delete options.__test__previousDebounce;
126
- } else {
127
- options.debounceRendering = undefined;
128
- }
129
- }
@@ -1,21 +0,0 @@
1
- The MIT License (MIT)
2
-
3
- Copyright (c) 2015 Jason Miller
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
@@ -1,149 +0,0 @@
1
- # preact-render-to-string
2
-
3
- [![NPM](http://img.shields.io/npm/v/preact-render-to-string.svg)](https://www.npmjs.com/package/preact-render-to-string)
4
- [![Build status](https://github.com/preactjs/preact-render-to-string/actions/workflows/ci.yml/badge.svg)](https://github.com/preactjs/preact-render-to-string/actions/workflows/ci.yml)
5
-
6
- Render JSX and [Preact](https://github.com/preactjs/preact) components to an HTML string.
7
-
8
- Works in Node & the browser, making it useful for universal/isomorphic rendering.
9
-
10
- \>\> **[Cute Fox-Related Demo](http://codepen.io/developit/pen/dYZqjE?editors=001)** _(@ CodePen)_ <<
11
-
12
- ---
13
-
14
- ### Render JSX/VDOM to HTML
15
-
16
- ```js
17
- import { render } from 'preact-render-to-string';
18
- import { h } from 'preact';
19
- /** @jsx h */
20
-
21
- let vdom = <div class="foo">content</div>;
22
-
23
- let html = render(vdom);
24
- console.log(html);
25
- // <div class="foo">content</div>
26
- ```
27
-
28
- ### Render Preact Components to HTML
29
-
30
- ```js
31
- import { render } from 'preact-render-to-string';
32
- import { h, Component } from 'preact';
33
- /** @jsx h */
34
-
35
- // Classical components work
36
- class Fox extends Component {
37
- render({ name }) {
38
- return <span class="fox">{name}</span>;
39
- }
40
- }
41
-
42
- // ... and so do pure functional components:
43
- const Box = ({ type, children }) => (
44
- <div class={`box box-${type}`}>{children}</div>
45
- );
46
-
47
- let html = render(
48
- <Box type="open">
49
- <Fox name="Finn" />
50
- </Box>
51
- );
52
-
53
- console.log(html);
54
- // <div class="box box-open"><span class="fox">Finn</span></div>
55
- ```
56
-
57
- ---
58
-
59
- ### Render JSX / Preact / Whatever via Express!
60
-
61
- ```js
62
- import express from 'express';
63
- import { h } from 'preact';
64
- import { render } from 'preact-render-to-string';
65
- /** @jsx h */
66
-
67
- // silly example component:
68
- const Fox = ({ name }) => (
69
- <div class="fox">
70
- <h5>{name}</h5>
71
- <p>This page is all about {name}.</p>
72
- </div>
73
- );
74
-
75
- // basic HTTP server via express:
76
- const app = express();
77
- app.listen(8080);
78
-
79
- // on each request, render and return a component:
80
- app.get('/:fox', (req, res) => {
81
- let html = render(<Fox name={req.params.fox} />);
82
- // send it back wrapped up as an HTML5 document:
83
- res.send(`<!DOCTYPE html><html><body>${html}</body></html>`);
84
- });
85
- ```
86
-
87
- ### Error Boundaries
88
-
89
- Rendering errors can be caught by Preact via `getDerivedStateFromErrors` or `componentDidCatch`. To enable that feature in `preact-render-to-string` set `errorBoundaries = true`
90
-
91
- ```js
92
- import { options } from 'preact';
93
-
94
- // Enable error boundaries in `preact-render-to-string`
95
- options.errorBoundaries = true;
96
- ```
97
-
98
- ---
99
-
100
- ### `Suspense` & `lazy` components with [`preact/compat`](https://www.npmjs.com/package/preact)
101
-
102
- ```bash
103
- npm install preact preact-render-to-string
104
- ```
105
-
106
- ```jsx
107
- export default () => {
108
- return <h1>Home page</h1>;
109
- };
110
- ```
111
-
112
- ```jsx
113
- import { Suspense, lazy } from 'preact/compat';
114
-
115
- // Creation of the lazy component
116
- const HomePage = lazy(() => import('./pages/home'));
117
-
118
- const Main = () => {
119
- return (
120
- <Suspense fallback={<p>Loading</p>}>
121
- <HomePage />
122
- </Suspense>
123
- );
124
- };
125
- ```
126
-
127
- ```jsx
128
- import { renderToStringAsync } from 'preact-render-to-string';
129
- import { Main } from './main';
130
-
131
- const main = async () => {
132
- // Rendering of lazy components
133
- const html = await renderToStringAsync(<Main />);
134
-
135
- console.log(html);
136
- // <h1>Home page</h1>
137
- };
138
-
139
- // Execution & error handling
140
- main().catch((error) => {
141
- console.error(error);
142
- });
143
- ```
144
-
145
- ---
146
-
147
- ### License
148
-
149
- [MIT](http://choosealicense.com/licenses/mit/)
@@ -1,2 +0,0 @@
1
- var e=require("preact"),t="diffed",n="__c",r="__s",o="__c",i="__k",a="__d",s="__s",c=/[\s\n\\/='"\0<>]/,u=/^(xlink|xmlns|xml)([A-Z])/,l=/^(?:accessK|auto[A-Z]|cell|ch|col|cont|cross|dateT|encT|form[A-Z]|frame|hrefL|inputM|maxL|minL|noV|playsI|popoverT|readO|rowS|src[A-Z]|tabI|useM|item[A-Z])/,p=/^ac|^ali|arabic|basel|cap|clipPath$|clipRule$|color|dominant|enable|fill|flood|font|glyph[^R]|horiz|image|letter|lighting|marker[^WUH]|overline|panose|pointe|paint|rendering|shape|stop|strikethrough|stroke|text[^L]|transform|underline|unicode|units|^v[^i]|^w|^xH/,f=new Set(["draggable","spellcheck"]);function h(e){void 0!==e.__g?e.__g|=8:e[a]=!0}function d(e){void 0!==e.__g?e.__g&=-9:e[a]=!1}function v(e){return void 0!==e.__g?!!(8&e.__g):!0===e[a]}var g=/["&<]/;function m(e){if(0===e.length||!1===g.test(e))return e;for(var t=0,n=0,r="",o="";n<e.length;n++){switch(e.charCodeAt(n)){case 34:o="&quot;";break;case 38:o="&amp;";break;case 60:o="&lt;";break;default:continue}n!==t&&(r+=e.slice(t,n)),r+=o,t=n+1}return n!==t&&(r+=e.slice(t,n)),r}var y={},_=new Set(["animation-iteration-count","border-image-outset","border-image-slice","border-image-width","box-flex","box-flex-group","box-ordinal-group","column-count","fill-opacity","flex","flex-grow","flex-negative","flex-order","flex-positive","flex-shrink","flood-opacity","font-weight","grid-column","grid-row","line-clamp","line-height","opacity","order","orphans","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","widows","z-index","zoom"]),b=/[A-Z]/g;function x(e){var t="";for(var n in e){var r=e[n];if(null!=r&&""!==r){var o="-"==n[0]?n:y[n]||(y[n]=n.replace(b,"-$&").toLowerCase()),i=";";"number"!=typeof r||o.startsWith("--")||_.has(o)||(i="px;"),t=t+o+":"+r+i}}return t||void 0}function k(){this.__d=!0}function w(e,t){return{__v:e,context:t,props:e.props,setState:k,forceUpdate:k,__d:!0,__h:new Array(0)}}function C(e,t,n){if(!e.s){if(n instanceof S){if(!n.s)return void(n.o=C.bind(null,e,t));1&t&&(t=n.s),n=n.v}if(n&&n.then)return void n.then(C.bind(null,e,t),C.bind(null,e,2));e.s=t,e.v=n;const r=e.o;r&&r(e)}}var S=/*#__PURE__*/function(){function e(){}return e.prototype.then=function(t,n){var r=new e,o=this.s;if(o){var i=1&o?t:n;if(i){try{C(r,1,i(this.v))}catch(e){C(r,2,e)}return r}return this}return this.o=function(e){try{var o=e.v;1&e.s?C(r,1,t?t(o):o):n?C(r,1,n(o)):C(r,2,o)}catch(e){C(r,2,e)}},r},e}();function A(e){return e instanceof S&&1&e.s}function F(e,t,n){for(var r;;){var o=e();if(A(o)&&(o=o.v),!o)return i;if(o.then){r=0;break}var i=n();if(i&&i.then){if(!A(i)){r=1;break}i=i.s}if(t){var a=t();if(a&&a.then&&!A(a)){r=2;break}}}var s=new S,c=C.bind(null,s,2);return(0===r?o.then(l):1===r?i.then(u):a.then(p)).then(void 0,c),s;function u(r){i=r;do{if(t&&(a=t())&&a.then&&!A(a))return void a.then(p).then(void 0,c);if(!(o=e())||A(o)&&!o.v)return void C(s,1,i);if(o.then)return void o.then(l).then(void 0,c);A(i=n())&&(i=i.v)}while(!i||!i.then);i.then(u).then(void 0,c)}function l(e){e?(i=n())&&i.then?i.then(u).then(void 0,c):u(i):C(s,1,i)}function p(){(o=e())?o.then?o.then(l).then(void 0,c):l(o):C(s,1,i)}}function L(e,t){try{var n=e()}catch(e){return t(!0,e)}return n&&n.then?n.then(t.bind(null,!1),t.bind(null,!0)):t(!1,n)}var T,E,j,D,P={},$=[],M=Array.isArray,U=Object.assign,Z="",W="\x3c!--$s--\x3e",q="\x3c!--/$s--\x3e";function z(o,a,s){var c=e.options[r];e.options[r]=!0,T=e.options.__b,E=e.options[t],j=e.options.__r,D=e.options.unmount;var u=e.h(e.Fragment,null);u[i]=[o];try{var l=N(o,a||P,!1,void 0,u,!1,s);return M(l)?l.join(Z):l}catch(e){if(e.then)throw new Error('Use "renderToStringAsync" for suspenseful rendering.');throw e}finally{e.options[n]&&e.options[n](o,$),e.options[r]=c,$.length=0}}function H(e,t){var n,r=e.type,i=!0;return e[o]?(i=!1,(n=e[o]).state=n[s]):n=new r(e.props,t),e[o]=n,n.__v=e,n.props=e.props,n.context=t,h(n),null==n.state&&(n.state=P),null==n[s]&&(n[s]=n.state),r.getDerivedStateFromProps?n.state=U({},n.state,r.getDerivedStateFromProps(n.props,n.state)):i&&n.componentWillMount?(n.componentWillMount(),n.state=n[s]!==n.state?n[s]:n.state):!i&&n.componentWillUpdate&&n.componentWillUpdate(),j&&j(e),n.render(n.props,n.state,t)}function N(t,n,r,a,g,y,_){if(null==t||!0===t||!1===t||t===Z)return Z;var b=typeof t;if("object"!=b)return"function"==b?Z:"string"==b?m(t):t+Z;if(M(t)){var k,C=Z;g[i]=t;for(var S=t.length,A=0;A<S;A++){var F=t[A];if(null!=F&&"boolean"!=typeof F){var L,$=N(F,n,r,a,g,y,_);"string"==typeof $?C+=$:(k||(k=new Array(S)),C&&k.push(C),C=Z,M($)?(L=k).push.apply(L,$):k.push($))}}return k?(C&&k.push(C),k):C}if(void 0!==t.constructor)return Z;t.__=g,T&&T(t);var z=t.type,I=t.props;if("function"==typeof z){var O,V,K,G=n;if(z===e.Fragment){if("tpl"in I){for(var J=Z,Q=0;Q<I.tpl.length;Q++)if(J+=I.tpl[Q],I.exprs&&Q<I.exprs.length){var X=I.exprs[Q];if(null==X)continue;"object"!=typeof X||void 0!==X.constructor&&!M(X)?J+=X:J+=N(X,n,r,a,t,y,_)}return J}if("UNSTABLE_comment"in I)return"\x3c!--"+m(I.UNSTABLE_comment)+"--\x3e";V=I.children}else{if(null!=(O=z.contextType)){var Y=n[O.__c];G=Y?Y.props.value:O.__}var ee=z.prototype&&"function"==typeof z.prototype.render;if(ee)V=/**#__NOINLINE__**/H(t,G),K=t[o];else{t[o]=K=/**#__NOINLINE__**/w(t,G);for(var te=0;v(K)&&te++<25;){d(K),j&&j(t);try{V=z.call(K,I,G)}catch(e){throw y&&e&&"function"==typeof e.then&&(t._suspended=!0),e}}h(K)}if(null!=K.getChildContext&&(n=U({},n,K.getChildContext())),ee&&e.options.errorBoundaries&&(z.getDerivedStateFromError||K.componentDidCatch)){V=null!=V&&V.type===e.Fragment&&null==V.key&&null==V.props.tpl?V.props.children:V;try{return N(V,n,r,a,t,y,!1)}catch(i){return z.getDerivedStateFromError&&(K[s]=z.getDerivedStateFromError(i)),K.componentDidCatch&&K.componentDidCatch(i,P),v(K)?(V=H(t,n),null!=(K=t[o]).getChildContext&&(n=U({},n,K.getChildContext())),N(V=null!=V&&V.type===e.Fragment&&null==V.key&&null==V.props.tpl?V.props.children:V,n,r,a,t,y,_)):Z}finally{E&&E(t),D&&D(t)}}}V=null!=V&&V.type===e.Fragment&&null==V.key&&null==V.props.tpl?V.props.children:V;try{var ne=N(V,n,r,a,t,y,_);return E&&E(t),e.options.unmount&&e.options.unmount(t),t._suspended?"string"==typeof ne?W+ne+q:M(ne)?(ne.unshift(W),ne.push(q),ne):ne.then(function(e){return W+e+q}):ne}catch(o){if(!y&&_&&_.onError){var re=function e(o){return _.onError(o,t,function(t,o){try{return N(t,n,r,a,o,y,_)}catch(t){return e(t)}})}(o);if(void 0!==re)return re;var oe=e.options.__e;return oe&&oe(o,t),Z}if(!y)throw o;if(!o||"function"!=typeof o.then)throw o;return o.then(function e(){try{var o=N(V,n,r,a,t,y,_);return t._suspended?W+o+q:o}catch(t){if(!t||"function"!=typeof t.then)throw t;return t.then(e)}})}}var ie,ae="<"+z,se=Z;for(var ce in I){var ue=I[ce];if("function"!=typeof(ue=R(ue)?ue.value:ue)||"class"===ce||"className"===ce){switch(ce){case"children":ie=ue;continue;case"key":case"ref":case"__self":case"__source":continue;case"htmlFor":if("for"in I)continue;ce="for";break;case"className":if("class"in I)continue;ce="class";break;case"defaultChecked":ce="checked";break;case"defaultSelected":ce="selected";break;case"defaultValue":case"value":switch(ce="value",z){case"textarea":ie=ue;continue;case"select":a=ue;continue;case"option":a!=ue||"selected"in I||(ae+=" selected")}break;case"dangerouslySetInnerHTML":se=ue&&ue.__html;continue;case"style":"object"==typeof ue&&(ue=x(ue));break;case"acceptCharset":ce="accept-charset";break;case"httpEquiv":ce="http-equiv";break;default:if(u.test(ce))ce=ce.replace(u,"$1:$2").toLowerCase();else{if(c.test(ce))continue;"-"!==ce[4]&&!f.has(ce)||null==ue?r?p.test(ce)&&(ce="panose1"===ce?"panose-1":ce.replace(/([A-Z])/g,"-$1").toLowerCase()):l.test(ce)&&(ce=ce.toLowerCase()):ue+=Z}}null!=ue&&!1!==ue&&(ae=!0===ue||ue===Z?ae+" "+ce:ae+" "+ce+'="'+("string"==typeof ue?m(ue):ue+Z)+'"')}}if(c.test(z))throw new Error(z+" is not a valid HTML tag name in "+ae+">");if(se||("string"==typeof ie?se=m(ie):null!=ie&&!1!==ie&&!0!==ie&&(se=N(ie,n,"svg"===z||"foreignObject"!==z&&r,a,t,y,_))),E&&E(t),D&&D(t),!se&&B.has(z))return ae+"/>";var le="</"+z+">",pe=ae+">";return M(se)?[pe].concat(se,[le]):"string"!=typeof se?[pe,se,le]:pe+se+le}var B=new Set(["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]),I=z,O=z;function R(e){return null!==e&&"object"==typeof e&&"function"==typeof e.peek&&"value"in e}exports.default=z,exports.render=I,exports.renderToStaticMarkup=O,exports.renderToString=z,exports.renderToStringAsync=function(o,a){try{var s=e.options[r];e.options[r]=!0,T=e.options.__b,E=e.options[t],j=e.options.__r,D=e.options.unmount;var c=e.h(e.Fragment,null);return c[i]=[o],Promise.resolve(L(function(){return Promise.resolve(N(o,a||P,!1,void 0,c,!0,void 0)).then(function(e){var t,n=function(){if(M(e)){var n=function(){var e=o.join(Z);return t=1,e},r=0,o=e,i=F(function(){return!!o.some(function(e){return e&&"function"==typeof e.then})&&r++<25},void 0,function(){return Promise.resolve(Promise.all(o)).then(function(e){o=e.flat()})});return i&&i.then?i.then(n):n()}}();return n&&n.then?n.then(function(n){return t?n:e}):t?n:e})},function(t,i){if(e.options[n]&&e.options[n](o,$),e.options[r]=s,$.length=0,t)throw i;return i}))}catch(e){return Promise.reject(e)}};
2
- //# sourceMappingURL=index.js.map
@@ -1,17 +0,0 @@
1
- import { VNode } from 'preact';
2
-
3
- export default function renderToString<P = {}>(
4
- vnode: VNode<P>,
5
- context?: any
6
- ): string;
7
-
8
- export function render<P = {}>(vnode: VNode<P>, context?: any): string;
9
- export function renderToString<P = {}>(vnode: VNode<P>, context?: any): string;
10
- export function renderToStringAsync<P = {}>(
11
- vnode: VNode<P>,
12
- context?: any
13
- ): string | Promise<string>;
14
- export function renderToStaticMarkup<P = {}>(
15
- vnode: VNode<P>,
16
- context?: any
17
- ): string;
@@ -1,6 +0,0 @@
1
- const mod = require('./commonjs');
2
- mod.default.renderToStringAsync = mod.renderToStringAsync;
3
- mod.default.renderToStaticMarkup = mod.default;
4
- mod.default.renderToString = mod.default;
5
- mod.default.render = mod.default;
6
- module.exports = mod.default;