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 +115 -837 23.5.322.7.0 View file →
@@ -93,29 +93,15 @@
93 93 module.exports = window.ReactJSXRuntime;
94 94 }
95 95 });
96 96
97 - // vendor-external:react
98 - var require_react = __commonJS({
99 - "vendor-external:react"(exports, module) {
100 - 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;
101 101 }
102 102 });
103 103
104 - // package-external:@wordpress/a11y
105 - var require_a11y = __commonJS({
106 - "package-external:@wordpress/a11y"(exports, module) {
107 - module.exports = window.wp.a11y;
108 - }
109 - });
110 -
111 - // package-external:@wordpress/primitives
112 - var require_primitives = __commonJS({
113 - "package-external:@wordpress/primitives"(exports, module) {
114 - module.exports = window.wp.primitives;
115 - }
116 - });
117 -
118 104 // package-external:@wordpress/compose
119 105 var require_compose = __commonJS({
120 106 "package-external:@wordpress/compose"(exports, module) {
121 107 module.exports = window.wp.compose;
@@ -121,15 +107,8 @@
121 107 module.exports = window.wp.compose;
122 108 }
123 109 });
124 110
125 - // package-external:@wordpress/notices
126 - var require_notices = __commonJS({
127 - "package-external:@wordpress/notices"(exports, module) {
128 - module.exports = window.wp.notices;
129 - }
130 - });
131 -
132 111 // package-external:@wordpress/html-entities
133 112 var require_html_entities = __commonJS({
134 113 "package-external:@wordpress/html-entities"(exports, module) {
135 114 module.exports = window.wp.htmlEntities;
@@ -135,8 +114,15 @@
135 114 module.exports = window.wp.htmlEntities;
136 115 }
137 116 });
138 117
118 + // package-external:@wordpress/primitives
119 + var require_primitives = __commonJS({
120 + "package-external:@wordpress/primitives"(exports, module) {
121 + module.exports = window.wp.primitives;
122 + }
123 + });
124 +
139 125 // package-external:@wordpress/url
140 126 var require_url = __commonJS({
141 127 "package-external:@wordpress/url"(exports, module) {
142 128 module.exports = window.wp.url;
@@ -142,8 +128,15 @@
142 128 module.exports = window.wp.url;
143 129 }
144 130 });
145 131
132 + // package-external:@wordpress/a11y
133 + var require_a11y = __commonJS({
134 + "package-external:@wordpress/a11y"(exports, module) {
135 + module.exports = window.wp.a11y;
136 + }
137 + });
138 +
146 139 // packages/patterns/build-module/index.mjs
147 140 var index_exports = {};
148 141 __export(index_exports, {
149 142 privateApis: () => privateApis,
@@ -217,9 +210,9 @@
217 210 const fileContent = await file.text();
218 211 let parsedContent;
219 212 try {
220 213 parsedContent = JSON.parse(fileContent);
221 - } catch {
214 + } catch (e) {
222 215 throw new Error("Invalid JSON file");
223 216 }
224 217 if (parsedContent.__file !== "wp_block" || !parsedContent.title || !parsedContent.content || typeof parsedContent.title !== "string" || typeof parsedContent.content !== "string" || parsedContent.syncStatus && typeof parsedContent.syncStatus !== "string") {
225 218 throw new Error("Invalid pattern JSON file");
@@ -346,720 +339,10 @@
346 339 }
347 340
348 341 // packages/patterns/build-module/components/create-pattern-modal.mjs
349 342 var import_components3 = __toESM(require_components(), 1);
350 -
351 - // node_modules/clsx/dist/clsx.mjs
352 - function r(e) {
353 - var t, f, n = "";
354 - if ("string" == typeof e || "number" == typeof e) n += e;
355 - else if ("object" == typeof e) if (Array.isArray(e)) {
356 - var o = e.length;
357 - for (t = 0; t < o; t++) e[t] && (f = r(e[t])) && (n && (n += " "), n += f);
358 - } else for (f in e) e[f] && (n && (n += " "), n += f);
359 - return n;
360 - }
361 - function clsx() {
362 - for (var e, t, f = 0, n = "", o = arguments.length; f < o; f++) (e = arguments[f]) && (t = r(e)) && (n && (n += " "), n += t);
363 - return n;
364 - }
365 - var clsx_default = clsx;
366 -
367 - // node_modules/@base-ui/utils/esm/useRefWithInit.js
368 - var React = __toESM(require_react(), 1);
369 - var UNINITIALIZED = {};
370 - function useRefWithInit(init, initArg) {
371 - const ref = React.useRef(UNINITIALIZED);
372 - if (ref.current === UNINITIALIZED) {
373 - ref.current = init(initArg);
374 - }
375 - return ref;
376 - }
377 -
378 - // node_modules/@base-ui/utils/esm/warn.js
379 - var set;
380 - if (true) {
381 - set = /* @__PURE__ */ new Set();
382 - }
383 - function warn(...messages) {
384 - if (true) {
385 - const messageKey = messages.join(" ");
386 - if (!set.has(messageKey)) {
387 - set.add(messageKey);
388 - console.warn(`Base UI: ${messageKey}`);
389 - }
390 - }
391 - }
392 -
393 - // node_modules/@base-ui/react/esm/internals/useRenderElement.js
394 - var React4 = __toESM(require_react(), 1);
395 -
396 - // node_modules/@base-ui/utils/esm/useMergedRefs.js
397 - function useMergedRefs(a, b, c, d) {
398 - const forkRef = useRefWithInit(createForkRef).current;
399 - if (didChange(forkRef, a, b, c, d)) {
400 - update(forkRef, [a, b, c, d]);
401 - }
402 - return forkRef.callback;
403 - }
404 - function useMergedRefsN(refs) {
405 - const forkRef = useRefWithInit(createForkRef).current;
406 - if (didChangeN(forkRef, refs)) {
407 - update(forkRef, refs);
408 - }
409 - return forkRef.callback;
410 - }
411 - function createForkRef() {
412 - return {
413 - callback: null,
414 - cleanup: null,
415 - refs: []
416 - };
417 - }
418 - function didChange(forkRef, a, b, c, d) {
419 - return forkRef.refs[0] !== a || forkRef.refs[1] !== b || forkRef.refs[2] !== c || forkRef.refs[3] !== d;
420 - }
421 - function didChangeN(forkRef, newRefs) {
422 - return forkRef.refs.length !== newRefs.length || forkRef.refs.some((ref, index) => ref !== newRefs[index]);
423 - }
424 - function update(forkRef, refs) {
425 - forkRef.refs = refs;
426 - if (refs.every((ref) => ref == null)) {
427 - forkRef.callback = null;
428 - return;
429 - }
430 - forkRef.callback = (instance) => {
431 - if (forkRef.cleanup) {
432 - forkRef.cleanup();
433 - forkRef.cleanup = null;
434 - }
435 - if (instance != null) {
436 - const cleanupCallbacks = Array(refs.length).fill(null);
437 - for (let i = 0; i < refs.length; i += 1) {
438 - const ref = refs[i];
439 - if (ref == null) {
440 - continue;
441 - }
442 - switch (typeof ref) {
443 - case "function": {
444 - const refCleanup = ref(instance);
445 - if (typeof refCleanup === "function") {
446 - cleanupCallbacks[i] = refCleanup;
447 - }
448 - break;
449 - }
450 - case "object": {
451 - ref.current = instance;
452 - break;
453 - }
454 - default:
455 - }
456 - }
457 - forkRef.cleanup = () => {
458 - for (let i = 0; i < refs.length; i += 1) {
459 - const ref = refs[i];
460 - if (ref == null) {
461 - continue;
462 - }
463 - switch (typeof ref) {
464 - case "function": {
465 - const cleanupCallback = cleanupCallbacks[i];
466 - if (typeof cleanupCallback === "function") {
467 - cleanupCallback();
468 - } else {
469 - ref(null);
470 - }
471 - break;
472 - }
473 - case "object": {
474 - ref.current = null;
475 - break;
476 - }
477 - default:
478 - }
479 - }
480 - };
481 - }
482 - };
483 - }
484 -
485 - // node_modules/@base-ui/utils/esm/getReactElementRef.js
486 - var React3 = __toESM(require_react(), 1);
487 -
488 - // node_modules/@base-ui/utils/esm/reactVersion.js
489 - var React2 = __toESM(require_react(), 1);
490 - var majorVersion = parseInt(React2.version, 10);
491 - function isReactVersionAtLeast(reactVersionToCheck) {
492 - return majorVersion >= reactVersionToCheck;
493 - }
494 -
495 - // node_modules/@base-ui/utils/esm/getReactElementRef.js
496 - function getReactElementRef(element) {
497 - if (!/* @__PURE__ */ React3.isValidElement(element)) {
498 - return null;
499 - }
500 - const reactElement = element;
501 - const propsWithRef = reactElement.props;
502 - return (isReactVersionAtLeast(19) ? propsWithRef?.ref : reactElement.ref) ?? null;
503 - }
504 -
505 - // node_modules/@base-ui/utils/esm/mergeObjects.js
506 - function mergeObjects(a, b) {
507 - if (a && !b) {
508 - return a;
509 - }
510 - if (!a && b) {
511 - return b;
512 - }
513 - if (a || b) {
514 - return {
515 - ...a,
516 - ...b
517 - };
518 - }
519 - return void 0;
520 - }
521 -
522 - // node_modules/@base-ui/utils/esm/empty.js
523 - var EMPTY_ARRAY = Object.freeze([]);
524 - var EMPTY_OBJECT = Object.freeze({});
525 -
526 - // node_modules/@base-ui/react/esm/internals/getStateAttributesProps.js
527 - function getStateAttributesProps(state, customMapping) {
528 - const props = {};
529 - for (const key in state) {
530 - const value = state[key];
531 - if (customMapping?.hasOwnProperty(key)) {
532 - const customProps = customMapping[key](value);
533 - if (customProps != null) {
534 - Object.assign(props, customProps);
535 - }
536 - continue;
537 - }
538 - if (value === true) {
539 - props[`data-${key.toLowerCase()}`] = "";
540 - } else if (value) {
541 - props[`data-${key.toLowerCase()}`] = value.toString();
542 - }
543 - }
544 - return props;
545 - }
546 -
547 - // node_modules/@base-ui/react/esm/utils/resolveClassName.js
548 - function resolveClassName(className, state) {
549 - return typeof className === "function" ? className(state) : className;
550 - }
551 -
552 - // node_modules/@base-ui/react/esm/utils/resolveStyle.js
553 - function resolveStyle(style, state) {
554 - return typeof style === "function" ? style(state) : style;
555 - }
556 -
557 - // node_modules/@base-ui/react/esm/merge-props/mergeProps.js
558 - var EMPTY_PROPS = {};
559 - function mergeProps(a, b, c, d, e) {
560 - if (!c && !d && !e && !a) {
561 - return createInitialMergedProps(b);
562 - }
563 - let merged = createInitialMergedProps(a);
564 - if (b) {
565 - merged = mergeInto(merged, b);
566 - }
567 - if (c) {
568 - merged = mergeInto(merged, c);
569 - }
570 - if (d) {
571 - merged = mergeInto(merged, d);
572 - }
573 - if (e) {
574 - merged = mergeInto(merged, e);
575 - }
576 - return merged;
577 - }
578 - function mergePropsN(props) {
579 - if (props.length === 0) {
580 - return EMPTY_PROPS;
581 - }
582 - if (props.length === 1) {
583 - return createInitialMergedProps(props[0]);
584 - }
585 - let merged = createInitialMergedProps(props[0]);
586 - for (let i = 1; i < props.length; i += 1) {
587 - merged = mergeInto(merged, props[i]);
588 - }
589 - return merged;
590 - }
591 - function createInitialMergedProps(inputProps) {
592 - if (isPropsGetter(inputProps)) {
593 - return {
594 - ...resolvePropsGetter(inputProps, EMPTY_PROPS)
595 - };
596 - }
597 - return copyInitialProps(inputProps);
598 - }
599 - function mergeInto(merged, inputProps) {
600 - if (isPropsGetter(inputProps)) {
601 - return resolvePropsGetter(inputProps, merged);
602 - }
603 - return mutablyMergeInto(merged, inputProps);
604 - }
605 - function copyInitialProps(inputProps) {
606 - const copiedProps = {
607 - ...inputProps
608 - };
609 - for (const propName in copiedProps) {
610 - const propValue = copiedProps[propName];
611 - if (isEventHandler(propName, propValue)) {
612 - copiedProps[propName] = wrapEventHandler(propValue);
613 - }
614 - }
615 - return copiedProps;
616 - }
617 - function mutablyMergeInto(mergedProps, externalProps) {
618 - if (!externalProps) {
619 - return mergedProps;
620 - }
621 - for (const propName in externalProps) {
622 - const externalPropValue = externalProps[propName];
623 - switch (propName) {
624 - case "style": {
625 - mergedProps[propName] = mergeObjects(mergedProps.style, externalPropValue);
626 - break;
627 - }
628 - case "className": {
629 - mergedProps[propName] = mergeClassNames(mergedProps.className, externalPropValue);
630 - break;
631 - }
632 - default: {
633 - if (isEventHandler(propName, externalPropValue)) {
634 - mergedProps[propName] = mergeEventHandlers(mergedProps[propName], externalPropValue);
635 - } else {
636 - mergedProps[propName] = externalPropValue;
637 - }
638 - }
639 - }
640 - }
641 - return mergedProps;
642 - }
643 - function isEventHandler(key, value) {
644 - const code0 = key.charCodeAt(0);
645 - const code1 = key.charCodeAt(1);
646 - const code2 = key.charCodeAt(2);
647 - return code0 === 111 && code1 === 110 && code2 >= 65 && code2 <= 90 && (typeof value === "function" || typeof value === "undefined");
648 - }
649 - function isPropsGetter(inputProps) {
650 - return typeof inputProps === "function";
651 - }
652 - function resolvePropsGetter(inputProps, previousProps) {
653 - if (isPropsGetter(inputProps)) {
654 - return inputProps(previousProps);
655 - }
656 - return inputProps ?? EMPTY_PROPS;
657 - }
658 - function mergeEventHandlers(ourHandler, theirHandler) {
659 - if (!theirHandler) {
660 - return ourHandler;
661 - }
662 - if (!ourHandler) {
663 - return wrapEventHandler(theirHandler);
664 - }
665 - return (...args) => {
666 - const event = args[0];
667 - if (isSyntheticEvent(event)) {
668 - const baseUIEvent = event;
669 - makeEventPreventable(baseUIEvent);
670 - const result2 = theirHandler(...args);
671 - if (!baseUIEvent.baseUIHandlerPrevented) {
672 - ourHandler?.(...args);
673 - }
674 - return result2;
675 - }
676 - const result = theirHandler(...args);
677 - ourHandler?.(...args);
678 - return result;
679 - };
680 - }
681 - function wrapEventHandler(handler) {
682 - if (!handler) {
683 - return handler;
684 - }
685 - return (...args) => {
686 - const event = args[0];
687 - if (isSyntheticEvent(event)) {
688 - makeEventPreventable(event);
689 - }
690 - return handler(...args);
691 - };
692 - }
693 - function makeEventPreventable(event) {
694 - event.preventBaseUIHandler = () => {
695 - event.baseUIHandlerPrevented = true;
696 - };
697 - return event;
698 - }
699 - function mergeClassNames(ourClassName, theirClassName) {
700 - if (theirClassName) {
701 - if (ourClassName) {
702 - return theirClassName + " " + ourClassName;
703 - }
704 - return theirClassName;
705 - }
706 - return ourClassName;
707 - }
708 - function isSyntheticEvent(event) {
709 - return event != null && typeof event === "object" && "nativeEvent" in event;
710 - }
711 -
712 - // node_modules/@base-ui/react/esm/internals/useRenderElement.js
713 - var import_react = __toESM(require_react(), 1);
714 - function useRenderElement(element, componentProps, params = {}) {
715 - const renderProp = componentProps.render;
716 - const outProps = useRenderElementProps(componentProps, params);
717 - if (params.enabled === false) {
718 - return null;
719 - }
720 - const state = params.state ?? EMPTY_OBJECT;
721 - return evaluateRenderProp(element, renderProp, outProps, state);
722 - }
723 - function useRenderElementProps(componentProps, params = {}) {
724 - const {
725 - className: classNameProp,
726 - style: styleProp,
727 - render: renderProp
728 - } = componentProps;
729 - const {
730 - state = EMPTY_OBJECT,
731 - ref,
732 - props,
733 - stateAttributesMapping,
734 - enabled = true
735 - } = params;
736 - const className = enabled ? resolveClassName(classNameProp, state) : void 0;
737 - const style = enabled ? resolveStyle(styleProp, state) : void 0;
738 - const stateProps = enabled ? getStateAttributesProps(state, stateAttributesMapping) : EMPTY_OBJECT;
739 - const resolvedProps = enabled && props ? resolveRenderFunctionProps(props) : void 0;
740 - const outProps = enabled ? mergeObjects(stateProps, resolvedProps) ?? {} : EMPTY_OBJECT;
741 - if (typeof document !== "undefined") {
742 - if (!enabled) {
743 - useMergedRefs(null, null);
744 - } else if (Array.isArray(ref)) {
745 - outProps.ref = useMergedRefsN([outProps.ref, getReactElementRef(renderProp), ...ref]);
746 - } else {
747 - outProps.ref = useMergedRefs(outProps.ref, getReactElementRef(renderProp), ref);
748 - }
749 - }
750 - if (!enabled) {
751 - return EMPTY_OBJECT;
752 - }
753 - if (className !== void 0) {
754 - outProps.className = mergeClassNames(outProps.className, className);
755 - }
756 - if (style !== void 0) {
757 - outProps.style = mergeObjects(outProps.style, style);
758 - }
759 - return outProps;
760 - }
761 - function resolveRenderFunctionProps(props) {
762 - if (Array.isArray(props)) {
763 - return mergePropsN(props);
764 - }
765 - return mergeProps(void 0, props);
766 - }
767 - var REACT_LAZY_TYPE = /* @__PURE__ */ Symbol.for("react.lazy");
768 - var COMPONENT_IDENTIFIER_PATTERN = /^[A-Z][A-Za-z0-9$]*$/;
769 - var LOWERCASE_CHARACTER_PATTERN = /[a-z]/;
770 - function evaluateRenderProp(element, render, props, state) {
771 - if (render) {
772 - if (typeof render === "function") {
773 - if (true) {
774 - warnIfRenderPropLooksLikeComponent(render);
775 - }
776 - return render(props, state);
777 - }
778 - const mergedProps = mergeProps(props, render.props);
779 - mergedProps.ref = props.ref;
780 - let newElement = render;
781 - if (newElement?.$$typeof === REACT_LAZY_TYPE) {
782 - const children = React4.Children.toArray(render);
783 - newElement = children[0];
784 - }
785 - if (true) {
786 - if (!/* @__PURE__ */ React4.isValidElement(newElement)) {
787 - 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"));
788 - }
789 - }
790 - return /* @__PURE__ */ React4.cloneElement(newElement, mergedProps);
791 - }
792 - if (element) {
793 - if (typeof element === "string") {
794 - return renderTag(element, props);
795 - }
796 - }
797 - throw new Error(true ? "Base UI: Render element or function are not defined." : formatErrorMessage_default(8));
798 - }
799 - function warnIfRenderPropLooksLikeComponent(renderFn) {
800 - const functionName = renderFn.name;
801 - if (functionName.length === 0) {
802 - return;
803 - }
804 - if (!COMPONENT_IDENTIFIER_PATTERN.test(functionName)) {
805 - return;
806 - }
807 - if (!LOWERCASE_CHARACTER_PATTERN.test(functionName)) {
808 - return;
809 - }
810 - 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");
811 - }
812 - function renderTag(Tag, props) {
813 - if (Tag === "button") {
814 - return /* @__PURE__ */ (0, import_react.createElement)("button", {
815 - type: "button",
816 - ...props,
817 - key: props.key
818 - });
819 - }
820 - if (Tag === "img") {
821 - return /* @__PURE__ */ (0, import_react.createElement)("img", {
822 - alt: "",
823 - ...props,
824 - key: props.key
825 - });
826 - }
827 - return /* @__PURE__ */ React4.createElement(Tag, props);
828 - }
829 -
830 - // node_modules/@base-ui/react/esm/use-render/useRender.js
831 - function useRender(params) {
832 - return useRenderElement(params.defaultTagName ?? "div", params, params);
833 - }
834 -
835 - // packages/ui/build-module/text/text.mjs
836 - var import_element2 = __toESM(require_element(), 1);
837 - var STYLE_HASH_ATTRIBUTE = "data-wp-hash";
838 - function getRuntime() {
839 - const globalScope = globalThis;
840 - if (globalScope.__wpStyleRuntime) {
841 - return globalScope.__wpStyleRuntime;
842 - }
843 - globalScope.__wpStyleRuntime = {
844 - documents: /* @__PURE__ */ new Map(),
845 - styles: /* @__PURE__ */ new Map(),
846 - injectedStyles: /* @__PURE__ */ new WeakMap()
847 - };
848 - if (typeof document !== "undefined") {
849 - registerDocument(document);
850 - }
851 - return globalScope.__wpStyleRuntime;
852 - }
853 - function documentContainsStyleHash(targetDocument, hash) {
854 - if (!targetDocument.head) {
855 - return false;
856 - }
857 - for (const style of targetDocument.head.querySelectorAll(
858 - `style[${STYLE_HASH_ATTRIBUTE}]`
859 - )) {
860 - if (style.getAttribute(STYLE_HASH_ATTRIBUTE) === hash) {
861 - return true;
862 - }
863 - }
864 - return false;
865 - }
866 - function injectStyle(targetDocument, hash, css) {
867 - if (!targetDocument.head) {
868 - return;
869 - }
870 - const runtime = getRuntime();
871 - let injectedStyles = runtime.injectedStyles.get(targetDocument);
872 - if (!injectedStyles) {
873 - injectedStyles = /* @__PURE__ */ new Set();
874 - runtime.injectedStyles.set(targetDocument, injectedStyles);
875 - }
876 - if (injectedStyles.has(hash)) {
877 - return;
878 - }
879 - if (documentContainsStyleHash(targetDocument, hash)) {
880 - injectedStyles.add(hash);
881 - return;
882 - }
883 - const style = targetDocument.createElement("style");
884 - style.setAttribute(STYLE_HASH_ATTRIBUTE, hash);
885 - style.appendChild(targetDocument.createTextNode(css));
886 - targetDocument.head.appendChild(style);
887 - injectedStyles.add(hash);
888 - }
889 - function registerDocument(targetDocument) {
890 - const runtime = getRuntime();
891 - runtime.documents.set(
892 - targetDocument,
893 - (runtime.documents.get(targetDocument) ?? 0) + 1
894 - );
895 - for (const [hash, css] of runtime.styles) {
896 - injectStyle(targetDocument, hash, css);
897 - }
898 - return () => {
899 - const count = runtime.documents.get(targetDocument);
900 - if (count === void 0) {
901 - return;
902 - }
903 - if (count <= 1) {
904 - runtime.documents.delete(targetDocument);
905 - return;
906 - }
907 - runtime.documents.set(targetDocument, count - 1);
908 - };
909 - }
910 - function registerStyle(hash, css) {
911 - const runtime = getRuntime();
912 - runtime.styles.set(hash, css);
913 - for (const targetDocument of runtime.documents.keys()) {
914 - injectStyle(targetDocument, hash, css);
915 - }
916 - }
917 - if (typeof process === "undefined" || true) {
918 - registerStyle("0c5702ddca", '@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._83ed8a8da5dd50ea__text{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-medium,499);--_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-medium,499)}._3c78b7fa9b4072dd__heading-xl{--_gcd-heading-font-size:var(--wpds-typography-font-size-xl,20px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-medium,499);--_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-medium,499);--_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-medium,499);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-medium,499);--_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-medium,499);--_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-medium,499);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-regular,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-regular,400)}.ca1aa3fc2029e958__body-lg{--_gcd-heading-font-size:var(--wpds-typography-font-size-lg,15px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-regular,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-regular,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-regular,400)}._0e8d87a42c1f75fa__body-sm{--_gcd-heading-font-size:var(--wpds-typography-font-size-sm,12px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-regular,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)}}}');
919 - }
920 - 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" };
921 - if (typeof process === "undefined" || true) {
922 - registerStyle("d390e935a7", "._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);&: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))}&::placeholder{color:var(--_gcd-input-placeholder-color,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-medium,499));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)}");
923 - }
924 - 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" };
925 - var Text = (0, import_element2.forwardRef)(function Text2({ variant = "body-md", render, className, ...props }, ref) {
926 - const element = useRender({
927 - render,
928 - defaultTagName: "span",
929 - ref,
930 - props: mergeProps(props, {
931 - className: clsx_default(
932 - style_default.text,
933 - global_css_defense_default.heading,
934 - global_css_defense_default.p,
935 - style_default[variant],
936 - className
937 - )
938 - })
939 - });
940 - return element;
941 - });
942 -
943 - // packages/icons/build-module/library/symbol.mjs
944 - var import_primitives = __toESM(require_primitives(), 1);
945 - var import_jsx_runtime2 = __toESM(require_jsx_runtime(), 1);
946 - 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" }) });
947 -
948 - // packages/ui/build-module/stack/stack.mjs
949 - var import_element3 = __toESM(require_element(), 1);
950 - var STYLE_HASH_ATTRIBUTE2 = "data-wp-hash";
951 - function getRuntime2() {
952 - const globalScope = globalThis;
953 - if (globalScope.__wpStyleRuntime) {
954 - return globalScope.__wpStyleRuntime;
955 - }
956 - globalScope.__wpStyleRuntime = {
957 - documents: /* @__PURE__ */ new Map(),
958 - styles: /* @__PURE__ */ new Map(),
959 - injectedStyles: /* @__PURE__ */ new WeakMap()
960 - };
961 - if (typeof document !== "undefined") {
962 - registerDocument2(document);
963 - }
964 - return globalScope.__wpStyleRuntime;
965 - }
966 - function documentContainsStyleHash2(targetDocument, hash) {
967 - if (!targetDocument.head) {
968 - return false;
969 - }
970 - for (const style of targetDocument.head.querySelectorAll(
971 - `style[${STYLE_HASH_ATTRIBUTE2}]`
972 - )) {
973 - if (style.getAttribute(STYLE_HASH_ATTRIBUTE2) === hash) {
974 - return true;
975 - }
976 - }
977 - return false;
978 - }
979 - function injectStyle2(targetDocument, hash, css) {
980 - if (!targetDocument.head) {
981 - return;
982 - }
983 - const runtime = getRuntime2();
984 - let injectedStyles = runtime.injectedStyles.get(targetDocument);
985 - if (!injectedStyles) {
986 - injectedStyles = /* @__PURE__ */ new Set();
987 - runtime.injectedStyles.set(targetDocument, injectedStyles);
988 - }
989 - if (injectedStyles.has(hash)) {
990 - return;
991 - }
992 - if (documentContainsStyleHash2(targetDocument, hash)) {
993 - injectedStyles.add(hash);
994 - return;
995 - }
996 - const style = targetDocument.createElement("style");
997 - style.setAttribute(STYLE_HASH_ATTRIBUTE2, hash);
998 - style.appendChild(targetDocument.createTextNode(css));
999 - targetDocument.head.appendChild(style);
1000 - injectedStyles.add(hash);
1001 - }
1002 - function registerDocument2(targetDocument) {
1003 - const runtime = getRuntime2();
1004 - runtime.documents.set(
1005 - targetDocument,
1006 - (runtime.documents.get(targetDocument) ?? 0) + 1
1007 - );
1008 - for (const [hash, css] of runtime.styles) {
1009 - injectStyle2(targetDocument, hash, css);
1010 - }
1011 - return () => {
1012 - const count = runtime.documents.get(targetDocument);
1013 - if (count === void 0) {
1014 - return;
1015 - }
1016 - if (count <= 1) {
1017 - runtime.documents.delete(targetDocument);
1018 - return;
1019 - }
1020 - runtime.documents.set(targetDocument, count - 1);
1021 - };
1022 - }
1023 - function registerStyle2(hash, css) {
1024 - const runtime = getRuntime2();
1025 - runtime.styles.set(hash, css);
1026 - for (const targetDocument of runtime.documents.keys()) {
1027 - injectStyle2(targetDocument, hash, css);
1028 - }
1029 - }
1030 - if (typeof process === "undefined" || true) {
1031 - registerStyle2("32aba35fe1", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._19ce0419607e1896__stack{display:flex}}}");
1032 - }
1033 - var style_default2 = { "stack": "_19ce0419607e1896__stack" };
1034 - var gapTokens = {
1035 - xs: "var(--wpds-dimension-gap-xs, 4px)",
1036 - sm: "var(--wpds-dimension-gap-sm, 8px)",
1037 - md: "var(--wpds-dimension-gap-md, 12px)",
1038 - lg: "var(--wpds-dimension-gap-lg, 16px)",
1039 - xl: "var(--wpds-dimension-gap-xl, 24px)",
1040 - "2xl": "var(--wpds-dimension-gap-2xl, 32px)",
1041 - "3xl": "var(--wpds-dimension-gap-3xl, 40px)"
1042 - };
1043 - var Stack = (0, import_element3.forwardRef)(function Stack2({ direction, gap, align, justify, wrap, render, ...props }, ref) {
1044 - const style = {
1045 - gap: gap && gapTokens[gap],
1046 - alignItems: align,
1047 - justifyContent: justify,
1048 - flexDirection: direction,
1049 - flexWrap: wrap
1050 - };
1051 - const element = useRender({
1052 - render,
1053 - ref,
1054 - props: mergeProps(props, { style, className: style_default2.stack })
1055 - });
1056 - return element;
1057 - });
1058 -
1059 - // packages/patterns/build-module/components/create-pattern-modal.mjs
1060 343 var import_i18n3 = __toESM(require_i18n(), 1);
1061 - var import_element6 = __toESM(require_element(), 1);
344 + var import_element4 = __toESM(require_element(), 1);
1062 345 var import_data5 = __toESM(require_data(), 1);
1063 346 var import_notices = __toESM(require_notices(), 1);
1064 347 var import_core_data3 = __toESM(require_core_data(), 1);
1065 348
@@ -1064,13 +347,13 @@
1064 347 var import_core_data3 = __toESM(require_core_data(), 1);
1065 348
1066 349 // packages/patterns/build-module/components/category-selector.mjs
1067 350 var import_i18n2 = __toESM(require_i18n(), 1);
1068 - var import_element4 = __toESM(require_element(), 1);
351 + var import_element2 = __toESM(require_element(), 1);
1069 352 var import_components2 = __toESM(require_components(), 1);
1070 353 var import_compose = __toESM(require_compose(), 1);
1071 354 var import_html_entities = __toESM(require_html_entities(), 1);
1072 - var import_jsx_runtime3 = __toESM(require_jsx_runtime(), 1);
355 + var import_jsx_runtime2 = __toESM(require_jsx_runtime(), 1);
1073 356 var unescapeString = (arg) => {
1074 357 return (0, import_html_entities.decodeEntities)(arg);
1075 358 };
1076 359 var CATEGORY_SLUG = "wp_pattern_category";
@@ -1078,11 +361,11 @@
1078 361 categoryTerms,
1079 362 onChange,
1080 363 categoryMap
1081 364 }) {
1082 - const [search, setSearch] = (0, import_element4.useState)("");
365 + const [search, setSearch] = (0, import_element2.useState)("");
1083 366 const debouncedSearch = (0, import_compose.useDebounce)(setSearch, 500);
1084 - const suggestions = (0, import_element4.useMemo)(() => {
367 + const suggestions = (0, import_element2.useMemo)(() => {
1085 368 return Array.from(categoryMap.values()).map((category) => unescapeString(category.label)).filter((category) => {
1086 369 if (search !== "") {
1087 370 return category.toLowerCase().includes(search.toLowerCase());
1088 371 }
@@ -1099,9 +382,9 @@
1099 382 return terms;
1100 383 }, []);
1101 384 onChange(uniqueTerms);
1102 385 }
1103 - return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
386 + return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
1104 387 import_components2.FormTokenField,
1105 388 {
1106 389 className: "patterns-menu-items__convert-modal-categories",
1107 390 value: categoryTerms,
@@ -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;