PluginProbe
Gutenberg / trunk
Gutenberg vtrunk
24.1.0 24.0.0 23.9.1 23.9.0 23.8.0 23.7.2 23.7.1 23.7.0 23.6.1 23.6.2 23.6.0 23.5.3 23.5.2 23.5.1 23.5.0 23.4.0 23.3.2 23.3.1 23.3.0 23.2.0 23.2.1 23.2.2 23.1.1 23.1.0 23.0.1 All 404 releases
← All changes | build/scripts/core-commands/index.js +18 -41 23.2.2 → trunk View file →
@@ -1,4 +1,5 @@
1 +(function() {
1 2 var wp;
2 3 (wp ||= {}).coreCommands = (() => {
3 4 var __create = Object.create;
4 5 var __defProp = Object.defineProperty;
@@ -128,56 +129,36 @@
128 129 // packages/core-commands/build-module/admin-navigation-commands.mjs
129 130 var import_commands = __toESM(require_commands(), 1);
130 131 var import_i18n = __toESM(require_i18n(), 1);
131 132
132 - // packages/icons/build-module/library/brush.mjs
133 + // packages/icons/build-module/library/external.mjs
133 134 var import_primitives = __toESM(require_primitives(), 1);
134 135 var import_jsx_runtime = __toESM(require_jsx_runtime(), 1);
135 - var brush_default = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_primitives.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_primitives.Path, { d: "M4 20h8v-1.5H4V20zM18.9 3.5c-.6-.6-1.5-.6-2.1 0l-7.2 7.2c-.4-.1-.7 0-1.1.1-.5.2-1.5.7-1.9 2.2-.4 1.7-.8 2.2-1.1 2.7-.1.1-.2.3-.3.4l-.6 1.1H6c2 0 3.4-.4 4.7-1.4.8-.6 1.2-1.4 1.3-2.3 0-.3 0-.5-.1-.7L19 5.7c.5-.6.5-1.6-.1-2.2zM9.7 14.7c-.7.5-1.5.8-2.4 1 .2-.5.5-1.2.8-2.3.2-.6.4-1 .8-1.1.5-.1 1 .1 1.3.3.2.2.3.5.2.8 0 .3-.1.9-.7 1.3z" }) });
136 + var external_default = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_primitives.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", style: { fill: "none" }, stroke: "currentColor", strokeWidth: "1.5", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_primitives.Path, { d: "M9.5 6.25H6.5C5.80964 6.25 5.25 6.80964 5.25 7.5V17.5C5.25 18.1904 5.80964 18.75 6.5 18.75H16.5C17.1904 18.75 17.75 18.1904 17.75 17.5V14.5M11.5 12.5L18.75 5.25M12.5 5.25H18.75V11.5", vectorEffect: "non-scaling-stroke" }) });
136 137
137 - // packages/icons/build-module/library/external.mjs
138 + // packages/icons/build-module/library/layout.mjs
138 139 var import_primitives2 = __toESM(require_primitives(), 1);
139 140 var import_jsx_runtime2 = __toESM(require_jsx_runtime(), 1);
140 - var external_default = /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_primitives2.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_primitives2.Path, { d: "M19.5 4.5h-7V6h4.44l-5.97 5.97 1.06 1.06L18 7.06v4.44h1.5v-7Zm-13 1a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-3H17v3a.5.5 0 0 1-.5.5h-10a.5.5 0 0 1-.5-.5v-10a.5.5 0 0 1 .5-.5h3V5.5h-3Z" }) });
141 + var layout_default = /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_primitives2.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", style: { fill: "none" }, stroke: "currentColor", strokeWidth: "1.5", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_primitives2.Path, { d: "M9.75 19.25H18C18.6904 19.25 19.25 18.6904 19.25 18V9.75M9.75 19.25H6C5.30964 19.25 4.75 18.6904 4.75 18V9.75M9.75 19.25V9.75M19.25 9.75V6C19.25 5.30964 18.6904 4.75 18 4.75H6C5.30964 4.75 4.75 5.30964 4.75 6V9.75M19.25 9.75H9.75M9.75 9.75H4.75", vectorEffect: "non-scaling-stroke" }) });
141 142
142 - // packages/icons/build-module/library/layout.mjs
143 + // packages/icons/build-module/library/page.mjs
143 144 var import_primitives3 = __toESM(require_primitives(), 1);
144 145 var import_jsx_runtime3 = __toESM(require_jsx_runtime(), 1);
145 - var layout_default = /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_primitives3.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_primitives3.Path, { d: "M18 5.5H6a.5.5 0 00-.5.5v3h13V6a.5.5 0 00-.5-.5zm.5 5H10v8h8a.5.5 0 00.5-.5v-7.5zm-10 0h-3V18a.5.5 0 00.5.5h2.5v-8zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z" }) });
146 + var page_default = /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_primitives3.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", style: { fill: "none" }, stroke: "currentColor", strokeWidth: "1.5", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_primitives3.Path, { d: "M8.5 8.25H15.5M8.5 11.75H15.5M8.5 15.25H15.5M18.25 18V6C18.25 5.30964 17.6904 4.75 17 4.75H7C6.30964 4.75 5.75 5.30964 5.75 6L5.75 18C5.75 18.6904 6.30964 19.25 7 19.25H17C17.6904 19.25 18.25 18.6904 18.25 18Z", vectorEffect: "non-scaling-stroke" }) });
146 147
147 - // packages/icons/build-module/library/navigation.mjs
148 + // packages/icons/build-module/library/post.mjs
148 149 var import_primitives4 = __toESM(require_primitives(), 1);
149 150 var import_jsx_runtime4 = __toESM(require_jsx_runtime(), 1);
150 - var navigation_default = /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_primitives4.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_primitives4.Path, { d: "M12 4c-4.4 0-8 3.6-8 8s3.6 8 8 8 8-3.6 8-8-3.6-8-8-8zm0 14.5c-3.6 0-6.5-2.9-6.5-6.5S8.4 5.5 12 5.5s6.5 2.9 6.5 6.5-2.9 6.5-6.5 6.5zM9 16l4.5-3L15 8.4l-4.5 3L9 16z" }) });
151 + var post_default = /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_primitives4.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", style: { fill: "none" }, stroke: "currentColor", strokeWidth: "1.5", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_primitives4.Path, { d: "M4.76776 11.5178L7.76777 8.51776M4 15H20M4 19H13M6 6.74999L9.53554 10.2855C10.1688 9.65226 10.3913 8.76379 10.2031 7.95118L12.5178 6.26776L10.0178 3.76776L8.33435 6.08246C7.52174 5.89422 6.63327 6.11673 6 6.74999Z", vectorEffect: "non-scaling-stroke" }) });
151 152
152 - // packages/icons/build-module/library/page.mjs
153 + // packages/icons/build-module/library/symbol-filled.mjs
153 154 var import_primitives5 = __toESM(require_primitives(), 1);
154 155 var import_jsx_runtime5 = __toESM(require_jsx_runtime(), 1);
155 - var page_default = /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_primitives5.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: [
156 - /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_primitives5.Path, { d: "M15.5 7.5h-7V9h7V7.5Zm-7 3.5h7v1.5h-7V11Zm7 3.5h-7V16h7v-1.5Z" }),
157 - /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_primitives5.Path, { d: "M17 4H7a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2ZM7 5.5h10a.5.5 0 0 1 .5.5v12a.5.5 0 0 1-.5.5H7a.5.5 0 0 1-.5-.5V6a.5.5 0 0 1 .5-.5Z" })
156 + var symbol_filled_default = /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_primitives5.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", style: { fill: "none" }, stroke: "currentColor", strokeWidth: "1.5", children: [
157 + /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_primitives5.Path, { d: "M15.2071 6.20711L20.2929 11.2929C20.6834 11.6834 20.6834 12.3166 20.2929 12.7071L15.2071 17.7929C14.8166 18.1834 14.1834 18.1834 13.7929 17.7929L8.70711 12.7071C8.31658 12.3166 8.31658 11.6834 8.70711 11.2929L13.7929 6.20711C14.1834 5.81658 14.8166 5.81658 15.2071 6.20711Z", fill: "currentColor", vectorEffect: "non-scaling-stroke" }),
158 + /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_primitives5.Path, { d: "M9.5 5.5L3.70711 11.2929C3.31658 11.6834 3.31658 12.3166 3.70711 12.7071L9.5 18.5", vectorEffect: "non-scaling-stroke" })
158 159 ] });
159 160
160 - // packages/icons/build-module/library/post.mjs
161 - var import_primitives6 = __toESM(require_primitives(), 1);
162 - var import_jsx_runtime6 = __toESM(require_jsx_runtime(), 1);
163 - var post_default = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_primitives6.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_primitives6.Path, { d: "m7.3 9.7 1.4 1.4c.2-.2.3-.3.4-.5 0 0 0-.1.1-.1.3-.5.4-1.1.3-1.6L12 7 9 4 7.2 6.5c-.6-.1-1.1 0-1.6.3 0 0-.1 0-.1.1-.3.1-.4.2-.6.4l1.4 1.4L4 11v1h1l2.3-2.3zM4 20h9v-1.5H4V20zm0-5.5V16h16v-1.5H4z" }) });
164 -
165 - // packages/icons/build-module/library/styles.mjs
166 - var import_primitives7 = __toESM(require_primitives(), 1);
167 - var import_jsx_runtime7 = __toESM(require_jsx_runtime(), 1);
168 - var styles_default = /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_primitives7.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_primitives7.Path, { fillRule: "evenodd", clipRule: "evenodd", d: "M20 12a8 8 0 1 1-16 0 8 8 0 0 1 16 0Zm-1.5 0a6.5 6.5 0 0 1-6.5 6.5v-13a6.5 6.5 0 0 1 6.5 6.5Z" }) });
169 -
170 - // packages/icons/build-module/library/symbol-filled.mjs
171 - var import_primitives8 = __toESM(require_primitives(), 1);
172 - var import_jsx_runtime8 = __toESM(require_jsx_runtime(), 1);
173 - var symbol_filled_default = /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_primitives8.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_primitives8.Path, { d: "M21.3 10.8l-5.6-5.6c-.7-.7-1.8-.7-2.5 0l-5.6 5.6c-.7.7-.7 1.8 0 2.5l5.6 5.6c.3.3.8.5 1.2.5s.9-.2 1.2-.5l5.6-5.6c.8-.7.8-1.9.1-2.5zm-17.6 1L10 5.5l-1-1-6.3 6.3c-.7.7-.7 1.8 0 2.5L9 19.5l1.1-1.1-6.3-6.3c-.2 0-.2-.2-.1-.3z" }) });
174 -
175 - // packages/icons/build-module/library/symbol.mjs
176 - var import_primitives9 = __toESM(require_primitives(), 1);
177 - var import_jsx_runtime9 = __toESM(require_jsx_runtime(), 1);
178 - var symbol_default = /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_primitives9.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_primitives9.Path, { d: "M21.3 10.8l-5.6-5.6c-.7-.7-1.8-.7-2.5 0l-5.6 5.6c-.7.7-.7 1.8 0 2.5l5.6 5.6c.3.3.8.5 1.2.5s.9-.2 1.2-.5l5.6-5.6c.8-.7.8-1.9.1-2.5zm-1 1.4l-5.6 5.6c-.1.1-.3.1-.4 0l-5.6-5.6c-.1-.1-.1-.3 0-.4l5.6-5.6s.1-.1.2-.1.1 0 .2.1l5.6 5.6c.1.1.1.3 0 .4zm-16.6-.4L10 5.5l-1-1-6.3 6.3c-.7.7-.7 1.8 0 2.5L9 19.5l1.1-1.1-6.3-6.3c-.2 0-.2-.2-.1-.3z" }) });
179 -
180 161 // packages/core-commands/build-module/admin-navigation-commands.mjs
181 162 var import_element = __toESM(require_element(), 1);
182 163 var import_core_data = __toESM(require_core_data(), 1);
183 164 var import_data = __toESM(require_data(), 1);
@@ -482,9 +463,8 @@
482 463 if (orderedRecords?.length > 0 && templateType === "wp_template_part") {
483 464 result.push({
484 465 name: "core/edit-site/open-template-parts",
485 466 label: (0, import_i18n2.__)("Go to: Template parts"),
486 - icon: symbol_filled_default,
487 467 category: "view",
488 468 callback: ({ close }) => {
489 469 if (isSiteEditor) {
490 470 history.navigate(
@@ -534,9 +514,8 @@
534 514 if (canCreateTemplate && isBlockBasedTheme) {
535 515 result.push({
536 516 name: "core/edit-site/open-styles",
537 517 label: (0, import_i18n2.__)("Go to: Styles"),
538 - icon: styles_default,
539 518 category: "view",
540 519 callback: ({ close }) => {
541 520 if (isSiteEditor) {
542 521 history.navigate("/styles");
@@ -553,9 +532,8 @@
553 532 });
554 533 result.push({
555 534 name: "core/edit-site/open-navigation",
556 535 label: (0, import_i18n2.__)("Go to: Navigation"),
557 - icon: navigation_default,
558 536 category: "view",
559 537 callback: ({ close }) => {
560 538 if (isSiteEditor) {
561 539 history.navigate("/navigation");
@@ -572,9 +550,8 @@
572 550 });
573 551 result.push({
574 552 name: "core/edit-site/open-templates",
575 553 label: (0, import_i18n2.__)("Go to: Templates"),
576 - icon: layout_default,
577 554 category: "view",
578 555 callback: ({ close }) => {
579 556 if (isSiteEditor) {
580 557 history.navigate(mapRoute("/template"));
@@ -593,9 +570,8 @@
593 570 if (canCreatePatterns) {
594 571 result.push({
595 572 name: "core/edit-site/open-patterns",
596 573 label: (0, import_i18n2.__)("Go to: Patterns"),
597 - icon: symbol_default,
598 574 category: "view",
599 575 callback: ({ close }) => {
600 576 if (canCreateTemplate) {
601 577 if (isSiteEditor) {
@@ -651,9 +627,8 @@
651 627 return [
652 628 {
653 629 name: "core/open-styles-css",
654 630 label: (0, import_i18n2.__)("Open custom CSS"),
655 - icon: brush_default,
656 631 category: "view",
657 632 callback: ({ close }) => {
658 633 close();
659 634 if (isSiteEditor) {
@@ -720,22 +695,24 @@
720 695 useCommands: useCommands2
721 696 });
722 697
723 698 // packages/core-commands/build-module/index.mjs
724 - var import_jsx_runtime10 = __toESM(require_jsx_runtime(), 1);
699 + var import_jsx_runtime6 = __toESM(require_jsx_runtime(), 1);
725 700 var { RouterProvider } = unlock(import_router2.privateApis);
726 701 function CommandPalette({ settings }) {
727 702 const { menu_commands: menuCommands, is_network_admin: isNetworkAdmin } = settings;
728 703 useAdminNavigationCommands(menuCommands);
729 704 useSiteEditorNavigationCommands(isNetworkAdmin);
730 - return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(RouterProvider, { pathArg: "p", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_commands3.CommandMenu, {}) });
705 + return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(RouterProvider, { pathArg: "p", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_commands3.CommandMenu, {}) });
731 706 }
732 707 function initializeCommandPalette(settings) {
733 708 const root = document.createElement("div");
734 709 document.body.appendChild(root);
735 710 (0, import_element3.createRoot)(root).render(
736 - /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_element3.StrictMode, { children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(CommandPalette, { settings }) })
711 + /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_element3.StrictMode, { children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(CommandPalette, { settings }) })
737 712 );
738 713 }
739 714 return __toCommonJS(index_exports);
715 +})();
716 +(window.wp ||= {}).coreCommands = wp.coreCommands;
740 717 })();
741 718 //# sourceMappingURL=index.js.map