@kayjs/kay 1.108.0 → 1.110.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 (595) hide show
  1. package/dist/eslint.js +2093 -3774
  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-library-conventions.md +1 -1
  12. package/llms/components.md +5 -5
  13. package/llms/deprecated-lints.md +2 -7
  14. package/llms/effects.md +1 -1
  15. package/llms/errors.md +2 -2
  16. package/llms/events.md +1 -1
  17. package/llms/guards.md +1 -1
  18. package/llms/head.md +1 -1
  19. package/llms/hooks.md +2 -2
  20. package/llms/images.md +1 -1
  21. package/llms/island-and-form-lints.md +4 -2
  22. package/llms/island-sources.md +1 -1
  23. package/llms/islands-state-to-ids.md +2 -2
  24. package/llms/islands.md +8 -4
  25. package/llms/lints.md +1 -1
  26. package/llms/live-values.md +4 -4
  27. package/llms/local-collections.md +1 -1
  28. package/llms/locales.md +1 -1
  29. package/llms/mcp.md +2 -2
  30. package/llms/metrics.md +1 -1
  31. package/llms/navigation-from-code.md +7 -7
  32. package/llms/navigation.md +4 -2
  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/templates-elements-slots-snippets.md +2 -2
  46. package/llms/testing-mount.md +49 -0
  47. package/llms/testing.md +4 -45
  48. package/llms/upgrading-1-105-config.md +13 -13
  49. package/llms/upgrading-archive.md +64 -74
  50. package/llms/upgrading.md +92 -70
  51. package/llms/whats-new.md +24 -0
  52. package/llms.txt +5 -6
  53. package/package.json +6 -10
  54. package/src/build/route-sizes.ts +2 -3
  55. package/src/build/variants.ts +132 -18
  56. package/src/check/browser-global-reads.ts +2 -2
  57. package/src/check/config-objects.ts +1 -1
  58. package/src/check/diagnose.ts +0 -22
  59. package/src/check/env-types.ts +1 -1
  60. package/src/check/export-homes.ts +1 -1
  61. package/src/check/guards.ts +3 -3
  62. package/src/check/index.ts +2 -7
  63. package/src/check/moved-keys.ts +1 -1
  64. package/src/check/project.ts +6 -7
  65. package/src/check/schema-builders.ts +125 -26
  66. package/src/check/shadow-types.ts +0 -86
  67. package/src/commands/check.ts +2 -2
  68. package/src/commands/env.ts +25 -3
  69. package/src/commands/upgrade.ts +2 -1
  70. package/src/compiler/allow-comments.ts +38 -2
  71. package/src/compiler/ast.ts +21 -19
  72. package/src/compiler/browser.ts +2 -14
  73. package/src/compiler/class-items.ts +16 -0
  74. package/src/compiler/codegen.ts +10 -10
  75. package/src/compiler/deprecated-library.ts +0 -12
  76. package/src/compiler/deprecated-lints-1-106.ts +2 -2
  77. package/src/compiler/deprecated-lints.ts +3 -495
  78. package/src/compiler/deprecated-ui-props.ts +5 -5
  79. package/src/compiler/errors.ts +2 -2
  80. package/src/compiler/fence-checks.ts +2 -121
  81. package/src/compiler/hand-parts.ts +83 -0
  82. package/src/compiler/helper-imports.ts +2 -2
  83. package/src/compiler/image-attributes.ts +1 -3
  84. package/src/compiler/index.ts +23 -23
  85. package/src/compiler/island-arguments.ts +17 -95
  86. package/src/compiler/island-cause.ts +7 -7
  87. package/src/compiler/island-declaration.ts +2 -8
  88. package/src/compiler/island-lints.ts +19 -0
  89. package/src/compiler/island-marker.ts +3 -3
  90. package/src/compiler/island-problems.ts +25 -0
  91. package/src/compiler/items.ts +12 -0
  92. package/src/compiler/jsx-class.ts +1 -25
  93. package/src/compiler/jsx.ts +7 -6
  94. package/src/compiler/kay-exports.ts +0 -2
  95. package/src/compiler/link-flags.ts +9 -38
  96. package/src/compiler/lints.ts +10 -18
  97. package/src/compiler/markup.ts +33 -41
  98. package/src/compiler/module-signals.ts +2 -2
  99. package/src/compiler/names.ts +1 -1
  100. package/src/compiler/page-settings.ts +11 -0
  101. package/src/compiler/parser.ts +6 -8
  102. package/src/compiler/plan.ts +1 -3
  103. package/src/compiler/removed-lints.ts +90 -0
  104. package/src/compiler/rewrite.ts +3 -18
  105. package/src/compiler/script-server.ts +8 -3
  106. package/src/compiler/signal-from-prop.ts +141 -0
  107. package/src/compiler/template-reads.ts +16 -0
  108. package/src/compiler/validate.ts +3 -8
  109. package/src/config-loader.ts +14 -4
  110. package/src/config-resolve.ts +18 -142
  111. package/src/config-shape.ts +44 -34
  112. package/src/config.ts +10 -114
  113. package/src/dev/preload.ts +4 -1
  114. package/src/lsp/server.ts +4 -0
  115. package/src/migrate/markup.ts +4 -1
  116. package/src/runtime/action-call.ts +0 -8
  117. package/src/runtime/action-encode.ts +26 -0
  118. package/src/runtime/action-error.ts +3 -11
  119. package/src/runtime/action-protection.ts +2 -2
  120. package/src/runtime/action-run.ts +2 -27
  121. package/src/runtime/action-shared.ts +14 -37
  122. package/src/runtime/action-stream.ts +0 -1
  123. package/src/runtime/action.ts +1 -1
  124. package/src/runtime/call-result.ts +2 -10
  125. package/src/runtime/checks.ts +25 -13
  126. package/src/runtime/client.ts +7 -11
  127. package/src/runtime/core.ts +5 -23
  128. package/src/runtime/dom.ts +1 -1
  129. package/src/runtime/html.ts +1 -1
  130. package/src/runtime/i18n.client.ts +1 -4
  131. package/src/runtime/i18n.server.ts +1 -4
  132. package/src/runtime/i18n.ts +3 -3
  133. package/src/runtime/image.ts +2 -19
  134. package/src/runtime/index.ts +3 -3
  135. package/src/runtime/island.server.ts +56 -13
  136. package/src/runtime/live-resource.server.ts +0 -1
  137. package/src/runtime/live-value.server.ts +2 -2
  138. package/src/runtime/live-value.shared.ts +7 -20
  139. package/src/runtime/live.ts +1 -12
  140. package/src/runtime/local-types.ts +1 -11
  141. package/src/runtime/local.ts +4 -14
  142. package/src/runtime/navigate-api.ts +2 -5
  143. package/src/runtime/navigate.ts +9 -0
  144. package/src/runtime/navigation-state.ts +0 -12
  145. package/src/runtime/navigation.ts +5 -1
  146. package/src/runtime/page-swap.ts +8 -8
  147. package/src/runtime/persist.ts +11 -3
  148. package/src/runtime/persisted.ts +4 -30
  149. package/src/runtime/presence.ts +6 -7
  150. package/src/runtime/query-param.ts +20 -12
  151. package/src/runtime/reactive.ts +3 -1
  152. package/src/runtime/refuse.ts +3 -17
  153. package/src/runtime/store-base.ts +4 -6
  154. package/src/runtime/swap-fetch.ts +1 -1
  155. package/src/runtime/swap-flight.ts +10 -10
  156. package/src/runtime/swap-kept.ts +69 -29
  157. package/src/runtime/swap-morph.ts +49 -9
  158. package/src/runtime/text-hash.ts +17 -0
  159. package/src/runtime/uid.server.ts +6 -4
  160. package/src/runtime/values.ts +52 -23
  161. package/src/runtime/with-query.ts +9 -0
  162. package/src/server/action-hooks.ts +8 -8
  163. package/src/server/actions.ts +13 -14
  164. package/src/server/api-modules.ts +2 -3
  165. package/src/server/app-stages.ts +15 -33
  166. package/src/server/app.ts +10 -5
  167. package/src/server/auth-mails.ts +0 -2
  168. package/src/server/env-state.ts +40 -10
  169. package/src/server/flash.ts +1 -1
  170. package/src/server/guard-requirement.ts +4 -4
  171. package/src/server/image.ts +2 -2
  172. package/src/server/index.ts +0 -2
  173. package/src/server/job-context.ts +3 -3
  174. package/src/server/jobs-page.ts +1 -1
  175. package/src/server/jobs.ts +5 -9
  176. package/src/server/kept-exports.ts +0 -2
  177. package/src/server/kv.ts +11 -14
  178. package/src/server/library.ts +1 -3
  179. package/src/server/live.ts +2 -2
  180. package/src/server/mcp.ts +3 -9
  181. package/src/server/metrics.ts +2 -4
  182. package/src/server/page-settings.ts +10 -19
  183. package/src/server/prerender.ts +19 -2
  184. package/src/server/protection.ts +15 -18
  185. package/src/server/queue.ts +3 -6
  186. package/src/server/rate-limit.ts +0 -3
  187. package/src/server/render-document.ts +9 -7
  188. package/src/server/render.ts +1 -1
  189. package/src/server/routes.ts +7 -3
  190. package/src/server/scope.ts +3 -2
  191. package/src/server/session.ts +5 -6
  192. package/src/server/setup.ts +1 -1
  193. package/src/server/signals.ts +17 -7
  194. package/src/server/signed.ts +1 -3
  195. package/src/server/source.ts +20 -4
  196. package/src/server/speculation.ts +1 -1
  197. package/src/server/storage.ts +3 -8
  198. package/src/server/validate.ts +1 -1
  199. package/src/server/vitals.ts +1 -3
  200. package/src/server/work-scope.ts +2 -4
  201. package/src/server/work.ts +1 -1
  202. package/src/server/workflow.ts +1 -1
  203. package/src/test/index.ts +2 -1
  204. package/src/test/site-actions.ts +16 -6
  205. package/src/test/site-keys.ts +10 -15
  206. package/src/test/site-socket.ts +1 -2
  207. package/src/test/site-types.ts +0 -8
  208. package/types/build/route-sizes.d.ts.map +1 -1
  209. package/types/build/variants.d.ts +9 -1
  210. package/types/build/variants.d.ts.map +1 -1
  211. package/types/check/diagnose.d.ts.map +1 -1
  212. package/types/check/index.d.ts +1 -2
  213. package/types/check/index.d.ts.map +1 -1
  214. package/types/check/project.d.ts.map +1 -1
  215. package/types/check/schema-builders.d.ts.map +1 -1
  216. package/types/check/shadow-types.d.ts.map +1 -1
  217. package/types/commands/env.d.ts.map +1 -1
  218. package/types/commands/upgrade.d.ts.map +1 -1
  219. package/types/compiler/allow-comments.d.ts +2 -0
  220. package/types/compiler/allow-comments.d.ts.map +1 -1
  221. package/types/compiler/ast.d.ts +1 -2
  222. package/types/compiler/ast.d.ts.map +1 -1
  223. package/types/compiler/browser.d.ts.map +1 -1
  224. package/types/compiler/class-items.d.ts +7 -0
  225. package/types/compiler/class-items.d.ts.map +1 -0
  226. package/types/compiler/deprecated-library.d.ts.map +1 -1
  227. package/types/compiler/deprecated-lints-1-106.d.ts +2 -2
  228. package/types/compiler/deprecated-lints-1-106.d.ts.map +1 -1
  229. package/types/compiler/deprecated-lints.d.ts +2 -553
  230. package/types/compiler/deprecated-lints.d.ts.map +1 -1
  231. package/types/compiler/deprecated-ui-props.d.ts +1 -8
  232. package/types/compiler/deprecated-ui-props.d.ts.map +1 -1
  233. package/types/compiler/errors.d.ts +2 -2
  234. package/types/compiler/errors.d.ts.map +1 -1
  235. package/types/compiler/fence-checks.d.ts +0 -1
  236. package/types/compiler/fence-checks.d.ts.map +1 -1
  237. package/types/compiler/hand-parts.d.ts +10 -0
  238. package/types/compiler/hand-parts.d.ts.map +1 -0
  239. package/types/compiler/image-attributes.d.ts +0 -1
  240. package/types/compiler/image-attributes.d.ts.map +1 -1
  241. package/types/compiler/index.d.ts.map +1 -1
  242. package/types/compiler/island-arguments.d.ts +7 -11
  243. package/types/compiler/island-arguments.d.ts.map +1 -1
  244. package/types/compiler/island-cause.d.ts +1 -1
  245. package/types/compiler/island-cause.d.ts.map +1 -1
  246. package/types/compiler/island-declaration.d.ts +1 -3
  247. package/types/compiler/island-declaration.d.ts.map +1 -1
  248. package/types/compiler/island-lints.d.ts +17 -0
  249. package/types/compiler/island-lints.d.ts.map +1 -0
  250. package/types/compiler/island-problems.d.ts +7 -0
  251. package/types/compiler/island-problems.d.ts.map +1 -0
  252. package/types/compiler/items.d.ts +1 -0
  253. package/types/compiler/items.d.ts.map +1 -1
  254. package/types/compiler/jsx-class.d.ts +1 -2
  255. package/types/compiler/jsx-class.d.ts.map +1 -1
  256. package/types/compiler/jsx.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 +21 -566
  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/removed-lints.d.ts +3 -0
  271. package/types/compiler/removed-lints.d.ts.map +1 -0
  272. package/types/compiler/script-server.d.ts.map +1 -1
  273. package/types/compiler/signal-from-prop.d.ts +4 -0
  274. package/types/compiler/signal-from-prop.d.ts.map +1 -0
  275. package/types/compiler/template-reads.d.ts +1 -0
  276. package/types/compiler/template-reads.d.ts.map +1 -1
  277. package/types/compiler/validate.d.ts.map +1 -1
  278. package/types/config-loader.d.ts.map +1 -1
  279. package/types/config-resolve.d.ts.map +1 -1
  280. package/types/config-shape.d.ts +1 -1
  281. package/types/config-shape.d.ts.map +1 -1
  282. package/types/config.d.ts +5 -105
  283. package/types/config.d.ts.map +1 -1
  284. package/types/dev/preload.d.ts.map +1 -1
  285. package/types/lsp/server.d.ts.map +1 -1
  286. package/types/migrate/markup.d.ts.map +1 -1
  287. package/types/runtime/action-call.d.ts.map +1 -1
  288. package/types/runtime/action-encode.d.ts +1 -0
  289. package/types/runtime/action-encode.d.ts.map +1 -1
  290. package/types/runtime/action-error.d.ts +1 -2
  291. package/types/runtime/action-error.d.ts.map +1 -1
  292. package/types/runtime/action-run.d.ts.map +1 -1
  293. package/types/runtime/action-shared.d.ts +1 -27
  294. package/types/runtime/action-shared.d.ts.map +1 -1
  295. package/types/runtime/action-stream.d.ts.map +1 -1
  296. package/types/runtime/action.d.ts +1 -1
  297. package/types/runtime/action.d.ts.map +1 -1
  298. package/types/runtime/call-result.d.ts +0 -10
  299. package/types/runtime/call-result.d.ts.map +1 -1
  300. package/types/runtime/checks.d.ts +14 -11
  301. package/types/runtime/checks.d.ts.map +1 -1
  302. package/types/runtime/client.d.ts.map +1 -1
  303. package/types/runtime/core.d.ts +2 -20
  304. package/types/runtime/core.d.ts.map +1 -1
  305. package/types/runtime/dom.d.ts +1 -1
  306. package/types/runtime/dom.d.ts.map +1 -1
  307. package/types/runtime/html.d.ts +1 -1
  308. package/types/runtime/html.d.ts.map +1 -1
  309. package/types/runtime/i18n.client.d.ts +0 -1
  310. package/types/runtime/i18n.client.d.ts.map +1 -1
  311. package/types/runtime/i18n.d.ts +1 -1
  312. package/types/runtime/i18n.d.ts.map +1 -1
  313. package/types/runtime/i18n.server.d.ts +0 -1
  314. package/types/runtime/i18n.server.d.ts.map +1 -1
  315. package/types/runtime/image.d.ts.map +1 -1
  316. package/types/runtime/index.d.ts +3 -3
  317. package/types/runtime/index.d.ts.map +1 -1
  318. package/types/runtime/island.server.d.ts +2 -0
  319. package/types/runtime/island.server.d.ts.map +1 -1
  320. package/types/runtime/live-resource.server.d.ts.map +1 -1
  321. package/types/runtime/live-value.shared.d.ts +7 -15
  322. package/types/runtime/live-value.shared.d.ts.map +1 -1
  323. package/types/runtime/live.d.ts +0 -11
  324. package/types/runtime/live.d.ts.map +1 -1
  325. package/types/runtime/local-types.d.ts +0 -14
  326. package/types/runtime/local-types.d.ts.map +1 -1
  327. package/types/runtime/navigate-api.d.ts +0 -4
  328. package/types/runtime/navigate-api.d.ts.map +1 -1
  329. package/types/runtime/navigate.d.ts.map +1 -1
  330. package/types/runtime/navigation-state.d.ts +0 -4
  331. package/types/runtime/navigation-state.d.ts.map +1 -1
  332. package/types/runtime/navigation.d.ts +2 -0
  333. package/types/runtime/navigation.d.ts.map +1 -1
  334. package/types/runtime/page-swap.d.ts.map +1 -1
  335. package/types/runtime/persist.d.ts +1 -0
  336. package/types/runtime/persist.d.ts.map +1 -1
  337. package/types/runtime/persisted.d.ts +0 -15
  338. package/types/runtime/persisted.d.ts.map +1 -1
  339. package/types/runtime/presence.d.ts +0 -2
  340. package/types/runtime/presence.d.ts.map +1 -1
  341. package/types/runtime/query-param.d.ts.map +1 -1
  342. package/types/runtime/reactive.d.ts +2 -1
  343. package/types/runtime/reactive.d.ts.map +1 -1
  344. package/types/runtime/refuse.d.ts +0 -7
  345. package/types/runtime/refuse.d.ts.map +1 -1
  346. package/types/runtime/store-base.d.ts +1 -2
  347. package/types/runtime/store-base.d.ts.map +1 -1
  348. package/types/runtime/swap-flight.d.ts +1 -1
  349. package/types/runtime/swap-flight.d.ts.map +1 -1
  350. package/types/runtime/swap-kept.d.ts.map +1 -1
  351. package/types/runtime/swap-morph.d.ts.map +1 -1
  352. package/types/runtime/text-hash.d.ts +2 -0
  353. package/types/runtime/text-hash.d.ts.map +1 -0
  354. package/types/runtime/uid.server.d.ts.map +1 -1
  355. package/types/runtime/values.d.ts +6 -1
  356. package/types/runtime/values.d.ts.map +1 -1
  357. package/types/runtime/with-query.d.ts +2 -0
  358. package/types/runtime/with-query.d.ts.map +1 -1
  359. package/types/server/action-hooks.d.ts +4 -4
  360. package/types/server/action-hooks.d.ts.map +1 -1
  361. package/types/server/actions.d.ts.map +1 -1
  362. package/types/server/api-modules.d.ts +0 -1
  363. package/types/server/api-modules.d.ts.map +1 -1
  364. package/types/server/app-stages.d.ts +5 -13
  365. package/types/server/app-stages.d.ts.map +1 -1
  366. package/types/server/app.d.ts +3 -8
  367. package/types/server/app.d.ts.map +1 -1
  368. package/types/server/auth-mails.d.ts +0 -5
  369. package/types/server/auth-mails.d.ts.map +1 -1
  370. package/types/server/env-state.d.ts +1 -0
  371. package/types/server/env-state.d.ts.map +1 -1
  372. package/types/server/guard-requirement.d.ts +0 -1
  373. package/types/server/guard-requirement.d.ts.map +1 -1
  374. package/types/server/image.d.ts +0 -1
  375. package/types/server/image.d.ts.map +1 -1
  376. package/types/server/index.d.ts +0 -2
  377. package/types/server/index.d.ts.map +1 -1
  378. package/types/server/job-context.d.ts +1 -1
  379. package/types/server/job-context.d.ts.map +1 -1
  380. package/types/server/jobs.d.ts +0 -4
  381. package/types/server/jobs.d.ts.map +1 -1
  382. package/types/server/kept-exports.d.ts.map +1 -1
  383. package/types/server/kv.d.ts +4 -4
  384. package/types/server/kv.d.ts.map +1 -1
  385. package/types/server/library.d.ts +1 -3
  386. package/types/server/library.d.ts.map +1 -1
  387. package/types/server/mcp.d.ts +0 -1
  388. package/types/server/mcp.d.ts.map +1 -1
  389. package/types/server/metrics.d.ts +0 -5
  390. package/types/server/metrics.d.ts.map +1 -1
  391. package/types/server/page-settings.d.ts +3 -3
  392. package/types/server/page-settings.d.ts.map +1 -1
  393. package/types/server/prerender.d.ts.map +1 -1
  394. package/types/server/protection.d.ts +6 -6
  395. package/types/server/protection.d.ts.map +1 -1
  396. package/types/server/queue.d.ts +1 -3
  397. package/types/server/queue.d.ts.map +1 -1
  398. package/types/server/rate-limit.d.ts +0 -2
  399. package/types/server/rate-limit.d.ts.map +1 -1
  400. package/types/server/render-document.d.ts +1 -1
  401. package/types/server/render-document.d.ts.map +1 -1
  402. package/types/server/routes.d.ts +1 -1
  403. package/types/server/routes.d.ts.map +1 -1
  404. package/types/server/scope.d.ts.map +1 -1
  405. package/types/server/session.d.ts +1 -1
  406. package/types/server/session.d.ts.map +1 -1
  407. package/types/server/signals.d.ts.map +1 -1
  408. package/types/server/signed.d.ts +0 -2
  409. package/types/server/signed.d.ts.map +1 -1
  410. package/types/server/source.d.ts +1 -1
  411. package/types/server/source.d.ts.map +1 -1
  412. package/types/server/storage.d.ts +0 -4
  413. package/types/server/storage.d.ts.map +1 -1
  414. package/types/server/vitals.d.ts +0 -1
  415. package/types/server/vitals.d.ts.map +1 -1
  416. package/types/server/work-scope.d.ts +0 -2
  417. package/types/server/work-scope.d.ts.map +1 -1
  418. package/types/server/workflow.d.ts +1 -1
  419. package/types/server/workflow.d.ts.map +1 -1
  420. package/types/test/index.d.ts.map +1 -1
  421. package/types/test/site-actions.d.ts +1 -1
  422. package/types/test/site-actions.d.ts.map +1 -1
  423. package/types/test/site-keys.d.ts +1 -1
  424. package/types/test/site-keys.d.ts.map +1 -1
  425. package/types/test/site-socket.d.ts +1 -1
  426. package/types/test/site-socket.d.ts.map +1 -1
  427. package/types/test/site-types.d.ts +0 -8
  428. package/types/test/site-types.d.ts.map +1 -1
  429. package/llms/deprecated-lints-1-105-libraries.md +0 -32
  430. package/llms/deprecated-lints-1-105.md +0 -58
  431. package/src/check/action-readers.ts +0 -115
  432. package/src/check/action-type.ts +0 -44
  433. package/src/check/ai-language.ts +0 -56
  434. package/src/check/app-hooks.ts +0 -90
  435. package/src/check/auth-methods.ts +0 -85
  436. package/src/check/auth-rate-limits.ts +0 -99
  437. package/src/check/call-result.ts +0 -242
  438. package/src/check/client-keys.ts +0 -10
  439. package/src/check/cms-options.ts +0 -81
  440. package/src/check/config-groups.ts +0 -22
  441. package/src/check/config-switches.ts +0 -38
  442. package/src/check/context-import.ts +0 -51
  443. package/src/check/env-files.ts +0 -31
  444. package/src/check/format-duration.ts +0 -75
  445. package/src/check/guard-options.ts +0 -58
  446. package/src/check/handler-events.ts +0 -149
  447. package/src/check/hook-context.ts +0 -94
  448. package/src/check/hook-names.ts +0 -104
  449. package/src/check/i18n-keys.ts +0 -50
  450. package/src/check/images-keys.ts +0 -54
  451. package/src/check/job-shapes.ts +0 -273
  452. package/src/check/link-flag-tests.ts +0 -130
  453. package/src/check/live-api.ts +0 -137
  454. package/src/check/mail-api.ts +0 -67
  455. package/src/check/one-state-api.ts +0 -357
  456. package/src/check/pages-options.ts +0 -35
  457. package/src/check/rate-enforce.ts +0 -53
  458. package/src/check/refusal-calls.ts +0 -185
  459. package/src/check/retired-lints.ts +0 -49
  460. package/src/check/route-keys.ts +0 -166
  461. package/src/check/secret-keys.ts +0 -83
  462. package/src/check/socket-frames.ts +0 -102
  463. package/src/check/source-readers.ts +0 -257
  464. package/src/check/store-ms.ts +0 -72
  465. package/src/check/store-names.ts +0 -88
  466. package/src/check/test-helpers.ts +0 -98
  467. package/src/check/ttl-names.ts +0 -142
  468. package/src/compiler/deprecated-ai-labels.ts +0 -97
  469. package/src/compiler/deprecated-ai-links.ts +0 -63
  470. package/src/compiler/deprecated-allow.ts +0 -50
  471. package/src/compiler/deprecated-auth-lints.ts +0 -14
  472. package/src/compiler/deprecated-auth-signed.ts +0 -29
  473. package/src/compiler/deprecated-children.ts +0 -66
  474. package/src/compiler/deprecated-image.ts +0 -116
  475. package/src/compiler/deprecated-island.ts +0 -155
  476. package/src/compiler/deprecated-lints-1-105.ts +0 -41
  477. package/src/compiler/deprecated-page.ts +0 -125
  478. package/src/compiler/deprecated-parts.ts +0 -22
  479. package/src/compiler/deprecated-typed-lints.ts +0 -23
  480. package/src/compiler/deprecated-ui-callbacks.ts +0 -66
  481. package/src/compiler/deprecated-ui-input.ts +0 -97
  482. package/src/compiler/deprecated-ui-items.ts +0 -47
  483. package/src/compiler/old-parts.ts +0 -84
  484. package/src/runtime/mount.compat.ts +0 -8
  485. package/src/server/moved-exports.ts +0 -17
  486. package/types/check/action-readers.d.ts +0 -3
  487. package/types/check/action-readers.d.ts.map +0 -1
  488. package/types/check/action-type.d.ts +0 -3
  489. package/types/check/action-type.d.ts.map +0 -1
  490. package/types/check/ai-language.d.ts +0 -3
  491. package/types/check/ai-language.d.ts.map +0 -1
  492. package/types/check/app-hooks.d.ts +0 -3
  493. package/types/check/app-hooks.d.ts.map +0 -1
  494. package/types/check/auth-methods.d.ts +0 -3
  495. package/types/check/auth-methods.d.ts.map +0 -1
  496. package/types/check/auth-rate-limits.d.ts +0 -3
  497. package/types/check/auth-rate-limits.d.ts.map +0 -1
  498. package/types/check/call-result.d.ts +0 -7
  499. package/types/check/call-result.d.ts.map +0 -1
  500. package/types/check/client-keys.d.ts +0 -3
  501. package/types/check/client-keys.d.ts.map +0 -1
  502. package/types/check/cms-options.d.ts +0 -3
  503. package/types/check/cms-options.d.ts.map +0 -1
  504. package/types/check/config-groups.d.ts +0 -3
  505. package/types/check/config-groups.d.ts.map +0 -1
  506. package/types/check/config-switches.d.ts +0 -3
  507. package/types/check/config-switches.d.ts.map +0 -1
  508. package/types/check/context-import.d.ts +0 -3
  509. package/types/check/context-import.d.ts.map +0 -1
  510. package/types/check/env-files.d.ts +0 -3
  511. package/types/check/env-files.d.ts.map +0 -1
  512. package/types/check/format-duration.d.ts +0 -5
  513. package/types/check/format-duration.d.ts.map +0 -1
  514. package/types/check/guard-options.d.ts +0 -3
  515. package/types/check/guard-options.d.ts.map +0 -1
  516. package/types/check/handler-events.d.ts +0 -9
  517. package/types/check/handler-events.d.ts.map +0 -1
  518. package/types/check/hook-context.d.ts +0 -3
  519. package/types/check/hook-context.d.ts.map +0 -1
  520. package/types/check/hook-names.d.ts +0 -3
  521. package/types/check/hook-names.d.ts.map +0 -1
  522. package/types/check/i18n-keys.d.ts +0 -3
  523. package/types/check/i18n-keys.d.ts.map +0 -1
  524. package/types/check/images-keys.d.ts +0 -3
  525. package/types/check/images-keys.d.ts.map +0 -1
  526. package/types/check/job-shapes.d.ts +0 -6
  527. package/types/check/job-shapes.d.ts.map +0 -1
  528. package/types/check/link-flag-tests.d.ts +0 -4
  529. package/types/check/link-flag-tests.d.ts.map +0 -1
  530. package/types/check/live-api.d.ts +0 -3
  531. package/types/check/live-api.d.ts.map +0 -1
  532. package/types/check/mail-api.d.ts +0 -3
  533. package/types/check/mail-api.d.ts.map +0 -1
  534. package/types/check/one-state-api.d.ts +0 -9
  535. package/types/check/one-state-api.d.ts.map +0 -1
  536. package/types/check/pages-options.d.ts +0 -3
  537. package/types/check/pages-options.d.ts.map +0 -1
  538. package/types/check/rate-enforce.d.ts +0 -3
  539. package/types/check/rate-enforce.d.ts.map +0 -1
  540. package/types/check/refusal-calls.d.ts +0 -3
  541. package/types/check/refusal-calls.d.ts.map +0 -1
  542. package/types/check/retired-lints.d.ts +0 -3
  543. package/types/check/retired-lints.d.ts.map +0 -1
  544. package/types/check/route-keys.d.ts +0 -3
  545. package/types/check/route-keys.d.ts.map +0 -1
  546. package/types/check/secret-keys.d.ts +0 -3
  547. package/types/check/secret-keys.d.ts.map +0 -1
  548. package/types/check/socket-frames.d.ts +0 -3
  549. package/types/check/socket-frames.d.ts.map +0 -1
  550. package/types/check/source-readers.d.ts +0 -3
  551. package/types/check/source-readers.d.ts.map +0 -1
  552. package/types/check/store-ms.d.ts +0 -3
  553. package/types/check/store-ms.d.ts.map +0 -1
  554. package/types/check/store-names.d.ts +0 -3
  555. package/types/check/store-names.d.ts.map +0 -1
  556. package/types/check/test-helpers.d.ts +0 -3
  557. package/types/check/test-helpers.d.ts.map +0 -1
  558. package/types/check/ttl-names.d.ts +0 -3
  559. package/types/check/ttl-names.d.ts.map +0 -1
  560. package/types/compiler/deprecated-ai-labels.d.ts +0 -5
  561. package/types/compiler/deprecated-ai-labels.d.ts.map +0 -1
  562. package/types/compiler/deprecated-ai-links.d.ts +0 -5
  563. package/types/compiler/deprecated-ai-links.d.ts.map +0 -1
  564. package/types/compiler/deprecated-allow.d.ts +0 -5
  565. package/types/compiler/deprecated-allow.d.ts.map +0 -1
  566. package/types/compiler/deprecated-auth-lints.d.ts +0 -12
  567. package/types/compiler/deprecated-auth-lints.d.ts.map +0 -1
  568. package/types/compiler/deprecated-auth-signed.d.ts +0 -5
  569. package/types/compiler/deprecated-auth-signed.d.ts.map +0 -1
  570. package/types/compiler/deprecated-children.d.ts +0 -4
  571. package/types/compiler/deprecated-children.d.ts.map +0 -1
  572. package/types/compiler/deprecated-image.d.ts +0 -5
  573. package/types/compiler/deprecated-image.d.ts.map +0 -1
  574. package/types/compiler/deprecated-island.d.ts +0 -9
  575. package/types/compiler/deprecated-island.d.ts.map +0 -1
  576. package/types/compiler/deprecated-lints-1-105.d.ts +0 -39
  577. package/types/compiler/deprecated-lints-1-105.d.ts.map +0 -1
  578. package/types/compiler/deprecated-page.d.ts +0 -4
  579. package/types/compiler/deprecated-page.d.ts.map +0 -1
  580. package/types/compiler/deprecated-parts.d.ts +0 -3
  581. package/types/compiler/deprecated-parts.d.ts.map +0 -1
  582. package/types/compiler/deprecated-typed-lints.d.ts +0 -21
  583. package/types/compiler/deprecated-typed-lints.d.ts.map +0 -1
  584. package/types/compiler/deprecated-ui-callbacks.d.ts +0 -5
  585. package/types/compiler/deprecated-ui-callbacks.d.ts.map +0 -1
  586. package/types/compiler/deprecated-ui-input.d.ts +0 -5
  587. package/types/compiler/deprecated-ui-input.d.ts.map +0 -1
  588. package/types/compiler/deprecated-ui-items.d.ts +0 -5
  589. package/types/compiler/deprecated-ui-items.d.ts.map +0 -1
  590. package/types/compiler/old-parts.d.ts +0 -9
  591. package/types/compiler/old-parts.d.ts.map +0 -1
  592. package/types/runtime/mount.compat.d.ts +0 -7
  593. package/types/runtime/mount.compat.d.ts.map +0 -1
  594. package/types/server/moved-exports.d.ts +0 -12
  595. package/types/server/moved-exports.d.ts.map +0 -1
