@plasmicapp/react-web 0.2.330 → 0.2.332
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/all.d.ts +3 -2
- package/dist/index.cjs.js +21 -0
- package/dist/index.cjs.js.map +1 -1
- package/dist/nextjs-app-router/index.d.ts +1 -0
- package/dist/nextjs-app-router/react-server/index.d.ts +15 -0
- package/dist/react-web.esm.js +21 -0
- package/dist/react-web.esm.js.map +1 -1
- package/dist/render/PlasmicHead/index.d.ts +2 -8
- package/lib/nextjs-app-router/index.cjs.js +11 -0
- package/lib/nextjs-app-router/index.cjs.js.map +1 -0
- package/lib/nextjs-app-router/index.d.ts +1 -0
- package/lib/nextjs-app-router/index.js +2 -0
- package/lib/nextjs-app-router/index.js.map +1 -0
- package/lib/nextjs-app-router/package.json +8 -0
- package/lib/nextjs-app-router/react-server/index.cjs.js +143 -0
- package/lib/nextjs-app-router/react-server/index.cjs.js.map +1 -0
- package/lib/nextjs-app-router/react-server/index.d.ts +15 -0
- package/lib/nextjs-app-router/react-server/index.js +130 -0
- package/lib/nextjs-app-router/react-server/index.js.map +1 -0
- package/lib/nextjs-app-router/react-server/package.json +8 -0
- package/package.json +18 -7
- package/skinny/dist/index.js +3 -3
- package/skinny/dist/nextjs-app-router/index.d.ts +1 -0
- package/skinny/dist/nextjs-app-router/react-server/index.d.ts +15 -0
- package/skinny/dist/plume/checkbox/index.js +3 -2
- package/skinny/dist/plume/checkbox/index.js.map +1 -1
- package/skinny/dist/plume/menu/index.js +3 -2
- package/skinny/dist/plume/menu/index.js.map +1 -1
- package/skinny/dist/plume/menu-button/index.js +3 -2
- package/skinny/dist/plume/menu-button/index.js.map +1 -1
- package/skinny/dist/plume/select/index.js +2 -1
- package/skinny/dist/plume/select/index.js.map +1 -1
- package/skinny/dist/plume/switch/index.js +3 -2
- package/skinny/dist/plume/switch/index.js.map +1 -1
- package/skinny/dist/render/PlasmicHead/index.d.ts +2 -8
- package/skinny/dist/render/PlasmicHead/index.js +22 -0
- package/skinny/dist/render/PlasmicHead/index.js.map +1 -1
- package/skinny/dist/{ssr-145c6cd2.js → ssr-f37a883d.js} +2 -2
- package/skinny/dist/{ssr-145c6cd2.js.map → ssr-f37a883d.js.map} +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ExtractPlasmicQueryData as __EXPERMIENTAL__ExtractPlasmicQueryData } from "@plasmicapp/nextjs-app-router";
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { fetchExtractedHeadMetadata, fetchExtractedQueryData, withPlasmicMetadata } from "@plasmicapp/nextjs-app-router/react-server";
|
|
2
|
+
import React from "react";
|
|
3
|
+
export { fetchExtractedQueryData as __EXPERMIENTAL__fetchExtractedQueryData, fetchExtractedHeadMetadata as __EXPERMIENTAL__fetchExtractedHeadMetadata, withPlasmicMetadata as __EXPERMIENTAL__withPlasmicMetadata, };
|
|
4
|
+
/**
|
|
5
|
+
* Helper function to extract Plasmic data.
|
|
6
|
+
*
|
|
7
|
+
* Given React element for your page and current pathname + search
|
|
8
|
+
* params, returns:
|
|
9
|
+
* - The extracted query data, if `plasmicSsr` search param is set
|
|
10
|
+
* - A copy of the page element wraped within PlasmicQueryDataProvider to provide the extracted query data, otherwise
|
|
11
|
+
*/
|
|
12
|
+
export declare function __EXPERMIENTAL__withExtractPlasmicQueryData(pageRootElt: React.ReactElement, { pathname, searchParams, }: {
|
|
13
|
+
pathname: string;
|
|
14
|
+
searchParams: Record<string, string | string[]> | undefined;
|
|
15
|
+
}): Promise<React.JSX.Element>;
|
package/dist/react-web.esm.js
CHANGED
|
@@ -1039,6 +1039,27 @@ function ensureGlobalVariants(globalVariantValues) {
|
|
|
1039
1039
|
var PlasmicHeadContext = React.createContext(undefined);
|
|
1040
1040
|
function PlasmicHead(props) {
|
|
1041
1041
|
var Head = React.useContext(PlasmicHeadContext);
|
|
1042
|
+
var headMetadata =
|
|
1043
|
+
// Check if `HeadMetadataContext` is exported for backward compatibility
|
|
1044
|
+
"HeadMetadataContext" in plasmicQuery
|
|
1045
|
+
? React.useContext(plasmicQuery.HeadMetadataContext)
|
|
1046
|
+
: undefined;
|
|
1047
|
+
if (headMetadata) {
|
|
1048
|
+
// If we have the Head metadata object specified, mutate it so to ensure it
|
|
1049
|
+
// stores the data that should go in the <head>.
|
|
1050
|
+
if (props.image) {
|
|
1051
|
+
headMetadata.image = props.image;
|
|
1052
|
+
}
|
|
1053
|
+
if (props.title) {
|
|
1054
|
+
headMetadata.title = props.title;
|
|
1055
|
+
}
|
|
1056
|
+
if (props.description) {
|
|
1057
|
+
headMetadata.description = props.description;
|
|
1058
|
+
}
|
|
1059
|
+
if (props.canonical) {
|
|
1060
|
+
headMetadata.canonical = props.canonical;
|
|
1061
|
+
}
|
|
1062
|
+
}
|
|
1042
1063
|
if (!Head) {
|
|
1043
1064
|
console.warn("Plasmic: Head meta tags are being ignored. To make them work, pass a Head component into PlasmicRootProvider.");
|
|
1044
1065
|
// TODO: Link to doc about Head.
|