@plasmicapp/loader-react 1.0.120 → 1.0.123

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,11 +1,10 @@
1
1
  import * as PlasmicHost from '@plasmicapp/host';
2
2
  import { registerComponent, registerGlobalContext, registerTrait } from '@plasmicapp/host';
3
- export { PlasmicCanvasContext, PlasmicCanvasHost, repeatedElement, usePlasmicCanvasContext } from '@plasmicapp/host';
3
+ export { DataCtxReader, DataProvider, PageParamsProvider, PlasmicCanvasContext, PlasmicCanvasHost, repeatedElement, useDataEnv, usePlasmicCanvasContext, useSelector, useSelectors } from '@plasmicapp/host';
4
4
  import * as PlasmicQuery from '@plasmicapp/query';
5
5
  import { PlasmicQueryDataProvider, PlasmicPrepassContext } from '@plasmicapp/query';
6
6
  export { usePlasmicQueryData } from '@plasmicapp/query';
7
7
  import { getBundleSubset, Registry, PlasmicModulesFetcher } from '@plasmicapp/loader-core';
8
- import * as plasmicHostRegisterComponent from '@plasmicapp/host/registerComponent';
9
8
  import { getActiveVariation } from '@plasmicapp/loader-splits';
10
9
  import React__default, { useState, useCallback, useEffect, useRef, useMemo, createElement, memo, useContext, createContext } from 'react';
11
10
  import ReactDOM from 'react-dom';
@@ -394,11 +393,9 @@ var runtime_1 = /*#__PURE__*/createCommonjsModule(function (module) {
394
393
 
395
394
 
396
395
  var IteratorPrototype = {};
397
-
398
- IteratorPrototype[iteratorSymbol] = function () {
396
+ define(IteratorPrototype, iteratorSymbol, function () {
399
397
  return this;
400
- };
401
-
398
+ });
402
399
  var getProto = Object.getPrototypeOf;
403
400
  var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
404
401
 
@@ -409,8 +406,9 @@ var runtime_1 = /*#__PURE__*/createCommonjsModule(function (module) {
409
406
  }
410
407
 
411
408
  var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
412
- GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;
413
- GeneratorFunctionPrototype.constructor = GeneratorFunction;
409
+ GeneratorFunction.prototype = GeneratorFunctionPrototype;
410
+ define(Gp, "constructor", GeneratorFunctionPrototype);
411
+ define(GeneratorFunctionPrototype, "constructor", GeneratorFunction);
414
412
  GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"); // Helper for defining the .next, .throw, and .return methods of the
415
413
  // Iterator interface in terms of a single ._invoke method.
416
414
 
@@ -515,11 +513,9 @@ var runtime_1 = /*#__PURE__*/createCommonjsModule(function (module) {
515
513
  }
516
514
 
517
515
  defineIteratorMethods(AsyncIterator.prototype);
518
-
519
- AsyncIterator.prototype[asyncIteratorSymbol] = function () {
516
+ define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
520
517
  return this;
521
- };
522
-
518
+ });
523
519
  exports.AsyncIterator = AsyncIterator; // Note that simple async functions are implemented on top of
524
520
  // AsyncIterator objects; they just return a Promise for the value of
525
521
  // the final result produced by the iterator.
@@ -696,13 +692,12 @@ var runtime_1 = /*#__PURE__*/createCommonjsModule(function (module) {
696
692
  // object to not be returned from this call. This ensures that doesn't happen.
697
693
  // See https://github.com/facebook/regenerator/issues/274 for more details.
698
694
 
699
- Gp[iteratorSymbol] = function () {
695
+ define(Gp, iteratorSymbol, function () {
700
696
  return this;
701
- };
702
-
703
- Gp.toString = function () {
697
+ });
698
+ define(Gp, "toString", function () {
704
699
  return "[object Generator]";
705
- };
700
+ });
706
701
 
707
702
  function pushTryEntry(locs) {
708
703
  var entry = {
@@ -1014,14 +1009,19 @@ var runtime_1 = /*#__PURE__*/createCommonjsModule(function (module) {
1014
1009
  } catch (accidentalStrictMode) {
1015
1010
  // This module should not be running in strict mode, so the above
1016
1011
  // assignment should always work unless something is misconfigured. Just
1017
- // in case runtime.js accidentally runs in strict mode, we can escape
1012
+ // in case runtime.js accidentally runs in strict mode, in modern engines
1013
+ // we can explicitly access globalThis. In older engines we can escape
1018
1014
  // strict mode using a global Function call. This could conceivably fail
1019
1015
  // if a Content Security Policy forbids using Function, but in that case
1020
1016
  // the proper solution is to fix the accidental strict mode problem. If
1021
1017
  // you've misconfigured your bundler to force strict mode and applied a
1022
1018
  // CSP to forbid Function, and you're not willing to fix either of those
1023
1019
  // problems, please detail your unique predicament in a GitHub issue.
1024
- Function("r", "regeneratorRuntime = r")(runtime);
1020
+ if (typeof globalThis === "object") {
1021
+ globalThis.regeneratorRuntime = runtime;
1022
+ } else {
1023
+ Function("r", "regeneratorRuntime = r")(runtime);
1024
+ }
1025
1025
  }
1026
1026
  });
1027
1027
 
@@ -1502,8 +1502,7 @@ var InternalPlasmicComponentLoader = /*#__PURE__*/function () {
1502
1502
  // Also inject @plasmicapp/query and @plasmicapp/host to use the
1503
1503
  // same contexts here and in loader-downloaded code.
1504
1504
  '@plasmicapp/query': PlasmicQuery,
1505
- '@plasmicapp/host': PlasmicHost,
1506
- '@plasmicapp/host/registerComponent': plasmicHostRegisterComponent
1505
+ '@plasmicapp/host': PlasmicHost
1507
1506
  });
1508
1507
  }
1509
1508