Backport editor changes from Gutenberg for WordPress 6.2 Beta 3

Updates the `@wordpress` packages to include the following change:

- Pin `valtio` version

References: [ccabeeffe1 Gutenberg's commit for publishing the packages]

Props ntsekouras.
See #57471.


Built from https://develop.svn.wordpress.org/trunk@55366


git-svn-id: http://core.svn.wordpress.org/trunk@54899 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
gziolo 2023-02-20 13:29:05 +00:00
parent 1553e3fa00
commit 4046f55c78
9 changed files with 150 additions and 447 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -49080,8 +49080,8 @@ var Cropper = /** @class */function (_super) {
_this.rafDragTimeout = null; _this.rafDragTimeout = null;
_this.rafPinchTimeout = null; _this.rafPinchTimeout = null;
_this.wheelTimer = null; _this.wheelTimer = null;
_this.currentDoc = document; _this.currentDoc = typeof document !== 'undefined' ? document : null;
_this.currentWindow = window; _this.currentWindow = typeof window !== 'undefined' ? window : null;
_this.resizeObserver = null; _this.resizeObserver = null;
_this.state = { _this.state = {
cropSize: null, cropSize: null,
@ -49106,6 +49106,7 @@ var Cropper = /** @class */function (_super) {
return e.preventDefault(); return e.preventDefault();
}; };
_this.cleanEvents = function () { _this.cleanEvents = function () {
if (!_this.currentDoc) return;
_this.currentDoc.removeEventListener('mousemove', _this.onMouseMove); _this.currentDoc.removeEventListener('mousemove', _this.onMouseMove);
_this.currentDoc.removeEventListener('mouseup', _this.onDragStopped); _this.currentDoc.removeEventListener('mouseup', _this.onDragStopped);
_this.currentDoc.removeEventListener('touchmove', _this.onTouchMove); _this.currentDoc.removeEventListener('touchmove', _this.onTouchMove);
@ -49224,6 +49225,7 @@ var Cropper = /** @class */function (_super) {
} }
}; };
_this.onMouseDown = function (e) { _this.onMouseDown = function (e) {
if (!_this.currentDoc) return;
e.preventDefault(); e.preventDefault();
_this.currentDoc.addEventListener('mousemove', _this.onMouseMove); _this.currentDoc.addEventListener('mousemove', _this.onMouseMove);
_this.currentDoc.addEventListener('mouseup', _this.onDragStopped); _this.currentDoc.addEventListener('mouseup', _this.onDragStopped);
@ -49233,6 +49235,7 @@ var Cropper = /** @class */function (_super) {
return _this.onDrag(Cropper.getMousePoint(e)); return _this.onDrag(Cropper.getMousePoint(e));
}; };
_this.onTouchStart = function (e) { _this.onTouchStart = function (e) {
if (!_this.currentDoc) return;
_this.isTouching = true; _this.isTouching = true;
if (_this.props.onTouchRequest && !_this.props.onTouchRequest(e)) { if (_this.props.onTouchRequest && !_this.props.onTouchRequest(e)) {
return; return;
@ -49257,6 +49260,7 @@ var Cropper = /** @class */function (_super) {
} }
}; };
_this.onGestureStart = function (e) { _this.onGestureStart = function (e) {
if (!_this.currentDoc) return;
e.preventDefault(); e.preventDefault();
_this.currentDoc.addEventListener('gesturechange', _this.onGestureMove); _this.currentDoc.addEventListener('gesturechange', _this.onGestureMove);
_this.currentDoc.addEventListener('gestureend', _this.onGestureEnd); _this.currentDoc.addEventListener('gestureend', _this.onGestureEnd);
@ -49296,6 +49300,7 @@ var Cropper = /** @class */function (_super) {
_this.onDrag = function (_a) { _this.onDrag = function (_a) {
var x = _a.x, var x = _a.x,
y = _a.y; y = _a.y;
if (!_this.currentWindow) return;
if (_this.rafDragTimeout) _this.currentWindow.cancelAnimationFrame(_this.rafDragTimeout); if (_this.rafDragTimeout) _this.currentWindow.cancelAnimationFrame(_this.rafDragTimeout);
_this.rafDragTimeout = _this.currentWindow.requestAnimationFrame(function () { _this.rafDragTimeout = _this.currentWindow.requestAnimationFrame(function () {
if (!_this.state.cropSize) return; if (!_this.state.cropSize) return;
@ -49318,6 +49323,7 @@ var Cropper = /** @class */function (_super) {
(_b = (_a = _this.props).onInteractionEnd) === null || _b === void 0 ? void 0 : _b.call(_a); (_b = (_a = _this.props).onInteractionEnd) === null || _b === void 0 ? void 0 : _b.call(_a);
}; };
_this.onWheel = function (e) { _this.onWheel = function (e) {
if (!_this.currentWindow) return;
if (_this.props.onWheelRequest && !_this.props.onWheelRequest(e)) { if (_this.props.onWheelRequest && !_this.props.onWheelRequest(e)) {
return; return;
} }
@ -49426,6 +49432,7 @@ var Cropper = /** @class */function (_super) {
return _this; return _this;
} }
Cropper.prototype.componentDidMount = function () { Cropper.prototype.componentDidMount = function () {
if (!this.currentDoc || !this.currentWindow) return;
if (this.containerRef) { if (this.containerRef) {
if (this.containerRef.ownerDocument) { if (this.containerRef.ownerDocument) {
this.currentDoc = this.containerRef.ownerDocument; this.currentDoc = this.containerRef.ownerDocument;
@ -49466,6 +49473,7 @@ var Cropper = /** @class */function (_super) {
}; };
Cropper.prototype.componentWillUnmount = function () { Cropper.prototype.componentWillUnmount = function () {
var _a, _b; var _a, _b;
if (!this.currentDoc || !this.currentWindow) return;
if (typeof window.ResizeObserver === 'undefined') { if (typeof window.ResizeObserver === 'undefined') {
this.currentWindow.removeEventListener('resize', this.computeSizes); this.currentWindow.removeEventListener('resize', this.computeSizes);
} }
@ -49520,6 +49528,7 @@ var Cropper = /** @class */function (_super) {
}; };
Cropper.prototype.onPinchMove = function (e) { Cropper.prototype.onPinchMove = function (e) {
var _this = this; var _this = this;
if (!this.currentDoc || !this.currentWindow) return;
var pointA = Cropper.getTouchPoint(e.touches[0]); var pointA = Cropper.getTouchPoint(e.touches[0]);
var pointB = Cropper.getTouchPoint(e.touches[1]); var pointB = Cropper.getTouchPoint(e.touches[1]);
var center = getCenter(pointA, pointB); var center = getCenter(pointA, pointB);

File diff suppressed because one or more lines are too long

View File

@ -18421,64 +18421,53 @@ function ScrollLock() {
/* harmony default export */ var scroll_lock = (ScrollLock); /* harmony default export */ var scroll_lock = (ScrollLock);
;// CONCATENATED MODULE: ./node_modules/proxy-compare/dist/index.modern.js ;// CONCATENATED MODULE: ./node_modules/proxy-compare/dist/index.modern.js
const index_modern_e=Symbol(),index_modern_t=Symbol(),index_modern_r="a",index_modern_n="w";let index_modern_o=(e,t)=>new Proxy(e,t);const index_modern_s=Object.getPrototypeOf,index_modern_c=new WeakMap,index_modern_l=e=>e&&(index_modern_c.has(e)?index_modern_c.get(e):index_modern_s(e)===Object.prototype||index_modern_s(e)===Array.prototype),index_modern_f=e=>"object"==typeof e&&null!==e,index_modern_i=e=>{if(Array.isArray(e))return Array.from(e);const t=Object.getOwnPropertyDescriptors(e);return Object.values(t).forEach(e=>{e.configurable=!0}),Object.create(index_modern_s(e),t)},index_modern_u=e=>e[index_modern_t]||e,index_modern_a=(s,c,f,p)=>{if(!index_modern_l(s))return s;let g=p&&p.get(s);if(!g){const e=index_modern_u(s);g=(e=>Object.values(Object.getOwnPropertyDescriptors(e)).some(e=>!e.configurable&&!e.writable))(e)?[e,index_modern_i(e)]:[e],null==p||p.set(s,g)}const[y,h]=g;let w=f&&f.get(y);return w&&w[1].f===!!h||(w=((o,s)=>{const c={f:s};let l=!1;const f=(e,t)=>{if(!l){let s=c[index_modern_r].get(o);if(s||(s={},c[index_modern_r].set(o,s)),e===index_modern_n)s[index_modern_n]=!0;else{let r=s[e];r||(r=new Set,s[e]=r),r.add(t)}}},i={get:(e,n)=>n===index_modern_t?o:(f("k",n),index_modern_a(Reflect.get(e,n),c[index_modern_r],c.c)),has:(t,n)=>n===index_modern_e?(l=!0,c[index_modern_r].delete(o),!0):(f("h",n),Reflect.has(t,n)),getOwnPropertyDescriptor:(e,t)=>(f("o",t),Reflect.getOwnPropertyDescriptor(e,t)),ownKeys:e=>(f(index_modern_n),Reflect.ownKeys(e))};return s&&(i.set=i.deleteProperty=()=>!1),[i,c]})(y,!!h),w[1].p=index_modern_o(h||y,w[0]),f&&f.set(y,w)),w[1][index_modern_r]=c,w[1].c=f,w[1].p},index_modern_p=(e,t,r,o)=>{if(Object.is(e,t))return!1;if(!index_modern_f(e)||!index_modern_f(t))return!0;const s=r.get(index_modern_u(e));if(!s)return!0;if(o){const r=o.get(e);if(r&&r.n===t)return r.g;o.set(e,{n:t,g:!1})}let c=null;try{for(const r of s.h||[])if(c=Reflect.has(e,r)!==Reflect.has(t,r),c)return c;if(!0===s[index_modern_n]){if(c=((e,t)=>{const r=Reflect.ownKeys(e),n=Reflect.ownKeys(t);return r.length!==n.length||r.some((e,t)=>e!==n[t])})(e,t),c)return c}else for(const r of s.o||[])if(c=!!Reflect.getOwnPropertyDescriptor(e,r)!=!!Reflect.getOwnPropertyDescriptor(t,r),c)return c;for(const n of s.k||[])if(c=index_modern_p(e[n],t[n],r,o),c)return c;return null===c&&(c=!0),c}finally{o&&o.set(e,{n:t,g:c})}},index_modern_g=t=>!!index_modern_l(t)&&index_modern_e in t,index_modern_y=e=>index_modern_l(e)&&e[index_modern_t]||null,index_modern_h=(e,t=!0)=>{index_modern_c.set(e,t)},index_modern_w=(e,t,r)=>{const o=[],s=new WeakSet,c=(e,l)=>{if(s.has(e))return;index_modern_f(e)&&s.add(e);const i=index_modern_f(e)&&t.get(index_modern_u(e));if(i){var a,p;if(null==(a=i.h)||a.forEach(e=>{const t=`:has(${String(e)})`;o.push(l?[...l,t]:[t])}),!0===i[index_modern_n]){const e=":ownKeys";o.push(l?[...l,e]:[e])}else{var g;null==(g=i.o)||g.forEach(e=>{const t=`:hasOwn(${String(e)})`;o.push(l?[...l,t]:[t])})}null==(p=i.k)||p.forEach(t=>{r&&!("value"in(Object.getOwnPropertyDescriptor(e,t)||{}))||c(e[t],l?[...l,t]:[t])})}else l&&o.push(l)};return c(e),o},index_modern_O=e=>{index_modern_o=e}; const index_modern_e=Symbol(),index_modern_t=Symbol(),index_modern_r=Symbol();let index_modern_n=(e,t)=>new Proxy(e,t);const index_modern_o=Object.getPrototypeOf,index_modern_s=new WeakMap,index_modern_c=e=>e&&(index_modern_s.has(e)?index_modern_s.get(e):index_modern_o(e)===Object.prototype||index_modern_o(e)===Array.prototype),index_modern_l=e=>"object"==typeof e&&null!==e,index_modern_a=new WeakMap,index_modern_f=e=>e[index_modern_r]||e,index_modern_i=(s,l,p)=>{if(!index_modern_c(s))return s;const y=index_modern_f(s),u=(e=>Object.isFrozen(e)||Object.values(Object.getOwnPropertyDescriptors(e)).some(e=>!e.writable))(y);let g=p&&p.get(y);return g&&g[1].f===u||(g=((n,o)=>{const s={f:o};let c=!1;const l=(t,r)=>{if(!c){let o=s.a.get(n);o||(o=new Set,s.a.set(n,o)),r&&o.has(index_modern_e)||o.add(t)}},a={get:(e,t)=>t===index_modern_r?n:(l(t),index_modern_i(e[t],s.a,s.c)),has:(e,r)=>r===index_modern_t?(c=!0,s.a.delete(n),!0):(l(r),r in e),getOwnPropertyDescriptor:(e,t)=>(l(t,!0),Object.getOwnPropertyDescriptor(e,t)),ownKeys:t=>(l(index_modern_e),Reflect.ownKeys(t))};return o&&(a.set=a.deleteProperty=()=>!1),[a,s]})(y,u),g[1].p=index_modern_n(u?(e=>{let t=index_modern_a.get(e);if(!t){if(Array.isArray(e))t=Array.from(e);else{const r=Object.getOwnPropertyDescriptors(e);Object.values(r).forEach(e=>{e.configurable=!0}),t=Object.create(index_modern_o(e),r)}index_modern_a.set(e,t)}return t})(y):y,g[0]),p&&p.set(y,g)),g[1].a=l,g[1].c=p,g[1].p},index_modern_p=(e,t)=>{const r=Reflect.ownKeys(e),n=Reflect.ownKeys(t);return r.length!==n.length||r.some((e,t)=>e!==n[t])},index_modern_y=(t,r,n,o)=>{if(Object.is(t,r))return!1;if(!index_modern_l(t)||!index_modern_l(r))return!0;const s=n.get(index_modern_f(t));if(!s)return!0;if(o){const e=o.get(t);if(e&&e.n===r)return e.g;o.set(t,{n:r,g:!1})}let c=null;for(const l of s){const s=l===index_modern_e?index_modern_p(t,r):index_modern_y(t[l],r[l],n,o);if(!0!==s&&!1!==s||(c=s),c)break}return null===c&&(c=!0),o&&o.set(t,{n:r,g:c}),c},index_modern_u=e=>!!index_modern_c(e)&&index_modern_t in e,index_modern_g=e=>index_modern_c(e)&&e[index_modern_r]||null,index_modern_b=(e,t=!0)=>{index_modern_s.set(e,t)},index_modern_O=(e,t)=>{const r=[],n=new WeakSet,o=(e,s)=>{if(n.has(e))return;index_modern_l(e)&&n.add(e);const c=index_modern_l(e)&&t.get(index_modern_f(e));c?c.forEach(t=>{o(e[t],s?[...s,t]:[t])}):s&&r.push(s)};return o(e),r},index_modern_w=e=>{index_modern_n=e};
// EXTERNAL MODULE: ./node_modules/use-sync-external-store/shim/index.js // EXTERNAL MODULE: ./node_modules/use-sync-external-store/shim/index.js
var shim = __webpack_require__(635); var shim = __webpack_require__(635);
;// CONCATENATED MODULE: ./node_modules/valtio/esm/vanilla.mjs ;// CONCATENATED MODULE: ./node_modules/valtio/esm/vanilla.js
const vanilla_isObject = (x) => typeof x === "object" && x !== null; const vanilla_isObject = (x) => typeof x === "object" && x !== null;
const proxyStateMap = /* @__PURE__ */ new WeakMap();
const refSet = /* @__PURE__ */ new WeakSet(); const refSet = /* @__PURE__ */ new WeakSet();
const buildProxyFunction = (objectIs = Object.is, newProxy = (target, handler) => new Proxy(target, handler), canProxy = (x) => vanilla_isObject(x) && !refSet.has(x) && (Array.isArray(x) || !(Symbol.iterator in x)) && !(x instanceof WeakMap) && !(x instanceof WeakSet) && !(x instanceof Error) && !(x instanceof Number) && !(x instanceof Date) && !(x instanceof String) && !(x instanceof RegExp) && !(x instanceof ArrayBuffer), defaultHandlePromise = (promise) => { const VERSION = true ? Symbol("VERSION") : 0;
switch (promise.status) { const LISTENERS = true ? Symbol("LISTENERS") : 0;
case "fulfilled": const SNAPSHOT = true ? Symbol("SNAPSHOT") : 0;
return promise.value; const buildProxyFunction = (objectIs = Object.is, newProxy = (target, handler) => new Proxy(target, handler), canProxy = (x) => vanilla_isObject(x) && !refSet.has(x) && (Array.isArray(x) || !(Symbol.iterator in x)) && !(x instanceof WeakMap) && !(x instanceof WeakSet) && !(x instanceof Error) && !(x instanceof Number) && !(x instanceof Date) && !(x instanceof String) && !(x instanceof RegExp) && !(x instanceof ArrayBuffer), PROMISE_RESULT = true ? Symbol("PROMISE_RESULT") : 0, PROMISE_ERROR = true ? Symbol("PROMISE_ERROR") : 0, snapshotCache = /* @__PURE__ */ new WeakMap(), createSnapshot = (version, target, receiver) => {
case "rejected": const cache = snapshotCache.get(receiver);
throw promise.reason;
default:
throw promise;
}
}, snapCache = /* @__PURE__ */ new WeakMap(), createSnapshot = (target, version, handlePromise = defaultHandlePromise) => {
const cache = snapCache.get(target);
if ((cache == null ? void 0 : cache[0]) === version) { if ((cache == null ? void 0 : cache[0]) === version) {
return cache[1]; return cache[1];
} }
const snap = Array.isArray(target) ? [] : Object.create(Object.getPrototypeOf(target)); const snapshot2 = Array.isArray(target) ? [] : Object.create(Object.getPrototypeOf(target));
index_modern_h(snap, true); index_modern_b(snapshot2, true);
snapCache.set(target, [version, snap]); snapshotCache.set(receiver, [version, snapshot2]);
Reflect.ownKeys(target).forEach((key) => { Reflect.ownKeys(target).forEach((key) => {
if (Object.getOwnPropertyDescriptor(snap, key)) { const value = Reflect.get(target, key, receiver);
return;
}
const value = Reflect.get(target, key);
const desc = {
value,
enumerable: true,
// This is intentional to avoid copying with proxy-compare.
// It's still non-writable, so it avoids assigning a value.
configurable: true
};
if (refSet.has(value)) { if (refSet.has(value)) {
index_modern_h(value, false); index_modern_b(value, false);
snapshot2[key] = value;
} else if (value instanceof Promise) { } else if (value instanceof Promise) {
delete desc.value; if (PROMISE_RESULT in value) {
desc.get = () => handlePromise(value); snapshot2[key] = value[PROMISE_RESULT];
} else if (proxyStateMap.has(value)) { } else {
const [target2, ensureVersion] = proxyStateMap.get( const errorOrPromise = value[PROMISE_ERROR] || value;
value Object.defineProperty(snapshot2, key, {
); get() {
desc.value = createSnapshot( if (PROMISE_RESULT in value) {
target2, return value[PROMISE_RESULT];
ensureVersion(), }
handlePromise throw errorOrPromise;
);
} }
Object.defineProperty(snap, key, desc);
}); });
return snap; }
}, proxyCache = /* @__PURE__ */ new WeakMap(), versionHolder = [1, 1], proxyFunction = (initialObject) => { } else if (value == null ? void 0 : value[LISTENERS]) {
snapshot2[key] = value[SNAPSHOT];
} else {
snapshot2[key] = value;
}
});
return Object.freeze(snapshot2);
}, proxyCache = /* @__PURE__ */ new WeakMap(), versionHolder = [1], proxyFunction2 = (initialObject) => {
if (!vanilla_isObject(initialObject)) { if (!vanilla_isObject(initialObject)) {
throw new Error("object required"); throw new Error("object required");
} }
@ -18494,75 +18483,44 @@ const buildProxyFunction = (objectIs = Object.is, newProxy = (target, handler) =
listeners.forEach((listener) => listener(op, nextVersion)); listeners.forEach((listener) => listener(op, nextVersion));
} }
}; };
let checkVersion = versionHolder[1]; const propListeners = /* @__PURE__ */ new Map();
const ensureVersion = (nextCheckVersion = ++versionHolder[1]) => { const getPropListener = (prop) => {
if (checkVersion !== nextCheckVersion && !listeners.size) { let propListener = propListeners.get(prop);
checkVersion = nextCheckVersion; if (!propListener) {
propProxyStates.forEach(([propProxyState]) => { propListener = (op, nextVersion) => {
const propVersion = propProxyState[1](nextCheckVersion);
if (propVersion > version) {
version = propVersion;
}
});
}
return version;
};
const createPropListener = (prop) => (op, nextVersion) => {
const newOp = [...op]; const newOp = [...op];
newOp[1] = [prop, ...newOp[1]]; newOp[1] = [prop, ...newOp[1]];
notifyUpdate(newOp, nextVersion); notifyUpdate(newOp, nextVersion);
}; };
const propProxyStates = /* @__PURE__ */ new Map(); propListeners.set(prop, propListener);
const addPropListener = (prop, propProxyState) => {
var _a;
if (((_a = /* unsupported import.meta.env */ undefined) == null ? void 0 : _a.MODE) !== "production" && propProxyStates.has(prop)) {
throw new Error("prop listener already exists");
}
if (listeners.size) {
const remove = propProxyState[3](createPropListener(prop));
propProxyStates.set(prop, [propProxyState, remove]);
} else {
propProxyStates.set(prop, [propProxyState]);
} }
return propListener;
}; };
const removePropListener = (prop) => { const popPropListener = (prop) => {
var _a; const propListener = propListeners.get(prop);
const entry = propProxyStates.get(prop); propListeners.delete(prop);
if (entry) { return propListener;
propProxyStates.delete(prop);
(_a = entry[1]) == null ? void 0 : _a.call(entry);
}
};
const addListener = (listener) => {
listeners.add(listener);
if (listeners.size === 1) {
propProxyStates.forEach(([propProxyState, prevRemove], prop) => {
var _a;
if (((_a = /* unsupported import.meta.env */ undefined) == null ? void 0 : _a.MODE) !== "production" && prevRemove) {
throw new Error("remove already exists");
}
const remove = propProxyState[3](createPropListener(prop));
propProxyStates.set(prop, [propProxyState, remove]);
});
}
const removeListener = () => {
listeners.delete(listener);
if (listeners.size === 0) {
propProxyStates.forEach(([propProxyState, remove], prop) => {
if (remove) {
remove();
propProxyStates.set(prop, [propProxyState]);
}
});
}
};
return removeListener;
}; };
const baseObject = Array.isArray(initialObject) ? [] : Object.create(Object.getPrototypeOf(initialObject)); const baseObject = Array.isArray(initialObject) ? [] : Object.create(Object.getPrototypeOf(initialObject));
const handler = { const handler = {
get(target, prop, receiver) {
if (prop === VERSION) {
return version;
}
if (prop === LISTENERS) {
return listeners;
}
if (prop === SNAPSHOT) {
return createSnapshot(version, target, receiver);
}
return Reflect.get(target, prop, receiver);
},
deleteProperty(target, prop) { deleteProperty(target, prop) {
const prevValue = Reflect.get(target, prop); const prevValue = Reflect.get(target, prop);
removePropListener(prop); const childListeners = prevValue == null ? void 0 : prevValue[LISTENERS];
if (childListeners) {
childListeners.delete(popPropListener(prop));
}
const deleted = Reflect.deleteProperty(target, prop); const deleted = Reflect.deleteProperty(target, prop);
if (deleted) { if (deleted) {
notifyUpdate(["delete", [prop], prevValue]); notifyUpdate(["delete", [prop], prevValue]);
@ -18570,34 +18528,39 @@ const buildProxyFunction = (objectIs = Object.is, newProxy = (target, handler) =
return deleted; return deleted;
}, },
set(target, prop, value, receiver) { set(target, prop, value, receiver) {
var _a;
const hasPrevValue = Reflect.has(target, prop); const hasPrevValue = Reflect.has(target, prop);
const prevValue = Reflect.get(target, prop, receiver); const prevValue = Reflect.get(target, prop, receiver);
if (hasPrevValue && (objectIs(prevValue, value) || proxyCache.has(value) && objectIs(prevValue, proxyCache.get(value)))) { if (hasPrevValue && objectIs(prevValue, value)) {
return true; return true;
} }
removePropListener(prop); const childListeners = prevValue == null ? void 0 : prevValue[LISTENERS];
if (vanilla_isObject(value)) { if (childListeners) {
value = index_modern_y(value) || value; childListeners.delete(popPropListener(prop));
} }
let nextValue = value; if (vanilla_isObject(value)) {
if (value instanceof Promise) { value = index_modern_g(value) || value;
value.then((v) => { }
value.status = "fulfilled"; let nextValue;
value.value = v; if ((_a = Object.getOwnPropertyDescriptor(target, prop)) == null ? void 0 : _a.set) {
nextValue = value;
} else if (value instanceof Promise) {
nextValue = value.then((v) => {
nextValue[PROMISE_RESULT] = v;
notifyUpdate(["resolve", [prop], v]); notifyUpdate(["resolve", [prop], v]);
return v;
}).catch((e) => { }).catch((e) => {
value.status = "rejected"; nextValue[PROMISE_ERROR] = e;
value.reason = e;
notifyUpdate(["reject", [prop], e]); notifyUpdate(["reject", [prop], e]);
}); });
} else if (value == null ? void 0 : value[LISTENERS]) {
nextValue = value;
nextValue[LISTENERS].add(getPropListener(prop));
} else if (canProxy(value)) {
nextValue = vanilla_proxy(value);
nextValue[LISTENERS].add(getPropListener(prop));
} else { } else {
if (!proxyStateMap.has(value) && canProxy(value)) { nextValue = value;
nextValue = proxyFunction(value);
}
const childProxyState = !refSet.has(nextValue) && proxyStateMap.get(nextValue);
if (childProxyState) {
addPropListener(prop, childProxyState);
}
} }
Reflect.set(target, prop, nextValue, receiver); Reflect.set(target, prop, nextValue, receiver);
notifyUpdate(["set", [prop], value, prevValue]); notifyUpdate(["set", [prop], value, prevValue]);
@ -18606,60 +18569,47 @@ const buildProxyFunction = (objectIs = Object.is, newProxy = (target, handler) =
}; };
const proxyObject = newProxy(baseObject, handler); const proxyObject = newProxy(baseObject, handler);
proxyCache.set(initialObject, proxyObject); proxyCache.set(initialObject, proxyObject);
const proxyState = [
baseObject,
ensureVersion,
createSnapshot,
addListener
];
proxyStateMap.set(proxyObject, proxyState);
Reflect.ownKeys(initialObject).forEach((key) => { Reflect.ownKeys(initialObject).forEach((key) => {
const desc = Object.getOwnPropertyDescriptor( const desc = Object.getOwnPropertyDescriptor(
initialObject, initialObject,
key key
); );
const hasValue = "value" in desc; if (desc.get || desc.set) {
delete desc.value;
Object.defineProperty(baseObject, key, desc); Object.defineProperty(baseObject, key, desc);
if (hasValue) { } else {
proxyObject[key] = initialObject[key]; proxyObject[key] = initialObject[key];
} }
}); });
return proxyObject; return proxyObject;
}) => [ }) => [
// public functions proxyFunction2,
proxyFunction,
// shared state
proxyStateMap,
refSet, refSet,
// internal things VERSION,
LISTENERS,
SNAPSHOT,
objectIs, objectIs,
newProxy, newProxy,
canProxy, canProxy,
defaultHandlePromise, PROMISE_RESULT,
snapCache, PROMISE_ERROR,
snapshotCache,
createSnapshot, createSnapshot,
proxyCache, proxyCache,
versionHolder versionHolder
]; ];
const [defaultProxyFunction] = buildProxyFunction(); const [proxyFunction] = buildProxyFunction();
function vanilla_proxy(initialObject = {}) { function vanilla_proxy(initialObject = {}) {
return defaultProxyFunction(initialObject); return proxyFunction(initialObject);
} }
function vanilla_getVersion(proxyObject) { function vanilla_getVersion(proxyObject) {
const proxyState = proxyStateMap.get(proxyObject); return vanilla_isObject(proxyObject) ? proxyObject[VERSION] : void 0;
return proxyState == null ? void 0 : proxyState[1]();
} }
function vanilla_subscribe(proxyObject, callback, notifyInSync) { function vanilla_subscribe(proxyObject, callback, notifyInSync) {
var _a; if ( true && !(proxyObject == null ? void 0 : proxyObject[LISTENERS])) {
const proxyState = proxyStateMap.get(proxyObject);
if (((_a = /* unsupported import.meta.env */ undefined) == null ? void 0 : _a.MODE) !== "production" && !proxyState) {
console.warn("Please use proxy object"); console.warn("Please use proxy object");
} }
let promise; let promise;
const ops = []; const ops = [];
const addListener = proxyState[3];
let isListenerActive = false;
const listener = (op) => { const listener = (op) => {
ops.push(op); ops.push(op);
if (notifyInSync) { if (notifyInSync) {
@ -18669,27 +18619,20 @@ function vanilla_subscribe(proxyObject, callback, notifyInSync) {
if (!promise) { if (!promise) {
promise = Promise.resolve().then(() => { promise = Promise.resolve().then(() => {
promise = void 0; promise = void 0;
if (isListenerActive) {
callback(ops.splice(0)); callback(ops.splice(0));
}
}); });
} }
}; };
const removeListener = addListener(listener); proxyObject[LISTENERS].add(listener);
isListenerActive = true;
return () => { return () => {
isListenerActive = false; proxyObject[LISTENERS].delete(listener);
removeListener();
}; };
} }
function vanilla_snapshot(proxyObject, handlePromise) { function vanilla_snapshot(proxyObject) {
var _a; if ( true && !(proxyObject == null ? void 0 : proxyObject[SNAPSHOT])) {
const proxyState = proxyStateMap.get(proxyObject);
if (((_a = /* unsupported import.meta.env */ undefined) == null ? void 0 : _a.MODE) !== "production" && !proxyState) {
console.warn("Please use proxy object"); console.warn("Please use proxy object");
} }
const [target, ensureVersion, createSnapshot] = proxyState; return proxyObject[SNAPSHOT];
return createSnapshot(target, ensureVersion(), handlePromise);
} }
function vanilla_ref(obj) { function vanilla_ref(obj) {
refSet.add(obj); refSet.add(obj);
@ -18699,24 +18642,22 @@ const unstable_buildProxyFunction = (/* unused pure expression or super */ null
;// CONCATENATED MODULE: ./node_modules/valtio/esm/react.mjs ;// CONCATENATED MODULE: ./node_modules/valtio/esm/index.js
const { use } = external_React_;
const { useSyncExternalStore } = shim; const { useSyncExternalStore } = shim;
const useAffectedDebugValue = (state, affected) => { const useAffectedDebugValue = (state, affected) => {
const pathList = (0,external_React_.useRef)(); const pathList = (0,external_React_.useRef)();
(0,external_React_.useEffect)(() => { (0,external_React_.useEffect)(() => {
pathList.current = index_modern_w(state, affected, true); pathList.current = index_modern_O(state, affected);
}); });
(0,external_React_.useDebugValue)(pathList.current); (0,external_React_.useDebugValue)(pathList.current);
}; };
const targetCache = /* @__PURE__ */ new WeakMap();
function useSnapshot(proxyObject, options) { function useSnapshot(proxyObject, options) {
var _a;
const notifyInSync = options == null ? void 0 : options.sync; const notifyInSync = options == null ? void 0 : options.sync;
const lastSnapshot = (0,external_React_.useRef)(); const lastSnapshot = (0,external_React_.useRef)();
const lastAffected = (0,external_React_.useRef)(); const lastAffected = (0,external_React_.useRef)();
@ -18731,9 +18672,9 @@ function useSnapshot(proxyObject, options) {
[proxyObject, notifyInSync] [proxyObject, notifyInSync]
), ),
() => { () => {
const nextSnapshot = vanilla_snapshot(proxyObject, use); const nextSnapshot = vanilla_snapshot(proxyObject);
try { try {
if (!inRender && lastSnapshot.current && lastAffected.current && !index_modern_p( if (!inRender && lastSnapshot.current && lastAffected.current && !index_modern_y(
lastSnapshot.current, lastSnapshot.current,
nextSnapshot, nextSnapshot,
lastAffected.current, lastAffected.current,
@ -18745,7 +18686,7 @@ function useSnapshot(proxyObject, options) {
} }
return nextSnapshot; return nextSnapshot;
}, },
() => vanilla_snapshot(proxyObject, use) () => vanilla_snapshot(proxyObject)
); );
inRender = false; inRender = false;
const currAffected = /* @__PURE__ */ new WeakMap(); const currAffected = /* @__PURE__ */ new WeakMap();
@ -18753,31 +18694,24 @@ function useSnapshot(proxyObject, options) {
lastSnapshot.current = currSnapshot; lastSnapshot.current = currSnapshot;
lastAffected.current = currAffected; lastAffected.current = currAffected;
}); });
if (((_a = /* unsupported import.meta.env */ undefined) == null ? void 0 : _a.MODE) !== "production") { if (true) {
useAffectedDebugValue(currSnapshot, currAffected); useAffectedDebugValue(currSnapshot, currAffected);
} }
const proxyCache = (0,external_React_.useMemo)(() => /* @__PURE__ */ new WeakMap(), []); const proxyCache = (0,external_React_.useMemo)(() => /* @__PURE__ */ new WeakMap(), []);
return index_modern_a( return index_modern_i(currSnapshot, currAffected, proxyCache);
currSnapshot,
currAffected,
proxyCache,
targetCache
);
} }
;// CONCATENATED MODULE: ./node_modules/valtio/esm/vanilla/utils.mjs ;// CONCATENATED MODULE: ./node_modules/valtio/esm/utils.js
function subscribeKey(proxyObject, key, callback, notifyInSync) { function subscribeKey(proxyObject, key, callback, notifyInSync) {
let prevValue = proxyObject[key];
return subscribe( return subscribe(
proxyObject, proxyObject,
() => { (ops) => {
const nextValue = proxyObject[key]; if (ops.some((op) => op[1][0] === key)) {
if (!Object.is(prevValue, nextValue)) { callback(proxyObject[key]);
callback(prevValue = nextValue);
} }
}, },
notifyInSync notifyInSync
@ -18840,7 +18774,6 @@ function watch(callback, options) {
const DEVTOOLS = Symbol(); const DEVTOOLS = Symbol();
function devtools(proxyObject, options) { function devtools(proxyObject, options) {
var _a, _b;
if (typeof options === "string") { if (typeof options === "string") {
console.warn( console.warn(
"string name option is deprecated, use { name }. https://github.com/pmndrs/valtio/pull/400" "string name option is deprecated, use { name }. https://github.com/pmndrs/valtio/pull/400"
@ -18850,11 +18783,11 @@ function devtools(proxyObject, options) {
const { enabled, name = "" } = options || {}; const { enabled, name = "" } = options || {};
let extension; let extension;
try { try {
extension = (enabled != null ? enabled : ((_a = /* unsupported import.meta.env */ undefined) == null ? void 0 : _a.MODE) !== "production") && window.__REDUX_DEVTOOLS_EXTENSION__; extension = (enabled != null ? enabled : (/* unsupported import.meta.env */ undefined && 0) !== "production") && window.__REDUX_DEVTOOLS_EXTENSION__;
} catch { } catch {
} }
if (!extension) { if (!extension) {
if (((_b = /* unsupported import.meta.env */ undefined) == null ? void 0 : _b.MODE) !== "production" && enabled) { if ( true && enabled) {
console.warn("[Warning] Please install/enable Redux devtools extension"); console.warn("[Warning] Please install/enable Redux devtools extension");
} }
return; return;
@ -18874,14 +18807,14 @@ function devtools(proxyObject, options) {
devtools2.send( devtools2.send(
{ {
type: action, type: action,
updatedAt: (/* @__PURE__ */ new Date()).toLocaleString() updatedAt: new Date().toLocaleString()
}, },
snapWithoutDevtools snapWithoutDevtools
); );
} }
}); });
const unsub2 = devtools2.subscribe((message) => { const unsub2 = devtools2.subscribe((message) => {
var _a2, _b2, _c, _d, _e, _f; var _a, _b, _c, _d, _e, _f;
if (message.type === "ACTION" && message.payload) { if (message.type === "ACTION" && message.payload) {
try { try {
Object.assign(proxyObject, JSON.parse(message.payload)); Object.assign(proxyObject, JSON.parse(message.payload));
@ -18893,7 +18826,7 @@ function devtools(proxyObject, options) {
} }
} }
if (message.type === "DISPATCH" && message.state) { if (message.type === "DISPATCH" && message.state) {
if (((_a2 = message.payload) == null ? void 0 : _a2.type) === "JUMP_TO_ACTION" || ((_b2 = message.payload) == null ? void 0 : _b2.type) === "JUMP_TO_STATE") { if (((_a = message.payload) == null ? void 0 : _a.type) === "JUMP_TO_ACTION" || ((_b = message.payload) == null ? void 0 : _b.type) === "JUMP_TO_STATE") {
isTimeTraveling = true; isTimeTraveling = true;
const state = JSON.parse(message.state); const state = JSON.parse(message.state);
Object.assign(proxyObject, state); Object.assign(proxyObject, state);
@ -19076,16 +19009,11 @@ function derive(derivedFns, options) {
} else { } else {
const subscription = { const subscription = {
s: p, s: p,
// sourceObject
d: proxyObject, d: proxyObject,
// derivedObject
k: key, k: key,
// derived key
c: evaluate, c: evaluate,
// callback
n: notifyInSync, n: notifyInSync,
i: derivedKeys i: derivedKeys
// ignoringKeys
}; };
addSubscription(subscription); addSubscription(subscription);
entry.s = subscription; entry.s = subscription;
@ -19128,12 +19056,9 @@ function underive(proxyObject, options) {
} }
function addComputed_DEPRECATED(proxyObject, computedFns_FAKE, targetObject = proxyObject) { function addComputed_DEPRECATED(proxyObject, computedFns_FAKE, targetObject = proxyObject) {
var _a;
if (((_a = /* unsupported import.meta.env */ undefined) == null ? void 0 : _a.MODE) !== "production") {
console.warn( console.warn(
"addComputed is deprecated. Please consider using `derive`. Falling back to emulation with derive. https://github.com/pmndrs/valtio/pull/201" "addComputed is deprecated. Please consider using `derive` or `proxyWithComputed` instead. Falling back to emulation with derive. https://github.com/pmndrs/valtio/pull/201"
); );
}
const derivedFns = {}; const derivedFns = {};
Object.keys(computedFns_FAKE).forEach((key) => { Object.keys(computedFns_FAKE).forEach((key) => {
derivedFns[key] = (get) => computedFns_FAKE[key](get(proxyObject)); derivedFns[key] = (get) => computedFns_FAKE[key](get(proxyObject));
@ -19141,13 +19066,7 @@ function addComputed_DEPRECATED(proxyObject, computedFns_FAKE, targetObject = pr
return derive(derivedFns, { proxy: targetObject }); return derive(derivedFns, { proxy: targetObject });
} }
function proxyWithComputed_DEPRECATED(initialObject, computedFns) { function proxyWithComputed(initialObject, computedFns) {
var _a;
if (((_a = /* unsupported import.meta.env */ undefined) == null ? void 0 : _a.MODE) !== "production") {
console.warn(
'proxyWithComputed is deprecated. Please follow "Computed Properties" guide in docs.'
);
}
Object.keys(computedFns).forEach((key) => { Object.keys(computedFns).forEach((key) => {
if (Object.getOwnPropertyDescriptor(initialObject, key)) { if (Object.getOwnPropertyDescriptor(initialObject, key)) {
throw new Error("object property already defined"); throw new Error("object property already defined");
@ -19181,7 +19100,6 @@ function proxyWithHistory(initialValue, skipSubscribe = false) {
value: initialValue, value: initialValue,
history: ref({ history: ref({
wip: void 0, wip: void 0,
// to avoid infinite loop
snapshots: [], snapshots: [],
index: -1 index: -1
}), }),
@ -19260,7 +19178,7 @@ function proxySet(initialValues) {
return "Set"; return "Set";
}, },
toJSON() { toJSON() {
return new Set(this.data); return {};
}, },
[Symbol.iterator]() { [Symbol.iterator]() {
return this.data[Symbol.iterator](); return this.data[Symbol.iterator]();
@ -19324,7 +19242,7 @@ function proxyMap(entries) {
return this.data.length; return this.data.length;
}, },
toJSON() { toJSON() {
return new Map(this.data); return {};
}, },
forEach(cb) { forEach(cb) {
this.data.forEach((p) => { this.data.forEach((p) => {
@ -21499,7 +21417,7 @@ var hoist_non_react_statics_cjs = __webpack_require__(1281);
var pkg = { var pkg = {
name: "@emotion/react", name: "@emotion/react",
version: "11.10.5", version: "11.10.6",
main: "dist/emotion-react.cjs.js", main: "dist/emotion-react.cjs.js",
module: "dist/emotion-react.esm.js", module: "dist/emotion-react.esm.js",
browser: { browser: {
@ -21562,7 +21480,7 @@ var pkg = {
}, },
dependencies: { dependencies: {
"@babel/runtime": "^7.18.3", "@babel/runtime": "^7.18.3",
"@emotion/babel-plugin": "^11.10.5", "@emotion/babel-plugin": "^11.10.6",
"@emotion/cache": "^11.10.5", "@emotion/cache": "^11.10.5",
"@emotion/serialize": "^1.1.1", "@emotion/serialize": "^1.1.1",
"@emotion/use-insertion-effect-with-fallbacks": "^1.0.0", "@emotion/use-insertion-effect-with-fallbacks": "^1.0.0",
@ -21571,24 +21489,19 @@ var pkg = {
"hoist-non-react-statics": "^3.3.1" "hoist-non-react-statics": "^3.3.1"
}, },
peerDependencies: { peerDependencies: {
"@babel/core": "^7.0.0",
react: ">=16.8.0" react: ">=16.8.0"
}, },
peerDependenciesMeta: { peerDependenciesMeta: {
"@babel/core": {
optional: true
},
"@types/react": { "@types/react": {
optional: true optional: true
} }
}, },
devDependencies: { devDependencies: {
"@babel/core": "^7.18.5",
"@definitelytyped/dtslint": "0.0.112", "@definitelytyped/dtslint": "0.0.112",
"@emotion/css": "11.10.5", "@emotion/css": "11.10.6",
"@emotion/css-prettifier": "1.1.1", "@emotion/css-prettifier": "1.1.1",
"@emotion/server": "11.10.0", "@emotion/server": "11.10.0",
"@emotion/styled": "11.10.5", "@emotion/styled": "11.10.6",
"html-tag-names": "^1.1.2", "html-tag-names": "^1.1.2",
react: "16.14.0", react: "16.14.0",
"svg-tag-names": "^1.1.1", "svg-tag-names": "^1.1.1",

File diff suppressed because one or more lines are too long

View File

@ -1,217 +0,0 @@
/******/ (function() { // webpackBootstrap
/******/ "use strict";
/******/ // The require scope
/******/ var __webpack_require__ = {};
/******/
/************************************************************************/
/******/ /* webpack/runtime/define property getters */
/******/ !function() {
/******/ // define getter functions for harmony exports
/******/ __webpack_require__.d = function(exports, definition) {
/******/ for(var key in definition) {
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ }
/******/ }
/******/ };
/******/ }();
/******/
/******/ /* webpack/runtime/hasOwnProperty shorthand */
/******/ !function() {
/******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }
/******/ }();
/******/
/******/ /* webpack/runtime/make namespace object */
/******/ !function() {
/******/ // define __esModule on exports
/******/ __webpack_require__.r = function(exports) {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/ }();
/******/
/************************************************************************/
var __webpack_exports__ = {};
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"__dangerousOptInToUnstableAPIsOnlyForCoreModules": function() { return /* reexport */ __dangerousOptInToUnstableAPIsOnlyForCoreModules; }
});
;// CONCATENATED MODULE: ./node_modules/@wordpress/experiments/build-module/implementation.js
/**
* wordpress/experimental the utilities to enable private cross-package
* exports of experimental APIs.
*
* This "implementation.js" file is needed for the sake of the unit tests. It
* exports more than the public API of the package to aid in testing.
*/
/**
* The list of core modules allowed to opt-in to the experimental APIs.
*/
const CORE_MODULES_USING_EXPERIMENTS = ['@wordpress/data', '@wordpress/editor', '@wordpress/blocks', '@wordpress/block-editor', '@wordpress/customize-widgets', '@wordpress/edit-site', '@wordpress/edit-post', '@wordpress/edit-widgets', '@wordpress/block-library'];
/**
* A list of core modules that already opted-in to
* the experiments package.
*/
const registeredExperiments = [];
/*
* Warning for theme and plugin developers.
*
* The use of experimental developer APIs is intended for use by WordPress Core
* and the Gutenberg plugin exclusively.
*
* Dangerously opting in to using these APIs is NOT RECOMMENDED. Furthermore,
* the WordPress Core philosophy to strive to maintain backward compatibility
* for third-party developers DOES NOT APPLY to experimental APIs.
*
* THE CONSENT STRING FOR OPTING IN TO THESE APIS MAY CHANGE AT ANY TIME AND
* WITHOUT NOTICE. THIS CHANGE WILL BREAK EXISTING THIRD-PARTY CODE. SUCH A
* CHANGE MAY OCCUR IN EITHER A MAJOR OR MINOR RELEASE.
*/
const requiredConsent = 'I know using unstable features means my plugin or theme will inevitably break on the next WordPress release.';
const __dangerousOptInToUnstableAPIsOnlyForCoreModules = (consent, moduleName) => {
if (!CORE_MODULES_USING_EXPERIMENTS.includes(moduleName)) {
throw new Error(`You tried to opt-in to unstable APIs as module "${moduleName}". ` + 'This feature is only for JavaScript modules shipped with WordPress core. ' + 'Please do not use it in plugins and themes as the unstable APIs will be removed ' + 'without a warning. If you ignore this error and depend on unstable features, ' + 'your product will inevitably break on one of the next WordPress releases.');
}
if (registeredExperiments.includes(moduleName)) {
throw new Error(`You tried to opt-in to unstable APIs as module "${moduleName}" which is already registered. ` + 'This feature is only for JavaScript modules shipped with WordPress core. ' + 'Please do not use it in plugins and themes as the unstable APIs will be removed ' + 'without a warning. If you ignore this error and depend on unstable features, ' + 'your product will inevitably break on one of the next WordPress releases.');
}
if (consent !== requiredConsent) {
throw new Error(`You tried to opt-in to unstable APIs without confirming you know the consequences. ` + 'This feature is only for JavaScript modules shipped with WordPress core. ' + 'Please do not use it in plugins and themes as the unstable APIs will removed ' + 'without a warning. If you ignore this error and depend on unstable features, ' + 'your product will inevitably break on the next WordPress release.');
}
registeredExperiments.push(moduleName);
return {
lock,
unlock
};
};
/**
* Binds private data to an object.
* It does not alter the passed object in any way, only
* registers it in an internal map of private data.
*
* The private data can't be accessed by any other means
* than the `unlock` function.
*
* @example
* ```js
* const object = {};
* const privateData = { a: 1 };
* lock( object, privateData );
*
* object
* // {}
*
* unlock( object );
* // { a: 1 }
* ```
*
* @param {Object|Function} object The object to bind the private data to.
* @param {any} privateData The private data to bind to the object.
*/
function lock(object, privateData) {
if (!object) {
throw new Error('Cannot lock an undefined object.');
}
if (!(__experiment in object)) {
object[__experiment] = {};
}
lockedData.set(object[__experiment], privateData);
}
/**
* Unlocks the private data bound to an object.
*
* It does not alter the passed object in any way, only
* returns the private data paired with it using the `lock()`
* function.
*
* @example
* ```js
* const object = {};
* const privateData = { a: 1 };
* lock( object, privateData );
*
* object
* // {}
*
* unlock( object );
* // { a: 1 }
* ```
*
* @param {any} object The object to unlock the private data from.
* @return {any} The private data bound to the object.
*/
function unlock(object) {
if (!object) {
throw new Error('Cannot unlock an undefined object.');
}
if (!(__experiment in object)) {
throw new Error('Cannot unlock an object that was not locked before. ');
}
return lockedData.get(object[__experiment]);
}
const lockedData = new WeakMap();
/**
* Used by lock() and unlock() to uniquely identify the private data
* related to a containing object.
*/
const __experiment = Symbol('Experiment ID'); // Unit tests utilities:
/**
* Private function to allow the unit tests to allow
* a mock module to access the experimental APIs.
*
* @param {string} name The name of the module.
*/
function allowCoreModule(name) {
CORE_MODULES_USING_EXPERIMENTS.push(name);
}
/**
* Private function to allow the unit tests to set
* a custom list of allowed modules.
*/
function resetAllowedCoreModules() {
while (CORE_MODULES_USING_EXPERIMENTS.length) {
CORE_MODULES_USING_EXPERIMENTS.pop();
}
}
/**
* Private function to allow the unit tests to reset
* the list of registered experiments.
*/
function resetRegisteredExperiments() {
while (registeredExperiments.length) {
registeredExperiments.pop();
}
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/experiments/build-module/index.js
(window.wp = window.wp || {}).experiments = __webpack_exports__;
/******/ })()
;

View File

@ -1,2 +0,0 @@
/*! This file is auto-generated */
!function(){"use strict";var e={d:function(o,r){for(var t in r)e.o(r,t)&&!e.o(o,t)&&Object.defineProperty(o,t,{enumerable:!0,get:r[t]})},o:function(e,o){return Object.prototype.hasOwnProperty.call(e,o)},r:function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},o={};e.r(o),e.d(o,{__dangerousOptInToUnstableAPIsOnlyForCoreModules:function(){return n}});const r=["@wordpress/data","@wordpress/editor","@wordpress/blocks","@wordpress/block-editor","@wordpress/customize-widgets","@wordpress/edit-site","@wordpress/edit-post","@wordpress/edit-widgets","@wordpress/block-library"],t=[],n=(e,o)=>{if(!r.includes(o))throw new Error(`You tried to opt-in to unstable APIs as module "${o}". This feature is only for JavaScript modules shipped with WordPress core. Please do not use it in plugins and themes as the unstable APIs will be removed without a warning. If you ignore this error and depend on unstable features, your product will inevitably break on one of the next WordPress releases.`);if(t.includes(o))throw new Error(`You tried to opt-in to unstable APIs as module "${o}" which is already registered. This feature is only for JavaScript modules shipped with WordPress core. Please do not use it in plugins and themes as the unstable APIs will be removed without a warning. If you ignore this error and depend on unstable features, your product will inevitably break on one of the next WordPress releases.`);if("I know using unstable features means my plugin or theme will inevitably break on the next WordPress release."!==e)throw new Error("You tried to opt-in to unstable APIs without confirming you know the consequences. This feature is only for JavaScript modules shipped with WordPress core. Please do not use it in plugins and themes as the unstable APIs will removed without a warning. If you ignore this error and depend on unstable features, your product will inevitably break on the next WordPress release.");return t.push(o),{lock:s,unlock:i}};function s(e,o){if(!e)throw new Error("Cannot lock an undefined object.");d in e||(e[d]={}),a.set(e[d],o)}function i(e){if(!e)throw new Error("Cannot unlock an undefined object.");if(!(d in e))throw new Error("Cannot unlock an object that was not locked before. ");return a.get(e[d])}const a=new WeakMap,d=Symbol("Experiment ID");(window.wp=window.wp||{}).experiments=o}();

View File

@ -16,7 +16,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '6.2-beta2-55365'; $wp_version = '6.2-beta2-55366';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.