@kayjs/kay 1.105.0 → 1.107.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (467) hide show
  1. package/README.md +2 -2
  2. package/dist/eslint.js +777 -210
  3. package/editors/zed/extension.toml +2 -2
  4. package/llms/action-protection.md +2 -2
  5. package/llms/actions-from-islands.md +2 -2
  6. package/llms/actions-refused-fields.md +22 -0
  7. package/llms/actions.md +24 -41
  8. package/llms/analytics.md +1 -1
  9. package/llms/api-from-islands.md +1 -1
  10. package/llms/api-routes.md +6 -6
  11. package/llms/browser-only.md +1 -1
  12. package/llms/check-and-tools.md +1 -1
  13. package/llms/code-lints.md +2 -2
  14. package/llms/compiler-api.md +1 -1
  15. package/llms/component-libraries.md +1 -0
  16. package/llms/components.md +1 -1
  17. package/llms/content-cms.md +1 -1
  18. package/llms/content-markdown-to-caching.md +1 -1
  19. package/llms/content-preview.md +2 -2
  20. package/llms/content.md +21 -21
  21. package/llms/deprecated-lints-1-105-libraries.md +2 -0
  22. package/llms/deprecated-lints-1-105.md +3 -3
  23. package/llms/deprecated-lints.md +4 -4
  24. package/llms/dev-tool.md +2 -2
  25. package/llms/environment.md +22 -22
  26. package/llms/files.md +5 -5
  27. package/llms/island-and-form-lints.md +1 -0
  28. package/llms/islands-state-to-ids.md +2 -1
  29. package/llms/islands.md +10 -1
  30. package/llms/local-collections.md +2 -2
  31. package/llms/mcp.md +2 -1
  32. package/llms/navigation-from-code.md +1 -1
  33. package/llms/notifications.md +4 -2
  34. package/llms/project-new-and-add.md +1 -1
  35. package/llms/project.md +3 -3
  36. package/llms/rate-limits.md +1 -1
  37. package/llms/recipes.md +16 -16
  38. package/llms/rooms.md +4 -4
  39. package/llms/routing-endpoints-and-base.md +1 -1
  40. package/llms/routing.md +5 -5
  41. package/llms/schemas.md +14 -7
  42. package/llms/server.md +7 -7
  43. package/llms/site.md +9 -9
  44. package/llms/sitemap-search-fonts.md +2 -0
  45. package/llms/styles-and-assets.md +2 -1
  46. package/llms/templates-elements-slots-snippets.md +2 -2
  47. package/llms/testing-browser.md +20 -0
  48. package/llms/testing.md +1 -1
  49. package/llms/upgrading-1-105-config.md +2 -2
  50. package/llms/upgrading.md +37 -4
  51. package/llms/whats-new-archive.md +35 -66
  52. package/llms/whats-new.md +47 -28
  53. package/llms.txt +1 -1
  54. package/package.json +24 -11
  55. package/src/add.ts +1 -1
  56. package/src/build/class-table.ts +2 -2
  57. package/src/build/client.ts +27 -30
  58. package/src/build/entry-files.ts +19 -0
  59. package/src/build/lazy-components.ts +130 -0
  60. package/src/build/lazy-manifest.ts +56 -0
  61. package/src/build/lazy-stubs.ts +31 -0
  62. package/src/build/plugin.ts +16 -11
  63. package/src/build/runtime-chunk.ts +1 -1
  64. package/src/build/styles.ts +3 -3
  65. package/src/build/transform.ts +19 -7
  66. package/src/build/ui-layers.ts +30 -0
  67. package/src/build/ui.ts +108 -11
  68. package/src/build/variants.ts +125 -46
  69. package/src/build/worker-bundle.ts +6 -0
  70. package/src/check/action-options.ts +56 -0
  71. package/src/check/boot.ts +22 -1
  72. package/src/check/call-result.ts +242 -0
  73. package/src/check/config-objects.ts +17 -2
  74. package/src/check/diagnose.ts +22 -0
  75. package/src/check/handler-events.ts +149 -0
  76. package/src/check/index.ts +6 -2
  77. package/src/check/link-flag-tests.ts +130 -0
  78. package/src/check/project.ts +4 -3
  79. package/src/check/refusal-calls.ts +2 -2
  80. package/src/check/regroup.ts +5 -3
  81. package/src/check/renamed-packages.ts +58 -14
  82. package/src/check/schema-builders.ts +256 -0
  83. package/src/check/schema-json.ts +226 -0
  84. package/src/check/secret-keys.ts +15 -2
  85. package/src/check/shadow-types.ts +13 -9
  86. package/src/check/template-hints.ts +1 -1
  87. package/src/check/tool-labels.ts +11 -9
  88. package/src/check/ui-types.ts +4 -3
  89. package/src/check/ui.ts +14 -11
  90. package/src/commands/env-declare.ts +18 -6
  91. package/src/commands/routes.ts +1 -1
  92. package/src/compiler/a11y.ts +8 -1
  93. package/src/compiler/ast.ts +1 -1
  94. package/src/compiler/bound-props.ts +1 -1
  95. package/src/compiler/codegen.ts +13 -23
  96. package/src/compiler/deprecated-lints-1-105.ts +41 -0
  97. package/src/compiler/deprecated-lints-1-106.ts +14 -0
  98. package/src/compiler/deprecated-lints-1-107.ts +14 -0
  99. package/src/compiler/deprecated-lints.ts +17 -60
  100. package/src/compiler/deprecated-typed-lints.ts +23 -0
  101. package/src/compiler/dom-here.ts +72 -0
  102. package/src/compiler/dom.ts +23 -23
  103. package/src/compiler/fence-checks.ts +12 -11
  104. package/src/compiler/field-described.ts +2 -2
  105. package/src/compiler/helper-imports.ts +1 -1
  106. package/src/compiler/html-fields.ts +92 -0
  107. package/src/compiler/html-initial.ts +5 -3
  108. package/src/compiler/html.ts +14 -31
  109. package/src/compiler/import-edits.ts +15 -0
  110. package/src/compiler/index.ts +10 -3
  111. package/src/compiler/island-declaration.ts +15 -0
  112. package/src/compiler/items.ts +5 -5
  113. package/src/compiler/kay-exports.ts +1 -0
  114. package/src/compiler/lazy-imports.ts +357 -0
  115. package/src/compiler/link-flags.ts +6 -5
  116. package/src/compiler/lints.ts +12 -12
  117. package/src/compiler/parser.ts +2 -2
  118. package/src/compiler/rest-omits.ts +15 -0
  119. package/src/compiler/route-lints.ts +2 -0
  120. package/src/compiler/schema-lints.ts +13 -0
  121. package/src/compiler/script-server.ts +6 -3
  122. package/src/config-loader.ts +10 -2
  123. package/src/config-resolve.ts +3 -1
  124. package/src/config-shape.ts +2 -2
  125. package/src/config.ts +20 -4
  126. package/src/content/markdown.ts +2 -3
  127. package/src/content/validate.ts +1 -1
  128. package/src/generate-resource.ts +9 -9
  129. package/src/generate.ts +1 -1
  130. package/src/mcp/guards.ts +1 -1
  131. package/src/mcp/tools.ts +1 -1
  132. package/src/migrate/content.ts +61 -55
  133. package/src/new.ts +6 -2
  134. package/src/runtime/action-shared.ts +2 -2
  135. package/src/runtime/action.ts +51 -4
  136. package/src/runtime/client.ts +10 -0
  137. package/src/runtime/dom-lazy.ts +276 -0
  138. package/src/runtime/field-errors.ts +58 -0
  139. package/src/runtime/field-refusal.ts +179 -0
  140. package/src/runtime/form-types.ts +99 -0
  141. package/src/runtime/form.ts +25 -9
  142. package/src/runtime/html.ts +42 -6
  143. package/src/runtime/index.ts +2 -0
  144. package/src/runtime/island.server.ts +36 -2
  145. package/src/runtime/markdown-autolink.ts +69 -0
  146. package/src/runtime/markdown-render.client.ts +39 -3
  147. package/src/runtime/markdown.client.ts +6 -3
  148. package/src/runtime/markdown.server.ts +6 -3
  149. package/src/runtime/markdown.ts +125 -1
  150. package/src/runtime/navigate-api.ts +10 -5
  151. package/src/runtime/persist.ts +7 -7
  152. package/src/runtime/query-param.ts +1 -1
  153. package/src/runtime/reactive.ts +14 -0
  154. package/src/runtime/sanitize.ts +3 -1
  155. package/src/runtime/schema-record.ts +32 -0
  156. package/src/runtime/schema.client.ts +101 -14
  157. package/src/runtime/schema.ts +328 -26
  158. package/src/runtime/standard-schema.ts +32 -0
  159. package/src/runtime/swap-focus.ts +59 -11
  160. package/src/runtime/validate-run.client.ts +179 -0
  161. package/src/runtime/validate.client.ts +11 -0
  162. package/src/runtime/validate.ts +4 -137
  163. package/src/server/action-module.ts +16 -0
  164. package/src/server/actions.ts +54 -57
  165. package/src/server/answer.ts +102 -0
  166. package/src/server/api-input.ts +166 -0
  167. package/src/server/api-modules.ts +1 -1
  168. package/src/server/api.ts +12 -32
  169. package/src/server/app-stages.ts +38 -26
  170. package/src/server/app.ts +5 -2
  171. package/src/server/client.ts +2 -0
  172. package/src/server/dev-ui.ts +2 -2
  173. package/src/server/dev.ts +7 -9
  174. package/src/server/env-state.ts +1 -1
  175. package/src/server/env.ts +11 -3
  176. package/src/server/favicon.ts +47 -1
  177. package/src/server/file-limit.ts +7 -1
  178. package/src/server/forms.ts +1 -1
  179. package/src/server/host-allowlist.ts +7 -7
  180. package/src/server/image-metadata-bmff.ts +1 -1
  181. package/src/server/index.ts +2 -0
  182. package/src/server/kay-routes.ts +221 -0
  183. package/src/server/kay-server.ts +228 -0
  184. package/src/server/kept-exports.ts +1 -0
  185. package/src/server/kept-pages.ts +3 -3
  186. package/src/server/library.ts +2 -2
  187. package/src/server/mcp.ts +14 -13
  188. package/src/server/notifications.ts +4 -2
  189. package/src/server/offline.ts +24 -7
  190. package/src/server/openapi.ts +12 -3
  191. package/src/server/phases.ts +249 -0
  192. package/src/server/protection.ts +6 -6
  193. package/src/server/proxy-key.ts +8 -8
  194. package/src/server/push-settings.ts +16 -2
  195. package/src/server/push.ts +12 -4
  196. package/src/server/query.ts +17 -31
  197. package/src/server/receive.ts +43 -0
  198. package/src/server/render-document.ts +13 -3
  199. package/src/server/render.ts +1 -1
  200. package/src/server/request-context.ts +137 -0
  201. package/src/server/schema-check.ts +1 -1
  202. package/src/server/scope.ts +20 -13
  203. package/src/server/signals.ts +4 -4
  204. package/src/server/socket.ts +19 -47
  205. package/src/server/stream.ts +1 -1
  206. package/src/server/validate.ts +346 -0
  207. package/src/template-ws.ts +1 -1
  208. package/src/test/a11y-dom.ts +70 -0
  209. package/src/test/html-snapshot.ts +103 -0
  210. package/src/test/index.ts +2 -1
  211. package/src/test/mount.ts +14 -3
  212. package/src/test/page-checks.ts +12 -0
  213. package/src/test/screenshot-match.ts +2 -2
  214. package/src/test/shared-modules.ts +27 -5
  215. package/src/test/site-types.ts +5 -1
  216. package/types/build/class-table.d.ts +1 -1
  217. package/types/build/class-table.d.ts.map +1 -1
  218. package/types/build/client.d.ts +3 -2
  219. package/types/build/client.d.ts.map +1 -1
  220. package/types/build/entry-files.d.ts +4 -0
  221. package/types/build/entry-files.d.ts.map +1 -0
  222. package/types/build/lazy-components.d.ts +6 -0
  223. package/types/build/lazy-components.d.ts.map +1 -0
  224. package/types/build/lazy-manifest.d.ts +19 -0
  225. package/types/build/lazy-manifest.d.ts.map +1 -0
  226. package/types/build/lazy-stubs.d.ts +5 -0
  227. package/types/build/lazy-stubs.d.ts.map +1 -0
  228. package/types/build/plugin.d.ts +1 -0
  229. package/types/build/plugin.d.ts.map +1 -1
  230. package/types/build/transform.d.ts +4 -1
  231. package/types/build/transform.d.ts.map +1 -1
  232. package/types/build/ui-layers.d.ts +5 -0
  233. package/types/build/ui-layers.d.ts.map +1 -0
  234. package/types/build/ui.d.ts +7 -0
  235. package/types/build/ui.d.ts.map +1 -1
  236. package/types/build/variants.d.ts +1 -1
  237. package/types/build/variants.d.ts.map +1 -1
  238. package/types/build/worker-bundle.d.ts +1 -0
  239. package/types/build/worker-bundle.d.ts.map +1 -1
  240. package/types/check/action-options.d.ts +3 -0
  241. package/types/check/action-options.d.ts.map +1 -0
  242. package/types/check/boot.d.ts.map +1 -1
  243. package/types/check/call-result.d.ts +7 -0
  244. package/types/check/call-result.d.ts.map +1 -0
  245. package/types/check/config-objects.d.ts.map +1 -1
  246. package/types/check/diagnose.d.ts.map +1 -1
  247. package/types/check/handler-events.d.ts +9 -0
  248. package/types/check/handler-events.d.ts.map +1 -0
  249. package/types/check/index.d.ts +1 -0
  250. package/types/check/index.d.ts.map +1 -1
  251. package/types/check/link-flag-tests.d.ts +4 -0
  252. package/types/check/link-flag-tests.d.ts.map +1 -0
  253. package/types/check/project.d.ts.map +1 -1
  254. package/types/check/regroup.d.ts +1 -1
  255. package/types/check/regroup.d.ts.map +1 -1
  256. package/types/check/renamed-packages.d.ts +1 -0
  257. package/types/check/renamed-packages.d.ts.map +1 -1
  258. package/types/check/schema-builders.d.ts +3 -0
  259. package/types/check/schema-builders.d.ts.map +1 -0
  260. package/types/check/schema-json.d.ts +3 -0
  261. package/types/check/schema-json.d.ts.map +1 -0
  262. package/types/check/secret-keys.d.ts.map +1 -1
  263. package/types/check/shadow-types.d.ts.map +1 -1
  264. package/types/check/template-hints.d.ts +1 -0
  265. package/types/check/template-hints.d.ts.map +1 -1
  266. package/types/check/tool-labels.d.ts.map +1 -1
  267. package/types/check/ui-types.d.ts.map +1 -1
  268. package/types/check/ui.d.ts.map +1 -1
  269. package/types/commands/env-declare.d.ts.map +1 -1
  270. package/types/compiler/a11y.d.ts.map +1 -1
  271. package/types/compiler/bound-props.d.ts +1 -0
  272. package/types/compiler/bound-props.d.ts.map +1 -1
  273. package/types/compiler/codegen.d.ts +3 -0
  274. package/types/compiler/codegen.d.ts.map +1 -1
  275. package/types/compiler/deprecated-lints-1-105.d.ts +39 -0
  276. package/types/compiler/deprecated-lints-1-105.d.ts.map +1 -0
  277. package/types/compiler/deprecated-lints-1-106.d.ts +12 -0
  278. package/types/compiler/deprecated-lints-1-106.d.ts.map +1 -0
  279. package/types/compiler/deprecated-lints-1-107.d.ts +12 -0
  280. package/types/compiler/deprecated-lints-1-107.d.ts.map +1 -0
  281. package/types/compiler/deprecated-lints.d.ts +41 -22
  282. package/types/compiler/deprecated-lints.d.ts.map +1 -1
  283. package/types/compiler/deprecated-typed-lints.d.ts +21 -0
  284. package/types/compiler/deprecated-typed-lints.d.ts.map +1 -0
  285. package/types/compiler/dom-here.d.ts +14 -0
  286. package/types/compiler/dom-here.d.ts.map +1 -0
  287. package/types/compiler/dom.d.ts +1 -0
  288. package/types/compiler/dom.d.ts.map +1 -1
  289. package/types/compiler/fence-checks.d.ts.map +1 -1
  290. package/types/compiler/field-described.d.ts +1 -1
  291. package/types/compiler/field-described.d.ts.map +1 -1
  292. package/types/compiler/html-fields.d.ts +19 -0
  293. package/types/compiler/html-fields.d.ts.map +1 -0
  294. package/types/compiler/html-initial.d.ts +3 -2
  295. package/types/compiler/html-initial.d.ts.map +1 -1
  296. package/types/compiler/html.d.ts.map +1 -1
  297. package/types/compiler/import-edits.d.ts +1 -0
  298. package/types/compiler/import-edits.d.ts.map +1 -1
  299. package/types/compiler/index.d.ts +3 -0
  300. package/types/compiler/index.d.ts.map +1 -1
  301. package/types/compiler/island-declaration.d.ts +5 -0
  302. package/types/compiler/island-declaration.d.ts.map +1 -1
  303. package/types/compiler/items.d.ts +4 -1
  304. package/types/compiler/items.d.ts.map +1 -1
  305. package/types/compiler/kay-exports.d.ts.map +1 -1
  306. package/types/compiler/lazy-imports.d.ts +33 -0
  307. package/types/compiler/lazy-imports.d.ts.map +1 -0
  308. package/types/compiler/link-flags.d.ts +6 -0
  309. package/types/compiler/link-flags.d.ts.map +1 -1
  310. package/types/compiler/lints.d.ts +61 -34
  311. package/types/compiler/lints.d.ts.map +1 -1
  312. package/types/compiler/rest-omits.d.ts +4 -0
  313. package/types/compiler/rest-omits.d.ts.map +1 -0
  314. package/types/compiler/route-lints.d.ts +8 -0
  315. package/types/compiler/route-lints.d.ts.map +1 -1
  316. package/types/compiler/schema-lints.d.ts +11 -0
  317. package/types/compiler/schema-lints.d.ts.map +1 -0
  318. package/types/compiler/script-server.d.ts.map +1 -1
  319. package/types/config-loader.d.ts.map +1 -1
  320. package/types/config-resolve.d.ts.map +1 -1
  321. package/types/config.d.ts +15 -2
  322. package/types/config.d.ts.map +1 -1
  323. package/types/content/markdown.d.ts.map +1 -1
  324. package/types/migrate/content.d.ts.map +1 -1
  325. package/types/new.d.ts +1 -0
  326. package/types/new.d.ts.map +1 -1
  327. package/types/runtime/action-shared.d.ts +1 -1
  328. package/types/runtime/action-shared.d.ts.map +1 -1
  329. package/types/runtime/action.d.ts +29 -1
  330. package/types/runtime/action.d.ts.map +1 -1
  331. package/types/runtime/client.d.ts.map +1 -1
  332. package/types/runtime/dom-lazy.d.ts +6 -0
  333. package/types/runtime/dom-lazy.d.ts.map +1 -0
  334. package/types/runtime/field-errors.d.ts +4 -0
  335. package/types/runtime/field-errors.d.ts.map +1 -0
  336. package/types/runtime/field-refusal.d.ts +37 -0
  337. package/types/runtime/field-refusal.d.ts.map +1 -0
  338. package/types/runtime/form-types.d.ts +6 -0
  339. package/types/runtime/form-types.d.ts.map +1 -0
  340. package/types/runtime/form.d.ts +4 -2
  341. package/types/runtime/form.d.ts.map +1 -1
  342. package/types/runtime/html.d.ts +3 -0
  343. package/types/runtime/html.d.ts.map +1 -1
  344. package/types/runtime/index.d.ts +2 -0
  345. package/types/runtime/index.d.ts.map +1 -1
  346. package/types/runtime/island.server.d.ts +2 -0
  347. package/types/runtime/island.server.d.ts.map +1 -1
  348. package/types/runtime/markdown-autolink.d.ts +11 -0
  349. package/types/runtime/markdown-autolink.d.ts.map +1 -0
  350. package/types/runtime/markdown-render.client.d.ts +2 -1
  351. package/types/runtime/markdown-render.client.d.ts.map +1 -1
  352. package/types/runtime/markdown.client.d.ts +3 -1
  353. package/types/runtime/markdown.client.d.ts.map +1 -1
  354. package/types/runtime/markdown.d.ts +11 -0
  355. package/types/runtime/markdown.d.ts.map +1 -1
  356. package/types/runtime/markdown.server.d.ts +3 -1
  357. package/types/runtime/markdown.server.d.ts.map +1 -1
  358. package/types/runtime/navigate-api.d.ts +1 -1
  359. package/types/runtime/navigate-api.d.ts.map +1 -1
  360. package/types/runtime/persist.d.ts +2 -2
  361. package/types/runtime/persist.d.ts.map +1 -1
  362. package/types/runtime/reactive.d.ts +3 -0
  363. package/types/runtime/reactive.d.ts.map +1 -1
  364. package/types/runtime/sanitize.d.ts.map +1 -1
  365. package/types/runtime/schema-record.d.ts +9 -0
  366. package/types/runtime/schema-record.d.ts.map +1 -0
  367. package/types/runtime/schema.client.d.ts.map +1 -1
  368. package/types/runtime/schema.d.ts +99 -10
  369. package/types/runtime/schema.d.ts.map +1 -1
  370. package/types/runtime/standard-schema.d.ts +37 -0
  371. package/types/runtime/standard-schema.d.ts.map +1 -0
  372. package/types/runtime/swap-focus.d.ts.map +1 -1
  373. package/types/runtime/validate-run.client.d.ts +4 -0
  374. package/types/runtime/validate-run.client.d.ts.map +1 -0
  375. package/types/runtime/validate.client.d.ts +4 -0
  376. package/types/runtime/validate.client.d.ts.map +1 -0
  377. package/types/runtime/validate.d.ts +1 -21
  378. package/types/runtime/validate.d.ts.map +1 -1
  379. package/types/server/action-module.d.ts +2 -0
  380. package/types/server/action-module.d.ts.map +1 -0
  381. package/types/server/actions.d.ts +1 -0
  382. package/types/server/actions.d.ts.map +1 -1
  383. package/types/server/answer.d.ts +6 -0
  384. package/types/server/answer.d.ts.map +1 -0
  385. package/types/server/api-input.d.ts +19 -0
  386. package/types/server/api-input.d.ts.map +1 -0
  387. package/types/server/api.d.ts.map +1 -1
  388. package/types/server/app-stages.d.ts +7 -3
  389. package/types/server/app-stages.d.ts.map +1 -1
  390. package/types/server/app.d.ts +2 -0
  391. package/types/server/app.d.ts.map +1 -1
  392. package/types/server/client.d.ts +1 -0
  393. package/types/server/client.d.ts.map +1 -1
  394. package/types/server/dev.d.ts +1 -1
  395. package/types/server/dev.d.ts.map +1 -1
  396. package/types/server/env-state.d.ts.map +1 -1
  397. package/types/server/env.d.ts +5 -1
  398. package/types/server/env.d.ts.map +1 -1
  399. package/types/server/favicon.d.ts +3 -1
  400. package/types/server/favicon.d.ts.map +1 -1
  401. package/types/server/file-limit.d.ts.map +1 -1
  402. package/types/server/host-allowlist.d.ts +3 -3
  403. package/types/server/host-allowlist.d.ts.map +1 -1
  404. package/types/server/index.d.ts +2 -0
  405. package/types/server/index.d.ts.map +1 -1
  406. package/types/server/kay-routes.d.ts +47 -0
  407. package/types/server/kay-routes.d.ts.map +1 -0
  408. package/types/server/kay-server.d.ts +25 -0
  409. package/types/server/kay-server.d.ts.map +1 -0
  410. package/types/server/kept-exports.d.ts.map +1 -1
  411. package/types/server/kept-pages.d.ts +1 -1
  412. package/types/server/kept-pages.d.ts.map +1 -1
  413. package/types/server/library.d.ts +2 -1
  414. package/types/server/library.d.ts.map +1 -1
  415. package/types/server/mcp.d.ts +1 -1
  416. package/types/server/mcp.d.ts.map +1 -1
  417. package/types/server/notifications.d.ts +2 -1
  418. package/types/server/notifications.d.ts.map +1 -1
  419. package/types/server/offline.d.ts.map +1 -1
  420. package/types/server/openapi.d.ts.map +1 -1
  421. package/types/server/phases.d.ts +36 -0
  422. package/types/server/phases.d.ts.map +1 -0
  423. package/types/server/protection.d.ts +3 -2
  424. package/types/server/protection.d.ts.map +1 -1
  425. package/types/server/proxy-key.d.ts +3 -3
  426. package/types/server/proxy-key.d.ts.map +1 -1
  427. package/types/server/push-settings.d.ts +1 -1
  428. package/types/server/push-settings.d.ts.map +1 -1
  429. package/types/server/push.d.ts +1 -0
  430. package/types/server/push.d.ts.map +1 -1
  431. package/types/server/query.d.ts.map +1 -1
  432. package/types/server/receive.d.ts +9 -0
  433. package/types/server/receive.d.ts.map +1 -0
  434. package/types/server/render-document.d.ts.map +1 -1
  435. package/types/server/request-context.d.ts +29 -0
  436. package/types/server/request-context.d.ts.map +1 -0
  437. package/types/server/schema-check.d.ts +1 -0
  438. package/types/server/schema-check.d.ts.map +1 -1
  439. package/types/server/scope.d.ts +1 -1
  440. package/types/server/scope.d.ts.map +1 -1
  441. package/types/server/socket.d.ts +3 -5
  442. package/types/server/socket.d.ts.map +1 -1
  443. package/types/server/validate.d.ts +26 -0
  444. package/types/server/validate.d.ts.map +1 -0
  445. package/types/test/a11y-dom.d.ts +20 -0
  446. package/types/test/a11y-dom.d.ts.map +1 -0
  447. package/types/test/html-snapshot.d.ts +4 -0
  448. package/types/test/html-snapshot.d.ts.map +1 -0
  449. package/types/test/index.d.ts.map +1 -1
  450. package/types/test/mount.d.ts +3 -0
  451. package/types/test/mount.d.ts.map +1 -1
  452. package/types/test/page-checks.d.ts +6 -0
  453. package/types/test/page-checks.d.ts.map +1 -0
  454. package/types/test/screenshot-match.d.ts +1 -1
  455. package/types/test/screenshot-match.d.ts.map +1 -1
  456. package/types/test/shared-modules.d.ts.map +1 -1
  457. package/types/test/site-types.d.ts +3 -1
  458. package/types/test/site-types.d.ts.map +1 -1
  459. package/src/check/schema-type.ts +0 -9
  460. package/src/compiler/deprecated-script-fence.ts +0 -26
  461. package/src/server/field-errors.ts +0 -136
  462. package/types/check/schema-type.d.ts +0 -3
  463. package/types/check/schema-type.d.ts.map +0 -1
  464. package/types/compiler/deprecated-script-fence.d.ts +0 -3
  465. package/types/compiler/deprecated-script-fence.d.ts.map +0 -1
  466. package/types/server/field-errors.d.ts +0 -6
  467. package/types/server/field-errors.d.ts.map +0 -1
