@plasmicapp/react-web 0.2.304 → 0.2.306

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/all.d.ts CHANGED
@@ -12031,7 +12031,7 @@ interface GlobalContextMeta<P> {
12031
12031
  * Whether the global context provides data to its children using DataProvider.
12032
12032
  */
12033
12033
  providesData?: boolean;
12034
- unstable__globalActions?: Record<string, GlobalActionRegistration<P>>;
12034
+ globalActions?: Record<string, GlobalActionRegistration<P>>;
12035
12035
  }
12036
12036
  interface GlobalContextRegistration {
12037
12037
  component: React.ComponentType<any>;
package/dist/index.cjs.js CHANGED
@@ -2398,18 +2398,6 @@ function useDollarState(specs) {
2398
2398
  });
2399
2399
  }
2400
2400
  }
2401
- // For each spec with an initFunc, evaluate it and see if
2402
- // the init value has changed. If so, reset its state.
2403
- var resetSpecs = [];
2404
- getStateCells($state, $$state.rootSpecTree).forEach(function (stateCell) {
2405
- var _a;
2406
- if (stateCell.initFunc) {
2407
- var newInit = invokeInitFuncBackwardsCompatible(stateCell.initFunc, __assign({ $state: $state }, ((_a = stateCell.overrideEnv) !== null && _a !== void 0 ? _a : envFieldsAreNonNill(env))));
2408
- if (!deepEqual(newInit, stateCell.initialValue)) {
2409
- resetSpecs.push({ stateCell: stateCell });
2410
- }
2411
- }
2412
- });
2413
2401
  var reInitializeState = function (stateCell) {
2414
2402
  var _a, _b;
2415
2403
  var newInit = initializeStateValue($$state, stateCell, $state);
@@ -2419,11 +2407,23 @@ function useDollarState(specs) {
2419
2407
  }
2420
2408
  };
2421
2409
  useIsomorphicLayoutEffect(function () {
2410
+ // For each spec with an initFunc, evaluate it and see if
2411
+ // the init value has changed. If so, reset its state.
2412
+ var resetSpecs = [];
2413
+ getStateCells($state, $$state.rootSpecTree).forEach(function (stateCell) {
2414
+ var _a;
2415
+ if (stateCell.initFunc) {
2416
+ var newInit = invokeInitFuncBackwardsCompatible(stateCell.initFunc, __assign({ $state: $state }, ((_a = stateCell.overrideEnv) !== null && _a !== void 0 ? _a : envFieldsAreNonNill(env))));
2417
+ if (!deepEqual(newInit, stateCell.initialValue)) {
2418
+ resetSpecs.push({ stateCell: stateCell });
2419
+ }
2420
+ }
2421
+ });
2422
2422
  resetSpecs.forEach(function (_a) {
2423
2423
  var stateCell = _a.stateCell;
2424
2424
  reInitializeState(stateCell);
2425
2425
  });
2426
- }, [env.$props, resetSpecs]);
2426
+ }, [env.$props, $state, $$state, reInitializeState]);
2427
2427
  useIsomorphicLayoutEffect(function () {
2428
2428
  while ($$state.registrationsQueue.length) {
2429
2429
  var _a = $$state.registrationsQueue.shift(), path = _a.path, f = _a.f, overrideEnv = _a.overrideEnv;