@warp-drive-mirror/core 5.10.0-alpha.2 → 5.10.0-alpha.21

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 (318) hide show
  1. package/README.md +116 -6
  2. package/dist/{-private-ffnwf62T.js → -private-BiuED7nc.js} +5 -4
  3. package/dist/{-private-ffnwf62T.js.map → -private-BiuED7nc.js.map} +1 -1
  4. package/dist/{-private-CArItnX4.js → -private-CvZfrDZl.js} +566 -179
  5. package/dist/-private-CvZfrDZl.js.map +1 -0
  6. package/dist/{aliases-BWYW5EhX.d.ts → aliases-BG5TxALl.d.ts} +4 -3
  7. package/dist/aliases-BG5TxALl.d.ts.map +1 -0
  8. package/dist/{change-C7kqv2kW.d.ts → change-INHMiZ2a.d.ts} +4 -4
  9. package/dist/change-INHMiZ2a.d.ts.map +1 -0
  10. package/dist/{concepts-DFldVwEM.d.ts → concepts-vh86nAcd.d.ts} +14 -7
  11. package/dist/concepts-vh86nAcd.d.ts.map +1 -0
  12. package/dist/{configure-B_F639tN.d.ts → configure-BfXDuPUb.d.ts} +57 -10
  13. package/dist/configure-BfXDuPUb.d.ts.map +1 -0
  14. package/dist/configure.d.ts +2 -2
  15. package/dist/configure.js +2 -2
  16. package/dist/{document-Ca4ZZBd9.d.ts → document-B8Fup751.d.ts} +22 -6
  17. package/dist/document-B8Fup751.d.ts.map +1 -0
  18. package/dist/{error-0uD6GkNX.d.ts → error-j5n1yL9m.d.ts} +4 -4
  19. package/dist/error-j5n1yL9m.d.ts.map +1 -0
  20. package/dist/{fields-FM7peCiM.d.ts → fields-r1rZJB9d.d.ts} +134 -9
  21. package/dist/fields-r1rZJB9d.d.ts.map +1 -0
  22. package/dist/graph/-private.d.ts +1 -1
  23. package/dist/graph/-private.js +25 -40
  24. package/dist/graph/-private.js.map +1 -1
  25. package/dist/{graph-DLqYXP2z.d.ts → graph-BqxaFjEb.d.ts} +25 -7
  26. package/dist/graph-BqxaFjEb.d.ts.map +1 -0
  27. package/dist/{identifier-DQnqOSJK.d.ts → identifier-DmgDehQK.d.ts} +29 -6
  28. package/dist/identifier-DmgDehQK.d.ts.map +1 -0
  29. package/dist/index.d.ts +1 -1
  30. package/dist/index.js +1 -1
  31. package/dist/{internal-BrqYbG_y.d.ts → internal-D_WIXC4r.d.ts} +1524 -1121
  32. package/dist/internal-D_WIXC4r.d.ts.map +1 -0
  33. package/dist/{json-api-raw-C5APJHHB.d.ts → json-api-raw-juUdIITO.d.ts} +44 -4
  34. package/dist/json-api-raw-juUdIITO.d.ts.map +1 -0
  35. package/dist/{mutations-CqtoGB4t.d.ts → mutations-CA39mior.d.ts} +18 -4
  36. package/dist/mutations-CA39mior.d.ts.map +1 -0
  37. package/dist/{operations-D1qA6r0_.d.ts → operations-C1WAEKKq.d.ts} +39 -7
  38. package/dist/operations-C1WAEKKq.d.ts.map +1 -0
  39. package/dist/{params-DrEx3bf8.d.ts → params-CNLjCRyH.d.ts} +11 -3
  40. package/dist/params-CNLjCRyH.d.ts.map +1 -0
  41. package/dist/{raw-D5hnjiq7.d.ts → raw-adYGuEGM.d.ts} +10 -3
  42. package/dist/raw-adYGuEGM.d.ts.map +1 -0
  43. package/dist/reactive/-private.d.ts +1 -1
  44. package/dist/reactive/-private.js +1 -1
  45. package/dist/reactive.d.ts +2 -2
  46. package/dist/reactive.js +3 -3
  47. package/dist/{record-D3QQcaIR.d.ts → record-f5-uOgHt.d.ts} +22 -4
  48. package/dist/record-f5-uOgHt.d.ts.map +1 -0
  49. package/dist/{relationship-CmHzMPKf.d.ts → relationship-99pc4CaS.d.ts} +10 -5
  50. package/dist/relationship-99pc4CaS.d.ts.map +1 -0
  51. package/dist/{request-o_qGAoFV.js → request-CxtnNIIp.js} +52 -23
  52. package/dist/request-CxtnNIIp.js.map +1 -0
  53. package/dist/request.d.ts +1 -1
  54. package/dist/request.js +1 -1
  55. package/dist/signals/-leaked.d.ts +86 -18
  56. package/dist/signals/-leaked.d.ts.map +1 -1
  57. package/dist/signals/-leaked.js +1 -1
  58. package/dist/{src-C-xK8l3f.js → src-ccp1WKyt.js} +350 -456
  59. package/dist/src-ccp1WKyt.js.map +1 -0
  60. package/dist/store/-private.d.ts +2 -2
  61. package/dist/store/-private.js +2 -2
  62. package/dist/{store-DNF9Rgoh.js → store-C8iKKtQK.js} +17 -3
  63. package/dist/store-C8iKKtQK.js.map +1 -0
  64. package/dist/store.d.ts +1 -1
  65. package/dist/store.js +1 -1
  66. package/dist/{symbols-DjRDCeX0.d.ts → symbols-DVa1PMFG.d.ts} +10 -3
  67. package/dist/symbols-DVa1PMFG.d.ts.map +1 -0
  68. package/dist/types/-private.d.ts +1 -2
  69. package/dist/types/-private.d.ts.map +1 -1
  70. package/dist/types/-private.js +115 -2
  71. package/dist/types/-private.js.map +1 -0
  72. package/dist/types/cache/aliases.d.ts +1 -1
  73. package/dist/types/cache/change.d.ts +1 -1
  74. package/dist/types/cache/mutations.d.ts +1 -1
  75. package/dist/types/cache/operations.d.ts +1 -1
  76. package/dist/types/cache/relationship.d.ts +1 -1
  77. package/dist/types/cache.d.ts +1 -1
  78. package/dist/types/graph.d.ts +1 -1
  79. package/dist/types/identifier.d.ts +1 -1
  80. package/dist/types/identifier.js +34 -5
  81. package/dist/types/identifier.js.map +1 -1
  82. package/dist/types/json/raw.d.ts +1 -1
  83. package/dist/types/params.d.ts +1 -1
  84. package/dist/types/record.d.ts +1 -1
  85. package/dist/types/record.js +26 -2
  86. package/dist/types/record.js.map +1 -1
  87. package/dist/types/request.d.ts +1 -1
  88. package/dist/types/request.js +82 -3
  89. package/dist/types/request.js.map +1 -1
  90. package/dist/types/runtime.d.ts +10 -7
  91. package/dist/types/runtime.d.ts.map +1 -1
  92. package/dist/types/runtime.js +9 -6
  93. package/dist/types/runtime.js.map +1 -1
  94. package/dist/types/schema/concepts.d.ts +1 -1
  95. package/dist/types/schema/fields.d.ts +1 -1
  96. package/dist/types/schema/fields.js +133 -5
  97. package/dist/types/schema/fields.js.map +1 -1
  98. package/dist/types/schema/schema-service.d.ts +1 -1
  99. package/dist/types/spec/document.d.ts +1 -1
  100. package/dist/types/spec/error.d.ts +1 -1
  101. package/dist/types/spec/json-api-raw.d.ts +1 -1
  102. package/dist/types/symbols.d.ts +1 -1
  103. package/dist/types/symbols.js +16 -3
  104. package/dist/types/symbols.js.map +1 -1
  105. package/dist/types/utils.d.ts +1 -1
  106. package/dist/types.d.ts +2 -2
  107. package/dist/unpkg/{dev-deprecated/-private-CM5N2rtZ.js → dev/-private-B4pCmkq-.js} +566 -179
  108. package/dist/unpkg/dev/-private-B4pCmkq-.js.map +1 -0
  109. package/dist/unpkg/{prod-deprecated/-private-207KndDu.js → dev/-private-BiuED7nc.js} +5 -4
  110. package/dist/unpkg/{dev-deprecated/-private-BO-nArRb.js.map → dev/-private-BiuED7nc.js.map} +1 -1
  111. package/dist/unpkg/dev/configure.js +2 -2
  112. package/dist/unpkg/dev/graph/-private.js +26 -41
  113. package/dist/unpkg/dev/graph/-private.js.map +1 -1
  114. package/dist/unpkg/dev/index.js +1 -1
  115. package/dist/unpkg/dev/reactive/-private.js +1 -1
  116. package/dist/unpkg/dev/reactive.js +3 -3
  117. package/dist/unpkg/{dev-deprecated/request-DXPAtRhE.js → dev/request-oWpijCPQ.js} +52 -23
  118. package/dist/unpkg/dev/request-oWpijCPQ.js.map +1 -0
  119. package/dist/unpkg/dev/request.js +1 -1
  120. package/dist/unpkg/dev/{runtime-DW881fpw.js → runtime-RYvEtg99.js} +2 -3
  121. package/dist/unpkg/dev/{runtime-DW881fpw.js.map → runtime-RYvEtg99.js.map} +1 -1
  122. package/dist/unpkg/dev/signals/-leaked.js +1 -1
  123. package/dist/unpkg/dev/{src-kn6qfEPI.js → src-C4ET4R1n.js} +339 -444
  124. package/dist/unpkg/dev/src-C4ET4R1n.js.map +1 -0
  125. package/dist/unpkg/dev/store/-private.js +2 -2
  126. package/dist/unpkg/{dev-deprecated/store-D-z_1Jxe.js → dev/store-dZViNfMK.js} +18 -4
  127. package/dist/unpkg/dev/store-dZViNfMK.js.map +1 -0
  128. package/dist/unpkg/dev/store.js +1 -1
  129. package/dist/unpkg/dev/types/-private.js +106 -2
  130. package/dist/unpkg/dev/types/-private.js.map +1 -0
  131. package/dist/unpkg/dev/types/identifier.js +34 -5
  132. package/dist/unpkg/dev/types/identifier.js.map +1 -1
  133. package/dist/unpkg/dev/types/record.js +26 -2
  134. package/dist/unpkg/dev/types/record.js.map +1 -1
  135. package/dist/unpkg/dev/types/request.js +82 -3
  136. package/dist/unpkg/dev/types/request.js.map +1 -1
  137. package/dist/unpkg/dev/types/runtime.js +9 -6
  138. package/dist/unpkg/dev/types/runtime.js.map +1 -1
  139. package/dist/unpkg/dev/types/schema/fields.js +133 -5
  140. package/dist/unpkg/dev/types/schema/fields.js.map +1 -1
  141. package/dist/unpkg/dev/types/symbols.js +16 -3
  142. package/dist/unpkg/dev/types/symbols.js.map +1 -1
  143. package/dist/unpkg/dev/utils/string.js +1 -2
  144. package/dist/unpkg/{dev/-private-CM5N2rtZ.js → dev-deprecated/-private-B4pCmkq-.js} +566 -179
  145. package/dist/unpkg/dev-deprecated/-private-B4pCmkq-.js.map +1 -0
  146. package/dist/unpkg/dev-deprecated/{-private-BO-nArRb.js → -private-BiuED7nc.js} +5 -4
  147. package/dist/unpkg/{prod/-private-207KndDu.js.map → dev-deprecated/-private-BiuED7nc.js.map} +1 -1
  148. package/dist/unpkg/dev-deprecated/configure.js +2 -2
  149. package/dist/unpkg/dev-deprecated/graph/-private.js +26 -41
  150. package/dist/unpkg/dev-deprecated/graph/-private.js.map +1 -1
  151. package/dist/unpkg/dev-deprecated/index.js +1 -1
  152. package/dist/unpkg/dev-deprecated/reactive/-private.js +1 -1
  153. package/dist/unpkg/dev-deprecated/reactive.js +3 -3
  154. package/dist/unpkg/{dev/request-DXPAtRhE.js → dev-deprecated/request-oWpijCPQ.js} +52 -23
  155. package/dist/unpkg/dev-deprecated/request-oWpijCPQ.js.map +1 -0
  156. package/dist/unpkg/dev-deprecated/request.js +1 -1
  157. package/dist/unpkg/dev-deprecated/{runtime-BIra6K31.js → runtime-DZVuMuzL.js} +2 -3
  158. package/dist/unpkg/dev-deprecated/{runtime-BIra6K31.js.map → runtime-DZVuMuzL.js.map} +1 -1
  159. package/dist/unpkg/dev-deprecated/signals/-leaked.js +1 -1
  160. package/dist/unpkg/dev-deprecated/{src-DXwW-R57.js → src-jHpowq3S.js} +344 -450
  161. package/dist/unpkg/dev-deprecated/src-jHpowq3S.js.map +1 -0
  162. package/dist/unpkg/dev-deprecated/store/-private.js +2 -2
  163. package/dist/unpkg/{dev/store-C0p6sclI.js → dev-deprecated/store-I7YB0_rC.js} +18 -4
  164. package/dist/unpkg/dev-deprecated/store-I7YB0_rC.js.map +1 -0
  165. package/dist/unpkg/dev-deprecated/store.js +1 -1
  166. package/dist/unpkg/dev-deprecated/types/-private.js +106 -2
  167. package/dist/unpkg/dev-deprecated/types/-private.js.map +1 -0
  168. package/dist/unpkg/dev-deprecated/types/identifier.js +34 -5
  169. package/dist/unpkg/dev-deprecated/types/identifier.js.map +1 -1
  170. package/dist/unpkg/dev-deprecated/types/record.js +26 -2
  171. package/dist/unpkg/dev-deprecated/types/record.js.map +1 -1
  172. package/dist/unpkg/dev-deprecated/types/request.js +82 -3
  173. package/dist/unpkg/dev-deprecated/types/request.js.map +1 -1
  174. package/dist/unpkg/dev-deprecated/types/runtime.js +9 -6
  175. package/dist/unpkg/dev-deprecated/types/runtime.js.map +1 -1
  176. package/dist/unpkg/dev-deprecated/types/schema/fields.js +133 -5
  177. package/dist/unpkg/dev-deprecated/types/schema/fields.js.map +1 -1
  178. package/dist/unpkg/dev-deprecated/types/symbols.js +16 -3
  179. package/dist/unpkg/dev-deprecated/types/symbols.js.map +1 -1
  180. package/dist/unpkg/dev-deprecated/utils/string.js +1 -2
  181. package/dist/unpkg/prod/-private-BiuED7nc.js +23 -0
  182. package/dist/unpkg/{prod-deprecated/-private-207KndDu.js.map → prod/-private-BiuED7nc.js.map} +1 -1
  183. package/dist/unpkg/{prod-deprecated/-private-CdDed4yB.js → prod/-private-CrUi_3E_.js} +539 -173
  184. package/dist/unpkg/prod/-private-CrUi_3E_.js.map +1 -0
  185. package/dist/unpkg/prod/configure.js +2 -2
  186. package/dist/unpkg/prod/graph/-private.js +24 -35
  187. package/dist/unpkg/prod/graph/-private.js.map +1 -1
  188. package/dist/unpkg/prod/index.js +1 -1
  189. package/dist/unpkg/prod/reactive/-private.js +1 -1
  190. package/dist/unpkg/prod/reactive.js +3 -3
  191. package/dist/unpkg/prod/{request-C7WZg-zk.js → request-Cgw3j6Dx.js} +51 -21
  192. package/dist/unpkg/prod/request-Cgw3j6Dx.js.map +1 -0
  193. package/dist/unpkg/prod/request.js +1 -1
  194. package/dist/unpkg/prod/signals/-leaked.js +1 -1
  195. package/dist/unpkg/prod/{src-B-GfFQcx.js → src-DFmPDGQ6.js} +311 -414
  196. package/dist/unpkg/prod/src-DFmPDGQ6.js.map +1 -0
  197. package/dist/unpkg/prod/store/-private.js +2 -2
  198. package/dist/unpkg/prod/{store-BWhmb7Ob.js → store-Bz9R5hGB.js} +17 -3
  199. package/dist/unpkg/prod/store-Bz9R5hGB.js.map +1 -0
  200. package/dist/unpkg/prod/store.js +1 -1
  201. package/dist/unpkg/prod/types/-private.js +94 -2
  202. package/dist/unpkg/prod/types/-private.js.map +1 -0
  203. package/dist/unpkg/prod/types/identifier.js +34 -5
  204. package/dist/unpkg/prod/types/identifier.js.map +1 -1
  205. package/dist/unpkg/prod/types/record.js +26 -2
  206. package/dist/unpkg/prod/types/record.js.map +1 -1
  207. package/dist/unpkg/prod/types/request.js +82 -3
  208. package/dist/unpkg/prod/types/request.js.map +1 -1
  209. package/dist/unpkg/prod/types/runtime.js +9 -6
  210. package/dist/unpkg/prod/types/runtime.js.map +1 -1
  211. package/dist/unpkg/prod/types/schema/fields.js +133 -5
  212. package/dist/unpkg/prod/types/schema/fields.js.map +1 -1
  213. package/dist/unpkg/prod/types/symbols.js +16 -3
  214. package/dist/unpkg/prod/types/symbols.js.map +1 -1
  215. package/dist/unpkg/prod/utils/string.js +1 -2
  216. package/dist/unpkg/{dev/-private-BO-nArRb.js → prod-deprecated/-private-BiuED7nc.js} +5 -4
  217. package/dist/unpkg/{dev/-private-BO-nArRb.js.map → prod-deprecated/-private-BiuED7nc.js.map} +1 -1
  218. package/dist/unpkg/{prod/-private-CdDed4yB.js → prod-deprecated/-private-CrUi_3E_.js} +539 -173
  219. package/dist/unpkg/prod-deprecated/-private-CrUi_3E_.js.map +1 -0
  220. package/dist/unpkg/prod-deprecated/configure.js +2 -2
  221. package/dist/unpkg/prod-deprecated/graph/-private.js +24 -35
  222. package/dist/unpkg/prod-deprecated/graph/-private.js.map +1 -1
  223. package/dist/unpkg/prod-deprecated/index.js +1 -1
  224. package/dist/unpkg/prod-deprecated/reactive/-private.js +1 -1
  225. package/dist/unpkg/prod-deprecated/reactive.js +3 -3
  226. package/dist/unpkg/prod-deprecated/{request-C7WZg-zk.js → request-Cgw3j6Dx.js} +51 -21
  227. package/dist/unpkg/prod-deprecated/request-Cgw3j6Dx.js.map +1 -0
  228. package/dist/unpkg/prod-deprecated/request.js +1 -1
  229. package/dist/unpkg/prod-deprecated/signals/-leaked.js +1 -1
  230. package/dist/unpkg/prod-deprecated/{src-Bp8ZJctZ.js → src-BgQLcshl.js} +316 -420
  231. package/dist/unpkg/prod-deprecated/src-BgQLcshl.js.map +1 -0
  232. package/dist/unpkg/prod-deprecated/store/-private.js +2 -2
  233. package/dist/unpkg/prod-deprecated/{store-BWhmb7Ob.js → store-Bz9R5hGB.js} +17 -3
  234. package/dist/unpkg/prod-deprecated/store-Bz9R5hGB.js.map +1 -0
  235. package/dist/unpkg/prod-deprecated/store.js +1 -1
  236. package/dist/unpkg/prod-deprecated/types/-private.js +94 -2
  237. package/dist/unpkg/prod-deprecated/types/-private.js.map +1 -0
  238. package/dist/unpkg/prod-deprecated/types/identifier.js +34 -5
  239. package/dist/unpkg/prod-deprecated/types/identifier.js.map +1 -1
  240. package/dist/unpkg/prod-deprecated/types/record.js +26 -2
  241. package/dist/unpkg/prod-deprecated/types/record.js.map +1 -1
  242. package/dist/unpkg/prod-deprecated/types/request.js +82 -3
  243. package/dist/unpkg/prod-deprecated/types/request.js.map +1 -1
  244. package/dist/unpkg/prod-deprecated/types/runtime.js +9 -6
  245. package/dist/unpkg/prod-deprecated/types/runtime.js.map +1 -1
  246. package/dist/unpkg/prod-deprecated/types/schema/fields.js +133 -5
  247. package/dist/unpkg/prod-deprecated/types/schema/fields.js.map +1 -1
  248. package/dist/unpkg/prod-deprecated/types/symbols.js +16 -3
  249. package/dist/unpkg/prod-deprecated/types/symbols.js.map +1 -1
  250. package/dist/unpkg/prod-deprecated/utils/string.js +1 -2
  251. package/dist/utils/string.d.ts +0 -2
  252. package/dist/utils/string.d.ts.map +1 -1
  253. package/dist/utils/string.js +1 -2
  254. package/dist/{utils-BtURiy8l.d.ts → utils-BVKvrO6e.d.ts} +8 -3
  255. package/dist/utils-BVKvrO6e.d.ts.map +1 -0
  256. package/logos/README.md +1 -1
  257. package/package.json +9 -9
  258. package/dist/-private-CArItnX4.js.map +0 -1
  259. package/dist/-private-CWh7qdp_.js +0 -120
  260. package/dist/-private-CWh7qdp_.js.map +0 -1
  261. package/dist/aliases-BWYW5EhX.d.ts.map +0 -1
  262. package/dist/change-C7kqv2kW.d.ts.map +0 -1
  263. package/dist/concepts-DFldVwEM.d.ts.map +0 -1
  264. package/dist/configure-B_F639tN.d.ts.map +0 -1
  265. package/dist/document-Ca4ZZBd9.d.ts.map +0 -1
  266. package/dist/error-0uD6GkNX.d.ts.map +0 -1
  267. package/dist/fields-FM7peCiM.d.ts.map +0 -1
  268. package/dist/graph-DLqYXP2z.d.ts.map +0 -1
  269. package/dist/identifier-DQnqOSJK.d.ts.map +0 -1
  270. package/dist/internal-BrqYbG_y.d.ts.map +0 -1
  271. package/dist/json-api-raw-C5APJHHB.d.ts.map +0 -1
  272. package/dist/mutations-CqtoGB4t.d.ts.map +0 -1
  273. package/dist/operations-D1qA6r0_.d.ts.map +0 -1
  274. package/dist/params-DrEx3bf8.d.ts.map +0 -1
  275. package/dist/raw-D5hnjiq7.d.ts.map +0 -1
  276. package/dist/record-D3QQcaIR.d.ts.map +0 -1
  277. package/dist/relationship-CmHzMPKf.d.ts.map +0 -1
  278. package/dist/request-o_qGAoFV.js.map +0 -1
  279. package/dist/src-C-xK8l3f.js.map +0 -1
  280. package/dist/store-DNF9Rgoh.js.map +0 -1
  281. package/dist/symbols-DjRDCeX0.d.ts.map +0 -1
  282. package/dist/types/schema/fields.type-test.d.ts +0 -1
  283. package/dist/types/schema/fields.type-test.js +0 -79
  284. package/dist/types/schema/fields.type-test.js.map +0 -1
  285. package/dist/unpkg/dev/-private-BP52H-vC.js +0 -111
  286. package/dist/unpkg/dev/-private-BP52H-vC.js.map +0 -1
  287. package/dist/unpkg/dev/-private-CM5N2rtZ.js.map +0 -1
  288. package/dist/unpkg/dev/request-DXPAtRhE.js.map +0 -1
  289. package/dist/unpkg/dev/src-kn6qfEPI.js.map +0 -1
  290. package/dist/unpkg/dev/store-C0p6sclI.js.map +0 -1
  291. package/dist/unpkg/dev/types/schema/fields.type-test.js +0 -79
  292. package/dist/unpkg/dev/types/schema/fields.type-test.js.map +0 -1
  293. package/dist/unpkg/dev-deprecated/-private-BP52H-vC.js +0 -111
  294. package/dist/unpkg/dev-deprecated/-private-BP52H-vC.js.map +0 -1
  295. package/dist/unpkg/dev-deprecated/-private-CM5N2rtZ.js.map +0 -1
  296. package/dist/unpkg/dev-deprecated/request-DXPAtRhE.js.map +0 -1
  297. package/dist/unpkg/dev-deprecated/src-DXwW-R57.js.map +0 -1
  298. package/dist/unpkg/dev-deprecated/store-D-z_1Jxe.js.map +0 -1
  299. package/dist/unpkg/dev-deprecated/types/schema/fields.type-test.js +0 -79
  300. package/dist/unpkg/dev-deprecated/types/schema/fields.type-test.js.map +0 -1
  301. package/dist/unpkg/prod/-private-207KndDu.js +0 -22
  302. package/dist/unpkg/prod/-private-CdDed4yB.js.map +0 -1
  303. package/dist/unpkg/prod/-private-JmhZBKGb.js +0 -99
  304. package/dist/unpkg/prod/-private-JmhZBKGb.js.map +0 -1
  305. package/dist/unpkg/prod/request-C7WZg-zk.js.map +0 -1
  306. package/dist/unpkg/prod/src-B-GfFQcx.js.map +0 -1
  307. package/dist/unpkg/prod/store-BWhmb7Ob.js.map +0 -1
  308. package/dist/unpkg/prod/types/schema/fields.type-test.js +0 -79
  309. package/dist/unpkg/prod/types/schema/fields.type-test.js.map +0 -1
  310. package/dist/unpkg/prod-deprecated/-private-CdDed4yB.js.map +0 -1
  311. package/dist/unpkg/prod-deprecated/-private-JmhZBKGb.js +0 -99
  312. package/dist/unpkg/prod-deprecated/-private-JmhZBKGb.js.map +0 -1
  313. package/dist/unpkg/prod-deprecated/request-C7WZg-zk.js.map +0 -1
  314. package/dist/unpkg/prod-deprecated/src-Bp8ZJctZ.js.map +0 -1
  315. package/dist/unpkg/prod-deprecated/store-BWhmb7Ob.js.map +0 -1
  316. package/dist/unpkg/prod-deprecated/types/schema/fields.type-test.js +0 -79
  317. package/dist/unpkg/prod-deprecated/types/schema/fields.type-test.js.map +0 -1
  318. package/dist/utils-BtURiy8l.d.ts.map +0 -1
