@plasmicapp/react-web 0.2.331 → 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/react-server/index.d.ts +2 -2
- 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/react-server/index.cjs.js +8 -0
- package/lib/nextjs-app-router/react-server/index.cjs.js.map +1 -1
- package/lib/nextjs-app-router/react-server/index.d.ts +2 -2
- package/lib/nextjs-app-router/react-server/index.js +1 -1
- package/lib/nextjs-app-router/react-server/index.js.map +1 -1
- package/package.json +8 -8
- package/skinny/dist/index.js +3 -3
- package/skinny/dist/nextjs-app-router/react-server/index.d.ts +2 -2
- 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
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { fetchExtractedQueryData } from "@plasmicapp/nextjs-app-router/react-server";
|
|
1
|
+
import { fetchExtractedHeadMetadata, fetchExtractedQueryData, withPlasmicMetadata } from "@plasmicapp/nextjs-app-router/react-server";
|
|
2
2
|
import React from "react";
|
|
3
|
-
export { fetchExtractedQueryData as __EXPERMIENTAL__fetchExtractedQueryData };
|
|
3
|
+
export { fetchExtractedQueryData as __EXPERMIENTAL__fetchExtractedQueryData, fetchExtractedHeadMetadata as __EXPERMIENTAL__fetchExtractedHeadMetadata, withPlasmicMetadata as __EXPERMIENTAL__withPlasmicMetadata, };
|
|
4
4
|
/**
|
|
5
5
|
* Helper function to extract Plasmic data.
|
|
6
6
|
*
|
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.
|