@plasmicpkgs/commerce-swell 0.0.28 → 0.0.31

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,6 +1,14 @@
1
1
  import { SWRHook } from '@plasmicpkgs/commerce';
2
2
  import type { CartType } from '@plasmicpkgs/commerce';
3
- declare const _default;
3
+ declare const _default: (input?: {
4
+ swrOptions?: Partial<import("swr/dist/types").PublicConfiguration<CartType.Cart | null | undefined, import("@plasmicpkgs/commerce").CommerceError, import("@plasmicpkgs/commerce").HookFetcher<CartType.Cart | null | undefined, {
5
+ cartId?: string | undefined;
6
+ }, any>>> | undefined;
7
+ } | undefined) => import("swr").SWRResponse<CartType.Cart | null | undefined, import("@plasmicpkgs/commerce").CommerceError> & {
8
+ isLoading: boolean;
9
+ } & {
10
+ isEmpty: boolean;
11
+ };
4
12
  export default _default;
5
13
  declare type GetCartHook = CartType.GetCartHook;
6
14
  export declare const handler: SWRHook<GetCartHook>;
@@ -224,11 +224,9 @@ var runtime_1 = /*#__PURE__*/createCommonjsModule(function (module) {
224
224
 
225
225
 
226
226
  var IteratorPrototype = {};
227
-
228
- IteratorPrototype[iteratorSymbol] = function () {
227
+ define(IteratorPrototype, iteratorSymbol, function () {
229
228
  return this;
230
- };
231
-
229
+ });
232
230
  var getProto = Object.getPrototypeOf;
233
231
  var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
234
232
 
@@ -239,8 +237,9 @@ var runtime_1 = /*#__PURE__*/createCommonjsModule(function (module) {
239
237
  }
240
238
 
241
239
  var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
242
- GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;
243
- GeneratorFunctionPrototype.constructor = GeneratorFunction;
240
+ GeneratorFunction.prototype = GeneratorFunctionPrototype;
241
+ define(Gp, "constructor", GeneratorFunctionPrototype);
242
+ define(GeneratorFunctionPrototype, "constructor", GeneratorFunction);
244
243
  GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"); // Helper for defining the .next, .throw, and .return methods of the
245
244
  // Iterator interface in terms of a single ._invoke method.
246
245
 
@@ -345,11 +344,9 @@ var runtime_1 = /*#__PURE__*/createCommonjsModule(function (module) {
345
344
  }
346
345
 
347
346
  defineIteratorMethods(AsyncIterator.prototype);
348
-
349
- AsyncIterator.prototype[asyncIteratorSymbol] = function () {
347
+ define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
350
348
  return this;
351
- };
352
-
349
+ });
353
350
  exports.AsyncIterator = AsyncIterator; // Note that simple async functions are implemented on top of
354
351
  // AsyncIterator objects; they just return a Promise for the value of
355
352
  // the final result produced by the iterator.
@@ -526,13 +523,12 @@ var runtime_1 = /*#__PURE__*/createCommonjsModule(function (module) {
526
523
  // object to not be returned from this call. This ensures that doesn't happen.
527
524
  // See https://github.com/facebook/regenerator/issues/274 for more details.
528
525
 
529
- Gp[iteratorSymbol] = function () {
526
+ define(Gp, iteratorSymbol, function () {
530
527
  return this;
531
- };
532
-
533
- Gp.toString = function () {
528
+ });
529
+ define(Gp, "toString", function () {
534
530
  return "[object Generator]";
535
- };
531
+ });
536
532
 
537
533
  function pushTryEntry(locs) {
538
534
  var entry = {
@@ -844,14 +840,19 @@ var runtime_1 = /*#__PURE__*/createCommonjsModule(function (module) {
844
840
  } catch (accidentalStrictMode) {
845
841
  // This module should not be running in strict mode, so the above
846
842
  // assignment should always work unless something is misconfigured. Just
847
- // in case runtime.js accidentally runs in strict mode, we can escape
843
+ // in case runtime.js accidentally runs in strict mode, in modern engines
844
+ // we can explicitly access globalThis. In older engines we can escape
848
845
  // strict mode using a global Function call. This could conceivably fail
849
846
  // if a Content Security Policy forbids using Function, but in that case
850
847
  // the proper solution is to fix the accidental strict mode problem. If
851
848
  // you've misconfigured your bundler to force strict mode and applied a
852
849
  // CSP to forbid Function, and you're not willing to fix either of those
853
850
  // problems, please detail your unique predicament in a GitHub issue.
854
- Function("r", "regeneratorRuntime = r")(runtime);
851
+ if (typeof globalThis === "object") {
852
+ globalThis.regeneratorRuntime = runtime;
853
+ } else {
854
+ Function("r", "regeneratorRuntime = r")(runtime);
855
+ }
855
856
  }
856
857
  });
857
858
 
@@ -2106,6 +2107,7 @@ var commerceProviderMeta = {
2106
2107
  defaultValue: "pk_QaZeGhtpQaVbNQnWJdRlE1abE6Ezf9U9"
2107
2108
  }
2108
2109
  },
2110
+ description: "Get your store ID and public storefront API key from the Swell admin UI under Developer > API Keys.\n\n[Watch how to use this integration](https://plasmic-sandbox.swell.store/admin/settings/api).",
2109
2111
  importPath: "@plasmicpkgs/commerce-swell",
2110
2112
  importName: "CommerceProviderComponent"
2111
2113
  };