@prismicio/next 2.0.2-canary.7bb987d → 2.0.2-pr.112.11d2042

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/index.cjs CHANGED
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ require("./setGlobalConfig.cjs");
3
4
  const exitPreview = require("./exitPreview.cjs");
4
5
  const PrismicPreview = require("./PrismicPreview.cjs");
5
6
  const PrismicNextLink = require("./PrismicNextLink.cjs");
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;"}
package/dist/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import "./setGlobalConfig";
1
2
  export { exitPreview } from "./exitPreview";
2
3
  export { PrismicPreview } from "./PrismicPreview";
3
4
  export type { PrismicPreviewProps } from "./PrismicPreview";
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const version = "2.0.2-canary.7bb987d";
3
+ const version = "2.0.2-pr.112.11d2042";
4
4
  exports.version = version;
5
5
  //# sourceMappingURL=package.json.cjs.map
@@ -1,3 +1,4 @@
1
+ import "../setGlobalConfig";
1
2
  export { PrismicNextLink } from "../PrismicNextLink";
2
3
  export { type PrismicNextLinkProps } from "../PrismicNextLink";
3
4
  export { PrismicNextImage } from "../PrismicNextImage";
package/dist/pages.cjs CHANGED
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ require("./setGlobalConfig.cjs");
3
4
  const PrismicNextLink = require("./PrismicNextLink.cjs");
4
5
  const PrismicNextImage = require("./PrismicNextImage.cjs");
5
6
  const imgixLoader = require("./imgixLoader.cjs");
@@ -1 +1 @@
1
- {"version":3,"file":"pages.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"pages.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ const Link = require("next/link");
3
+ const globalConfigKey = Symbol.for("@prismicio/react/config");
4
+ globalThis[globalConfigKey] = {
5
+ ...globalThis[globalConfigKey],
6
+ internalLinkComponent: Link
7
+ };
8
+ //# sourceMappingURL=setGlobalConfig.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"setGlobalConfig.cjs","sources":["../src/setGlobalConfig.ts"],"sourcesContent":["import { HTMLAttributeAnchorTarget, ReactNode } from \"react\";\nimport Link from \"next/link\";\n\nconst globalConfigKey = Symbol.for(\"@prismicio/react/config\");\n\ntype GlobalThis = {\n\t[globalConfigKey]?: {\n\t\tinternalLinkComponent?: React.ComponentType<{\n\t\t\thref: string;\n\t\t\ttarget?: HTMLAttributeAnchorTarget;\n\t\t\trel?: string;\n\t\t\tchildren?: ReactNode;\n\t\t}>;\n\t};\n};\n\n(globalThis as GlobalThis)[globalConfigKey] = {\n\t...(globalThis as GlobalThis)[globalConfigKey],\n\tinternalLinkComponent: Link,\n};\n"],"names":[],"mappings":";;AAGA,MAAM,kBAAkB,OAAO,IAAI,yBAAyB;AAa3D,WAA0B,eAAe,IAAI;AAAA,EAC7C,GAAI,WAA0B,eAAe;AAAA,EAC7C,uBAAuB;;"}
@@ -0,0 +1 @@
1
+ export {};
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "e2e-projects/*"
5
5
  ],
6
6
  "name": "@prismicio/next",
7
- "version": "2.0.2-canary.7bb987d",
7
+ "version": "2.0.2-pr.112.11d2042",
8
8
  "description": "Helpers to integrate Prismic into Next.js apps",
9
9
  "keywords": [
10
10
  "typescript",
@@ -19,7 +19,10 @@
19
19
  },
20
20
  "license": "Apache-2.0",
21
21
  "author": "Prismic <contact@prismic.io> (https://prismic.io)",
22
- "sideEffects": false,
22
+ "sideEffects": [
23
+ "./dist/index.cjs",
24
+ "./dist/pages.cjs"
25
+ ],
23
26
  "type": "module",
24
27
  "exports": {
25
28
  ".": {
@@ -69,6 +72,7 @@
69
72
  "@eslint/js": "^9.17.0",
70
73
  "@playwright/test": "^1.49.1",
71
74
  "@prismicio/client": "^7.12.0",
75
+ "@prismicio/react": "pr-235",
72
76
  "@prismicio/types-internal": "^3.3.0",
73
77
  "@rollup/plugin-typescript": "^12.1.2",
74
78
  "@size-limit/preset-small-lib": "^11.1.6",
package/src/index.ts CHANGED
@@ -1,3 +1,5 @@
1
+ import "./setGlobalConfig";
2
+
1
3
  export { exitPreview } from "./exitPreview";
2
4
 
3
5
  export { PrismicPreview } from "./PrismicPreview";
@@ -1,3 +1,5 @@
1
+ import "../setGlobalConfig";
2
+
1
3
  export { PrismicNextLink } from "../PrismicNextLink";
2
4
  export { type PrismicNextLinkProps } from "../PrismicNextLink";
3
5
 
@@ -0,0 +1,20 @@
1
+ import { HTMLAttributeAnchorTarget, ReactNode } from "react";
2
+ import Link from "next/link";
3
+
4
+ const globalConfigKey = Symbol.for("@prismicio/react/config");
5
+
6
+ type GlobalThis = {
7
+ [globalConfigKey]?: {
8
+ internalLinkComponent?: React.ComponentType<{
9
+ href: string;
10
+ target?: HTMLAttributeAnchorTarget;
11
+ rel?: string;
12
+ children?: ReactNode;
13
+ }>;
14
+ };
15
+ };
16
+
17
+ (globalThis as GlobalThis)[globalConfigKey] = {
18
+ ...(globalThis as GlobalThis)[globalConfigKey],
19
+ internalLinkComponent: Link,
20
+ };