@plasmicpkgs/commerce-shopify 0.0.27 → 0.0.30

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.
@@ -1,5 +1,13 @@
1
1
  import { SWRHook } from '@plasmicpkgs/commerce';
2
2
  import { GetCartHook } from '../types/cart';
3
- declare const _default;
3
+ declare const _default: (input?: {
4
+ swrOptions?: Partial<import("swr/dist/types").PublicConfiguration<import("@plasmicpkgs/commerce/dist/types/cart").Cart | null | undefined, import("@plasmicpkgs/commerce").CommerceError, import("@plasmicpkgs/commerce").HookFetcher<import("@plasmicpkgs/commerce/dist/types/cart").Cart | null | undefined, {
5
+ cartId?: string | undefined;
6
+ }, any>>> | undefined;
7
+ } | undefined) => import("swr").SWRResponse<import("@plasmicpkgs/commerce/dist/types/cart").Cart | null | undefined, import("@plasmicpkgs/commerce").CommerceError> & {
8
+ isLoading: boolean;
9
+ } & {
10
+ isEmpty: boolean;
11
+ };
4
12
  export default _default;
5
13
  export declare const handler: SWRHook<GetCartHook>;
@@ -185,11 +185,9 @@ var runtime_1 = /*#__PURE__*/createCommonjsModule(function (module) {
185
185
 
186
186
 
187
187
  var IteratorPrototype = {};
188
-
189
- IteratorPrototype[iteratorSymbol] = function () {
188
+ define(IteratorPrototype, iteratorSymbol, function () {
190
189
  return this;
191
- };
192
-
190
+ });
193
191
  var getProto = Object.getPrototypeOf;
194
192
  var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
195
193
 
@@ -200,8 +198,9 @@ var runtime_1 = /*#__PURE__*/createCommonjsModule(function (module) {
200
198
  }
201
199
 
202
200
  var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
203
- GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;
204
- GeneratorFunctionPrototype.constructor = GeneratorFunction;
201
+ GeneratorFunction.prototype = GeneratorFunctionPrototype;
202
+ define(Gp, "constructor", GeneratorFunctionPrototype);
203
+ define(GeneratorFunctionPrototype, "constructor", GeneratorFunction);
205
204
  GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"); // Helper for defining the .next, .throw, and .return methods of the
206
205
  // Iterator interface in terms of a single ._invoke method.
207
206
 
@@ -306,11 +305,9 @@ var runtime_1 = /*#__PURE__*/createCommonjsModule(function (module) {
306
305
  }
307
306
 
308
307
  defineIteratorMethods(AsyncIterator.prototype);
309
-
310
- AsyncIterator.prototype[asyncIteratorSymbol] = function () {
308
+ define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
311
309
  return this;
312
- };
313
-
310
+ });
314
311
  exports.AsyncIterator = AsyncIterator; // Note that simple async functions are implemented on top of
315
312
  // AsyncIterator objects; they just return a Promise for the value of
316
313
  // the final result produced by the iterator.
@@ -487,13 +484,12 @@ var runtime_1 = /*#__PURE__*/createCommonjsModule(function (module) {
487
484
  // object to not be returned from this call. This ensures that doesn't happen.
488
485
  // See https://github.com/facebook/regenerator/issues/274 for more details.
489
486
 
490
- Gp[iteratorSymbol] = function () {
487
+ define(Gp, iteratorSymbol, function () {
491
488
  return this;
492
- };
493
-
494
- Gp.toString = function () {
489
+ });
490
+ define(Gp, "toString", function () {
495
491
  return "[object Generator]";
496
- };
492
+ });
497
493
 
498
494
  function pushTryEntry(locs) {
499
495
  var entry = {
@@ -805,14 +801,19 @@ var runtime_1 = /*#__PURE__*/createCommonjsModule(function (module) {
805
801
  } catch (accidentalStrictMode) {
806
802
  // This module should not be running in strict mode, so the above
807
803
  // assignment should always work unless something is misconfigured. Just
808
- // in case runtime.js accidentally runs in strict mode, we can escape
804
+ // in case runtime.js accidentally runs in strict mode, in modern engines
805
+ // we can explicitly access globalThis. In older engines we can escape
809
806
  // strict mode using a global Function call. This could conceivably fail
810
807
  // if a Content Security Policy forbids using Function, but in that case
811
808
  // the proper solution is to fix the accidental strict mode problem. If
812
809
  // you've misconfigured your bundler to force strict mode and applied a
813
810
  // CSP to forbid Function, and you're not willing to fix either of those
814
811
  // problems, please detail your unique predicament in a GitHub issue.
815
- Function("r", "regeneratorRuntime = r")(runtime);
812
+ if (typeof globalThis === "object") {
813
+ globalThis.regeneratorRuntime = runtime;
814
+ } else {
815
+ Function("r", "regeneratorRuntime = r")(runtime);
816
+ }
816
817
  }
817
818
  });
818
819