| @@ -45,12 +45,36 @@ | ||
| 45 | 45 | module.exports = window.ReactDOM; |
| 46 | 46 | } |
| 47 | 47 | }); |
| 48 | 48 | |
| 49 | - // vendor-external:react-dom/client | |
| 49 | + // node_modules/react-dom/client.js | |
| 50 | 50 | var require_client = __commonJS({ |
| 51 | - "vendor-external:react-dom/client"(exports, module) { | |
| 52 | - module.exports = window.ReactDOM; | |
| 51 | + "node_modules/react-dom/client.js"(exports) { | |
| 52 | + "use strict"; | |
| 53 | + var m = require_react_dom(); | |
| 54 | + if (false) { | |
| 55 | + exports.createRoot = m.createRoot; | |
| 56 | + exports.hydrateRoot = m.hydrateRoot; | |
| 57 | + } else { | |
| 58 | + i = m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; | |
| 59 | + exports.createRoot = function(c, o) { | |
| 60 | + i.usingClientEntryPoint = true; | |
| 61 | + try { | |
| 62 | + return m.createRoot(c, o); | |
| 63 | + } finally { | |
| 64 | + i.usingClientEntryPoint = false; | |
| 65 | + } | |
| 66 | + }; | |
| 67 | + exports.hydrateRoot = function(c, h, o) { | |
| 68 | + i.usingClientEntryPoint = true; | |
| 69 | + try { | |
| 70 | + return m.hydrateRoot(c, h, o); | |
| 71 | + } finally { | |
| 72 | + i.usingClientEntryPoint = false; | |
| 73 | + } | |
| 74 | + }; | |
| 75 | + } | |
| 76 | + var i; | |
| 53 | 77 | } |
| 54 | 78 | }); |
| 55 | 79 | |
| 56 | 80 | // package-external:@wordpress/escape-html |
| @@ -59,19 +83,11 @@ | ||
| 59 | 83 | module.exports = window.wp.escapeHtml; |
| 60 | 84 | } |
| 61 | 85 | }); |
| 62 | 86 | |
| 63 | - // package-external:@wordpress/deprecated | |
| 64 | - var require_deprecated = __commonJS({ | |
| 65 | - "package-external:@wordpress/deprecated"(exports, module) { | |
| 66 | - module.exports = window.wp.deprecated; | |
| 67 | - } | |
| 68 | - }); | |
| 69 | - | |
| 70 | 87 | // packages/element/build-module/index.mjs |
| 71 | 88 | var index_exports = {}; |
| 72 | 89 | __export(index_exports, { |
| 73 | - Activity: () => import_react.Activity, | |
| 74 | 90 | Children: () => import_react.Children, |
| 75 | 91 | Component: () => import_react.Component, |
| 76 | 92 | Fragment: () => import_react.Fragment, |
| 77 | 93 | Platform: () => platform_default, |
| @@ -86,40 +102,32 @@ | ||
| 86 | 102 | createInterpolateElement: () => create_interpolate_element_default, |
| 87 | 103 | createPortal: () => import_react_dom.createPortal, |
| 88 | 104 | createRef: () => import_react.createRef, |
| 89 | 105 | createRoot: () => import_client.createRoot, |
| 90 | - findDOMNode: () => findDOMNode, | |
| 106 | + findDOMNode: () => import_react_dom.findDOMNode, | |
| 91 | 107 | flushSync: () => import_react_dom.flushSync, |
| 92 | 108 | forwardRef: () => import_react.forwardRef, |
| 109 | + hydrate: () => import_react_dom.hydrate, | |
| 93 | 110 | hydrateRoot: () => import_client.hydrateRoot, |
| 94 | 111 | isEmptyElement: () => isEmptyElement, |
| 95 | 112 | isValidElement: () => import_react.isValidElement, |
| 96 | 113 | lazy: () => import_react.lazy, |
| 97 | 114 | memo: () => import_react.memo, |
| 98 | - preconnect: () => import_react_dom.preconnect, | |
| 99 | - prefetchDNS: () => import_react_dom.prefetchDNS, | |
| 100 | - preinit: () => import_react_dom.preinit, | |
| 101 | - preinitModule: () => import_react_dom.preinitModule, | |
| 102 | - preload: () => import_react_dom.preload, | |
| 103 | - preloadModule: () => import_react_dom.preloadModule, | |
| 115 | + render: () => import_react_dom.render, | |
| 104 | 116 | renderToString: () => serialize_default, |
| 105 | 117 | startTransition: () => import_react.startTransition, |
| 106 | 118 | switchChildrenNodeName: () => switchChildrenNodeName, |
| 107 | - use: () => import_react.use, | |
| 108 | - useActionState: () => import_react.useActionState, | |
| 119 | + unmountComponentAtNode: () => import_react_dom.unmountComponentAtNode, | |
| 109 | 120 | useCallback: () => import_react.useCallback, |
| 110 | 121 | useContext: () => import_react.useContext, |
| 111 | 122 | useDebugValue: () => import_react.useDebugValue, |
| 112 | 123 | useDeferredValue: () => import_react.useDeferredValue, |
| 113 | 124 | useEffect: () => import_react.useEffect, |
| 114 | - useEffectEvent: () => import_react.useEffectEvent, | |
| 115 | - useFormStatus: () => import_react_dom.useFormStatus, | |
| 116 | 125 | useId: () => import_react.useId, |
| 117 | 126 | useImperativeHandle: () => import_react.useImperativeHandle, |
| 118 | 127 | useInsertionEffect: () => import_react.useInsertionEffect, |
| 119 | 128 | useLayoutEffect: () => import_react.useLayoutEffect, |
| 120 | 129 | useMemo: () => import_react.useMemo, |
| 121 | - useOptimistic: () => import_react.useOptimistic, | |
| 122 | 130 | useReducer: () => import_react.useReducer, |
| 123 | 131 | useRef: () => import_react.useRef, |
| 124 | 132 | useState: () => import_react.useState, |
| 125 | 133 | useSyncExternalStore: () => import_react.useSyncExternalStore, |
| @@ -176,9 +184,9 @@ | ||
| 176 | 184 | leadingTextStart, |
| 177 | 185 | children: [] |
| 178 | 186 | }; |
| 179 | 187 | } |
| 180 | - function createInterpolateElement(interpolatedString, conversionMap) { | |
| 188 | + var createInterpolateElement = (interpolatedString, conversionMap) => { | |
| 181 | 189 | indoc = interpolatedString; |
| 182 | 190 | offset = 0; |
| 183 | 191 | output = []; |
| 184 | 192 | stack = []; |
| @@ -190,9 +198,9 @@ | ||
| 190 | 198 | } |
| 191 | 199 | do { |
| 192 | 200 | } while (proceed(conversionMap)); |
| 193 | 201 | return (0, import_react.createElement)(import_react.Fragment, null, ...output); |
| 194 | - } | |
| 202 | + }; | |
| 195 | 203 | var isValidConversionMap = (conversionMap) => { |
| 196 | 204 | const isObject2 = typeof conversionMap === "object" && conversionMap !== null; |
| 197 | 205 | const values = isObject2 && Object.values(conversionMap); |
| 198 | 206 | return isObject2 && values.length > 0 && values.every((element) => (0, import_react.isValidElement)(element)); |
| @@ -837,11 +845,9 @@ | ||
| 837 | 845 | case Provider.$$typeof: |
| 838 | 846 | return renderChildren(props.children, props.value, legacyContext); |
| 839 | 847 | case Consumer.$$typeof: |
| 840 | 848 | return renderElement( |
| 841 | - props.children( | |
| 842 | - context || type._currentValue || type._context._currentValue | |
| 843 | - ), | |
| 849 | + props.children(context || type._currentValue), | |
| 844 | 850 | context, |
| 845 | 851 | legacyContext |
| 846 | 852 | ); |
| 847 | 853 | case ForwardRef.$$typeof: |
| @@ -945,73 +951,8 @@ | ||
| 945 | 951 | } |
| 946 | 952 | return result; |
| 947 | 953 | } |
| 948 | 954 | var serialize_default = renderElement; |
| 949 | - | |
| 950 | - // packages/element/build-module/find-dom-node.mjs | |
| 951 | - var import_deprecated = __toESM(require_deprecated(), 1); | |
| 952 | - var internalsKey = "_reactInternals"; | |
| 953 | - var HostComponent = 5; | |
| 954 | - var HostText = 6; | |
| 955 | - function findCurrentFiber(fiber) { | |
| 956 | - if (!fiber.alternate) { | |
| 957 | - return fiber; | |
| 958 | - } | |
| 959 | - let node = fiber; | |
| 960 | - while (node.return) { | |
| 961 | - node = node.return; | |
| 962 | - } | |
| 963 | - if (node.stateNode.current === node) { | |
| 964 | - return fiber; | |
| 965 | - } | |
| 966 | - return fiber.alternate; | |
| 967 | - } | |
| 968 | - function findHostFiber(fiber) { | |
| 969 | - const current = findCurrentFiber(fiber); | |
| 970 | - if (!current) { | |
| 971 | - return null; | |
| 972 | - } | |
| 973 | - return findHostFiberImpl(current); | |
| 974 | - } | |
| 975 | - function findHostFiberImpl(fiber) { | |
| 976 | - if (fiber.tag === HostComponent || fiber.tag === HostText) { | |
| 977 | - return fiber; | |
| 978 | - } | |
| 979 | - let child = fiber.child; | |
| 980 | - while (child) { | |
| 981 | - const hostFiber = findHostFiberImpl(child); | |
| 982 | - if (hostFiber) { | |
| 983 | - return hostFiber; | |
| 984 | - } | |
| 985 | - child = child.sibling; | |
| 986 | - } | |
| 987 | - return null; | |
| 988 | - } | |
| 989 | - function findDOMNode(instance) { | |
| 990 | - (0, import_deprecated.default)("wp.element.findDOMNode", { | |
| 991 | - since: "7.1", | |
| 992 | - alternative: "DOM refs", | |
| 993 | - link: "https://react.dev/reference/react-dom/findDOMNode" | |
| 994 | - }); | |
| 995 | - if (instance === null || instance === void 0) { | |
| 996 | - return null; | |
| 997 | - } | |
| 998 | - if (instance.nodeType !== void 0) { | |
| 999 | - return instance; | |
| 1000 | - } | |
| 1001 | - const fiber = instance[internalsKey]; | |
| 1002 | - if (fiber === void 0) { | |
| 1003 | - if (typeof instance.render === "function") { | |
| 1004 | - throw new Error("Unable to find node on an unmounted component."); | |
| 1005 | - } | |
| 1006 | - const keys = Object.keys(instance).join(","); | |
| 1007 | - throw new Error( | |
| 1008 | - `Argument appears to not be a ReactComponent. Keys: ${keys}` | |
| 1009 | - ); | |
| 1010 | - } | |
| 1011 | - const hostFiber = findHostFiber(fiber); | |
| 1012 | - return hostFiber?.stateNode ?? null; | |
| 1013 | - } | |
| 1014 | 955 | return __toCommonJS(index_exports); |
| 1015 | 956 | })(); |
| 1016 | 957 | /*! Bundled license information: |
| 1017 | 958 | |
| @@ -1022,6 +963,5 @@ | ||
| 1022 | 963 | * Copyright (c) 2014-2017, Jon Schlinkert. |
| 1023 | 964 | * Released under the MIT License. |
| 1024 | 965 | *) |
| 1025 | 966 | */ |
| 1026 | -if(wp.element&&typeof wp.element==='object'){wp.element=Object.assign({},wp.element);} | |
| 1027 | 967 | //# sourceMappingURL=index.js.map |