@plasmicapp/react-web 0.2.358 → 0.2.359
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/index.cjs.js +10 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/react-web.esm.js +10 -1
- package/dist/react-web.esm.js.map +1 -1
- package/dist/states/types.d.ts +1 -0
- package/package.json +2 -2
- package/skinny/dist/index.js +10 -1
- package/skinny/dist/index.js.map +1 -1
- package/skinny/dist/states/types.d.ts +1 -0
package/dist/states/types.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plasmicapp/react-web",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.359",
|
|
4
4
|
"description": "plasmic library for rendering in the presentational style",
|
|
5
5
|
"main": "dist/index.cjs.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -168,5 +168,5 @@
|
|
|
168
168
|
"react": ">=16.8.0",
|
|
169
169
|
"react-dom": ">=16.8.0"
|
|
170
170
|
},
|
|
171
|
-
"gitHead": "
|
|
171
|
+
"gitHead": "53a85fd08ce84bfb2ed052a7ed9a662ad15bf8e8"
|
|
172
172
|
}
|
package/skinny/dist/index.js
CHANGED
|
@@ -1146,7 +1146,15 @@ function create$StateProxy($$state, leafHandlers) {
|
|
|
1146
1146
|
(_b = (_a = leafHandlers(ensureStateCell(receiver, property, nextPath, nextNode))).set) === null || _b === void 0 ? void 0 : _b.call(_a, target, property, value, receiver);
|
|
1147
1147
|
Reflect.set(target, property, value, receiver);
|
|
1148
1148
|
if (nextSpec === null || nextSpec === void 0 ? void 0 : nextSpec.onChangeProp) {
|
|
1149
|
-
|
|
1149
|
+
var pathKey = JSON.stringify(nextPath);
|
|
1150
|
+
var isInitOnChange = !$$state.initializedLeafPaths.has(pathKey);
|
|
1151
|
+
// We need to call the onChangeProp during initialization process so that the parent
|
|
1152
|
+
// state can be updated with the correct value. We will provide an addtionnal parameter
|
|
1153
|
+
// to the onChangeProp function to indicate that the call is made during initialization.
|
|
1154
|
+
(_d = (_c = $$state.env.$props)[nextSpec.onChangeProp]) === null || _d === void 0 ? void 0 : _d.call(_c, value, isInitOnChange);
|
|
1155
|
+
if (isInitOnChange) {
|
|
1156
|
+
$$state.initializedLeafPaths.add(pathKey);
|
|
1157
|
+
}
|
|
1150
1158
|
}
|
|
1151
1159
|
}
|
|
1152
1160
|
if (!nextNode) {
|
|
@@ -1271,6 +1279,7 @@ function useDollarState(specs) {
|
|
|
1271
1279
|
specs: [],
|
|
1272
1280
|
registrationsQueue: [],
|
|
1273
1281
|
stateInitializationEnv: { stack: [], visited: new Set() },
|
|
1282
|
+
initializedLeafPaths: new Set(),
|
|
1274
1283
|
};
|
|
1275
1284
|
})()).current;
|
|
1276
1285
|
$$state.env = envFieldsAreNonNill(env);
|