@wordpress/interface 9.16.1-next.f56bd8138.0 → 9.17.1-next.47f435fc9.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 (86) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/build/components/action-item/index.js +68 -66
  3. package/build/components/action-item/index.js.map +7 -1
  4. package/build/components/complementary-area/index.js +215 -194
  5. package/build/components/complementary-area/index.js.map +7 -1
  6. package/build/components/complementary-area-header/index.js +53 -33
  7. package/build/components/complementary-area-header/index.js.map +7 -1
  8. package/build/components/complementary-area-more-menu-item/index.js +60 -39
  9. package/build/components/complementary-area-more-menu-item/index.js.map +7 -1
  10. package/build/components/complementary-area-toggle/index.js +61 -50
  11. package/build/components/complementary-area-toggle/index.js.map +7 -1
  12. package/build/components/fullscreen-mode/index.js +33 -27
  13. package/build/components/fullscreen-mode/index.js.map +7 -1
  14. package/build/components/index.js +52 -55
  15. package/build/components/index.js.map +7 -1
  16. package/build/components/interface-skeleton/index.js +156 -132
  17. package/build/components/interface-skeleton/index.js.map +7 -1
  18. package/build/components/pinned-items/index.js +48 -39
  19. package/build/components/pinned-items/index.js.map +7 -1
  20. package/build/index.js +27 -24
  21. package/build/index.js.map +7 -1
  22. package/build/store/actions.js +94 -165
  23. package/build/store/actions.js.map +7 -1
  24. package/build/store/constants.js +27 -12
  25. package/build/store/constants.js.map +7 -1
  26. package/build/store/deprecated.js +55 -29
  27. package/build/store/deprecated.js.map +7 -1
  28. package/build/store/index.js +44 -32
  29. package/build/store/index.js.map +7 -1
  30. package/build/store/reducer.js +49 -51
  31. package/build/store/reducer.js.map +7 -1
  32. package/build/store/selectors.js +96 -93
  33. package/build/store/selectors.js.map +7 -1
  34. package/build-module/components/action-item/index.js +49 -59
  35. package/build-module/components/action-item/index.js.map +7 -1
  36. package/build-module/components/complementary-area/index.js +185 -174
  37. package/build-module/components/complementary-area/index.js.map +7 -1
  38. package/build-module/components/complementary-area-header/index.js +25 -26
  39. package/build-module/components/complementary-area-header/index.js.map +7 -1
  40. package/build-module/components/complementary-area-more-menu-item/index.js +33 -33
  41. package/build-module/components/complementary-area-more-menu-item/index.js.map +7 -1
  42. package/build-module/components/complementary-area-toggle/index.js +41 -44
  43. package/build-module/components/complementary-area-toggle/index.js.map +7 -1
  44. package/build-module/components/fullscreen-mode/index.js +13 -19
  45. package/build-module/components/fullscreen-mode/index.js.map +7 -1
  46. package/build-module/components/index.js +15 -8
  47. package/build-module/components/index.js.map +7 -1
  48. package/build-module/components/interface-skeleton/index.js +132 -122
  49. package/build-module/components/interface-skeleton/index.js.map +7 -1
  50. package/build-module/components/pinned-items/index.js +20 -32
  51. package/build-module/components/pinned-items/index.js.map +7 -1
  52. package/build-module/index.js +6 -3
  53. package/build-module/index.js.map +7 -1
  54. package/build-module/store/actions.js +47 -138
  55. package/build-module/store/actions.js.map +7 -1
  56. package/build-module/store/constants.js +5 -7
  57. package/build-module/store/constants.js.map +7 -1
  58. package/build-module/store/deprecated.js +21 -20
  59. package/build-module/store/deprecated.js.map +7 -1
  60. package/build-module/store/index.js +10 -22
  61. package/build-module/store/index.js.map +7 -1
  62. package/build-module/store/reducer.js +28 -45
  63. package/build-module/store/reducer.js.map +7 -1
  64. package/build-module/store/selectors.js +64 -87
  65. package/build-module/store/selectors.js.map +7 -1
  66. package/build-style/style-rtl.css +87 -85
  67. package/build-style/style.css +87 -85
  68. package/package.json +21 -15
  69. package/src/components/complementary-area/style.scss +5 -0
  70. package/src/components/complementary-area-header/style.scss +3 -0
  71. package/src/components/fullscreen-mode/style.scss +3 -0
  72. package/src/components/index.js +0 -1
  73. package/src/components/interface-skeleton/index.js +1 -5
  74. package/src/components/interface-skeleton/style.scss +6 -0
  75. package/src/components/pinned-items/style.scss +3 -0
  76. package/src/style.scss +6 -5
  77. package/build/components/index.native.js +0 -21
  78. package/build/components/index.native.js.map +0 -1
  79. package/build/components/navigable-region/index.js +0 -38
  80. package/build/components/navigable-region/index.js.map +0 -1
  81. package/build-module/components/index.native.js +0 -3
  82. package/build-module/components/index.native.js.map +0 -1
  83. package/build-module/components/navigable-region/index.js +0 -30
  84. package/build-module/components/navigable-region/index.js.map +0 -1
  85. package/src/components/navigable-region/README.md +0 -36
  86. package/src/components/navigable-region/index.js +0 -29
@@ -1,226 +1,155 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
24
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
+ mod
26
+ ));
27
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
+ var actions_exports = {};
29
+ __export(actions_exports, {
30
+ closeModal: () => closeModal,
31
+ disableComplementaryArea: () => disableComplementaryArea,
32
+ enableComplementaryArea: () => enableComplementaryArea,
33
+ openModal: () => openModal,
34
+ pinItem: () => pinItem,
35
+ setDefaultComplementaryArea: () => setDefaultComplementaryArea,
36
+ setFeatureDefaults: () => setFeatureDefaults,
37
+ setFeatureValue: () => setFeatureValue,
38
+ toggleFeature: () => toggleFeature,
39
+ unpinItem: () => unpinItem
6
40
  });
