@plasmicapp/react-web 1.0.38 → 1.0.39

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.
@@ -25,6 +25,10 @@ export declare function getStateSpecInPlasmicProxy(obj: any, path: ObjectPath):
25
25
  isImplicitStateArray: boolean;
26
26
  } | undefined;
27
27
  export declare function getCurrentInitialValue(obj: any, path: ObjectPath): any;
28
+ /** Whether the runtime guard has detected instability in this initializer.
29
+ * Canvas edits clear the diagnostic when the initializer hash changes.
30
+ */
31
+ export declare function hasUnstableStateInitializer(obj: any, path: ObjectPath): boolean;
28
32
  export declare function resetToInitialValue(obj: any, path: ObjectPath): void;
29
33
  export declare function shallowEqual<T>(a1: T[], a2: T[]): boolean;
30
34
  /**
@@ -1,4 +1,4 @@
1
1
  export { default as get } from "dlv";
2
- export { generateOnMutateForSpec, generateStateOnChangeProp, generateStateOnChangePropForCodeComponents, generateStateValueProp, getCurrentInitialValue, getStateCellsInPlasmicProxy, getStateSpecInPlasmicProxy, initializeCodeComponentStates, initializePlasmicStates, is$StateProxy, isPlasmicStateProxy, resetToInitialValue, set, } from "./helpers";
2
+ export { generateOnMutateForSpec, generateStateOnChangeProp, generateStateOnChangePropForCodeComponents, generateStateValueProp, getCurrentInitialValue, getStateCellsInPlasmicProxy, getStateSpecInPlasmicProxy, hasUnstableStateInitializer, initializeCodeComponentStates, initializePlasmicStates, is$StateProxy, isPlasmicStateProxy, resetToInitialValue, set, } from "./helpers";
3
3
  export { $State, $StateSpec, InitFunc } from "./types";
4
4
  export { useDollarState } from "./valtio";
@@ -46,22 +46,20 @@ export interface StateCell<T> {
46
46
  node: StateSpecNode<any>;
47
47
  path: ObjectPath;
48
48
  initFunc?: InitFunc<T>;
49
- listeners: (() => void)[];
50
49
  initFuncHash: string;
51
50
  overrideEnv?: NoUndefinedField<DollarStateEnv>;
51
+ pendingInit?: boolean;
52
+ unsettledResetCount?: number;
53
+ rejectedInitProbe?: {
54
+ value: T;
55
+ };
56
+ warnedUnstableInitFunc?: boolean;
52
57
  }
53
58
  export interface Internal$State {
54
- registrationsQueue: {
55
- node: StateSpecNode<any>;
56
- path: ObjectPath;
57
- f: InitFunc<any>;
58
- overrideEnv?: NoUndefinedField<DollarStateEnv>;
59
- }[];
60
59
  stateValues: Record<string, any>;
61
60
  env: NoUndefinedField<DollarStateEnv>;
62
61
  rootSpecTree: StateSpecNode<any>;
63
62
  specTreeLeaves: StateSpecNode<any>[];
64
- specs: $StateSpec<any>[];
65
63
  stateInitializationEnv: {
66
64
  stack: string[];
67
65
  visited: Set<string>;
@@ -0,0 +1 @@
1
+ export {};