@wordpress/core-data 7.37.0 → 7.37.1-next.06ee73755.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (423) hide show
  1. package/CHANGELOG.md +0 -2
  2. package/LICENSE.md +1 -1
  3. package/README.md +0 -1
  4. package/build/{actions.js → actions.cjs} +9 -9
  5. package/build/actions.cjs.map +7 -0
  6. package/build/batch/{create-batch.js → create-batch.cjs} +2 -2
  7. package/build/batch/{default-processor.js → default-processor.cjs} +1 -1
  8. package/build/batch/{index.js → index.cjs} +3 -3
  9. package/build/{dynamic-entities.js → dynamic-entities.cjs} +1 -1
  10. package/build/{entities.js → entities.cjs} +3 -3
  11. package/build/{entity-context.js → entity-context.cjs} +1 -1
  12. package/build/{entity-provider.js → entity-provider.cjs} +2 -2
  13. package/build/entity-types/{attachment.js → attachment.cjs} +1 -1
  14. package/build/entity-types/{base-entity-records.js → base-entity-records.cjs} +1 -1
  15. package/build/entity-types/{base.js → base.cjs} +1 -1
  16. package/build/entity-types/{comment.js → comment.cjs} +1 -1
  17. package/build/entity-types/{font-collection.js → font-collection.cjs} +1 -1
  18. package/build/entity-types/{font-family.js → font-family.cjs} +1 -1
  19. package/build/entity-types/{global-styles-revision.js → global-styles-revision.cjs} +1 -1
  20. package/build/entity-types/{helpers.js → helpers.cjs} +1 -1
  21. package/build/entity-types/{index.js → index.cjs} +1 -1
  22. package/build/entity-types/{menu-location.js → menu-location.cjs} +1 -1
  23. package/build/entity-types/{nav-menu-item.js → nav-menu-item.cjs} +1 -1
  24. package/build/entity-types/{nav-menu.js → nav-menu.cjs} +1 -1
  25. package/build/entity-types/{page.js → page.cjs} +1 -1
  26. package/build/entity-types/{plugin.js → plugin.cjs} +1 -1
  27. package/build/entity-types/{post-revision.js → post-revision.cjs} +1 -1
  28. package/build/entity-types/{post-status.js → post-status.cjs} +1 -1
  29. package/build/entity-types/{post.js → post.cjs} +1 -1
  30. package/build/entity-types/{settings.js → settings.cjs} +1 -1
  31. package/build/entity-types/{sidebar.js → sidebar.cjs} +1 -1
  32. package/build/entity-types/{taxonomy.js → taxonomy.cjs} +1 -1
  33. package/build/entity-types/{term.js → term.cjs} +1 -1
  34. package/build/entity-types/{theme.js → theme.cjs} +1 -1
  35. package/build/entity-types/{type.js → type.cjs} +1 -1
  36. package/build/entity-types/{user.js → user.cjs} +1 -1
  37. package/build/entity-types/{widget-type.js → widget-type.cjs} +1 -1
  38. package/build/entity-types/{widget.js → widget.cjs} +1 -1
  39. package/build/entity-types/{wp-template-part.js → wp-template-part.cjs} +1 -1
  40. package/build/entity-types/{wp-template.js → wp-template.cjs} +1 -1
  41. package/build/fetch/{__experimental-fetch-link-suggestions.js → __experimental-fetch-link-suggestions.cjs} +1 -1
  42. package/build/fetch/{__experimental-fetch-url-data.js → __experimental-fetch-url-data.cjs} +1 -1
  43. package/build/fetch/{index.js → index.cjs} +3 -3
  44. package/build/footnotes/{get-footnotes-order.js → get-footnotes-order.cjs} +2 -2
  45. package/build/footnotes/{get-rich-text-values-cached.js → get-rich-text-values-cached.cjs} +2 -2
  46. package/build/footnotes/{index.js → index.cjs} +2 -2
  47. package/build/hooks/{constants.js → constants.cjs} +1 -1
  48. package/build/hooks/{index.js → index.cjs} +7 -7
  49. package/build/hooks/{memoize.js → memoize.cjs} +1 -1
  50. package/build/hooks/{use-entity-block-editor.js → use-entity-block-editor.cjs} +4 -4
  51. package/build/hooks/{use-entity-id.js → use-entity-id.cjs} +2 -2
  52. package/build/hooks/{use-entity-prop.js → use-entity-prop.cjs} +3 -3
  53. package/build/hooks/{use-entity-record.js → use-entity-record.cjs} +3 -3
  54. package/build/hooks/{use-entity-record.js.map → use-entity-record.cjs.map} +2 -2
  55. package/build/hooks/{use-entity-records.js → use-entity-records.cjs} +5 -5
  56. package/build/hooks/{use-query-select.js → use-query-select.cjs} +3 -3
  57. package/build/hooks/{use-resource-permissions.js → use-resource-permissions.cjs} +4 -4
  58. package/build/{index.js → index.cjs} +24 -24
  59. package/build/{index.js.map → index.cjs.map} +1 -1
  60. package/build/{lock-unlock.js → lock-unlock.cjs} +1 -1
  61. package/build/locks/{actions.js → actions.cjs} +2 -2
  62. package/build/locks/{engine.js → engine.cjs} +3 -3
  63. package/build/locks/{reducer.js → reducer.cjs} +2 -2
  64. package/build/locks/{selectors.js → selectors.cjs} +2 -2
  65. package/build/locks/{utils.js → utils.cjs} +1 -1
  66. package/build/{name.js → name.cjs} +1 -1
  67. package/build/{private-actions.js → private-actions.cjs} +2 -2
  68. package/build/{private-apis.js → private-apis.cjs} +4 -4
  69. package/build/{private-selectors.js → private-selectors.cjs} +6 -6
  70. package/build/queried-data/{actions.js → actions.cjs} +1 -1
  71. package/build/queried-data/{get-query-parts.js → get-query-parts.cjs} +2 -2
  72. package/build/queried-data/{index.js → index.cjs} +6 -6
  73. package/build/queried-data/{index.js.map → index.cjs.map} +1 -1
  74. package/build/queried-data/{reducer.js → reducer.cjs} +4 -4
  75. package/build/queried-data/{selectors.js → selectors.cjs} +3 -3
  76. package/build/{reducer.js → reducer.cjs} +5 -5
  77. package/build/reducer.cjs.map +7 -0
  78. package/build/{resolvers.js → resolvers.cjs} +6 -6
  79. package/build/{selectors.js → selectors.cjs} +7 -7
  80. package/build/{selectors.js.map → selectors.cjs.map} +2 -2
  81. package/build/{sync.js → sync.cjs} +1 -1
  82. package/build/{types.js → types.cjs} +1 -1
  83. package/build/utils/{conservative-map-item.js → conservative-map-item.cjs} +2 -2
  84. package/build/utils/conservative-map-item.cjs.map +7 -0
  85. package/build/utils/{crdt-blocks.js → crdt-blocks.cjs} +8 -7
  86. package/build/utils/crdt-blocks.cjs.map +7 -0
  87. package/build/utils/{crdt.js → crdt.cjs} +5 -5
  88. package/build/utils/crdt.cjs.map +7 -0
  89. package/build/utils/{forward-resolver.js → forward-resolver.cjs} +1 -1
  90. package/build/utils/{get-nested-value.js → get-nested-value.cjs} +1 -1
  91. package/build/utils/{get-normalized-comma-separable.js → get-normalized-comma-separable.cjs} +1 -1
  92. package/build/utils/{if-matching-action.js → if-matching-action.cjs} +1 -1
  93. package/build/utils/{index.js → index.cjs} +14 -14
  94. package/build/utils/{is-numeric-id.js → is-numeric-id.cjs} +1 -1
  95. package/build/utils/{is-raw-attribute.js → is-raw-attribute.cjs} +1 -1
  96. package/build/utils/{log-entity-deprecation.js → log-entity-deprecation.cjs} +2 -2
  97. package/build/utils/{on-sub-key.js → on-sub-key.cjs} +1 -1
  98. package/build/utils/{receive-intermediate-results.js → receive-intermediate-results.cjs} +2 -2
  99. package/build/utils/{replace-action.js → replace-action.cjs} +1 -1
  100. package/build/utils/{set-nested-value.js → set-nested-value.cjs} +1 -1
  101. package/build/utils/{user-permissions.js → user-permissions.cjs} +1 -1
  102. package/build/utils/{with-weak-map-cache.js → with-weak-map-cache.cjs} +1 -1
  103. package/build-module/{actions.js → actions.mjs} +9 -9
  104. package/build-module/actions.mjs.map +7 -0
  105. package/build-module/batch/{create-batch.js → create-batch.mjs} +2 -2
  106. package/build-module/batch/{default-processor.js → default-processor.mjs} +1 -1
  107. package/build-module/batch/index.mjs +8 -0
  108. package/build-module/{dynamic-entities.js → dynamic-entities.mjs} +1 -1
  109. package/build-module/{entities.js → entities.mjs} +3 -3
  110. package/build-module/{entity-context.js → entity-context.mjs} +1 -1
  111. package/build-module/{entity-provider.js → entity-provider.mjs} +2 -2
  112. package/build-module/entity-types/attachment.mjs +1 -0
  113. package/build-module/entity-types/base-entity-records.mjs +1 -0
  114. package/build-module/entity-types/base.mjs +1 -0
  115. package/build-module/entity-types/comment.mjs +1 -0
  116. package/build-module/entity-types/font-collection.mjs +1 -0
  117. package/build-module/entity-types/font-family.mjs +1 -0
  118. package/build-module/entity-types/global-styles-revision.mjs +1 -0
  119. package/build-module/entity-types/helpers.mjs +1 -0
  120. package/build-module/entity-types/index.mjs +1 -0
  121. package/build-module/entity-types/menu-location.mjs +1 -0
  122. package/build-module/entity-types/nav-menu-item.mjs +1 -0
  123. package/build-module/entity-types/nav-menu.mjs +1 -0
  124. package/build-module/entity-types/page.mjs +1 -0
  125. package/build-module/entity-types/plugin.mjs +1 -0
  126. package/build-module/entity-types/post-revision.mjs +1 -0
  127. package/build-module/entity-types/post-status.mjs +1 -0
  128. package/build-module/entity-types/post.mjs +1 -0
  129. package/build-module/entity-types/settings.mjs +1 -0
  130. package/build-module/entity-types/sidebar.mjs +1 -0
  131. package/build-module/entity-types/taxonomy.mjs +1 -0
  132. package/build-module/entity-types/term.mjs +1 -0
  133. package/build-module/entity-types/theme.mjs +1 -0
  134. package/build-module/entity-types/type.mjs +1 -0
  135. package/build-module/entity-types/user.mjs +1 -0
  136. package/build-module/entity-types/widget-type.mjs +1 -0
  137. package/build-module/entity-types/widget.mjs +1 -0
  138. package/build-module/entity-types/wp-template-part.mjs +1 -0
  139. package/build-module/entity-types/wp-template.mjs +1 -0
  140. package/build-module/fetch/{__experimental-fetch-link-suggestions.js → __experimental-fetch-link-suggestions.mjs} +1 -1
  141. package/build-module/fetch/{__experimental-fetch-url-data.js → __experimental-fetch-url-data.mjs} +1 -1
  142. package/build-module/fetch/{index.js → index.mjs} +3 -3
  143. package/build-module/footnotes/{get-footnotes-order.js → get-footnotes-order.mjs} +2 -2
  144. package/build-module/footnotes/{get-rich-text-values-cached.js → get-rich-text-values-cached.mjs} +2 -2
  145. package/build-module/footnotes/{index.js → index.mjs} +2 -2
  146. package/build-module/hooks/{constants.js → constants.mjs} +1 -1
  147. package/build-module/hooks/{index.js → index.mjs} +7 -7
  148. package/build-module/hooks/{memoize.js → memoize.mjs} +1 -1
  149. package/build-module/hooks/{use-entity-block-editor.js → use-entity-block-editor.mjs} +4 -4
  150. package/build-module/hooks/{use-entity-id.js → use-entity-id.mjs} +2 -2
  151. package/build-module/hooks/{use-entity-prop.js → use-entity-prop.mjs} +3 -3
  152. package/build-module/hooks/{use-entity-record.js → use-entity-record.mjs} +3 -3
  153. package/build-module/hooks/{use-entity-record.js.map → use-entity-record.mjs.map} +2 -2
  154. package/build-module/hooks/{use-entity-records.js → use-entity-records.mjs} +5 -5
  155. package/build-module/hooks/{use-query-select.js → use-query-select.mjs} +3 -3
  156. package/build-module/hooks/{use-resource-permissions.js → use-resource-permissions.mjs} +4 -4
  157. package/build-module/{index.js → index.mjs} +19 -19
  158. package/build-module/{lock-unlock.js → lock-unlock.mjs} +1 -1
  159. package/build-module/locks/{actions.js → actions.mjs} +2 -2
  160. package/build-module/locks/{engine.js → engine.mjs} +3 -3
  161. package/build-module/locks/{reducer.js → reducer.mjs} +2 -2
  162. package/build-module/locks/{selectors.js → selectors.mjs} +2 -2
  163. package/build-module/locks/{utils.js → utils.mjs} +1 -1
  164. package/build-module/{name.js → name.mjs} +1 -1
  165. package/build-module/{private-actions.js → private-actions.mjs} +2 -2
  166. package/build-module/{private-apis.js → private-apis.mjs} +4 -4
  167. package/build-module/{private-selectors.js → private-selectors.mjs} +6 -6
  168. package/build-module/queried-data/{actions.js → actions.mjs} +1 -1
  169. package/build-module/queried-data/{get-query-parts.js → get-query-parts.mjs} +2 -2
  170. package/build-module/queried-data/index.mjs +8 -0
  171. package/build-module/queried-data/{reducer.js → reducer.mjs} +4 -4
  172. package/build-module/queried-data/{selectors.js → selectors.mjs} +3 -3
  173. package/build-module/{reducer.js → reducer.mjs} +5 -5
  174. package/build-module/reducer.mjs.map +7 -0
  175. package/build-module/{resolvers.js → resolvers.mjs} +6 -6
  176. package/build-module/{selectors.js → selectors.mjs} +7 -7
  177. package/build-module/{selectors.js.map → selectors.mjs.map} +2 -2
  178. package/build-module/{sync.js → sync.mjs} +1 -1
  179. package/build-module/types.mjs +1 -0
  180. package/build-module/utils/{conservative-map-item.js → conservative-map-item.mjs} +2 -2
  181. package/build-module/utils/conservative-map-item.mjs.map +7 -0
  182. package/build-module/utils/{crdt-blocks.js → crdt-blocks.mjs} +8 -7
  183. package/build-module/utils/crdt-blocks.mjs.map +7 -0
  184. package/build-module/utils/{crdt.js → crdt.mjs} +5 -5
  185. package/build-module/utils/crdt.mjs.map +7 -0
  186. package/build-module/utils/{forward-resolver.js → forward-resolver.mjs} +1 -1
  187. package/build-module/utils/{get-nested-value.js → get-nested-value.mjs} +1 -1
  188. package/build-module/utils/{get-normalized-comma-separable.js → get-normalized-comma-separable.mjs} +1 -1
  189. package/build-module/utils/{if-matching-action.js → if-matching-action.mjs} +1 -1
  190. package/build-module/utils/{index.js → index.mjs} +14 -14
  191. package/build-module/utils/{is-numeric-id.js → is-numeric-id.mjs} +1 -1
  192. package/build-module/utils/{is-raw-attribute.js → is-raw-attribute.mjs} +1 -1
  193. package/build-module/utils/{log-entity-deprecation.js → log-entity-deprecation.mjs} +2 -2
  194. package/build-module/utils/{on-sub-key.js → on-sub-key.mjs} +1 -1
  195. package/build-module/utils/{receive-intermediate-results.js → receive-intermediate-results.mjs} +2 -2
  196. package/build-module/utils/{replace-action.js → replace-action.mjs} +1 -1
  197. package/build-module/utils/{set-nested-value.js → set-nested-value.mjs} +1 -1
  198. package/build-module/utils/{user-permissions.js → user-permissions.mjs} +1 -1
  199. package/build-module/utils/{with-weak-map-cache.js → with-weak-map-cache.mjs} +1 -1
  200. package/build-types/hooks/use-entity-record.d.ts +0 -1
  201. package/build-types/hooks/use-entity-record.d.ts.map +1 -1
  202. package/build-types/index.d.ts +9 -9
  203. package/build-types/index.d.ts.map +1 -1
  204. package/build-types/selectors.d.ts +2 -1
  205. package/build-types/selectors.d.ts.map +1 -1
  206. package/build-types/utils/crdt-blocks.d.ts.map +1 -1
  207. package/package.json +34 -24
  208. package/src/actions.js +1 -1
  209. package/src/hooks/use-entity-record.ts +0 -1
  210. package/src/reducer.js +1 -1
  211. package/src/selectors.ts +11 -1
  212. package/src/utils/conservative-map-item.js +1 -1
  213. package/src/utils/crdt-blocks.ts +9 -7
  214. package/src/utils/crdt.ts +4 -4
  215. package/src/utils/test/crdt-blocks.ts +99 -0
  216. package/src/utils/test/crdt.ts +42 -3
  217. package/build/actions.js.map +0 -7
  218. package/build/reducer.js.map +0 -7
  219. package/build/utils/conservative-map-item.js.map +0 -7
  220. package/build/utils/crdt-blocks.js.map +0 -7
  221. package/build/utils/crdt.js.map +0 -7
  222. package/build-module/actions.js.map +0 -7
  223. package/build-module/batch/index.js +0 -8
  224. package/build-module/entity-types/attachment.js +0 -1
  225. package/build-module/entity-types/base-entity-records.js +0 -1
  226. package/build-module/entity-types/base.js +0 -1
  227. package/build-module/entity-types/comment.js +0 -1
  228. package/build-module/entity-types/font-collection.js +0 -1
  229. package/build-module/entity-types/font-family.js +0 -1
  230. package/build-module/entity-types/global-styles-revision.js +0 -1
  231. package/build-module/entity-types/helpers.js +0 -1
  232. package/build-module/entity-types/index.js +0 -1
  233. package/build-module/entity-types/menu-location.js +0 -1
  234. package/build-module/entity-types/nav-menu-item.js +0 -1
  235. package/build-module/entity-types/nav-menu.js +0 -1
  236. package/build-module/entity-types/page.js +0 -1
  237. package/build-module/entity-types/plugin.js +0 -1
  238. package/build-module/entity-types/post-revision.js +0 -1
  239. package/build-module/entity-types/post-status.js +0 -1
  240. package/build-module/entity-types/post.js +0 -1
  241. package/build-module/entity-types/settings.js +0 -1
  242. package/build-module/entity-types/sidebar.js +0 -1
  243. package/build-module/entity-types/taxonomy.js +0 -1
  244. package/build-module/entity-types/term.js +0 -1
  245. package/build-module/entity-types/theme.js +0 -1
  246. package/build-module/entity-types/type.js +0 -1
  247. package/build-module/entity-types/user.js +0 -1
  248. package/build-module/entity-types/widget-type.js +0 -1
  249. package/build-module/entity-types/widget.js +0 -1
  250. package/build-module/entity-types/wp-template-part.js +0 -1
  251. package/build-module/entity-types/wp-template.js +0 -1
  252. package/build-module/queried-data/index.js +0 -8
  253. package/build-module/reducer.js.map +0 -7
  254. package/build-module/types.js +0 -1
  255. package/build-module/utils/conservative-map-item.js.map +0 -7
  256. package/build-module/utils/crdt-blocks.js.map +0 -7
  257. package/build-module/utils/crdt.js.map +0 -7
  258. package/tsconfig.json +0 -25
  259. package/tsconfig.tsbuildinfo +0 -1
  260. /package/build/batch/{create-batch.js.map → create-batch.cjs.map} +0 -0
  261. /package/build/batch/{default-processor.js.map → default-processor.cjs.map} +0 -0
  262. /package/build/batch/{index.js.map → index.cjs.map} +0 -0
  263. /package/build/{dynamic-entities.js.map → dynamic-entities.cjs.map} +0 -0
  264. /package/build/{entities.js.map → entities.cjs.map} +0 -0
  265. /package/build/{entity-context.js.map → entity-context.cjs.map} +0 -0
  266. /package/build/{entity-provider.js.map → entity-provider.cjs.map} +0 -0
  267. /package/build/entity-types/{attachment.js.map → attachment.cjs.map} +0 -0
  268. /package/build/entity-types/{base-entity-records.js.map → base-entity-records.cjs.map} +0 -0
  269. /package/build/entity-types/{base.js.map → base.cjs.map} +0 -0
  270. /package/build/entity-types/{comment.js.map → comment.cjs.map} +0 -0
  271. /package/build/entity-types/{font-collection.js.map → font-collection.cjs.map} +0 -0
  272. /package/build/entity-types/{font-family.js.map → font-family.cjs.map} +0 -0
  273. /package/build/entity-types/{global-styles-revision.js.map → global-styles-revision.cjs.map} +0 -0
  274. /package/build/entity-types/{helpers.js.map → helpers.cjs.map} +0 -0
  275. /package/build/entity-types/{index.js.map → index.cjs.map} +0 -0
  276. /package/build/entity-types/{menu-location.js.map → menu-location.cjs.map} +0 -0
  277. /package/build/entity-types/{nav-menu-item.js.map → nav-menu-item.cjs.map} +0 -0
  278. /package/build/entity-types/{nav-menu.js.map → nav-menu.cjs.map} +0 -0
  279. /package/build/entity-types/{page.js.map → page.cjs.map} +0 -0
  280. /package/build/entity-types/{plugin.js.map → plugin.cjs.map} +0 -0
  281. /package/build/entity-types/{post-revision.js.map → post-revision.cjs.map} +0 -0
  282. /package/build/entity-types/{post-status.js.map → post-status.cjs.map} +0 -0
  283. /package/build/entity-types/{post.js.map → post.cjs.map} +0 -0
  284. /package/build/entity-types/{settings.js.map → settings.cjs.map} +0 -0
  285. /package/build/entity-types/{sidebar.js.map → sidebar.cjs.map} +0 -0
  286. /package/build/entity-types/{taxonomy.js.map → taxonomy.cjs.map} +0 -0
  287. /package/build/entity-types/{term.js.map → term.cjs.map} +0 -0
  288. /package/build/entity-types/{theme.js.map → theme.cjs.map} +0 -0
  289. /package/build/entity-types/{type.js.map → type.cjs.map} +0 -0
  290. /package/build/entity-types/{user.js.map → user.cjs.map} +0 -0
  291. /package/build/entity-types/{widget-type.js.map → widget-type.cjs.map} +0 -0
  292. /package/build/entity-types/{widget.js.map → widget.cjs.map} +0 -0
  293. /package/build/entity-types/{wp-template-part.js.map → wp-template-part.cjs.map} +0 -0
  294. /package/build/entity-types/{wp-template.js.map → wp-template.cjs.map} +0 -0
  295. /package/build/fetch/{__experimental-fetch-link-suggestions.js.map → __experimental-fetch-link-suggestions.cjs.map} +0 -0
  296. /package/build/fetch/{__experimental-fetch-url-data.js.map → __experimental-fetch-url-data.cjs.map} +0 -0
  297. /package/build/fetch/{index.js.map → index.cjs.map} +0 -0
  298. /package/build/footnotes/{get-footnotes-order.js.map → get-footnotes-order.cjs.map} +0 -0
  299. /package/build/footnotes/{get-rich-text-values-cached.js.map → get-rich-text-values-cached.cjs.map} +0 -0
  300. /package/build/footnotes/{index.js.map → index.cjs.map} +0 -0
  301. /package/build/hooks/{constants.js.map → constants.cjs.map} +0 -0
  302. /package/build/hooks/{index.js.map → index.cjs.map} +0 -0
  303. /package/build/hooks/{memoize.js.map → memoize.cjs.map} +0 -0
  304. /package/build/hooks/{use-entity-block-editor.js.map → use-entity-block-editor.cjs.map} +0 -0
  305. /package/build/hooks/{use-entity-id.js.map → use-entity-id.cjs.map} +0 -0
  306. /package/build/hooks/{use-entity-prop.js.map → use-entity-prop.cjs.map} +0 -0
  307. /package/build/hooks/{use-entity-records.js.map → use-entity-records.cjs.map} +0 -0
  308. /package/build/hooks/{use-query-select.js.map → use-query-select.cjs.map} +0 -0
  309. /package/build/hooks/{use-resource-permissions.js.map → use-resource-permissions.cjs.map} +0 -0
  310. /package/build/{lock-unlock.js.map → lock-unlock.cjs.map} +0 -0
  311. /package/build/locks/{actions.js.map → actions.cjs.map} +0 -0
  312. /package/build/locks/{engine.js.map → engine.cjs.map} +0 -0
  313. /package/build/locks/{reducer.js.map → reducer.cjs.map} +0 -0
  314. /package/build/locks/{selectors.js.map → selectors.cjs.map} +0 -0
  315. /package/build/locks/{utils.js.map → utils.cjs.map} +0 -0
  316. /package/build/{name.js.map → name.cjs.map} +0 -0
  317. /package/build/{private-actions.js.map → private-actions.cjs.map} +0 -0
  318. /package/build/{private-apis.js.map → private-apis.cjs.map} +0 -0
  319. /package/build/{private-selectors.js.map → private-selectors.cjs.map} +0 -0
  320. /package/build/queried-data/{actions.js.map → actions.cjs.map} +0 -0
  321. /package/build/queried-data/{get-query-parts.js.map → get-query-parts.cjs.map} +0 -0
  322. /package/build/queried-data/{reducer.js.map → reducer.cjs.map} +0 -0
  323. /package/build/queried-data/{selectors.js.map → selectors.cjs.map} +0 -0
  324. /package/build/{resolvers.js.map → resolvers.cjs.map} +0 -0
  325. /package/build/{sync.js.map → sync.cjs.map} +0 -0
  326. /package/build/{types.js.map → types.cjs.map} +0 -0
  327. /package/build/utils/{forward-resolver.js.map → forward-resolver.cjs.map} +0 -0
  328. /package/build/utils/{get-nested-value.js.map → get-nested-value.cjs.map} +0 -0
  329. /package/build/utils/{get-normalized-comma-separable.js.map → get-normalized-comma-separable.cjs.map} +0 -0
  330. /package/build/utils/{if-matching-action.js.map → if-matching-action.cjs.map} +0 -0
  331. /package/build/utils/{index.js.map → index.cjs.map} +0 -0
  332. /package/build/utils/{is-numeric-id.js.map → is-numeric-id.cjs.map} +0 -0
  333. /package/build/utils/{is-raw-attribute.js.map → is-raw-attribute.cjs.map} +0 -0
  334. /package/build/utils/{log-entity-deprecation.js.map → log-entity-deprecation.cjs.map} +0 -0
  335. /package/build/utils/{on-sub-key.js.map → on-sub-key.cjs.map} +0 -0
  336. /package/build/utils/{receive-intermediate-results.js.map → receive-intermediate-results.cjs.map} +0 -0
  337. /package/build/utils/{replace-action.js.map → replace-action.cjs.map} +0 -0
  338. /package/build/utils/{set-nested-value.js.map → set-nested-value.cjs.map} +0 -0
  339. /package/build/utils/{user-permissions.js.map → user-permissions.cjs.map} +0 -0
  340. /package/build/utils/{with-weak-map-cache.js.map → with-weak-map-cache.cjs.map} +0 -0
  341. /package/build-module/batch/{create-batch.js.map → create-batch.mjs.map} +0 -0
  342. /package/build-module/batch/{default-processor.js.map → default-processor.mjs.map} +0 -0
  343. /package/build-module/batch/{index.js.map → index.mjs.map} +0 -0
  344. /package/build-module/{dynamic-entities.js.map → dynamic-entities.mjs.map} +0 -0
  345. /package/build-module/{entities.js.map → entities.mjs.map} +0 -0
  346. /package/build-module/{entity-context.js.map → entity-context.mjs.map} +0 -0
  347. /package/build-module/{entity-provider.js.map → entity-provider.mjs.map} +0 -0
  348. /package/build-module/entity-types/{attachment.js.map → attachment.mjs.map} +0 -0
  349. /package/build-module/entity-types/{base-entity-records.js.map → base-entity-records.mjs.map} +0 -0
  350. /package/build-module/entity-types/{base.js.map → base.mjs.map} +0 -0
  351. /package/build-module/entity-types/{comment.js.map → comment.mjs.map} +0 -0
  352. /package/build-module/entity-types/{font-collection.js.map → font-collection.mjs.map} +0 -0
  353. /package/build-module/entity-types/{font-family.js.map → font-family.mjs.map} +0 -0
  354. /package/build-module/entity-types/{global-styles-revision.js.map → global-styles-revision.mjs.map} +0 -0
  355. /package/build-module/entity-types/{helpers.js.map → helpers.mjs.map} +0 -0
  356. /package/build-module/entity-types/{index.js.map → index.mjs.map} +0 -0
  357. /package/build-module/entity-types/{menu-location.js.map → menu-location.mjs.map} +0 -0
  358. /package/build-module/entity-types/{nav-menu-item.js.map → nav-menu-item.mjs.map} +0 -0
  359. /package/build-module/entity-types/{nav-menu.js.map → nav-menu.mjs.map} +0 -0
  360. /package/build-module/entity-types/{page.js.map → page.mjs.map} +0 -0
  361. /package/build-module/entity-types/{plugin.js.map → plugin.mjs.map} +0 -0
  362. /package/build-module/entity-types/{post-revision.js.map → post-revision.mjs.map} +0 -0
  363. /package/build-module/entity-types/{post-status.js.map → post-status.mjs.map} +0 -0
  364. /package/build-module/entity-types/{post.js.map → post.mjs.map} +0 -0
  365. /package/build-module/entity-types/{settings.js.map → settings.mjs.map} +0 -0
  366. /package/build-module/entity-types/{sidebar.js.map → sidebar.mjs.map} +0 -0
  367. /package/build-module/entity-types/{taxonomy.js.map → taxonomy.mjs.map} +0 -0
  368. /package/build-module/entity-types/{term.js.map → term.mjs.map} +0 -0
  369. /package/build-module/entity-types/{theme.js.map → theme.mjs.map} +0 -0
  370. /package/build-module/entity-types/{type.js.map → type.mjs.map} +0 -0
  371. /package/build-module/entity-types/{user.js.map → user.mjs.map} +0 -0
  372. /package/build-module/entity-types/{widget-type.js.map → widget-type.mjs.map} +0 -0
  373. /package/build-module/entity-types/{widget.js.map → widget.mjs.map} +0 -0
  374. /package/build-module/entity-types/{wp-template-part.js.map → wp-template-part.mjs.map} +0 -0
  375. /package/build-module/entity-types/{wp-template.js.map → wp-template.mjs.map} +0 -0
  376. /package/build-module/fetch/{__experimental-fetch-link-suggestions.js.map → __experimental-fetch-link-suggestions.mjs.map} +0 -0
  377. /package/build-module/fetch/{__experimental-fetch-url-data.js.map → __experimental-fetch-url-data.mjs.map} +0 -0
  378. /package/build-module/fetch/{index.js.map → index.mjs.map} +0 -0
  379. /package/build-module/footnotes/{get-footnotes-order.js.map → get-footnotes-order.mjs.map} +0 -0
  380. /package/build-module/footnotes/{get-rich-text-values-cached.js.map → get-rich-text-values-cached.mjs.map} +0 -0
  381. /package/build-module/footnotes/{index.js.map → index.mjs.map} +0 -0
  382. /package/build-module/hooks/{constants.js.map → constants.mjs.map} +0 -0
  383. /package/build-module/hooks/{index.js.map → index.mjs.map} +0 -0
  384. /package/build-module/hooks/{memoize.js.map → memoize.mjs.map} +0 -0
  385. /package/build-module/hooks/{use-entity-block-editor.js.map → use-entity-block-editor.mjs.map} +0 -0
  386. /package/build-module/hooks/{use-entity-id.js.map → use-entity-id.mjs.map} +0 -0
  387. /package/build-module/hooks/{use-entity-prop.js.map → use-entity-prop.mjs.map} +0 -0
  388. /package/build-module/hooks/{use-entity-records.js.map → use-entity-records.mjs.map} +0 -0
  389. /package/build-module/hooks/{use-query-select.js.map → use-query-select.mjs.map} +0 -0
  390. /package/build-module/hooks/{use-resource-permissions.js.map → use-resource-permissions.mjs.map} +0 -0
  391. /package/build-module/{index.js.map → index.mjs.map} +0 -0
  392. /package/build-module/{lock-unlock.js.map → lock-unlock.mjs.map} +0 -0
  393. /package/build-module/locks/{actions.js.map → actions.mjs.map} +0 -0
  394. /package/build-module/locks/{engine.js.map → engine.mjs.map} +0 -0
  395. /package/build-module/locks/{reducer.js.map → reducer.mjs.map} +0 -0
  396. /package/build-module/locks/{selectors.js.map → selectors.mjs.map} +0 -0
  397. /package/build-module/locks/{utils.js.map → utils.mjs.map} +0 -0
  398. /package/build-module/{name.js.map → name.mjs.map} +0 -0
  399. /package/build-module/{private-actions.js.map → private-actions.mjs.map} +0 -0
  400. /package/build-module/{private-apis.js.map → private-apis.mjs.map} +0 -0
  401. /package/build-module/{private-selectors.js.map → private-selectors.mjs.map} +0 -0
  402. /package/build-module/queried-data/{actions.js.map → actions.mjs.map} +0 -0
  403. /package/build-module/queried-data/{get-query-parts.js.map → get-query-parts.mjs.map} +0 -0
  404. /package/build-module/queried-data/{index.js.map → index.mjs.map} +0 -0
  405. /package/build-module/queried-data/{reducer.js.map → reducer.mjs.map} +0 -0
  406. /package/build-module/queried-data/{selectors.js.map → selectors.mjs.map} +0 -0
  407. /package/build-module/{resolvers.js.map → resolvers.mjs.map} +0 -0
  408. /package/build-module/{sync.js.map → sync.mjs.map} +0 -0
  409. /package/build-module/{types.js.map → types.mjs.map} +0 -0
  410. /package/build-module/utils/{forward-resolver.js.map → forward-resolver.mjs.map} +0 -0
  411. /package/build-module/utils/{get-nested-value.js.map → get-nested-value.mjs.map} +0 -0
  412. /package/build-module/utils/{get-normalized-comma-separable.js.map → get-normalized-comma-separable.mjs.map} +0 -0
  413. /package/build-module/utils/{if-matching-action.js.map → if-matching-action.mjs.map} +0 -0
  414. /package/build-module/utils/{index.js.map → index.mjs.map} +0 -0
  415. /package/build-module/utils/{is-numeric-id.js.map → is-numeric-id.mjs.map} +0 -0
  416. /package/build-module/utils/{is-raw-attribute.js.map → is-raw-attribute.mjs.map} +0 -0
  417. /package/build-module/utils/{log-entity-deprecation.js.map → log-entity-deprecation.mjs.map} +0 -0
  418. /package/build-module/utils/{on-sub-key.js.map → on-sub-key.mjs.map} +0 -0
  419. /package/build-module/utils/{receive-intermediate-results.js.map → receive-intermediate-results.mjs.map} +0 -0
  420. /package/build-module/utils/{replace-action.js.map → replace-action.mjs.map} +0 -0
  421. /package/build-module/utils/{set-nested-value.js.map → set-nested-value.mjs.map} +0 -0
  422. /package/build-module/utils/{user-permissions.js.map → user-permissions.mjs.map} +0 -0
  423. /package/build-module/utils/{with-weak-map-cache.js.map → with-weak-map-cache.mjs.map} +0 -0
