@warp-drive/core 5.9.0-beta.1 → 5.9.0-beta.3

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 (277) hide show
  1. package/dist/-private-BL9zXgJB.js +3530 -0
  2. package/dist/-private-BL9zXgJB.js.map +1 -0
  3. package/dist/{-private-DMzvF_Q6.js → -private-Cxa8cMBj.js} +2 -2
  4. package/dist/-private-Cxa8cMBj.js.map +1 -0
  5. package/dist/{unpkg/dev-deprecated/-private-DL4tfrv9.js → -private-xK1KgxZJ.js} +2 -2
  6. package/dist/{-private-b1g4dhl0.js.map → -private-xK1KgxZJ.js.map} +1 -1
  7. package/{declarations/concepts-LHsLJZMl.d.ts → dist/concepts-DFldVwEM.d.ts} +2 -2
  8. package/{declarations/concepts-LHsLJZMl.d.ts.map → dist/concepts-DFldVwEM.d.ts.map} +1 -1
  9. package/dist/configure.js +1 -1
  10. package/dist/graph/-private.d.ts +2 -0
  11. package/dist/graph/-private.js +46 -33
  12. package/dist/graph/-private.js.map +1 -1
  13. package/dist/index.d.ts +2 -0
  14. package/dist/index.js +1 -1
  15. package/{declarations/internal-Cz-893zD.d.ts → dist/internal-DtWOpxrR.d.ts} +2763 -2271
  16. package/dist/internal-DtWOpxrR.d.ts.map +1 -0
  17. package/dist/reactive/-private.d.ts +2 -0
  18. package/dist/reactive/-private.js +1 -1
  19. package/dist/reactive.d.ts +2 -0
  20. package/dist/reactive.js +3 -3
  21. package/{declarations → dist}/record-D3QQcaIR.d.ts.map +1 -1
  22. package/dist/{request--vRFALbQ.js → request-z2NByNx0.js} +2 -2
  23. package/dist/request-z2NByNx0.js.map +1 -0
  24. package/dist/request.d.ts +2 -0
  25. package/dist/request.js +1 -1
  26. package/dist/signals/-leaked.d.ts +1060 -0
  27. package/dist/signals/-leaked.d.ts.map +1 -0
  28. package/dist/signals/-leaked.js +2 -2
  29. package/dist/{src-Dex_phWI.js → src-s5HHjglV.js} +192 -53
  30. package/dist/src-s5HHjglV.js.map +1 -0
  31. package/dist/store/-private.d.ts +2 -0
  32. package/dist/store/-private.js +1 -1
  33. package/dist/store-DNF9Rgoh.js.map +1 -1
  34. package/dist/store.d.ts +2 -0
  35. package/{declarations → dist}/types/-private.d.ts +1 -1
  36. package/{declarations → dist}/types/-private.d.ts.map +1 -1
  37. package/dist/types/-private.js +1 -1
  38. package/dist/types/cache.d.ts +2 -0
  39. package/dist/types/record.js.map +1 -1
  40. package/dist/types/request.d.ts +2 -0
  41. package/dist/types/request.js +1 -1
  42. package/dist/types/request.js.map +1 -1
  43. package/dist/types/runtime.js +1 -1
  44. package/dist/types/schema/concepts.d.ts +2 -0
  45. package/dist/types/schema/fields.js.map +1 -1
  46. package/dist/types/schema/schema-service.d.ts +2 -0
  47. package/dist/types/symbols.js +1 -1
  48. package/dist/types/symbols.js.map +1 -1
  49. package/{declarations → dist}/types.d.ts +1 -1
  50. package/dist/{-private-b1g4dhl0.js → unpkg/dev/-private-BGCYELwo.js} +2 -2
  51. package/dist/unpkg/{dev-deprecated/-private-DL4tfrv9.js.map → dev/-private-BGCYELwo.js.map} +1 -1
  52. package/dist/unpkg/{dev-deprecated/-private-2RfQ2761.js → dev/-private-DhiS6yOR.js} +2 -2
  53. package/dist/unpkg/dev/-private-DhiS6yOR.js.map +1 -0
  54. package/dist/unpkg/dev/-private-pNQae3qH.js +3519 -0
  55. package/dist/unpkg/dev/-private-pNQae3qH.js.map +1 -0
  56. package/dist/unpkg/dev/configure.js +1 -1
  57. package/dist/unpkg/dev/graph/-private.js +46 -33
  58. package/dist/unpkg/dev/graph/-private.js.map +1 -1
  59. package/dist/unpkg/dev/index.js +1 -1
  60. package/dist/unpkg/dev/reactive/-private.js +1 -1
  61. package/dist/unpkg/dev/reactive.js +3 -3
  62. package/dist/unpkg/{dev-deprecated/request-DAuXbfYi.js → dev/request-BbbzRou7.js} +2 -2
  63. package/dist/unpkg/dev/request-BbbzRou7.js.map +1 -0
  64. package/dist/unpkg/dev/request.js +1 -1
  65. package/dist/unpkg/dev/{runtime-EoVKAhTv.js → runtime-DoDtzXJb.js} +2 -2
  66. package/dist/unpkg/dev/runtime-DoDtzXJb.js.map +1 -0
  67. package/dist/unpkg/dev/signals/-leaked.js +2 -2
  68. package/dist/unpkg/dev/{src-Bxlr_vue.js → src-Cf7NXXR2.js} +194 -55
  69. package/dist/unpkg/dev/src-Cf7NXXR2.js.map +1 -0
  70. package/dist/unpkg/dev/store/-private.js +1 -1
  71. package/dist/unpkg/{dev-deprecated/store-TcP2H4Af.js → dev/store-DamE3C4y.js} +2 -2
  72. package/dist/unpkg/dev/store-DamE3C4y.js.map +1 -0
  73. package/dist/unpkg/dev/store.js +1 -1
  74. package/dist/unpkg/dev/types/-private.js +1 -1
  75. package/dist/unpkg/dev/types/record.js.map +1 -1
  76. package/dist/unpkg/dev/types/request.js +1 -1
  77. package/dist/unpkg/dev/types/request.js.map +1 -1
  78. package/dist/unpkg/dev/types/runtime.js +1 -1
  79. package/dist/unpkg/dev/types/schema/fields.js.map +1 -1
  80. package/dist/unpkg/dev/types/symbols.js +1 -1
  81. package/dist/unpkg/dev/types/symbols.js.map +1 -1
  82. package/dist/unpkg/{dev/-private-DL4tfrv9.js → dev-deprecated/-private-BGCYELwo.js} +2 -2
  83. package/dist/unpkg/{prod/-private-Z9i0icpE.js.map → dev-deprecated/-private-BGCYELwo.js.map} +1 -1
  84. package/dist/unpkg/{dev/-private-2RfQ2761.js → dev-deprecated/-private-DhiS6yOR.js} +2 -2
  85. package/dist/unpkg/dev-deprecated/-private-DhiS6yOR.js.map +1 -0
  86. package/dist/unpkg/dev-deprecated/-private-pNQae3qH.js +3519 -0
  87. package/dist/unpkg/dev-deprecated/-private-pNQae3qH.js.map +1 -0
  88. package/dist/unpkg/dev-deprecated/configure.js +1 -1
  89. package/dist/unpkg/dev-deprecated/graph/-private.js +47 -34
  90. package/dist/unpkg/dev-deprecated/graph/-private.js.map +1 -1
  91. package/dist/unpkg/dev-deprecated/index.js +1 -1
  92. package/dist/unpkg/dev-deprecated/reactive/-private.js +1 -1
  93. package/dist/unpkg/dev-deprecated/reactive.js +3 -3
  94. package/dist/unpkg/{dev/request-DAuXbfYi.js → dev-deprecated/request-BbbzRou7.js} +2 -2
  95. package/dist/unpkg/dev-deprecated/request-BbbzRou7.js.map +1 -0
  96. package/dist/unpkg/dev-deprecated/request.js +1 -1
  97. package/dist/unpkg/dev-deprecated/{runtime-BacZMq1r.js → runtime-CPL2BGgT.js} +2 -2
  98. package/dist/unpkg/dev-deprecated/runtime-CPL2BGgT.js.map +1 -0
  99. package/dist/unpkg/dev-deprecated/signals/-leaked.js +2 -2
  100. package/dist/unpkg/dev-deprecated/{src-DEl2Ca3T.js → src-CSuFUXv4.js} +195 -56
  101. package/dist/unpkg/dev-deprecated/src-CSuFUXv4.js.map +1 -0
  102. package/dist/unpkg/dev-deprecated/store/-private.js +1 -1
  103. package/dist/unpkg/{dev/store-DmiFvT1B.js → dev-deprecated/store-Bsdz5mRe.js} +2 -2
  104. package/dist/unpkg/dev-deprecated/store-Bsdz5mRe.js.map +1 -0
  105. package/dist/unpkg/dev-deprecated/store.js +1 -1
  106. package/dist/unpkg/dev-deprecated/types/-private.js +1 -1
  107. package/dist/unpkg/dev-deprecated/types/record.js.map +1 -1
  108. package/dist/unpkg/dev-deprecated/types/request.js +1 -1
  109. package/dist/unpkg/dev-deprecated/types/request.js.map +1 -1
  110. package/dist/unpkg/dev-deprecated/types/runtime.js +1 -1
  111. package/dist/unpkg/dev-deprecated/types/schema/fields.js.map +1 -1
  112. package/dist/unpkg/dev-deprecated/types/symbols.js +1 -1
  113. package/dist/unpkg/dev-deprecated/types/symbols.js.map +1 -1
  114. package/dist/unpkg/prod/-private-8gd8hbwm.js +22 -0
  115. package/dist/unpkg/{prod-deprecated/-private-Z9i0icpE.js.map → prod/-private-8gd8hbwm.js.map} +1 -1
  116. package/dist/unpkg/prod/{-private-BK71-uXR.js → -private-B6aLbrgV.js} +2 -2
  117. package/dist/unpkg/prod/-private-B6aLbrgV.js.map +1 -0
  118. package/dist/unpkg/prod/-private-ggVX_Iob.js +3294 -0
  119. package/dist/unpkg/prod/-private-ggVX_Iob.js.map +1 -0
  120. package/dist/unpkg/prod/configure.js +1 -1
  121. package/dist/unpkg/prod/graph/-private.js +45 -32
  122. package/dist/unpkg/prod/graph/-private.js.map +1 -1
  123. package/dist/unpkg/prod/index.js +1 -1
  124. package/dist/unpkg/prod/reactive/-private.js +1 -1
  125. package/dist/unpkg/prod/reactive.js +3 -3
  126. package/dist/unpkg/prod/{request-BcJNzSgv.js → request-BoeppjDj.js} +2 -2
  127. package/dist/unpkg/prod/request-BoeppjDj.js.map +1 -0
  128. package/dist/unpkg/prod/request.js +1 -1
  129. package/dist/unpkg/prod/signals/-leaked.js +2 -2
  130. package/dist/unpkg/prod/{src-Dzz-j6pp.js → src-C0wuASrN.js} +196 -53
  131. package/dist/unpkg/prod/src-C0wuASrN.js.map +1 -0
  132. package/dist/unpkg/prod/store/-private.js +1 -1
  133. package/dist/unpkg/prod/store-BWhmb7Ob.js.map +1 -1
  134. package/dist/unpkg/prod/types/-private.js +1 -1
  135. package/dist/unpkg/prod/types/record.js.map +1 -1
  136. package/dist/unpkg/prod/types/request.js +1 -1
  137. package/dist/unpkg/prod/types/request.js.map +1 -1
  138. package/dist/unpkg/prod/types/runtime.js +1 -1
  139. package/dist/unpkg/prod/types/schema/fields.js.map +1 -1
  140. package/dist/unpkg/prod/types/symbols.js +1 -1
  141. package/dist/unpkg/prod/types/symbols.js.map +1 -1
  142. package/dist/unpkg/prod-deprecated/{-private-Z9i0icpE.js → -private-8gd8hbwm.js} +2 -2
  143. package/dist/unpkg/{dev/-private-DL4tfrv9.js.map → prod-deprecated/-private-8gd8hbwm.js.map} +1 -1
  144. package/dist/unpkg/prod-deprecated/{-private-BK71-uXR.js → -private-B6aLbrgV.js} +2 -2
  145. package/dist/unpkg/prod-deprecated/-private-B6aLbrgV.js.map +1 -0
  146. package/dist/unpkg/prod-deprecated/-private-ggVX_Iob.js +3294 -0
  147. package/dist/unpkg/prod-deprecated/-private-ggVX_Iob.js.map +1 -0
  148. package/dist/unpkg/prod-deprecated/configure.js +1 -1
  149. package/dist/unpkg/prod-deprecated/graph/-private.js +46 -35
  150. package/dist/unpkg/prod-deprecated/graph/-private.js.map +1 -1
  151. package/dist/unpkg/prod-deprecated/index.js +1 -1
  152. package/dist/unpkg/prod-deprecated/reactive/-private.js +1 -1
  153. package/dist/unpkg/prod-deprecated/reactive.js +3 -3
  154. package/dist/unpkg/prod-deprecated/{request-BcJNzSgv.js → request-BoeppjDj.js} +2 -2
  155. package/dist/unpkg/prod-deprecated/request-BoeppjDj.js.map +1 -0
  156. package/dist/unpkg/prod-deprecated/request.js +1 -1
  157. package/dist/unpkg/prod-deprecated/signals/-leaked.js +2 -2
  158. package/dist/unpkg/prod-deprecated/{src-BOifHFQ5.js → src-BXOgNqmz.js} +197 -54
  159. package/dist/unpkg/prod-deprecated/src-BXOgNqmz.js.map +1 -0
  160. package/dist/unpkg/prod-deprecated/store/-private.js +1 -1
  161. package/dist/unpkg/prod-deprecated/store-BWhmb7Ob.js.map +1 -1
  162. package/dist/unpkg/prod-deprecated/types/-private.js +1 -1
  163. package/dist/unpkg/prod-deprecated/types/record.js.map +1 -1
  164. package/dist/unpkg/prod-deprecated/types/request.js +1 -1
  165. package/dist/unpkg/prod-deprecated/types/request.js.map +1 -1
  166. package/dist/unpkg/prod-deprecated/types/runtime.js +1 -1
  167. package/dist/unpkg/prod-deprecated/types/schema/fields.js.map +1 -1
  168. package/dist/unpkg/prod-deprecated/types/symbols.js +1 -1
  169. package/dist/unpkg/prod-deprecated/types/symbols.js.map +1 -1
  170. package/package.json +15 -19
  171. package/declarations/graph/-private.d.ts +0 -2
  172. package/declarations/index.d.ts +0 -2
  173. package/declarations/internal-Cz-893zD.d.ts.map +0 -1
  174. package/declarations/reactive/-private.d.ts +0 -2
  175. package/declarations/reactive.d.ts +0 -2
  176. package/declarations/request.d.ts +0 -2
  177. package/declarations/signals/-leaked.d.ts +0 -63
  178. package/declarations/signals/-leaked.d.ts.map +0 -1
  179. package/declarations/store/-private.d.ts +0 -2
  180. package/declarations/store.d.ts +0 -8358
  181. package/declarations/store.d.ts.map +0 -1
  182. package/declarations/types/cache.d.ts +0 -2
  183. package/declarations/types/request.d.ts +0 -2
  184. package/declarations/types/schema/concepts.d.ts +0 -2
  185. package/declarations/types/schema/schema-service.d.ts +0 -2
  186. package/dist/-private-DMzvF_Q6.js.map +0 -1
  187. package/dist/-private-HjaQ1wp1.js +0 -1695
  188. package/dist/-private-HjaQ1wp1.js.map +0 -1
  189. package/dist/request--vRFALbQ.js.map +0 -1
  190. package/dist/src-Dex_phWI.js.map +0 -1
  191. package/dist/unpkg/dev/-private-2RfQ2761.js.map +0 -1
  192. package/dist/unpkg/dev/-private-CM1zxNws.js +0 -1684
  193. package/dist/unpkg/dev/-private-CM1zxNws.js.map +0 -1
  194. package/dist/unpkg/dev/request-DAuXbfYi.js.map +0 -1
  195. package/dist/unpkg/dev/runtime-EoVKAhTv.js.map +0 -1
  196. package/dist/unpkg/dev/src-Bxlr_vue.js.map +0 -1
  197. package/dist/unpkg/dev/store-DmiFvT1B.js.map +0 -1
  198. package/dist/unpkg/dev-deprecated/-private-2RfQ2761.js.map +0 -1
  199. package/dist/unpkg/dev-deprecated/-private-CM1zxNws.js +0 -1684
  200. package/dist/unpkg/dev-deprecated/-private-CM1zxNws.js.map +0 -1
  201. package/dist/unpkg/dev-deprecated/request-DAuXbfYi.js.map +0 -1
  202. package/dist/unpkg/dev-deprecated/runtime-BacZMq1r.js.map +0 -1
  203. package/dist/unpkg/dev-deprecated/src-DEl2Ca3T.js.map +0 -1
  204. package/dist/unpkg/dev-deprecated/store-TcP2H4Af.js.map +0 -1
  205. package/dist/unpkg/prod/-private-BK71-uXR.js.map +0 -1
  206. package/dist/unpkg/prod/-private-TNaS5Piv.js +0 -1494
  207. package/dist/unpkg/prod/-private-TNaS5Piv.js.map +0 -1
  208. package/dist/unpkg/prod/-private-Z9i0icpE.js +0 -22
  209. package/dist/unpkg/prod/request-BcJNzSgv.js.map +0 -1
  210. package/dist/unpkg/prod/src-Dzz-j6pp.js.map +0 -1
  211. package/dist/unpkg/prod-deprecated/-private-BK71-uXR.js.map +0 -1
  212. package/dist/unpkg/prod-deprecated/-private-TNaS5Piv.js +0 -1494
  213. package/dist/unpkg/prod-deprecated/-private-TNaS5Piv.js.map +0 -1
  214. package/dist/unpkg/prod-deprecated/request-BcJNzSgv.js.map +0 -1
  215. package/dist/unpkg/prod-deprecated/src-BOifHFQ5.js.map +0 -1
  216. /package/{declarations → dist}/aliases-BWYW5EhX.d.ts +0 -0
  217. /package/{declarations → dist}/aliases-BWYW5EhX.d.ts.map +0 -0
  218. /package/{declarations → dist}/build-config/babel-macros.d.ts +0 -0
  219. /package/{declarations → dist}/build-config/canary-features.d.ts +0 -0
  220. /package/{declarations → dist}/build-config/debugging.d.ts +0 -0
  221. /package/{declarations → dist}/build-config/deprecations.d.ts +0 -0
  222. /package/{declarations → dist}/build-config/env.d.ts +0 -0
  223. /package/{declarations → dist}/build-config/macros.d.ts +0 -0
  224. /package/{declarations → dist}/build-config.d.ts +0 -0
  225. /package/{declarations → dist}/change-C7kqv2kW.d.ts +0 -0
  226. /package/{declarations → dist}/change-C7kqv2kW.d.ts.map +0 -0
  227. /package/{declarations → dist}/configure-B_F639tN.d.ts +0 -0
  228. /package/{declarations → dist}/configure-B_F639tN.d.ts.map +0 -0
  229. /package/{declarations → dist}/configure.d.ts +0 -0
  230. /package/{declarations → dist}/document-BEn91SwT.d.ts +0 -0
  231. /package/{declarations → dist}/document-BEn91SwT.d.ts.map +0 -0
  232. /package/{declarations → dist}/error-50OSEhsF.d.ts +0 -0
  233. /package/{declarations → dist}/error-50OSEhsF.d.ts.map +0 -0
  234. /package/{declarations → dist}/fields-FM7peCiM.d.ts +0 -0
  235. /package/{declarations → dist}/fields-FM7peCiM.d.ts.map +0 -0
  236. /package/{declarations → dist}/graph-DLqYXP2z.d.ts +0 -0
  237. /package/{declarations → dist}/graph-DLqYXP2z.d.ts.map +0 -0
  238. /package/{declarations → dist}/identifier-DQnqOSJK.d.ts +0 -0
  239. /package/{declarations → dist}/identifier-DQnqOSJK.d.ts.map +0 -0
  240. /package/{declarations → dist}/json-api-raw-C5APJHHB.d.ts +0 -0
  241. /package/{declarations → dist}/json-api-raw-C5APJHHB.d.ts.map +0 -0
  242. /package/{declarations → dist}/mutations-CqtoGB4t.d.ts +0 -0
  243. /package/{declarations → dist}/mutations-CqtoGB4t.d.ts.map +0 -0
  244. /package/{declarations → dist}/operations-D1qA6r0_.d.ts +0 -0
  245. /package/{declarations → dist}/operations-D1qA6r0_.d.ts.map +0 -0
  246. /package/{declarations → dist}/params-DrEx3bf8.d.ts +0 -0
  247. /package/{declarations → dist}/params-DrEx3bf8.d.ts.map +0 -0
  248. /package/{declarations → dist}/raw-D5hnjiq7.d.ts +0 -0
  249. /package/{declarations → dist}/raw-D5hnjiq7.d.ts.map +0 -0
  250. /package/{declarations → dist}/record-D3QQcaIR.d.ts +0 -0
  251. /package/{declarations → dist}/relationship-CmHzMPKf.d.ts +0 -0
  252. /package/{declarations → dist}/relationship-CmHzMPKf.d.ts.map +0 -0
  253. /package/{declarations → dist}/symbols-DjRDCeX0.d.ts +0 -0
  254. /package/{declarations → dist}/symbols-DjRDCeX0.d.ts.map +0 -0
  255. /package/{declarations → dist}/types/cache/aliases.d.ts +0 -0
  256. /package/{declarations → dist}/types/cache/change.d.ts +0 -0
  257. /package/{declarations → dist}/types/cache/mutations.d.ts +0 -0
  258. /package/{declarations → dist}/types/cache/operations.d.ts +0 -0
  259. /package/{declarations → dist}/types/cache/relationship.d.ts +0 -0
  260. /package/{declarations → dist}/types/graph.d.ts +0 -0
  261. /package/{declarations → dist}/types/identifier.d.ts +0 -0
  262. /package/{declarations → dist}/types/json/raw.d.ts +0 -0
  263. /package/{declarations → dist}/types/params.d.ts +0 -0
  264. /package/{declarations → dist}/types/record.d.ts +0 -0
  265. /package/{declarations → dist}/types/runtime.d.ts +0 -0
  266. /package/{declarations → dist}/types/runtime.d.ts.map +0 -0
  267. /package/{declarations → dist}/types/schema/fields.d.ts +0 -0
  268. /package/{declarations → dist}/types/schema/fields.type-test.d.ts +0 -0
  269. /package/{declarations → dist}/types/spec/document.d.ts +0 -0
  270. /package/{declarations → dist}/types/spec/error.d.ts +0 -0
  271. /package/{declarations → dist}/types/spec/json-api-raw.d.ts +0 -0
  272. /package/{declarations → dist}/types/symbols.d.ts +0 -0
  273. /package/{declarations → dist}/types/utils.d.ts +0 -0
  274. /package/{declarations → dist}/utils/string.d.ts +0 -0
  275. /package/{declarations → dist}/utils/string.d.ts.map +0 -0
  276. /package/{declarations → dist}/utils-BtURiy8l.d.ts +0 -0
  277. /package/{declarations → dist}/utils-BtURiy8l.d.ts.map +0 -0