7
- exports.closeModal = closeModal;
8
- exports.enableComplementaryArea = exports.disableComplementaryArea = void 0;
9
- exports.openModal = openModal;
10
- exports.setDefaultComplementaryArea = exports.pinItem = void 0;
11
- exports.setFeatureDefaults = setFeatureDefaults;
12
- exports.setFeatureValue = setFeatureValue;
13
- exports.toggleFeature = toggleFeature;
14
- exports.unpinItem = void 0;
15
- var _deprecated = _interopRequireDefault(require("@wordpress/deprecated"));
16
- var _preferences = require("@wordpress/preferences");
17
- var _deprecated2 = require("./deprecated");
18
- /**
19
- * WordPress dependencies
20
- */
21
-
22
- /**
23
- * Internal dependencies
24
- */
25
-
26
- /**
27
- * Set a default complementary area.
28
- *
29
- * @param {string} scope Complementary area scope.
30
- * @param {string} area Area identifier.
31
- *
32
- * @return {Object} Action object.
33
- */
41
+ module.exports = __toCommonJS(actions_exports);
42
+ var import_deprecated = __toESM(require("@wordpress/deprecated"));
43
+ var import_preferences = require("@wordpress/preferences");
44
+ var import_deprecated2 = require("./deprecated");
34
45
  const setDefaultComplementaryArea = (scope, area) => {
35
- scope = (0, _deprecated2.normalizeComplementaryAreaScope)(scope);
36
- area = (0, _deprecated2.normalizeComplementaryAreaName)(scope, area);
46
+ scope = (0, import_deprecated2.normalizeComplementaryAreaScope)(scope);
47
+ area = (0, import_deprecated2.normalizeComplementaryAreaName)(scope, area);
37
48
  return {
38
- type: 'SET_DEFAULT_COMPLEMENTARY_AREA',
49
+ type: "SET_DEFAULT_COMPLEMENTARY_AREA",
39
50
  scope,
40
51
  area
41
52
  };
42
53
  };
