@kayjs/kay 1.107.0 → 1.109.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 (576) hide show
  1. package/dist/eslint.js +1875 -3815
  2. package/editors/zed/extension.toml +2 -2
  3. package/llms/action-protection.md +1 -1
  4. package/llms/actions-from-islands.md +5 -5
  5. package/llms/actions-refused-fields.md +4 -4
  6. package/llms/api-from-islands.md +6 -6
  7. package/llms/browser-only.md +2 -2
  8. package/llms/cdn-caching.md +1 -1
  9. package/llms/checks.md +1 -1
  10. package/llms/code-lints.md +1 -2
  11. package/llms/component-libraries.md +1 -1
  12. package/llms/component-library-conventions.md +1 -1
  13. package/llms/components.md +4 -4
  14. package/llms/deprecated-lints.md +1 -7
  15. package/llms/effects.md +1 -1
  16. package/llms/errors.md +2 -2
  17. package/llms/events.md +1 -1
  18. package/llms/guards.md +1 -1
  19. package/llms/head.md +1 -1
  20. package/llms/hooks.md +2 -2
  21. package/llms/images.md +1 -1
  22. package/llms/island-and-form-lints.md +2 -1
  23. package/llms/island-sources.md +1 -1
  24. package/llms/islands-state-to-ids.md +2 -2
  25. package/llms/islands.md +5 -3
  26. package/llms/lints.md +1 -1
  27. package/llms/live-values.md +3 -3
  28. package/llms/local-collections.md +1 -1
  29. package/llms/locales.md +1 -1
  30. package/llms/mcp.md +2 -2
  31. package/llms/metrics.md +1 -1
  32. package/llms/navigation-from-code.md +6 -6
  33. package/llms/prerendering.md +1 -0
  34. package/llms/production.md +2 -2
  35. package/llms/project-new-and-add.md +1 -1
  36. package/llms/project.md +4 -4
  37. package/llms/proxy-and-security.md +1 -1
  38. package/llms/queues.md +1 -1
  39. package/llms/rate-limits.md +4 -4
  40. package/llms/rendering.md +1 -1
  41. package/llms/server-islands.md +2 -2
  42. package/llms/server.md +1 -1
  43. package/llms/stores.md +1 -1
  44. package/llms/styles-and-assets.md +1 -1
  45. package/llms/testing-mount.md +49 -0
  46. package/llms/testing.md +4 -45
  47. package/llms/upgrading-1-105-config.md +13 -13
  48. package/llms/upgrading-archive.md +42 -82
  49. package/llms/upgrading.md +92 -58
  50. package/llms/whats-new-archive.md +36 -1
  51. package/llms/whats-new.md +18 -39
  52. package/llms.txt +6 -7
  53. package/package.json +6 -10
  54. package/src/build/client.ts +7 -6
  55. package/src/build/icon-slots.ts +140 -0
  56. package/src/build/libraries.ts +24 -2
  57. package/src/build/plugin.ts +10 -0
  58. package/src/build/route-sizes.ts +2 -3
  59. package/src/build/runtime-chunk.ts +2 -2
  60. package/src/build/source-files.ts +8 -3
  61. package/src/build/variants.ts +90 -1
  62. package/src/check/browser-global-reads.ts +2 -2
  63. package/src/check/config-objects.ts +1 -1
  64. package/src/check/diagnose.ts +0 -22
  65. package/src/check/export-homes.ts +1 -1
  66. package/src/check/guards.ts +3 -3
  67. package/src/check/index.ts +2 -7
  68. package/src/check/moved-keys.ts +1 -1
  69. package/src/check/project.ts +4 -9
  70. package/src/check/renamed-packages.ts +3 -63
  71. package/src/check/shadow-types.ts +4 -104
  72. package/src/commands/check.ts +2 -2
  73. package/src/commands/env.ts +25 -3
  74. package/src/compiler/ast.ts +18 -16
  75. package/src/compiler/browser.ts +2 -14
  76. package/src/compiler/class-items.ts +16 -0
  77. package/src/compiler/codegen.ts +8 -8
  78. package/src/compiler/dead-code.ts +22 -0
  79. package/src/compiler/deprecated-library.ts +0 -12
  80. package/src/compiler/deprecated-lints.ts +4 -505
  81. package/src/compiler/deprecated-ui-props.ts +5 -5
  82. package/src/compiler/dom-property.ts +23 -0
  83. package/src/compiler/dom.ts +15 -15
  84. package/src/compiler/errors.ts +2 -2
  85. package/src/compiler/fence-checks.ts +2 -121
  86. package/src/compiler/hand-parts.ts +55 -0
  87. package/src/compiler/helper-imports.ts +2 -2
  88. package/src/compiler/image-attributes.ts +1 -3
  89. package/src/compiler/index.ts +20 -21
  90. package/src/compiler/island-arguments.ts +8 -95
  91. package/src/compiler/island-cause.ts +7 -7
  92. package/src/compiler/island-declaration.ts +2 -8
  93. package/src/compiler/island-lints.ts +12 -0
  94. package/src/compiler/island-marker.ts +3 -3
  95. package/src/compiler/island-problems.ts +25 -0
  96. package/src/compiler/jsx-class.ts +1 -25
  97. package/src/compiler/jsx.ts +2 -2
  98. package/src/compiler/kay-exports.ts +0 -2
  99. package/src/compiler/link-flags.ts +9 -38
  100. package/src/compiler/lints.ts +7 -14
  101. package/src/compiler/markup.ts +23 -26
  102. package/src/compiler/module-signals.ts +2 -2
  103. package/src/compiler/names.ts +1 -1
  104. package/src/compiler/page-settings.ts +11 -0
  105. package/src/compiler/parser.ts +6 -8
  106. package/src/compiler/plan.ts +1 -3
  107. package/src/compiler/rewrite.ts +3 -18
  108. package/src/compiler/script-server.ts +8 -3
  109. package/src/compiler/validate.ts +3 -8
  110. package/src/config-loader.ts +14 -4
  111. package/src/config-resolve.ts +18 -142
  112. package/src/config-shape.ts +44 -34
  113. package/src/config.ts +10 -114
  114. package/src/dev/preload.ts +4 -1
  115. package/src/lsp/server.ts +4 -0
  116. package/src/migrate/markup.ts +4 -1
  117. package/src/package-names.ts +1 -1
  118. package/src/runtime/action-call.ts +39 -335
  119. package/src/runtime/action-encode.ts +26 -0
  120. package/src/runtime/action-error.ts +3 -11
  121. package/src/runtime/action-protection.ts +2 -2
  122. package/src/runtime/action-run.ts +332 -0
  123. package/src/runtime/action-shared.ts +14 -37
  124. package/src/runtime/action-stream.ts +0 -1
  125. package/src/runtime/action.ts +1 -1
  126. package/src/runtime/call-result.ts +2 -10
  127. package/src/runtime/checks.ts +11 -11
  128. package/src/runtime/client.ts +2 -2
  129. package/src/runtime/core.ts +5 -23
  130. package/src/runtime/dom.ts +1 -1
  131. package/src/runtime/html.ts +1 -1
  132. package/src/runtime/i18n.client.ts +1 -4
  133. package/src/runtime/i18n.server.ts +1 -4
  134. package/src/runtime/i18n.ts +3 -3
  135. package/src/runtime/index.ts +2 -2
  136. package/src/runtime/island.server.ts +18 -5
  137. package/src/runtime/live-resource.server.ts +0 -1
  138. package/src/runtime/live-value.server.ts +2 -2
  139. package/src/runtime/live-value.shared.ts +7 -20
  140. package/src/runtime/live.ts +1 -12
  141. package/src/runtime/local-types.ts +1 -11
  142. package/src/runtime/local.ts +4 -14
  143. package/src/runtime/navigate-api.ts +2 -5
  144. package/src/runtime/navigation-state.ts +0 -12
  145. package/src/runtime/page-swap.ts +6 -6
  146. package/src/runtime/persist.ts +11 -3
  147. package/src/runtime/persisted.ts +4 -30
  148. package/src/runtime/presence.ts +6 -7
  149. package/src/runtime/query-param.ts +20 -12
  150. package/src/runtime/reactive.ts +3 -1
  151. package/src/runtime/refuse.ts +3 -17
  152. package/src/runtime/store-base.ts +4 -6
  153. package/src/runtime/swap-fetch.ts +1 -1
  154. package/src/runtime/values.ts +40 -23
  155. package/src/runtime/with-query.ts +9 -0
  156. package/src/server/action-hooks.ts +8 -8
  157. package/src/server/actions.ts +13 -14
  158. package/src/server/api-modules.ts +2 -3
  159. package/src/server/app-stages.ts +15 -33
  160. package/src/server/app.ts +10 -5
  161. package/src/server/auth-mails.ts +0 -2
  162. package/src/server/env-state.ts +40 -10
  163. package/src/server/flash.ts +1 -1
  164. package/src/server/guard-requirement.ts +4 -4
  165. package/src/server/image.ts +2 -2
  166. package/src/server/index.ts +0 -2
  167. package/src/server/job-context.ts +3 -3
  168. package/src/server/jobs-page.ts +1 -1
  169. package/src/server/jobs.ts +5 -9
  170. package/src/server/kept-exports.ts +0 -2
  171. package/src/server/kv.ts +11 -14
  172. package/src/server/library.ts +1 -3
  173. package/src/server/live.ts +2 -2
  174. package/src/server/mcp.ts +3 -9
  175. package/src/server/metrics.ts +2 -4
  176. package/src/server/page-settings.ts +10 -19
  177. package/src/server/prerender.ts +19 -2
  178. package/src/server/protection.ts +15 -18
  179. package/src/server/queue.ts +3 -6
  180. package/src/server/rate-limit.ts +0 -3
  181. package/src/server/render-document.ts +1 -1
  182. package/src/server/routes.ts +7 -3
  183. package/src/server/scope.ts +3 -2
  184. package/src/server/session.ts +5 -6
  185. package/src/server/setup.ts +1 -1
  186. package/src/server/signals.ts +17 -7
  187. package/src/server/signed.ts +1 -3
  188. package/src/server/source.ts +20 -4
  189. package/src/server/speculation.ts +1 -1
  190. package/src/server/storage.ts +3 -8
  191. package/src/server/validate.ts +1 -1
  192. package/src/server/vitals.ts +1 -3
  193. package/src/server/work-scope.ts +2 -4
  194. package/src/server/work.ts +1 -1
  195. package/src/server/workflow.ts +1 -1
  196. package/src/test/index.ts +2 -1
  197. package/src/test/site-actions.ts +16 -6
  198. package/src/test/site-keys.ts +10 -15
  199. package/src/test/site-socket.ts +1 -2
  200. package/src/test/site-types.ts +0 -8
  201. package/types/build/client.d.ts +1 -1
  202. package/types/build/client.d.ts.map +1 -1
  203. package/types/build/icon-slots.d.ts +7 -0
  204. package/types/build/icon-slots.d.ts.map +1 -0
  205. package/types/build/libraries.d.ts +2 -0
  206. package/types/build/libraries.d.ts.map +1 -1
  207. package/types/build/plugin.d.ts +1 -0
  208. package/types/build/plugin.d.ts.map +1 -1
  209. package/types/build/route-sizes.d.ts.map +1 -1
  210. package/types/build/source-files.d.ts.map +1 -1
  211. package/types/build/variants.d.ts.map +1 -1
  212. package/types/check/diagnose.d.ts.map +1 -1
  213. package/types/check/index.d.ts +1 -2
  214. package/types/check/index.d.ts.map +1 -1
  215. package/types/check/project.d.ts.map +1 -1
  216. package/types/check/renamed-packages.d.ts +0 -3
  217. package/types/check/renamed-packages.d.ts.map +1 -1
  218. package/types/check/shadow-types.d.ts.map +1 -1
  219. package/types/commands/env.d.ts.map +1 -1
  220. package/types/compiler/ast.d.ts +1 -2
  221. package/types/compiler/ast.d.ts.map +1 -1
  222. package/types/compiler/browser.d.ts.map +1 -1
  223. package/types/compiler/class-items.d.ts +7 -0
  224. package/types/compiler/class-items.d.ts.map +1 -0
  225. package/types/compiler/dead-code.d.ts +9 -0
  226. package/types/compiler/dead-code.d.ts.map +1 -0
  227. package/types/compiler/deprecated-library.d.ts.map +1 -1
  228. package/types/compiler/deprecated-lints.d.ts +0 -560
  229. package/types/compiler/deprecated-lints.d.ts.map +1 -1
  230. package/types/compiler/deprecated-ui-props.d.ts +1 -8
  231. package/types/compiler/deprecated-ui-props.d.ts.map +1 -1
  232. package/types/compiler/dom-property.d.ts +9 -0
  233. package/types/compiler/dom-property.d.ts.map +1 -0
  234. package/types/compiler/dom.d.ts +1 -0
  235. package/types/compiler/dom.d.ts.map +1 -1
  236. package/types/compiler/errors.d.ts +2 -2
  237. package/types/compiler/errors.d.ts.map +1 -1
  238. package/types/compiler/fence-checks.d.ts +0 -1
  239. package/types/compiler/fence-checks.d.ts.map +1 -1
  240. package/types/compiler/hand-parts.d.ts +7 -0
  241. package/types/compiler/hand-parts.d.ts.map +1 -0
  242. package/types/compiler/image-attributes.d.ts +0 -1
  243. package/types/compiler/image-attributes.d.ts.map +1 -1
  244. package/types/compiler/index.d.ts.map +1 -1
  245. package/types/compiler/island-arguments.d.ts +2 -11
  246. package/types/compiler/island-arguments.d.ts.map +1 -1
  247. package/types/compiler/island-cause.d.ts +1 -1
  248. package/types/compiler/island-cause.d.ts.map +1 -1
  249. package/types/compiler/island-declaration.d.ts +1 -3
  250. package/types/compiler/island-declaration.d.ts.map +1 -1
  251. package/types/compiler/island-lints.d.ts +10 -0
  252. package/types/compiler/island-lints.d.ts.map +1 -0
  253. package/types/compiler/island-problems.d.ts +7 -0
  254. package/types/compiler/island-problems.d.ts.map +1 -0
  255. package/types/compiler/jsx-class.d.ts +1 -2
  256. package/types/compiler/jsx-class.d.ts.map +1 -1
  257. package/types/compiler/kay-exports.d.ts.map +1 -1
  258. package/types/compiler/link-flags.d.ts +0 -6
  259. package/types/compiler/link-flags.d.ts.map +1 -1
  260. package/types/compiler/lints.d.ts +11 -572
  261. package/types/compiler/lints.d.ts.map +1 -1
  262. package/types/compiler/markup.d.ts +1 -1
  263. package/types/compiler/markup.d.ts.map +1 -1
  264. package/types/compiler/module-signals.d.ts.map +1 -1
  265. package/types/compiler/names.d.ts.map +1 -1
  266. package/types/compiler/page-settings.d.ts +4 -0
  267. package/types/compiler/page-settings.d.ts.map +1 -1
  268. package/types/compiler/parser.d.ts.map +1 -1
  269. package/types/compiler/plan.d.ts.map +1 -1
  270. package/types/compiler/script-server.d.ts.map +1 -1
  271. package/types/compiler/validate.d.ts.map +1 -1
  272. package/types/config-loader.d.ts.map +1 -1
  273. package/types/config-resolve.d.ts.map +1 -1
  274. package/types/config-shape.d.ts +1 -1
  275. package/types/config-shape.d.ts.map +1 -1
  276. package/types/config.d.ts +5 -105
  277. package/types/config.d.ts.map +1 -1
  278. package/types/dev/preload.d.ts.map +1 -1
  279. package/types/lsp/server.d.ts.map +1 -1
  280. package/types/migrate/markup.d.ts.map +1 -1
  281. package/types/runtime/action-call.d.ts.map +1 -1
  282. package/types/runtime/action-encode.d.ts +1 -0
  283. package/types/runtime/action-encode.d.ts.map +1 -1
  284. package/types/runtime/action-error.d.ts +1 -2
  285. package/types/runtime/action-error.d.ts.map +1 -1
  286. package/types/runtime/action-run.d.ts +23 -0
  287. package/types/runtime/action-run.d.ts.map +1 -0
  288. package/types/runtime/action-shared.d.ts +1 -27
  289. package/types/runtime/action-shared.d.ts.map +1 -1
  290. package/types/runtime/action-stream.d.ts.map +1 -1
  291. package/types/runtime/action.d.ts +1 -1
  292. package/types/runtime/action.d.ts.map +1 -1
  293. package/types/runtime/call-result.d.ts +0 -10
  294. package/types/runtime/call-result.d.ts.map +1 -1
  295. package/types/runtime/checks.d.ts +6 -9
  296. package/types/runtime/checks.d.ts.map +1 -1
  297. package/types/runtime/core.d.ts +2 -20
  298. package/types/runtime/core.d.ts.map +1 -1
  299. package/types/runtime/dom.d.ts +1 -1
  300. package/types/runtime/dom.d.ts.map +1 -1
  301. package/types/runtime/html.d.ts +1 -1
  302. package/types/runtime/html.d.ts.map +1 -1
  303. package/types/runtime/i18n.client.d.ts +0 -1
  304. package/types/runtime/i18n.client.d.ts.map +1 -1
  305. package/types/runtime/i18n.d.ts +1 -1
  306. package/types/runtime/i18n.d.ts.map +1 -1
  307. package/types/runtime/i18n.server.d.ts +0 -1
  308. package/types/runtime/i18n.server.d.ts.map +1 -1
  309. package/types/runtime/index.d.ts +2 -2
  310. package/types/runtime/index.d.ts.map +1 -1
  311. package/types/runtime/island.server.d.ts +1 -0
  312. package/types/runtime/island.server.d.ts.map +1 -1
  313. package/types/runtime/live-resource.server.d.ts.map +1 -1
  314. package/types/runtime/live-value.shared.d.ts +7 -15
  315. package/types/runtime/live-value.shared.d.ts.map +1 -1
  316. package/types/runtime/live.d.ts +0 -11
  317. package/types/runtime/live.d.ts.map +1 -1
  318. package/types/runtime/local-types.d.ts +0 -14
  319. package/types/runtime/local-types.d.ts.map +1 -1
  320. package/types/runtime/navigate-api.d.ts +0 -4
  321. package/types/runtime/navigate-api.d.ts.map +1 -1
  322. package/types/runtime/navigation-state.d.ts +0 -4
  323. package/types/runtime/navigation-state.d.ts.map +1 -1
  324. package/types/runtime/page-swap.d.ts.map +1 -1
  325. package/types/runtime/persist.d.ts +1 -0
  326. package/types/runtime/persist.d.ts.map +1 -1
  327. package/types/runtime/persisted.d.ts +0 -15
  328. package/types/runtime/persisted.d.ts.map +1 -1
  329. package/types/runtime/presence.d.ts +0 -2
  330. package/types/runtime/presence.d.ts.map +1 -1
  331. package/types/runtime/query-param.d.ts.map +1 -1
  332. package/types/runtime/reactive.d.ts +2 -1
  333. package/types/runtime/reactive.d.ts.map +1 -1
  334. package/types/runtime/refuse.d.ts +0 -7
  335. package/types/runtime/refuse.d.ts.map +1 -1
  336. package/types/runtime/store-base.d.ts +1 -2
  337. package/types/runtime/store-base.d.ts.map +1 -1
  338. package/types/runtime/values.d.ts +2 -1
  339. package/types/runtime/values.d.ts.map +1 -1
  340. package/types/runtime/with-query.d.ts +2 -0
  341. package/types/runtime/with-query.d.ts.map +1 -1
  342. package/types/server/action-hooks.d.ts +4 -4
  343. package/types/server/action-hooks.d.ts.map +1 -1
  344. package/types/server/actions.d.ts.map +1 -1
  345. package/types/server/api-modules.d.ts +0 -1
  346. package/types/server/api-modules.d.ts.map +1 -1
  347. package/types/server/app-stages.d.ts +5 -13
  348. package/types/server/app-stages.d.ts.map +1 -1
  349. package/types/server/app.d.ts +3 -8
  350. package/types/server/app.d.ts.map +1 -1
  351. package/types/server/auth-mails.d.ts +0 -5
  352. package/types/server/auth-mails.d.ts.map +1 -1
  353. package/types/server/env-state.d.ts +1 -0
  354. package/types/server/env-state.d.ts.map +1 -1
  355. package/types/server/guard-requirement.d.ts +0 -1
  356. package/types/server/guard-requirement.d.ts.map +1 -1
  357. package/types/server/image.d.ts +0 -1
  358. package/types/server/image.d.ts.map +1 -1
  359. package/types/server/index.d.ts +0 -2
  360. package/types/server/index.d.ts.map +1 -1
  361. package/types/server/job-context.d.ts +1 -1
  362. package/types/server/job-context.d.ts.map +1 -1
  363. package/types/server/jobs.d.ts +0 -4
  364. package/types/server/jobs.d.ts.map +1 -1
  365. package/types/server/kept-exports.d.ts.map +1 -1
  366. package/types/server/kv.d.ts +4 -4
  367. package/types/server/kv.d.ts.map +1 -1
  368. package/types/server/library.d.ts +1 -3
  369. package/types/server/library.d.ts.map +1 -1
  370. package/types/server/mcp.d.ts +0 -1
  371. package/types/server/mcp.d.ts.map +1 -1
  372. package/types/server/metrics.d.ts +0 -5
  373. package/types/server/metrics.d.ts.map +1 -1
  374. package/types/server/page-settings.d.ts +3 -3
  375. package/types/server/page-settings.d.ts.map +1 -1
  376. package/types/server/prerender.d.ts.map +1 -1
  377. package/types/server/protection.d.ts +6 -6
  378. package/types/server/protection.d.ts.map +1 -1
  379. package/types/server/queue.d.ts +1 -3
  380. package/types/server/queue.d.ts.map +1 -1
  381. package/types/server/rate-limit.d.ts +0 -2
  382. package/types/server/rate-limit.d.ts.map +1 -1
  383. package/types/server/routes.d.ts +1 -1
  384. package/types/server/routes.d.ts.map +1 -1
  385. package/types/server/scope.d.ts.map +1 -1
  386. package/types/server/session.d.ts +1 -1
  387. package/types/server/session.d.ts.map +1 -1
  388. package/types/server/signals.d.ts.map +1 -1
  389. package/types/server/signed.d.ts +0 -2
  390. package/types/server/signed.d.ts.map +1 -1
  391. package/types/server/source.d.ts +1 -1
  392. package/types/server/source.d.ts.map +1 -1
  393. package/types/server/storage.d.ts +0 -4
  394. package/types/server/storage.d.ts.map +1 -1
  395. package/types/server/vitals.d.ts +0 -1
  396. package/types/server/vitals.d.ts.map +1 -1
  397. package/types/server/work-scope.d.ts +0 -2
  398. package/types/server/work-scope.d.ts.map +1 -1
  399. package/types/server/workflow.d.ts +1 -1
  400. package/types/server/workflow.d.ts.map +1 -1
  401. package/types/test/index.d.ts.map +1 -1
  402. package/types/test/site-actions.d.ts +1 -1
  403. package/types/test/site-actions.d.ts.map +1 -1
  404. package/types/test/site-keys.d.ts +1 -1
  405. package/types/test/site-keys.d.ts.map +1 -1
  406. package/types/test/site-socket.d.ts +1 -1
  407. package/types/test/site-socket.d.ts.map +1 -1
  408. package/types/test/site-types.d.ts +0 -8
  409. package/types/test/site-types.d.ts.map +1 -1
  410. package/llms/deprecated-lints-1-105-libraries.md +0 -32
  411. package/llms/deprecated-lints-1-105.md +0 -58
  412. package/src/check/action-readers.ts +0 -115
  413. package/src/check/action-type.ts +0 -44
  414. package/src/check/ai-language.ts +0 -56
  415. package/src/check/app-hooks.ts +0 -90
  416. package/src/check/auth-methods.ts +0 -85
  417. package/src/check/auth-rate-limits.ts +0 -99
  418. package/src/check/call-result.ts +0 -242
  419. package/src/check/client-keys.ts +0 -10
  420. package/src/check/cms-options.ts +0 -81
  421. package/src/check/config-groups.ts +0 -22
  422. package/src/check/config-switches.ts +0 -38
  423. package/src/check/context-import.ts +0 -51
  424. package/src/check/env-files.ts +0 -31
  425. package/src/check/format-duration.ts +0 -75
  426. package/src/check/guard-options.ts +0 -58
  427. package/src/check/handler-events.ts +0 -149
  428. package/src/check/hook-context.ts +0 -94
  429. package/src/check/hook-names.ts +0 -104
  430. package/src/check/i18n-keys.ts +0 -50
  431. package/src/check/images-keys.ts +0 -54
  432. package/src/check/job-shapes.ts +0 -273
  433. package/src/check/link-flag-tests.ts +0 -130
  434. package/src/check/live-api.ts +0 -137
  435. package/src/check/mail-api.ts +0 -67
  436. package/src/check/one-state-api.ts +0 -357
  437. package/src/check/pages-options.ts +0 -35
  438. package/src/check/rate-enforce.ts +0 -53
  439. package/src/check/refusal-calls.ts +0 -185
  440. package/src/check/retired-lints.ts +0 -49
  441. package/src/check/route-keys.ts +0 -166
  442. package/src/check/secret-keys.ts +0 -83
  443. package/src/check/socket-frames.ts +0 -102
  444. package/src/check/source-readers.ts +0 -257
  445. package/src/check/store-ms.ts +0 -72
  446. package/src/check/store-names.ts +0 -88
  447. package/src/check/test-helpers.ts +0 -98
  448. package/src/check/ttl-names.ts +0 -142
  449. package/src/compiler/deprecated-ai-labels.ts +0 -97
  450. package/src/compiler/deprecated-ai-links.ts +0 -63
  451. package/src/compiler/deprecated-allow.ts +0 -50
  452. package/src/compiler/deprecated-auth-lints.ts +0 -14
  453. package/src/compiler/deprecated-auth-signed.ts +0 -29
  454. package/src/compiler/deprecated-children.ts +0 -66
  455. package/src/compiler/deprecated-image.ts +0 -116
  456. package/src/compiler/deprecated-island.ts +0 -155
  457. package/src/compiler/deprecated-lints-1-105.ts +0 -41
  458. package/src/compiler/deprecated-page.ts +0 -125
  459. package/src/compiler/deprecated-parts.ts +0 -22
  460. package/src/compiler/deprecated-typed-lints.ts +0 -23
  461. package/src/compiler/deprecated-ui-callbacks.ts +0 -66
  462. package/src/compiler/deprecated-ui-input.ts +0 -97
  463. package/src/compiler/deprecated-ui-items.ts +0 -47
  464. package/src/compiler/old-parts.ts +0 -84
  465. package/src/runtime/mount.compat.ts +0 -8
  466. package/src/server/moved-exports.ts +0 -17
  467. package/types/check/action-readers.d.ts +0 -3
  468. package/types/check/action-readers.d.ts.map +0 -1
  469. package/types/check/action-type.d.ts +0 -3
  470. package/types/check/action-type.d.ts.map +0 -1
  471. package/types/check/ai-language.d.ts +0 -3
  472. package/types/check/ai-language.d.ts.map +0 -1
  473. package/types/check/app-hooks.d.ts +0 -3
  474. package/types/check/app-hooks.d.ts.map +0 -1
  475. package/types/check/auth-methods.d.ts +0 -3
  476. package/types/check/auth-methods.d.ts.map +0 -1
  477. package/types/check/auth-rate-limits.d.ts +0 -3
  478. package/types/check/auth-rate-limits.d.ts.map +0 -1
  479. package/types/check/call-result.d.ts +0 -7
  480. package/types/check/call-result.d.ts.map +0 -1
  481. package/types/check/client-keys.d.ts +0 -3
  482. package/types/check/client-keys.d.ts.map +0 -1
  483. package/types/check/cms-options.d.ts +0 -3
  484. package/types/check/cms-options.d.ts.map +0 -1
  485. package/types/check/config-groups.d.ts +0 -3
  486. package/types/check/config-groups.d.ts.map +0 -1
  487. package/types/check/config-switches.d.ts +0 -3
  488. package/types/check/config-switches.d.ts.map +0 -1
  489. package/types/check/context-import.d.ts +0 -3
  490. package/types/check/context-import.d.ts.map +0 -1
  491. package/types/check/env-files.d.ts +0 -3
  492. package/types/check/env-files.d.ts.map +0 -1
  493. package/types/check/format-duration.d.ts +0 -5
  494. package/types/check/format-duration.d.ts.map +0 -1
  495. package/types/check/guard-options.d.ts +0 -3
  496. package/types/check/guard-options.d.ts.map +0 -1
  497. package/types/check/handler-events.d.ts +0 -9
  498. package/types/check/handler-events.d.ts.map +0 -1
  499. package/types/check/hook-context.d.ts +0 -3
  500. package/types/check/hook-context.d.ts.map +0 -1
  501. package/types/check/hook-names.d.ts +0 -3
  502. package/types/check/hook-names.d.ts.map +0 -1
  503. package/types/check/i18n-keys.d.ts +0 -3
  504. package/types/check/i18n-keys.d.ts.map +0 -1
  505. package/types/check/images-keys.d.ts +0 -3
  506. package/types/check/images-keys.d.ts.map +0 -1
  507. package/types/check/job-shapes.d.ts +0 -6
  508. package/types/check/job-shapes.d.ts.map +0 -1
  509. package/types/check/link-flag-tests.d.ts +0 -4
  510. package/types/check/link-flag-tests.d.ts.map +0 -1
  511. package/types/check/live-api.d.ts +0 -3
  512. package/types/check/live-api.d.ts.map +0 -1
  513. package/types/check/mail-api.d.ts +0 -3
  514. package/types/check/mail-api.d.ts.map +0 -1
  515. package/types/check/one-state-api.d.ts +0 -9
  516. package/types/check/one-state-api.d.ts.map +0 -1
  517. package/types/check/pages-options.d.ts +0 -3
  518. package/types/check/pages-options.d.ts.map +0 -1
  519. package/types/check/rate-enforce.d.ts +0 -3
  520. package/types/check/rate-enforce.d.ts.map +0 -1
  521. package/types/check/refusal-calls.d.ts +0 -3
  522. package/types/check/refusal-calls.d.ts.map +0 -1
  523. package/types/check/retired-lints.d.ts +0 -3
  524. package/types/check/retired-lints.d.ts.map +0 -1
  525. package/types/check/route-keys.d.ts +0 -3
  526. package/types/check/route-keys.d.ts.map +0 -1
  527. package/types/check/secret-keys.d.ts +0 -3
  528. package/types/check/secret-keys.d.ts.map +0 -1
  529. package/types/check/socket-frames.d.ts +0 -3
  530. package/types/check/socket-frames.d.ts.map +0 -1
  531. package/types/check/source-readers.d.ts +0 -3
  532. package/types/check/source-readers.d.ts.map +0 -1
  533. package/types/check/store-ms.d.ts +0 -3
  534. package/types/check/store-ms.d.ts.map +0 -1
  535. package/types/check/store-names.d.ts +0 -3
  536. package/types/check/store-names.d.ts.map +0 -1
  537. package/types/check/test-helpers.d.ts +0 -3
  538. package/types/check/test-helpers.d.ts.map +0 -1
  539. package/types/check/ttl-names.d.ts +0 -3
  540. package/types/check/ttl-names.d.ts.map +0 -1
  541. package/types/compiler/deprecated-ai-labels.d.ts +0 -5
  542. package/types/compiler/deprecated-ai-labels.d.ts.map +0 -1
  543. package/types/compiler/deprecated-ai-links.d.ts +0 -5
  544. package/types/compiler/deprecated-ai-links.d.ts.map +0 -1
  545. package/types/compiler/deprecated-allow.d.ts +0 -5
  546. package/types/compiler/deprecated-allow.d.ts.map +0 -1
  547. package/types/compiler/deprecated-auth-lints.d.ts +0 -12
  548. package/types/compiler/deprecated-auth-lints.d.ts.map +0 -1
  549. package/types/compiler/deprecated-auth-signed.d.ts +0 -5
  550. package/types/compiler/deprecated-auth-signed.d.ts.map +0 -1
  551. package/types/compiler/deprecated-children.d.ts +0 -4
  552. package/types/compiler/deprecated-children.d.ts.map +0 -1
  553. package/types/compiler/deprecated-image.d.ts +0 -5
  554. package/types/compiler/deprecated-image.d.ts.map +0 -1
  555. package/types/compiler/deprecated-island.d.ts +0 -9
  556. package/types/compiler/deprecated-island.d.ts.map +0 -1
  557. package/types/compiler/deprecated-lints-1-105.d.ts +0 -39
  558. package/types/compiler/deprecated-lints-1-105.d.ts.map +0 -1
  559. package/types/compiler/deprecated-page.d.ts +0 -4
  560. package/types/compiler/deprecated-page.d.ts.map +0 -1
  561. package/types/compiler/deprecated-parts.d.ts +0 -3
  562. package/types/compiler/deprecated-parts.d.ts.map +0 -1
  563. package/types/compiler/deprecated-typed-lints.d.ts +0 -21
  564. package/types/compiler/deprecated-typed-lints.d.ts.map +0 -1
  565. package/types/compiler/deprecated-ui-callbacks.d.ts +0 -5
  566. package/types/compiler/deprecated-ui-callbacks.d.ts.map +0 -1
  567. package/types/compiler/deprecated-ui-input.d.ts +0 -5
  568. package/types/compiler/deprecated-ui-input.d.ts.map +0 -1
  569. package/types/compiler/deprecated-ui-items.d.ts +0 -5
  570. package/types/compiler/deprecated-ui-items.d.ts.map +0 -1
  571. package/types/compiler/old-parts.d.ts +0 -9
  572. package/types/compiler/old-parts.d.ts.map +0 -1
  573. package/types/runtime/mount.compat.d.ts +0 -7
  574. package/types/runtime/mount.compat.d.ts.map +0 -1
  575. package/types/server/moved-exports.d.ts +0 -12
  576. package/types/server/moved-exports.d.ts.map +0 -1
