@wordpress/core-data 7.36.0 → 7.36.1-next.738bb1424.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.
- package/README.md +0 -1
- package/build/{actions.js → actions.cjs} +12 -12
- package/build/actions.cjs.map +7 -0
- package/build/batch/{create-batch.js → create-batch.cjs} +2 -2
- package/build/batch/{default-processor.js → default-processor.cjs} +2 -2
- package/build/batch/{index.js → index.cjs} +3 -3
- package/build/{dynamic-entities.js → dynamic-entities.cjs} +1 -1
- package/build/{entities.js → entities.cjs} +13 -4
- package/build/entities.cjs.map +7 -0
- package/build/{entity-context.js → entity-context.cjs} +1 -1
- package/build/{entity-provider.js → entity-provider.cjs} +2 -2
- package/build/entity-types/{attachment.js → attachment.cjs} +1 -1
- package/build/entity-types/{base-entity-records.js → base-entity-records.cjs} +1 -1
- package/build/entity-types/{base.js → base.cjs} +1 -1
- package/build/entity-types/{comment.js → comment.cjs} +1 -1
- package/build/entity-types/font-collection.cjs +19 -0
- package/build/entity-types/font-collection.cjs.map +7 -0
- package/build/entity-types/font-family.cjs +19 -0
- package/build/entity-types/font-family.cjs.map +7 -0
- package/build/entity-types/{global-styles-revision.js → global-styles-revision.cjs} +1 -1
- package/build/entity-types/{helpers.js → helpers.cjs} +1 -1
- package/build/entity-types/{index.js → index.cjs} +1 -1
- package/build/entity-types/index.cjs.map +7 -0
- package/build/entity-types/{menu-location.js → menu-location.cjs} +1 -1
- package/build/entity-types/{nav-menu-item.js → nav-menu-item.cjs} +1 -1
- package/build/entity-types/{nav-menu.js → nav-menu.cjs} +1 -1
- package/build/entity-types/{page.js → page.cjs} +1 -1
- package/build/entity-types/{plugin.js → plugin.cjs} +1 -1
- package/build/entity-types/{post-revision.js → post-revision.cjs} +1 -1
- package/build/entity-types/{post-status.js → post-status.cjs} +1 -1
- package/build/entity-types/{post.js → post.cjs} +1 -1
- package/build/entity-types/{settings.js → settings.cjs} +1 -1
- package/build/entity-types/{sidebar.js → sidebar.cjs} +1 -1
- package/build/entity-types/{taxonomy.js → taxonomy.cjs} +1 -1
- package/build/entity-types/{term.js → term.cjs} +1 -1
- package/build/entity-types/{theme.js → theme.cjs} +1 -1
- package/build/entity-types/{type.js → type.cjs} +1 -1
- package/build/entity-types/{user.js → user.cjs} +1 -1
- package/build/entity-types/{widget-type.js → widget-type.cjs} +1 -1
- package/build/entity-types/{widget.js → widget.cjs} +1 -1
- package/build/entity-types/{wp-template-part.js → wp-template-part.cjs} +1 -1
- package/build/entity-types/{wp-template.js → wp-template.cjs} +1 -1
- package/build/fetch/{__experimental-fetch-link-suggestions.js → __experimental-fetch-link-suggestions.cjs} +2 -2
- package/build/fetch/{__experimental-fetch-url-data.js → __experimental-fetch-url-data.cjs} +2 -2
- package/build/fetch/{index.js → index.cjs} +4 -4
- package/build/footnotes/{get-footnotes-order.js → get-footnotes-order.cjs} +2 -2
- package/build/footnotes/{get-rich-text-values-cached.js → get-rich-text-values-cached.cjs} +2 -2
- package/build/footnotes/{index.js → index.cjs} +2 -2
- package/build/hooks/{constants.js → constants.cjs} +1 -1
- package/build/hooks/{index.js → index.cjs} +7 -7
- package/build/hooks/{memoize.js → memoize.cjs} +2 -2
- package/build/hooks/{use-entity-block-editor.js → use-entity-block-editor.cjs} +4 -4
- package/build/hooks/{use-entity-id.js → use-entity-id.cjs} +2 -2
- package/build/hooks/{use-entity-prop.js → use-entity-prop.cjs} +3 -3
- package/build/hooks/{use-entity-record.js → use-entity-record.cjs} +4 -4
- package/build/hooks/{use-entity-record.js.map → use-entity-record.cjs.map} +2 -2
- package/build/hooks/{use-entity-records.js → use-entity-records.cjs} +6 -6
- package/build/hooks/{use-query-select.js → use-query-select.cjs} +3 -3
- package/build/hooks/{use-resource-permissions.js → use-resource-permissions.cjs} +6 -6
- package/build/{index.js → index.cjs} +24 -24
- package/build/{index.js.map → index.cjs.map} +1 -1
- package/build/{lock-unlock.js → lock-unlock.cjs} +1 -1
- package/build/locks/{actions.js → actions.cjs} +2 -2
- package/build/locks/{engine.js → engine.cjs} +3 -3
- package/build/locks/{reducer.js → reducer.cjs} +2 -2
- package/build/locks/{selectors.js → selectors.cjs} +2 -2
- package/build/locks/{utils.js → utils.cjs} +1 -1
- package/build/{name.js → name.cjs} +1 -1
- package/build/{private-actions.js → private-actions.cjs} +3 -3
- package/build/{private-apis.js → private-apis.cjs} +4 -4
- package/build/{private-selectors.js → private-selectors.cjs} +11 -5
- package/build/private-selectors.cjs.map +7 -0
- package/build/queried-data/{actions.js → actions.cjs} +1 -1
- package/build/queried-data/{get-query-parts.js → get-query-parts.cjs} +2 -2
- package/build/queried-data/{index.js → index.cjs} +6 -6
- package/build/queried-data/{index.js.map → index.cjs.map} +1 -1
- package/build/queried-data/{reducer.js → reducer.cjs} +4 -4
- package/build/queried-data/{selectors.js → selectors.cjs} +4 -4
- package/build/{reducer.js → reducer.cjs} +5 -5
- package/build/{resolvers.js → resolvers.cjs} +9 -9
- package/build/resolvers.cjs.map +7 -0
- package/build/{selectors.js → selectors.cjs} +10 -9
- package/build/selectors.cjs.map +7 -0
- package/build/{sync.js → sync.cjs} +1 -1
- package/build/{types.js → types.cjs} +1 -1
- package/build/types.cjs.map +7 -0
- package/build/utils/{conservative-map-item.js → conservative-map-item.cjs} +2 -2
- package/build/utils/{crdt-blocks.js → crdt-blocks.cjs} +8 -7
- package/build/utils/{crdt-blocks.js.map → crdt-blocks.cjs.map} +2 -2
- package/build/utils/{crdt.js → crdt.cjs} +5 -5
- package/build/utils/{crdt.js.map → crdt.cjs.map} +2 -2
- package/build/utils/{forward-resolver.js → forward-resolver.cjs} +1 -1
- package/build/utils/{get-nested-value.js → get-nested-value.cjs} +1 -1
- package/build/utils/{get-normalized-comma-separable.js → get-normalized-comma-separable.cjs} +1 -1
- package/build/utils/{if-matching-action.js → if-matching-action.cjs} +1 -1
- package/build/utils/{index.js → index.cjs} +14 -14
- package/build/utils/{is-numeric-id.js → is-numeric-id.cjs} +1 -1
- package/build/utils/{is-raw-attribute.js → is-raw-attribute.cjs} +1 -1
- package/build/utils/{log-entity-deprecation.js → log-entity-deprecation.cjs} +3 -3
- package/build/utils/{on-sub-key.js → on-sub-key.cjs} +1 -1
- package/build/utils/{receive-intermediate-results.js → receive-intermediate-results.cjs} +1 -1
- package/build/utils/{replace-action.js → replace-action.cjs} +1 -1
- package/build/utils/{set-nested-value.js → set-nested-value.cjs} +1 -1
- package/build/utils/{user-permissions.js → user-permissions.cjs} +1 -1
- package/build/utils/{with-weak-map-cache.js → with-weak-map-cache.cjs} +1 -1
- package/build-module/actions.js +8 -8
- package/build-module/actions.js.map +2 -2
- package/build-module/batch/create-batch.js +1 -1
- package/build-module/batch/index.js +2 -2
- package/build-module/entities.js +11 -2
- package/build-module/entities.js.map +2 -2
- package/build-module/entity-provider.js +1 -1
- package/build-module/entity-types/font-collection.js +1 -0
- package/build-module/entity-types/font-collection.js.map +7 -0
- package/build-module/entity-types/font-family.js +1 -0
- package/build-module/entity-types/font-family.js.map +7 -0
- package/build-module/fetch/index.js +2 -2
- package/build-module/footnotes/get-footnotes-order.js +1 -1
- package/build-module/footnotes/get-rich-text-values-cached.js +1 -1
- package/build-module/footnotes/index.js +1 -1
- package/build-module/hooks/index.js +6 -6
- package/build-module/hooks/use-entity-block-editor.js +3 -3
- package/build-module/hooks/use-entity-id.js +1 -1
- package/build-module/hooks/use-entity-prop.js +2 -2
- package/build-module/hooks/use-entity-record.js +2 -2
- package/build-module/hooks/use-entity-record.js.map +2 -2
- package/build-module/hooks/use-entity-records.js +4 -4
- package/build-module/hooks/use-query-select.js +2 -2
- package/build-module/hooks/use-resource-permissions.js +3 -3
- package/build-module/index.js +18 -18
- package/build-module/locks/actions.js +1 -1
- package/build-module/locks/engine.js +2 -2
- package/build-module/locks/reducer.js +1 -1
- package/build-module/locks/selectors.js +1 -1
- package/build-module/private-actions.js +1 -1
- package/build-module/private-apis.js +3 -3
- package/build-module/private-selectors.js +10 -4
- package/build-module/private-selectors.js.map +2 -2
- package/build-module/queried-data/get-query-parts.js +1 -1
- package/build-module/queried-data/index.js +3 -3
- package/build-module/queried-data/reducer.js +3 -3
- package/build-module/queried-data/selectors.js +2 -2
- package/build-module/reducer.js +3 -3
- package/build-module/resolvers.js +9 -8
- package/build-module/resolvers.js.map +2 -2
- package/build-module/selectors.js +8 -7
- package/build-module/selectors.js.map +2 -2
- package/build-module/utils/crdt-blocks.js +6 -5
- package/build-module/utils/crdt-blocks.js.map +2 -2
- package/build-module/utils/crdt.js +3 -3
- package/build-module/utils/crdt.js.map +2 -2
- package/build-module/utils/index.js +13 -13
- package/build-module/utils/log-entity-deprecation.js +1 -1
- package/build-types/actions.d.ts +1 -1
- package/build-types/actions.d.ts.map +1 -1
- package/build-types/entities.d.ts +16 -0
- package/build-types/entities.d.ts.map +1 -1
- package/build-types/entity-types/font-collection.d.ts +56 -0
- package/build-types/entity-types/font-collection.d.ts.map +1 -0
- package/build-types/entity-types/font-family.d.ts +79 -0
- package/build-types/entity-types/font-family.d.ts.map +1 -0
- package/build-types/entity-types/index.d.ts +4 -2
- package/build-types/entity-types/index.d.ts.map +1 -1
- package/build-types/hooks/use-entity-record.d.ts +0 -1
- package/build-types/hooks/use-entity-record.d.ts.map +1 -1
- package/build-types/index.d.ts +2 -2
- package/build-types/index.d.ts.map +1 -1
- package/build-types/private-selectors.d.ts +13 -1
- package/build-types/private-selectors.d.ts.map +1 -1
- package/build-types/resolvers.d.ts.map +1 -1
- package/build-types/selectors.d.ts.map +1 -1
- package/build-types/types.d.ts +5 -0
- package/build-types/types.d.ts.map +1 -1
- package/build-types/utils/crdt-blocks.d.ts.map +1 -1
- package/package.json +31 -21
- package/src/actions.js +3 -3
- package/src/entities.js +9 -0
- package/src/entity-types/font-collection.ts +62 -0
- package/src/entity-types/font-family.ts +94 -0
- package/src/entity-types/index.ts +14 -0
- package/src/hooks/use-entity-record.ts +0 -1
- package/src/private-selectors.ts +19 -0
- package/src/resolvers.js +8 -1
- package/src/selectors.ts +3 -2
- package/src/types.ts +6 -0
- package/src/utils/crdt-blocks.ts +8 -6
- package/src/utils/crdt.ts +3 -3
- package/src/utils/test/crdt-blocks.ts +99 -0
- package/src/utils/test/crdt.ts +42 -3
- package/build/actions.js.map +0 -7
- package/build/entities.js.map +0 -7
- package/build/entity-types/index.js.map +0 -7
- package/build/private-selectors.js.map +0 -7
- package/build/resolvers.js.map +0 -7
- package/build/selectors.js.map +0 -7
- package/build/types.js.map +0 -7
- package/tsconfig.json +0 -25
- package/tsconfig.tsbuildinfo +0 -1
- /package/build/batch/{create-batch.js.map → create-batch.cjs.map} +0 -0
- /package/build/batch/{default-processor.js.map → default-processor.cjs.map} +0 -0
- /package/build/batch/{index.js.map → index.cjs.map} +0 -0
- /package/build/{dynamic-entities.js.map → dynamic-entities.cjs.map} +0 -0
- /package/build/{entity-context.js.map → entity-context.cjs.map} +0 -0
- /package/build/{entity-provider.js.map → entity-provider.cjs.map} +0 -0
- /package/build/entity-types/{attachment.js.map → attachment.cjs.map} +0 -0
- /package/build/entity-types/{base-entity-records.js.map → base-entity-records.cjs.map} +0 -0
- /package/build/entity-types/{base.js.map → base.cjs.map} +0 -0
- /package/build/entity-types/{comment.js.map → comment.cjs.map} +0 -0
- /package/build/entity-types/{global-styles-revision.js.map → global-styles-revision.cjs.map} +0 -0
- /package/build/entity-types/{helpers.js.map → helpers.cjs.map} +0 -0
- /package/build/entity-types/{menu-location.js.map → menu-location.cjs.map} +0 -0
- /package/build/entity-types/{nav-menu-item.js.map → nav-menu-item.cjs.map} +0 -0
- /package/build/entity-types/{nav-menu.js.map → nav-menu.cjs.map} +0 -0
- /package/build/entity-types/{page.js.map → page.cjs.map} +0 -0
- /package/build/entity-types/{plugin.js.map → plugin.cjs.map} +0 -0
- /package/build/entity-types/{post-revision.js.map → post-revision.cjs.map} +0 -0
- /package/build/entity-types/{post-status.js.map → post-status.cjs.map} +0 -0
- /package/build/entity-types/{post.js.map → post.cjs.map} +0 -0
- /package/build/entity-types/{settings.js.map → settings.cjs.map} +0 -0
- /package/build/entity-types/{sidebar.js.map → sidebar.cjs.map} +0 -0
- /package/build/entity-types/{taxonomy.js.map → taxonomy.cjs.map} +0 -0
- /package/build/entity-types/{term.js.map → term.cjs.map} +0 -0
- /package/build/entity-types/{theme.js.map → theme.cjs.map} +0 -0
- /package/build/entity-types/{type.js.map → type.cjs.map} +0 -0
- /package/build/entity-types/{user.js.map → user.cjs.map} +0 -0
- /package/build/entity-types/{widget-type.js.map → widget-type.cjs.map} +0 -0
- /package/build/entity-types/{widget.js.map → widget.cjs.map} +0 -0
- /package/build/entity-types/{wp-template-part.js.map → wp-template-part.cjs.map} +0 -0
- /package/build/entity-types/{wp-template.js.map → wp-template.cjs.map} +0 -0
- /package/build/fetch/{__experimental-fetch-link-suggestions.js.map → __experimental-fetch-link-suggestions.cjs.map} +0 -0
- /package/build/fetch/{__experimental-fetch-url-data.js.map → __experimental-fetch-url-data.cjs.map} +0 -0
- /package/build/fetch/{index.js.map → index.cjs.map} +0 -0
- /package/build/footnotes/{get-footnotes-order.js.map → get-footnotes-order.cjs.map} +0 -0
- /package/build/footnotes/{get-rich-text-values-cached.js.map → get-rich-text-values-cached.cjs.map} +0 -0
- /package/build/footnotes/{index.js.map → index.cjs.map} +0 -0
- /package/build/hooks/{constants.js.map → constants.cjs.map} +0 -0
- /package/build/hooks/{index.js.map → index.cjs.map} +0 -0
- /package/build/hooks/{memoize.js.map → memoize.cjs.map} +0 -0
- /package/build/hooks/{use-entity-block-editor.js.map → use-entity-block-editor.cjs.map} +0 -0
- /package/build/hooks/{use-entity-id.js.map → use-entity-id.cjs.map} +0 -0
- /package/build/hooks/{use-entity-prop.js.map → use-entity-prop.cjs.map} +0 -0
- /package/build/hooks/{use-entity-records.js.map → use-entity-records.cjs.map} +0 -0
- /package/build/hooks/{use-query-select.js.map → use-query-select.cjs.map} +0 -0
- /package/build/hooks/{use-resource-permissions.js.map → use-resource-permissions.cjs.map} +0 -0
- /package/build/{lock-unlock.js.map → lock-unlock.cjs.map} +0 -0
- /package/build/locks/{actions.js.map → actions.cjs.map} +0 -0
- /package/build/locks/{engine.js.map → engine.cjs.map} +0 -0
- /package/build/locks/{reducer.js.map → reducer.cjs.map} +0 -0
- /package/build/locks/{selectors.js.map → selectors.cjs.map} +0 -0
- /package/build/locks/{utils.js.map → utils.cjs.map} +0 -0
- /package/build/{name.js.map → name.cjs.map} +0 -0
- /package/build/{private-actions.js.map → private-actions.cjs.map} +0 -0
- /package/build/{private-apis.js.map → private-apis.cjs.map} +0 -0
- /package/build/queried-data/{actions.js.map → actions.cjs.map} +0 -0
- /package/build/queried-data/{get-query-parts.js.map → get-query-parts.cjs.map} +0 -0
- /package/build/queried-data/{reducer.js.map → reducer.cjs.map} +0 -0
- /package/build/queried-data/{selectors.js.map → selectors.cjs.map} +0 -0
- /package/build/{reducer.js.map → reducer.cjs.map} +0 -0
- /package/build/{sync.js.map → sync.cjs.map} +0 -0
- /package/build/utils/{conservative-map-item.js.map → conservative-map-item.cjs.map} +0 -0
- /package/build/utils/{forward-resolver.js.map → forward-resolver.cjs.map} +0 -0
- /package/build/utils/{get-nested-value.js.map → get-nested-value.cjs.map} +0 -0
- /package/build/utils/{get-normalized-comma-separable.js.map → get-normalized-comma-separable.cjs.map} +0 -0
- /package/build/utils/{if-matching-action.js.map → if-matching-action.cjs.map} +0 -0
- /package/build/utils/{index.js.map → index.cjs.map} +0 -0
- /package/build/utils/{is-numeric-id.js.map → is-numeric-id.cjs.map} +0 -0
- /package/build/utils/{is-raw-attribute.js.map → is-raw-attribute.cjs.map} +0 -0
- /package/build/utils/{log-entity-deprecation.js.map → log-entity-deprecation.cjs.map} +0 -0
- /package/build/utils/{on-sub-key.js.map → on-sub-key.cjs.map} +0 -0
- /package/build/utils/{receive-intermediate-results.js.map → receive-intermediate-results.cjs.map} +0 -0
- /package/build/utils/{replace-action.js.map → replace-action.cjs.map} +0 -0
- /package/build/utils/{set-nested-value.js.map → set-nested-value.cjs.map} +0 -0
- /package/build/utils/{user-permissions.js.map → user-permissions.cjs.map} +0 -0
- /package/build/utils/{with-weak-map-cache.js.map → with-weak-map-cache.cjs.map} +0 -0
|
@@ -16,4 +16,4 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
16
16
|
// packages/core-data/src/entity-types/wp-template.ts
|
|
17
17
|
var wp_template_exports = {};
|
|
18
18
|
module.exports = __toCommonJS(wp_template_exports);
|
|
19
|
-
//# sourceMappingURL=wp-template.
|
|
19
|
+
//# sourceMappingURL=wp-template.cjs.map
|
|
@@ -35,7 +35,7 @@ __export(experimental_fetch_link_suggestions_exports, {
|
|
|
35
35
|
tokenize: () => tokenize
|
|
36
36
|
});
|
|
37
37
|
module.exports = __toCommonJS(experimental_fetch_link_suggestions_exports);
|
|
38
|
-
var import_api_fetch = __toESM(require("@wordpress/api-fetch"));
|
|
38
|
+
var import_api_fetch = __toESM(require("@wordpress/api-fetch"), 1);
|
|
39
39
|
var import_url = require("@wordpress/url");
|
|
40
40
|
var import_html_entities = require("@wordpress/html-entities");
|
|
41
41
|
var import_i18n = require("@wordpress/i18n");
|
|
@@ -186,4 +186,4 @@ function tokenize(text) {
|
|
|
186
186
|
sortResults,
|
|
187
187
|
tokenize
|
|
188
188
|
});
|
|
189
|
-
//# sourceMappingURL=__experimental-fetch-link-suggestions.
|
|
189
|
+
//# sourceMappingURL=__experimental-fetch-link-suggestions.cjs.map
|
|
@@ -33,7 +33,7 @@ __export(experimental_fetch_url_data_exports, {
|
|
|
33
33
|
default: () => experimental_fetch_url_data_default
|
|
34
34
|
});
|
|
35
35
|
module.exports = __toCommonJS(experimental_fetch_url_data_exports);
|
|
36
|
-
var import_api_fetch = __toESM(require("@wordpress/api-fetch"));
|
|
36
|
+
var import_api_fetch = __toESM(require("@wordpress/api-fetch"), 1);
|
|
37
37
|
var import_url = require("@wordpress/url");
|
|
38
38
|
var CACHE = /* @__PURE__ */ new Map();
|
|
39
39
|
var fetchUrlData = async (url, options = {}) => {
|
|
@@ -62,4 +62,4 @@ var fetchUrlData = async (url, options = {}) => {
|
|
|
62
62
|
});
|
|
63
63
|
};
|
|
64
64
|
var experimental_fetch_url_data_default = fetchUrlData;
|
|
65
|
-
//# sourceMappingURL=__experimental-fetch-url-data.
|
|
65
|
+
//# sourceMappingURL=__experimental-fetch-url-data.cjs.map
|
|
@@ -36,9 +36,9 @@ __export(fetch_exports, {
|
|
|
36
36
|
});
|
|
37
37
|
module.exports = __toCommonJS(fetch_exports);
|
|
38
38
|
var import_change_case = require("change-case");
|
|
39
|
-
var import_api_fetch = __toESM(require("@wordpress/api-fetch"));
|
|
40
|
-
var import_experimental_fetch_link_suggestions = __toESM(require("./__experimental-fetch-link-suggestions"));
|
|
41
|
-
var import_experimental_fetch_url_data = __toESM(require("./__experimental-fetch-url-data"));
|
|
39
|
+
var import_api_fetch = __toESM(require("@wordpress/api-fetch"), 1);
|
|
40
|
+
var import_experimental_fetch_link_suggestions = __toESM(require("./__experimental-fetch-link-suggestions.cjs"), 1);
|
|
41
|
+
var import_experimental_fetch_url_data = __toESM(require("./__experimental-fetch-url-data.cjs"), 1);
|
|
42
42
|
async function fetchBlockPatterns() {
|
|
43
43
|
const restPatterns = await (0, import_api_fetch.default)({
|
|
44
44
|
path: "/wp/v2/block-patterns/patterns"
|
|
@@ -61,4 +61,4 @@ async function fetchBlockPatterns() {
|
|
|
61
61
|
__experimentalFetchUrlData,
|
|
62
62
|
fetchBlockPatterns
|
|
63
63
|
});
|
|
64
|
-
//# sourceMappingURL=index.
|
|
64
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -33,7 +33,7 @@ __export(get_footnotes_order_exports, {
|
|
|
33
33
|
default: () => getFootnotesOrder
|
|
34
34
|
});
|
|
35
35
|
module.exports = __toCommonJS(get_footnotes_order_exports);
|
|
36
|
-
var import_get_rich_text_values_cached = __toESM(require("./get-rich-text-values-cached"));
|
|
36
|
+
var import_get_rich_text_values_cached = __toESM(require("./get-rich-text-values-cached.cjs"), 1);
|
|
37
37
|
var cache = /* @__PURE__ */ new WeakMap();
|
|
38
38
|
function getBlockFootnotesOrder(block) {
|
|
39
39
|
if (!cache.has(block)) {
|
|
@@ -55,4 +55,4 @@ function getBlockFootnotesOrder(block) {
|
|
|
55
55
|
function getFootnotesOrder(blocks) {
|
|
56
56
|
return blocks.flatMap(getBlockFootnotesOrder);
|
|
57
57
|
}
|
|
58
|
-
//# sourceMappingURL=get-footnotes-order.
|
|
58
|
+
//# sourceMappingURL=get-footnotes-order.cjs.map
|
|
@@ -24,7 +24,7 @@ __export(get_rich_text_values_cached_exports, {
|
|
|
24
24
|
});
|
|
25
25
|
module.exports = __toCommonJS(get_rich_text_values_cached_exports);
|
|
26
26
|
var import_block_editor = require("@wordpress/block-editor");
|
|
27
|
-
var import_lock_unlock = require("../lock-unlock");
|
|
27
|
+
var import_lock_unlock = require("../lock-unlock.cjs");
|
|
28
28
|
var unlockedApis;
|
|
29
29
|
var cache = /* @__PURE__ */ new WeakMap();
|
|
30
30
|
function getRichTextValuesCached(block) {
|
|
@@ -37,4 +37,4 @@ function getRichTextValuesCached(block) {
|
|
|
37
37
|
}
|
|
38
38
|
return cache.get(block);
|
|
39
39
|
}
|
|
40
|
-
//# sourceMappingURL=get-rich-text-values-cached.
|
|
40
|
+
//# sourceMappingURL=get-rich-text-values-cached.cjs.map
|
|
@@ -34,7 +34,7 @@ __export(footnotes_exports, {
|
|
|
34
34
|
});
|
|
35
35
|
module.exports = __toCommonJS(footnotes_exports);
|
|
36
36
|
var import_rich_text = require("@wordpress/rich-text");
|
|
37
|
-
var import_get_footnotes_order = __toESM(require("./get-footnotes-order"));
|
|
37
|
+
var import_get_footnotes_order = __toESM(require("./get-footnotes-order.cjs"), 1);
|
|
38
38
|
var oldFootnotes = {};
|
|
39
39
|
function updateFootnotesFromMeta(blocks, meta) {
|
|
40
40
|
const output = { blocks };
|
|
@@ -131,4 +131,4 @@ function updateFootnotesFromMeta(blocks, meta) {
|
|
|
131
131
|
0 && (module.exports = {
|
|
132
132
|
updateFootnotesFromMeta
|
|
133
133
|
});
|
|
134
|
-
//# sourceMappingURL=index.
|
|
134
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -41,12 +41,12 @@ __export(hooks_exports, {
|
|
|
41
41
|
useResourcePermissions: () => import_use_resource_permissions.default
|
|
42
42
|
});
|
|
43
43
|
module.exports = __toCommonJS(hooks_exports);
|
|
44
|
-
var import_use_entity_record = __toESM(require("./use-entity-record"));
|
|
45
|
-
var import_use_entity_records = __toESM(require("./use-entity-records"));
|
|
46
|
-
var import_use_resource_permissions = __toESM(require("./use-resource-permissions"));
|
|
47
|
-
var import_use_entity_block_editor = __toESM(require("./use-entity-block-editor"));
|
|
48
|
-
var import_use_entity_id = __toESM(require("./use-entity-id"));
|
|
49
|
-
var import_use_entity_prop = __toESM(require("./use-entity-prop"));
|
|
44
|
+
var import_use_entity_record = __toESM(require("./use-entity-record.cjs"), 1);
|
|
45
|
+
var import_use_entity_records = __toESM(require("./use-entity-records.cjs"), 1);
|
|
46
|
+
var import_use_resource_permissions = __toESM(require("./use-resource-permissions.cjs"), 1);
|
|
47
|
+
var import_use_entity_block_editor = __toESM(require("./use-entity-block-editor.cjs"), 1);
|
|
48
|
+
var import_use_entity_id = __toESM(require("./use-entity-id.cjs"), 1);
|
|
49
|
+
var import_use_entity_prop = __toESM(require("./use-entity-prop.cjs"), 1);
|
|
50
50
|
// Annotate the CommonJS export names for ESM import in node:
|
|
51
51
|
0 && (module.exports = {
|
|
52
52
|
__experimentalUseEntityRecord,
|
|
@@ -59,4 +59,4 @@ var import_use_entity_prop = __toESM(require("./use-entity-prop"));
|
|
|
59
59
|
useEntityRecords,
|
|
60
60
|
useResourcePermissions
|
|
61
61
|
});
|
|
62
|
-
//# sourceMappingURL=index.
|
|
62
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -33,6 +33,6 @@ __export(memoize_exports, {
|
|
|
33
33
|
default: () => memoize_default
|
|
34
34
|
});
|
|
35
35
|
module.exports = __toCommonJS(memoize_exports);
|
|
36
|
-
var import_memize = __toESM(require("memize"));
|
|
36
|
+
var import_memize = __toESM(require("memize"), 1);
|
|
37
37
|
var memoize_default = import_memize.default;
|
|
38
|
-
//# sourceMappingURL=memoize.
|
|
38
|
+
//# sourceMappingURL=memoize.cjs.map
|
|
@@ -36,9 +36,9 @@ module.exports = __toCommonJS(use_entity_block_editor_exports);
|
|
|
36
36
|
var import_element = require("@wordpress/element");
|
|
37
37
|
var import_data = require("@wordpress/data");
|
|
38
38
|
var import_blocks = require("@wordpress/blocks");
|
|
39
|
-
var import_name = require("../name");
|
|
40
|
-
var import_use_entity_id = __toESM(require("./use-entity-id"));
|
|
41
|
-
var import_footnotes = require("../footnotes");
|
|
39
|
+
var import_name = require("../name.cjs");
|
|
40
|
+
var import_use_entity_id = __toESM(require("./use-entity-id.cjs"), 1);
|
|
41
|
+
var import_footnotes = require("../footnotes/index.cjs");
|
|
42
42
|
var EMPTY_ARRAY = [];
|
|
43
43
|
var parsedBlocksCache = /* @__PURE__ */ new WeakMap();
|
|
44
44
|
function useEntityBlockEditor(kind, name, { id: _id } = {}) {
|
|
@@ -130,4 +130,4 @@ function useEntityBlockEditor(kind, name, { id: _id } = {}) {
|
|
|
130
130
|
);
|
|
131
131
|
return [blocks, onInput, onChange];
|
|
132
132
|
}
|
|
133
|
-
//# sourceMappingURL=use-entity-block-editor.
|
|
133
|
+
//# sourceMappingURL=use-entity-block-editor.cjs.map
|
|
@@ -24,9 +24,9 @@ __export(use_entity_id_exports, {
|
|
|
24
24
|
});
|
|
25
25
|
module.exports = __toCommonJS(use_entity_id_exports);
|
|
26
26
|
var import_element = require("@wordpress/element");
|
|
27
|
-
var import_entity_context = require("../entity-context");
|
|
27
|
+
var import_entity_context = require("../entity-context.cjs");
|
|
28
28
|
function useEntityId(kind, name) {
|
|
29
29
|
const context = (0, import_element.useContext)(import_entity_context.EntityContext);
|
|
30
30
|
return context?.[kind]?.[name];
|
|
31
31
|
}
|
|
32
|
-
//# sourceMappingURL=use-entity-id.
|
|
32
|
+
//# sourceMappingURL=use-entity-id.cjs.map
|
|
@@ -35,8 +35,8 @@ __export(use_entity_prop_exports, {
|
|
|
35
35
|
module.exports = __toCommonJS(use_entity_prop_exports);
|
|
36
36
|
var import_element = require("@wordpress/element");
|
|
37
37
|
var import_data = require("@wordpress/data");
|
|
38
|
-
var import_name = require("../name");
|
|
39
|
-
var import_use_entity_id = __toESM(require("./use-entity-id"));
|
|
38
|
+
var import_name = require("../name.cjs");
|
|
39
|
+
var import_use_entity_id = __toESM(require("./use-entity-id.cjs"), 1);
|
|
40
40
|
function useEntityProp(kind, name, prop, _id) {
|
|
41
41
|
const providerId = (0, import_use_entity_id.default)(kind, name);
|
|
42
42
|
const id = _id ?? providerId;
|
|
@@ -63,4 +63,4 @@ function useEntityProp(kind, name, prop, _id) {
|
|
|
63
63
|
);
|
|
64
64
|
return [value, setValue, fullValue];
|
|
65
65
|
}
|
|
66
|
-
//# sourceMappingURL=use-entity-prop.
|
|
66
|
+
//# sourceMappingURL=use-entity-prop.cjs.map
|
|
@@ -35,10 +35,10 @@ __export(use_entity_record_exports, {
|
|
|
35
35
|
});
|
|
36
36
|
module.exports = __toCommonJS(use_entity_record_exports);
|
|
37
37
|
var import_data = require("@wordpress/data");
|
|
38
|
-
var import_deprecated = __toESM(require("@wordpress/deprecated"));
|
|
38
|
+
var import_deprecated = __toESM(require("@wordpress/deprecated"), 1);
|
|
39
39
|
var import_element = require("@wordpress/element");
|
|
40
|
-
var import_use_query_select = __toESM(require("./use-query-select"));
|
|
41
|
-
var import__ = require("../");
|
|
40
|
+
var import_use_query_select = __toESM(require("./use-query-select.cjs"), 1);
|
|
41
|
+
var import__ = require("../index.cjs");
|
|
42
42
|
var EMPTY_OBJECT = {};
|
|
43
43
|
function useEntityRecord(kind, name, recordId, options = { enabled: true }) {
|
|
44
44
|
const { editEntityRecord, saveEditedEntityRecord } = (0, import_data.useDispatch)(import__.store);
|
|
@@ -112,4 +112,4 @@ function __experimentalUseEntityRecord(kind, name, recordId, options) {
|
|
|
112
112
|
0 && (module.exports = {
|
|
113
113
|
__experimentalUseEntityRecord
|
|
114
114
|
});
|
|
115
|
-
//# sourceMappingURL=use-entity-record.
|
|
115
|
+
//# sourceMappingURL=use-entity-record.cjs.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\
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAAuC;AACvC,wBAAuB;AACvB,qBAAwB;AAKxB,8BAA2B;AAC3B,eAAmC;AA+CnC,IAAM,eAAe,CAAC;
|
|
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": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAAuC;AACvC,wBAAuB;AACvB,qBAAwB;AAKxB,8BAA2B;AAC3B,eAAmC;AA+CnC,IAAM,eAAe,CAAC;AA2FP,SAAR,gBACN,MACA,MACA,UACA,UAAmB,EAAE,SAAS,KAAK,GACI;AACvC,QAAM,EAAE,kBAAkB,uBAAuB,QAChD,yBAAa,SAAAA,KAAU;AAExB,QAAM,gBAAY;AAAA,IACjB,OAAQ;AAAA,MACP,MAAM,CAAEC,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,QAAI;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,SAAAD,KAAU,EAAE;AAAA,UACjC;AAAA,UACA;AAAA,UACA;AAAA,QACD;AAAA,QACA,UAAU,OAAQ,SAAAA,KAAU,EAAE;AAAA,UAC7B;AAAA,UACA;AAAA,UACA;AAAA,QACD;AAAA,QACA,OAAO,OAAQ,SAAAA,KAAU,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,QAAI,wBAAAE;AAAA,IAC5C,CAAE,UAAW;AACZ,UAAK,CAAE,QAAQ,SAAU;AACxB,eAAO;AAAA,UACN,MAAM;AAAA,QACP;AAAA,MACD;AACA,aAAO,MAAO,SAAAF,KAAU,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,wBAAAG,SAAY,yCAAyC;AAAA,IACpD,aAAa;AAAA,IACb,OAAO;AAAA,EACR,CAAE;AACF,SAAO,gBAAiB,MAAM,MAAM,UAAU,OAAQ;AACvD;",
|
|
6
6
|
"names": ["coreStore", "record", "useQuerySelect", "deprecated"]
|
|
7
7
|
}
|
|
@@ -36,13 +36,13 @@ __export(use_entity_records_exports, {
|
|
|
36
36
|
});
|
|
37
37
|
module.exports = __toCommonJS(use_entity_records_exports);
|
|
38
38
|
var import_url = require("@wordpress/url");
|
|
39
|
-
var import_deprecated = __toESM(require("@wordpress/deprecated"));
|
|
39
|
+
var import_deprecated = __toESM(require("@wordpress/deprecated"), 1);
|
|
40
40
|
var import_data = require("@wordpress/data");
|
|
41
41
|
var import_element = require("@wordpress/element");
|
|
42
|
-
var import_use_query_select = __toESM(require("./use-query-select"));
|
|
43
|
-
var import__ = require("../");
|
|
44
|
-
var import_lock_unlock = require("../lock-unlock");
|
|
45
|
-
var import_utils = require("../utils");
|
|
42
|
+
var import_use_query_select = __toESM(require("./use-query-select.cjs"), 1);
|
|
43
|
+
var import__ = require("../index.cjs");
|
|
44
|
+
var import_lock_unlock = require("../lock-unlock.cjs");
|
|
45
|
+
var import_utils = require("../utils/index.cjs");
|
|
46
46
|
var EMPTY_ARRAY = [];
|
|
47
47
|
function useEntityRecords(kind, name, queryArgs = {}, options = { enabled: true }) {
|
|
48
48
|
const queryAsString = (0, import_url.addQueryArgs)("", queryArgs);
|
|
@@ -150,4 +150,4 @@ function useEntityRecordsWithPermissions(kind, name, queryArgs = {}, options = {
|
|
|
150
150
|
__experimentalUseEntityRecords,
|
|
151
151
|
useEntityRecordsWithPermissions
|
|
152
152
|
});
|
|
153
|
-
//# sourceMappingURL=use-entity-records.
|
|
153
|
+
//# sourceMappingURL=use-entity-records.cjs.map
|
|
@@ -35,8 +35,8 @@ __export(use_query_select_exports, {
|
|
|
35
35
|
});
|
|
36
36
|
module.exports = __toCommonJS(use_query_select_exports);
|
|
37
37
|
var import_data = require("@wordpress/data");
|
|
38
|
-
var import_memoize = __toESM(require("./memoize"));
|
|
39
|
-
var import_constants = require("./constants");
|
|
38
|
+
var import_memoize = __toESM(require("./memoize.cjs"), 1);
|
|
39
|
+
var import_constants = require("./constants.cjs");
|
|
40
40
|
var META_SELECTORS = [
|
|
41
41
|
"getIsResolving",
|
|
42
42
|
"hasStartedResolution",
|
|
@@ -94,4 +94,4 @@ var enrichSelectors = (0, import_memoize.default)(((selectors) => {
|
|
|
94
94
|
0 && (module.exports = {
|
|
95
95
|
META_SELECTORS
|
|
96
96
|
});
|
|
97
|
-
//# sourceMappingURL=use-query-select.
|
|
97
|
+
//# sourceMappingURL=use-query-select.cjs.map
|
|
@@ -34,11 +34,11 @@ __export(use_resource_permissions_exports, {
|
|
|
34
34
|
default: () => use_resource_permissions_default
|
|
35
35
|
});
|
|
36
36
|
module.exports = __toCommonJS(use_resource_permissions_exports);
|
|
37
|
-
var import_deprecated = __toESM(require("@wordpress/deprecated"));
|
|
38
|
-
var import_warning = __toESM(require("@wordpress/warning"));
|
|
39
|
-
var import__ = require("../");
|
|
40
|
-
var import_constants = require("./constants");
|
|
41
|
-
var import_use_query_select = __toESM(require("./use-query-select"));
|
|
37
|
+
var import_deprecated = __toESM(require("@wordpress/deprecated"), 1);
|
|
38
|
+
var import_warning = __toESM(require("@wordpress/warning"), 1);
|
|
39
|
+
var import__ = require("../index.cjs");
|
|
40
|
+
var import_constants = require("./constants.cjs");
|
|
41
|
+
var import_use_query_select = __toESM(require("./use-query-select.cjs"), 1);
|
|
42
42
|
function useResourcePermissions(resource, id) {
|
|
43
43
|
const isEntity = typeof resource === "object";
|
|
44
44
|
const resourceAsString = isEntity ? JSON.stringify(resource) : resource;
|
|
@@ -109,4 +109,4 @@ function __experimentalUseResourcePermissions(resource, id) {
|
|
|
109
109
|
0 && (module.exports = {
|
|
110
110
|
__experimentalUseResourcePermissions
|
|
111
111
|
});
|
|
112
|
-
//# sourceMappingURL=use-resource-permissions.
|
|
112
|
+
//# sourceMappingURL=use-resource-permissions.cjs.map
|
|
@@ -36,24 +36,24 @@ __export(index_exports, {
|
|
|
36
36
|
});
|
|
37
37
|
module.exports = __toCommonJS(index_exports);
|
|
38
38
|
var import_data = require("@wordpress/data");
|
|
39
|
-
var import_reducer = __toESM(require("./reducer"));
|
|
40
|
-
var selectors = __toESM(require("./selectors"));
|
|
41
|
-
var privateSelectors = __toESM(require("./private-selectors"));
|
|
42
|
-
var actions = __toESM(require("./actions"));
|
|
43
|
-
var privateActions = __toESM(require("./private-actions"));
|
|
44
|
-
var resolvers = __toESM(require("./resolvers"));
|
|
45
|
-
var import_actions = __toESM(require("./locks/actions"));
|
|
46
|
-
var import_entities = require("./entities");
|
|
47
|
-
var import_name = require("./name");
|
|
48
|
-
var import_lock_unlock = require("./lock-unlock");
|
|
49
|
-
var import_dynamic_entities = require("./dynamic-entities");
|
|
50
|
-
var import_log_entity_deprecation = __toESM(require("./utils/log-entity-deprecation"));
|
|
51
|
-
var import_entity_provider = __toESM(require("./entity-provider"));
|
|
52
|
-
__reExport(index_exports, require("./entity-provider"), module.exports);
|
|
53
|
-
__reExport(index_exports, require("./entity-types"), module.exports);
|
|
54
|
-
__reExport(index_exports, require("./fetch"), module.exports);
|
|
55
|
-
__reExport(index_exports, require("./hooks"), module.exports);
|
|
56
|
-
__reExport(index_exports, require("./private-apis"), module.exports);
|
|
39
|
+
var import_reducer = __toESM(require("./reducer.cjs"), 1);
|
|
40
|
+
var selectors = __toESM(require("./selectors.cjs"), 1);
|
|
41
|
+
var privateSelectors = __toESM(require("./private-selectors.cjs"), 1);
|
|
42
|
+
var actions = __toESM(require("./actions.cjs"), 1);
|
|
43
|
+
var privateActions = __toESM(require("./private-actions.cjs"), 1);
|
|
44
|
+
var resolvers = __toESM(require("./resolvers.cjs"), 1);
|
|
45
|
+
var import_actions = __toESM(require("./locks/actions.cjs"), 1);
|
|
46
|
+
var import_entities = require("./entities.cjs");
|
|
47
|
+
var import_name = require("./name.cjs");
|
|
48
|
+
var import_lock_unlock = require("./lock-unlock.cjs");
|
|
49
|
+
var import_dynamic_entities = require("./dynamic-entities.cjs");
|
|
50
|
+
var import_log_entity_deprecation = __toESM(require("./utils/log-entity-deprecation.cjs"), 1);
|
|
51
|
+
var import_entity_provider = __toESM(require("./entity-provider.cjs"), 1);
|
|
52
|
+
__reExport(index_exports, require("./entity-provider.cjs"), module.exports);
|
|
53
|
+
__reExport(index_exports, require("./entity-types/index.cjs"), module.exports);
|
|
54
|
+
__reExport(index_exports, require("./fetch/index.cjs"), module.exports);
|
|
55
|
+
__reExport(index_exports, require("./hooks/index.cjs"), module.exports);
|
|
56
|
+
__reExport(index_exports, require("./private-apis.cjs"), module.exports);
|
|
57
57
|
var entitiesConfig = [
|
|
58
58
|
...import_entities.rootEntitiesConfig,
|
|
59
59
|
...import_entities.additionalEntityConfigLoaders.filter((config) => !!config.name)
|
|
@@ -146,10 +146,10 @@ var store = (0, import_data.createReduxStore)(import_name.STORE_NAME, storeConfi
|
|
|
146
146
|
0 && (module.exports = {
|
|
147
147
|
EntityProvider,
|
|
148
148
|
store,
|
|
149
|
-
...require("./entity-provider"),
|
|
150
|
-
...require("./entity-types"),
|
|
151
|
-
...require("./fetch"),
|
|
152
|
-
...require("./hooks"),
|
|
153
|
-
...require("./private-apis")
|
|
149
|
+
...require("./entity-provider.cjs"),
|
|
150
|
+
...require("./entity-types/index.cjs"),
|
|
151
|
+
...require("./fetch/index.cjs"),
|
|
152
|
+
...require("./hooks/index.cjs"),
|
|
153
|
+
...require("./private-apis.cjs")
|
|
154
154
|
});
|
|
155
|
-
//# sourceMappingURL=index.
|
|
155
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/index.js"],
|
|
4
4
|
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { createReduxStore, register } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport reducer from './reducer';\nimport * as selectors from './selectors';\nimport * as privateSelectors from './private-selectors';\nimport * as actions from './actions';\nimport * as privateActions from './private-actions';\nimport * as resolvers from './resolvers';\nimport createLocksActions from './locks/actions';\nimport {\n\trootEntitiesConfig,\n\tadditionalEntityConfigLoaders,\n\tgetMethodName,\n} from './entities';\nimport { STORE_NAME } from './name';\nimport { unlock } from './lock-unlock';\nimport { dynamicActions, dynamicSelectors } from './dynamic-entities';\nimport logEntityDeprecation from './utils/log-entity-deprecation';\n\n// The entity selectors/resolvers and actions are shortcuts to their generic equivalents\n// (getEntityRecord, getEntityRecords, updateEntityRecord, updateEntityRecords)\n// Instead of getEntityRecord, the consumer could use more user-friendly named selector: getPostType, getTaxonomy...\n// The \"kind\" and the \"name\" of the entity are combined to generate these shortcuts.\nconst entitiesConfig = [\n\t...rootEntitiesConfig,\n\t...additionalEntityConfigLoaders.filter( ( config ) => !! config.name ),\n];\n\nconst entitySelectors = entitiesConfig.reduce( ( result, entity ) => {\n\tconst { kind, name, plural } = entity;\n\n\tconst getEntityRecordMethodName = getMethodName( kind, name );\n\tresult[ getEntityRecordMethodName ] = ( state, key, query ) => {\n\t\tlogEntityDeprecation( kind, name, getEntityRecordMethodName, {\n\t\t\tisShorthandSelector: true,\n\t\t\talternativeFunctionName: 'getEntityRecord',\n\t\t} );\n\t\treturn selectors.getEntityRecord( state, kind, name, key, query );\n\t};\n\n\tif ( plural ) {\n\t\tconst getEntityRecordsMethodName = getMethodName( kind, plural, 'get' );\n\t\tresult[ getEntityRecordsMethodName ] = ( state, query ) => {\n\t\t\tlogEntityDeprecation( kind, name, getEntityRecordsMethodName, {\n\t\t\t\tisShorthandSelector: true,\n\t\t\t\talternativeFunctionName: 'getEntityRecords',\n\t\t\t} );\n\t\t\treturn selectors.getEntityRecords( state, kind, name, query );\n\t\t};\n\t}\n\treturn result;\n}, {} );\n\nconst entityResolvers = entitiesConfig.reduce( ( result, entity ) => {\n\tconst { kind, name, plural } = entity;\n\tconst getEntityRecordMethodName = getMethodName( kind, name );\n\tresult[ getEntityRecordMethodName ] = ( key, query ) => {\n\t\tlogEntityDeprecation( kind, name, getEntityRecordMethodName, {\n\t\t\tisShorthandSelector: true,\n\t\t\talternativeFunctionName: 'getEntityRecord',\n\t\t} );\n\t\treturn resolvers.getEntityRecord( kind, name, key, query );\n\t};\n\n\tif ( plural ) {\n\t\tconst getEntityRecordsMethodName = getMethodName( kind, plural, 'get' );\n\t\tresult[ getEntityRecordsMethodName ] = ( ...args ) => {\n\t\t\tlogEntityDeprecation( kind, plural, getEntityRecordsMethodName, {\n\t\t\t\tisShorthandSelector: true,\n\t\t\t\talternativeFunctionName: 'getEntityRecords',\n\t\t\t} );\n\t\t\treturn resolvers.getEntityRecords( kind, name, ...args );\n\t\t};\n\t\tresult[ getEntityRecordsMethodName ].shouldInvalidate = ( action ) =>\n\t\t\tresolvers.getEntityRecords.shouldInvalidate( action, kind, name );\n\t}\n\treturn result;\n}, {} );\n\nconst entityActions = entitiesConfig.reduce( ( result, entity ) => {\n\tconst { kind, name } = entity;\n\n\tconst saveEntityRecordMethodName = getMethodName( kind, name, 'save' );\n\tresult[ saveEntityRecordMethodName ] = ( record, options ) => {\n\t\tlogEntityDeprecation( kind, name, saveEntityRecordMethodName, {\n\t\t\tisShorthandSelector: true,\n\t\t\talternativeFunctionName: 'saveEntityRecord',\n\t\t} );\n\t\treturn actions.saveEntityRecord( kind, name, record, options );\n\t};\n\n\tconst deleteEntityRecordMethodName = getMethodName( kind, name, 'delete' );\n\tresult[ deleteEntityRecordMethodName ] = ( key, query, options ) => {\n\t\tlogEntityDeprecation( kind, name, deleteEntityRecordMethodName, {\n\t\t\tisShorthandSelector: true,\n\t\t\talternativeFunctionName: 'deleteEntityRecord',\n\t\t} );\n\t\treturn actions.deleteEntityRecord( kind, name, key, query, options );\n\t};\n\n\treturn result;\n}, {} );\n\nconst storeConfig = () => ( {\n\treducer,\n\tactions: {\n\t\t...dynamicActions,\n\t\t...actions,\n\t\t...entityActions,\n\t\t...createLocksActions(),\n\t},\n\tselectors: {\n\t\t...dynamicSelectors,\n\t\t...selectors,\n\t\t...entitySelectors,\n\t},\n\tresolvers: { ...resolvers, ...entityResolvers },\n} );\n\n/**\n * Store definition for the code data namespace.\n *\n * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/data/README.md#createReduxStore\n */\nexport const store = createReduxStore( STORE_NAME, storeConfig() );\nunlock( store ).registerPrivateSelectors( privateSelectors );\nunlock( store ).registerPrivateActions( privateActions );\nregister( store ); // Register store after unlocking private selectors to allow resolvers to use them.\n\nexport { default as EntityProvider } from './entity-provider';\nexport * from './entity-provider';\nexport * from './entity-types';\nexport * from './fetch';\nexport * from './hooks';\nexport * from './private-apis';\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAA2C;AAK3C,qBAAoB;AACpB,gBAA2B;AAC3B,uBAAkC;AAClC,cAAyB;AACzB,qBAAgC;AAChC,gBAA2B;AAC3B,qBAA+B;AAC/B,sBAIO;AACP,kBAA2B;AAC3B,yBAAuB;AACvB,8BAAiD;AACjD,oCAAiC;AAgHjC,6BAA0C;AAC1C,0BAAc,
|
|
5
|
+
"mappings": "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",
|
|
6
6
|
"names": ["logEntityDeprecation", "reducer", "createLocksActions"]
|
|
7
7
|
}
|
|
@@ -33,7 +33,7 @@ __export(actions_exports, {
|
|
|
33
33
|
default: () => createLocksActions
|
|
34
34
|
});
|
|
35
35
|
module.exports = __toCommonJS(actions_exports);
|
|
36
|
-
var import_engine = __toESM(require("./engine"));
|
|
36
|
+
var import_engine = __toESM(require("./engine.cjs"), 1);
|
|
37
37
|
function createLocksActions() {
|
|
38
38
|
const locks = (0, import_engine.default)();
|
|
39
39
|
function __unstableAcquireStoreLock(store, path, { exclusive }) {
|
|
@@ -44,4 +44,4 @@ function createLocksActions() {
|
|
|
44
44
|
}
|
|
45
45
|
return { __unstableAcquireStoreLock, __unstableReleaseStoreLock };
|
|
46
46
|
}
|
|
47
|
-
//# sourceMappingURL=actions.
|
|
47
|
+
//# sourceMappingURL=actions.cjs.map
|
|
@@ -33,8 +33,8 @@ __export(engine_exports, {
|
|
|
33
33
|
default: () => createLocks
|
|
34
34
|
});
|
|
35
35
|
module.exports = __toCommonJS(engine_exports);
|
|
36
|
-
var import_reducer = __toESM(require("./reducer"));
|
|
37
|
-
var import_selectors = require("./selectors");
|
|
36
|
+
var import_reducer = __toESM(require("./reducer.cjs"), 1);
|
|
37
|
+
var import_selectors = require("./selectors.cjs");
|
|
38
38
|
function createLocks() {
|
|
39
39
|
let state = (0, import_reducer.default)(void 0, { type: "@@INIT" });
|
|
40
40
|
function processPendingLockRequests() {
|
|
@@ -69,4 +69,4 @@ function createLocks() {
|
|
|
69
69
|
}
|
|
70
70
|
return { acquire, release };
|
|
71
71
|
}
|
|
72
|
-
//# sourceMappingURL=engine.
|
|
72
|
+
//# sourceMappingURL=engine.cjs.map
|
|
@@ -23,7 +23,7 @@ __export(reducer_exports, {
|
|
|
23
23
|
default: () => locks
|
|
24
24
|
});
|
|
25
25
|
module.exports = __toCommonJS(reducer_exports);
|
|
26
|
-
var import_utils = require("./utils");
|
|
26
|
+
var import_utils = require("./utils.cjs");
|
|
27
27
|
var DEFAULT_STATE = {
|
|
28
28
|
requests: [],
|
|
29
29
|
tree: {
|
|
@@ -67,4 +67,4 @@ function locks(state = DEFAULT_STATE, action) {
|
|
|
67
67
|
}
|
|
68
68
|
return state;
|
|
69
69
|
}
|
|
70
|
-
//# sourceMappingURL=reducer.
|
|
70
|
+
//# sourceMappingURL=reducer.cjs.map
|
|
@@ -24,7 +24,7 @@ __export(selectors_exports, {
|
|
|
24
24
|
isLockAvailable: () => isLockAvailable
|
|
25
25
|
});
|
|
26
26
|
module.exports = __toCommonJS(selectors_exports);
|
|
27
|
-
var import_utils = require("./utils");
|
|
27
|
+
var import_utils = require("./utils.cjs");
|
|
28
28
|
function getPendingLockRequests(state) {
|
|
29
29
|
return state.requests;
|
|
30
30
|
}
|
|
@@ -52,4 +52,4 @@ function isLockAvailable(state, store, path, { exclusive }) {
|
|
|
52
52
|
getPendingLockRequests,
|
|
53
53
|
isLockAvailable
|
|
54
54
|
});
|
|
55
|
-
//# sourceMappingURL=selectors.
|
|
55
|
+
//# sourceMappingURL=selectors.cjs.map
|
|
@@ -36,8 +36,8 @@ __export(private_actions_exports, {
|
|
|
36
36
|
receiveRegisteredPostMeta: () => receiveRegisteredPostMeta
|
|
37
37
|
});
|
|
38
38
|
module.exports = __toCommonJS(private_actions_exports);
|
|
39
|
-
var import_api_fetch = __toESM(require("@wordpress/api-fetch"));
|
|
40
|
-
var import_name = require("./name");
|
|
39
|
+
var import_api_fetch = __toESM(require("@wordpress/api-fetch"), 1);
|
|
40
|
+
var import_name = require("./name.cjs");
|
|
41
41
|
function receiveRegisteredPostMeta(postType, registeredPostMeta) {
|
|
42
42
|
return {
|
|
43
43
|
type: "RECEIVE_REGISTERED_POST_META",
|
|
@@ -132,4 +132,4 @@ function receiveEditorAssets(assets) {
|
|
|
132
132
|
receiveEditorSettings,
|
|
133
133
|
receiveRegisteredPostMeta
|
|
134
134
|
});
|
|
135
|
-
//# sourceMappingURL=private-actions.
|
|
135
|
+
//# sourceMappingURL=private-actions.cjs.map
|
|
@@ -23,9 +23,9 @@ __export(private_apis_exports, {
|
|
|
23
23
|
privateApis: () => privateApis
|
|
24
24
|
});
|
|
25
25
|
module.exports = __toCommonJS(private_apis_exports);
|
|
26
|
-
var import_use_entity_records = require("./hooks/use-entity-records");
|
|
27
|
-
var import_utils = require("./utils");
|
|
28
|
-
var import_lock_unlock = require("./lock-unlock");
|
|
26
|
+
var import_use_entity_records = require("./hooks/use-entity-records.cjs");
|
|
27
|
+
var import_utils = require("./utils/index.cjs");
|
|
28
|
+
var import_lock_unlock = require("./lock-unlock.cjs");
|
|
29
29
|
var privateApis = {};
|
|
30
30
|
(0, import_lock_unlock.lock)(privateApis, {
|
|
31
31
|
useEntityRecordsWithPermissions: import_use_entity_records.useEntityRecordsWithPermissions,
|
|
@@ -35,4 +35,4 @@ var privateApis = {};
|
|
|
35
35
|
0 && (module.exports = {
|
|
36
36
|
privateApis
|
|
37
37
|
});
|
|
38
|
-
//# sourceMappingURL=private-apis.
|
|
38
|
+
//# sourceMappingURL=private-apis.cjs.map
|
|
@@ -44,11 +44,17 @@ __export(private_selectors_exports, {
|
|
|
44
44
|
});
|
|
45
45
|
module.exports = __toCommonJS(private_selectors_exports);
|
|
46
46
|
var import_data = require("@wordpress/data");
|
|
47
|
-
var import_selectors = require("./selectors");
|
|
48
|
-
var import_name = require("./name");
|
|
49
|
-
var import_lock_unlock = require("./lock-unlock");
|
|
50
|
-
var
|
|
47
|
+
var import_selectors = require("./selectors.cjs");
|
|
48
|
+
var import_name = require("./name.cjs");
|
|
49
|
+
var import_lock_unlock = require("./lock-unlock.cjs");
|
|
50
|
+
var import_sync = require("./sync.cjs");
|
|
51
|
+
var import_log_entity_deprecation = __toESM(require("./utils/log-entity-deprecation.cjs"), 1);
|
|
51
52
|
function getUndoManager(state) {
|
|
53
|
+
if (window.__experimentalEnableSync) {
|
|
54
|
+
if (globalThis.IS_GUTENBERG_PLUGIN) {
|
|
55
|
+
return (0, import_sync.getSyncManager)()?.undoManager ?? state.undoManager;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
52
58
|
return state.undoManager;
|
|
53
59
|
}
|
|
54
60
|
function getNavigationFallbackId(state) {
|
|
@@ -216,4 +222,4 @@ function getEditorAssets(state) {
|
|
|
216
222
|
getTemplateId,
|
|
217
223
|
getUndoManager
|
|
218
224
|
});
|
|
219
|
-
//# sourceMappingURL=private-selectors.
|
|
225
|
+
//# sourceMappingURL=private-selectors.cjs.map
|