@@ -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, partProps, 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, partProps, 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
@@ -1,5 +1,6 @@
1
1
  import { KayError } from './kay-error'
2
2
  import { kayLog } from './log'
3
+ import { textHash } from './text-hash'
3
4
 
4
5
  declare const KAY_BROWSER: true | undefined
5
6
 
@@ -265,25 +266,7 @@ export function requestedRemoteVariants(): { src: string, name: string, variant:
265
266
 
266
267
  // Named after a hash of the URL.
267
268
  export function remoteVariantName(src: string, variant: ImageVariant): string {
268
- return `remote-${urlHash(src)}${variantSuffix(variant)}`
269
- }
270
-
271
- // cyrb53, 53 bits of a string's hash in base 36.
272
- function urlHash(text: string): string {
273
- let h1 = 0xDEADBEEF
274
- let h2 = 0x41C6CE57
275
-
276
- for (let index = 0; index < text.length; index++) {
277
- const code = text.charCodeAt(index)
278
-
279
- h1 = Math.imul(h1 ^ code, 2654435761)
280
- h2 = Math.imul(h2 ^ code, 1597334677)
281
- }
282
-
283
- h1 = Math.imul(h1 ^ (h1 >>> 16), 2246822507) ^ Math.imul(h2 ^ (h2 >>> 13), 3266489909)
284
- h2 = Math.imul(h2 ^ (h2 >>> 16), 2246822507) ^ Math.imul(h1 ^ (h1 >>> 13), 3266489909)
285
-
286
- return (4294967296 * (2097151 & h2) + (h1 >>> 0)).toString(36)
269
+ return `remote-${textHash(src)}${variantSuffix(variant)}`
287
270
  }
288
271
 
289
272
  function currentMaxDensity(): number {
@@ -9,7 +9,7 @@ export { announce } from './announce'
9
9
  export type { ErrorShape } from './api-error'
10
10
  export { localPath, withBase } from './base'
11
11
  export { byteCount } from './byte-count'
12
- export type { ApiRoutesOf, AwaitProps, Bindable, BindableMark, BoundProp, BoundValue, CheckedComputedHtml, CheckedHref, CheckedHtml, Deferred, ExtensionServersOf, FunctionProp, HandedPart, HandedSignal, HandsPart, HydrateWhen, Inferred, IslandAsks, IslandBrand, IslandComponent, IslandOptions, IslandProp, Locals, LocalsOf, PartClass, PlainIslandProp, Redirect, Register, RouteParams, SafeHtml, ServerOfModule, SlotCall, TemplateHelpers, Truthy, UnkeyedRows, Unmatched, UnresolvedParameter } from './checks'
12
+ export type { ApiRoutesOf, AwaitProps, Bindable, BindableMark, BoundProp, BoundValue, CheckedComputedHtml, CheckedHref, CheckedHtml, Deferred, ExtensionServersOf, FunctionProp, HandedPart, HandedSignal, HandsPart, HydrateWhen, Inferred, IslandAsked, IslandAsks, IslandBrand, IslandComponent, IslandOptions, IslandProp, Locals, LocalsOf, PartClass, PlainIslandProp, Redirect, Register, RouteParams, SafeHtml, ServerOfModule, SlotCall, TemplateHelpers, Truthy, UnkeyedRows, Unmatched, UnresolvedParameter } from './checks'
13
13
  // The names `kay` exports. What this file defines itself is in `core.ts`, so a build imports the module holding a name rather than this one, which an entry importing it would take every name's module along with.
14
14
  export * from './core'
15
15
  export type { DescribeOptions } from './described'
@@ -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'
@@ -22,6 +22,23 @@ import { ACTION_PREFIX, encodeValue, unsendable } from './wire'
22
22
 
23
23
  // Island roots render synchronously, so a counter is enough to tell whether a component already sits inside one.
24
24
  let depth = 0
25
+ // The layout file whose own markup is rendering, none inside the page or a block it fills: the islands it draws are marked with it, as a navigation keeping that layout keeps them.
26
+ let layout: string | undefined
27
+
28
+ // Renders `run` as the markup of `file`, a layout, or of the page for none.
29
+ export function inLayout<T>(file: string | undefined, run: () => T): T {
30
+ const outer = layout
31
+
32
+ layout = file
33
+
34
+ try {
35
+ return run()
36
+ }
37
+ finally {
38
+ layout = outer
39
+ }
40
+ }
41
+
25
42
  // The islands of the page being rendered: it ships the entry when it holds any, and preloads the chunks of those hydrating right away.
26
43
  let rendered: RenderedIslands | undefined
27
44
 
@@ -105,6 +122,14 @@ export function collectIslands<T>(render: () => T, salt?: string, chunks?: Recor
105
122
  }
106
123
  }
107
124
 
125
+ // Whether the island being rendered, or a page outside any, read a query param.
126
+ let queried = false
127
+
128
+ // A query param was read: the island rendering it depends on the address, which a page rendered once at build time cannot show.
129
+ export function noteQuery(): void {
130
+ queried = true
131
+ }
132
+
108
133
  // The keys of the components the island being rendered draws that load on their own in the browser.
109
134
  let drawn: Set<string> | undefined
110
135
 
@@ -158,6 +183,18 @@ function persistKey(wanted: IslandOptions['persist'], id: string): string | unde
158
183
  return wanted === false || wanted === '' ? undefined : wanted
159
184
  }
