@shopify/hydrogen-react 2025.7.1 → 2025.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser-dev/_virtual/use-sync-external-store-shim.production.mjs +5 -0
- package/dist/browser-dev/_virtual/use-sync-external-store-shim.production.mjs.map +1 -0
- package/dist/browser-dev/_virtual/with-selector.production.mjs +5 -0
- package/dist/browser-dev/_virtual/with-selector.production.mjs.map +1 -0
- package/dist/browser-dev/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.mjs +52 -74
- package/dist/browser-dev/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.mjs.map +1 -1
- package/dist/browser-dev/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.mjs +78 -0
- package/dist/browser-dev/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.mjs.map +1 -0
- package/dist/browser-dev/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.mjs +54 -111
- package/dist/browser-dev/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.mjs.map +1 -1
- package/dist/browser-dev/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.mjs +63 -0
- package/dist/browser-dev/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.mjs.map +1 -0
- package/dist/browser-dev/node_modules/use-sync-external-store/shim/index.mjs +2 -2
- package/dist/browser-dev/node_modules/use-sync-external-store/shim/index.mjs.map +1 -1
- package/dist/browser-dev/node_modules/use-sync-external-store/shim/with-selector.mjs +2 -2
- package/dist/browser-dev/node_modules/use-sync-external-store/shim/with-selector.mjs.map +1 -1
- package/dist/browser-dev/packages/hydrogen-react/package.json.mjs +1 -1
- package/dist/browser-prod/_virtual/use-sync-external-store-shim.production.mjs +5 -0
- package/dist/browser-prod/_virtual/use-sync-external-store-shim.production.mjs.map +1 -0
- package/dist/browser-prod/_virtual/with-selector.production.mjs +5 -0
- package/dist/browser-prod/_virtual/with-selector.production.mjs.map +1 -0
- package/dist/browser-prod/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.mjs +52 -74
- package/dist/browser-prod/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.mjs.map +1 -1
- package/dist/browser-prod/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.mjs +78 -0
- package/dist/browser-prod/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.mjs.map +1 -0
- package/dist/browser-prod/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.mjs +54 -111
- package/dist/browser-prod/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.mjs.map +1 -1
- package/dist/browser-prod/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.mjs +63 -0
- package/dist/browser-prod/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.mjs.map +1 -0
- package/dist/browser-prod/node_modules/use-sync-external-store/shim/index.mjs +2 -2
- package/dist/browser-prod/node_modules/use-sync-external-store/shim/index.mjs.map +1 -1
- package/dist/browser-prod/node_modules/use-sync-external-store/shim/with-selector.mjs +2 -2
- package/dist/browser-prod/node_modules/use-sync-external-store/shim/with-selector.mjs.map +1 -1
- package/dist/browser-prod/packages/hydrogen-react/package.json.mjs +1 -1
- package/dist/node-dev/_virtual/use-sync-external-store-shim.production.js +5 -0
- package/dist/node-dev/_virtual/use-sync-external-store-shim.production.js.map +1 -0
- package/dist/node-dev/_virtual/use-sync-external-store-shim.production.mjs +5 -0
- package/dist/node-dev/_virtual/use-sync-external-store-shim.production.mjs.map +1 -0
- package/dist/node-dev/_virtual/with-selector.production.js +5 -0
- package/dist/node-dev/_virtual/with-selector.production.js.map +1 -0
- package/dist/node-dev/_virtual/with-selector.production.mjs +5 -0
- package/dist/node-dev/_virtual/with-selector.production.mjs.map +1 -0
- package/dist/node-dev/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js +52 -74
- package/dist/node-dev/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js.map +1 -1
- package/dist/node-dev/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.mjs +52 -74
- package/dist/node-dev/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.mjs.map +1 -1
- package/dist/node-dev/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.js +78 -0
- package/dist/node-dev/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.js.map +1 -0
- package/dist/node-dev/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.mjs +78 -0
- package/dist/node-dev/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.mjs.map +1 -0
- package/dist/node-dev/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js +54 -111
- package/dist/node-dev/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js.map +1 -1
- package/dist/node-dev/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.mjs +54 -111
- package/dist/node-dev/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.mjs.map +1 -1
- package/dist/node-dev/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js +63 -0
- package/dist/node-dev/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js.map +1 -0
- package/dist/node-dev/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.mjs +63 -0
- package/dist/node-dev/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.mjs.map +1 -0
- package/dist/node-dev/node_modules/use-sync-external-store/shim/index.js +2 -2
- package/dist/node-dev/node_modules/use-sync-external-store/shim/index.js.map +1 -1
- package/dist/node-dev/node_modules/use-sync-external-store/shim/index.mjs +2 -2
- package/dist/node-dev/node_modules/use-sync-external-store/shim/index.mjs.map +1 -1
- package/dist/node-dev/node_modules/use-sync-external-store/shim/with-selector.js +2 -2
- package/dist/node-dev/node_modules/use-sync-external-store/shim/with-selector.js.map +1 -1
- package/dist/node-dev/node_modules/use-sync-external-store/shim/with-selector.mjs +2 -2
- package/dist/node-dev/node_modules/use-sync-external-store/shim/with-selector.mjs.map +1 -1
- package/dist/node-dev/packages/hydrogen-react/package.json.js +1 -1
- package/dist/node-dev/packages/hydrogen-react/package.json.mjs +1 -1
- package/dist/node-prod/_virtual/use-sync-external-store-shim.production.js +5 -0
- package/dist/node-prod/_virtual/use-sync-external-store-shim.production.js.map +1 -0
- package/dist/node-prod/_virtual/use-sync-external-store-shim.production.mjs +5 -0
- package/dist/node-prod/_virtual/use-sync-external-store-shim.production.mjs.map +1 -0
- package/dist/node-prod/_virtual/with-selector.production.js +5 -0
- package/dist/node-prod/_virtual/with-selector.production.js.map +1 -0
- package/dist/node-prod/_virtual/with-selector.production.mjs +5 -0
- package/dist/node-prod/_virtual/with-selector.production.mjs.map +1 -0
- package/dist/node-prod/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js +52 -74
- package/dist/node-prod/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js.map +1 -1
- package/dist/node-prod/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.mjs +52 -74
- package/dist/node-prod/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.mjs.map +1 -1
- package/dist/node-prod/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.js +78 -0
- package/dist/node-prod/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.js.map +1 -0
- package/dist/node-prod/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.mjs +78 -0
- package/dist/node-prod/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.mjs.map +1 -0
- package/dist/node-prod/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js +54 -111
- package/dist/node-prod/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js.map +1 -1
- package/dist/node-prod/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.mjs +54 -111
- package/dist/node-prod/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.mjs.map +1 -1
- package/dist/node-prod/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js +63 -0
- package/dist/node-prod/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js.map +1 -0
- package/dist/node-prod/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.mjs +63 -0
- package/dist/node-prod/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.mjs.map +1 -0
- package/dist/node-prod/node_modules/use-sync-external-store/shim/index.js +2 -2
- package/dist/node-prod/node_modules/use-sync-external-store/shim/index.js.map +1 -1
- package/dist/node-prod/node_modules/use-sync-external-store/shim/index.mjs +2 -2
- package/dist/node-prod/node_modules/use-sync-external-store/shim/index.mjs.map +1 -1
- package/dist/node-prod/node_modules/use-sync-external-store/shim/with-selector.js +2 -2
- package/dist/node-prod/node_modules/use-sync-external-store/shim/with-selector.js.map +1 -1
- package/dist/node-prod/node_modules/use-sync-external-store/shim/with-selector.mjs +2 -2
- package/dist/node-prod/node_modules/use-sync-external-store/shim/with-selector.mjs.map +1 -1
- package/dist/node-prod/packages/hydrogen-react/package.json.js +1 -1
- package/dist/node-prod/packages/hydrogen-react/package.json.mjs +1 -1
- package/dist/umd/hydrogen-react.dev.js +107 -186
- package/dist/umd/hydrogen-react.dev.js.map +1 -1
- package/dist/umd/hydrogen-react.prod.js +16 -16
- package/dist/umd/hydrogen-react.prod.js.map +1 -1
- package/package.json +5 -5
- package/dist/browser-dev/_virtual/use-sync-external-store-shim.production.min.mjs +0 -5
- package/dist/browser-dev/_virtual/use-sync-external-store-shim.production.min.mjs.map +0 -1
- package/dist/browser-dev/_virtual/with-selector.production.min.mjs +0 -5
- package/dist/browser-dev/_virtual/with-selector.production.min.mjs.map +0 -1
- package/dist/browser-dev/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.min.mjs +0 -67
- package/dist/browser-dev/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.min.mjs.map +0 -1
- package/dist/browser-dev/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.min.mjs +0 -57
- package/dist/browser-dev/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.min.mjs.map +0 -1
- package/dist/browser-prod/_virtual/use-sync-external-store-shim.production.min.mjs +0 -5
- package/dist/browser-prod/_virtual/use-sync-external-store-shim.production.min.mjs.map +0 -1
- package/dist/browser-prod/_virtual/with-selector.production.min.mjs +0 -5
- package/dist/browser-prod/_virtual/with-selector.production.min.mjs.map +0 -1
- package/dist/browser-prod/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.min.mjs +0 -67
- package/dist/browser-prod/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.min.mjs.map +0 -1
- package/dist/browser-prod/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.min.mjs +0 -57
- package/dist/browser-prod/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.min.mjs.map +0 -1
- package/dist/node-dev/_virtual/use-sync-external-store-shim.production.min.js +0 -5
- package/dist/node-dev/_virtual/use-sync-external-store-shim.production.min.js.map +0 -1
- package/dist/node-dev/_virtual/use-sync-external-store-shim.production.min.mjs +0 -5
- package/dist/node-dev/_virtual/use-sync-external-store-shim.production.min.mjs.map +0 -1
- package/dist/node-dev/_virtual/with-selector.production.min.js +0 -5
- package/dist/node-dev/_virtual/with-selector.production.min.js.map +0 -1
- package/dist/node-dev/_virtual/with-selector.production.min.mjs +0 -5
- package/dist/node-dev/_virtual/with-selector.production.min.mjs.map +0 -1
- package/dist/node-dev/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.min.js +0 -67
- package/dist/node-dev/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.min.js.map +0 -1
- package/dist/node-dev/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.min.mjs +0 -67
- package/dist/node-dev/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.min.mjs.map +0 -1
- package/dist/node-dev/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.min.js +0 -57
- package/dist/node-dev/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.min.js.map +0 -1
- package/dist/node-dev/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.min.mjs +0 -57
- package/dist/node-dev/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.min.mjs.map +0 -1
- package/dist/node-prod/_virtual/use-sync-external-store-shim.production.min.js +0 -5
- package/dist/node-prod/_virtual/use-sync-external-store-shim.production.min.js.map +0 -1
- package/dist/node-prod/_virtual/use-sync-external-store-shim.production.min.mjs +0 -5
- package/dist/node-prod/_virtual/use-sync-external-store-shim.production.min.mjs.map +0 -1
- package/dist/node-prod/_virtual/with-selector.production.min.js +0 -5
- package/dist/node-prod/_virtual/with-selector.production.min.js.map +0 -1
- package/dist/node-prod/_virtual/with-selector.production.min.mjs +0 -5
- package/dist/node-prod/_virtual/with-selector.production.min.mjs.map +0 -1
- package/dist/node-prod/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.min.js +0 -67
- package/dist/node-prod/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.min.js.map +0 -1
- package/dist/node-prod/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.min.mjs +0 -67
- package/dist/node-prod/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.min.mjs.map +0 -1
- package/dist/node-prod/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.min.js +0 -57
- package/dist/node-prod/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.min.js.map +0 -1
- package/dist/node-prod/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.min.mjs +0 -57
- package/dist/node-prod/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.min.mjs.map +0 -1
|
@@ -176,125 +176,68 @@
|
|
|
176
176
|
* @license React
|
|
177
177
|
* use-sync-external-store-shim.development.js
|
|
178
178
|
*
|
|
179
|
-
* Copyright (c)
|
|
179
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
180
180
|
*
|
|
181
181
|
* This source code is licensed under the MIT license found in the
|
|
182
182
|
* LICENSE file in the root directory of this source tree.
|
|
183
183
|
*/
|
|
184
|
-
{
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
function printWarning(level, format, args) {
|
|
202
|
-
{
|
|
203
|
-
var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
|
|
204
|
-
var stack = ReactDebugCurrentFrame.getStackAddendum();
|
|
205
|
-
if (stack !== "") {
|
|
206
|
-
format += "%s";
|
|
207
|
-
args = args.concat([stack]);
|
|
208
|
-
}
|
|
209
|
-
var argsWithFormat = args.map(function(item) {
|
|
210
|
-
return String(item);
|
|
211
|
-
});
|
|
212
|
-
argsWithFormat.unshift("Warning: " + format);
|
|
213
|
-
Function.prototype.apply.call(console[level], console, argsWithFormat);
|
|
214
|
-
}
|
|
215
|
-
}
|
|
216
|
-
function is(x, y) {
|
|
217
|
-
return x === y && (x !== 0 || 1 / x === 1 / y) || x !== x && y !== y;
|
|
184
|
+
(function() {
|
|
185
|
+
function is(x, y) {
|
|
186
|
+
return x === y && (0 !== x || 1 / x === 1 / y) || x !== x && y !== y;
|
|
187
|
+
}
|
|
188
|
+
function useSyncExternalStore$2(subscribe, getSnapshot) {
|
|
189
|
+
didWarnOld18Alpha || void 0 === React2.startTransition || (didWarnOld18Alpha = true, console.error(
|
|
190
|
+
"You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."
|
|
191
|
+
));
|
|
192
|
+
var value = getSnapshot();
|
|
193
|
+
if (!didWarnUncachedGetSnapshot) {
|
|
194
|
+
var cachedValue = getSnapshot();
|
|
195
|
+
objectIs(value, cachedValue) || (console.error(
|
|
196
|
+
"The result of getSnapshot should be cached to avoid an infinite loop"
|
|
197
|
+
), didWarnUncachedGetSnapshot = true);
|
|
218
198
|
}
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
var
|
|
223
|
-
|
|
224
|
-
{
|
|
225
|
-
if (!didWarnOld18Alpha) {
|
|
226
|
-
if (React2.startTransition !== void 0) {
|
|
227
|
-
didWarnOld18Alpha = true;
|
|
228
|
-
error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release.");
|
|
229
|
-
}
|
|
230
|
-
}
|
|
231
|
-
}
|
|
232
|
-
var value = getSnapshot();
|
|
233
|
-
{
|
|
234
|
-
if (!didWarnUncachedGetSnapshot) {
|
|
235
|
-
var cachedValue = getSnapshot();
|
|
236
|
-
if (!objectIs(value, cachedValue)) {
|
|
237
|
-
error("The result of getSnapshot should be cached to avoid an infinite loop");
|
|
238
|
-
didWarnUncachedGetSnapshot = true;
|
|
239
|
-
}
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
|
-
var _useState = useState({
|
|
243
|
-
inst: {
|
|
244
|
-
value,
|
|
245
|
-
getSnapshot
|
|
246
|
-
}
|
|
247
|
-
}), inst = _useState[0].inst, forceUpdate = _useState[1];
|
|
248
|
-
useLayoutEffect(function() {
|
|
199
|
+
cachedValue = useState({
|
|
200
|
+
inst: { value, getSnapshot }
|
|
201
|
+
});
|
|
202
|
+
var inst = cachedValue[0].inst, forceUpdate = cachedValue[1];
|
|
203
|
+
useLayoutEffect(
|
|
204
|
+
function() {
|
|
249
205
|
inst.value = value;
|
|
250
206
|
inst.getSnapshot = getSnapshot;
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
forceUpdate({
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
function checkIfSnapshotChanged(inst) {
|
|
276
|
-
var latestGetSnapshot = inst.getSnapshot;
|
|
277
|
-
var prevValue = inst.value;
|
|
278
|
-
try {
|
|
279
|
-
var nextValue = latestGetSnapshot();
|
|
280
|
-
return !objectIs(prevValue, nextValue);
|
|
281
|
-
} catch (error2) {
|
|
282
|
-
return true;
|
|
283
|
-
}
|
|
284
|
-
}
|
|
285
|
-
function useSyncExternalStore$1(subscribe, getSnapshot, getServerSnapshot) {
|
|
286
|
-
return getSnapshot();
|
|
287
|
-
}
|
|
288
|
-
var canUseDOM = !!(typeof window !== "undefined" && typeof window.document !== "undefined" && typeof window.document.createElement !== "undefined");
|
|
289
|
-
var isServerEnvironment = !canUseDOM;
|
|
290
|
-
var shim2 = isServerEnvironment ? useSyncExternalStore$1 : useSyncExternalStore;
|
|
291
|
-
var useSyncExternalStore$2 = React2.useSyncExternalStore !== void 0 ? React2.useSyncExternalStore : shim2;
|
|
292
|
-
useSyncExternalStoreShim_development.useSyncExternalStore = useSyncExternalStore$2;
|
|
293
|
-
if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== "undefined" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop === "function") {
|
|
294
|
-
__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());
|
|
207
|
+
checkIfSnapshotChanged(inst) && forceUpdate({ inst });
|
|
208
|
+
},
|
|
209
|
+
[subscribe, value, getSnapshot]
|
|
210
|
+
);
|
|
211
|
+
useEffect(
|
|
212
|
+
function() {
|
|
213
|
+
checkIfSnapshotChanged(inst) && forceUpdate({ inst });
|
|
214
|
+
return subscribe(function() {
|
|
215
|
+
checkIfSnapshotChanged(inst) && forceUpdate({ inst });
|
|
216
|
+
});
|
|
217
|
+
},
|
|
218
|
+
[subscribe]
|
|
219
|
+
);
|
|
220
|
+
useDebugValue(value);
|
|
221
|
+
return value;
|
|
222
|
+
}
|
|
223
|
+
function checkIfSnapshotChanged(inst) {
|
|
224
|
+
var latestGetSnapshot = inst.getSnapshot;
|
|
225
|
+
inst = inst.value;
|
|
226
|
+
try {
|
|
227
|
+
var nextValue = latestGetSnapshot();
|
|
228
|
+
return !objectIs(inst, nextValue);
|
|
229
|
+
} catch (error) {
|
|
230
|
+
return true;
|
|
295
231
|
}
|
|
296
|
-
}
|
|
297
|
-
|
|
232
|
+
}
|
|
233
|
+
function useSyncExternalStore$1(subscribe, getSnapshot) {
|
|
234
|
+
return getSnapshot();
|
|
235
|
+
}
|
|
236
|
+
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
|
|
237
|
+
var React2 = React$1, objectIs = "function" === typeof Object.is ? Object.is : is, useState = React2.useState, useEffect = React2.useEffect, useLayoutEffect = React2.useLayoutEffect, useDebugValue = React2.useDebugValue, didWarnOld18Alpha = false, didWarnUncachedGetSnapshot = false, shim2 = "undefined" === typeof window || "undefined" === typeof window.document || "undefined" === typeof window.document.createElement ? useSyncExternalStore$1 : useSyncExternalStore$2;
|
|
238
|
+
useSyncExternalStoreShim_development.useSyncExternalStore = void 0 !== React2.useSyncExternalStore ? React2.useSyncExternalStore : shim2;
|
|
239
|
+
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
|
|
240
|
+
})();
|
|
298
241
|
return useSyncExternalStoreShim_development;
|
|
299
242
|
}
|
|
300
243
|
var hasRequiredShim;
|
|
@@ -314,93 +257,71 @@
|
|
|
314
257
|
* @license React
|
|
315
258
|
* use-sync-external-store-shim/with-selector.development.js
|
|
316
259
|
*
|
|
317
|
-
* Copyright (c)
|
|
260
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
318
261
|
*
|
|
319
262
|
* This source code is licensed under the MIT license found in the
|
|
320
263
|
* LICENSE file in the root directory of this source tree.
|
|
321
264
|
*/
|
|
322
|
-
{
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
var inst;
|
|
338
|
-
if (instRef.current === null) {
|
|
339
|
-
inst = {
|
|
340
|
-
hasValue: false,
|
|
341
|
-
value: null
|
|
342
|
-
};
|
|
343
|
-
instRef.current = inst;
|
|
344
|
-
} else {
|
|
345
|
-
inst = instRef.current;
|
|
346
|
-
}
|
|
347
|
-
var _useMemo = useMemo(function() {
|
|
348
|
-
var hasMemo = false;
|
|
349
|
-
var memoizedSnapshot;
|
|
350
|
-
var memoizedSelection;
|
|
351
|
-
var memoizedSelector = function(nextSnapshot) {
|
|
265
|
+
(function() {
|
|
266
|
+
function is(x, y) {
|
|
267
|
+
return x === y && (0 !== x || 1 / x === 1 / y) || x !== x && y !== y;
|
|
268
|
+
}
|
|
269
|
+
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
|
|
270
|
+
var React2 = React$1, shim2 = requireShim(), objectIs = "function" === typeof Object.is ? Object.is : is, useSyncExternalStore = shim2.useSyncExternalStore, useRef = React2.useRef, useEffect = React2.useEffect, useMemo = React2.useMemo, useDebugValue = React2.useDebugValue;
|
|
271
|
+
withSelector_development.useSyncExternalStoreWithSelector = function(subscribe, getSnapshot, getServerSnapshot, selector, isEqual2) {
|
|
272
|
+
var instRef = useRef(null);
|
|
273
|
+
if (null === instRef.current) {
|
|
274
|
+
var inst = { hasValue: false, value: null };
|
|
275
|
+
instRef.current = inst;
|
|
276
|
+
} else inst = instRef.current;
|
|
277
|
+
instRef = useMemo(
|
|
278
|
+
function() {
|
|
279
|
+
function memoizedSelector(nextSnapshot) {
|
|
352
280
|
if (!hasMemo) {
|
|
353
281
|
hasMemo = true;
|
|
354
282
|
memoizedSnapshot = nextSnapshot;
|
|
355
|
-
|
|
356
|
-
if (
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
memoizedSelection = currentSelection;
|
|
361
|
-
return currentSelection;
|
|
362
|
-
}
|
|
363
|
-
}
|
|
283
|
+
nextSnapshot = selector(nextSnapshot);
|
|
284
|
+
if (void 0 !== isEqual2 && inst.hasValue) {
|
|
285
|
+
var currentSelection = inst.value;
|
|
286
|
+
if (isEqual2(currentSelection, nextSnapshot))
|
|
287
|
+
return memoizedSelection = currentSelection;
|
|
364
288
|
}
|
|
365
|
-
memoizedSelection =
|
|
366
|
-
return _nextSelection;
|
|
367
|
-
}
|
|
368
|
-
var prevSnapshot = memoizedSnapshot;
|
|
369
|
-
var prevSelection = memoizedSelection;
|
|
370
|
-
if (objectIs(prevSnapshot, nextSnapshot)) {
|
|
371
|
-
return prevSelection;
|
|
289
|
+
return memoizedSelection = nextSnapshot;
|
|
372
290
|
}
|
|
291
|
+
currentSelection = memoizedSelection;
|
|
292
|
+
if (objectIs(memoizedSnapshot, nextSnapshot))
|
|
293
|
+
return currentSelection;
|
|
373
294
|
var nextSelection = selector(nextSnapshot);
|
|
374
|
-
if (
|
|
375
|
-
return
|
|
376
|
-
}
|
|
295
|
+
if (void 0 !== isEqual2 && isEqual2(currentSelection, nextSelection))
|
|
296
|
+
return memoizedSnapshot = nextSnapshot, currentSelection;
|
|
377
297
|
memoizedSnapshot = nextSnapshot;
|
|
378
|
-
memoizedSelection = nextSelection;
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
},
|
|
390
|
-
|
|
391
|
-
|
|
298
|
+
return memoizedSelection = nextSelection;
|
|
299
|
+
}
|
|
300
|
+
var hasMemo = false, memoizedSnapshot, memoizedSelection, maybeGetServerSnapshot = void 0 === getServerSnapshot ? null : getServerSnapshot;
|
|
301
|
+
return [
|
|
302
|
+
function() {
|
|
303
|
+
return memoizedSelector(getSnapshot());
|
|
304
|
+
},
|
|
305
|
+
null === maybeGetServerSnapshot ? void 0 : function() {
|
|
306
|
+
return memoizedSelector(maybeGetServerSnapshot());
|
|
307
|
+
}
|
|
308
|
+
];
|
|
309
|
+
},
|
|
310
|
+
[getSnapshot, getServerSnapshot, selector, isEqual2]
|
|
311
|
+
);
|
|
312
|
+
var value = useSyncExternalStore(subscribe, instRef[0], instRef[1]);
|
|
313
|
+
useEffect(
|
|
314
|
+
function() {
|
|
392
315
|
inst.hasValue = true;
|
|
393
316
|
inst.value = value;
|
|
394
|
-
},
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
})();
|
|
403
|
-
}
|
|
317
|
+
},
|
|
318
|
+
[value]
|
|
319
|
+
);
|
|
320
|
+
useDebugValue(value);
|
|
321
|
+
return value;
|
|
322
|
+
};
|
|
323
|
+
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
|
|
324
|
+
})();
|
|
404
325
|
return withSelector_development;
|
|
405
326
|
}
|
|
406
327
|
var hasRequiredWithSelector;
|
|
@@ -2502,7 +2423,7 @@ Refer to the authentication https://shopify.dev/api/storefront#authentication do
|
|
|
2502
2423
|
}
|
|
2503
2424
|
return false;
|
|
2504
2425
|
}
|
|
2505
|
-
const version = "2025.7.
|
|
2426
|
+
const version = "2025.7.2";
|
|
2506
2427
|
const SCHEMA_ID = "custom_storefront_customer_tracking/1.2";
|
|
2507
2428
|
const PAGE_RENDERED_EVENT_NAME = "page_rendered";
|
|
2508
2429
|
const COLLECTION_PAGE_RENDERED_EVENT_NAME = "collection_page_rendered";
|