@plasmicapp/loader-react 1.0.184 → 1.0.186
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/bundles.d.ts +3 -1
- package/dist/loader-react.cjs.development.js +45 -23
- 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 +45 -23
- package/dist/loader-react.esm.js.map +1 -1
- package/dist/loader.d.ts +19 -0
- package/package.json +5 -4
package/dist/loader.d.ts
CHANGED
|
@@ -84,7 +84,9 @@ export declare class InternalPlasmicComponentLoader {
|
|
|
84
84
|
unsubscribePlasmicRoot(watcher: PlasmicRootWatcher): void;
|
|
85
85
|
clearCache(): void;
|
|
86
86
|
private maybeGetCompMetas;
|
|
87
|
+
maybeFetchComponentData(specs: ComponentLookupSpec[], opts?: FetchComponentDataOpts): Promise<ComponentRenderData | null>;
|
|
87
88
|
maybeFetchComponentData(...specs: ComponentLookupSpec[]): Promise<ComponentRenderData | null>;
|
|
89
|
+
fetchComponentData(specs: ComponentLookupSpec[], opts?: FetchComponentDataOpts): Promise<ComponentRenderData>;
|
|
88
90
|
fetchComponentData(...specs: ComponentLookupSpec[]): Promise<ComponentRenderData>;
|
|
89
91
|
fetchPages(opts?: FetchPagesOpts): Promise<PageMeta[]>;
|
|
90
92
|
fetchComponents(): Promise<ComponentMeta[]>;
|
|
@@ -188,4 +190,21 @@ export declare class PlasmicComponentLoader {
|
|
|
188
190
|
trackConversion(value?: number): void;
|
|
189
191
|
clearCache(): void;
|
|
190
192
|
}
|
|
193
|
+
interface FetchComponentDataOpts {
|
|
194
|
+
/**
|
|
195
|
+
* Will fetch either code targeting SSR or browser hydration in the
|
|
196
|
+
* returned bundle.
|
|
197
|
+
*
|
|
198
|
+
* By default, the target is browser. That's okay, because even when
|
|
199
|
+
* doing SSR, as long as you are using the same instance of PlasmicLoader
|
|
200
|
+
* that was used to fetch component data, it will still know how to get at
|
|
201
|
+
* the server code.
|
|
202
|
+
*
|
|
203
|
+
* But, if you are building your own SSR solution, where fetching and rendering
|
|
204
|
+
* are using different instances of PlasmicLoader, then you'll want to make
|
|
205
|
+
* sure that when you fetch, you are fetching the right one to be used in the
|
|
206
|
+
* right environment for either SSR or browser hydration.
|
|
207
|
+
*/
|
|
208
|
+
target?: 'server' | 'browser';
|
|
209
|
+
}
|
|
191
210
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plasmicapp/loader-react",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.186",
|
|
4
4
|
"module": "dist/loader-react.esm.js",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"typings": "dist/index.d.ts",
|
|
@@ -22,8 +22,9 @@
|
|
|
22
22
|
"analyze": "size-limit --why"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@plasmicapp/
|
|
26
|
-
"@plasmicapp/
|
|
25
|
+
"@plasmicapp/data-sources-context": "^0.1.2",
|
|
26
|
+
"@plasmicapp/host": "1.0.82",
|
|
27
|
+
"@plasmicapp/loader-core": "1.0.84",
|
|
27
28
|
"@plasmicapp/loader-splits": "1.0.15",
|
|
28
29
|
"@plasmicapp/query": "0.1.55",
|
|
29
30
|
"pascalcase": "^1.0.0",
|
|
@@ -74,5 +75,5 @@
|
|
|
74
75
|
"typescript": "^4.3.2"
|
|
75
76
|
},
|
|
76
77
|
"license": "MIT",
|
|
77
|
-
"gitHead": "
|
|
78
|
+
"gitHead": "1e7d8c058a0dea750ee8ba9cf9afeafc24e569f8"
|
|
78
79
|
}
|