@plasmicapp/loader-react 1.0.171 → 1.0.172
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/PlasmicRootProvider.d.ts +6 -0
- package/dist/loader-react.cjs.development.js +8 -4
- 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 +8 -4
- package/dist/loader-react.esm.js.map +1 -1
- package/package.json +2 -2
|
@@ -6,6 +6,7 @@ interface PlasmicRootContextValue {
|
|
|
6
6
|
loader: InternalPlasmicComponentLoader;
|
|
7
7
|
variation?: Record<string, string>;
|
|
8
8
|
translator?: PlasmicTranslator;
|
|
9
|
+
Head?: React.ComponentType<any>;
|
|
9
10
|
}
|
|
10
11
|
export interface GlobalVariantSpec {
|
|
11
12
|
name: string;
|
|
@@ -70,6 +71,11 @@ export declare function PlasmicRootProvider(props: {
|
|
|
70
71
|
* Translator function to be used for text blocks
|
|
71
72
|
*/
|
|
72
73
|
translator?: PlasmicTranslator;
|
|
74
|
+
/**
|
|
75
|
+
* Head component to use in PlasmicHead component (e.g. Head from next/head
|
|
76
|
+
* or Helmet from react-helmet).
|
|
77
|
+
*/
|
|
78
|
+
Head?: React.ComponentType<any>;
|
|
73
79
|
/**
|
|
74
80
|
* Page path parameters (e.g. {slug: "foo"} if page path is
|
|
75
81
|
* /products/[slug] and URI is /products/foo).
|
|
@@ -1403,6 +1403,7 @@ function PlasmicRootProvider(props) {
|
|
|
1403
1403
|
globalContextsProps = props.globalContextsProps,
|
|
1404
1404
|
variation = props.variation,
|
|
1405
1405
|
translator = props.translator,
|
|
1406
|
+
Head = props.Head,
|
|
1406
1407
|
pageParams = props.pageParams,
|
|
1407
1408
|
pageQuery = props.pageQuery;
|
|
1408
1409
|
var loader = props.loader.__internal;
|
|
@@ -1448,9 +1449,10 @@ function PlasmicRootProvider(props) {
|
|
|
1448
1449
|
globalContextsProps: globalContextsProps,
|
|
1449
1450
|
loader: loader,
|
|
1450
1451
|
variation: variation,
|
|
1451
|
-
translator: translator
|
|
1452
|
+
translator: translator,
|
|
1453
|
+
Head: Head
|
|
1452
1454
|
};
|
|
1453
|
-
}, [globalVariants, variation, globalContextsProps, loader, splits, translator]);
|
|
1455
|
+
}, [globalVariants, variation, globalContextsProps, loader, splits, translator, Head]);
|
|
1454
1456
|
return React.createElement(PlasmicQuery.PlasmicQueryDataProvider, {
|
|
1455
1457
|
prefetchedCache: prefetchedQueryData,
|
|
1456
1458
|
suspense: suspenseForQueryData
|
|
@@ -2510,7 +2512,8 @@ function PlasmicComponent(props) {
|
|
|
2510
2512
|
var loader = rootContext.loader,
|
|
2511
2513
|
globalContextsProps = rootContext.globalContextsProps,
|
|
2512
2514
|
variation = rootContext.variation,
|
|
2513
|
-
translator = rootContext.translator
|
|
2515
|
+
translator = rootContext.translator,
|
|
2516
|
+
Head = rootContext.Head;
|
|
2514
2517
|
var Component = usePlasmicComponent({
|
|
2515
2518
|
name: component,
|
|
2516
2519
|
projectId: projectId,
|
|
@@ -2562,7 +2565,8 @@ function PlasmicComponent(props) {
|
|
|
2562
2565
|
projectId: projectId
|
|
2563
2566
|
});
|
|
2564
2567
|
element = React.createElement(ReactWebRootProvider, {
|
|
2565
|
-
translator: translator
|
|
2568
|
+
translator: translator,
|
|
2569
|
+
Head: Head
|
|
2566
2570
|
}, React.createElement(MaybeWrap, {
|
|
2567
2571
|
cond: !!GlobalContextsProvider,
|
|
2568
2572
|
wrapper: function wrapper(children) {
|