@@ -2,8 +2,8 @@
2
2
  import { useDispatch, useSelect } from "@wordpress/data";
3
3
  import deprecated from "@wordpress/deprecated";
4
4
  import { useMemo } from "@wordpress/element";
5
- import useQuerySelect from "./use-query-select";
6
- import { store as coreStore } from "../";
5
+ import useQuerySelect from "./use-query-select.mjs";
6
+ import { store as coreStore } from "../index.mjs";
7
7
  var EMPTY_OBJECT = {};
8
8
  function useEntityRecord(kind, name, recordId, options = { enabled: true }) {
9
9
  const { editEntityRecord, saveEditedEntityRecord } = useDispatch(coreStore);
@@ -77,4 +77,4 @@ export {
77
77
  __experimentalUseEntityRecord,
78
78
  useEntityRecord as default
79
79
  };
80
- //# sourceMappingURL=use-entity-record.js.map
80
+ //# sourceMappingURL=use-entity-record.mjs.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/hooks/use-entity-record.ts"],
4
- "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport deprecated from '@wordpress/deprecated';\nimport { useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport useQuerySelect from './use-query-select';\nimport { store as coreStore } from '../';\nimport type { Status } from './constants';\n\nexport interface EntityRecordResolution< RecordType > {\n\t/** The requested entity record */\n\trecord: RecordType | null;\n\n\t/** The edited entity record */\n\teditedRecord: Partial< RecordType >;\n\n\t/** The edits to the edited entity record */\n\tedits: Partial< RecordType >;\n\n\t/** Apply local (in-browser) edits to the edited entity record */\n\tedit: ( diff: Partial< RecordType > ) => void;\n\n\t/** Persist the edits to the server */\n\tsave: () => Promise< void >;\n\n\t/**\n\t * Is the record still being resolved?\n\t */\n\tisResolving: boolean;\n\n\t/**\n\t * Does the record have any local edits?\n\t */\n\thasEdits: boolean;\n\n\t/**\n\t * Is the record resolved by now?\n\t */\n\thasResolved: boolean;\n\n\t/** Resolution status */\n\tstatus: Status;\n}\n\nexport interface Options {\n\t/**\n\t * Whether to run the query or short-circuit and return null.\n\t *\n\t * @default true\n\t */\n\tenabled: boolean;\n}\n\nconst EMPTY_OBJECT = {};\n\n/**\n * Resolves the specified entity record.\n *\n * @since 6.1.0 Introduced in WordPress core.\n *\n * @param kind Kind of the entity, e.g. `root` or a `postType`. See rootEntitiesConfig in ../entities.ts for a list of available kinds.\n * @param name Name of the entity, e.g. `plugin` or a `post`. See rootEntitiesConfig in ../entities.ts for a list of available names.\n * @param recordId ID of the requested entity record.\n * @param options Optional hook options.\n * @example\n * ```js\n * import { useEntityRecord } from '@wordpress/core-data';\n *\n * function PageTitleDisplay( { id } ) {\n * const { record, isResolving } = useEntityRecord( 'postType', 'page', id );\n *\n * if ( isResolving ) {\n * return 'Loading...';\n * }\n *\n * return record.title;\n * }\n *\n * // Rendered in the application:\n * // <PageTitleDisplay id={ 1 } />\n * ```\n *\n * In the above example, when `PageTitleDisplay` is rendered into an\n * application, the page and the resolution details will be retrieved from\n * the store state using `getEntityRecord()`, or resolved if missing.\n *\n * @example\n * ```js\n * import { useCallback } from 'react';\n * import { useDispatch } from '@wordpress/data';\n * import { __ } from '@wordpress/i18n';\n * import { TextControl } from '@wordpress/components';\n * import { store as noticeStore } from '@wordpress/notices';\n * import { useEntityRecord } from '@wordpress/core-data';\n *\n * function PageRenameForm( { id } ) {\n * \tconst page = useEntityRecord( 'postType', 'page', id );\n * \tconst { createSuccessNotice, createErrorNotice } =\n * \t\tuseDispatch( noticeStore );\n *\n * \tconst setTitle = useCallback( ( title ) => {\n * \t\tpage.edit( { title } );\n * \t}, [ page.edit ] );\n *\n * \tif ( page.isResolving ) {\n * \t\treturn 'Loading...';\n * \t}\n *\n * \tasync function onRename( event ) {\n * \t\tevent.preventDefault();\n * \t\ttry {\n * \t\t\tawait page.save();\n * \t\t\tcreateSuccessNotice( __( 'Page renamed.' ), {\n * \t\t\t\ttype: 'snackbar',\n * \t\t\t} );\n * \t\t} catch ( error ) {\n * \t\t\tcreateErrorNotice( error.message, { type: 'snackbar' } );\n * \t\t}\n * \t}\n *\n * \treturn (\n * \t\t<form onSubmit={ onRename }>\n * \t\t\t<TextControl\n *\t\t\t\t__nextHasNoMarginBottom\n *\t\t\t\t__next40pxDefaultSize\n * \t\t\t\tlabel={ __( 'Name' ) }\n * \t\t\t\tvalue={ page.editedRecord.title }\n * \t\t\t\tonChange={ setTitle }\n * \t\t\t/>\n * \t\t\t<button type=\"submit\">{ __( 'Save' ) }</button>\n * \t\t</form>\n * \t);\n * }\n *\n * // Rendered in the application:\n * // <PageRenameForm id={ 1 } />\n * ```\n *\n * In the above example, updating and saving the page title is handled\n * via the `edit()` and `save()` mutation helpers provided by\n * `useEntityRecord()`;\n *\n * @return Entity record data.\n * @template RecordType\n */\nexport default function useEntityRecord< RecordType >(\n\tkind: string,\n\tname: string,\n\trecordId: string | number,\n\toptions: Options = { enabled: true }\n): EntityRecordResolution< RecordType > {\n\tconst { editEntityRecord, saveEditedEntityRecord } =\n\t\tuseDispatch( coreStore );\n\n\tconst mutations = useMemo(\n\t\t() => ( {\n\t\t\tedit: ( record, editOptions: any = {} ) =>\n\t\t\t\teditEntityRecord( kind, name, recordId, record, editOptions ),\n\t\t\tsave: ( saveOptions: any = {} ) =>\n\t\t\t\tsaveEditedEntityRecord( kind, name, recordId, {\n\t\t\t\t\tthrowOnError: true,\n\t\t\t\t\t...saveOptions,\n\t\t\t\t} ),\n\t\t} ),\n\t\t[ editEntityRecord, kind, name, recordId, saveEditedEntityRecord ]\n\t);\n\n\tconst { editedRecord, hasEdits, edits } = useSelect(\n\t\t( select ) => {\n\t\t\tif ( ! options.enabled ) {\n\t\t\t\treturn {\n\t\t\t\t\teditedRecord: EMPTY_OBJECT,\n\t\t\t\t\thasEdits: false,\n\t\t\t\t\tedits: EMPTY_OBJECT,\n\t\t\t\t};\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\teditedRecord: select( coreStore ).getEditedEntityRecord(\n\t\t\t\t\tkind,\n\t\t\t\t\tname,\n\t\t\t\t\trecordId\n\t\t\t\t),\n\t\t\t\thasEdits: select( coreStore ).hasEditsForEntityRecord(\n\t\t\t\t\tkind,\n\t\t\t\t\tname,\n\t\t\t\t\trecordId\n\t\t\t\t),\n\t\t\t\tedits: select( coreStore ).getEntityRecordNonTransientEdits(\n\t\t\t\t\tkind,\n\t\t\t\t\tname,\n\t\t\t\t\trecordId\n\t\t\t\t),\n\t\t\t};\n\t\t},\n\t\t[ kind, name, recordId, options.enabled ]\n\t);\n\n\tconst { data: record, ...querySelectRest } = useQuerySelect(\n\t\t( query ) => {\n\t\t\tif ( ! options.enabled ) {\n\t\t\t\treturn {\n\t\t\t\t\tdata: null,\n\t\t\t\t};\n\t\t\t}\n\t\t\treturn query( coreStore ).getEntityRecord( kind, name, recordId );\n\t\t},\n\t\t[ kind, name, recordId, options.enabled ]\n\t);\n\n\treturn {\n\t\trecord,\n\t\teditedRecord,\n\t\thasEdits,\n\t\tedits,\n\t\t...querySelectRest,\n\t\t...mutations,\n\t};\n}\n\nexport function __experimentalUseEntityRecord(\n\tkind: string,\n\tname: string,\n\trecordId: any,\n\toptions: any\n) {\n\tdeprecated( `wp.data.__experimentalUseEntityRecord`, {\n\t\talternative: 'wp.data.useEntityRecord',\n\t\tsince: '6.1',\n\t} );\n\treturn useEntityRecord( kind, name, recordId, options );\n}\n"],
5
- "mappings": ";AAGA,SAAS,aAAa,iBAAiB;AACvC,OAAO,gBAAgB;AACvB,SAAS,eAAe;AAKxB,OAAO,oBAAoB;AAC3B,SAAS,SAAS,iBAAiB;AA+CnC,IAAM,eAAe,CAAC;AA4FP,SAAR,gBACN,MACA,MACA,UACA,UAAmB,EAAE,SAAS,KAAK,GACI;AACvC,QAAM,EAAE,kBAAkB,uBAAuB,IAChD,YAAa,SAAU;AAExB,QAAM,YAAY;AAAA,IACjB,OAAQ;AAAA,MACP,MAAM,CAAEA,SAAQ,cAAmB,CAAC,MACnC,iBAAkB,MAAM,MAAM,UAAUA,SAAQ,WAAY;AAAA,MAC7D,MAAM,CAAE,cAAmB,CAAC,MAC3B,uBAAwB,MAAM,MAAM,UAAU;AAAA,QAC7C,cAAc;AAAA,QACd,GAAG;AAAA,MACJ,CAAE;AAAA,IACJ;AAAA,IACA,CAAE,kBAAkB,MAAM,MAAM,UAAU,sBAAuB;AAAA,EAClE;AAEA,QAAM,EAAE,cAAc,UAAU,MAAM,IAAI;AAAA,IACzC,CAAE,WAAY;AACb,UAAK,CAAE,QAAQ,SAAU;AACxB,eAAO;AAAA,UACN,cAAc;AAAA,UACd,UAAU;AAAA,UACV,OAAO;AAAA,QACR;AAAA,MACD;AAEA,aAAO;AAAA,QACN,cAAc,OAAQ,SAAU,EAAE;AAAA,UACjC;AAAA,UACA;AAAA,UACA;AAAA,QACD;AAAA,QACA,UAAU,OAAQ,SAAU,EAAE;AAAA,UAC7B;AAAA,UACA;AAAA,UACA;AAAA,QACD;AAAA,QACA,OAAO,OAAQ,SAAU,EAAE;AAAA,UAC1B;AAAA,UACA;AAAA,UACA;AAAA,QACD;AAAA,MACD;AAAA,IACD;AAAA,IACA,CAAE,MAAM,MAAM,UAAU,QAAQ,OAAQ;AAAA,EACzC;AAEA,QAAM,EAAE,MAAM,QAAQ,GAAG,gBAAgB,IAAI;AAAA,IAC5C,CAAE,UAAW;AACZ,UAAK,CAAE,QAAQ,SAAU;AACxB,eAAO;AAAA,UACN,MAAM;AAAA,QACP;AAAA,MACD;AACA,aAAO,MAAO,SAAU,EAAE,gBAAiB,MAAM,MAAM,QAAS;AAAA,IACjE;AAAA,IACA,CAAE,MAAM,MAAM,UAAU,QAAQ,OAAQ;AAAA,EACzC;AAEA,SAAO;AAAA,IACN;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,GAAG;AAAA,IACH,GAAG;AAAA,EACJ;AACD;AAEO,SAAS,8BACf,MACA,MACA,UACA,SACC;AACD,aAAY,yCAAyC;AAAA,IACpD,aAAa;AAAA,IACb,OAAO;AAAA,EACR,CAAE;AACF,SAAO,gBAAiB,MAAM,MAAM,UAAU,OAAQ;AACvD;",
4
+ "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport deprecated from '@wordpress/deprecated';\nimport { useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport useQuerySelect from './use-query-select';\nimport { store as coreStore } from '../';\nimport type { Status } from './constants';\n\nexport interface EntityRecordResolution< RecordType > {\n\t/** The requested entity record */\n\trecord: RecordType | null;\n\n\t/** The edited entity record */\n\teditedRecord: Partial< RecordType >;\n\n\t/** The edits to the edited entity record */\n\tedits: Partial< RecordType >;\n\n\t/** Apply local (in-browser) edits to the edited entity record */\n\tedit: ( diff: Partial< RecordType > ) => void;\n\n\t/** Persist the edits to the server */\n\tsave: () => Promise< void >;\n\n\t/**\n\t * Is the record still being resolved?\n\t */\n\tisResolving: boolean;\n\n\t/**\n\t * Does the record have any local edits?\n\t */\n\thasEdits: boolean;\n\n\t/**\n\t * Is the record resolved by now?\n\t */\n\thasResolved: boolean;\n\n\t/** Resolution status */\n\tstatus: Status;\n}\n\nexport interface Options {\n\t/**\n\t * Whether to run the query or short-circuit and return null.\n\t *\n\t * @default true\n\t */\n\tenabled: boolean;\n}\n\nconst EMPTY_OBJECT = {};\n\n/**\n * Resolves the specified entity record.\n *\n * @since 6.1.0 Introduced in WordPress core.\n *\n * @param kind Kind of the entity, e.g. `root` or a `postType`. See rootEntitiesConfig in ../entities.ts for a list of available kinds.\n * @param name Name of the entity, e.g. `plugin` or a `post`. See rootEntitiesConfig in ../entities.ts for a list of available names.\n * @param recordId ID of the requested entity record.\n * @param options Optional hook options.\n * @example\n * ```js\n * import { useEntityRecord } from '@wordpress/core-data';\n *\n * function PageTitleDisplay( { id } ) {\n * const { record, isResolving } = useEntityRecord( 'postType', 'page', id );\n *\n * if ( isResolving ) {\n * return 'Loading...';\n * }\n *\n * return record.title;\n * }\n *\n * // Rendered in the application:\n * // <PageTitleDisplay id={ 1 } />\n * ```\n *\n * In the above example, when `PageTitleDisplay` is rendered into an\n * application, the page and the resolution details will be retrieved from\n * the store state using `getEntityRecord()`, or resolved if missing.\n *\n * @example\n * ```js\n * import { useCallback } from 'react';\n * import { useDispatch } from '@wordpress/data';\n * import { __ } from '@wordpress/i18n';\n * import { TextControl } from '@wordpress/components';\n * import { store as noticeStore } from '@wordpress/notices';\n * import { useEntityRecord } from '@wordpress/core-data';\n *\n * function PageRenameForm( { id } ) {\n * \tconst page = useEntityRecord( 'postType', 'page', id );\n * \tconst { createSuccessNotice, createErrorNotice } =\n * \t\tuseDispatch( noticeStore );\n *\n * \tconst setTitle = useCallback( ( title ) => {\n * \t\tpage.edit( { title } );\n * \t}, [ page.edit ] );\n *\n * \tif ( page.isResolving ) {\n * \t\treturn 'Loading...';\n * \t}\n *\n * \tasync function onRename( event ) {\n * \t\tevent.preventDefault();\n * \t\ttry {\n * \t\t\tawait page.save();\n * \t\t\tcreateSuccessNotice( __( 'Page renamed.' ), {\n * \t\t\t\ttype: 'snackbar',\n * \t\t\t} );\n * \t\t} catch ( error ) {\n * \t\t\tcreateErrorNotice( error.message, { type: 'snackbar' } );\n * \t\t}\n * \t}\n *\n * \treturn (\n * \t\t<form onSubmit={ onRename }>\n * \t\t\t<TextControl\n *\t\t\t\t__next40pxDefaultSize\n * \t\t\t\tlabel={ __( 'Name' ) }\n * \t\t\t\tvalue={ page.editedRecord.title }\n * \t\t\t\tonChange={ setTitle }\n * \t\t\t/>\n * \t\t\t<button type=\"submit\">{ __( 'Save' ) }</button>\n * \t\t</form>\n * \t);\n * }\n *\n * // Rendered in the application:\n * // <PageRenameForm id={ 1 } />\n * ```\n *\n * In the above example, updating and saving the page title is handled\n * via the `edit()` and `save()` mutation helpers provided by\n * `useEntityRecord()`;\n *\n * @return Entity record data.\n * @template RecordType\n */\nexport default function useEntityRecord< RecordType >(\n\tkind: string,\n\tname: string,\n\trecordId: string | number,\n\toptions: Options = { enabled: true }\n): EntityRecordResolution< RecordType > {\n\tconst { editEntityRecord, saveEditedEntityRecord } =\n\t\tuseDispatch( coreStore );\n\n\tconst mutations = useMemo(\n\t\t() => ( {\n\t\t\tedit: ( record, editOptions: any = {} ) =>\n\t\t\t\teditEntityRecord( kind, name, recordId, record, editOptions ),\n\t\t\tsave: ( saveOptions: any = {} ) =>\n\t\t\t\tsaveEditedEntityRecord( kind, name, recordId, {\n\t\t\t\t\tthrowOnError: true,\n\t\t\t\t\t...saveOptions,\n\t\t\t\t} ),\n\t\t} ),\n\t\t[ editEntityRecord, kind, name, recordId, saveEditedEntityRecord ]\n\t);\n\n\tconst { editedRecord, hasEdits, edits } = useSelect(\n\t\t( select ) => {\n\t\t\tif ( ! options.enabled ) {\n\t\t\t\treturn {\n\t\t\t\t\teditedRecord: EMPTY_OBJECT,\n\t\t\t\t\thasEdits: false,\n\t\t\t\t\tedits: EMPTY_OBJECT,\n\t\t\t\t};\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\teditedRecord: select( coreStore ).getEditedEntityRecord(\n\t\t\t\t\tkind,\n\t\t\t\t\tname,\n\t\t\t\t\trecordId\n\t\t\t\t),\n\t\t\t\thasEdits: select( coreStore ).hasEditsForEntityRecord(\n\t\t\t\t\tkind,\n\t\t\t\t\tname,\n\t\t\t\t\trecordId\n\t\t\t\t),\n\t\t\t\tedits: select( coreStore ).getEntityRecordNonTransientEdits(\n\t\t\t\t\tkind,\n\t\t\t\t\tname,\n\t\t\t\t\trecordId\n\t\t\t\t),\n\t\t\t};\n\t\t},\n\t\t[ kind, name, recordId, options.enabled ]\n\t);\n\n\tconst { data: record, ...querySelectRest } = useQuerySelect(\n\t\t( query ) => {\n\t\t\tif ( ! options.enabled ) {\n\t\t\t\treturn {\n\t\t\t\t\tdata: null,\n\t\t\t\t};\n\t\t\t}\n\t\t\treturn query( coreStore ).getEntityRecord( kind, name, recordId );\n\t\t},\n\t\t[ kind, name, recordId, options.enabled ]\n\t);\n\n\treturn {\n\t\trecord,\n\t\teditedRecord,\n\t\thasEdits,\n\t\tedits,\n\t\t...querySelectRest,\n\t\t...mutations,\n\t};\n}\n\nexport function __experimentalUseEntityRecord(\n\tkind: string,\n\tname: string,\n\trecordId: any,\n\toptions: any\n) {\n\tdeprecated( `wp.data.__experimentalUseEntityRecord`, {\n\t\talternative: 'wp.data.useEntityRecord',\n\t\tsince: '6.1',\n\t} );\n\treturn useEntityRecord( kind, name, recordId, options );\n}\n"],
5
+ "mappings": ";AAGA,SAAS,aAAa,iBAAiB;AACvC,OAAO,gBAAgB;AACvB,SAAS,eAAe;AAKxB,OAAO,oBAAoB;AAC3B,SAAS,SAAS,iBAAiB;AA+CnC,IAAM,eAAe,CAAC;AA2FP,SAAR,gBACN,MACA,MACA,UACA,UAAmB,EAAE,SAAS,KAAK,GACI;AACvC,QAAM,EAAE,kBAAkB,uBAAuB,IAChD,YAAa,SAAU;AAExB,QAAM,YAAY;AAAA,IACjB,OAAQ;AAAA,MACP,MAAM,CAAEA,SAAQ,cAAmB,CAAC,MACnC,iBAAkB,MAAM,MAAM,UAAUA,SAAQ,WAAY;AAAA,MAC7D,MAAM,CAAE,cAAmB,CAAC,MAC3B,uBAAwB,MAAM,MAAM,UAAU;AAAA,QAC7C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 @@ import { addQueryArgs } from "@wordpress/url";
3
3
  import deprecated from "@wordpress/deprecated";