43
-
44
- /**
45
- * Enable the complementary area.
46
- *
47
- * @param {string} scope Complementary area scope.
48
- * @param {string} area Area identifier.
49
- */
50
- exports.setDefaultComplementaryArea = setDefaultComplementaryArea;
51
- const enableComplementaryArea = (scope, area) => ({
52
- registry,
53
- dispatch
54
- }) => {
55
- // Return early if there's no area.
54
+ const enableComplementaryArea = (scope, area) => ({ registry, dispatch }) => {
56
55
  if (!area) {
57
56
  return;
58
57
  }
59
- scope = (0, _deprecated2.normalizeComplementaryAreaScope)(scope);
60
- area = (0, _deprecated2.normalizeComplementaryAreaName)(scope, area);
61
- const isComplementaryAreaVisible = registry.select(_preferences.store).get(scope, 'isComplementaryAreaVisible');
58
+ scope = (0, import_deprecated2.normalizeComplementaryAreaScope)(scope);
59
+ area = (0, import_deprecated2.normalizeComplementaryAreaName)(scope, area);
60
+ const isComplementaryAreaVisible = registry.select(import_preferences.store).get(scope, "isComplementaryAreaVisible");
62
61
  if (!isComplementaryAreaVisible) {
63
- registry.dispatch(_preferences.store).set(scope, 'isComplementaryAreaVisible', true);
62
+ registry.dispatch(import_preferences.store).set(scope, "isComplementaryAreaVisible", true);
64
63
  }
65
64
  dispatch({
66
- type: 'ENABLE_COMPLEMENTARY_AREA',
65
+ type: "ENABLE_COMPLEMENTARY_AREA",
67
66
  scope,
68
67
  area
69
68
  });
70
69
  };
71
-
72
- /**
73
- * Disable the complementary area.
74
- *
75
- * @param {string} scope Complementary area scope.
76
- */
77
- exports.enableComplementaryArea = enableComplementaryArea;
78
- const disableComplementaryArea = scope => ({
79
- registry
80
- }) => {
81
- scope = (0, _deprecated2.normalizeComplementaryAreaScope)(scope);
82
- const isComplementaryAreaVisible = registry.select(_preferences.store).get(scope, 'isComplementaryAreaVisible');
70
+ const disableComplementaryArea = (scope) => ({ registry }) => {
71
+ scope = (0, import_deprecated2.normalizeComplementaryAreaScope)(scope);
72
+ const isComplementaryAreaVisible = registry.select(import_preferences.store).get(scope, "isComplementaryAreaVisible");
83
73
  if (isComplementaryAreaVisible) {
84
- registry.dispatch(_preferences.store).set(scope, 'isComplementaryAreaVisible', false);
74
+ registry.dispatch(import_preferences.store).set(scope, "isComplementaryAreaVisible", false);
85
75
  }
86
76
  };
87
-
88
- /**
89
- * Pins an item.
90
- *
91
- * @param {string} scope Item scope.
92
- * @param {string} item Item identifier.
93
- *
94
- * @return {Object} Action object.
95
- */
96
- exports.disableComplementaryArea = disableComplementaryArea;
97
- const pinItem = (scope, item) => ({
98
- registry
99
- }) => {
100
- // Return early if there's no item.
77
+ const pinItem = (scope, item) => ({ registry }) => {
101
78
  if (!item) {
102
79
  return;
103
80
  }
104
- scope = (0, _deprecated2.normalizeComplementaryAreaScope)(scope);
105
- item = (0, _deprecated2.normalizeComplementaryAreaName)(scope, item);
106
- const pinnedItems = registry.select(_preferences.store).get(scope, 'pinnedItems');
107
-
108
- // The item is already pinned, there's nothing to do.
81
+ scope = (0, import_deprecated2.normalizeComplementaryAreaScope)(scope);
82
+ item = (0, import_deprecated2.normalizeComplementaryAreaName)(scope, item);
83
+ const pinnedItems = registry.select(import_preferences.store).get(scope, "pinnedItems");
109
84
  if (pinnedItems?.[item] === true) {
110
85
  return;
111
86
  }
112
- registry.dispatch(_preferences.store).set(scope, 'pinnedItems', {
87
+ registry.dispatch(import_preferences.store).set(scope, "pinnedItems", {
113
88
  ...pinnedItems,
114
89
  [item]: true
115
90
  });
116
91
  };
117
-
118
- /**
119
- * Unpins an item.
120
- *
121
- * @param {string} scope Item scope.
122
- * @param {string} item Item identifier.
123
- */
124
- exports.pinItem = pinItem;
125
- const unpinItem = (scope, item) => ({
126
- registry
127
- }) => {
128
- // Return early if there's no item.
92
+ const unpinItem = (scope, item) => ({ registry }) => {
129
93
  if (!item) {
130
94
  return;
131
95
  }
132
- scope = (0, _deprecated2.normalizeComplementaryAreaScope)(scope);
133
- item = (0, _deprecated2.normalizeComplementaryAreaName)(scope, item);
134
- const pinnedItems = registry.select(_preferences.store).get(scope, 'pinnedItems');
135
- registry.dispatch(_preferences.store).set(scope, 'pinnedItems', {
96
+ scope = (0, import_deprecated2.normalizeComplementaryAreaScope)(scope);
97
+ item = (0, import_deprecated2.normalizeComplementaryAreaName)(scope, item);
98
+ const pinnedItems = registry.select(import_preferences.store).get(scope, "pinnedItems");
99
+ registry.dispatch(import_preferences.store).set(scope, "pinnedItems", {
136
100
  ...pinnedItems,
137
101
  [item]: false
138
102
  });
139
103
  };
140
-
141
- /**
142
- * Returns an action object used in signalling that a feature should be toggled.
143
- *
144
- * @param {string} scope The feature scope (e.g. core/edit-post).
145
- * @param {string} featureName The feature name.
146
- */
147
- exports.unpinItem = unpinItem;
148
104
  function toggleFeature(scope, featureName) {
149
- return function ({
150
- registry
151
- }) {
152
- (0, _deprecated.default)(`dispatch( 'core/interface' ).toggleFeature`, {
153
- since: '6.0',
105
+ return function({ registry }) {
106
+ (0, import_deprecated.default)(`dispatch( 'core/interface' ).toggleFeature`, {
107
+ since: "6.0",
154
108
  alternative: `dispatch( 'core/preferences' ).toggle`
155
109
  });
156
- registry.dispatch(_preferences.store).toggle(scope, featureName);
110
+ registry.dispatch(import_preferences.store).toggle(scope, featureName);
157
111
  };
158
112
  }
159
-
160
- /**
161
- * Returns an action object used in signalling that a feature should be set to
162
- * a true or false value
163
- *
164
- * @param {string} scope The feature scope (e.g. core/edit-post).
165
- * @param {string} featureName The feature name.
166
- * @param {boolean} value The value to set.
167
- *
168
- * @return {Object} Action object.
169
- */
170
113
  function setFeatureValue(scope, featureName, value) {
171
- return function ({
172
- registry
173
- }) {
174
- (0, _deprecated.default)(`dispatch( 'core/interface' ).setFeatureValue`, {
175
- since: '6.0',
114
+ return function({ registry }) {
115
+ (0, import_deprecated.default)(`dispatch( 'core/interface' ).setFeatureValue`, {
116
+ since: "6.0",
176
117
  alternative: `dispatch( 'core/preferences' ).set`
177
118
  });
178
- registry.dispatch(_preferences.store).set(scope, featureName, !!value);
119
+ registry.dispatch(import_preferences.store).set(scope, featureName, !!value);
179
120
  };
180
121
  }
181
-
182
- /**
183
- * Returns an action object used in signalling that defaults should be set for features.
184
- *
185
- * @param {string} scope The feature scope (e.g. core/edit-post).
186
- * @param {Object<string, boolean>} defaults A key/value map of feature names to values.
187
- *
188
- * @return {Object} Action object.
189
- */
190
122
  function setFeatureDefaults(scope, defaults) {
191
- return function ({
192
- registry
193
- }) {
194
- (0, _deprecated.default)(`dispatch( 'core/interface' ).setFeatureDefaults`, {
195
- since: '6.0',
123
+ return function({ registry }) {
124
+ (0, import_deprecated.default)(`dispatch( 'core/interface' ).setFeatureDefaults`, {
125
+ since: "6.0",
196
126
  alternative: `dispatch( 'core/preferences' ).setDefaults`
197
127
  });
198
- registry.dispatch(_preferences.store).setDefaults(scope, defaults);
128
+ registry.dispatch(import_preferences.store).setDefaults(scope, defaults);
199
129
  };
200
130
  }
201
-
202
- /**
203
- * Returns an action object used in signalling that the user opened a modal.
204
- *
205
- * @param {string} name A string that uniquely identifies the modal.
206
- *
207
- * @return {Object} Action object.
208
- */
209
131
  function openModal(name) {
210
132
  return {
211
- type: 'OPEN_MODAL',
133
+ type: "OPEN_MODAL",
212
134
  name
213
135
  };
214
136
  }
215
-
216
- /**
217
- * Returns an action object signalling that the user closed a modal.
218
- *
219
- * @return {Object} Action object.
220
- */
221
137
  function closeModal() {
222
138
  return {
223
- type: 'CLOSE_MODAL'
139
+ type: "CLOSE_MODAL"
224
140
  };
225
141
  }
226
- //# sourceMappingURL=actions.js.map
142
+ // Annotate the CommonJS export names for ESM import in node:
143
+ 0 && (module.exports = {
144
+ closeModal,
145
+ disableComplementaryArea,
146
+ enableComplementaryArea,
147
+ openModal,
148
+ pinItem,
149
+ setDefaultComplementaryArea,
150
+ setFeatureDefaults,
151
+ setFeatureValue,
152
+ toggleFeature,
153
+ unpinItem
154
+ });
155
+ //# sourceMappingURL=actions.js.map
@@ -1 +1,7 @@
1
- {"version":3,"names":["_deprecated","_interopRequireDefault","require","_preferences","_deprecated2","setDefaultComplementaryArea","scope","area","normalizeComplementaryAreaScope","normalizeComplementaryAreaName","type","exports","enableComplementaryArea","registry","dispatch","isComplementaryAreaVisible","select","preferencesStore","get","set","disableComplementaryArea","pinItem","item","pinnedItems","unpinItem","toggleFeature","featureName","deprecated","since","alternative","toggle","setFeatureValue","value","setFeatureDefaults","defaults","setDefaults","openModal","name","closeModal"],"sources":["@wordpress/interface/src/store/actions.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport deprecated from '@wordpress/deprecated';\nimport { store as preferencesStore } from '@wordpress/preferences';\n\n/**\n * Internal dependencies\n */\nimport {\n\tnormalizeComplementaryAreaScope,\n\tnormalizeComplementaryAreaName,\n} from './deprecated';\n\n/**\n * Set a default complementary area.\n *\n * @param {string} scope Complementary area scope.\n * @param {string} area Area identifier.\n *\n * @return {Object} Action object.\n */\nexport const setDefaultComplementaryArea = ( scope, area ) => {\n\tscope = normalizeComplementaryAreaScope( scope );\n\tarea = normalizeComplementaryAreaName( scope, area );\n\treturn {\n\t\ttype: 'SET_DEFAULT_COMPLEMENTARY_AREA',\n\t\tscope,\n\t\tarea,\n\t};\n};\n\n/**\n * Enable the complementary area.\n *\n * @param {string} scope Complementary area scope.\n * @param {string} area Area identifier.\n */\nexport const enableComplementaryArea =\n\t( scope, area ) =>\n\t( { registry, dispatch } ) => {\n\t\t// Return early if there's no area.\n\t\tif ( ! area ) {\n\t\t\treturn;\n\t\t}\n\t\tscope = normalizeComplementaryAreaScope( scope );\n\t\tarea = normalizeComplementaryAreaName( scope, area );\n\n\t\tconst isComplementaryAreaVisible = registry\n\t\t\t.select( preferencesStore )\n\t\t\t.get( scope, 'isComplementaryAreaVisible' );\n\n\t\tif ( ! isComplementaryAreaVisible ) {\n\t\t\tregistry\n\t\t\t\t.dispatch( preferencesStore )\n\t\t\t\t.set( scope, 'isComplementaryAreaVisible', true );\n\t\t}\n\n\t\tdispatch( {\n\t\t\ttype: 'ENABLE_COMPLEMENTARY_AREA',\n\t\t\tscope,\n\t\t\tarea,\n\t\t} );\n\t};\n\n/**\n * Disable the complementary area.\n *\n * @param {string} scope Complementary area scope.\n */\nexport const disableComplementaryArea =\n\t( scope ) =>\n\t( { registry } ) => {\n\t\tscope = normalizeComplementaryAreaScope( scope );\n\t\tconst isComplementaryAreaVisible = registry\n\t\t\t.select( preferencesStore )\n\t\t\t.get( scope, 'isComplementaryAreaVisible' );\n\n\t\tif ( isComplementaryAreaVisible ) {\n\t\t\tregistry\n\t\t\t\t.dispatch( preferencesStore )\n\t\t\t\t.set( scope, 'isComplementaryAreaVisible', false );\n\t\t}\n\t};\n\n/**\n * Pins an item.\n *\n * @param {string} scope Item scope.\n * @param {string} item Item identifier.\n *\n * @return {Object} Action object.\n */\nexport const pinItem =\n\t( scope, item ) =>\n\t( { registry } ) => {\n\t\t// Return early if there's no item.\n\t\tif ( ! item ) {\n\t\t\treturn;\n\t\t}\n\n\t\tscope = normalizeComplementaryAreaScope( scope );\n\t\titem = normalizeComplementaryAreaName( scope, item );\n\t\tconst pinnedItems = registry\n\t\t\t.select( preferencesStore )\n\t\t\t.get( scope, 'pinnedItems' );\n\n\t\t// The item is already pinned, there's nothing to do.\n\t\tif ( pinnedItems?.[ item ] === true ) {\n\t\t\treturn;\n\t\t}\n\n\t\tregistry.dispatch( preferencesStore ).set( scope, 'pinnedItems', {\n\t\t\t...pinnedItems,\n\t\t\t[ item ]: true,\n\t\t} );\n\t};\n\n/**\n * Unpins an item.\n *\n * @param {string} scope Item scope.\n * @param {string} item Item identifier.\n */\nexport const unpinItem =\n\t( scope, item ) =>\n\t( { registry } ) => {\n\t\t// Return early if there's no item.\n\t\tif ( ! item ) {\n\t\t\treturn;\n\t\t}\n\n\t\tscope = normalizeComplementaryAreaScope( scope );\n\t\titem = normalizeComplementaryAreaName( scope, item );\n\t\tconst pinnedItems = registry\n\t\t\t.select( preferencesStore )\n\t\t\t.get( scope, 'pinnedItems' );\n\n\t\tregistry.dispatch( preferencesStore ).set( scope, 'pinnedItems', {\n\t\t\t...pinnedItems,\n\t\t\t[ item ]: false,\n\t\t} );\n\t};\n\n/**\n * Returns an action object used in signalling that a feature should be toggled.\n *\n * @param {string} scope The feature scope (e.g. core/edit-post).\n * @param {string} featureName The feature name.\n */\nexport function toggleFeature( scope, featureName ) {\n\treturn function ( { registry } ) {\n\t\tdeprecated( `dispatch( 'core/interface' ).toggleFeature`, {\n\t\t\tsince: '6.0',\n\t\t\talternative: `dispatch( 'core/preferences' ).toggle`,\n\t\t} );\n\n\t\tregistry.dispatch( preferencesStore ).toggle( scope, featureName );\n\t};\n}\n\n/**\n * Returns an action object used in signalling that a feature should be set to\n * a true or false value\n *\n * @param {string} scope The feature scope (e.g. core/edit-post).\n * @param {string} featureName The feature name.\n * @param {boolean} value The value to set.\n *\n * @return {Object} Action object.\n */\nexport function setFeatureValue( scope, featureName, value ) {\n\treturn function ( { registry } ) {\n\t\tdeprecated( `dispatch( 'core/interface' ).setFeatureValue`, {\n\t\t\tsince: '6.0',\n\t\t\talternative: `dispatch( 'core/preferences' ).set`,\n\t\t} );\n\n\t\tregistry\n\t\t\t.dispatch( preferencesStore )\n\t\t\t.set( scope, featureName, !! value );\n\t};\n}\n\n/**\n * Returns an action object used in signalling that defaults should be set for features.\n *\n * @param {string} scope The feature scope (e.g. core/edit-post).\n * @param {Object<string, boolean>} defaults A key/value map of feature names to values.\n *\n * @return {Object} Action object.\n */\nexport function setFeatureDefaults( scope, defaults ) {\n\treturn function ( { registry } ) {\n\t\tdeprecated( `dispatch( 'core/interface' ).setFeatureDefaults`, {\n\t\t\tsince: '6.0',\n\t\t\talternative: `dispatch( 'core/preferences' ).setDefaults`,\n\t\t} );\n\n\t\tregistry.dispatch( preferencesStore ).setDefaults( scope, defaults );\n\t};\n}\n\n/**\n * Returns an action object used in signalling that the user opened a modal.\n *\n * @param {string} name A string that uniquely identifies the modal.\n *\n * @return {Object} Action object.\n */\nexport function openModal( name ) {\n\treturn {\n\t\ttype: 'OPEN_MODAL',\n\t\tname,\n\t};\n}\n\n/**\n * Returns an action object signalling that the user closed a modal.\n *\n * @return {Object} Action object.\n */\nexport function closeModal() {\n\treturn {\n\t\ttype: 'CLOSE_MODAL',\n\t};\n}\n"],"mapp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W,EAAE,CAAC,CAAEM,KAAM,CAAC;EACtC,CAAC;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASC,kBAAkBA,CAAE3B,KAAK,EAAE4B,QAAQ,EAAG;EACrD,OAAO,UAAW;IAAErB;EAAS,CAAC,EAAG;IAChC,IAAAc,mBAAU,EAAE,iDAAiD,EAAE;MAC9DC,KAAK,EAAE,KAAK;MACZC,WAAW,EAAE;IACd,CAAE,CAAC;IAEHhB,QAAQ,CAACC,QAAQ,CAAEG,kBAAiB,CAAC,CAACkB,WAAW,CAAE7B,KAAK,EAAE4B,QAAS,CAAC;EACrE,CAAC;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASE,SAASA,CAAEC,IAAI,EAAG;EACjC,OAAO;IACN3B,IAAI,EAAE,YAAY;IAClB2B;EACD,CAAC;AACF;;AAEA;AACA;AACA;AACA;AACA;AACO,SAASC,UAAUA,CAAA,EAAG;EAC5B,OAAO;IACN5B,IAAI,EAAE;EACP,CAAC;AACF","ignoreList":[]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/store/actions.js"],
4
+ "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport deprecated from '@wordpress/deprecated';\nimport { store as preferencesStore } from '@wordpress/preferences';\n\n/**\n * Internal dependencies\n */\nimport {\n\tnormalizeComplementaryAreaScope,\n\tnormalizeComplementaryAreaName,\n} from './deprecated';\n\n/**\n * Set a default complementary area.\n *\n * @param {string} scope Complementary area scope.\n * @param {string} area Area identifier.\n *\n * @return {Object} Action object.\n */\nexport const setDefaultComplementaryArea = ( scope, area ) => {\n\tscope = normalizeComplementaryAreaScope( scope );\n\tarea = normalizeComplementaryAreaName( scope, area );\n\treturn {\n\t\ttype: 'SET_DEFAULT_COMPLEMENTARY_AREA',\n\t\tscope,\n\t\tarea,\n\t};\n};\n\n/**\n * Enable the complementary area.\n *\n * @param {string} scope Complementary area scope.\n * @param {string} area Area identifier.\n */\nexport const enableComplementaryArea =\n\t( scope, area ) =>\n\t( { registry, dispatch } ) => {\n\t\t// Return early if there's no area.\n\t\tif ( ! area ) {\n\t\t\treturn;\n\t\t}\n\t\tscope = normalizeComplementaryAreaScope( scope );\n\t\tarea = normalizeComplementaryAreaName( scope, area );\n\n\t\tconst isComplementaryAreaVisible = registry\n\t\t\t.select( preferencesStore )\n\t\t\t.get( scope, 'isComplementaryAreaVisible' );\n\n\t\tif ( ! isComplementaryAreaVisible ) {\n\t\t\tregistry\n\t\t\t\t.dispatch( preferencesStore )\n\t\t\t\t.set( scope, 'isComplementaryAreaVisible', true );\n\t\t}\n\n\t\tdispatch( {\n\t\t\ttype: 'ENABLE_COMPLEMENTARY_AREA',\n\t\t\tscope,\n\t\t\tarea,\n\t\t} );\n\t};\n\n/**\n * Disable the complementary area.\n *\n * @param {string} scope Complementary area scope.\n */\nexport const disableComplementaryArea =\n\t( scope ) =>\n\t( { registry } ) => {\n\t\tscope = normalizeComplementaryAreaScope( scope );\n\t\tconst isComplementaryAreaVisible = registry\n\t\t\t.select( preferencesStore )\n\t\t\t.get( scope, 'isComplementaryAreaVisible' );\n\n\t\tif ( isComplementaryAreaVisible ) {\n\t\t\tregistry\n\t\t\t\t.dispatch( preferencesStore )\n\t\t\t\t.set( scope, 'isComplementaryAreaVisible', false );\n\t\t}\n\t};\n\n/**\n * Pins an item.\n *\n * @param {string} scope Item scope.\n * @param {string} item Item identifier.\n *\n * @return {Object} Action object.\n */\nexport const pinItem =\n\t( scope, item ) =>\n\t( { registry } ) => {\n\t\t// Return early if there's no item.\n\t\tif ( ! item ) {\n\t\t\treturn;\n\t\t}\n\n\t\tscope = normalizeComplementaryAreaScope( scope );\n\t\titem = normalizeComplementaryAreaName( scope, item );\n\t\tconst pinnedItems = registry\n\t\t\t.select( preferencesStore )\n\t\t\t.get( scope, 'pinnedItems' );\n\n\t\t// The item is already pinned, there's nothing to do.\n\t\tif ( pinnedItems?.[ item ] === true ) {\n\t\t\treturn;\n\t\t}\n\n\t\tregistry.dispatch( preferencesStore ).set( scope, 'pinnedItems', {\n\t\t\t...pinnedItems,\n\t\t\t[ item ]: true,\n\t\t} );\n\t};\n\n/**\n * Unpins an item.\n *\n * @param {string} scope Item scope.\n * @param {string} item Item identifier.\n */\nexport const unpinItem =\n\t( scope, item ) =>\n\t( { registry } ) => {\n\t\t// Return early if there's no item.\n\t\tif ( ! item ) {\n\t\t\treturn;\n\t\t}\n\n\t\tscope = normalizeComplementaryAreaScope( scope );\n\t\titem = normalizeComplementaryAreaName( scope, item );\n\t\tconst pinnedItems = registry\n\t\t\t.select( preferencesStore )\n\t\t\t.get( scope, 'pinnedItems' );\n\n\t\tregistry.dispatch( preferencesStore ).set( scope, 'pinnedItems', {\n\t\t\t...pinnedItems,\n\t\t\t[ item ]: false,\n\t\t} );\n\t};\n\n/**\n * Returns an action object used in signalling that a feature should be toggled.\n *\n * @param {string} scope The feature scope (e.g. core/edit-post).\n * @param {string} featureName The feature name.\n */\nexport function toggleFeature( scope, featureName ) {\n\treturn function ( { registry } ) {\n\t\tdeprecated( `dispatch( 'core/interface' ).toggleFeature`, {\n\t\t\tsince: '6.0',\n\t\t\talternative: `dispatch( 'core/preferences' ).toggle`,\n\t\t} );\n\n\t\tregistry.dispatch( preferencesStore ).toggle( scope, featureName );\n\t};\n}\n\n/**\n * Returns an action object used in signalling that a feature should be set to\n * a true or false value\n *\n * @param {string} scope The feature scope (e.g. core/edit-post).\n * @param {string} featureName The feature name.\n * @param {boolean} value The value to set.\n *\n * @return {Object} Action object.\n */\nexport function setFeatureValue( scope, featureName, value ) {\n\treturn function ( { registry } ) {\n\t\tdeprecated( `dispatch( 'core/interface' ).setFeatureValue`, {\n\t\t\tsince: '6.0',\n\t\t\talternative: `dispatch( 'core/preferences' ).set`,\n\t\t} );\n\n\t\tregistry\n\t\t\t.dispatch( preferencesStore )\n\t\t\t.set( scope, featureName, !! value );\n\t};\n}\n\n/**\n * Returns an action object used in signalling that defaults should be set for features.\n *\n * @param {string} scope The feature scope (e.g. core/edit-post).\n * @param {Object<string, boolean>} defaults A key/value map of feature names to values.\n *\n * @return {Object} Action object.\n */\nexport function setFeatureDefaults( scope, defaults ) {\n\treturn function ( { registry } ) {\n\t\tdeprecated( `dispatch( 'core/interface' ).setFeatureDefaults`, {\n\t\t\tsince: '6.0',\n\t\t\talternative: `dispatch( 'core/preferences' ).setDefaults`,\n\t\t} );\n\n\t\tregistry.dispatch( preferencesStore ).setDefaults( scope, defaults );\n\t};\n}\n\n/**\n * Returns an action object used in signalling that the user opened a modal.\n *\n * @param {string} name A string that uniquely identifies the modal.\n *\n * @return {Object} Action object.\n */\nexport function openModal( name ) {\n\treturn {\n\t\ttype: 'OPEN_MODAL',\n\t\tname,\n\t};\n}\n\n/**\n * Returns an action object signalling that the user closed a modal.\n *\n * @return {Object} Action object.\n */\nexport function closeModal() {\n\treturn {\n\t\ttype: 'CLOSE_MODAL',\n\t};\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,wBAAuB;AACvB,yBAA0C;AAK1C,IAAAA,qBAGO;AAUA,MAAM,8BAA8B,CAAE,OAAO,SAAU;AAC7D,cAAQ,oDAAiC,KAAM;AAC/C,aAAO,mDAAgC,OAAO,IAAK;AACnD,SAAO;AAAA,IACN,MAAM;AAAA,IACN;AAAA,IACA;AAAA,EACD;AACD;AAQO,MAAM,0BACZ,CAAE,OAAO,SACT,CAAE,EAAE,UAAU,SAAS,MAAO;AAE7B,MAAK,CAAE,MAAO;AACb;AAAA,EACD;AACA,cAAQ,oDAAiC,KAAM;AAC/C,aAAO,mDAAgC,OAAO,IAAK;AAEnD,QAAM,6BAA6B,SACjC,OAAQ,mBAAAC,KAAiB,EACzB,IAAK,OAAO,4BAA6B;AAE3C,MAAK,CAAE,4BAA6B;AACnC,aACE,SAAU,mBAAAA,KAAiB,EA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SAAY,8CAA8C;AAAA,MACzD,OAAO;AAAA,MACP,aAAa;AAAA,IACd,CAAE;AAEF,aAAS,SAAU,mBAAAD,KAAiB,EAAE,OAAQ,OAAO,WAAY;AAAA,EAClE;AACD;AAYO,SAAS,gBAAiB,OAAO,aAAa,OAAQ;AAC5D,SAAO,SAAW,EAAE,SAAS,GAAI;AAChC,0BAAAC,SAAY,gDAAgD;AAAA,MAC3D,OAAO;AAAA,MACP,aAAa;AAAA,IACd,CAAE;AAEF,aACE,SAAU,mBAAAD,KAAiB,EAC3B,IAAK,OAAO,aAAa,CAAC,CAAE,KAAM;AAAA,EACrC;AACD;AAUO,SAAS,mBAAoB,OAAO,UAAW;AACrD,SAAO,SAAW,EAAE,SAAS,GAAI;AAChC,0BAAAC,SAAY,mDAAmD;AAAA,MAC9D,OAAO;AAAA,MACP,aAAa;AAAA,IACd,CAAE;AAEF,aAAS,SAAU,mBAAAD,KAAiB,EAAE,YAAa,OAAO,QAAS;AAAA,EACpE;AACD;AASO,SAAS,UAAW,MAAO;AACjC,SAAO;AAAA,IACN,MAAM;AAAA,IACN;AAAA,EACD;AACD;AAOO,SAAS,aAAa;AAC5B,SAAO;AAAA,IACN,MAAM;AAAA,EACP;AACD;",
6
+ "names": ["import_deprecated", "preferencesStore", "deprecated"]
7
+ }
@@ -1,13 +1,28 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+ var constants_exports = {};
19
+ __export(constants_exports, {
20
+ STORE_NAME: () => STORE_NAME
5
21
  });
6
- exports.STORE_NAME = void 0;
7
- /**
8
- * The identifier for the data store.
9
- *
10
- * @type {string}
11
- */
12
- const STORE_NAME = exports.STORE_NAME = 'core/interface';
13
- //# sourceMappingURL=constants.js.map
22
+ module.exports = __toCommonJS(constants_exports);
23
+ const STORE_NAME = "core/interface";
24
+ // Annotate the CommonJS export names for ESM import in node:
25
+ 0 && (module.exports = {
26
+ STORE_NAME
27
+ });
28
+ //# sourceMappingURL=constants.js.map
@@ -1 +1,7 @@
1
- {"version":3,"names":["STORE_NAME","exports"],"sources":["@wordpress/interface/src/store/constants.js"],"sourcesContent":["/**\n * The identifier for the data store.\n *\n * @type {string}\n */\nexport const STORE_NAME = 'core/interface';\n"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACO,MAAMA,UAAU,GAAAC,OAAA,CAAAD,UAAA,GAAG,gBAAgB","ignoreList":[]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/store/constants.js"],
4
+ "sourcesContent": ["/**\n * The identifier for the data store.\n *\n * @type {string}\n */\nexport const STORE_NAME = 'core/interface';\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAKO,MAAM,aAAa;",
6
+ "names": []
7
+ }
@@ -1,42 +1,68 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
24
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
+ mod
26
+ ));
27
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
+ var deprecated_exports = {};
29
+ __export(deprecated_exports, {
30
+ normalizeComplementaryAreaName: () => normalizeComplementaryAreaName,
31
+ normalizeComplementaryAreaScope: () => normalizeComplementaryAreaScope
6
32
  });
7
- exports.normalizeComplementaryAreaName = normalizeComplementaryAreaName;
8
- exports.normalizeComplementaryAreaScope = normalizeComplementaryAreaScope;
9
- var _deprecated = _interopRequireDefault(require("@wordpress/deprecated"));
10
- /**
11
- * WordPress dependencies
12
- */
13
-
33
+ module.exports = __toCommonJS(deprecated_exports);
34
+ var import_deprecated = __toESM(require("@wordpress/deprecated"));
14
35
  function normalizeComplementaryAreaScope(scope) {
15
- if (['core/edit-post', 'core/edit-site'].includes(scope)) {
16
- (0, _deprecated.default)(`${scope} interface scope`, {
17
- alternative: 'core interface scope',
18
- hint: 'core/edit-post and core/edit-site are merging.',
19
- version: '6.6'
36
+ if (["core/edit-post", "core/edit-site"].includes(scope)) {
37
+ (0, import_deprecated.default)(`${scope} interface scope`, {
38
+ alternative: "core interface scope",
39
+ hint: "core/edit-post and core/edit-site are merging.",
40
+ version: "6.6"
20
41
  });
21
- return 'core';
42
+ return "core";
22
43
  }
23
44
  return scope;
24
45
  }
25
46
  function normalizeComplementaryAreaName(scope, name) {
26
- if (scope === 'core' && name === 'edit-site/template') {
27
- (0, _deprecated.default)(`edit-site/template sidebar`, {
28
- alternative: 'edit-post/document',
29
- version: '6.6'
47
+ if (scope === "core" && name === "edit-site/template") {
48
+ (0, import_deprecated.default)(`edit-site/template sidebar`, {
49
+ alternative: "edit-post/document",
50
+ version: "6.6"
30
51
  });
31
- return 'edit-post/document';
52
+ return "edit-post/document";
32
53
  }
33
- if (scope === 'core' && name === 'edit-site/block-inspector') {
34
- (0, _deprecated.default)(`edit-site/block-inspector sidebar`, {
35
- alternative: 'edit-post/block',
36
- version: '6.6'
54
+ if (scope === "core" && name === "edit-site/block-inspector") {
55
+ (0, import_deprecated.default)(`edit-site/block-inspector sidebar`, {
56
+ alternative: "edit-post/block",
57
+ version: "6.6"
37
58
  });
38
- return 'edit-post/block';
59
+ return "edit-post/block";
39
60
  }
40
61
  return name;
41
62
  }
42
- //# sourceMappingURL=deprecated.js.map
63
+ // Annotate the CommonJS export names for ESM import in node:
64
+ 0 && (module.exports = {
65
+ normalizeComplementaryAreaName,
66
+ normalizeComplementaryAreaScope
67
+ });
68
+ //# sourceMappingURL=deprecated.js.map
@@ -1 +1,7 @@
1
- {"version":3,"names":["_deprecated","_interopRequireDefault","require","normalizeComplementaryAreaScope","scope","includes","deprecated","alternative","hint","version","normalizeComplementaryAreaName","name"],"sources":["@wordpress/interface/src/store/deprecated.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport deprecated from '@wordpress/deprecated';\n\nexport function normalizeComplementaryAreaScope( scope ) {\n\tif ( [ 'core/edit-post', 'core/edit-site' ].includes( scope ) ) {\n\t\tdeprecated( `${ scope } interface scope`, {\n\t\t\talternative: 'core interface scope',\n\t\t\thint: 'core/edit-post and core/edit-site are merging.',\n\t\t\tversion: '6.6',\n\t\t} );\n\t\treturn 'core';\n\t}\n\n\treturn scope;\n}\n\nexport function normalizeComplementaryAreaName( scope, name ) {\n\tif ( scope === 'core' && name === 'edit-site/template' ) {\n\t\tdeprecated( `edit-site/template sidebar`, {\n\t\t\talternative: 'edit-post/document',\n\t\t\tversion: '6.6',\n\t\t} );\n\t\treturn 'edit-post/document';\n\t}\n\n\tif ( scope === 'core' && name === 'edit-site/block-inspector' ) {\n\t\tdeprecated( `edit-site/block-inspector sidebar`, {\n\t\t\talternative: 'edit-post/block',\n\t\t\tversion: '6.6',\n\t\t} );\n\t\treturn 'edit-post/block';\n\t}\n\n\treturn name;\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,WAAA,GAAAC,sBAAA,CAAAC,OAAA;AAHA;AACA;AACA;;AAGO,SAASC,+BAA+BA,CAAEC,KAAK,EAAG;EACxD,IAAK,CAAE,gBAAgB,EAAE,gBAAgB,CAAE,CAACC,QAAQ,CAAED,KAAM,CAAC,EAAG;IAC/D,IAAAE,mBAAU,EAAE,GAAIF,KAAK,kBAAmB,EAAE;MACzCG,WAAW,EAAE,sBAAsB;MACnCC,IAAI,EAAE,gDAAgD;MACtDC,OAAO,EAAE;IACV,CAAE,CAAC;IACH,OAAO,MAAM;EACd;EAEA,OAAOL,KAAK;AACb;AAEO,SAASM,8BAA8BA,CAAEN,KAAK,EAAEO,IAAI,EAAG;EAC7D,IAAKP,KAAK,KAAK,MAAM,IAAIO,IAAI,KAAK,oBAAoB,EAAG;IACxD,IAAAL,mBAAU,EAAE,4BAA4B,EAAE;MACzCC,WAAW,EAAE,oBAAoB;MACjCE,OAAO,EAAE;IACV,CAAE,CAAC;IACH,OAAO,oBAAoB;EAC5B;EAEA,IAAKL,KAAK,KAAK,MAAM,IAAIO,IAAI,KAAK,2BAA2B,EAAG;IAC/D,IAAAL,mBAAU,EAAE,mCAAmC,EAAE;MAChDC,WAAW,EAAE,iBAAiB;MAC9BE,OAAO,EAAE;IACV,CAAE,CAAC;IACH,OAAO,iBAAiB;EACzB;EAEA,OAAOE,IAAI;AACZ","ignoreList":[]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/store/deprecated.js"],
4
+ "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport deprecated from '@wordpress/deprecated';\n\nexport function normalizeComplementaryAreaScope( scope ) {\n\tif ( [ 'core/edit-post', 'core/edit-site' ].includes( scope ) ) {\n\t\tdeprecated( `${ scope } interface scope`, {\n\t\t\talternative: 'core interface scope',\n\t\t\thint: 'core/edit-post and core/edit-site are merging.',\n\t\t\tversion: '6.6',\n\t\t} );\n\t\treturn 'core';\n\t}\n\n\treturn scope;\n}\n\nexport function normalizeComplementaryAreaName( scope, name ) {\n\tif ( scope === 'core' && name === 'edit-site/template' ) {\n\t\tdeprecated( `edit-site/template sidebar`, {\n\t\t\talternative: 'edit-post/document',\n\t\t\tversion: '6.6',\n\t\t} );\n\t\treturn 'edit-post/document';\n\t}\n\n\tif ( scope === 'core' && name === 'edit-site/block-inspector' ) {\n\t\tdeprecated( `edit-site/block-inspector sidebar`, {\n\t\t\talternative: 'edit-post/block',\n\t\t\tversion: '6.6',\n\t\t} );\n\t\treturn 'edit-post/block';\n\t}\n\n\treturn name;\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,wBAAuB;AAEhB,SAAS,gCAAiC,OAAQ;AACxD,MAAK,CAAE,kBAAkB,gBAAiB,EAAE,SAAU,KAAM,GAAI;AAC/D,0BAAAA,SAAY,GAAI,KAAM,oBAAoB;AAAA,MACzC,aAAa;AAAA,MACb,MAAM;AAAA,MACN,SAAS;AAAA,IACV,CAAE;AACF,WAAO;AAAA,EACR;AAEA,SAAO;AACR;AAEO,SAAS,+BAAgC,OAAO,MAAO;AAC7D,MAAK,UAAU,UAAU,SAAS,sBAAuB;AACxD,0BAAAA,SAAY,8BAA8B;AAAA,MACzC,aAAa;AAAA,MACb,SAAS;AAAA,IACV,CAAE;AACF,WAAO;AAAA,EACR;AAEA,MAAK,UAAU,UAAU,SAAS,6BAA8B;AAC/D,0BAAAA,SAAY,qCAAqC;AAAA,MAChD,aAAa;AAAA,MACb,SAAS;AAAA,IACV,CAAE;AACF,WAAO;AAAA,EACR;AAEA,SAAO;AACR;",
6
+ "names": ["deprecated"]
7
+ }
@@ -1,36 +1,48 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
24
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
+ mod
26
+ ));
27
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
+ var store_exports = {};
29
+ __export(store_exports, {
30
+ store: () => store
6
31
  });
7
- exports.store = void 0;
8
- var _data = require("@wordpress/data");
9
- var actions = _interopRequireWildcard(require("./actions"));
10
- var selectors = _interopRequireWildcard(require("./selectors"));
11
- var _reducer = _interopRequireDefault(require("./reducer"));
12
- var _constants = require("./constants");
13
- function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
14
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
15
- /**
16
- * WordPress dependencies
17
- */
18
-
19
- /**
20
- * Internal dependencies
21
- */
22
-
23
- /**
24
- * Store definition for the interface namespace.
25
- *
26
- * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/data/README.md#createReduxStore
27
- *
28
- * @type {Object}
29
- */
30
- const store = exports.store = (0, _data.createReduxStore)(_constants.STORE_NAME, {
31
- reducer: _reducer.default,
32
+ module.exports = __toCommonJS(store_exports);
33
+ var import_data = require("@wordpress/data");
34
+ var actions = __toESM(require("./actions"));
35
+ var selectors = __toESM(require("./selectors"));
36
+ var import_reducer = __toESM(require("./reducer"));
37
+ var import_constants = require("./constants");
38
+ const store = (0, import_data.createReduxStore)(import_constants.STORE_NAME, {
39
+ reducer: import_reducer.default,
32
40
  actions,
33
41
  selectors
34
42
  });
35
- (0, _data.register)(store);
36
- //# sourceMappingURL=index.js.map
43
+ (0, import_data.register)(store);
44
+ // Annotate the CommonJS export names for ESM import in node:
45
+ 0 && (module.exports = {
46
+ store
47
+ });
48
+ //# sourceMappingURL=index.js.map
@@ -1 +1,7 @@
1
- {"version":3,"names":["_data","require","actions","_interopRequireWildcard","selectors","_reducer","_interopRequireDefault","_constants","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","store","exports","createReduxStore","STORE_NAME","reducer","register"],"sources":["@wordpress/interface/src/store/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { createReduxStore, register } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport * as actions from './actions';\nimport * as selectors from './selectors';\nimport reducer from './reducer';\nimport { STORE_NAME } from './constants';\n\n/**\n * Store definition for the interface namespace.\n *\n * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/data/README.md#createReduxStore\n *\n * @type {Object}\n */\nexport const store = createReduxStore( STORE_NAME, {\n\treducer,\n\tactions,\n\tselectors,\n} );\nregister( store );\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AAKA,IAAAC,OAAA,GAAAC,uBAAA,CAAAF,OAAA;AACA,IAAAG,SAAA,GAAAD,uBAAA,CAAAF,OAAA;AACA,IAAAI,QAAA,GAAAC,sBAAA,CAAAL,OAAA;AACA,IAAAM,UAAA,GAAAN,OAAA;AAAyC,SAAAO,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAN,wBAAAM,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAAA,EAAAL,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAG,GAAA,CAAAN,CAAA,UAAAG,CAAA,CAAAI,GAAA,CAAAP,CAAA,OAAAQ,CAAA,KAAAC,SAAA,UAAAC,CAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,CAAA,IAAAd,CAAA,oBAAAc,CAAA,OAAAC,cAAA,CAAAC,IAAA,CAAAhB,CAAA,EAAAc,CAAA,SAAAG,CAAA,GAAAP,CAAA,GAAAC,MAAA,CAAAE,wBAAA,CAAAb,CAAA,EAAAc,CAAA,UAAAG,CAAA,KAAAA,CAAA,CAAAV,GAAA,IAAAU,CAAA,CAAAC,GAAA,IAAAP,MAAA,CAAAC,cAAA,CAAAJ,CAAA,EAAAM,CAAA,EAAAG,CAAA,IAAAT,CAAA,CAAAM,CAAA,IAAAd,CAAA,CAAAc,CAAA,YAAAN,CAAA,CAAAH,OAAA,GAAAL,CAAA,EAAAG,CAAA,IAAAA,CAAA,CAAAe,GAAA,CAAAlB,CAAA,EAAAQ,CAAA,GAAAA,CAAA;AAXzC;AACA;AACA;;AAGA;AACA;AACA;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMW,KAAK,GAAAC,OAAA,CAAAD,KAAA,GAAG,IAAAE,sBAAgB,EAAEC,qBAAU,EAAE;EAClDC,OAAO,EAAPA,gBAAO;EACP9B,OAAO;EACPE;AACD,CAAE,CAAC;AACH,IAAA6B,cAAQ,EAAEL,KAAM,CAAC","ignoreList":[]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/store/index.js"],
4
+ "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { createReduxStore, register } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport * as actions from './actions';\nimport * as selectors from './selectors';\nimport reducer from './reducer';\nimport { STORE_NAME } from './constants';\n\n/**\n * Store definition for the interface namespace.\n *\n * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/data/README.md#createReduxStore\n *\n * @type {Object}\n */\nexport const store = createReduxStore( STORE_NAME, {\n\treducer,\n\tactions,\n\tselectors,\n} );\nregister( store );\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAA2C;AAK3C,cAAyB;AACzB,gBAA2B;AAC3B,qBAAoB;AACpB,uBAA2B;AASpB,MAAM,YAAQ,8BAAkB,6BAAY;AAAA,EAClD,wBAAAA;AAAA,EACA;AAAA,EACA;AACD,CAAE;AAAA,IACF,sBAAU,KAAM;",
6
+ "names": ["reducer"]
7
+ }