@@ -1,70 +1,39 @@
1
1
  # What's new, older releases
2
2
 
3
- What each release before 1.105 added, and the end of a newest release that was cut short (`(continued)`), newest first, each feature with where it is documented. The newer releases are in [What's new](whats-new.md); what a release breaks is in [Upgrading](upgrading.md).
4
-
5
- ## 1.105.0 (continued)
6
-
7
- - A page's `page` takes `seo: { title, description, image, canonical, noindex, sitemap, lastmod, search, feed }` and `cache: '1h' | { browser, shared, swr } | 'private' | false`, `head(title=... description=... image=... canonical=... noindex)` takes the same shorthand in a template, and `seo.noindex` in kay.config.ts keeps a whole site out of search engines: see [Head and site metadata](head.md) and [A CDN in front of prerendered pages](cdn-caching.md); `ttl`, `cacheControl` and the top-level `noindex`, `sitemap`, `lastmod`, `search` and `feed` are deprecated (`deprecated-page-seo`, `deprecated-page-cache`).
8
- - `form(action={save} values={todo})` fills every field from a record, text, numbers, dates, checkboxes, radios and selects, a date by its field's type, and a refused post's values still win in the form that posted ([forms](actions.md#fill-a-form-from-a-record)).
9
-
10
- - `bind:` works on any prop that has an `on<Prop>Change` callback beside it, so kayjs-ui's controls bind like a `Bindable` prop does: `Dialog(bind:open={open})` is `Dialog(open={open()} onOpenChange={v => open = v})`, an `onOpenChange` written beside it is called after the write, and `kay check` types the bind by the callback ([components](components.md#bind-a-prop-to-the-parents-signal)).
11
- - A `selection` is written like a signal, `selected = id`; `selected.set(id)` is reported as `signal-set-call` and fixed by `kay check --fix` ([components](components.md#signals)).
12
- - Jobs take one handler shape and need no plugin file: every handler is `(input, ctx)` with `ctx.signal`, `ctx.job`, `ctx.log`, `ctx.locale` and a workflow's `ctx.step`; every queue, workflow, schedule and `background` job a file of `src/jobs/` exports is mounted with no default export and no `.use`; `schedule({ every | cron, timeZone, lock, timeout, enabled, boot }, job)` is one shape; `enabled` is on every kind and `timeout` on queues, workflows and schedules ([Queues](queues.md), [Running in production](production.md#background-jobs)).
13
- - Libraries name their stores one way: `ai({ store })`, `mailer({ store })`, `auth({ store })`, `pg<Lib>(db)` and `sqlite<Lib>(path)` on each `/pg` and `/sqlite` entry and `<lib>Tables` for an app's own `ignoreTables`; without a `store`, kay and the libraries share one SQLite file, `data/app.sqlite`, and still read the file of the old name where it exists ([stores](stores.md), [upgrading](upgrading.md)). The old names work until 1.108 and `kay check` fixes them as `deprecated-store-names`.
14
- - `formatDuration('125m')` takes a `Duration` and `formatBytes('1.5kb')` a `ByteSize`, as every other length and size of kay is written; a number of milliseconds for `formatDuration` is deprecated (`deprecated-format-duration`): see [Locales](locales.md).
15
- - An `img` takes `aspect`, `quality`, `sizes` and `placeholder={false}` as attributes, `img(src={hero} aspect="1/1")`, where it spread `image()`: see [Images](images.md); `no-placeholder` and the spread are deprecated (`deprecated-image-options`).
16
-
17
- - Test helpers share one shape: each library's `/test` entry has `test(site)` with `reset()`, `site.signInAs({ email })` and `site.signOut()` sign in for every library that joined, `site.expectRefused` and `site.socket.refused` name the refusal helpers, `site.fetchStub({ 'https://api.x/*': json })` answers the app's outgoing `fetch` (an unstubbed call to another host fails the test), `site.freezeTime(at)` stops the clock, and `page.matchScreenshot(name)` compares a page with a baseline beside the test ([Fake the outside world](testing-requests-jobs-sockets.md), [browser tests](testing-browser.md)).
18
- - `kay check` reports `server-import-in-island`: a page that hydrates reads in its template a function only its `--- server` fence imports, which the browser lacks; the offered fix imports it in the script fence too ([Components](components.md#file-layout)).
19
- - A page without a `--- server` fence should not be an island: a handler, a `bind:`, a `ref`, a signal or a live or persisted import in one is the warning `deprecated-page-island` in `kay check`, which still works through 1.107 and which 1.108 refuses ([Islands](islands.md#islands), [upgrading](upgrading.md)).
20
- - kayjs-mail sends through the site that answers the request: `ctx.locals.mail` in a page, an action or a guard, and `contactForm(options)` needs no mailer. Every `MAIL_*` setting is also an option (`url`, `smtp.insecure`, `smtp.rateLimit`, `smtp.dkim`), the forms are kayjs-ui's alone, and `deprecated-mail-send` and `deprecated-mail-form` find the old imports ([kayjs-mail](../../mail/llms/writing-and-sending.md#setup)).
21
- - kayjs-ai: `ask`, `describeImage`, `transcribe`, `speak` and `embed` share one `CallOptions` (`provider`, `model`, `signal`, `timeout`, `retry`, `fallback` and the hooks), so a retry (one by default after a transient failure, `retry: false` for none), a fallback or a hook works on every call; `timeout` takes one duration for the whole call ([Asking](../../ai/llms/asking.md#options-every-call-takes)).
22
- - kayjs-ai: `locale` takes a BCP 47 tag (`pt-BR`) in `transcribe()` and `describeImage()`, normalised for the provider; `language` is deprecated ([Speech and embeddings](../../ai/llms/speech-and-embeddings.md)).
23
- - kayjs-ai: `Chat`, `ChatLauncher` and `ChatPanel` take `labels={{ send, stop, ... }}`, typed as `ChatLabels`, in place of one `<key>Label` prop each ([Chat](../../ai/llms/chat.md)).
24
- - One API for each of query params, persisted state, navigation and effects ([state](islands-state-to-ids.md#shared-and-persisted-state), [navigating](navigation-from-code.md), [effects](effects.md)): `queryParam(name, { default, values, history })` is the one signal of a query param, `persisted.cookie()` names the cookie `persisted()` kept, `navigate.query(changes)` changes the query and `navigate(href)` goes to a page, `navigation.onNavigate()` and `navigation.onBeforeNavigate()` are the hooks of the `navigation` source, `listen` takes a function returning its target, `effect`, `onMount`, `debounced` and `throttled` take `{ signal }` as the other helpers do, and `mount`, `s`, `RateLimit` and `sqliteCache` each have one entry. The old forms work until 1.108 and `kay upgrade` rewrites them (`deprecated-persisted-call`, `deprecated-persisted-query`, `deprecated-navigate-query`, `deprecated-navigation-hooks`, `deprecated-listen-target`, `deprecated-import-path`).
25
- - `cms({ access })` is the one option for who may edit: a kayjs-auth role or list of them, `{ password }`, or a function returning the person, inferred from kayjs-auth and `roles` when left out; `roles` and `can` stand alone. See [the cms options](../../cms/llms/options.md).
26
- - `CMS_URL` names the forge a production server commits to, `forgejo://TOKEN@git.example.com/owner/repo`, `github://TOKEN@owner/repo` or `gitlab://TOKEN@group/project`, as `MAIL_URL` does for mail. See [setup](../../cms/llms/setup.md).
27
- - A cms collection sets its own `uploads`, `fourEyes` and hooks beside the global ones, `history: { revisions: false }` turns the revisions off alone, and `pageLink: { button: false }` keeps the Edit this page hint with no button. See [options](../../cms/llms/options.md).
28
- - Enter that confirms an input-method (IME) candidate no longer picks, runs or adds: kayjs-ui's combobox, command palette and markdown editor, kayjs-cms's tag field and kayjs-ai's chat edit, rename and message fields ignore it, as does the `.enter` event modifier (Safari's closing Enter included), and `composing(event)` from `kay` is that check for a handler of your own ([keyboard shortcuts](navigation.md)).
29
-
30
- - A form names a field once: `FormField(field="title")` names the bare `input` in it and gives it the schema's constraints, `label(field="name")` writes the label's `for` and the control's `id`, and `button(action={x})` outside a form posts by itself, on a static page and in an island ([forms](actions.md#name-a-field-once)).
31
- - The page flags `keep`, `reload`, `layouts` and `guards` are plain booleans in `page`, an endpoint and an `api()` module (`guards: true` says what the default does), where each took one literal before ([Routing](routing.md#page-settings)).
32
- - An island declares its settings in one place: `island({ render, hydrate, persist, interactive })` first in its script, as it declares its props, replaces the `--- island`, `--- client` and `--- static` fence lines and `export const island`; a use writes `render="client"` for `hydrate="client"` and `server defer` for `server="defer"`. `kay upgrade` rewrites the old forms, which work until 1.108 ([Islands](islands.md#islands)).
33
- - kayjs-ai's `ChatLauncher` is built on kayjs-ui's `SidePanel` and takes `Chat`'s props by type, `Chat` and `ChatLauncher` take `newTab` (`true`, `false` or `'auto'`, as kayjs-ui's links do; `'auto'` by default on the launcher) in place of `links`, and its attachment limits are FileDrop's (`maxFiles`, `maxSize`, one rule for both). A `modal={false}` `SidePanel` takes a `launcher` floating or docked, shaped by `launcherButton` and kept on screen as a toggle by an `openIcon`, and `keep` leaves its content mounted while it is closed ([Chat](../../ai/llms/chat.md), [Floating chat](../../ai/llms/chat-launcher.md)).
34
- - An explicit `newTab={false}` keeps a link in this tab even where the app's `links.outside` would open it in a new one, for the links of kayjs-ui's components (`tabOf`) and for the reply links of `Chat` and `ChatLauncher`; `links.outside` stays the default where a component says nothing ([Links](../../ui/llms/slots-and-links.md), [Chat](../../ai/llms/chat.md)).
35
- - A file pasted into a `Chat` now goes through `accept` like a picked or dropped one: a type it refuses is turned back with the `attachRefused` text, where a paste used to skip the type filter ([Chat](../../ai/llms/chat.md)).
36
-
37
- - Every island source reads and reports the same way: `data()`, `status()`, `pending()`, `error()` and `retry()`, with `onData({ value })` and `onError`, on a `resource`, a `stream`, a `socket`, a `local()` collection and a `track()` handle (`data()` and `status()` on an action too), one `LoadStatus` for reads and one `ConnectionStatus` for connections ([island sources](island-sources.md)). A collection's sync moves under `sync` (`sync.status()`, `sync.queued()`, `sync()`), and `pending()` and `status()` mean what they do everywhere ([local collections](local-collections.md)). `value()`, `last()`, `rows()`, `succeeded()`, `onSuccess` and `onSync` work until 1.108, and `deprecated-source-readers` rewrites them.
38
- - Live values and presence write alike: `live(initial, { key: true })` declares a value per key with a plain starting value, `set(next, { key })` and `set(next, { user })` write one key's or one user's, `presence({ room, member })` takes one object, and every live value tells `onData({ value })` and `onError({ error })` in a browser; `deprecated-live-api` rewrites the old forms ([live values](live-values.md), [island sources](island-sources.md)).
39
- - One `Action` type crosses into components: bare `Action` takes any action, and a `.with()` action crosses into an island with its fields (`Action<never, unknown>` is rewritten by `deprecated-action-type`) ([actions from islands](actions-from-islands.md#pass-an-action-to-a-component)).
40
- - Every component callback takes one event object and one naming rule: `onOpenChange({ open })`, `onChange({ value, option })`, `onSelectedChange({ keys, rows })`; state a prop can hold reports through `on<Prop>Change`, a press through `on<Verb>`, and `tests/callbacks.test.ts` holds the rule. `onChange` of Accordion, Tabs and ThemeToggle is `onValueChange`, ZoomPane's `onPlateChange`, Table's `onSortChange` and a chart's `onActiveChange`, the old names working until 1.108 with a `deprecated-ui-callbacks` fix ([conventions](component-library-conventions.md), [upgrading](upgrading.md)).
41
- - Every guard option is named `guards` and takes a guard, a list, `{ load }` or `false`: `vitals({ guards })`, `jobs: { guards }`, `images: { guards }`, beside a page's and an API module's. A feature that lists or changes private data (`jobs`, `images.resolve`) answers 403 with none, and `requireGuards` is `guards: { default: 'closed' | 'open' }` ([Guards](guards.md#path-and-guard-options)); `kay check --fix` rewrites the old forms.
42
- - Rate limits are one `RateLimit` and one check: `rateLimit(name, limit).check(ctx)` refuses a guard's request with a 429 (`enforce` is deprecated for it) and `.count(request)` gives `{ count, resetAt, wait }`; kayjs-auth's `rateLimit` is grouped by feature (`signIn: { ip, account, accountAll }`, `oauth: { token }`); `deprecated-rate-enforce` and `deprecated-auth-rate-limits` rewrite the old forms, and each kind of route's counting phase is written down ([Rate limits](rate-limits.md#when-a-request-is-counted)).
43
- - `images.rateLimit`, `mcp.rateLimit`, `live.rateLimit` and `basicAuth({ rateLimit })` take a whole `RateLimit` minus `key`: a `store` to count in and an `onLimit` told of each refused request, as an action's does ([Rate limits](rate-limits.md#in-the-libraries)).
44
-
45
- - A call to an action no longer reloads the page when its handler invalidated a `cached(..., { live: true })` key the page or a `resource()` follows: the live connection shows exactly the elements that read it, and `refresh: true` still reloads the page. ([actions from islands](actions-from-islands.md), [API from islands](api-from-islands.md)).
46
- - `kay check` holds the context an endpoint file declares, `EndpointContext<{ slug: string }, { org: Org }>`, to its params and the `_guard.ts` files above it, and an `api({ guards: [needsKey] })` module reads what its own guards return as `ctx.guard` with no generic ([Guards](guards.md)). With no generic written, `ctx: EndpointContext` reads its `params`, its `guard` and its `page.query` typed from the file tree and `api()` reads the guards above its module, in `kay check`, which type-checks a shadow of those files.
47
- - A page with `liveRefresh: true` in its settings is left to its live connection after a call whose handler invalidated only cached keys it follows, a streaming action's included (its end event names them), instead of loading again; `resource()` refetches when a tag its route's cached value names is invalidated, even once memory dropped that value, `resource(..., { tags: ['posts'] })` when a call of the page invalidated `posts` for a route reading no cached value, `revalidate: 'focus'` with `stale: '30s'` leaves an answer be for its window, and without `revalidate` a resource asks again only for `refresh()`, an invalidation or a changed option ([actions from islands](actions-from-islands.md), [API from islands](api-from-islands.md)).
48
- - Every feature key of `kay.config.ts` takes `false`, `true` or its options (`robots`, `sitemap`, `favicon`, `security`, `health`, `preview`, `images.avif` and the rest), and `defineConfig` refuses an unknown key in every option bag at any depth, derived from `KayConfig` itself; `proxy: 2` is `proxy: { hops: 2 }`, which `deprecated-config-switch` rewrites ([Project](project.md)).
49
- - The server hooks of kayjs-auth, -mail, -cms and -ai that observe are `after<Verb>`, as `before<Verb>` is the one that may refuse or change: `afterSignUp`, `afterSend`, `afterSuppress`, a list's `afterSubscribe`, `afterConfirm`, `afterUnsubscribe` and `afterBroadcast`, `afterSave` and `afterUpload`, `afterStep`, `afterToolCall` and `afterRequest`. The old `on<Verb>` names work until 1.108 and `deprecated-hook-names` renames them; see [Hooks](hooks.md) and [Upgrading](upgrading.md).
50
- - The config's hooks are flat keys named by the moment they run, `onListen`, `onStop` and `onError` (which left `observe`), every hook event carries one `context` (an action hook's holds the action's own context too), `observe.log` is `{ format, requests, sink }`, and `pages()` and `testSite()` take their config as `{ config }` beside `root`; `deprecated-app-hooks`, `deprecated-hook-context` and `deprecated-pages-options` rewrite the old forms ([Hooks](hooks.md), [Production](production.md), [Project](project.md)).
51
- - `images` is grouped as `remote: { hosts, maxSize, timeout }`, `formats: { quality, webp, avif }` and `limits: { variants, queue }`, and the lists a CMS or a database may hold take a function returning them (or a promise): `cors.origins`, `security.hosts`, `images.remote` hosts, `proxy.trusted`, `redirects`, `robots.disallow` and `allow`, `i18n.paths`, called once as the config loads; `ttl` is how long `signed.sign()`, `files.url()`, `workChallenge()`, kayjs-auth's `proofOfWork()` and an action's `minTime` and `proofOfWork` keep what they made, `maxAge` staying for HTTP and cookies, a store takes every length as a `Duration` (`durations: true`, [Stores](stores.md); a store written before keeps getting milliseconds until 1.108), and `deprecated-images-keys`, `deprecated-ttl-names` and `deprecated-store-ms` rewrite the old names ([Project](project.md), [Images](images.md)).
52
-
53
- - `session.start(data, { maxAge })` signs a visitor in at once (new id, data, lifetime) and the session cookie follows `security.cookies`; rooms leave on close by themselves and take `member`, `beforeJoin`, `onJoin` and `onLeave` ([Rooms](rooms.md)); `files.response(key, request, { download })` names a download and `fileAnswer(file, request, { attachment })` from `kay/server` answers any file with `Range` and a download name ([Files](files.md)); `defineContext` comes from `kay/server` and the config's `env` is `envFiles` ([Server](server.md#sessions), [Environment](environment.md)).
54
- - An island hears kay's DOM events through function hooks: `navigation.onStart`, `onError` and `onStall` beside `onNavigate`, and `add.onStart`, `onData` and `onError` on an action for the forms posting it in place, one table mapping each event to its hook ([events](events.md), [navigation](navigation-from-code.md#navigation-state-and-hooks), [actions](actions-from-islands.md)). The events stay for a plain script, `guardLeave` is documented as the preset of `navigation.onBeforeNavigate`, and `deprecated-island-events` reports an island's `listen` of an event and rewrites the swap's.
55
- - `kay check` names the unknown id of a lone `T('nope')` (`T` has no message `nope`) instead of asking for the values of a message that does not exist ([Texts](locales.md#messages-holding-markup)).
56
- - `T('intro', { name, about: text => ... })` renders a message with tags from a script or an expression, `kay check` holding its placeholders and blocks to the message as it does the `T(key="intro")` form ([Texts](locales.md#messages-holding-markup)).
57
- - `guards` on a page, a layout, an endpoint and an `api()` module takes a guard, a list or `{ load }` as well as `false`: `false` skips the guards above, a list runs after them, and a route with guards of its own is covered ([Guards](guards.md)).
58
- - `links`, `offline` and `search` of kay.config.ts are keys of `client`, with the rest of what the browser is given; `deprecated-client-keys` rewrites the old place ([Project](project.md)).
59
- - The config's keys are grouped by concern: `assets` holds `images`, `fonts`, `favicon`, `manifest` and `publicCache`, `ops` holds `observe`, `health`, `metrics` and `jobs`, and `i18n` is `{ locales, default, mode }` with `mode` one of `'prefix'`, `'always'` or `{ domains }`, so a config can no longer give `domains` with `prefixDefault`; `deprecated-config-groups` and `deprecated-i18n-keys` rewrite the old places ([Project](project.md), [Locales](locales.md)).
60
-
61
- - A secret of kay.config.ts is one shape, a string, `{ env: 'NAME' }` or `{ file: 'path' }`: `proxy: { key: { header, secret } }`, `mcp: { token }` (was `key`) and the new `ops: { metrics: { token } }`, each `true` or a secret where the environment is the default; `testSite({ config })` takes them as literals, and `deprecated-secret-keys` rewrites the old forms ([Proxies](proxy-and-security.md), [MCP](mcp.md), [Metrics](metrics.md), [Testing](testing.md)).
62
- - An `error` or `pending` line in a snippet or a child component follows the form it is rendered in while it renders, so a field row can hold its own message and busy state; they stay as the markup form of `add.form.error('title')` and `add.pending()` ([Actions](actions.md#show-that-a-form-is-posting), [snippets](templates-elements-slots-snippets.md#snippets)).
63
-
64
- Releases before 1.104.3 are in the notes of their releases, at https://git.kaynooo.fr/kaynooo/kayjs/releases.
65
-
66
- - A `.ws()` route of an `api()` module speaks one JSON protocol, rooms included: every frame is JSON both ways, so a string, number, boolean or `null` reads back typed; a frame is measured before it is parsed and the upgrade is no longer wrapped; a message that is no JSON or fails `body` is answered `{ error: { key, fields } }`, never the schema, which `socket().onRefused` reads; `rooms({ reply })` checks what a room sends, for a route whose `response` is a status map too and against the models of the app each room's route belongs to; an `api()` route's refused upgrade frees its connection place at once ([API routes](api-routes.md#api-routes), [Rooms](rooms.md)).
67
- - A refusal is one call, `ctx.deny(status, { message, errors, data })` in a guard, a page, an action and an endpoint, and `refuse(status, { ... })` throws it from anywhere; in an action it fails the post as `ctx.fail` did, which is now its deprecated spelling, as are `deny(status, 'text')` and `refuse('text', { ... })`. Helpers refuse a bad argument with a `KayError` coded `argument-invalid` ([Actions](actions.md#refused-posts), [Errors](errors-runtime.md))
68
- - Eight lints that flagged a page shipped broken are errors now, not warnings: `unreturned-fail`, `brace-in-attribute`, `signal-set-call`, `constant-signal`, `literal-tag`, `positional-key`, `unkeyed-rows` and `once-read-prop` ([Lints](lints.md), [upgrading](upgrading.md)).
3
+ What each release before 1.106 added, and the end of a newest release that was cut short (`(continued)`), newest first, each feature with where it is documented. The newer releases are in [What's new](whats-new.md); what a release breaks is in [Upgrading](upgrading.md).
4
+
5
+ ## 1.106.0 (continued)
6
+
7
+ - A kay extension takes `ui`, a module whose default export is `defineUi({ ... })`, so a package restyles components for every app listing it, under the app's own `src/ui.ts` ([component libraries](component-libraries.md)); `src/ui.ts` itself follows no import or spread.
8
+ - `input(field=...)` takes its `type` (`email`, `url`, `number`, `date`, `checkbox`, `file` with `accept`) and `autocomplete` from the schema, and `select(field=...)` with no `option` lists the values of an `s.enum`, each unless the template writes it ([Forms](actions.md#forms)).
9
+
10
+ ## 1.105.0
11
+
12
+ - kayjs-ui's `Badge` takes `color`, any CSS colour, in place of a tone ([Badge](/ui/badge#any-colour)); the new `IconTile` draws an icon, or a letter, on a rounded tile tinted in a tone or any `color`, and `Stat` and `Widget` draw their `icon` as one with `iconTile` ([IconTile](/ui/icon-tile)); an `AppSwitcher` app takes a `color` that tints its tile and icon, and an `@appIcon(app)` block replaces the icon ([AppSwitcher](/ui/app-switcher#a-colour-per-app)).
13
+ - The favicon, touch icon and manifest links, and the icons the manifest lists, end in `?v=` and a hash of the favicon source, so a CDN or browser holding the old icon fetches the new one after the source changes; the files keep their paths ([favicon](sitemap-search-fonts.md)).
14
+ - A redirect whose target has a query of its own (`'/calendar': '/?tab=calendar'`) keeps it and adds the request's params it does not name, the target's winning on a clash, in `redirects` and in the runtime set alike ([routing](routing-endpoints-and-base.md)).
15
+ - kayjs-ui's `Slider` and `AudioPlayer` fill their track in the accent up to the thumb (the danger colour when invalid, the muted when disabled): the range input carries `--range-fill`, its share from `0%` to `100%`, in its `style`, and Firefox draws `::-moz-range-progress`.
16
+ - kayjs-ui's `Slider` draws its value on the label's row, at its end, in place of a row under the track: the `value` part now comes before the `input` part in its markup.
17
+ - `deprecated-package-names` reports an old package name only where it is a specifier, a config key, a stylesheet path or a package.json entry, not a comment or a sentence in a string that mentions it ([deprecated lints](deprecated-lints.md)).
18
+ - kayjs-auth's `SignedIn` takes `require`, what `auth.guard({ require })` takes (a role, a list, a predicate), and an `@else` block for everyone who does not meet it, so `SignedOut` and `role=` are deprecated (`deprecated-auth-signed` renames `role`); `fresh: '10m'` on `auth.guard()` and `requireUser()` asks for the password or passkey again before a sensitive action, `auth.provedLately('10m')` and `reprove()` being its two halves ([The signed-in user in templates](../../auth/llms/signed-in-components.md), [Ask for the password or passkey again](../../auth/llms/sessions-and-guards.md#ask-for-the-password-or-passkey-again), [upgrading](upgrading.md)).
19
+ - kayjs-auth's groups share one set of verbs (`list`, `get`, `create`, `update`, `delete`, `revoke`) and every method sits in its group: `auth.organizations.listMembers()`, `auth.admin.require()`, `auth.captcha.required()`, `auth.proof.recent()`, `auth.tokens.hasScope()`, `auth.oauthServer.resource()`, `auth.email.signInWithCode()`; the old names work until 1.108 and `deprecated-auth-methods` rewrites them ([grouped methods](../../auth/llms/grouped-methods.md)).
20
+ - Every kayjs-auth method answers one `Result<Ok, Code, Fields>` in place of sixty `*Result` aliases, and a failure is a kay `Failure` too: an action returns `auth.password.signIn(input)` as it is, and its island call reads `{ ok: false, status, data: { code, message } }` (kayjs-auth's `passwords-and-mails` guide).
21
+ - An action's form readers are grouped under `form`, apart from its call state: `add.form.failed()`, `add.form.error('title')` and `await add.form.validate(form)`, where `add.pending()`, `add.status()` and `add.data()` stay on the action ([Reading the outcome](actions.md#reading-the-outcome)); the old names work until 1.108 and `deprecated-action-readers` rewrites them.
22
+ - A component's `slot` and `slot name` type the children and blocks a call may pass, so a component declares no `children` and no block it only renders with `slot name`, and a call passing a block with no `slot` for it is a `kay check` error; `children?: Snippet` beside a bare `slot` is rewritten by `deprecated-children-prop` ([Slots](templates-elements-slots-snippets.md#slots), [upgrading](upgrading.md)).
23
+ - kayjs-auth's `SignOutButton` and `SignInLink` replace the hand-written sign-out form and sign-in link, with no `features().prefix` in a template: `redirect`, `label`, children and a Button's `variant`, `tone`, `size` and `icon`, `SignInLink` taking `href` and `button`; `UserMenu` shows a visitor a link to sign in (`signIn={false}` leaves it out) and takes children and `redirect` ([signed-in components](../../auth/llms/signed-in-components.md)).
24
+ - A call from an island answers `{ ok: true, data }` or `{ ok: false, status, message, errors, data, error }` and never throws for a refusal, a failed handler, a network failure or a timeout, for an action and for `call()` of an API route alike, and `.orThrow()` is the throwing style: `await add(input).orThrow()` ([Calling actions from islands](actions-from-islands.md), [API from islands](api-from-islands.md), [upgrading](upgrading.md)).
25
+ - kayjs-ui's `Dialog` takes a `placement` (`center`, the default, or `right`): the side placement is the panel `SidePanel` draws, with the same parts, close guards and callbacks, and `SidePanel` and `FormDialog` are built on it, so `FormDialog` takes `placement` and `discard` too; a `src/ui.ts` restyle of a SidePanel's head, title, body or footer moves to the Dialog's ([upgrading](upgrading.md), [kayjs-ui](../../ui/llms/basics.md)).
26
+ - A top-level `const` computed from a prop or a signal follows it in the browser, with no `memo` or function written: `const last = items.length - 1` shows the new length once the parent changes `items`. `once-read-prop` now names only a `let`, a destructured `const`, one that awaits and a nested declaration; a `// kay-allow once-read-prop` keeps the first value as before ([Components](components.md), [upgrading](upgrading.md)).
27
+ - `endpoints` in kay.config.ts holds where the API and each feature are served, `{ api, openapi, mcp, health, metrics, jobs }`, every default under `/_kay` but the API's, and `openapi: { reference: { path } }` moves the reference page; the MCP endpoint is `/_kay/mcp` and the metrics `/_kay/metrics`, their old URLs answering until 1.108 ([Project](project.md), [upgrading](upgrading.md)).
28
+ - `kay lsp` serves a plain `.ts` endpoint and an `api()` module on the same shadow `kay check` types, so `params`, `query` and `guard` of a handler are typed in the editor with no generic written ([Guards](guards.md)).
29
+ - kayjs-ui controls that draw an input in a wrapper (Toggle, Checkbox, Slider, ColorInput, Combobox, DateInput) put `id`, `title` and `data-*` on the wrapper like every component, and the input takes `inputProps` (`deprecated-ui-input` rewrites the old form; [upgrading](upgrading.md)).
30
+ - kayjs-ui components with a floating panel (Menu, AppSwitcher, BellInbox, AvatarGroup, DateInput, DateRangeInput, MultiSelect, Table, Combobox) take `panelProps`, and the ones drawing their own opening button (BellInbox, AvatarGroup, DateInput, DateRangeInput, MultiSelect, Table) `triggerProps`, typed as the element's attributes; `...rest` stays on the root ([slots and links](../../ui/llms/slots-and-links.md)).
31
+ - kayjs-ui names the same things the same way: every list a component draws is `items` (`tabs`, `avatars`, `entries`, `links`, `steps`, `icons` and `slides` before, rewritten by `deprecated-ui-items`), an `infiniteList` is `items` too on Carousel, Masonry, MediaGallery, VirtualList, LoadMore and Table (`list` before), TextInput, Textarea, Select, DateInput, DateTimeInput, TimeInput, MarkdownEditor and FileDrop take `label` as their name, Tabs takes `disabled` for the whole group, TooltipHost takes `onOpenChange`, and a tooltip has one documented entry, `data-tooltip` ([blocks, links and parts](../../ui/llms/slots-and-links.md)).
32
+ - Helpers of kay, kayjs-auth, kayjs-mail, kayjs-cms and kayjs-ai throw a `KayError` with a `code` where they threw a plain `Error` (`config-invalid`, `argument-invalid`, `outside-request`, `hook-timeout` and the new `helper-failed`, its `kind` naming a mail provider timing out or refusing), the helpers that run in an island too (`route()`, `every()`, `shortcut()`, `presence()`, `local()`, `navigate()`, `persisted`, `sanitizeHtml`, kayjs-ui's refused props) do the same, and each timeout says which one it is: `StoreTimeoutError` for a database call, `RequestTimeoutError` for a request, an action call's `timeout`, kayjs-ai's call, connect and idle timeouts. See [errors raised while running](errors-runtime.md#errors-raised-while-running).
33
+ - An `await` with no `catch` and no `try` around it shows an alert in place of its block once its value rejects, instead of nothing, so `uncaught-await` is gone ([Rendering](rendering.md), [upgrading](upgrading.md)).
34
+ - `src/await-failed.kay` replaces the alert of an `await` with no `catch` for the whole app, on the server and in islands, given the `error` and, in the browser, a `retry` ([Rendering](rendering.md)).
35
+ - A component's parts are given as their own attribute, `Card(parts={{ head: 'p-6' }})`, `class` keeping strings, arrays and objects of conditions, on a component with parts too; `Card.mt-4(parts={{ ... }})` is allowed, and `deprecated-parts-class` rewrites the old `class={{ head: ... }}` ([Styles and assets](styles-and-assets.md), [upgrading](upgrading.md)).
36
+ - `unkeyed-rows` covers every component, not only islands: a `for` over rows with no `id` needs a `key` ([Templates](templates.md), [upgrading](upgrading.md)).
37
+ - A link's navigation flags are named as the options of `navigate()`: `data-scroll="keep"`, `data-transition="false"` and `data-prefetch="false"`, typed on every element, and a misspelt one such as `data-prefech` is a `kay check` error (`unknown-link-flag`); `data-keep-scroll`, `data-no-transition` and `data-no-prefetch` are rewritten by `deprecated-link-flags` ([Navigation](navigation-from-code.md#navigating-from-code), [upgrading](upgrading.md)).
69
38
 
70
39
  Releases before 1.105 are in the notes of their releases, at https://git.kaynooo.fr/kaynooo/kayjs/releases.
package/llms/whats-new.md CHANGED
@@ -2,35 +2,54 @@
2
2
 
3
3
  What each release of kay and its libraries adds, newest first, each feature with where it is documented. kay and its libraries share one version, so one section covers them all; what a release breaks is in [Upgrading](upgrading.md).
4
4
 
5
- ## 1.105.0
5
+ ## 1.107.0
6
6
 
7
- - kayjs-ui's `Badge` takes `color`, any CSS colour, in place of a tone ([Badge](/ui/badge#any-colour)); the new `IconTile` draws an icon, or a letter, on a rounded tile tinted in a tone or any `color`, and `Stat` and `Widget` draw their `icon` as one with `iconTile` ([IconTile](/ui/icon-tile)); an `AppSwitcher` app takes a `color` that tints its tile and icon, and an `@appIcon(app)` block replaces the icon ([AppSwitcher](/ui/app-switcher#a-colour-per-app)).
8
- - The favicon, touch icon and manifest links, and the icons the manifest lists, end in `?v=` and a hash of the favicon source, so a CDN or browser holding the old icon fetches the new one after the source changes; the files keep their paths ([favicon](sitemap-search-fonts.md)).
9
- - A redirect whose target has a query of its own (`'/calendar': '/?tab=calendar'`) keeps it and adds the request's params it does not name, the target's winning on a clash, in `redirects` and in the runtime set alike ([routing](routing-endpoints-and-base.md)).
10
- - kayjs-ui's `Slider` and `AudioPlayer` fill their track in the accent up to the thumb (the danger colour when invalid, the muted when disabled): the range input carries `--range-fill`, its share from `0%` to `100%`, in its `style`, and Firefox draws `::-moz-range-progress`.
11
- - kayjs-ui's `Slider` draws its value on the label's row, at its end, in place of a row under the track: the `value` part now comes before the `input` part in its markup.
12
- - `deprecated-package-names` reports an old package name only where it is a specifier, a config key, a stylesheet path or a package.json entry, not a comment or a sentence in a string that mentions it ([deprecated lints](deprecated-lints.md)).
13
- - kayjs-auth's `SignedIn` takes `require`, what `auth.guard({ require })` takes (a role, a list, a predicate), and an `@else` block for everyone who does not meet it, so `SignedOut` and `role=` are deprecated (`deprecated-auth-signed` renames `role`); `fresh: '10m'` on `auth.guard()` and `requireUser()` asks for the password or passkey again before a sensitive action, `auth.provedLately('10m')` and `reprove()` being its two halves ([The signed-in user in templates](../../auth/llms/signed-in-components.md), [Ask for the password or passkey again](../../auth/llms/sessions-and-guards.md#ask-for-the-password-or-passkey-again), [upgrading](upgrading.md)).
14
- - kayjs-auth's groups share one set of verbs (`list`, `get`, `create`, `update`, `delete`, `revoke`) and every method sits in its group: `auth.organizations.listMembers()`, `auth.admin.require()`, `auth.captcha.required()`, `auth.proof.recent()`, `auth.tokens.hasScope()`, `auth.oauthServer.resource()`, `auth.email.signInWithCode()`; the old names work until 1.108 and `deprecated-auth-methods` rewrites them ([grouped methods](../../auth/llms/grouped-methods.md)).
15
- - Every kayjs-auth method answers one `Result<Ok, Code, Fields>` in place of sixty `*Result` aliases, and a failure is a kay `Failure` too: an action returns `auth.password.signIn(input)` as it is, and its island call reads `{ ok: false, status, data: { code, message } }` (kayjs-auth's `passwords-and-mails` guide).
16
- - An action's form readers are grouped under `form`, apart from its call state: `add.form.failed()`, `add.form.error('title')` and `await add.form.validate(form)`, where `add.pending()`, `add.status()` and `add.data()` stay on the action ([Reading the outcome](actions.md#reading-the-outcome)); the old names work until 1.108 and `deprecated-action-readers` rewrites them.
17
- - A component's `slot` and `slot name` type the children and blocks a call may pass, so a component declares no `children` and no block it only renders with `slot name`, and a call passing a block with no `slot` for it is a `kay check` error; `children?: Snippet` beside a bare `slot` is rewritten by `deprecated-children-prop` ([Slots](templates-elements-slots-snippets.md#slots), [upgrading](upgrading.md)).
18
- - kayjs-auth's `SignOutButton` and `SignInLink` replace the hand-written sign-out form and sign-in link, with no `features().prefix` in a template: `redirect`, `label`, children and a Button's `variant`, `tone`, `size` and `icon`, `SignInLink` taking `href` and `button`; `UserMenu` shows a visitor a link to sign in (`signIn={false}` leaves it out) and takes children and `redirect` ([signed-in components](../../auth/llms/signed-in-components.md)).
19
- - A call from an island answers `{ ok: true, data }` or `{ ok: false, status, message, errors, data, error }` and never throws for a refusal, a failed handler, a network failure or a timeout, for an action and for `call()` of an API route alike, and `.orThrow()` is the throwing style: `await add(input).orThrow()` ([Calling actions from islands](actions-from-islands.md), [API from islands](api-from-islands.md), [upgrading](upgrading.md)).
20
- - kayjs-ui's `Dialog` takes a `placement` (`center`, the default, or `right`): the side placement is the panel `SidePanel` draws, with the same parts, close guards and callbacks, and `SidePanel` and `FormDialog` are built on it, so `FormDialog` takes `placement` and `discard` too; a `src/ui.ts` restyle of a SidePanel's head, title, body or footer moves to the Dialog's ([upgrading](upgrading.md), [kayjs-ui](../../ui/llms/basics.md)).
21
- - A top-level `const` computed from a prop or a signal follows it in the browser, with no `memo` or function written: `const last = items.length - 1` shows the new length once the parent changes `items`. `once-read-prop` now names only a `let`, a destructured `const`, one that awaits and a nested declaration; a `// kay-allow once-read-prop` keeps the first value as before ([Components](components.md), [upgrading](upgrading.md)).
22
- - `endpoints` in kay.config.ts holds where the API and each feature are served, `{ api, openapi, mcp, health, metrics, jobs }`, every default under `/_kay` but the API's, and `openapi: { reference: { path } }` moves the reference page; the MCP endpoint is `/_kay/mcp` and the metrics `/_kay/metrics`, their old URLs answering until 1.108 ([Project](project.md), [upgrading](upgrading.md)).
23
- - `kay lsp` serves a plain `.ts` endpoint and an `api()` module on the same shadow `kay check` types, so `params`, `query` and `guard` of a handler are typed in the editor with no generic written ([Guards](guards.md)).
24
- - kayjs-ui controls that draw an input in a wrapper (Toggle, Checkbox, Slider, ColorInput, Combobox, DateInput) put `id`, `title` and `data-*` on the wrapper like every component, and the input takes `inputProps` (`deprecated-ui-input` rewrites the old form; [upgrading](upgrading.md)).
25
- - kayjs-ui components with a floating panel (Menu, AppSwitcher, BellInbox, AvatarGroup, DateInput, DateRangeInput, MultiSelect, Table, Combobox) take `panelProps`, and the ones drawing their own opening button (BellInbox, AvatarGroup, DateInput, DateRangeInput, MultiSelect, Table) `triggerProps`, typed as the element's attributes; `...rest` stays on the root ([slots and links](../../ui/llms/slots-and-links.md)).
26
- - kayjs-ui names the same things the same way: every list a component draws is `items` (`tabs`, `avatars`, `entries`, `links`, `steps`, `icons` and `slides` before, rewritten by `deprecated-ui-items`), an `infiniteList` is `items` too on Carousel, Masonry, MediaGallery, VirtualList, LoadMore and Table (`list` before), TextInput, Textarea, Select, DateInput, DateTimeInput, TimeInput, MarkdownEditor and FileDrop take `label` as their name, Tabs takes `disabled` for the whole group, TooltipHost takes `onOpenChange`, and a tooltip has one documented entry, `data-tooltip` ([blocks, links and parts](../../ui/llms/slots-and-links.md)).
27
- - Helpers of kay, kayjs-auth, kayjs-mail, kayjs-cms and kayjs-ai throw a `KayError` with a `code` where they threw a plain `Error` (`config-invalid`, `argument-invalid`, `outside-request`, `hook-timeout` and the new `helper-failed`, its `kind` naming a mail provider timing out or refusing), the helpers that run in an island too (`route()`, `every()`, `shortcut()`, `presence()`, `local()`, `navigate()`, `persisted`, `sanitizeHtml`, kayjs-ui's refused props) do the same, and each timeout says which one it is: `StoreTimeoutError` for a database call, `RequestTimeoutError` for a request, an action call's `timeout`, kayjs-ai's call, connect and idle timeouts. See [errors raised while running](errors-runtime.md#errors-raised-while-running).
28
- - An `await` with no `catch` and no `try` around it shows an alert in place of its block once its value rejects, instead of nothing, so `uncaught-await` is gone ([Rendering](rendering.md), [upgrading](upgrading.md)).
29
- - `src/await-failed.kay` replaces the alert of an `await` with no `catch` for the whole app, on the server and in islands, given the `error` and, in the browser, a `retry` ([Rendering](rendering.md)).
30
- - A component's parts are given as their own attribute, `Card(parts={{ head: 'p-6' }})`, `class` keeping strings, arrays and objects of conditions, on a component with parts too; `Card.mt-4(parts={{ ... }})` is allowed, and `deprecated-parts-class` rewrites the old `class={{ head: ... }}` ([Styles and assets](styles-and-assets.md), [upgrading](upgrading.md)).
31
- - `unkeyed-rows` covers every component, not only islands: a `for` over rows with no `id` needs a `key` ([Templates](templates.md), [upgrading](upgrading.md)).
32
- - A link's navigation flags are named as the options of `navigate()`: `data-scroll="keep"`, `data-transition="false"` and `data-prefetch="false"`, typed on every element, and a misspelt one such as `data-prefech` is a `kay check` error (`unknown-link-flag`); `data-keep-scroll`, `data-no-transition` and `data-no-prefetch` are rewritten by `deprecated-link-flags` ([Navigation](navigation-from-code.md#navigating-from-code), [upgrading](upgrading.md)).
7
+ - `--- script` as a file's first fence is a compile error naming `---`, and the `deprecated-script-fence` lint is gone ([components](components.md)).
8
+ - `kay new` pins kay with `^` from 2.0.0, when a breaking change is a major, and with `~` through 1.x, where a minor may break; the semver policy is stated in [Upgrading](upgrading.md) and the install pages ([project](project.md))
9
+ - `kay new` pins kay with `~` through 1.x and with `^` from 2.0.0, when a breaking change becomes a major ([Upgrading](upgrading.md))
10
+ - A component an island draws only where it may not render at first paint (inside an `if`, a `match` case, `@failed`, or the body of a closed `Dialog` or `FormDialog`) loads when that branch first draws, with nothing to declare: the page preloads what the server drew, a visitor reaching for the island loads the rest ahead, and a failed chunk is retried and reported; the code that posts an action call loads with its first call, retried after 1 s and 3 s when the load fails ([islands](islands.md#components-that-load-when-they-first-draw)).
11
+ - An island whose closed forms and dialogs hold words that are also component names loads less: a name in a string or a comment no longer keeps a component eager, and `Form`, `FormDialog` and `SaveForm` load their sending code on the first send. An island with a table, a closed form dialog and a select in it sheds 4.6 KB gzip of eager JS ([islands](islands.md))
12
+ - `action({ input, ...options }, handler)`: an action takes its options first with its input in them, as an API route does; the old argument order works until 2.0 and `kay upgrade` rewrites it ([actions](actions.md))
13
+ - One `validate(schema, value, { source })` reads every input of an app, an action's, an API route's, a socket's and `defineEnv`'s, and refuses with `{ errors: [{ path, key, params, message }], status: 422 }` worded in the request's locale; a JSON body is never coerced, and a Standard Schema validator (Zod, ArkType) is accepted where a schema is ([schemas](schemas.md))
14
+ - An island validates with the same schema: `validate(schema, value, { source })` from `kay` is the server's `validate` in the browser (JSON Schema built by the browser's `s`, a Standard Schema validator called as it is), its code a chunk the first call loads ([Schemas](schemas.md#schemas)).
15
+ - `kay check` names a Standard Schema validator with no `~standard.jsonSchema` (`schema-without-json-schema`) where an action's `input` or an API route's `body`, `query`, `params`, `headers` or `cookie` takes it, in `.ts` modules and `.kay` fences ([Schemas](schemas.md#schemas)).
16
+ - kayjs-ui's `Table` draws its failure row's retry as a plain button with a `retry` part, so an island holding a plain Table ships 6 KB less (the `Button`, its busy state and the icon set stay out unless the page uses them) ([restyle](https://git.kaynooo.fr/kaynooo/kayjs/src/branch/main/packages/ui/llms/restyle.md)).
17
+
18
+ ## 1.106.0
19
+
20
+ - kayjs-ui's `BarChart`, `LineChart` and `ScatterChart` take `goals`, a dashed rule across the value axis at each `value` with its `title` on it and read by screen readers, such as a pass mark ([BarChart](/ui/bar-chart#goals-and-a-fixed-scale)); `BarChart` takes `max`, fixing the top of its value axis
21
+ - A page from `site.visit` and a component from `mountComponent` have `a11y()`, which runs axe-core without a browser, and `matchHtml(name)`, which compares normalised HTML (build hashes, nonces and hydration markers left out) with a baseline file beside the test ([accessibility and HTML snapshots](testing-browser.md#check-accessibility-and-snapshot-html-without-a-browser)).
22
+ - kayjs-ui: one `Placement` (`top`, `bottom`, `left`, `right`, each with `-start` or `-end`) types the `placement` of Popover, Menu, Bell, MultiSelect, HoverCard and Tooltip, `PopoverPlacement` and `HoverCardPlacement` staying as aliases; HoverCard takes `open`, `openDelay`, `closeDelay` and a `@trigger` block, and Notice reports its close button as `onOpenChange({ open: false })`, `onDismiss` staying ([popovers and cards](../../ui/llms/basics.md))
23
+ - kayjs-ai's `Chat` takes `speak`, an action answering `speakData(text)`, and reads each finished reply aloud: a newer reply, a send or a new conversation stops it, a browser refusing to play unasked leaves a play button on the turn, a failed reading shows a notice, and `autoplay`, `speaking`, `onSpeak`, `onSpeakEnd` and `onSpeakFail` let the app steer it ([Reading replies aloud](/llms/kayjs-ai-speech-and-embeddings))
24
+ - kayjs-ui RadioGroup and ChipGroup keep their state in a URL param with `param` and `paramDefault`, as Segmented and Select do, so every control holding a query param spells it one way; a ChipGroup sets the param once per picked option, and `navigate.query()` and `withQuery()` take a list for that ([forms](../../ui/llms/forms.md#radiogroup), [navigating](navigation-from-code.md)).
25
+ - A barrel file with `export * from` a module `mountComponent` shares with the test keeps ESM's rules: a name the barrel exports itself wins over the star's, a name two stars export is left out, and an export named with `$` keeps its name ([testing](testing.md)).
26
+ - In an island, an `error` or `pending` line in a snippet declared outside the form, or inside an `await` or an `if` shown later, follows the form the snippet is called in, as it does on a static page ([snippets](templates-elements-slots-snippets.md#snippets)).
27
+ - kayjs-ui's LineChart takes a `@tooltip(mark)` block that replaces its tooltip body and `notes` on a series, one message per label, added to the tooltip and the slider's reading ([LineChart](/ui/line-chart#the-tooltip)); a chart page without the block grows by about 120 B gzipped.
28
+ - A kayjs-ui Table island whose call sites all write `sortable={false}` leaves its sorting code out, and one that writes no `header`, `cell` or `noMatch` block leaves those out too (a plain Table drops about 4 KB minified); a BarChart leaves out `stacked`, `xLabels`, `empty`, `emptyLabel`, `active`, `onActive` and `onActiveChange` that no call site writes ([Table](../../ui/llms/table.md)).
29
+ - `s` is kay's own schema builder: lowercase builders with short options (`s.string({ min, max })`, `s.email()`, `s.int()`, `s.enum(values | record)`, `s.list()`, `s.object()`, `s.file({ maxSize: '5mb' })`), the same field options on every one (`optional`, `default`, `error`, `label`, `description`, `example`), strings and lists bounded by default, and a plain record of fields taken as the object schema by `action` and `defineEnv`; the PascalCase builders and `s.Optional` are deprecated (`deprecated-schema-builders`), `s.typebox` is gone ([Schemas](schemas.md#schemas)).
30
+ - kay and the apps `kay new` writes lint with `@kaynooo/eslint` 8, which installs about 30 MB less as it no longer pulls in the formatters ([upgrading](upgrading.md)).
31
+ - kayjs-ui's `infiniteList` starts over only when the first rows or what an `input` function returns change, compared by value: the same rows handed again, a new array of them too, keep the pages loaded ([LoadMore](/ui/load-more)).
32
+ - kayjs-ai's `Chat` takes `toolIcons`, an icon per tool by its name, drawn before the tool's label in the folded line and before its name in an opened call, in the `toolIcon` part; a tool without one keeps its row ([Chat](../../ai/llms/chat.md))
33
+ - Keys typed into a field during a query `navigate()` reach its island once it has hydrated, so an island that writes the value it was given back into the field, as kayjs-ui's `TextInput` does, no longer overwrites them ([navigation](navigation.md)).
34
+ - kayjs-ui's `TreeView` takes a `@row(node)` block that draws a row's icon and label, such as a tinted tile and a name, the row keeping its chevron, link, keys and roving focus, and `trailingShown` keeps the `@actions` block visible on every row, for an age or a count ([TreeView](/ui/tree-view#your-own-row)).
35
+ - kayjs-ui's `RelationGraph` draws an item and its neighbours on a ring, joined by lines, each neighbour a link, a button or a muted gap, in the keyboard order of `items`, which can be a list, a promise or a function; `@neighbour` and `@middle` replace the text ([RelationGraph](/ui/relation-graph)).
36
+ - kayjs-ui's `Sparkline` takes `variant="line"` or `"area"`: a line through the values, with a tint under it for an area, in `tone` or any `color`, a `null` splitting it into runs; `hints`, `onSelect`, `href` and the keyboard work as on bars, and `plot`, `line`, `area` and `point` are its new parts ([Sparkline](/ui/sparkline#a-line-or-an-area)).
37
+ - `defineConfig` takes `{ env }` and `{ file }` where an option takes a secret (`mcp.token`, `metrics.token`), which 1.105.0 refused as an unknown option, and still refuses a mistyped key inside them ([MCP](mcp.md)).
38
+ - A page's `--- server` fence reads a `persisted.cookie()` signal by calling it: the value is the request's, decoded and checked against `values` as the render does, so an app no longer reads `ctx.cookies` and decodes kay's format itself ([shared and persisted state](islands-state-to-ids.md)).
39
+ - kayjs-ui's `starfield` scatters about 270 stars over the viewport with CSS `random()` where the browser supports it, tiles everywhere else; a custom `.starfield::before` tile list goes in `@supports not (top: random(0px, 1px))` ([starfield](/libraries/kayjs-ui)).
40
+ - kayjs-ui's `AudioPlayer` takes `@lead(chapter, index)` before each chapter's button, a `subtitle` on a chapter, `@status(chapter, index)` for the chapter playing in the bar after the time, and `peaks` on a chapter, drawn as bars split by chapter in place of the seek groove ([AudioPlayer](/ui/audio-player#a-waveform)).
41
+ - `kay check --fix` rewrites what the 1.105 types refuse in an app still on the old forms: a function handed by name to a library component's callback (`deprecated-callback-handler`), an island call read as its data (`deprecated-call-result`, `.orThrow()` after the call), the `mcpKey` and `proxyKey` options of `testSite()`, and the `fonts`, `favicon` and `observe` keys in the `config` of an extension, which work until 1.108 ([upgrading](upgrading.md)).
42
+ - `kay check --fix` rewrites an old package name only where it is a specifier, a `require()` or `import()` argument, a config key, a stylesheet `@import` or `@plugin` path or a package.json entry, no longer a string of data that names one; and `deprecated-link-flags` reaches the app's test files, rewriting `[data-keep-scroll]` selectors to `[data-scroll=keep]` and reporting an attribute read by name ([deprecated lints](deprecated-lints.md)).
43
+ - `ctx.deny(status, { message })` in an action fails the post as `{ data }` does, the form showing the message and a call throwing an `ActionError` carrying it, in place of a bare status; the `deprecated-ctx-fail` fixer writes a text as `message` ([Refused posts](actions-refused-fields.md#refused-posts))
44
+ - The former `/mcp` answers the MCP endpoint in place until 2.0 for an app that did not set `endpoints.mcp`, where 1.105 sent it to `/_kay/mcp` with a 308 an MCP client does not follow; a page or route of the app at `/mcp` keeps it ([MCP](mcp.md), [upgrading](upgrading.md)).
45
+ - The installed app's icon badge shows the unread count: kayjs-ui's `Bell` sets it (`appBadge={false}` opts out) and a push from `notify()` carries the count for the worker to set (`notify(..., { badge: false })` opts out, `sendPush` takes `badge`) ([notifications](notifications.md)).
46
+ - `assets.manifest.shareTarget` lists the installed app in a device's share sheet, posting the shared title, text, link and files to an action ([web manifest](sitemap-search-fonts.md#favicon-and-web-manifest)).
47
+ - kayjs-ui's `Badge` takes `dot`, a small dot in its colour before the label ([Badge](/ui/badge#a-dot)).
48
+ - kayjs-ui's `TabNav` takes `variant="segmented"`, its links drawn as Segmented's tray of keys, still links with `aria-current` ([TabNav](/ui/tab-nav#segmented)).
49
+ - `markdownHtml` links a bare URL or address at the same place on the server and in an island, `[[https://x.y/?a=1&b=2]]` included, so a page hydrates over the markup it was drawn with ([Markdown in an island](/guides/content#markdown-in-an-island)).
50
+ - `markdownHtml` keeps a fence's `language-*` class on its `code` (`sanitizeHtml` with `attributes: { code: ['class'] }` keeps only that class), and takes `{ inline }`, custom inline syntax such as `[[name]]` links drawn the same on the server and in an island, every result escaped or sanitized ([Render Markdown a user writes](/guides/content)).
51
+ - kayjs-ui's `MarkdownEditor` takes `view` (`edit`, `split` or `preview`) and `onViewChange`, so a note can show the preview alone, with the field kept in the form and no toolbar, or the field alone ([MarkdownEditor](/ui/markdown-editor)).
33
52
 
34
53
  The rest of this release is in [What's new, older releases](whats-new-archive.md).
35
54
 
36
- Releases before 1.105 are in [What's new, older releases](whats-new-archive.md).
55
+ Releases before 1.106 are in [What's new, older releases](whats-new-archive.md).
package/llms.txt CHANGED
@@ -120,7 +120,7 @@ To build a site, read [Build a site](llms/site.md) first, then the topics below;
120
120
  - [Upgrading to 1.105, config](llms/upgrading-1-105-config.md): config and hooks
121
121
  - [Upgrading, older](llms/upgrading-archive.md): the minors before 1.105
122
122
  - [What's new](llms/whats-new.md): what each recent release adds
123
- - [What's new, older](llms/whats-new-archive.md): the releases before 1.105
123
+ - [What's new, older](llms/whats-new-archive.md): the releases before 1.106
124
124
  - [Privacy and personal data](llms/privacy.md): what kay keeps, erasing a person
125
125
  - [Events and names](llms/events.md): DOM events, cookie and key rules
126
126
  - [Notifications](llms/notifications.md): `notify()`, the Bell
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@kayjs/kay",
3
3
  "type": "module",
4
- "version": "1.105.0",
4
+ "version": "1.107.0",
5
5
  "description": "A Bun web framework: one .kay file per component, pages rendered to plain HTML on the server, interactive islands in the browser",
6
6
  "author": "Kaynooo <https://github.com/Kayno0o>",
7
7
  "license": "MIT",
@@ -28,6 +28,11 @@
28
28
  "types": "./types/runtime/schema.d.ts",
29
29
  "browser": "./src/runtime/schema.client.ts",
30
30
  "default": "./src/runtime/schema.ts"
31
+ },
32
+ "#validate": {
33
+ "types": "./types/server/validate.d.ts",
34
+ "browser": "./src/runtime/validate.client.ts",
35
+ "default": "./src/server/validate.ts"
31
36
  }
32
37
  },
33
38
  "exports": {
@@ -117,6 +122,10 @@
117
122
  "types": "./types/runtime/dom-await.d.ts",
118
123
  "default": "./src/runtime/dom-await.ts"
119
124
  },
125
+ "./dom-lazy": {
126
+ "types": "./types/runtime/dom-lazy.d.ts",
127
+ "default": "./src/runtime/dom-lazy.ts"
128
+ },
120
129
  "./dom-try": {
121
130
  "types": "./types/runtime/dom-try.d.ts",
122
131
  "default": "./src/runtime/dom-try.ts"
@@ -260,6 +269,7 @@
260
269
  "@kaynooo/pg-orm": "^7.0.0 || ^8.0.0",
261
270
  "@types/bun": "^1.4.4",
262
271
  "axe-core": "^4.14.0",
272
+ "happy-dom": "^20.14.6 || ^21.0.3",
263
273
  "typescript7": "npm:typescript@^7.0.2"
264
274
  },
265
275
  "peerDependenciesMeta": {
@@ -272,6 +282,9 @@
272
282
  "axe-core": {
273
283
  "optional": true
274
284
  },
285
+ "happy-dom": {
286
+ "optional": true
287
+ },
275
288
  "typescript7": {
276
289
  "optional": true
277
290
  }
@@ -287,20 +300,20 @@
287
300
  "oxc-parser": "^0.155.0"
288
301
  },
289
302
  "devDependencies": {
290
- "@babel/parser": "^7.29.7",
291
- "@babel/traverse": "^7.29.10",
292
- "@babel/types": "^7.29.11",
303
+ "@babel/parser": "^8.1.0",
304
+ "@babel/traverse": "^8.1.0",
305
+ "@babel/types": "^8.1.0",
293
306
  "@fontsource-variable/jetbrains-mono": "5.3.0",
294
307
  "@fontsource-variable/space-grotesk": "5.3.0",
295
308
  "@fontsource/inter": "^5.3.0",
296
309
  "@happy-dom/global-registrator": "^21.0.4",
297
310
  "@iconify-json/tabler": "^1.2.42",
298
- "@kayjs/ai": "1.105.0",
299
- "@kayjs/auth": "1.105.0",
300
- "@kayjs/cms": "1.105.0",
301
- "@kayjs/mail": "1.105.0",
302
- "@kayjs/ui": "1.105.0",
303
- "@kaynooo/eslint": "^7.1.6",
311
+ "@kayjs/ai": "1.107.0",
312
+ "@kayjs/auth": "1.107.0",
313
+ "@kayjs/cms": "1.107.0",
314
+ "@kayjs/mail": "1.107.0",
315
+ "@kayjs/ui": "1.107.0",
316
+ "@kaynooo/eslint": "^8.0.3",
304
317
  "@kaynooo/pg-orm": "^8.1.4",
305
318
  "@oxc-parser/binding-wasm32-wasip1": "0.155.0",
306
319
  "@types/babel__traverse": "^7.28.0",
@@ -310,7 +323,7 @@
310
323
  "kay": "link:.",
311
324
  "mitata": "1.0.34",
312
325
  "playwright-core": "1.64.1",
313
- "shiki": "^4.5.0",
326
+ "shiki": "^4.6.0",
314
327
  "tailwindcss": "^4.3.3",
315
328
  "typescript": "^6.0.3",
316
329
  "typescript7": "npm:typescript@^7.0.2"
package/src/add.ts CHANGED
@@ -498,7 +498,7 @@ async function loadLibrary(dir: string, name: string, project: LibraryProject, f
498
498
  const feature = typeof module.default === 'function' ? module.default(project) : module.default
499
499
 
500
500
  if (typeof feature?.description !== 'string')
501
- throw new Error(`kay add: ${LIBRARIES[name]![0]!}/add does not export a feature as its default`)
501
+ throw new TypeError(`kay add: ${LIBRARIES[name]![0]!}/add does not export a feature as its default`)
502
502
 
503
503
  return feature
504
504
  }
@@ -326,6 +326,6 @@ export function isUtility(design: Design, word: string): boolean {
326
326
  const RUNTIME_MERGE = /\bclass\s*=\s*(?!["'])|\.\.\.[\w$({[]|\bparts?\b|\brecipe\b/
327
327
 
328
328
  // Whether a module may hand the browser classes to merge: a `.kay` file with a class expression, a spread, a part or a recipe, or `src/ui.ts`, which writes parts.
329
- export function mergesAtRuntime(file: string): boolean {
330
- return (file.endsWith('.kay') || file.endsWith(UI_FILE)) && RUNTIME_MERGE.test(readSource(file).text)
329
+ export function mergesAtRuntime(file: string, uiFiles: readonly string[] = []): boolean {
330
+ return (file.endsWith('.kay') || file.endsWith(UI_FILE) || uiFiles.includes(file)) && RUNTIME_MERGE.test(readSource(file).text)
331
331
  }