@plasmicapp/loader-react 1.0.57 → 1.0.58
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/loader-react.cjs.development.js +8 -5
- package/dist/loader-react.cjs.development.js.map +1 -1
- package/dist/loader-react.cjs.production.min.js +1 -1
- package/dist/loader-react.cjs.production.min.js.map +1 -1
- package/dist/loader-react.esm.js +5 -1
- package/dist/loader-react.esm.js.map +1 -1
- package/package.json +1 -1
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
|
|
6
6
|
|
|
7
7
|
var host = require('@plasmicapp/host');
|
|
8
|
-
var
|
|
8
|
+
var PlasmicQuery = require('@plasmicapp/query');
|
|
9
9
|
var loaderCore = require('@plasmicapp/loader-core');
|
|
10
10
|
var React = require('react');
|
|
11
11
|
var React__default = _interopDefault(React);
|
|
@@ -1230,7 +1230,7 @@ function PlasmicRootProvider(props) {
|
|
|
1230
1230
|
loader: loader
|
|
1231
1231
|
};
|
|
1232
1232
|
}, [globalVariants, loader]);
|
|
1233
|
-
return React.createElement(
|
|
1233
|
+
return React.createElement(PlasmicQuery.PlasmicQueryDataProvider, {
|
|
1234
1234
|
prefetchedCache: prefetchedQueryData,
|
|
1235
1235
|
suspense: suspenseForQueryData
|
|
1236
1236
|
}, React.createElement(PlasmicRootContext.Provider, {
|
|
@@ -1351,7 +1351,10 @@ function initPlasmicLoader(opts) {
|
|
|
1351
1351
|
react: React__default,
|
|
1352
1352
|
'react-dom': ReactDOM,
|
|
1353
1353
|
'react/jsx-runtime': jsxRuntime,
|
|
1354
|
-
'react/jsx-dev-runtime': jsxDevRuntime
|
|
1354
|
+
'react/jsx-dev-runtime': jsxDevRuntime,
|
|
1355
|
+
// Also inject @plasmicapp/query at run time, so that the same
|
|
1356
|
+
// context is used here and in loader-downloaded code
|
|
1357
|
+
'@plasmicapp/query': PlasmicQuery
|
|
1355
1358
|
});
|
|
1356
1359
|
return new PlasmicComponentLoader(internal);
|
|
1357
1360
|
}
|
|
@@ -2203,7 +2206,7 @@ function _extractPlasmicQueryData() {
|
|
|
2203
2206
|
cache = {};
|
|
2204
2207
|
_context.prev = 1;
|
|
2205
2208
|
_context.next = 4;
|
|
2206
|
-
return plasmicPrepass(React__default.createElement(
|
|
2209
|
+
return plasmicPrepass(React__default.createElement(PlasmicQuery.PrepassContext.Provider, {
|
|
2207
2210
|
value: {
|
|
2208
2211
|
cache: cache
|
|
2209
2212
|
}
|
|
@@ -2447,7 +2450,7 @@ Object.defineProperty(exports, 'repeatedElement', {
|
|
|
2447
2450
|
Object.defineProperty(exports, 'usePlasmicQueryData', {
|
|
2448
2451
|
enumerable: true,
|
|
2449
2452
|
get: function () {
|
|
2450
|
-
return
|
|
2453
|
+
return PlasmicQuery.usePlasmicQueryData;
|
|
2451
2454
|
}
|
|
2452
2455
|
});
|
|
2453
2456
|
exports.PlasmicComponent = PlasmicComponent;
|