@wordpress/core-data 4.13.0 → 5.0.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 (202) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/README.md +148 -65
  3. package/build/entities.js +38 -51
  4. package/build/entities.js.map +1 -1
  5. package/build/hooks/index.js +14 -0
  6. package/build/hooks/index.js.map +1 -1
  7. package/build/hooks/use-entity-record.js +10 -6
  8. package/build/hooks/use-entity-record.js.map +1 -1
  9. package/build/hooks/use-entity-records.js +2 -0
  10. package/build/hooks/use-entity-records.js.map +1 -1
  11. package/build/hooks/use-query-select.js +5 -2
  12. package/build/hooks/use-query-select.js.map +1 -1
  13. package/build/hooks/use-resource-permissions.js +74 -11
  14. package/build/hooks/use-resource-permissions.js.map +1 -1
  15. package/build/index.js +1 -30
  16. package/build/index.js.map +1 -1
  17. package/build/resolvers.js +59 -39
  18. package/build/resolvers.js.map +1 -1
  19. package/build/selectors.js +9 -46
  20. package/build/selectors.js.map +1 -1
  21. package/build-module/entities.js +38 -52
  22. package/build-module/entities.js.map +1 -1
  23. package/build-module/hooks/index.js +1 -0
  24. package/build-module/hooks/index.js.map +1 -1
  25. package/build-module/hooks/use-entity-record.js +10 -6
  26. package/build-module/hooks/use-entity-record.js.map +1 -1
  27. package/build-module/hooks/use-entity-records.js +2 -0
  28. package/build-module/hooks/use-entity-records.js.map +1 -1
  29. package/build-module/hooks/use-query-select.js +4 -1
  30. package/build-module/hooks/use-query-select.js.map +1 -1
  31. package/build-module/hooks/use-resource-permissions.js +70 -10
  32. package/build-module/hooks/use-resource-permissions.js.map +1 -1
  33. package/build-module/index.js +0 -5
  34. package/build-module/index.js.map +1 -1
  35. package/build-module/resolvers.js +59 -39
  36. package/build-module/resolvers.js.map +1 -1
  37. package/build-module/selectors.js +7 -44
  38. package/build-module/selectors.js.map +1 -1
  39. package/build-types/actions.d.ts +188 -0
  40. package/build-types/actions.d.ts.map +1 -0
  41. package/build-types/batch/create-batch.d.ts +71 -0
  42. package/build-types/batch/create-batch.d.ts.map +1 -0
  43. package/build-types/batch/default-processor.d.ts +11 -0
  44. package/build-types/batch/default-processor.d.ts.map +1 -0
  45. package/build-types/batch/index.d.ts +3 -0
  46. package/build-types/batch/index.d.ts.map +1 -0
  47. package/build-types/entities.d.ts +128 -0
  48. package/build-types/entities.d.ts.map +1 -0
  49. package/build-types/entity-provider.d.ts +68 -0
  50. package/build-types/entity-provider.d.ts.map +1 -0
  51. package/build-types/entity-types/attachment.d.ts +121 -0
  52. package/build-types/entity-types/attachment.d.ts.map +1 -0
  53. package/build-types/entity-types/base-entity-records.d.ts +37 -0
  54. package/build-types/entity-types/base-entity-records.d.ts.map +1 -0
  55. package/build-types/entity-types/comment.d.ts +82 -0
  56. package/build-types/entity-types/comment.d.ts.map +1 -0
  57. package/build-types/entity-types/helpers.d.ts +123 -0
  58. package/build-types/entity-types/helpers.d.ts.map +1 -0
  59. package/build-types/entity-types/index.d.ts +64 -0
  60. package/build-types/entity-types/index.d.ts.map +1 -0
  61. package/build-types/entity-types/menu-location.d.ts +25 -0
  62. package/build-types/entity-types/menu-location.d.ts.map +1 -0
  63. package/build-types/entity-types/nav-menu-item.d.ts +88 -0
  64. package/build-types/entity-types/nav-menu-item.d.ts.map +1 -0
  65. package/build-types/entity-types/nav-menu.d.ts +45 -0
  66. package/build-types/entity-types/nav-menu.d.ts.map +1 -0
  67. package/build-types/entity-types/page.d.ts +120 -0
  68. package/build-types/entity-types/page.d.ts.map +1 -0
  69. package/build-types/entity-types/plugin.d.ts +62 -0
  70. package/build-types/entity-types/plugin.d.ts.map +1 -0
  71. package/build-types/entity-types/post.d.ts +128 -0
  72. package/build-types/entity-types/post.d.ts.map +1 -0
  73. package/build-types/entity-types/settings.d.ts +89 -0
  74. package/build-types/entity-types/settings.d.ts.map +1 -0
  75. package/build-types/entity-types/sidebar.d.ts +55 -0
  76. package/build-types/entity-types/sidebar.d.ts.map +1 -0
  77. package/build-types/entity-types/taxonomy.d.ts +83 -0
  78. package/build-types/entity-types/taxonomy.d.ts.map +1 -0
  79. package/build-types/entity-types/theme.d.ts +206 -0
  80. package/build-types/entity-types/theme.d.ts.map +1 -0
  81. package/build-types/entity-types/type.d.ts +71 -0
  82. package/build-types/entity-types/type.d.ts.map +1 -0
  83. package/build-types/entity-types/user.d.ts +93 -0
  84. package/build-types/entity-types/user.d.ts.map +1 -0
  85. package/build-types/entity-types/widget-type.d.ts +33 -0
  86. package/build-types/entity-types/widget-type.d.ts.map +1 -0
  87. package/build-types/entity-types/widget.d.ts +59 -0
  88. package/build-types/entity-types/widget.d.ts.map +1 -0
  89. package/build-types/entity-types/wp-template-part.d.ts +80 -0
  90. package/build-types/entity-types/wp-template-part.d.ts.map +1 -0
  91. package/build-types/entity-types/wp-template.d.ts +80 -0
  92. package/build-types/entity-types/wp-template.d.ts.map +1 -0
  93. package/build-types/fetch/__experimental-fetch-link-suggestions.d.ts +139 -0
  94. package/build-types/fetch/__experimental-fetch-link-suggestions.d.ts.map +1 -0
  95. package/build-types/fetch/__experimental-fetch-url-data.d.ts +35 -0
  96. package/build-types/fetch/__experimental-fetch-url-data.d.ts.map +1 -0
  97. package/build-types/fetch/index.d.ts +3 -0
  98. package/build-types/fetch/index.d.ts.map +1 -0
  99. package/build-types/hooks/constants.d.ts +7 -0
  100. package/build-types/hooks/constants.d.ts.map +1 -0
  101. package/build-types/hooks/index.d.ts +4 -0
  102. package/build-types/hooks/index.d.ts.map +1 -0
  103. package/build-types/hooks/memoize.d.ts +3 -0
  104. package/build-types/hooks/memoize.d.ts.map +1 -0
  105. package/build-types/hooks/use-entity-record.d.ts +124 -0
  106. package/build-types/hooks/use-entity-record.d.ts.map +1 -0
  107. package/build-types/hooks/use-entity-records.d.ts +49 -0
  108. package/build-types/hooks/use-entity-records.d.ts.map +1 -0
  109. package/build-types/hooks/use-query-select.d.ts +46 -0
  110. package/build-types/hooks/use-query-select.d.ts.map +1 -0
  111. package/build-types/hooks/use-resource-permissions.d.ts +99 -0
  112. package/build-types/hooks/use-resource-permissions.d.ts.map +1 -0
  113. package/build-types/index.d.ts +131 -0
  114. package/build-types/index.d.ts.map +1 -0
  115. package/build-types/locks/actions.d.ts +7 -0
  116. package/build-types/locks/actions.d.ts.map +1 -0
  117. package/build-types/locks/engine.d.ts +5 -0
  118. package/build-types/locks/engine.d.ts.map +1 -0
  119. package/build-types/locks/reducer.d.ts +10 -0
  120. package/build-types/locks/reducer.d.ts.map +1 -0
  121. package/build-types/locks/selectors.d.ts +5 -0
  122. package/build-types/locks/selectors.d.ts.map +1 -0
  123. package/build-types/locks/utils.d.ts +8 -0
  124. package/build-types/locks/utils.d.ts.map +1 -0
  125. package/build-types/name.d.ts +8 -0
  126. package/build-types/name.d.ts.map +1 -0
  127. package/build-types/queried-data/actions.d.ts +32 -0
  128. package/build-types/queried-data/actions.d.ts.map +1 -0
  129. package/build-types/queried-data/get-query-parts.d.ts +60 -0
  130. package/build-types/queried-data/get-query-parts.d.ts.map +1 -0
  131. package/build-types/queried-data/index.d.ts +4 -0
  132. package/build-types/queried-data/index.d.ts.map +1 -0
  133. package/build-types/queried-data/reducer.d.ts +54 -0
  134. package/build-types/queried-data/reducer.d.ts.map +1 -0
  135. package/build-types/queried-data/selectors.d.ts +16 -0
  136. package/build-types/queried-data/selectors.d.ts.map +1 -0
  137. package/build-types/reducer.d.ts +156 -0
  138. package/build-types/reducer.d.ts.map +1 -0
  139. package/build-types/resolvers.d.ts +75 -0
  140. package/build-types/resolvers.d.ts.map +1 -0
  141. package/build-types/selectors.d.ts +524 -0
  142. package/build-types/selectors.d.ts.map +1 -0
  143. package/build-types/types.d.ts +4 -0
  144. package/build-types/types.d.ts.map +1 -0
  145. package/build-types/utils/conservative-map-item.d.ts +12 -0
  146. package/build-types/utils/conservative-map-item.d.ts.map +1 -0
  147. package/build-types/utils/forward-resolver.d.ts +10 -0
  148. package/build-types/utils/forward-resolver.d.ts.map +1 -0
  149. package/build-types/utils/get-normalized-comma-separable.d.ts +12 -0
  150. package/build-types/utils/get-normalized-comma-separable.d.ts.map +1 -0
  151. package/build-types/utils/if-matching-action.d.ts +14 -0
  152. package/build-types/utils/if-matching-action.d.ts.map +1 -0
  153. package/build-types/utils/index.d.ts +9 -0
  154. package/build-types/utils/index.d.ts.map +1 -0
  155. package/build-types/utils/is-raw-attribute.d.ts +10 -0
  156. package/build-types/utils/is-raw-attribute.d.ts.map +1 -0
  157. package/build-types/utils/on-sub-key.d.ts +4 -0
  158. package/build-types/utils/on-sub-key.d.ts.map +1 -0
  159. package/build-types/utils/replace-action.d.ts +13 -0
  160. package/build-types/utils/replace-action.d.ts.map +1 -0
  161. package/build-types/utils/with-weak-map-cache.d.ts +12 -0
  162. package/build-types/utils/with-weak-map-cache.d.ts.map +1 -0
  163. package/package.json +13 -11
  164. package/src/entities.js +325 -0
  165. package/src/entity-types/attachment.ts +3 -4
  166. package/src/entity-types/comment.ts +3 -4
  167. package/src/entity-types/index.ts +31 -88
  168. package/src/entity-types/menu-location.ts +3 -4
  169. package/src/entity-types/nav-menu-item.ts +3 -4
  170. package/src/entity-types/nav-menu.ts +3 -3
  171. package/src/entity-types/page.ts +3 -3
  172. package/src/entity-types/plugin.ts +3 -3
  173. package/src/entity-types/post.ts +3 -3
  174. package/src/entity-types/settings.ts +3 -3
  175. package/src/entity-types/sidebar.ts +3 -4
  176. package/src/entity-types/taxonomy.ts +3 -4
  177. package/src/entity-types/theme.ts +7 -3
  178. package/src/entity-types/type.ts +3 -3
  179. package/src/entity-types/user.ts +3 -3
  180. package/src/entity-types/widget-type.ts +3 -4
  181. package/src/entity-types/widget.ts +3 -3
  182. package/src/entity-types/wp-template-part.ts +3 -4
  183. package/src/entity-types/wp-template.ts +3 -4
  184. package/src/hooks/index.ts +4 -0
  185. package/src/hooks/test/use-entity-record.js +41 -1
  186. package/src/hooks/test/use-resource-permissions.js +32 -36
  187. package/src/hooks/use-entity-record.ts +18 -6
  188. package/src/hooks/use-entity-records.ts +2 -0
  189. package/src/hooks/use-query-select.ts +4 -1
  190. package/src/hooks/use-resource-permissions.ts +84 -20
  191. package/src/index.js +0 -5
  192. package/src/resolvers.js +80 -45
  193. package/src/selectors.ts +202 -341
  194. package/src/test/resolvers.js +118 -4
  195. package/tsconfig.json +21 -0
  196. package/tsconfig.tsbuildinfo +1 -0
  197. package/build/entity-types/entities.js +0 -6
  198. package/build/entity-types/entities.js.map +0 -1
  199. package/build-module/entity-types/entities.js +0 -2
  200. package/build-module/entity-types/entities.js.map +0 -1
  201. package/src/entities.ts +0 -548
  202. package/src/entity-types/entities.ts +0 -130
