@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,7 +1,7 @@
1
- import { a as setTransient, r as peekTransient, t as getOrSetGlobal } from "./-private-JmhZBKGb.js";
2
- import { f as setPromiseResult, o as DOMError, u as getPromiseResult } from "./request-C7WZg-zk.js";
1
+ import { getOrSetGlobal, peekTransient, setTransient } from "./types/-private.js";
2
+ import { f as setPromiseResult, o as DOMError, u as getPromiseResult } from "./request-Cgw3j6Dx.js";
3
3
 
4
- //#region src/signals/reactivity/configure.ts
4
+ // src/signals/reactivity/configure.ts
5
5
  const ARRAY_SIGNAL = getOrSetGlobal("#[]", Symbol("#[]"));
6
6
  const OBJECT_SIGNAL = getOrSetGlobal("#{}", Symbol("#{}"));
7
7
  /**
@@ -15,10 +15,12 @@ const OBJECT_SIGNAL = getOrSetGlobal("#{}", Symbol("#{}"));
15
15
  * The hooks which MUST be configured in order to use reactive arrays,
16
16
  * resources and documents with framework specfic signals or TC39 signals.
17
17
  *
18
- * Support for multiple frameworks simultaneously can be done via
19
- * this abstraction by returning multiple signals from the `createSignal`
20
- * method, and consuming the correct one via the correct framework via
21
- * the `consumeSignal` and `notifySignal` methods.
18
+ * To support multiple frameworks on the same page, import
19
+ * `@warp-drive-mirror/alien-signals/install` before each framework's `install` entry
20
+ * point. Its hooks implement {@link SignalHooks.register}, so each framework's
21
+ * hooks, passed to {@link registerSignals}, are added to its signals graph
22
+ * instead of replacing it, and its memos stay up to date for every framework.
23
+ * See [Using Ember and React on the Same Page](/guides/the-manual/cookbook/multiple-frameworks-on-one-page.md).
22
24
  *
23
25
  * Unlike many signals implementations, WarpDrive does not wrap values as
24
26
  * signals directly, but instead uses signals to alert the reactive layer
@@ -33,6 +35,8 @@ const OBJECT_SIGNAL = getOrSetGlobal("#{}", Symbol("#{}"));
33
35
  * scenarios you may also be interested in integrating with the {@link NotificationManager}
34
36
  * more directly.
35
37
  *
38
+ * @summary The create, consume, notify, and memo hooks a framework or TC39 signals implementation
39
+ * supplies to `setupSignals` to make WarpDrive data reactive.
36
40
  * @public
37
41
  */
38
42
  /**
@@ -48,11 +52,14 @@ const OBJECT_SIGNAL = getOrSetGlobal("#{}", Symbol("#{}"));
48
52
  * }
49
53
  * ```
50
54
  *
55
+ * @summary The options passed to the `setupSignals` callback, including the well-known key WarpDrive
56
+ * uses for an array's contents signal.
51
57
  * @public
52
58
  */
53
59
  /**
54
- * Configures the signals implementation to use. Supports multiple
55
- * implementations simultaneously.
60
+ * Configures the signals implementation to use, replacing any configured
61
+ * before. To add a framework's hooks alongside those of other frameworks, use
62
+ * {@link registerSignals} instead.
56
63
  *
57
64
  * See {@link HooksOptions} for the options passed to the provided function
58
65
  * when called.
@@ -60,6 +67,8 @@ const OBJECT_SIGNAL = getOrSetGlobal("#{}", Symbol("#{}"));
60
67
  * See {@link SignalHooks} for the implementation the callback function should
61
68
  * return.
62
69
  *
70
+ * @summary Registers the signal hooks WarpDrive uses for reactivity, built by a callback that receives
71
+ * `HooksOptions`.
63
72
  * @public
64
73
  * @param buildConfig - a function that takes options and returns a configuration object
65
74
  */
@@ -68,6 +77,33 @@ function setupSignals(buildConfig) {
68
77
  setTransient("signalHooks", hooks);
69
78
  }
70
79
  /**
80
+ * Adds the hooks built by `buildConfig` to the configured signals implementation if it composes
81
+ * other implementations, such as `@warp-drive-mirror/alien-signals`, and otherwise configures them with
82
+ * {@link setupSignals}.
83
+ *
84
+ * A framework's `install` entry point calls this rather than `setupSignals`, so that importing
85
+ * `@warp-drive-mirror/alien-signals/install` first lets every framework on the page share its signals
86
+ * and memos.
87
+ *
88
+ * @example
89
+ * ```ts
90
+ * import { registerSignals } from '@warp-drive-mirror/core/configure';
91
+ *
92
+ * registerSignals(buildSignalConfig);
93
+ * ```
94
+ *
95
+ * @summary Registers signal hooks with the configured composing implementation, or configures
96
+ * them with `setupSignals` when there is none.
97
+ * @since 5.10.0
98
+ * @public
99
+ * @param buildConfig - a function that takes options and returns a configuration object
100
+ */
101
+ function registerSignals(buildConfig) {
102
+ const signalHooks = peekTransient("signalHooks");
103
+ if (signalHooks?.register) signalHooks.register(buildConfig);
104
+ else setupSignals(buildConfig);
105
+ }
106
+ /**
71
107
  * Internal method for consuming the configured `createSignal` hook
72
108
  *
73
109
  * @private
@@ -108,8 +144,7 @@ function waitFor(promise) {
108
144
  return promise;
109
145
  }
110
146
 
111
- //#endregion
112
- //#region src/signals/reactivity/internal.ts
147
+ // src/signals/reactivity/internal.ts
113
148
  const INITIALIZER_PROTO = { isInitializer: true };
114
149
  /**
115
150
  * Wraps `fn` so that a signal can recognize it as a lazy initializer
@@ -246,8 +281,7 @@ function notifyInternalSignal(signal) {
246
281
  }
247
282
  let TrackingFrame = null;
248
283
 
249
- //#endregion
250
- //#region src/signals/reactivity/signal.ts
284
+ // src/signals/reactivity/signal.ts
251
285
  /**
252
286
  * Creates a signal for the key/object pairing and subscribes to the signal.
253
287
  *
@@ -388,8 +422,7 @@ function defineGate(obj, key, desc) {
388
422
  Object.defineProperty(obj, key, options);
389
423
  }
390
424
 
391
- //#endregion
392
- //#region src/signals/request-state.ts
425
+ // src/signals/request-state.ts
393
426
  const RequestCache = /* @__PURE__ */ new WeakMap();
