PluginProbe
Gutenberg / 22.7.0
Gutenberg v22.7.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 12.6.0 All 403 releases
← All changes | build/scripts/patterns/index.js +117 -841 24.0.0 → 22.7.0 View file →
@@ -1,5 +1,4 @@
1 -(function() {
2 1 var wp;
3 2 (wp ||= {}).patterns = (() => {
4 3 var __create = Object.create;
5 4 var __defProp = Object.defineProperty;
@@ -94,12 +93,12 @@
94 93 module.exports = window.ReactJSXRuntime;
95 94 }
96 95 });
97 96
98 - // vendor-external:react
99 - var require_react = __commonJS({
100 - "vendor-external:react"(exports, module) {
101 - module.exports = window.React;
97 + // package-external:@wordpress/notices
98 + var require_notices = __commonJS({
99 + "package-external:@wordpress/notices"(exports, module) {
100 + module.exports = window.wp.notices;
102 101 }
103 102 });
104 103
105 104 // package-external:@wordpress/compose
@@ -108,8 +107,15 @@
108 107 module.exports = window.wp.compose;
109 108 }
110 109 });
111 110
111 + // package-external:@wordpress/html-entities
112 + var require_html_entities = __commonJS({
113 + "package-external:@wordpress/html-entities"(exports, module) {
114 + module.exports = window.wp.htmlEntities;
115 + }
116 + });
117 +
112 118 // package-external:@wordpress/primitives
113 119 var require_primitives = __commonJS({
114 120 "package-external:@wordpress/primitives"(exports, module) {
115 121 module.exports = window.wp.primitives;
@@ -115,8 +121,15 @@
115 121 module.exports = window.wp.primitives;
116 122 }
117 123 });
118 124
125 + // package-external:@wordpress/url
126 + var require_url = __commonJS({
127 + "package-external:@wordpress/url"(exports, module) {
128 + module.exports = window.wp.url;
129 + }
130 + });
131 +
119 132 // package-external:@wordpress/a11y
120 133 var require_a11y = __commonJS({
121 134 "package-external:@wordpress/a11y"(exports, module) {
122 135 module.exports = window.wp.a11y;
@@ -122,29 +135,8 @@
122 135 module.exports = window.wp.a11y;
123 136 }
124 137 });
125 138
126 - // package-external:@wordpress/notices
127 - var require_notices = __commonJS({
128 - "package-external:@wordpress/notices"(exports, module) {
129 - module.exports = window.wp.notices;
130 - }
131 - });
132 -
133 - // package-external:@wordpress/html-entities
134 - var require_html_entities = __commonJS({
135 - "package-external:@wordpress/html-entities"(exports, module) {
136 - module.exports = window.wp.htmlEntities;
137 - }
138 - });
139 -
140 - // package-external:@wordpress/url
141 - var require_url = __commonJS({
142 - "package-external:@wordpress/url"(exports, module) {
143 - module.exports = window.wp.url;
144 - }
145 - });
146 -
147 139 // packages/patterns/build-module/index.mjs
148 140 var index_exports = {};
149 141 __export(index_exports, {
150 142 privateApis: () => privateApis,
@@ -218,9 +210,9 @@
218 210 const fileContent = await file.text();
219 211 let parsedContent;
220 212 try {
221 213 parsedContent = JSON.parse(fileContent);
222 - } catch {
214 + } catch (e) {
223 215 throw new Error("Invalid JSON file");
224 216 }
225 217 if (parsedContent.__file !== "wp_block" || !parsedContent.title || !parsedContent.content || typeof parsedContent.title !== "string" || typeof parsedContent.content !== "string" || parsedContent.syncStatus && typeof parsedContent.syncStatus !== "string") {
226 218 throw new Error("Invalid pattern JSON file");
@@ -347,720 +339,10 @@
347 339 }
348 340
349 341 // packages/patterns/build-module/components/create-pattern-modal.mjs
350 342 var import_components3 = __toESM(require_components(), 1);
351 -
352 - // node_modules/clsx/dist/clsx.mjs
353 - function r(e) {
354 - var t, f, n = "";
355 - if ("string" == typeof e || "number" == typeof e) n += e;
356 - else if ("object" == typeof e) if (Array.isArray(e)) {
357 - var o = e.length;
358 - for (t = 0; t < o; t++) e[t] && (f = r(e[t])) && (n && (n += " "), n += f);
359 - } else for (f in e) e[f] && (n && (n += " "), n += f);
360 - return n;
361 - }
362 - function clsx() {
363 - for (var e, t, f = 0, n = "", o = arguments.length; f < o; f++) (e = arguments[f]) && (t = r(e)) && (n && (n += " "), n += t);
364 - return n;
365 - }
366 - var clsx_default = clsx;
367 -
368 - // node_modules/@base-ui/utils/useRefWithInit.mjs
369 - var React = __toESM(require_react(), 1);
370 - var UNINITIALIZED = {};
371 - function useRefWithInit(init, initArg) {
372 - const ref = React.useRef(UNINITIALIZED);
373 - if (ref.current === UNINITIALIZED) {
374 - ref.current = init(initArg);
375 - }
376 - return ref;
377 - }
378 -
379 - // node_modules/@base-ui/utils/warn.mjs
380 - var set;
381 - if (true) {
382 - set = /* @__PURE__ */ new Set();
383 - }
384 - function warn(...messages) {
385 - if (true) {
386 - const messageKey = messages.join(" ");
387 - if (!set.has(messageKey)) {
388 - set.add(messageKey);
389 - console.warn(`Base UI: ${messageKey}`);
390 - }
391 - }
392 - }
393 -
394 - // node_modules/@base-ui/react/internals/useRenderElement.mjs
395 - var React4 = __toESM(require_react(), 1);
396 -
397 - // node_modules/@base-ui/utils/useMergedRefs.mjs
398 - function useMergedRefs(a, b, c, d) {
399 - const forkRef = useRefWithInit(createForkRef).current;
400 - if (didChange(forkRef, a, b, c, d)) {
401 - update(forkRef, [a, b, c, d]);
402 - }
403 - return forkRef.callback;
404 - }
405 - function useMergedRefsN(refs) {
406 - const forkRef = useRefWithInit(createForkRef).current;
407 - if (didChangeN(forkRef, refs)) {
408 - update(forkRef, refs);
409 - }
410 - return forkRef.callback;
411 - }
412 - function createForkRef() {
413 - return {
414 - callback: null,
415 - cleanup: null,
416 - refs: []
417 - };
418 - }
419 - function didChange(forkRef, a, b, c, d) {
420 - return forkRef.refs[0] !== a || forkRef.refs[1] !== b || forkRef.refs[2] !== c || forkRef.refs[3] !== d;
421 - }
422 - function didChangeN(forkRef, newRefs) {
423 - return forkRef.refs.length !== newRefs.length || forkRef.refs.some((ref, index) => ref !== newRefs[index]);
424 - }
425 - function update(forkRef, refs) {
426 - forkRef.refs = refs;
427 - if (refs.every((ref) => ref == null)) {
428 - forkRef.callback = null;
429 - return;
430 - }
431 - forkRef.callback = (instance) => {
432 - if (forkRef.cleanup) {
433 - forkRef.cleanup();
434 - forkRef.cleanup = null;
435 - }
436 - if (instance != null) {
437 - const cleanupCallbacks = Array(refs.length).fill(null);
438 - for (let i = 0; i < refs.length; i += 1) {
439 - const ref = refs[i];
440 - if (ref == null) {
441 - continue;
442 - }
443 - switch (typeof ref) {
444 - case "function": {
445 - const refCleanup = ref(instance);
446 - if (typeof refCleanup === "function") {
447 - cleanupCallbacks[i] = refCleanup;
448 - }
449 - break;
450 - }
451 - case "object": {
452 - ref.current = instance;
453 - break;
454 - }
455 - default:
456 - }
457 - }
458 - forkRef.cleanup = () => {
459 - for (let i = 0; i < refs.length; i += 1) {
460 - const ref = refs[i];
461 - if (ref == null) {
462 - continue;
463 - }
464 - switch (typeof ref) {
465 - case "function": {
466 - const cleanupCallback = cleanupCallbacks[i];
467 - if (typeof cleanupCallback === "function") {
468 - cleanupCallback();
469 - } else {
470 - void ref(null);
471 - }
472 - break;
473 - }
474 - case "object": {
475 - ref.current = null;
476 - break;
477 - }
478 - default:
479 - }
480 - }
481 - };
482 - }
483 - };
484 - }
485 -
486 - // node_modules/@base-ui/utils/getReactElementRef.mjs
487 - var React3 = __toESM(require_react(), 1);
488 -
489 - // node_modules/@base-ui/utils/reactVersion.mjs
490 - var React2 = __toESM(require_react(), 1);
491 - var majorVersion = parseInt(React2.version, 10);
492 - function isReactVersionAtLeast(reactVersionToCheck) {
493 - return majorVersion >= reactVersionToCheck;
494 - }
495 -
496 - // node_modules/@base-ui/utils/getReactElementRef.mjs
497 - function getReactElementRef(element) {
498 - if (!/* @__PURE__ */ React3.isValidElement(element)) {
499 - return null;
500 - }
501 - const reactElement = element;
502 - const propsWithRef = reactElement.props;
503 - return (isReactVersionAtLeast(19) ? propsWithRef?.ref : reactElement.ref) ?? null;
504 - }
505 -
506 - // node_modules/@base-ui/utils/mergeObjects.mjs
507 - function mergeObjects(a, b) {
508 - if (a && !b) {
509 - return a;
510 - }
511 - if (!a && b) {
512 - return b;
513 - }
514 - if (a || b) {
515 - return {
516 - ...a,
517 - ...b
518 - };
519 - }
520 - return void 0;
521 - }
522 -
523 - // node_modules/@base-ui/utils/empty.mjs
524 - var EMPTY_ARRAY = Object.freeze([]);
525 - var EMPTY_OBJECT = Object.freeze({});
526 -
527 - // node_modules/@base-ui/react/internals/getStateAttributesProps.mjs
528 - function getStateAttributesProps(state, customMapping) {
529 - const props = {};
530 - for (const key in state) {
531 - const value = state[key];
532 - if (customMapping?.hasOwnProperty(key)) {
533 - const customProps = customMapping[key](value);
534 - if (customProps != null) {
535 - Object.assign(props, customProps);
536 - }
537 - continue;
538 - }
539 - if (value === true) {
540 - props[`data-${key.toLowerCase()}`] = "";
541 - } else if (value) {
542 - props[`data-${key.toLowerCase()}`] = value.toString();
543 - }
544 - }
545 - return props;
546 - }
547 -
548 - // node_modules/@base-ui/react/utils/resolveClassName.mjs
549 - function resolveClassName(className, state) {
550 - return typeof className === "function" ? className(state) : className;
551 - }
552 -
553 - // node_modules/@base-ui/react/utils/resolveStyle.mjs
554 - function resolveStyle(style, state) {
555 - return typeof style === "function" ? style(state) : style;
556 - }
557 -
558 - // node_modules/@base-ui/react/merge-props/mergeProps.mjs
559 - var EMPTY_PROPS = {};
560 - function mergeProps(a, b, c, d, e) {
561 - if (!c && !d && !e && !a) {
562 - return createInitialMergedProps(b);
563 - }
564 - let merged = createInitialMergedProps(a);
565 - if (b) {
566 - merged = mergeInto(merged, b);
567 - }
568 - if (c) {
569 - merged = mergeInto(merged, c);
570 - }
571 - if (d) {
572 - merged = mergeInto(merged, d);
573 - }
574 - if (e) {
575 - merged = mergeInto(merged, e);
576 - }
577 - return merged;
578 - }
579 - function mergePropsN(props) {
580 - if (props.length === 0) {
581 - return EMPTY_PROPS;
582 - }
583 - if (props.length === 1) {
584 - return createInitialMergedProps(props[0]);
585 - }
586 - let merged = createInitialMergedProps(props[0]);
587 - for (let i = 1; i < props.length; i += 1) {
588 - merged = mergeInto(merged, props[i]);
589 - }
590 - return merged;
591 - }
592 - function createInitialMergedProps(inputProps) {
593 - if (isPropsGetter(inputProps)) {
594 - return {
595 - ...resolvePropsGetter(inputProps, EMPTY_PROPS)
596 - };
597 - }
598 - return copyInitialProps(inputProps);
599 - }
600 - function mergeInto(merged, inputProps) {
601 - if (isPropsGetter(inputProps)) {
602 - return resolvePropsGetter(inputProps, merged);
603 - }
604 - return mutablyMergeInto(merged, inputProps);
605 - }
606 - function copyInitialProps(inputProps) {
607 - const copiedProps = {
608 - ...inputProps
609 - };
610 - for (const propName in copiedProps) {
611 - const propValue = copiedProps[propName];
612 - if (isEventHandler(propName, propValue)) {
613 - copiedProps[propName] = wrapEventHandler(propValue);
614 - }
615 - }
616 - return copiedProps;
617 - }
618 - function mutablyMergeInto(mergedProps, externalProps) {
619 - if (!externalProps) {
620 - return mergedProps;
621 - }
622 - for (const propName in externalProps) {
623 - const externalPropValue = externalProps[propName];
624 - switch (propName) {
625 - case "style": {
626 - mergedProps[propName] = mergeObjects(mergedProps.style, externalPropValue);
627 - break;
628 - }
629 - case "className": {
630 - mergedProps[propName] = mergeClassNames(mergedProps.className, externalPropValue);
631 - break;
632 - }
633 - default: {
634 - if (isEventHandler(propName, externalPropValue)) {
635 - mergedProps[propName] = mergeEventHandlers(mergedProps[propName], externalPropValue);
636 - } else {
637 - mergedProps[propName] = externalPropValue;
638 - }
639 - }
640 - }
641 - }
642 - return mergedProps;
643 - }
644 - function isEventHandler(key, value) {
645 - const code0 = key.charCodeAt(0);
646 - const code1 = key.charCodeAt(1);
647 - const code2 = key.charCodeAt(2);
648 - return code0 === 111 && code1 === 110 && code2 >= 65 && code2 <= 90 && (typeof value === "function" || typeof value === "undefined");
649 - }
650 - function isPropsGetter(inputProps) {
651 - return typeof inputProps === "function";
652 - }
653 - function resolvePropsGetter(inputProps, previousProps) {
654 - if (isPropsGetter(inputProps)) {
655 - return inputProps(previousProps);
656 - }
657 - return inputProps ?? EMPTY_PROPS;
658 - }
659 - function mergeEventHandlers(ourHandler, theirHandler) {
660 - if (!theirHandler) {
661 - return ourHandler;
662 - }
663 - if (!ourHandler) {
664 - return wrapEventHandler(theirHandler);
665 - }
666 - return (...args) => {
667 - const event = args[0];
668 - if (isSyntheticEvent(event)) {
669 - const baseUIEvent = event;
670 - makeEventPreventable(baseUIEvent);
671 - const result2 = theirHandler(...args);
672 - if (!baseUIEvent.baseUIHandlerPrevented) {
673 - ourHandler?.(...args);
674 - }
675 - return result2;
676 - }
677 - const result = theirHandler(...args);
678 - ourHandler?.(...args);
679 - return result;
680 - };
681 - }
682 - function wrapEventHandler(handler) {
683 - if (!handler) {
684 - return handler;
685 - }
686 - return (...args) => {
687 - const event = args[0];
688 - if (isSyntheticEvent(event)) {
689 - makeEventPreventable(event);
690 - }
691 - return handler(...args);
692 - };
693 - }
694 - function makeEventPreventable(event) {
695 - event.preventBaseUIHandler = () => {
696 - event.baseUIHandlerPrevented = true;
697 - };
698 - return event;
699 - }
700 - function mergeClassNames(ourClassName, theirClassName) {
701 - if (theirClassName) {
702 - if (ourClassName) {
703 - return theirClassName + " " + ourClassName;
704 - }
705 - return theirClassName;
706 - }
707 - return ourClassName;
708 - }
709 - function isSyntheticEvent(event) {
710 - return event != null && typeof event === "object" && "nativeEvent" in event;
711 - }
712 -
713 - // node_modules/@base-ui/react/internals/useRenderElement.mjs
714 - var import_react = __toESM(require_react(), 1);
715 - function useRenderElement(element, componentProps, params = {}) {
716 - const renderProp = componentProps.render;
717 - const outProps = useRenderElementProps(componentProps, params);
718 - if (params.enabled === false) {
719 - return null;
720 - }
721 - const state = params.state ?? EMPTY_OBJECT;
722 - return evaluateRenderProp(element, renderProp, outProps, state);
723 - }
724 - function useRenderElementProps(componentProps, params = {}) {
725 - const {
726 - className: classNameProp,
727 - style: styleProp,
728 - render: renderProp
729 - } = componentProps;
730 - const {
731 - state = EMPTY_OBJECT,
732 - ref,
733 - props,
734 - stateAttributesMapping,
735 - enabled = true
736 - } = params;
737 - const className = enabled ? resolveClassName(classNameProp, state) : void 0;
738 - const style = enabled ? resolveStyle(styleProp, state) : void 0;
739 - const stateProps = enabled ? getStateAttributesProps(state, stateAttributesMapping) : EMPTY_OBJECT;
740 - const resolvedProps = enabled && props ? resolveRenderFunctionProps(props) : void 0;
741 - const outProps = enabled ? mergeObjects(stateProps, resolvedProps) ?? {} : EMPTY_OBJECT;
742 - if (typeof document !== "undefined") {
743 - if (!enabled) {
744 - void useMergedRefs(null, null);
745 - } else if (Array.isArray(ref)) {
746 - outProps.ref = useMergedRefsN([outProps.ref, getReactElementRef(renderProp), ...ref]);
747 - } else {
748 - outProps.ref = useMergedRefs(outProps.ref, getReactElementRef(renderProp), ref);
749 - }
750 - }
751 - if (!enabled) {
752 - return EMPTY_OBJECT;
753 - }
754 - if (className !== void 0) {
755 - outProps.className = mergeClassNames(outProps.className, className);
756 - }
757 - if (style !== void 0) {
758 - outProps.style = mergeObjects(outProps.style, style);
759 - }
760 - return outProps;
761 - }
762 - function resolveRenderFunctionProps(props) {
763 - if (Array.isArray(props)) {
764 - return mergePropsN(props);
765 - }
766 - return mergeProps(void 0, props);
767 - }
768 - var REACT_LAZY_TYPE = /* @__PURE__ */ Symbol.for("react.lazy");
769 - var COMPONENT_IDENTIFIER_PATTERN = /^[A-Z][A-Za-z0-9$]*$/;
770 - var LOWERCASE_CHARACTER_PATTERN = /[a-z]/;
771 - function evaluateRenderProp(element, render, props, state) {
772 - if (render) {
773 - if (typeof render === "function") {
774 - if (true) {
775 - warnIfRenderPropLooksLikeComponent(render);
776 - }
777 - return render(props, state);
778 - }
779 - const mergedProps = mergeProps(props, render.props);
780 - mergedProps.ref = props.ref;
781 - let newElement = render;
782 - if (newElement?.$$typeof === REACT_LAZY_TYPE) {
783 - const children = React4.Children.toArray(render);
784 - newElement = children[0];
785 - }
786 - if (true) {
787 - if (!/* @__PURE__ */ React4.isValidElement(newElement)) {
788 - throw new Error(["Base UI: The `render` prop was provided an invalid React element as `React.isValidElement(render)` is `false`.", "A valid React element must be provided to the `render` prop because it is cloned with props to replace the default element.", "https://base-ui.com/r/invalid-render-prop"].join("\n"));
789 - }
790 - }
791 - return /* @__PURE__ */ React4.cloneElement(newElement, mergedProps);
792 - }
793 - if (element) {
794 - if (typeof element === "string") {
795 - return renderTag(element, props);
796 - }
797 - }
798 - throw new Error(true ? "Base UI: Render element or function are not defined." : formatErrorMessage_default(8));
799 - }
800 - function warnIfRenderPropLooksLikeComponent(renderFn) {
801 - const functionName = renderFn.name;
802 - if (functionName.length === 0) {
803 - return;
804 - }
805 - if (!COMPONENT_IDENTIFIER_PATTERN.test(functionName)) {
806 - return;
807 - }
808 - if (!LOWERCASE_CHARACTER_PATTERN.test(functionName)) {
809 - return;
810 - }
811 - warn(`The \`render\` prop received a function named \`${functionName}\` that starts with an uppercase letter.`, "This usually means a React component was passed directly as `render={Component}`.", "Base UI calls `render` as a plain function, which can break the Rules of Hooks during reconciliation.", "If this is an intentional render callback, rename it to start with a lowercase letter.", "Use `render={<Component />}` or `render={(props) => <Component {...props} />}` instead.", "https://base-ui.com/r/invalid-render-prop");
812 - }
813 - function renderTag(Tag, props) {
814 - if (Tag === "button") {
815 - return /* @__PURE__ */ (0, import_react.createElement)("button", {
816 - type: "button",
817 - ...props,
818 - key: props.key
819 - });
820 - }
821 - if (Tag === "img") {
822 - return /* @__PURE__ */ (0, import_react.createElement)("img", {
823 - alt: "",
824 - ...props,
825 - key: props.key
826 - });
827 - }
828 - return /* @__PURE__ */ React4.createElement(Tag, props);
829 - }
830 -
831 - // node_modules/@base-ui/react/use-render/useRender.mjs
832 - function useRender(params) {
833 - return useRenderElement(params.defaultTagName ?? "div", params, params);
834 - }
835 -
836 - // packages/ui/build-module/text/text.mjs
837 - var import_element2 = __toESM(require_element(), 1);
838 - var STYLE_HASH_ATTRIBUTE = "data-wp-hash";
839 - function getRuntime() {
840 - const globalScope = globalThis;
841 - if (globalScope.__wpStyleRuntime) {
842 - return globalScope.__wpStyleRuntime;
843 - }
844 - globalScope.__wpStyleRuntime = {
845 - documents: /* @__PURE__ */ new Map(),
846 - styles: /* @__PURE__ */ new Map(),
847 - injectedStyles: /* @__PURE__ */ new WeakMap()
848 - };
849 - if (typeof document !== "undefined") {
850 - registerDocument(document);
851 - }
852 - return globalScope.__wpStyleRuntime;
853 - }
854 - function documentContainsStyleHash(targetDocument, hash) {
855 - if (!targetDocument.head) {
856 - return false;
857 - }
858 - for (const style of targetDocument.head.querySelectorAll(
859 - `style[${STYLE_HASH_ATTRIBUTE}]`
860 - )) {
861 - if (style.getAttribute(STYLE_HASH_ATTRIBUTE) === hash) {
862 - return true;
863 - }
864 - }
865 - return false;
866 - }
867 - function injectStyle(targetDocument, hash, css) {
868 - if (!targetDocument.head) {
869 - return;
870 - }
871 - const runtime = getRuntime();
872 - let injectedStyles = runtime.injectedStyles.get(targetDocument);
873 - if (!injectedStyles) {
874 - injectedStyles = /* @__PURE__ */ new Set();
875 - runtime.injectedStyles.set(targetDocument, injectedStyles);
876 - }
877 - if (injectedStyles.has(hash)) {
878 - return;
879 - }
880 - if (documentContainsStyleHash(targetDocument, hash)) {
881 - injectedStyles.add(hash);
882 - return;
883 - }
884 - const style = targetDocument.createElement("style");
885 - style.setAttribute(STYLE_HASH_ATTRIBUTE, hash);
886 - style.appendChild(targetDocument.createTextNode(css));
887 - targetDocument.head.appendChild(style);
888 - injectedStyles.add(hash);
889 - }
890 - function registerDocument(targetDocument) {
891 - const runtime = getRuntime();
892 - runtime.documents.set(
893 - targetDocument,
894 - (runtime.documents.get(targetDocument) ?? 0) + 1
895 - );
896 - for (const [hash, css] of runtime.styles) {
897 - injectStyle(targetDocument, hash, css);
898 - }
899 - return () => {
900 - const count = runtime.documents.get(targetDocument);
901 - if (count === void 0) {
902 - return;
903 - }
904 - if (count <= 1) {
905 - runtime.documents.delete(targetDocument);
906 - return;
907 - }
908 - runtime.documents.set(targetDocument, count - 1);
909 - };
910 - }
911 - function registerStyle(hash, css) {
912 - const runtime = getRuntime();
913 - runtime.styles.set(hash, css);
914 - for (const targetDocument of runtime.documents.keys()) {
915 - injectStyle(targetDocument, hash, css);
916 - }
917 - }
918 - if (typeof process === "undefined" || true) {
919 - registerStyle("3167e7d116", '@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._83ed8a8da5dd50ea__text{text-wrap:pretty;margin:0}._14437cfb77831647__heading-2xl{--_gcd-heading-font-size:var(--wpds-typography-font-size-2xl,32px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-emphasis,600);--_gcd-p-font-size:var(--wpds-typography-font-size-2xl,32px);--_gcd-p-line-height:var(--wpds-typography-line-height-2xl,40px);font-size:var(--wpds-typography-font-size-2xl,32px);line-height:var(--wpds-typography-line-height-2xl,40px)}._14437cfb77831647__heading-2xl,._3c78b7fa9b4072dd__heading-xl{font-family:var(--wpds-typography-font-family-heading,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-weight:var(--wpds-typography-font-weight-emphasis,600)}._3c78b7fa9b4072dd__heading-xl{--_gcd-heading-font-size:var(--wpds-typography-font-size-xl,20px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-emphasis,600);--_gcd-p-font-size:var(--wpds-typography-font-size-xl,20px);--_gcd-p-line-height:var(--wpds-typography-line-height-md,24px);font-size:var(--wpds-typography-font-size-xl,20px);line-height:var(--wpds-typography-line-height-md,24px)}.aa58f227716bcde2__heading-lg{--_gcd-heading-font-size:var(--wpds-typography-font-size-lg,15px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-emphasis,600);--_gcd-p-font-size:var(--wpds-typography-font-size-lg,15px);--_gcd-p-line-height:var(--wpds-typography-line-height-sm,20px);font-size:var(--wpds-typography-font-size-lg,15px)}.aa58f227716bcde2__heading-lg,.fc4da56d8dfe52c4__heading-md{font-family:var(--wpds-typography-font-family-heading,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-weight:var(--wpds-typography-font-weight-emphasis,600);line-height:var(--wpds-typography-line-height-sm,20px)}.fc4da56d8dfe52c4__heading-md{--_gcd-heading-font-size:var(--wpds-typography-font-size-md,13px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-emphasis,600);--_gcd-p-font-size:var(--wpds-typography-font-size-md,13px);--_gcd-p-line-height:var(--wpds-typography-line-height-sm,20px);font-size:var(--wpds-typography-font-size-md,13px)}.a9b78c7c82e8dff7__heading-sm{--_gcd-heading-font-size:var(--wpds-typography-font-size-xs,11px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-emphasis,600);--_gcd-p-font-size:var(--wpds-typography-font-size-xs,11px);--_gcd-p-line-height:var(--wpds-typography-line-height-xs,16px);font-family:var(--wpds-typography-font-family-heading,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-xs,11px);font-weight:var(--wpds-typography-font-weight-emphasis,600);line-height:var(--wpds-typography-line-height-xs,16px);text-transform:uppercase}._305ff559e52180d5__body-xl{--_gcd-heading-font-size:var(--wpds-typography-font-size-xl,20px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-default,400);--_gcd-p-font-size:var(--wpds-typography-font-size-xl,20px);--_gcd-p-line-height:var(--wpds-typography-line-height-xl,32px);font-size:var(--wpds-typography-font-size-xl,20px);line-height:var(--wpds-typography-line-height-xl,32px)}._305ff559e52180d5__body-xl,.ca1aa3fc2029e958__body-lg{font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-weight:var(--wpds-typography-font-weight-default,400)}.ca1aa3fc2029e958__body-lg{--_gcd-heading-font-size:var(--wpds-typography-font-size-lg,15px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-default,400);--_gcd-p-font-size:var(--wpds-typography-font-size-lg,15px);--_gcd-p-line-height:var(--wpds-typography-line-height-md,24px);font-size:var(--wpds-typography-font-size-lg,15px);line-height:var(--wpds-typography-line-height-md,24px)}._131101940be12424__body-md{--_gcd-heading-font-size:var(--wpds-typography-font-size-md,13px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-default,400);--_gcd-p-font-size:var(--wpds-typography-font-size-md,13px);--_gcd-p-line-height:var(--wpds-typography-line-height-sm,20px);font-size:var(--wpds-typography-font-size-md,13px);line-height:var(--wpds-typography-line-height-sm,20px)}._0e8d87a42c1f75fa__body-sm,._131101940be12424__body-md{font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-weight:var(--wpds-typography-font-weight-default,400)}._0e8d87a42c1f75fa__body-sm{--_gcd-heading-font-size:var(--wpds-typography-font-size-sm,12px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-default,400);--_gcd-p-font-size:var(--wpds-typography-font-size-sm,12px);--_gcd-p-line-height:var(--wpds-typography-line-height-xs,16px);font-size:var(--wpds-typography-font-size-sm,12px);line-height:var(--wpds-typography-line-height-xs,16px)}}}');
920 - }
921 - var style_default = { "text": "_83ed8a8da5dd50ea__text", "heading-2xl": "_14437cfb77831647__heading-2xl", "heading-xl": "_3c78b7fa9b4072dd__heading-xl", "heading-lg": "aa58f227716bcde2__heading-lg", "heading-md": "fc4da56d8dfe52c4__heading-md", "heading-sm": "a9b78c7c82e8dff7__heading-sm", "body-xl": "_305ff559e52180d5__body-xl", "body-lg": "ca1aa3fc2029e958__body-lg", "body-md": "_131101940be12424__body-md", "body-sm": "_0e8d87a42c1f75fa__body-sm" };
922 - if (typeof process === "undefined" || true) {
923 - registerStyle("e8e31009f5", "._6defc79820e382c6__button{box-sizing:var(--_gcd-button-box-sizing,border-box);font-family:var(--_gcd-button-font-family,inherit);font-size:var(--_gcd-button-font-size,inherit);font-weight:var(--_gcd-button-font-weight,inherit)}.d2cff2e5dea83bd1__input{box-sizing:var(--_gcd-input-box-sizing,border-box);font-family:var(--_gcd-input-font-family,inherit);font-size:var(--_gcd-input-font-size,inherit);font-weight:var(--_gcd-input-font-weight,inherit);margin:var(--_gcd-input-margin,0);&::placeholder{color:var(--_gcd-input-placeholder-color,var(--wpds-color-foreground-interactive-neutral-weak,#707070))}&:is(textarea,[type=text],[type=password],[type=color],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=month],[type=number],[type=search],[type=tel],[type=time],[type=url],[type=week]){background-color:var(--_gcd-input-background-color,transparent);border:var(--_gcd-input-border,none);border-radius:var(--_gcd-input-border-radius,0);box-shadow:var(--_gcd-input-box-shadow,0 0 0 transparent);color:var(--_gcd-input-color,var(--wpds-color-foreground-interactive-neutral,#1e1e1e));&:focus{border-color:var(--_gcd-input-border-color-focus,var(--wp-admin-theme-color));box-shadow:var(--_gcd-input-box-shadow-focus,none);outline:var(--_gcd-input-outline-focus,none)}&:disabled{background:var(--_gcd-input-background-disabled,transparent);border-color:var(--_gcd-input-border-color-disabled,transparent);box-shadow:var(--_gcd-input-box-shadow-disabled,none);color:var(--_gcd-input-color-disabled,var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d))}}&:is(textarea,[type=text],[type=password],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=month],[type=number],[type=search],[type=tel],[type=time],[type=url],[type=week]){line-height:var(--_gcd-input-line-height,inherit);min-height:var(--_gcd-input-min-height,auto);padding:var(--_gcd-input-padding,0)}}._547d86373d02e108__textarea{box-sizing:var(--_gcd-textarea-box-sizing,border-box);overflow:var(--_gcd-textarea-overflow,auto);resize:var(--_gcd-textarea-resize,block)}._8c15fd0ed9f28ba4__div{outline:var(--_gcd-div-outline,0 solid transparent)}p._43cec3e1eec1066d__p{font-size:var(--_gcd-p-font-size,13px);line-height:var(--_gcd-p-line-height,1.5);margin:var(--_gcd-p-margin,0)}:is(h1,h2,h3,h4,h5,h6).e97669c6d9a38497__heading{color:var(--_gcd-heading-color,var(--wpds-color-foreground-content-neutral,#1e1e1e));font-size:var(--_gcd-heading-font-size,inherit);font-weight:var(--_gcd-heading-font-weight,var(--wpds-typography-font-weight-emphasis,600));margin:var(--_gcd-heading-margin,0)}._2c0831b0499dbd6e__a,._2c0831b0499dbd6e__a:is(:hover,:focus,:active){border-radius:var(--_gcd-a-border-radius,0);box-shadow:var(--_gcd-a-box-shadow,none);color:var(--_gcd-a-color,inherit);outline:var(--_gcd-a-outline,0 solid transparent);transition:var(--_gcd-a-transition,none)}.c59a0ebebd71fa4a__ol{list-style:var(--_gcd-ol-list-style,none);margin:var(--_gcd-ol-margin,0);padding-block:var(--_gcd-ol-padding-block,0);padding-inline:var(--_gcd-ol-padding-inline,0)}._46b5cb0c8e24e8c9__li{margin:var(--_gcd-li-margin,0)}");
924 - }
925 - var global_css_defense_default = { "button": "_6defc79820e382c6__button", "input": "d2cff2e5dea83bd1__input", "textarea": "_547d86373d02e108__textarea", "div": "_8c15fd0ed9f28ba4__div", "p": "_43cec3e1eec1066d__p", "heading": "e97669c6d9a38497__heading", "a": "_2c0831b0499dbd6e__a", "ol": "c59a0ebebd71fa4a__ol", "li": "_46b5cb0c8e24e8c9__li" };
926 - var Text = (0, import_element2.forwardRef)(function Text2({ variant = "body-md", render, className, ...props }, ref) {
927 - const element = useRender({
928 - render,
929 - defaultTagName: "span",
930 - ref,
931 - props: mergeProps(props, {
932 - className: clsx_default(
933 - style_default.text,
934 - global_css_defense_default.heading,
935 - global_css_defense_default.p,
936 - style_default[variant],
937 - className
938 - )
939 - })
940 - });
941 - return element;
942 - });
943 -
944 - // packages/icons/build-module/library/symbol.mjs
945 - var import_primitives = __toESM(require_primitives(), 1);
946 - var import_jsx_runtime2 = __toESM(require_jsx_runtime(), 1);
947 - var symbol_default = /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_primitives.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_primitives.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" }) });
948 -
949 - // packages/ui/build-module/stack/stack.mjs
950 - var import_element3 = __toESM(require_element(), 1);
951 - var STYLE_HASH_ATTRIBUTE2 = "data-wp-hash";
952 - function getRuntime2() {
953 - const globalScope = globalThis;
954 - if (globalScope.__wpStyleRuntime) {
955 - return globalScope.__wpStyleRuntime;
956 - }
957 - globalScope.__wpStyleRuntime = {
958 - documents: /* @__PURE__ */ new Map(),
959 - styles: /* @__PURE__ */ new Map(),
960 - injectedStyles: /* @__PURE__ */ new WeakMap()
961 - };
962 - if (typeof document !== "undefined") {
963 - registerDocument2(document);
964 - }
965 - return globalScope.__wpStyleRuntime;
966 - }
967 - function documentContainsStyleHash2(targetDocument, hash) {
968 - if (!targetDocument.head) {
969 - return false;
970 - }
971 - for (const style of targetDocument.head.querySelectorAll(
972 - `style[${STYLE_HASH_ATTRIBUTE2}]`
973 - )) {
974 - if (style.getAttribute(STYLE_HASH_ATTRIBUTE2) === hash) {
975 - return true;
976 - }
977 - }
978 - return false;
979 - }
980 - function injectStyle2(targetDocument, hash, css) {
981 - if (!targetDocument.head) {
982 - return;
983 - }
984 - const runtime = getRuntime2();
985 - let injectedStyles = runtime.injectedStyles.get(targetDocument);
986 - if (!injectedStyles) {
987 - injectedStyles = /* @__PURE__ */ new Set();
988 - runtime.injectedStyles.set(targetDocument, injectedStyles);
989 - }
990 - if (injectedStyles.has(hash)) {
991 - return;
992 - }
993 - if (documentContainsStyleHash2(targetDocument, hash)) {
994 - injectedStyles.add(hash);
995 - return;
996 - }
997 - const style = targetDocument.createElement("style");
998 - style.setAttribute(STYLE_HASH_ATTRIBUTE2, hash);
999 - style.appendChild(targetDocument.createTextNode(css));
1000 - targetDocument.head.appendChild(style);
1001 - injectedStyles.add(hash);
1002 - }
1003 - function registerDocument2(targetDocument) {
1004 - const runtime = getRuntime2();
1005 - runtime.documents.set(
1006 - targetDocument,
1007 - (runtime.documents.get(targetDocument) ?? 0) + 1
1008 - );
1009 - for (const [hash, css] of runtime.styles) {
1010 - injectStyle2(targetDocument, hash, css);
1011 - }
1012 - return () => {
1013 - const count = runtime.documents.get(targetDocument);
1014 - if (count === void 0) {
1015 - return;
1016 - }
1017 - if (count <= 1) {
1018 - runtime.documents.delete(targetDocument);
1019 - return;
1020 - }
1021 - runtime.documents.set(targetDocument, count - 1);
1022 - };
1023 - }
1024 - function registerStyle2(hash, css) {
1025 - const runtime = getRuntime2();
1026 - runtime.styles.set(hash, css);
1027 - for (const targetDocument of runtime.documents.keys()) {
1028 - injectStyle2(targetDocument, hash, css);
1029 - }
1030 - }
1031 - if (typeof process === "undefined" || true) {
1032 - registerStyle2("32aba35fe1", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._19ce0419607e1896__stack{display:flex}}}");
1033 - }
1034 - var style_default2 = { "stack": "_19ce0419607e1896__stack" };
1035 - var gapTokens = {
1036 - xs: "var(--wpds-dimension-gap-xs, 4px)",
1037 - sm: "var(--wpds-dimension-gap-sm, 8px)",
1038 - md: "var(--wpds-dimension-gap-md, 12px)",
1039 - lg: "var(--wpds-dimension-gap-lg, 16px)",
1040 - xl: "var(--wpds-dimension-gap-xl, 24px)",
1041 - "2xl": "var(--wpds-dimension-gap-2xl, 32px)",
1042 - "3xl": "var(--wpds-dimension-gap-3xl, 40px)"
1043 - };
1044 - var Stack = (0, import_element3.forwardRef)(function Stack2({ direction, gap, align, justify, wrap, render, ...props }, ref) {
1045 - const style = {
1046 - gap: gap && gapTokens[gap],
1047 - alignItems: align,
1048 - justifyContent: justify,
1049 - flexDirection: direction,
1050 - flexWrap: wrap
1051 - };
1052 - const element = useRender({
1053 - render,
1054 - ref,
1055 - props: mergeProps(props, { style, className: style_default2.stack })
1056 - });
1057 - return element;
1058 - });
1059 -
1060 - // packages/patterns/build-module/components/create-pattern-modal.mjs
1061 343 var import_i18n3 = __toESM(require_i18n(), 1);
1062 - var import_element6 = __toESM(require_element(), 1);
344 + var import_element4 = __toESM(require_element(), 1);
1063 345 var import_data5 = __toESM(require_data(), 1);
1064 346 var import_notices = __toESM(require_notices(), 1);
1065 347 var import_core_data3 = __toESM(require_core_data(), 1);
1066 348
@@ -1065,13 +347,13 @@
1065 347 var import_core_data3 = __toESM(require_core_data(), 1);
1066 348
1067 349 // packages/patterns/build-module/components/category-selector.mjs
1068 350 var import_i18n2 = __toESM(require_i18n(), 1);
1069 - var import_element4 = __toESM(require_element(), 1);
351 + var import_element2 = __toESM(require_element(), 1);
1070 352 var import_components2 = __toESM(require_components(), 1);
1071 353 var import_compose = __toESM(require_compose(), 1);
1072 354 var import_html_entities = __toESM(require_html_entities(), 1);
1073 - var import_jsx_runtime3 = __toESM(require_jsx_runtime(), 1);
355 + var import_jsx_runtime2 = __toESM(require_jsx_runtime(), 1);
1074 356 var unescapeString = (arg) => {
1075 357 return (0, import_html_entities.decodeEntities)(arg);
1076 358 };
1077 359 var CATEGORY_SLUG = "wp_pattern_category";
@@ -1079,11 +361,11 @@
1079 361 categoryTerms,
1080 362 onChange,
1081 363 categoryMap
1082 364 }) {
1083 - const [search, setSearch] = (0, import_element4.useState)("");
365 + const [search, setSearch] = (0, import_element2.useState)("");
1084 366 const debouncedSearch = (0, import_compose.useDebounce)(setSearch, 500);
1085 - const suggestions = (0, import_element4.useMemo)(() => {
367 + const suggestions = (0, import_element2.useMemo)(() => {
1086 368 return Array.from(categoryMap.values()).map((category) => unescapeString(category.label)).filter((category) => {
1087 369 if (search !== "") {
1088 370 return category.toLowerCase().includes(search.toLowerCase());
1089 371 }
@@ -1100,9 +382,9 @@
1100 382 return terms;
1101 383 }, []);
1102 384 onChange(uniqueTerms);
1103 385 }
1104 - return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
386 + return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
1105 387 import_components2.FormTokenField,
1106 388 {
1107 389 className: "patterns-menu-items__convert-modal-categories",
1108 390 value: categoryTerms,
@@ -1110,9 +392,10 @@
1110 392 onChange: handleChange,
1111 393 onInputChange: debouncedSearch,
1112 394 label: (0, import_i18n2.__)("Categories"),
1113 395 tokenizeOnBlur: true,
1114 - __experimentalExpandOnFocus: true
396 + __experimentalExpandOnFocus: true,
397 + __next40pxDefaultSize: true
1115 398 }
1116 399 );
1117 400 }
1118 401
@@ -1118,9 +401,9 @@
1118 401
1119 402 // packages/patterns/build-module/private-hooks.mjs
1120 403 var import_data4 = __toESM(require_data(), 1);
1121 404 var import_core_data2 = __toESM(require_core_data(), 1);
1122 - var import_element5 = __toESM(require_element(), 1);
405 + var import_element3 = __toESM(require_element(), 1);
1123 406 function useAddPatternCategory() {
1124 407 const { saveEntityRecord, invalidateResolution } = (0, import_data4.useDispatch)(import_core_data2.store);
1125 408 const { corePatternCategories, userPatternCategories } = (0, import_data4.useSelect)(
1126 409 (select) => {
@@ -1131,9 +414,9 @@
1131 414 };
1132 415 },
1133 416 []
1134 417 );
1135 - const categoryMap = (0, import_element5.useMemo)(() => {
418 + const categoryMap = (0, import_element3.useMemo)(() => {
1136 419 const uniqueCategories = /* @__PURE__ */ new Map();
1137 420 userPatternCategories.forEach((category) => {
1138 421 uniqueCategories.set(category.label.toLowerCase(), {
1139 422 label: category.label,
@@ -1178,9 +461,9 @@
1178 461 return { categoryMap, findOrCreateTerm };
1179 462 }
1180 463
1181 464 // packages/patterns/build-module/components/create-pattern-modal.mjs
1182 - var import_jsx_runtime4 = __toESM(require_jsx_runtime(), 1);
465 + var import_jsx_runtime3 = __toESM(require_jsx_runtime(), 1);
1183 466 function CreatePatternModal({
1184 467 className = "patterns-menu-items__convert-modal",
1185 468 modalTitle,
1186 469 ...restProps
@@ -1188,9 +471,9 @@
1188 471 const defaultModalTitle = (0, import_data5.useSelect)(
1189 472 (select) => select(import_core_data3.store).getPostType(PATTERN_TYPES.user)?.labels?.add_new_item,
1190 473 []
1191 474 );
1192 - return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
475 + return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1193 476 import_components3.Modal,
1194 477 {
1195 478 title: modalTitle || defaultModalTitle,
1196 479 onRequestClose: restProps.onClose,
@@ -1196,9 +479,9 @@
1196 479 onRequestClose: restProps.onClose,
1197 480 overlayClassName: className,
1198 481 focusOnMount: "firstContentElement",
1199 482 size: "small",
1200 - children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(CreatePatternModalContents, { ...restProps })
483 + children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(CreatePatternModalContents, { ...restProps })
1201 484 }
1202 485 );
1203 486 }
1204 487 function CreatePatternModalContents({
@@ -1210,12 +493,12 @@
1210 493 onSuccess,
1211 494 defaultSyncType = PATTERN_SYNC_TYPES.full,
1212 495 defaultTitle = ""
1213 496 }) {
1214 - const [syncType, setSyncType] = (0, import_element6.useState)(defaultSyncType);
1215 - const [categoryTerms, setCategoryTerms] = (0, import_element6.useState)(defaultCategories);
1216 - const [title, setTitle] = (0, import_element6.useState)(defaultTitle);
1217 - const [isSaving, setIsSaving] = (0, import_element6.useState)(false);
497 + const [syncType, setSyncType] = (0, import_element4.useState)(defaultSyncType);
498 + const [categoryTerms, setCategoryTerms] = (0, import_element4.useState)(defaultCategories);
499 + const [title, setTitle] = (0, import_element4.useState)(defaultTitle);
500 + const [isSaving, setIsSaving] = (0, import_element4.useState)(false);
1218 501 const { createPattern: createPattern2 } = unlock((0, import_data5.useDispatch)(store));
1219 502 const { createErrorNotice } = (0, import_data5.useDispatch)(import_notices.store);
1220 503 const { categoryMap, findOrCreateTerm } = useAddPatternCategory();
1221 504 async function onCreate(patternTitle, sync) {
@@ -1250,9 +533,9 @@
1250 533 setCategoryTerms([]);
1251 534 setTitle("");
1252 535 }
1253 536 }
1254 - return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
537 + return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1255 538 "form",
1256 539 {
1257 540 onSubmit: (event) => {
1258 541 event.preventDefault();
@@ -1257,10 +540,10 @@
1257 540 onSubmit: (event) => {
1258 541 event.preventDefault();
1259 542 onCreate(title, syncType);
1260 543 },
1261 - children: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(Stack, { direction: "column", gap: "lg", children: [
1262 - /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
544 + children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_components3.__experimentalVStack, { spacing: "5", children: [
545 + /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1263 546 import_components3.TextControl,
1264 547 {
1265 548 label: (0, import_i18n3.__)("Name"),
1266 549 value: title,
@@ -1265,12 +548,13 @@
1265 548 label: (0, import_i18n3.__)("Name"),
1266 549 value: title,
1267 550 onChange: setTitle,
1268 551 placeholder: (0, import_i18n3.__)("My pattern"),
1269 - className: "patterns-create-modal__name-input"
552 + className: "patterns-create-modal__name-input",
553 + __next40pxDefaultSize: true
1270 554 }
1271 555 ),
1272 - /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
556 + /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1273 557 CategorySelector,
1274 558 {
1275 559 categoryTerms,
1276 560 onChange: setCategoryTerms,
@@ -1276,9 +560,9 @@
1276 560 onChange: setCategoryTerms,
1277 561 categoryMap
1278 562 }
1279 563 ),
1280 - /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
564 + /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1281 565 import_components3.ToggleControl,
1282 566 {
1283 567 label: (0, import_i18n3._x)("Synced", "pattern (singular)"),
1284 568 help: (0, import_i18n3.__)(
@@ -1291,10 +575,10 @@
1291 575 );
1292 576 }
1293 577 }
1294 578 ),
1295 - /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(Stack, { gap: "sm", justify: "end", children: [
1296 - /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
579 + /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_components3.__experimentalHStack, { justify: "right", children: [
580 + /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1297 581 import_components3.Button,
1298 582 {
1299 583 __next40pxDefaultSize: true,
1300 584 variant: "tertiary",
@@ -1304,9 +588,9 @@
1304 588 },
1305 589 children: (0, import_i18n3.__)("Cancel")
1306 590 }
1307 591 ),
1308 - /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
592 + /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1309 593 import_components3.Button,
1310 594 {
1311 595 __next40pxDefaultSize: true,
1312 596 variant: "primary",
@@ -1326,9 +610,9 @@
1326 610 var import_core_data4 = __toESM(require_core_data(), 1);
1327 611 var import_data6 = __toESM(require_data(), 1);
1328 612 var import_i18n4 = __toESM(require_i18n(), 1);
1329 613 var import_notices2 = __toESM(require_notices(), 1);
1330 - var import_jsx_runtime5 = __toESM(require_jsx_runtime(), 1);
614 + var import_jsx_runtime4 = __toESM(require_jsx_runtime(), 1);
1331 615 function getTermLabels(pattern, categories) {
1332 616 if (pattern.type !== PATTERN_TYPES.user) {
1333 617 return categories.core?.filter(
1334 618 (category) => pattern.categories?.includes(category.name)
@@ -1383,9 +667,9 @@
1383 667 const duplicatedProps = useDuplicatePatternProps({ pattern, onSuccess });
1384 668 if (!pattern) {
1385 669 return null;
1386 670 }
1387 - return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
671 + return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
1388 672 CreatePatternModal,
1389 673 {
1390 674 modalTitle: (0, import_i18n4.__)("Duplicate pattern"),
1391 675 confirmLabel: (0, import_i18n4.__)("Duplicate"),
@@ -1399,13 +683,13 @@
1399 683 // packages/patterns/build-module/components/rename-pattern-modal.mjs
1400 684 var import_components4 = __toESM(require_components(), 1);
1401 685 var import_core_data5 = __toESM(require_core_data(), 1);
1402 686 var import_data7 = __toESM(require_data(), 1);
1403 - var import_element7 = __toESM(require_element(), 1);
687 + var import_element5 = __toESM(require_element(), 1);
1404 688 var import_html_entities2 = __toESM(require_html_entities(), 1);
1405 689 var import_i18n5 = __toESM(require_i18n(), 1);
1406 690 var import_notices3 = __toESM(require_notices(), 1);
1407 - var import_jsx_runtime6 = __toESM(require_jsx_runtime(), 1);
691 + var import_jsx_runtime5 = __toESM(require_jsx_runtime(), 1);
1408 692 function RenamePatternModal({
1409 693 onClose,
1410 694 onError,
1411 695 onSuccess,
@@ -1412,10 +696,10 @@
1412 696 pattern,
1413 697 ...props
1414 698 }) {
1415 699 const originalName = (0, import_html_entities2.decodeEntities)(pattern.title);
1416 - const [name, setName] = (0, import_element7.useState)(originalName);
1417 - const [isSaving, setIsSaving] = (0, import_element7.useState)(false);
700 + const [name, setName] = (0, import_element5.useState)(originalName);
701 + const [isSaving, setIsSaving] = (0, import_element5.useState)(false);
1418 702 const {
1419 703 editEntityRecord,
1420 704 __experimentalSaveSpecifiedEntityEdits: saveSpecifiedEntityEdits
1421 705 } = (0, import_data7.useDispatch)(import_core_data5.store);
@@ -1459,9 +743,9 @@
1459 743 const onRequestClose = () => {
1460 744 onClose?.();
1461 745 setName("");
1462 746 };
1463 - return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
747 + return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
1464 748 import_components4.Modal,
1465 749 {
1466 750 title: (0, import_i18n5.__)("Rename"),
1467 751 ...props,
@@ -1467,12 +751,13 @@
1467 751 ...props,
1468 752 onRequestClose: onClose,
1469 753 focusOnMount: "firstContentElement",
1470 754 size: "small",
1471 - children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("form", { onSubmit: onRename, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Stack, { direction: "column", gap: "lg", children: [
1472 - /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
755 + children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("form", { onSubmit: onRename, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_components4.__experimentalVStack, { spacing: "5", children: [
756 + /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
1473 757 import_components4.TextControl,
1474 758 {
759 + __next40pxDefaultSize: true,
1475 760 label: (0, import_i18n5.__)("Name"),
1476 761 value: name,
1477 762 onChange: setName,
1478 763 required: true
@@ -1477,10 +762,10 @@
1477 762 onChange: setName,
1478 763 required: true
1479 764 }
1480 765 ),
1481 - /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Stack, { gap: "sm", justify: "end", children: [
1482 - /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
766 + /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_components4.__experimentalHStack, { justify: "right", children: [
767 + /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
1483 768 import_components4.Button,
1484 769 {
1485 770 __next40pxDefaultSize: true,
1486 771 variant: "tertiary",
@@ -1487,9 +772,9 @@
1487 772 onClick: onRequestClose,
1488 773 children: (0, import_i18n5.__)("Cancel")
1489 774 }
1490 775 ),
1491 - /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
776 + /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
1492 777 import_components4.Button,
1493 778 {
1494 779 __next40pxDefaultSize: true,
1495 780 variant: "primary",
@@ -1508,10 +793,17 @@
1508 793
1509 794 // packages/patterns/build-module/components/pattern-convert-button.mjs
1510 795 var import_blocks2 = __toESM(require_blocks(), 1);
1511 796 var import_block_editor3 = __toESM(require_block_editor(), 1);
1512 - var import_element8 = __toESM(require_element(), 1);
797 + var import_element6 = __toESM(require_element(), 1);
1513 798 var import_components5 = __toESM(require_components(), 1);
799 +
800 + // packages/icons/build-module/library/symbol.mjs
801 + var import_primitives = __toESM(require_primitives(), 1);
802 + var import_jsx_runtime6 = __toESM(require_jsx_runtime(), 1);
803 + var symbol_default = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_primitives.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_primitives.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" }) });
804 +
805 + // packages/patterns/build-module/components/pattern-convert-button.mjs
1514 806 var import_data8 = __toESM(require_data(), 1);
1515 807 var import_core_data6 = __toESM(require_core_data(), 1);
1516 808 var import_i18n6 = __toESM(require_i18n(), 1);
1517 809 var import_notices4 = __toESM(require_notices(), 1);
@@ -1523,9 +815,9 @@
1523 815 }) {
1524 816 const { createSuccessNotice } = (0, import_data8.useDispatch)(import_notices4.store);
1525 817 const { replaceBlocks, updateBlockAttributes } = (0, import_data8.useDispatch)(import_block_editor3.store);
1526 818 const { setEditingPattern: setEditingPattern2 } = unlock((0, import_data8.useDispatch)(store));
1527 - const [isModalOpen, setIsModalOpen] = (0, import_element8.useState)(false);
819 + const [isModalOpen, setIsModalOpen] = (0, import_element6.useState)(false);
1528 820 const { getBlockAttributes } = (0, import_data8.useSelect)(import_block_editor3.store);
1529 821 const canConvert = (0, import_data8.useSelect)(
1530 822 (select) => {
1531 823 const { canUser } = select(import_core_data6.store);
@@ -1568,9 +860,9 @@
1568 860 },
1569 861 [clientIds, rootClientId]
1570 862 );
1571 863 const { getBlocksByClientId } = (0, import_data8.useSelect)(import_block_editor3.store);
1572 - const getContent = (0, import_element8.useCallback)(
864 + const getContent = (0, import_element6.useCallback)(
1573 865 () => (0, import_blocks2.serialize)(getBlocksByClientId(clientIds)),
1574 866 [getBlocksByClientId, clientIds]
1575 867 );
1576 868 if (!canConvert) {
@@ -1593,8 +885,9 @@
1593 885 ref: pattern.id
1594 886 });
1595 887 replaceBlocks(clientIds, newBlock);
1596 888 setEditingPattern2(newBlock.clientId, true);
889 + closeBlockSettingsMenu();
1597 890 }
1598 891 createSuccessNotice(
1599 892 pattern.wp_pattern_sync_status === PATTERN_SYNC_TYPES.unsynced ? (0, import_i18n6.sprintf)(
1600 893 // translators: %s: the name the user has given to the pattern.
@@ -1610,9 +903,8 @@
1610 903 id: "convert-to-pattern-success"
1611 904 }
1612 905 );
1613 906 setIsModalOpen(false);
1614 - closeBlockSettingsMenu();
1615 907 };
1616 908 return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
1617 909 /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1618 910 import_components5.MenuItem,
@@ -1646,15 +938,13 @@
1646 938 var import_components6 = __toESM(require_components(), 1);
1647 939 var import_i18n7 = __toESM(require_i18n(), 1);
1648 940 var import_blocks3 = __toESM(require_blocks(), 1);
1649 941 var import_data9 = __toESM(require_data(), 1);
1650 - var import_element9 = __toESM(require_element(), 1);
1651 942 var import_block_editor4 = __toESM(require_block_editor(), 1);
1652 943 var import_url = __toESM(require_url(), 1);
1653 944 var import_core_data7 = __toESM(require_core_data(), 1);
1654 945 var import_jsx_runtime8 = __toESM(require_jsx_runtime(), 1);
1655 - function PatternsManageButton({ clientId, onClose }) {
1656 - const [showConfirmDialog, setShowConfirmDialog] = (0, import_element9.useState)(false);
946 + function PatternsManageButton({ clientId }) {
1657 947 const {
1658 948 attributes,
1659 949 canDetach,
1660 950 isVisible,
@@ -1704,42 +994,29 @@
1704 994 );
1705 995 if (!isVisible || !canEdit) {
1706 996 return null;
1707 997 }
1708 - const handleDetach = () => {
1709 - if (isSyncedPattern) {
1710 - convertSyncedPatternToStatic2(clientId);
1711 - }
1712 - if (isUnsyncedPattern) {
1713 - const { patternName, ...attributesWithoutPatternName } = attributes?.metadata ?? {};
1714 - updateBlockAttributes(clientId, {
1715 - metadata: attributesWithoutPatternName
1716 - });
1717 - }
1718 - onClose?.();
1719 - setShowConfirmDialog(false);
1720 - };
1721 998 return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_jsx_runtime8.Fragment, { children: [
1722 - canDetach && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_jsx_runtime8.Fragment, { children: [
1723 - /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_components6.MenuItem, { onClick: () => setShowConfirmDialog(true), children: (0, import_i18n7.__)("Detach") }),
1724 - /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1725 - import_components6.__experimentalConfirmDialog,
1726 - {
1727 - isOpen: showConfirmDialog,
1728 - onConfirm: handleDetach,
1729 - onCancel: () => setShowConfirmDialog(false),
1730 - confirmButtonText: (0, import_i18n7.__)("Detach"),
1731 - size: "medium",
1732 - title: (0, import_i18n7.__)("Detach pattern?"),
1733 - __experimentalHideHeader: false,
1734 - children: isSyncedPattern ? (0, import_i18n7.__)(
1735 - "The blocks will be separated from the original pattern and will be fully editable. Future changes to the pattern will not apply here."
1736 - ) : (0, import_i18n7.__)(
1737 - "Blocks will no longer be associated with this pattern and will be fully editable."
1738 - )
1739 - }
1740 - )
1741 - ] }),
999 + canDetach && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1000 + import_components6.MenuItem,
1001 + {
1002 + onClick: () => {
1003 + if (isSyncedPattern) {
1004 + convertSyncedPatternToStatic2(clientId);
1005 + }
1006 + if (isUnsyncedPattern) {
1007 + const {
1008 + patternName,
1009 + ...attributesWithoutPatternName
1010 + } = attributes?.metadata ?? {};
1011 + updateBlockAttributes(clientId, {
1012 + metadata: attributesWithoutPatternName
1013 + });
1014 + }
1015 + },
1016 + children: isSyncedPattern ? (0, import_i18n7.__)("Disconnect pattern") : (0, import_i18n7.__)("Detach pattern")
1017 + }
1018 + ),
1742 1019 /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_components6.MenuItem, { href: managePatternsUrl, children: (0, import_i18n7.__)("Manage patterns") })
1743 1020 ] });
1744 1021 }
1745 1022 var patterns_manage_button_default = PatternsManageButton;
@@ -1758,10 +1035,9 @@
1758 1035 ),
1759 1036 selectedClientIds.length === 1 && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1760 1037 patterns_manage_button_default,
1761 1038 {
1762 - clientId: selectedClientIds[0],
1763 - onClose
1039 + clientId: selectedClientIds[0]
1764 1040 }
1765 1041 )
1766 1042 ] }) });
1767 1043 }
@@ -1769,9 +1045,9 @@
1769 1045 // packages/patterns/build-module/components/rename-pattern-category-modal.mjs
1770 1046 var import_components7 = __toESM(require_components(), 1);
1771 1047 var import_core_data8 = __toESM(require_core_data(), 1);
1772 1048 var import_data10 = __toESM(require_data(), 1);
1773 - var import_element10 = __toESM(require_element(), 1);
1049 + var import_element7 = __toESM(require_element(), 1);
1774 1050 var import_html_entities3 = __toESM(require_html_entities(), 1);
1775 1051 var import_i18n8 = __toESM(require_i18n(), 1);
1776 1052 var import_notices5 = __toESM(require_notices(), 1);
1777 1053 var import_a11y = __toESM(require_a11y(), 1);
@@ -1783,13 +1059,13 @@
1783 1059 onError,
1784 1060 onSuccess,
1785 1061 ...props
1786 1062 }) {
1787 - const id = (0, import_element10.useId)();
1788 - const textControlRef = (0, import_element10.useRef)();
1789 - const [name, setName] = (0, import_element10.useState)((0, import_html_entities3.decodeEntities)(category.name));
1790 - const [isSaving, setIsSaving] = (0, import_element10.useState)(false);
1791 - const [validationMessage, setValidationMessage] = (0, import_element10.useState)(false);
1063 + const id = (0, import_element7.useId)();
1064 + const textControlRef = (0, import_element7.useRef)();
1065 + const [name, setName] = (0, import_element7.useState)((0, import_html_entities3.decodeEntities)(category.name));
1066 + const [isSaving, setIsSaving] = (0, import_element7.useState)(false);
1067 + const [validationMessage, setValidationMessage] = (0, import_element7.useState)(false);
1792 1068 const validationMessageId = validationMessage ? `patterns-rename-pattern-category-modal__validation-message-${id}` : void 0;
1793 1069 const { saveEntityRecord, invalidateResolution } = (0, import_data10.useDispatch)(import_core_data8.store);
1794 1070 const { createErrorNotice, createSuccessNotice } = (0, import_data10.useDispatch)(import_notices5.store);
1795 1071 const onChange = (newName) => {
@@ -1859,14 +1135,15 @@
1859 1135 {
1860 1136 title: (0, import_i18n8.__)("Rename"),
1861 1137 onRequestClose,
1862 1138 ...props,
1863 - children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("form", { onSubmit: onSave, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(Stack, { direction: "column", gap: "lg", children: [
1864 - /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(Stack, { direction: "column", gap: "sm", children: [
1139 + children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("form", { onSubmit: onSave, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_components7.__experimentalVStack, { spacing: "5", children: [
1140 + /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_components7.__experimentalVStack, { spacing: "2", children: [
1865 1141 /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1866 1142 import_components7.TextControl,
1867 1143 {
1868 1144 ref: textControlRef,
1145 + __next40pxDefaultSize: true,
1869 1146 label: (0, import_i18n8.__)("Name"),
1870 1147 value: name,
1871 1148 onChange,
1872 1149 "aria-describedby": validationMessageId,
@@ -1881,9 +1158,9 @@
1881 1158 children: validationMessage
1882 1159 }
1883 1160 )
1884 1161 ] }),
1885 - /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(Stack, { gap: "sm", justify: "end", children: [
1162 + /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_components7.__experimentalHStack, { justify: "right", children: [
1886 1163 /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1887 1164 import_components7.Button,
1888 1165 {
1889 1166 __next40pxDefaultSize: true,
@@ -1909,9 +1186,9 @@
1909 1186 );
1910 1187 }
1911 1188
1912 1189 // packages/patterns/build-module/components/pattern-overrides-controls.mjs
1913 - var import_element12 = __toESM(require_element(), 1);
1190 + var import_element9 = __toESM(require_element(), 1);
1914 1191 var import_block_editor6 = __toESM(require_block_editor(), 1);
1915 1192 var import_components9 = __toESM(require_components(), 1);
1916 1193 var import_i18n10 = __toESM(require_i18n(), 1);
1917 1194
@@ -1917,9 +1194,9 @@
1917 1194
1918 1195 // packages/patterns/build-module/components/allow-overrides-modal.mjs
1919 1196 var import_components8 = __toESM(require_components(), 1);
1920 1197 var import_i18n9 = __toESM(require_i18n(), 1);
1921 - var import_element11 = __toESM(require_element(), 1);
1198 + var import_element8 = __toESM(require_element(), 1);
1922 1199 var import_a11y2 = __toESM(require_a11y(), 1);
1923 1200 var import_jsx_runtime11 = __toESM(require_jsx_runtime(), 1);
1924 1201 function AllowOverridesModal({
1925 1202 placeholder,
@@ -1926,10 +1203,10 @@
1926 1203 initialName = "",
1927 1204 onClose,
1928 1205 onSave
1929 1206 }) {
1930 - const [editedBlockName, setEditedBlockName] = (0, import_element11.useState)(initialName);
1931 - const descriptionId = (0, import_element11.useId)();
1207 + const [editedBlockName, setEditedBlockName] = (0, import_element8.useState)(initialName);
1208 + const descriptionId = (0, import_element8.useId)();
1932 1209 const isNameValid = !!editedBlockName.trim();
1933 1210 const handleSubmit = () => {
1934 1211 if (editedBlockName !== initialName) {
1935 1212 const message = (0, import_i18n9.sprintf)(
@@ -1959,15 +1236,16 @@
1959 1236 return;
1960 1237 }
1961 1238 handleSubmit();
1962 1239 },
1963 - children: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(Stack, { direction: "column", gap: "xl", children: [
1964 - /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Text, { id: descriptionId, children: (0, import_i18n9.__)(
1240 + children: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_components8.__experimentalVStack, { spacing: "6", children: [
1241 + /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_components8.__experimentalText, { id: descriptionId, children: (0, import_i18n9.__)(
1965 1242 "Overrides are changes you make to a block within a synced pattern instance. Use overrides to customize a synced pattern instance to suit its new context. Name this block to specify an override."
1966 1243 ) }),
1967 1244 /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1968 1245 import_components8.TextControl,
1969 1246 {
1247 + __next40pxDefaultSize: true,
1970 1248 value: editedBlockName,
1971 1249 label: (0, import_i18n9.__)("Name"),
1972 1250 help: (0, import_i18n9.__)(
1973 1251 'For example, if you are creating a recipe pattern, you use "Recipe Title", "Recipe Description", etc.'
@@ -1975,9 +1253,9 @@
1975 1253 placeholder,
1976 1254 onChange: setEditedBlockName
1977 1255 }
1978 1256 ),
1979 - /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(Stack, { gap: "sm", justify: "end", children: [
1257 + /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_components8.__experimentalHStack, { justify: "right", children: [
1980 1258 /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1981 1259 import_components8.Button,
1982 1260 {
1983 1261 __next40pxDefaultSize: true,
@@ -2003,9 +1281,9 @@
2003 1281 }
2004 1282 );
2005 1283 }
2006 1284 function DisallowOverridesModal({ onClose, onSave }) {
2007 - const descriptionId = (0, import_element11.useId)();
1285 + const descriptionId = (0, import_element8.useId)();
2008 1286 return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
2009 1287 import_components8.Modal,
2010 1288 {
2011 1289 title: (0, import_i18n9.__)("Disable overrides"),
@@ -2019,13 +1297,13 @@
2019 1297 event.preventDefault();
2020 1298 onSave();
2021 1299 onClose();
2022 1300 },
2023 - children: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(Stack, { direction: "column", gap: "xl", children: [
2024 - /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Text, { id: descriptionId, children: (0, import_i18n9.__)(
1301 + children: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_components8.__experimentalVStack, { spacing: "6", children: [
1302 + /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_components8.__experimentalText, { id: descriptionId, children: (0, import_i18n9.__)(
2025 1303 "Are you sure you want to disable overrides? Disabling overrides will revert all applied overrides for this block throughout instances of this pattern."
2026 1304 ) }),
2027 - /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(Stack, { gap: "sm", justify: "end", children: [
1305 + /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_components8.__experimentalHStack, { justify: "right", children: [
2028 1306 /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
2029 1307 import_components8.Button,
2030 1308 {
2031 1309 __next40pxDefaultSize: true,
@@ -2057,11 +1335,11 @@
2057 1335 attributes,
2058 1336 setAttributes,
2059 1337 name: blockName
2060 1338 }) {
2061 - const controlId = (0, import_element12.useId)();
2062 - const [showAllowOverridesModal, setShowAllowOverridesModal] = (0, import_element12.useState)(false);
2063 - const [showDisallowOverridesModal, setShowDisallowOverridesModal] = (0, import_element12.useState)(false);
1339 + const controlId = (0, import_element9.useId)();
1340 + const [showAllowOverridesModal, setShowAllowOverridesModal] = (0, import_element9.useState)(false);
1341 + const [showDisallowOverridesModal, setShowDisallowOverridesModal] = (0, import_element9.useState)(false);
2064 1342 const hasName = !!attributes.metadata?.name;
2065 1343 const defaultBindings = attributes.metadata?.bindings?.__default;
2066 1344 const hasOverrides = hasName && defaultBindings?.source === PATTERN_OVERRIDES_BINDING_SOURCE;
2067 1345 const isConnectedToOtherSources = defaultBindings?.source && defaultBindings.source !== PATTERN_OVERRIDES_BINDING_SOURCE;
@@ -2218,8 +1496,6 @@
2218 1496 EXCLUDED_PATTERN_SOURCES,
2219 1497 PATTERN_SYNC_TYPES
2220 1498 });
2221 1499 return __toCommonJS(index_exports);
2222 -})();
2223 -(window.wp ||= {}).patterns = wp.patterns;
2224 1500 })();
2225 1501 //# sourceMappingURL=index.js.map