@@ -1,8 +1,8 @@
1
- import { a as setTransient, r as peekTransient, t as getOrSetGlobal } from "./-private-CWh7qdp_.js";
2
- import { f as setPromiseResult, o as DOMError, u as getPromiseResult } from "./request-o_qGAoFV.js";
1
+ import { getOrSetGlobal, peekTransient, setTransient } from "./types/-private.js";
2
+ import { f as setPromiseResult, o as DOMError, u as getPromiseResult } from "./request-CxtnNIIp.js";
3
3
  import { getGlobalConfig, macroCondition } from "@embroider/macros";
4
4
 
5
- //#region src/signals/reactivity/configure.ts
5
+ // src/signals/reactivity/configure.ts
6
6
  const ARRAY_SIGNAL = getOrSetGlobal("#[]", Symbol("#[]"));
7
7
  const OBJECT_SIGNAL = getOrSetGlobal("#{}", Symbol("#{}"));
8
8
  /**
@@ -16,10 +16,12 @@ const OBJECT_SIGNAL = getOrSetGlobal("#{}", Symbol("#{}"));
16
16
  * The hooks which MUST be configured in order to use reactive arrays,
17
17
  * resources and documents with framework specfic signals or TC39 signals.
18
18
  *
19
- * Support for multiple frameworks simultaneously can be done via
20
- * this abstraction by returning multiple signals from the `createSignal`
21
- * method, and consuming the correct one via the correct framework via
22
- * the `consumeSignal` and `notifySignal` methods.
19
+ * To support multiple frameworks on the same page, import
20
+ * `@warp-drive-mirror/alien-signals/install` before each framework's `install` entry
21
+ * point. Its hooks implement {@link SignalHooks.register}, so each framework's
22
+ * hooks, passed to {@link registerSignals}, are added to its signals graph
23
+ * instead of replacing it, and its memos stay up to date for every framework.
24
+ * See [Using Ember and React on the Same Page](/guides/the-manual/cookbook/multiple-frameworks-on-one-page.md).
23
25
  *
24
26
  * Unlike many signals implementations, WarpDrive does not wrap values as
25
27
  * signals directly, but instead uses signals to alert the reactive layer
@@ -34,6 +36,8 @@ const OBJECT_SIGNAL = getOrSetGlobal("#{}", Symbol("#{}"));
34
36
  * scenarios you may also be interested in integrating with the {@link NotificationManager}
35
37
  * more directly.
36
38
  *
39
+ * @summary The create, consume, notify, and memo hooks a framework or TC39 signals implementation
40
+ * supplies to `setupSignals` to make WarpDrive data reactive.
37
41
  * @public
38
42
  */