4
4
  import { useSelect } from "@wordpress/data";
5
5
  import { useMemo } from "@wordpress/element";
6
- import useQuerySelect from "./use-query-select";
7
- import { store as coreStore } from "../";
8
- import { unlock } from "../lock-unlock";
9
- import { getNormalizedCommaSeparable } from "../utils";
6
+ import useQuerySelect from "./use-query-select.mjs";
7
+ import { store as coreStore } from "../index.mjs";
8
+ import { unlock } from "../lock-unlock.mjs";
9
+ import { getNormalizedCommaSeparable } from "../utils/index.mjs";
10
10
  var EMPTY_ARRAY = [];
11
11
  function useEntityRecords(kind, name, queryArgs = {}, options = { enabled: true }) {
12
12
  const queryAsString = addQueryArgs("", queryArgs);
@@ -114,4 +114,4 @@ export {
114
114
  useEntityRecords as default,
115
115
  useEntityRecordsWithPermissions
116
116
  };
117
- //# sourceMappingURL=use-entity-records.js.map
117
+ //# sourceMappingURL=use-entity-records.mjs.map
@@ -1,7 +1,7 @@
1
1
  // packages/core-data/src/hooks/use-query-select.ts
2
2
  import { useSelect } from "@wordpress/data";
3
- import memoize from "./memoize";
4
- import { Status } from "./constants";
3
+ import memoize from "./memoize.mjs";
4
+ import { Status } from "./constants.mjs";
5
5
  var META_SELECTORS = [
6
6
  "getIsResolving",
7
7
  "hasStartedResolution",
@@ -59,4 +59,4 @@ export {
59
59
  META_SELECTORS,
60
60
  useQuerySelect as default
61
61
  };
62
- //# sourceMappingURL=use-query-select.js.map
62
+ //# sourceMappingURL=use-query-select.mjs.map
@@ -1,9 +1,9 @@
1
1
  // packages/core-data/src/hooks/use-resource-permissions.ts
2
2
  import deprecated from "@wordpress/deprecated";
3
3
  import warning from "@wordpress/warning";
4
- import { store as coreStore } from "../";
5
- import { Status } from "./constants";
6
- import useQuerySelect from "./use-query-select";
4
+ import { store as coreStore } from "../index.mjs";
5
+ import { Status } from "./constants.mjs";
6
+ import useQuerySelect from "./use-query-select.mjs";
7
7
  function useResourcePermissions(resource, id) {
8
8
  const isEntity = typeof resource === "object";
9
9
  const resourceAsString = isEntity ? JSON.stringify(resource) : resource;
@@ -74,4 +74,4 @@ export {
74
74
  __experimentalUseResourcePermissions,
75
75
  use_resource_permissions_default as default
76
76
  };
77
- //# sourceMappingURL=use-resource-permissions.js.map
77
+ //# sourceMappingURL=use-resource-permissions.mjs.map
@@ -1,27 +1,27 @@
1
1
  // packages/core-data/src/index.js
2
2
  import { createReduxStore, register } from "@wordpress/data";
3
- import reducer from "./reducer";
4
- import * as selectors from "./selectors";
5
- import * as privateSelectors from "./private-selectors";
6
- import * as actions from "./actions";
7
- import * as privateActions from "./private-actions";
8
- import * as resolvers from "./resolvers";
9
- import createLocksActions from "./locks/actions";
3
+ import reducer from "./reducer.mjs";
4
+ import * as selectors from "./selectors.mjs";
5
+ import * as privateSelectors from "./private-selectors.mjs";
6
+ import * as actions from "./actions.mjs";
7
+ import * as privateActions from "./private-actions.mjs";
8
+ import * as resolvers from "./resolvers.mjs";
9
+ import createLocksActions from "./locks/actions.mjs";
10
10
  import {
11
11
  rootEntitiesConfig,
12
12
  additionalEntityConfigLoaders,
13
13
  getMethodName
14
- } from "./entities";
15
- import { STORE_NAME } from "./name";
16
- import { unlock } from "./lock-unlock";
17
- import { dynamicActions, dynamicSelectors } from "./dynamic-entities";
18
- import logEntityDeprecation from "./utils/log-entity-deprecation";
19
- import { default as default2 } from "./entity-provider";
20
- export * from "./entity-provider";
21
- export * from "./entity-types";
22
- export * from "./fetch";
23
- export * from "./hooks";
24
- export * from "./private-apis";
14
+ } from "./entities.mjs";
15
+ import { STORE_NAME } from "./name.mjs";
16
+ import { unlock } from "./lock-unlock.mjs";
17
+ import { dynamicActions, dynamicSelectors } from "./dynamic-entities.mjs";
18
+ import logEntityDeprecation from "./utils/log-entity-deprecation.mjs";
19
+ import { default as default2 } from "./entity-provider.mjs";
20
+ export * from "./entity-provider.mjs";
21
+ export * from "./entity-types/index.mjs";
22
+ export * from "./fetch/index.mjs";
23
+ export * from "./hooks/index.mjs";
24
+ export * from "./private-apis.mjs";
25
25
  var entitiesConfig = [
26
26
  ...rootEntitiesConfig,
27
27
  ...additionalEntityConfigLoaders.filter((config) => !!config.name)
@@ -114,4 +114,4 @@ export {
114
114
  default2 as EntityProvider,
115
115
  store
116
116
  };
117
- //# sourceMappingURL=index.js.map
117
+ //# sourceMappingURL=index.mjs.map
@@ -8,4 +8,4 @@ export {
8
8
  lock,
9
9
  unlock
10
10
  };
11
- //# sourceMappingURL=lock-unlock.js.map
11
+ //# sourceMappingURL=lock-unlock.mjs.map
@@ -1,5 +1,5 @@
1
1
  // packages/core-data/src/locks/actions.js
2
- import createLocks from "./engine";
2
+ import createLocks from "./engine.mjs";
3
3
  function createLocksActions() {
4
4
  const locks = createLocks();
5
5
  function __unstableAcquireStoreLock(store, path, { exclusive }) {
@@ -13,4 +13,4 @@ function createLocksActions() {
13
13
  export {
14
14
  createLocksActions as default
15
15
  };
16
- //# sourceMappingURL=actions.js.map
16
+ //# sourceMappingURL=actions.mjs.map
@@ -1,6 +1,6 @@
1
1
  // packages/core-data/src/locks/engine.js
2
- import reducer from "./reducer";
3
- import { isLockAvailable, getPendingLockRequests } from "./selectors";
2
+ import reducer from "./reducer.mjs";
3
+ import { isLockAvailable, getPendingLockRequests } from "./selectors.mjs";
4
4
  function createLocks() {
5
5
  let state = reducer(void 0, { type: "@@INIT" });
6
6
  function processPendingLockRequests() {
@@ -38,4 +38,4 @@ function createLocks() {
38
38
  export {
39
39
  createLocks as default
40
40
  };
41
- //# sourceMappingURL=engine.js.map
41
+ //# sourceMappingURL=engine.mjs.map
@@ -1,5 +1,5 @@
1
1
  // packages/core-data/src/locks/reducer.js
2
- import { getNode, deepCopyLocksTreePath } from "./utils";
2
+ import { getNode, deepCopyLocksTreePath } from "./utils.mjs";
3
3
  var DEFAULT_STATE = {
4
4
  requests: [],
5
5
  tree: {
@@ -46,4 +46,4 @@ function locks(state = DEFAULT_STATE, action) {
46
46
  export {
47
47
  locks as default
48
48
  };
49
- //# sourceMappingURL=reducer.js.map
49
+ //# sourceMappingURL=reducer.mjs.map
@@ -4,7 +4,7 @@ import {
4
4
  iteratePath,
5
5
  hasConflictingLock,
6
6
  getNode
7
- } from "./utils";
7
+ } from "./utils.mjs";
8
8
  function getPendingLockRequests(state) {
9
9
  return state.requests;
10
10
  }
@@ -31,4 +31,4 @@ export {
31
31
  getPendingLockRequests,
32
32
  isLockAvailable
33
33
  };
34
- //# sourceMappingURL=selectors.js.map
34
+ //# sourceMappingURL=selectors.mjs.map
@@ -62,4 +62,4 @@ export {
62
62
  iterateDescendants,
63
63
  iteratePath
64
64
  };
65
- //# sourceMappingURL=utils.js.map
65
+ //# sourceMappingURL=utils.mjs.map
@@ -3,4 +3,4 @@ var STORE_NAME = "core";
3
3
  export {
4
4
  STORE_NAME
5
5
  };
6
- //# sourceMappingURL=name.js.map
6
+ //# sourceMappingURL=name.mjs.map
@@ -1,6 +1,6 @@
1
1
  // packages/core-data/src/private-actions.js
2
2
  import apiFetch from "@wordpress/api-fetch";
3
- import { STORE_NAME } from "./name";
3
+ import { STORE_NAME } from "./name.mjs";
4
4
  function receiveRegisteredPostMeta(postType, registeredPostMeta) {
5
5
  return {
6
6
  type: "RECEIVE_REGISTERED_POST_META",
@@ -94,4 +94,4 @@ export {
94
94
  receiveEditorSettings,
95
95
  receiveRegisteredPostMeta
96
96
  };
97
- //# sourceMappingURL=private-actions.js.map
97
+ //# sourceMappingURL=private-actions.mjs.map
@@ -1,7 +1,7 @@
1
1
  // packages/core-data/src/private-apis.js
2
- import { useEntityRecordsWithPermissions } from "./hooks/use-entity-records";
3
- import { RECEIVE_INTERMEDIATE_RESULTS } from "./utils";
4
- import { lock } from "./lock-unlock";
2
+ import { useEntityRecordsWithPermissions } from "./hooks/use-entity-records.mjs";
3
+ import { RECEIVE_INTERMEDIATE_RESULTS } from "./utils/index.mjs";
4
+ import { lock } from "./lock-unlock.mjs";
5
5
  var privateApis = {};
6
6
  lock(privateApis, {
7
7
  useEntityRecordsWithPermissions,
@@ -10,4 +10,4 @@ lock(privateApis, {
10
10
  export {
11
11
  privateApis
12
12
  };
13
- //# sourceMappingURL=private-apis.js.map
13
+ //# sourceMappingURL=private-apis.mjs.map
@@ -1,10 +1,10 @@
1
1
  // packages/core-data/src/private-selectors.ts
2
2
  import { createSelector, createRegistrySelector } from "@wordpress/data";
3
- import { getDefaultTemplateId, getEntityRecord } from "./selectors";
4
- import { STORE_NAME } from "./name";
5
- import { unlock } from "./lock-unlock";
6
- import { getSyncManager } from "./sync";
7
- import logEntityDeprecation from "./utils/log-entity-deprecation";
3
+ import { getDefaultTemplateId, getEntityRecord } from "./selectors.mjs";
4
+ import { STORE_NAME } from "./name.mjs";
5
+ import { unlock } from "./lock-unlock.mjs";
6
+ import { getSyncManager } from "./sync.mjs";
7
+ import logEntityDeprecation from "./utils/log-entity-deprecation.mjs";
8
8
  function getUndoManager(state) {
9
9
  if (window.__experimentalEnableSync) {
10
10
  if (globalThis.IS_GUTENBERG_PLUGIN) {
@@ -177,4 +177,4 @@ export {
177
177
  getTemplateId,
178
178
  getUndoManager
179
179
  };
180
- //# sourceMappingURL=private-selectors.js.map
180
+ //# sourceMappingURL=private-selectors.mjs.map
@@ -27,4 +27,4 @@ export {
27
27
  receiveQueriedItems,
28
28
  removeItems
29
29
  };
30
- //# sourceMappingURL=actions.js.map
30
+ //# sourceMappingURL=actions.mjs.map
@@ -1,6 +1,6 @@
1
1
  // packages/core-data/src/queried-data/get-query-parts.js
2
2
  import { addQueryArgs } from "@wordpress/url";
3
- import { withWeakMapCache, getNormalizedCommaSeparable } from "../utils";
3
+ import { withWeakMapCache, getNormalizedCommaSeparable } from "../utils/index.mjs";
4
4
  function getQueryParts(query) {
5
5
  const parts = {
6
6
  stableKey: "",
@@ -46,4 +46,4 @@ export {
46
46
  get_query_parts_default as default,
47
47
  getQueryParts
48
48
  };
49
- //# sourceMappingURL=get-query-parts.js.map
49
+ //# sourceMappingURL=get-query-parts.mjs.map
@@ -0,0 +1,8 @@
1
+ // packages/core-data/src/queried-data/index.js
2
+ export * from "./actions.mjs";
3
+ export * from "./selectors.mjs";
4
+ import { default as default2 } from "./reducer.mjs";
5
+ export {
6
+ default2 as reducer
7
+ };
8
+ //# sourceMappingURL=index.mjs.map
@@ -6,9 +6,9 @@ import {
6
6
  ifMatchingAction,
7
7
  replaceAction,
8
8
  onSubKey
9
- } from "../utils";
10
- import { DEFAULT_ENTITY_KEY } from "../entities";
11
- import getQueryParts from "./get-query-parts";
9
+ } from "../utils/index.mjs";
10
+ import { DEFAULT_ENTITY_KEY } from "../entities.mjs";
11
+ import getQueryParts from "./get-query-parts.mjs";
12
12
  function getContextFromAction(action) {
13
13
  const { query } = action;
14
14
  if (!query) {
@@ -182,4 +182,4 @@ export {
182
182
  itemIsComplete,
183
183
  items
184
184
  };
185
- //# sourceMappingURL=reducer.js.map
185
+ //# sourceMappingURL=reducer.mjs.map
@@ -1,8 +1,8 @@
1
1
  // packages/core-data/src/queried-data/selectors.js
2
2
  import EquivalentKeyMap from "equivalent-key-map";
3
3
  import { createSelector } from "@wordpress/data";
4
- import getQueryParts from "./get-query-parts";
5
- import { setNestedValue } from "../utils";
4
+ import getQueryParts from "./get-query-parts.mjs";
5
+ import { setNestedValue } from "../utils/index.mjs";
6
6
  var queriedItemsCacheByState = /* @__PURE__ */ new WeakMap();
7
7
  function getQueriedItemsUncached(state, query) {
8
8
  const { stableKey, page, perPage, include, fields, context } = getQueryParts(query);
@@ -77,4 +77,4 @@ export {
77
77
  getQueriedTotalItems,
78
78
  getQueriedTotalPages
79
79
  };
80
- //# sourceMappingURL=selectors.js.map
80
+ //# sourceMappingURL=selectors.mjs.map
@@ -1,11 +1,11 @@
1
1
  // packages/core-data/src/reducer.js
2
- import fastDeepEqual from "fast-deep-equal/es6";
2
+ import fastDeepEqual from "fast-deep-equal/es6/index.js";
3
3
  import { compose } from "@wordpress/compose";
4
4
  import { combineReducers } from "@wordpress/data";
5
5
  import { createUndoManager } from "@wordpress/undo-manager";
6
- import { ifMatchingAction, replaceAction } from "./utils";
7
- import { reducer as queriedDataReducer } from "./queried-data";
8
- import { rootEntitiesConfig, DEFAULT_ENTITY_KEY } from "./entities";
6
+ import { ifMatchingAction, replaceAction } from "./utils/index.mjs";
7
+ import { reducer as queriedDataReducer } from "./queried-data/index.mjs";
8
+ import { rootEntitiesConfig, DEFAULT_ENTITY_KEY } from "./entities.mjs";
9
9
  function users(state = { byId: {}, queries: {} }, action) {
10
10
  switch (action.type) {
11
11
  case "RECEIVE_USER_QUERY":
@@ -446,4 +446,4 @@ export {
446
446
  userPermissions,
447
447
  users
448
448
  };
449
- //# sourceMappingURL=reducer.js.map
449
+ //# sourceMappingURL=reducer.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/reducer.js"],
4
+ "sourcesContent": ["/**\n * External dependencies\n */\nimport fastDeepEqual from 'fast-deep-equal/es6/index.js';\n\n/**\n * WordPress dependencies\n */\nimport { compose } from '@wordpress/compose';\nimport { combineReducers } from '@wordpress/data';\nimport { createUndoManager } from '@wordpress/undo-manager';\n\n/**\n * Internal dependencies\n */\nimport { ifMatchingAction, replaceAction } from './utils';\nimport { reducer as queriedDataReducer } from './queried-data';\nimport { rootEntitiesConfig, DEFAULT_ENTITY_KEY } from './entities';\n\n/** @typedef {import('./types').AnyFunction} AnyFunction */\n\n/**\n * Reducer managing authors state. Keyed by id.\n *\n * @param {Object} state Current state.\n * @param {Object} action Dispatched action.\n *\n * @return {Object} Updated state.\n */\nexport function users( state = { byId: {}, queries: {} }, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'RECEIVE_USER_QUERY':\n\t\t\treturn {\n\t\t\t\tbyId: {\n\t\t\t\t\t...state.byId,\n\t\t\t\t\t// Key users by their ID.\n\t\t\t\t\t...action.users.reduce(\n\t\t\t\t\t\t( newUsers, user ) => ( {\n\t\t\t\t\t\t\t...newUsers,\n\t\t\t\t\t\t\t[ user.id ]: user,\n\t\t\t\t\t\t} ),\n\t\t\t\t\t\t{}\n\t\t\t\t\t),\n\t\t\t\t},\n\t\t\t\tqueries: {\n\t\t\t\t\t...state.queries,\n\t\t\t\t\t[ action.queryID ]: action.users.map( ( user ) => user.id ),\n\t\t\t\t},\n\t\t\t};\n\t}\n\n\treturn state;\n}\n\n/**\n * Reducer managing current user state.\n *\n * @param {Object} state Current state.\n * @param {Object} action Dispatched action.\n *\n * @return {Object} Updated state.\n */\nexport function currentUser( state = {}, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'RECEIVE_CURRENT_USER':\n\t\t\treturn action.currentUser;\n\t}\n\n\treturn state;\n}\n\n/**\n * Reducer managing the current theme.\n *\n * @param {string|undefined} state Current state.\n * @param {Object} action Dispatched action.\n *\n * @return {string|undefined} Updated state.\n */\nexport function currentTheme( state = undefined, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'RECEIVE_CURRENT_THEME':\n\t\t\treturn action.currentTheme.stylesheet;\n\t}\n\n\treturn state;\n}\n\n/**\n * Reducer managing the current global styles id.\n *\n * @param {string|undefined} state Current state.\n * @param {Object} action Dispatched action.\n *\n * @return {string|undefined} Updated state.\n */\nexport function currentGlobalStylesId( state = undefined, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'RECEIVE_CURRENT_GLOBAL_STYLES_ID':\n\t\t\treturn action.id;\n\t}\n\n\treturn state;\n}\n\n/**\n * Reducer managing the theme base global styles.\n *\n * @param {Record<string, object>} state Current state.\n * @param {Object} action Dispatched action.\n *\n * @return {Record<string, object>} Updated state.\n */\nexport function themeBaseGlobalStyles( state = {}, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'RECEIVE_THEME_GLOBAL_STYLES':\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\t[ action.stylesheet ]: action.globalStyles,\n\t\t\t};\n\t}\n\n\treturn state;\n}\n\n/**\n * Reducer managing the theme global styles variations.\n *\n * @param {Record<string, object>} state Current state.\n * @param {Object} action Dispatched action.\n *\n * @return {Record<string, object>} Updated state.\n */\nexport function themeGlobalStyleVariations( state = {}, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'RECEIVE_THEME_GLOBAL_STYLE_VARIATIONS':\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\t[ action.stylesheet ]: action.variations,\n\t\t\t};\n\t}\n\n\treturn state;\n}\n\nconst withMultiEntityRecordEdits = ( reducer ) => ( state, action ) => {\n\tif ( action.type === 'UNDO' || action.type === 'REDO' ) {\n\t\tconst { record } = action;\n\n\t\tlet newState = state;\n\t\trecord.forEach( ( { id: { kind, name, recordId }, changes } ) => {\n\t\t\tnewState = reducer( newState, {\n\t\t\t\ttype: 'EDIT_ENTITY_RECORD',\n\t\t\t\tkind,\n\t\t\t\tname,\n\t\t\t\trecordId,\n\t\t\t\tedits: Object.entries( changes ).reduce(\n\t\t\t\t\t( acc, [ key, value ] ) => {\n\t\t\t\t\t\tacc[ key ] =\n\t\t\t\t\t\t\taction.type === 'UNDO' ? value.from : value.to;\n\t\t\t\t\t\treturn acc;\n\t\t\t\t\t},\n\t\t\t\t\t{}\n\t\t\t\t),\n\t\t\t} );\n\t\t} );\n\t\treturn newState;\n\t}\n\n\treturn reducer( state, action );\n};\n\n/**\n * Higher Order Reducer for a given entity config. It supports:\n *\n * - Fetching\n * - Editing\n * - Saving\n *\n * @param {Object} entityConfig Entity config.\n *\n * @return {AnyFunction} Reducer.\n */\nfunction entity( entityConfig ) {\n\treturn compose( [\n\t\twithMultiEntityRecordEdits,\n\n\t\t// Limit to matching action type so we don't attempt to replace action on\n\t\t// an unhandled action.\n\t\tifMatchingAction(\n\t\t\t( action ) =>\n\t\t\t\taction.name &&\n\t\t\t\taction.kind &&\n\t\t\t\taction.name === entityConfig.name &&\n\t\t\t\taction.kind === entityConfig.kind\n\t\t),\n\n\t\t// Inject the entity config into the action.\n\t\treplaceAction( ( action ) => {\n\t\t\treturn {\n\t\t\t\tkey: entityConfig.key || DEFAULT_ENTITY_KEY,\n\t\t\t\t...action,\n\t\t\t};\n\t\t} ),\n\t] )(\n\t\tcombineReducers( {\n\t\t\tqueriedData: queriedDataReducer,\n\t\t\tedits: ( state = {}, action ) => {\n\t\t\t\tswitch ( action.type ) {\n\t\t\t\t\tcase 'RECEIVE_ITEMS':\n\t\t\t\t\t\tconst context = action?.query?.context ?? 'default';\n\t\t\t\t\t\tif ( context !== 'default' ) {\n\t\t\t\t\t\t\treturn state;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tconst nextState = { ...state };\n\n\t\t\t\t\t\tfor ( const record of action.items ) {\n\t\t\t\t\t\t\tconst recordId = record?.[ action.key ];\n\t\t\t\t\t\t\tconst edits = nextState[ recordId ];\n\t\t\t\t\t\t\tif ( ! edits ) {\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tconst nextEdits = Object.keys( edits ).reduce(\n\t\t\t\t\t\t\t\t( acc, key ) => {\n\t\t\t\t\t\t\t\t\t// If the edited value is still different to the persisted value,\n\t\t\t\t\t\t\t\t\t// keep the edited value in edits.\n\t\t\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t\t\t// Edits are the \"raw\" attribute values, but records may have\n\t\t\t\t\t\t\t\t\t\t// objects with more properties, so we use `get` here for the\n\t\t\t\t\t\t\t\t\t\t// comparison.\n\t\t\t\t\t\t\t\t\t\t! fastDeepEqual(\n\t\t\t\t\t\t\t\t\t\t\tedits[ key ],\n\t\t\t\t\t\t\t\t\t\t\trecord[ key ]?.raw ?? record[ key ]\n\t\t\t\t\t\t\t\t\t\t) &&\n\t\t\t\t\t\t\t\t\t\t// Sometimes the server alters the sent value which means\n\t\t\t\t\t\t\t\t\t\t// we need to also remove the edits before the api request.\n\t\t\t\t\t\t\t\t\t\t( ! action.persistedEdits ||\n\t\t\t\t\t\t\t\t\t\t\t! fastDeepEqual(\n\t\t\t\t\t\t\t\t\t\t\t\tedits[ key ],\n\t\t\t\t\t\t\t\t\t\t\t\taction.persistedEdits[ key ]\n\t\t\t\t\t\t\t\t\t\t\t) )\n\t\t\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t\t\tacc[ key ] = edits[ key ];\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\treturn acc;\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t{}\n\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\tif ( Object.keys( nextEdits ).length ) {\n\t\t\t\t\t\t\t\tnextState[ recordId ] = nextEdits;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tdelete nextState[ recordId ];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn nextState;\n\n\t\t\t\t\tcase 'EDIT_ENTITY_RECORD':\n\t\t\t\t\t\tconst nextEdits = {\n\t\t\t\t\t\t\t...state[ action.recordId ],\n\t\t\t\t\t\t\t...action.edits,\n\t\t\t\t\t\t};\n\t\t\t\t\t\tObject.keys( nextEdits ).forEach( ( key ) => {\n\t\t\t\t\t\t\t// Delete cleared edits so that the properties\n\t\t\t\t\t\t\t// are not considered dirty.\n\t\t\t\t\t\t\tif ( nextEdits[ key ] === undefined ) {\n\t\t\t\t\t\t\t\tdelete nextEdits[ key ];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} );\n\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t...state,\n\t\t\t\t\t\t\t[ action.recordId ]: nextEdits,\n\t\t\t\t\t\t};\n\t\t\t\t}\n\n\t\t\t\treturn state;\n\t\t\t},\n\n\t\t\tsaving: ( state = {}, action ) => {\n\t\t\t\tswitch ( action.type ) {\n\t\t\t\t\tcase 'SAVE_ENTITY_RECORD_START':\n\t\t\t\t\tcase 'SAVE_ENTITY_RECORD_FINISH':\n\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t...state,\n\t\t\t\t\t\t\t[ action.recordId ]: {\n\t\t\t\t\t\t\t\tpending:\n\t\t\t\t\t\t\t\t\taction.type === 'SAVE_ENTITY_RECORD_START',\n\t\t\t\t\t\t\t\terror: action.error,\n\t\t\t\t\t\t\t\tisAutosave: action.isAutosave,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t};\n\t\t\t\t}\n\n\t\t\t\treturn state;\n\t\t\t},\n\n\t\t\tdeleting: ( state = {}, action ) => {\n\t\t\t\tswitch ( action.type ) {\n\t\t\t\t\tcase 'DELETE_ENTITY_RECORD_START':\n\t\t\t\t\tcase 'DELETE_ENTITY_RECORD_FINISH':\n\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t...state,\n\t\t\t\t\t\t\t[ action.recordId ]: {\n\t\t\t\t\t\t\t\tpending:\n\t\t\t\t\t\t\t\t\taction.type ===\n\t\t\t\t\t\t\t\t\t'DELETE_ENTITY_RECORD_START',\n\t\t\t\t\t\t\t\terror: action.error,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t};\n\t\t\t\t}\n\n\t\t\t\treturn state;\n\t\t\t},\n\n\t\t\trevisions: ( state = {}, action ) => {\n\t\t\t\t// Use the same queriedDataReducer shape for revisions.\n\t\t\t\tif ( action.type === 'RECEIVE_ITEM_REVISIONS' ) {\n\t\t\t\t\tconst recordKey = action.recordKey;\n\t\t\t\t\tdelete action.recordKey;\n\t\t\t\t\tconst newState = queriedDataReducer( state[ recordKey ], {\n\t\t\t\t\t\t...action,\n\t\t\t\t\t\ttype: 'RECEIVE_ITEMS',\n\t\t\t\t\t} );\n\t\t\t\t\treturn {\n\t\t\t\t\t\t...state,\n\t\t\t\t\t\t[ recordKey ]: newState,\n\t\t\t\t\t};\n\t\t\t\t}\n\n\t\t\t\tif ( action.type === 'REMOVE_ITEMS' ) {\n\t\t\t\t\treturn Object.fromEntries(\n\t\t\t\t\t\tObject.entries( state ).filter(\n\t\t\t\t\t\t\t( [ id ] ) =>\n\t\t\t\t\t\t\t\t! action.itemIds.some( ( itemId ) => {\n\t\t\t\t\t\t\t\t\tif ( Number.isInteger( itemId ) ) {\n\t\t\t\t\t\t\t\t\t\treturn itemId === +id;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\treturn itemId === id;\n\t\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t)\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\treturn state;\n\t\t\t},\n\t\t} )\n\t);\n}\n\n/**\n * Reducer keeping track of the registered entities.\n *\n * @param {Object} state Current state.\n * @param {Object} action Dispatched action.\n *\n * @return {Object} Updated state.\n */\nexport function entitiesConfig( state = rootEntitiesConfig, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'ADD_ENTITIES':\n\t\t\treturn [ ...state, ...action.entities ];\n\t}\n\n\treturn state;\n}\n\n/**\n * Reducer keeping track of the registered entities config and data.\n *\n * @param {Object} state Current state.\n * @param {Object} action Dispatched action.\n *\n * @return {Object} Updated state.\n */\nexport const entities = ( state = {}, action ) => {\n\tconst newConfig = entitiesConfig( state.config, action );\n\n\t// Generates a reducer for the entities nested by `kind` and `name`.\n\t// A config array with shape:\n\t// ```\n\t// [\n\t// { kind: 'taxonomy', name: 'category' },\n\t// { kind: 'taxonomy', name: 'post_tag' },\n\t// { kind: 'postType', name: 'post' },\n\t// { kind: 'postType', name: 'page' },\n\t// ]\n\t// ```\n\t// generates a reducer for state tree with shape:\n\t// ```\n\t// {\n\t// taxonomy: {\n\t// category,\n\t// post_tag,\n\t// },\n\t// postType: {\n\t// post,\n\t// page,\n\t// },\n\t// }\n\t// ```\n\tlet entitiesDataReducer = state.reducer;\n\tif ( ! entitiesDataReducer || newConfig !== state.config ) {\n\t\tconst entitiesByKind = newConfig.reduce( ( acc, record ) => {\n\t\t\tconst { kind } = record;\n\t\t\tif ( ! acc[ kind ] ) {\n\t\t\t\tacc[ kind ] = [];\n\t\t\t}\n\t\t\tacc[ kind ].push( record );\n\t\t\treturn acc;\n\t\t}, {} );\n\n\t\tentitiesDataReducer = combineReducers(\n\t\t\tObject.fromEntries(\n\t\t\t\tObject.entries( entitiesByKind ).map(\n\t\t\t\t\t( [ kind, subEntities ] ) => {\n\t\t\t\t\t\tconst kindReducer = combineReducers(\n\t\t\t\t\t\t\tObject.fromEntries(\n\t\t\t\t\t\t\t\tsubEntities.map( ( entityConfig ) => [\n\t\t\t\t\t\t\t\t\tentityConfig.name,\n\t\t\t\t\t\t\t\t\tentity( entityConfig ),\n\t\t\t\t\t\t\t\t] )\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\treturn [ kind, kindReducer ];\n\t\t\t\t\t}\n\t\t\t\t)\n\t\t\t)\n\t\t);\n\t}\n\n\tconst newData = entitiesDataReducer( state.records, action );\n\n\tif (\n\t\tnewData === state.records &&\n\t\tnewConfig === state.config &&\n\t\tentitiesDataReducer === state.reducer\n\t) {\n\t\treturn state;\n\t}\n\n\treturn {\n\t\treducer: entitiesDataReducer,\n\t\trecords: newData,\n\t\tconfig: newConfig,\n\t};\n};\n\n/**\n * @type {UndoManager}\n */\nexport function undoManager( state = createUndoManager() ) {\n\treturn state;\n}\n\nexport function editsReference( state = {}, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'EDIT_ENTITY_RECORD':\n\t\tcase 'UNDO':\n\t\tcase 'REDO':\n\t\t\treturn {};\n\t}\n\treturn state;\n}\n\n/**\n * Reducer managing embed preview data.\n *\n * @param {Object} state Current state.\n * @param {Object} action Dispatched action.\n *\n * @return {Object} Updated state.\n */\nexport function embedPreviews( state = {}, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'RECEIVE_EMBED_PREVIEW':\n\t\t\tconst { url, preview } = action;\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\t[ url ]: preview,\n\t\t\t};\n\t}\n\treturn state;\n}\n\n/**\n * State which tracks whether the user can perform an action on a REST\n * resource.\n *\n * @param {Object} state Current state.\n * @param {Object} action Dispatched action.\n *\n * @return {Object} Updated state.\n */\nexport function userPermissions( state = {}, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'RECEIVE_USER_PERMISSION':\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\t[ action.key ]: action.isAllowed,\n\t\t\t};\n\t\tcase 'RECEIVE_USER_PERMISSIONS':\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\t...action.permissions,\n\t\t\t};\n\t}\n\n\treturn state;\n}\n\n/**\n * Reducer returning autosaves keyed by their parent's post id.\n *\n * @param {Object} state Current state.\n * @param {Object} action Dispatched action.\n *\n * @return {Object} Updated state.\n */\nexport function autosaves( state = {}, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'RECEIVE_AUTOSAVES':\n\t\t\tconst { postId, autosaves: autosavesData } = action;\n\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\t[ postId ]: autosavesData,\n\t\t\t};\n\t}\n\n\treturn state;\n}\n\nexport function blockPatterns( state = [], action ) {\n\tswitch ( action.type ) {\n\t\tcase 'RECEIVE_BLOCK_PATTERNS':\n\t\t\treturn action.patterns;\n\t}\n\n\treturn state;\n}\n\nexport function blockPatternCategories( state = [], action ) {\n\tswitch ( action.type ) {\n\t\tcase 'RECEIVE_BLOCK_PATTERN_CATEGORIES':\n\t\t\treturn action.categories;\n\t}\n\n\treturn state;\n}\n\nexport function userPatternCategories( state = [], action ) {\n\tswitch ( action.type ) {\n\t\tcase 'RECEIVE_USER_PATTERN_CATEGORIES':\n\t\t\treturn action.patternCategories;\n\t}\n\treturn state;\n}\n\nexport function navigationFallbackId( state = null, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'RECEIVE_NAVIGATION_FALLBACK_ID':\n\t\t\treturn action.fallbackId;\n\t}\n\n\treturn state;\n}\n\n/**\n * Reducer managing the theme global styles revisions.\n *\n * @param {Record<string, object>} state Current state.\n * @param {Object} action Dispatched action.\n *\n * @return {Record<string, object>} Updated state.\n */\nexport function themeGlobalStyleRevisions( state = {}, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'RECEIVE_THEME_GLOBAL_STYLE_REVISIONS':\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\t[ action.currentId ]: action.revisions,\n\t\t\t};\n\t}\n\n\treturn state;\n}\n\n/**\n * Reducer managing the template lookup per query.\n *\n * @param {Record<string, string>} state Current state.\n * @param {Object} action Dispatched action.\n *\n * @return {Record<string, string>} Updated state.\n */\nexport function defaultTemplates( state = {}, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'RECEIVE_DEFAULT_TEMPLATE':\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\t[ JSON.stringify( action.query ) ]: action.templateId,\n\t\t\t};\n\t}\n\n\treturn state;\n}\n\n/**\n * Reducer returning an object of registered post meta.\n *\n * @param {Object} state Current state.\n * @param {Object} action Dispatched action.\n *\n * @return {Object} Updated state.\n */\nexport function registeredPostMeta( state = {}, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'RECEIVE_REGISTERED_POST_META':\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\t[ action.postType ]: action.registeredPostMeta,\n\t\t\t};\n\t}\n\treturn state;\n}\n\n/**\n * Reducer managing editor settings.\n *\n * @param {Object} state Current state.\n * @param {Object} action Action object.\n *\n * @return {Object} Updated state.\n */\nexport function editorSettings( state = null, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'RECEIVE_EDITOR_SETTINGS':\n\t\t\treturn action.settings;\n\t}\n\treturn state;\n}\n\n/**\n * Reducer managing editor assets.\n *\n * @param {Object} state Current state.\n * @param {Object} action Action object.\n *\n * @return {Object} Updated state.\n */\nexport function editorAssets( state = null, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'RECEIVE_EDITOR_ASSETS':\n\t\t\treturn action.assets;\n\t}\n\treturn state;\n}\n\nexport default combineReducers( {\n\tusers,\n\tcurrentTheme,\n\tcurrentGlobalStylesId,\n\tcurrentUser,\n\tthemeGlobalStyleVariations,\n\tthemeBaseGlobalStyles,\n\tthemeGlobalStyleRevisions,\n\tentities,\n\teditsReference,\n\tundoManager,\n\tembedPreviews,\n\tuserPermissions,\n\tautosaves,\n\tblockPatterns,\n\tblockPatternCategories,\n\tuserPatternCategories,\n\tnavigationFallbackId,\n\tdefaultTemplates,\n\tregisteredPostMeta,\n\teditorSettings,\n\teditorAssets,\n} );\n"],
5
+ "mappings": ";AAGA,OAAO,mBAAmB;AAK1B,SAAS,eAAe;AACxB,SAAS,uBAAuB;AAChC,SAAS,yBAAyB;AAKlC,SAAS,kBAAkB,qBAAqB;AAChD,SAAS,WAAW,0BAA0B;AAC9C,SAAS,oBAAoB,0BAA0B;AAYhD,SAAS,MAAO,QAAQ,EAAE,MAAM,CAAC,GAAG,SAAS,CAAC,EAAE,GAAG,QAAS;AAClE,UAAS,OAAO,MAAO;AAAA,IACtB,KAAK;AACJ,aAAO;AAAA,QACN,MAAM;AAAA,UACL,GAAG,MAAM;AAAA;AAAA,UAET,GAAG,OAAO,MAAM;AAAA,YACf,CAAE,UAAU,UAAY;AAAA,cACvB,GAAG;AAAA,cACH,CAAE,KAAK,EAAG,GAAG;AAAA,YACd;AAAA,YACA,CAAC;AAAA,UACF;AAAA,QACD;AAAA,QACA,SAAS;AAAA,UACR,GAAG,MAAM;AAAA,UACT,CAAE,OAAO,OAAQ,GAAG,OAAO,MAAM,IAAK,CAAE,SAAU,KAAK,EAAG;AAAA,QAC3D;AAAA,MACD;AAAA,EACF;AAEA,SAAO;AACR;AAUO,SAAS,YAAa,QAAQ,CAAC,GAAG,QAAS;AACjD,UAAS,OAAO,MAAO;AAAA,IACtB,KAAK;AACJ,aAAO,OAAO;AAAA,EAChB;AAEA,SAAO;AACR;AAUO,SAAS,aAAc,QAAQ,QAAW,QAAS;AACzD,UAAS,OAAO,MAAO;AAAA,IACtB,KAAK;AACJ,aAAO,OAAO,aAAa;AAAA,EAC7B;AAEA,SAAO;AACR;AAUO,SAAS,sBAAuB,QAAQ,QAAW,QAAS;AAClE,UAAS,OAAO,MAAO;AAAA,IACtB,KAAK;AACJ,aAAO,OAAO;AAAA,EAChB;AAEA,SAAO;AACR;AAUO,SAAS,sBAAuB,QAAQ,C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BAAQ,gBAAiB;AAAA,EAC/B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD,CAAE;",
6
+ "names": ["nextEdits"]
7
+ }
@@ -3,9 +3,9 @@ import { camelCase } from "change-case";
3
3
  import { addQueryArgs } from "@wordpress/url";
4
4
  import { decodeEntities } from "@wordpress/html-entities";
5
5
  import apiFetch from "@wordpress/api-fetch";
6
- import { STORE_NAME } from "./name";
7
- import { additionalEntityConfigLoaders, DEFAULT_ENTITY_KEY } from "./entities";
8
- import { getSyncManager } from "./sync";
6
+ import { STORE_NAME } from "./name.mjs";
7
+ import { additionalEntityConfigLoaders, DEFAULT_ENTITY_KEY } from "./entities.mjs";
8
+ import { getSyncManager } from "./sync.mjs";
9
9
  import {
10
10
  forwardResolver,
11
11
  getNormalizedCommaSeparable,
@@ -14,8 +14,8 @@ import {
14
14
  ALLOWED_RESOURCE_ACTIONS,
15
15
  RECEIVE_INTERMEDIATE_RESULTS,
16
16
  isNumericID
17
- } from "./utils";
18
- import { fetchBlockPatterns } from "./fetch";
17
+ } from "./utils/index.mjs";
18
+ import { fetchBlockPatterns } from "./fetch/index.mjs";
19
19
  var getAuthors = (query) => async ({ dispatch }) => {
20
20
  const path = addQueryArgs(
21
21
  "/wp/v2/users/?who=authors&per_page=100",
@@ -776,4 +776,4 @@ export {
776
776
  getThemeSupports,
777
777
  getUserPatternCategories
778
778
  };
779
- //# sourceMappingURL=resolvers.js.map
779
+ //# sourceMappingURL=resolvers.mjs.map
@@ -2,22 +2,22 @@
2
2
  import { createSelector, createRegistrySelector } from "@wordpress/data";
3
3
  import { addQueryArgs } from "@wordpress/url";
4
4
  import deprecated from "@wordpress/deprecated";
5
- import { STORE_NAME } from "./name";
5
+ import { STORE_NAME } from "./name.mjs";
6
6
  import {
7
7
  getQueriedItems,
8
8
  getQueriedTotalItems,
9
9
  getQueriedTotalPages
10
- } from "./queried-data";
11
- import { DEFAULT_ENTITY_KEY } from "./entities";
12
- import { getUndoManager } from "./private-selectors";
10
+ } from "./queried-data/index.mjs";
11
+ import { DEFAULT_ENTITY_KEY } from "./entities.mjs";
12
+ import { getUndoManager } from "./private-selectors.mjs";
13
13
  import {
14
14
  getNormalizedCommaSeparable,
15
15
  isRawAttribute,
16
16
  setNestedValue,
17
17
  isNumericID,
18
18
  getUserPermissionCacheKey
19
- } from "./utils";
20
- import logEntityDeprecation from "./utils/log-entity-deprecation";
19
+ } from "./utils/index.mjs";
20
+ import logEntityDeprecation from "./utils/log-entity-deprecation.mjs";
21
21
  var EMPTY_OBJECT = {};
22
22
  var isRequestingEmbedPreview = createRegistrySelector(
23
23
  (select) => (state, url) => {
@@ -585,4 +585,4 @@ export {
585
585
  isRequestingEmbedPreview,
586
586
  isSavingEntityRecord
587
587
  };
588
- //# sourceMappingURL=selectors.js.map
588
+ //# sourceMappingURL=selectors.mjs.map