@@ -1,4 +1,4 @@
1
- import { a as setTransient, r as peekTransient, t as getOrSetGlobal } from "../-private-BK71-uXR.js";
1
+ import { a as setTransient, r as peekTransient, t as getOrSetGlobal } from "../-private-B6aLbrgV.js";
2
2
 
3
3
  //#region src/graph/-private/-utils.ts
4
4
  /** Retrieves the private {@link Store} instance from a capabilities manager (or any object exposing `_store`). */
@@ -81,12 +81,12 @@ function removeIdentifierCompletelyFromRelationship(graph, relationship, value,
81
81
  }
82
82
  }
83
83
  /** Notifies the store that a relationship has changed, provided the relationship has been accessed and is not currently being removed. */
84
- function notifyChange(graph, relationship) {
84
+ function notifyChange(graph, relationship, channel) {
85
85
  if (!relationship.accessed) return;
86
86
  const resourceKey = relationship.identifier;
87
87
  const key = relationship.definition.key;
88
88
  if (resourceKey === graph._removing) return;
89
- graph.store.notifyChange(resourceKey, "relationships", key);
89
+ graph.store.notifyChange(resourceKey, "relationships", key, channel);
90
90
  }
91
91
 
92
92
  //#endregion
@@ -138,7 +138,7 @@ function replaceRelatedRecordsLocal(graph, op, isRemote) {
138
138
  relationship.additions = diff.add;
139
139
  relationship.removals = diff.del;
140
140
  relationship.localState = diff.finalState;
141
- if (becameDirty && !wasDirty) notifyChange(graph, relationship);
141
+ if (becameDirty && !wasDirty) notifyChange(graph, relationship, "local");
142
142
  }
143
143
  function replaceRelatedRecordsRemote(graph, op, isRemote) {
144
144
  const resourceKeys = op.value;
@@ -190,7 +190,8 @@ function replaceRelatedRecordsRemote(graph, op, isRemote) {
190
190
  }
191
191
  if (deprecationInfo.triggered) {}
192
192
  }
193
- if (relationship.isDirty && !wasDirty) flushCanonical(graph, relationship);
193
+ if (diff.remoteOrderChanged) flushCanonical(graph, relationship, "remote");
194
+ if (diff.changed) flushCanonical(graph, relationship, "local");
194
195
  }