39
43
  /**
@@ -49,11 +53,14 @@ const OBJECT_SIGNAL = getOrSetGlobal("#{}", Symbol("#{}"));
49
53
  * }
50
54
  * ```
51
55
  *
56
+ * @summary The options passed to the `setupSignals` callback, including the well-known key WarpDrive
57
+ * uses for an array's contents signal.
52
58
  * @public
53
59
  */
54
60
  /**
55
- * Configures the signals implementation to use. Supports multiple
56
- * implementations simultaneously.
61
+ * Configures the signals implementation to use, replacing any configured
62
+ * before. To add a framework's hooks alongside those of other frameworks, use
63
+ * {@link registerSignals} instead.
57
64
  *
58
65
  * See {@link HooksOptions} for the options passed to the provided function
59
66
  * when called.
@@ -61,6 +68,8 @@ const OBJECT_SIGNAL = getOrSetGlobal("#{}", Symbol("#{}"));
61
68
  * See {@link SignalHooks} for the implementation the callback function should
62
69
  * return.
63
70
  *
71
+ * @summary Registers the signal hooks WarpDrive uses for reactivity, built by a callback that receives
72
+ * `HooksOptions`.
64
73
  * @public
65
74
  * @param buildConfig - a function that takes options and returns a configuration object
66
75
  */
@@ -69,6 +78,33 @@ function setupSignals(buildConfig) {
69
78
  setTransient("signalHooks", hooks);
70
79
  }
71
80
  /**
81
+ * Adds the hooks built by `buildConfig` to the configured signals implementation if it composes
82
+ * other implementations, such as `@warp-drive-mirror/alien-signals`, and otherwise configures them with
83
+ * {@link setupSignals}.
84
+ *
85
+ * A framework's `install` entry point calls this rather than `setupSignals`, so that importing
86
+ * `@warp-drive-mirror/alien-signals/install` first lets every framework on the page share its signals
87
+ * and memos.
88
+ *
89
+ * @example
90
+ * ```ts
91
+ * import { registerSignals } from '@warp-drive-mirror/core/configure';
92
+ *
93
+ * registerSignals(buildSignalConfig);
94
+ * ```
95
+ *
96
+ * @summary Registers signal hooks with the configured composing implementation, or configures
97
+ * them with `setupSignals` when there is none.
98
+ * @since 5.10.0
99
+ * @public
100
+ * @param buildConfig - a function that takes options and returns a configuration object
101
+ */
102
+ function registerSignals(buildConfig) {
103
+ const signalHooks = peekTransient("signalHooks");
104
+ if (signalHooks?.register) signalHooks.register(buildConfig);
105
+ else setupSignals(buildConfig);
106
+ }
107
+ /**
72
108
  * Internal method for consuming the configured `createSignal` hook
73
109
  *
74
110
  * @private
@@ -129,8 +165,7 @@ function waitFor(promise) {
129
165
  return promise;
130
166
  }
131
167
 
132
- //#endregion
133
- //#region src/signals/reactivity/internal.ts
168
+ // src/signals/reactivity/internal.ts
134
169
  const INITIALIZER_PROTO = { isInitializer: true };
135
170
  /**
136
171
  * Wraps `fn` so that a signal can recognize it as a lazy initializer
@@ -401,8 +436,7 @@ function printMemo(memo, key, lines = [], depth = 0) {
401
436
  return lines;
402
437
  }
403
438
 
404
- //#endregion
405
- //#region src/signals/reactivity/signal.ts
439
+ // src/signals/reactivity/signal.ts
406
440
  /**
407
441
  * Creates a signal for the key/object pairing and subscribes to the signal.
408
442
  *
@@ -558,8 +592,7 @@ function defineGate(obj, key, desc) {
558
592
  Object.defineProperty(obj, key, options);
559
593
  }
560
594
 
561
- //#endregion
562
- //#region src/signals/request-state.ts
595
+ // src/signals/request-state.ts
563
596
  const RequestCache = /* @__PURE__ */ new WeakMap();