394
427
  function isAbortError(error) {
395
428
  return error instanceof DOMError && error.name === "AbortError";
@@ -445,6 +478,8 @@ async function watchStream(stream, loadingState) {
445
478
  * reactive properties that can be used to build UIs that respond
446
479
  * to the progress of a request.
447
480
  *
481
+ * @summary Reactive download progress for a request, such as bytes loaded and timing, built by lazily
482
+ * reading its response stream.
448
483
  * @hideconstructor
449
484
  */
450
485
  var RequestLoadingState = class {
@@ -663,9 +698,11 @@ defineNonEnumerableSignal(RequestLoadingState.prototype, "_lastPacketTime", 0);
663
698
  *
664
699
  */
665
700
  /**
666
- * The state of a request in the "cancelled" state.
667
- * This is the state of a promise that has been
668
- * cancelled.
701
+ * The state of a request that was aborted before it settled.
702
+ *
703
+ * A cancelled request has `status: 'cancelled'` and its `reason` is an
704
+ * `AbortError`. `isError` is also `true`, as for a {@link RejectedRequest},
705
+ * so check `status` or `isCancelled` to tell the two apart.
669
706
  *
670
707
  */
671
708
  /**
@@ -699,6 +736,8 @@ defineNonEnumerableSignal(RequestLoadingState.prototype, "_lastPacketTime", 0);
699
736
  * - {@link RejectedRequest}
700
737
  * - {@link CancelledRequest}
701
738
  *
739
+ * @summary The reactive pending, fulfilled, rejected, or cancelled state of a request `Future`, as
740
+ * returned by `getRequestState`.
702
741
  */
703
742
  const RequestStateProto = {};
704
743
  function performRefresh(requester, request, isReload) {
@@ -747,7 +786,7 @@ function createRequestState(future) {
747
786
  if (state.isError) {
748
787
  promiseState.error = state.result;
749
788
  promiseState.reason = state.result;
750
- promiseState.status = "rejected";
789
+ promiseState.status = isAbortError(state.result) ? "cancelled" : "rejected";
751
790
  promiseState.isError = true;
752
791
  promiseState.isPending = false;
753
792
  promiseState.isLoading = false;
@@ -783,7 +822,7 @@ function createRequestState(future) {
783
822
  });
784
823
  promiseState.error = error;
785
824
  promiseState.reason = error;
786
- promiseState.status = "rejected";
825
+ promiseState.status = isAbortError(error) ? "cancelled" : "rejected";
787
826
  promiseState.isError = true;
788
827
  promiseState.isPending = false;
789
828
  promiseState.isLoading = false;
@@ -795,6 +834,26 @@ function createRequestState(future) {
795
834
  /**
796
835
  * `getRequestState` can be used in both JavaScript and Template contexts.
797
836
  *
837
+ * It returns a {@link RequestState}: a reactive object that updates as the
838
+ * request advances. Calling it again with the same {@link Future} returns the
839
+ * same object. Check `status` to narrow it to one of four states:
840
+ *
841
+ * - {@link PendingRequest} (`'pending'`) is the initial state, before the
842
+ * request settles.
843
+ * - {@link ResolvedRequest} (`'fulfilled'`) holds the response content on `value`.
844
+ * - {@link RejectedRequest} (`'rejected'`) holds the error on `reason`.
845
+ * - {@link CancelledRequest} (`'cancelled'`) is a request that was aborted.
846
+ * `isError` is also `true` for a cancelled request, so check `status` or
847
+ * `isCancelled` rather than `isError` if you handle it differently.
848
+ *
849
+ * Every state also exposes a {@link RequestLoadingState} on `loadingState`
850
+ * for tracking the progress of the response stream.
851
+ *
852
+ * The [Reactive Control Flow](/guides/the-manual/reactivity/control-flow) guide shows
853
+ * how to render request states with it, and
854
+ * [Using The Response](/guides/the-manual/requests/using-the-response) covers the
855
+ * `Future` it reads.
856
+ *
798
857
  * ```ts
799
858
  * import { getRequestState } from '@warp-drive-mirror/ember';
800
859
  *
@@ -841,6 +900,10 @@ function createRequestState(future) {
841
900
  * which offers a number of additional capabilities for requests *beyond* what
842
901
  * `RequestState` provides.
843
902
  *
903
+ * @param future - the request {@link Future} to track, as returned by `store.request` or `requestManager.request`
904
+ * @return the cached {@link RequestState} for `future`
905
+ * @summary Returns a cached, reactive state object tracking a request `Future` through pending, success,
906
+ * error, and cancellation.
844
907
  */
845
908
  function getRequestState(future) {
846
909
  let state = RequestCache.get(future);
@@ -851,8 +914,7 @@ function getRequestState(future) {
851
914
  return state;
852
915
  }
853
916
 
854
- //#endregion
855
- //#region ../../node_modules/.pnpm/decorat_5d4eca388601a94e7fbc656401b751d1/node_modules/decorator-transforms/dist/runtime--fcdnjmJ.js
917
+ // ../../node_modules/.pnpm/decorat_5d4eca388601a94e7fbc656401b751d1/node_modules/decorator-transforms/dist/runtime--fcdnjmJ.js
856
918
  const deferred = /* @__PURE__ */ new WeakMap();
857
919
  function deferDecorator(proto, prop, desc) {
858
920
  let map = deferred.get(proto);
@@ -902,8 +964,7 @@ function initializeDeferredDecorator(target, prop) {
902
964
  });
903
965
  }
904
966
 
905
- //#endregion
906
- //#region src/signals/request-subscription.ts
967
+ // src/signals/request-subscription.ts
907
968
  const DEFAULT_DEADLINE = 3e4;
908
969
  /**
909
970
  * A symbol used to dispose of a {@link RequestSubscription} when the
@@ -913,28 +974,47 @@ const DISPOSE = Symbol.dispose || Symbol.for("dispose");
913
974
  /**
914
975
  * The individual autorefresh strategies a {@link RequestSubscription}
915
976
  * may combine, see {@link AutorefreshBehaviorCombos}.
977
+ *
978
+ * @summary One autorefresh trigger for a request subscription: on reconnecting (`online`), on a timer
979
+ * (`interval`), or on store invalidation (`invalid`).
916
980
  */
917
981
  /**
918
982
  * The value accepted by {@link SubscriptionArgs.autorefresh}: either a
919
983
  * boolean, a single {@link AutorefreshBehaviorType}, or a comma-separated
920
984
  * combination of up to three of them.
985
+ *
986
+ * @summary The accepted values for a request subscription's `autorefresh` option: a boolean or a
987
+ * comma-separated mix of `online`, `interval`, and `invalid`.
921
988
  */
922
989
  /**
923
990
  * Utilities to assist in recovering from the error.
991
+ *
992
+ * @summary The online and visibility state plus a `retry` function that a request subscription exposes
993
+ * for recovering from a failed request.
924
994
  */
925
995
  /** @deprecated use {@link RecoveryFeatures} */
926
996
  /**
927
997
  * Utilities for keeping the request fresh
998
+ *
999
+ * @summary The online, visibility, and refreshing state plus `refresh`, `reload`, and `abort` functions a
1000
+ * request subscription exposes alongside successful content.
928
1001
  */
929
1002
  /**
930
1003
  * The args accepted by the `<Request />` component.
1004
+ *
1005
+ * @summary The arguments of the `<Request />` component: the request or query to run, autorefresh
1006
+ * options, and an optional store or subscription.
931
1007
  */
932
1008
  /**
933
1009
  * The args accepted by a {@link RequestSubscription}.
1010
+ *
1011
+ * @summary Options for a request subscription: the request or query to monitor and its autorefresh settings.
934
1012
  */
935
1013
  /**
936
1014
  * A reactive class
937
1015
  *
1016
+ * @summary Reactive subscription that monitors a request or query, tracking online, visibility and refresh state and
1017
+ * handling autorefresh, reload and retry.
938
1018
  * @hideconstructor
939
1019
  */
940
1020
  var RequestSubscription = class {
@@ -1034,8 +1114,14 @@ var RequestSubscription = class {
1034
1114
  * @internal
1035
1115
  */
1036
1116
  async _beginPolling() {
1117
+ let initialRequest;
1037
1118
  try {
1038
- if (!this.isIdle) await this.request;
1119
+ initialRequest = this.isIdle ? null : this.request;
1120
+ } catch (e) {
1121
+ throw new Error(`Unable to begin polling the request`, { cause: e });
1122
+ }
1123
+ try {
1124
+ if (initialRequest) await initialRequest;
1039
1125
  } catch {} finally {
1040
1126
  if (!this.isDestroyed) this._scheduleInterval();
1041
1127
  }
@@ -1346,6 +1432,9 @@ function isStore(store) {
1346
1432
  /**
1347
1433
  * Creates a {@link RequestSubscription}, the reactive class powering the
1348
1434
  * `<Request />` component's autorefresh, retry, and refresh behaviors.
1435
+ *
1436
+ * @summary Creates a reactive subscription to a request or query that tracks its state and handles
1437
+ * autorefresh, retry, and refresh.
1349
1438
  */
1350
1439
  function createRequestSubscription(store, args) {
1351
1440
  return new RequestSubscription(store, args);
@@ -1374,8 +1463,7 @@ function _DISPOSE$2() {
1374
1463
  });
1375
1464
  }
1376
1465
 
1377
- //#endregion
1378
- //#region src/signals/page-cache.ts
1466
+ // src/signals/page-cache.ts
1379
1467
  const { abs } = Math;
1380
1468
  /**
1381
1469
  * Extracts the `data` member of a document type, or the document type itself
@@ -1412,6 +1500,8 @@ function getHref(link) {
1412
1500
  * }
1413
1501
  * ```
1414
1502
  *
1503
+ * @summary Experimental: one page of a paginated collection, exposing its request, loading and error status, data,
1504
+ * and links to neighboring pages.
1415
1505
  * @since 5.9.0
1416
1506
  * @public
1417
1507
  * @hideconstructor
@@ -1594,68 +1684,194 @@ var PageCache = class {
1594
1684
  decorateMethodV2(this.prototype, "isLinked", [memoized]);
1595
1685
  }
1596
1686
  async load(request) {
1687
+ this.request = request;
1688
+ this.state = getRequestState(this.request);
1689
+ let content;
1597
1690
  try {
1598
- this.request = request;
1599
- this.state = getRequestState(this.request);
1600
- const content = (await this.request).content;
1601
- const self = getHref(content?.links?.self);
1602
- const first = getHref(content?.links?.first);
1603
- const last = getHref(content?.links?.last);
1604
- const next = getHref(content?.links?.next);
1605
- const prev = getHref(content?.links?.prev);
1606
- const pageNumber = this.getPageNumber(content);
1607
- if (pageNumber) this.pageNumber = pageNumber;
1608
- const firstPage = first ? this.manager.getPageCache(first) : null;
1609
- const lastPage = last ? this.manager.getPageCache(last) : null;
1610
- const prevPage = prev ? this.manager.getPageCache(prev) : null;
1611
- const nextPage = next ? this.manager.getPageCache(next) : null;
1612
- if (firstPage) {
1613
- this.firstLink = first;
1614
- firstPage.setPageNumber(1);
1615
- if (!firstPage.after) firstPage.updateLinkage({ after: this });
1616
- }
1617
- if (lastPage) {
1618
- this.lastLink = last;
1619
- lastPage.setPageNumber(this.manager.totalPages);
1620
- if (!lastPage.before) lastPage.updateLinkage({ before: this });
1621
- }
1622
- if (nextPage) {
1623
- this.nextLink = next;
1624
- nextPage.setPageNumber(this.pageNumber + 1);
1625
- nextPage.updateLinks({ prev: self });
1626
- }
1627
- if (prevPage) {
1628
- this.prevLink = prev;
1629
- prevPage.setPageNumber(this.pageNumber - 1);
1630
- prevPage.updateLinks({ next: self });
1631
- }
1632
- if (this.isLinked) {
1633
- if (prevPage) prevPage.updateLinkage({ after: this });
1634
- if (nextPage) nextPage.updateLinkage({ before: this });
1635
- } else if (prevPage?.isLinked) {
1636
- this.updateLinkage({ before: prevPage });
1637
- if (nextPage) nextPage.updateLinkage({ before: this });
1638
- } else if (nextPage?.isLinked) {
1639
- this.updateLinkage({ after: nextPage });
1640
- if (prevPage) prevPage.updateLinkage({ after: this });
1641
- } else if ((prevPage || nextPage) && (firstPage || lastPage)) this.lookupLinkage(firstPage, lastPage);
1642
- else if (prevPage || nextPage) this.updateLinkage({
1643
- before: prevPage,
1644
- after: nextPage
1645
- });
1646
- return content;
1647
- } catch {}
1648
- return null;
1691
+ content = (await this.request).content;
1692
+ } catch {
1693
+ return null;
1694
+ }
1695
+ this.applyDocument(content);
1696
+ return content;
1697
+ }
1698
+ /**
1699
+ * Re-applies an already-loaded page from a newer request for the same page
1700
+ * (a reload, or a route-driven navigation back to it). The newer document is
1701
+ * authoritative: its links and page hints replace the ones recorded from
1702
+ * the earlier load, and the collection total is updated from it. The page
1703
+ * keeps its current request until the newer one resolves, so a page on
1704
+ * screen does not flash a loading state; a rejected request leaves the
1705
+ * page untouched.
1706
+ *
1707
+ * @internal
1708
+ */
1709
+ async update(request) {
1710
+ const state = getRequestState(request);
1711
+ let content;
1712
+ try {
1713
+ content = (await request).content;
1714
+ } catch {
1715
+ return null;
1716
+ }
1717
+ this.request = request;
1718
+ this.state = state;
1719
+ this.applyDocument(content);
1720
+ return content;
1721
+ }
1722
+ /**
1723
+ * Records a loaded document's links and page number, and links this page
1724
+ * into the shared page graph.
1725
+ *
1726
+ * The document is authoritative for what it states: a link it names
1727
+ * explicitly (including an explicit `null`) overwrites whatever a neighbor
1728
+ * or an earlier load of this page recorded, and a link it omits is kept.
1729
+ * `next`/`prev` name the adjacent pages; `first`/`last` name the ends of
1730
+ * the collection, beyond which nothing may remain linked.
1731
+ *
1732
+ * For a numbered collection the document must also agree with the page
1733
+ * numbers: `next` is the page after this one, `prev` the page before, a
1734
+ * page without `prev` is page 1, a page without `next` is the last page,
1735
+ * `first` is page 1 and `last` is page `totalPages`. A document that
1736
+ * contradicts this is a server (or collection-mixing) bug and is asserted
1737
+ * in development, before anything is recorded from it. A cursor collection
1738
+ * has no numbers, so there its links are the only authority.
1739
+ *
1740
+ * @internal
1741
+ */
1742
+ applyDocument(content) {
1743
+ const links = content?.links ?? {};
1744
+ const self = getHref(content?.links?.self);
1745
+ const first = getHref(content?.links?.first);
1746
+ const last = getHref(content?.links?.last);
1747
+ const next = getHref(content?.links?.next);
1748
+ const prev = getHref(content?.links?.prev);
1749
+ const { currentPage, totalPages } = this.manager.readPageHints(content);
1750
+ const firstPage = first ? this.manager.getPageCache(first) : null;
1751
+ const lastPage = last ? this.manager.getPageCache(last) : null;
1752
+ const prevPage = prev ? this.manager.getPageCache(prev) : null;
1753
+ const nextPage = next ? this.manager.getPageCache(next) : null;
1754
+ if (this.manager.isNumbered) {}
1755
+ if (currentPage) this.pageNumber = currentPage;
1756
+ this.manager.totalPages = totalPages;
1757
+ const stated = {};
1758
+ if ("first" in links) stated.first = first;
1759
+ if ("last" in links) stated.last = last;
1760
+ if ("next" in links) stated.next = next;
1761
+ if ("prev" in links) stated.prev = prev;
1762
+ this.updateLinks(stated);
1763
+ if ("next" in links && !next) {
1764
+ const after = this.after;
1765
+ this.detachAfter();
1766
+ if (after?.prevLink === self) after.updateLinks({ prev: null });
1767
+ }
1768
+ if ("prev" in links && !prev) {
1769
+ const before = this.before;
1770
+ this.detachBefore();
1771
+ if (before?.nextLink === self) before.updateLinks({ next: null });
1772
+ }
1773
+ if (lastPage) {
1774
+ lastPage.detachAfter();
1775
+ lastPage.updateLinks({ next: null });
1776
+ }
1777
+ if (firstPage) {
1778
+ firstPage.detachBefore();
1779
+ firstPage.updateLinks({ prev: null });
1780
+ }
1781
+ if (firstPage) {
1782
+ firstPage.setPageNumber(1);
1783
+ if (firstPage !== this && !firstPage.after) this.linkFirst(firstPage);
1784
+ }
1785
+ if (lastPage) {
1786
+ lastPage.setPageNumber(this.manager.totalPages);
1787
+ if (lastPage !== this && !lastPage.before) this.linkLast(lastPage);
1788
+ }
1789
+ if (nextPage) {
1790
+ nextPage.setPageNumber(this.pageNumber + 1);
1791
+ nextPage.updateLinks({ prev: self });
1792
+ }
1793
+ if (prevPage) {
1794
+ prevPage.setPageNumber(this.pageNumber - 1);
1795
+ prevPage.updateLinks({ next: self });
1796
+ }
1797
+ if (nextPage && this.after && this.after !== nextPage && this.after.pageNumber <= nextPage.pageNumber) this.detachAfter();
1798
+ if (prevPage && this.before && this.before !== prevPage && this.before.pageNumber >= prevPage.pageNumber) this.detachBefore();
1799
+ if (this.isLinked) {
1800
+ if (prevPage) prevPage.updateLinkage({ after: this });
1801
+ if (nextPage) nextPage.updateLinkage({ before: this });
1802
+ } else if (prevPage?.isLinked) {
1803
+ this.updateLinkage({ before: prevPage });
1804
+ if (nextPage) nextPage.updateLinkage({ before: this });
1805
+ } else if (nextPage?.isLinked) {
1806
+ this.updateLinkage({ after: nextPage });
1807
+ if (prevPage) prevPage.updateLinkage({ after: this });
1808
+ } else if ((prevPage || nextPage) && (firstPage || lastPage)) this.lookupLinkage(firstPage, lastPage);
1809
+ else if (prevPage || nextPage) this.updateLinkage({
1810
+ before: prevPage,
1811
+ after: nextPage
1812
+ });
1649
1813
  }
1650
1814
  /** @internal */
1815
+ detachAfter() {
1816
+ const after = this.after;
1817
+ if (after) {
1818
+ if (after.before === this) after.setBefore(null);
1819
+ this.setAfter(null);
1820
+ }
1821
+ }
1822
+ /** @internal */
1823
+ detachBefore() {
1824
+ const before = this.before;
1825
+ if (before) {
1826
+ if (before.after === this) before.setAfter(null);
1827
+ this.setBefore(null);
1828
+ }
1829
+ }
1830
+ /**
1831
+ * Links an unlinked `first` page before the earliest page reachable
1832
+ * backwards from this one that must follow it.
1833
+ *
1834
+ * @internal
1835
+ */
1836
+ linkFirst(firstPage) {
1837
+ let head = this;
1838
+ while (head.before && head.before !== firstPage && (!head.before.pageNumber || head.before.pageNumber > firstPage.pageNumber)) head = head.before;
1839
+ firstPage.updateLinkage({ after: head });
1840
+ }
1841
+ /**
1842
+ * Links an unlinked `last` page after the furthest page reachable forwards
1843
+ * from this one that must precede it.
1844
+ *
1845
+ * @internal
1846
+ */
1847
+ linkLast(lastPage) {
1848
+ let tail = this;
1849
+ while (tail.after && tail.after !== lastPage && (!tail.after.pageNumber || !lastPage.pageNumber || tail.after.pageNumber < lastPage.pageNumber)) tail = tail.after;
1850
+ lastPage.updateLinkage({ before: tail });
1851
+ }
1852
+ /**
1853
+ * Places this page between `before` and `after` in the graph (a missing side
1854
+ * is taken from the given side's current neighbor, so a single side splices
1855
+ * this page in). Pointers this page or the displaced neighbors held to their
1856
+ * old positions are cleared first, so a page moved within the graph never
1857
+ * leaves a dangling link behind that could close a cycle.
1858
+ *
1859
+ * @internal
1860
+ */
1651
1861
  updateLinkage({ before, after }) {
1652
1862
  const leftSide = before ?? after?.before;
1653
1863
  const rightSide = after ?? before?.after;
1654
1864
  if (leftSide && leftSide !== this) {
1865
+ if (this.before !== leftSide) this.detachBefore();
1866
+ const displaced = leftSide.after;
1867
+ if (displaced && displaced !== this && displaced !== rightSide && displaced.before === leftSide) displaced.setBefore(null);
1655
1868
  leftSide.setAfter(this);
1656
1869
  this.setBefore(leftSide);
1657
1870
  }
1658
1871
  if (rightSide && rightSide !== this) {
1872
+ if (this.after !== rightSide) this.detachAfter();
1873
+ const displaced = rightSide.before;
1874
+ if (displaced && displaced !== this && displaced !== leftSide && displaced.after === rightSide) displaced.setAfter(null);
1659
1875
  rightSide.setBefore(this);
1660
1876
  this.setAfter(rightSide);
1661
1877
  }
@@ -1686,16 +1902,18 @@ var PageCache = class {
1686
1902
  setAfter(page) {
1687
1903
  this.after = page;
1688
1904
  }
1689
- /** @internal */
1690
- getPageNumber(document) {
1691
- return this.manager.readPageHints(document).currentPage;
1692
- }
1693
- /** @internal */
1694
- updateLinks = ({ prev, next, first, last }) => {
1695
- if (prev) this.prevLink = prev;
1696
- if (next) this.nextLink = next;
1697
- if (first) this.firstLink = first;
1698
- if (last) this.lastLink = last;
1905
+ /**
1906
+ * Records the given links. Only the keys present are applied, so a caller
1907
+ * states exactly what it knows: an explicit `null` clears a link, an
1908
+ * omitted key leaves the recorded link alone.
1909
+ *
1910
+ * @internal
1911
+ */
1912
+ updateLinks = (links) => {
1913
+ if ("prev" in links) this.prevLink = links.prev ?? null;
1914
+ if ("next" in links) this.nextLink = links.next ?? null;
1915
+ if ("first" in links) this.firstLink = links.first ?? null;
1916
+ if ("last" in links) this.lastLink = links.last ?? null;
1699
1917
  };
1700
1918
  /** @internal */
1701
1919
  setPageNumber = (pageNumber) => {
@@ -1703,8 +1921,7 @@ var PageCache = class {
1703
1921
  };
1704
1922
  };
1705
1923
 
1706
- //#endregion
1707
- //#region src/signals/pagination-cache.ts
1924
+ // src/signals/pagination-cache.ts
1708
1925
  const PaginationCacheMap = /* @__PURE__ */ new Map();
1709
1926
  /**
1710
1927
  * A hint function for extracting the `currentPage` and `totalPages` from a loaded
@@ -1721,6 +1938,8 @@ const PaginationCacheMap = /* @__PURE__ */ new Map();
1721
1938
  * collection must provide the same function reference — define it once at module
1722
1939
  * scope and import it everywhere.
1723
1940
  *
1941
+ * @summary Experimental: a function you pass to `<Paginate />` that reads `currentPage` and `totalPages` from a
1942
+ * loaded document when they are not in the default `meta` locations.
1724
1943
  * @since 5.9.0
1725
1944
  * @public
1726
1945
  */
@@ -1729,6 +1948,8 @@ const PaginationCacheMap = /* @__PURE__ */ new Map();
1729
1948
  * document `meta`, matching the behavior used before `pageHints` was configurable.
1730
1949
  * Used whenever the consumer does not provide a `pageHints` function.
1731
1950
  *
1951
+ * @summary Experimental: the fallback page-hints function, reading `meta.page` or `meta.currentPage` and
1952
+ * `meta.totalPages` from a document, with `0` meaning unknown.
1732
1953
  * @since 5.9.0
1733
1954
  * @public
1734
1955
  */
@@ -1748,6 +1969,8 @@ const defaultPageHints = (document) => {
1748
1969
  * interact with — the cache itself is plumbing shared between the pagination
1749
1970
  * classes.
1750
1971
  *
1972
+ * @summary Experimental: the shared, app-wide store of loaded pages, page order, and `totalPages` for one paginated
1973
+ * collection, keyed by its `first` or `self` link.
1751
1974
  * @since 5.9.0
1752
1975
  * @public
1753
1976
  * @hideconstructor
@@ -1839,13 +2062,29 @@ var PaginationCache = class {
1839
2062
  }
1840
2063
  return page;
1841
2064
  }
1842
- /** @internal */
1843
- loadPage(url, request) {
2065
+ /**
2066
+ * Loads the page at `url` with `request` when it is not loaded (or its load
2067
+ * failed), or re-applies `request`'s document when it is a newer request
2068
+ * for an already-loaded page (a reload, or navigating back to it: the newer
2069
+ * document is authoritative for the page's links and the collection total,
2070
+ * which may have changed since the first load).
2071
+ *
2072
+ * Resolves to the page once that has settled. A rejected request settles
2073
+ * too — it is surfaced through the page's state, not thrown. The promise
2074
+ * rejects only when the document contradicts the collection (see
2075
+ * {@link PageCache.applyDocument}), so the caller that triggered the load
2076
+ * is the one that hears about it.
2077
+ *
2078
+ * @internal
2079
+ */
2080
+ async loadPage(url, request) {
1844
2081
  const page = this.getPageCache(url);
1845
- if ((!page.isLoaded || page.isError) && request) page.load(request).then((document) => {
2082
+ if ((!page.isLoaded || page.isError) && request) {
2083
+ await page.load(request);
1846
2084
  this.updateFirstPage(page);
1847
- if (document) this.totalPages = this.getTotalPages(document);
1848
- });
2085
+ } else if (request && page.isSuccess && request !== page.request) {
2086
+ if (await page.update(request)) this.updateFirstPage(page);
2087
+ }
1849
2088
  return page;
1850
2089
  }
1851
2090
  /** @internal */
@@ -1854,10 +2093,6 @@ var PaginationCache = class {
1854
2093
  while (maybeFirstPage.before) maybeFirstPage = maybeFirstPage.before;
1855
2094
  if (!this.firstPage || this.firstPage.pageNumber > maybeFirstPage.pageNumber) this.firstPage = maybeFirstPage;
1856
2095
  }
1857
- /** @internal */
1858
- getTotalPages(document) {
1859
- return this.readPageHints(document).totalPages;
1860
- }
1861
2096
  /**
1862
2097
  * Every page known to the shared graph, in order — loaded pages and pages
1863
2098
  * known only from links — across all components sharing the collection.
@@ -1873,14 +2108,13 @@ var PaginationCache = class {
1873
2108
  * ```
1874
2109
  */
1875
2110
  get pages() {
1876
- const self = this;
1877
- return { *[Symbol.iterator]() {
1878
- let page = self.firstPage;
1879
- while (page) {
1880
- yield page;
1881
- page = page.after;
1882
- }
1883
- } };
2111
+ const pages = [];
2112
+ let page = this.firstPage;
2113
+ while (page) {
2114
+ pages.push(page);
2115
+ page = page.after;
2116
+ }
2117
+ return pages;
1884
2118
  }
1885
2119
  /**
1886
2120
  * The items of every loaded page in the shared graph, flattened into one
@@ -1894,10 +2128,9 @@ var PaginationCache = class {
1894
2128
  decorateMethodV2(this.prototype, "pages", [memoized]);
1895
2129
  }
1896
2130
  get data() {
1897
- const self = this;
1898
- return { *[Symbol.iterator]() {
1899
- for (const page of self.pages) if (page.data) yield* page.data;
1900
- } };
2131
+ const items = [];
2132
+ for (const page of this.pages) if (page.data) items.push(...page.data);
2133
+ return items;
1901
2134
  }
1902
2135
  static {
1903
2136
  decorateMethodV2(this.prototype, "data", [memoized]);
@@ -1908,6 +2141,8 @@ var PaginationCache = class {
1908
2141
  * `first` or `self` link). Returns the same instance for the same key for the
1909
2142
  * lifetime of the module.
1910
2143
  *
2144
+ * @summary Experimental: returns the shared pagination cache for a collection's `first` or `self` link, creating it
2145
+ * on first use.
1911
2146
  * @since 5.9.0
1912
2147
  * @public
1913
2148
  */
@@ -1924,6 +2159,7 @@ function getPaginationCache(key) {
1924
2159
  * Primarily intended for test isolation, since the cache is keyed by url and
1925
2160
  * otherwise persists for the lifetime of the module.
1926
2161
  *
2162
+ * @summary Experimental: discards every shared pagination cache, mainly so tests start from a clean state.
1927
2163
  * @since 5.9.0
1928
2164
  * @public
1929
2165
  */
@@ -1931,8 +2167,7 @@ function clearPaginationCache() {
1931
2167
  PaginationCacheMap.clear();
1932
2168
  }
1933
2169
 
1934
- //#endregion
1935
- //#region src/signals/pagination-state.ts
2170
+ // src/signals/pagination-state.ts
1936
2171
  /**
1937
2172
  * The two navigation surfaces a `<Paginate />` component can drive. Selecting
1938
2173
  * one (via the component's `@mode` arg) narrows the yielded state so the two
@@ -1940,25 +2175,40 @@ function clearPaginationCache() {
1940
2175
  *
1941
2176
  * - `'paged'` — single-page view, see {@link PagedPaginationState}.
1942
2177
  * - `'infinite'` — accumulated view, see {@link InfinitePaginationState}.
2178
+ *
2179
+ * @summary Experimental: the `@mode` value of `<Paginate />`, either `'paged'` for a single-page view or
2180
+ * `'infinite'` for an accumulated view, which selects the yielded pagination API.
1943
2181
  */
1944
2182
  /**
1945
2183
  * The part of a {@link PaginationState} available to both navigation surfaces.
2184
+ *
2185
+ * @summary Experimental: the pagination state members available in both paged and infinite mode, namely
2186
+ * `totalPages` and `adoptPage`.
1946
2187
  */
1947
2188
  /**
1948
2189
  * The paged (single-page view) surface of a {@link PaginationState}: render
1949
2190
  * {@link PaginationState.activePageRequest | activePageRequest}, navigate with
1950
2191
  * {@link PaginationState.loadPage | loadPage}. This is what the `<Paginate />`
1951
2192
  * component yields in `'paged'` mode (the default).
2193
+ *
2194
+ * @summary Experimental: the pagination state `<Paginate />` yields in paged mode, exposing the active page, its
2195
+ * request, and `loadPage` for navigating to a page by URL.
1952
2196
  */
1953
2197
  /**
1954
2198
  * The infinite (accumulated view) surface of a {@link PaginationState}: render
1955
2199
  * {@link PaginationState.data | data}, grow it with
1956
2200
  * {@link PaginationState.loadNext | loadNext}/{@link PaginationState.loadPrev | loadPrev}.
1957
2201
  * This is what the `<Paginate />` component yields in `'infinite'` mode.
2202
+ *
2203
+ * @summary Experimental: the pagination state `<Paginate />` yields in infinite mode, exposing the accumulated
2204
+ * items and pages plus `loadNext` and `loadPrev` to extend them.
1958
2205
  */
1959
2206
  /**
1960
2207
  * Resolves a {@link PaginateMode} to the surface it exposes, so a component
1961
2208
  * generic over the mode can yield only that surface.
2209
+ *
2210
+ * @summary Experimental: resolves a pagination mode to its state type, the infinite-mode state for `'infinite'`
2211
+ * and the paged-mode state otherwise.
1962
2212
  */
1963
2213
  /**
1964
2214
  * The per-component, local pagination state. It houses the state that is unique
@@ -1982,6 +2232,8 @@ function clearPaginationCache() {
1982
2232
  * Instances are created via {@link getPaginationState} (or by the `<Paginate />`
1983
2233
  * component on your behalf), never constructed directly.
1984
2234
  *
2235
+ * @summary Experimental: one component's pagination state over a shared collection, tracking the active page and
2236
+ * the loaded run and providing paged and infinite navigation.
1985
2237
  * @since 5.9.0
1986
2238
  * @public
1987
2239
  * @hideconstructor
@@ -2012,10 +2264,23 @@ var PaginationState = class {
2012
2264
  * them backward/forward. Both seed to {@link initialPage}; a purely paged
2013
2265
  * consumer never extends them, so they stay put and are effectively unused.
2014
2266
  *
2267
+ * Only ever written through {@link extendRun} and {@link restartRun}, which
2268
+ * keep {@link runMembers} in step.
2269
+ *
2015
2270
  * @internal
2016
2271
  */
2017
2272
  /** @internal */
2018
2273
  /**
2274
+ * Every page this component has loaded into its run — what the frontier
2275
+ * spanned each time it moved. Bounds the walk in {@link pages}: the shared
2276
+ * graph may relink a page in the run to one that another component sharing
2277
+ * the collection loaded, and that page is not part of this run until it is
2278
+ * loaded through here. Untracked bookkeeping — it only changes together with
2279
+ * the frontier signals, which carry the notification.
2280
+ *
2281
+ * @internal
2282
+ */
2283
+ /**
2019
2284
  * The request of the latest {@link adoptPage} call — only that call may
2020
2285
  * commit. Later calls (or a {@link loadPage} navigation) claim the slot,
2021
2286
  * superseding in-flight adoptions so the newest navigation always wins.
@@ -2028,6 +2293,7 @@ var PaginationState = class {
2028
2293
  this.request = request;
2029
2294
  this.pageHints = pageHints;
2030
2295
  this._adoptTarget = null;
2296
+ this.runMembers = /* @__PURE__ */ new Set();
2031
2297
  this.setup();
2032
2298
  }
2033
2299
  /**
@@ -2076,21 +2342,44 @@ var PaginationState = class {
2076
2342
  * same collection to different extents each see only what they have scrolled
2077
2343
  * through. For every page known to the whole collection, see
2078
2344
  * {@link PaginationCache.pages}.
2345
+ *
2346
+ * The run is walked through the shared graph, so it ends early when a page
2347
+ * that was in it no longer follows the page before it — a reload that showed
2348
+ * the collection now ends sooner, or that its next cursor moved. It also ends
2349
+ * before a page this component never loaded: a reload may relink a page in
2350
+ * the run to one another component sharing the collection scrolled to, and
2351
+ * that page joins this run only through {@link loadNext}.
2079
2352
  */
2080
2353
  static {
2081
2354
  decorateMethodV2(this.prototype, "totalPages", [memoized]);
2082
2355
  }
2083
2356
  get pages() {
2084
- const self = this;
2085
- return { *[Symbol.iterator]() {
2086
- const end = self.frontierEnd;
2087
- let page = self.frontierStart;
2088
- while (page) {
2089
- yield page;
2090
- if (page === end) break;
2091
- page = page.after;
2092
- }
2093
- } };
2357
+ const pages = [];
2358
+ const end = this.frontierEnd;
2359
+ let page = this.frontierStart;
2360
+ while (page) {
2361
+ pages.push(page);
2362
+ if (page === end) break;
2363
+ const next = page.after;
2364
+ if (!next?.isSuccess || !this.runMembers.has(next)) break;
2365
+ page = next;
2366
+ }
2367
+ return pages;
2368
+ }
2369
+ /**
2370
+ * The last page of the run {@link pages} walks — the forward frontier, or
2371
+ * the page before the first one that no longer follows in the graph or that
2372
+ * this component never loaded.
2373
+ *
2374
+ * @internal
2375
+ */
2376
+ static {
2377
+ decorateMethodV2(this.prototype, "pages", [memoized]);
2378
+ }
2379
+ get runEnd() {
2380
+ let end = null;
2381
+ for (const page of this.pages) end = page;
2382
+ return end;
2094
2383
  }
2095
2384
  /**
2096
2385
  * The accumulated items across the loaded run, from the backward frontier to
@@ -2115,13 +2404,12 @@ var PaginationState = class {
2115
2404
  * ```
2116
2405
  */
2117
2406
  static {
2118
- decorateMethodV2(this.prototype, "pages", [memoized]);
2407
+ decorateMethodV2(this.prototype, "runEnd", [memoized]);
2119
2408
  }
2120
2409
  get data() {
2121
- const self = this;
2122
- return { *[Symbol.iterator]() {
2123
- for (const page of self.pages) if (page.data) yield* page.data;
2124
- } };
2410
+ const items = [];
2411
+ for (const page of this.pages) if (page.data) items.push(...page.data);
2412
+ return items;
2125
2413
  }
2126
2414
  /**
2127
2415
  * Whether a page exists after the forward frontier — i.e. there is more to load
@@ -2137,7 +2425,7 @@ var PaginationState = class {
2137
2425
  decorateMethodV2(this.prototype, "data", [memoized]);
2138
2426
  }
2139
2427
  get hasNext() {
2140
- return Boolean(this.frontierEnd?.nextLink);
2428
+ return Boolean(this.runEnd?.nextLink);
2141
2429
  }
2142
2430
  /**
2143
2431
  * Whether a page exists before the backward frontier.
@@ -2152,7 +2440,10 @@ var PaginationState = class {
2152
2440
  * The request for the page just after the forward frontier, for the infinite
2153
2441
  * surface. `null` until {@link loadNext} fires it (so a `<Request>` wrapping it
2154
2442
  * renders its idle block), the in-flight `Future` while that page loads, then
2155
- * `null` again once the frontier advances onto it. Also `null` at end-of-list.
2443
+ * `null` again once the frontier advances onto it. Also `null` at end-of-list,
2444
+ * and while the page sits loaded in the shared cache (another component
2445
+ * scrolled to it) but outside this run — {@link loadNext} then joins it
2446
+ * without a request of its own.
2156
2447
  *
2157
2448
  * ```gts
2158
2449
  * {{#if pages.hasNext}}
@@ -2167,9 +2458,9 @@ var PaginationState = class {
2167
2458
  decorateMethodV2(this.prototype, "hasPrevious", [memoized]);
2168
2459
  }
2169
2460
  get nextRequest() {
2170
- const url = this.frontierEnd?.nextLink;
2461
+ const url = this.runEnd?.nextLink;
2171
2462
  if (!url) return null;
2172
- return this.paginationCache?.getPageCache(url).request ?? null;
2463
+ return this.pendingRequest(url);
2173
2464
  }
2174
2465
  /**
2175
2466
  * The request for the page just before the backward frontier. Mirror of
@@ -2181,12 +2472,24 @@ var PaginationState = class {
2181
2472
  get previousRequest() {
2182
2473
  const url = this.frontierStart?.prevLink;
2183
2474
  if (!url) return null;
2184
- return this.paginationCache?.getPageCache(url).request ?? null;
2475
+ return this.pendingRequest(url);
2185
2476
  }
2186
- /** @internal */
2477
+ /**
2478
+ * The request of the page at `url` unless it already succeeded, in which
2479
+ * case there is nothing pending: the page either sits in this run, or joins
2480
+ * it on the next {@link loadNext}/{@link loadPrev} without a new request.
2481
+ *
2482
+ * @internal
2483
+ */
2187
2484
  static {
2188
2485
  decorateMethodV2(this.prototype, "previousRequest", [memoized]);
2189
2486
  }
2487
+ pendingRequest(url) {
2488
+ const page = this.paginationCache?.getPageCache(url);
2489
+ if (!page || page.isSuccess) return null;
2490
+ return page.request ?? null;
2491
+ }
2492
+ /** @internal */
2190
2493
  async setup() {
2191
2494
  let document;
2192
2495
  try {
@@ -2200,9 +2503,31 @@ var PaginationState = class {
2200
2503
  const cache = getPaginationCache(cacheKey);
2201
2504
  cache.installPageHints(this.pageHints);
2202
2505
  this.paginationCache = cache;
2203
- cache.totalPages = cache.getTotalPages(content);
2204
- this.activePage = this.initialPage = cache.loadPage(selfLink, this.request);
2205
- this.frontierStart = this.frontierEnd = this.initialPage;
2506
+ const page = cache.getPageCache(selfLink);
2507
+ this.activePage = this.initialPage = page;
2508
+ this.restartRun(page);
2509
+ await cache.loadPage(selfLink, this.request);
2510
+ }
2511
+ /**
2512
+ * Moves the frontier onto a page adjacent to the run, recording it as a
2513
+ * member.
2514
+ *
2515
+ * @internal
2516
+ */
2517
+ extendRun(dir, page) {
2518
+ this.runMembers.add(page);
2519
+ if (dir === "next") this.frontierEnd = page;
2520
+ else this.frontierStart = page;
2521
+ }
2522
+ /**
2523
+ * Restarts the run at a single page, forgetting every earlier member.
2524
+ *
2525
+ * @internal
2526
+ */
2527
+ restartRun(page) {
2528
+ this.runMembers.clear();
2529
+ this.runMembers.add(page);
2530
+ this.frontierStart = this.frontierEnd = page;
2206
2531
  }
2207
2532
  /**
2208
2533
  * Commits a resolved, membership-proven page into this state, making it the
@@ -2219,9 +2544,9 @@ var PaginationState = class {
2219
2544
  _activate(page, url) {
2220
2545
  this.activePage = page;
2221
2546
  for (const existing of this.pages) if (existing === page) return;
2222
- if (this.frontierEnd?.nextLink === url) this.frontierEnd = page;
2223
- else if (this.frontierStart?.prevLink === url) this.frontierStart = page;
2224
- else this.frontierStart = this.frontierEnd = page;
2547
+ if (this.runEnd?.nextLink === url) this.extendRun("next", page);
2548
+ else if (this.frontierStart?.prevLink === url) this.extendRun("prev", page);
2549
+ else this.restartRun(page);
2225
2550
  }
2226
2551
  /**
2227
2552
  * Adopts an externally-issued request into this pagination, making its page
@@ -2252,6 +2577,10 @@ var PaginationState = class {
2252
2577
  * - this state has not finished setting up its own collection yet
2253
2578
  * - the call was superseded by a newer navigation
2254
2579
  *
2580
+ * In development, a document that contradicts the collection's page
2581
+ * numbers (a `next` that skips a page, a `first` that is not page 1, ...)
2582
+ * rejects instead of resolving: the graph is not updated from it.
2583
+ *
2255
2584
  * ```ts
2256
2585
  * const pages = getPaginationState(initialRequest);
2257
2586
  * // later, e.g. in a route model hook reacting to a ?page= param:
@@ -2278,12 +2607,7 @@ var PaginationState = class {
2278
2607
  const selfLink = getHref(content.links?.self);
2279
2608
  const firstLink = getHref(content.links?.first);
2280
2609
  if (!selfLink || (firstLink ?? selfLink) !== cache.key) return null;
2281
- const page = cache.loadPage(selfLink, request);
2282
- try {
2283
- await page.request;
2284
- } catch {
2285
- return null;
2286
- }
2610
+ const page = await cache.loadPage(selfLink, request);
2287
2611
  if (this._adoptTarget !== request) return null;
2288
2612
  this._activate(page, selfLink);
2289
2613
  return page.value;
@@ -2327,7 +2651,7 @@ var PaginationState = class {
2327
2651
  /** @internal */
2328
2652
  _extend = async (dir) => {
2329
2653
  const cache = this.paginationCache;
2330
- const frontier = dir === "next" ? this.frontierEnd : this.frontierStart;
2654
+ const frontier = dir === "next" ? this.runEnd : this.frontierStart;
2331
2655
  const url = dir === "next" ? frontier?.nextLink : frontier?.prevLink;
2332
2656
  if (!url) return null;
2333
2657
  const page = cache.getPageCache(url);
@@ -2340,15 +2664,12 @@ var PaginationState = class {
2340
2664
  method: "GET",
2341
2665
  url
2342
2666
  });
2343
- cache.loadPage(url, request);
2344
- }
2345
- try {
2667
+ await cache.loadPage(url, request);
2668
+ } else try {
2346
2669
  await page.request;
2347
- } catch {
2348
- return null;
2349
- }
2350
- if (dir === "next") this.frontierEnd = page;
2351
- else this.frontierStart = page;
2670
+ } catch {}
2671
+ if (!page.isSuccess) return null;
2672
+ this.extendRun(dir, page);
2352
2673
  return page.value;
2353
2674
  };
2354
2675
  /**
@@ -2367,7 +2688,9 @@ var PaginationState = class {
2367
2688
  * On failure the page stays active and {@link activePageRequest} resolves to
2368
2689
  * it, so a wrapping `<Request>` renders its error block. Calling again (for
2369
2690
  * example clicking the page's link a second time) retries: the failed page
2370
- * is re-requested with a forced reload.
2691
+ * is re-requested with a forced reload. In development, a document that
2692
+ * contradicts the collection's page numbers rejects instead (see
2693
+ * {@link adoptPage}).
2371
2694
  *
2372
2695
  * ```gts
2373
2696
  * <EachLink @pages={{pages}}>
@@ -2391,12 +2714,8 @@ var PaginationState = class {
2391
2714
  method: "GET",
2392
2715
  url
2393
2716
  });
2394
- cache.loadPage(url, request);
2395
- try {
2396
- await page.request;
2397
- } catch {
2398
- return null;
2399
- }
2717
+ await cache.loadPage(url, request);
2718
+ if (!page.isSuccess) return null;
2400
2719
  }
2401
2720
  return page.value;
2402
2721
  };
@@ -2423,6 +2742,8 @@ const PaginationStateCache = /* @__PURE__ */ new WeakMap();
2423
2742
  * await pages.loadNext();
2424
2743
  * ```
2425
2744
  *
2745
+ * @summary Experimental: returns the pagination state for a request, creating it on first call and returning the
2746
+ * same instance for the same request thereafter.
2426
2747
  * @since 5.9.0
2427
2748
  * @public
2428
2749
  */
@@ -2435,8 +2756,7 @@ function getPaginationState(request, pageHints) {
2435
2756
  return state;
2436
2757
  }
2437
2758
 
2438
- //#endregion
2439
- //#region src/signals/pagination-links.ts
2759
+ // src/signals/pagination-links.ts
2440
2760
  const PaginationLinksCache = /* @__PURE__ */ new WeakMap();
2441
2761
  /**
2442
2762
  * A single numbered link, e.g. page `3`. Loads its page and makes it active when
@@ -2456,6 +2776,8 @@ const PaginationLinksCache = /* @__PURE__ */ new WeakMap();
2456
2776
  * </EachLink>
2457
2777
  * ```
2458
2778
  *
2779
+ * @summary Experimental: a numbered page link with its page number, whether it is current, its distance from the
2780
+ * active page, and `setActive` to load and show that page.
2459
2781
  * @since 5.9.0
2460
2782
  * @public
2461
2783
  * @hideconstructor
@@ -2505,6 +2827,8 @@ var RealPaginationLink = class {
2505
2827
  * </EachLink>
2506
2828
  * ```
2507
2829
  *
2830
+ * @summary Experimental: a non-navigable gap marker in numbered pagination links, standing in for a range of
2831
+ * not-yet-loaded pages, usually shown as an ellipsis.
2508
2832
  * @since 5.9.0
2509
2833
  * @public
2510
2834
  * @hideconstructor
@@ -2557,6 +2881,8 @@ var PlaceholderPaginationLink = class {
2557
2881
  * </EachLink>
2558
2882
  * ```
2559
2883
  *
2884
+ * @summary Experimental: a `first`, `prev`, `next`, or `last` link relative to the active page, with `setActive`
2885
+ * to load it, and the only kind of link cursor-based pagination has.
2560
2886
  * @since 5.9.0
2561
2887
  * @public
2562
2888
  * @hideconstructor
@@ -2608,6 +2934,9 @@ var RelationalPaginationLink = class {
2608
2934
  * }
2609
2935
  * }
2610
2936
  * ```
2937
+ *
2938
+ * @summary Experimental: an entry in the numbered pagination links list, either a navigable numbered link or a
2939
+ * placeholder for a gap, told apart by `isReal`.
2611
2940
  */
2612
2941
  /**
2613
2942
  * The reactive set of navigation links derived from a {@link PaginationState}.
@@ -2637,6 +2966,8 @@ var RelationalPaginationLink = class {
2637
2966
  * - {@link PlaceholderPaginationLink}
2638
2967
  * - {@link RelationalPaginationLink}
2639
2968
  *
2969
+ * @summary Experimental: the reactive navigation links for a pagination state, with numbered links and gap
2970
+ * placeholders plus `first`, `prev`, `next`, and `last` links for the active page.
2640
2971
  * @since 5.9.0
2641
2972
  * @public
2642
2973
  * @hideconstructor
@@ -2748,6 +3079,8 @@ var PaginationLinks = class {
2748
3079
  * }
2749
3080
  * ```
2750
3081
  *
3082
+ * @summary Experimental: returns the navigation links for a paged pagination state, creating them on first call and
3083
+ * returning the same instance for the same state.
2751
3084
  * @since 5.9.0
2752
3085
  * @public
2753
3086
  */
@@ -2760,34 +3093,50 @@ function getPaginationLinks(state) {
2760
3093
  return links;
2761
3094
  }
2762
3095
 
2763
- //#endregion
2764
- //#region src/signals/pagination-subscription.ts
3096
+ // src/signals/pagination-subscription.ts
2765
3097
  /**
2766
3098
  * The content features available in both pagination modes: the state and
2767
3099
  * controls of the initial request.
3100
+ *
3101
+ * @summary Experimental: the request status flags and controls, like `isRefreshing`, `refresh`, and `reload`,
3102
+ * that `<Paginate />` yields to its content block in both modes.
2768
3103
  */
2769
3104
  /**
2770
3105
  * The content features yielded in `'paged'` mode: navigation happens by
2771
3106
  * loading a specific page.
3107
+ *
3108
+ * @summary Experimental: the request controls `<Paginate />` yields to its content block in paged mode, adding
3109
+ * `loadPage` to navigate to a page by URL.
2772
3110
  */
2773
3111
  /**
2774
3112
  * The content features yielded in `'infinite'` mode: navigation happens by
2775
3113
  * extending the loaded run at either end.
3114
+ *
3115
+ * @summary Experimental: the request controls `<Paginate />` yields to its content block in infinite mode, adding
3116
+ * `loadNext` and `loadPrev` to extend the loaded pages.
2776
3117
  */
2777
3118
  /**
2778
3119
  * The full set of content features a {@link PaginationSubscription} builds —
2779
3120
  * both modes' surfaces. The `<Paginate />` component narrows this to one mode
2780
3121
  * via {@link PaginationContentFeaturesFor} before yielding.
3122
+ *
3123
+ * @summary Experimental: the combined paged and infinite content features a pagination subscription builds, before
3124
+ * `<Paginate />` narrows them to one mode.
2781
3125
  */
2782
3126
  /**
2783
3127
  * Resolves a {@link PaginateMode} to the content features it exposes. Mirror of
2784
3128
  * {@link PaginationStateFor}.
3129
+ *
3130
+ * @summary Experimental: resolves a pagination mode to the content features `<Paginate />` yields, the infinite
3131
+ * set for `'infinite'` and the paged set otherwise.
2785
3132
  */
2786
3133
  /**
2787
3134
  * Lifecycle glue for the `<Paginate />` component. Owns the initial
2788
3135
  * {@link RequestSubscription} (loading/error state, autorefresh, disposal) and
2789
3136
  * the per-component {@link PaginationState} that it hands to the component.
2790
3137
  *
3138
+ * @summary Experimental: the lifecycle core of `<Paginate />`, owning the initial request subscription and the
3139
+ * component's pagination state.
2791
3140
  * @since 5.9.0
2792
3141
  * @public
2793
3142
  * @hideconstructor
@@ -3049,6 +3398,8 @@ defineSignal(PaginationSubscription.prototype, "_navRequest", null);
3049
3398
  * subscription[DISPOSE](); // tear down when the owning component unmounts
3050
3399
  * ```
3051
3400
  *
3401
+ * @summary Experimental: creates the subscription that manages a `<Paginate />` component's initial request
3402
+ * lifecycle and pagination state, for managing that lifecycle yourself.
3052
3403
  * @since 5.9.0
3053
3404
  * @public
3054
3405
  */
@@ -3064,8 +3415,7 @@ function _DISPOSE$1() {
3064
3415
  self._requestSubscription?.[DISPOSE]?.();
3065
3416
  }
3066
3417
 
3067
- //#endregion
3068
- //#region src/signals/pagination-links-subscription.ts
3418
+ // src/signals/pagination-links-subscription.ts
3069
3419
  /**
3070
3420
  * The framework-agnostic core of a pagination links component (for example the
3071
3421
  * `<EachLink />` component of `@warp-drive-mirror/ember`): it owns the component
@@ -3080,6 +3430,8 @@ function _DISPOSE$1() {
3080
3430
  * `<Paginate />` component, so they stay in sync as pages load and the active
3081
3431
  * page changes.
3082
3432
  *
3433
+ * @summary Experimental: the framework-agnostic lifecycle core of a pagination links component such as
3434
+ * `<EachLink />`, exposing the navigation links for a paged pagination state.
3083
3435
  * @since 5.9.0
3084
3436
  * @public
3085
3437
  * @hideconstructor
@@ -3121,6 +3473,8 @@ var PaginationLinksSubscription = class {
3121
3473
  * subscription[DISPOSE](); // tear down when the owning component unmounts
3122
3474
  * ```
3123
3475
  *
3476
+ * @summary Experimental: creates the subscription a pagination links component such as `<EachLink />` uses to
3477
+ * derive navigation links from a paged pagination state.
3124
3478
  * @since 5.9.0
3125
3479
  * @public
3126
3480
  */
@@ -3135,25 +3489,30 @@ function _DISPOSE() {
3135
3489
  self.isDestroyed = true;
3136
3490
  }
3137
3491
 
3138
- //#endregion
3139
- //#region src/signals/promise-state.ts
3492
+ // src/signals/promise-state.ts
3140
3493
  const PromiseCache = /* @__PURE__ */ new WeakMap();
3141
3494
  /**
3142
3495
  * The state of a promise in the "pending"
3143
3496
  * state. This is the default initial state.
3144
3497
  *
3498
+ * @summary The `getPromiseState` state for a promise that has not yet settled, with `isPending` true and
3499
+ * no value or reason.
3145
3500
  */
3146
3501
  /**
3147
3502
  * The state of a promise in the "fulfilled" state.
3148
3503
  * This is the state of a promise that has resolved
3149
3504
  * successfully.
3150
3505
  *
3506
+ * @summary The `getPromiseState` state for a promise that resolved, with `isSuccess` true and the
3507
+ * resolved `value`.
3151
3508
  */
3152
3509
  /**
3153
3510
  * The state of a promise in the "rejected" state.
3154
3511
  * This is the state of a promise that has rejected
3155
3512
  * with an error.
3156
3513
  *
3514
+ * @summary The `getPromiseState` state for a promise that rejected, with `isError` true and the
3515
+ * rejection `reason`.
3157
3516
  */
3158
3517
  /**
3159
3518
  * The state of a promise. This is the type that is returned
@@ -3164,6 +3523,8 @@ const PromiseCache = /* @__PURE__ */ new WeakMap();
3164
3523
  * - {@link ResolvedPromise}
3165
3524
  * - {@link RejectedPromise}
3166
3525
  *
3526
+ * @summary The reactive pending, fulfilled, or rejected state of a promise, as returned by
3527
+ * `getPromiseState`.
3167
3528
  */
3168
3529
  const PromiseStateProto = {};
3169
3530
  defineSignal(PromiseStateProto, "reason", null);
@@ -3229,6 +3590,9 @@ function getPromise(promise) {
3229
3590
  /**
3230
3591
  * Returns a reactive state-machine for the provided promise or awaitable.
3231
3592
  *
3593
+ * The [Async as Reactive State](/guides/the-manual/reactivity/derivation) guide shows
3594
+ * how to use it in place of tracked loading and error state.
3595
+ *
3232
3596
  * Repeat calls to `getPromiseState` with the same promise will return the same state object
3233
3597
  * making is safe and easy to use in templates and JavaScript code to produce reactive
3234
3598
  * behaviors around promises.
@@ -3278,6 +3642,9 @@ function getPromise(promise) {
3278
3642
  * If looking to use in a template, consider also the `<Await />` component.
3279
3643
  *
3280
3644
  * See also {@link PromiseState}
3645
+ *
3646
+ * @summary Returns a cached, reactive state object tracking whether a promise is pending, fulfilled, or
3647
+ * rejected, for use in JS or templates.
3281
3648
  */
3282
3649
  function getPromiseState(promise) {
3283
3650
  const _promise = getPromise(promise);
@@ -3289,6 +3656,5 @@ function getPromiseState(promise) {
3289
3656
  return state;
3290
3657
  }
3291
3658
 
3292
- //#endregion
3293
- 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 };
3294
- //# sourceMappingURL=-private-CdDed4yB.js.map
3659
+ 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 };
3660
+ //# sourceMappingURL=-private-CrUi_3E_.js.map