@@ -267,8 +267,8 @@ async function hydrateIsland(registry: IslandRegistry, element: HTMLElement): Pr
267
267
 
268
268
  const draw = () => render(() => withIds(ids, () => component(props)), element)
269
269
 
270
- // A client-only island has no server markup to claim, only the fallback it renders over.
271
- if (element.dataset.client !== undefined) {
270
+ // A client-only island has no server markup to claim, only the fallback it renders over, and so has one the build drew at the default query when the page is opened at another.
271
+ if (element.dataset.client !== undefined || (element.dataset.query !== undefined && location.search !== '')) {
272
272
  renderOver(element, id, draw, false)
273
273
  }
274
274
  else {
@@ -216,15 +216,15 @@ export function throttled<T>(source: () => T, delay: Duration, options?: EffectO
216
216
  type EventMapOf<T> = T extends Window ? WindowEventMap : T extends Document ? DocumentEventMap : T extends HTMLElement ? HTMLElementEventMap : T extends MediaQueryList ? MediaQueryListEventMap : Record<string, Event>
217
217
 
218
218
  // Listens to `type` events on `target`, `window` or `document` for instance, while the island lives; nothing listens while the server renders.
219
- // `target` is a function returning it, `listen(() => window, ...)`, so `window` is never read on the server and a signal or a `ref` it reads is followed: its new value listens as it changes. In a `.kay` file the compiler still wraps a target given as a value, which `deprecated-listen-target` reports.
219
+ // `target` is a function returning it, `listen(() => window, ...)`, so `window` is never read on the server and a signal or a `ref` it reads is followed: its new value listens as it changes.
220
220
  // Returns what stops it before the island ends, which the `signal` of its options does too.
221
221
  // The handler runs under the owner `listen` was called in, so a stream it starts closes with that island or block.
222
222
  // kept: free
223
- export function listen<T extends EventTarget, K extends keyof EventMapOf<T> & string>(target: T | (() => T | null | undefined), type: K, handler: (event: EventMapOf<T>[K]) => void, options?: boolean | AddEventListenerOptions): () => void {
223
+ export function listen<T extends EventTarget, K extends keyof EventMapOf<T> & string>(target: () => T | null | undefined, type: K, handler: (event: EventMapOf<T>[K]) => void, options?: boolean | AddEventListenerOptions): () => void {
224
224
  const owner = getOwner()
225
225
 
226
226
  return lasting('listen', handler, () => createEffect(() => {
227
- const at = typeof target === 'function' ? target() : target
227
+ const at = target()
228
228
 
229
229
  if (!at)
230
230
  return
@@ -371,11 +371,7 @@ export interface RequestContext<Params extends Record<string, unknown> = Record<
371
371
  }
372
372
 
373
373
  // `ctx.deny(status, { message, errors, data })`, the one shape every refusal takes (`refuse()` throws the same).
374
- export interface Deny {
375
- <const Status extends number = number>(status?: Status & ErrorStatus<Status>, options?: DenyOptions<ErrorData>): never
376
- /** @deprecated `deny(status, { message, data })`. Removed in 1.108; `deprecated-deny-call` rewrites it. */
377
- (status: number, message: string, data?: ErrorData): never
378
- }
374
+ export type Deny = <const Status extends number = number>(status?: Status & ErrorStatus<Status>, options?: DenyOptions<ErrorData>) => never
379
375
 
380
376
  // What `ctx.deny` hands the error page as `ctx.error.data`: the `errorData` an app sets in `Register`, `unknown` otherwise.
381
377
  export type ErrorData = Register extends { errorData: infer Data } ? Data : unknown
@@ -489,7 +485,7 @@ export function defer<T>(value: T | PromiseLike<T>): Deferred<T> {
489
485
  return promise
490
486
  }
491
487
 
492
- // `export const page = { ... }` in a page's server fence; a layout takes `query` as well as `layouts`, `security`, `reload`, `noindex`, `ttl`, `rateLimit` and `search`, which apply to the pages under it, and `guards`, which opens its own actions.
488
+ // `export const page = { ... }` in a page's server fence; a layout takes `query` as well as `layouts`, `security`, `reload`, `seo`, `cache`, `rateLimit`, which apply to the pages under it, and `guards`, which opens its own actions.
493
489
  export interface PageSettings {
494
490
  // `kay build` renders the page once: `true` for a route without params, else the params of each page to render, as a list, a function returning one, a content collection or a `paginate()` list.
495
491
  prerender?: boolean | object
@@ -498,10 +494,6 @@ export interface PageSettings {
498
494
  keep?: boolean
499
495
  // How the prerendered page is cached. `'1h'`: the server renders it again in the background once it is older, and a public page answers `cache-control: public, max-age=0, s-maxage=3600, stale-while-revalidate=3600` so a CDN keeps it that long. `{ browser, shared, swr }` sets each part of the header, `shared` also being how long the page is served before it renders again. `'private'` sends `private`, `false` the default `public, max-age=0, must-revalidate`. A page behind a guard, or rendered for one visitor, is `private` whatever this says; a layout's applies to every page under it, the innermost winning.
500
496
  cache?: PageCache
501
- /** @deprecated Write `cache: '1h'`. Removed in 1.108.0; `deprecated-page-cache` rewrites it. */
502
- ttl?: Duration
503
- /** @deprecated Write `cache: { browser, shared, swr }`, or `cache: false`. Removed in 1.108.0; `deprecated-page-cache` rewrites `false`. */
504
- cacheControl?: string | false
505
497
  // `false` renders the page, or the layouts below this one, without the layouts above; `true`, the default, says nothing.
506
498
  layouts?: boolean
507
499
  // `false` runs none of the `_guard.ts` files above the page, nor above its actions or a layout's: a sign-in page under a guard asking for a session. A guard, a list of them or `{ load }` returning one runs after those files, before the page and its actions; on a layout, before its actions alone. `true`, the default, says nothing.
@@ -514,14 +506,6 @@ export interface PageSettings {
514
506
  query?: Schema
515
507
  // What search engines, the sitemap and social networks read of the page: the `title`, `description`, `image` and `canonical` of its head, written once here instead of in a `head` block when they do not depend on the request, and `noindex`, `sitemap`, `lastmod`, `search` and `feed` beside them. A layout's applies to every page under it, the innermost setting winning.
516
508
  seo?: PageSeo
517
- /** @deprecated Write it in `seo`. Removed in 1.108.0; `deprecated-page-seo` rewrites it. */
518
- sitemap?: boolean | object
519
- /** @deprecated Write it in `seo`. Removed in 1.108.0; `deprecated-page-seo` rewrites it. */
520
- lastmod?: Lastmod | ((params: Record<string, string>) => Lastmod | undefined | Promise<Lastmod | undefined>)
521
- /** @deprecated Write it in `seo`. Removed in 1.108.0; `deprecated-page-seo` rewrites it. */
522
- feed?: false | object | readonly object[]
523
- /** @deprecated Write it in `seo`. Removed in 1.108.0; `deprecated-page-seo` rewrites it. */
524
- noindex?: boolean
525
509
  // What the page's responses send over the site's security headers; a layout's applies to every page under it, the inner one merged over the outer.
526
510
  security?: PageSecurity
527
511
  // `true` loads the page fully from any link or form of the site, past the page swap: a page whose scripts expect a fresh document.
@@ -530,8 +514,6 @@ export interface PageSettings {
530
514
  // `true` leaves the page to its live connection after a call whose handler invalidated cached keys it follows, when every key the call invalidated is followed: the call does not load the page again. For a page whose every read of what actions change is a `cached(..., { live: true })` value or a `resource()`.
531
515
  // `false`, the default, loads the page again after every call.
532
516
  liveRefresh?: boolean
533
- /** @deprecated Write it in `seo`. Removed in 1.108.0; `deprecated-page-seo` rewrites it. */
534
- search?: PageSearch | ((params: Record<string, string>) => PageSearch | undefined | Promise<PageSearch | undefined>)
535
517
  }
536
518
 
537
519
  export type PageSearch = false | { weight?: number }
@@ -21,7 +21,7 @@ declare const KAY_FRENCH: true | undefined
21
21
  export { holdSubmits, listenSubmit, listenSubmitWith, listenWith } from './form-hold'
22
22
  export { renderEffect as effect, memo, untrack } from './reactive'
23
23
  export { transition } from './transition'
24
- export { checkedMarkup, componentClass, merge, omit, partClass, partHanded, partsClass, spreadAttributes, spreadWith } from './values'
24
+ export { checkedMarkup, componentClass, handParts, merge, omit, partClass, partHanded, partsClass, spreadAttributes, spreadWith } from './values'
25
25
 
26
26
  // Several sibling nodes rendered as one: a block or a component returning more than one node. Its first and last nodes stay in place while what sits between changes.
27
27
  export class Range {
@@ -35,7 +35,7 @@ export { memo, untrack } from './reactive'
35
35
  export { html, isRendered } from './rendered'
36
36
 
37
37
  export type { Html } from './rendered'
38
- export { checkedMarkup, componentClass, merge, omit, partClass, partHanded, partsClass, spreadWith } from './values'
38
+ export { checkedMarkup, componentClass, handParts, merge, omit, partClass, partHanded, partsClass, spreadWith } from './values'
39
39
 
40
40
  // Leads the markup of a `try` block the server rendered its `catch` block for.
41
41
  export const FAILED_MARKER = `<!--${FAILED}-->`
@@ -139,10 +139,7 @@ export function formatBytes(size: ByteSize, options?: NumberFormatOptions): stri
139
139
  return formatBytesIn(translations().locale, size, options)
140
140
  }
141
141
 
142
- export function formatDuration(duration: Duration, options?: DurationFormatOptions): string
143
- // Milliseconds, until 1.108: `deprecated-format-duration` rewrites a literal.
144
- export function formatDuration(milliseconds: number, options?: DurationFormatOptions): string
145
- export function formatDuration(duration: Duration | number, options?: DurationFormatOptions): string {
142
+ export function formatDuration(duration: Duration, options?: DurationFormatOptions): string {
146
143
  return formatDurationIn(translations().locale, duration, options)
147
144
  }
148
145
 
@@ -101,10 +101,7 @@ export function formatBytes(size: ByteSize, options?: NumberFormatOptions): stri
101
101
  }
102
102
 
103
103
  // kept: free, a format by the locale, which a kept copy is stored per.
104
- export function formatDuration(duration: Duration, options?: DurationFormatOptions): string
105
- // Milliseconds, until 1.108: `deprecated-format-duration` rewrites a literal.
106
- export function formatDuration(milliseconds: number, options?: DurationFormatOptions): string
107
- export function formatDuration(duration: Duration | number, options?: DurationFormatOptions): string {
104
+ export function formatDuration(duration: Duration, options?: DurationFormatOptions): string {
108
105
  return formatDurationIn(formatLocale(), duration, options)
109
106
  }
110
107
 
@@ -320,10 +320,10 @@ export function formatBytes(page: string, given: ByteSize, options?: NumberForma
320
320
  // Each unit of a duration with its length in milliseconds.
321
321
  const DURATION_UNITS: readonly [string, number][] = [['day', 86_400_000], ['hour', 3_600_000], ['minute', 60_000], ['second', 1000]]
322
322
 
323
- // A length of time, written with its unit (`'125m'`) or in milliseconds, in its largest unit and the one below, `2 hr 5 min`, the lower one left out when it is zero.
324
- export function formatDuration(page: string, duration: Duration | number, given?: DurationFormatOptions): string {
323
+ // A length of time, written with its unit (`'125m'`), in its largest unit and the one below, `2 hr 5 min`, the lower one left out when it is zero.
324
+ export function formatDuration(page: string, duration: Duration, given?: DurationFormatOptions): string {
325
325
  const [locale, options] = withLocale(page, given)
326
- const milliseconds = typeof duration === 'number' ? duration : durationMs(duration)
326
+ const milliseconds = durationMs(duration)
327
327
  const total = Number.isFinite(milliseconds) ? Math.round(Math.max(0, milliseconds) / 1000) * 1000 : 0
328
328
  const reached = DURATION_UNITS.findIndex(([, length]) => total >= length)
329
329
  const first = reached === -1 ? DURATION_UNITS.length - 1 : reached
@@ -47,7 +47,7 @@ export { mount } from './mount'
47
47
  export type { NavigateOptions, QueryChanges } from './navigate-api'
48
48
  export { navigate, refresh } from './navigate-api'
49
49
  export type { BeforeNavigate, NavigateEvent, NavigateFailure, NavigateStart, NavigationState } from './navigation-state'
50
- export { navigation, onBeforeNavigate, onNavigate } from './navigation-state'
50
+ export { navigation } from './navigation-state'
51
51
  export { online } from './online'
52
52
  export { optimistic } from './optimistic'
53
53
  export type { PersistStorage } from './persist'
@@ -65,7 +65,7 @@ export { batch, flush, memo, onCleanup, root, untrack } from './reactive'
65
65
  export { reactiveMap, reactiveSet } from './reactive-collections'
66
66
  export type { Recipe, RecipeConfig, RecipeProps, WidenedProps } from './recipe'
67
67
  export { recipe } from './recipe'
68
- export type { DenyOptions, RefuseOptions } from './refuse'
68
+ export type { DenyOptions } from './refuse'
69
69
  export { refuse } from './refuse'
70
70
  export type { RouteArgs, RouteOptions, RoutePattern } from './route'
71
71
  export { route } from './route'
@@ -9,7 +9,7 @@ import { BUTTON_FORM_KEY } from './button-form'
9
9
  import { escapeAttribute, quotedAttribute } from './escape'
10
10
  import { withFieldMarks } from './fields'
11
11
  import { headMark, setsIslandTitle } from './head'
12
- import { child, omit } from './html'
12
+ import { child, omit, prerendering } from './html'
13
13
  import { noteLives } from './live-value'
14
14
  import { localeState } from './locale-state'
15
15
  import { TITLED_ATTRIBUTE } from './markers'
@@ -105,6 +105,14 @@ export function collectIslands<T>(render: () => T, salt?: string, chunks?: Recor
105
105
  }
106
106
  }
107
107
 
108
+ // Whether the island being rendered, or a page outside any, read a query param.
109
+ let queried = false
110
+
111
+ // A query param was read: the island rendering it depends on the address, which a page rendered once at build time cannot show.
112
+ export function noteQuery(): void {
113
+ queried = true
114
+ }
115
+
108
116
  // The keys of the components the island being rendered draws that load on their own in the browser.
109
117
  let drawn: Set<string> | undefined
110
118
 
@@ -175,7 +183,7 @@ function ownProps<P extends object>(props: P & IslandOptions, renderClient: bool
175
183
  }
176
184
 
177
185
  // On the server an interactive component renders inside a `<slot>` the browser hydrates, its props serialized for the client.
178
- // A client-only one, `client` or rendered with `hydrate="client"`, holds only its fallback in the slot, the use's `@fallback` block else the component's own, until the browser renders into it, and inside another island renders nothing.
186
+ // A client-only one, `island({ render: 'client' })` or rendered with `render="client"`, holds only its fallback in the slot, the use's `@fallback` block else the component's own, until the browser renders into it, and inside another island renders nothing.
179
187
  // Browsers lay a slot out as `display: contents`, so the island sits in a flex or grid parent as its own markup would, with no stylesheet to ship.
180
188
  // `messages` are the keys its source passes `t()` as they are written, which it may only look up once in the browser. `lives` are the live values it imports, which the page proves though only the browser may read them.
181
189
  // `cause` is only passed under `kay dev`, which writes it as the `data-why` the dev tool's Islands tab shows, so production markup is the same with or without it.
@@ -184,7 +192,7 @@ export function island<P extends object>(id: string, component: ((props: P) => J
184
192
  const when = props.hydrate ?? asks?.hydrate
185
193
  const persist = persistKey(props.persist ?? asks?.persist, id)
186
194
  const renderClient = props.render === 'client'
187
- const browserOnly = client || when === 'client' || renderClient
195
+ const browserOnly = client || renderClient
188
196
  const waits = isWaiting(when, id)
189
197
  const own = ownProps(props, renderClient, browserOnly)
190
198
 
@@ -241,8 +249,10 @@ export function island<P extends object>(id: string, component: ((props: P) => J
241
249
 
242
250
  const keys = new Set<string>()
243
251
  const outer = drawn
252
+ const outerQuery = queried
244
253
 
245
254
  drawn = keys
255
+ queried = false
246
256
 
247
257
  try {
248
258
  // Detached, as in the browser, where an island reads nothing the page's components provide.
@@ -254,20 +264,23 @@ export function island<P extends object>(id: string, component: ((props: P) => J
254
264
  const marked = waits || when === 'load' ? ` data-hydrate="${escapeAttribute(when!)}"` : ''
255
265
  const chunk = rendered?.chunks?.[id]
256
266
  const lazies = lazyAttribute(keys, waits)
257
- const markup: Html = renderedHtml(`<slot data-component="${escapeAttribute(id)}" data-props=${quotedAttribute(serialized)}${lazies}${cause === undefined ? '' : ` data-why=${quotedAttribute(cause)}`}${marked}${titled}${shipped}${browserOnly ? ' data-client' : ''}${count === 0 ? '' : ` data-uid="${escapeAttribute(prefix)}"`}${persist === undefined ? '' : ` data-persist="${escapeAttribute(persist)}"`}${chunk === undefined ? '' : ` data-chunk="${escapeAttribute(chunk)}"`}>${html}</slot>`)
267
+ // A page rendered once is shown at every query: the browser draws this island afresh from the address it is opened at, rather than claiming markup made for the default one.
268
+ const byQuery = queried && prerendering() && !browserOnly ? ' data-query' : ''
269
+ const markup: Html = renderedHtml(`<slot data-component="${escapeAttribute(id)}" data-props=${quotedAttribute(serialized)}${lazies}${cause === undefined ? '' : ` data-why=${quotedAttribute(cause)}`}${marked}${titled}${shipped}${browserOnly ? ' data-client' : ''}${byQuery}${count === 0 ? '' : ` data-uid="${escapeAttribute(prefix)}"`}${persist === undefined ? '' : ` data-persist="${escapeAttribute(persist)}"`}${chunk === undefined ? '' : ` data-chunk="${escapeAttribute(chunk)}"`}>${html}</slot>`)
258
270
 
259
271
  return markup as unknown as JSX.Element
260
272
  }
261
273
  finally {
262
274
  depth--
263
275
  drawn = outer
276
+ queried = outerQuery || queried
264
277
  }
265
278
  }
266
279
 
267
280
  return carryFailed(component, render) as IslandComponent<P>
268
281
  }
269
282
 
270
- // Whether a use of an island that follows no live value, whose `export const island` lists the props that make it interactive, turns none of them on: no listed prop has a value (or a default) that is on, the use asks for no hydration of its own, and none of its props is a function, which an island refuses to send and the use is told of as before.
283
+ // Whether a use of an island that follows no live value, whose `island()` call lists the props that make it interactive, turns none of them on: no listed prop has a value (or a default) that is on, the use asks for no hydration of its own, and none of its props is a function, which an island refuses to send and the use is told of as before.
271
284
  function staysPlain(depth: number, client: boolean, lives: readonly unknown[], props: object, asks: IslandAsks | undefined): boolean {
272
285
  const wants = asks?.interactive
273
286
 
@@ -80,7 +80,6 @@ export function serverResource<T>(key: string | undefined, url: string | undefin
80
80
 
81
81
  return {
82
82
  data: () => value,
83
- value: () => value,
84
83
  status: () => ready ? 'ready' : 'loading',
85
84
  pending: () => !ready,
86
85
  error: () => undefined,
@@ -248,7 +248,7 @@ function readOwn(slot: ServerSlot): unknown {
248
248
  return value
249
249
  }
250
250
 
251
- // An island's server render notes the live values it imports, so the page proves them though the render did not read them, as when a handler or a `--- client` fence reads one later. A keyed value is left out: its key is not known before it is read.
251
+ // An island's server render notes the live values it imports, so the page proves them though the render did not read them, as when a handler or a client-only component reads one later. A keyed value is left out: its key is not known before it is read.
252
252
  export function noteLives(handles: readonly unknown[]): void {
253
253
  for (const handle of handles) {
254
254
  const slot = typeof handle === 'function' ? slotOfHandle.get(handle) : undefined
@@ -544,7 +544,7 @@ function datedTogether(id: string): void {
544
544
  continue
545
545
 
546
546
  try {
547
- const sent = store.endAll(dated, lengthFor(store, ttl))
547
+ const sent = store.endAll(dated, lengthFor(ttl))
548
548
 
549
549
  if (sent !== undefined)
550
550
  void logged(sent, dated)
@@ -33,11 +33,7 @@ export interface Live<T> extends LiveSource<{ value: T }> {
33
33
  // A value of each user, declared `live(initial, { user: true })`: read by calling it, which gives the signed-in visitor's own and `initial` for nobody; the server writes one user's with `set(next, { user })`, `user` being the id the library that signs them in names (`userOf` of `kay/library`, which kayjs-auth does).
34
34
  export interface LiveOwn<T> extends LiveSource<{ value: T }> {
35
35
  (): T
36
- set: {
37
- (next: Next<T>, options: { user: string }): void
38
- /** @deprecated Written `set(user, next)`; `deprecated-live-api` rewrites it. Removed in 1.108. */
39
- (user: string, next: Next<T>): void
40
- }
36
+ set: (next: Next<T>, options: { user: string }) => void
41
37
  // Puts a user's value back to `initial`, and frees what is kept for it.
42
38
  delete: (user: string) => void
43
39
  }
@@ -45,11 +41,7 @@ export interface LiveOwn<T> extends LiveSource<{ value: T }> {
45
41
  // A live value per key, `room(id)` reading one: what the declaration gives a key nothing was set for. The event of `onData` names the key.
46
42
  export interface LiveByKey<K extends LiveKey, T> extends LiveSource<{ value: T, key: K }> {
47
43
  (key: K): T
48
- set: {
49
- (next: Next<T>, options: { key: K }): void
50
- /** @deprecated Written `set(key, next)`; `deprecated-live-api` rewrites it. Removed in 1.108. */
51
- (key: K, next: Next<T>): void
52
- }
44
+ set: (next: Next<T>, options: { key: K }) => void
53
45
  // Puts a key back to what the declaration gives it, and frees what is kept for it.
54
46
  delete: (key: K) => void
55
47
  }
@@ -82,9 +74,8 @@ export interface LiveStore extends StoreBase {
82
74
  // Gives a value held with no end the end, leaving its text and any end it has; optional, a store without it has the value written again with the end, which can overwrite a text another process set meanwhile.
83
75
  end?: (id: string, key: string, expiresAt: number) => void | Promise<void>
84
76
 
85
- // Gives every value of an id held with no end the end of now plus `ttl`, a `Duration` for a store with `durations: true` and milliseconds for one written before 1.105 (kept until 1.108; `lengthMs(ttl)` from `kay` reads either), in one write and one event, including a row this process did not read, which only the other processes then hear dated; optional, a store without it has `end` called for each value, and one that only keeps `set` has each written again.
86
- // eslint-disable-next-line ts/method-signature-style -- method syntax keeps a store written with `number` assignable (bivariance)
87
- endAll?(id: string, ttl: Duration | number): void | Promise<void>
77
+ // Gives every value of an id held with no end the end of now plus `ttl`, a `Duration` (`lengthMs(ttl)` from `kay` reads it), in one write and one event, including a row this process did not read, which only the other processes then hear dated; optional, a store without it has `end` called for each value, and one that only keeps `set` has each written again.
78
+ endAll?: (id: string, ttl: Duration) => void | Promise<void>
88
79
  // Drops a key and tells the other processes.
89
80
  delete: (id: string, key: string) => void | Promise<void>
90
81
  // Calls `listener` with the text now held for a key another process set, and when it ends if it has a `ttl`, or undefined once it deleted it; never for this process's own.
@@ -129,16 +120,12 @@ export function keyText(key: LiveKey): string {
129
120
  return String(key)
130
121
  }
131
122
 
132
- // What `set` of a value per key or per user was given, as `set(next, { key })`, or `set(key, next)` as before 1.105 wrote it: the key and the next value.
133
- // The options are a second argument holding only `field`, so a next value that is such an object, written in the old order, reads as options.
123
+ // What `set` of a value per key or per user was given, as `set(next, { key })`: the key and the next value.
134
124
  export function writeArguments(args: unknown[], field: 'key' | 'user', what: string): [key: string, next: unknown] {
135
125
  const [first, second] = args
136
126
 
137
- if (args.length < 2)
127
+ if (typeof second !== 'object' || second === null || !(field in second))
138
128
  throw new KayError('argument-invalid', `kay: ${what} is one value for each ${field}: \`set(next, { ${field} })\``)
139
129
 
140
- if (typeof second === 'object' && second !== null && Object.keys(second).length === 1 && field in second)
141
- return [keyText((second as Record<string, string>)[field]!), first]
142
-
143
- return [keyText(first as string), second]
130
+ return [keyText((second as Record<string, string>)[field]!), first]
144
131
  }
@@ -138,8 +138,6 @@ export interface Socket<Send, Receive> extends Reader<Receive, ConnectionStatus>
138
138
  send: (message: Send) => void
139
139
  // Called with `{ key, fields }` when the route refuses a message it was sent: it answers it as `{ error: { key, fields } }`, which is no message of the route's `reply`, so `data()` and `onData` never see it. Returns what stops it.
140
140
  onRefused: (listener: (event: SocketRefusal) => void) => () => void
141
- /** @deprecated Write `data()`. Removed in 1.108.0; `deprecated-source-readers` rewrites it. */
142
- last: () => Receive | undefined
143
141
 
144
142
  // Called each time the connection opens, a reconnect included, before what was queued goes: where a client joins its rooms again, or refetches what it missed (`reconnected` is true after the first open). Returns what stops it.
145
143
  onOpen: (listener: (event: { reconnected: boolean }) => void) => () => void
@@ -151,8 +149,6 @@ export interface Socket<Send, Receive> extends Reader<Receive, ConnectionStatus>
151
149
 
152
150
  // What every stream of values an island reads shares: a `stream()`, and the stream a streaming action answers with.
153
151
  export interface Connection<T> extends Reader<T, ConnectionStatus> {
154
- /** @deprecated Write `data()`. Removed in 1.108.0; `deprecated-source-readers` rewrites it. */
155
- last: () => T | undefined
156
152
 
157
153
  // Called each time the stream opens, a reconnect included (`reconnected` is true after the first open): where an island refetches what a drop may have lost, when the route sends no ids to resume from. A streaming action's answer is open before a listener can attach, so for it this runs after `retry()` only. Returns what stops it.
158
154
  onOpen: (listener: (event: { reconnected: boolean }) => void) => () => void
@@ -238,7 +234,6 @@ export function openSocket<Send, Receive>(connect: () => WebSocket | undefined,
238
234
  queued.shift()
239
235
  },
240
236
  data: link.last,
241
- last: link.last,
242
237
  status: link.status,
243
238
  pending: link.pending,
244
239
  error: link.error,
@@ -397,7 +392,6 @@ export function readEvents<T>(request: (signal: AbortSignal, lastEventId?: strin
397
392
  void read(run)
398
393
  },
399
394
  data: link.last,
400
- last: link.last,
401
395
  status: link.status,
402
396
  pending: link.pending,
403
397
  error: link.error,
@@ -513,7 +507,7 @@ function iterate(source: (signal: AbortSignal) => AsyncIterable<unknown>, hooks?
513
507
  onMount(start)
514
508
  onCleanup(close)
515
509
 
516
- return { data: link.last, last: link.last, status: link.status, pending: link.pending, error: link.error, retry: () => link.retry(() => void read()), ...connectionHooks(link, opened.on, hooks), ended: ended(link), close, start }
510
+ return { data: link.last, status: link.status, pending: link.pending, error: link.error, retry: () => link.retry(() => void read()), ...connectionHooks(link, opened.on, hooks), ended: ended(link), close, start }
517
511
  }
518
512
 
519
513
  // Reads a route of a module under `src/api` answering with `eventStream()` from an island, once it is in the page, or with `start: false` each time `start()` is called: each value typed as the route sends it, Dates, Maps and Sets included.
@@ -589,8 +583,6 @@ export interface ResourceExtras<T> {
589
583
  }
590
584
 
591
585
  export interface Resource<T> extends Reader<T, LoadStatus> {
592
- /** @deprecated Write `data()`. Removed in 1.108.0; `deprecated-source-readers` rewrites it. */
593
- value: () => T | undefined
594
586
  // Asks the route again with the same options, until the component that read it is gone, even when it is ready.
595
587
  refresh: () => void
596
588
  // Sets the value at once, for every resource sharing its key, and asks the route again to settle it: a request still in flight is dropped, so an older answer never overwrites it. `{ refresh: false }` keeps the value as set. Given a function, it gets the current value.
@@ -957,7 +949,6 @@ export function resource(module: unknown, path?: string | ResourceExtras<unknown
957
949
 
958
950
  return {
959
951
  data: value,
960
- value,
961
952
  status,
962
953
  pending: busy,
963
954
  error,
@@ -1045,8 +1036,6 @@ export interface TrackedApi<Module, Path> extends Reader<unknown, LoadStatus> {
1045
1036
  readonly data: () => unknown
1046
1037
  // Called with `{ value, input }` when a call succeeds, `input` the options it was given; returns what stops it. Hooks given to `call.track()` run first.
1047
1038
  readonly onData: (listener: (event: { value: unknown, input: unknown }) => void) => () => void
1048
- /** @deprecated Write `onData`, which hands `value` where this hands `data`. Removed in 1.108.0; `deprecated-source-readers` rewrites it. */
1049
- readonly onSuccess: (listener: (event: { data: unknown, input: unknown }) => void) => () => void
1050
1039
  // Called with `{ error, input }` when a call fails, a refusal or no answer, not for an abort; returns what stops it.
1051
1040
  readonly onError: (listener: (event: { error: ApiError, input: unknown }) => void) => () => void
1052
1041
  }
@@ -29,7 +29,7 @@ export interface LocalConflict<Row> {
29
29
  base: Row | undefined
30
30
  // The queued write's row, undefined when it was a removal.
31
31
  mine: Row | undefined
32
- // The server's row now, which its action answered `ctx.fail(409, row)` with.
32
+ // The server's row now, which its action answered `ctx.deny(409, { data: row })` with.
33
33
  theirs: Row
34
34
  }
35
35
 
@@ -37,8 +37,6 @@ export interface LocalConflict<Row> {
37
37
  export interface LocalHooks<Row> {
38
38
  // A read of the server was taken in, or the queue was sent and the collection stands `synced`; `value` is the rows held then.
39
39
  onData?: ((event: { value: readonly Row[] }) => void) | undefined
40
- /** @deprecated Write `onData`, which hands `value` where this hands `rows`. Removed in 1.108.0; `deprecated-source-readers` rewrites it. */
41
- onSync?: ((event: { rows: readonly Row[] }) => void) | undefined
42
40
  // A write the server did not take as it was: once for each new issue (it is in `issues()` then), not for those kept from an earlier visit.
43
41
  onIssue?: ((event: { issue: LocalIssue<Row> }) => void) | undefined
44
42
  // The server could not be read, or the browser keeps no IndexedDB: once for each failure, as `error()` is set.
@@ -71,16 +69,10 @@ export interface LocalSync {
71
69
  export interface Local<Row, Key extends keyof Row> extends Reader<readonly Row[], LoadStatus> {
72
70
  // The rows held, in key order, reactive; empty until the browser's copy is read.
73
71
  data: () => readonly Row[]
74
- /** @deprecated Write `data()`. Removed in 1.108.0; `deprecated-source-readers` rewrites it. */
75
- rows: () => readonly Row[]
76
72
  get: (key: Row[Key]) => Row | undefined
77
73
  // Both keep the change in the browser at once and resolve then; the server gets it when it can.
78
74
  put: (row: Row) => Promise<void>
79
75
  remove: (key: Row[Key]) => Promise<void>
80
- /** @deprecated Write `sync.queued()`. Removed in 1.108.0; `deprecated-source-readers` rewrites it. */
81
- unsynced: () => number
82
- /** @deprecated Write `sync.status()`. Removed in 1.108.0; `deprecated-source-readers` rewrites it. */
83
- syncStatus: () => LocalSyncStatus
84
76
  // `loading` until the browser's copy is read, then `ready`, or `failed` while `error()` is set; `idle` is never read. Whether writes wait for the server is `sync.status()`, not a failure.
85
77
  status: () => LoadStatus
86
78
  // Whether the browser's copy is still being read.
@@ -91,8 +83,6 @@ export interface Local<Row, Key extends keyof Row> extends Reader<readonly Row[]
91
83
  retry: () => void
92
84
  // Called after a sync, with `{ value }` the rows held; returns what stops it.
93
85
  onData: (listener: (event: { value: readonly Row[] }) => void) => () => void
94
- /** @deprecated Write `onData`, which hands `value` where this hands `rows`. Removed in 1.108.0; `deprecated-source-readers` rewrites it. */
95
- onSync: (listener: (event: { rows: readonly Row[] }) => void) => () => void
96
86
  // Called with each new issue; returns what stops it.
97
87
  onIssue: (listener: (event: { issue: LocalIssue<Row> }) => void) => () => void
98
88
  // Called when a read of the server failed; returns what stops it.
@@ -235,7 +235,7 @@ function inert<Row, Key extends keyof Row>(): Local<Row, Key> {
235
235
 
236
236
  const stop = () => () => undefined
237
237
 
238
- return { data: () => [], rows: () => [], get: () => undefined, put: refuse, remove: refuse, unsynced: () => 0, syncStatus: () => 'loading', error: () => undefined, retry: () => undefined, onData: stop, onSync: stop, onIssue: stop, onError: stop, pending: () => true, status: () => 'loading', issues: () => [], dismiss: nothing, sync: Object.assign(nothing, { status: () => 'loading' as const, queued: () => 0 }), clear: nothing }
238
+ return { data: () => [], get: () => undefined, put: refuse, remove: refuse, error: () => undefined, retry: () => undefined, onData: stop, onIssue: stop, onError: stop, pending: () => true, status: () => 'loading', issues: () => [], dismiss: nothing, sync: Object.assign(nothing, { status: () => 'loading' as const, queued: () => 0 }), clear: nothing }
239
239
  }
240
240
 
241
241
  // A collection the island reads and writes at once, kept in IndexedDB so it works offline: a write is applied in the browser and queued, then replayed through the collection's action, once, when the server can be reached.
@@ -252,8 +252,7 @@ class Collection<Row extends object, Key extends keyof Row & string> {
252
252
  private readonly problems = createSignal<LocalIssue<Row>[]>([])
253
253
  private readonly state = createSignal<LocalSyncStatus>('loading')
254
254
  private readonly failure = createSignal<ApiError | undefined>(undefined)
255
- // Tells `value` to `onData` and the same rows as `rows` to the deprecated `onSync`.
256
- private readonly synced = listenerSet<{ value: readonly Row[], rows: readonly Row[] }>()
255
+ private readonly synced = listenerSet<{ value: readonly Row[] }>()
257
256
  private readonly raised = listenerSet<{ issue: LocalIssue<Row> }>()
258
257
  private readonly failed = listenerSet<{ error: ApiError }>()
259
258
  // The issues already told, by id; undefined until the first read, which tells none of those kept from an earlier visit.
@@ -281,9 +280,6 @@ class Collection<Row extends object, Key extends keyof Row & string> {
281
280
  if (options.onData)
282
281
  this.synced.on(options.onData)
283
282
 
284
- if (options.onSync)
285
- this.synced.on(options.onSync)
286
-
287
283
  if (options.onIssue)
288
284
  this.raised.on(options.onIssue)
289
285
 
@@ -307,16 +303,12 @@ class Collection<Row extends object, Key extends keyof Row & string> {
307
303
  api(): Local<Row, Key> {
308
304
  return {
309
305
  data: () => this.view[0]().list,
310
- rows: () => this.view[0]().list,
311
306
  get: key => this.view[0]().byKey.get(String(key)),
312
307
  put: async row => this.write('put', row),
313
308
  remove: async key => this.write('remove', { [this.options.key]: key } as Row),
314
- unsynced: this.count[0],
315
- syncStatus: this.state[0],
316
309
  error: this.failure[0],
317
310
  retry: () => this.again(),
318
311
  onData: this.synced.on,
319
- onSync: this.synced.on,
320
312
  onIssue: this.raised.on,
321
313
  onError: this.failed.on,
322
314
  pending: () => this.state[0]() === 'loading',
@@ -535,7 +527,7 @@ class Collection<Row extends object, Key extends keyof Row & string> {
535
527
  clearTimeout(this.timer)
536
528
  this.paused = false
537
529
 
538
- // Whether this run sent a write or took the server's rows in, so `onSync` has something to tell.
530
+ // Whether this run sent a write or took the server's rows in, so `onData` has something to tell.
539
531
  let moved = false
540
532
 
541
533
  await quiet(async () => locked(async () => {
@@ -552,9 +544,7 @@ class Collection<Row extends object, Key extends keyof Row & string> {
552
544
  this.schedule()
553
545
 
554
546
  if (moved && !this.ended && this.state[0]() === 'synced') {
555
- const rows = this.view[0]().list
556
-
557
- this.synced.emit({ value: rows, rows })
547
+ this.synced.emit({ value: this.view[0]().list })
558
548
  }
559
549
  }
560
550
 
@@ -40,15 +40,12 @@ export function mergeQuery(params: URLSearchParams, changes: QueryChanges): void
40
40
  // Both resolve to `false` when a leave guard was declined, so the page stayed, and `true` otherwise.
41
41
  // kept: free
42
42
  interface Navigate {
43
- /** @deprecated Call `navigate.query(changes)`, so one name does one job. Removed in 1.108.0; `deprecated-navigate-query` rewrites it. */
44
- (to: { query: QueryChanges }, options?: NavigateOptions): Promise<boolean>
45
- // Last, so a path no page serves is reported against it.
46
43
  <const Href extends string>(href: Href & CheckedHref<Href>, options?: NavigateOptions): Promise<boolean>
47
44
  query: (changes: QueryChanges, options?: NavigateOptions) => Promise<boolean>
48
45
  }
49
46
 
50
- async function visit(to: string | { query: QueryChanges }, options: NavigateOptions = {}): Promise<boolean> {
51
- return navigateTo(typeof to === 'string' && navigation.localize ? navigation.localize(to) : to, options, true)
47
+ async function visit(to: string, options: NavigateOptions = {}): Promise<boolean> {
48
+ return navigateTo(navigation.localize ? navigation.localize(to) : to, options, true)
52
49
  }
53
50
 
54
51
  // kept: free
@@ -147,15 +147,3 @@ async function logged<A, T>(fn: (argument: A) => T, argument: A): Promise<Awaite
147
147
  return undefined
148
148
  }
149
149
  }
150
-
151
- // kept: free
152
- /** @deprecated Call `navigation.onBeforeNavigate(fn)`, the hooks of a source being its methods. Removed in 1.108.0; `deprecated-navigation-hooks` rewrites it. */
153
- export function onBeforeNavigate(fn: (event: BeforeNavigate) => boolean | void | Promise<boolean | void>): () => void {
154
- return beforeNavigate(fn)
155
- }
156
-
157
- // kept: free
158
- /** @deprecated Call `navigation.onNavigate(fn)`, the hooks of a source being its methods. Removed in 1.108.0; `deprecated-navigation-hooks` rewrites it. */
159
- export function onNavigate(fn: (event: NavigateEvent) => unknown): () => void {
160
- return afterNavigate(fn)
161
- }
@@ -12,7 +12,7 @@ import { mergeHead, runnable, scriptMarkup, swapRoot } from './swap-head'
12
12
  import { checkKept, heldLate, holding, swapBody } from './swap-kept'
13
13
  import { MISSING } from './swap-morph'
14
14
  import { transitioned, viewTransitions } from './swap-transition'
15
- import { addressChanged } from './with-query'
15
+ import { addressChanged, followAddress } from './with-query'
16
16
 
17
17
  export { HTML, PAGE_TIMEOUT_MS, prefetch } from './swap-fetch'
18
18
  export { CHUNK_TIMEOUT_MS } from './swap-flight'
@@ -93,13 +93,12 @@ function markPending(link: Element | undefined): void {
93
93
  link?.setAttribute('data-pending', '')
94
94
  }
95
95
 
96
- // The nearest `data-scroll` decides, `"top"` meaning a plain scroll to the top, and the nearest `data-transition`, `"false"` meaning none; `data-keep-scroll` and `data-no-transition` are their names before 1.105, read until 1.108.
96
+ // The nearest `data-scroll` decides, `"top"` meaning a plain scroll to the top, and the nearest `data-transition`, `"false"` meaning none.
97
97
  function linkOptions(link: Element): Pick<Swap, 'scroll' | 'transition'> {
98
- const keeper = link.closest('[data-scroll],[data-keep-scroll]')
99
- const changer = link.closest('[data-transition],[data-no-transition]')
100
- const kept = keeper?.getAttribute('data-scroll') ?? keeper?.getAttribute('data-keep-scroll')
98
+ const keeper = link.closest('[data-scroll]')
99
+ const changer = link.closest('[data-transition]')
101
100
 
102
- return { scroll: keeper && kept !== 'top' && kept !== 'false' ? 'keep' : undefined, transition: !changer || (!changer.hasAttribute('data-no-transition') && changer.getAttribute('data-transition') !== 'false') }
101
+ return { scroll: keeper && keeper.getAttribute('data-scroll') !== 'top' ? 'keep' : undefined, transition: changer?.getAttribute('data-transition') !== 'false' }
103
102
  }
104
103
 
105
104
  async function swapTo(url: URL, swap: Swap): Promise<void> {
@@ -452,6 +451,7 @@ async function showPage(page: FetchedPage, hash: string, swap: Swap, isCurrent:
452
451
 
453
452
  forgetPageData()
454
453
  writeHistory(policy, target)
454
+ followAddress()
455
455
  addressChanged()
456
456
 
457
457
  if (pageKey(target) !== navigation.shown)