195
196
  function addToInverse(graph, resourceKey, key, value, isRemote) {
196
197
  const relationship = graph.get(resourceKey, key);
@@ -203,11 +204,12 @@ function addToInverse(graph, resourceKey, key, value, isRemote) {
203
204
  graph._addToTransaction(relationship);
204
205
  if (relationship.remoteState !== null) removeFromInverse(graph, relationship.remoteState, relationship.definition.inverseKey, resourceKey, isRemote);
205
206
  relationship.remoteState = value;
207
+ notifyChange(graph, relationship);
206
208
  }
207
209
  if (relationship.localState !== value) {
208
210
  if (!isRemote && relationship.localState) removeFromInverse(graph, relationship.localState, relationship.definition.inverseKey, resourceKey, isRemote);
209
211
  relationship.localState = value;
210
- notifyChange(graph, relationship);
212
+ if (!isRemote) notifyChange(graph, relationship, "local");
211
213
  }
212
214
  } else if (isHasMany(relationship)) {
213
215
  if (isRemote) {
@@ -224,7 +226,7 @@ function addToInverse(graph, resourceKey, key, value, isRemote) {
224
226
  }
225
227
  } else {
226
228
  if (!relationship.isDirty && !relationship.localState) relationship.localState = [];
227
- if (_add(graph, resourceKey, relationship, value, null, isRemote)) notifyChange(graph, relationship);
229
+ if (_add(graph, resourceKey, relationship, value, null, isRemote)) notifyChange(graph, relationship, "local");
228
230
  }
229
231
  } else if (isRemote) {
230
232
  if (!relationship.remoteMembers.has(value)) {
@@ -244,23 +246,24 @@ function removeFromInverse(graph, resourceKey, key, value, isRemote) {
244
246
  if (isRemote) {
245
247
  graph._addToTransaction(relationship);
246
248
  relationship.remoteState = null;
249
+ notifyChange(graph, relationship);
247
250
  }
248
251
  if (relationship.localState === value) {
249
252
  relationship.localState = null;
250
- notifyChange(graph, relationship);
253
+ if (!isRemote) notifyChange(graph, relationship, "local");
251
254
  }
252
255
  } else if (isHasMany(relationship)) {
253
256
  if (isRemote) {
254
257
  graph._addToTransaction(relationship);
255
258
  if (_removeRemote(relationship, value)) notifyChange(graph, relationship);
256
- } else if (_removeLocal(relationship, value)) notifyChange(graph, relationship);
259
+ } else if (_removeLocal(relationship, value)) notifyChange(graph, relationship, "local");
257
260
  } else if (isRemote) {
258
261
  relationship.remoteMembers.delete(value);
259
262
  relationship.localMembers.delete(value);
260
263
  } else if (value && relationship.localMembers.has(value)) relationship.localMembers.delete(value);
261
264
  }
