@plasmicapp/loader-react 1.0.164 → 1.0.165

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.
@@ -70,6 +70,16 @@ export declare function PlasmicRootProvider(props: {
70
70
  * Translator function to be used for text blocks
71
71
  */
72
72
  translator?: PlasmicTranslator;
73
+ /**
74
+ * Page path parameters (e.g. {slug: "foo"} if page path is
75
+ * /products/[slug] and URI is /products/foo).
76
+ */
77
+ pageParams?: Record<string, string>;
78
+ /**
79
+ * Page query parameters (e.g. {q: "foo"} if page path is
80
+ * /some/path?q=foo).
81
+ */
82
+ pageQuery?: Record<string, string>;
73
83
  }): JSX.Element;
74
84
  export declare function usePlasmicRootContext(): PlasmicRootContextValue | undefined;
75
85
  export {};
@@ -1399,7 +1399,9 @@ function PlasmicRootProvider(props) {
1399
1399
  suspenseForQueryData = props.suspenseForQueryData,
1400
1400
  globalContextsProps = props.globalContextsProps,
1401
1401
  variation = props.variation,
1402
- translator = props.translator;
1402
+ translator = props.translator,
1403
+ pageParams = props.pageParams,
1404
+ pageQuery = props.pageQuery;
1403
1405
  var loader = props.loader.__internal;
1404
1406
 
1405
1407
  if (prefetchedData) {
@@ -1455,7 +1457,10 @@ function PlasmicRootProvider(props) {
1455
1457
  loader: loader,
1456
1458
  prefetchedData: prefetchedData,
1457
1459
  skipFonts: skipFonts
1458
- }), children));
1460
+ }), React.createElement(PlasmicHost.PageParamsProvider, {
1461
+ params: pageParams,
1462
+ query: pageQuery
1463
+ }, children)));
1459
1464
  }
1460
1465
  /**
1461
1466
  * Inject all css modules as <style/> tags. We can't use the usual styleInjector postcss