564
597
  function isAbortError(error) {
565
598
  return error instanceof DOMError && error.name === "AbortError";
@@ -615,6 +648,8 @@ async function watchStream(stream, loadingState) {
615
648
  * reactive properties that can be used to build UIs that respond
616
649
  * to the progress of a request.
617
650
  *
651
+ * @summary Reactive download progress for a request, such as bytes loaded and timing, built by lazily
652
+ * reading its response stream.
618
653
  * @hideconstructor
619
654
  */
620
655
  var RequestLoadingState = class {
@@ -833,9 +868,11 @@ defineNonEnumerableSignal(RequestLoadingState.prototype, "_lastPacketTime", 0);
833
868
  *
834
869
  */
835
870
  /**
836
- * The state of a request in the "cancelled" state.
837
- * This is the state of a promise that has been
838
- * cancelled.
871
+ * The state of a request that was aborted before it settled.
872
+ *
873
+ * A cancelled request has `status: 'cancelled'` and its `reason` is an
874
+ * `AbortError`. `isError` is also `true`, as for a {@link RejectedRequest},
875
+ * so check `status` or `isCancelled` to tell the two apart.
839
876
  *
840
877
  */
841
878
  /**
@@ -869,6 +906,8 @@ defineNonEnumerableSignal(RequestLoadingState.prototype, "_lastPacketTime", 0);
869
906
  * - {@link RejectedRequest}
870
907
  * - {@link CancelledRequest}
871
908
  *
909
+ * @summary The reactive pending, fulfilled, rejected, or cancelled state of a request `Future`, as
910
+ * returned by `getRequestState`.
872
911
  */
873
912
  const RequestStateProto = {};
874
913
  function performRefresh(requester, request, isReload) {
@@ -923,7 +962,7 @@ function createRequestState(future) {
923
962
  if (state.isError) {
924
963
  promiseState.error = state.result;
925
964
  promiseState.reason = state.result;
926
- promiseState.status = "rejected";
965
+ promiseState.status = isAbortError(state.result) ? "cancelled" : "rejected";
927
966
  promiseState.isError = true;
928
967
  promiseState.isPending = false;
929
968
  promiseState.isLoading = false;
@@ -959,7 +998,7 @@ function createRequestState(future) {
959
998
  });
960
999
  promiseState.error = error;
961
1000
  promiseState.reason = error;
962
- promiseState.status = "rejected";
1001
+ promiseState.status = isAbortError(error) ? "cancelled" : "rejected";
963
1002
  promiseState.isError = true;
964
1003
  promiseState.isPending = false;
965
1004
  promiseState.isLoading = false;
@@ -971,6 +1010,26 @@ function createRequestState(future) {
971
1010
  /**
972
1011
  * `getRequestState` can be used in both JavaScript and Template contexts.
973
1012
  *
1013
+ * It returns a {@link RequestState}: a reactive object that updates as the
1014
+ * request advances. Calling it again with the same {@link Future} returns the
1015
+ * same object. Check `status` to narrow it to one of four states:
1016
+ *
1017
+ * - {@link PendingRequest} (`'pending'`) is the initial state, before the
1018
+ * request settles.
1019
+ * - {@link ResolvedRequest} (`'fulfilled'`) holds the response content on `value`.
1020
+ * - {@link RejectedRequest} (`'rejected'`) holds the error on `reason`.
1021
+ * - {@link CancelledRequest} (`'cancelled'`) is a request that was aborted.
1022
+ * `isError` is also `true` for a cancelled request, so check `status` or
1023
+ * `isCancelled` rather than `isError` if you handle it differently.
1024
+ *
1025
+ * Every state also exposes a {@link RequestLoadingState} on `loadingState`
1026
+ * for tracking the progress of the response stream.
1027
+ *
1028
+ * The [Reactive Control Flow](/guides/the-manual/reactivity/control-flow) guide shows
1029
+ * how to render request states with it, and
1030
+ * [Using The Response](/guides/the-manual/requests/using-the-response) covers the
1031
+ * `Future` it reads.
1032
+ *
974
1033
  * ```ts
975
1034
  * import { getRequestState } from '@warp-drive-mirror/ember';
976
1035
  *
@@ -1017,6 +1076,10 @@ function createRequestState(future) {
1017
1076
  * which offers a number of additional capabilities for requests *beyond* what
1018
1077
  * `RequestState` provides.
1019
1078
  *
1079
+ * @param future - the request {@link Future} to track, as returned by `store.request` or `requestManager.request`
1080
+ * @return the cached {@link RequestState} for `future`
1081
+ * @summary Returns a cached, reactive state object tracking a request `Future` through pending, success,
1082
+ * error, and cancellation.
1020
1083
  */
1021
1084
  function getRequestState(future) {
1022
1085
  let state = RequestCache.get(future);
@@ -1027,8 +1090,7 @@ function getRequestState(future) {
1027
1090
  return state;
1028
1091
  }
1029
1092
 
1030
- //#endregion
1031
- //#region ../../node_modules/.pnpm/decorat_5d4eca388601a94e7fbc656401b751d1/node_modules/decorator-transforms/dist/runtime--fcdnjmJ.js
1093
+ // ../../node_modules/.pnpm/decorat_5d4eca388601a94e7fbc656401b751d1/node_modules/decorator-transforms/dist/runtime--fcdnjmJ.js
1032
1094
  const deferred = /* @__PURE__ */ new WeakMap();
1033
1095
  function deferDecorator(proto, prop, desc) {
1034
1096
  let map = deferred.get(proto);
@@ -1078,8 +1140,7 @@ function initializeDeferredDecorator(target, prop) {
1078
1140
  });
1079
1141
  }
1080
1142
 
1081
- //#endregion
1082
- //#region src/signals/request-subscription.ts
1143
+ // src/signals/request-subscription.ts
1083
1144
  const DEFAULT_DEADLINE = 3e4;
1084
1145
  /**
1085
1146
  * A symbol used to dispose of a {@link RequestSubscription} when the
@@ -1092,28 +1153,47 @@ function isNeverString(val) {
1092
1153
  /**
1093
1154
  * The individual autorefresh strategies a {@link RequestSubscription}
1094
1155
  * may combine, see {@link AutorefreshBehaviorCombos}.
1156
+ *
1157
+ * @summary One autorefresh trigger for a request subscription: on reconnecting (`online`), on a timer
1158
+ * (`interval`), or on store invalidation (`invalid`).
1095
1159
  */
1096
1160
  /**
1097
1161
  * The value accepted by {@link SubscriptionArgs.autorefresh}: either a
1098
1162
  * boolean, a single {@link AutorefreshBehaviorType}, or a comma-separated
1099
1163
  * combination of up to three of them.
1164
+ *
1165
+ * @summary The accepted values for a request subscription's `autorefresh` option: a boolean or a
1166
+ * comma-separated mix of `online`, `interval`, and `invalid`.
1100
1167
  */
1101
1168
  /**
1102
1169
  * Utilities to assist in recovering from the error.
1170
+ *
1171
+ * @summary The online and visibility state plus a `retry` function that a request subscription exposes
1172
+ * for recovering from a failed request.
1103
1173
  */
1104
1174
  /** @deprecated use {@link RecoveryFeatures} */
1105
1175
  /**
1106
1176
  * Utilities for keeping the request fresh
1177
+ *
1178
+ * @summary The online, visibility, and refreshing state plus `refresh`, `reload`, and `abort` functions a
1179
+ * request subscription exposes alongside successful content.
1107
1180
  */
1108
1181
  /**
1109
1182
  * The args accepted by the `<Request />` component.
1183
+ *
1184
+ * @summary The arguments of the `<Request />` component: the request or query to run, autorefresh
1185
+ * options, and an optional store or subscription.
1110
1186
  */
1111
1187
  /**
1112
1188
  * The args accepted by a {@link RequestSubscription}.
1189
+ *
1190
+ * @summary Options for a request subscription: the request or query to monitor and its autorefresh settings.
1113
1191
  */
1114
1192
  /**
1115
1193
  * A reactive class
1116
1194
  *
1195
+ * @summary Reactive subscription that monitors a request or query, tracking online, visibility and refresh state and
1196
+ * handling autorefresh, reload and retry.
1117
1197
  * @hideconstructor
1118
1198
  */
1119
1199
  var RequestSubscription = class {
@@ -1213,8 +1293,14 @@ var RequestSubscription = class {
1213
1293
  * @internal
1214
1294
  */
1215
1295
  async _beginPolling() {
1296
+ let initialRequest;
1297
+ try {
1298
+ initialRequest = this.isIdle ? null : this.request;
1299
+ } catch (e) {
1300
+ throw new Error(`Unable to begin polling the request`, { cause: e });
1301
+ }
1216
1302
  try {
1217
- if (!this.isIdle) await this.request;
1303
+ if (initialRequest) await initialRequest;
1218
1304
  } catch {} finally {
1219
1305
  if (!this.isDestroyed) this._scheduleInterval();
1220
1306
  }
@@ -1544,6 +1630,9 @@ function isStore(store) {
1544
1630
  /**
1545
1631
  * Creates a {@link RequestSubscription}, the reactive class powering the
1546
1632
  * `<Request />` component's autorefresh, retry, and refresh behaviors.
1633
+ *
1634
+ * @summary Creates a reactive subscription to a request or query that tracks its state and handles
1635
+ * autorefresh, retry, and refresh.
1547
1636
  */
1548
1637
  function createRequestSubscription(store, args) {
1549
1638
  return new RequestSubscription(store, args);
@@ -1572,8 +1661,7 @@ function _DISPOSE$2() {
1572
1661
  });
1573
1662
  }
1574
1663
 
1575
- //#endregion
1576
- //#region src/signals/page-cache.ts
1664
+ // src/signals/page-cache.ts
1577
1665
  const { abs } = Math;
1578
1666
  /**
1579
1667
  * Extracts the `data` member of a document type, or the document type itself
@@ -1610,6 +1698,8 @@ function getHref(link) {
1610
1698
  * }
1611
1699
  * ```
1612
1700
  *
1701
+ * @summary Experimental: one page of a paginated collection, exposing its request, loading and error status, data,
1702
+ * and links to neighboring pages.
1613
1703
  * @since 5.9.0
1614
1704
  * @public
1615
1705
  * @hideconstructor
@@ -1792,63 +1882,209 @@ var PageCache = class {
1792
1882
  decorateMethodV2(this.prototype, "isLinked", [memoized]);
1793
1883
  }
1794
1884
  async load(request) {
1885
+ this.request = request;
1886
+ this.state = getRequestState(this.request);
1887
+ let content;
1795
1888
  try {
1796
- this.request = request;
1797
- this.state = getRequestState(this.request);
1798
- const content = (await this.request).content;
1799
- const self = getHref(content?.links?.self);
1800
- const first = getHref(content?.links?.first);
1801
- const last = getHref(content?.links?.last);
1802
- const next = getHref(content?.links?.next);
1803
- const prev = getHref(content?.links?.prev);
1889
+ content = (await this.request).content;
1890
+ } catch {
1891
+ return null;
1892
+ }
1893
+ this.applyDocument(content);
1894
+ return content;
1895
+ }
1896
+ /**
1897
+ * Re-applies an already-loaded page from a newer request for the same page
1898
+ * (a reload, or a route-driven navigation back to it). The newer document is
1899
+ * authoritative: its links and page hints replace the ones recorded from
1900
+ * the earlier load, and the collection total is updated from it. The page
1901
+ * keeps its current request until the newer one resolves, so a page on
1902
+ * screen does not flash a loading state; a rejected request leaves the
1903
+ * page untouched.
1904
+ *
1905
+ * @internal
1906
+ */
1907
+ async update(request) {
1908
+ const state = getRequestState(request);
1909
+ let content;
1910
+ try {
1911
+ content = (await request).content;
1912
+ } catch {
1913
+ return null;
1914
+ }
1915
+ this.request = request;
1916
+ this.state = state;
1917
+ this.applyDocument(content);
1918
+ return content;
1919
+ }
1920
+ /**
1921
+ * Records a loaded document's links and page number, and links this page
1922
+ * into the shared page graph.
1923
+ *
1924
+ * The document is authoritative for what it states: a link it names
1925
+ * explicitly (including an explicit `null`) overwrites whatever a neighbor
1926
+ * or an earlier load of this page recorded, and a link it omits is kept.
1927
+ * `next`/`prev` name the adjacent pages; `first`/`last` name the ends of
1928
+ * the collection, beyond which nothing may remain linked.
1929
+ *
1930
+ * For a numbered collection the document must also agree with the page
1931
+ * numbers: `next` is the page after this one, `prev` the page before, a
1932
+ * page without `prev` is page 1, a page without `next` is the last page,
1933
+ * `first` is page 1 and `last` is page `totalPages`. A document that
1934
+ * contradicts this is a server (or collection-mixing) bug and is asserted
1935
+ * in development, before anything is recorded from it. A cursor collection
1936
+ * has no numbers, so there its links are the only authority.
1937
+ *
1938
+ * @internal
1939
+ */
1940
+ applyDocument(content) {
1941
+ const links = content?.links ?? {};
1942
+ const self = getHref(content?.links?.self);
1943
+ const first = getHref(content?.links?.first);
1944
+ const last = getHref(content?.links?.last);
1945
+ const next = getHref(content?.links?.next);
1946
+ const prev = getHref(content?.links?.prev);
1947
+ macroCondition(getGlobalConfig().WarpDriveMirror.env.DEBUG) && ((test) => {
1948
+ if (!test) throw new Error("Expected the page to have a self link");
1949
+ })(self);
1950
+ const { currentPage, totalPages } = this.manager.readPageHints(content);
1951
+ const firstPage = first ? this.manager.getPageCache(first) : null;
1952
+ const lastPage = last ? this.manager.getPageCache(last) : null;
1953
+ const prevPage = prev ? this.manager.getPageCache(prev) : null;
1954
+ const nextPage = next ? this.manager.getPageCache(next) : null;
1955
+ if (this.manager.isNumbered) {
1956
+ const ownNumber = (page) => page === this ? currentPage : page.pageNumber;
1804
1957
  macroCondition(getGlobalConfig().WarpDriveMirror.env.DEBUG) && ((test) => {
1805
- if (!test) throw new Error("Expected the page to have a self link");
1806
- })(self);
1807
- const pageNumber = this.getPageNumber(content);
1808
- if (pageNumber) this.pageNumber = pageNumber;
1809
- const firstPage = first ? this.manager.getPageCache(first) : null;
1810
- const lastPage = last ? this.manager.getPageCache(last) : null;
1811
- const prevPage = prev ? this.manager.getPageCache(prev) : null;
1812
- const nextPage = next ? this.manager.getPageCache(next) : null;
1813
- if (firstPage) {
1814
- this.firstLink = first;
1815
- firstPage.setPageNumber(1);
1816
- if (!firstPage.after) firstPage.updateLinkage({ after: this });
1817
- }
1818
- if (lastPage) {
1819
- this.lastLink = last;
1820
- lastPage.setPageNumber(this.manager.totalPages);
1821
- if (!lastPage.before) lastPage.updateLinkage({ before: this });
1822
- }
1823
- if (nextPage) {
1824
- this.nextLink = next;
1825
- nextPage.setPageNumber(this.pageNumber + 1);
1826
- nextPage.updateLinks({ prev: self });
1827
- }
1828
- if (prevPage) {
1829
- this.prevLink = prev;
1830
- prevPage.setPageNumber(this.pageNumber - 1);
1831
- prevPage.updateLinks({ next: self });
1832
- }
1833
- if (this.isLinked) {
1834
- if (prevPage) prevPage.updateLinkage({ after: this });
1835
- if (nextPage) nextPage.updateLinkage({ before: this });
1836
- } else if (prevPage?.isLinked) {
1837
- this.updateLinkage({ before: prevPage });
1838
- if (nextPage) nextPage.updateLinkage({ before: this });
1839
- } else if (nextPage?.isLinked) {
1840
- this.updateLinkage({ after: nextPage });
1841
- if (prevPage) prevPage.updateLinkage({ after: this });
1842
- } else if ((prevPage || nextPage) && (firstPage || lastPage)) this.lookupLinkage(firstPage, lastPage);
1843
- else if (prevPage || nextPage) this.updateLinkage({
1844
- before: prevPage,
1845
- after: nextPage
1846
- });
1847
- return content;
1848
- } catch {}
1849
- return null;
1958
+ if (!test) throw new Error(`Page ${self} is page ${currentPage} but the collection has ${totalPages} pages: it lies beyond the collection total`);
1959
+ })(!currentPage || !totalPages || currentPage <= totalPages);
1960
+ macroCondition(getGlobalConfig().WarpDriveMirror.env.DEBUG) && ((test) => {
1961
+ if (!test) throw new Error(`Page ${self} is page ${currentPage} and has no prev link but is not the first page`);
1962
+ })(!("prev" in links && !prev && currentPage > 1));
1963
+ macroCondition(getGlobalConfig().WarpDriveMirror.env.DEBUG) && ((test) => {
1964
+ if (!test) throw new Error(`Page ${self} is page ${currentPage} of ${totalPages} and has no next link but is not the last page`);
1965
+ })(!("next" in links && !next && currentPage > 0 && totalPages > 0 && currentPage < totalPages));
1966
+ macroCondition(getGlobalConfig().WarpDriveMirror.env.DEBUG) && ((test) => {
1967
+ if (!test) throw new Error(`Page ${self} is page ${currentPage} but its next link names page ${nextPage ? ownNumber(nextPage) : 0}, expected page ${currentPage + 1}`);
1968
+ })(!nextPage || !currentPage || !ownNumber(nextPage) || ownNumber(nextPage) === currentPage + 1);
1969
+ macroCondition(getGlobalConfig().WarpDriveMirror.env.DEBUG) && ((test) => {
1970
+ if (!test) throw new Error(`Page ${self} is page ${currentPage} but its prev link names page ${prevPage ? ownNumber(prevPage) : 0}, expected page ${currentPage - 1}`);
1971
+ })(!prevPage || !currentPage || !ownNumber(prevPage) || ownNumber(prevPage) === currentPage - 1);
1972
+ macroCondition(getGlobalConfig().WarpDriveMirror.env.DEBUG) && ((test) => {
1973
+ if (!test) throw new Error(`Page ${self} has a first link that names page ${firstPage ? ownNumber(firstPage) : 0}, expected page 1`);
1974
+ })(!firstPage || !ownNumber(firstPage) || ownNumber(firstPage) === 1);
1975
+ macroCondition(getGlobalConfig().WarpDriveMirror.env.DEBUG) && ((test) => {
1976
+ if (!test) throw new Error(`Page ${self} has a last link that names page ${lastPage ? ownNumber(lastPage) : 0}, expected the last page ${totalPages}`);
1977
+ })(!lastPage || !totalPages || !ownNumber(lastPage) || ownNumber(lastPage) === totalPages);
1978
+ macroCondition(getGlobalConfig().WarpDriveMirror.env.DEBUG) && ((test) => {
1979
+ if (!test) throw new Error(`Page ${self} has a first link to ${first} but that first page has a page linked before it`);
1980
+ })(!firstPage?.before);
1981
+ }
1982
+ if (currentPage) this.pageNumber = currentPage;
1983
+ this.manager.totalPages = totalPages;
1984
+ const stated = {};
1985
+ if ("first" in links) stated.first = first;
1986
+ if ("last" in links) stated.last = last;
1987
+ if ("next" in links) stated.next = next;
1988
+ if ("prev" in links) stated.prev = prev;
1989
+ this.updateLinks(stated);
1990
+ if ("next" in links && !next) {
1991
+ const after = this.after;
1992
+ this.detachAfter();
1993
+ if (after?.prevLink === self) after.updateLinks({ prev: null });
1994
+ }
1995
+ if ("prev" in links && !prev) {
1996
+ const before = this.before;
1997
+ this.detachBefore();
1998
+ if (before?.nextLink === self) before.updateLinks({ next: null });
1999
+ }
2000
+ if (lastPage) {
2001
+ lastPage.detachAfter();
2002
+ lastPage.updateLinks({ next: null });
2003
+ }
2004
+ if (firstPage) {
2005
+ firstPage.detachBefore();
2006
+ firstPage.updateLinks({ prev: null });
2007
+ }
2008
+ if (firstPage) {
2009
+ firstPage.setPageNumber(1);
2010
+ if (firstPage !== this && !firstPage.after) this.linkFirst(firstPage);
2011
+ }
2012
+ if (lastPage) {
2013
+ lastPage.setPageNumber(this.manager.totalPages);
2014
+ if (lastPage !== this && !lastPage.before) this.linkLast(lastPage);
2015
+ }
2016
+ if (nextPage) {
2017
+ nextPage.setPageNumber(this.pageNumber + 1);
2018
+ nextPage.updateLinks({ prev: self });
2019
+ }
2020
+ if (prevPage) {
2021
+ prevPage.setPageNumber(this.pageNumber - 1);
2022
+ prevPage.updateLinks({ next: self });
2023
+ }
2024
+ if (nextPage && this.after && this.after !== nextPage && this.after.pageNumber <= nextPage.pageNumber) this.detachAfter();
2025
+ if (prevPage && this.before && this.before !== prevPage && this.before.pageNumber >= prevPage.pageNumber) this.detachBefore();
2026
+ if (this.isLinked) {
2027
+ if (prevPage) prevPage.updateLinkage({ after: this });
2028
+ if (nextPage) nextPage.updateLinkage({ before: this });
2029
+ } else if (prevPage?.isLinked) {
2030
+ this.updateLinkage({ before: prevPage });
2031
+ if (nextPage) nextPage.updateLinkage({ before: this });
2032
+ } else if (nextPage?.isLinked) {
2033
+ this.updateLinkage({ after: nextPage });
2034
+ if (prevPage) prevPage.updateLinkage({ after: this });
2035
+ } else if ((prevPage || nextPage) && (firstPage || lastPage)) this.lookupLinkage(firstPage, lastPage);
2036
+ else if (prevPage || nextPage) this.updateLinkage({
2037
+ before: prevPage,
2038
+ after: nextPage
2039
+ });
2040
+ }
2041
+ /** @internal */
2042
+ detachAfter() {
2043
+ const after = this.after;
2044
+ if (after) {
2045
+ if (after.before === this) after.setBefore(null);
2046
+ this.setAfter(null);
2047
+ }
1850
2048
  }
1851
2049
  /** @internal */
2050
+ detachBefore() {
2051
+ const before = this.before;
2052
+ if (before) {
2053
+ if (before.after === this) before.setAfter(null);
2054
+ this.setBefore(null);
2055
+ }
2056
+ }
2057
+ /**
2058
+ * Links an unlinked `first` page before the earliest page reachable
2059
+ * backwards from this one that must follow it.
2060
+ *
2061
+ * @internal
2062
+ */
2063
+ linkFirst(firstPage) {
2064
+ let head = this;
2065
+ while (head.before && head.before !== firstPage && (!head.before.pageNumber || head.before.pageNumber > firstPage.pageNumber)) head = head.before;
2066
+ firstPage.updateLinkage({ after: head });
2067
+ }
2068
+ /**
2069
+ * Links an unlinked `last` page after the furthest page reachable forwards
2070
+ * from this one that must precede it.
2071
+ *
2072
+ * @internal
2073
+ */
2074
+ linkLast(lastPage) {
2075
+ let tail = this;
2076
+ while (tail.after && tail.after !== lastPage && (!tail.after.pageNumber || !lastPage.pageNumber || tail.after.pageNumber < lastPage.pageNumber)) tail = tail.after;
2077
+ lastPage.updateLinkage({ before: tail });
2078
+ }
2079
+ /**
2080
+ * Places this page between `before` and `after` in the graph (a missing side
2081
+ * is taken from the given side's current neighbor, so a single side splices
2082
+ * this page in). Pointers this page or the displaced neighbors held to their
2083
+ * old positions are cleared first, so a page moved within the graph never
2084
+ * leaves a dangling link behind that could close a cycle.
2085
+ *
2086
+ * @internal
2087
+ */
1852
2088
  updateLinkage({ before, after }) {
1853
2089
  macroCondition(getGlobalConfig().WarpDriveMirror.env.DEBUG) && ((test) => {
1854
2090
  if (!test) throw new Error("Expected at least one of before or after page states to link to this page");
@@ -1856,10 +2092,16 @@ var PageCache = class {
1856
2092
  const leftSide = before ?? after?.before;
1857
2093
  const rightSide = after ?? before?.after;
1858
2094
  if (leftSide && leftSide !== this) {
2095
+ if (this.before !== leftSide) this.detachBefore();
2096
+ const displaced = leftSide.after;
2097
+ if (displaced && displaced !== this && displaced !== rightSide && displaced.before === leftSide) displaced.setBefore(null);
1859
2098
  leftSide.setAfter(this);
1860
2099
  this.setBefore(leftSide);
1861
2100
  }
1862
2101
  if (rightSide && rightSide !== this) {
2102
+ if (this.after !== rightSide) this.detachAfter();
2103
+ const displaced = rightSide.before;
2104
+ if (displaced && displaced !== this && displaced !== leftSide && displaced.after === rightSide) displaced.setAfter(null);
1863
2105
  rightSide.setBefore(this);
1864
2106
  this.setAfter(rightSide);
1865
2107
  }
@@ -1899,16 +2141,18 @@ var PageCache = class {
1899
2141
  })(page !== this);
1900
2142
  this.after = page;
1901
2143
  }
1902
- /** @internal */
1903
- getPageNumber(document) {
1904
- return this.manager.readPageHints(document).currentPage;
1905
- }
1906
- /** @internal */
1907
- updateLinks = ({ prev, next, first, last }) => {
1908
- if (prev) this.prevLink = prev;
1909
- if (next) this.nextLink = next;
1910
- if (first) this.firstLink = first;
1911
- if (last) this.lastLink = last;
2144
+ /**
2145
+ * Records the given links. Only the keys present are applied, so a caller
2146
+ * states exactly what it knows: an explicit `null` clears a link, an
2147
+ * omitted key leaves the recorded link alone.
2148
+ *
2149
+ * @internal
2150
+ */
2151
+ updateLinks = (links) => {
2152
+ if ("prev" in links) this.prevLink = links.prev ?? null;
2153
+ if ("next" in links) this.nextLink = links.next ?? null;
2154
+ if ("first" in links) this.firstLink = links.first ?? null;
2155
+ if ("last" in links) this.lastLink = links.last ?? null;
1912
2156
  };
1913
2157
  /** @internal */
1914
2158
  setPageNumber = (pageNumber) => {
@@ -1916,8 +2160,7 @@ var PageCache = class {
1916
2160
  };
1917
2161
  };
1918
2162
 
1919
- //#endregion
1920
- //#region src/signals/pagination-cache.ts
2163
+ // src/signals/pagination-cache.ts
1921
2164
  const PaginationCacheMap = /* @__PURE__ */ new Map();
1922
2165
  /**
1923
2166
  * A hint function for extracting the `currentPage` and `totalPages` from a loaded
@@ -1934,6 +2177,8 @@ const PaginationCacheMap = /* @__PURE__ */ new Map();
1934
2177
  * collection must provide the same function reference — define it once at module
1935
2178
  * scope and import it everywhere.
1936
2179
  *
2180
+ * @summary Experimental: a function you pass to `<Paginate />` that reads `currentPage` and `totalPages` from a
2181
+ * loaded document when they are not in the default `meta` locations.
1937
2182
  * @since 5.9.0
1938
2183
  * @public
1939
2184
  */
@@ -1942,6 +2187,8 @@ const PaginationCacheMap = /* @__PURE__ */ new Map();
1942
2187
  * document `meta`, matching the behavior used before `pageHints` was configurable.
1943
2188
  * Used whenever the consumer does not provide a `pageHints` function.
1944
2189
  *
2190
+ * @summary Experimental: the fallback page-hints function, reading `meta.page` or `meta.currentPage` and
2191
+ * `meta.totalPages` from a document, with `0` meaning unknown.
1945
2192
  * @since 5.9.0
1946
2193
  * @public
1947
2194
  */
@@ -1961,6 +2208,8 @@ const defaultPageHints = (document) => {
1961
2208
  * interact with — the cache itself is plumbing shared between the pagination
1962
2209
  * classes.
1963
2210
  *
2211
+ * @summary Experimental: the shared, app-wide store of loaded pages, page order, and `totalPages` for one paginated
2212
+ * collection, keyed by its `first` or `self` link.
1964
2213
  * @since 5.9.0
1965
2214
  * @public
1966
2215
  * @hideconstructor
@@ -2055,17 +2304,28 @@ var PaginationCache = class {
2055
2304
  }
2056
2305
  return page;
2057
2306
  }
2058
- /** @internal */
2059
- loadPage(url, request) {
2307
+ /**
2308
+ * Loads the page at `url` with `request` when it is not loaded (or its load
2309
+ * failed), or re-applies `request`'s document when it is a newer request
2310
+ * for an already-loaded page (a reload, or navigating back to it: the newer
2311
+ * document is authoritative for the page's links and the collection total,
2312
+ * which may have changed since the first load).
2313
+ *
2314
+ * Resolves to the page once that has settled. A rejected request settles
2315
+ * too — it is surfaced through the page's state, not thrown. The promise
2316
+ * rejects only when the document contradicts the collection (see
2317
+ * {@link PageCache.applyDocument}), so the caller that triggered the load
2318
+ * is the one that hears about it.
2319
+ *
2320
+ * @internal
2321
+ */
2322
+ async loadPage(url, request) {
2060
2323
  const page = this.getPageCache(url);
2061
2324
  if ((!page.isLoaded || page.isError) && request) {
2062
- macroCondition(getGlobalConfig().WarpDriveMirror.env.DEBUG) && ((test) => {
2063
- if (!test) throw new Error("Expected a request to a load a page");
2064
- })(request);
2065
- page.load(request).then((document) => {
2066
- this.updateFirstPage(page);
2067
- if (document) this.totalPages = this.getTotalPages(document);
2068
- });
2325
+ await page.load(request);
2326
+ this.updateFirstPage(page);
2327
+ } else if (request && page.isSuccess && request !== page.request) {
2328
+ if (await page.update(request)) this.updateFirstPage(page);
2069
2329
  }
2070
2330
  return page;
2071
2331
  }
@@ -2075,10 +2335,6 @@ var PaginationCache = class {
2075
2335
  while (maybeFirstPage.before) maybeFirstPage = maybeFirstPage.before;
2076
2336
  if (!this.firstPage || this.firstPage.pageNumber > maybeFirstPage.pageNumber) this.firstPage = maybeFirstPage;
2077
2337
  }
2078
- /** @internal */
2079
- getTotalPages(document) {
2080
- return this.readPageHints(document).totalPages;
2081
- }
2082
2338
  /**
2083
2339
  * Every page known to the shared graph, in order — loaded pages and pages
2084
2340
  * known only from links — across all components sharing the collection.
@@ -2094,14 +2350,13 @@ var PaginationCache = class {
2094
2350
  * ```
2095
2351
  */
2096
2352
  get pages() {
2097
- const self = this;
2098
- return { *[Symbol.iterator]() {
2099
- let page = self.firstPage;
2100
- while (page) {
2101
- yield page;
2102
- page = page.after;
2103
- }
2104
- } };
2353
+ const pages = [];
2354
+ let page = this.firstPage;
2355
+ while (page) {
2356
+ pages.push(page);
2357
+ page = page.after;
2358
+ }
2359
+ return pages;
2105
2360
  }
2106
2361
  /**
2107
2362
  * The items of every loaded page in the shared graph, flattened into one
@@ -2115,10 +2370,9 @@ var PaginationCache = class {
2115
2370
  decorateMethodV2(this.prototype, "pages", [memoized]);
2116
2371
  }
2117
2372
  get data() {
2118
- const self = this;
2119
- return { *[Symbol.iterator]() {
2120
- for (const page of self.pages) if (page.data) yield* page.data;
2121
- } };
2373
+ const items = [];
2374
+ for (const page of this.pages) if (page.data) items.push(...page.data);
2375
+ return items;
2122
2376
  }
2123
2377
  static {
2124
2378
  decorateMethodV2(this.prototype, "data", [memoized]);
@@ -2129,6 +2383,8 @@ var PaginationCache = class {
2129
2383
  * `first` or `self` link). Returns the same instance for the same key for the
2130
2384
  * lifetime of the module.
2131
2385
  *
2386
+ * @summary Experimental: returns the shared pagination cache for a collection's `first` or `self` link, creating it
2387
+ * on first use.
2132
2388
  * @since 5.9.0
2133
2389
  * @public
2134
2390
  */
@@ -2145,6 +2401,7 @@ function getPaginationCache(key) {
2145
2401
  * Primarily intended for test isolation, since the cache is keyed by url and
2146
2402
  * otherwise persists for the lifetime of the module.
2147
2403
  *
2404
+ * @summary Experimental: discards every shared pagination cache, mainly so tests start from a clean state.
2148
2405
  * @since 5.9.0
2149
2406
  * @public
2150
2407
  */
@@ -2152,8 +2409,7 @@ function clearPaginationCache() {
2152
2409
  PaginationCacheMap.clear();
2153
2410
  }
2154
2411
 
2155
- //#endregion
2156
- //#region src/signals/pagination-state.ts
2412
+ // src/signals/pagination-state.ts
2157
2413
  /**
2158
2414
  * The two navigation surfaces a `<Paginate />` component can drive. Selecting
2159
2415
  * one (via the component's `@mode` arg) narrows the yielded state so the two
@@ -2161,25 +2417,40 @@ function clearPaginationCache() {
2161
2417
  *
2162
2418
  * - `'paged'` — single-page view, see {@link PagedPaginationState}.
2163
2419
  * - `'infinite'` — accumulated view, see {@link InfinitePaginationState}.
2420
+ *
2421
+ * @summary Experimental: the `@mode` value of `<Paginate />`, either `'paged'` for a single-page view or
2422
+ * `'infinite'` for an accumulated view, which selects the yielded pagination API.
2164
2423
  */
2165
2424
  /**
2166
2425
  * The part of a {@link PaginationState} available to both navigation surfaces.
2426
+ *
2427
+ * @summary Experimental: the pagination state members available in both paged and infinite mode, namely
2428
+ * `totalPages` and `adoptPage`.
2167
2429
  */
2168
2430
  /**
2169
2431
  * The paged (single-page view) surface of a {@link PaginationState}: render
2170
2432
  * {@link PaginationState.activePageRequest | activePageRequest}, navigate with
2171
2433
  * {@link PaginationState.loadPage | loadPage}. This is what the `<Paginate />`
2172
2434
  * component yields in `'paged'` mode (the default).
2435
+ *
2436
+ * @summary Experimental: the pagination state `<Paginate />` yields in paged mode, exposing the active page, its
2437
+ * request, and `loadPage` for navigating to a page by URL.
2173
2438
  */
2174
2439
  /**
2175
2440
  * The infinite (accumulated view) surface of a {@link PaginationState}: render
2176
2441
  * {@link PaginationState.data | data}, grow it with
2177
2442
  * {@link PaginationState.loadNext | loadNext}/{@link PaginationState.loadPrev | loadPrev}.
2178
2443
  * This is what the `<Paginate />` component yields in `'infinite'` mode.
2444
+ *
2445
+ * @summary Experimental: the pagination state `<Paginate />` yields in infinite mode, exposing the accumulated
2446
+ * items and pages plus `loadNext` and `loadPrev` to extend them.
2179
2447
  */
2180
2448
  /**
2181
2449
  * Resolves a {@link PaginateMode} to the surface it exposes, so a component
2182
2450
  * generic over the mode can yield only that surface.
2451
+ *
2452
+ * @summary Experimental: resolves a pagination mode to its state type, the infinite-mode state for `'infinite'`
2453
+ * and the paged-mode state otherwise.
2183
2454
  */
2184
2455
  /**
2185
2456
  * The per-component, local pagination state. It houses the state that is unique
@@ -2203,6 +2474,8 @@ function clearPaginationCache() {
2203
2474
  * Instances are created via {@link getPaginationState} (or by the `<Paginate />`
2204
2475
  * component on your behalf), never constructed directly.
2205
2476
  *
2477
+ * @summary Experimental: one component's pagination state over a shared collection, tracking the active page and
2478
+ * the loaded run and providing paged and infinite navigation.
2206
2479
  * @since 5.9.0
2207
2480
  * @public
2208
2481
  * @hideconstructor
@@ -2233,10 +2506,23 @@ var PaginationState = class {
2233
2506
  * them backward/forward. Both seed to {@link initialPage}; a purely paged
2234
2507
  * consumer never extends them, so they stay put and are effectively unused.
2235
2508
  *
2509
+ * Only ever written through {@link extendRun} and {@link restartRun}, which
2510
+ * keep {@link runMembers} in step.
2511
+ *
2236
2512
  * @internal
2237
2513
  */
2238
2514
  /** @internal */
2239
2515
  /**
2516
+ * Every page this component has loaded into its run — what the frontier
2517
+ * spanned each time it moved. Bounds the walk in {@link pages}: the shared
2518
+ * graph may relink a page in the run to one that another component sharing
2519
+ * the collection loaded, and that page is not part of this run until it is
2520
+ * loaded through here. Untracked bookkeeping — it only changes together with
2521
+ * the frontier signals, which carry the notification.
2522
+ *
2523
+ * @internal
2524
+ */
2525
+ /**
2240
2526
  * The request of the latest {@link adoptPage} call — only that call may
2241
2527
  * commit. Later calls (or a {@link loadPage} navigation) claim the slot,
2242
2528
  * superseding in-flight adoptions so the newest navigation always wins.
@@ -2249,6 +2535,7 @@ var PaginationState = class {
2249
2535
  this.request = request;
2250
2536
  this.pageHints = pageHints;
2251
2537
  this._adoptTarget = null;
2538
+ this.runMembers = /* @__PURE__ */ new Set();
2252
2539
  this.setup();
2253
2540
  }
2254
2541
  /**
@@ -2297,21 +2584,44 @@ var PaginationState = class {
2297
2584
  * same collection to different extents each see only what they have scrolled
2298
2585
  * through. For every page known to the whole collection, see
2299
2586
  * {@link PaginationCache.pages}.
2587
+ *
2588
+ * The run is walked through the shared graph, so it ends early when a page
2589
+ * that was in it no longer follows the page before it — a reload that showed
2590
+ * the collection now ends sooner, or that its next cursor moved. It also ends
2591
+ * before a page this component never loaded: a reload may relink a page in
2592
+ * the run to one another component sharing the collection scrolled to, and
2593
+ * that page joins this run only through {@link loadNext}.
2300
2594
  */
2301
2595
  static {
2302
2596
  decorateMethodV2(this.prototype, "totalPages", [memoized]);
2303
2597
  }
2304
2598
  get pages() {
2305
- const self = this;
2306
- return { *[Symbol.iterator]() {
2307
- const end = self.frontierEnd;
2308
- let page = self.frontierStart;
2309
- while (page) {
2310
- yield page;
2311
- if (page === end) break;
2312
- page = page.after;
2313
- }
2314
- } };
2599
+ const pages = [];
2600
+ const end = this.frontierEnd;
2601
+ let page = this.frontierStart;
2602
+ while (page) {
2603
+ pages.push(page);
2604
+ if (page === end) break;
2605
+ const next = page.after;
2606
+ if (!next?.isSuccess || !this.runMembers.has(next)) break;
2607
+ page = next;
2608
+ }
2609
+ return pages;
2610
+ }
2611
+ /**
2612
+ * The last page of the run {@link pages} walks — the forward frontier, or
2613
+ * the page before the first one that no longer follows in the graph or that
2614
+ * this component never loaded.
2615
+ *
2616
+ * @internal
2617
+ */
2618
+ static {
2619
+ decorateMethodV2(this.prototype, "pages", [memoized]);
2620
+ }
2621
+ get runEnd() {
2622
+ let end = null;
2623
+ for (const page of this.pages) end = page;
2624
+ return end;
2315
2625
  }
2316
2626
  /**
2317
2627
  * The accumulated items across the loaded run, from the backward frontier to
@@ -2336,13 +2646,12 @@ var PaginationState = class {
2336
2646
  * ```
2337
2647
  */
2338
2648
  static {
2339
- decorateMethodV2(this.prototype, "pages", [memoized]);
2649
+ decorateMethodV2(this.prototype, "runEnd", [memoized]);
2340
2650
  }
2341
2651
  get data() {
2342
- const self = this;
2343
- return { *[Symbol.iterator]() {
2344
- for (const page of self.pages) if (page.data) yield* page.data;
2345
- } };
2652
+ const items = [];
2653
+ for (const page of this.pages) if (page.data) items.push(...page.data);
2654
+ return items;
2346
2655
  }
2347
2656
  /**
2348
2657
  * Whether a page exists after the forward frontier — i.e. there is more to load
@@ -2358,7 +2667,7 @@ var PaginationState = class {
2358
2667
  decorateMethodV2(this.prototype, "data", [memoized]);
2359
2668
  }
2360
2669
  get hasNext() {
2361
- return Boolean(this.frontierEnd?.nextLink);
2670
+ return Boolean(this.runEnd?.nextLink);
2362
2671
  }
2363
2672
  /**
2364
2673
  * Whether a page exists before the backward frontier.
@@ -2373,7 +2682,10 @@ var PaginationState = class {
2373
2682
  * The request for the page just after the forward frontier, for the infinite
2374
2683
  * surface. `null` until {@link loadNext} fires it (so a `<Request>` wrapping it
2375
2684
  * renders its idle block), the in-flight `Future` while that page loads, then
2376
- * `null` again once the frontier advances onto it. Also `null` at end-of-list.
2685
+ * `null` again once the frontier advances onto it. Also `null` at end-of-list,
2686
+ * and while the page sits loaded in the shared cache (another component
2687
+ * scrolled to it) but outside this run — {@link loadNext} then joins it
2688
+ * without a request of its own.
2377
2689
  *
2378
2690
  * ```gts
2379
2691
  * {{#if pages.hasNext}}
@@ -2388,9 +2700,9 @@ var PaginationState = class {
2388
2700
  decorateMethodV2(this.prototype, "hasPrevious", [memoized]);
2389
2701
  }
2390
2702
  get nextRequest() {
2391
- const url = this.frontierEnd?.nextLink;
2703
+ const url = this.runEnd?.nextLink;
2392
2704
  if (!url) return null;
2393
- return this.paginationCache?.getPageCache(url).request ?? null;
2705
+ return this.pendingRequest(url);
2394
2706
  }
2395
2707
  /**
2396
2708
  * The request for the page just before the backward frontier. Mirror of
@@ -2402,12 +2714,24 @@ var PaginationState = class {
2402
2714
  get previousRequest() {
2403
2715
  const url = this.frontierStart?.prevLink;
2404
2716
  if (!url) return null;
2405
- return this.paginationCache?.getPageCache(url).request ?? null;
2717
+ return this.pendingRequest(url);
2406
2718
  }
2407
- /** @internal */
2719
+ /**
2720
+ * The request of the page at `url` unless it already succeeded, in which
2721
+ * case there is nothing pending: the page either sits in this run, or joins
2722
+ * it on the next {@link loadNext}/{@link loadPrev} without a new request.
2723
+ *
2724
+ * @internal
2725
+ */
2408
2726
  static {
2409
2727
  decorateMethodV2(this.prototype, "previousRequest", [memoized]);
2410
2728
  }
2729
+ pendingRequest(url) {
2730
+ const page = this.paginationCache?.getPageCache(url);
2731
+ if (!page || page.isSuccess) return null;
2732
+ return page.request ?? null;
2733
+ }
2734
+ /** @internal */
2411
2735
  async setup() {
2412
2736
  let document;
2413
2737
  try {
@@ -2424,9 +2748,31 @@ var PaginationState = class {
2424
2748
  const cache = getPaginationCache(firstLink ?? selfLink ?? "");
2425
2749
  cache.installPageHints(this.pageHints);
2426
2750
  this.paginationCache = cache;
2427
- cache.totalPages = cache.getTotalPages(content);
2428
- this.activePage = this.initialPage = cache.loadPage(selfLink, this.request);
2429
- this.frontierStart = this.frontierEnd = this.initialPage;
2751
+ const page = cache.getPageCache(selfLink);
2752
+ this.activePage = this.initialPage = page;
2753
+ this.restartRun(page);
2754
+ await cache.loadPage(selfLink, this.request);
2755
+ }
2756
+ /**
2757
+ * Moves the frontier onto a page adjacent to the run, recording it as a
2758
+ * member.
2759
+ *
2760
+ * @internal
2761
+ */
2762
+ extendRun(dir, page) {
2763
+ this.runMembers.add(page);
2764
+ if (dir === "next") this.frontierEnd = page;
2765
+ else this.frontierStart = page;
2766
+ }
2767
+ /**
2768
+ * Restarts the run at a single page, forgetting every earlier member.
2769
+ *
2770
+ * @internal
2771
+ */
2772
+ restartRun(page) {
2773
+ this.runMembers.clear();
2774
+ this.runMembers.add(page);
2775
+ this.frontierStart = this.frontierEnd = page;
2430
2776
  }
2431
2777
  /**
2432
2778
  * Commits a resolved, membership-proven page into this state, making it the
@@ -2443,9 +2789,9 @@ var PaginationState = class {
2443
2789
  _activate(page, url) {
2444
2790
  this.activePage = page;
2445
2791
  for (const existing of this.pages) if (existing === page) return;
2446
- if (this.frontierEnd?.nextLink === url) this.frontierEnd = page;
2447
- else if (this.frontierStart?.prevLink === url) this.frontierStart = page;
2448
- else this.frontierStart = this.frontierEnd = page;
2792
+ if (this.runEnd?.nextLink === url) this.extendRun("next", page);
2793
+ else if (this.frontierStart?.prevLink === url) this.extendRun("prev", page);
2794
+ else this.restartRun(page);
2449
2795
  }
2450
2796
  /**
2451
2797
  * Adopts an externally-issued request into this pagination, making its page
@@ -2476,6 +2822,10 @@ var PaginationState = class {
2476
2822
  * - this state has not finished setting up its own collection yet
2477
2823
  * - the call was superseded by a newer navigation
2478
2824
  *
2825
+ * In development, a document that contradicts the collection's page
2826
+ * numbers (a `next` that skips a page, a `first` that is not page 1, ...)
2827
+ * rejects instead of resolving: the graph is not updated from it.
2828
+ *
2479
2829
  * ```ts
2480
2830
  * const pages = getPaginationState(initialRequest);
2481
2831
  * // later, e.g. in a route model hook reacting to a ?page= param:
@@ -2505,12 +2855,7 @@ var PaginationState = class {
2505
2855
  if (!test) throw new Error("Expected the adopted document to have a self link");
2506
2856
  })(selfLink);
2507
2857
  if (!selfLink || (firstLink ?? selfLink) !== cache.key) return null;
2508
- const page = cache.loadPage(selfLink, request);
2509
- try {
2510
- await page.request;
2511
- } catch {
2512
- return null;
2513
- }
2858
+ const page = await cache.loadPage(selfLink, request);
2514
2859
  if (this._adoptTarget !== request) return null;
2515
2860
  this._activate(page, selfLink);
2516
2861
  return page.value;
@@ -2557,7 +2902,7 @@ var PaginationState = class {
2557
2902
  macroCondition(getGlobalConfig().WarpDriveMirror.env.DEBUG) && ((test) => {
2558
2903
  if (!test) throw new Error("Expected the pagination cache to be set up before loading a page");
2559
2904
  })(cache);
2560
- const frontier = dir === "next" ? this.frontierEnd : this.frontierStart;
2905
+ const frontier = dir === "next" ? this.runEnd : this.frontierStart;
2561
2906
  const url = dir === "next" ? frontier?.nextLink : frontier?.prevLink;
2562
2907
  if (!url) return null;
2563
2908
  const page = cache.getPageCache(url);
@@ -2570,15 +2915,12 @@ var PaginationState = class {
2570
2915
  method: "GET",
2571
2916
  url
2572
2917
  });
2573
- cache.loadPage(url, request);
2574
- }
2575
- try {
2918
+ await cache.loadPage(url, request);
2919
+ } else try {
2576
2920
  await page.request;
2577
- } catch {
2578
- return null;
2579
- }
2580
- if (dir === "next") this.frontierEnd = page;
2581
- else this.frontierStart = page;
2921
+ } catch {}
2922
+ if (!page.isSuccess) return null;
2923
+ this.extendRun(dir, page);
2582
2924
  return page.value;
2583
2925
  };
2584
2926
  /**
@@ -2597,7 +2939,9 @@ var PaginationState = class {
2597
2939
  * On failure the page stays active and {@link activePageRequest} resolves to
2598
2940
  * it, so a wrapping `<Request>` renders its error block. Calling again (for
2599
2941
  * example clicking the page's link a second time) retries: the failed page
2600
- * is re-requested with a forced reload.
2942
+ * is re-requested with a forced reload. In development, a document that
2943
+ * contradicts the collection's page numbers rejects instead (see
2944
+ * {@link adoptPage}).
2601
2945
  *
2602
2946
  * ```gts
2603
2947
  * <EachLink @pages={{pages}}>
@@ -2624,12 +2968,8 @@ var PaginationState = class {
2624
2968
  method: "GET",
2625
2969
  url
2626
2970
  });
2627
- cache.loadPage(url, request);
2628
- try {
2629
- await page.request;
2630
- } catch {
2631
- return null;
2632
- }
2971
+ await cache.loadPage(url, request);
2972
+ if (!page.isSuccess) return null;
2633
2973
  }
2634
2974
  return page.value;
2635
2975
  };
@@ -2656,6 +2996,8 @@ const PaginationStateCache = /* @__PURE__ */ new WeakMap();
2656
2996
  * await pages.loadNext();
2657
2997
  * ```
2658
2998
  *
2999
+ * @summary Experimental: returns the pagination state for a request, creating it on first call and returning the
3000
+ * same instance for the same request thereafter.
2659
3001
  * @since 5.9.0
2660
3002
  * @public
2661
3003
  */
@@ -2668,8 +3010,7 @@ function getPaginationState(request, pageHints) {
2668
3010
  return state;
2669
3011
  }
2670
3012
 
2671
- //#endregion
2672
- //#region src/signals/pagination-links.ts
3013
+ // src/signals/pagination-links.ts
2673
3014
  const PaginationLinksCache = /* @__PURE__ */ new WeakMap();
2674
3015
  /**
2675
3016
  * A single numbered link, e.g. page `3`. Loads its page and makes it active when
@@ -2689,6 +3030,8 @@ const PaginationLinksCache = /* @__PURE__ */ new WeakMap();
2689
3030
  * </EachLink>
2690
3031
  * ```
2691
3032
  *
3033
+ * @summary Experimental: a numbered page link with its page number, whether it is current, its distance from the
3034
+ * active page, and `setActive` to load and show that page.
2692
3035
  * @since 5.9.0
2693
3036
  * @public
2694
3037
  * @hideconstructor
@@ -2738,6 +3081,8 @@ var RealPaginationLink = class {
2738
3081
  * </EachLink>
2739
3082
  * ```
2740
3083
  *
3084
+ * @summary Experimental: a non-navigable gap marker in numbered pagination links, standing in for a range of
3085
+ * not-yet-loaded pages, usually shown as an ellipsis.
2741
3086
  * @since 5.9.0
2742
3087
  * @public
2743
3088
  * @hideconstructor
@@ -2790,6 +3135,8 @@ var PlaceholderPaginationLink = class {
2790
3135
  * </EachLink>
2791
3136
  * ```
2792
3137
  *
3138
+ * @summary Experimental: a `first`, `prev`, `next`, or `last` link relative to the active page, with `setActive`
3139
+ * to load it, and the only kind of link cursor-based pagination has.
2793
3140
  * @since 5.9.0
2794
3141
  * @public
2795
3142
  * @hideconstructor
@@ -2841,6 +3188,9 @@ var RelationalPaginationLink = class {
2841
3188
  * }
2842
3189
  * }
2843
3190
  * ```
3191
+ *
3192
+ * @summary Experimental: an entry in the numbered pagination links list, either a navigable numbered link or a
3193
+ * placeholder for a gap, told apart by `isReal`.
2844
3194
  */
2845
3195
  /**
2846
3196
  * The reactive set of navigation links derived from a {@link PaginationState}.
@@ -2870,6 +3220,8 @@ var RelationalPaginationLink = class {
2870
3220
  * - {@link PlaceholderPaginationLink}
2871
3221
  * - {@link RelationalPaginationLink}
2872
3222
  *
3223
+ * @summary Experimental: the reactive navigation links for a pagination state, with numbered links and gap
3224
+ * placeholders plus `first`, `prev`, `next`, and `last` links for the active page.
2873
3225
  * @since 5.9.0
2874
3226
  * @public
2875
3227
  * @hideconstructor
@@ -2981,6 +3333,8 @@ var PaginationLinks = class {
2981
3333
  * }
2982
3334
  * ```
2983
3335
  *
3336
+ * @summary Experimental: returns the navigation links for a paged pagination state, creating them on first call and
3337
+ * returning the same instance for the same state.
2984
3338
  * @since 5.9.0
2985
3339
  * @public
2986
3340
  */
@@ -2993,34 +3347,50 @@ function getPaginationLinks(state) {
2993
3347
  return links;
2994
3348
  }
2995
3349
 
2996
- //#endregion
2997
- //#region src/signals/pagination-subscription.ts
3350
+ // src/signals/pagination-subscription.ts
2998
3351
  /**
2999
3352
  * The content features available in both pagination modes: the state and
3000
3353
  * controls of the initial request.
3354
+ *
3355
+ * @summary Experimental: the request status flags and controls, like `isRefreshing`, `refresh`, and `reload`,
3356
+ * that `<Paginate />` yields to its content block in both modes.
3001
3357
  */
3002
3358
  /**
3003
3359
  * The content features yielded in `'paged'` mode: navigation happens by
3004
3360
  * loading a specific page.
3361
+ *
3362
+ * @summary Experimental: the request controls `<Paginate />` yields to its content block in paged mode, adding
3363
+ * `loadPage` to navigate to a page by URL.
3005
3364
  */
3006
3365
  /**
3007
3366
  * The content features yielded in `'infinite'` mode: navigation happens by
3008
3367
  * extending the loaded run at either end.
3368
+ *
3369
+ * @summary Experimental: the request controls `<Paginate />` yields to its content block in infinite mode, adding
3370
+ * `loadNext` and `loadPrev` to extend the loaded pages.
3009
3371
  */
3010
3372
  /**
3011
3373
  * The full set of content features a {@link PaginationSubscription} builds —
3012
3374
  * both modes' surfaces. The `<Paginate />` component narrows this to one mode
3013
3375
  * via {@link PaginationContentFeaturesFor} before yielding.
3376
+ *
3377
+ * @summary Experimental: the combined paged and infinite content features a pagination subscription builds, before
3378
+ * `<Paginate />` narrows them to one mode.
3014
3379
  */
3015
3380
  /**
3016
3381
  * Resolves a {@link PaginateMode} to the content features it exposes. Mirror of
3017
3382
  * {@link PaginationStateFor}.
3383
+ *
3384
+ * @summary Experimental: resolves a pagination mode to the content features `<Paginate />` yields, the infinite
3385
+ * set for `'infinite'` and the paged set otherwise.
3018
3386
  */
3019
3387
  /**
3020
3388
  * Lifecycle glue for the `<Paginate />` component. Owns the initial
3021
3389
  * {@link RequestSubscription} (loading/error state, autorefresh, disposal) and
3022
3390
  * the per-component {@link PaginationState} that it hands to the component.
3023
3391
  *
3392
+ * @summary Experimental: the lifecycle core of `<Paginate />`, owning the initial request subscription and the
3393
+ * component's pagination state.
3024
3394
  * @since 5.9.0
3025
3395
  * @public
3026
3396
  * @hideconstructor
@@ -3282,6 +3652,8 @@ defineSignal(PaginationSubscription.prototype, "_navRequest", null);
3282
3652
  * subscription[DISPOSE](); // tear down when the owning component unmounts
3283
3653
  * ```
3284
3654
  *
3655
+ * @summary Experimental: creates the subscription that manages a `<Paginate />` component's initial request
3656
+ * lifecycle and pagination state, for managing that lifecycle yourself.
3285
3657
  * @since 5.9.0
3286
3658
  * @public
3287
3659
  */
@@ -3297,8 +3669,7 @@ function _DISPOSE$1() {
3297
3669
  self._requestSubscription?.[DISPOSE]?.();
3298
3670
  }
3299
3671
 
3300
- //#endregion
3301
- //#region src/signals/pagination-links-subscription.ts
3672
+ // src/signals/pagination-links-subscription.ts
3302
3673
  /**
3303
3674
  * The framework-agnostic core of a pagination links component (for example the
3304
3675
  * `<EachLink />` component of `@warp-drive-mirror/ember`): it owns the component
@@ -3313,6 +3684,8 @@ function _DISPOSE$1() {
3313
3684
  * `<Paginate />` component, so they stay in sync as pages load and the active
3314
3685
  * page changes.
3315
3686
  *
3687
+ * @summary Experimental: the framework-agnostic lifecycle core of a pagination links component such as
3688
+ * `<EachLink />`, exposing the navigation links for a paged pagination state.
3316
3689
  * @since 5.9.0
3317
3690
  * @public
3318
3691
  * @hideconstructor
@@ -3354,6 +3727,8 @@ var PaginationLinksSubscription = class {
3354
3727
  * subscription[DISPOSE](); // tear down when the owning component unmounts
3355
3728
  * ```
3356
3729
  *
3730
+ * @summary Experimental: creates the subscription a pagination links component such as `<EachLink />` uses to
3731
+ * derive navigation links from a paged pagination state.
3357
3732
  * @since 5.9.0
3358
3733
  * @public
3359
3734
  */
@@ -3368,25 +3743,30 @@ function _DISPOSE() {
3368
3743
  self.isDestroyed = true;
3369
3744
  }
3370
3745
 
3371
- //#endregion
3372
- //#region src/signals/promise-state.ts
3746
+ // src/signals/promise-state.ts
3373
3747
  const PromiseCache = /* @__PURE__ */ new WeakMap();
3374
3748
  /**
3375
3749
  * The state of a promise in the "pending"
3376
3750
  * state. This is the default initial state.
3377
3751
  *
3752
+ * @summary The `getPromiseState` state for a promise that has not yet settled, with `isPending` true and
3753
+ * no value or reason.
3378
3754
  */
3379
3755
  /**
3380
3756
  * The state of a promise in the "fulfilled" state.
3381
3757
  * This is the state of a promise that has resolved
3382
3758
  * successfully.
3383
3759
  *
3760
+ * @summary The `getPromiseState` state for a promise that resolved, with `isSuccess` true and the
3761
+ * resolved `value`.
3384
3762
  */
3385
3763
  /**
3386
3764
  * The state of a promise in the "rejected" state.
3387
3765
  * This is the state of a promise that has rejected
3388
3766
  * with an error.
3389
3767
  *
3768
+ * @summary The `getPromiseState` state for a promise that rejected, with `isError` true and the
3769
+ * rejection `reason`.
3390
3770
  */
3391
3771
  /**
3392
3772
  * The state of a promise. This is the type that is returned
@@ -3397,6 +3777,8 @@ const PromiseCache = /* @__PURE__ */ new WeakMap();
3397
3777
  * - {@link ResolvedPromise}
3398
3778
  * - {@link RejectedPromise}
3399
3779
  *
3780
+ * @summary The reactive pending, fulfilled, or rejected state of a promise, as returned by
3781
+ * `getPromiseState`.
3400
3782
  */
3401
3783
  const PromiseStateProto = {};
3402
3784
  defineSignal(PromiseStateProto, "reason", null);
@@ -3462,6 +3844,9 @@ function getPromise(promise) {
3462
3844
  /**
3463
3845
  * Returns a reactive state-machine for the provided promise or awaitable.
3464
3846
  *
3847
+ * The [Async as Reactive State](/guides/the-manual/reactivity/derivation) guide shows
3848
+ * how to use it in place of tracked loading and error state.
3849
+ *
3465
3850
  * Repeat calls to `getPromiseState` with the same promise will return the same state object
3466
3851
  * making is safe and easy to use in templates and JavaScript code to produce reactive
3467
3852
  * behaviors around promises.
@@ -3511,6 +3896,9 @@ function getPromise(promise) {
3511
3896
  * If looking to use in a template, consider also the `<Await />` component.
3512
3897
  *
3513
3898
  * See also {@link PromiseState}
3899
+ *
3900
+ * @summary Returns a cached, reactive state object tracking whether a promise is pending, fulfilled, or
3901
+ * rejected, for use in JS or templates.
3514
3902
  */
3515
3903
  function getPromiseState(promise) {
3516
3904
  macroCondition(getGlobalConfig().WarpDriveMirror.env.DEBUG) && ((test) => {
@@ -3525,6 +3913,5 @@ function getPromiseState(promise) {
3525
3913
  return state;
3526
3914
  }
3527
3915
 
3528
- //#endregion
3529
- export { ARRAY_SIGNAL as A, createInternalMemo as C, notifyInternalSignal as D, makeInitializer as E, setupSignals as M, waitFor as N, peekInternalSignal as O, willSyncFlushWatchers as P, consumeInternalSignal as S, getOrCreateInternalSignal as T, entangleSignal as _, getPaginationState as a, signal as b, getPaginationCache as c, getRequestState as d, createSignalDescriptor as f, entangleInitiallyStaleSignal as g, defineSignal as h, getPaginationLinks as i, OBJECT_SIGNAL as j, withSignalStore as k, DISPOSE as l, defineNonEnumerableSignal as m, createPaginationLinksSubscription as n, clearPaginationCache as o, defineGate as p, createPaginationSubscription as r, defaultPageHints as s, getPromiseState as t, createRequestSubscription as u, gate as v, createInternalSignal as w, Signals as x, memoized as y };
3530
- //# sourceMappingURL=-private-CArItnX4.js.map
3916
+ export { ARRAY_SIGNAL as A, createInternalMemo as C, notifyInternalSignal as D, makeInitializer as E, willSyncFlushWatchers as F, registerSignals as M, setupSignals as N, peekInternalSignal as O, waitFor as P, consumeInternalSignal as S, getOrCreateInternalSignal as T, entangleSignal as _, getPaginationState as a, signal as b, getPaginationCache as c, getRequestState as d, createSignalDescriptor as f, entangleInitiallyStaleSignal as g, defineSignal as h, getPaginationLinks as i, OBJECT_SIGNAL as j, withSignalStore as k, DISPOSE as l, defineNonEnumerableSignal as m, createPaginationLinksSubscription as n, clearPaginationCache as o, defineGate as p, createPaginationSubscription as r, defaultPageHints as s, getPromiseState as t, createRequestSubscription as u, gate as v, createInternalSignal as w, Signals as x, memoized as y };
3917
+ //# sourceMappingURL=-private-CvZfrDZl.js.map