262
- function flushCanonical(graph, rel) {
263
- if (rel.accessed) graph._scheduleLocalSync(rel);
265
+ function flushCanonical(graph, rel, channel) {
266
+ if (rel.accessed) graph._scheduleLocalSync(rel, channel);
264
267
  }
265
268
 
266
269
  //#endregion
@@ -280,7 +283,7 @@ function replaceRelatedRecord(graph, op, isRemote = false) {
280
283
  if (existingState && localState === existingState) notifyInverseOfPotentialMaterialization(graph, existingState, definition.inverseKey, op.record, isRemote);
281
284
  else if (localState !== op.value && relationship.definition.resetOnRemoteUpdate !== false) {
282
285
  relationship.localState = existingState;
283
- notifyChange(graph, relationship);
286
+ notifyChange(graph, relationship, "local");
284
287
  }
285
288
  }
286
289
  return;
@@ -303,16 +306,12 @@ function replaceRelatedRecord(graph, op, isRemote = false) {
303
306
  addToInverse(graph, op.value, definition.inverseKey, op.record, isRemote);
304
307
  }
305
308
  if (isRemote) {
309
+ notifyChange(graph, relationship);
306
310
  const { localState, remoteState } = relationship;
307
311
  if (localState && checkIfNew(graph._realStore, localState) && !remoteState) return;
308
- if (localState !== remoteState && localState === existingState) {
309
- relationship.localState = remoteState;
310
- notifyChange(graph, relationship);
311
- } else if (localState !== remoteState && localState !== existingState && relationship.definition.resetOnRemoteUpdate !== false) {
312
- relationship.localState = remoteState;
313
- notifyChange(graph, relationship);
314
- }
315
- } else notifyChange(graph, relationship);
312
+ if (localState !== remoteState && localState === existingState) relationship.localState = remoteState;
313
+ else if (localState !== remoteState && localState !== existingState && relationship.definition.resetOnRemoteUpdate !== false) relationship.localState = remoteState;
314
+ } else notifyChange(graph, relationship, "local");
316
315
  }