@@ -0,0 +1,60 @@
1
+ /**
2
+ * An object of properties describing a specific query.
3
+ *
4
+ * @typedef {Object} WPQueriedDataQueryParts
5
+ *
6
+ * @property {number} page The query page (1-based index, default 1).
7
+ * @property {number} perPage Items per page for query (default 10).
8
+ * @property {string} stableKey An encoded stable string of all non-
9
+ * pagination, non-fields query parameters.
10
+ * @property {?(string[])} fields Target subset of fields to derive from
11
+ * item objects.
12
+ * @property {?(number[])} include Specific item IDs to include.
13
+ * @property {string} context Scope under which the request is made;
14
+ * determines returned fields in response.
15
+ */
16
+ /**
17
+ * Given a query object, returns an object of parts, including pagination
18
+ * details (`page` and `perPage`, or default values). All other properties are
19
+ * encoded into a stable (idempotent) `stableKey` value.
20
+ *
21
+ * @param {Object} query Optional query object.
22
+ *
23
+ * @return {WPQueriedDataQueryParts} Query parts.
24
+ */
25
+ export function getQueryParts(query: any): WPQueriedDataQueryParts;
26
+ declare var _default: Function;
27
+ export default _default;
28
+ /**
29
+ * An object of properties describing a specific query.
30
+ */
31
+ export type WPQueriedDataQueryParts = {
32
+ /**
33
+ * The query page (1-based index, default 1).
34
+ */
35
+ page: number;
36
+ /**
37
+ * Items per page for query (default 10).
38
+ */
39
+ perPage: number;
40
+ /**
41
+ * An encoded stable string of all non-
42
+ * pagination, non-fields query parameters.
43
+ */
44
+ stableKey: string;
45
+ /**
46
+ * Target subset of fields to derive from
47
+ * item objects.
48
+ */
49
+ fields: (string[]) | null;
50
+ /**
51
+ * Specific item IDs to include.
52
+ */
53
+ include: (number[]) | null;
54
+ /**
55
+ * Scope under which the request is made;
56
+ * determines returned fields in response.
57
+ */
58
+ context: string;
59
+ };
60
+ //# sourceMappingURL=get-query-parts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-query-parts.d.ts","sourceRoot":"","sources":["../../src/queried-data/get-query-parts.js"],"names":[],"mappings":"AAUA;;;;;;;;;;;;;;GAcG;AAEH;;;;;;;;GAQG;AACH,2CAFY,uBAAuB,CAyElC;;;;;;;;;;UA3Fa,MAAM;;;;aACN,MAAM;;;;;eACN,MAAM;;;;;YAEL,CAAC,MAAM,EAAE,CAAC;;;;aAEV,CAAC,MAAM,EAAE,CAAC;;;;;aACX,MAAM"}
@@ -0,0 +1,4 @@
1
+ export * from "./actions";
2
+ export * from "./selectors";
3
+ export { default as reducer } from "./reducer";
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/queried-data/index.js"],"names":[],"mappings":""}
@@ -0,0 +1,54 @@
1
+ /**
2
+ * Returns a merged array of item IDs, given details of the received paginated
3
+ * items. The array is sparse-like with `undefined` entries where holes exist.
4
+ *
5
+ * @param {?Array<number>} itemIds Original item IDs (default empty array).
6
+ * @param {number[]} nextItemIds Item IDs to merge.
7
+ * @param {number} page Page of items merged.
8
+ * @param {number} perPage Number of items per page.
9
+ *
10
+ * @return {number[]} Merged array of item IDs.
11
+ */
12
+ export function getMergedItemIds(itemIds: Array<number> | null, nextItemIds: number[], page: number, perPage: number): number[];
13
+ /**
14
+ * Reducer tracking items state, keyed by ID. Items are assumed to be normal,
15
+ * where identifiers are common across all queries.
16
+ *
17
+ * @param {Object} state Current state.
18
+ * @param {Object} action Dispatched action.
19
+ *
20
+ * @return {Object} Next state.
21
+ */
22
+ export function items(state: any, action: any): any;
23
+ /**
24
+ * Reducer tracking item completeness, keyed by ID. A complete item is one for
25
+ * which all fields are known. This is used in supporting `_fields` queries,
26
+ * where not all properties associated with an entity are necessarily returned.
27
+ * In such cases, completeness is used as an indication of whether it would be
28
+ * safe to use queried data for a non-`_fields`-limited request.
29
+ *
30
+ * @param {Object<string,Object<string,boolean>>} state Current state.
31
+ * @param {Object} action Dispatched action.
32
+ *
33
+ * @return {Object<string,Object<string,boolean>>} Next state.
34
+ */
35
+ export function itemIsComplete(state: {
36
+ [x: string]: {
37
+ [x: string]: boolean;
38
+ };
39
+ } | undefined, action: any): {
40
+ [x: string]: {
41
+ [x: string]: boolean;
42
+ };
43
+ };
44
+ declare var _default: import("redux").Reducer<import("redux").CombinedState<{
45
+ items: any;
46
+ itemIsComplete: {
47
+ [x: string]: {
48
+ [x: string]: boolean;
49
+ };
50
+ };
51
+ queries: any;
52
+ }>, import("redux").AnyAction>;
53
+ export default _default;
54
+ //# sourceMappingURL=reducer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reducer.d.ts","sourceRoot":"","sources":["../../src/queried-data/reducer.js"],"names":[],"mappings":"AAgCA;;;;;;;;;;GAUG;AACH,0CAPY,MAAM,MAAM,CAAC,sBACd,MAAM,EAAE,QACR,MAAM,WACN,MAAM,GAEL,MAAM,EAAE,CA+BnB;AAED;;;;;;;;GAQG;AACH,oDA0BC;AAED;;;;;;;;;;;GAWG;AACH;;;;;QAFmB,MAAM;YAAQ,MAAM,GAAC,OAAO;;EA0C9C"}
@@ -0,0 +1,16 @@
1
+ /// <reference types="rememo" />
2
+ /**
3
+ * Returns items for a given query, or null if the items are not known. Caches
4
+ * result both per state (by reference) and per query (by deep equality).
5
+ * The caching approach is intended to be durable to query objects which are
6
+ * deeply but not referentially equal, since otherwise:
7
+ *
8
+ * `getQueriedItems( state, {} ) !== getQueriedItems( state, {} )`
9
+ *
10
+ * @param {Object} state State object.
11
+ * @param {?Object} query Optional query.
12
+ *
13
+ * @return {?Array} Query items.
14
+ */
15
+ export const getQueriedItems: ((state: any, query?: any) => any) & import("rememo").EnhancedSelector;
16
+ //# sourceMappingURL=selectors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"selectors.d.ts","sourceRoot":"","sources":["../../src/queried-data/selectors.js"],"names":[],"mappings":";AAuFA;;;;;;;;;;;;GAYG;AACH,qGAeI"}
@@ -0,0 +1,156 @@
1
+ /** @typedef {import('./types').AnyFunction} AnyFunction */
2
+ /**
3
+ * Reducer managing terms state. Keyed by taxonomy slug, the value is either
4
+ * undefined (if no request has been made for given taxonomy), null (if a
5
+ * request is in-flight for given taxonomy), or the array of terms for the
6
+ * taxonomy.
7
+ *
8
+ * @param {Object} state Current state.
9
+ * @param {Object} action Dispatched action.
10
+ *
11
+ * @return {Object} Updated state.
12
+ */
13
+ export function terms(state: any, action: any): any;
14
+ /**
15
+ * Reducer managing authors state. Keyed by id.
16
+ *
17
+ * @param {Object} state Current state.
18
+ * @param {Object} action Dispatched action.
19
+ *
20
+ * @return {Object} Updated state.
21
+ */
22
+ export function users(state: any, action: any): any;
23
+ /**
24
+ * Reducer managing current user state.
25
+ *
26
+ * @param {Object} state Current state.
27
+ * @param {Object} action Dispatched action.
28
+ *
29
+ * @return {Object} Updated state.
30
+ */
31
+ export function currentUser(state: any, action: any): any;
32
+ /**
33
+ * Reducer managing taxonomies.
34
+ *
35
+ * @param {Object} state Current state.
36
+ * @param {Object} action Dispatched action.
37
+ *
38
+ * @return {Object} Updated state.
39
+ */
40
+ export function taxonomies(state: any, action: any): any;
41
+ /**
42
+ * Reducer managing the current theme.
43
+ *
44
+ * @param {string|undefined} state Current state.
45
+ * @param {Object} action Dispatched action.
46
+ *
47
+ * @return {string|undefined} Updated state.
48
+ */
49
+ export function currentTheme(state: string | undefined, action: any): string | undefined;
50
+ /**
51
+ * Reducer managing the current global styles id.
52
+ *
53
+ * @param {string|undefined} state Current state.
54
+ * @param {Object} action Dispatched action.
55
+ *
56
+ * @return {string|undefined} Updated state.
57
+ */
58
+ export function currentGlobalStylesId(state: string | undefined, action: any): string | undefined;
59
+ /**
60
+ * Reducer managing the theme base global styles.
61
+ *
62
+ * @param {Record<string, object>} state Current state.
63
+ * @param {Object} action Dispatched action.
64
+ *
65
+ * @return {Record<string, object>} Updated state.
66
+ */
67
+ export function themeBaseGlobalStyles(state: Record<string, any> | undefined, action: any): Record<string, object>;
68
+ /**
69
+ * Reducer managing the theme global styles variations.
70
+ *
71
+ * @param {Record<string, object>} state Current state.
72
+ * @param {Object} action Dispatched action.
73
+ *
74
+ * @return {Record<string, object>} Updated state.
75
+ */
76
+ export function themeGlobalStyleVariations(state: Record<string, any> | undefined, action: any): Record<string, object>;
77
+ /**
78
+ * Reducer keeping track of the registered entities.
79
+ *
80
+ * @param {Object} state Current state.
81
+ * @param {Object} action Dispatched action.
82
+ *
83
+ * @return {Object} Updated state.
84
+ */
85
+ export function entitiesConfig(state: any, action: any): any;
86
+ /**
87
+ * Reducer keeping track of entity edit undo history.
88
+ *
89
+ * @param {UndoState} state Current state.
90
+ * @param {Object} action Dispatched action.
91
+ *
92
+ * @return {UndoState} Updated state.
93
+ */
94
+ export function undo(state: UndoState | undefined, action: any): UndoState;
95
+ /**
96
+ * Reducer managing embed preview data.
97
+ *
98
+ * @param {Object} state Current state.
99
+ * @param {Object} action Dispatched action.
100
+ *
101
+ * @return {Object} Updated state.
102
+ */
103
+ export function embedPreviews(state: any, action: any): any;
104
+ /**
105
+ * State which tracks whether the user can perform an action on a REST
106
+ * resource.
107
+ *
108
+ * @param {Object} state Current state.
109
+ * @param {Object} action Dispatched action.
110
+ *
111
+ * @return {Object} Updated state.
112
+ */
113
+ export function userPermissions(state: any, action: any): any;
114
+ /**
115
+ * Reducer returning autosaves keyed by their parent's post id.
116
+ *
117
+ * @param {Object} state Current state.
118
+ * @param {Object} action Dispatched action.
119
+ *
120
+ * @return {Object} Updated state.
121
+ */
122
+ export function autosaves(state: any, action: any): any;
123
+ export function blockPatterns(state: any[] | undefined, action: any): any;
124
+ export function blockPatternCategories(state: any[] | undefined, action: any): any;
125
+ export function entities(state: any, action: any): any;
126
+ declare var _default: import("redux").Reducer<import("redux").CombinedState<{
127
+ terms: any;
128
+ users: any;
129
+ currentTheme: string | undefined;
130
+ currentGlobalStylesId: string | undefined;
131
+ currentUser: any;
132
+ themeGlobalStyleVariations: Record<string, any>;
133
+ themeBaseGlobalStyles: Record<string, any>;
134
+ taxonomies: any;
135
+ entities: any;
136
+ undo: UndoState;
137
+ embedPreviews: any;
138
+ userPermissions: any;
139
+ autosaves: any;
140
+ blockPatterns: any;
141
+ blockPatternCategories: any;
142
+ }>, any>;
143
+ export default _default;
144
+ export type AnyFunction = import('./types').AnyFunction;
145
+ export type UndoStateMeta = {
146
+ /**
147
+ * Where in the undo stack we are.
148
+ */
149
+ offset: number;
150
+ /**
151
+ * Flattened form of undo stack.
152
+ */
153
+ flattenedUndo?: any;
154
+ };
155
+ export type UndoState = Array<any> & UndoStateMeta;
156
+ //# sourceMappingURL=reducer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reducer.d.ts","sourceRoot":"","sources":["../src/reducer.js"],"names":[],"mappings":"AAkBA,2DAA2D;AAE3D;;;;;;;;;;GAUG;AACH,oDAUC;AAED;;;;;;;GAOG;AACH,oDA0BC;AAED;;;;;;;GAOG;AACH,0DAOC;AAED;;;;;;;GAOG;AACH,yDAOC;AAED;;;;;;;GAOG;AACH,oCALW,MAAM,GAAC,SAAS,gBAGf,MAAM,GAAC,SAAS,CAS3B;AAED;;;;;;;GAOG;AACH,6CALW,MAAM,GAAC,SAAS,gBAGf,MAAM,GAAC,SAAS,CAS3B;AAED;;;;;;;GAOG;AACH,4FAFY,OAAO,MAAM,EAAE,MAAM,CAAC,CAYjC;AAED;;;;;;;GAOG;AACH,iGAFY,OAAO,MAAM,EAAE,MAAM,CAAC,CAYjC;AAyJD;;;;;;;GAOG;AACH,6DAOC;AA0ED;;;;;;;GAOG;AACH,iEAFY,SAAS,CA8HpB;AAED;;;;;;;GAOG;AACH,4DAUC;AAED;;;;;;;;GAQG;AACH,8DAUC;AAED;;;;;;;GAOG;AACH,wDAYC;AAED,0EAOC;AAED,mFAOC;AArRM,uDA2CN;;;;;;;;;;;;;;;;;;;0BApYa,OAAO,SAAS,EAAE,WAAW;;;;;YAyY7B,MAAM;;;;;;wBAIN,UAAa,GAAG,aAAa"}
@@ -0,0 +1,75 @@
1
+ export function getAuthors(query: any | undefined): ({ dispatch }: {
2
+ dispatch: any;
3
+ }) => Promise<void>;
4
+ export function getCurrentUser(): ({ dispatch }: {
5
+ dispatch: any;
6
+ }) => Promise<void>;
7
+ export function getEntityRecord(kind: string, name: string, key: string | number | undefined, query: any | undefined): ({ select, dispatch }: {
8
+ select: any;
9
+ dispatch: any;
10
+ }) => Promise<void>;
11
+ /**
12
+ * Requests an entity's record from the REST API.
13
+ */
14
+ export const getRawEntityRecord: Function;
15
+ /**
16
+ * Requests an entity's record from the REST API.
17
+ */
18
+ export const getEditedEntityRecord: Function;
19
+ export function getEntityRecords(kind: string, name: string, query?: any | null): ({ dispatch }: {
20
+ dispatch: any;
21
+ }) => Promise<void>;
22
+ export namespace getEntityRecords {
23
+ function shouldInvalidate(action: any, kind: any, name: any): any;
24
+ }
25
+ export function getCurrentTheme(): ({ dispatch, resolveSelect }: {
26
+ dispatch: any;
27
+ resolveSelect: any;
28
+ }) => Promise<void>;
29
+ /**
30
+ * Requests theme supports data from the index.
31
+ */
32
+ export const getThemeSupports: Function;
33
+ export function getEmbedPreview(url: string): ({ dispatch }: {
34
+ dispatch: any;
35
+ }) => Promise<void>;
36
+ export function canUser(requestedAction: string, resource: string, id: string | null): ({ dispatch, registry }: {
37
+ dispatch: any;
38
+ registry: any;
39
+ }) => Promise<void>;
40
+ export function canUserEditEntityRecord(kind: string, name: string, recordId: string): ({ dispatch }: {
41
+ dispatch: any;
42
+ }) => Promise<void>;
43
+ export function getAutosaves(postType: string, postId: number): ({ dispatch, resolveSelect }: {
44
+ dispatch: any;
45
+ resolveSelect: any;
46
+ }) => Promise<void>;
47
+ export function getAutosave(postType: string, postId: number): ({ resolveSelect }: {
48
+ resolveSelect: any;
49
+ }) => Promise<void>;
50
+ export function __experimentalGetTemplateForLink(link: string): ({ dispatch, resolveSelect }: {
51
+ dispatch: any;
52
+ resolveSelect: any;
53
+ }) => Promise<void>;
54
+ export namespace __experimentalGetTemplateForLink {
55
+ function shouldInvalidate(action: any): any;
56
+ }
57
+ export function __experimentalGetCurrentGlobalStylesId(): ({ dispatch, resolveSelect }: {
58
+ dispatch: any;
59
+ resolveSelect: any;
60
+ }) => Promise<void>;
61
+ export function __experimentalGetCurrentThemeBaseGlobalStyles(): ({ resolveSelect, dispatch }: {
62
+ resolveSelect: any;
63
+ dispatch: any;
64
+ }) => Promise<void>;
65
+ export function __experimentalGetCurrentThemeGlobalStylesVariations(): ({ resolveSelect, dispatch }: {
66
+ resolveSelect: any;
67
+ dispatch: any;
68
+ }) => Promise<void>;
69
+ export function getBlockPatterns(): ({ dispatch }: {
70
+ dispatch: any;
71
+ }) => Promise<void>;
72
+ export function getBlockPatternCategories(): ({ dispatch }: {
73
+ dispatch: any;
74
+ }) => Promise<void>;
75
+ //# sourceMappingURL=resolvers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolvers.d.ts","sourceRoot":"","sources":["../src/resolvers.js"],"names":[],"mappings":"AAwBO,kCAHI,MAAO,SAAS;;oBAYzB;AAKK;;oBAKL;AAYK,sCAPI,MAAM,QACN,MAAM,2CAEN,MAAO,SAAS;;;oBAsEzB;AAEF;;GAEG;AACH,0CAAuE;AAEvE;;GAEG;AACH,6CAA0E;AAUnE,uCALI,MAAM,QACN,MAAM;;oBAoFf;;IAEF,kEAOC;;AAKM;;;oBAUL;AAEF;;GAEG;AACH,wCAAqE;AAO9D,qCAFI,MAAM;;oBAcf;AAWK,yCALI,MAAM,YAEN,MAAM,MACL,MAAM;;;oBAiEhB;AAUK,8CAJI,MAAM,QACN,MAAM,YACN,MAAM;;oBAef;AAQK,uCAHI,MAAM,UACN,MAAM;;;oBAcf;AAWK,sCAHI,MAAM,UACN,MAAM;;oBAMf;AAOK,uDAFI,MAAM;;;oBAsCf;;IAEF,4CAOC;;AAEM;;;oBAmBL;AAEK;;;oBAWL;AAEK;;;oBAWL;AAEK;;oBAeL;AAEK;;oBAOL"}