160
185
 
186
+ // What tells an island from the others of its component when no `persist` does: the `key` or `id` its use gives, a string or a number, so a swap pairs it with its own copy when a sibling goes away.
187
+ function identityOf(persist: string | undefined, props: object): string | undefined {
188
+ for (const name of persist === undefined ? ['key', 'id'] as const : []) {
189
+ const value = (props as Record<string, unknown>)[name]
190
+
191
+ if (typeof value === 'string' || typeof value === 'number')
192
+ return String(value)
193
+ }
194
+
195
+ return undefined
196
+ }
197
+
161
198
  // Whether a `hydrate` makes the island wait, `media(...)` needing a query to wait for.
162
199
  function isWaiting(when: string | undefined, id: string): boolean {
163
200
  if (when?.startsWith('media(') === true && (!when.endsWith(')') || when.slice(6, -1).trim() === ''))
@@ -175,7 +212,7 @@ function ownProps<P extends object>(props: P & IslandOptions, renderClient: bool
175
212
  }
176
213
 
177
214
  // 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.
215
+ // 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
216
  // 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
217
  // `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
218
  // `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 +221,7 @@ export function island<P extends object>(id: string, component: ((props: P) => J
184
221
  const when = props.hydrate ?? asks?.hydrate
185
222
  const persist = persistKey(props.persist ?? asks?.persist, id)
186
223
  const renderClient = props.render === 'client'
187
- const browserOnly = client || when === 'client' || renderClient
224
+ const browserOnly = client || renderClient
188
225
  const waits = isWaiting(when, id)
189
226
  const own = ownProps(props, renderClient, browserOnly)
190
227
 
@@ -209,14 +246,15 @@ export function island<P extends object>(id: string, component: ((props: P) => J
209
246
  return browserOnly ? renderedHtml('') as unknown as JSX.Element : component!(own)
210
247
 
211
248
  // Rendered here, in the parent, so an island among them is one of its own; unmarked in edit mode, as the island's own markup is.
212
- // A `persist` island's slots stay in the DOM across a same-URL swap, so their ids come from its key as its own do, not from the page's count.
213
- const ids = persist === undefined ? undefined : islandPrefix(persist)
214
- const slots = withFieldMarks(undefined, () => ids === undefined ? staticSlots(own) : withIds(`${ids}s-`, () => withSlotIslands(`${ids}i`, () => staticSlots(own))))
249
+ // Any island may stay in the DOM across a swap, so its ids and those of its slots come from its key, a `persist` one's own else its component's (and its layout's) with its index among them, not from its place in the page, which a render adding another island would shift under the one kept.
250
+ const identity = identityOf(persist, own)
251
+ const ids = islandPrefix(persist ?? [layout, id, identity].filter(part => part !== undefined).join('\0'))
252
+ const slots = withFieldMarks(undefined, () => withIds(`${ids}s-`, () => withSlotIslands(`${ids}i`, () => staticSlots(own))))
215
253
  const given = slots.length === 0 ? own : withSlots(own, slots)
216
254
  const serialized = withFieldMarks(undefined, () => serializeProps(`${id} ${why}`, own, slots))
217
255
 
218
256
  // The browser counts the island's ids from it again as it hydrates.
219
- const prefix = ids ?? islandPrefix()
257
+ const prefix = ids
220
258
 
221
259
  depth++
222
260
 
@@ -241,8 +279,10 @@ export function island<P extends object>(id: string, component: ((props: P) => J
241
279
 
242
280
  const keys = new Set<string>()
243
281
  const outer = drawn
282
+ const outerQuery = queried
244
283
 
245
284
  drawn = keys
285
+ queried = false
246
286
 
247
287
  try {
248
288
  // Detached, as in the browser, where an island reads nothing the page's components provide.
@@ -254,20 +294,23 @@ export function island<P extends object>(id: string, component: ((props: P) => J
254
294
  const marked = waits || when === 'load' ? ` data-hydrate="${escapeAttribute(when!)}"` : ''
255
295
  const chunk = rendered?.chunks?.[id]
256
296
  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>`)
297
+ // 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.
298
+ const byQuery = queried && prerendering() && !browserOnly ? ' data-query' : ''
299
+ 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)}"`}${layout === undefined ? '' : ` data-layout="${escapeAttribute(layout)}"`}${identity === undefined ? '' : ` data-key="${escapeAttribute(identity)}"`}${chunk === undefined ? '' : ` data-chunk="${escapeAttribute(chunk)}"`}>${html}</slot>`)
258
300
 
259
301
  return markup as unknown as JSX.Element
260
302
  }
261
303
  finally {
262
304
  depth--
263
305
  drawn = outer
306
+ queried = outerQuery || queried
264
307
  }
265
308
  }
266
309
 
267
310
  return carryFailed(component, render) as IslandComponent<P>
268
311
  }
269
312
 
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.
313
+ // 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 promise or markup. A function, a block taking parameters among them, does not keep a use an island: a use turning none of the listed props on renders on the server, which calls it.
271
314
  function staysPlain(depth: number, client: boolean, lives: readonly unknown[], props: object, asks: IslandAsks | undefined): boolean {
272
315
  const wants = asks?.interactive
273
316
 
@@ -278,8 +321,8 @@ function staysPlain(depth: number, client: boolean, lives: readonly unknown[], p
278
321
  if (key === 'hydrate' || key === 'persist' || (key === 'render' && (props as { render?: unknown }).render === 'client') || key === USE_FALLBACK)
279
322
  return false
280
323
 
281
- // What an island would refuse to send, or send for the browser to finish (a promise), keeps the use an island.
282
- if (!descriptor.get && (typeof descriptor.value === 'function' || isThenable(descriptor.value) || holdsMarkup(descriptor.value)))
324
+ // What an island would send for the browser to finish (a promise, an action) keeps the use an island.
325
+ if (!descriptor.get && (isThenable(descriptor.value) || holdsMarkup(descriptor.value) || isAction(descriptor.value)))
283
326
  return false
284
327
  }
285
328
 
@@ -294,12 +337,12 @@ function isThenable(value: unknown): boolean {
294
337
  return typeof value === 'object' && value !== null && typeof Reflect.get(value, 'then') === 'function'
295
338
  }
296
339
 
297
- // Whether the props could cross to the browser, so a use that an island would refuse is still told of it.
340
+ // Whether the props, a function aside, could cross to the browser, so a use that an island would refuse is still told of it.
298
341
  function sendable(props: object): boolean {
299
342
  const plain: Record<string, unknown> = {}
300
343
 
301
344
  for (const [key, descriptor] of Object.entries(Object.getOwnPropertyDescriptors(props))) {
302
- if (!descriptor.get)
345
+ if (!descriptor.get && typeof descriptor.value !== 'function')
303
346
  plain[key] = descriptor.value
304
347
  }
305
348
 
@@ -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.