317
316
 
318
317
  //#endregion
@@ -958,7 +957,7 @@ function addToRelatedRecords(graph, op, isRemote) {
958
957
  if (!relationship.isDirty && !relationship.localState) relationship.localState = [];
959
958
  if (Array.isArray(value)) for (let i = 0; i < value.length; i++) addRelatedRecord(graph, relationship, record, value[i], index !== void 0 ? index + i : null, isRemote);
960
959
  else addRelatedRecord(graph, relationship, record, value, index ?? null, isRemote);
961
- notifyChange(graph, relationship);
960
+ notifyChange(graph, relationship, isRemote ? void 0 : "local");
962
961
  }
963
962
  function addRelatedRecord(graph, relationship, record, value, index, isRemote) {
964
963
  if (_add(graph, record, relationship, value, index, isRemote)) addToInverse(graph, value, relationship.definition.inverseKey, record, isRemote);
@@ -985,11 +984,16 @@ function mergeInRelationship(graph, rel, op) {
985
984
  else mergeImplicit(graph, rel, op);
986
985
  }
987
986
  function mergeBelongsTo(graph, rel, op) {
988
- if (rel.remoteState === op.record) rel.remoteState = op.value;
987
+ let changed = false;
988
+ if (rel.remoteState === op.record) {
989
+ rel.remoteState = op.value;
990
+ changed = true;
991
+ }
989
992
  if (rel.localState === op.record) {
990
993
  rel.localState = op.value;
991
- notifyChange(graph, rel);
994
+ changed = true;
992
995
  }
996
+ if (changed) notifyChange(graph, rel);
993
997
  }
994
998
  function mergeHasMany(graph, rel, op) {
995
999
  if (rel.remoteMembers.has(op.record)) {
@@ -1042,7 +1046,7 @@ function removeFromRelatedRecords(graph, op, isRemote) {
1042
1046
  }
1043
1047
  if (Array.isArray(value)) for (let i = 0; i < value.length; i++) removeRelatedRecord(graph, record, relationship, value[i], op.index ?? null, isRemote);
1044
1048
  else removeRelatedRecord(graph, record, relationship, value, op.index ?? null, isRemote);
1045
- notifyChange(graph, relationship);
1049
+ notifyChange(graph, relationship, isRemote ? void 0 : "local");
1046
1050
  }
1047
1051
  function removeRelatedRecord(graph, record, relationship, value, index, isRemote) {
1048
1052
  if (_remove(graph, record, relationship, value, index, isRemote)) removeFromInverse(graph, value, relationship.definition.inverseKey, record, isRemote);
@@ -1200,8 +1204,11 @@ var Graph = class {
1200
1204
  * {@link Graph.push} but not yet flushed into the graph by {@link Graph._flushRemoteQueue}.
1201
1205
  */
1202
1206
  /**
1203
- * The set of {@link CollectionEdge}s that have local changes pending notification, scheduled
1204
- * via {@link Graph._scheduleLocalSync} and drained by {@link Graph._flushLocalQueue}.
1207
+ * The {@link CollectionEdge}s that have changes pending notification, scheduled via
1208
+ * {@link Graph._scheduleLocalSync} and drained by {@link Graph._flushLocalQueue}, each
1209
+ * mapped to the {@link NotificationChannel} the notification should be scoped to —
1210
+ * `null` when it must reach every subscriber (scheduled unscoped, or scheduled for
1211
+ * both channels).
1205
1212
  */
1206
1213
  /**
1207
1214
  * The identifier of the current remote-update transaction, or `null` when no transaction is
@@ -1227,7 +1234,7 @@ var Graph = class {
1227
1234
  hasMany: void 0,
1228
1235
  deletions: []
1229
1236
  };
1230
- this._updatedRelationships = /* @__PURE__ */ new Set();
1237
+ this._updatedRelationships = /* @__PURE__ */ new Map();
1231
1238
  this._transaction = null;
1232
1239
  this._removing = null;
1233
1240
  this.silenceNotifications = false;
@@ -1507,12 +1514,16 @@ var Graph = class {
1507
1514
  }
1508
1515
  }
1509
1516
  /**
1510
- * Marks a {@link CollectionEdge} as having local changes that need to be notified, and
1511
- * schedules a flush of the local sync queue (see {@link Graph._flushLocalQueue}) if one is not
1512
- * already pending.
1517
+ * Marks a {@link CollectionEdge} as having changes that need to be notified on the given
1518
+ * {@link NotificationChannel} (omitted = unscoped, reaching every subscriber), and schedules
1519
+ * a flush of the sync queue (see {@link Graph._flushLocalQueue}) if one is not already
1520
+ * pending. Scheduling the same edge for both channels (or once unscoped) coalesces into a
1521
+ * single unscoped notification.
1513
1522
  */
1514
- _scheduleLocalSync(relationship) {
1515
- this._updatedRelationships.add(relationship);
1523
+ _scheduleLocalSync(relationship, channel) {
1524
+ const pending = this._updatedRelationships;
1525
+ if (!pending.has(relationship)) pending.set(relationship, channel ?? null);
1526
+ else if (pending.get(relationship) !== (channel ?? null)) pending.set(relationship, null);
1516
1527
  if (!this._willSyncLocal) {
1517
1528
  this._willSyncLocal = true;
1518
1529
  getStore(this.store)._schedule("sync", () => this._flushLocalQueue());
@@ -1556,13 +1567,13 @@ var Graph = class {
1556
1567
  if (!this._willSyncLocal) return;
1557
1568
  if (this.silenceNotifications) {
1558
1569
  this.silenceNotifications = false;
1559
- this._updatedRelationships = /* @__PURE__ */ new Set();
1570
+ this._updatedRelationships = /* @__PURE__ */ new Map();
1560
1571
  return;
1561
1572
  }
1562
1573
  this._willSyncLocal = false;
1563
1574
  const updated = this._updatedRelationships;
1564
- this._updatedRelationships = /* @__PURE__ */ new Set();
1565
- updated.forEach((rel) => notifyChange(this, rel));
1575
+ this._updatedRelationships = /* @__PURE__ */ new Map();
1576
+ updated.forEach((channel, rel) => notifyChange(this, rel, channel ?? void 0));
1566
1577
  }
1567
1578
  /**
1568
1579
  * Tears down the graph: clears all tracked identifiers/edges, removes it from the global